diff --git a/.github/ISSUE_TEMPLATE/api_ticket.md b/.github/ISSUE_TEMPLATE/api_ticket.md new file mode 100644 index 0000000000..491686ba76 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/api_ticket.md @@ -0,0 +1,49 @@ +--- +name: API request +about: A request for an API to support a feature +title: '[API]: ' +labels: "api" +assignees: '' +--- + +# API Overview + +**In order to** ... (context - overcome a problem or meet a requirement) +**We will build an API to**... (what - describe what the API needs to do) +**So that** ... (why - we create these outcomes) + +- +- +- + +## Specs +[Spec name](URL) to spec or section within a spec + +## API request details + +- [ ] Create an API that... (specific details about the API's functionality and what it should provide) +- [ ] + +### Filtering requirements (inputs) + - [ ] + - [ ] + +### Sample API output (optional) + +``` + +``` + +## Questions +Open questions about the feature implementation, what can be done with the APIs, or currently unresolved questions around the feature. + +## API test scenarios +Detailed scenarios that can be executed as feature tests to verify that the API has been implemented as expected. + +GIVEN (setup/context) +WHEN (action) +THEN (assertion) For example... +See [here](https://github.com/vegaprotocol/vega/tree/develop/core/integration) for more format information and examples. + +### Additional Details (optional) +Any additional information that provides context or gives information that will help us develop the feature. diff --git a/.github/actions/sign-windows-binary/action.yml b/.github/actions/sign-windows-binary/action.yml new file mode 100644 index 0000000000..59cd99ed2c --- /dev/null +++ b/.github/actions/sign-windows-binary/action.yml @@ -0,0 +1,97 @@ +--- +name: 'Sign windows binary' +description: 'Sign binary using EV certificate' + +inputs: + current-working-directory: + description: 'The working directory, where the binary is located in' + required: true + default: './' + binary-file: + description: 'Binary file to sign' + required: true + default: '' + gcp-credentials: + description: 'GCP credentials' + required: true + default: '' + ev-cert-pem: + description: 'EV certificate PEM' + required: true + default: '' + +runs: + using: "composite" + steps: + - name: "Import signing certificate" + shell: bash + run: | + cd "${{ inputs.current-working-directory }}" && \ + echo "${{ inputs.ev-cert-pem }}" > certificate_chain.pem + + - name: "Download Java v17" + uses: oracle-actions/setup-java@v1 + with: + website: oracle.com + release: 17 + + - name: "Setup python" + uses: actions/setup-python@v4 + with: + python-version: "3.9" + + - name: "Authenticate to the Google Cloud" + uses: "google-github-actions/auth@v1" + with: + credentials_json: "${{ inputs.gcp-credentials }}" + + - name: "Set up Cloud SDK" + uses: "google-github-actions/setup-gcloud@v1" + env: + CLOUDSDK_PYTHON: "python3" + + - name: "Check the Google Cloud CLI" + shell: bash + run: "gcloud info" + + - name: "Download signing tool and verify sha265 checksum" + shell: bash + run: | + cd "${{ inputs.current-working-directory }}" && \ + curl -L -o jsign.jar "https://github.com/ebourg/jsign/releases/download/4.2/jsign-4.2.jar" && \ + echo '290377fc4f593256200b3ea4061b7409e8276255f449d4c6de7833faf0850cc1 jsign.jar' | sha256sum -c + + # We sign binaries with the EV Certificate. You MUST NOT have a key in a file to sign binary. + # The only options to store keys are: + # - HSM architecture(e.g., AWS or Google) + # - Physical USB stick with hardware stored key + # We are using the first option to be able to sign the binaries within the CI servers without + # physical access to them. However, this signing method requires the signing tool supporting the HSM key. + # + # The high-level signing procedure looks like below: + # 1. Calculate the SHA256 Hash for the app + # 2. Send a request to sign the hash to the Google Cloud + # 3. Google signs our signature with a physically stored key on Google's HSM server and returns the signature over the network + # 4. Add our certificate and the signature received from the Google HSM to the EXE file + # 5. Our signature hash is again signed with the timestamp authority's private key, and the final hash is added to our binary. + # 6. Final executable with all necessary signing information included is produced + - name: "Sign binary" + shell: bash + run: | + cd "${{ inputs.current-working-directory }}" && \ + java -jar jsign.jar \ + --storetype GOOGLECLOUD \ + --storepass "$(gcloud auth print-access-token)" \ + --keystore "projects/vegaprotocol/locations/europe-west2/keyRings/windows-sign-apps" \ + --alias "digicert-ev-signing-key-ecc-256" \ + --certfile "./certificate_chain.pem" \ + --tsmode RFC3161 \ + --tsaurl http://timestamp.globalsign.com/tsa/r6advanced1 \ + "${{ inputs.binary-file }}" + + - name: "Clean up" + shell: bash + run: | + cd "${{ inputs.current-working-directory }}" && \ + rm -f certificate_chain.pem && \ + rm -f jsign.jar diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 76cfa07670..87f0b24987 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,21 +26,24 @@ jobs: language: ['go'] steps: + - uses: actions/setup-go@v4 + with: + go-version: '>=1.21.0' - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 2ccc6700d0..d0cdb99156 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -20,12 +20,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: - go-version: '1.20' - - uses: actions/checkout@v3 + go-version: '1.21.5' + - uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v3.7.0 with: - version: v1.53.2 + version: v1.55.2 args: --config .golangci.toml diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index 902a951d6a..6903ffbe02 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -75,7 +75,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.21' id: go - name: Check out code @@ -142,7 +142,7 @@ jobs: uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.21' id: go - name: Check out code @@ -264,7 +264,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.21' id: go - name: Check out code @@ -288,15 +288,14 @@ jobs: run: go build -o build/${{ matrix.app }}.exe ./cmd/${{ matrix.app }} - name: "Sign binary" - # we do notarization to vegawallet only if: ${{ matrix.app == 'vegawallet' }} - uses: Dana-Prajea/code-sign-action@98c79121b376beab8d6a9484f445089db4461bca + uses: ./.github/actions/sign-windows-binary with: - certificate: ${{ secrets.WINDOWS_CERTIFICATE }} - password: ${{ secrets.WINDOWS_CERTIFICATE_PASS }} - certificatesha1: ${{ secrets.WINDOWS_CERTIFICATE_HASH }} - folder: "build" - timestampUrl: "http://timestamp.sectigo.com" + current-working-directory: build + binary-file: ${{ matrix.app }}.exe + gcp-credentials: ${{ secrets.GCP_CREDENTIALS }} + ev-cert-pem: ${{ secrets.EV_SIGN_CERT_FULL_CHAIN_PEM }} + - name: Check version if: ${{ env.GOARCH == 'amd64' }} diff --git a/.github/workflows/release-docs.yml b/.github/workflows/release-docs.yml index 1935206a8b..eb32326691 100644 --- a/.github/workflows/release-docs.yml +++ b/.github/workflows/release-docs.yml @@ -37,7 +37,7 @@ jobs: name: Set up Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.21' - name: Get dependencies run: cd vega; bash script/gettools.sh diff --git a/.golangci.toml b/.golangci.toml index 52c027a9aa..c12fc161b5 100644 --- a/.golangci.toml +++ b/.golangci.toml @@ -56,7 +56,6 @@ disable = [ "varnamelen", "wrapcheck", "wsl", - ## New linters, disabled until we evaluate if we want them "wastedassign", "nakedret", @@ -68,9 +67,15 @@ disable = [ "depguard", "revive", + ## new with 1.55.2, need to evaluate + "testifylint", + "inamedparam", + "perfsprint", + "typecheck", + "protogetter", + ## Disabled on-pupose. "exhaustruct", # We often make incomplete structs. - "gci", # Doesn't match our code style. "lll", # We don't have a line length. "nlreturn", # Doesn't match our code style. "nonamedreturns", # We don't mind named returns. @@ -91,6 +96,33 @@ enable = [ # "fieldalignment", to enable one day ] +[linters-settings.goheader] +template = """ +Copyright (C) 2023 Gobalsky Labs Limited + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see .""" + +[linters-settings.gci] +custom-order = true +sections = [ + "standard", # Standard section: captures all standard packages. + "prefix(code.vegaprotocol.io/vega)", # Custom section: groups all imports with the specified Prefix. + "default", # Default section: contains all imports that could not be matched to another section type. + "blank", # Blank section: contains all blank imports. This section is not present unless explicitly enabled. + "dot", +] + [[issues.exclude-rules]] linters = ["staticcheck"] text = "SA1019:" diff --git a/.spelling b/.spelling index 533d210b07..a15619220f 100644 --- a/.spelling +++ b/.spelling @@ -23,6 +23,7 @@ cleanup Cleanup clef codegen +cometbft config cyclomatic dApp @@ -85,6 +86,8 @@ mutexes nodewallet notarising OpenRPC +perp +perps phish Prometheus proto diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d8dbea5cb..0881fb8afa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,24 +1,216 @@ # Changelog -## Unreleased 0.74.0 +## Unreleased 0.75.0 ### 🚨 Breaking changes -- [](https://github.com/vegaprotocol/vega/issues/xxxx) - +- [](https://github.com/vegaprotocol/vega/issues/xxx) - ### 🗑️ Deprecation -- [](https://github.com/vegaprotocol/vega/issues/xxxx) - +- [](https://github.com/vegaprotocol/vega/issues/xxx) - ### 🛠 Improvements -- [](https://github.com/vegaprotocol/vega/issues/xxxx) - +- [](https://github.com/vegaprotocol/vega/issues/xxx) - ### 🐛 Fixes -- [](https://github.com/vegaprotocol/vega/issues/xxxx) - +- [](https://github.com/vegaprotocol/vega/issues/xxx) - +## 0.74.0 + +### 🚨 Breaking changes + +- [9945](https://github.com/vegaprotocol/vega/issues/9945) - Add liquidation strategy. +- [10215](https://github.com/vegaprotocol/vega/issues/10215) - Listing transactions on block explorer does not support the field `limit` any more. +- [8056](https://github.com/vegaprotocol/vega/issues/8056) - Getting a transfer by ID now returns a `TransferNode`. +- [10597](https://github.com/vegaprotocol/vega/pull/10597) - Migrate the `IPFS` store for the network history to version 15. + +### 🗑️ Deprecation + +- [9881](https://github.com/vegaprotocol/vega/issues/9881) - Liquidity monitoring auctions to be removed. +- [10000](https://github.com/vegaprotocol/vega/issues/9881) - Commands `tm` and `tendermint` are deprecated in favour of `cometbft`. + +### 🛠 Improvements + +- [9930](https://github.com/vegaprotocol/vega/issues/9930) - `LiquidityFeeSettings` can now be used in market proposals to choose how liquidity fees are calculated. +- [9985](https://github.com/vegaprotocol/vega/issues/9985) - Add update margin mode transaction. +- [9936](https://github.com/vegaprotocol/vega/issues/9936) - Time spent in auction no longer contributes to a perpetual market's funding payment. +- [9982](https://github.com/vegaprotocol/vega/issues/9982) - Remove fees and minimal transfer amount from vested account +- [9955](https://github.com/vegaprotocol/vega/issues/9955) - Add data node subscription for transaction results. +- [10004](https://github.com/vegaprotocol/vega/issues/10004) Track average entry price in position engine +- [9825](https://github.com/vegaprotocol/vega/issues/9825) - Remove quadratic slippage. +- [9516](https://github.com/vegaprotocol/vega/issues/9516) - Add filter by transfer ID for ledger entries API. +- [9943](https://github.com/vegaprotocol/vega/issues/9943) - Support amending the order size by defining the target size. +- [9231](https://github.com/vegaprotocol/vega/issues/9231) - Add a `JoinTeam API` +- [10095](https://github.com/vegaprotocol/vega/issues/10095) - Add isolated margin support. +- [10222](https://github.com/vegaprotocol/vega/issues/10222) - Supply bootstrap peers after starting the `IPFS` node to increase reliability. +- [10097](https://github.com/vegaprotocol/vega/issues/10097) - Add funding rate modifiers to perpetual product definition. +- [9981](https://github.com/vegaprotocol/vega/issues/9981) - Support filtering on epoch range on transfers. +- [9981](https://github.com/vegaprotocol/vega/issues/9981) - Support filtering on status on transfers. +- [10104](https://github.com/vegaprotocol/vega/issues/10104) - Add network position tracking. +- [9981](https://github.com/vegaprotocol/vega/issues/9981) - Support filtering on scope on transfers. +- [9983](https://github.com/vegaprotocol/vega/issues/9983) - Implement cap and discount for transfer fees. +- [9980](https://github.com/vegaprotocol/vega/issues/9980) - Add teams statistics API. +- [9257](https://github.com/vegaprotocol/vega/issues/9257) - Add games details API +- [9992](https://github.com/vegaprotocol/vega/issues/9992) - Add configuration to control the number of blocks worth of Ethereum events to read. +- [9260](https://github.com/vegaprotocol/vega/issues/9260) - Enhance rewards API for competitions +- [10180](https://github.com/vegaprotocol/vega/issues/10180) - Additional candle intervals +- [10218](https://github.com/vegaprotocol/vega/issues/10218) - Volume discount stats shows volumes even if party doesn't qualify for a discount tier. +- [9880](https://github.com/vegaprotocol/vega/issues/9880) - Add support for batch proposals. +- [10159](https://github.com/vegaprotocol/vega/issues/10159) - Add additional funding period data to market data API to allow streaming funding period data. +- [10143](https://github.com/vegaprotocol/vega/issues/10143) - Allow changing the market name in update market governance proposal. +- [10154](https://github.com/vegaprotocol/vega/issues/10154) - Move remaining insurance pool balance into the network treasury rather than splitting between other markets and global insurance. +- [10154](https://github.com/vegaprotocol/vega/issues/10154) - Move remaining insurance pool balance into the network treasury rather than splitting between other markets and global insurance. +- [10154](https://github.com/vegaprotocol/vega/issues/10154) - Move remaining insurance pool balance into the network treasury rather than splitting between other markets and global insurance. +- [10154](https://github.com/vegaprotocol/vega/issues/10154) - Move remaining insurance pool balance into the network treasury rather than splitting between other markets and global insurance. +- [10266](https://github.com/vegaprotocol/vega/issues/10266) - Deprecated `marketID` and populate `gameID` in reward API +- [10154](https://github.com/vegaprotocol/vega/issues/10154) - Move remaining insurance pool balance into the network treasury rather than splitting between other markets and global insurance. +- [10155](https://github.com/vegaprotocol/vega/issues/10155) - Add next network close-out timestamp to market data. +- [10000](https://github.com/vegaprotocol/vega/issues/10000) - Introduce `cometbtf` command to replace `tendermint`. +- [10294](https://github.com/vegaprotocol/vega/issues/10294) - New mark price methodology +- [9948](https://github.com/vegaprotocol/vega/issues/9948) - Add support for linked stop orders. +- [9849](https://github.com/vegaprotocol/vega/issues/9849) - Add database support for `num.Uint`. +- [10275](https://github.com/vegaprotocol/vega/issues/10275) - Add API to list party's margin mode. +- [459](https://github.com/vegaprotocol/core-test-coverage/issues/459) - Add liquidation test coverage with market updates. +- [462](https://github.com/vegaprotocol/core-test-coverage/issues/462) - Cover `0012-POSR-011` explicitly +- [595](https://github.com/vegaprotocol/core-test-coverage/issues/595) - Ensure the full size of iceberg orders is considered when creating a network order. +- [10308](https://github.com/vegaprotocol/vega/issues/10308) - Support joining to closed teams based on an allow list. +- [10349](https://github.com/vegaprotocol/vega/issues/10349) - Add oracle support to mark price configuration. +- [10350](https://github.com/vegaprotocol/vega/issues/10350) - Set mark price to uncrossing price if at the end of opening auction no price was yielded by the mark price methodology. +- [521](https://github.com/vegaprotocol/core-test-coverage/issues/521) - Add tests for allow list functionality when joining teams. +- [10375](https://github.com/vegaprotocol/vega/issues/10375) - Expose party's profile in parties API. +- [10340](https://github.com/vegaprotocol/core-test-coverage/issues/10340) - Support updating profile for a party. +- [551](https://github.com/vegaprotocol/core-test-coverage/issues/551) - Cover `0053-PERP-033` explicitly. +- [646](https://github.com/vegaprotocol/core-test-coverage/issues/646) - Add integration test for team rewards `0009-MRKP-130` +- [647](https://github.com/vegaprotocol/core-test-coverage/issues/647) - Add integration test for team rewards `0009-MRKP-131` +- [648](https://github.com/vegaprotocol/core-test-coverage/issues/648) - Add integration test for team rewards `0009-MRKP-132` +- [533](https://github.com/vegaprotocol/core-test-coverage/issues/533) - Add integration test for team rewards `0009-MRKP-016` +- [534](https://github.com/vegaprotocol/core-test-coverage/issues/534) - Add integration test for team rewards `0009-MRKP-017` +- [536](https://github.com/vegaprotocol/core-test-coverage/issues/536) - Add integration test for team rewards `0009-MRKP-019` +- [10317](https://github.com/vegaprotocol/vega/issues/10317) - Add support in Ethereum oracles to data source from `L2s` +- [10429](https://github.com/vegaprotocol/vega/issues/10429) - Restrict the mark price by book to prices from the last mark price duration. +- [552](https://github.com/vegaprotocol/core-test-coverage/issues/552) - Add integration test for mark price `0053-PERP-034` +- [10459](https://github.com/vegaprotocol/vega/issues/10459) - Update `pMedian` to consider staleness of the inputs. +- [10429](https://github.com/vegaprotocol/vega/issues/10439) - Account for isolated margin mode in `EstimatePosition` endpoint. +- [10441](https://github.com/vegaprotocol/vega/issues/10441) - Remove active restore check in collateral snapshot loading, snapshot order change removes the need for it. +- [10286](https://github.com/vegaprotocol/vega/issues/10286) - If probability of trading is less than or equal to the minimum, assign it weight of zero for liquidity score calculation and change the validation of the tau scaling network parameter. +- [10376](https://github.com/vegaprotocol/vega/issues/10376) - Add spam protection for update profile. +- [10502](https://github.com/vegaprotocol/vega/issues/10502) - Rename index price to `internalCompositePrice` +- [10464](https://github.com/vegaprotocol/vega/issues/10464) - Add total of members in teams API. +- [10464](https://github.com/vegaprotocol/vega/issues/10464) - Add total of members in referral sets API. +- [10508](https://github.com/vegaprotocol/vega/issues/10508) - Change the behaviour of aggregation epochs for teams statistics API. +- [10502](https://github.com/vegaprotocol/vega/issues/10502) - Add `underlyingIndexPrice` to perpetual data. +- [10523](https://github.com/vegaprotocol/vega/issues/10523) - Fix repeated games statistics for multiple recurring transfers. +- [10527](https://github.com/vegaprotocol/vega/issues/10527) - Add support for `byte32` type in market proposal oracle definition. +- [10563](https://github.com/vegaprotocol/vega/issues/10563) - Spam protection for create/update referral program. +- [10246](https://github.com/vegaprotocol/vega/issues/10246) - Add quantum volumes to teams statistics API. +- [10550](https://github.com/vegaprotocol/vega/issues/10550) - Update network parameters with default values. + +### 🐛 Fixes + +- [9941](https://github.com/vegaprotocol/vega/issues/9941) - Add data node mapping for `WasEligible` field in referral set. +- [9940](https://github.com/vegaprotocol/vega/issues/9940) - Truncate fee stats in quantum down to the 6 decimal. +- [9940](https://github.com/vegaprotocol/vega/issues/9940) - Do not assume stop order is valid when generating ids up front. +- [9998](https://github.com/vegaprotocol/vega/issues/9998) - Slippage factors can now me updated in a market. +- [10036](https://github.com/vegaprotocol/vega/issues/10036) - Average entry price no longer flickers after a trade. +- [9956](https://github.com/vegaprotocol/vega/issues/9956) - Prevent validator node from starting if they do not have a Ethereum `RPCAddress` set. +- [9952](https://github.com/vegaprotocol/vega/issues/9952) - `PnL` flickering fix. +- [9977](https://github.com/vegaprotocol/vega/issues/9977) - Transfer infra fees directly to general account without going through vesting. +- [10041](https://github.com/vegaprotocol/vega/issues/10041) - List ledger entries `API` errors when using pagination. +- [10050](https://github.com/vegaprotocol/vega/issues/10050) - Cleanup `mempool` cache on commit. +- [10052](https://github.com/vegaprotocol/vega/issues/10052) - Some recent stats tables should have been `hypertables` with retention periods. +- [10103](https://github.com/vegaprotocol/vega/issues/10103) - List ledgers `API` returns bad error when filtering by transfer type only. +- [10120](https://github.com/vegaprotocol/vega/issues/10120) - Assure theoretical and actual funding payment calculations are consistent. +- [10164](https://github.com/vegaprotocol/vega/issues/10164) - Properly handle edge case where an external data point is received out of order. +- [10121](https://github.com/vegaprotocol/vega/issues/10121) - Assure `EstimatePosition` API works correctly with sparse perps data +- [10126](https://github.com/vegaprotocol/vega/issues/10126) - Account for invalid stop orders in batch, charge default gas. +- [10123](https://github.com/vegaprotocol/vega/issues/10123) - Ledger exports contain account types of "UNKNOWN" type +- [10132](https://github.com/vegaprotocol/vega/issues/10132) - Add mapping in `GraphQL` for update perps market proposal. +- [10125](https://github.com/vegaprotocol/vega/issues/10125) - Wire the `JoinTeam` command in the wallet. +- [10177](https://github.com/vegaprotocol/vega/issues/10177) - Add validation that order sizes are not strangely large. +- [10189](https://github.com/vegaprotocol/vega/issues/10189) - Votes for assets while proposal is waiting for node votes are included in the snapshot state. +- [10166](https://github.com/vegaprotocol/vega/issues/10166) - Closed markets should not be subscribed to data sources when restored from a snapshot. +- [10127](https://github.com/vegaprotocol/vega/issues/10127) - Untangle `ApplyReferralCode` and `JoinTeam` command verification. +- [10520](https://github.com/vegaprotocol/vega/issues/10520) - Fix `TWAP` calculations due to differences in time precision. +- [10153](https://github.com/vegaprotocol/vega/issues/10153) - Add metrics and reduce amount of request sent to the Ethereum `RPC`. +- [10147](https://github.com/vegaprotocol/vega/issues/10147) - Add network transfer largest share to the transfers if needed. +- [10158](https://github.com/vegaprotocol/vega/issues/10158) - Add the network as the zero-share default party in settlement engine. +- [10183](https://github.com/vegaprotocol/vega/issues/10183) - Fix transfer fees registration and decay. +- [9840](https://github.com/vegaprotocol/vega/issues/9840) - Team API inconsistency in joined at timestamps. +- [10205](https://github.com/vegaprotocol/vega/issues/10205) - Fix for transfer discount fees. +- [10211](https://github.com/vegaprotocol/vega/issues/10211) - Ensure infra fees don't get counted for vesting. +- [10217](https://github.com/vegaprotocol/vega/issues/10217) - Game ID for reward entity should be optional +- [10238](https://github.com/vegaprotocol/vega/issues/10238) - Fix logic when a user firsts requests spam information +- [10227](https://github.com/vegaprotocol/vega/issues/10227) - Make the wallet errors on spam stats meaningful. +- [10193](https://github.com/vegaprotocol/vega/issues/10193) - Denormalize `tx_results` to avoid joins with blocks when queried. +- [10233](https://github.com/vegaprotocol/vega/issues/10233) - Fix expiring stop orders panic. +- [10215](https://github.com/vegaprotocol/vega/issues/10215) - Rework pagination to align with the natural reverse-chronological order of the block explorer. +- [10241](https://github.com/vegaprotocol/vega/issues/10241) - Do not include start epoch on referees set statistics. +- [10219](https://github.com/vegaprotocol/vega/issues/10219) - Candles API should fill gaps when there are periods with no trades. +- [10050](https://github.com/vegaprotocol/vega/issues/10050) - Cleanup `mempool` cache on commit. +- [9882](https://github.com/vegaprotocol/vega/issues/9882) - Fix `net params` sent on closed channel. +- [10257](https://github.com/vegaprotocol/vega/issues/10257) - Fix equity like share votes count on update market proposal. +- [10260](https://github.com/vegaprotocol/vega/issues/10260) - `ListCandleData` errors when interval is `block` +- [9677](https://github.com/vegaprotocol/vega/issues/9677) - Removing snapshots and checkpoints do not fail on missing or corrupt state. +- [10267](https://github.com/vegaprotocol/vega/issues/10267) - `ListCandleData` errors when market is in opening auction +- [10276](https://github.com/vegaprotocol/vega/issues/10276) - `ListCandleData` should return empty strings instead of zero for prices when being gap filled. +- [10278](https://github.com/vegaprotocol/vega/issues/10278) - Transfers connection filtering by `isReward` and party causes error +- [10251](https://github.com/vegaprotocol/vega/issues/10251) - Add batch proposal API and fix batch proposal submission. +- [10285](https://github.com/vegaprotocol/vega/issues/10285) - Fix `MTM` settlement panic. +- [10321](https://github.com/vegaprotocol/vega/issues/10321) - Fix `ListPartyMarginModes` panic. +- [10324](https://github.com/vegaprotocol/vega/issues/10324) - Fix `GetMarketHistoryByID` to only return the most recent market data information when no dates are provided. +- [10318](https://github.com/vegaprotocol/vega/issues/10318) - Prevent stop orders being placed during opening auction. +- [476](https://github.com/vegaprotocol/core-test-coverage/issues/476) - Add tests for markets expiring in opening auction, fix a bug for future markets. +- [10354](https://github.com/vegaprotocol/vega/issues/10354) - Renumbered SQL migration scripts 0055-0067 due to 0068 being released as part of a patch without renumbering. +- [476](https://github.com/vegaprotocol/core-test-coverage/issues/476) - Add tests for markets expiring in opening auction, fix a bug for future markets. +- [10362](https://github.com/vegaprotocol/vega/issues/10362) - Include notional volumes in `SLA` snapshot. +- [10339](https://github.com/vegaprotocol/vega/issues/10339) - Fix for GraphQL batch proposals support. +- [10326](https://github.com/vegaprotocol/vega/issues/10326) - Fix intermittent test failure. +- [10382](https://github.com/vegaprotocol/vega/issues/10382) - Fix switch to isolated margin with parked pegged orders. +- [10390](https://github.com/vegaprotocol/vega/pull/10390) - Fix the data node startup when an external `hypertable` exist outside of the public schema +- [10393](https://github.com/vegaprotocol/vega/issues/10393) - Fixed source weight validation. +- [10396](https://github.com/vegaprotocol/vega/issues/10396) - `ListTransfers` returns error. +- [10299](https://github.com/vegaprotocol/vega/issues/10299) - `ListTransfers` does not return staking rewards. +- [10496](https://github.com/vegaprotocol/vega/issues/10496) - `MarketData` API now always report correct funding payment when a perpetual market is terminated. +- [10407](https://github.com/vegaprotocol/vega/issues/10407) - Workaround to allow running feature test with invalid 0 mark price frequency. +- [10378](https://github.com/vegaprotocol/vega/issues/10378) - Ensure network position has price set at all times. +- [10409](https://github.com/vegaprotocol/vega/issues/10499) - Block explorer `API` failing in release `0.74.0`. +- [10417](https://github.com/vegaprotocol/vega/issues/10417) - Party margin modes `API` always errors. +- [10431](https://github.com/vegaprotocol/vega/issues/10431) - Fix source staleness validation. +- [10436](https://github.com/vegaprotocol/vega/issues/10436) - Fix source staleness validation when oracles are not defined. +- [10434](https://github.com/vegaprotocol/vega/issues/10434) - Unsubscribe oracles when market is closed. +- [10454](https://github.com/vegaprotocol/vega/issues/10454) - Fix account resolver validation to include order margin account. +- [10451](https://github.com/vegaprotocol/vega/issues/10451) - Fix get update asset bundle. +- [10480](https://github.com/vegaprotocol/vega/issues/10480) - Fix migration of position average entry price. +- [10419](https://github.com/vegaprotocol/vega/issues/10419) - Block explorer database migration is slow. +- [10431](https://github.com/vegaprotocol/vega/issues/10431) - Fix source staleness validation. +- [10419](https://github.com/vegaprotocol/vega/issues/10419) - Block explorer database migration is slow. +- [10510](https://github.com/vegaprotocol/vega/issues/10510) - Removing distressed position who hasn't traded does not populate trade map for network. +- [10470](https://github.com/vegaprotocol/vega/issues/10470) - Mark non-optional parameters as required and update documentation strings. +- [10456](https://github.com/vegaprotocol/vega/issues/10456) - Expose proper enum for `GraphQL` dispatch metric. +- [10301](https://github.com/vegaprotocol/vega/issues/10301) - Fix get epoch by block. +- [10343](https://github.com/vegaprotocol/vega/issues/10343) - Remove auction trigger extension and triggering ratio from liquidity monitoring parameters. +- [10493](https://github.com/vegaprotocol/vega/issues/10493) - Fix isolated margin panic on amend order. +- [10490](https://github.com/vegaprotocol/vega/issues/10490) - Handle the `quant` library returning `NaN` +- [10504](https://github.com/vegaprotocol/vega/issues/10504) - Make sure the referral sets API accounts for referees switch. +- [10525](https://github.com/vegaprotocol/vega/issues/10525) - Move `batchTerms` to parent object in batch proposals API. +- [10530](https://github.com/vegaprotocol/vega/issues/10530) - Game API returns errors. +- [10531](https://github.com/vegaprotocol/vega/issues/10531) - Team Members Statistics API doesn't return data. +- [10533](https://github.com/vegaprotocol/vega/issues/10533) - Fix `EstiamtePosition` returning an error when trying to access the party id field via GraphQL. +- [10546](https://github.com/vegaprotocol/vega/issues/10546) - `EstimateTransferFee` API errors when there is no discount. +- [10532](https://github.com/vegaprotocol/vega/issues/10532) - Fix for games statistics. +- [10568](https://github.com/vegaprotocol/vega/issues/10568) - Fix for `PnL` underflow. +- [10299](https://github.com/vegaprotocol/vega/issues/10299) - Fix for rewards transfers list. +- [10567](https://github.com/vegaprotocol/vega/issues/10567) - Rewards/Teams/Games API disagree on numbers. +- [10578](https://github.com/vegaprotocol/vega/issues/10578) - Game API reward amounts should display quantum values and asset ID. +- [10558](https://github.com/vegaprotocol/vega/issues/10558) - Return current market observable is collateral available is below maintenance margin for specified position. +- [10604](https://github.com/vegaprotocol/vega/issues/10604) - Register margin modes API subscriber. +- [10595](https://github.com/vegaprotocol/vega/issues/10595) - Fix failed amends for isolated margin orders causing negative spread in console. +- [10606](https://github.com/vegaprotocol/vega/issues/10606) - Party profiles `API` was not returning results. + ## 0.73.0 ### 🚨 Breaking changes @@ -36,9 +228,9 @@ - [9408](https://github.com/vegaprotocol/vega/issues/9408) - Enforce pagination range. - [9757](https://github.com/vegaprotocol/vega/issues/9757) - Liquidity provisions `API` shows the pending `LP` instead of the current when an update is accepted by the network. - ### 🛠 Improvements +- [8051](https://github.com/vegaprotocol/vega/issues/8051) - Upgrade to comet `0.38.0` - [9484](https://github.com/vegaprotocol/vega/issues/9484) - Remove network parameters that only provide defaults for market liquidity settings. - [8718](https://github.com/vegaprotocol/vega/issues/8718) - Emit market data event after setting mark price prior to final settlement. - [8590](https://github.com/vegaprotocol/vega/issues/8590) - Improved Ethereum oracle support. @@ -54,6 +246,7 @@ - [8846](https://github.com/vegaprotocol/vega/issues/8846) - Add support to transfer recurring transfers to metric based reward - [9549](https://github.com/vegaprotocol/vega/issues/9549) - Update config defaults to better support archive nodes - [8857](https://github.com/vegaprotocol/vega/issues/8857) - Add a step for getting the balance of the liquidity provider liquidity fee account +- [9483](https://github.com/vegaprotocol/vega/issues/9483) - Zip history segments only once - [8847](https://github.com/vegaprotocol/vega/issues/8847) - Implement internal time trigger data source. - [8895](https://github.com/vegaprotocol/vega/issues/8895) - Allow to set runtime parameters in the SQL Store connection structure - [9678](https://github.com/vegaprotocol/vega/issues/9678) - Cache and forward referral rewards multiplier and factor multiplier @@ -381,6 +574,7 @@ - [9916](https://github.com/vegaprotocol/vega/issues/9916) - Fix activity streak locked account until epoch. - [9924](https://github.com/vegaprotocol/vega/issues/9924) - Referral set referees `API` should aggregate by number of epochs. - [9922](https://github.com/vegaprotocol/vega/issues/9922) - Ensure the factors in referral program account for set eligibility. +- [10249](https://github.com/vegaprotocol/vega/issues/10249) - Upgrade `cometbft` to 0.38.2 ## 0.72.1 @@ -642,6 +836,7 @@ - [7914](https://github.com/vegaprotocol/vega/issues/7914) - Offer node signatures after snapshot restore - [8187](https://github.com/vegaprotocol/vega/issues/8187) - Expose Live Only filter to the `GraphQL` Orders filter. - [9793](https://github.com/vegaprotocol/vega/issues/9793) - Map network owner correctly in creating account from transfer. +- [10516](https://github.com/vegaprotocol/vega/issues/10516) - Fix mapping of estimate position. ## 0.70.0 @@ -2971,6 +3166,7 @@ This release contains a fix (read: large reduction in memory use) around auction - [#2596](https://github.com/vegaprotocol/vega/pull/2496) Create liquidity measurement API - [#2490](https://github.com/vegaprotocol/vega/pull/2490) GraphQL: Add Withdrawal and Deposit events to event bus - [#2476](https://github.com/vegaprotocol/vega/pull/2476) 🔥`MarketData` now uses RFC339 formatted times, not seconds +- - [#2473](https://github.com/vegaprotocol/vega/pull/2473) Add network parameters related to target stake calculation - [#2506](https://github.com/vegaprotocol/vega/pull/2506) Network parameters can now contain JSON configuration diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 7105b51f67..3fd8c04dc8 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -9,7 +9,7 @@ steps needed to build and test vega. Almost all of vega (including tools not in this repo) are written in Go, so you will need it installed locally. The version targeted can be found in the `go.mod` at the root of this repo, but realistically there is not much harm in having a slightly newer version. -The Go tool-chain can be installed via an OS package manager, or directly from from https://golang.org/dl/. Use whichever you are most comfortable with. See also the [Golang installation guide](https://golang.org/doc/install) for more information. +The Go tool-chain can be installed via an OS package manager, or directly from https://golang.org/dl/. Use whichever you are most comfortable with. See also the [Golang installation guide](https://golang.org/doc/install) for more information. After installation set the following environment variables: diff --git a/Jenkinsfile b/Jenkinsfile index caf7629885..d16f23f7c1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,11 +37,16 @@ pipeline { description: 'Git branch, tag or hash of the vegaprotocol/devopsscripts repository') string( name: 'VEGA_MARKET_SIM_BRANCH', defaultValue: 'develop', description: 'Git branch, tag or hash of the vegaprotocol/vega-market-sim repository') + string( name: 'DEVOPSTOOLS_BRANCH', defaultValue: 'main', + description: 'Git branch, tag or hash of the vegaprotocol/devopstools repository') string( name: 'JENKINS_SHARED_LIB_BRANCH', defaultValue: 'main', description: 'Git branch, tag or hash of the vegaprotocol/jenkins-shared-library repository') string( name: 'NODE_LABEL', defaultValue: 'core-build', description: 'Label on which vega build should be run, if empty any any node is used') + string( name: 'DOWNSTREAM_NODE_LABEL', defaultValue: '', + description: 'The node label for downstream jobs like system-tests, etc. Ignored if empty') } + environment { CGO_ENABLED = 0 GO111MODULE = 'on' @@ -74,6 +79,10 @@ pipeline { originRepo = pr.getOriginRepo('vegaprotocol/vega') } echo "params (after injection)=${params}" + + script { + sh 'go version' + } } } @@ -217,7 +226,7 @@ pipeline { stage('core/integration tests') { steps { dir('vega/core/integration') { - sh 'godog build -o core_integration.test && ./core_integration.test --format=junit:core-integration-report.xml' + sh 'go test . -timeout 30m --godog.format=junit:core-integration-report.xml' junit checksName: 'Core Integration Tests', testResults: 'core-integration-report.xml' } } @@ -248,6 +257,7 @@ pipeline { vegaVersion: commitHash, vegaMarketSim: params.VEGA_MARKET_SIM_BRANCH, jenkinsSharedLib: params.JENKINS_SHARED_LIB_BRANCH, + nodeLabel: params.DOWNSTREAM_NODE_LABEL, branchRun: isPRBuild(), parallelWorkers: "4" } @@ -255,11 +265,8 @@ pipeline { } stage('Vegavisor autoinstall and pup') { steps { - build( - job: '/common/visor-autoinstall-and-pup', - propagate: true, // fast fail - wait: true, - parameters: [ + script { + List visorAutoinstallParams = [ string(name: 'RELEASES_REPO', value: 'vegaprotocol/vega-dev-releases-system-tests'), string(name: 'VEGA_BRANCH', value: commitHash), string(name: 'SYSTEM_TESTS_BRANCH', value: params.SYSTEM_TESTS_BRANCH ?: pipelineDefaults.capsuleSystemTests.branchSystemTests), @@ -269,9 +276,21 @@ pipeline { booleanParam(name: 'CREATE_RELEASE', value: true), string(name: 'JENKINS_SHARED_LIB_BRANCH', value: params.JENKINS_SHARED_LIB_BRANCH ?: pipelineDefaults.capsuleSystemTests.jenkinsSharedLib), ] - ) + + if (params.DOWNSTREAM_NODE_LABEL && params.DOWNSTREAM_NODE_LABEL.length() > 0) { + visorAutoinstallParams << string(name: 'NODE_LABEL', value: params.DOWNSTREAM_NODE_LABEL) + } + + build( + job: '/common/visor-autoinstall-and-pup', + propagate: true, // fast fail + wait: true, + parameters: visorAutoinstallParams, + ) + } } } + stage('System Tests') { steps { script { @@ -284,12 +303,16 @@ pipeline { vegatools: params.VEGATOOLS_BRANCH, devopsInfra: params.DEVOPS_INFRA_BRANCH, devopsScripts: params.DEVOPSSCRIPTS_BRANCH, - jenkinsSharedLib: params.JENKINS_SHARED_LIB_BRANCH + jenkinsSharedLib: params.JENKINS_SHARED_LIB_BRANCH, + downstreamNodeLabel: params.DOWNSTREAM_NODE_LABEL, + devopstools: params.DEVOPSTOOLS_BRANCH } } } stage('mocks check') { steps { + sh label: 'print go version', script: 'go version' + sh label: 'copy vega repo', script: '''#!/bin/bash -e cp -r ./vega ./vega-mocks-check ''' diff --git a/Makefile b/Makefile index 5cc8ad6c13..1d884e7fbb 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ all: build .PHONY: lint lint: ## Lint the files - go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.2 run -v --config .golangci.toml + go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2 run -v --config .golangci.toml .PHONY: retest retest: ## Re-run all unit tests diff --git a/blockexplorer/api/config.go b/blockexplorer/api/config.go index 213989bb53..23f5fbe814 100644 --- a/blockexplorer/api/config.go +++ b/blockexplorer/api/config.go @@ -16,12 +16,12 @@ package api import ( - "github.com/inhies/go-bytesize" - "code.vegaprotocol.io/vega/blockexplorer/api/grpc" "code.vegaprotocol.io/vega/libs/config/encoding" libhttp "code.vegaprotocol.io/vega/libs/http" "code.vegaprotocol.io/vega/logging" + + "github.com/inhies/go-bytesize" ) var ( diff --git a/blockexplorer/api/gateway.go b/blockexplorer/api/gateway.go index 112bcebf47..b24463d9db 100644 --- a/blockexplorer/api/gateway.go +++ b/blockexplorer/api/gateway.go @@ -21,10 +21,10 @@ import ( "net/http" "time" - "github.com/rs/cors" - libhttp "code.vegaprotocol.io/vega/libs/http" "code.vegaprotocol.io/vega/logging" + + "github.com/rs/cors" ) type Gateway struct { diff --git a/blockexplorer/api/grpc-ui.go b/blockexplorer/api/grpc-ui.go index 0bdf12302a..c1f73ae683 100644 --- a/blockexplorer/api/grpc-ui.go +++ b/blockexplorer/api/grpc-ui.go @@ -21,11 +21,11 @@ import ( "net" "net/http" + "code.vegaprotocol.io/vega/logging" + "github.com/fullstorydev/grpcui/standalone" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - - "code.vegaprotocol.io/vega/logging" ) type GRPCUIHandler struct { diff --git a/blockexplorer/api/grpc/implementation.go b/blockexplorer/api/grpc/implementation.go index 812d0db190..deef9753aa 100644 --- a/blockexplorer/api/grpc/implementation.go +++ b/blockexplorer/api/grpc/implementation.go @@ -81,28 +81,12 @@ func (b *blockExplorerAPI) ListTransactions(ctx context.Context, req *pb.ListTra var before, after *entities.TxCursor var first, last uint32 - if req.First > 0 && req.Last > 0 { - return nil, apiError(codes.InvalidArgument, errors.New("cannot specify both first and last")) - } - - first = b.MaxPageSizeDefault - if req.First > 0 { - first = req.First - if req.After == nil && req.Before != nil { - return nil, apiError(codes.InvalidArgument, errors.New("cannot specify before when using first")) - } + if req.Before != nil && req.After != nil && (req.First > 0 || req.Last > 0) { + return nil, apiError(codes.InvalidArgument, errors.New("cannot use neither limits `first`, nor `last` when both cursors `before` and `after` are set")) } - if req.Last > 0 { - last = req.Last - if req.Before == nil && req.After != nil { - return nil, apiError(codes.InvalidArgument, errors.New("cannot specify after when using last")) - } - } - - // Temporary for now, until we have fully deprecated the limit field in the request. - if req.Limit > 0 && req.First == 0 && req.Last == 0 { - first = req.Limit + if req.First > 0 && req.Last > 0 { + return nil, apiError(codes.InvalidArgument, errors.New("cannot use both limits `first` and `last` within the same query")) } if req.Before != nil { @@ -111,6 +95,7 @@ func (b *blockExplorerAPI) ListTransactions(ctx context.Context, req *pb.ListTra return nil, apiError(codes.InvalidArgument, err) } before = &cursor + last = b.MaxPageSizeDefault } if req.After != nil { @@ -119,6 +104,37 @@ func (b *blockExplorerAPI) ListTransactions(ctx context.Context, req *pb.ListTra return nil, apiError(codes.InvalidArgument, err) } after = &cursor + first = b.MaxPageSizeDefault + } + + if before != nil && after != nil { + // The order of the parameters may seem odd, but this is expected as we have + // to keep in mind the natural order of the block-explorer is reverse-chronological. + // so, given transactions 4.2, 4.1, 3.2, 3.1, 2.2, when applying the window between + // 3.1 and 4.2, then we have to set after to 3.1 and before to 4.2. + // So effectively, after is the start and before is the end of the set. + if entities.AreValidCursorBoundaries(after, before) { + return nil, apiError(codes.InvalidArgument, errors.New("cursors `before` and `after` do not create a valid window")) + } + } + + if req.First > 0 { + if req.Before != nil { + return nil, apiError(codes.InvalidArgument, errors.New("cannot use cursor `before` when using limit `first`")) + } + first = req.First + } else if req.Last > 0 { + if req.After != nil { + return nil, apiError(codes.InvalidArgument, errors.New("cannot use cursor `after` when using limit `last`")) + } + last = req.Last + } + + // Entering this condition means there is no pagination set, so it defaults + // to listing the MaxPageSizeDefault newest transactions. + // Note, setting limits on a cursor window is not supported. + if !(before != nil && after != nil) && first == 0 && last == 0 { + first = b.MaxPageSizeDefault } transactions, err := b.store.ListTransactions(ctx, diff --git a/blockexplorer/api/grpc/server.go b/blockexplorer/api/grpc/server.go index 096ccd64bc..1df6e407b1 100644 --- a/blockexplorer/api/grpc/server.go +++ b/blockexplorer/api/grpc/server.go @@ -18,11 +18,11 @@ package grpc import ( "net" - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" - "code.vegaprotocol.io/vega/logging" pb "code.vegaprotocol.io/vega/protos/blockexplorer/api/v1" + + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" ) type Server struct { diff --git a/blockexplorer/api/portal.go b/blockexplorer/api/portal.go index 16b7f5fc14..241b0ddd37 100644 --- a/blockexplorer/api/portal.go +++ b/blockexplorer/api/portal.go @@ -19,9 +19,9 @@ import ( "fmt" "net" - "github.com/soheilhy/cmux" - "code.vegaprotocol.io/vega/logging" + + "github.com/soheilhy/cmux" ) type Portal struct { diff --git a/blockexplorer/api/rest.go b/blockexplorer/api/rest.go index 066fdc6cd9..4d885b54bd 100644 --- a/blockexplorer/api/rest.go +++ b/blockexplorer/api/rest.go @@ -19,13 +19,13 @@ import ( "context" "net/http" - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - datanodeRest "code.vegaprotocol.io/vega/datanode/gateway/rest" "code.vegaprotocol.io/vega/logging" protoapi "code.vegaprotocol.io/vega/protos/blockexplorer/api/v1" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" ) // Handler implement a rest server acting as a proxy to the grpc api. diff --git a/blockexplorer/blockexplorer.go b/blockexplorer/blockexplorer.go index f2f9306eb7..5d6bf487ac 100644 --- a/blockexplorer/blockexplorer.go +++ b/blockexplorer/blockexplorer.go @@ -19,8 +19,6 @@ import ( "context" "fmt" - "golang.org/x/sync/errgroup" - "code.vegaprotocol.io/vega/blockexplorer/api" ourGrpc "code.vegaprotocol.io/vega/blockexplorer/api/grpc" "code.vegaprotocol.io/vega/blockexplorer/config" @@ -28,6 +26,8 @@ import ( "code.vegaprotocol.io/vega/libs/net/pipe" "code.vegaprotocol.io/vega/logging" pb "code.vegaprotocol.io/vega/protos/blockexplorer/api/v1" + + "golang.org/x/sync/errgroup" ) type BlockExplorer struct { @@ -98,6 +98,8 @@ func (a *BlockExplorer) Run(ctx context.Context) error { return a.portal.Serve() }) + g.Go(func() error { return a.store.Migrate(ctx) }) + // Now we can do all the http 'handlers' that talk to the gateway if err := a.grpcUI.Start(ctx); err != nil { return fmt.Errorf("could not start grpc-ui: %w", err) diff --git a/blockexplorer/entities/transaction.go b/blockexplorer/entities/transaction.go index cc7141cd6e..429ea088ba 100644 --- a/blockexplorer/entities/transaction.go +++ b/blockexplorer/entities/transaction.go @@ -21,25 +21,24 @@ import ( "strings" "time" - tmTypes "github.com/tendermint/tendermint/abci/types" - "google.golang.org/protobuf/proto" - "code.vegaprotocol.io/vega/commands" "code.vegaprotocol.io/vega/libs/ptr" + pb "code.vegaprotocol.io/vega/protos/blockexplorer/api/v1" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" - pb "code.vegaprotocol.io/vega/protos/blockexplorer/api/v1" + tmTypes "github.com/cometbft/cometbft/abci/types" + "google.golang.org/protobuf/proto" ) type TxResultRow struct { - RowID int64 `db:"rowid"` - BlockID int64 `db:"block_id"` - Index int64 `db:"index"` - CreatedAt time.Time `db:"created_at"` - TxHash string `db:"tx_hash"` - TxResult []byte `db:"tx_result"` - Submitter string `db:"submitter"` - CmdType string `db:"cmd_type"` + RowID int64 `db:"rowid"` + BlockHeight int64 `db:"block_height"` + Index int64 `db:"index"` + CreatedAt time.Time `db:"created_at"` + TxHash string `db:"tx_hash"` + TxResult []byte `db:"tx_result"` + Submitter string `db:"submitter"` + CmdType string `db:"cmd_type"` } func (t *TxResultRow) ToProto() (*pb.Transaction, error) { @@ -66,7 +65,7 @@ func (t *TxResultRow) ToProto() (*pb.Transaction, error) { } return &pb.Transaction{ - Block: uint64(t.BlockID), + Block: uint64(t.BlockHeight), Index: uint32(t.Index), Type: extractAttribute(&txResult, "command", "type"), Submitter: extractAttribute(&txResult, "tx", "submitter"), @@ -84,7 +83,7 @@ func (t *TxResultRow) ToProto() (*pb.Transaction, error) { func (t *TxResultRow) Cursor() TxCursor { return TxCursor{ - BlockNumber: uint64(t.BlockID), + BlockNumber: uint64(t.BlockHeight), TxIndex: uint32(t.Index), } } @@ -93,8 +92,8 @@ func extractAttribute(r *tmTypes.TxResult, eType, key string) string { for _, e := range r.Result.Events { if e.Type == eType { for _, a := range e.Attributes { - if string(a.Key) == key { - return string(a.Value) + if a.Key == key { + return a.Value } } } @@ -124,7 +123,7 @@ func TxCursorFromString(s string) (TxCursor, error) { } return TxCursor{ - BlockNumber: blockNumber, // increase by one again to make the behaviour consistent + BlockNumber: blockNumber, TxIndex: uint32(txIndex), }, nil } @@ -132,3 +131,13 @@ func TxCursorFromString(s string) (TxCursor, error) { func (c *TxCursor) String() string { return fmt.Sprintf("%d.%d", c.BlockNumber, c.TxIndex) } + +// AreValidCursorBoundaries checks if the start and end cursors creates valid +// set boundaries for cursors, as: [start, end]. +func AreValidCursorBoundaries(start, end *TxCursor) bool { + if start.BlockNumber == end.BlockNumber { + return start.TxIndex < end.TxIndex + } + + return start.BlockNumber < end.BlockNumber +} diff --git a/blockexplorer/store/config.go b/blockexplorer/store/config.go index 663fdbb267..3788849b54 100644 --- a/blockexplorer/store/config.go +++ b/blockexplorer/store/config.go @@ -16,13 +16,18 @@ package store import ( + "time" + "code.vegaprotocol.io/vega/libs/config" ) var namedLogger = "postgres.store" type Config struct { - Postgres config.PostgresConnection `group:"database" namespace:"postgres"` + Postgres config.PostgresConnection `group:"database" namespace:"postgres"` + MigrateData bool `default:"true" description:"Migrate data from the old database" group:"database" namespace:"postgres"` + MigrateBlockDuration time.Duration `default:"1h" description:"Amount of data to migrate at a time, in duration, i.e. 1h, 4h etc." group:"database" namespace:"postgres"` + MigratePauseInterval time.Duration `default:"1m" description:"Pause migrations between dates to prevent block explorer from being blocked" group:"database" namespace:"postgres"` } func NewDefaultConfig() Config { @@ -35,5 +40,8 @@ func NewDefaultConfig() Config { Password: "vega", ApplicationName: "vega block explorer", }, + MigrateData: true, + MigrateBlockDuration: time.Hour, + MigratePauseInterval: time.Minute, } } diff --git a/blockexplorer/store/migration.go b/blockexplorer/store/migration.go index 0861c91d6b..85fa2d1294 100644 --- a/blockexplorer/store/migration.go +++ b/blockexplorer/store/migration.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/logging" + "github.com/jackc/pgx/v4/stdlib" "github.com/pkg/errors" "github.com/pressly/goose/v3" diff --git a/blockexplorer/store/migrations/0005_add_block_height_to_tx_result.sql b/blockexplorer/store/migrations/0005_add_block_height_to_tx_result.sql new file mode 100644 index 0000000000..cb9e89335e --- /dev/null +++ b/blockexplorer/store/migrations/0005_add_block_height_to_tx_result.sql @@ -0,0 +1,152 @@ +-- +goose Up + +-- make the block height nullable so tendermint can still insert and the +-- trigger takes over to set the value. +ALTER TABLE tx_results + ADD COLUMN IF NOT EXISTS block_height BIGINT DEFAULT 0; + +-- First drop any foreign key constraints that depend on the tx_results table +-- This will be restored after all the data has been migrated to the new tx_results table +ALTER TABLE events DROP constraint events_tx_id_fkey; + +-- Rename the tx_results table to tx_results_old +ALTER TABLE IF EXISTS tx_results RENAME TO tx_results_old; +ALTER INDEX IF EXISTS tx_results_tx_hash_index RENAME TO tx_results_old_tx_hash_index; +ALTER INDEX IF EXISTS tx_results_submitter_block_id_index_idx RENAME TO tx_results_old_submitter_block_id_index_idx; +ALTER INDEX IF EXISTS tx_results_cmd_type_block_id_index RENAME TO tx_results_old_cmd_type_block_id_index; +ALTER INDEX IF EXISTS tx_results_cmd_type_index RENAME TO tx_results_old_cmd_type_index; + +-- We need to make sure the next value in the rowid serial for the new tx_results table +-- continues where the old one leaves off otherwise we will break foreign key constraints +-- in the events table which we have had to drop temporarily and will restore once all the +-- data has been migrated. +-- +goose StatementBegin +do $$ + declare + tx_results_seq_name text; + tx_results_seq_next bigint; + begin + -- get the next value of the sequence for tx_results_old + -- we will use this to reset the sequence value for the new tx_results table + select nextval(pg_get_serial_sequence('tx_results_old', 'rowid')) + into tx_results_seq_next; + + -- Create a new tx_results table with all the necessary fields + CREATE TABLE tx_results ( + rowid BIGSERIAL PRIMARY KEY, + -- The block to which this transaction belongs. + block_id BIGINT NOT NULL REFERENCES blocks(rowid), + -- The sequential index of the transaction within the block. + index INTEGER NOT NULL, + -- When this result record was logged into the sink, in UTC. + created_at TIMESTAMPTZ NOT NULL, + -- The hex-encoded hash of the transaction. + tx_hash VARCHAR NOT NULL, + -- The protobuf wire encoding of the TxResult message. + tx_result BYTEA NOT NULL, + submitter TEXT, + cmd_type TEXT, + block_height BIGINT DEFAULT 0, + UNIQUE (block_id, index) + ); + + CREATE INDEX tx_results_tx_hash_index ON tx_results(tx_hash); + CREATE INDEX tx_results_submitter_block_id_index_idx ON tx_results(submitter, block_id, index); + CREATE INDEX tx_results_cmd_type_block_id_index ON tx_results + USING btree (cmd_type, block_id, index); + CREATE INDEX tx_results_submitter_block_height_index_idx ON tx_results(submitter, block_height, index); + CREATE INDEX tx_results_cmd_type_block_height_index ON tx_results + USING btree (cmd_type, block_height, index); + CREATE INDEX tx_results_cmd_type_index ON tx_results(cmd_type, submitter); + CREATE INDEX tx_results_block_height_index_idx ON tx_results(block_height, index); + + -- get the sequence name for the new tx_results serial + select pg_get_serial_sequence('tx_results', 'rowid') + into tx_results_seq_name; + + -- restart the sequence with the current value of the sequence for tx_results_old + -- when nextval is called, we should get the restart value, which is the next value + -- in the sequence for tx_results_old + execute format('alter sequence %s restart with %s', tx_results_seq_name, tx_results_seq_next); + end; +$$; +-- +goose StatementEnd + +-- Recreate views, functions and triggers associated with the original tx_results table +CREATE OR REPLACE VIEW tx_events AS +SELECT height, index, chain_id, type, key, composite_key, value, tx_results.created_at +FROM blocks JOIN tx_results ON (blocks.rowid = tx_results.block_id) + JOIN event_attributes ON (tx_results.rowid = event_attributes.tx_id) +WHERE event_attributes.tx_id IS NOT NULL; + +-- +goose StatementBegin +CREATE OR REPLACE FUNCTION update_txresult_submitter() + RETURNS TRIGGER + LANGUAGE PLPGSQL AS +$$ +BEGIN +UPDATE tx_results SET submitter=NEW.value + FROM events e +WHERE e.rowid = NEW.event_id + AND tx_results.rowid = e.tx_id; +RETURN NEW; +END; +$$; +-- +goose StatementEnd + +DROP TRIGGER IF EXISTS update_txresult_submitter ON attributes; + +CREATE TRIGGER update_txresult_submitter AFTER INSERT ON attributes + FOR EACH ROW + WHEN (NEW.composite_key='tx.submitter') + EXECUTE function update_txresult_submitter(); + +-- +goose StatementBegin +CREATE OR REPLACE FUNCTION update_txresult_cmd_type() + RETURNS TRIGGER + LANGUAGE PLPGSQL AS +$$ +BEGIN + UPDATE tx_results SET cmd_type=NEW.value + FROM events e + WHERE e.rowid = NEW.event_id + AND tx_results.rowid = e.tx_id; + + RETURN NEW; +END; +$$; +-- +goose StatementEnd + +DROP TRIGGER IF EXISTS update_txresult_cmd_type ON attributes; + +CREATE TRIGGER update_txresult_cmd_type AFTER INSERT ON attributes + FOR EACH ROW + WHEN (NEW.composite_key='command.type') + EXECUTE function update_txresult_cmd_type(); + +-- +goose StatementBegin +CREATE OR REPLACE FUNCTION add_block_height_to_tx_results() + RETURNS TRIGGER + LANGUAGE plpgsql AS +$$ +BEGIN + UPDATE tx_results + SET block_height=b.height + FROM blocks b + WHERE b.rowid = NEW.block_id + AND tx_results.rowid = NEW.rowid; + + RETURN NEW; +END; +$$; +-- +goose StatementEnd + +CREATE TRIGGER add_block_height_to_tx_results + AFTER INSERT + ON tx_results + FOR EACH ROW + EXECUTE PROCEDURE add_block_height_to_tx_results(); + +-- +goose Down + +-- we don't want to do anything to and leave things as they are for this migration. diff --git a/blockexplorer/store/migrator.go b/blockexplorer/store/migrator.go new file mode 100644 index 0000000000..e1b3150839 --- /dev/null +++ b/blockexplorer/store/migrator.go @@ -0,0 +1,290 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package store + +import ( + "context" + "fmt" + "time" + + "github.com/georgysavva/scany/pgxscan" + "github.com/jackc/pgx/v4/pgxpool" +) + +// Migrator is a data migration agent that will migrate tx_results data +// that is required for providing data for the block explorer APIs. +// The tx_results table is populated by Tendermint and the number of records +// can be very large. This causes data migration difficult when there is a need +// to add additional information to tx_results in order to fulfill requirements +// for the block explorer APIs. +// The migration agent will allow migrations to run in the background without +// blocking upgrades with slow database migration scripts. +type Migrator struct { + pool *pgxpool.Pool + config Config +} + +// NewMigrator creates a new data migration agent. +func NewMigrator(pool *pgxpool.Pool, config Config) *Migrator { + return &Migrator{ + pool: pool, + config: config, + } +} + +func (m *Migrator) checkCanMigrate(ctx context.Context) bool { + // We only want to migrate if we have a tx_results_old table + sql := `select table_name from information_schema.tables where table_name = 'tx_results_old'` + var tableName string + if err := m.pool.QueryRow(ctx, sql).Scan(&tableName); err != nil { + return false + } + return true +} + +func (m *Migrator) cleanupOldData(ctx context.Context) error { + // we want to drop the old table if it exists + sql := `drop table if exists tx_results_old` + if _, err := m.pool.Exec(ctx, sql); err != nil { + return fmt.Errorf("could not drop old table: %w", err) + } + + return nil +} + +// Migrate will run the data migration. +func (m *Migrator) Migrate(ctx context.Context) error { + if !m.config.MigrateData { + return nil + } + + if !m.checkCanMigrate(ctx) { + return nil + } + + // create indexes on the tables that we will be querying + if err := m.createIndexes(ctx); err != nil { + return err + } + + // get a list of dates that we need to migrate + migrateDates, err := m.getMigrationDates(ctx) + if err != nil { + return err + } + + // loop through each date and migrate the data for the date + for _, d := range migrateDates { + // we're going to make use of temporary tables which are only visible to the session that created them + // we therefore have to use a single connection and make sure that the same connection is used for the + // migration process. + conn, err := m.pool.Acquire(ctx) + if err != nil { + return fmt.Errorf("could not acquire connection: %w", err) + } + // if we error, we want to stop the migration rather than continue as we do + if err := m.doMigration(ctx, conn, d); err != nil { + return fmt.Errorf("could not migrate data for date %s: %w", d.Format("2006-01-02"), err) + } + // make sure we release the connection back to the pool when we're done + conn.Release() + + // we want to pause so as not to hog all the processing and prevent block explorer from processing blocks + time.Sleep(m.config.MigratePauseInterval) + } + + if err := m.cleanupOldData(ctx); err != nil { + return fmt.Errorf("could not drop redundant migration data: %w", err) + } + + return nil +} + +func (m *Migrator) getMigrationDates(ctx context.Context) ([]time.Time, error) { + sql := `create table if not exists migration_dates( + migration_date date primary key, + migrated bool default (false) + )` + + if _, err := m.pool.Exec(ctx, sql); err != nil { + return nil, fmt.Errorf("could not create migration_dates table: %w", err) + } + + // now let's populate the data we need, only new dates that aren't in the table will be added + sql = `insert into migration_dates(migration_date) + select distinct created_at::date + from blocks + on conflict do nothing` + + if _, err := m.pool.Exec(ctx, sql); err != nil { + return nil, fmt.Errorf("could not populate migration_dates table: %w", err) + } + + // now retrieve the dates that we need to migrate in reverse order because we want to migrate the latest + // data first + sql = `select migration_date from migration_dates where migrated = false order by migration_date desc` + + var migrationDates []struct { + MigrationDate time.Time + } + + if err := pgxscan.Select(ctx, m.pool, &migrationDates, sql); err != nil { + return nil, fmt.Errorf("could not retrieve migration dates: %w", err) + } + + dates := make([]time.Time, len(migrationDates)) + + for i, d := range migrationDates { + dates[i] = d.MigrationDate + } + + return dates, nil +} + +func (m *Migrator) doMigration(ctx context.Context, conn *pgxpool.Conn, date time.Time) error { + startDate := date + endDate := date.AddDate(0, 0, 1) + + tx, err := conn.Begin(ctx) + if err != nil { + return fmt.Errorf("could not start transaction: %w", err) + } + + // pre-migration cleanup + cleanupSQL := []string{ + `drop table if exists blocks_temp`, + `drop table if exists tx_results_temp`, + } + + for _, sql := range cleanupSQL { + if _, err := tx.Exec(ctx, sql); err != nil { + tx.Rollback(ctx) + return fmt.Errorf("could not cleanup temporary tables: %w", err) + } + } + + type migrationQuery struct { + SQL string + args []any + } + + // create a temporary table for the blocks that need to be migrated for the given date + migrateSQL := []migrationQuery{ + { + // just get the blocks we need to update for the date + SQL: `select * into blocks_temp from blocks where created_at >= $1 and created_at < $2`, + args: []any{startDate, endDate}, + }, + { + // and the tx_results for the date + SQL: `select * into tx_results_temp from tx_results_old where created_at >= $1 and created_at < $2`, + args: []any{startDate, endDate}, + }, + { + // create an index on the temporary blocks table + SQL: `create index idx_blocks_temp_rowid on blocks_temp(rowid)`, + args: []any{}, + }, + { + // create an index on the temporary tx_results table + SQL: `create index idx_tx_results_temp_block_id on tx_results_temp(block_id)`, + args: []any{}, + }, + { + // update the tx_results_temp table with the block height for the date + SQL: `update tx_results_temp t + set block_height = b.height + from blocks_temp b + where t.block_id = b.rowid`, + args: []any{}, + }, + } + + // moving a full day can cause a lock on the database and slow things down for the block explorer, so lets move things a block of X + // hours at a time, configurable in the settings, and default to 1 hour + migrationMoveSQL := make([]migrationQuery, 0) + + moveStart := startDate + for { + if moveStart.Equal(endDate) || moveStart.After(endDate) { + break + } + + moveEnd := moveStart.Add(m.config.MigrateBlockDuration) + migrationMoveSQL = append(migrationMoveSQL, migrationQuery{ + SQL: `insert into tx_results(rowid, block_id, index, created_at, tx_hash, tx_result, submitter, cmd_type, block_height) + select rowid, block_id, index, created_at, tx_hash, tx_result, submitter, cmd_type, block_height + from tx_results_temp + where created_at >= $1 and created_at < $2 + on conflict do nothing`, + args: []any{moveStart, moveEnd}, + }) + + moveStart = moveStart.Add(m.config.MigrateBlockDuration) + } + + // Once all the chunks have been moved, then we should record the migration date as completed so it won't be done again + migrationMoveSQL = append(migrationMoveSQL, migrationQuery{ + SQL: `update migration_dates set migrated = true where migration_date = $1`, + args: []any{date}, + }) + + // finally we want to do the cleanup between migration dates + migrationCleanupSQL := []migrationQuery{ + // now drop the temporary tables + { + SQL: `drop table if exists blocks_temp`, + args: []any{}, + }, + { + SQL: `drop table if exists tx_results_temp`, + args: []any{}, + }, + } + + migrateSQL = append(migrateSQL, migrationMoveSQL...) + migrateSQL = append(migrateSQL, migrationCleanupSQL...) + + for _, query := range migrateSQL { + if _, err := tx.Exec(ctx, query.SQL, query.args...); err != nil { + tx.Rollback(ctx) + return fmt.Errorf("could not migrate data for date %s: %w", date.Format("2006-01-02"), err) + } + } + + if err := tx.Commit(ctx); err != nil { + tx.Rollback(ctx) + return fmt.Errorf("could not commit migration for date %s: %w", date.Format("2006-01-02"), err) + } + + return nil +} + +func (m *Migrator) createIndexes(ctx context.Context) error { + sql := `create index if not exists idx_tx_results_old_created_at on tx_results_old(created_at)` + // this index creation could take some time, but we don't know how long it should take so we don't want to timeout + if _, err := m.pool.Exec(ctx, sql); err != nil { + return fmt.Errorf("could not create created_at index for tx_results_old: %w", err) + } + + sql = `create index if not exists idx_blocks_created_at on blocks(created_at)` + // this index creation could take some time, but we don't know how long it should take so we don't want to timeout + if _, err := m.pool.Exec(ctx, sql); err != nil { + return fmt.Errorf("could not create created_at index for blocks: %w", err) + } + + return nil +} diff --git a/blockexplorer/store/migrator_test.go b/blockexplorer/store/migrator_test.go new file mode 100644 index 0000000000..92a6903f52 --- /dev/null +++ b/blockexplorer/store/migrator_test.go @@ -0,0 +1,202 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package store_test + +import ( + "context" + "sort" + "testing" + "time" + + "code.vegaprotocol.io/vega/blockexplorer/entities" + "code.vegaprotocol.io/vega/blockexplorer/store" + "code.vegaprotocol.io/vega/libs/config" + pb "code.vegaprotocol.io/vega/protos/blockexplorer/api/v1" + + tmTypes "github.com/cometbft/cometbft/abci/types" + "github.com/georgysavva/scany/pgxscan" + "github.com/jackc/pgx/v4/pgxpool" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestMigratorMigrate(t *testing.T) { + // first we need to populate the database with some test data + ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + t.Cleanup(func() { + cleanupTransactionsTest(ctx, t) + cancel() + }) + + want := populateMigrationData(t, ctx) + + pgConfig, err := config.PostgresConnection{ + Host: "", + Port: 5432, + Username: "vega", + Password: "vega", + Database: "vega", + SocketDir: postgresRuntimePath, + }.ToPgxPoolConfig() + require.NoError(t, err) + + pool, err := pgxpool.ConnectConfig(ctx, pgConfig) + require.NoError(t, err) + + // Confirm that there's no data in the tx_results table first + query := `SELECT rowid, block_height, index, created_at, tx_hash, tx_result, submitter, cmd_type + FROM tx_results ORDER BY block_height desc, index desc` + var rows []entities.TxResultRow + require.NoError(t, pgxscan.Select(ctx, pool, &rows, query)) + + assert.Len(t, rows, 0) + cfg := store.NewDefaultConfig() + cfg.MigratePauseInterval = time.Millisecond * 10 + + migrator := store.NewMigrator(pool, cfg) + + err = migrator.Migrate(ctx) + + require.NoError(t, err) + + // now get the data from the new tx_results table and make sure that we have everything we expect + require.NoError(t, pgxscan.Select(ctx, pool, &rows, query)) + + sort.Slice(want, func(i, j int) bool { + return want[i].Block > want[j].Block || + (want[i].Block == want[j].Block && want[i].Index > want[j].Index) + }) + + got := make([]*pb.Transaction, 0, len(rows)) + + for _, row := range rows { + r, e := row.ToProto() + require.NoError(t, e) + got = append(got, r) + } + + require.Equal(t, want, got) + + // We want to check the old data has been removed + sql := `select table_name from information_schema.tables where table_name = 'tx_results_old'` + var tableName string + require.Errorf(t, pool.QueryRow(context.Background(), sql).Scan(&tableName), "no rows in result set") +} + +func populateMigrationData(t *testing.T, ctx context.Context) []*pb.Transaction { + t.Helper() + + txr, err := (&tmTypes.TxResult{}).Marshal() + require.NoError(t, err) + now := time.Now() + day := time.Hour * 24 + txns := []txResult{ + { + height: 1, + index: 1, + createdAt: now, + txHash: "deadbeef01", + txResult: txr, + submitter: "TEST", + cmdType: "TEST", + }, + { + height: 2, + index: 1, + createdAt: now.Add(day), + txHash: "deadbeef02", + txResult: txr, + submitter: "TEST", + cmdType: "TEST", + }, + { + height: 3, + index: 1, + createdAt: now.Add(day * 2), + txHash: "deadbeef03", + txResult: txr, + submitter: "TEST", + cmdType: "TEST", + }, + { + height: 4, + index: 1, + createdAt: now.Add(day * 3), + txHash: "deadbeef04", + txResult: txr, + submitter: "TEST", + cmdType: "TEST", + }, + { + height: 5, + index: 1, + createdAt: now.Add(day * 4), + txHash: "deadbeef05", + txResult: txr, + submitter: "TEST", + cmdType: "TEST", + }, + { + height: 6, + index: 1, + createdAt: now.Add(day * 5), + txHash: "deadbeef06", + txResult: txr, + submitter: "TEST", + cmdType: "TEST", + }, + { + height: 7, + index: 1, + createdAt: now.Add(day * 6), + txHash: "deadbeef07", + txResult: txr, + submitter: "TEST", + cmdType: "TEST", + }, + { + height: 8, + index: 1, + createdAt: now.Add(day * 7), + txHash: "deadbeef08", + txResult: txr, + submitter: "TEST", + cmdType: "TEST", + }, + { + height: 9, + index: 1, + createdAt: now.Add(day * 8), + txHash: "deadbeef09", + txResult: txr, + submitter: "TEST", + cmdType: "TEST", + }, + { + height: 10, + index: 1, + createdAt: now.Add(day * 9), + txHash: "deadbeef10", + txResult: txr, + submitter: "TEST", + cmdType: "TEST", + }, + } + + want := addTestTxResults(ctx, t, "tx_results_old", txns...) + + return want +} diff --git a/blockexplorer/store/store.go b/blockexplorer/store/store.go index a1080d3058..250ac6e308 100644 --- a/blockexplorer/store/store.go +++ b/blockexplorer/store/store.go @@ -19,14 +19,15 @@ import ( "context" "fmt" - "github.com/jackc/pgx/v4/pgxpool" - "code.vegaprotocol.io/vega/logging" + + "github.com/jackc/pgx/v4/pgxpool" ) type Store struct { - log *logging.Logger - pool *pgxpool.Pool + log *logging.Logger + pool *pgxpool.Pool + migrator *Migrator } func (s *Store) Close() { @@ -51,9 +52,12 @@ func NewStore(config Config, log *logging.Logger) (*Store, error) { return nil, fmt.Errorf("error connecting to database: %w", err) } + migrator := NewMigrator(pool, config) + store := &Store{ - log: log, - pool: pool, + log: log, + pool: pool, + migrator: migrator, } return store, nil } @@ -65,3 +69,13 @@ func MustNewStore(config Config, log *logging.Logger) *Store { } return store } + +func (s *Store) Migrate(ctx context.Context) error { + err := s.migrator.Migrate(ctx) + if err != nil { + s.log.Errorf("error migrating database: %v", err) + return err + } + + return nil +} diff --git a/blockexplorer/store/transactions.go b/blockexplorer/store/transactions.go index aa72405c4b..881538f7be 100644 --- a/blockexplorer/store/transactions.go +++ b/blockexplorer/store/transactions.go @@ -22,10 +22,10 @@ import ( "sort" "strings" - "github.com/georgysavva/scany/pgxscan" - "code.vegaprotocol.io/vega/blockexplorer/entities" pb "code.vegaprotocol.io/vega/protos/blockexplorer/api/v1" + + "github.com/georgysavva/scany/pgxscan" ) var ( @@ -36,11 +36,11 @@ var ( func (s *Store) GetTransaction(ctx context.Context, txID string) (*pb.Transaction, error) { txID = strings.ToUpper(txID) - query := `SELECT t.rowid, b.height as block_id, t.index, t.created_at, t.tx_hash, t.tx_result, t.cmd_type, t.submitter FROM tx_results t JOIN blocks b ON t.block_id = b.rowid WHERE t.tx_hash=$1` + query := `SELECT t.rowid, t.block_height, t.index, t.created_at, t.tx_hash, t.tx_result, t.cmd_type, t.submitter FROM tx_results t WHERE t.tx_hash=$1` var rows []entities.TxResultRow if err := pgxscan.Select(ctx, s.pool, &rows, query, txID); err != nil { - return nil, fmt.Errorf("querying tx_results:%w", err) + return nil, fmt.Errorf("querying tx_results: %w", err) } if len(rows) == 0 { @@ -66,38 +66,48 @@ func (s *Store) ListTransactions(ctx context.Context, last uint32, before *entities.TxCursor, ) ([]*pb.Transaction, error) { - query := `SELECT t.rowid, b.height as block_id, t.index, t.created_at, t.tx_hash, t.tx_result, t.cmd_type, t.submitter FROM tx_results t JOIN blocks b ON t.block_id = b.rowid` + query := `SELECT t.rowid, t.block_height, t.index, t.created_at, t.tx_hash, t.tx_result, t.cmd_type, t.submitter FROM tx_results t` args := []interface{}{} predicates := []string{} - // by default we want the most recent transactions so we'll set the limit to first - // and sort order to desc - limit := first + limit := uint32(0) + sortOrder := "desc" - // if we have a before cursor we want the results ordered earliest to latest - // so the limit will be set to last and sort order to asc + if first > 0 { + // We want the N most recent transactions, descending on block height and block + // index: 4.1, 3.2, 3.1, 2.2... + // The resulting query should already sort the rows in the right order. + limit = first + sortOrder = "desc" + } else if last > 0 { + // We want the N oldest transactions, ascending on block height and block + // index: 1.1, 1.2, 2.1, 2.2... + // The resulting query should sort the rows in the chronological order. But + // that's necessary to apply the LIMIT clause. It will be sorted in the + // reverse chronological order later on. + limit = last + sortOrder = "asc" + } + if before != nil { block := nextBindVar(&args, before.BlockNumber) index := nextBindVar(&args, before.TxIndex) - predicate := fmt.Sprintf("(b.height, t.index) > (%s, %s)", block, index) + predicate := fmt.Sprintf("(t.block_height, t.index) < (%s, %s)", block, index) predicates = append(predicates, predicate) - limit = last - sortOrder = "asc" + // We change the sorting order because we want the transactions right before + // the cursor, meaning older transactions. + sortOrder = "desc" } - if after != nil { block := nextBindVar(&args, after.BlockNumber) index := nextBindVar(&args, after.TxIndex) - predicate := fmt.Sprintf("(b.height, t.index) < (%s, %s)", block, index) + predicate := fmt.Sprintf("(t.block_height, t.index) > (%s, %s)", block, index) predicates = append(predicates, predicate) - } - - // just in case we have no before cursor, but we want to have the last N transactions in the data set - // i.e. the earliest transactions, sorting ascending - if last > 0 && first == 0 && after == nil && before == nil { - limit = last + // We change the sorting order because we want the transactions right after + // the cursor, meaning newer transaction. That's necessary to apply the + // LIMIT clause. sortOrder = "asc" } @@ -122,12 +132,12 @@ func (s *Store) ListTransactions(ctx context.Context, if key == "tx.submitter" { // tx.submitter is lifted out of attributes and into tx_results by a trigger for faster access - predicate = fmt.Sprintf("t.submitter=%s", nextBindVar(&args, value)) + predicate = fmt.Sprintf("t.submitter= %s", nextBindVar(&args, value)) } else if key == "cmd.type" { - predicate = fmt.Sprintf("t.cmd_type=%s", nextBindVar(&args, value)) + predicate = fmt.Sprintf("t.cmd_type= %s", nextBindVar(&args, value)) } else if key == "block.height" { // much quicker to filter block height by joining to the block table than looking in attributes - predicate = fmt.Sprintf("b.height = %s", nextBindVar(&args, value)) + predicate = fmt.Sprintf("t.block_height = %s", nextBindVar(&args, value)) } else { predicate = fmt.Sprintf(` EXISTS (SELECT 1 FROM events e JOIN attributes a ON e.rowid = a.event_id @@ -142,12 +152,14 @@ func (s *Store) ListTransactions(ctx context.Context, query = fmt.Sprintf("%s WHERE %s", query, strings.Join(predicates, " AND ")) } - query = fmt.Sprintf("%s ORDER BY t.block_id %s, t.index %s", query, sortOrder, sortOrder) - query = fmt.Sprintf("%s LIMIT %d", query, limit) + query = fmt.Sprintf("%s ORDER BY t.block_height %s, t.index %s", query, sortOrder, sortOrder) + if limit != 0 { + query = fmt.Sprintf("%s LIMIT %d", query, limit) + } var rows []entities.TxResultRow if err := pgxscan.Select(ctx, s.pool, &rows, query, args...); err != nil { - return nil, fmt.Errorf("querying tx_results:%w", err) + return nil, fmt.Errorf("querying tx_results: %w", err) } txs := make([]*pb.Transaction, 0, len(rows)) @@ -160,8 +172,10 @@ func (s *Store) ListTransactions(ctx context.Context, txs = append(txs, tx) } - // make sure the results are always order in the same direction, i.e. newest first, regardless of the order of the - // results from the database. + // Make sure the results are always order in the reverse chronological order, + // as required. + // This cannot be replaced by the `order by` in the request as it's used by the + // pagination system. sort.Slice(txs, func(i, j int) bool { if txs[i].Block == txs[j].Block { return txs[i].Index > txs[j].Index diff --git a/blockexplorer/store/transactions_test.go b/blockexplorer/store/transactions_test.go index fc1a581111..59f691171e 100644 --- a/blockexplorer/store/transactions_test.go +++ b/blockexplorer/store/transactions_test.go @@ -18,6 +18,7 @@ package store_test import ( "bytes" "context" + "fmt" "io/fs" "os" "path/filepath" @@ -33,10 +34,10 @@ import ( pb "code.vegaprotocol.io/vega/protos/blockexplorer/api/v1" "github.com/cenkalti/backoff" + tmTypes "github.com/cometbft/cometbft/abci/types" "github.com/jackc/pgx/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - tmTypes "github.com/tendermint/tendermint/abci/types" ) var ( @@ -50,12 +51,12 @@ func TestMain(m *testing.M) { tempDir, err := os.MkdirTemp("", "block_explorer") if err != nil { - panic(err) + panic(fmt.Errorf("could not create temporary root directory for block_explorer tests: %w", err)) } postgresRuntimePath = filepath.Join(tempDir, "sqlstore") err = os.Mkdir(postgresRuntimePath, fs.ModePerm) if err != nil { - panic(err) + panic(fmt.Errorf("could not create temporary directory for postgres runtime: %w", err)) } defer os.RemoveAll(postgresRuntimePath) @@ -115,41 +116,45 @@ type txResult struct { cmdType string } -func addTestTxResults(ctx context.Context, t *testing.T, txResults ...txResult) []*pb.Transaction { +func addTestTxResults(ctx context.Context, t *testing.T, txResultTable string, txResults ...txResult) []*pb.Transaction { t.Helper() + conn := connectionSource.Connection rows := make([]*pb.Transaction, 0, len(txResults)) blockIDs := make(map[int64]int64) + // just in case + if txResultTable == "" { + txResultTable = "tx_results" + } + + blockSQL := `INSERT INTO blocks (height, chain_id, created_at) VALUES ($1, $2, $3) ON CONFLICT (height, chain_id) DO UPDATE SET created_at = EXCLUDED.created_at RETURNING rowid` + resultSQL := fmt.Sprintf(`INSERT INTO %s (block_id, index, created_at, tx_hash, tx_result, submitter, cmd_type) VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING rowid`, txResultTable) + for _, txr := range txResults { var blockID int64 var ok bool - blockSQL := `INSERT INTO blocks (height, chain_id, created_at) VALUES ($1, $2, $3) ON CONFLICT (height, chain_id) DO UPDATE SET created_at = EXCLUDED.created_at RETURNING rowid` - resultSQL := `INSERT INTO tx_results (block_id, index, created_at, tx_hash, tx_result, submitter, cmd_type) VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING rowid` - if blockID, ok = blockIDs[txr.height]; !ok { - err := conn.QueryRow(ctx, blockSQL, txr.height, "test-chain", txr.createdAt).Scan(&blockID) - require.NoError(t, err) + require.NoError(t, conn.QueryRow(ctx, blockSQL, txr.height, "test-chain", txr.createdAt).Scan(&blockID)) blockIDs[txr.height] = blockID } - row := entities.TxResultRow{ - BlockID: blockID, - Index: txr.index, - CreatedAt: txr.createdAt, - TxHash: txr.txHash, - TxResult: txr.txResult, - Submitter: txr.submitter, - CmdType: txr.cmdType, - } + index := txr.index var rowID int64 + require.NoError(t, conn.QueryRow(ctx, resultSQL, blockID, index, txr.createdAt, txr.txHash, txr.txResult, txr.submitter, txr.cmdType).Scan(&rowID)) - err := conn.QueryRow(ctx, resultSQL, blockID, txr.index, txr.createdAt, txr.txHash, txr.txResult, txr.submitter, txr.cmdType).Scan(&rowID) - require.NoError(t, err) - row.RowID = rowID - row.BlockID = txr.height + row := entities.TxResultRow{ + RowID: rowID, + BlockHeight: txr.height, + Index: index, + CreatedAt: txr.createdAt, + TxHash: txr.txHash, + TxResult: txr.txResult, + Submitter: txr.submitter, + CmdType: txr.cmdType, + } proto, err := row.ToProto() require.NoError(t, err) @@ -160,6 +165,16 @@ func addTestTxResults(ctx context.Context, t *testing.T, txResults ...txResult) return rows } +func cleanupTransactionsTest(ctx context.Context, t *testing.T) { + t.Helper() + + conn := connectionSource.Connection + _, err := conn.Exec(ctx, `DELETE FROM tx_results`) + require.NoError(t, err) + _, err = conn.Exec(ctx, `DELETE FROM blocks`) + require.NoError(t, err) +} + func setupTestTransactions(ctx context.Context, t *testing.T) []*pb.Transaction { t.Helper() @@ -190,7 +205,7 @@ func setupTestTransactions(ctx context.Context, t *testing.T) []*pb.Transaction height: 1, index: 1, createdAt: now.Add(1 * time.Second), - txHash: "deadbeef03", + txHash: "deadbeef11", txResult: txr, submitter: "TEST", cmdType: "TEST", @@ -199,7 +214,7 @@ func setupTestTransactions(ctx context.Context, t *testing.T) []*pb.Transaction height: 2, index: 1, createdAt: now.Add(2 * time.Second), - txHash: "deadbeef04", + txHash: "deadbeef21", txResult: txr, submitter: "TEST", cmdType: "TEST", @@ -208,7 +223,7 @@ func setupTestTransactions(ctx context.Context, t *testing.T) []*pb.Transaction height: 2, index: 2, createdAt: now.Add(2*time.Second + 50), - txHash: "deadbeef05", + txHash: "deadbeef22", txResult: txr, submitter: "TEST", cmdType: "TEST", @@ -217,7 +232,7 @@ func setupTestTransactions(ctx context.Context, t *testing.T) []*pb.Transaction height: 2, index: 4, createdAt: now.Add(2*time.Second + 700), - txHash: "deadbeef06", + txHash: "deadbeef24", txResult: txr, submitter: "TEST", cmdType: "TEST", @@ -226,7 +241,7 @@ func setupTestTransactions(ctx context.Context, t *testing.T) []*pb.Transaction height: 3, index: 1, createdAt: now.Add(3 * time.Second), - txHash: "deadbeef07", + txHash: "deadbeef31", txResult: txr, submitter: "TEST", cmdType: "TEST", @@ -235,7 +250,7 @@ func setupTestTransactions(ctx context.Context, t *testing.T) []*pb.Transaction height: 4, index: 1, createdAt: now.Add(4 * time.Second), - txHash: "deadbeef08", + txHash: "deadbeef41", txResult: txr, submitter: "TEST", cmdType: "TEST", @@ -244,7 +259,7 @@ func setupTestTransactions(ctx context.Context, t *testing.T) []*pb.Transaction height: 5, index: 1, createdAt: now.Add(5 * time.Second), - txHash: "deadbeef09", + txHash: "deadbeef51", txResult: txr, submitter: "TEST", cmdType: "TEST", @@ -253,19 +268,22 @@ func setupTestTransactions(ctx context.Context, t *testing.T) []*pb.Transaction height: 6, index: 1, createdAt: now.Add(6 * time.Second), - txHash: "deadbeef10", + txHash: "deadbeef61", txResult: txr, submitter: "TEST", cmdType: "TEST", }, } - return addTestTxResults(ctx, t, txResults...) + return addTestTxResults(ctx, t, "tx_results", txResults...) } func TestStore_ListTransactions(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), postgresServerTimeout) - defer cancel() + t.Cleanup(func() { + cleanupTransactionsTest(ctx, t) + cancel() + }) inserted := setupTestTransactions(ctx, t) @@ -295,24 +313,39 @@ func TestStore_ListTransactions(t *testing.T) { }) t.Run("should return the transactions after the cursor when first is set", func(t *testing.T) { - first := entities.TxCursor{ - BlockNumber: 5, + after := entities.TxCursor{ + BlockNumber: 2, TxIndex: 1, } - got, err := s.ListTransactions(ctx, nil, nil, nil, nil, 2, &first, 0, nil) + got, err := s.ListTransactions(ctx, nil, nil, nil, nil, 2, &after, 0, nil) require.NoError(t, err) - want := []*pb.Transaction{inserted[7], inserted[6]} + want := []*pb.Transaction{inserted[5], inserted[4]} assert.Equal(t, want, got) }) t.Run("should return the transactions before the cursor when last is set", func(t *testing.T) { - first := entities.TxCursor{ + before := entities.TxCursor{ BlockNumber: 2, TxIndex: 1, } - got, err := s.ListTransactions(ctx, nil, nil, nil, nil, 2, &first, 0, nil) + got, err := s.ListTransactions(ctx, nil, nil, nil, nil, 0, nil, 2, &before) require.NoError(t, err) want := []*pb.Transaction{inserted[2], inserted[1]} assert.Equal(t, want, got) }) + + t.Run("should return the transactions before the cursor when last is set", func(t *testing.T) { + before := entities.TxCursor{ + BlockNumber: 5, + TxIndex: 1, + } + after := entities.TxCursor{ + BlockNumber: 2, + TxIndex: 2, + } + got, err := s.ListTransactions(ctx, nil, nil, nil, nil, 0, &after, 0, &before) + require.NoError(t, err) + want := []*pb.Transaction{inserted[7], inserted[6], inserted[5]} + assert.Equal(t, want, got) + }) } diff --git a/blockexplorer/store/wipe.go b/blockexplorer/store/wipe.go index 93448787f6..6bbbf31876 100644 --- a/blockexplorer/store/wipe.go +++ b/blockexplorer/store/wipe.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/logging" + "github.com/jackc/pgx/v4" ) diff --git a/cmd/blockexplorer/commands/common.go b/cmd/blockexplorer/commands/common.go index b134138a23..6845c32e13 100644 --- a/cmd/blockexplorer/commands/common.go +++ b/cmd/blockexplorer/commands/common.go @@ -18,11 +18,11 @@ package commands import ( "fmt" - "github.com/jessevdk/go-flags" - "code.vegaprotocol.io/vega/blockexplorer/config" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + + "github.com/jessevdk/go-flags" ) func loadConfig(logger *logging.Logger, vegaHome string) (*config.Config, error) { diff --git a/cmd/blockexplorer/commands/init.go b/cmd/blockexplorer/commands/init.go index ca8bc78676..1afd336c08 100644 --- a/cmd/blockexplorer/commands/init.go +++ b/cmd/blockexplorer/commands/init.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/blockexplorer/config" "code.vegaprotocol.io/vega/paths" + "github.com/jessevdk/go-flags" ) diff --git a/cmd/blockexplorer/commands/init_db.go b/cmd/blockexplorer/commands/init_db.go index cfec2c5cf2..645ce97fe7 100644 --- a/cmd/blockexplorer/commands/init_db.go +++ b/cmd/blockexplorer/commands/init_db.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/blockexplorer/config" "code.vegaprotocol.io/vega/blockexplorer/store" "code.vegaprotocol.io/vega/logging" + "github.com/jessevdk/go-flags" ) diff --git a/cmd/blockexplorer/commands/start.go b/cmd/blockexplorer/commands/start.go index db0e432745..0f6f3e6591 100644 --- a/cmd/blockexplorer/commands/start.go +++ b/cmd/blockexplorer/commands/start.go @@ -22,12 +22,13 @@ import ( "os/signal" "syscall" - "github.com/jessevdk/go-flags" - "go.uber.org/zap" - "code.vegaprotocol.io/vega/blockexplorer" "code.vegaprotocol.io/vega/blockexplorer/config" + "code.vegaprotocol.io/vega/blockexplorer/store" "code.vegaprotocol.io/vega/logging" + + "github.com/jessevdk/go-flags" + "go.uber.org/zap" ) type Start struct { @@ -53,6 +54,12 @@ func (opts *Start) Execute(_ []string) error { // Use to shutdown the block explorer. beCtx, stopBlockExplorer := context.WithCancel(context.Background()) + // make sure the database has been migrated to the latest version + err = store.MigrateToLatestSchema(logger, cfg.Store) + if err != nil { + return fmt.Errorf("creating db schema: %w", err) + } + blockExplorerStopped := make(chan any) go func() { if err := be.Run(beCtx); err != nil { diff --git a/cmd/blockexplorer/commands/unsafe_reset_all.go b/cmd/blockexplorer/commands/unsafe_reset_all.go index 1fd86b9a98..be7d313545 100644 --- a/cmd/blockexplorer/commands/unsafe_reset_all.go +++ b/cmd/blockexplorer/commands/unsafe_reset_all.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/blockexplorer/config" "code.vegaprotocol.io/vega/blockexplorer/store" "code.vegaprotocol.io/vega/logging" + "github.com/jessevdk/go-flags" ) diff --git a/cmd/data-node/commands/gateway.go b/cmd/data-node/commands/gateway.go index 67dab17bbe..ad668cbbd9 100644 --- a/cmd/data-node/commands/gateway.go +++ b/cmd/data-node/commands/gateway.go @@ -28,9 +28,9 @@ import ( "code.vegaprotocol.io/vega/datanode/gateway/server" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" - "golang.org/x/sync/errgroup" "github.com/jessevdk/go-flags" + "golang.org/x/sync/errgroup" ) type gatewayCmd struct { diff --git a/cmd/data-node/commands/init.go b/cmd/data-node/commands/init.go index f12f786a36..ebf2e666df 100644 --- a/cmd/data-node/commands/init.go +++ b/cmd/data-node/commands/init.go @@ -22,15 +22,13 @@ import ( "math" "time" - "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/config" + "code.vegaprotocol.io/vega/datanode/config/encoding" + "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" "github.com/jessevdk/go-flags" - - "code.vegaprotocol.io/vega/datanode/config/encoding" ) type InitCmd struct { diff --git a/cmd/data-node/commands/last-block.go b/cmd/data-node/commands/last-block.go index d85eaa68e8..1b1f84cb3b 100644 --- a/cmd/data-node/commands/last-block.go +++ b/cmd/data-node/commands/last-block.go @@ -26,6 +26,7 @@ import ( vgjson "code.vegaprotocol.io/vega/libs/json" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + "github.com/cenkalti/backoff/v4" "github.com/jackc/pgx/v4" "github.com/jessevdk/go-flags" diff --git a/cmd/data-node/commands/migrate-ipfs.go b/cmd/data-node/commands/migrate-ipfs.go new file mode 100644 index 0000000000..8bc831d8d8 --- /dev/null +++ b/cmd/data-node/commands/migrate-ipfs.go @@ -0,0 +1,52 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package commands + +import ( + "context" + "path/filepath" + + "code.vegaprotocol.io/vega/datanode/config" + "code.vegaprotocol.io/vega/datanode/networkhistory/ipfs" + "code.vegaprotocol.io/vega/logging" + "code.vegaprotocol.io/vega/paths" + + "github.com/jessevdk/go-flags" +) + +type MigrateIpfsCmd struct { + config.VegaHomeFlag +} + +func MigrateIpfs(ctx context.Context, parser *flags.Parser) error { + migrateIpfsCmd = MigrateIpfsCmd{} + + _, err := parser.AddCommand("migrate-ipfs", "Update IPFS store version", "Migrate IPFS store to the latest version supported by Vega", &migrateIpfsCmd) + + return err +} + +var migrateIpfsCmd MigrateIpfsCmd + +func (cmd *MigrateIpfsCmd) Execute(_ []string) error { + log := logging.NewLoggerFromConfig(logging.NewDefaultConfig()) + defer log.AtExit() + + vegaPaths := paths.New(cmd.VegaHome) + ipfsDir := filepath.Join(vegaPaths.StatePathFor(paths.DataNodeNetworkHistoryHome), "store", "ipfs") + + return ipfs.MigrateIpfsStorageVersion(log, ipfsDir) +} diff --git a/cmd/data-node/commands/networkhistory/fetch.go b/cmd/data-node/commands/networkhistory/fetch.go index 91df1ddafd..3ff9f49e4b 100644 --- a/cmd/data-node/commands/networkhistory/fetch.go +++ b/cmd/data-node/commands/networkhistory/fetch.go @@ -21,16 +21,14 @@ import ( "fmt" "strconv" - "google.golang.org/grpc/status" - + "code.vegaprotocol.io/vega/datanode/config" "code.vegaprotocol.io/vega/datanode/networkhistory" - "code.vegaprotocol.io/vega/datanode/service" "code.vegaprotocol.io/vega/datanode/sqlstore" - - "code.vegaprotocol.io/vega/datanode/config" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + + "google.golang.org/grpc/status" ) type fetchCmd struct { diff --git a/cmd/data-node/commands/networkhistory/latest_history_segment.go b/cmd/data-node/commands/networkhistory/latest_history_segment.go index 14f33fd872..300dff9905 100644 --- a/cmd/data-node/commands/networkhistory/latest_history_segment.go +++ b/cmd/data-node/commands/networkhistory/latest_history_segment.go @@ -22,13 +22,12 @@ import ( "path/filepath" coreConfig "code.vegaprotocol.io/vega/core/config" - vgjson "code.vegaprotocol.io/vega/libs/json" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "code.vegaprotocol.io/vega/datanode/config" "code.vegaprotocol.io/vega/datanode/networkhistory/store" + vgjson "code.vegaprotocol.io/vega/libs/json" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" ) var errNoHistorySegmentFound = fmt.Errorf("no history segments found") diff --git a/cmd/data-node/commands/networkhistory/latest_history_segment_from_peers.go b/cmd/data-node/commands/networkhistory/latest_history_segment_from_peers.go index 17a98d1d85..1ecaad7136 100644 --- a/cmd/data-node/commands/networkhistory/latest_history_segment_from_peers.go +++ b/cmd/data-node/commands/networkhistory/latest_history_segment_from_peers.go @@ -21,10 +21,9 @@ import ( "os" coreConfig "code.vegaprotocol.io/vega/core/config" + "code.vegaprotocol.io/vega/datanode/config" "code.vegaprotocol.io/vega/datanode/networkhistory" vgjson "code.vegaprotocol.io/vega/libs/json" - - "code.vegaprotocol.io/vega/datanode/config" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" diff --git a/cmd/data-node/commands/networkhistory/load.go b/cmd/data-node/commands/networkhistory/load.go index daf6eec31e..2a7a67eab8 100644 --- a/cmd/data-node/commands/networkhistory/load.go +++ b/cmd/data-node/commands/networkhistory/load.go @@ -23,22 +23,18 @@ import ( "strings" "time" - "github.com/jackc/pgx/v4/pgxpool" - - vgterm "code.vegaprotocol.io/vega/libs/term" - - "go.uber.org/zap" - - "code.vegaprotocol.io/vega/datanode/networkhistory/store" - "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" + "code.vegaprotocol.io/vega/datanode/config" "code.vegaprotocol.io/vega/datanode/networkhistory" "code.vegaprotocol.io/vega/datanode/networkhistory/snapshot" + "code.vegaprotocol.io/vega/datanode/networkhistory/store" + "code.vegaprotocol.io/vega/datanode/sqlstore" + vgterm "code.vegaprotocol.io/vega/libs/term" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" - "code.vegaprotocol.io/vega/datanode/config" + "github.com/jackc/pgx/v4/pgxpool" + "go.uber.org/zap" ) type loadCmd struct { diff --git a/cmd/data-node/commands/networkhistory/networkhistory.go b/cmd/data-node/commands/networkhistory/networkhistory.go index 8361b3b98c..6a8af1c761 100644 --- a/cmd/data-node/commands/networkhistory/networkhistory.go +++ b/cmd/data-node/commands/networkhistory/networkhistory.go @@ -20,18 +20,15 @@ import ( "fmt" "code.vegaprotocol.io/vega/datanode/admin" - + "code.vegaprotocol.io/vega/datanode/config" "code.vegaprotocol.io/vega/datanode/networkhistory" vgjson "code.vegaprotocol.io/vega/libs/json" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "github.com/jessevdk/go-flags" "google.golang.org/grpc" - - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - - "code.vegaprotocol.io/vega/datanode/config" ) type Cmd struct { diff --git a/cmd/data-node/commands/networkhistory/rollback.go b/cmd/data-node/commands/networkhistory/rollback.go index d9bd7f61f1..d3a5af4fbd 100644 --- a/cmd/data-node/commands/networkhistory/rollback.go +++ b/cmd/data-node/commands/networkhistory/rollback.go @@ -21,14 +21,12 @@ import ( "fmt" "strconv" - vgterm "code.vegaprotocol.io/vega/libs/term" - "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" + "code.vegaprotocol.io/vega/datanode/config" "code.vegaprotocol.io/vega/datanode/networkhistory" + vgterm "code.vegaprotocol.io/vega/libs/term" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" - - "code.vegaprotocol.io/vega/datanode/config" ) type rollbackCmd struct { diff --git a/cmd/data-node/commands/networkhistory/show.go b/cmd/data-node/commands/networkhistory/show.go index 5227c0a29b..46711e8a64 100644 --- a/cmd/data-node/commands/networkhistory/show.go +++ b/cmd/data-node/commands/networkhistory/show.go @@ -21,9 +21,8 @@ import ( "os" "sort" - "github.com/jackc/pgx/v4/pgxpool" - coreConfig "code.vegaprotocol.io/vega/core/config" + "code.vegaprotocol.io/vega/datanode/config" "code.vegaprotocol.io/vega/datanode/networkhistory/segment" "code.vegaprotocol.io/vega/datanode/sqlstore" vgjson "code.vegaprotocol.io/vega/libs/json" @@ -31,7 +30,7 @@ import ( "code.vegaprotocol.io/vega/paths" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "code.vegaprotocol.io/vega/datanode/config" + "github.com/jackc/pgx/v4/pgxpool" ) type showCmd struct { diff --git a/cmd/data-node/commands/postgres.go b/cmd/data-node/commands/postgres.go index 5a7f48d561..efd7984c1b 100644 --- a/cmd/data-node/commands/postgres.go +++ b/cmd/data-node/commands/postgres.go @@ -23,14 +23,13 @@ import ( "path/filepath" "syscall" - "gopkg.in/natefinch/lumberjack.v2" - "code.vegaprotocol.io/vega/datanode/config" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" embeddedpostgres "github.com/fergusstrange/embedded-postgres" "github.com/jessevdk/go-flags" + "gopkg.in/natefinch/lumberjack.v2" ) type PostgresCmd struct { diff --git a/cmd/data-node/commands/root.go b/cmd/data-node/commands/root.go index 8345ded450..43994f2903 100644 --- a/cmd/data-node/commands/root.go +++ b/cmd/data-node/commands/root.go @@ -52,6 +52,7 @@ func Execute(ctx context.Context) error { LastBlock, UnsafeResetAll, networkhistory.NetworkHistory, + MigrateIpfs, ); err != nil { fmt.Printf("%+v\n", err) return err diff --git a/cmd/data-node/commands/start.go b/cmd/data-node/commands/start.go index c69f881470..8de72bb51c 100644 --- a/cmd/data-node/commands/start.go +++ b/cmd/data-node/commands/start.go @@ -20,10 +20,9 @@ import ( "fmt" "runtime/debug" - "code.vegaprotocol.io/vega/libs/memory" - "code.vegaprotocol.io/vega/cmd/data-node/commands/start" "code.vegaprotocol.io/vega/datanode/config" + "code.vegaprotocol.io/vega/libs/memory" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" "code.vegaprotocol.io/vega/version" diff --git a/cmd/data-node/commands/start/node.go b/cmd/data-node/commands/start/node.go index 7fb0bdf2e9..459ddf196e 100644 --- a/cmd/data-node/commands/start/node.go +++ b/cmd/data-node/commands/start/node.go @@ -24,13 +24,7 @@ import ( "os/signal" "syscall" - "code.vegaprotocol.io/vega/libs/subscribers" - "code.vegaprotocol.io/vega/datanode/admin" - - embeddedpostgres "github.com/fergusstrange/embedded-postgres" - "golang.org/x/sync/errgroup" - "code.vegaprotocol.io/vega/datanode/api" "code.vegaprotocol.io/vega/datanode/broker" "code.vegaprotocol.io/vega/datanode/config" @@ -40,8 +34,12 @@ import ( "code.vegaprotocol.io/vega/datanode/networkhistory/snapshot" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/libs/pprof" + "code.vegaprotocol.io/vega/libs/subscribers" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + + embeddedpostgres "github.com/fergusstrange/embedded-postgres" + "golang.org/x/sync/errgroup" ) // NodeCommand use to implement 'node' command. @@ -238,6 +236,9 @@ func (l *NodeCommand) createGRPCServer(config api.Config) *api.GRPCServer { l.paidLiquidityFeesStatsService, l.partyLockedBalancesService, l.partyVestingBalancesService, + l.transactionResultsService, + l.gamesService, + l.marginModesService, ) return grpcServer } diff --git a/cmd/data-node/commands/start/node_pre.go b/cmd/data-node/commands/start/node_pre.go index 9fe1312c5e..294f7f9aab 100644 --- a/cmd/data-node/commands/start/node_pre.go +++ b/cmd/data-node/commands/start/node_pre.go @@ -22,22 +22,23 @@ import ( "path/filepath" "time" - "code.vegaprotocol.io/vega/libs/subscribers" - - "github.com/cenkalti/backoff" - "google.golang.org/grpc" - "gopkg.in/natefinch/lumberjack.v2" - "code.vegaprotocol.io/vega/datanode/broker" "code.vegaprotocol.io/vega/datanode/config" "code.vegaprotocol.io/vega/datanode/networkhistory" + "code.vegaprotocol.io/vega/datanode/networkhistory/ipfs" "code.vegaprotocol.io/vega/datanode/networkhistory/snapshot" "code.vegaprotocol.io/vega/datanode/networkhistory/store" "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/libs/fs" "code.vegaprotocol.io/vega/libs/pprof" + "code.vegaprotocol.io/vega/libs/subscribers" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" vegaprotoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" + + "github.com/cenkalti/backoff" + "google.golang.org/grpc" + "gopkg.in/natefinch/lumberjack.v2" ) func (l *NodeCommand) persistentPre([]string) (err error) { @@ -98,6 +99,23 @@ func (l *NodeCommand) persistentPre([]string) (err error) { if ResetDatabaseAndNetworkHistory(l.ctx, l.Log, l.vegaPaths, l.conf.SQLStore.ConnectionConfig); err != nil { return fmt.Errorf("failed to reset database and network history: %w", err) } + } else if !l.conf.SQLStore.WipeOnStartup && l.conf.NetworkHistory.Enabled { + ipfsDir := filepath.Join(l.vegaPaths.StatePathFor(paths.DataNodeNetworkHistoryHome), "store", "ipfs") + ipfsExists, err := fs.PathExists(ipfsDir) + if err != nil { + return fmt.Errorf("failed to check if ipfs store is already initialized") + } + + // We do not care for migration when the ipfs store does not exist on the local file system + if ipfsExists { + preLog.Info("Migrating the IPFS storage to the latest version") + if err := ipfs.MigrateIpfsStorageVersion(preLog, ipfsDir); err != nil { + return fmt.Errorf("failed to migrate the ipfs version") + } + preLog.Info("Migrating the IPFS storage finished") + } else { + preLog.Info("IPFS store not initialized. Migration not needed") + } } initialisedFromNetworkHistory := false diff --git a/cmd/data-node/commands/start/sqlsubscribers.go b/cmd/data-node/commands/start/sqlsubscribers.go index de02e9261f..7b7c38aef9 100644 --- a/cmd/data-node/commands/start/sqlsubscribers.go +++ b/cmd/data-node/commands/start/sqlsubscribers.go @@ -79,6 +79,8 @@ type SQLSubscribers struct { paidLiquidityFeesStatsStore *sqlstore.PaidLiquidityFeesStats partyLockedBalancesStore *sqlstore.PartyLockedBalance partyVestingBalancesStore *sqlstore.PartyVestingBalance + gamesStore *sqlstore.Games + marginModesStore *sqlstore.MarginModes // Services candleService *candlesv2.Svc @@ -131,6 +133,9 @@ type SQLSubscribers struct { paidLiquidityFeesStatsService *service.PaidLiquidityFeesStats partyLockedBalancesService *service.PartyLockedBalances partyVestingBalancesService *service.PartyVestingBalances + transactionResultsService *service.TransactionResults + gamesService *service.Games + marginModesService *service.MarginModes // Subscribers accountSub *sqlsubscribers.Account @@ -180,6 +185,8 @@ type SQLSubscribers struct { volumeDiscountProgramSub *sqlsubscribers.VolumeDiscountProgram paidLiquidityFeesStatsSub *sqlsubscribers.PaidLiquidityFeesStats vestingSummarySub *sqlsubscribers.VestingBalancesSummary + transactionResultsSub *sqlsubscribers.TransactionResults + marginModesSub *sqlsubscribers.MarginModes } func (s *SQLSubscribers) GetSQLSubscribers() []broker.SQLBrokerSubscriber { @@ -233,6 +240,8 @@ func (s *SQLSubscribers) GetSQLSubscribers() []broker.SQLBrokerSubscriber { s.volumeDiscountProgramSub, s.paidLiquidityFeesStatsSub, s.vestingSummarySub, + s.transactionResultsSub, + s.marginModesSub, } } @@ -250,7 +259,7 @@ func (s *SQLSubscribers) CreateAllStores(ctx context.Context, Log *logging.Logge s.tradeStore = sqlstore.NewTrades(transactionalConnectionSource) s.networkLimitsStore = sqlstore.NewNetworkLimits(transactionalConnectionSource) s.marketDataStore = sqlstore.NewMarketData(transactionalConnectionSource) - s.rewardStore = sqlstore.NewRewards(transactionalConnectionSource) + s.rewardStore = sqlstore.NewRewards(ctx, transactionalConnectionSource) s.marketsStore = sqlstore.NewMarkets(transactionalConnectionSource) s.delegationStore = sqlstore.NewDelegations(transactionalConnectionSource) s.epochStore = sqlstore.NewEpochs(transactionalConnectionSource) @@ -291,6 +300,8 @@ func (s *SQLSubscribers) CreateAllStores(ctx context.Context, Log *logging.Logge s.paidLiquidityFeesStatsStore = sqlstore.NewPaidLiquidityFeesStats(transactionalConnectionSource) s.partyLockedBalancesStore = sqlstore.NewPartyLockedBalances(transactionalConnectionSource) s.partyVestingBalancesStore = sqlstore.NewPartyVestingBalances(transactionalConnectionSource) + s.gamesStore = sqlstore.NewGames(transactionalConnectionSource) + s.marginModesStore = sqlstore.NewMarginModes(transactionalConnectionSource) } func (s *SQLSubscribers) SetupServices(ctx context.Context, log *logging.Logger, candlesConfig candlesv2.Config) error { @@ -344,6 +355,11 @@ func (s *SQLSubscribers) SetupServices(ctx context.Context, log *logging.Logger, s.paidLiquidityFeesStatsService = service.NewPaidLiquidityFeesStats(s.paidLiquidityFeesStatsStore) s.partyLockedBalancesService = service.NewPartyLockedBalances(s.partyLockedBalancesStore) s.partyVestingBalancesService = service.NewPartyVestingBalances(s.partyVestingBalancesStore) + s.gamesService = service.NewGames(s.gamesStore) + s.marginModesService = service.NewMarginModes(s.marginModesStore) + + s.transactionResultsSub = sqlsubscribers.NewTransactionResults(log) + s.transactionResultsService = service.NewTransactionResults(s.transactionResultsSub) toInit := []interface{ Initialise(context.Context) error }{ s.marketDepthService, @@ -408,4 +424,5 @@ func (s *SQLSubscribers) SetupSQLSubscribers() { s.volumeDiscountProgramSub = sqlsubscribers.NewVolumeDiscountProgram(s.volumeDiscountProgramService) s.paidLiquidityFeesStatsSub = sqlsubscribers.NewPaidLiquidityFeesStats(s.paidLiquidityFeesStatsService) s.vestingSummarySub = sqlsubscribers.NewVestingBalancesSummary(s.partyVestingBalancesStore, s.partyLockedBalancesStore) + s.marginModesSub = sqlsubscribers.NewMarginModes(s.marginModesService) } diff --git a/cmd/vega/commands/announce_node.go b/cmd/vega/commands/announce_node.go index ceec1c95c8..1fb5420445 100644 --- a/cmd/vega/commands/announce_node.go +++ b/cmd/vega/commands/announce_node.go @@ -35,9 +35,9 @@ import ( "code.vegaprotocol.io/vega/paths" api "code.vegaprotocol.io/vega/protos/vega/api/v1" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" - "google.golang.org/grpc" "github.com/jessevdk/go-flags" + "google.golang.org/grpc" ) type AnnounceNodeCmd struct { diff --git a/cmd/vega/commands/blockexplorer.go b/cmd/vega/commands/blockexplorer.go index 2e0a139eca..249c765f13 100644 --- a/cmd/vega/commands/blockexplorer.go +++ b/cmd/vega/commands/blockexplorer.go @@ -20,6 +20,7 @@ import ( "os" cmd "code.vegaprotocol.io/vega/cmd/blockexplorer/commands" + "github.com/jessevdk/go-flags" ) diff --git a/cmd/vega/commands/bridge/erc20.go b/cmd/vega/commands/bridge/erc20.go index 80d7bae491..7d59f8ef25 100644 --- a/cmd/vega/commands/bridge/erc20.go +++ b/cmd/vega/commands/bridge/erc20.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/core/nodewallets" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/paths" + "github.com/jessevdk/go-flags" ) diff --git a/cmd/vega/commands/cometbft.go b/cmd/vega/commands/cometbft.go new file mode 100644 index 0000000000..406e3f819b --- /dev/null +++ b/cmd/vega/commands/cometbft.go @@ -0,0 +1,94 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package commands + +import ( + "context" + "os" + "path/filepath" + + cmtcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" + cmtdebug "github.com/cometbft/cometbft/cmd/cometbft/commands/debug" + cmtcfg "github.com/cometbft/cometbft/config" + cmtcli "github.com/cometbft/cometbft/libs/cli" + "github.com/jessevdk/go-flags" +) + +func Tm(_ context.Context, parser *flags.Parser) error { + _, err := parser.AddCommand( + "tm", + "deprecated, see vega cometbft instead", + "deprecated, see vega cometbft instead", + &cometbftCmd{}, + ) + + return err +} + +func Tendermint(_ context.Context, parser *flags.Parser) error { + _, err := parser.AddCommand( + "tendermint", + "deprecated, see vega cometbft instead", + "deprecated, see vega cometbft instead", + &cometbftCmd{}, + ) + + return err +} + +func CometBFT(_ context.Context, parser *flags.Parser) error { + _, err := parser.AddCommand( + "cometbft", + "Run cometbft commands", + "Run cometbft commands", + &cometbftCmd{}, + ) + + return err +} + +type cometbftCmd struct{} + +func (opts *cometbftCmd) Execute(_ []string) error { + os.Args = os.Args[1:] + rootCmd := cmtcmd.RootCmd + rootCmd.AddCommand( + cmtcmd.GenValidatorCmd, + cmtcmd.InitFilesCmd, + cmtcmd.LightCmd, + cmtcmd.ReplayCmd, + cmtcmd.ReplayConsoleCmd, + cmtcmd.ResetAllCmd, + cmtcmd.ResetPrivValidatorCmd, + cmtcmd.ResetStateCmd, + cmtcmd.ShowValidatorCmd, + cmtcmd.TestnetFilesCmd, + cmtcmd.ShowNodeIDCmd, + cmtcmd.GenNodeKeyCmd, + cmtcmd.VersionCmd, + cmtcmd.RollbackStateCmd, + cmtcmd.CompactGoLevelDBCmd, + cmtdebug.DebugCmd, + cmtcli.NewCompletionCmd(rootCmd, true), + ) + + baseCmd := cmtcli.PrepareBaseCmd(rootCmd, "CMT", os.ExpandEnv(filepath.Join("$HOME", cmtcfg.DefaultTendermintDir))) + if err := baseCmd.Execute(); err != nil { + return err + } + + return nil +} diff --git a/cmd/vega/commands/datanode.go b/cmd/vega/commands/datanode.go index 5ea9e0e8b3..3640bb9ab8 100644 --- a/cmd/vega/commands/datanode.go +++ b/cmd/vega/commands/datanode.go @@ -20,6 +20,7 @@ import ( "os" cmd "code.vegaprotocol.io/vega/cmd/data-node/commands" + "github.com/jessevdk/go-flags" ) diff --git a/cmd/vega/commands/genesis/generate.go b/cmd/vega/commands/genesis/generate.go index 1418ea8cc6..6b9f45488e 100644 --- a/cmd/vega/commands/genesis/generate.go +++ b/cmd/vega/commands/genesis/generate.go @@ -28,8 +28,8 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + tmtypes "github.com/cometbft/cometbft/types" "github.com/jessevdk/go-flags" - tmtypes "github.com/tendermint/tendermint/types" ) type generateCmd struct { diff --git a/cmd/vega/commands/genesis/genesis.go b/cmd/vega/commands/genesis/genesis.go index 90c5859cc4..3cfab6f829 100644 --- a/cmd/vega/commands/genesis/genesis.go +++ b/cmd/vega/commands/genesis/genesis.go @@ -19,6 +19,7 @@ import ( "context" "code.vegaprotocol.io/vega/core/config" + "github.com/jessevdk/go-flags" ) diff --git a/cmd/vega/commands/genesis/load_checkpoint.go b/cmd/vega/commands/genesis/load_checkpoint.go index dc73fcbfe5..cf92d54ea3 100644 --- a/cmd/vega/commands/genesis/load_checkpoint.go +++ b/cmd/vega/commands/genesis/load_checkpoint.go @@ -30,9 +30,10 @@ import ( "code.vegaprotocol.io/vega/core/types" vgfs "code.vegaprotocol.io/vega/libs/fs" "code.vegaprotocol.io/vega/logging" + + tmjson "github.com/cometbft/cometbft/libs/json" + tmtypes "github.com/cometbft/cometbft/types" "github.com/jessevdk/go-flags" - tmjson "github.com/tendermint/tendermint/libs/json" - tmtypes "github.com/tendermint/tendermint/types" ) type loadCheckpointCmd struct { diff --git a/cmd/vega/commands/genesis/new_validator.go b/cmd/vega/commands/genesis/new_validator.go index 6d9079063f..01c7418261 100644 --- a/cmd/vega/commands/genesis/new_validator.go +++ b/cmd/vega/commands/genesis/new_validator.go @@ -27,9 +27,9 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + tmjson "github.com/cometbft/cometbft/libs/json" + tmtypes "github.com/cometbft/cometbft/types" "github.com/jessevdk/go-flags" - tmjson "github.com/tendermint/tendermint/libs/json" - tmtypes "github.com/tendermint/tendermint/types" ) var ErrAppendAndReplaceAreMutuallyExclusive = errors.New("--append and --replace and mutually exclusive") diff --git a/cmd/vega/commands/init.go b/cmd/vega/commands/init.go index af038b9c8d..1e9537ad75 100644 --- a/cmd/vega/commands/init.go +++ b/cmd/vega/commands/init.go @@ -29,13 +29,13 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + tmcfg "github.com/cometbft/cometbft/config" + tmos "github.com/cometbft/cometbft/libs/os" + tmrand "github.com/cometbft/cometbft/libs/rand" + "github.com/cometbft/cometbft/p2p" + "github.com/cometbft/cometbft/privval" + "github.com/cometbft/cometbft/types" "github.com/jessevdk/go-flags" - tmcfg "github.com/tendermint/tendermint/config" - tmos "github.com/tendermint/tendermint/libs/os" - tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/privval" - "github.com/tendermint/tendermint/types" ) type InitCmd struct { diff --git a/cmd/vega/commands/main_test.go b/cmd/vega/commands/main_test.go index 2a14866379..21832296ec 100644 --- a/cmd/vega/commands/main_test.go +++ b/cmd/vega/commands/main_test.go @@ -25,6 +25,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/require" ) diff --git a/cmd/vega/commands/node.go b/cmd/vega/commands/node.go index e7d16b58a0..19a564c101 100644 --- a/cmd/vega/commands/node.go +++ b/cmd/vega/commands/node.go @@ -21,10 +21,9 @@ import ( "fmt" "runtime/debug" - "code.vegaprotocol.io/vega/libs/memory" - "code.vegaprotocol.io/vega/cmd/vega/commands/node" "code.vegaprotocol.io/vega/core/config" + "code.vegaprotocol.io/vega/libs/memory" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" diff --git a/cmd/vega/commands/node/app_wrapper.go b/cmd/vega/commands/node/app_wrapper.go index aa3d9caee0..8b9af75730 100644 --- a/cmd/vega/commands/node/app_wrapper.go +++ b/cmd/vega/commands/node/app_wrapper.go @@ -15,7 +15,11 @@ package node -import "github.com/tendermint/tendermint/abci/types" +import ( + "context" + + "github.com/cometbft/cometbft/abci/types" +) type appW struct { // this is the application currently in use @@ -32,71 +36,65 @@ func newAppW(app types.Application) *appW { } } -func (app *appW) Info(req types.RequestInfo) types.ResponseInfo { - return app.impl.Info(req) -} - -func (app *appW) DeliverTx(req types.RequestDeliverTx) types.ResponseDeliverTx { - return app.impl.DeliverTx(req) +func (app *appW) Info(ctx context.Context, req *types.RequestInfo) (*types.ResponseInfo, error) { + return app.impl.Info(ctx, req) } -func (app *appW) CheckTx(req types.RequestCheckTx) types.ResponseCheckTx { - return app.impl.CheckTx(req) +func (app *appW) CheckTx(ctx context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + return app.impl.CheckTx(ctx, req) } -func (app *appW) Commit() types.ResponseCommit { - resp := app.impl.Commit() +func (app *appW) Commit(ctx context.Context, req *types.RequestCommit) (*types.ResponseCommit, error) { + resp, err := app.impl.Commit(ctx, req) // if we are scheduled for an upgrade of the protocol // let's do it now. if app.update != nil { app.impl = app.update app.update = nil } - return resp + return resp, err +} + +func (app *appW) Query(ctx context.Context, req *types.RequestQuery) (*types.ResponseQuery, error) { + return app.impl.Query(ctx, req) +} + +func (app *appW) InitChain(ctx context.Context, req *types.RequestInitChain) (*types.ResponseInitChain, error) { + return app.impl.InitChain(ctx, req) } -func (app *appW) Query(req types.RequestQuery) types.ResponseQuery { - return app.impl.Query(req) +func (app *appW) ListSnapshots(ctx context.Context, req *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { + return app.impl.ListSnapshots(ctx, req) } -func (app *appW) InitChain(req types.RequestInitChain) types.ResponseInitChain { - return app.impl.InitChain(req) +func (app *appW) OfferSnapshot(ctx context.Context, req *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { + return app.impl.OfferSnapshot(ctx, req) } -func (app *appW) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock { - return app.impl.BeginBlock(req) +func (app *appW) LoadSnapshotChunk(ctx context.Context, req *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { + return app.impl.LoadSnapshotChunk(ctx, req) } -func (app *appW) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock { - return app.impl.EndBlock(req) +func (app *appW) ApplySnapshotChunk(ctx context.Context, req *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { + return app.impl.ApplySnapshotChunk(ctx, req) } -func (app *appW) ListSnapshots( - req types.RequestListSnapshots, -) types.ResponseListSnapshots { - return app.impl.ListSnapshots(req) +func (app *appW) PrepareProposal(ctx context.Context, proposal *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { + return app.impl.PrepareProposal(ctx, proposal) } -func (app *appW) OfferSnapshot( - req types.RequestOfferSnapshot, -) types.ResponseOfferSnapshot { - return app.impl.OfferSnapshot(req) +func (app *appW) ProcessProposal(ctx context.Context, proposal *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { + return app.impl.ProcessProposal(ctx, proposal) } -func (app *appW) LoadSnapshotChunk( - req types.RequestLoadSnapshotChunk, -) types.ResponseLoadSnapshotChunk { - return app.impl.LoadSnapshotChunk(req) +func (app *appW) FinalizeBlock(ctx context.Context, req *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { + return app.impl.FinalizeBlock(ctx, req) } -func (app *appW) ApplySnapshotChunk( - req types.RequestApplySnapshotChunk, -) types.ResponseApplySnapshotChunk { - return app.impl.ApplySnapshotChunk(req) +func (app *appW) ExtendVote(ctx context.Context, req *types.RequestExtendVote) (*types.ResponseExtendVote, error) { + return app.impl.ExtendVote(ctx, req) } -func (app *appW) SetOption( - req types.RequestSetOption, -) types.ResponseSetOption { - return app.impl.SetOption(req) +func (app *appW) VerifyVoteExtension(ctx context.Context, req *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { + return app.impl.VerifyVoteExtension(ctx, req) } diff --git a/cmd/vega/commands/node/fetch_genesis.go b/cmd/vega/commands/node/fetch_genesis.go index cfa3f8d7e5..b186e35040 100644 --- a/cmd/vega/commands/node/fetch_genesis.go +++ b/cmd/vega/commands/node/fetch_genesis.go @@ -23,7 +23,8 @@ import ( "time" "code.vegaprotocol.io/vega/core/genesis" - tmtypes "github.com/tendermint/tendermint/types" + + tmtypes "github.com/cometbft/cometbft/types" ) func genesisDocHTTPFromURL(genesisFilePath string) (*tmtypes.GenesisDoc, error) { diff --git a/cmd/vega/commands/node/node.go b/cmd/vega/commands/node/node.go index 9d513f7085..2b9e7740f1 100644 --- a/cmd/vega/commands/node/node.go +++ b/cmd/vega/commands/node/node.go @@ -42,8 +42,8 @@ import ( apipb "code.vegaprotocol.io/vega/protos/vega/api/v1" "code.vegaprotocol.io/vega/version" - "github.com/tendermint/tendermint/abci/types" - tmtypes "github.com/tendermint/tendermint/types" + "github.com/cometbft/cometbft/abci/types" + tmtypes "github.com/cometbft/cometbft/types" "google.golang.org/grpc" ) @@ -72,6 +72,7 @@ type Command struct { ethClient *ethclient.Client ethConfirmations *ethclient.EthereumConfirmations + l2Clients *ethclient.L2Clients abciApp *appW protocol *protocol.Protocol @@ -128,7 +129,9 @@ func (n *Command) Run( n.ethConfirmations, n.blockchainClient, vegaPaths, - n.stats) + n.stats, + n.l2Clients, + ) if err != nil { return err } @@ -323,8 +326,7 @@ func (n *Command) startBlockchain(log *logging.Logger, tmHome, network, networkU if err != nil { return err } - // n.blockchainClient = blockchain.NewClient(client) - n.blockchainClient.Set(client) + n.blockchainClient.Set(client, n.tmNode.MempoolSize) case blockchain.ProviderNullChain: // nullchain acts as both the client and the server because its does everything n.nullBlockchain = nullchain.NewClient( @@ -335,7 +337,7 @@ func (n *Command) startBlockchain(log *logging.Logger, tmHome, network, networkU n.nullBlockchain.SetABCIApp(n.abciApp) n.blockchainServer = blockchain.NewServer(n.Log, n.nullBlockchain) // n.blockchainClient = blockchain.NewClient(n.nullBlockchain) - n.blockchainClient.Set(n.nullBlockchain) + n.blockchainClient.Set(n.nullBlockchain, 100*1024*1024) default: return ErrUnknownChainProvider @@ -448,11 +450,16 @@ func (n *Command) startBlockchainClients() error { // We may not need ethereum client initialized when we have not // provided the ethereum endpoint. We skip creating client here // when RPCEnpoint is empty and the nullchain present. - if len(n.conf.Ethereum.RPCEndpoint) < 1 { + if len(n.conf.Ethereum.RPCEndpoint) < 1 && n.conf.Blockchain.ChainProvider == blockchain.ProviderNullChain { return nil } var err error + n.l2Clients, err = ethclient.NewL2Clients(n.ctx, n.Log, n.conf.Ethereum) + if err != nil { + return fmt.Errorf("could not instantiate ethereum l2 clients: %w", err) + } + n.ethClient, err = ethclient.Dial(n.ctx, n.conf.Ethereum) if err != nil { return fmt.Errorf("could not instantiate ethereum client: %w", err) diff --git a/cmd/vega/commands/nodewallet/import.go b/cmd/vega/commands/nodewallet/import.go index b9da4add8a..11d9a74e9a 100644 --- a/cmd/vega/commands/nodewallet/import.go +++ b/cmd/vega/commands/nodewallet/import.go @@ -28,8 +28,8 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + tmconfig "github.com/cometbft/cometbft/config" "github.com/jessevdk/go-flags" - tmconfig "github.com/tendermint/tendermint/config" ) var ( diff --git a/cmd/vega/commands/nodewallet/reload.go b/cmd/vega/commands/nodewallet/reload.go index 60adecee20..8985d25538 100644 --- a/cmd/vega/commands/nodewallet/reload.go +++ b/cmd/vega/commands/nodewallet/reload.go @@ -20,12 +20,10 @@ import ( "fmt" "time" - vgjson "code.vegaprotocol.io/vega/libs/json" - "code.vegaprotocol.io/vega/paths" - "code.vegaprotocol.io/vega/core/admin" "code.vegaprotocol.io/vega/core/config" - "code.vegaprotocol.io/vega/logging" + vgjson "code.vegaprotocol.io/vega/libs/json" + "code.vegaprotocol.io/vega/paths" "github.com/jessevdk/go-flags" ) @@ -44,9 +42,6 @@ func (opts *reloadCmd) Execute(_ []string) error { return err } - log := logging.NewLoggerFromConfig(logging.NewDefaultConfig()) - defer log.AtExit() - vegaPaths := paths.New(rootCmd.VegaHome) _, conf, err := config.EnsureNodeConfig(vegaPaths) @@ -60,7 +55,7 @@ func (opts *reloadCmd) Execute(_ []string) error { return err } - sc := admin.NewClient(log, opts.Config) + sc := admin.NewClient(opts.Config) ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() diff --git a/cmd/vega/commands/nodewallet/show.go b/cmd/vega/commands/nodewallet/show.go index ac9cfd27f3..961f711dd0 100644 --- a/cmd/vega/commands/nodewallet/show.go +++ b/cmd/vega/commands/nodewallet/show.go @@ -16,13 +16,12 @@ package nodewallet import ( - vgjson "code.vegaprotocol.io/vega/libs/json" - "code.vegaprotocol.io/vega/paths" - "code.vegaprotocol.io/vega/core/config" "code.vegaprotocol.io/vega/core/nodewallets" "code.vegaprotocol.io/vega/core/nodewallets/registry" + vgjson "code.vegaprotocol.io/vega/libs/json" "code.vegaprotocol.io/vega/logging" + "code.vegaprotocol.io/vega/paths" "github.com/jessevdk/go-flags" ) diff --git a/cmd/vega/commands/paths/list.go b/cmd/vega/commands/paths/list.go index 0b55f518f5..e73737d25f 100644 --- a/cmd/vega/commands/paths/list.go +++ b/cmd/vega/commands/paths/list.go @@ -21,9 +21,8 @@ import ( "sort" "text/tabwriter" - "code.vegaprotocol.io/vega/paths" - "code.vegaprotocol.io/vega/core/config" + "code.vegaprotocol.io/vega/paths" ) type ListCmd struct { diff --git a/cmd/vega/commands/query.go b/cmd/vega/commands/query.go index 715444b4c1..dd2d875446 100644 --- a/cmd/vega/commands/query.go +++ b/cmd/vega/commands/query.go @@ -19,6 +19,7 @@ import ( "context" "code.vegaprotocol.io/vega/cmd/vega/commands/query" + "github.com/jessevdk/go-flags" ) diff --git a/cmd/vega/commands/root.go b/cmd/vega/commands/root.go index db1671ea1e..ab7899f525 100644 --- a/cmd/vega/commands/root.go +++ b/cmd/vega/commands/root.go @@ -20,14 +20,14 @@ import ( "fmt" "os" - "github.com/jessevdk/go-flags" - "code.vegaprotocol.io/vega/cmd/vega/commands/faucet" "code.vegaprotocol.io/vega/cmd/vega/commands/genesis" "code.vegaprotocol.io/vega/cmd/vega/commands/nodewallet" "code.vegaprotocol.io/vega/cmd/vega/commands/paths" tools "code.vegaprotocol.io/vega/cmd/vegatools" "code.vegaprotocol.io/vega/core/config" + + "github.com/jessevdk/go-flags" ) // Subcommand is the signature of a sub command that can be registered. @@ -47,8 +47,8 @@ func Main(ctx context.Context) error { // special case for the tendermint subcommand, so we bypass the command line if len(os.Args) >= 2 { switch os.Args[1] { - case "tendermint", "tm": - return (&tmCmd{}).Execute(nil) + case "tendermint", "tm", "cometbft": + return (&cometbftCmd{}).Execute(nil) case "wallet": return (&walletCmd{}).Execute(nil) case "datanode": @@ -73,6 +73,7 @@ func Main(ctx context.Context) error { Watch, Tm, Tendermint, + CometBFT, Query, Bridge, paths.Paths, diff --git a/cmd/vega/commands/tm.go b/cmd/vega/commands/tm.go deleted file mode 100644 index 97104a7e80..0000000000 --- a/cmd/vega/commands/tm.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (C) 2023 Gobalsky Labs Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package commands - -import ( - "context" - "os" - "path/filepath" - - "github.com/jessevdk/go-flags" - tmcmd "github.com/tendermint/tendermint/cmd/cometbft/commands" - tmdebug "github.com/tendermint/tendermint/cmd/cometbft/commands/debug" - tmcfg "github.com/tendermint/tendermint/config" - tmcli "github.com/tendermint/tendermint/libs/cli" -) - -func Tm(_ context.Context, parser *flags.Parser) error { - _, err := parser.AddCommand( - "tm", - "deprecated, see vega tendermint instead", - "deprecated, see vega tendermint instead", - &tmCmd{}, - ) - - return err -} - -func Tendermint(_ context.Context, parser *flags.Parser) error { - _, err := parser.AddCommand( - "tendermint", - "Run tendermint commands", - "Run tendermint commands", - &tmCmd{}, - ) - - return err -} - -type tmCmd struct{} - -func (opts *tmCmd) Execute(_ []string) error { - os.Args = os.Args[1:] - rootCmd := tmcmd.RootCmd - rootCmd.AddCommand( - tmcmd.GenValidatorCmd, - tmcmd.InitFilesCmd, - tmcmd.ProbeUpnpCmd, - tmcmd.LightCmd, - tmcmd.ReplayCmd, - tmcmd.ReplayConsoleCmd, - tmcmd.ResetAllCmd, - tmcmd.ResetPrivValidatorCmd, - tmcmd.ResetStateCmd, - tmcmd.ShowValidatorCmd, - tmcmd.TestnetFilesCmd, - tmcmd.ShowNodeIDCmd, - tmcmd.GenNodeKeyCmd, - tmcmd.VersionCmd, - tmcmd.RollbackStateCmd, - tmcmd.CompactGoLevelDBCmd, - tmdebug.DebugCmd, - tmcli.NewCompletionCmd(rootCmd, true), - ) - - baseCmd := tmcli.PrepareBaseCmd(rootCmd, "TM", os.ExpandEnv(filepath.Join("$HOME", tmcfg.DefaultTendermintDir))) - if err := baseCmd.Execute(); err != nil { - return err - } - - return nil -} diff --git a/cmd/vega/commands/unsafe_reset_all.go b/cmd/vega/commands/unsafe_reset_all.go index 493ce33d83..b529ca47b4 100644 --- a/cmd/vega/commands/unsafe_reset_all.go +++ b/cmd/vega/commands/unsafe_reset_all.go @@ -17,12 +17,10 @@ package commands import ( "context" - "os" - "path/filepath" + "code.vegaprotocol.io/vega/core/checkpoint" "code.vegaprotocol.io/vega/core/config" - metadatadb "code.vegaprotocol.io/vega/core/snapshot/databases/metadata" - snapshotdb "code.vegaprotocol.io/vega/core/snapshot/databases/snapshot" + snapshotdbs "code.vegaprotocol.io/vega/core/snapshot/databases" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" @@ -42,70 +40,18 @@ func (cmd *UnsafeResetAllCmd) Execute(_ []string) error { vegaPaths := paths.New(cmd.VegaHome) - clearSnapshotDatabases(vegaPaths, log) - - checkpointsPath := vegaPaths.StatePathFor(paths.CheckpointStateHome) - if err := deleteAll(log, checkpointsPath); err != nil { - log.Error("Unable to remove checkpoint state", logging.Error(err)) - } else { - log.Info("Removed checkpoint state", logging.String("path", checkpointsPath)) - } - return nil -} - -func clearSnapshotDatabases(vegaPaths paths.Paths, log *logging.Logger) { - snapshotDB, err := snapshotdb.NewLevelDBDatabase(vegaPaths) - if err != nil { - log.Error("Could not initialize the local snapshot database", logging.Error(err)) - log.Error("Skipping clear up of the local snapshot database") + if err := snapshotdbs.RemoveAll(vegaPaths); err != nil { + log.Error("Could not remove local snapshots databases", logging.Error(err)) + log.Error("Skipping removal of the local snapshots") } else { - defer func() { - if err := snapshotDB.Close(); err != nil { - log.Warn("Could not close the local snapshot database cleanly", logging.Error(err)) - } - }() - if err := snapshotDB.Clear(); err != nil { - log.Error("Could not clear up the local snapshot database", logging.Error(err)) - } else { - log.Info("Removed local snapshots") - } + log.Info("Local snapshots have been removed") } - metadataDB, err := metadatadb.NewLevelDBDatabase(vegaPaths) - if err != nil { - log.Error("Could not initialize the local snapshot metadata database adapter", logging.Error(err)) - log.Error("Skipping clear up of the local snapshot metadata database") - return + if err := checkpoint.RemoveAll(vegaPaths); err != nil { + log.Error("Could not remove local checkpoints", logging.Error(err)) + log.Error("Skipping removal of the local checkpoints") } else { - defer func() { - if err := metadataDB.Close(); err != nil { - log.Warn("Could not close the local snapshot metadata database cleanly", logging.Error(err)) - } - }() - if err := metadataDB.Clear(); err != nil { - log.Error("Could not clear the local snapshot metadata database", logging.Error(err)) - } else { - log.Info("Removed local snapshot metadata") - } - } -} - -func deleteAll(log *logging.Logger, dir string) error { - d, err := os.Open(dir) - if err != nil { - return err - } - files, err := d.Readdir(0) - if err != nil { - return err - } - - for _, f := range files { - filePath := filepath.Join(dir, f.Name()) - if err := os.RemoveAll(filePath); err != nil { - return err - } - log.Info("Removed file", logging.String("path", filePath)) + log.Info("Local checkpoints have been removed") } return nil @@ -113,7 +59,7 @@ func deleteAll(log *logging.Logger, dir string) error { var unsafeResetCmd UnsafeResetAllCmd -func UnsafeResetAll(ctx context.Context, parser *flags.Parser) error { +func UnsafeResetAll(_ context.Context, parser *flags.Parser) error { unsafeResetCmd = UnsafeResetAllCmd{} _, err := parser.AddCommand("unsafe_reset_all", "(unsafe) Remove all application state", "(unsafe) Remove all vega application state (checkpoints and snapshots)", &unsafeResetCmd) diff --git a/cmd/vega/commands/verify/genesis.go b/cmd/vega/commands/verify/genesis.go index 52f9caf7c9..5f58f6a852 100644 --- a/cmd/vega/commands/verify/genesis.go +++ b/cmd/vega/commands/verify/genesis.go @@ -124,30 +124,30 @@ func verifyValidators(r *reporter, validators map[string]validator) { return } - for tmkey, v := range validators { + for key, v := range validators { switch { - case len(tmkey) <= 0: + case len(key) <= 0: r.Err("app_state.validators contains an empty key") - case !isValidTMKey(tmkey): - r.Err("app_state.validators contains an invalid TM public key, `%v`", tmkey) - case tmkey != v.TMPubKey: - r.Err("app_state.validator[%v] hash mismatched TM pub key, `%v`", tmkey, v.TMPubKey) + case !isValidCometBFTKey(key): + r.Err("app_state.validators contains an invalid CometBFT public key, `%v`", key) + case key != v.TMPubKey: + r.Err("app_state.validator[%v] hash mismatched CometBFT public key, `%v`", key, v.TMPubKey) } if !isValidParty(v.ID) { - r.Err("app_state.validators[%v] has an invalid id, `%v`", tmkey, v.ID) + r.Err("app_state.validators[%v] has an invalid id, `%v`", key, v.ID) } if !isValidParty(v.VegaPubKey) { - r.Err("app_state.validators[%v] has an invalid vega public key, `%v`", tmkey, v.VegaPubKey) + r.Err("app_state.validators[%v] has an invalid vega public key, `%v`", key, v.VegaPubKey) } if v.VegaPubKeyIndex == 0 { - r.Err("app_state.validators[%v] has an invalid vega public key index, `%v`", tmkey, v.VegaPubKeyIndex) + r.Err("app_state.validators[%v] has an invalid vega public key index, `%v`", key, v.VegaPubKeyIndex) } if !isValidEthereumAddress(v.EthereumAddress) { - r.Err("app_state.validators[%v] has an invalid ethereum address, `%v`", tmkey, v.EthereumAddress) + r.Err("app_state.validators[%v] has an invalid ethereum address, `%v`", key, v.EthereumAddress) } } } diff --git a/cmd/vega/commands/verify/genesis_test.go b/cmd/vega/commands/verify/genesis_test.go index b1b7291f8d..d8f9b77a35 100644 --- a/cmd/vega/commands/verify/genesis_test.go +++ b/cmd/vega/commands/verify/genesis_test.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/core/genesis" "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/validators" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vega/commands/verify/verifier.go b/cmd/vega/commands/verify/verifier.go index c6c8c2b471..1aec83f2c3 100644 --- a/cmd/vega/commands/verify/verifier.go +++ b/cmd/vega/commands/verify/verifier.go @@ -103,7 +103,7 @@ func isValidParty(party string) bool { return err == nil } -func isValidTMKey(key string) bool { +func isValidCometBFTKey(key string) bool { keybytes, err := base64.StdEncoding.DecodeString(key) if err != nil { return false diff --git a/cmd/vega/commands/wallet.go b/cmd/vega/commands/wallet.go index f894b0e32e..330f1d3f7a 100644 --- a/cmd/vega/commands/wallet.go +++ b/cmd/vega/commands/wallet.go @@ -20,6 +20,7 @@ import ( "os" cmd "code.vegaprotocol.io/vega/cmd/vegawallet/commands" + "github.com/jessevdk/go-flags" ) diff --git a/cmd/vega/commands/watch.go b/cmd/vega/commands/watch.go index 39a1b456ff..9727ff07af 100644 --- a/cmd/vega/commands/watch.go +++ b/cmd/vega/commands/watch.go @@ -22,8 +22,9 @@ import ( "fmt" "code.vegaprotocol.io/vega/core/blockchain/abci" + + tmctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/jessevdk/go-flags" - tmctypes "github.com/tendermint/tendermint/rpc/core/types" ) type watch struct { diff --git a/cmd/vegatools/checktx.go b/cmd/vegatools/checktx.go index 58d56fa2ec..b0b4f01345 100644 --- a/cmd/vegatools/checktx.go +++ b/cmd/vegatools/checktx.go @@ -18,11 +18,10 @@ package tools import ( "fmt" + "code.vegaprotocol.io/vega/core/config" "code.vegaprotocol.io/vega/vegatools/checktx" "github.com/sirupsen/logrus" - - "code.vegaprotocol.io/vega/core/config" ) type checkTxCmd struct { diff --git a/cmd/vegatools/snapshot.go b/cmd/vegatools/snapshot.go index 0181d5aa79..01c194b687 100644 --- a/cmd/vegatools/snapshot.go +++ b/cmd/vegatools/snapshot.go @@ -24,10 +24,9 @@ import ( "code.vegaprotocol.io/vega/paths" "code.vegaprotocol.io/vega/vegatools/snapshotdb" + tmconfig "github.com/cometbft/cometbft/config" + "github.com/cometbft/cometbft/store" "github.com/spf13/viper" - tmconfig "github.com/tendermint/tendermint/config" - "github.com/tendermint/tendermint/node" - "github.com/tendermint/tendermint/store" ) type snapshotCmd struct { @@ -35,6 +34,7 @@ type snapshotCmd struct { DBPath string `description:"path to snapshot state data" long:"db-path" short:"d"` SnapshotContentsPath string `description:"path to file where to write the content of a snapshot" long:"snapshot-contents" short:"c"` BlockHeight uint64 `description:"block-height of requested snapshot" long:"block-height" short:"b"` + SetProtocolUpgrade bool `description:"set protocol-upgrade flag to true in the latest snapshot" long:"set-pup" short:"p"` TendermintHome string `description:"tendermint home directory, if set will print the last processed block height" long:"tendermint-home"` } @@ -46,7 +46,7 @@ func getLastProcessedBlock(homeDir string) (int64, error) { conf.SetRoot(homeDir) // lets get the last processed block from tendermint - blockStoreDB, err := node.DefaultDBProvider(&node.DBContext{ID: "blockstore", Config: conf}) + blockStoreDB, err := tmconfig.DefaultDBProvider(&tmconfig.DBContext{ID: "blockstore", Config: conf}) if err != nil { return 0, err } @@ -65,6 +65,11 @@ func (opts *snapshotCmd) Execute(_ []string) error { db = vegaPaths.StatePathFor(paths.SnapshotStateHome) } + if opts.SetProtocolUpgrade { + err := snapshotdb.SetProtocolUpgrade(paths.New(rootCmd.VegaHome)) + return err + } + if opts.SnapshotContentsPath != "" { fmt.Printf("finding payloads for block-height %d...\n", opts.BlockHeight) err := snapshotdb.SavePayloadsToFile(db, opts.SnapshotContentsPath, opts.BlockHeight) diff --git a/cmd/vegawallet/commands/api_token.go b/cmd/vegawallet/commands/api_token.go index 12a3279014..12613770ae 100644 --- a/cmd/vegawallet/commands/api_token.go +++ b/cmd/vegawallet/commands/api_token.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/cli" "code.vegaprotocol.io/vega/paths" tokenStoreV1 "code.vegaprotocol.io/vega/wallet/service/v2/connections/store/longliving/v1" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/api_token_delete.go b/cmd/vegawallet/commands/api_token_delete.go index 627b29ae80..3b06b484e3 100644 --- a/cmd/vegawallet/commands/api_token_delete.go +++ b/cmd/vegawallet/commands/api_token_delete.go @@ -27,6 +27,7 @@ import ( "code.vegaprotocol.io/vega/paths" "code.vegaprotocol.io/vega/wallet/service/v2/connections" tokenStoreV1 "code.vegaprotocol.io/vega/wallet/service/v2/connections/store/longliving/v1" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/api_token_delete_test.go b/cmd/vegawallet/commands/api_token_delete_test.go index 735e4fbda2..85b36daa26 100644 --- a/cmd/vegawallet/commands/api_token_delete_test.go +++ b/cmd/vegawallet/commands/api_token_delete_test.go @@ -21,6 +21,7 @@ import ( cmd "code.vegaprotocol.io/vega/cmd/vegawallet/commands" "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/api_token_describe.go b/cmd/vegawallet/commands/api_token_describe.go index 70230d4ed8..0e3f0d3f45 100644 --- a/cmd/vegawallet/commands/api_token_describe.go +++ b/cmd/vegawallet/commands/api_token_describe.go @@ -27,6 +27,7 @@ import ( "code.vegaprotocol.io/vega/paths" "code.vegaprotocol.io/vega/wallet/service/v2/connections" tokenStoreV1 "code.vegaprotocol.io/vega/wallet/service/v2/connections/store/longliving/v1" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/api_token_describe_test.go b/cmd/vegawallet/commands/api_token_describe_test.go index fc3085d9d3..40cb7c8252 100644 --- a/cmd/vegawallet/commands/api_token_describe_test.go +++ b/cmd/vegawallet/commands/api_token_describe_test.go @@ -21,6 +21,7 @@ import ( cmd "code.vegaprotocol.io/vega/cmd/vegawallet/commands" "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/api_token_generate.go b/cmd/vegawallet/commands/api_token_generate.go index cc29a06a6a..8fa0af1644 100644 --- a/cmd/vegawallet/commands/api_token_generate.go +++ b/cmd/vegawallet/commands/api_token_generate.go @@ -30,6 +30,7 @@ import ( "code.vegaprotocol.io/vega/wallet/service/v2/connections" tokenStoreV1 "code.vegaprotocol.io/vega/wallet/service/v2/connections/store/longliving/v1" "code.vegaprotocol.io/vega/wallet/wallets" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/api_token_generate_test.go b/cmd/vegawallet/commands/api_token_generate_test.go index 44a3aa4215..2108d20c26 100644 --- a/cmd/vegawallet/commands/api_token_generate_test.go +++ b/cmd/vegawallet/commands/api_token_generate_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/service/v2/connections" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/api_token_init.go b/cmd/vegawallet/commands/api_token_init.go index 83065386a9..ec100ca9b8 100644 --- a/cmd/vegawallet/commands/api_token_init.go +++ b/cmd/vegawallet/commands/api_token_init.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/printer" "code.vegaprotocol.io/vega/paths" tokenStoreV1 "code.vegaprotocol.io/vega/wallet/service/v2/connections/store/longliving/v1" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/api_token_init_test.go b/cmd/vegawallet/commands/api_token_init_test.go index 4eb666ffe9..edeca1cbec 100644 --- a/cmd/vegawallet/commands/api_token_init_test.go +++ b/cmd/vegawallet/commands/api_token_init_test.go @@ -19,6 +19,7 @@ import ( "testing" cmd "code.vegaprotocol.io/vega/cmd/vegawallet/commands" + "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/api_token_list.go b/cmd/vegawallet/commands/api_token_list.go index 677ab6e874..200b1c580b 100644 --- a/cmd/vegawallet/commands/api_token_list.go +++ b/cmd/vegawallet/commands/api_token_list.go @@ -27,6 +27,7 @@ import ( "code.vegaprotocol.io/vega/paths" "code.vegaprotocol.io/vega/wallet/service/v2/connections" tokenStoreV1 "code.vegaprotocol.io/vega/wallet/service/v2/connections/store/longliving/v1" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/api_token_list_test.go b/cmd/vegawallet/commands/api_token_list_test.go index ab4925e9fa..caeda78462 100644 --- a/cmd/vegawallet/commands/api_token_list_test.go +++ b/cmd/vegawallet/commands/api_token_list_test.go @@ -19,6 +19,7 @@ import ( "testing" cmd "code.vegaprotocol.io/vega/cmd/vegawallet/commands" + "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/cmd.go b/cmd/vegawallet/commands/cmd.go index 3c8db4a3bd..6d5042396e 100644 --- a/cmd/vegawallet/commands/cmd.go +++ b/cmd/vegawallet/commands/cmd.go @@ -31,6 +31,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" netstore "code.vegaprotocol.io/vega/wallet/network/store/v1" "code.vegaprotocol.io/vega/wallet/wallets" + "github.com/spf13/cobra" "go.uber.org/zap" ) diff --git a/cmd/vegawallet/commands/disclaimer.go b/cmd/vegawallet/commands/disclaimer.go index 8c933923b7..7ee70c6ca3 100644 --- a/cmd/vegawallet/commands/disclaimer.go +++ b/cmd/vegawallet/commands/disclaimer.go @@ -20,6 +20,7 @@ import ( "io" "code.vegaprotocol.io/vega/cmd/vegawallet/commands/cli" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/flags/passphrase.go b/cmd/vegawallet/commands/flags/passphrase.go index 1a6dc1fa08..7c88c26526 100644 --- a/cmd/vegawallet/commands/flags/passphrase.go +++ b/cmd/vegawallet/commands/flags/passphrase.go @@ -23,6 +23,7 @@ import ( vgfs "code.vegaprotocol.io/vega/libs/fs" vgterm "code.vegaprotocol.io/vega/libs/term" + "golang.org/x/term" ) diff --git a/cmd/vegawallet/commands/helpers_for_test.go b/cmd/vegawallet/commands/helpers_for_test.go index 6c0e69f8a8..78df02af34 100644 --- a/cmd/vegawallet/commands/helpers_for_test.go +++ b/cmd/vegawallet/commands/helpers_for_test.go @@ -22,6 +22,7 @@ import ( vgfs "code.vegaprotocol.io/vega/libs/fs" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" ) diff --git a/cmd/vegawallet/commands/init_test.go b/cmd/vegawallet/commands/init_test.go index 845f405929..5d50b481b1 100644 --- a/cmd/vegawallet/commands/init_test.go +++ b/cmd/vegawallet/commands/init_test.go @@ -19,6 +19,7 @@ import ( "testing" cmd "code.vegaprotocol.io/vega/cmd/vegawallet/commands" + "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/key.go b/cmd/vegawallet/commands/key.go index 05dc610949..99b156b651 100644 --- a/cmd/vegawallet/commands/key.go +++ b/cmd/vegawallet/commands/key.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/printer" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/key_annotate_test.go b/cmd/vegawallet/commands/key_annotate_test.go index 72311364af..5a061c2dc5 100644 --- a/cmd/vegawallet/commands/key_annotate_test.go +++ b/cmd/vegawallet/commands/key_annotate_test.go @@ -23,6 +23,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/key_describe_test.go b/cmd/vegawallet/commands/key_describe_test.go index 65863a0788..90c17daf64 100644 --- a/cmd/vegawallet/commands/key_describe_test.go +++ b/cmd/vegawallet/commands/key_describe_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/key_generate_test.go b/cmd/vegawallet/commands/key_generate_test.go index 2a6181cb82..bdefdeab1e 100644 --- a/cmd/vegawallet/commands/key_generate_test.go +++ b/cmd/vegawallet/commands/key_generate_test.go @@ -23,6 +23,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/key_isolate_test.go b/cmd/vegawallet/commands/key_isolate_test.go index 76e98d248f..59829c08ef 100644 --- a/cmd/vegawallet/commands/key_isolate_test.go +++ b/cmd/vegawallet/commands/key_isolate_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/key_list_test.go b/cmd/vegawallet/commands/key_list_test.go index 34ac26b152..57eaa9b4a6 100644 --- a/cmd/vegawallet/commands/key_list_test.go +++ b/cmd/vegawallet/commands/key_list_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/key_rotate_test.go b/cmd/vegawallet/commands/key_rotate_test.go index 3af341544a..38be35d7d5 100644 --- a/cmd/vegawallet/commands/key_rotate_test.go +++ b/cmd/vegawallet/commands/key_rotate_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/key_taint_test.go b/cmd/vegawallet/commands/key_taint_test.go index 0f9b7a8100..80a1ced351 100644 --- a/cmd/vegawallet/commands/key_taint_test.go +++ b/cmd/vegawallet/commands/key_taint_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/key_untaint_test.go b/cmd/vegawallet/commands/key_untaint_test.go index 925f422704..87fc8cef23 100644 --- a/cmd/vegawallet/commands/key_untaint_test.go +++ b/cmd/vegawallet/commands/key_untaint_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/message_sign_test.go b/cmd/vegawallet/commands/message_sign_test.go index a92d793f90..4ae4f853df 100644 --- a/cmd/vegawallet/commands/message_sign_test.go +++ b/cmd/vegawallet/commands/message_sign_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/message_verify_test.go b/cmd/vegawallet/commands/message_verify_test.go index 66599e2322..94385ae79d 100644 --- a/cmd/vegawallet/commands/message_verify_test.go +++ b/cmd/vegawallet/commands/message_verify_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/network_delete_test.go b/cmd/vegawallet/commands/network_delete_test.go index 8a3dc82aff..67f27cc427 100644 --- a/cmd/vegawallet/commands/network_delete_test.go +++ b/cmd/vegawallet/commands/network_delete_test.go @@ -21,6 +21,7 @@ import ( cmd "code.vegaprotocol.io/vega/cmd/vegawallet/commands" "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/network_describe_test.go b/cmd/vegawallet/commands/network_describe_test.go index b33feaf4f2..41b4de90b1 100644 --- a/cmd/vegawallet/commands/network_describe_test.go +++ b/cmd/vegawallet/commands/network_describe_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/network_import_test.go b/cmd/vegawallet/commands/network_import_test.go index 806f8491a7..51350f4e54 100644 --- a/cmd/vegawallet/commands/network_import_test.go +++ b/cmd/vegawallet/commands/network_import_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/network_rename_test.go b/cmd/vegawallet/commands/network_rename_test.go index e9f8265f75..4e1669c016 100644 --- a/cmd/vegawallet/commands/network_rename_test.go +++ b/cmd/vegawallet/commands/network_rename_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/passphrase_update_test.go b/cmd/vegawallet/commands/passphrase_update_test.go index cd37c1cd65..1d10fd27cb 100644 --- a/cmd/vegawallet/commands/passphrase_update_test.go +++ b/cmd/vegawallet/commands/passphrase_update_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/permissions_describe_test.go b/cmd/vegawallet/commands/permissions_describe_test.go index 2801f77be6..7bd24f7706 100644 --- a/cmd/vegawallet/commands/permissions_describe_test.go +++ b/cmd/vegawallet/commands/permissions_describe_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/permissions_purge_test.go b/cmd/vegawallet/commands/permissions_purge_test.go index 47f54f4faf..3ae63b0792 100644 --- a/cmd/vegawallet/commands/permissions_purge_test.go +++ b/cmd/vegawallet/commands/permissions_purge_test.go @@ -21,6 +21,7 @@ import ( cmd "code.vegaprotocol.io/vega/cmd/vegawallet/commands" "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/permissions_revoke_test.go b/cmd/vegawallet/commands/permissions_revoke_test.go index 7cd4f1a2c4..c8c94cfb96 100644 --- a/cmd/vegawallet/commands/permissions_revoke_test.go +++ b/cmd/vegawallet/commands/permissions_revoke_test.go @@ -21,6 +21,7 @@ import ( cmd "code.vegaprotocol.io/vega/cmd/vegawallet/commands" "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/raw_transaction_send.go b/cmd/vegawallet/commands/raw_transaction_send.go index f03f8c7b8d..ec2a0946a8 100644 --- a/cmd/vegawallet/commands/raw_transaction_send.go +++ b/cmd/vegawallet/commands/raw_transaction_send.go @@ -32,8 +32,8 @@ import ( "code.vegaprotocol.io/vega/wallet/api" walletnode "code.vegaprotocol.io/vega/wallet/api/node" networkStore "code.vegaprotocol.io/vega/wallet/network/store/v1" - "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/proto" "github.com/spf13/cobra" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/cmd/vegawallet/commands/raw_transaction_send_test.go b/cmd/vegawallet/commands/raw_transaction_send_test.go index 4e64b76dec..9cb3c1a7ed 100644 --- a/cmd/vegawallet/commands/raw_transaction_send_test.go +++ b/cmd/vegawallet/commands/raw_transaction_send_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/root.go b/cmd/vegawallet/commands/root.go index 676feb57fa..4037f8938b 100644 --- a/cmd/vegawallet/commands/root.go +++ b/cmd/vegawallet/commands/root.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/cli" "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/service_endpoints.go b/cmd/vegawallet/commands/service_endpoints.go index 0b10ec506a..6a66f29f23 100644 --- a/cmd/vegawallet/commands/service_endpoints.go +++ b/cmd/vegawallet/commands/service_endpoints.go @@ -22,11 +22,11 @@ import ( "text/template" "code.vegaprotocol.io/vega/cmd/vegawallet/commands/cli" - svcStoreV1 "code.vegaprotocol.io/vega/wallet/service/store/v1" - "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" "code.vegaprotocol.io/vega/cmd/vegawallet/commands/printer" "code.vegaprotocol.io/vega/paths" + svcStoreV1 "code.vegaprotocol.io/vega/wallet/service/store/v1" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/service_run.go b/cmd/vegawallet/commands/service_run.go index 63b144a672..32597b393d 100644 --- a/cmd/vegawallet/commands/service_run.go +++ b/cmd/vegawallet/commands/service_run.go @@ -49,12 +49,12 @@ import ( sessionStoreV1 "code.vegaprotocol.io/vega/wallet/service/v2/connections/store/session/v1" "code.vegaprotocol.io/vega/wallet/version" "code.vegaprotocol.io/vega/wallet/wallets" + "github.com/golang/protobuf/jsonpb" "github.com/muesli/cancelreader" - "golang.org/x/term" - "github.com/spf13/cobra" "go.uber.org/zap" + "golang.org/x/term" ) const MaxConsentRequests = 100 diff --git a/cmd/vegawallet/commands/service_run_test.go b/cmd/vegawallet/commands/service_run_test.go index db377f6049..edfe390c1a 100644 --- a/cmd/vegawallet/commands/service_run_test.go +++ b/cmd/vegawallet/commands/service_run_test.go @@ -21,6 +21,7 @@ import ( cmd "code.vegaprotocol.io/vega/cmd/vegawallet/commands" "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" ) diff --git a/cmd/vegawallet/commands/session.go b/cmd/vegawallet/commands/session.go index e42fde6512..ab9cc58bf5 100644 --- a/cmd/vegawallet/commands/session.go +++ b/cmd/vegawallet/commands/session.go @@ -19,6 +19,7 @@ import ( "io" "code.vegaprotocol.io/vega/cmd/vegawallet/commands/cli" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/session_list.go b/cmd/vegawallet/commands/session_list.go index 94bd27242e..3bcf50a08f 100644 --- a/cmd/vegawallet/commands/session_list.go +++ b/cmd/vegawallet/commands/session_list.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/paths" "code.vegaprotocol.io/vega/wallet/service/v2/connections" sessionStoreV1 "code.vegaprotocol.io/vega/wallet/service/v2/connections/store/session/v1" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/software_compatibility.go b/cmd/vegawallet/commands/software_compatibility.go index ad931b37b6..563024177a 100644 --- a/cmd/vegawallet/commands/software_compatibility.go +++ b/cmd/vegawallet/commands/software_compatibility.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/paths" netv1 "code.vegaprotocol.io/vega/wallet/network/store/v1" wversion "code.vegaprotocol.io/vega/wallet/version" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/software_version.go b/cmd/vegawallet/commands/software_version.go index a3b3dcf93a..58758e43ad 100644 --- a/cmd/vegawallet/commands/software_version.go +++ b/cmd/vegawallet/commands/software_version.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/printer" coreversion "code.vegaprotocol.io/vega/version" wversion "code.vegaprotocol.io/vega/wallet/version" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/transaction_check.go b/cmd/vegawallet/commands/transaction_check.go index 68961c883c..aa1aa03d86 100644 --- a/cmd/vegawallet/commands/transaction_check.go +++ b/cmd/vegawallet/commands/transaction_check.go @@ -34,6 +34,7 @@ import ( networkStore "code.vegaprotocol.io/vega/wallet/network/store/v1" "code.vegaprotocol.io/vega/wallet/version" "code.vegaprotocol.io/vega/wallet/wallets" + "github.com/spf13/cobra" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/cmd/vegawallet/commands/transaction_check_test.go b/cmd/vegawallet/commands/transaction_check_test.go index 5b3046510a..95c790c3dc 100644 --- a/cmd/vegawallet/commands/transaction_check_test.go +++ b/cmd/vegawallet/commands/transaction_check_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/transaction_send_test.go b/cmd/vegawallet/commands/transaction_send_test.go index 5c8333bb8c..e35f66fa5d 100644 --- a/cmd/vegawallet/commands/transaction_send_test.go +++ b/cmd/vegawallet/commands/transaction_send_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/transaction_sign_test.go b/cmd/vegawallet/commands/transaction_sign_test.go index 0c7776ea00..4ac8d3fd58 100644 --- a/cmd/vegawallet/commands/transaction_sign_test.go +++ b/cmd/vegawallet/commands/transaction_sign_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/wallet_create_test.go b/cmd/vegawallet/commands/wallet_create_test.go index a8ec4598e3..574f60a3a0 100644 --- a/cmd/vegawallet/commands/wallet_create_test.go +++ b/cmd/vegawallet/commands/wallet_create_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/wallet_delete_test.go b/cmd/vegawallet/commands/wallet_delete_test.go index 69bea11ab5..0878577c69 100644 --- a/cmd/vegawallet/commands/wallet_delete_test.go +++ b/cmd/vegawallet/commands/wallet_delete_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/wallet_describe_test.go b/cmd/vegawallet/commands/wallet_describe_test.go index 3c7888bc58..55283d3cb0 100644 --- a/cmd/vegawallet/commands/wallet_describe_test.go +++ b/cmd/vegawallet/commands/wallet_describe_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/wallet_import.go b/cmd/vegawallet/commands/wallet_import.go index ae64f5614f..b30da32ee6 100644 --- a/cmd/vegawallet/commands/wallet_import.go +++ b/cmd/vegawallet/commands/wallet_import.go @@ -32,6 +32,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/wallet" "code.vegaprotocol.io/vega/wallet/wallets" + "github.com/spf13/cobra" ) diff --git a/cmd/vegawallet/commands/wallet_import_test.go b/cmd/vegawallet/commands/wallet_import_test.go index eb5cba05f5..6b7117c33f 100644 --- a/cmd/vegawallet/commands/wallet_import_test.go +++ b/cmd/vegawallet/commands/wallet_import_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/vegawallet/commands/wallet_rename_test.go b/cmd/vegawallet/commands/wallet_rename_test.go index cd81fc66c3..d297afdb7d 100644 --- a/cmd/vegawallet/commands/wallet_rename_test.go +++ b/cmd/vegawallet/commands/wallet_rename_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/cmd/visor/init.go b/cmd/visor/init.go index aa28b6c3ec..3f9c8f88ae 100644 --- a/cmd/visor/init.go +++ b/cmd/visor/init.go @@ -18,6 +18,7 @@ package main import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/visor" + "github.com/spf13/cobra" ) diff --git a/cmd/visor/main.go b/cmd/visor/main.go index 662cd638c3..d2fdfeff97 100644 --- a/cmd/visor/main.go +++ b/cmd/visor/main.go @@ -23,8 +23,9 @@ import ( ) var rootCmd = &cobra.Command{ - Use: "vegavisor", - Short: "A process manager for Vega binaries.", + Use: "vegavisor", + Short: "A process manager for Vega binaries.", + SilenceUsage: true, } func main() { diff --git a/cmd/visor/run.go b/cmd/visor/run.go index a425cc4085..54bd0dfb46 100644 --- a/cmd/visor/run.go +++ b/cmd/visor/run.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/visor" "code.vegaprotocol.io/vega/visor/client" + "github.com/spf13/cobra" ) @@ -45,7 +46,7 @@ var runCmd = &cobra.Command{ log := logging.NewDevLogger() - runner, err := visor.NewVisor(cmd.Context(), log, client.NewClientFactory(log), homePath) + runner, err := visor.NewVisor(cmd.Context(), log, client.NewClientFactory(), homePath) if err != nil { return fmt.Errorf("failed to create new runner: %w", err) } diff --git a/cmd/visor/version.go b/cmd/visor/version.go index 267b73a146..12804948c6 100644 --- a/cmd/visor/version.go +++ b/cmd/visor/version.go @@ -18,10 +18,10 @@ package main import ( "fmt" - "github.com/spf13/cobra" - vgjson "code.vegaprotocol.io/vega/libs/json" "code.vegaprotocol.io/vega/version" + + "github.com/spf13/cobra" ) const ( diff --git a/commands/announce_node.go b/commands/announce_node.go index 13f9275793..8f1af4ebb4 100644 --- a/commands/announce_node.go +++ b/commands/announce_node.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/announce_node_test.go b/commands/announce_node_test.go index 1d3c186eba..3fae3293a3 100644 --- a/commands/announce_node_test.go +++ b/commands/announce_node_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/commands" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) diff --git a/commands/apply_referral_code.go b/commands/apply_referral_code.go index b49417af28..a63b2a7e7b 100644 --- a/commands/apply_referral_code.go +++ b/commands/apply_referral_code.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -25,11 +25,11 @@ func checkApplyReferralCode(cmd *commandspb.ApplyReferralCode) Errors { errs := NewErrors() if cmd == nil { - return errs.FinalAddForProperty("join_team", ErrIsRequired) + return errs.FinalAddForProperty("apply_referral_code", ErrIsRequired) } if !IsVegaID(cmd.Id) { - errs.AddForProperty("join_team.team_id", ErrShouldBeAValidVegaID) + errs.AddForProperty("apply_referral_code.id", ErrShouldBeAValidVegaID) } return errs diff --git a/commands/apply_referral_code_test.go b/commands/apply_referral_code_test.go index 61fe836e28..494af54bf1 100644 --- a/commands/apply_referral_code_test.go +++ b/commands/apply_referral_code_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -22,15 +22,16 @@ import ( "code.vegaprotocol.io/vega/commands" vgtest "code.vegaprotocol.io/vega/libs/test" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) func TestApplyReferralCode(t *testing.T) { - t.Run("Joining team succeeds", testJoiningTeamSucceeds) - t.Run("Joining team with team ID fails", testApplyReferralCodeWithoutTeamIDFails) + t.Run("Applying referral code succeeds", testApplyReferralCodeSucceeds) + t.Run("Applying referral code with team ID fails", testApplyReferralCodeWithoutTeamIDFails) } -func testJoiningTeamSucceeds(t *testing.T) { +func testApplyReferralCodeSucceeds(t *testing.T) { err := checkApplyReferralCode(t, &commandspb.ApplyReferralCode{ Id: vgtest.RandomVegaID(), }) @@ -43,7 +44,7 @@ func testApplyReferralCodeWithoutTeamIDFails(t *testing.T) { Id: "", }) - assert.Contains(t, err.Get("join_team.team_id"), commands.ErrShouldBeAValidVegaID) + assert.Contains(t, err.Get("apply_referral_code.id"), commands.ErrShouldBeAValidVegaID) } func checkApplyReferralCode(t *testing.T, cmd *commandspb.ApplyReferralCode) commands.Errors { diff --git a/commands/batch_market_instructions.go b/commands/batch_market_instructions.go index ebc53e55a1..422a1b1b04 100644 --- a/commands/batch_market_instructions.go +++ b/commands/batch_market_instructions.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -36,7 +36,8 @@ func checkBatchMarketInstructions(cmd *commandspb.BatchMarketInstructions) Error len(cmd.Amendments)+ len(cmd.Submissions)+ len(cmd.StopOrdersSubmission)+ - len(cmd.StopOrdersCancellation) == 0 { + len(cmd.StopOrdersCancellation)+ + len(cmd.UpdateMarginMode) == 0 { return errs.FinalAddForProperty("batch_market_instructions", ErrEmptyBatchMarketInstructions) } diff --git a/commands/batch_proposal_submission.go b/commands/batch_proposal_submission.go new file mode 100644 index 0000000000..4415d1a510 --- /dev/null +++ b/commands/batch_proposal_submission.go @@ -0,0 +1,285 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package commands + +import ( + "errors" + "strings" + + protoTypes "code.vegaprotocol.io/vega/protos/vega" + vegapb "code.vegaprotocol.io/vega/protos/vega" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" +) + +func CheckBatchProposalSubmission(cmd *commandspb.BatchProposalSubmission) error { + return checkBatchProposalSubmission(cmd).ErrorOrNil() +} + +func checkBatchProposalSubmission(cmd *commandspb.BatchProposalSubmission) Errors { + errs := NewErrors() + + if cmd == nil { + return errs.FinalAddForProperty("batch_proposal_submission", ErrIsRequired) + } + + if len(cmd.Reference) > ReferenceMaxLen { + errs.AddForProperty("batch_proposal_submission.reference", ErrReferenceTooLong) + } + + if cmd.Rationale == nil { + errs.AddForProperty("batch_proposal_submission.rationale", ErrIsRequired) + } else { + if cmd.Rationale != nil { + if len(strings.Trim(cmd.Rationale.Description, " \n\r\t")) == 0 { + errs.AddForProperty("batch_proposal_submission.rationale.description", ErrIsRequired) + } else if len(cmd.Rationale.Description) > 20000 { + errs.AddForProperty("batch_proposal_submission.rationale.description", ErrMustNotExceed20000Chars) + } + if len(strings.Trim(cmd.Rationale.Title, " \n\r\t")) == 0 { + errs.AddForProperty("batch_proposal_submission.rationale.title", ErrIsRequired) + } else if len(cmd.Rationale.Title) > 100 { + errs.AddForProperty("batch_proposal_submission.rationale.title", ErrMustBeLessThan100Chars) + } + } + } + + if cmd.Terms == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms", ErrIsRequired) + } + + if len(cmd.Terms.Changes) == 0 { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes", ErrIsRequired) + } + + if len(cmd.Terms.Changes) > 250 { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes", ErrMustBeAtMost250) + } + + if cmd.Terms.ClosingTimestamp <= 0 { + errs.AddForProperty("batch_proposal_submission.terms.closing_timestamp", ErrMustBePositive) + } + + for _, batchChange := range cmd.Terms.Changes { + // check for enactment timestamp + switch batchChange.Change.(type) { + case *protoTypes.BatchProposalTermsChange_NewFreeform: + if batchChange.EnactmentTimestamp != 0 { + errs.AddForProperty("batch_proposal_submission.terms.enactment_timestamp", ErrIsNotSupported) + } + default: + if batchChange.EnactmentTimestamp <= 0 { + errs.AddForProperty("batch_proposal_submission.terms.enactment_timestamp", ErrMustBePositive) + } + + if cmd.Terms.ClosingTimestamp > batchChange.EnactmentTimestamp { + errs.AddForProperty("batch_proposal_submission.terms.closing_timestamp", + errors.New("cannot be after enactment time"), + ) + } + } + + errs.Merge(checkBatchProposalChanges(batchChange)) + } + + return errs +} + +func checkBatchProposalChanges(terms *protoTypes.BatchProposalTermsChange) Errors { + errs := NewErrors() + + if terms.Change == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes", ErrIsRequired) + } + + switch c := terms.Change.(type) { + case *protoTypes.BatchProposalTermsChange_NewMarket: + errs.Merge(checkNewMarketBatchChanges(c)) + case *protoTypes.BatchProposalTermsChange_UpdateMarket: + errs.Merge(checkUpdateMarketBatchChanges(c)) + case *protoTypes.BatchProposalTermsChange_NewSpotMarket: + errs.Merge(checkNewSpotMarketBatchChanges(c)) + case *protoTypes.BatchProposalTermsChange_UpdateSpotMarket: + errs.Merge(checkUpdateSpotMarketBatchChanges(c)) + case *protoTypes.BatchProposalTermsChange_UpdateNetworkParameter: + errs.Merge(checkNetworkParameterUpdateBatchChanges(c)) + case *protoTypes.BatchProposalTermsChange_UpdateAsset: + errs.Merge(checkUpdateAssetBatchChanges(c)) + case *protoTypes.BatchProposalTermsChange_NewFreeform: + errs.Merge(checkNewFreeformBatchChanges(c)) + case *protoTypes.BatchProposalTermsChange_NewTransfer: + errs.Merge(checkNewTransferBatchChanges(c)) + case *protoTypes.BatchProposalTermsChange_CancelTransfer: + errs.Merge(checkCancelTransferBatchChanges(c)) + case *protoTypes.BatchProposalTermsChange_UpdateMarketState: + errs.Merge(checkMarketUpdateStateBatch(c)) + case *protoTypes.BatchProposalTermsChange_UpdateReferralProgram: + errs.Merge(checkUpdateReferralProgramBatch(c, terms.EnactmentTimestamp)) + case *protoTypes.BatchProposalTermsChange_UpdateVolumeDiscountProgram: + errs.Merge(checkVolumeDiscountProgramBatch(c, terms.EnactmentTimestamp)) + default: + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes", ErrIsNotValid) + } + + return errs +} + +func checkNewMarketBatchChanges(change *protoTypes.BatchProposalTermsChange_NewMarket) Errors { + errs := NewErrors() + + if change.NewMarket == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.new_market", ErrIsRequired) + } + + if change.NewMarket.Changes == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.new_market.changes", ErrIsRequired) + } + + return checkNewMarketChangesConfiguration(change.NewMarket.Changes).AddPrefix("batch_proposal_submission.terms.changes.") +} + +func checkUpdateMarketBatchChanges(change *protoTypes.BatchProposalTermsChange_UpdateMarket) Errors { + errs := NewErrors() + + if change.UpdateMarket == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.update_market", ErrIsRequired) + } + + return checkUpdateMarket(change.UpdateMarket).AddPrefix("batch_proposal_submission.terms.changes.") +} + +func checkNewSpotMarketBatchChanges(change *protoTypes.BatchProposalTermsChange_NewSpotMarket) Errors { + errs := NewErrors() + + if change.NewSpotMarket == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.new_spot_market", ErrIsRequired) + } + + if change.NewSpotMarket.Changes == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.new_spot_market.changes", ErrIsRequired) + } + + return checkNewSpotMarketConfiguration(change.NewSpotMarket.Changes).AddPrefix("batch_proposal_submission.terms.changes.") +} + +func checkUpdateSpotMarketBatchChanges(change *protoTypes.BatchProposalTermsChange_UpdateSpotMarket) Errors { + errs := NewErrors() + + if change.UpdateSpotMarket == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.update_spot_market", ErrIsRequired) + } + + return checkUpdateSpotMarket(change.UpdateSpotMarket).AddPrefix("batch_proposal_submission.terms.changes.") +} + +func checkNetworkParameterUpdateBatchChanges(change *protoTypes.BatchProposalTermsChange_UpdateNetworkParameter) Errors { + errs := NewErrors() + + if change.UpdateNetworkParameter == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.update_network_parameter", ErrIsRequired) + } + + if change.UpdateNetworkParameter.Changes == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.update_network_parameter.changes", ErrIsRequired) + } + + return checkNetworkParameterUpdate(change.UpdateNetworkParameter.Changes).AddPrefix("batch_proposal_submission.terms.changes.") +} + +func checkUpdateAssetBatchChanges(change *protoTypes.BatchProposalTermsChange_UpdateAsset) Errors { + errs := NewErrors() + + if change.UpdateAsset == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.update_asset", ErrIsRequired) + } + + return checkUpdateAsset(change.UpdateAsset).AddPrefix("batch_proposal_submission.terms.changes.") +} + +func checkNewFreeformBatchChanges(change *protoTypes.BatchProposalTermsChange_NewFreeform) Errors { + errs := NewErrors() + + if change.NewFreeform == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.new_freeform", ErrIsRequired) + } + return errs +} + +func checkNewTransferBatchChanges(change *protoTypes.BatchProposalTermsChange_NewTransfer) Errors { + errs := NewErrors() + if change.NewTransfer == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.new_transfer", ErrIsRequired) + } + + if change.NewTransfer.Changes == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.new_transfer.changes", ErrIsRequired) + } + + return checkNewTransferConfiguration(change.NewTransfer.Changes).AddPrefix("batch_proposal_submission.terms.changes") +} + +func checkCancelTransferBatchChanges(change *protoTypes.BatchProposalTermsChange_CancelTransfer) Errors { + errs := NewErrors() + if change.CancelTransfer == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.cancel_transfer", ErrIsRequired) + } + + if change.CancelTransfer.Changes == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.cancel_transfer.changes", ErrIsRequired) + } + + changes := change.CancelTransfer.Changes + if len(changes.TransferId) == 0 { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.cancel_transfer.changes.transferId", ErrIsRequired) + } + return errs +} + +func checkMarketUpdateStateBatch(change *protoTypes.BatchProposalTermsChange_UpdateMarketState) Errors { + errs := NewErrors() + if change.UpdateMarketState == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.update_market_state", ErrIsRequired) + } + if change.UpdateMarketState.Changes == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.update_market_state.changes", ErrIsRequired) + } + return checkMarketUpdateConfiguration(change.UpdateMarketState.Changes).AddPrefix("batch_proposal_submission.terms.changes.") +} + +func checkUpdateReferralProgramBatch(change *vegapb.BatchProposalTermsChange_UpdateReferralProgram, enactmentTimestamp int64) Errors { + errs := NewErrors() + if change.UpdateReferralProgram == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.update_referral_program", ErrIsRequired) + } + if change.UpdateReferralProgram.Changes == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.update_referral_program.changes", ErrIsRequired) + } + + return checkReferralProgramChanges(change.UpdateReferralProgram.Changes, enactmentTimestamp). + AddPrefix("batch_proposal_submission.terms.changes.") +} + +func checkVolumeDiscountProgramBatch(change *vegapb.BatchProposalTermsChange_UpdateVolumeDiscountProgram, enactmentTimestamp int64) Errors { + errs := NewErrors() + if change.UpdateVolumeDiscountProgram == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.update_volume_discount_program", ErrIsRequired) + } + if change.UpdateVolumeDiscountProgram.Changes == nil { + return errs.FinalAddForProperty("batch_proposal_submission.terms.changes.update_volume_discount_program.changes", ErrIsRequired) + } + + return checkVolumeDiscountProgramChanges(change.UpdateVolumeDiscountProgram.Changes, enactmentTimestamp). + AddPrefix("batch_proposal_submission.terms.changes.") +} diff --git a/commands/batch_proposal_submission_test.go b/commands/batch_proposal_submission_test.go new file mode 100644 index 0000000000..9cc54edb43 --- /dev/null +++ b/commands/batch_proposal_submission_test.go @@ -0,0 +1,414 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package commands_test + +import ( + "errors" + "testing" + + "code.vegaprotocol.io/vega/commands" + vgrand "code.vegaprotocol.io/vega/libs/rand" + "code.vegaprotocol.io/vega/libs/test" + vegapb "code.vegaprotocol.io/vega/protos/vega" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "github.com/stretchr/testify/assert" +) + +func TestCheckBatchProposalSubmission(t *testing.T) { + t.Run("Submitting a nil command fails", testNilBatchProposalSubmissionFails) + t.Run("Submitting a proposal without terms fails", testBatchProposalSubmissionWithoutTermsFails) + t.Run("Submitting a proposal change without change fails", testBatchProposalSubmissionWithoutChangesFails) + t.Run("Submitting a proposal without rational fails", testBatchProposalSubmissionWithoutRationalFails) + t.Run("Submitting a proposal with rational succeeds", testBatchProposalSubmissionWithRationalSucceeds) + t.Run("Submitting a proposal with rational description succeeds", testBatchProposalSubmissionWithRationalDescriptionSucceeds) + t.Run("Submitting a proposal with incorrect rational description fails", testBatchProposalSubmissionWithIncorrectRationalDescriptionFails) + t.Run("Submitting a proposal with rational URL and hash succeeds", testBatchProposalSubmissionWithRationalDescriptionAndTitleSucceeds) + t.Run("Submitting a proposal with non-positive closing timestamp fails", testBatchProposalSubmissionWithNonPositiveClosingTimestampFails) + t.Run("Submitting a proposal with positive closing timestamp succeeds", testBatchProposalSubmissionWithPositiveClosingTimestampSucceeds) + t.Run("Submitting a proposal with non-positive enactment timestamp fails", testBatchProposalSubmissionWithNonPositiveEnactmentTimestampFails) + t.Run("Submitting a proposal with positive enactment timestamp succeeds", testBatchProposalSubmissionWithPositiveEnactmentTimestampSucceeds) + t.Run("Submitting a proposal with closing timestamp after enactment timestamp fails", testBatchProposalSubmissionWithClosingTimestampAfterEnactmentTimestampFails) + t.Run("Submitting a proposal with closing timestamp before enactment timestamp succeeds", testBatchProposalSubmissionWithClosingTimestampBeforeEnactmentTimestampSucceeds) + t.Run("Submitting a proposal with closing timestamp at enactment timestamp succeeds", testProposalSubmissionWithClosingTimestampAtEnactmentTimestampSucceeds) +} + +func testNilBatchProposalSubmissionFails(t *testing.T) { + err := checkBatchProposalSubmission(nil) + + assert.Contains(t, err.Get("batch_proposal_submission"), commands.ErrIsRequired) +} + +func testBatchProposalSubmissionWithoutTermsFails(t *testing.T) { + err := checkBatchProposalSubmission(&commandspb.BatchProposalSubmission{}) + + assert.Contains(t, err.Get("batch_proposal_submission.terms"), commands.ErrIsRequired) +} + +func testBatchProposalSubmissionWithoutChangesFails(t *testing.T) { + err := checkBatchProposalSubmission(&commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{}, + }) + + assert.Contains(t, err.Get("batch_proposal_submission.terms.changes"), commands.ErrIsRequired) +} + +func testBatchProposalSubmissionWithoutRationalFails(t *testing.T) { + err := checkBatchProposalSubmission(&commandspb.BatchProposalSubmission{}) + + assert.Contains(t, err.Get("batch_proposal_submission.rationale"), commands.ErrIsRequired) +} + +func testBatchProposalSubmissionWithRationalSucceeds(t *testing.T) { + err := checkBatchProposalSubmission(&commandspb.BatchProposalSubmission{ + Rationale: &vegapb.ProposalRationale{}, + }) + + assert.Empty(t, err.Get("batch_proposal_submission.rationale")) +} + +func testBatchProposalSubmissionWithRationalDescriptionSucceeds(t *testing.T) { + tcs := []struct { + name string + description string + }{ + { + name: "with description of 10 characters", + description: vgrand.RandomStr(10), + }, { + name: "with description of 1024 characters", + description: vgrand.RandomStr(1024), + }, + } + + for _, tc := range tcs { + t.Run(tc.name, func(tt *testing.T) { + err := checkBatchProposalSubmission(&commandspb.BatchProposalSubmission{ + Rationale: &vegapb.ProposalRationale{ + Description: tc.description, + }, + }) + + assert.Empty(tt, err.Get("batch_proposal_submission.rationale.description")) + }) + } +} + +func testBatchProposalSubmissionWithIncorrectRationalDescriptionFails(t *testing.T) { + tcs := []struct { + name string + description string + expectedErr error + }{ + { + name: "with empty description", + description: "", + expectedErr: commands.ErrIsRequired, + }, { + name: "with blank description", + description: " ", + expectedErr: commands.ErrIsRequired, + }, { + name: "with description > 1024", + description: vgrand.RandomStr(20420), + expectedErr: commands.ErrMustNotExceed20000Chars, + }, + } + + for _, tc := range tcs { + t.Run(tc.name, func(tt *testing.T) { + err := checkBatchProposalSubmission(&commandspb.BatchProposalSubmission{ + Rationale: &vegapb.ProposalRationale{ + Description: tc.description, + }, + }) + + assert.Contains(tt, err.Get("batch_proposal_submission.rationale.description"), tc.expectedErr) + }) + } +} + +func testBatchProposalSubmissionWithRationalDescriptionAndTitleSucceeds(t *testing.T) { + tcs := []struct { + name string + shouldErr bool + submission *commandspb.BatchProposalSubmission + }{ + { + name: "NewMarket with rational Title and Description", + submission: &commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{ + Changes: []*vegapb.BatchProposalTermsChange{ + { + Change: &vegapb.BatchProposalTermsChange_NewMarket{}, + }, + }, + }, + Rationale: &vegapb.ProposalRationale{ + Title: vgrand.RandomStr(10), + Description: vgrand.RandomStr(10), + }, + }, + }, { + name: "NewMarket without rational Title and Description", + shouldErr: true, + submission: &commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{ + Changes: []*vegapb.BatchProposalTermsChange{ + { + Change: &vegapb.BatchProposalTermsChange_NewMarket{}, + }, + }, + }, + Rationale: &vegapb.ProposalRationale{}, + }, + }, { + name: "with UpdateMarket with rational Title and Description", + submission: &commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{ + Changes: []*vegapb.BatchProposalTermsChange{ + { + Change: &vegapb.BatchProposalTermsChange_UpdateMarket{}, + }, + }, + }, + Rationale: &vegapb.ProposalRationale{ + Title: vgrand.RandomStr(10), + Description: vgrand.RandomStr(10), + }, + }, + }, { + name: "with UpdateMarket without rational Title and Description", + shouldErr: true, + submission: &commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{ + Changes: []*vegapb.BatchProposalTermsChange{ + { + Change: &vegapb.BatchProposalTermsChange_UpdateMarket{}, + }, + }, + }, + Rationale: &vegapb.ProposalRationale{}, + }, + }, { + name: "with UpdateNetworkParameter with rational Title and Description", + submission: &commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{ + Changes: []*vegapb.BatchProposalTermsChange{ + { + Change: &vegapb.BatchProposalTermsChange_UpdateNetworkParameter{}, + }, + }, + }, + Rationale: &vegapb.ProposalRationale{ + Title: vgrand.RandomStr(10), + Description: vgrand.RandomStr(10), + }, + }, + }, { + name: "with UpdateNetworkParameter without rational Title and Description", + shouldErr: true, + submission: &commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{ + Changes: []*vegapb.BatchProposalTermsChange{ + { + Change: &vegapb.BatchProposalTermsChange_UpdateNetworkParameter{}, + }, + }, + }, + Rationale: &vegapb.ProposalRationale{}, + }, + }, { + name: "with NewFreeform with rational Title and Description", + submission: &commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{ + Changes: []*vegapb.BatchProposalTermsChange{ + { + Change: &vegapb.BatchProposalTermsChange_NewFreeform{}, + }, + }, + }, + Rationale: &vegapb.ProposalRationale{ + Title: vgrand.RandomStr(10), + Description: vgrand.RandomStr(10), + }, + }, + }, + } + + for _, tc := range tcs { + t.Run(tc.name, func(tt *testing.T) { + err := checkBatchProposalSubmission(tc.submission) + if !tc.shouldErr { + assert.Empty(tt, err.Get("batch_proposal_submission.rationale.title"), tc.name) + assert.Empty(tt, err.Get("batch_proposal_submission.rationale.description"), tc.name) + } else { + assert.Contains(tt, err.Get("batch_proposal_submission.rationale.title"), commands.ErrIsRequired, tc.name) + assert.Contains(tt, err.Get("batch_proposal_submission.rationale.description"), commands.ErrIsRequired, tc.name) + } + }) + } +} + +func testBatchProposalSubmissionWithNonPositiveClosingTimestampFails(t *testing.T) { + testCases := []struct { + msg string + value int64 + }{ + { + msg: "with 0 as closing timestamp", + value: 0, + }, { + msg: "with negative closing timestamp", + value: test.RandomNegativeI64(), + }, + } + for _, tc := range testCases { + t.Run(tc.msg, func(t *testing.T) { + err := checkBatchProposalSubmission(&commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{ + ClosingTimestamp: tc.value, + Changes: []*vegapb.BatchProposalTermsChange{{}}, + }, + Rationale: &vegapb.ProposalRationale{ + Title: vgrand.RandomStr(10), + Description: vgrand.RandomStr(10), + }, + }) + + assert.Contains(t, err.Get("batch_proposal_submission.terms.closing_timestamp"), commands.ErrMustBePositive) + }) + } +} + +func testBatchProposalSubmissionWithPositiveClosingTimestampSucceeds(t *testing.T) { + err := checkBatchProposalSubmission(&commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{ + ClosingTimestamp: test.RandomPositiveI64(), + Changes: []*vegapb.BatchProposalTermsChange{{}}, + }, + Rationale: &vegapb.ProposalRationale{ + Title: vgrand.RandomStr(10), + Description: vgrand.RandomStr(10), + }, + }) + + assert.NotContains(t, err.Get("proposal_submission.terms.closing_timestamp"), commands.ErrMustBePositive) +} + +func testBatchProposalSubmissionWithNonPositiveEnactmentTimestampFails(t *testing.T) { + testCases := []struct { + msg string + value int64 + }{ + { + msg: "with 0 as closing timestamp", + value: 0, + }, { + msg: "with negative closing timestamp", + value: test.RandomNegativeI64(), + }, + } + for _, tc := range testCases { + t.Run(tc.msg, func(t *testing.T) { + err := checkBatchProposalSubmission(&commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{ + ClosingTimestamp: test.RandomPositiveI64(), + Changes: []*vegapb.BatchProposalTermsChange{{ + EnactmentTimestamp: tc.value, + }}, + }, + Rationale: &vegapb.ProposalRationale{ + Title: vgrand.RandomStr(10), + Description: vgrand.RandomStr(10), + }, + }) + + assert.Contains(t, err.Get("batch_proposal_submission.terms.enactment_timestamp"), commands.ErrMustBePositive) + }) + } +} + +func testBatchProposalSubmissionWithPositiveEnactmentTimestampSucceeds(t *testing.T) { + err := checkBatchProposalSubmission(&commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{ + ClosingTimestamp: test.RandomPositiveI64(), + Changes: []*vegapb.BatchProposalTermsChange{{ + EnactmentTimestamp: test.RandomPositiveI64(), + }}, + }, + Rationale: &vegapb.ProposalRationale{ + Title: vgrand.RandomStr(10), + Description: vgrand.RandomStr(10), + }, + }) + + assert.NotContains(t, err.Get("proposal_submission.terms.enactment_timestamp"), commands.ErrMustBePositive) +} + +func testBatchProposalSubmissionWithClosingTimestampAfterEnactmentTimestampFails(t *testing.T) { + closingTime := test.RandomPositiveI64() + enactmentTime := test.RandomPositiveI64Before(closingTime) + err := checkBatchProposalSubmission(&commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{ + ClosingTimestamp: closingTime, + Changes: []*vegapb.BatchProposalTermsChange{{ + EnactmentTimestamp: enactmentTime, + }}, + }, + Rationale: &vegapb.ProposalRationale{ + Title: vgrand.RandomStr(10), + Description: vgrand.RandomStr(10), + }, + }) + + assert.Contains(t, err.Get("batch_proposal_submission.terms.closing_timestamp"), + errors.New("cannot be after enactment time"), + ) +} + +func testBatchProposalSubmissionWithClosingTimestampBeforeEnactmentTimestampSucceeds(t *testing.T) { + enactmentTime := test.RandomPositiveI64() + closingTime := test.RandomPositiveI64Before(enactmentTime) + + err := checkBatchProposalSubmission(&commandspb.BatchProposalSubmission{ + Terms: &commandspb.BatchProposalSubmissionTerms{ + ClosingTimestamp: closingTime, + Changes: []*vegapb.BatchProposalTermsChange{{ + EnactmentTimestamp: enactmentTime, + }}, + }, + Rationale: &vegapb.ProposalRationale{ + Title: vgrand.RandomStr(10), + Description: vgrand.RandomStr(10), + }, + }) + + assert.NotContains(t, err.Get("batch_proposal_submission.terms.closing_timestamp"), + errors.New("cannot be after enactment time"), + ) +} + +func checkBatchProposalSubmission(cmd *commandspb.BatchProposalSubmission) commands.Errors { + err := commands.CheckBatchProposalSubmission(cmd) + + var e commands.Errors + if ok := errors.As(err, &e); !ok { + return commands.NewErrors() + } + + return e +} diff --git a/commands/cancel_transfer.go b/commands/cancel_transfer.go index 81027f27ba..e06f00b0ae 100644 --- a/commands/cancel_transfer.go +++ b/commands/cancel_transfer.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/cancel_transfer_test.go b/commands/cancel_transfer_test.go index 6958a4d0c1..ab1d3db896 100644 --- a/commands/cancel_transfer_test.go +++ b/commands/cancel_transfer_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/commands" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) diff --git a/commands/chain_event.go b/commands/chain_event.go index 7d9d544859..d84f732456 100644 --- a/commands/chain_event.go +++ b/commands/chain_event.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/chain_event_test.go b/commands/chain_event_test.go index 6597be8fa0..84a8326730 100644 --- a/commands/chain_event_test.go +++ b/commands/chain_event_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/libs/test" proto "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) diff --git a/commands/create_referral_set.go b/commands/create_referral_set.go index 2eef1cd2e8..9e76f2f703 100644 --- a/commands/create_referral_set.go +++ b/commands/create_referral_set.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -47,8 +47,9 @@ func checkCreateReferralSet(cmd *commandspb.CreateReferralSet) Errors { errs.AddForProperty("create_referral_set.team.team_url", ErrMustBeLessThan200Chars) } - // temporarily disable teams - errs.AddForProperty("create_referral_set.team", ErrIsNotSupported) + if !cmd.Team.Closed && len(cmd.Team.AllowList) > 0 { + errs.AddForProperty("create_referral_set.team.allow_list", ErrCannotSetAllowListWhenTeamIsOpened) + } } return errs diff --git a/commands/create_referral_set_test.go b/commands/create_referral_set_test.go index cbdb2018d4..42a2cee1a3 100644 --- a/commands/create_referral_set_test.go +++ b/commands/create_referral_set_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/libs/ptr" vgrand "code.vegaprotocol.io/vega/libs/rand" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -84,6 +85,7 @@ func testCreatingTeamSucceeds(t *testing.T) { TeamUrl: ptr.From(vgrand.RandomStr(5)), AvatarUrl: ptr.From(vgrand.RandomStr(5)), Closed: true, + AllowList: []string{vgrand.RandomStr(5), vgrand.RandomStr(5)}, }, }, }, @@ -91,11 +93,7 @@ func testCreatingTeamSucceeds(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(tt *testing.T) { - if !tc.cmd.IsTeam { - require.Empty(tt, checkCreateReferralSet(tt, tc.cmd), tc.name) - } else { - require.Contains(tt, checkCreateReferralSet(tt, tc.cmd).Get("create_referral_set.team"), commands.ErrIsNotSupported, tc.name) - } + require.Empty(tt, checkCreateReferralSet(tt, tc.cmd), tc.name) }) } } @@ -141,6 +139,16 @@ func testCreateReferralSetFails(t *testing.T) { }) assert.Contains(t, err.Get("create_referral_set.team.team_url"), commands.ErrMustBeLessThan200Chars) + + err = checkCreateReferralSet(t, &commandspb.CreateReferralSet{ + IsTeam: true, + Team: &commandspb.CreateReferralSet_Team{ + Closed: false, + AllowList: []string{vgrand.RandomStr(5)}, + }, + }) + + assert.Contains(t, err.Get("create_referral_set.team.allow_list"), commands.ErrCannotSetAllowListWhenTeamIsOpened) } func checkCreateReferralSet(t *testing.T, cmd *commandspb.CreateReferralSet) commands.Errors { diff --git a/commands/delegate_submission.go b/commands/delegate_submission.go index e121d547ee..5fa0ba8235 100644 --- a/commands/delegate_submission.go +++ b/commands/delegate_submission.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/delegate_submission_test.go b/commands/delegate_submission_test.go index 1be8687db1..826d61c5f3 100644 --- a/commands/delegate_submission_test.go +++ b/commands/delegate_submission_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/errors.go b/commands/errors.go index ae9a32091b..8a7621ccb7 100644 --- a/commands/errors.go +++ b/commands/errors.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -21,6 +21,8 @@ import ( "fmt" "sort" "strings" + + "golang.org/x/exp/maps" ) var ( @@ -78,7 +80,18 @@ var ( ErrMustBeGreaterThanEnactmentTimestamp = errors.New("must be greater than proposal_submission.terms.enactment_timestamp") ErrMustBeLessThen366 = errors.New("must be less then 366") ErrMustBeAtMost500 = errors.New("must be at most 500") + ErrMustBeSetTo0IfSizeSet = errors.New("must be set to 0 if the property \"order_amendment.size\" is set") + ErrMustBeAtMost3600 = errors.New("must be at most 3600") ErrMustBeWithinRangeGT0LT20 = errors.New("price range must be strictly greater than 0 and less than or equal to 20") + ErrSizeIsTooLarge = errors.New("size is too large") + ErrCannotSetAllowListWhenTeamIsOpened = errors.New("cannot set allow list when team is opened") + ErrSettingAllowListRequireSettingClosedState = errors.New("setting an allow list requires setting the closed state") + ErrIsLimitedTo32Characters = errors.New("is limited to 32 characters") + ErrIsLimitedTo10Entries = errors.New("is limited to 10 entries") + ErrIsLimitedTo255Characters = errors.New("is limited to 255 characters") + ErrCannotBeBlank = errors.New("cannot be blank") + ErrIsDuplicated = errors.New("is duplicated") + ErrMustBeAtMost250 = errors.New("must be at most 250") ) type Errors map[string][]error @@ -120,6 +133,20 @@ func (e Errors) AddForProperty(prop string, err error) { e[prop] = append(errs, err) } +// AddPrefix adds prefix to each property. +func (e Errors) AddPrefix(prefix string) Errors { + keys := maps.Keys(e) + for _, key := range keys { + // Skip general error + if key == "*" { + continue + } + e[fmt.Sprintf("%s%s", prefix, key)] = e[key] + delete(e, key) + } + return e +} + // FinalAddForProperty behaves like AddForProperty, but is meant to be called in // a "return" statement. This helper is usually used for terminal errors. func (e Errors) FinalAddForProperty(prop string, err error) Errors { diff --git a/commands/errors_test.go b/commands/errors_test.go index ad86a3cfe1..5cf373f752 100644 --- a/commands/errors_test.go +++ b/commands/errors_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -20,6 +20,7 @@ import ( "testing" "code.vegaprotocol.io/vega/commands" + "github.com/stretchr/testify/assert" ) diff --git a/commands/ethereum_key_rotate_submission.go b/commands/ethereum_key_rotate_submission.go index 4898ab251b..45cce53017 100644 --- a/commands/ethereum_key_rotate_submission.go +++ b/commands/ethereum_key_rotate_submission.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/ethereum_key_rotate_submission_test.go b/commands/ethereum_key_rotate_submission_test.go index a709758df4..e0630b8087 100644 --- a/commands/ethereum_key_rotate_submission_test.go +++ b/commands/ethereum_key_rotate_submission_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/is_vega_pubkey.go b/commands/is_vega_pubkey.go index 9b060b9fd8..84d1430bd0 100644 --- a/commands/is_vega_pubkey.go +++ b/commands/is_vega_pubkey.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/issue_signatures.go b/commands/issue_signatures.go index 7bd19ffc7b..5e39e636a1 100644 --- a/commands/issue_signatures.go +++ b/commands/issue_signatures.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/join_team.go b/commands/join_team.go new file mode 100644 index 0000000000..04c595a873 --- /dev/null +++ b/commands/join_team.go @@ -0,0 +1,36 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package commands + +import commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + +func CheckJoinTeam(cmd *commandspb.JoinTeam) error { + return checkJoinTeam(cmd).ErrorOrNil() +} + +func checkJoinTeam(cmd *commandspb.JoinTeam) Errors { + errs := NewErrors() + + if cmd == nil { + return errs.FinalAddForProperty("join_team", ErrIsRequired) + } + + if !IsVegaID(cmd.Id) { + errs.AddForProperty("join_team.id", ErrShouldBeAValidVegaID) + } + + return errs +} diff --git a/commands/join_team_test.go b/commands/join_team_test.go new file mode 100644 index 0000000000..27249c90d2 --- /dev/null +++ b/commands/join_team_test.go @@ -0,0 +1,61 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package commands_test + +import ( + "errors" + "testing" + + "code.vegaprotocol.io/vega/commands" + vgtest "code.vegaprotocol.io/vega/libs/test" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "github.com/stretchr/testify/assert" +) + +func TestJoinTeam(t *testing.T) { + t.Run("Joining team succeeds", testJoiningTeamSucceeds) + t.Run("Joining team with team ID fails", testJoinTeamWithoutTeamIDFails) +} + +func testJoiningTeamSucceeds(t *testing.T) { + err := checkJoinTeam(t, &commandspb.JoinTeam{ + Id: vgtest.RandomVegaID(), + }) + + assert.Empty(t, err) +} + +func testJoinTeamWithoutTeamIDFails(t *testing.T) { + err := checkJoinTeam(t, &commandspb.JoinTeam{ + Id: "", + }) + + assert.Contains(t, err.Get("join_team.id"), commands.ErrShouldBeAValidVegaID) +} + +func checkJoinTeam(t *testing.T, cmd *commandspb.JoinTeam) commands.Errors { + t.Helper() + + err := commands.CheckJoinTeam(cmd) + + var e commands.Errors + if ok := errors.As(err, &e); !ok { + return commands.NewErrors() + } + + return e +} diff --git a/commands/key_rotate_submission.go b/commands/key_rotate_submission.go index 96cfbca687..130143ad44 100644 --- a/commands/key_rotate_submission.go +++ b/commands/key_rotate_submission.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/key_rotate_submission_test.go b/commands/key_rotate_submission_test.go index 707dabd9e6..5806e12005 100644 --- a/commands/key_rotate_submission_test.go +++ b/commands/key_rotate_submission_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/liquidity_provision_submission.go b/commands/liquidity_provision_submission.go index 5a3446a94b..9051a53b33 100644 --- a/commands/liquidity_provision_submission.go +++ b/commands/liquidity_provision_submission.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/liquidity_provision_submission_test.go b/commands/liquidity_provision_submission_test.go index 7ce915d09c..310796a7b3 100644 --- a/commands/liquidity_provision_submission_test.go +++ b/commands/liquidity_provision_submission_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/node_signature.go b/commands/node_signature.go index 560ff47267..e57c6e13bb 100644 --- a/commands/node_signature.go +++ b/commands/node_signature.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/node_signature_test.go b/commands/node_signature_test.go index a4ed98e9ff..cb32986d33 100644 --- a/commands/node_signature_test.go +++ b/commands/node_signature_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/commands" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) diff --git a/commands/node_vote.go b/commands/node_vote.go index 54b56c2418..5dd21ac822 100644 --- a/commands/node_vote.go +++ b/commands/node_vote.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/node_vote_test.go b/commands/node_vote_test.go index 2b3efb71fe..d29dbcd89a 100644 --- a/commands/node_vote_test.go +++ b/commands/node_vote_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/oracle_data_submission.go b/commands/oracle_data_submission.go index 787c36d17c..27444b18d9 100644 --- a/commands/oracle_data_submission.go +++ b/commands/oracle_data_submission.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/oracle_data_submission_test.go b/commands/oracle_data_submission_test.go index 83416ddfe8..8dec3228c5 100644 --- a/commands/oracle_data_submission_test.go +++ b/commands/oracle_data_submission_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/commands" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) diff --git a/commands/order_amendment.go b/commands/order_amendment.go index f1be273ac6..536ff8ad51 100644 --- a/commands/order_amendment.go +++ b/commands/order_amendment.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -17,6 +17,7 @@ package commands import ( "errors" + "math" "math/big" types "code.vegaprotocol.io/vega/protos/vega" @@ -68,7 +69,17 @@ func checkOrderAmendment(cmd *commandspb.OrderAmendment) Errors { } } + if cmd.Size != nil { + isAmending = true + if *cmd.Size > math.MaxInt64/2 { + errs.AddForProperty("order_amendment.size", ErrSizeIsTooLarge) + } + } + if cmd.SizeDelta != 0 { + if cmd.Size != nil { + errs.AddForProperty("order_amendment.size_delta", ErrMustBeSetTo0IfSizeSet) + } isAmending = true } diff --git a/commands/order_amendment_test.go b/commands/order_amendment_test.go index 6e0f2c36df..41fcac64fa 100644 --- a/commands/order_amendment_test.go +++ b/commands/order_amendment_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -26,13 +26,16 @@ import ( commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestCheckOrderAmendment(t *testing.T) { t.Run("Submitting a nil command fails", testNilOrderAmendmentFails) t.Run("amend order price - success", testAmendOrderJustPriceSuccess) - t.Run("amend order reduce - success", testAmendOrderJustReduceSuccess) - t.Run("amend order increase - success", testAmendOrderJustIncreaseSuccess) + t.Run("amend order reduce size delta - success", testAmendOrderJustReduceSizeDeltaSuccess) + t.Run("amend order increase size delta - success", testAmendOrderJustIncreaseSizeDeltaSuccess) + t.Run("amend order setting size delta and size - fails", testAmendOrderSettingSizeDeltaAndSizeFails) + t.Run("amend order update size - success", testAmendOrderJustUpdateSizeSuccess) t.Run("amend order expiry - success", testAmendOrderJustExpirySuccess) t.Run("amend order tif - success", testAmendOrderJustTIFSuccess) t.Run("amend order expiry before creation time - success", testAmendOrderPastExpiry) @@ -61,7 +64,7 @@ func testAmendOrderJustPriceSuccess(t *testing.T) { assert.NoError(t, err.ErrorOrNil()) } -func testAmendOrderJustReduceSuccess(t *testing.T) { +func testAmendOrderJustReduceSizeDeltaSuccess(t *testing.T) { arg := &commandspb.OrderAmendment{ OrderId: "08dce6ebf50e34fedee32860b6f459824e4b834762ea66a96504fdc57a9c4741", MarketId: "08dce6ebf50e34fedee32860b6f459824e4b834762ea66a96504fdc57a9c4741", @@ -71,7 +74,7 @@ func testAmendOrderJustReduceSuccess(t *testing.T) { assert.NoError(t, err.ErrorOrNil()) } -func testAmendOrderJustIncreaseSuccess(t *testing.T) { +func testAmendOrderJustIncreaseSizeDeltaSuccess(t *testing.T) { arg := &commandspb.OrderAmendment{ OrderId: "08dce6ebf50e34fedee32860b6f459824e4b834762ea66a96504fdc57a9c4741", MarketId: "08dce6ebf50e34fedee32860b6f459824e4b834762ea66a96504fdc57a9c4741", @@ -81,6 +84,29 @@ func testAmendOrderJustIncreaseSuccess(t *testing.T) { assert.NoError(t, err.ErrorOrNil()) } +func testAmendOrderSettingSizeDeltaAndSizeFails(t *testing.T) { + arg := &commandspb.OrderAmendment{ + OrderId: "08dce6ebf50e34fedee32860b6f459824e4b834762ea66a96504fdc57a9c4741", + MarketId: "08dce6ebf50e34fedee32860b6f459824e4b834762ea66a96504fdc57a9c4741", + SizeDelta: 10, + Size: ptr.From(uint64(10)), + } + err := checkOrderAmendment(arg) + foundErrors := err.Get("order_amendment.size_delta") + require.Len(t, foundErrors, 1, "expected 1 error on size_delta") + assert.ErrorIs(t, foundErrors[0], commands.ErrMustBeSetTo0IfSizeSet) +} + +func testAmendOrderJustUpdateSizeSuccess(t *testing.T) { + arg := &commandspb.OrderAmendment{ + OrderId: "08dce6ebf50e34fedee32860b6f459824e4b834762ea66a96504fdc57a9c4741", + MarketId: "08dce6ebf50e34fedee32860b6f459824e4b834762ea66a96504fdc57a9c4741", + Size: ptr.From(uint64(10)), + } + err := checkOrderAmendment(arg) + assert.NoError(t, err.ErrorOrNil()) +} + func testAmendOrderJustExpirySuccess(t *testing.T) { now := time.Now() expires := now.Add(-2 * time.Hour) diff --git a/commands/order_cancellation.go b/commands/order_cancellation.go index d0df6070c3..7fcf7ea637 100644 --- a/commands/order_cancellation.go +++ b/commands/order_cancellation.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/order_submission.go b/commands/order_submission.go index e25d261bbd..f6a1784ed2 100644 --- a/commands/order_submission.go +++ b/commands/order_submission.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -17,6 +17,7 @@ package commands import ( "errors" + "math" "math/big" types "code.vegaprotocol.io/vega/protos/vega" @@ -72,6 +73,11 @@ func checkOrderSubmission(cmd *commandspb.OrderSubmission) Errors { errs.AddForProperty("order_submission.size", ErrMustBePositive) } + // just make sure its not some silly big number because we do sometimes cast to int64s + if cmd.Size > math.MaxInt64/2 { + errs.AddForProperty("order_submission.size", ErrSizeIsTooLarge) + } + if cmd.TimeInForce == types.Order_TIME_IN_FORCE_GTT { if cmd.ExpiresAt <= 0 { errs.AddForProperty("order_submission.expires_at", ErrMustBePositive) diff --git a/commands/order_submission_test.go b/commands/order_submission_test.go index 36429337dd..d2b486c3e8 100644 --- a/commands/order_submission_test.go +++ b/commands/order_submission_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -17,12 +17,14 @@ package commands_test import ( "errors" + "math" "testing" "code.vegaprotocol.io/vega/commands" "code.vegaprotocol.io/vega/libs/test" types "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) @@ -37,7 +39,7 @@ func TestCheckOrderSubmission(t *testing.T) { t.Run("Submitting an order with NETWORK type fails", testOrderSubmissionWithNetworkTypeFails) t.Run("Submitting an order with undefined time in force fails", testOrderSubmissionWithUndefinedTimeInForceFails) t.Run("Submitting an order with unspecified time in force fails", testOrderSubmissionWithUnspecifiedTimeInForceFails) - t.Run("Submitting an order with non-positive size fails", testOrderSubmissionWithNonPositiveSizeFails) + t.Run("Submitting an order with non-positive size fails", testOrderSubmissionWithInvalidSizeFails) t.Run("Submitting an order with GTT and non-positive expiration date fails", testOrderSubmissionWithGTTAndNonPositiveExpirationDateFails) t.Run("Submitting an order without GTT and expiration date fails", testOrderSubmissionWithoutGTTAndExpirationDateFails) t.Run("Submitting an order with MARKET type and price fails", testOrderSubmissionWithMarketTypeAndPriceFails) @@ -319,7 +321,7 @@ func testOrderSubmissionWithUndefinedTimeInForceFails(t *testing.T) { assert.Contains(t, err.Get("order_submission.time_in_force"), commands.ErrIsNotValid) } -func testOrderSubmissionWithNonPositiveSizeFails(t *testing.T) { +func testOrderSubmissionWithInvalidSizeFails(t *testing.T) { // FIXME(big int) doesn't test negative numbers since it's an unsigned int // but that will definitely be needed when moving to big int. err := checkOrderSubmission(&commandspb.OrderSubmission{ @@ -327,6 +329,11 @@ func testOrderSubmissionWithNonPositiveSizeFails(t *testing.T) { }) assert.Contains(t, err.Get("order_submission.size"), commands.ErrMustBePositive) + + err = checkOrderSubmission(&commandspb.OrderSubmission{ + Size: math.MaxInt64, + }) + assert.Contains(t, err.Get("order_submission.size"), commands.ErrSizeIsTooLarge) } func testOrderSubmissionWithGTTAndNonPositiveExpirationDateFails(t *testing.T) { diff --git a/commands/proposal_submission.go b/commands/proposal_submission.go index c1f7ed7cf8..2807cfc8e5 100644 --- a/commands/proposal_submission.go +++ b/commands/proposal_submission.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -22,6 +22,7 @@ import ( "math/big" "strconv" "strings" + "time" dstypes "code.vegaprotocol.io/vega/core/datasource/common" "code.vegaprotocol.io/vega/core/datasource/external/ethcall" @@ -204,7 +205,7 @@ func checkProposalChanges(terms *protoTypes.ProposalTerms) Errors { case *protoTypes.ProposalTerms_UpdateMarketState: errs.Merge(checkMarketUpdateState(c)) case *protoTypes.ProposalTerms_UpdateReferralProgram: - errs.Merge(checkReferralProgram(terms, c)) + errs.Merge(checkUpdateReferralProgram(terms, c)) case *protoTypes.ProposalTerms_UpdateVolumeDiscountProgram: errs.Merge(checkVolumeDiscountProgram(terms, c)) default: @@ -225,16 +226,19 @@ func checkNetworkParameterUpdateChanges(change *protoTypes.ProposalTerms_UpdateN return errs.FinalAddForProperty("proposal_submission.terms.change.update_network_parameter.changes", ErrIsRequired) } - parameter := change.UpdateNetworkParameter.Changes + return checkNetworkParameterUpdate(change.UpdateNetworkParameter.Changes).AddPrefix("proposal_submission.terms.change.") +} + +func checkNetworkParameterUpdate(parameter *vegapb.NetworkParameter) Errors { + errs := NewErrors() if len(parameter.Key) == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_network_parameter.changes.key", ErrIsRequired) + errs.AddForProperty("update_network_parameter.changes.key", ErrIsRequired) } if len(parameter.Value) == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_network_parameter.changes.value", ErrIsRequired) + errs.AddForProperty("update_network_parameter.changes.value", ErrIsRequired) } - return errs } @@ -306,7 +310,7 @@ func checkCancelTransferChanges(change *protoTypes.ProposalTerms_CancelTransfer) return errs } -func checkReferralProgram(terms *vegapb.ProposalTerms, change *vegapb.ProposalTerms_UpdateReferralProgram) Errors { +func checkUpdateReferralProgram(terms *vegapb.ProposalTerms, change *vegapb.ProposalTerms_UpdateReferralProgram) Errors { errs := NewErrors() if change.UpdateReferralProgram == nil { return errs.FinalAddForProperty("proposal_submission.terms.change.update_referral_program", ErrIsRequired) @@ -314,18 +318,25 @@ func checkReferralProgram(terms *vegapb.ProposalTerms, change *vegapb.ProposalTe if change.UpdateReferralProgram.Changes == nil { return errs.FinalAddForProperty("proposal_submission.terms.change.update_referral_program.changes", ErrIsRequired) } - changes := change.UpdateReferralProgram.Changes + + return checkReferralProgramChanges(change.UpdateReferralProgram.Changes, terms.EnactmentTimestamp). + AddPrefix("proposal_submission.terms.change.") +} + +func checkReferralProgramChanges(changes *vegapb.ReferralProgramChanges, enactmentTimestamp int64) Errors { + errs := NewErrors() + if changes.EndOfProgramTimestamp == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_referral_program.changes.end_of_program_timestamp", ErrIsRequired) + errs.AddForProperty("update_referral_program.changes.end_of_program_timestamp", ErrIsRequired) } else if changes.EndOfProgramTimestamp < 0 { - errs.AddForProperty("proposal_submission.terms.change.update_referral_program.changes.end_of_program_timestamp", ErrMustBePositive) - } else if changes.EndOfProgramTimestamp < terms.EnactmentTimestamp { - errs.AddForProperty("proposal_submission.terms.change.update_referral_program.changes.end_of_program_timestamp", ErrMustBeGreaterThanEnactmentTimestamp) + errs.AddForProperty("update_referral_program.changes.end_of_program_timestamp", ErrMustBePositive) + } else if changes.EndOfProgramTimestamp < enactmentTimestamp { + errs.AddForProperty("update_referral_program.changes.end_of_program_timestamp", ErrMustBeGreaterThanEnactmentTimestamp) } if changes.WindowLength == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_referral_program.changes.window_length", ErrIsRequired) + errs.AddForProperty("update_referral_program.changes.window_length", ErrIsRequired) } else if changes.WindowLength > 100 { - errs.AddForProperty("proposal_submission.terms.change.update_referral_program.changes.window_length", ErrMustBeAtMost100) + errs.AddForProperty("update_referral_program.changes.window_length", ErrMustBeAtMost100) } tiers := map[string]struct{}{} @@ -333,7 +344,7 @@ func checkReferralProgram(terms *vegapb.ProposalTerms, change *vegapb.ProposalTe errs.Merge(checkBenefitTier(i, tier)) k := tier.MinimumEpochs + "_" + tier.MinimumRunningNotionalTakerVolume if _, ok := tiers[k]; ok { - errs.AddForProperty(fmt.Sprintf("proposal_submission.terms.change.update_referral_program.changes.benefit_tiers.%d", i), fmt.Errorf("duplicate benefit tier")) + errs.AddForProperty(fmt.Sprintf("update_referral_program.changes.benefit_tiers.%d", i), fmt.Errorf("duplicate benefit tier")) } tiers[k] = struct{}{} } @@ -343,7 +354,7 @@ func checkReferralProgram(terms *vegapb.ProposalTerms, change *vegapb.ProposalTe errs.Merge(checkStakingTier(i, tier)) k := tier.MinimumStakedTokens if _, ok := tiers[k]; ok { - errs.AddForProperty(fmt.Sprintf("proposal_submission.terms.change.update_referral_program.changes.staking_tiers.%d", i), fmt.Errorf("duplicate staking tier")) + errs.AddForProperty(fmt.Sprintf("update_referral_program.changes.staking_tiers.%d", i), fmt.Errorf("duplicate staking tier")) } tiers[k] = struct{}{} } @@ -358,18 +369,25 @@ func checkVolumeDiscountProgram(terms *vegapb.ProposalTerms, change *vegapb.Prop if change.UpdateVolumeDiscountProgram.Changes == nil { return errs.FinalAddForProperty("proposal_submission.terms.change.update_volume_discount_program.changes", ErrIsRequired) } - changes := change.UpdateVolumeDiscountProgram.Changes + + return checkVolumeDiscountProgramChanges(change.UpdateVolumeDiscountProgram.Changes, terms.EnactmentTimestamp). + AddPrefix("proposal_submission.terms.change.") +} + +func checkVolumeDiscountProgramChanges(changes *vegapb.VolumeDiscountProgramChanges, enactmentTimestamp int64) Errors { + errs := NewErrors() + if changes.EndOfProgramTimestamp == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_volume_discount_program.changes.end_of_program_timestamp", ErrIsRequired) + errs.AddForProperty("update_volume_discount_program.changes.end_of_program_timestamp", ErrIsRequired) } else if changes.EndOfProgramTimestamp < 0 { - errs.AddForProperty("proposal_submission.terms.change.update_volume_discount_program.changes.end_of_program_timestamp", ErrMustBePositive) - } else if changes.EndOfProgramTimestamp < terms.EnactmentTimestamp { - errs.AddForProperty("proposal_submission.terms.change.update_volume_discount_program.changes.end_of_program_timestamp", ErrMustBeGreaterThanEnactmentTimestamp) + errs.AddForProperty("update_volume_discount_program.changes.end_of_program_timestamp", ErrMustBePositive) + } else if changes.EndOfProgramTimestamp < enactmentTimestamp { + errs.AddForProperty("update_volume_discount_program.changes.end_of_program_timestamp", ErrMustBeGreaterThanEnactmentTimestamp) } if changes.WindowLength == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_volume_discount_program.changes.window_length", ErrIsRequired) + errs.AddForProperty("update_volume_discount_program.changes.window_length", ErrIsRequired) } else if changes.WindowLength > 100 { - errs.AddForProperty("proposal_submission.terms.change.update_volume_discount_program.changes.window_length", ErrMustBeAtMost100) + errs.AddForProperty("update_volume_discount_program.changes.window_length", ErrMustBeAtMost100) } for i, tier := range changes.BenefitTiers { errs.Merge(checkVolumeBenefitTier(i, tier)) @@ -380,7 +398,7 @@ func checkVolumeDiscountProgram(terms *vegapb.ProposalTerms, change *vegapb.Prop func checkVolumeBenefitTier(index int, tier *vegapb.VolumeBenefitTier) Errors { errs := NewErrors() - propertyPath := fmt.Sprintf("proposal_submission.terms.change.update_volume_discount_program.changes.benefit_tiers.%d", index) + propertyPath := fmt.Sprintf("update_volume_discount_program.changes.benefit_tiers.%d", index) if len(tier.MinimumRunningNotionalTakerVolume) == 0 { errs.AddForProperty(propertyPath+".minimum_running_notional_taker_volume", ErrIsRequired) } else { @@ -407,7 +425,7 @@ func checkVolumeBenefitTier(index int, tier *vegapb.VolumeBenefitTier) Errors { func checkBenefitTier(index int, tier *vegapb.BenefitTier) Errors { errs := NewErrors() - propertyPath := fmt.Sprintf("proposal_submission.terms.change.update_referral_program.changes.benefit_tiers.%d", index) + propertyPath := fmt.Sprintf("update_referral_program.changes.benefit_tiers.%d", index) if len(tier.MinimumRunningNotionalTakerVolume) == 0 { errs.AddForProperty(propertyPath+".minimum_running_notional_taker_volume", ErrIsRequired) @@ -459,7 +477,7 @@ func checkBenefitTier(index int, tier *vegapb.BenefitTier) Errors { func checkStakingTier(index int, tier *vegapb.StakingTier) Errors { errs := NewErrors() - propertyPath := fmt.Sprintf("proposal_submission.terms.change.update_referral_program.changes.staking_tiers.%d", index) + propertyPath := fmt.Sprintf("update_referral_program.changes.staking_tiers.%d", index) if len(tier.MinimumStakedTokens) == 0 { errs.AddForProperty(propertyPath+".minimum_staked_tokens", ErrIsRequired) @@ -494,23 +512,28 @@ func checkMarketUpdateState(change *protoTypes.ProposalTerms_UpdateMarketState) if change.UpdateMarketState.Changes == nil { return errs.FinalAddForProperty("proposal_submission.terms.change.update_market_state.changes", ErrIsRequired) } - changes := change.UpdateMarketState.Changes + return checkMarketUpdateConfiguration(change.UpdateMarketState.Changes).AddPrefix("proposal_submission.terms.change.") +} + +func checkMarketUpdateConfiguration(changes *vegapb.UpdateMarketStateConfiguration) Errors { + errs := NewErrors() + if len(changes.MarketId) == 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market_state.changes.marketId", ErrIsRequired) + return errs.FinalAddForProperty("update_market_state.changes.marketId", ErrIsRequired) } if changes.UpdateType == 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market_state.changes.updateType", ErrIsRequired) + return errs.FinalAddForProperty("update_market_state.changes.updateType", ErrIsRequired) } // if the update type is not terminate, price must be empty if changes.UpdateType != vega.MarketStateUpdateType_MARKET_STATE_UPDATE_TYPE_TERMINATE && changes.Price != nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market_state.changes.price", ErrMustBeEmpty) + return errs.FinalAddForProperty("update_market_state.changes.price", ErrMustBeEmpty) } // if termination and price is provided it must be a valid uint if changes.UpdateType == vega.MarketStateUpdateType_MARKET_STATE_UPDATE_TYPE_TERMINATE && changes.Price != nil && len(*changes.Price) > 0 { n, overflow := num.UintFromString(*changes.Price, 10) if overflow || n.IsNegative() { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market_state.changes.price", ErrIsNotValid) + return errs.FinalAddForProperty("update_market_state.changes.price", ErrIsNotValid) } } return errs @@ -526,80 +549,85 @@ func checkNewTransferChanges(change *protoTypes.ProposalTerms_NewTransfer) Error return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes", ErrIsRequired) } - changes := change.NewTransfer.Changes + return checkNewTransferConfiguration(change.NewTransfer.Changes).AddPrefix("proposal_submission.terms.change.") +} + +func checkNewTransferConfiguration(changes *vegapb.NewTransferConfiguration) Errors { + errs := NewErrors() + if changes.SourceType == protoTypes.AccountType_ACCOUNT_TYPE_UNSPECIFIED { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.source_type", ErrIsRequired) + return errs.FinalAddForProperty("new_transfer.changes.source_type", ErrIsRequired) } validDest, ok := validTransfers[changes.SourceType] // source account type may be one of the following: if !ok { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.source_type", ErrIsNotValid) + return errs.FinalAddForProperty("new_transfer.changes.source_type", ErrIsNotValid) } if changes.DestinationType == protoTypes.AccountType_ACCOUNT_TYPE_UNSPECIFIED { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.destination_type", ErrIsRequired) + return errs.FinalAddForProperty("new_transfer.changes.destination_type", ErrIsRequired) } if _, ok := validDest[changes.DestinationType]; !ok { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.destination_type", ErrIsNotValid) + return errs.FinalAddForProperty("new_transfer.changes.destination_type", ErrIsNotValid) } dest := changes.DestinationType // party accounts: check pubkey if dest == protoTypes.AccountType_ACCOUNT_TYPE_GENERAL && !IsVegaPublicKey(changes.Destination) { - errs.AddForProperty("proposal_submission.terms.change.new_transfer.changes.destination", ErrShouldBeAValidVegaPublicKey) + errs.AddForProperty("new_transfer.changes.destination", ErrShouldBeAValidVegaPublicKey) } // insurance account type requires a source, other sources are global if changes.SourceType == protoTypes.AccountType_ACCOUNT_TYPE_INSURANCE { if len(changes.Source) == 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.source", ErrIsNotValid) + return errs.FinalAddForProperty("new_transfer.changes.source", ErrIsNotValid) } // destination == source if dest == changes.SourceType && changes.Source == changes.Destination { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.destination", ErrIsNotValid) + return errs.FinalAddForProperty("new_transfer.changes.destination", ErrIsNotValid) } } else if len(changes.Source) > 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.source", ErrIsNotValid) + return errs.FinalAddForProperty("new_transfer.changes.source", ErrIsNotValid) } // global destination accounts == no source if (dest == protoTypes.AccountType_ACCOUNT_TYPE_GENERAL || dest == protoTypes.AccountType_ACCOUNT_TYPE_INSURANCE) && len(changes.Destination) == 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.destination", ErrIsNotValid) + return errs.FinalAddForProperty("new_transfer.changes.destination", ErrIsNotValid) } if changes.TransferType == protoTypes.GovernanceTransferType_GOVERNANCE_TRANSFER_TYPE_UNSPECIFIED { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.transfer_type", ErrIsRequired) + return errs.FinalAddForProperty("new_transfer.changes.transfer_type", ErrIsRequired) } if len(changes.Amount) == 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.amount", ErrIsRequired) + return errs.FinalAddForProperty("new_transfer.changes.amount", ErrIsRequired) } n, overflow := num.UintFromString(changes.Amount, 10) if overflow || n.IsNegative() { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.amount", ErrIsNotValid) + return errs.FinalAddForProperty("new_transfer.changes.amount", ErrIsNotValid) } if len(changes.Asset) == 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.asset", ErrIsRequired) + return errs.FinalAddForProperty("new_transfer.changes.asset", ErrIsRequired) } if len(changes.FractionOfBalance) == 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.fraction_of_balance", ErrIsRequired) + return errs.FinalAddForProperty("new_transfer.changes.fraction_of_balance", ErrIsRequired) } fraction, err := num.DecimalFromString(changes.FractionOfBalance) if err != nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.fraction_of_balance", ErrIsNotValid) + return errs.FinalAddForProperty("new_transfer.changes.fraction_of_balance", ErrIsNotValid) } if !fraction.IsPositive() { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.fraction_of_balance", ErrMustBePositive) + return errs.FinalAddForProperty("new_transfer.changes.fraction_of_balance", ErrMustBePositive) } if fraction.GreaterThan(num.DecimalOne()) { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.fraction_of_balance", ErrMustBeLTE1) + return errs.FinalAddForProperty("new_transfer.changes.fraction_of_balance", ErrMustBeLTE1) } if oneoff := changes.GetOneOff(); oneoff != nil { @@ -611,29 +639,29 @@ func checkNewTransferChanges(change *protoTypes.ProposalTerms_NewTransfer) Error changes.DestinationType == vega.AccountType_ACCOUNT_TYPE_REWARD_RELATIVE_RETURN || changes.DestinationType == vega.AccountType_ACCOUNT_TYPE_REWARD_RETURN_VOLATILITY || changes.DestinationType == vega.AccountType_ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING { - errs.AddForProperty("proposal_submission.terms.change.new_transfer.changes.destination_type", ErrIsNotValid) + errs.AddForProperty("new_transfer.changes.destination_type", ErrIsNotValid) } if oneoff.DeliverOn < 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.oneoff.deliveron", ErrMustBePositiveOrZero) + return errs.FinalAddForProperty("new_transfer.changes.oneoff.deliveron", ErrMustBePositiveOrZero) } } if recurring := changes.GetRecurring(); recurring != nil { if recurring.EndEpoch != nil && *recurring.EndEpoch < recurring.StartEpoch { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.recurring.end_epoch", ErrIsNotValid) + return errs.FinalAddForProperty("new_transfer.changes.recurring.end_epoch", ErrIsNotValid) } if recurring.DispatchStrategy != nil { if len(changes.Destination) > 0 { - errs.AddForProperty("proposal_submission.terms.change.new_transfer.changes.destination", ErrIsNotValid) + errs.AddForProperty("new_transfer.changes.destination", ErrIsNotValid) } - validateDispatchStrategy(changes.DestinationType, recurring.DispatchStrategy, errs, "proposal_submission.terms.change.new_transfer.changes.recurring.dispatch_strategy", "proposal_submission.terms.change.new_transfer.changes.destination_type") + validateDispatchStrategy(changes.DestinationType, recurring.DispatchStrategy, errs, "new_transfer.changes.recurring.dispatch_strategy", "new_transfer.changes.destination_type") } } if changes.GetRecurring() == nil && changes.GetOneOff() == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_transfer.changes.kind", ErrIsRequired) + return errs.FinalAddForProperty("new_transfer.changes.kind", ErrIsRequired) } return errs @@ -706,33 +734,39 @@ func checkUpdateAssetChanges(change *protoTypes.ProposalTerms_UpdateAsset) Error return errs.FinalAddForProperty("proposal_submission.terms.change.update_asset", ErrIsRequired) } - if len(change.UpdateAsset.AssetId) == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_asset.asset_id", ErrIsRequired) - } else if !IsVegaID(change.UpdateAsset.AssetId) { - errs.AddForProperty("proposal_submission.terms.change.update_asset.asset_id", ErrShouldBeAValidVegaID) + return checkUpdateAsset(change.UpdateAsset).AddPrefix("proposal_submission.terms.change.") +} + +func checkUpdateAsset(updateAsset *vegapb.UpdateAsset) Errors { + errs := NewErrors() + + if len(updateAsset.AssetId) == 0 { + errs.AddForProperty("update_asset.asset_id", ErrIsRequired) + } else if !IsVegaID(updateAsset.AssetId) { + errs.AddForProperty("update_asset.asset_id", ErrShouldBeAValidVegaID) } - if change.UpdateAsset.Changes == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_asset.changes", ErrIsRequired) + if updateAsset.Changes == nil { + return errs.FinalAddForProperty("update_asset.changes", ErrIsRequired) } - if len(change.UpdateAsset.Changes.Quantum) <= 0 { - errs.AddForProperty("proposal_submission.terms.change.update_asset.changes.quantum", ErrIsRequired) - } else if quantum, err := num.DecimalFromString(change.UpdateAsset.Changes.Quantum); err != nil { - errs.AddForProperty("proposal_submission.terms.change.update_asset.changes.quantum", ErrIsNotValidNumber) + if len(updateAsset.Changes.Quantum) <= 0 { + errs.AddForProperty("update_asset.changes.quantum", ErrIsRequired) + } else if quantum, err := num.DecimalFromString(updateAsset.Changes.Quantum); err != nil { + errs.AddForProperty("update_asset.changes.quantum", ErrIsNotValidNumber) } else if quantum.LessThanOrEqual(num.DecimalZero()) { - errs.AddForProperty("proposal_submission.terms.change.update_asset.changes.quantum", ErrMustBePositive) + errs.AddForProperty("update_asset.changes.quantum", ErrMustBePositive) } - if change.UpdateAsset.Changes.Source == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_asset.changes.source", ErrIsRequired) + if updateAsset.Changes.Source == nil { + return errs.FinalAddForProperty("update_asset.changes.source", ErrIsRequired) } - switch s := change.UpdateAsset.Changes.Source.(type) { + switch s := updateAsset.Changes.Source.(type) { case *protoTypes.AssetDetailsUpdate_Erc20: errs.Merge(checkERC20UpdateAssetSource(s)) default: - return errs.FinalAddForProperty("proposal_submission.terms.change.update_asset.changes.source", ErrIsNotValid) + return errs.FinalAddForProperty("update_asset.changes.source", ErrIsNotValid) } return errs @@ -742,31 +776,31 @@ func checkERC20UpdateAssetSource(s *protoTypes.AssetDetailsUpdate_Erc20) Errors errs := NewErrors() if s.Erc20 == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_asset.changes.source.erc20", ErrIsRequired) + return errs.FinalAddForProperty("update_asset.changes.source.erc20", ErrIsRequired) } asset := s.Erc20 if len(asset.LifetimeLimit) == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_asset.changes.source.erc20.lifetime_limit", ErrIsRequired) + errs.AddForProperty("update_asset.changes.source.erc20.lifetime_limit", ErrIsRequired) } else { if lifetimeLimit, ok := big.NewInt(0).SetString(asset.LifetimeLimit, 10); !ok { - errs.AddForProperty("proposal_submission.terms.change.update_asset.changes.source.erc20.lifetime_limit", ErrIsNotValidNumber) + errs.AddForProperty("update_asset.changes.source.erc20.lifetime_limit", ErrIsNotValidNumber) } else { if lifetimeLimit.Cmp(big.NewInt(0)) <= 0 { - errs.AddForProperty("proposal_submission.terms.change.update_asset.changes.source.erc20.lifetime_limit", ErrMustBePositive) + errs.AddForProperty("update_asset.changes.source.erc20.lifetime_limit", ErrMustBePositive) } } } if len(asset.WithdrawThreshold) == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_asset.changes.source.erc20.withdraw_threshold", ErrIsRequired) + errs.AddForProperty("update_asset.changes.source.erc20.withdraw_threshold", ErrIsRequired) } else { if withdrawThreshold, ok := big.NewInt(0).SetString(asset.WithdrawThreshold, 10); !ok { - errs.AddForProperty("proposal_submission.terms.change.update_asset.changes.source.erc20.withdraw_threshold", ErrIsNotValidNumber) + errs.AddForProperty("update_asset.changes.source.erc20.withdraw_threshold", ErrIsNotValidNumber) } else { if withdrawThreshold.Cmp(big.NewInt(0)) <= 0 { - errs.AddForProperty("proposal_submission.terms.change.update_asset.changes.source.erc20.withdraw_threshold", ErrMustBePositive) + errs.AddForProperty("update_asset.changes.source.erc20.withdraw_threshold", ErrMustBePositive) } } } @@ -785,15 +819,20 @@ func checkNewSpotMarketChanges(change *protoTypes.ProposalTerms_NewSpotMarket) E return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes", ErrIsRequired) } - changes := change.NewSpotMarket.Changes + return checkNewSpotMarketConfiguration(change.NewSpotMarket.Changes).AddPrefix("proposal_submission.terms.change.") +} + +func checkNewSpotMarketConfiguration(changes *vegapb.NewSpotMarketConfiguration) Errors { + errs := NewErrors() + isCorrectProduct := false if changes.Instrument == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.instrument", ErrIsRequired) + return errs.FinalAddForProperty("new_spot_market.changes.instrument", ErrIsRequired) } if changes.Instrument.Product == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.instrument.product", ErrIsRequired) + return errs.FinalAddForProperty("new_spot_market.changes.instrument.product", ErrIsRequired) } switch changes.Instrument.Product.(type) { @@ -804,20 +843,20 @@ func checkNewSpotMarketChanges(change *protoTypes.ProposalTerms_NewSpotMarket) E } if !isCorrectProduct { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.instrument.product", ErrIsMismatching) + return errs.FinalAddForProperty("new_spot_market.changes.instrument.product", ErrIsMismatching) } if changes.DecimalPlaces >= 150 { - errs.AddForProperty("proposal_submission.terms.change.new_spot_market.changes.decimal_places", ErrMustBeLessThan150) + errs.AddForProperty("new_spot_market.changes.decimal_places", ErrMustBeLessThan150) } if changes.PositionDecimalPlaces >= 7 || changes.PositionDecimalPlaces <= -7 { - errs.AddForProperty("proposal_submission.terms.change.new_spot_market.changes.position_decimal_places", ErrMustBeWithinRange7) + errs.AddForProperty("new_spot_market.changes.position_decimal_places", ErrMustBeWithinRange7) } - errs.Merge(checkPriceMonitoring(changes.PriceMonitoringParameters, "proposal_submission.terms.change.new_spot_market.changes")) - errs.Merge(checkTargetStakeParams(changes.TargetStakeParameters, "proposal_submission.terms.change.new_spot_market.changes")) - errs.Merge(checkNewInstrument(changes.Instrument, "proposal_submission.terms.change.new_spot_market.changes.instrument")) + errs.Merge(checkPriceMonitoring(changes.PriceMonitoringParameters, "new_spot_market.changes")) + errs.Merge(checkTargetStakeParams(changes.TargetStakeParameters, "new_spot_market.changes")) + errs.Merge(checkNewInstrument(changes.Instrument, "new_spot_market.changes.instrument")) errs.Merge(checkNewSpotRiskParameters(changes)) - errs.Merge(checkSLAParams(changes.SlaParams, "proposal_submission.terms.change.new_spot_market.changes.sla_params")) + errs.Merge(checkSLAParams(changes.SlaParams, "new_spot_market.changes.sla_params")) return errs } @@ -832,55 +871,51 @@ func checkNewMarketChanges(change *protoTypes.ProposalTerms_NewMarket) Errors { return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes", ErrIsRequired) } - changes := change.NewMarket.Changes + return checkNewMarketChangesConfiguration(change.NewMarket.Changes).AddPrefix("proposal_submission.terms.change.") +} + +func checkNewMarketChangesConfiguration(changes *vegapb.NewMarketConfiguration) Errors { + errs := NewErrors() if changes.DecimalPlaces >= 150 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.decimal_places", ErrMustBeLessThan150) + errs.AddForProperty("new_market.changes.decimal_places", ErrMustBeLessThan150) } if changes.PositionDecimalPlaces >= 7 || changes.PositionDecimalPlaces <= -7 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.position_decimal_places", ErrMustBeWithinRange7) + errs.AddForProperty("new_market.changes.position_decimal_places", ErrMustBeWithinRange7) } if len(changes.LinearSlippageFactor) > 0 { linearSlippage, err := num.DecimalFromString(changes.LinearSlippageFactor) if err != nil { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.linear_slippage_factor", ErrIsNotValidNumber) + errs.AddForProperty("new_market.changes.linear_slippage_factor", ErrIsNotValidNumber) } else if linearSlippage.IsNegative() { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.linear_slippage_factor", ErrMustBePositiveOrZero) + errs.AddForProperty("new_market.changes.linear_slippage_factor", ErrMustBePositiveOrZero) } else if linearSlippage.GreaterThan(num.DecimalFromInt64(1000000)) { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.linear_slippage_factor", ErrMustBeAtMost1M) + errs.AddForProperty("new_market.changes.linear_slippage_factor", ErrMustBeAtMost1M) } } - if len(changes.QuadraticSlippageFactor) > 0 { - squaredSlippage, err := num.DecimalFromString(changes.QuadraticSlippageFactor) - if err != nil { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.quadratic_slippage_factor", ErrIsNotValidNumber) - } else if squaredSlippage.IsNegative() { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.quadratic_slippage_factor", ErrMustBePositiveOrZero) - } else if squaredSlippage.GreaterThan(num.DecimalFromInt64(1000000)) { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.quadratic_slippage_factor", ErrMustBeAtMost1M) - } - } if successor := changes.Successor; successor != nil { if len(successor.InsurancePoolFraction) == 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.successor.insurance_pool_fraction", ErrIsRequired) + errs.AddForProperty("new_market.changes.successor.insurance_pool_fraction", ErrIsRequired) } else { if ipf, err := num.DecimalFromString(successor.InsurancePoolFraction); err != nil { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.successor.insurance_pool_fraction", ErrIsNotValidNumber) + errs.AddForProperty("new_market.changes.successor.insurance_pool_fraction", ErrIsNotValidNumber) } else if ipf.IsNegative() || ipf.GreaterThan(num.DecimalFromInt64(1)) { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.successor.insurance_pool_fraction", ErrMustBeWithinRange01) + errs.AddForProperty("new_market.changes.successor.insurance_pool_fraction", ErrMustBeWithinRange01) } } } - errs.Merge(checkPriceMonitoring(changes.PriceMonitoringParameters, "proposal_submission.terms.change.new_market.changes")) - errs.Merge(checkLiquidityMonitoring(changes.LiquidityMonitoringParameters, "proposal_submission.terms.change.new_market.changes")) - errs.Merge(checkNewInstrument(changes.Instrument, "proposal_submission.terms.change.new_market.changes.instrument")) + errs.Merge(checkLiquidationStrategy(changes.LiquidationStrategy, "new_market.changes")) + errs.Merge(checkPriceMonitoring(changes.PriceMonitoringParameters, "new_market.changes")) + errs.Merge(checkLiquidityMonitoring(changes.LiquidityMonitoringParameters, "new_market.changes")) + errs.Merge(checkNewInstrument(changes.Instrument, "new_market.changes.instrument")) errs.Merge(checkNewRiskParameters(changes)) - errs.Merge(checkSLAParams(changes.LiquiditySlaParameters, "proposal_submission.terms.change.new_market.changes.sla_params")) - + errs.Merge(checkSLAParams(changes.LiquiditySlaParameters, "new_market.changes.sla_params")) + errs.Merge(checkLiquidityFeeSettings(changes.LiquidityFeeSettings, "new_market.changes.liquidity_fee_settings")) + errs.Merge(checkCompositePriceConfiguration(changes.MarkPriceConfiguration, "new_market.changes.mark_price_configuration")) return errs } @@ -891,46 +926,43 @@ func checkUpdateMarketChanges(change *protoTypes.ProposalTerms_UpdateMarket) Err return errs.FinalAddForProperty("proposal_submission.terms.change.update_market", ErrIsRequired) } - if len(change.UpdateMarket.MarketId) == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_market.market_id", ErrIsRequired) - } else if !IsVegaID(change.UpdateMarket.MarketId) { - errs.AddForProperty("proposal_submission.terms.change.update_market.market_id", ErrShouldBeAValidVegaID) + return checkUpdateMarket(change.UpdateMarket).AddPrefix("proposal_submission.terms.change.") +} + +func checkUpdateMarket(updateMarket *vegapb.UpdateMarket) Errors { + errs := NewErrors() + + if len(updateMarket.MarketId) == 0 { + errs.AddForProperty("update_market.market_id", ErrIsRequired) + } else if !IsVegaID(updateMarket.MarketId) { + errs.AddForProperty("update_market.market_id", ErrShouldBeAValidVegaID) } - if change.UpdateMarket.Changes == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes", ErrIsRequired) + if updateMarket.Changes == nil { + return errs.FinalAddForProperty("update_market.changes", ErrIsRequired) } - changes := change.UpdateMarket.Changes + changes := updateMarket.Changes if len(changes.LinearSlippageFactor) > 0 { linearSlippage, err := num.DecimalFromString(changes.LinearSlippageFactor) if err != nil { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.linear_slippage_factor", ErrIsNotValidNumber) + errs.AddForProperty("update_market.changes.linear_slippage_factor", ErrIsNotValidNumber) } else if linearSlippage.IsNegative() { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.linear_slippage_factor", ErrMustBePositiveOrZero) + errs.AddForProperty("update_market.changes.linear_slippage_factor", ErrMustBePositiveOrZero) } else if linearSlippage.GreaterThan(num.DecimalFromInt64(1000000)) { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.linear_slippage_factor", ErrMustBeAtMost1M) - } - } - - if len(changes.QuadraticSlippageFactor) > 0 { - squaredSlippage, err := num.DecimalFromString(changes.QuadraticSlippageFactor) - if err != nil { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.quadratic_slippage_factor", ErrIsNotValidNumber) - } else if squaredSlippage.IsNegative() { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.quadratic_slippage_factor", ErrMustBePositiveOrZero) - } else if squaredSlippage.GreaterThan(num.DecimalFromInt64(1000000)) { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.quadratic_slippage_factor", ErrMustBeAtMost1M) + errs.AddForProperty("update_market.changes.linear_slippage_factor", ErrMustBeAtMost1M) } } - errs.Merge(checkPriceMonitoring(changes.PriceMonitoringParameters, "proposal_submission.terms.change.update_market.changes")) - errs.Merge(checkLiquidityMonitoring(changes.LiquidityMonitoringParameters, "proposal_submission.terms.change.update_market.changes")) + errs.Merge(checkLiquidationStrategy(changes.LiquidationStrategy, "update_market.changes")) + errs.Merge(checkPriceMonitoring(changes.PriceMonitoringParameters, "update_market.changes")) + errs.Merge(checkLiquidityMonitoring(changes.LiquidityMonitoringParameters, "update_market.changes")) errs.Merge(checkUpdateInstrument(changes.Instrument)) errs.Merge(checkUpdateRiskParameters(changes)) - errs.Merge(checkSLAParams(changes.LiquiditySlaParameters, "proposal_submission.terms.change.update_market.changes.sla_params")) - + errs.Merge(checkSLAParams(changes.LiquiditySlaParameters, "update_market.changes.sla_params")) + errs.Merge(checkLiquidityFeeSettings(changes.LiquidityFeeSettings, "update_market.changes.liquidity_fee_settings")) + errs.Merge(checkCompositePriceConfiguration(changes.MarkPriceConfiguration, "update_market.changes.mark_price_configuration")) return errs } @@ -941,21 +973,27 @@ func checkUpdateSpotMarketChanges(change *protoTypes.ProposalTerms_UpdateSpotMar return errs.FinalAddForProperty("proposal_submission.terms.change.update_spot_market", ErrIsRequired) } - if len(change.UpdateSpotMarket.MarketId) == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_spot_market.market_id", ErrIsRequired) - } else if !IsVegaID(change.UpdateSpotMarket.MarketId) { - errs.AddForProperty("proposal_submission.terms.change.update_spot_market.market_id", ErrShouldBeAValidVegaID) + return checkUpdateSpotMarket(change.UpdateSpotMarket).AddPrefix("proposal_submission.terms.change.") +} + +func checkUpdateSpotMarket(updateSpotMarket *vegapb.UpdateSpotMarket) Errors { + errs := NewErrors() + + if len(updateSpotMarket.MarketId) == 0 { + errs.AddForProperty("update_spot_market.market_id", ErrIsRequired) + } else if !IsVegaID(updateSpotMarket.MarketId) { + errs.AddForProperty("update_spot_market.market_id", ErrShouldBeAValidVegaID) } - if change.UpdateSpotMarket.Changes == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_spot_market.changes", ErrIsRequired) + if updateSpotMarket.Changes == nil { + return errs.FinalAddForProperty("update_spot_market.changes", ErrIsRequired) } - changes := change.UpdateSpotMarket.Changes - errs.Merge(checkPriceMonitoring(changes.PriceMonitoringParameters, "proposal_submission.terms.change.update_spot_market.changes")) - errs.Merge(checkTargetStakeParams(changes.TargetStakeParameters, "proposal_submission.terms.change.update_spot_market.changes")) + changes := updateSpotMarket.Changes + errs.Merge(checkPriceMonitoring(changes.PriceMonitoringParameters, "update_spot_market.changes")) + errs.Merge(checkTargetStakeParams(changes.TargetStakeParameters, "update_spot_market.changes")) errs.Merge(checkUpdateSpotRiskParameters(changes)) - errs.Merge(checkSLAParams(changes.SlaParams, "proposal_submission.terms.change.update_spot_market.changes.sla_params")) + errs.Merge(checkSLAParams(changes.SlaParams, "update_spot_market.changes.sla_params")) return errs } @@ -995,6 +1033,29 @@ func checkPriceMonitoring(parameters *protoTypes.PriceMonitoringParameters, pare return errs } +func checkLiquidationStrategy(params *protoTypes.LiquidationStrategy, parent string) Errors { + errs := NewErrors() + if params == nil { + // @TODO these will be required, in that case the check for nil should be removed + // or return an error. + return errs + } + dispFrac, err := num.DecimalFromString(params.DisposalFraction) + if err != nil || dispFrac.IsNegative() || dispFrac.IsZero() || dispFrac.GreaterThan(num.DecimalOne()) { + errs.AddForProperty(fmt.Sprintf("%s.liquidation_strategy.disposal_fraction", parent), ErrMustBeBetween01) + } + maxFrac, err := num.DecimalFromString(params.MaxFractionConsumed) + if err != nil || maxFrac.IsNegative() || maxFrac.IsZero() || maxFrac.GreaterThan(num.DecimalOne()) { + errs.AddForProperty(fmt.Sprintf("%s.liquidation_strategy.max_fraction_consumed", parent), ErrMustBeBetween01) + } + if params.DisposalTimeStep < 1 { + errs.AddForProperty(fmt.Sprintf("%s.liquidation_strategy.disposal_time_step", parent), ErrMustBePositive) + } else if params.DisposalTimeStep > 3600 { + errs.AddForProperty(fmt.Sprintf("%s.liquidation_strategy.disposal_time_step", parent), ErrMustBeAtMost3600) + } + return errs +} + func checkLiquidityMonitoring(parameters *protoTypes.LiquidityMonitoringParameters, parentProperty string) Errors { errs := NewErrors() @@ -1002,24 +1063,6 @@ func checkLiquidityMonitoring(parameters *protoTypes.LiquidityMonitoringParamete return errs.FinalAddForProperty(fmt.Sprintf("%s.liquidity_monitoring_parameters", parentProperty), ErrIsRequired) } - if len(parameters.TriggeringRatio) == 0 { - return errs.FinalAddForProperty(fmt.Sprintf("%s.liquidity_monitoring_parameters.triggering_ratio", parentProperty), ErrIsNotValidNumber) - } - - tr, err := num.DecimalFromString(parameters.TriggeringRatio) - if err != nil { - errs.AddForProperty( - fmt.Sprintf("%s.liquidity_monitoring_parameters.triggering_ratio", parentProperty), - fmt.Errorf("error parsing triggering ratio value: %s", err.Error()), - ) - } - if tr.IsNegative() || tr.GreaterThan(num.DecimalOne()) { - errs.AddForProperty( - fmt.Sprintf("%s.liquidity_monitoring_parameters.triggering_ratio", parentProperty), - errors.New("should be between 0 (inclusive) and 1 (inclusive)"), - ) - } - if parameters.TargetStakeParameters == nil { return errs.FinalAddForProperty(fmt.Sprintf("%s.liquidity_monitoring_parameters.target_stake_parameters", parentProperty), ErrIsRequired) } @@ -1070,7 +1113,7 @@ func checkNewInstrument(instrument *protoTypes.InstrumentConfiguration, parent s case *protoTypes.InstrumentConfiguration_Future: errs.Merge(checkNewFuture(product.Future)) case *protoTypes.InstrumentConfiguration_Perpetual: - errs.Merge(checkNewPerps(product.Perpetual)) + errs.Merge(checkNewPerps(product.Perpetual, fmt.Sprintf("%s.product", parent))) case *protoTypes.InstrumentConfiguration_Spot: errs.Merge(checkNewSpot(product.Spot)) default: @@ -1084,24 +1127,28 @@ func checkUpdateInstrument(instrument *protoTypes.UpdateInstrumentConfiguration) errs := NewErrors() if instrument == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.instrument", ErrIsRequired) + return errs.FinalAddForProperty("update_market.changes.instrument", ErrIsRequired) } if len(instrument.Code) == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.instrument.code", ErrIsRequired) + errs.AddForProperty("update_market.changes.instrument.code", ErrIsRequired) + } + + if len(instrument.Name) == 0 { + errs.AddForProperty("update_market.changes.instrument.name", ErrIsRequired) } if instrument.Product == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product", ErrIsRequired) + return errs.FinalAddForProperty("update_market.changes.instrument.product", ErrIsRequired) } switch product := instrument.Product.(type) { case *protoTypes.UpdateInstrumentConfiguration_Future: errs.Merge(checkUpdateFuture(product.Future)) case *protoTypes.UpdateInstrumentConfiguration_Perpetual: - errs.Merge(checkUpdatePerps(product.Perpetual)) + errs.Merge(checkUpdatePerps(product.Perpetual, "update_market.changes.instrument.product")) default: - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product", ErrIsNotValid) + return errs.FinalAddForProperty("update_market.changes.instrument.product", ErrIsNotValid) } return errs @@ -1111,56 +1158,56 @@ func checkNewFuture(future *protoTypes.FutureProduct) Errors { errs := NewErrors() if future == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.future", ErrIsRequired) + return errs.FinalAddForProperty("new_market.changes.instrument.product.future", ErrIsRequired) } if len(future.SettlementAsset) == 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.future.settlement_asset", ErrIsRequired) + errs.AddForProperty("new_market.changes.instrument.product.future.settlement_asset", ErrIsRequired) } if len(future.QuoteName) == 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.future.quote_name", ErrIsRequired) + errs.AddForProperty("new_market.changes.instrument.product.future.quote_name", ErrIsRequired) } - errs.Merge(checkDataSourceSpec(future.DataSourceSpecForSettlementData, "data_source_spec_for_settlement_data", "proposal_submission.terms.change.new_market.changes.instrument.product.future", true)) - errs.Merge(checkDataSourceSpec(future.DataSourceSpecForTradingTermination, "data_source_spec_for_trading_termination", "proposal_submission.terms.change.new_market.changes.instrument.product.future", false)) + errs.Merge(checkDataSourceSpec(future.DataSourceSpecForSettlementData, "data_source_spec_for_settlement_data", "new_market.changes.instrument.product.future", true)) + errs.Merge(checkDataSourceSpec(future.DataSourceSpecForTradingTermination, "data_source_spec_for_trading_termination", "new_market.changes.instrument.product.future", false)) errs.Merge(checkNewOracleBinding(future)) return errs } -func checkNewPerps(perps *protoTypes.PerpetualProduct) Errors { +func checkNewPerps(perps *protoTypes.PerpetualProduct, parentProperty string) Errors { errs := NewErrors() if perps == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps", ErrIsRequired) + return errs.FinalAddForProperty(fmt.Sprintf("%s.perps", parentProperty), ErrIsRequired) } if len(perps.SettlementAsset) == 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.settlement_asset", ErrIsRequired) + errs.AddForProperty(fmt.Sprintf("%s.perps.settlement_asset", parentProperty), ErrIsRequired) } if len(perps.QuoteName) == 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.quote_name", ErrIsRequired) + errs.AddForProperty(fmt.Sprintf("%s.perps.quote_name", parentProperty), ErrIsRequired) } if len(perps.MarginFundingFactor) <= 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.margin_funding_factor", ErrIsRequired) + errs.AddForProperty(fmt.Sprintf("%s.perps.margin_funding_factor", parentProperty), ErrIsRequired) } else { mff, err := num.DecimalFromString(perps.MarginFundingFactor) if err != nil { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.margin_funding_factor", ErrIsNotValidNumber) + errs.AddForProperty(fmt.Sprintf("%s.perps.margin_funding_factor", parentProperty), ErrIsNotValidNumber) } else if mff.IsNegative() || mff.GreaterThan(num.DecimalOne()) { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.margin_funding_factor", ErrMustBeWithinRange01) + errs.AddForProperty(fmt.Sprintf("%s.perps.margin_funding_factor", parentProperty), ErrMustBeWithinRange01) } } if len(perps.InterestRate) <= 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.interest_rate", ErrIsRequired) + errs.AddForProperty(fmt.Sprintf("%s.perps.interest_rate", parentProperty), ErrIsRequired) } else { mff, err := num.DecimalFromString(perps.InterestRate) if err != nil { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.interest_rate", ErrIsNotValidNumber) + errs.AddForProperty(fmt.Sprintf("%s.perps.interest_rate", parentProperty), ErrIsNotValidNumber) } else if mff.LessThan(num.MustDecimalFromString("-1")) || mff.GreaterThan(num.DecimalOne()) { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.interest_rate", ErrMustBeWithinRange11) + errs.AddForProperty(fmt.Sprintf("%s.perps.interest_rate", parentProperty), ErrMustBeWithinRange11) } } @@ -1171,39 +1218,72 @@ func checkNewPerps(perps *protoTypes.PerpetualProduct) Errors { ) if len(perps.ClampLowerBound) <= 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.clamp_lower_bound", ErrIsRequired) + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_lower_bound", parentProperty), ErrIsRequired) } else { clampLowerBound, err = num.DecimalFromString(perps.ClampLowerBound) if err != nil { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.clamp_lower_bound", ErrIsNotValidNumber) + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_lower_bound", parentProperty), ErrIsNotValidNumber) } else if clampLowerBound.LessThan(num.MustDecimalFromString("-1")) || clampLowerBound.GreaterThan(num.DecimalOne()) { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.clamp_lower_bound", ErrMustBeWithinRange11) + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_lower_bound", parentProperty), ErrMustBeWithinRange11) } else { okClampLowerBound = true } } if len(perps.ClampUpperBound) <= 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.clamp_upper_bound", ErrIsRequired) + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_upper_bound", parentProperty), ErrIsRequired) } else { clampUpperBound, err = num.DecimalFromString(perps.ClampUpperBound) if err != nil { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.clamp_upper_bound", ErrIsNotValidNumber) + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_upper_bound", parentProperty), ErrIsNotValidNumber) } else if clampUpperBound.LessThan(num.MustDecimalFromString("-1")) || clampUpperBound.GreaterThan(num.DecimalOne()) { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.clamp_upper_bound", ErrMustBeWithinRange11) + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_upper_bound", parentProperty), ErrMustBeWithinRange11) } else { okClampUpperBound = true } } if okClampLowerBound && okClampUpperBound && clampUpperBound.LessThan(clampLowerBound) { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.clamp_upper_bound", ErrMustBeGTEClampLowerBound) + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_upper_bound", parentProperty), ErrMustBeGTEClampLowerBound) } - errs.Merge(checkDataSourceSpec(perps.DataSourceSpecForSettlementData, "data_source_spec_for_settlement_data", "proposal_submission.terms.change.new_market.changes.instrument.product.perps", true)) - errs.Merge(checkDataSourceSpec(perps.DataSourceSpecForSettlementSchedule, "data_source_spec_for_settlement_schedule", "proposal_submission.terms.change.new_market.changes.instrument.product.perps", true)) + if perps.FundingRateScalingFactor != nil { + sf, err := num.DecimalFromString(*perps.FundingRateScalingFactor) + if err != nil { + errs.AddForProperty(fmt.Sprintf("%s.perps.funding_rate_scaling_factor", parentProperty), ErrIsNotValidNumber) + } + if !sf.IsPositive() { + errs.AddForProperty(fmt.Sprintf("%s.perps.funding_rate_scaling_factor", parentProperty), ErrMustBePositive) + } + } + + var lowerBound, upperBound num.Decimal + if perps.FundingRateLowerBound != nil { + if lowerBound, err = num.DecimalFromString(*perps.FundingRateLowerBound); err != nil { + errs.AddForProperty(fmt.Sprintf("%s.perps.funding_rate_lower_bound", parentProperty), ErrIsNotValidNumber) + } + } + + if perps.FundingRateUpperBound != nil { + if upperBound, err = num.DecimalFromString(*perps.FundingRateUpperBound); err != nil { + errs.AddForProperty(fmt.Sprintf("%s.perps.funding_rate_upper_bound", parentProperty), ErrIsNotValidNumber) + } + } + + if perps.FundingRateLowerBound != nil && perps.FundingRateUpperBound != nil { + if lowerBound.GreaterThan(upperBound) { + errs.AddForProperty(fmt.Sprintf("%s.perps.funding_rate_lower_bound", parentProperty), ErrIsNotValid) + } + } + + errs.Merge(checkDataSourceSpec(perps.DataSourceSpecForSettlementData, "data_source_spec_for_settlement_data", fmt.Sprintf("%s.perps", parentProperty), true)) + errs.Merge(checkDataSourceSpec(perps.DataSourceSpecForSettlementSchedule, "data_source_spec_for_settlement_schedule", fmt.Sprintf("%s.perps", parentProperty), true)) errs.Merge(checkNewPerpsOracleBinding(perps)) + if perps.InternalCompositePriceConfiguration != nil { + errs.Merge(checkCompositePriceConfiguration(perps.InternalCompositePriceConfiguration, fmt.Sprintf("%s.perps.internal_composite_price_configuration", parentProperty))) + } + return errs } @@ -1211,20 +1291,20 @@ func checkNewSpot(spot *protoTypes.SpotProduct) Errors { errs := NewErrors() if spot == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.instrument.product.spot", ErrIsRequired) + return errs.FinalAddForProperty("new_spot_market.changes.instrument.product.spot", ErrIsRequired) } if len(spot.BaseAsset) == 0 { - errs.AddForProperty("proposal_submission.terms.change.new_spot_market.changes.instrument.product.spot.base_asset", ErrIsRequired) + errs.AddForProperty("new_spot_market.changes.instrument.product.spot.base_asset", ErrIsRequired) } if len(spot.QuoteAsset) == 0 { - errs.AddForProperty("proposal_submission.terms.change.new_spot_market.changes.instrument.product.spot.quote_asset", ErrIsRequired) + errs.AddForProperty("new_spot_market.changes.instrument.product.spot.quote_asset", ErrIsRequired) } if spot.BaseAsset == spot.QuoteAsset { - errs.AddForProperty("proposal_submission.terms.change.new_spot_market.changes.instrument.product.spot.quote_asset", ErrIsNotValid) + errs.AddForProperty("new_spot_market.changes.instrument.product.spot.quote_asset", ErrIsNotValid) } if len(spot.Name) == 0 { - errs.AddForProperty("proposal_submission.terms.change.new_spot_market.changes.instrument.product.spot.name", ErrIsRequired) + errs.AddForProperty("new_spot_market.changes.instrument.product.spot.name", ErrIsRequired) } return errs } @@ -1233,35 +1313,126 @@ func checkUpdateFuture(future *protoTypes.UpdateFutureProduct) Errors { errs := NewErrors() if future == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product.future", ErrIsRequired) + return errs.FinalAddForProperty("update_market.changes.instrument.product.future", ErrIsRequired) } if len(future.QuoteName) == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product.future.quote_name", ErrIsRequired) + errs.AddForProperty("update_market.changes.instrument.product.future.quote_name", ErrIsRequired) } - errs.Merge(checkDataSourceSpec(future.DataSourceSpecForSettlementData, "data_source_spec_for_settlement_data", "proposal_submission.terms.change.update_market.changes.instrument.product.future", true)) - errs.Merge(checkDataSourceSpec(future.DataSourceSpecForTradingTermination, "data_source_spec_for_trading_termination", "proposal_submission.terms.change.update_market.changes.instrument.product.future", false)) + errs.Merge(checkDataSourceSpec(future.DataSourceSpecForSettlementData, "data_source_spec_for_settlement_data", "update_market.changes.instrument.product.future", true)) + errs.Merge(checkDataSourceSpec(future.DataSourceSpecForTradingTermination, "data_source_spec_for_trading_termination", "update_market.changes.instrument.product.future", false)) errs.Merge(checkUpdateOracleBinding(future)) return errs } -func checkUpdatePerps(perps *protoTypes.UpdatePerpetualProduct) Errors { +func checkUpdatePerps(perps *protoTypes.UpdatePerpetualProduct, parentProperty string) Errors { errs := NewErrors() if perps == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product.future", ErrIsRequired) + return errs.FinalAddForProperty(fmt.Sprintf("%s.perps", parentProperty), ErrIsRequired) } if len(perps.QuoteName) == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product.future.quote_name", ErrIsRequired) + errs.AddForProperty(fmt.Sprintf("%s.perps.quote_name", parentProperty), ErrIsRequired) + } + + if len(perps.MarginFundingFactor) <= 0 { + errs.AddForProperty(fmt.Sprintf("%s.perps.margin_funding_factor", parentProperty), ErrIsRequired) + } else { + mff, err := num.DecimalFromString(perps.MarginFundingFactor) + if err != nil { + errs.AddForProperty(fmt.Sprintf("%s.perps.margin_funding_factor", parentProperty), ErrIsNotValidNumber) + } else if mff.IsNegative() || mff.GreaterThan(num.DecimalOne()) { + errs.AddForProperty(fmt.Sprintf("%s.perps.margin_funding_factor", parentProperty), ErrMustBeWithinRange01) + } + } + + if len(perps.InterestRate) <= 0 { + errs.AddForProperty(fmt.Sprintf("%s.perps.interest_rate", parentProperty), ErrIsRequired) + } else { + mff, err := num.DecimalFromString(perps.InterestRate) + if err != nil { + errs.AddForProperty(fmt.Sprintf("%s.perps.interest_rate", parentProperty), ErrIsNotValidNumber) + } else if mff.LessThan(num.MustDecimalFromString("-1")) || mff.GreaterThan(num.DecimalOne()) { + errs.AddForProperty(fmt.Sprintf("%s.perps.interest_rate", parentProperty), ErrMustBeWithinRange11) + } + } + + var ( + okClampLowerBound, okClampUpperBound bool + clampLowerBound, clampUpperBound num.Decimal + err error + ) + + if len(perps.ClampLowerBound) <= 0 { + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_lower_bound", parentProperty), ErrIsRequired) + } else { + clampLowerBound, err = num.DecimalFromString(perps.ClampLowerBound) + if err != nil { + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_lower_bound", parentProperty), ErrIsNotValidNumber) + } else if clampLowerBound.LessThan(num.MustDecimalFromString("-1")) || clampLowerBound.GreaterThan(num.DecimalOne()) { + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_lower_bound", parentProperty), ErrMustBeWithinRange11) + } else { + okClampLowerBound = true + } + } + + if len(perps.ClampUpperBound) <= 0 { + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_upper_bound", parentProperty), ErrIsRequired) + } else { + clampUpperBound, err = num.DecimalFromString(perps.ClampUpperBound) + if err != nil { + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_upper_bound", parentProperty), ErrIsNotValidNumber) + } else if clampUpperBound.LessThan(num.MustDecimalFromString("-1")) || clampUpperBound.GreaterThan(num.DecimalOne()) { + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_upper_bound", parentProperty), ErrMustBeWithinRange11) + } else { + okClampUpperBound = true + } + } + + if okClampLowerBound && okClampUpperBound && clampUpperBound.LessThan(clampLowerBound) { + errs.AddForProperty(fmt.Sprintf("%s.perps.clamp_upper_bound", parentProperty), ErrMustBeGTEClampLowerBound) + } + + if perps.FundingRateScalingFactor != nil { + sf, err := num.DecimalFromString(*perps.FundingRateScalingFactor) + if err != nil { + errs.AddForProperty(fmt.Sprintf("%s.perps.funding_rate_scaling_factor", parentProperty), ErrIsNotValidNumber) + } + if !sf.IsPositive() { + errs.AddForProperty(fmt.Sprintf("%s.perps.funding_rate_scaling_factor", parentProperty), ErrMustBePositive) + } + } + + var lowerBound, upperBound num.Decimal + if perps.FundingRateLowerBound != nil { + if lowerBound, err = num.DecimalFromString(*perps.FundingRateLowerBound); err != nil { + errs.AddForProperty(fmt.Sprintf("%s.perps.funding_rate_lower_bound", parentProperty), ErrIsNotValidNumber) + } + } + + if perps.FundingRateUpperBound != nil { + if upperBound, err = num.DecimalFromString(*perps.FundingRateUpperBound); err != nil { + errs.AddForProperty(fmt.Sprintf("%s.perps.funding_rate_upper_bound", parentProperty), ErrIsNotValidNumber) + } + } + + if perps.FundingRateLowerBound != nil && perps.FundingRateUpperBound != nil { + if lowerBound.GreaterThan(upperBound) { + errs.AddForProperty(fmt.Sprintf("%s.perps.funding_rate_lower_bound", parentProperty), ErrIsNotValid) + } } errs.Merge(checkDataSourceSpec(perps.DataSourceSpecForSettlementData, "data_source_spec_for_settlement_data", "proposal_submission.terms.change.update_market.changes.instrument.product.future", true)) errs.Merge(checkDataSourceSpec(perps.DataSourceSpecForSettlementSchedule, "data_source_spec_for_settlement_schedule", "proposal_submission.terms.change.new_market.changes.instrument.product.perps", true)) errs.Merge(checkUpdatePerpsOracleBinding(perps)) + if perps.InternalCompositePriceConfiguration != nil { + errs.Merge(checkCompositePriceConfiguration(perps.InternalCompositePriceConfiguration, fmt.Sprintf("%s.perps.internal_composite_price_configuration", parentProperty))) + } + return errs } @@ -1329,7 +1500,10 @@ func checkDataSourceSpec(spec *vegapb.DataSourceDefinition, name string, parentP } } case *vegapb.DataSourceDefinition_External: - + if tp.External == nil { + errs.AddForProperty(fmt.Sprintf("%s.%s.external", parentProperty, name), ErrIsRequired) + return errs + } switch tp.External.SourceType.(type) { case *vegapb.DataSourceDefinitionExternal_Oracle: // If data source type is external - check if the signers are present first. @@ -1508,26 +1682,42 @@ func isBindingMatchingSpecFilters(spec *vegapb.DataSourceDefinition, bindingProp return bindingPropertyFound } +func checkCompositePriceBinding(binding *vegapb.SpecBindingForCompositePrice, definition *vegapb.DataSourceDefinition, property string) Errors { + errs := NewErrors() + + if binding == nil { + errs.AddForProperty(property, ErrIsRequired) + return errs + } + + if len(binding.PriceSourceProperty) == 0 { + errs.AddForProperty(property, ErrIsRequired) + } else if !isBindingMatchingSpec(definition, binding.PriceSourceProperty) { + errs.AddForProperty(fmt.Sprintf("%s.price_source_property", property), ErrIsMismatching) + } + return errs +} + func checkNewOracleBinding(future *protoTypes.FutureProduct) Errors { errs := NewErrors() if future.DataSourceSpecBinding != nil { if len(future.DataSourceSpecBinding.SettlementDataProperty) == 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.future.data_source_spec_binding.settlement_data_property", ErrIsRequired) + errs.AddForProperty("new_market.changes.instrument.product.future.data_source_spec_binding.settlement_data_property", ErrIsRequired) } else { if !isBindingMatchingSpec(future.DataSourceSpecForSettlementData, future.DataSourceSpecBinding.SettlementDataProperty) { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.future.data_source_spec_binding.settlement_data_property", ErrIsMismatching) + errs.AddForProperty("new_market.changes.instrument.product.future.data_source_spec_binding.settlement_data_property", ErrIsMismatching) } } if len(future.DataSourceSpecBinding.TradingTerminationProperty) == 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.future.data_source_spec_binding.trading_termination_property", ErrIsRequired) + errs.AddForProperty("new_market.changes.instrument.product.future.data_source_spec_binding.trading_termination_property", ErrIsRequired) } else { if future.DataSourceSpecForTradingTermination == nil || future.DataSourceSpecForTradingTermination.GetExternal() != nil && !isBindingMatchingSpec(future.DataSourceSpecForTradingTermination, future.DataSourceSpecBinding.TradingTerminationProperty) { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.future.data_source_spec_binding.trading_termination_property", ErrIsMismatching) + errs.AddForProperty("new_market.changes.instrument.product.future.data_source_spec_binding.trading_termination_property", ErrIsMismatching) } } } else { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.future.data_source_spec_binding", ErrIsRequired) + errs.AddForProperty("new_market.changes.instrument.product.future.data_source_spec_binding", ErrIsRequired) } return errs @@ -1538,14 +1728,14 @@ func checkNewPerpsOracleBinding(perps *protoTypes.PerpetualProduct) Errors { if perps.DataSourceSpecBinding != nil { if len(perps.DataSourceSpecBinding.SettlementDataProperty) == 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.data_source_spec_binding.settlement_data_property", ErrIsRequired) + errs.AddForProperty("new_market.changes.instrument.product.perps.data_source_spec_binding.settlement_data_property", ErrIsRequired) } else { if !isBindingMatchingSpec(perps.DataSourceSpecForSettlementData, perps.DataSourceSpecBinding.SettlementDataProperty) { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.data_source_spec_binding.settlement_data_property", ErrIsMismatching) + errs.AddForProperty("new_market.changes.instrument.product.perps.data_source_spec_binding.settlement_data_property", ErrIsMismatching) } } } else { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.instrument.product.perps.data_source_spec_binding", ErrIsRequired) + errs.AddForProperty("new_market.changes.instrument.product.perps.data_source_spec_binding", ErrIsRequired) } return errs @@ -1555,22 +1745,22 @@ func checkUpdateOracleBinding(future *protoTypes.UpdateFutureProduct) Errors { errs := NewErrors() if future.DataSourceSpecBinding != nil { if len(future.DataSourceSpecBinding.SettlementDataProperty) == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product.future.data_source_spec_binding.settlement_data_property", ErrIsRequired) + errs.AddForProperty("update_market.changes.instrument.product.future.data_source_spec_binding.settlement_data_property", ErrIsRequired) } else { if !isBindingMatchingSpec(future.DataSourceSpecForSettlementData, future.DataSourceSpecBinding.SettlementDataProperty) { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product.future.data_source_spec_binding.settlement_data_property", ErrIsMismatching) + errs.AddForProperty("update_market.changes.instrument.product.future.data_source_spec_binding.settlement_data_property", ErrIsMismatching) } } if len(future.DataSourceSpecBinding.TradingTerminationProperty) == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product.future.data_source_spec_binding.trading_termination_property", ErrIsRequired) + errs.AddForProperty("update_market.changes.instrument.product.future.data_source_spec_binding.trading_termination_property", ErrIsRequired) } else { if !isBindingMatchingSpec(future.DataSourceSpecForTradingTermination, future.DataSourceSpecBinding.TradingTerminationProperty) { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product.future.data_source_spec_binding.trading_termination_property", ErrIsMismatching) + errs.AddForProperty("update_market.changes.instrument.product.future.data_source_spec_binding.trading_termination_property", ErrIsMismatching) } } } else { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product.future.data_source_spec_binding", ErrIsRequired) + errs.AddForProperty("update_market.changes.instrument.product.future.data_source_spec_binding", ErrIsRequired) } return errs @@ -1580,14 +1770,14 @@ func checkUpdatePerpsOracleBinding(perps *protoTypes.UpdatePerpetualProduct) Err errs := NewErrors() if perps.DataSourceSpecBinding != nil { if len(perps.DataSourceSpecBinding.SettlementDataProperty) == 0 { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product.perps.data_source_spec_binding.settlement_data_property", ErrIsRequired) + errs.AddForProperty("update_market.changes.instrument.product.perps.data_source_spec_binding.settlement_data_property", ErrIsRequired) } else { if !isBindingMatchingSpec(perps.DataSourceSpecForSettlementData, perps.DataSourceSpecBinding.SettlementDataProperty) { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product.perps.data_source_spec_binding.settlement_data_property", ErrIsMismatching) + errs.AddForProperty("update_market.changes.instrument.product.perps.data_source_spec_binding.settlement_data_property", ErrIsMismatching) } } } else { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.instrument.product.perps.data_source_spec_binding", ErrIsRequired) + errs.AddForProperty("update_market.changes.instrument.product.perps.data_source_spec_binding", ErrIsRequired) } return errs @@ -1597,7 +1787,7 @@ func checkNewRiskParameters(config *protoTypes.NewMarketConfiguration) Errors { errs := NewErrors() if config.RiskParameters == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters", ErrIsRequired) + return errs.FinalAddForProperty("new_market.changes.risk_parameters", ErrIsRequired) } switch parameters := config.RiskParameters.(type) { @@ -1606,7 +1796,7 @@ func checkNewRiskParameters(config *protoTypes.NewMarketConfiguration) Errors { case *protoTypes.NewMarketConfiguration_LogNormal: errs.Merge(checkNewLogNormalRiskParameters(parameters)) default: - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters", ErrIsNotValid) + errs.AddForProperty("new_market.changes.risk_parameters", ErrIsNotValid) } return errs @@ -1646,6 +1836,156 @@ func checkSLAParams(config *protoTypes.LiquiditySLAParameters, parent string) Er return errs } +func checkLiquidityFeeSettings(config *protoTypes.LiquidityFeeSettings, parent string) Errors { + errs := NewErrors() + if config == nil { + return nil // no error, we'll default to margin-cost method + } + + // check for valid enum range + if config.Method == protoTypes.LiquidityFeeSettings_METHOD_UNSPECIFIED { + errs.AddForProperty(fmt.Sprintf("%s.method", parent), ErrIsRequired) + } + if _, ok := protoTypes.LiquidityFeeSettings_Method_name[int32(config.Method)]; !ok { + errs.AddForProperty(fmt.Sprintf("%s.method", parent), ErrIsNotValid) + } + + if config.FeeConstant == nil && config.Method == protoTypes.LiquidityFeeSettings_METHOD_CONSTANT { + errs.AddForProperty(fmt.Sprintf("%s.fee_constant", parent), ErrIsRequired) + } + + if config.FeeConstant != nil { + if config.Method != protoTypes.LiquidityFeeSettings_METHOD_CONSTANT { + errs.AddForProperty(fmt.Sprintf("%s.method", parent), ErrIsNotValid) + } + + fee, err := num.DecimalFromString(*config.FeeConstant) + switch { + case err != nil: + errs.AddForProperty(fmt.Sprintf("%s.fee_constant", parent), ErrIsNotValidNumber) + case fee.IsNegative(): + errs.AddForProperty(fmt.Sprintf("%s.fee_constant", parent), ErrMustBePositiveOrZero) + case fee.GreaterThan(num.DecimalOne()): + errs.AddForProperty(fmt.Sprintf("%s.fee_constant", parent), ErrMustBeWithinRange01) + } + } + + return errs +} + +func checkCompositePriceConfiguration(config *protoTypes.CompositePriceConfiguration, parent string) Errors { + errs := NewErrors() + if config == nil { + errs.AddForProperty(parent, ErrIsRequired) + return errs + } + if config.CompositePriceType == protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_UNSPECIFIED { + errs.AddForProperty(fmt.Sprintf("%s.composite_price_type", parent), ErrIsRequired) + } + + if _, ok := protoTypes.CompositePriceType_name[int32(config.CompositePriceType)]; !ok { + errs.AddForProperty(fmt.Sprintf("%s.composite_price_type", parent), ErrIsNotValid) + } + + if config.CompositePriceType != protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_LAST_TRADE { + if config.DecayPower > 3 || config.DecayPower < 1 { + errs.AddForProperty(fmt.Sprintf("%s.decay_power", parent), fmt.Errorf("must be in {1, 2, 3}")) + } + if len(config.DecayWeight) == 0 { + errs.AddForProperty(fmt.Sprintf("%s.decay_weight", parent), ErrIsRequired) + } else { + dw, err := num.DecimalFromString(config.DecayWeight) + if err != nil { + errs.AddForProperty(fmt.Sprintf("%s.decay_weight", parent), ErrIsNotValidNumber) + } else if dw.LessThan(num.DecimalZero()) || dw.GreaterThan(num.DecimalOne()) { + errs.AddForProperty(fmt.Sprintf("%s.decay_weight", parent), ErrMustBeWithinRange01) + } + } + if len(config.CashAmount) == 0 { + errs.AddForProperty(fmt.Sprintf("%s.cash_amount", parent), ErrIsRequired) + } else if n, overflow := num.UintFromString(config.CashAmount, 10); overflow || n.IsNegative() { + errs.AddForProperty(fmt.Sprintf("%s.cash_amount", parent), ErrIsNotValidNumber) + } + } else { + if config.DecayPower != 0 { + errs.AddForProperty(fmt.Sprintf("%s.decay_power", parent), fmt.Errorf("must not be defined for price type last trade")) + } + if len(config.DecayWeight) > 0 { + errs.AddForProperty(fmt.Sprintf("%s.decay_weight", parent), fmt.Errorf("must not be defined for price type last trade")) + } + if len(config.CashAmount) > 0 { + errs.AddForProperty(fmt.Sprintf("%s.cash_amount", parent), fmt.Errorf("must not be defined for price type last trade")) + } + if len(config.SourceStalenessTolerance) > 0 { + errs.AddForProperty(fmt.Sprintf("%s.source_staleness_tolerance", parent), fmt.Errorf("must not be defined for price type last trade")) + } + if len(config.SourceWeights) > 0 { + errs.AddForProperty(fmt.Sprintf("%s.source_weights", parent), fmt.Errorf("must not be defined for price type last trade")) + } + if len(config.DataSourcesSpec) > 0 { + errs.AddForProperty(fmt.Sprintf("%s.data_sources_spec", parent), fmt.Errorf("must not be defined for price type last trade")) + } + if len(config.DataSourcesSpec) > 0 { + errs.AddForProperty(fmt.Sprintf("%s.data_sources_spec_binding", parent), fmt.Errorf("must not be defined for price type last trade")) + } + } + + if config.CompositePriceType != protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED && len(config.SourceWeights) > 0 { + errs.AddForProperty(fmt.Sprintf("%s.source_weights", parent), fmt.Errorf("must be empty if composite price type is not weighted")) + } + + if config.CompositePriceType == protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED && len(config.SourceWeights) != 3+len(config.DataSourcesSpec) { + errs.AddForProperty(fmt.Sprintf("%s.source_weights", parent), fmt.Errorf("must be defined for all price sources")) + } + + if config.CompositePriceType == protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED && len(config.SourceWeights) != len(config.SourceStalenessTolerance) { + errs.AddForProperty(fmt.Sprintf("%s.source_staleness_tolerance", parent), fmt.Errorf("must have the same length as source_weights")) + } + + weightSum := num.DecimalZero() + for i, v := range config.SourceWeights { + if d, err := num.DecimalFromString(v); err != nil { + errs.AddForProperty(fmt.Sprintf("%s.source_weights.%d", parent, i), ErrIsNotValidNumber) + } else if d.LessThan(num.DecimalZero()) { + errs.AddForProperty(fmt.Sprintf("%s.source_weights.%d", parent, i), ErrMustBePositiveOrZero) + } else { + weightSum = weightSum.Add(d) + } + } + if config.CompositePriceType == protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED && weightSum.IsZero() { + errs.AddForProperty(fmt.Sprintf("%s.source_weights", parent), fmt.Errorf("must have at least one none zero weight")) + } + + for i, v := range config.SourceStalenessTolerance { + if _, err := time.ParseDuration(v); err != nil { + errs.AddForProperty(fmt.Sprintf("%s.source_staleness_tolerance.%d", parent, i), fmt.Errorf("must be a valid duration")) + } + } + if len(config.DataSourcesSpec) > 0 && len(config.DataSourcesSpec) != len(config.DataSourcesSpecBinding) { + errs.AddForProperty(fmt.Sprintf("%s.data_sources_spec", parent), fmt.Errorf("must be have the same number of elements as the corresponding bindings")) + } + if len(config.DataSourcesSpec) > 5 { + errs.AddForProperty(fmt.Sprintf("%s.data_sources_spec", parent), fmt.Errorf("too many data source specs - must be less than or equal to 5")) + } + if config.CompositePriceType != protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_LAST_TRADE && len(config.SourceStalenessTolerance) != 3+len(config.DataSourcesSpec) { + errs.AddForProperty(fmt.Sprintf("%s.source_staleness_tolerance", parent), fmt.Errorf("must included staleness information for all price sources")) + } + + if config.CompositePriceType == protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_LAST_TRADE && len(config.DataSourcesSpec) > 0 { + errs.AddForProperty(fmt.Sprintf("%s.data_sources_spec", parent), fmt.Errorf("are not supported for last trade composite price type")) + } + if len(config.DataSourcesSpec) != len(config.DataSourcesSpecBinding) { + errs.AddForProperty(fmt.Sprintf("%s.data_sources_spec_binding", parent), fmt.Errorf("must be defined for all oracles")) + } else if len(config.DataSourcesSpec) > 0 { + for i, dsd := range config.DataSourcesSpec { + errs.Merge(checkDataSourceSpec(dsd, fmt.Sprintf("data_sources_spec.%d", i), parent, true)) + errs.Merge(checkCompositePriceBinding(config.DataSourcesSpecBinding[i], dsd, fmt.Sprintf("%s.data_sources_spec_binding.%d", parent, i))) + } + } + + return errs +} + func checkNewSpotRiskParameters(config *protoTypes.NewSpotMarketConfiguration) Errors { errs := NewErrors() @@ -1669,7 +2009,7 @@ func checkUpdateRiskParameters(config *protoTypes.UpdateMarketConfiguration) Err errs := NewErrors() if config.RiskParameters == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters", ErrIsRequired) + return errs.FinalAddForProperty("update_market.changes.risk_parameters", ErrIsRequired) } switch parameters := config.RiskParameters.(type) { @@ -1678,7 +2018,7 @@ func checkUpdateRiskParameters(config *protoTypes.UpdateMarketConfiguration) Err case *protoTypes.UpdateMarketConfiguration_LogNormal: errs.Merge(checkUpdateLogNormalRiskParameters(parameters)) default: - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters", ErrIsNotValid) + errs.AddForProperty("update_market.changes.risk_parameters", ErrIsNotValid) } return errs @@ -1688,7 +2028,7 @@ func checkUpdateSpotRiskParameters(config *protoTypes.UpdateSpotMarketConfigurat errs := NewErrors() if config.RiskParameters == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters", ErrIsRequired) + return errs.FinalAddForProperty("update_spot_market.changes.risk_parameters", ErrIsRequired) } switch parameters := config.RiskParameters.(type) { @@ -1697,7 +2037,7 @@ func checkUpdateSpotRiskParameters(config *protoTypes.UpdateSpotMarketConfigurat case *protoTypes.UpdateSpotMarketConfiguration_LogNormal: errs.Merge(checkUpdateSpotLogNormalRiskParameters(parameters)) default: - errs.AddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters", ErrIsNotValid) + errs.AddForProperty("update_spot_market.changes.risk_parameters", ErrIsNotValid) } return errs @@ -1707,19 +2047,19 @@ func checkNewSimpleParameters(params *protoTypes.NewMarketConfiguration_Simple) errs := NewErrors() if params.Simple == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.simple", ErrIsRequired) + return errs.FinalAddForProperty("new_market.changes.risk_parameters.simple", ErrIsRequired) } if params.Simple.MinMoveDown > 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.simple.min_move_down", ErrMustBeNegativeOrZero) + errs.AddForProperty("new_market.changes.risk_parameters.simple.min_move_down", ErrMustBeNegativeOrZero) } if params.Simple.MaxMoveUp < 0 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.simple.max_move_up", ErrMustBePositiveOrZero) + errs.AddForProperty("new_market.changes.risk_parameters.simple.max_move_up", ErrMustBePositiveOrZero) } if params.Simple.ProbabilityOfTrading < 0 || params.Simple.ProbabilityOfTrading > 1 { - errs.AddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.simple.probability_of_trading", + errs.AddForProperty("new_market.changes.risk_parameters.simple.probability_of_trading", fmt.Errorf("should be between 0 (inclusive) and 1 (inclusive)"), ) } @@ -1731,19 +2071,19 @@ func checkNewSpotSimpleParameters(params *protoTypes.NewSpotMarketConfiguration_ errs := NewErrors() if params.Simple == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.simple", ErrIsRequired) + return errs.FinalAddForProperty("new_spot_market.changes.risk_parameters.simple", ErrIsRequired) } if params.Simple.MinMoveDown > 0 { - errs.AddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.simple.min_move_down", ErrMustBeNegativeOrZero) + errs.AddForProperty("new_spot_market.changes.risk_parameters.simple.min_move_down", ErrMustBeNegativeOrZero) } if params.Simple.MaxMoveUp < 0 { - errs.AddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.simple.max_move_up", ErrMustBePositiveOrZero) + errs.AddForProperty("new_spot_market.changes.risk_parameters.simple.max_move_up", ErrMustBePositiveOrZero) } if params.Simple.ProbabilityOfTrading < 0 || params.Simple.ProbabilityOfTrading > 1 { - errs.AddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.simple.probability_of_trading", + errs.AddForProperty("new_spot_market.changes.risk_parameters.simple.probability_of_trading", fmt.Errorf("should be between 0 (inclusive) and 1 (inclusive)"), ) } @@ -1755,19 +2095,19 @@ func checkUpdateSimpleParameters(params *protoTypes.UpdateMarketConfiguration_Si errs := NewErrors() if params.Simple == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters.simple", ErrIsRequired) + return errs.FinalAddForProperty("update_market.changes.risk_parameters.simple", ErrIsRequired) } if params.Simple.MinMoveDown > 0 { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters.simple.min_move_down", ErrMustBeNegativeOrZero) + errs.AddForProperty("update_market.changes.risk_parameters.simple.min_move_down", ErrMustBeNegativeOrZero) } if params.Simple.MaxMoveUp < 0 { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters.simple.max_move_up", ErrMustBePositiveOrZero) + errs.AddForProperty("update_market.changes.risk_parameters.simple.max_move_up", ErrMustBePositiveOrZero) } if params.Simple.ProbabilityOfTrading < 0 || params.Simple.ProbabilityOfTrading > 1 { - errs.AddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters.simple.probability_of_trading", + errs.AddForProperty("update_market.changes.risk_parameters.simple.probability_of_trading", fmt.Errorf("should be between 0 (inclusive) and 1 (inclusive)"), ) } @@ -1779,19 +2119,19 @@ func checkUpdateSpotSimpleParameters(params *protoTypes.UpdateSpotMarketConfigur errs := NewErrors() if params.Simple == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters.simple", ErrIsRequired) + return errs.FinalAddForProperty("update_spot_market.changes.risk_parameters.simple", ErrIsRequired) } if params.Simple.MinMoveDown > 0 { - errs.AddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters.simple.min_move_down", ErrMustBeNegativeOrZero) + errs.AddForProperty("update_spot_market.changes.risk_parameters.simple.min_move_down", ErrMustBeNegativeOrZero) } if params.Simple.MaxMoveUp < 0 { - errs.AddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters.simple.max_move_up", ErrMustBePositiveOrZero) + errs.AddForProperty("update_spot_market.changes.risk_parameters.simple.max_move_up", ErrMustBePositiveOrZero) } if params.Simple.ProbabilityOfTrading < 0 || params.Simple.ProbabilityOfTrading > 1 { - errs.AddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters.simple.probability_of_trading", + errs.AddForProperty("update_spot_market.changes.risk_parameters.simple.probability_of_trading", fmt.Errorf("should be between 0 (inclusive) and 1 (inclusive)"), ) } @@ -1803,43 +2143,43 @@ func checkNewLogNormalRiskParameters(params *protoTypes.NewMarketConfiguration_L errs := NewErrors() if params.LogNormal == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.log_normal", ErrIsRequired) + return errs.FinalAddForProperty("new_market.changes.risk_parameters.log_normal", ErrIsRequired) } if params.LogNormal.Params == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.log_normal.params", ErrIsRequired) + return errs.FinalAddForProperty("new_market.changes.risk_parameters.log_normal.params", ErrIsRequired) } if params.LogNormal.RiskAversionParameter < 1e-8 || params.LogNormal.RiskAversionParameter > 0.1 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.log_normal.risk_aversion_parameter", errors.New("must be between [1e-8, 0.1]")) + return errs.FinalAddForProperty("new_market.changes.risk_parameters.log_normal.risk_aversion_parameter", errors.New("must be between [1e-8, 0.1]")) } if params.LogNormal.Tau < 1e-8 || params.LogNormal.Tau > 1 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.log_normal.tau", errors.New("must be between [1e-8, 1]")) + return errs.FinalAddForProperty("new_market.changes.risk_parameters.log_normal.tau", errors.New("must be between [1e-8, 1]")) } if math.IsNaN(params.LogNormal.Params.Mu) { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.log_normal.params.mu", ErrIsNotValidNumber) + return errs.FinalAddForProperty("new_market.changes.risk_parameters.log_normal.params.mu", ErrIsNotValidNumber) } if params.LogNormal.Params.Mu < -1e-6 || params.LogNormal.Params.Mu > 1e-6 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.log_normal.params.mu", errors.New("must be between [-1e-6,1e-6]")) + return errs.FinalAddForProperty("new_market.changes.risk_parameters.log_normal.params.mu", errors.New("must be between [-1e-6,1e-6]")) } if math.IsNaN(params.LogNormal.Params.Sigma) { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.log_normal.params.sigma", ErrIsNotValidNumber) + return errs.FinalAddForProperty("new_market.changes.risk_parameters.log_normal.params.sigma", ErrIsNotValidNumber) } if params.LogNormal.Params.Sigma < 1e-3 || params.LogNormal.Params.Sigma > 50 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.log_normal.params.sigma", errors.New("must be between [1e-3,50]")) + return errs.FinalAddForProperty("new_market.changes.risk_parameters.log_normal.params.sigma", errors.New("must be between [1e-3,50]")) } if math.IsNaN(params.LogNormal.Params.R) { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.log_normal.params.r", ErrIsNotValidNumber) + return errs.FinalAddForProperty("new_market.changes.risk_parameters.log_normal.params.r", ErrIsNotValidNumber) } if params.LogNormal.Params.R < -1 || params.LogNormal.Params.R > 1 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_market.changes.risk_parameters.log_normal.params.r", errors.New("must be between [-1,1]")) + return errs.FinalAddForProperty("new_market.changes.risk_parameters.log_normal.params.r", errors.New("must be between [-1,1]")) } return errs @@ -1849,35 +2189,35 @@ func checkUpdateLogNormalRiskParameters(params *protoTypes.UpdateMarketConfigura errs := NewErrors() if params.LogNormal == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters.log_normal", ErrIsRequired) + return errs.FinalAddForProperty("update_market.changes.risk_parameters.log_normal", ErrIsRequired) } if params.LogNormal.Params == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters.log_normal.params", ErrIsRequired) + return errs.FinalAddForProperty("update_market.changes.risk_parameters.log_normal.params", ErrIsRequired) } if params.LogNormal.RiskAversionParameter <= 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters.log_normal.risk_aversion_parameter", ErrMustBePositive) + return errs.FinalAddForProperty("update_market.changes.risk_parameters.log_normal.risk_aversion_parameter", ErrMustBePositive) } if params.LogNormal.Tau <= 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters.log_normal.tau", ErrMustBePositive) + return errs.FinalAddForProperty("update_market.changes.risk_parameters.log_normal.tau", ErrMustBePositive) } if math.IsNaN(params.LogNormal.Params.Mu) { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters.log_normal.params.mu", ErrIsNotValidNumber) + return errs.FinalAddForProperty("update_market.changes.risk_parameters.log_normal.params.mu", ErrIsNotValidNumber) } if math.IsNaN(params.LogNormal.Params.Sigma) { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters.log_normal.params.sigma", ErrIsNotValidNumber) + return errs.FinalAddForProperty("update_market.changes.risk_parameters.log_normal.params.sigma", ErrIsNotValidNumber) } if params.LogNormal.Params.Sigma <= 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters.log_normal.params.sigma", ErrMustBePositive) + return errs.FinalAddForProperty("update_market.changes.risk_parameters.log_normal.params.sigma", ErrMustBePositive) } if math.IsNaN(params.LogNormal.Params.R) { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_market.changes.risk_parameters.log_normal.params.r", ErrIsNotValidNumber) + return errs.FinalAddForProperty("update_market.changes.risk_parameters.log_normal.params.r", ErrIsNotValidNumber) } return errs @@ -1887,43 +2227,43 @@ func checkNewSpotLogNormalRiskParameters(params *protoTypes.NewSpotMarketConfigu errs := NewErrors() if params.LogNormal == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.log_normal", ErrIsRequired) + return errs.FinalAddForProperty("new_spot_market.changes.risk_parameters.log_normal", ErrIsRequired) } if params.LogNormal.Params == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.log_normal.params", ErrIsRequired) + return errs.FinalAddForProperty("new_spot_market.changes.risk_parameters.log_normal.params", ErrIsRequired) } if params.LogNormal.RiskAversionParameter < 1e-8 || params.LogNormal.RiskAversionParameter > 0.1 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.log_normal.risk_aversion_parameter", errors.New("must be between [1e-8, 0.1]")) + return errs.FinalAddForProperty("new_spot_market.changes.risk_parameters.log_normal.risk_aversion_parameter", errors.New("must be between [1e-8, 0.1]")) } if params.LogNormal.Tau < 1e-8 || params.LogNormal.Tau > 1 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.log_normal.tau", errors.New("must be between [1e-8, 1]")) + return errs.FinalAddForProperty("new_spot_market.changes.risk_parameters.log_normal.tau", errors.New("must be between [1e-8, 1]")) } if math.IsNaN(params.LogNormal.Params.Mu) { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.log_normal.params.mu", ErrIsNotValidNumber) + return errs.FinalAddForProperty("new_spot_market.changes.risk_parameters.log_normal.params.mu", ErrIsNotValidNumber) } if params.LogNormal.Params.Mu < -1e-6 || params.LogNormal.Params.Mu > 1e-6 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.log_normal.params.mu", errors.New("must be between [-1e-6,1e-6]")) + return errs.FinalAddForProperty("new_spot_market.changes.risk_parameters.log_normal.params.mu", errors.New("must be between [-1e-6,1e-6]")) } if math.IsNaN(params.LogNormal.Params.Sigma) { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.log_normal.params.sigma", ErrIsNotValidNumber) + return errs.FinalAddForProperty("new_spot_market.changes.risk_parameters.log_normal.params.sigma", ErrIsNotValidNumber) } if params.LogNormal.Params.Sigma < 1e-3 || params.LogNormal.Params.Sigma > 50 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.log_normal.params.sigma", errors.New("must be between [1e-3,50]")) + return errs.FinalAddForProperty("new_spot_market.changes.risk_parameters.log_normal.params.sigma", errors.New("must be between [1e-3,50]")) } if math.IsNaN(params.LogNormal.Params.R) { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.log_normal.params.r", ErrIsNotValidNumber) + return errs.FinalAddForProperty("new_spot_market.changes.risk_parameters.log_normal.params.r", ErrIsNotValidNumber) } if params.LogNormal.Params.R < -1 || params.LogNormal.Params.R > 1 { - return errs.FinalAddForProperty("proposal_submission.terms.change.new_spot_market.changes.risk_parameters.log_normal.params.r", errors.New("must be between [-1,1]")) + return errs.FinalAddForProperty("new_spot_market.changes.risk_parameters.log_normal.params.r", errors.New("must be between [-1,1]")) } return errs @@ -1933,35 +2273,35 @@ func checkUpdateSpotLogNormalRiskParameters(params *protoTypes.UpdateSpotMarketC errs := NewErrors() if params.LogNormal == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters.log_normal", ErrIsRequired) + return errs.FinalAddForProperty("update_spot_market.changes.risk_parameters.log_normal", ErrIsRequired) } if params.LogNormal.Params == nil { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters.log_normal.params", ErrIsRequired) + return errs.FinalAddForProperty("update_spot_market.changes.risk_parameters.log_normal.params", ErrIsRequired) } if params.LogNormal.RiskAversionParameter <= 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters.log_normal.risk_aversion_parameter", ErrMustBePositive) + return errs.FinalAddForProperty("update_spot_market.changes.risk_parameters.log_normal.risk_aversion_parameter", ErrMustBePositive) } if params.LogNormal.Tau <= 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters.log_normal.tau", ErrMustBePositive) + return errs.FinalAddForProperty("update_spot_market.changes.risk_parameters.log_normal.tau", ErrMustBePositive) } if math.IsNaN(params.LogNormal.Params.Mu) { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters.log_normal.params.mu", ErrIsNotValidNumber) + return errs.FinalAddForProperty("update_spot_market.changes.risk_parameters.log_normal.params.mu", ErrIsNotValidNumber) } if math.IsNaN(params.LogNormal.Params.Sigma) { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters.log_normal.params.sigma", ErrIsNotValidNumber) + return errs.FinalAddForProperty("update_spot_market.changes.risk_parameters.log_normal.params.sigma", ErrIsNotValidNumber) } if params.LogNormal.Params.Sigma <= 0 { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters.log_normal.params.sigma", ErrMustBePositive) + return errs.FinalAddForProperty("update_spot_market.changes.risk_parameters.log_normal.params.sigma", ErrMustBePositive) } if math.IsNaN(params.LogNormal.Params.R) { - return errs.FinalAddForProperty("proposal_submission.terms.change.update_spot_market.changes.risk_parameters.log_normal.params.r", ErrIsNotValidNumber) + return errs.FinalAddForProperty("update_spot_market.changes.risk_parameters.log_normal.params.r", ErrIsNotValidNumber) } return errs diff --git a/commands/proposal_submission_for_update_network_parameter_test.go b/commands/proposal_submission_for_update_network_parameter_test.go index 768373c60c..17b301b334 100644 --- a/commands/proposal_submission_for_update_network_parameter_test.go +++ b/commands/proposal_submission_for_update_network_parameter_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/commands" types "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) diff --git a/commands/proposal_submission_new_asset_test.go b/commands/proposal_submission_new_asset_test.go index 0271bbdff7..43102ab502 100644 --- a/commands/proposal_submission_new_asset_test.go +++ b/commands/proposal_submission_new_asset_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/libs/test" types "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) diff --git a/commands/proposal_submission_new_freeform_test.go b/commands/proposal_submission_new_freeform_test.go index 4ab5b88e06..5ed530553d 100644 --- a/commands/proposal_submission_new_freeform_test.go +++ b/commands/proposal_submission_new_freeform_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/commands" types "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) diff --git a/commands/proposal_submission_new_market_test.go b/commands/proposal_submission_new_market_test.go index 256c4830c3..18b047d644 100644 --- a/commands/proposal_submission_new_market_test.go +++ b/commands/proposal_submission_new_market_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -31,6 +31,7 @@ import ( vegapb "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" ) @@ -63,9 +64,6 @@ func TestCheckProposalSubmissionForNewMarket(t *testing.T) { t.Run("Submitting a price monitoring change with trigger auction extension succeeds", testPriceMonitoringChangeSubmissionWithTriggerAuctionExtensionSucceeds) t.Run("Submitting a new market without liquidity monitoring fails", testNewMarketChangeSubmissionWithoutLiquidityMonitoringFails) t.Run("Submitting a new market with liquidity monitoring succeeds", testNewMarketChangeSubmissionWithLiquidityMonitoringSucceeds) - t.Run("Submitting a liquidity monitoring change with wrong triggering ratio fails", testLiquidityMonitoringChangeSubmissionWithWrongTriggeringRatioFails) - t.Run("Submitting a liquidity monitoring change with right triggering ratio succeeds", testLiquidityMonitoringChangeSubmissionWithRightTriggeringRatioSucceeds) - t.Run("Submitting a liquidity monitoring change without triggering ratio parameter fails", testLiquidityMonitoringChangeSubmissionWithoutTriggeringRatioFails) t.Run("Submitting a liquidity monitoring change without target stake parameters fails", testLiquidityMonitoringChangeSubmissionWithoutTargetStakeParametersFails) t.Run("Submitting a liquidity monitoring change with target stake parameters succeeds", testLiquidityMonitoringChangeSubmissionWithTargetStakeParametersSucceeds) t.Run("Submitting a liquidity monitoring change with non-positive time window fails", testLiquidityMonitoringChangeSubmissionWithNonPositiveTimeWindowFails) @@ -148,6 +146,8 @@ func TestCheckProposalSubmissionForNewMarket(t *testing.T) { t.Run("Submitting a future market with external data sources for settlement and termination with no signers fail", testFutureMarketSubmissionWithExternalSettlementDataAndTerminationNoSignerFails) t.Run("Submitting a future market with internal time trigger termination data fails", testFutureMarketSubmissionWithInternalTimeTriggerTerminationDataFails) t.Run("Submitting a future market with internal time trigger settlement data fails", testFutureMarketSubmissionWithInternalTimeTriggerSettlementDataFails) + t.Run("Submitting a future market with valid liquidation strategy succeeds", testFutureMarketSubmissionWithValidLiquidationStrategySucceeds) + t.Run("Submitting a future market with invalid liquidation strategy fails", testFutureMarketSubmissionWithInvalidLiquidationStrategyFails) t.Run("Submitting a perps market change without perps fails", testNewPerpsMarketChangeSubmissionWithoutPerpsFails) t.Run("Submitting a perps market change with perps succeeds", testNewPerpsMarketChangeSubmissionWithPerpsSucceeds) @@ -172,9 +172,11 @@ func TestCheckProposalSubmissionForNewMarket(t *testing.T) { t.Run("Submitting a perps market change with filter with condition value succeeds", testNewPerpsMarketChangeSubmissionWithFilterWithConditionValueSucceeds) t.Run("Submitting a perps market change without oracle spec bindings fails", testNewPerpsMarketChangeSubmissionWithoutDataSourceSpecBindingFails) t.Run("Submitting a perps market change with oracle spec binding succeeds", testNewPerpsMarketChangeSubmissionWithDataSourceSpecBindingSucceeds) + t.Run("Submitting a perps market with funding rate modifiers", testNewPerpsMarketWithFundingRateModifiers) t.Run("Submitting a perps market change with a mismatch between binding property name and filter fails", testNewPerpsMarketChangeSubmissionWithMismatchBetweenFilterAndBindingFails) t.Run("Submitting a perps market change with match between binding property name and filter succeeds", testNewPerpsMarketChangeSubmissionWithNoMismatchBetweenFilterAndBindingSucceeds) t.Run("Submitting a perps market change with settlement data and trading termination properties succeeds", testNewPerpsMarketChangeSubmissionWithSettlementDataPropertySucceeds) + t.Run("Submitting a perps market change with intenal composite price config", testNewPerpsMarketChangeSubmissionWithInternalCompositePriceConfig) t.Run("Submitting a new market with invalid SLA price range fails", testNewMarketChangeSubmissionWithInvalidLpRangeFails) t.Run("Submitting a new market with valid SLA price range succeeds", testNewMarketChangeSubmissionWithValidLpRangeSucceeds) t.Run("Submitting a new market with invalid min time fraction fails", testNewMarketChangeSubmissionWithInvalidMinTimeFractionFails) @@ -183,6 +185,8 @@ func TestCheckProposalSubmissionForNewMarket(t *testing.T) { t.Run("Submitting a new market with valid competition factor succeeds", testNewMarketChangeSubmissionWithValidCompetitionFactorSucceeds) t.Run("Submitting a new market with invalid hysteresis epochs fails", testNewMarketChangeSubmissionWithInvalidPerformanceHysteresisEpochsFails) t.Run("Submitting a new market with valid hysteresis epochs succeeds", testNewMarketChangeSubmissionWithValidPerformanceHysteresisEpochsSucceeds) + t.Run("Submitting a new market with invalid liquidity fee settings", testLiquidityFeeSettings) + t.Run("Submitting a new market with invalid mark price configuration ", testCompositePriceConfiguration) } func testNewMarketChangeSubmissionWithoutNewMarketFails(t *testing.T) { @@ -372,19 +376,6 @@ func testNewMarketChangeSubmissionWithSlippageFactorBananaFails(t *testing.T) { }, }) assert.Contains(t, err.Get("proposal_submission.terms.change.new_market.changes.linear_slippage_factor"), commands.ErrIsNotValidNumber) - - err = checkProposalSubmission(&commandspb.ProposalSubmission{ - Terms: &vegapb.ProposalTerms{ - Change: &vegapb.ProposalTerms_NewMarket{ - NewMarket: &vegapb.NewMarket{ - Changes: &vegapb.NewMarketConfiguration{ - QuadraticSlippageFactor: "banana", - }, - }, - }, - }, - }) - assert.Contains(t, err.Get("proposal_submission.terms.change.new_market.changes.quadratic_slippage_factor"), commands.ErrIsNotValidNumber) } func testNewMarketChangeSubmissionWithSlippageFactorNegativeFails(t *testing.T) { @@ -400,19 +391,6 @@ func testNewMarketChangeSubmissionWithSlippageFactorNegativeFails(t *testing.T) }, }) assert.Contains(t, err.Get("proposal_submission.terms.change.new_market.changes.linear_slippage_factor"), commands.ErrMustBePositiveOrZero) - - err = checkProposalSubmission(&commandspb.ProposalSubmission{ - Terms: &vegapb.ProposalTerms{ - Change: &vegapb.ProposalTerms_NewMarket{ - NewMarket: &vegapb.NewMarket{ - Changes: &vegapb.NewMarketConfiguration{ - QuadraticSlippageFactor: "-0.1", - }, - }, - }, - }, - }) - assert.Contains(t, err.Get("proposal_submission.terms.change.new_market.changes.quadratic_slippage_factor"), commands.ErrMustBePositiveOrZero) } func testNewMarketChangeSubmissionWithSlippageFactorTooLargeFails(t *testing.T) { @@ -428,19 +406,6 @@ func testNewMarketChangeSubmissionWithSlippageFactorTooLargeFails(t *testing.T) }, }) assert.Contains(t, err.Get("proposal_submission.terms.change.new_market.changes.linear_slippage_factor"), commands.ErrMustBeAtMost1M) - - err = checkProposalSubmission(&commandspb.ProposalSubmission{ - Terms: &vegapb.ProposalTerms{ - Change: &vegapb.ProposalTerms_NewMarket{ - NewMarket: &vegapb.NewMarket{ - Changes: &vegapb.NewMarketConfiguration{ - QuadraticSlippageFactor: "1000000.000001", - }, - }, - }, - }, - }) - assert.Contains(t, err.Get("proposal_submission.terms.change.new_market.changes.quadratic_slippage_factor"), commands.ErrMustBeAtMost1M) } func testNewMarketChangeSubmissionWithEmptySlippageFactorPasses(t *testing.T) { @@ -487,104 +452,13 @@ func testNewMarketChangeSubmissionWithLiquidityMonitoringSucceeds(t *testing.T) assert.NotContains(t, err.Get("proposal_submission.terms.change.new_market.changes.liquidity_monitoring_parameters"), commands.ErrIsRequired) } -func testLiquidityMonitoringChangeSubmissionWithWrongTriggeringRatioFails(t *testing.T) { - testCases := []struct { - msg string - value string - }{ - { - msg: "with probability of -1", - value: "-1", - }, { - msg: "with probability of 2", - value: "2", - }, - } - for _, tc := range testCases { - t.Run(tc.msg, func(t *testing.T) { - err := checkProposalSubmission(&commandspb.ProposalSubmission{ - Terms: &vegapb.ProposalTerms{ - Change: &vegapb.ProposalTerms_NewMarket{ - NewMarket: &vegapb.NewMarket{ - Changes: &vegapb.NewMarketConfiguration{ - LiquidityMonitoringParameters: &vegapb.LiquidityMonitoringParameters{ - TriggeringRatio: tc.value, - }, - }, - }, - }, - }, - }) - - assert.Contains(t, err.Get("proposal_submission.terms.change.new_market.changes.liquidity_monitoring_parameters.triggering_ratio"), - errors.New("should be between 0 (inclusive) and 1 (inclusive)")) - }) - } -} - -func testLiquidityMonitoringChangeSubmissionWithRightTriggeringRatioSucceeds(t *testing.T) { - testCases := []struct { - msg string - value string - }{ - { - msg: "with ratio of 0", - value: "0", - }, { - msg: "with ratio of 0.5", - value: "0.5", - }, { - msg: "with ratio of 1", - value: "1", - }, - } - for _, tc := range testCases { - t.Run(tc.msg, func(t *testing.T) { - err := checkProposalSubmission(&commandspb.ProposalSubmission{ - Terms: &vegapb.ProposalTerms{ - Change: &vegapb.ProposalTerms_NewMarket{ - NewMarket: &vegapb.NewMarket{ - Changes: &vegapb.NewMarketConfiguration{ - LiquidityMonitoringParameters: &vegapb.LiquidityMonitoringParameters{ - TriggeringRatio: tc.value, - }, - }, - }, - }, - }, - }) - - assert.NotContains(t, err.Get("proposal_submission.terms.change.new_market.changes.liquidity_monitoring_parameters"), - errors.New("should be between 0 (inclusive) and 1 (inclusive)")) - }) - } -} - -func testLiquidityMonitoringChangeSubmissionWithoutTriggeringRatioFails(t *testing.T) { - err := checkProposalSubmission(&commandspb.ProposalSubmission{ - Terms: &vegapb.ProposalTerms{ - Change: &vegapb.ProposalTerms_NewMarket{ - NewMarket: &vegapb.NewMarket{ - Changes: &vegapb.NewMarketConfiguration{ - LiquidityMonitoringParameters: &vegapb.LiquidityMonitoringParameters{}, - }, - }, - }, - }, - }) - - assert.Contains(t, err.Get("proposal_submission.terms.change.new_market.changes.liquidity_monitoring_parameters.triggering_ratio"), commands.ErrIsNotValidNumber) -} - func testLiquidityMonitoringChangeSubmissionWithoutTargetStakeParametersFails(t *testing.T) { err := checkProposalSubmission(&commandspb.ProposalSubmission{ Terms: &vegapb.ProposalTerms{ Change: &vegapb.ProposalTerms_NewMarket{ NewMarket: &vegapb.NewMarket{ Changes: &vegapb.NewMarketConfiguration{ - LiquidityMonitoringParameters: &vegapb.LiquidityMonitoringParameters{ - TriggeringRatio: "1", - }, + LiquidityMonitoringParameters: &vegapb.LiquidityMonitoringParameters{}, }, }, }, @@ -633,7 +507,6 @@ func testLiquidityMonitoringChangeSubmissionWithNonPositiveTimeWindowFails(t *te NewMarket: &vegapb.NewMarket{ Changes: &vegapb.NewMarketConfiguration{ LiquidityMonitoringParameters: &vegapb.LiquidityMonitoringParameters{ - TriggeringRatio: "1", TargetStakeParameters: &vegapb.TargetStakeParameters{ TimeWindow: tc.value, }, @@ -690,7 +563,6 @@ func testLiquidityMonitoringChangeSubmissionWithNonPositiveScalingFactorFails(t NewMarket: &vegapb.NewMarket{ Changes: &vegapb.NewMarketConfiguration{ LiquidityMonitoringParameters: &vegapb.LiquidityMonitoringParameters{ - TriggeringRatio: "1", TargetStakeParameters: &vegapb.TargetStakeParameters{ ScalingFactor: tc.value, }, @@ -5002,6 +4874,41 @@ func testNewPerpsMarketChangeSubmissionWithSettlementDataPropertySucceeds(t *tes assert.NotContains(t, err.Get("proposal_submission.terms.change.new_market.changes.instrument.product.perps.data_source_spec_binding.settlement_data_property"), commands.ErrIsRequired) } +func testNewPerpsMarketChangeSubmissionWithInternalCompositePriceConfig(t *testing.T) { + cases := getCompositePriceConfigurationCases() + for _, c := range cases { + err := checkProposalSubmission(&commandspb.ProposalSubmission{ + Terms: &vegapb.ProposalTerms{ + Change: &vegapb.ProposalTerms_NewMarket{ + NewMarket: &vegapb.NewMarket{ + Changes: &vegapb.NewMarketConfiguration{ + Instrument: &vegapb.InstrumentConfiguration{ + Product: &vegapb.InstrumentConfiguration_Perpetual{ + Perpetual: &vegapb.PerpetualProduct{ + DataSourceSpecBinding: &vegapb.DataSourceSpecToPerpetualBinding{ + SettlementDataProperty: "My property", + }, + InternalCompositePriceConfiguration: c.mpc, + }, + }, + }, + }, + }, + }, + }, + }) + if len(c.field) > 0 { + if c.err != nil { + assert.Contains(t, err.Get("proposal_submission.terms.change.new_market.changes.instrument.product.perps.internal_composite_price_configuration."+c.field), c.err) + } else { + assert.Empty(t, err.Get("proposal_submission.terms.change.new_market.changes.instrument.product.perps.internal_composite_price_configuration."+c.field)) + } + } else { + assert.Contains(t, err.Get("proposal_submission.terms.change.new_market.changes.instrument.product.perps.internal_composite_price_configuration"), c.err) + } + } +} + func TestNewPerpsMarketChangeSubmissionProductParameters(t *testing.T) { cases := []struct { product vegapb.PerpetualProduct @@ -5096,7 +5003,7 @@ func TestNewPerpsMarketChangeSubmissionProductParameters(t *testing.T) { path: "proposal_submission.terms.change.new_market.changes.instrument.product.perps.interest_rate", desc: "interest_rate is valid", }, - // clamp_lower_bound + // clamp_lower_bound (0053-PERP-042) { product: vegapb.PerpetualProduct{ ClampLowerBound: "", @@ -5143,7 +5050,7 @@ func TestNewPerpsMarketChangeSubmissionProductParameters(t *testing.T) { path: "proposal_submission.terms.change.new_market.changes.instrument.product.perps.clamp_lower_bound", desc: "clamp_lower_bound is valid", }, - // clamp_upper_bound + // clamp_upper_bound (0053-PERP-042) { product: vegapb.PerpetualProduct{ ClampUpperBound: "", @@ -5190,7 +5097,7 @@ func TestNewPerpsMarketChangeSubmissionProductParameters(t *testing.T) { path: "proposal_submission.terms.change.new_market.changes.instrument.product.perps.clamp_upper_bound", desc: "clamp_upper_bound is valid", }, - // clamp lower and upper + // clamp lower and upper (0053-PERP-042) { product: vegapb.PerpetualProduct{ ClampLowerBound: "0.5", @@ -5249,6 +5156,105 @@ func TestNewPerpsMarketChangeSubmissionProductParameters(t *testing.T) { } } +func testNewPerpsMarketWithFundingRateModifiers(t *testing.T) { + cases := []struct { + product vegapb.PerpetualProduct + err error + path string + desc string + }{ + { + product: vegapb.PerpetualProduct{ + FundingRateScalingFactor: ptr.From("hello"), + }, + path: "proposal_submission.terms.change.new_market.changes.instrument.product.perps.funding_rate_scaling_factor", + err: commands.ErrIsNotValidNumber, + }, + { + product: vegapb.PerpetualProduct{ + FundingRateScalingFactor: ptr.From("-10"), + }, + path: "proposal_submission.terms.change.new_market.changes.instrument.product.perps.funding_rate_scaling_factor", + err: commands.ErrMustBePositive, + }, + { + product: vegapb.PerpetualProduct{ + FundingRateScalingFactor: ptr.From("0"), + }, + path: "proposal_submission.terms.change.new_market.changes.instrument.product.perps.funding_rate_scaling_factor", + err: commands.ErrMustBePositive, + }, + { + product: vegapb.PerpetualProduct{ + FundingRateScalingFactor: ptr.From("0.1"), + }, + path: "proposal_submission.terms.change.new_market.changes.instrument.product.perps.funding_rate_scaling_factor", + }, + { + product: vegapb.PerpetualProduct{ + FundingRateLowerBound: ptr.From("hello"), + }, + path: "proposal_submission.terms.change.new_market.changes.instrument.product.perps.funding_rate_lower_bound", + err: commands.ErrIsNotValidNumber, + }, + { + product: vegapb.PerpetualProduct{ + FundingRateLowerBound: ptr.From("-100"), + }, + path: "proposal_submission.terms.change.new_market.changes.instrument.product.perps.funding_rate_lower_bound", + }, + { + product: vegapb.PerpetualProduct{ + FundingRateUpperBound: ptr.From("hello"), + }, + path: "proposal_submission.terms.change.new_market.changes.instrument.product.perps.funding_rate_upper_bound", + err: commands.ErrIsNotValidNumber, + }, + { + product: vegapb.PerpetualProduct{ + FundingRateUpperBound: ptr.From("100"), + }, + path: "proposal_submission.terms.change.new_market.changes.instrument.product.perps.funding_rate_upper_bound", + }, + { + product: vegapb.PerpetualProduct{ + FundingRateUpperBound: ptr.From("100"), + FundingRateLowerBound: ptr.From("200"), + }, + path: "proposal_submission.terms.change.new_market.changes.instrument.product.perps.funding_rate_lower_bound", + err: commands.ErrIsNotValid, + }, + } + + for _, v := range cases { + t.Run(v.desc, func(t *testing.T) { + err := checkProposalSubmission(&commandspb.ProposalSubmission{ + Terms: &vegapb.ProposalTerms{ + Change: &vegapb.ProposalTerms_NewMarket{ + NewMarket: &vegapb.NewMarket{ + Changes: &vegapb.NewMarketConfiguration{ + Instrument: &vegapb.InstrumentConfiguration{ + Product: &vegapb.InstrumentConfiguration_Perpetual{ + Perpetual: &v.product, + }, + }, + }, + }, + }, + }, + }) + errs := err.Get(v.path) + + // no errors expected + if v.err == nil { + assert.Len(t, errs, 0, v.desc) + return + } + assert.Contains(t, errs, v.err, v.desc) + }) + } +} + func TestNewPerpsMarketChangeSubmissionSettlementSchedule(t *testing.T) { cases := []struct { product vegapb.PerpetualProduct @@ -5870,3 +5876,706 @@ func testNewMarketChangeSubmissionWithValidPerformanceHysteresisEpochsSucceeds(t assert.NotContains(t, err.Get("proposal_submission.terms.change.new_market.changes.sla_params.performance_hysteresis_epochs"), commands.ErrMustBePositive) } + +func testLiquidityFeeSettings(t *testing.T) { + cases := []struct { + lfs *vega.LiquidityFeeSettings + field string + err error + }{ + { + lfs: &vega.LiquidityFeeSettings{ + Method: vegapb.LiquidityFeeSettings_METHOD_MARGINAL_COST, + FeeConstant: ptr.From("0.1"), + }, + field: "method", + err: commands.ErrIsNotValid, + }, + { + lfs: &vega.LiquidityFeeSettings{ + Method: vegapb.LiquidityFeeSettings_METHOD_WEIGHTED_AVERAGE, + FeeConstant: ptr.From("0.1"), + }, + field: "method", + err: commands.ErrIsNotValid, + }, + { + lfs: &vega.LiquidityFeeSettings{ + Method: vegapb.LiquidityFeeSettings_METHOD_CONSTANT, + FeeConstant: nil, + }, + field: "fee_constant", + err: commands.ErrIsRequired, + }, + { + lfs: &vega.LiquidityFeeSettings{ + Method: vegapb.LiquidityFeeSettings_METHOD_CONSTANT, + FeeConstant: ptr.From("hello"), + }, + field: "fee_constant", + err: commands.ErrIsNotValidNumber, + }, + { + lfs: &vega.LiquidityFeeSettings{ + Method: vegapb.LiquidityFeeSettings_METHOD_CONSTANT, + FeeConstant: ptr.From("-0.1"), // (0042-LIQF-060) + }, + field: "fee_constant", + err: commands.ErrMustBePositiveOrZero, + }, + { + lfs: &vega.LiquidityFeeSettings{ + Method: vegapb.LiquidityFeeSettings_METHOD_CONSTANT, + FeeConstant: ptr.From("1.1"), // (0042-LIQF-060) + }, + field: "fee_constant", + err: commands.ErrMustBeWithinRange01, + }, + { + lfs: &vega.LiquidityFeeSettings{ + Method: vegapb.LiquidityFeeSettings_METHOD_UNSPECIFIED, + }, + field: "method", + err: commands.ErrIsRequired, + }, + { + lfs: &vega.LiquidityFeeSettings{ + Method: vegapb.LiquidityFeeSettings_Method(int32(100)), + }, + field: "method", + err: commands.ErrIsNotValid, + }, + } + + for _, c := range cases { + err := checkProposalSubmission(&commandspb.ProposalSubmission{ + Terms: &vegapb.ProposalTerms{ + Change: &vegapb.ProposalTerms_NewMarket{ + NewMarket: &vegapb.NewMarket{ + Changes: &vegapb.NewMarketConfiguration{ + Instrument: &vegapb.InstrumentConfiguration{ + Product: &vegapb.InstrumentConfiguration_Perpetual{ + Perpetual: &vegapb.PerpetualProduct{}, + }, + }, + LiquidityFeeSettings: c.lfs, + }, + }, + }, + }, + }) + assert.Contains(t, err.Get("proposal_submission.terms.change.new_market.changes.liquidity_fee_settings."+c.field), c.err) + } +} + +func testFutureMarketSubmissionWithValidLiquidationStrategySucceeds(t *testing.T) { + pubKey := []*dstypes.Signer{ + dstypes.CreateSignerFromString("bd069246503a57271375f1995c46e03db88c4e1a564077b33a9872f905650dc4", dstypes.SignerTypePubKey), + } + + err := checkProposalSubmission(&commandspb.ProposalSubmission{ + Terms: &vegapb.ProposalTerms{ + Change: &vegapb.ProposalTerms_NewMarket{ + NewMarket: &vegapb.NewMarket{ + Changes: &vegapb.NewMarketConfiguration{ + Instrument: &vegapb.InstrumentConfiguration{ + Product: &vegapb.InstrumentConfiguration_Future{ + Future: &vegapb.FutureProduct{ + DataSourceSpecForSettlementData: vegapb.NewDataSourceDefinition( + vegapb.DataSourceContentTypeOracle, + ).SetOracleConfig( + &vegapb.DataSourceDefinitionExternal_Oracle{ + Oracle: &vegapb.DataSourceSpecConfiguration{ + Signers: dstypes.SignersIntoProto(pubKey), + Filters: []*datapb.Filter{ + { + Key: &datapb.PropertyKey{ + Name: "prices.ETH.value", + Type: datapb.PropertyKey_TYPE_INTEGER, + }, + Conditions: []*datapb.Condition{ + { + Operator: datapb.Condition_OPERATOR_GREATER_THAN_OR_EQUAL, + }, + }, + }, + }, + }, + }, + ), + DataSourceSpecForTradingTermination: vegapb.NewDataSourceDefinition( + vegapb.DataSourceContentTypeOracle, + ).SetOracleConfig( + &vegapb.DataSourceDefinitionExternal_Oracle{ + Oracle: &vegapb.DataSourceSpecConfiguration{ + Signers: dstypes.SignersIntoProto(pubKey), + Filters: []*datapb.Filter{ + { + Key: &datapb.PropertyKey{ + Name: "vegaprotocol.builtin.timestamp", + Type: datapb.PropertyKey_TYPE_TIMESTAMP, + }, + Conditions: []*datapb.Condition{ + { + Operator: datapb.Condition_OPERATOR_GREATER_THAN_OR_EQUAL, + Value: fmt.Sprintf("%d", time.Now().Add(time.Hour*24*365).UnixNano()), + }, + }, + }, + }, + }, + }, + ), + }, + }, + }, + LiquidationStrategy: &vegapb.LiquidationStrategy{ + DisposalTimeStep: 20, + DisposalFraction: "0.05", + FullDisposalSize: 20, + MaxFractionConsumed: "0.01", + }, + }, + }, + }, + }, + }) + + assert.Empty(t, err.Get("proposal_submission.terms.change.new_market.changes.liquidation_strategy.disposal_fraction")) + assert.Empty(t, err.Get("proposal_submission.terms.change.new_market.changes.liquidation_strategy.max_fraction_consumed")) + assert.Empty(t, err.Get("proposal_submission.terms.change.new_market.changes.liquidation_strategy.disposal_time_step")) +} + +type compositePriceConfigCase struct { + mpc *vega.CompositePriceConfiguration + field string + err error +} + +func getCompositePriceConfigurationCases() []compositePriceConfigCase { + cases := []compositePriceConfigCase{ + { + mpc: &vega.CompositePriceConfiguration{}, + field: "composite_price_type", + err: commands.ErrIsRequired, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 0, + }, + field: "composite_price_type", + err: commands.ErrIsRequired, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 4, + }, + field: "composite_price_type", + err: commands.ErrIsNotValid, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 2, + DecayWeight: "", + }, + field: "decay_weight", + err: commands.ErrIsRequired, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 2, + DecayWeight: "banana", + }, + field: "decay_weight", + err: commands.ErrIsNotValidNumber, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 2, + DecayWeight: "-1", + }, + field: "decay_weight", + err: commands.ErrMustBeWithinRange01, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 2, + DecayWeight: "1.1", + }, + field: "decay_weight", + err: commands.ErrMustBeWithinRange01, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 3, + DecayWeight: "", + }, + field: "decay_weight", + err: nil, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 2, + DecayPower: 4, + }, + field: "decay_power", + err: fmt.Errorf("must be in {1, 2, 3}"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 2, + DecayPower: 0, + }, + field: "decay_power", + err: fmt.Errorf("must be in {1, 2, 3}"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 3, + DecayPower: 0, + }, + field: "decay_power", + err: nil, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 2, + CashAmount: "", + }, + field: "cash_amount", + err: commands.ErrIsRequired, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 2, + CashAmount: "banana", + }, + field: "cash_amount", + err: commands.ErrIsNotValidNumber, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 2, + CashAmount: "-1", + }, + field: "cash_amount", + err: commands.ErrIsNotValidNumber, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 2, + CashAmount: "1.2", + }, + field: "cash_amount", + err: commands.ErrIsNotValidNumber, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: 3, + CashAmount: "", + }, + field: "cash_amount", + err: nil, + }, + { + mpc: &vega.CompositePriceConfiguration{ + SourceWeights: []string{"1", "2", "3"}, + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_MEDIAN, + }, + field: "source_weights", + err: fmt.Errorf("must be empty if composite price type is not weighted"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + SourceWeights: []string{"1", "2", "3"}, + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_LAST_TRADE, + }, + field: "source_weights", + err: fmt.Errorf("must be empty if composite price type is not weighted"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + SourceWeights: []string{"", "", ""}, + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED, + DataSourcesSpec: []*protoTypes.DataSourceDefinition{ + {SourceType: &vegapb.DataSourceDefinition_External{}}, + {SourceType: &vegapb.DataSourceDefinition_External{}}, + {SourceType: &vegapb.DataSourceDefinition_External{}}, + }, + }, + field: "source_weights", + err: fmt.Errorf("must be defined for all price sources"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED, + SourceStalenessTolerance: []string{"1", "2", "3", "4", "5"}, + DataSourcesSpec: []*protoTypes.DataSourceDefinition{ + {SourceType: &vegapb.DataSourceDefinition_External{}}, + {SourceType: &vegapb.DataSourceDefinition_External{}}, + {SourceType: &vegapb.DataSourceDefinition_External{}}, + }, + }, + field: "source_staleness_tolerance", + err: fmt.Errorf("must included staleness information for all price sources"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED, + SourceStalenessTolerance: []string{"1", "2", "3", "4", "5", "6", "7"}, + DataSourcesSpec: []*protoTypes.DataSourceDefinition{ + {SourceType: &vegapb.DataSourceDefinition_External{}}, + {SourceType: &vegapb.DataSourceDefinition_External{}}, + }, + }, + field: "source_staleness_tolerance", + err: fmt.Errorf("must included staleness information for all price sources"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_MEDIAN, + DataSourcesSpec: []*protoTypes.DataSourceDefinition{ + {SourceType: &vegapb.DataSourceDefinition_External{}}, + {SourceType: &vegapb.DataSourceDefinition_External{}}, + }, + }, + field: "source_staleness_tolerance", + err: fmt.Errorf("must included staleness information for all price sources"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED, + DataSourcesSpec: []*protoTypes.DataSourceDefinition{ + {SourceType: &vegapb.DataSourceDefinition_External{}}, + {SourceType: &vegapb.DataSourceDefinition_External{}}, + }, + }, + field: "source_staleness_tolerance", + err: fmt.Errorf("must included staleness information for all price sources"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED, + SourceStalenessTolerance: []string{"1s", "2s", "3s"}, + SourceWeights: []string{"1", "2", "3"}, + }, + field: "source_staleness_tolerance", + err: nil, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_MEDIAN, + SourceStalenessTolerance: []string{"1s", "2s", "3s"}, + }, + field: "source_staleness_tolerance", + err: nil, + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED, + SourceStalenessTolerance: []string{"1s", "2s", "3s"}, + DataSourcesSpec: []*protoTypes.DataSourceDefinition{ + {SourceType: &vegapb.DataSourceDefinition_External{}}, + {SourceType: &vegapb.DataSourceDefinition_External{}}, + }, + }, + field: "source_staleness_tolerance", + err: fmt.Errorf("must included staleness information for all price sources"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_MEDIAN, + SourceStalenessTolerance: []string{"1s", "2s", "3s"}, + DataSourcesSpec: []*protoTypes.DataSourceDefinition{ + {SourceType: &vegapb.DataSourceDefinition_External{}}, + {SourceType: &vegapb.DataSourceDefinition_External{}}, + }, + }, + field: "source_staleness_tolerance", + err: fmt.Errorf("must included staleness information for all price sources"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_LAST_TRADE, + SourceStalenessTolerance: nil, + }, + field: "source_staleness_tolerance", + err: nil, + }, + { + mpc: &vega.CompositePriceConfiguration{ + SourceWeights: []string{"", "", "", ""}, + SourceStalenessTolerance: []string{"", "", "", "", ""}, + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED, + }, + field: "source_staleness_tolerance", + err: fmt.Errorf("must have the same length as source_weights"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED, + SourceWeights: []string{"0", "0", "0", "0"}, + }, + field: "source_weights", + err: fmt.Errorf("must have at least one none zero weight"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + CompositePriceType: protoTypes.CompositePriceType_COMPOSITE_PRICE_TYPE_MEDIAN, + SourceWeights: []string{"0", "0", "0", "0"}, + }, + field: "source_weights", + err: fmt.Errorf("must be empty if composite price type is not weighted"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + SourceWeights: []string{"", "banana", "-1", ""}, + }, + field: "source_weights.0", + err: commands.ErrIsNotValidNumber, + }, + { + mpc: &vega.CompositePriceConfiguration{ + SourceWeights: []string{"", "banana", "-1", ""}, + }, + field: "source_weights.1", + err: commands.ErrIsNotValidNumber, + }, + { + mpc: &vega.CompositePriceConfiguration{ + SourceWeights: []string{"", "banana", "-1", ""}, + }, + field: "source_weights.2", + err: commands.ErrMustBePositiveOrZero, + }, + { + mpc: &vega.CompositePriceConfiguration{ + SourceStalenessTolerance: []string{"", "banana", "-1", ""}, + }, + field: "source_staleness_tolerance.0", + err: fmt.Errorf("must be a valid duration"), + }, + { + mpc: &vega.CompositePriceConfiguration{ + SourceStalenessTolerance: []string{"", "banana", "-1", ""}, + }, + field: "source_staleness_tolerance.1", + err: fmt.Errorf("must be a valid duration"), + }, + } + return cases +} + +func testCompositePriceConfiguration(t *testing.T) { + cases := getCompositePriceConfigurationCases() + cases = append(cases, compositePriceConfigCase{ + mpc: nil, + field: "", + err: commands.ErrIsRequired, + }) + + for _, c := range cases { + err := checkProposalSubmission(&commandspb.ProposalSubmission{ + Terms: &vegapb.ProposalTerms{ + Change: &vegapb.ProposalTerms_NewMarket{ + NewMarket: &vegapb.NewMarket{ + Changes: &vegapb.NewMarketConfiguration{ + Instrument: &vegapb.InstrumentConfiguration{ + Product: &vegapb.InstrumentConfiguration_Perpetual{ + Perpetual: &vegapb.PerpetualProduct{}, + }, + }, + MarkPriceConfiguration: c.mpc, + }, + }, + }, + }, + }) + if len(c.field) > 0 { + if c.err != nil { + assert.Contains(t, err.Get("proposal_submission.terms.change.new_market.changes.mark_price_configuration."+c.field), c.err) + } else { + assert.Empty(t, err.Get("proposal_submission.terms.change.new_market.changes.mark_price_configuration."+c.field)) + } + } else { + assert.Contains(t, err.Get("proposal_submission.terms.change.new_market.changes.mark_price_configuration"), c.err) + } + } +} + +func testFutureMarketSubmissionWithInvalidLiquidationStrategyFails(t *testing.T) { + pubKey := []*dstypes.Signer{ + dstypes.CreateSignerFromString("bd069246503a57271375f1995c46e03db88c4e1a564077b33a9872f905650dc4", dstypes.SignerTypePubKey), + } + + submission := &commandspb.ProposalSubmission{ + Terms: &vegapb.ProposalTerms{ + Change: &vegapb.ProposalTerms_NewMarket{ + NewMarket: &vegapb.NewMarket{ + Changes: &vegapb.NewMarketConfiguration{ + Instrument: &vegapb.InstrumentConfiguration{ + Product: &vegapb.InstrumentConfiguration_Future{ + Future: &vegapb.FutureProduct{ + DataSourceSpecForSettlementData: vegapb.NewDataSourceDefinition( + vegapb.DataSourceContentTypeOracle, + ).SetOracleConfig( + &vegapb.DataSourceDefinitionExternal_Oracle{ + Oracle: &vegapb.DataSourceSpecConfiguration{ + Signers: dstypes.SignersIntoProto(pubKey), + Filters: []*datapb.Filter{ + { + Key: &datapb.PropertyKey{ + Name: "prices.ETH.value", + Type: datapb.PropertyKey_TYPE_INTEGER, + }, + Conditions: []*datapb.Condition{ + { + Operator: datapb.Condition_OPERATOR_GREATER_THAN_OR_EQUAL, + }, + }, + }, + }, + }, + }, + ), + DataSourceSpecForTradingTermination: vegapb.NewDataSourceDefinition( + vegapb.DataSourceContentTypeOracle, + ).SetOracleConfig( + &vegapb.DataSourceDefinitionExternal_Oracle{ + Oracle: &vegapb.DataSourceSpecConfiguration{ + Signers: dstypes.SignersIntoProto(pubKey), + Filters: []*datapb.Filter{ + { + Key: &datapb.PropertyKey{ + Name: "vegaprotocol.builtin.timestamp", + Type: datapb.PropertyKey_TYPE_TIMESTAMP, + }, + Conditions: []*datapb.Condition{ + { + Operator: datapb.Condition_OPERATOR_GREATER_THAN_OR_EQUAL, + Value: fmt.Sprintf("%d", time.Now().Add(time.Hour*24*365).UnixNano()), + }, + }, + }, + }, + }, + }, + ), + }, + }, + }, + LiquidationStrategy: &vegapb.LiquidationStrategy{ + DisposalTimeStep: 20, + DisposalFraction: "0.05", + FullDisposalSize: 20, + MaxFractionConsumed: "0.01", + }, + }, + }, + }, + }, + } + + data := map[string]struct { + ls *vegapb.LiquidationStrategy + err error + }{ + "proposal_submission.terms.change.new_market.changes.liquidation_strategy.disposal_fraction": { + ls: &vegapb.LiquidationStrategy{ + DisposalTimeStep: 20, + DisposalFraction: "123", + FullDisposalSize: 20, + MaxFractionConsumed: "0.01", + }, + err: commands.ErrMustBeBetween01, + }, + "proposal_submission.terms.change.new_market.changes.liquidation_strategy.max_fraction_consumed": { + ls: &vegapb.LiquidationStrategy{ + DisposalTimeStep: 20, + DisposalFraction: "0.1", + FullDisposalSize: 20, + MaxFractionConsumed: "-0.1", + }, + err: commands.ErrMustBeBetween01, + }, + "proposal_submission.terms.change.new_market.changes.liquidation_strategy.disposal_time_step": { + ls: &vegapb.LiquidationStrategy{ + DisposalTimeStep: 0, + DisposalFraction: "0.1", + FullDisposalSize: 20, + MaxFractionConsumed: "0.1", + }, + err: commands.ErrMustBePositive, + }, + } + checks := []string{ + "proposal_submission.terms.change.new_market.changes.liquidation_strategy.disposal_fraction", + "proposal_submission.terms.change.new_market.changes.liquidation_strategy.max_fraction_consumed", + "proposal_submission.terms.change.new_market.changes.liquidation_strategy.disposal_time_step", + } + for ec, exp := range data { + nm := submission.Terms.GetNewMarket() + nm.Changes.LiquidationStrategy = exp.ls + submission.Terms.Change = &vegapb.ProposalTerms_NewMarket{ + NewMarket: nm, + } + err := checkProposalSubmission(submission) + for _, k := range checks { + if k != ec { + assert.Empty(t, err.Get(k)) + } else { + assert.Contains(t, err.Get(k), exp.err) + } + } + } + // pretty much the same as above, only this time set the disposal fraction to a negative value + // and max fraction consumed to a large positive + // finally set the disposal time step to a large int value, this changes the error + data = map[string]struct { + ls *vegapb.LiquidationStrategy + err error + }{ + "proposal_submission.terms.change.new_market.changes.liquidation_strategy.disposal_fraction": { + ls: &vegapb.LiquidationStrategy{ + DisposalTimeStep: 20, + DisposalFraction: "-2", + FullDisposalSize: 20, + MaxFractionConsumed: "0.01", + }, + err: commands.ErrMustBeBetween01, + }, + "proposal_submission.terms.change.new_market.changes.liquidation_strategy.max_fraction_consumed": { + ls: &vegapb.LiquidationStrategy{ + DisposalTimeStep: 20, + DisposalFraction: "0.1", + FullDisposalSize: 20, + MaxFractionConsumed: "2", + }, + err: commands.ErrMustBeBetween01, + }, + "proposal_submission.terms.change.new_market.changes.liquidation_strategy.disposal_time_step": { + ls: &vegapb.LiquidationStrategy{ + DisposalTimeStep: 3601, + DisposalFraction: "0.1", + FullDisposalSize: 20, + MaxFractionConsumed: "0.1", + }, + err: commands.ErrMustBeAtMost3600, + }, + } + for ec, exp := range data { + nm := submission.Terms.GetNewMarket() + nm.Changes.LiquidationStrategy = exp.ls + submission.Terms.Change = &vegapb.ProposalTerms_NewMarket{ + NewMarket: nm, + } + err := checkProposalSubmission(submission) + for _, k := range checks { + if k != ec { + assert.Empty(t, err.Get(k)) + } else { + assert.Contains(t, err.Get(k), exp.err) + } + } + } +} diff --git a/commands/proposal_submission_new_spot_market_test.go b/commands/proposal_submission_new_spot_market_test.go index 6687dbfd85..47c6fd3e05 100644 --- a/commands/proposal_submission_new_spot_market_test.go +++ b/commands/proposal_submission_new_spot_market_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -26,6 +26,7 @@ import ( protoTypes "code.vegaprotocol.io/vega/protos/vega" vegapb "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) diff --git a/commands/proposal_submission_new_transfer_test.go b/commands/proposal_submission_new_transfer_test.go index 1d4c6e4a6e..ab2de826d9 100644 --- a/commands/proposal_submission_new_transfer_test.go +++ b/commands/proposal_submission_new_transfer_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/libs/crypto" types "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/require" ) diff --git a/commands/proposal_submission_test.go b/commands/proposal_submission_test.go index e1d18cb1f3..2e132b4ab1 100644 --- a/commands/proposal_submission_test.go +++ b/commands/proposal_submission_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/libs/test" types "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) diff --git a/commands/proposal_submission_update_asset_test.go b/commands/proposal_submission_update_asset_test.go index 103ec8329c..93f1bda183 100644 --- a/commands/proposal_submission_update_asset_test.go +++ b/commands/proposal_submission_update_asset_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/commands" types "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) diff --git a/commands/proposal_submission_update_market_state_test.go b/commands/proposal_submission_update_market_state_test.go index 8f5f90b476..07aeae899b 100644 --- a/commands/proposal_submission_update_market_state_test.go +++ b/commands/proposal_submission_update_market_state_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/commands" types "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/require" ) diff --git a/commands/proposal_submission_update_market_test.go b/commands/proposal_submission_update_market_test.go index 80faba5a98..781a08ed78 100644 --- a/commands/proposal_submission_update_market_test.go +++ b/commands/proposal_submission_update_market_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -24,11 +24,13 @@ import ( "code.vegaprotocol.io/vega/commands" dstypes "code.vegaprotocol.io/vega/core/datasource/common" + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/libs/test" protoTypes "code.vegaprotocol.io/vega/protos/vega" vegapb "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" ) @@ -48,9 +50,6 @@ func TestCheckProposalSubmissionForUpdateMarket(t *testing.T) { t.Run("Submitting a price monitoring change with trigger auction extension succeeds", testUpdateMarketPriceMonitoringChangeSubmissionWithTriggerAuctionExtensionSucceeds) t.Run("Submitting a update market without liquidity monitoring fails", testUpdateMarketChangeSubmissionWithoutLiquidityMonitoringFails) t.Run("Submitting a update market with liquidity monitoring succeeds", testUpdateMarketChangeSubmissionWithLiquidityMonitoringSucceeds) - t.Run("Submitting a liquidity monitoring change with wrong triggering ratio fails", testUpdateMarketLiquidityMonitoringChangeSubmissionWithWrongTriggeringRatioFails) - t.Run("Submitting a liquidity monitoring change with right triggering ratio succeeds", testUpdateMarketLiquidityMonitoringChangeSubmissionWithRightTriggeringRatioSucceeds) - t.Run("Submitting a liquidity monitoring change without triggering ratio parameter fails", testUpdateMarketLiquidityMonitoringChangeSubmissionWithoutTriggeringRatioParameterFails) t.Run("Submitting a liquidity monitoring change without target stake parameters fails", testUpdateMarketLiquidityMonitoringChangeSubmissionWithoutTargetStakeParametersFails) t.Run("Submitting a liquidity monitoring change with target stake parameters succeeds", testUpdateMarketLiquidityMonitoringChangeSubmissionWithTargetStakeParametersSucceeds) t.Run("Submitting a liquidity monitoring change with non-positive time window fails", testUpdateMarketLiquidityMonitoringChangeSubmissionWithNonPositiveTimeWindowFails) @@ -58,6 +57,7 @@ func TestCheckProposalSubmissionForUpdateMarket(t *testing.T) { t.Run("Submitting a liquidity monitoring change with non-positive scaling factor fails", testUpdateMarketLiquidityMonitoringChangeSubmissionWithNonPositiveScalingFactorFails) t.Run("Submitting a liquidity monitoring change with positive scaling factor succeeds", testUpdateMarketLiquidityMonitoringChangeSubmissionWithPositiveScalingFactorSucceeds) t.Run("Submitting a market change without instrument code fails", testUpdateMarketChangeSubmissionWithoutInstrumentCodeFails) + t.Run("Submitting a market change without instrument name fails", testUpdateMarketChangeSubmissionWithoutInstrumentNameFails) t.Run("Submitting a market change with instrument code succeeds", testUpdateMarketChangeSubmissionWithInstrumentCodeSucceeds) t.Run("Submitting a market change without product fails", testUpdateMarketChangeSubmissionWithoutProductFails) t.Run("Submitting a market change with product succeeds", testUpdateMarketChangeSubmissionWithProductSucceeds) @@ -132,6 +132,74 @@ func TestCheckProposalSubmissionForUpdateMarket(t *testing.T) { t.Run("Submitting a market with external data sources for settlement and termination with empty eth address signers fail", testUpdateMarketWithExternalSettlementDataAndTerminationEmptyEthAddressSignerFails) t.Run("Submitting a market with termination time trigger fails", testUpdateMarketWithTerminationWithTimeTriggerFails) t.Run("Submitting a market withsettlement with time trigger fails", testUpdateMarketWithSettlementWithTimeTriggerFails) + t.Run("Submitting a perps market product parameters", testUpdatePerpsMarketChangeSubmissionProductParameters) + t.Run("Submitting a perps market with funding rate modifiers", testUpdatePerpetualMarketWithFundingRateModifiers) + t.Run("Submitting a market update with invalid mark price configuration ", testUpdateMarketCompositePriceConfiguration) + t.Run("Submitting a market update with invalid intenal composite price configuration ", testUpdatePerpsMarketChangeSubmissionWithInternalCompositePriceConfig) +} + +func testUpdatePerpsMarketChangeSubmissionWithInternalCompositePriceConfig(t *testing.T) { + cases := getCompositePriceConfigurationCases() + for _, c := range cases { + err := checkProposalSubmission(&commandspb.ProposalSubmission{ + Terms: &vegapb.ProposalTerms{ + Change: &vegapb.ProposalTerms_UpdateMarket{ + UpdateMarket: &vegapb.UpdateMarket{ + Changes: &vegapb.UpdateMarketConfiguration{ + Instrument: &vegapb.UpdateInstrumentConfiguration{ + Product: &vegapb.UpdateInstrumentConfiguration_Perpetual{ + Perpetual: &vegapb.UpdatePerpetualProduct{ + InternalCompositePriceConfiguration: c.mpc, + }, + }, + }, + }, + }, + }, + }, + }) + if len(c.field) > 0 { + if c.err != nil { + assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.instrument.product.perps.internal_composite_price_configuration."+c.field), c.err) + } else { + assert.Empty(t, err.Get("proposal_submission.terms.change.update_market.changes.instrument.product.perps.internal_composite_price_configuration."+c.field)) + } + } else { + assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.instrument.product.perps.internal_composite_price_configuration"), c.err) + } + } +} + +func testUpdateMarketCompositePriceConfiguration(t *testing.T) { + cases := getCompositePriceConfigurationCases() + cases = append(cases, compositePriceConfigCase{ + mpc: nil, + field: "", + err: commands.ErrIsRequired, + }) + + for _, c := range cases { + err := checkProposalSubmission(&commandspb.ProposalSubmission{ + Terms: &vegapb.ProposalTerms{ + Change: &vegapb.ProposalTerms_UpdateMarket{ + UpdateMarket: &vegapb.UpdateMarket{ + Changes: &vegapb.UpdateMarketConfiguration{ + MarkPriceConfiguration: c.mpc, + }, + }, + }, + }, + }) + if len(c.field) > 0 { + if c.err != nil { + assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.mark_price_configuration."+c.field), c.err, c.field) + } else { + assert.Empty(t, err.Get("proposal_submission.terms.change.update_market.changes.mark_price_configuration."+c.field)) + } + } else { + assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.mark_price_configuration"), c.err) + } + } } func testUpdateMarketChangeSubmissionWithoutUpdateMarketFails(t *testing.T) { @@ -200,104 +268,13 @@ func testUpdateMarketChangeSubmissionWithLiquidityMonitoringSucceeds(t *testing. assert.NotContains(t, err.Get("proposal_submission.terms.change.update_market.changes.liquidity_monitoring_parameters"), commands.ErrIsRequired) } -func testUpdateMarketLiquidityMonitoringChangeSubmissionWithWrongTriggeringRatioFails(t *testing.T) { - testCases := []struct { - msg string - value string - }{ - { - msg: "with probability of -1", - value: "-1", - }, { - msg: "with probability of 2", - value: "2", - }, - } - for _, tc := range testCases { - t.Run(tc.msg, func(t *testing.T) { - err := checkProposalSubmission(&commandspb.ProposalSubmission{ - Terms: &protoTypes.ProposalTerms{ - Change: &protoTypes.ProposalTerms_UpdateMarket{ - UpdateMarket: &protoTypes.UpdateMarket{ - Changes: &protoTypes.UpdateMarketConfiguration{ - LiquidityMonitoringParameters: &protoTypes.LiquidityMonitoringParameters{ - TriggeringRatio: tc.value, - }, - }, - }, - }, - }, - }) - - assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.liquidity_monitoring_parameters.triggering_ratio"), - errors.New("should be between 0 (inclusive) and 1 (inclusive)")) - }) - } -} - -func testUpdateMarketLiquidityMonitoringChangeSubmissionWithRightTriggeringRatioSucceeds(t *testing.T) { - testCases := []struct { - msg string - value string - }{ - { - msg: "with ratio of 0", - value: "0", - }, { - msg: "with ratio of 0.5", - value: "0.5", - }, { - msg: "with ratio of 1", - value: "1", - }, - } - for _, tc := range testCases { - t.Run(tc.msg, func(t *testing.T) { - err := checkProposalSubmission(&commandspb.ProposalSubmission{ - Terms: &protoTypes.ProposalTerms{ - Change: &protoTypes.ProposalTerms_UpdateMarket{ - UpdateMarket: &protoTypes.UpdateMarket{ - Changes: &protoTypes.UpdateMarketConfiguration{ - LiquidityMonitoringParameters: &protoTypes.LiquidityMonitoringParameters{ - TriggeringRatio: tc.value, - }, - }, - }, - }, - }, - }) - - assert.NotContains(t, err.Get("proposal_submission.terms.change.update_market.changes.liquidity_monitoring_parameters"), - errors.New("should be between 0 (inclusive) and 1 (inclusive)")) - }) - } -} - -func testUpdateMarketLiquidityMonitoringChangeSubmissionWithoutTriggeringRatioParameterFails(t *testing.T) { - err := checkProposalSubmission(&commandspb.ProposalSubmission{ - Terms: &protoTypes.ProposalTerms{ - Change: &protoTypes.ProposalTerms_UpdateMarket{ - UpdateMarket: &protoTypes.UpdateMarket{ - Changes: &protoTypes.UpdateMarketConfiguration{ - LiquidityMonitoringParameters: &protoTypes.LiquidityMonitoringParameters{}, - }, - }, - }, - }, - }) - - assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.liquidity_monitoring_parameters.triggering_ratio"), commands.ErrIsNotValidNumber) -} - func testUpdateMarketLiquidityMonitoringChangeSubmissionWithoutTargetStakeParametersFails(t *testing.T) { err := checkProposalSubmission(&commandspb.ProposalSubmission{ Terms: &protoTypes.ProposalTerms{ Change: &protoTypes.ProposalTerms_UpdateMarket{ UpdateMarket: &protoTypes.UpdateMarket{ Changes: &protoTypes.UpdateMarketConfiguration{ - LiquidityMonitoringParameters: &protoTypes.LiquidityMonitoringParameters{ - TriggeringRatio: "1", - }, + LiquidityMonitoringParameters: &protoTypes.LiquidityMonitoringParameters{}, }, }, }, @@ -314,7 +291,6 @@ func testUpdateMarketLiquidityMonitoringChangeSubmissionWithTargetStakeParameter UpdateMarket: &protoTypes.UpdateMarket{ Changes: &protoTypes.UpdateMarketConfiguration{ LiquidityMonitoringParameters: &protoTypes.LiquidityMonitoringParameters{ - TriggeringRatio: "1", TargetStakeParameters: &protoTypes.TargetStakeParameters{}, }, }, @@ -347,7 +323,6 @@ func testUpdateMarketLiquidityMonitoringChangeSubmissionWithNonPositiveTimeWindo UpdateMarket: &protoTypes.UpdateMarket{ Changes: &protoTypes.UpdateMarketConfiguration{ LiquidityMonitoringParameters: &protoTypes.LiquidityMonitoringParameters{ - TriggeringRatio: "1", TargetStakeParameters: &protoTypes.TargetStakeParameters{ TimeWindow: tc.value, }, @@ -404,7 +379,6 @@ func testUpdateMarketLiquidityMonitoringChangeSubmissionWithNonPositiveScalingFa UpdateMarket: &protoTypes.UpdateMarket{ Changes: &protoTypes.UpdateMarketConfiguration{ LiquidityMonitoringParameters: &protoTypes.LiquidityMonitoringParameters{ - TriggeringRatio: "1", TargetStakeParameters: &protoTypes.TargetStakeParameters{ ScalingFactor: tc.value, }, @@ -683,6 +657,24 @@ func testUpdateMarketChangeSubmissionWithPriceMonitoringSucceeds(t *testing.T) { assert.NotContains(t, err.Get("proposal_submission.terms.change.update_market.changes.price_monitoring_parameters"), commands.ErrIsRequired) } +func testUpdateMarketChangeSubmissionWithoutInstrumentNameFails(t *testing.T) { + err := checkProposalSubmission(&commandspb.ProposalSubmission{ + Terms: &protoTypes.ProposalTerms{ + Change: &protoTypes.ProposalTerms_UpdateMarket{ + UpdateMarket: &protoTypes.UpdateMarket{ + Changes: &protoTypes.UpdateMarketConfiguration{ + Instrument: &protoTypes.UpdateInstrumentConfiguration{ + Name: "", + }, + }, + }, + }, + }, + }) + + assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.instrument.name"), commands.ErrIsRequired) +} + func testUpdateMarketChangeSubmissionWithoutInstrumentCodeFails(t *testing.T) { err := checkProposalSubmission(&commandspb.ProposalSubmission{ Terms: &protoTypes.ProposalTerms{ @@ -2800,18 +2792,6 @@ func tesUpdateMarketChangeSubmissionWithSlippageFactorBananaFails(t *testing.T) }, }) assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.linear_slippage_factor"), commands.ErrIsNotValidNumber) - err = checkProposalSubmission(&commandspb.ProposalSubmission{ - Terms: &protoTypes.ProposalTerms{ - Change: &protoTypes.ProposalTerms_UpdateMarket{ - UpdateMarket: &protoTypes.UpdateMarket{ - Changes: &protoTypes.UpdateMarketConfiguration{ - QuadraticSlippageFactor: "banana", - }, - }, - }, - }, - }) - assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.quadratic_slippage_factor"), commands.ErrIsNotValidNumber) } func testUpdateMarketChangeSubmissionWithSlippageFactorNegativeFails(t *testing.T) { @@ -2827,18 +2807,6 @@ func testUpdateMarketChangeSubmissionWithSlippageFactorNegativeFails(t *testing. }, }) assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.linear_slippage_factor"), commands.ErrMustBePositiveOrZero) - err = checkProposalSubmission(&commandspb.ProposalSubmission{ - Terms: &protoTypes.ProposalTerms{ - Change: &protoTypes.ProposalTerms_UpdateMarket{ - UpdateMarket: &protoTypes.UpdateMarket{ - Changes: &protoTypes.UpdateMarketConfiguration{ - QuadraticSlippageFactor: "-0.1", - }, - }, - }, - }, - }) - assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.quadratic_slippage_factor"), commands.ErrMustBePositiveOrZero) } func testUpdateMarketChangeSubmissionWithSlippageFactorTooLargeFails(t *testing.T) { @@ -2854,18 +2822,6 @@ func testUpdateMarketChangeSubmissionWithSlippageFactorTooLargeFails(t *testing. }, }) assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.linear_slippage_factor"), commands.ErrMustBeAtMost1M) - err = checkProposalSubmission(&commandspb.ProposalSubmission{ - Terms: &protoTypes.ProposalTerms{ - Change: &protoTypes.ProposalTerms_UpdateMarket{ - UpdateMarket: &protoTypes.UpdateMarket{ - Changes: &protoTypes.UpdateMarketConfiguration{ - QuadraticSlippageFactor: "1000000.000001", - }, - }, - }, - }, - }) - assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.quadratic_slippage_factor"), commands.ErrMustBeAtMost1M) } func testUpdateNewMarketChangeSubmissionWithEmptySlippageFactorPasses(t *testing.T) { @@ -3513,3 +3469,347 @@ func testUpdateMarketWithSettlementWithTimeTriggerFails(t *testing.T) { assert.Contains(t, err.Get("proposal_submission.terms.change.update_market.changes.instrument.product.future.data_source_spec_for_settlement_data.internal.timetrigger"), commands.ErrIsNotValid) } + +func testUpdatePerpetualMarketWithFundingRateModifiers(t *testing.T) { + cases := []struct { + product vegapb.UpdatePerpetualProduct + err error + path string + desc string + }{ + { + product: vegapb.UpdatePerpetualProduct{ + FundingRateScalingFactor: ptr.From("hello"), + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.funding_rate_scaling_factor", + err: commands.ErrIsNotValidNumber, + }, + { + product: vegapb.UpdatePerpetualProduct{ + FundingRateScalingFactor: ptr.From("-10"), + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.funding_rate_scaling_factor", + err: commands.ErrMustBePositive, + }, + { + product: vegapb.UpdatePerpetualProduct{ + FundingRateScalingFactor: ptr.From("0"), + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.funding_rate_scaling_factor", + err: commands.ErrMustBePositive, + }, + { + product: vegapb.UpdatePerpetualProduct{ + FundingRateScalingFactor: ptr.From("0.1"), + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.funding_rate_scaling_factor", + }, + { + product: vegapb.UpdatePerpetualProduct{ + FundingRateLowerBound: ptr.From("hello"), + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.funding_rate_lower_bound", + err: commands.ErrIsNotValidNumber, + }, + { + product: vegapb.UpdatePerpetualProduct{ + FundingRateLowerBound: ptr.From("-100"), + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.funding_rate_lower_bound", + }, + { + product: vegapb.UpdatePerpetualProduct{ + FundingRateUpperBound: ptr.From("hello"), + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.funding_rate_upper_bound", + err: commands.ErrIsNotValidNumber, + }, + { + product: vegapb.UpdatePerpetualProduct{ + FundingRateUpperBound: ptr.From("100"), + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.funding_rate_upper_bound", + }, + { + product: vegapb.UpdatePerpetualProduct{ + FundingRateUpperBound: ptr.From("100"), + FundingRateLowerBound: ptr.From("200"), + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.funding_rate_lower_bound", + err: commands.ErrIsNotValid, + }, + } + + for _, v := range cases { + t.Run(v.desc, func(t *testing.T) { + err := checkProposalSubmission(&commandspb.ProposalSubmission{ + Terms: &vegapb.ProposalTerms{ + Change: &vegapb.ProposalTerms_UpdateMarket{ + UpdateMarket: &vegapb.UpdateMarket{ + Changes: &vegapb.UpdateMarketConfiguration{ + Instrument: &vegapb.UpdateInstrumentConfiguration{ + Product: &vegapb.UpdateInstrumentConfiguration_Perpetual{ + Perpetual: &v.product, + }, + }, + }, + }, + }, + }, + }) + errs := err.Get(v.path) + // no errors expected + if v.err == nil { + assert.Len(t, errs, 0, v.desc) + return + } + assert.Contains(t, errs, v.err, v.desc) + }) + } +} + +func testUpdatePerpsMarketChangeSubmissionProductParameters(t *testing.T) { + cases := []struct { + product vegapb.UpdatePerpetualProduct + err error + path string + desc string + }{ + { + product: vegapb.UpdatePerpetualProduct{ + MarginFundingFactor: "", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.margin_funding_factor", + err: commands.ErrIsRequired, + desc: "margin_funding_factor is empty", + }, + { + product: vegapb.UpdatePerpetualProduct{ + MarginFundingFactor: "nope", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.margin_funding_factor", + err: commands.ErrIsNotValidNumber, + desc: "margin_funding_factor is not a valid number", + }, + { + product: vegapb.UpdatePerpetualProduct{ + MarginFundingFactor: "-10", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.margin_funding_factor", + err: commands.ErrMustBeWithinRange01, + desc: "margin_funding_factor is not within range (< 0)", + }, + { + product: vegapb.UpdatePerpetualProduct{ + MarginFundingFactor: "10", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.margin_funding_factor", + err: commands.ErrMustBeWithinRange01, + desc: "margin_funding_factor is not within range (> 1)", + }, + { + product: vegapb.UpdatePerpetualProduct{ + MarginFundingFactor: "0.5", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.margin_funding_factor", + desc: "margin_funding_factor is valid", + }, + // interest_rate + { + product: vegapb.UpdatePerpetualProduct{ + InterestRate: "", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.interest_rate", + err: commands.ErrIsRequired, + desc: "interest_rate is empty", + }, + { + product: vegapb.UpdatePerpetualProduct{ + InterestRate: "nope", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.interest_rate", + err: commands.ErrIsNotValidNumber, + desc: "interest_rate is not a valid number", + }, + { + product: vegapb.UpdatePerpetualProduct{ + InterestRate: "-10", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.interest_rate", + err: commands.ErrMustBeWithinRange11, + desc: "interest_rate is not within range (< -1)", + }, + { + product: vegapb.UpdatePerpetualProduct{ + InterestRate: "10", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.interest_rate", + err: commands.ErrMustBeWithinRange11, + desc: "interest_rate is not within range (> 1)", + }, + { + product: vegapb.UpdatePerpetualProduct{ + InterestRate: "0.5", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.interest_rate", + desc: "interest_rate is valid", + }, + { + product: vegapb.UpdatePerpetualProduct{ + InterestRate: "-0.5", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.interest_rate", + desc: "interest_rate is valid", + }, + // clamp_lower_bound + { + product: vegapb.UpdatePerpetualProduct{ + ClampLowerBound: "", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_lower_bound", + err: commands.ErrIsRequired, + desc: "clamp_lower_bound is empty", + }, + { + product: vegapb.UpdatePerpetualProduct{ + ClampLowerBound: "nope", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_lower_bound", + err: commands.ErrIsNotValidNumber, + desc: "clamp_lower_bound is not a valid number", + }, + { + product: vegapb.UpdatePerpetualProduct{ + ClampLowerBound: "-10", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_lower_bound", + err: commands.ErrMustBeWithinRange11, + desc: "clamp_lower_bound is not within range (< -1)", + }, + { + product: vegapb.UpdatePerpetualProduct{ + ClampLowerBound: "10", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_lower_bound", + err: commands.ErrMustBeWithinRange11, + desc: "clamp_lower_bound is not within range (> 1)", + }, + { + product: vegapb.UpdatePerpetualProduct{ + ClampLowerBound: "0.5", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_lower_bound", + desc: "clamp_lower_bound is valid", + }, + { + product: vegapb.UpdatePerpetualProduct{ + ClampLowerBound: "-0.5", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_lower_bound", + desc: "clamp_lower_bound is valid", + }, + // clamp_upper_bound + { + product: vegapb.UpdatePerpetualProduct{ + ClampUpperBound: "", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_upper_bound", + err: commands.ErrIsRequired, + desc: "clamp_upper_bound is empty", + }, + { + product: vegapb.UpdatePerpetualProduct{ + ClampUpperBound: "nope", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_upper_bound", + err: commands.ErrIsNotValidNumber, + desc: "clamp_upper_bound is not a valid number", + }, + { + product: vegapb.UpdatePerpetualProduct{ + ClampUpperBound: "-10", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_upper_bound", + err: commands.ErrMustBeWithinRange11, + desc: "clamp_upper_bound is not within range (< -1)", + }, + { + product: vegapb.UpdatePerpetualProduct{ + ClampUpperBound: "10", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_upper_bound", + err: commands.ErrMustBeWithinRange11, + desc: "clamp_upper_bound is not within range (> 1)", + }, + { + product: vegapb.UpdatePerpetualProduct{ + ClampUpperBound: "0.5", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_upper_bound", + desc: "clamp_upper_bound is valid", + }, + { + product: vegapb.UpdatePerpetualProduct{ + ClampUpperBound: "-0.5", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_upper_bound", + desc: "clamp_upper_bound is valid", + }, + // clamp lower and upper + { + product: vegapb.UpdatePerpetualProduct{ + ClampLowerBound: "0.5", + ClampUpperBound: "0.5", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_upper_bound", + desc: "clamp_upper_bound == clamp_lower_bound is valid", + }, + { + product: vegapb.UpdatePerpetualProduct{ + ClampLowerBound: "0.4", + ClampUpperBound: "0.5", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_upper_bound", + desc: "clamp_upper_bound > clamp_lower_bound is valid", + }, + { + product: vegapb.UpdatePerpetualProduct{ + ClampLowerBound: "0.5", + ClampUpperBound: "0.4", + }, + path: "proposal_submission.terms.change.update_market.changes.instrument.product.perps.clamp_upper_bound", + err: commands.ErrMustBeGTEClampLowerBound, + desc: "clamp_upper_bound < clamp_lower_bound is invalid", + }, + } + + for _, v := range cases { + t.Run(v.desc, func(t *testing.T) { + err := checkProposalSubmission(&commandspb.ProposalSubmission{ + Terms: &vegapb.ProposalTerms{ + Change: &vegapb.ProposalTerms_UpdateMarket{ + UpdateMarket: &vegapb.UpdateMarket{ + Changes: &vegapb.UpdateMarketConfiguration{ + Instrument: &vegapb.UpdateInstrumentConfiguration{ + Product: &vegapb.UpdateInstrumentConfiguration_Perpetual{ + Perpetual: &v.product, + }, + }, + }, + }, + }, + }, + }) + + errs := err.Get(v.path) + + // no errors expected + if v.err == nil { + assert.Len(t, errs, 0, v.desc) + return + } + + assert.Contains(t, errs, v.err, v.desc) + }) + } +} diff --git a/commands/proposal_submission_update_referral_program_test.go b/commands/proposal_submission_update_referral_program_test.go index a1063d7187..a987c8e5ff 100644 --- a/commands/proposal_submission_update_referral_program_test.go +++ b/commands/proposal_submission_update_referral_program_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -19,11 +19,11 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/assert" - "code.vegaprotocol.io/vega/commands" types "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "github.com/stretchr/testify/assert" ) func TestCheckProposalSubmissionForReferralProgramUpdate(t *testing.T) { diff --git a/commands/proposal_submission_update_spot_market_test.go b/commands/proposal_submission_update_spot_market_test.go index 4cecd30d49..c49cf1006a 100644 --- a/commands/proposal_submission_update_spot_market_test.go +++ b/commands/proposal_submission_update_spot_market_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/libs/test" protoTypes "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) diff --git a/commands/proposal_submission_update_volume_discount_program_test.go b/commands/proposal_submission_update_volume_discount_program_test.go index 89ba3fb5a0..b5107d318a 100644 --- a/commands/proposal_submission_update_volume_discount_program_test.go +++ b/commands/proposal_submission_update_volume_discount_program_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -18,11 +18,11 @@ package commands_test import ( "testing" - "github.com/stretchr/testify/assert" - "code.vegaprotocol.io/vega/commands" types "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "github.com/stretchr/testify/assert" ) func TestCheckProposalSubmissionForVolumeDiscountProgramUpdate(t *testing.T) { diff --git a/commands/protocol_upgrade_proposal.go b/commands/protocol_upgrade_proposal.go index ca10e69c9e..f82b2f6b7b 100644 --- a/commands/protocol_upgrade_proposal.go +++ b/commands/protocol_upgrade_proposal.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/state_var_proposal_submission.go b/commands/state_var_proposal_submission.go index 05d561abed..40f501d671 100644 --- a/commands/state_var_proposal_submission.go +++ b/commands/state_var_proposal_submission.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/state_var_proposal_submission_test.go b/commands/state_var_proposal_submission_test.go index 54cf6d3237..f29a74bdfd 100644 --- a/commands/state_var_proposal_submission_test.go +++ b/commands/state_var_proposal_submission_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/stop_order_submission_test.go b/commands/stop_order_submission_test.go index 69138331f7..0d09444650 100644 --- a/commands/stop_order_submission_test.go +++ b/commands/stop_order_submission_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) @@ -276,6 +277,182 @@ func TestCheckStopOrdersStubmission(t *testing.T) { }, errStr: "", }, + { + submission: commandspb.StopOrdersSubmission{ + RisesAbove: &commandspb.StopOrderSetup{ + OrderSubmission: &commandspb.OrderSubmission{ + MarketId: "f9982447fb4128f9968f9981612c5ea85d19b62058ec2636efc812dcbbc745ca", + Side: vega.Side_SIDE_BUY, + Size: 100, + TimeInForce: vega.Order_TIME_IN_FORCE_IOC, + Type: vega.Order_TYPE_MARKET, + ReduceOnly: true, + }, + ExpiresAt: ptr.From(int64(1000)), + ExpiryStrategy: ptr.From(vega.StopOrder_EXPIRY_STRATEGY_CANCELS), + Trigger: &commandspb.StopOrderSetup_TrailingPercentOffset{ + TrailingPercentOffset: "0.1", + }, + SizeOverrideSetting: ptr.From(vega.StopOrder_SIZE_OVERRIDE_SETTING_POSITION), + SizeOverrideValue: &vega.StopOrder_SizeOverrideValue{Percentage: "0.5"}, + }, + }, + errStr: "", + }, + { + submission: commandspb.StopOrdersSubmission{ + RisesAbove: &commandspb.StopOrderSetup{ + OrderSubmission: &commandspb.OrderSubmission{ + MarketId: "f9982447fb4128f9968f9981612c5ea85d19b62058ec2636efc812dcbbc745ca", + Side: vega.Side_SIDE_BUY, + Size: 100, + TimeInForce: vega.Order_TIME_IN_FORCE_IOC, + Type: vega.Order_TYPE_MARKET, + ReduceOnly: true, + }, + ExpiresAt: ptr.From(int64(1000)), + ExpiryStrategy: ptr.From(vega.StopOrder_EXPIRY_STRATEGY_CANCELS), + Trigger: &commandspb.StopOrderSetup_TrailingPercentOffset{ + TrailingPercentOffset: "0.1", + }, + SizeOverrideSetting: ptr.From(vega.StopOrder_SIZE_OVERRIDE_SETTING_POSITION), + SizeOverrideValue: &vega.StopOrder_SizeOverrideValue{Percentage: "BrokenString"}, + }, + }, + errStr: "stop_orders_submission.rises_above.size_override_value (is not a valid number)", + }, + { + submission: commandspb.StopOrdersSubmission{ + RisesAbove: &commandspb.StopOrderSetup{ + OrderSubmission: &commandspb.OrderSubmission{ + MarketId: "f9982447fb4128f9968f9981612c5ea85d19b62058ec2636efc812dcbbc745ca", + Side: vega.Side_SIDE_BUY, + Size: 100, + TimeInForce: vega.Order_TIME_IN_FORCE_IOC, + Type: vega.Order_TYPE_MARKET, + ReduceOnly: true, + }, + ExpiresAt: ptr.From(int64(1000)), + ExpiryStrategy: ptr.From(vega.StopOrder_EXPIRY_STRATEGY_CANCELS), + Trigger: &commandspb.StopOrderSetup_TrailingPercentOffset{ + TrailingPercentOffset: "0.1", + }, + SizeOverrideSetting: ptr.From(vega.StopOrder_SIZE_OVERRIDE_SETTING_POSITION), + SizeOverrideValue: &vega.StopOrder_SizeOverrideValue{Percentage: "0.0"}, + }, + }, + errStr: "stop_orders_submission.rises_above.size_override_value (must be between 0 (excluded) and 1 (included))", + }, + { + submission: commandspb.StopOrdersSubmission{ + RisesAbove: &commandspb.StopOrderSetup{ + OrderSubmission: &commandspb.OrderSubmission{ + MarketId: "f9982447fb4128f9968f9981612c5ea85d19b62058ec2636efc812dcbbc745ca", + Side: vega.Side_SIDE_BUY, + Size: 100, + TimeInForce: vega.Order_TIME_IN_FORCE_IOC, + Type: vega.Order_TYPE_MARKET, + ReduceOnly: true, + }, + ExpiresAt: ptr.From(int64(1000)), + ExpiryStrategy: ptr.From(vega.StopOrder_EXPIRY_STRATEGY_CANCELS), + Trigger: &commandspb.StopOrderSetup_TrailingPercentOffset{ + TrailingPercentOffset: "0.1", + }, + SizeOverrideSetting: ptr.From(vega.StopOrder_SIZE_OVERRIDE_SETTING_POSITION), + SizeOverrideValue: &vega.StopOrder_SizeOverrideValue{Percentage: "1.1"}, + }, + }, + errStr: "stop_orders_submission.rises_above.size_override_value (must be between 0 (excluded) and 1 (included))", + }, + { + submission: commandspb.StopOrdersSubmission{ + FallsBelow: &commandspb.StopOrderSetup{ + OrderSubmission: &commandspb.OrderSubmission{ + MarketId: "f9982447fb4128f9968f9981612c5ea85d19b62058ec2636efc812dcbbc745ca", + Side: vega.Side_SIDE_BUY, + Size: 100, + TimeInForce: vega.Order_TIME_IN_FORCE_IOC, + Type: vega.Order_TYPE_MARKET, + ReduceOnly: true, + }, + ExpiresAt: ptr.From(int64(1000)), + ExpiryStrategy: ptr.From(vega.StopOrder_EXPIRY_STRATEGY_CANCELS), + Trigger: &commandspb.StopOrderSetup_TrailingPercentOffset{ + TrailingPercentOffset: "0.1", + }, + SizeOverrideSetting: ptr.From(vega.StopOrder_SIZE_OVERRIDE_SETTING_POSITION), + SizeOverrideValue: &vega.StopOrder_SizeOverrideValue{Percentage: "0.5"}, + }, + }, + errStr: "", + }, + { + submission: commandspb.StopOrdersSubmission{ + FallsBelow: &commandspb.StopOrderSetup{ + OrderSubmission: &commandspb.OrderSubmission{ + MarketId: "f9982447fb4128f9968f9981612c5ea85d19b62058ec2636efc812dcbbc745ca", + Side: vega.Side_SIDE_BUY, + Size: 100, + TimeInForce: vega.Order_TIME_IN_FORCE_IOC, + Type: vega.Order_TYPE_MARKET, + ReduceOnly: true, + }, + ExpiresAt: ptr.From(int64(1000)), + ExpiryStrategy: ptr.From(vega.StopOrder_EXPIRY_STRATEGY_CANCELS), + Trigger: &commandspb.StopOrderSetup_TrailingPercentOffset{ + TrailingPercentOffset: "0.1", + }, + SizeOverrideSetting: ptr.From(vega.StopOrder_SIZE_OVERRIDE_SETTING_POSITION), + SizeOverrideValue: &vega.StopOrder_SizeOverrideValue{Percentage: "BrokenString"}, + }, + }, + errStr: "stop_orders_submission.falls_below.size_override_value (is not a valid number)", + }, + { + submission: commandspb.StopOrdersSubmission{ + FallsBelow: &commandspb.StopOrderSetup{ + OrderSubmission: &commandspb.OrderSubmission{ + MarketId: "f9982447fb4128f9968f9981612c5ea85d19b62058ec2636efc812dcbbc745ca", + Side: vega.Side_SIDE_BUY, + Size: 100, + TimeInForce: vega.Order_TIME_IN_FORCE_IOC, + Type: vega.Order_TYPE_MARKET, + ReduceOnly: true, + }, + ExpiresAt: ptr.From(int64(1000)), + ExpiryStrategy: ptr.From(vega.StopOrder_EXPIRY_STRATEGY_CANCELS), + Trigger: &commandspb.StopOrderSetup_TrailingPercentOffset{ + TrailingPercentOffset: "0.1", + }, + SizeOverrideSetting: ptr.From(vega.StopOrder_SIZE_OVERRIDE_SETTING_POSITION), + SizeOverrideValue: &vega.StopOrder_SizeOverrideValue{Percentage: "0.0"}, + }, + }, + errStr: "stop_orders_submission.falls_below.size_override_value (must be between 0 (excluded) and 1 (included))", + }, + { + submission: commandspb.StopOrdersSubmission{ + FallsBelow: &commandspb.StopOrderSetup{ + OrderSubmission: &commandspb.OrderSubmission{ + MarketId: "f9982447fb4128f9968f9981612c5ea85d19b62058ec2636efc812dcbbc745ca", + Side: vega.Side_SIDE_BUY, + Size: 100, + TimeInForce: vega.Order_TIME_IN_FORCE_IOC, + Type: vega.Order_TYPE_MARKET, + ReduceOnly: true, + }, + ExpiresAt: ptr.From(int64(1000)), + ExpiryStrategy: ptr.From(vega.StopOrder_EXPIRY_STRATEGY_CANCELS), + Trigger: &commandspb.StopOrderSetup_TrailingPercentOffset{ + TrailingPercentOffset: "0.1", + }, + SizeOverrideSetting: ptr.From(vega.StopOrder_SIZE_OVERRIDE_SETTING_POSITION), + SizeOverrideValue: &vega.StopOrder_SizeOverrideValue{Percentage: "1.1"}, + }, + }, + errStr: "stop_orders_submission.falls_below.size_override_value (must be between 0 (excluded) and 1 (included))", + }, } for n, c := range cases { diff --git a/commands/stop_orders_cancellation.go b/commands/stop_orders_cancellation.go index 4095b962d2..7d64604551 100644 --- a/commands/stop_orders_cancellation.go +++ b/commands/stop_orders_cancellation.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/stop_orders_submission.go b/commands/stop_orders_submission.go index 6a5861abe8..da7661eac0 100644 --- a/commands/stop_orders_submission.go +++ b/commands/stop_orders_submission.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -41,6 +41,24 @@ func checkStopOrdersSubmission(cmd *commandspb.StopOrdersSubmission) Errors { "stop_orders_submission.falls_below", errs, cmd.FallsBelow, cmd.RisesAbove != nil) if cmd.FallsBelow.OrderSubmission != nil { market1 = cmd.FallsBelow.OrderSubmission.MarketId + if cmd.FallsBelow.SizeOverrideSetting != nil { + if *cmd.FallsBelow.SizeOverrideSetting == types.StopOrder_SIZE_OVERRIDE_SETTING_POSITION { + if cmd.FallsBelow.SizeOverrideValue != nil { + value := cmd.FallsBelow.SizeOverrideValue.GetPercentage() + // Check that the string represents a number between >0&&>=1 + percentage, err := num.DecimalFromString(value) + if err != nil { + return errs.FinalAddForProperty("stop_orders_submission.falls_below.size_override_value", ErrIsNotValidNumber) + } + if percentage.LessThanOrEqual(num.DecimalFromFloat(0.0)) { + return errs.FinalAddForProperty("stop_orders_submission.falls_below.size_override_value", ErrMustBeBetween01) + } + if percentage.GreaterThan(num.DecimalFromFloat(1.0)) { + return errs.FinalAddForProperty("stop_orders_submission.falls_below.size_override_value", ErrMustBeBetween01) + } + } + } + } } } @@ -49,6 +67,24 @@ func checkStopOrdersSubmission(cmd *commandspb.StopOrdersSubmission) Errors { "stop_orders_submission.rises_below", errs, cmd.RisesAbove, cmd.FallsBelow != nil) if cmd.RisesAbove.OrderSubmission != nil { market2 = cmd.RisesAbove.OrderSubmission.MarketId + if cmd.RisesAbove.SizeOverrideSetting != nil { + if *cmd.RisesAbove.SizeOverrideSetting == types.StopOrder_SIZE_OVERRIDE_SETTING_POSITION { + if cmd.RisesAbove.SizeOverrideValue != nil { + value := cmd.RisesAbove.SizeOverrideValue.GetPercentage() + // Check that the string represents a number between >0&&>=1 + percentage, err := num.DecimalFromString(value) + if err != nil { + return errs.FinalAddForProperty("stop_orders_submission.rises_above.size_override_value", ErrIsNotValidNumber) + } + if percentage.LessThanOrEqual(num.DecimalFromFloat(0.0)) { + return errs.FinalAddForProperty("stop_orders_submission.rises_above.size_override_value", ErrMustBeBetween01) + } + if percentage.GreaterThan(num.DecimalFromFloat(1.0)) { + return errs.FinalAddForProperty("stop_orders_submission.rises_above.size_override_value", ErrMustBeBetween01) + } + } + } + } } } diff --git a/commands/transaction.go b/commands/transaction.go index 959497f0ef..bd401e7b16 100644 --- a/commands/transaction.go +++ b/commands/transaction.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -208,6 +208,8 @@ func CheckInputData(rawInputData []byte) (*commandspb.InputData, Errors) { errs.Merge(checkLiquidityProvisionAmendment(cmd.LiquidityProvisionAmendment)) case *commandspb.InputData_ProposalSubmission: errs.Merge(checkProposalSubmission(cmd.ProposalSubmission)) + case *commandspb.InputData_BatchProposalSubmission: + errs.Merge(checkBatchProposalSubmission(cmd.BatchProposalSubmission)) case *commandspb.InputData_AnnounceNode: errs.Merge(checkAnnounceNode(cmd.AnnounceNode)) case *commandspb.InputData_NodeVote: @@ -250,6 +252,12 @@ func CheckInputData(rawInputData []byte) (*commandspb.InputData, Errors) { errs.Merge(checkUpdateReferralSet(cmd.UpdateReferralSet)) case *commandspb.InputData_ApplyReferralCode: errs.Merge(checkApplyReferralCode(cmd.ApplyReferralCode)) + case *commandspb.InputData_UpdateMarginMode: + errs.Merge(checkUpdateMarginMode(cmd.UpdateMarginMode)) + case *commandspb.InputData_JoinTeam: + errs.Merge(checkJoinTeam(cmd.JoinTeam)) + case *commandspb.InputData_UpdatePartyProfile: + errs.Merge(checkUpdatePartyProfile(cmd.UpdatePartyProfile)) default: errs.AddForProperty("tx.input_data.command", ErrIsNotSupported) } diff --git a/commands/transaction_test.go b/commands/transaction_test.go index ca8a6b96a7..00be37a0a4 100644 --- a/commands/transaction_test.go +++ b/commands/transaction_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/commands" "code.vegaprotocol.io/vega/libs/crypto" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" diff --git a/commands/transfer_funds.go b/commands/transfer_funds.go index f1f2253222..c00a6e9e61 100644 --- a/commands/transfer_funds.go +++ b/commands/transfer_funds.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -292,9 +292,4 @@ func validateDispatchStrategy(toAccountType vega.AccountType, dispatchStrategy * } } } - - // temporarily disable teams scope - if dispatchStrategy.EntityScope == vega.EntityScope_ENTITY_SCOPE_TEAMS { - errs.AddForProperty(prefix+".team_scope", ErrIsNotSupported) - } } diff --git a/commands/transfer_funds_test.go b/commands/transfer_funds_test.go index b0923cbecb..eb98fb7a91 100644 --- a/commands/transfer_funds_test.go +++ b/commands/transfer_funds_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) @@ -1129,7 +1130,6 @@ func TestTransferFunds(t *testing.T) { Amount: "1", Reference: "testing", }, - errString: "transfer.kind.dispatch_strategy.team_scope (is not supported)", }, } diff --git a/commands/update_margin_mode.go b/commands/update_margin_mode.go new file mode 100644 index 0000000000..38524d7e5e --- /dev/null +++ b/commands/update_margin_mode.go @@ -0,0 +1,64 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package commands + +import ( + "fmt" + + "code.vegaprotocol.io/vega/libs/num" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" +) + +func CheckUpdateMarginMode(cmd *commandspb.UpdateMarginMode) error { + return checkUpdateMarginMode(cmd).ErrorOrNil() +} + +func checkUpdateMarginMode(cmd *commandspb.UpdateMarginMode) Errors { + errs := NewErrors() + + if cmd == nil { + return errs.FinalAddForProperty("update_margin_mode", ErrIsRequired) + } + + if cmd.Mode == commandspb.UpdateMarginMode_MODE_UNSPECIFIED { + errs.AddForProperty("update_margin_mode.margin_mode", ErrIsNotValid) + } + + if _, ok := commandspb.UpdateMarginMode_Mode_name[int32(cmd.Mode)]; !ok { + errs.AddForProperty("update_margin_mode.margin_mode", ErrIsNotValid) + } + + if cmd.Mode == commandspb.UpdateMarginMode_MODE_CROSS_MARGIN && cmd.MarginFactor != nil { + errs.AddForProperty("update_margin_mode.margin_factor", fmt.Errorf("margin factor must not be defined when margin mode is cross margin")) + } + + if cmd.Mode == commandspb.UpdateMarginMode_MODE_ISOLATED_MARGIN && (cmd.MarginFactor == nil || len(*cmd.MarginFactor) == 0) { + errs.AddForProperty("update_margin_mode.margin_factor", fmt.Errorf("margin factor must be defined when margin mode is isolated margin")) + } + + if cmd.Mode == commandspb.UpdateMarginMode_MODE_ISOLATED_MARGIN && cmd.MarginFactor != nil && len(*cmd.MarginFactor) > 0 { + if factor, err := num.DecimalFromString(*cmd.MarginFactor); err != nil { + errs.AddForProperty("update_margin_mode.margin_factor", ErrIsNotValidNumber) + } else if factor.LessThanOrEqual(num.DecimalZero()) || factor.GreaterThan(num.DecimalOne()) { + errs.AddForProperty("update_margin_mode.margin_factor", ErrMustBeBetween01) + } + } + if len(cmd.MarketId) == 0 { + errs.AddForProperty("update_margin_mode.market_id", ErrIsRequired) + } + + return errs +} diff --git a/commands/update_margin_mode_test.go b/commands/update_margin_mode_test.go new file mode 100644 index 0000000000..8a12ea3ebc --- /dev/null +++ b/commands/update_margin_mode_test.go @@ -0,0 +1,169 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package commands_test + +import ( + "errors" + "fmt" + "testing" + + "code.vegaprotocol.io/vega/commands" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "github.com/stretchr/testify/require" +) + +func TestUpdateMarginMode(t *testing.T) { + positiveMarginFactor := "123" + invalidNumderMarginFactor := "banana" + invalidDecimalMarginFactor := "1.2.3" + negativeMarginFactor := "-0.2" + zeroMarginFactor := "0" + largeMarginFactor101 := "1.01" + validMarginFactor1 := "1" + validMarginFactorHalf := "0.5" + + txs := []struct { + name string + cmd *commandspb.UpdateMarginMode + errName string + err error + }{ + { + "cmd is nil", + nil, + "update_margin_mode", + commands.ErrIsRequired, + }, + { + "unspecified mode", + &commandspb.UpdateMarginMode{ + Mode: commandspb.UpdateMarginMode_MODE_UNSPECIFIED, + }, + "update_margin_mode.margin_mode", + commands.ErrIsNotValid, + }, + { + "isolated margin mode without margin factor", + &commandspb.UpdateMarginMode{ + Mode: commandspb.UpdateMarginMode_MODE_ISOLATED_MARGIN, + }, + "update_margin_mode.margin_factor", + fmt.Errorf("margin factor must be defined when margin mode is isolated margin"), + }, + { + "cross margin mode with margin factor", + &commandspb.UpdateMarginMode{ + Mode: commandspb.UpdateMarginMode_MODE_CROSS_MARGIN, + MarginFactor: &positiveMarginFactor, + }, + "update_margin_mode.margin_factor", + fmt.Errorf("margin factor must not be defined when margin mode is cross margin"), + }, + { + "cross margin mode with invalid number as margin factor 1", + &commandspb.UpdateMarginMode{ + Mode: commandspb.UpdateMarginMode_MODE_ISOLATED_MARGIN, + MarginFactor: &invalidNumderMarginFactor, + }, + "update_margin_mode.margin_factor", + commands.ErrIsNotValidNumber, + }, + { + "cross margin mode with invalid number as margin factor 2", + &commandspb.UpdateMarginMode{ + Mode: commandspb.UpdateMarginMode_MODE_ISOLATED_MARGIN, + MarginFactor: &invalidDecimalMarginFactor, + }, + "update_margin_mode.margin_factor", + commands.ErrIsNotValidNumber, + }, + { + "cross margin mode with negative number as margin factor", + &commandspb.UpdateMarginMode{ + Mode: commandspb.UpdateMarginMode_MODE_ISOLATED_MARGIN, + MarginFactor: &negativeMarginFactor, + }, + "update_margin_mode.margin_factor", + commands.ErrMustBeBetween01, + }, + { + "cross margin mode with 0 as margin factor", + &commandspb.UpdateMarginMode{ + Mode: commandspb.UpdateMarginMode_MODE_ISOLATED_MARGIN, + MarginFactor: &zeroMarginFactor, + }, + "update_margin_mode.margin_factor", + commands.ErrMustBeBetween01, + }, + { + "cross margin mode with >1 as margin factor", + &commandspb.UpdateMarginMode{ + Mode: commandspb.UpdateMarginMode_MODE_ISOLATED_MARGIN, + MarginFactor: &largeMarginFactor101, + }, + "update_margin_mode.margin_factor", + commands.ErrMustBeBetween01, + }, + { + "cross margin mode with missing market id", + &commandspb.UpdateMarginMode{ + Mode: commandspb.UpdateMarginMode_MODE_ISOLATED_MARGIN, + MarginFactor: &validMarginFactor1, + }, + "update_margin_mode.market_id", + commands.ErrIsRequired, + }, + { + "valid cross margin update", + &commandspb.UpdateMarginMode{ + Mode: commandspb.UpdateMarginMode_MODE_CROSS_MARGIN, + MarketId: "123", + }, + "", + nil, + }, + { + "valid isolated margin update", + &commandspb.UpdateMarginMode{ + Mode: commandspb.UpdateMarginMode_MODE_ISOLATED_MARGIN, + MarketId: "123", + MarginFactor: &validMarginFactorHalf, + }, + "", + nil, + }, + } + + for _, v := range txs { + err := checkUpdateMarginMode(t, v.cmd) + if v.err == nil { + require.Empty(t, len(err)) + } else { + require.Contains(t, err.Get(v.errName), v.err, v.name) + } + } +} + +func checkUpdateMarginMode(t *testing.T, cmd *commandspb.UpdateMarginMode) commands.Errors { + t.Helper() + err := commands.CheckUpdateMarginMode(cmd) + var e commands.Errors + if ok := errors.As(err, &e); !ok { + return commands.NewErrors() + } + return e +} diff --git a/commands/update_party_profile.go b/commands/update_party_profile.go new file mode 100644 index 0000000000..35ab0baaca --- /dev/null +++ b/commands/update_party_profile.go @@ -0,0 +1,63 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package commands + +import ( + "fmt" + + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" +) + +func CheckUpdatePartyProfile(cmd *commandspb.UpdatePartyProfile) error { + return checkUpdatePartyProfile(cmd).ErrorOrNil() +} + +func checkUpdatePartyProfile(cmd *commandspb.UpdatePartyProfile) Errors { + errs := NewErrors() + + if cmd == nil { + return errs.FinalAddForProperty("update_party_profile", ErrIsRequired) + } + + if len(cmd.Alias) > 32 { + errs.AddForProperty("update_party_profile.alias", ErrIsLimitedTo32Characters) + } + + if len(cmd.Metadata) > 10 { + errs.AddForProperty("update_party_profile.metadata", ErrIsLimitedTo10Entries) + } else { + seenKeys := map[string]interface{}{} + for i, m := range cmd.Metadata { + if len(m.Key) > 32 { + errs.AddForProperty(fmt.Sprintf("update_party_profile.metadata.%d.key", i), ErrIsLimitedTo32Characters) + } else if len(m.Key) == 0 { + errs.AddForProperty(fmt.Sprintf("update_party_profile.metadata.%d.key", i), ErrCannotBeBlank) + } + + _, alreadySeen := seenKeys[m.Key] + if alreadySeen { + errs.AddForProperty(fmt.Sprintf("update_party_profile.metadata.%d.key", i), ErrIsDuplicated) + } + seenKeys[m.Key] = nil + + if len(m.Value) > 255 { + errs.AddForProperty(fmt.Sprintf("update_party_profile.metadata.%d.value", i), ErrIsLimitedTo255Characters) + } + } + } + + return errs +} diff --git a/commands/update_party_profile_test.go b/commands/update_party_profile_test.go new file mode 100644 index 0000000000..ec23c39877 --- /dev/null +++ b/commands/update_party_profile_test.go @@ -0,0 +1,189 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package commands_test + +import ( + "errors" + "testing" + + "code.vegaprotocol.io/vega/commands" + vegapb "code.vegaprotocol.io/vega/protos/vega" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "github.com/stretchr/testify/assert" +) + +func TestUpdatePartyProfile(t *testing.T) { + t.Run("Updating party's profile succeeds", testUpdatePartyProfileSucceeds) + t.Run("Updating party's profile with invalid alias fails", testUpdatePartyProfileWithInvalidAliasFails) + t.Run("Updating party's profile with invalid metadata fails", testUpdatePartyProfileWithInvalidMetadataFails) +} + +func testUpdatePartyProfileSucceeds(t *testing.T) { + tcs := []struct { + name string + cmd *commandspb.UpdatePartyProfile + }{ + { + name: "when empty", + cmd: &commandspb.UpdatePartyProfile{}, + }, { + name: "with an alias", + cmd: &commandspb.UpdatePartyProfile{ + Alias: "test", + }, + }, { + name: "with metadata", + cmd: &commandspb.UpdatePartyProfile{ + Metadata: []*vegapb.Metadata{ + { + Key: "key", + Value: "value", + }, + }, + }, + }, { + name: "with both", + cmd: &commandspb.UpdatePartyProfile{ + Alias: "test", + Metadata: []*vegapb.Metadata{ + { + Key: "key", + Value: "value", + }, + }, + }, + }, + } + + for _, tc := range tcs { + t.Run(tc.name, func(t *testing.T) { + err := checkUpdatePartyProfile(t, tc.cmd) + + assert.Empty(t, err) + }) + } +} + +// 0088-PPRF-001. +func testUpdatePartyProfileWithInvalidAliasFails(t *testing.T) { + tcs := []struct { + name string + alias string + err error + }{ + { + name: "with more than 32 characters", + alias: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + err: commands.ErrIsLimitedTo32Characters, + }, + } + + for _, tc := range tcs { + t.Run(tc.name, func(t *testing.T) { + err := checkUpdatePartyProfile(t, &commandspb.UpdatePartyProfile{ + Alias: tc.alias, + }) + + assert.Contains(t, err.Get("update_party_profile.alias"), tc.err) + }) + } +} + +// 0088-PPRF-003, 0088-PPRF-004, 0088-PPRF-005. +func testUpdatePartyProfileWithInvalidMetadataFails(t *testing.T) { + tcs := []struct { + name string + metadata []*vegapb.Metadata + field string + err error + }{ + { + name: "with more than 10 entries", + metadata: []*vegapb.Metadata{{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}}, + field: "update_party_profile.metadata", + err: commands.ErrIsLimitedTo10Entries, + }, { + name: "with empty key", + metadata: []*vegapb.Metadata{ + { + Key: "", + Value: "", + }, + }, + field: "update_party_profile.metadata.0.key", + err: commands.ErrCannotBeBlank, + }, { + name: "with key more than 32 characters", + metadata: []*vegapb.Metadata{ + { + Key: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + Value: "", + }, + }, + field: "update_party_profile.metadata.0.key", + err: commands.ErrIsLimitedTo32Characters, + }, { + name: "with duplicated key", + metadata: []*vegapb.Metadata{ + { + Key: "hello", + Value: "value1", + }, { + Key: "hello", + Value: "value2", + }, + }, + field: "update_party_profile.metadata.1.key", + err: commands.ErrIsDuplicated, + }, { + name: "with value more than 255 characters", + metadata: []*vegapb.Metadata{ + { + Key: "test", + Value: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + }, + }, + field: "update_party_profile.metadata.0.value", + err: commands.ErrIsLimitedTo255Characters, + }, + } + + for _, tc := range tcs { + t.Run(tc.name, func(t *testing.T) { + err := checkUpdatePartyProfile(t, &commandspb.UpdatePartyProfile{ + Metadata: tc.metadata, + }) + + assert.Contains(t, err.Get(tc.field), tc.err) + }) + } +} + +func checkUpdatePartyProfile(t *testing.T, cmd *commandspb.UpdatePartyProfile) commands.Errors { + t.Helper() + + err := commands.CheckUpdatePartyProfile(cmd) + + var e commands.Errors + if ok := errors.As(err, &e); !ok { + return commands.NewErrors() + } + + return e +} diff --git a/commands/update_referral_set.go b/commands/update_referral_set.go index 29b0be0b92..f01b81b7fe 100644 --- a/commands/update_referral_set.go +++ b/commands/update_referral_set.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -54,8 +54,13 @@ func checkUpdateReferralSet(cmd *commandspb.UpdateReferralSet) Errors { errs.AddForProperty("update_referral_set.team.team_url", ErrMustBeLessThan200Chars) } - // temporarily disable team support - errs.AddForProperty("update_referral_set.team", ErrIsNotSupported) + if cmd.Team.Closed == nil && len(cmd.Team.AllowList) > 0 { + errs.AddForProperty("update_referral_set.team.allow_list", ErrSettingAllowListRequireSettingClosedState) + } + + if cmd.Team.Closed != nil && !*cmd.Team.Closed && len(cmd.Team.AllowList) > 0 { + errs.AddForProperty("update_referral_set.team.allow_list", ErrCannotSetAllowListWhenTeamIsOpened) + } } return errs diff --git a/commands/update_referral_set_test.go b/commands/update_referral_set_test.go index 26953f2b19..0636c29087 100644 --- a/commands/update_referral_set_test.go +++ b/commands/update_referral_set_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -24,6 +24,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" vgtest "code.vegaprotocol.io/vega/libs/test" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -103,11 +104,7 @@ func testUpdatingTeamSucceeds(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(tt *testing.T) { - if !tc.cmd.IsTeam { - require.Empty(tt, checkUpdateReferralSet(tt, tc.cmd)) - } else { - require.Contains(tt, checkUpdateReferralSet(tt, tc.cmd).Get("update_referral_set.team"), commands.ErrIsNotSupported, tc.name) - } + require.Empty(tt, checkUpdateReferralSet(tt, tc.cmd)) }) } } @@ -165,6 +162,25 @@ func testUpdateReferralSetFails(t *testing.T) { }) assert.Contains(t, err.Get("update_referral_set.team.team_url"), commands.ErrMustBeLessThan200Chars) + + err = checkUpdateReferralSet(t, &commandspb.UpdateReferralSet{ + IsTeam: true, + Team: &commandspb.UpdateReferralSet_Team{ + AllowList: []string{vgrand.RandomStr(5)}, + }, + }) + + assert.Contains(t, err.Get("update_referral_set.team.allow_list"), commands.ErrSettingAllowListRequireSettingClosedState) + + err = checkUpdateReferralSet(t, &commandspb.UpdateReferralSet{ + IsTeam: true, + Team: &commandspb.UpdateReferralSet_Team{ + Closed: ptr.From(false), + AllowList: []string{vgrand.RandomStr(5)}, + }, + }) + + assert.Contains(t, err.Get("update_referral_set.team.allow_list"), commands.ErrCannotSetAllowListWhenTeamIsOpened) } func checkUpdateReferralSet(t *testing.T, cmd *commandspb.UpdateReferralSet) commands.Errors { diff --git a/commands/validator_heartbeat.go b/commands/validator_heartbeat.go index a05fb78e5d..ce63273723 100644 --- a/commands/validator_heartbeat.go +++ b/commands/validator_heartbeat.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/validator_heartbeat_test.go b/commands/validator_heartbeat_test.go index aa63080183..df0bbdcb5d 100644 --- a/commands/validator_heartbeat_test.go +++ b/commands/validator_heartbeat_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/commands" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" ) diff --git a/commands/vote_submission.go b/commands/vote_submission.go index e7bd1cc8e0..9b05bb94e5 100644 --- a/commands/vote_submission.go +++ b/commands/vote_submission.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/vote_submission_test.go b/commands/vote_submission_test.go index a7ef8ea606..70ab53c2c2 100644 --- a/commands/vote_submission_test.go +++ b/commands/vote_submission_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/withdraw_submission.go b/commands/withdraw_submission.go index 90b4419e36..56bd7f93d1 100644 --- a/commands/withdraw_submission.go +++ b/commands/withdraw_submission.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/commands/withdraw_submission_test.go b/commands/withdraw_submission_test.go index 7345d50f9b..cb4aeba014 100644 --- a/commands/withdraw_submission_test.go +++ b/commands/withdraw_submission_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/core/activitystreak/activitiystreak.go b/core/activitystreak/activitiystreak.go index 1b73e9e742..4777fa2f79 100644 --- a/core/activitystreak/activitiystreak.go +++ b/core/activitystreak/activitiystreak.go @@ -23,10 +23,10 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" - "golang.org/x/exp/maps" - vegapb "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "golang.org/x/exp/maps" ) //go:generate go run github.com/golang/mock/mockgen -destination mocks/mocks.go -package mocks code.vegaprotocol.io/vega/core/activitystreak Broker,MarketsStatsAggregator diff --git a/core/admin/client.go b/core/admin/client.go index f75f080adc..07f14b885f 100644 --- a/core/admin/client.go +++ b/core/admin/client.go @@ -23,30 +23,20 @@ import ( "net/http" "net/url" - "github.com/gorilla/rpc/json" - "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/logging" + + "github.com/gorilla/rpc/json" ) // Client implement a socket client allowing to run simple RPC commands. type Client struct { - log *logging.Logger cfg Config http *http.Client } // NewClient returns a new instance of the RPC socket client. -func NewClient( - log *logging.Logger, - config Config, -) *Client { - // setup logger - log = log.Named(clientNamedLogger) - log.SetLevel(config.Level.Get()) - +func NewClient(config Config) *Client { return &Client{ - log: log, cfg: config, http: &http.Client{ Transport: &http.Transport{ @@ -79,7 +69,7 @@ func (s *Client) call(ctx context.Context, method string, args interface{}, repl resp, err := s.http.Do(httpReq) if err != nil { - return fmt.Errorf("failed to post data %q: %w", string(req), err) + return fmt.Errorf("request failed: %w", err) } defer resp.Body.Close() @@ -114,7 +104,7 @@ func (s *Client) UpgradeStatus(ctx context.Context) (*types.UpgradeStatus, error var reply types.UpgradeStatus if err := s.call(ctx, "protocolupgrade.UpgradeStatus", nil, &reply); err != nil { - return nil, fmt.Errorf("failed to call protocolupgrade.UpgradeStatus method: %w", err) + return nil, fmt.Errorf("failed to get protocol update status: %w", err) } return &reply, nil diff --git a/core/admin/server.go b/core/admin/server.go index e0a9c659c7..b2c8dcc5d1 100644 --- a/core/admin/server.go +++ b/core/admin/server.go @@ -22,14 +22,14 @@ import ( "net/http" "os" - "github.com/gorilla/mux" - "github.com/gorilla/rpc" - "github.com/gorilla/rpc/json" - "code.vegaprotocol.io/vega/core/nodewallets" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + + "github.com/gorilla/mux" + "github.com/gorilla/rpc" + "github.com/gorilla/rpc/json" ) type ProtocolUpgradeService interface { diff --git a/core/api/core.go b/core/api/core.go index d29f9d4f4c..c2e9aba9fc 100644 --- a/core/api/core.go +++ b/core/api/core.go @@ -26,14 +26,13 @@ import ( "sync/atomic" "time" - "code.vegaprotocol.io/vega/libs/subscribers" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/evtforward" "code.vegaprotocol.io/vega/core/metrics" "code.vegaprotocol.io/vega/core/stats" "code.vegaprotocol.io/vega/core/vegatime" "code.vegaprotocol.io/vega/libs/proto" + "code.vegaprotocol.io/vega/libs/subscribers" "code.vegaprotocol.io/vega/logging" ptypes "code.vegaprotocol.io/vega/protos/vega" protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" @@ -41,9 +40,9 @@ import ( eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" "code.vegaprotocol.io/vega/wallet/crypto" + "github.com/cometbft/cometbft/libs/bytes" + tmctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/pkg/errors" - "github.com/tendermint/tendermint/libs/bytes" - tmctypes "github.com/tendermint/tendermint/rpc/core/types" "google.golang.org/grpc/codes" ) @@ -660,14 +659,14 @@ func (s *coreService) SubmitRawTransaction(ctx context.Context, req *protoapi.Su if txResult != nil { return &protoapi.SubmitRawTransactionResponse{ Success: false, - Code: txResult.DeliverTx.Code, - Data: string(txResult.DeliverTx.Data), - Log: txResult.DeliverTx.Log, + Code: txResult.TxResult.Code, + Data: string(txResult.TxResult.Data), + Log: txResult.TxResult.Log, }, s.handleSubmitRawTxTMError(err) } return nil, s.handleSubmitRawTxTMError(err) } - setResponseBasisContent(successResponse, txResult.DeliverTx.Code, txResult.DeliverTx.Log, txResult.DeliverTx.Data, txResult.Hash) + setResponseBasisContent(successResponse, txResult.TxResult.Code, txResult.TxResult.Log, txResult.TxResult.Data, txResult.Hash) successResponse.Height = txResult.Height default: diff --git a/core/api/errors.go b/core/api/errors.go index b895a972de..f31e494fe6 100644 --- a/core/api/errors.go +++ b/core/api/errors.go @@ -16,10 +16,9 @@ package api import ( - "github.com/pkg/errors" - types "code.vegaprotocol.io/vega/protos/vega" + "github.com/pkg/errors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/core/api/grpc.go b/core/api/grpc.go index 0d2af8c4dd..f4021ecc3b 100644 --- a/core/api/grpc.go +++ b/core/api/grpc.go @@ -21,18 +21,17 @@ import ( "strconv" "time" - "code.vegaprotocol.io/vega/libs/subscribers" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/stats" - "code.vegaprotocol.io/vega/core/vegatime" vgcontext "code.vegaprotocol.io/vega/libs/context" + "code.vegaprotocol.io/vega/libs/subscribers" "code.vegaprotocol.io/vega/logging" protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - tmctypes "github.com/tendermint/tendermint/rpc/core/types" + + tmctypes "github.com/cometbft/cometbft/rpc/core/types" "google.golang.org/grpc" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" diff --git a/core/api/mocks/blockchain_mock.go b/core/api/mocks/blockchain_mock.go index 92b0e0daaf..e2119096ed 100644 --- a/core/api/mocks/blockchain_mock.go +++ b/core/api/mocks/blockchain_mock.go @@ -10,8 +10,8 @@ import ( time "time" v1 "code.vegaprotocol.io/vega/protos/vega/commands/v1" + coretypes "github.com/cometbft/cometbft/rpc/core/types" gomock "github.com/golang/mock/gomock" - coretypes "github.com/tendermint/tendermint/rpc/core/types" ) // MockBlockchain is a mock of Blockchain interface. diff --git a/core/assets/assets_test.go b/core/assets/assets_test.go index fa5cacacba..0380e7aba6 100644 --- a/core/assets/assets_test.go +++ b/core/assets/assets_test.go @@ -30,6 +30,7 @@ import ( "code.vegaprotocol.io/vega/libs/num" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/logging" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/core/assets/checkpoint.go b/core/assets/checkpoint.go index e1b9c32c89..07592d137b 100644 --- a/core/assets/checkpoint.go +++ b/core/assets/checkpoint.go @@ -21,10 +21,9 @@ import ( "code.vegaprotocol.io/vega/core/types" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" - - "code.vegaprotocol.io/vega/libs/proto" ) func (*Service) Name() types.CheckpointName { diff --git a/core/assets/erc20/erc20.go b/core/assets/erc20/erc20.go index 030618fc6f..1de1ccfbc8 100644 --- a/core/assets/erc20/erc20.go +++ b/core/assets/erc20/erc20.go @@ -32,7 +32,6 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" ethcommon "github.com/ethereum/go-ethereum/common" - ethtypes "github.com/ethereum/go-ethereum/core/types" ) diff --git a/core/assets/erc20/erc20_test.go b/core/assets/erc20/erc20_test.go index e310783c63..86aa8f0144 100644 --- a/core/assets/erc20/erc20_test.go +++ b/core/assets/erc20/erc20_test.go @@ -28,6 +28,7 @@ import ( "code.vegaprotocol.io/vega/core/types" vcrypto "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "github.com/ethereum/go-ethereum/accounts/abi/bind" ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" diff --git a/core/assets/snapshot_test.go b/core/assets/snapshot_test.go index e919eec01b..a632f230cb 100644 --- a/core/assets/snapshot_test.go +++ b/core/assets/snapshot_test.go @@ -31,6 +31,7 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/core/banking/cancel_transfer.go b/core/banking/cancel_transfer.go index 8d1b3a5a5b..013237ef36 100644 --- a/core/banking/cancel_transfer.go +++ b/core/banking/cancel_transfer.go @@ -52,7 +52,7 @@ func (e *Engine) CancelTransferFunds( // send an event because we are nice with the data-node transfer.Status = types.TransferStatusCancelled - e.broker.Send(events.NewRecurringTransferFundsEventWithReason(ctx, transfer, "transfer cancelled")) + e.broker.Send(events.NewRecurringTransferFundsEventWithReason(ctx, transfer, "transfer cancelled", e.getGameID(transfer))) return nil } @@ -64,6 +64,6 @@ func (e *Engine) CancelGovTransfer(ctx context.Context, ID string) error { } e.deleteGovTransfer(ID) gTransfer.Status = types.TransferStatusCancelled - e.broker.Send(events.NewGovTransferFundsEvent(ctx, gTransfer, num.UintZero())) + e.broker.Send(events.NewGovTransferFundsEvent(ctx, gTransfer, num.UintZero(), e.getGovGameID(gTransfer))) return nil } diff --git a/core/banking/cancel_transfer_test.go b/core/banking/cancel_transfer_test.go index 17ade7eea6..032abe5a01 100644 --- a/core/banking/cancel_transfer_test.go +++ b/core/banking/cancel_transfer_test.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/protos/vega" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -63,8 +64,10 @@ func TestCancelTransfer(t *testing.T) { }, } + asset := "ETH" + e.assets.EXPECT().Get(gomock.Any()).Times(2).Return( - assets.NewAsset(&mockAsset{num.DecimalFromFloat(1)}), nil) + assets.NewAsset(&mockAsset{quantum: num.DecimalFromFloat(100), name: asset}), nil) e.tsvc.EXPECT().GetTimeNow().Times(2) e.broker.EXPECT().Send(gomock.Any()).Times(2) assert.NoError(t, e.TransferFunds(ctx, transfer)) @@ -88,6 +91,7 @@ func TestCancelTransfer(t *testing.T) { // then end of the transfer fromAcc := types.Account{ Balance: num.NewUint(1000), + Asset: asset, } // asset exists @@ -108,7 +112,7 @@ func TestCancelTransfer(t *testing.T) { assert.Len(t, transfers, 2) assert.Equal(t, transfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, transfers[0].Amount.Amount, num.NewUint(100)) - assert.Equal(t, transfers[0].Amount.Asset, "eth") + assert.Equal(t, transfers[0].Amount.Asset, asset) // 1 account types too assert.Len(t, accountTypes, 2) @@ -119,7 +123,7 @@ func TestCancelTransfer(t *testing.T) { assert.Len(t, feeTransfers, 1) assert.Equal(t, feeTransfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, feeTransfers[0].Amount.Amount, num.NewUint(50)) - assert.Equal(t, feeTransfers[0].Amount.Asset, "eth") + assert.Equal(t, feeTransfers[0].Amount.Asset, asset) // then the fees account types assert.Len(t, feeTransfersAccountTypes, 1) @@ -160,11 +164,15 @@ func TestCancelTransfer(t *testing.T) { type mockAsset struct { quantum num.Decimal + name string } func (m *mockAsset) Type() *types.Asset { return &types.Asset{ + ID: m.name, Details: &types.AssetDetails{ + Name: m.name, + Symbol: m.name, Quantum: m.quantum, }, } diff --git a/core/banking/checkpoint.go b/core/banking/checkpoint.go index 69b9aa36ed..a058b9db4f 100644 --- a/core/banking/checkpoint.go +++ b/core/banking/checkpoint.go @@ -29,6 +29,7 @@ import ( "code.vegaprotocol.io/vega/protos/vega" checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/emirpasic/gods/sets/treeset" ) @@ -194,7 +195,7 @@ func (e *Engine) loadScheduledGovernanceTransfers(ctx context.Context, r []*chec for _, g := range v.Transfers { transfer := types.GovernanceTransferFromProto(g) transfers = append(transfers, transfer) - evts = append(evts, events.NewGovTransferFundsEvent(ctx, transfer, num.UintZero())) + evts = append(evts, events.NewGovTransferFundsEvent(ctx, transfer, num.UintZero(), e.getGovGameID(transfer))) } e.scheduledGovernanceTransfers[v.DeliverOn] = transfers } @@ -231,13 +232,13 @@ func (e *Engine) loadRecurringTransfers( e.recurringTransfersMap[transfer.ID] = transfer // reload the dispatch strategy to the hash cache if transfer.DispatchStrategy != nil { - e.registerDispatchStrategy(transfer.DispatchStrategy) // reset defaults for new dispatch strategy params: if transfer.DispatchStrategy.EntityScope == vega.EntityScope_ENTITY_SCOPE_UNSPECIFIED { e.applyMigrationDefaults(transfer.DispatchStrategy) } + e.registerDispatchStrategy(transfer.DispatchStrategy) } - evts = append(evts, events.NewRecurringTransferFundsEvent(ctx, transfer)) + evts = append(evts, events.NewRecurringTransferFundsEvent(ctx, transfer, e.getGameID(transfer))) } return evts } @@ -258,7 +259,7 @@ func (e *Engine) loadRecurringGovernanceTransfers(ctx context.Context, transfers if transfer.Config.RecurringTransferConfig.DispatchStrategy != nil { e.registerDispatchStrategy(transfer.Config.RecurringTransferConfig.DispatchStrategy) } - evts = append(evts, events.NewGovTransferFundsEvent(ctx, transfer, num.UintZero())) + evts = append(evts, events.NewGovTransferFundsEvent(ctx, transfer, num.UintZero(), e.getGovGameID(transfer))) } return evts } @@ -277,7 +278,7 @@ func (e *Engine) getRecurringTransfers() *checkpoint.RecurringTransfers { } for _, v := range e.recurringTransfers { - out.RecurringTransfers = append(out.RecurringTransfers, v.IntoEvent(nil)) + out.RecurringTransfers = append(out.RecurringTransfers, v.IntoEvent(nil, e.getGameID(v))) } return out diff --git a/core/banking/checkpoint_test.go b/core/banking/checkpoint_test.go index a56c1bfc13..2905fdd9e3 100644 --- a/core/banking/checkpoint_test.go +++ b/core/banking/checkpoint_test.go @@ -25,11 +25,14 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/protos/vega" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) +const assetNameETH = "ETH" + func TestCheckpoint(t *testing.T) { t.Run("test simple scheduled transfer", testSimpledScheduledTransfer) } @@ -97,7 +100,7 @@ func testSimpledScheduledTransfer(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "0000000000000000000000000000000000000000000000000000000000000000", ToAccountType: types.AccountTypeGlobalReward, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(10), Reference: "someref", }, @@ -110,7 +113,7 @@ func testSimpledScheduledTransfer(t *testing.T) { } // asset exists - e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(1)}), nil) + e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) e.col.EXPECT().GetPartyGeneralAccount(gomock.Any(), gomock.Any()).Times(1).Return(&fromAcc, nil) // assert the calculation of fees and transfer request are correct @@ -128,7 +131,7 @@ func testSimpledScheduledTransfer(t *testing.T) { assert.Len(t, transfers, 1) assert.Equal(t, transfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, transfers[0].Amount.Amount, num.NewUint(10)) - assert.Equal(t, transfers[0].Amount.Asset, "eth") + assert.Equal(t, transfers[0].Amount.Asset, assetNameETH) // 2 account types too assert.Len(t, accountTypes, 1) @@ -139,7 +142,7 @@ func testSimpledScheduledTransfer(t *testing.T) { assert.Len(t, feeTransfers, 1) assert.Equal(t, feeTransfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, feeTransfers[0].Amount.Amount, num.NewUint(10)) - assert.Equal(t, feeTransfers[0].Amount.Asset, "eth") + assert.Equal(t, feeTransfers[0].Amount.Asset, assetNameETH) // then the fees account types assert.Len(t, feeTransfersAccountTypes, 1) @@ -183,7 +186,7 @@ func testSimpledScheduledTransfer(t *testing.T) { // transfer is done fully instantly, we should have 2 transfer assert.Equal(t, transfers[0].Owner, "0000000000000000000000000000000000000000000000000000000000000000") assert.Equal(t, transfers[0].Amount.Amount, num.NewUint(10)) - assert.Equal(t, transfers[0].Amount.Asset, "eth") + assert.Equal(t, transfers[0].Amount.Asset, assetNameETH) // 1 account types too assert.Len(t, accountTypes, 1) @@ -202,7 +205,7 @@ func testSimpledScheduledTransfer(t *testing.T) { func TestGovernancedScheduledTransfer(t *testing.T) { e := getTestEngine(t) - e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{quantum: num.DecimalFromFloat(10)}), nil) + e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) e.tsvc.EXPECT().GetTimeNow().DoAndReturn( func() time.Time { return time.Unix(10, 0) @@ -218,7 +221,7 @@ func TestGovernancedScheduledTransfer(t *testing.T) { transfer := &types.NewTransferConfiguration{ SourceType: types.AccountTypeGlobalReward, DestinationType: types.AccountTypeGeneral, - Asset: "eth", + Asset: assetNameETH, Source: "", Destination: "zohar", TransferType: vega.GovernanceTransferType_GOVERNANCE_TRANSFER_TYPE_ALL_OR_NOTHING, @@ -238,7 +241,7 @@ func TestGovernancedScheduledTransfer(t *testing.T) { // now second step, we start a new engine, and load the checkpoint e2 := getTestEngine(t) defer e2.ctrl.Finish() - e2.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{quantum: num.DecimalFromFloat(10)}), nil) + e2.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) // load the checkpoint e2.broker.EXPECT().SendBatch(gomock.Any()).Times(1) @@ -270,7 +273,7 @@ func TestGovernancedScheduledTransfer(t *testing.T) { func TestGovernanceRecurringTransfer(t *testing.T) { e := getTestEngine(t) - e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{quantum: num.DecimalFromFloat(10)}), nil) + e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) ctx := context.Background() e.tsvc.EXPECT().GetTimeNow().DoAndReturn( @@ -286,7 +289,7 @@ func TestGovernanceRecurringTransfer(t *testing.T) { transfer := &types.NewTransferConfiguration{ SourceType: types.AccountTypeGlobalReward, DestinationType: types.AccountTypeGeneral, - Asset: "eth", + Asset: assetNameETH, Source: "", Destination: "zohar", TransferType: vega.GovernanceTransferType_GOVERNANCE_TRANSFER_TYPE_ALL_OR_NOTHING, @@ -306,10 +309,10 @@ func TestGovernanceRecurringTransfer(t *testing.T) { // now second step, we start a new engine, and load the checkpoint e2 := getTestEngine(t) defer e2.ctrl.Finish() - e2.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(10)}), nil).AnyTimes() + e2.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil).AnyTimes() // load the checkpoint - e2.broker.EXPECT().SendBatch(gomock.Any()).Times(1) + e2.broker.EXPECT().SendBatch(gomock.Any()).Times(2) require.NoError(t, e2.Load(ctx, checkp)) chp2, err := e2.Checkpoint() @@ -323,13 +326,12 @@ func TestGovernanceRecurringTransfer(t *testing.T) { e2.col.EXPECT().GovernanceTransferFunds(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(1) e2.OnEpoch(ctx, types.Epoch{Seq: 0, StartTime: time.Unix(10, 0), Action: vega.EpochAction_EPOCH_ACTION_END}) e2.OnEpoch(ctx, types.Epoch{Seq: 1, StartTime: time.Unix(20, 0), Action: vega.EpochAction_EPOCH_ACTION_START}) - e2.broker.EXPECT().Send(gomock.Any()).Times(2) + e2.broker.EXPECT().Send(gomock.Any()).Times(3) e2.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() e2.OnEpoch(ctx, types.Epoch{Seq: 1, StartTime: time.Unix(20, 0), Action: vega.EpochAction_EPOCH_ACTION_END}) // now end epoch 2 and expect the second transfer to be delivered and the transfer to be terminated e2.col.EXPECT().GovernanceTransferFunds(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(1) - e2.broker.EXPECT().Send(gomock.Any()).Times(1) e2.OnEpoch(ctx, types.Epoch{Seq: 2, StartTime: time.Unix(30, 0), Action: vega.EpochAction_EPOCH_ACTION_START}) e2.OnEpoch(ctx, types.Epoch{Seq: 2, StartTime: time.Unix(30, 0), Action: vega.EpochAction_EPOCH_ACTION_END}) diff --git a/core/banking/engine.go b/core/banking/engine.go index d74ba6c970..e6e2860bf8 100644 --- a/core/banking/engine.go +++ b/core/banking/engine.go @@ -20,6 +20,7 @@ import ( "encoding/hex" "errors" "math/big" + "slices" "sort" "strings" "sync/atomic" @@ -37,7 +38,9 @@ import ( "code.vegaprotocol.io/vega/protos/vega" proto "code.vegaprotocol.io/vega/protos/vega" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/emirpasic/gods/sets/treeset" + "golang.org/x/exp/maps" ) //go:generate go run github.com/golang/mock/mockgen -destination mocks/mocks.go -package mocks code.vegaprotocol.io/vega/core/banking Assets,Notary,Collateral,Witness,TimeService,EpochService,Topology,MarketActivityTracker,ERC20BridgeView,EthereumEventSource @@ -112,6 +115,7 @@ type MarketActivityTracker interface { GetMarketsWithEligibleProposer(asset string, markets []string, payoutAsset string, funder string) []*types.MarketContributionScore MarkPaidProposer(asset, market, payoutAsset string, marketsInScope []string, funder string) MarketTrackedForAsset(market, asset string) bool + TeamStatsForMarkets(allMarketsForAssets, onlyTheseMarkets []string) map[string]map[string]*num.Uint } type EthereumEventSource interface { @@ -159,6 +163,14 @@ type Engine struct { scheduledTransfers map[int64][]scheduledTransfer transferFeeFactor num.Decimal minTransferQuantumMultiple num.Decimal + maxQuantumAmount num.Decimal + + feeDiscountDecayFraction num.Decimal + feeDiscountMinimumTrackedAmount num.Decimal + + // assetID -> partyID -> fee discount + pendingPerAssetAndPartyFeeDiscountUpdates map[string]map[string]*num.Uint + feeDiscountPerPartyAndAsset map[partyAssetKey]*num.Uint scheduledGovernanceTransfers map[int64][]*types.GovernanceTransfer recurringGovernanceTransfers []*types.GovernanceTransfer @@ -196,14 +208,10 @@ func New( notary Notary, broker broker.Interface, top Topology, - epoch EpochService, marketActivityTracker MarketActivityTracker, bridgeView ERC20BridgeView, ethEventSource EthereumEventSource, ) (e *Engine) { - defer func() { - epoch.NotifyOnEpoch(e.OnEpoch, e.OnEpochRestore) - }() log = log.Named(namedLogger) log.SetLevel(cfg.Level.Get()) @@ -238,6 +246,8 @@ func New( bridgeState: &bridgeState{ active: true, }, + feeDiscountPerPartyAndAsset: map[partyAssetKey]*num.Uint{}, + pendingPerAssetAndPartyFeeDiscountUpdates: map[string]map[string]*num.Uint{}, bridgeView: bridgeView, } } @@ -279,6 +289,8 @@ func (e *Engine) OnEpoch(ctx context.Context, ep types.Epoch) { case proto.EpochAction_EPOCH_ACTION_END: e.distributeRecurringTransfers(ctx, e.currentEpoch) e.distributeRecurringGovernanceTransfers(ctx) + e.applyPendingFeeDiscountsUpdates(ctx) + e.sendTeamsStats(ctx, ep.Seq) default: e.log.Panic("epoch action should never be UNSPECIFIED", logging.String("epoch", ep.String())) } @@ -537,6 +549,43 @@ func (e *Engine) GetDispatchStrategy(hash string) *proto.DispatchStrategy { return ds.ds } +// sendTeamsStats sends the teams statistics, which only account for games. +// This is located here not because this is where it should be, but because +// we don't know where to put it, as we need to have access to the dispatch +// strategy. +func (e *Engine) sendTeamsStats(ctx context.Context, seq uint64) { + onlyTheseMarkets := map[string]interface{}{} + allMarketsForAssets := map[string]interface{}{} + for _, ds := range e.hashToStrategy { + if ds.ds.EntityScope == proto.EntityScope_ENTITY_SCOPE_TEAMS { + if len(ds.ds.Markets) != 0 { + // If there is no markets specified, then we need gather data from + // all markets tied to this asset. + allMarketsForAssets[ds.ds.AssetForMetric] = nil + } else { + for _, market := range ds.ds.Markets { + onlyTheseMarkets[market] = nil + } + } + } + } + + if len(allMarketsForAssets) == 0 && len(onlyTheseMarkets) == 0 { + return + } + + allMarketsForAssetsS := maps.Keys(allMarketsForAssets) + slices.Sort(allMarketsForAssetsS) + onlyTheseMarketsS := maps.Keys(onlyTheseMarkets) + slices.Sort(onlyTheseMarketsS) + + teamsStats := e.marketActivityTracker.TeamStatsForMarkets(allMarketsForAssetsS, onlyTheseMarketsS) + + if len(teamsStats) > 0 { + e.broker.Send(events.NewTeamsStatsUpdatedEvent(ctx, seq, teamsStats)) + } +} + func getRefKey(ref snapshot.TxRef) (string, error) { buf, err := vgproto.Marshal(&ref) if err != nil { diff --git a/core/banking/engine_test.go b/core/banking/engine_test.go index 1017481e52..dac65a2247 100644 --- a/core/banking/engine_test.go +++ b/core/banking/engine_test.go @@ -71,8 +71,10 @@ func getTestEngine(t *testing.T) *testEngine { ethSource := mocks.NewMockEthereumEventSource(ctrl) notary.EXPECT().OfferSignatures(gomock.Any(), gomock.Any()).AnyTimes() - epoch.EXPECT().NotifyOnEpoch(gomock.Any(), gomock.Any()).Times(1) - eng := banking.New(logging.NewTestLogger(), banking.NewDefaultConfig(), col, erc, tsvc, assets, notary, broker, top, epoch, marketActivityTracker, bridgeView, ethSource) + epoch.EXPECT().NotifyOnEpoch(gomock.Any(), gomock.Any()).AnyTimes() + eng := banking.New(logging.NewTestLogger(), banking.NewDefaultConfig(), col, erc, tsvc, assets, notary, broker, top, marketActivityTracker, bridgeView, ethSource) + + eng.OnMaxQuantumAmountUpdate(context.Background(), num.DecimalOne()) return &testEngine{ Engine: eng, diff --git a/core/banking/fee_discount.go b/core/banking/fee_discount.go new file mode 100644 index 0000000000..c4700b6f0d --- /dev/null +++ b/core/banking/fee_discount.go @@ -0,0 +1,245 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package banking + +import ( + "context" + "sort" + + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/logging" + + "golang.org/x/exp/maps" +) + +type partyAssetKey struct { + party string + asset string +} + +func (e *Engine) feeDiscountKey(asset, party string) partyAssetKey { + return partyAssetKey{party: party, asset: asset} +} + +func (e *Engine) applyPendingFeeDiscountsUpdates(ctx context.Context) { + assetIDs := maps.Keys(e.pendingPerAssetAndPartyFeeDiscountUpdates) + sort.Strings(assetIDs) + + updatedKeys := map[string]map[string]struct{}{} + for _, assetID := range assetIDs { + feeDiscountsPerParty := e.pendingPerAssetAndPartyFeeDiscountUpdates[assetID] + perAssetUpdatedKeys := e.updateFeeDiscountsForAsset(ctx, assetID, feeDiscountsPerParty) + updatedKeys[assetID] = perAssetUpdatedKeys + } + + e.pendingPerAssetAndPartyFeeDiscountUpdates = map[string]map[string]*num.Uint{} + e.decayAllFeeDiscounts(ctx, updatedKeys) +} + +func (e *Engine) decayAllFeeDiscounts(ctx context.Context, perAssetAndPartyUpdates map[string]map[string]struct{}) { + updateDiscountEvents := make([]events.Event, 0, len(e.feeDiscountPerPartyAndAsset)) + + feeDiscountPerPartyAndAssetKeys := maps.Keys(e.feeDiscountPerPartyAndAsset) + sort.SliceStable(feeDiscountPerPartyAndAssetKeys, func(i, j int) bool { + if feeDiscountPerPartyAndAssetKeys[i].party == feeDiscountPerPartyAndAssetKeys[j].party { + return feeDiscountPerPartyAndAssetKeys[i].asset < feeDiscountPerPartyAndAssetKeys[j].asset + } + + return feeDiscountPerPartyAndAssetKeys[i].party < feeDiscountPerPartyAndAssetKeys[j].party + }) + + for _, key := range feeDiscountPerPartyAndAssetKeys { + if assetUpdate, assetOK := perAssetAndPartyUpdates[key.asset]; assetOK { + if _, partyOK := assetUpdate[key.party]; partyOK { + continue + } + } + + // ensure asset exists + asset, err := e.assets.Get(key.asset) + if err != nil { + e.log.Panic("could not register taker fees, invalid asset", logging.Error(err)) + } + + assetQuantum := asset.Type().Details.Quantum + + var decayAmountD *num.Uint + // apply decay discount amount + decayAmount := e.decayFeeDiscountAmount(e.feeDiscountPerPartyAndAsset[key]) + + // or 0 if discount is less than e.feeDiscountMinimumTrackedAmount x quantum (where quantum is the asset quantum). + if decayAmount.LessThan(e.feeDiscountMinimumTrackedAmount.Mul(assetQuantum)) { + decayAmountD = num.UintZero() + delete(e.feeDiscountPerPartyAndAsset, key) + } else { + decayAmountD, _ = num.UintFromDecimal(decayAmount) + e.feeDiscountPerPartyAndAsset[key] = decayAmountD + } + + updateDiscountEvents = append(updateDiscountEvents, events.NewTransferFeesDiscountUpdated( + ctx, + key.party, + key.asset, + decayAmountD.Clone(), + e.currentEpoch, + )) + } + + if len(updateDiscountEvents) > 0 { + e.broker.SendBatch(updateDiscountEvents) + } +} + +func (e *Engine) updateFeeDiscountsForAsset( + ctx context.Context, assetID string, feeDiscountsPerParty map[string]*num.Uint, +) map[string]struct{} { + updateDiscountEvents := make([]events.Event, 0, len(e.feeDiscountPerPartyAndAsset)) + + // ensure asset exists + asset, err := e.assets.Get(assetID) + if err != nil { + e.log.Panic("could not register taker fees, invalid asset", logging.Error(err)) + } + + assetQuantum := asset.Type().Details.Quantum + + feesPerPartyKeys := maps.Keys(feeDiscountsPerParty) + sort.Strings(feesPerPartyKeys) + + updatedKeys := map[string]struct{}{} + for _, party := range feesPerPartyKeys { + fee := feeDiscountsPerParty[party] + + updatedKeys[party] = struct{}{} + + key := e.feeDiscountKey(assetID, party) + if _, ok := e.feeDiscountPerPartyAndAsset[key]; !ok { + e.feeDiscountPerPartyAndAsset[key] = num.UintZero() + } + + // apply decay discount amount and add new fees to it + newAmount := e.decayFeeDiscountAmount(e.feeDiscountPerPartyAndAsset[key]).Add(fee.ToDecimal()) + + if newAmount.LessThan(e.feeDiscountMinimumTrackedAmount.Mul(assetQuantum)) { + e.feeDiscountPerPartyAndAsset[key] = num.UintZero() + } else { + newAmountD, _ := num.UintFromDecimal(newAmount) + e.feeDiscountPerPartyAndAsset[key] = newAmountD + } + + updateDiscountEvents = append(updateDiscountEvents, events.NewTransferFeesDiscountUpdated( + ctx, + party, + assetID, + e.feeDiscountPerPartyAndAsset[key].Clone(), + e.currentEpoch, + )) + } + + if len(updateDiscountEvents) > 0 { + e.broker.SendBatch(updateDiscountEvents) + } + + return updatedKeys +} + +func (e *Engine) RegisterTradingFees(ctx context.Context, assetID string, feesPerParty map[string]*num.Uint) { + // ensure asset exists + _, err := e.assets.Get(assetID) + if err != nil { + e.log.Panic("could not register taker fees, invalid asset", logging.Error(err)) + } + + if _, ok := e.pendingPerAssetAndPartyFeeDiscountUpdates[assetID]; !ok { + e.pendingPerAssetAndPartyFeeDiscountUpdates[assetID] = map[string]*num.Uint{} + } + + for partyID, fee := range feesPerParty { + if _, ok := e.pendingPerAssetAndPartyFeeDiscountUpdates[assetID][partyID]; !ok { + e.pendingPerAssetAndPartyFeeDiscountUpdates[assetID][partyID] = fee.Clone() + continue + } + e.pendingPerAssetAndPartyFeeDiscountUpdates[assetID][partyID].AddSum(fee) + } +} + +func (e *Engine) ApplyFeeDiscount(ctx context.Context, asset string, party string, fee *num.Uint) (discountedFee *num.Uint, discount *num.Uint) { + discountedFee, discount = e.EstimateFeeDiscount(asset, party, fee) + if discount.IsZero() { + return discountedFee, discount + } + + key := e.feeDiscountKey(asset, party) + defer e.broker.Send( + events.NewTransferFeesDiscountUpdated(ctx, + party, asset, + e.feeDiscountPerPartyAndAsset[key].Clone(), + e.currentEpoch, + ), + ) + + e.feeDiscountPerPartyAndAsset[key].Sub(e.feeDiscountPerPartyAndAsset[key], discount) + + return discountedFee, discount +} + +func (e *Engine) EstimateFeeDiscount(asset string, party string, fee *num.Uint) (discountedFee *num.Uint, discount *num.Uint) { + if fee.IsZero() { + return fee, num.UintZero() + } + + key := e.feeDiscountKey(asset, party) + accumulatedDiscount, ok := e.feeDiscountPerPartyAndAsset[key] + if !ok { + return fee, num.UintZero() + } + + return calculateDiscount(accumulatedDiscount, fee) +} + +func (e *Engine) AvailableFeeDiscount(asset string, party string) *num.Uint { + key := e.feeDiscountKey(asset, party) + + if discount, ok := e.feeDiscountPerPartyAndAsset[key]; ok { + return discount.Clone() + } + + return num.UintZero() +} + +// decayFeeDiscountAmount update current discount with: discount x e.feeDiscountDecayFraction. +func (e *Engine) decayFeeDiscountAmount(currentDiscount *num.Uint) num.Decimal { + discount := currentDiscount.ToDecimal() + if discount.IsZero() { + return discount + } + return discount.Mul(e.feeDiscountDecayFraction) +} + +func calculateDiscount(accumulatedDiscount, theoreticalFee *num.Uint) (discountedFee, discount *num.Uint) { + theoreticalFeeD := theoreticalFee.ToDecimal() + // min(accumulatedDiscount-theoreticalFee,0) + feeD := num.MinD( + accumulatedDiscount.ToDecimal().Sub(theoreticalFee.ToDecimal()), + num.DecimalZero(), + ).Neg() + + appliedDiscount, _ := num.UintFromDecimal(theoreticalFeeD.Sub(feeD)) + // -fee + discountedFee, _ = num.UintFromDecimal(feeD) + return discountedFee, appliedDiscount +} diff --git a/core/banking/fee_discount_test.go b/core/banking/fee_discount_test.go new file mode 100644 index 0000000000..1d7595328d --- /dev/null +++ b/core/banking/fee_discount_test.go @@ -0,0 +1,132 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package banking_test + +import ( + "context" + "testing" + + "code.vegaprotocol.io/vega/core/assets" + "code.vegaprotocol.io/vega/core/assets/builtin" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" + proto "code.vegaprotocol.io/vega/protos/vega" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" +) + +func TestBankingTransactionFeeDiscount(t *testing.T) { + party := "party-1" + asset := assets.NewAsset(builtin.New("vega", &types.AssetDetails{ + Name: "vega", + Symbol: "vega", + Quantum: num.DecimalFromFloat(10), + })) + assetID := asset.Type().ID + + t.Run("decay amount", func(t *testing.T) { + eng := getTestEngine(t) + + ctx := context.Background() + eng.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() + eng.broker.EXPECT().Send(gomock.Any()).AnyTimes() + eng.assets.EXPECT().Get(gomock.Any()).Return(asset, nil).AnyTimes() + + eng.OnTransferFeeDiscountDecayFractionUpdate(context.Background(), num.DecimalFromFloat(0.5)) + eng.OnTransferFeeDiscountMinimumTrackedAmountUpdate(context.Background(), num.DecimalFromFloat(1)) + + asset2 := "asset-2" + party2 := "party-2" + + assert.Equal(t, "0", eng.AvailableFeeDiscount(assetID, party).String()) + assert.Equal(t, "0", eng.AvailableFeeDiscount(asset2, party2).String()) + eng.RegisterTradingFees(ctx, assetID, map[string]*num.Uint{party: num.NewUint(25)}) + eng.RegisterTradingFees(ctx, assetID, map[string]*num.Uint{party: num.NewUint(25)}) + eng.RegisterTradingFees(ctx, asset2, map[string]*num.Uint{party2: num.NewUint(20)}) + eng.OnEpoch(ctx, types.Epoch{Action: proto.EpochAction_EPOCH_ACTION_END}) + assert.Equal(t, "50", eng.AvailableFeeDiscount(assetID, party).String()) + assert.Equal(t, "20", eng.AvailableFeeDiscount(asset2, party2).String()) + eng.RegisterTradingFees(ctx, assetID, nil) + eng.OnEpoch(ctx, types.Epoch{Action: proto.EpochAction_EPOCH_ACTION_END}) + // decay by half + assert.Equal(t, "25", eng.AvailableFeeDiscount(assetID, party).String()) + assert.Equal(t, "10", eng.AvailableFeeDiscount(asset2, party2).String()) + eng.RegisterTradingFees(ctx, assetID, nil) + eng.OnEpoch(ctx, types.Epoch{Action: proto.EpochAction_EPOCH_ACTION_END}) + // decay by half + assert.Equal(t, "12", eng.AvailableFeeDiscount(assetID, party).String()) + assert.Equal(t, "0", eng.AvailableFeeDiscount(asset2, party2).String()) + eng.RegisterTradingFees(ctx, assetID, nil) + eng.OnEpoch(ctx, types.Epoch{Action: proto.EpochAction_EPOCH_ACTION_END}) + + // decay by half but it's 0 because decayed amount (6) is less then + // asset quantum x TransferFeeDiscountMinimumTrackedAmount (10 x 1) + assert.Equal(t, "0", eng.AvailableFeeDiscount(assetID, party).String()) + }) + + t.Run("apply fee discount", func(t *testing.T) { + eng := getTestEngine(t) + + ctx := context.Background() + eng.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() + eng.broker.EXPECT().Send(gomock.Any()).AnyTimes() + eng.assets.EXPECT().Get(gomock.Any()).Return(asset, nil).AnyTimes() + + eng.OnTransferFeeDiscountDecayFractionUpdate(context.Background(), num.DecimalFromFloat(0.5)) + + assert.Equal(t, "0", eng.AvailableFeeDiscount(assetID, party).String()) + + // expect the whole fee to be paid + discountedFee, discount := eng.ApplyFeeDiscount(ctx, assetID, party, num.NewUint(5)) + assert.Equal(t, "5", discountedFee.String()) + assert.Equal(t, "0", discount.String()) + eng.RegisterTradingFees(ctx, assetID, map[string]*num.Uint{party: num.NewUint(10)}) + // move to another epoch + eng.OnEpoch(ctx, types.Epoch{Action: proto.EpochAction_EPOCH_ACTION_END}) + + assert.Equal(t, "10", eng.AvailableFeeDiscount(assetID, party).String()) + + // expect discount of 10 to be applied + discountedFee, discount = eng.ApplyFeeDiscount(ctx, assetID, party, num.NewUint(15)) + assert.Equal(t, "5", discountedFee.String()) + assert.Equal(t, "10", discount.String()) + eng.RegisterTradingFees(ctx, assetID, map[string]*num.Uint{party: num.NewUint(20)}) + // move to another epoch + eng.OnEpoch(ctx, types.Epoch{Action: proto.EpochAction_EPOCH_ACTION_END}) + + assert.Equal(t, "20", eng.AvailableFeeDiscount(assetID, party).String()) + + // expect discount of 3 to be applied + discountedFee, discount = eng.ApplyFeeDiscount(ctx, assetID, party, num.NewUint(3)) + assert.Equal(t, "0", discountedFee.String()) + assert.Equal(t, "3", discount.String()) + + assert.Equal(t, "17", eng.AvailableFeeDiscount(assetID, party).String()) + + eng.RegisterTradingFees(ctx, assetID, map[string]*num.Uint{party: num.NewUint(5)}) + // move to another epoch + eng.OnEpoch(ctx, types.Epoch{Action: proto.EpochAction_EPOCH_ACTION_END}) + + // it's 13 because 9 was decayed and extra 5 added = 17-8+5 + assert.Equal(t, "13", eng.AvailableFeeDiscount(assetID, party).String()) + + // expect discount of 4 to be applied + discountedFee, discount = eng.ApplyFeeDiscount(ctx, assetID, party, num.NewUint(4)) + assert.Equal(t, "0", discountedFee.String()) + assert.Equal(t, "4", discount.String()) + }) +} diff --git a/core/banking/fee_estimate.go b/core/banking/fee_estimate.go new file mode 100644 index 0000000000..0b3637a7cb --- /dev/null +++ b/core/banking/fee_estimate.go @@ -0,0 +1,62 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package banking + +import ( + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" +) + +// EstimateFee returns a transaction fee estimate with potential discount that can be applied to it. +func EstimateFee( + assetQuantum num.Decimal, + maxQuantumAmount num.Decimal, + transferFeeFactor num.Decimal, + amount *num.Uint, + accumulatedDiscount *num.Uint, + from string, + fromAccountType types.AccountType, + to string, +) (fee *num.Uint, discount *num.Uint) { + tFee := calculateFeeForTransfer(assetQuantum, maxQuantumAmount, transferFeeFactor, amount, from, fromAccountType, to) + return calculateDiscount(accumulatedDiscount, tFee) +} + +func calculateFeeForTransfer( + assetQuantum num.Decimal, + maxQuantumAmount num.Decimal, + transferFeeFactor num.Decimal, + amount *num.Uint, + from string, + fromAccountType types.AccountType, + to string, +) *num.Uint { + feeAmount := num.UintZero() + + // no fee for Vested account + if fromAccountType == types.AccountTypeVestedRewards && from == to { + return feeAmount + } + + // now we calculate the fee + // min(transfer amount * transfer.fee.factor, transfer.fee.maxQuantumAmount * quantum) + feeAmount, _ = num.UintFromDecimal(num.MinD( + amount.ToDecimal().Mul(transferFeeFactor), + maxQuantumAmount.Mul(assetQuantum), + )) + + return feeAmount +} diff --git a/core/banking/gov_transfers.go b/core/banking/gov_transfers.go index 4b315df48d..9e4079874c 100644 --- a/core/banking/gov_transfers.go +++ b/core/banking/gov_transfers.go @@ -69,10 +69,10 @@ func (e *Engine) distributeScheduledGovernanceTransfers(ctx context.Context) { amt, err := e.processGovernanceTransfer(ctx, gTransfer) if err != nil { gTransfer.Status = types.TransferStatusStopped - e.broker.Send(events.NewGovTransferFundsEventWithReason(ctx, gTransfer, amt, err.Error())) + e.broker.Send(events.NewGovTransferFundsEventWithReason(ctx, gTransfer, amt, err.Error(), e.getGovGameID(gTransfer))) } else { gTransfer.Status = types.TransferStatusDone - e.broker.Send(events.NewGovTransferFundsEvent(ctx, gTransfer, amt)) + e.broker.Send(events.NewGovTransferFundsEvent(ctx, gTransfer, amt, e.getGovGameID(gTransfer))) } } delete(e.scheduledGovernanceTransfers, t) @@ -97,19 +97,19 @@ func (e *Engine) distributeRecurringGovernanceTransfers(ctx context.Context) { if err != nil { e.log.Error("error calculating transfer amount for governance transfer", logging.Error(err)) gTransfer.Status = types.TransferStatusStopped - transfersDone = append(transfersDone, events.NewGovTransferFundsEventWithReason(ctx, gTransfer, amount, err.Error())) + transfersDone = append(transfersDone, events.NewGovTransferFundsEventWithReason(ctx, gTransfer, amount, err.Error(), e.getGovGameID(gTransfer))) doneIDs = append(doneIDs, gTransfer.ID) continue } if gTransfer.Config.RecurringTransferConfig.EndEpoch != nil && *gTransfer.Config.RecurringTransferConfig.EndEpoch == e.currentEpoch { gTransfer.Status = types.TransferStatusDone - transfersDone = append(transfersDone, events.NewGovTransferFundsEvent(ctx, gTransfer, amount)) + transfersDone = append(transfersDone, events.NewGovTransferFundsEvent(ctx, gTransfer, amount, e.getGovGameID(gTransfer))) doneIDs = append(doneIDs, gTransfer.ID) e.log.Info("recurrent transfer is done", logging.String("transfer ID", gTransfer.ID)) continue } - e.broker.Send(events.NewGovTransferFundsEvent(ctx, gTransfer, amount)) + e.broker.Send(events.NewGovTransferFundsEvent(ctx, gTransfer, amount, e.getGovGameID(gTransfer))) } if len(transfersDone) > 0 { @@ -146,9 +146,9 @@ func (e *Engine) NewGovernanceTransfer(ctx context.Context, ID, reference string defer func() { if err != nil { - e.broker.Send(events.NewGovTransferFundsEventWithReason(ctx, gTransfer, amount, err.Error())) + e.broker.Send(events.NewGovTransferFundsEventWithReason(ctx, gTransfer, amount, err.Error(), e.getGovGameID(gTransfer))) } else { - e.broker.Send(events.NewGovTransferFundsEvent(ctx, gTransfer, amount)) + e.broker.Send(events.NewGovTransferFundsEvent(ctx, gTransfer, amount, e.getGovGameID(gTransfer))) } }() now := e.timeService.GetTimeNow() @@ -221,7 +221,7 @@ func (e *Engine) processGovernanceTransfer( if amt.IsZero() { continue } - fromTransfer, toTransfer := e.makeTransfers(from, to, gTransfer.Config.Asset, fromMarket, fms.Market, amt) + fromTransfer, toTransfer := e.makeTransfers(from, to, gTransfer.Config.Asset, fromMarket, fms.Market, amt, &gTransfer.ID) transfers := []*types.Transfer{fromTransfer, toTransfer} accountTypes := []types.AccountType{gTransfer.Config.SourceType, gTransfer.Config.DestinationType} references := []string{gTransfer.Reference, gTransfer.Reference} @@ -242,7 +242,7 @@ func (e *Engine) processGovernanceTransfer( p, _ := proto.Marshal(gTransfer.Config.RecurringTransferConfig.DispatchStrategy) hash := hex.EncodeToString(crypto.Hash(p)) - fromTransfer, toTransfer := e.makeTransfers(from, to, gTransfer.Config.Asset, fromMarket, hash, transferAmount) + fromTransfer, toTransfer := e.makeTransfers(from, to, gTransfer.Config.Asset, fromMarket, hash, transferAmount, &gTransfer.ID) transfers := []*types.Transfer{fromTransfer, toTransfer} accountTypes := []types.AccountType{gTransfer.Config.SourceType, gTransfer.Config.DestinationType} references := []string{gTransfer.Reference, gTransfer.Reference} @@ -262,7 +262,7 @@ func (e *Engine) processGovernanceTransfer( return num.UintZero(), nil } - fromTransfer, toTransfer := e.makeTransfers(from, to, gTransfer.Config.Asset, fromMarket, toMarket, transferAmount) + fromTransfer, toTransfer := e.makeTransfers(from, to, gTransfer.Config.Asset, fromMarket, toMarket, transferAmount, &gTransfer.ID) transfers := []*types.Transfer{fromTransfer, toTransfer} accountTypes := []types.AccountType{gTransfer.Config.SourceType, gTransfer.Config.DestinationType} references := []string{gTransfer.Reference, gTransfer.Reference} @@ -406,3 +406,11 @@ func (e *Engine) VerifyCancelGovernanceTransfer(transferID string) error { } return nil } + +func (e *Engine) getGovGameID(transfer *types.GovernanceTransfer) *string { + if transfer.Config.RecurringTransferConfig == nil || transfer.Config.RecurringTransferConfig.DispatchStrategy == nil { + return nil + } + gameID := e.hashDispatchStrategy(transfer.Config.RecurringTransferConfig.DispatchStrategy) + return &gameID +} diff --git a/core/banking/gov_transfers_test.go b/core/banking/gov_transfers_test.go index d57dbb7e34..4ec0851c08 100644 --- a/core/banking/gov_transfers_test.go +++ b/core/banking/gov_transfers_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/assets" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/protos/vega" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/core/banking/mocks/mocks.go b/core/banking/mocks/mocks.go index b05935c1d2..9c19306686 100644 --- a/core/banking/mocks/mocks.go +++ b/core/banking/mocks/mocks.go @@ -554,6 +554,20 @@ func (mr *MockMarketActivityTrackerMockRecorder) MarketTrackedForAsset(arg0, arg return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarketTrackedForAsset", reflect.TypeOf((*MockMarketActivityTracker)(nil).MarketTrackedForAsset), arg0, arg1) } +// TeamStatsForMarkets mocks base method. +func (m *MockMarketActivityTracker) TeamStatsForMarkets(arg0, arg1 []string) map[string]map[string]*num.Uint { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TeamStatsForMarkets", arg0, arg1) + ret0, _ := ret[0].(map[string]map[string]*num.Uint) + return ret0 +} + +// TeamStatsForMarkets indicates an expected call of TeamStatsForMarkets. +func (mr *MockMarketActivityTrackerMockRecorder) TeamStatsForMarkets(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamStatsForMarkets", reflect.TypeOf((*MockMarketActivityTracker)(nil).TeamStatsForMarkets), arg0, arg1) +} + // MockERC20BridgeView is a mock of ERC20BridgeView interface. type MockERC20BridgeView struct { ctrl *gomock.Controller diff --git a/core/banking/oneoff_transfers.go b/core/banking/oneoff_transfers.go index ddf6fa5851..f9326b7d5c 100644 --- a/core/banking/oneoff_transfers.go +++ b/core/banking/oneoff_transfers.go @@ -86,13 +86,13 @@ func (e *Engine) oneOffTransfer( return err } - if err := e.ensureMinimalTransferAmount(a, transfer.Amount); err != nil { + if err := e.ensureMinimalTransferAmount(a, transfer.Amount, transfer.FromAccountType, transfer.From); err != nil { transfer.Status = types.TransferStatusRejected return err } tresps, err := e.processTransfer( - ctx, transfer.From, transfer.To, transfer.Asset, "", transfer.FromAccountType, + ctx, a, transfer.From, transfer.To, "", transfer.FromAccountType, transfer.ToAccountType, transfer.Amount, transfer.Reference, transfer.ID, e.currentEpoch, transfer, ) if err != nil { diff --git a/core/banking/oneoff_transfers_test.go b/core/banking/oneoff_transfers_test.go index 772364de1b..eb80aa4f7f 100644 --- a/core/banking/oneoff_transfers_test.go +++ b/core/banking/oneoff_transfers_test.go @@ -52,7 +52,7 @@ func testRejectedIfDoesntReachMinimalAmount(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "2e05fd230f3c9f4eaf0bdc5bfb7ca0c9d00278afc44637aab60da76653d7ccf0", ToAccountType: types.AccountTypeGeneral, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(10), Reference: "someref", }, @@ -61,7 +61,7 @@ func testRejectedIfDoesntReachMinimalAmount(t *testing.T) { e.OnMinTransferQuantumMultiple(context.Background(), num.DecimalFromFloat(1)) // asset exists - e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(100)}), nil) + e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) e.tsvc.EXPECT().GetTimeNow().Times(1) e.broker.EXPECT().Send(gomock.Any()).Times(1) @@ -99,7 +99,7 @@ func testOneOffTransferNotEnoughFundsToTransfer(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "2e05fd230f3c9f4eaf0bdc5bfb7ca0c9d00278afc44637aab60da76653d7ccf0", ToAccountType: types.AccountTypeGeneral, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(10), Reference: "someref", }, @@ -111,7 +111,7 @@ func testOneOffTransferNotEnoughFundsToTransfer(t *testing.T) { } // asset exists - e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(1)}), nil) + e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) e.col.EXPECT().GetPartyGeneralAccount(gomock.Any(), gomock.Any()).Times(1).Return(&fromAcc, nil) e.broker.EXPECT().Send(gomock.Any()).Times(1) @@ -135,7 +135,7 @@ func testOneOffTransferInvalidTransfers(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "2e05fd230f3c9f4eaf0bdc5bfb7ca0c9d00278afc44637aab60da76653d7ccf0", ToAccountType: types.AccountTypeGeneral, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(10), Reference: "someref", } @@ -220,7 +220,7 @@ func testValidOneOffTransfer(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "0000000000000000000000000000000000000000000000000000000000000000", ToAccountType: types.AccountTypeGlobalReward, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(10), Reference: "someref", }, @@ -234,7 +234,7 @@ func testValidOneOffTransfer(t *testing.T) { // asset exists e.tsvc.EXPECT().GetTimeNow().Times(1) e.assets.EXPECT().Get(gomock.Any()).Times(1).Return( - assets.NewAsset(&mockAsset{num.DecimalFromFloat(1)}), nil) + assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) e.col.EXPECT().GetPartyGeneralAccount(gomock.Any(), gomock.Any()).Times(1).Return(&fromAcc, nil) // assert the calculation of fees and transfer request are correct @@ -252,10 +252,10 @@ func testValidOneOffTransfer(t *testing.T) { assert.Len(t, transfers, 2) assert.Equal(t, transfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, transfers[0].Amount.Amount, num.NewUint(10)) - assert.Equal(t, transfers[0].Amount.Asset, "eth") + assert.Equal(t, transfers[0].Amount.Asset, assetNameETH) assert.Equal(t, transfers[1].Owner, "0000000000000000000000000000000000000000000000000000000000000000") assert.Equal(t, transfers[1].Amount.Amount, num.NewUint(10)) - assert.Equal(t, transfers[1].Amount.Asset, "eth") + assert.Equal(t, transfers[1].Amount.Asset, assetNameETH) // 2 account types too assert.Len(t, accountTypes, 2) @@ -267,7 +267,7 @@ func testValidOneOffTransfer(t *testing.T) { assert.Len(t, feeTransfers, 1) assert.Equal(t, feeTransfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, feeTransfers[0].Amount.Amount, num.NewUint(10)) - assert.Equal(t, feeTransfers[0].Amount.Asset, "eth") + assert.Equal(t, feeTransfers[0].Amount.Asset, assetNameETH) // then the fees account types assert.Len(t, feeTransfersAccountTypes, 1) @@ -303,7 +303,7 @@ func testValidOneOffTransferWithDeliverOnInThePastStraightAway(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "0000000000000000000000000000000000000000000000000000000000000000", ToAccountType: types.AccountTypeGlobalReward, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(10), Reference: "someref", }, @@ -316,7 +316,7 @@ func testValidOneOffTransferWithDeliverOnInThePastStraightAway(t *testing.T) { } // asset exists - e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(1)}), nil) + e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) e.col.EXPECT().GetPartyGeneralAccount(gomock.Any(), gomock.Any()).Times(1).Return(&fromAcc, nil) // assert the calculation of fees and transfer request are correct @@ -334,10 +334,10 @@ func testValidOneOffTransferWithDeliverOnInThePastStraightAway(t *testing.T) { assert.Len(t, transfers, 2) assert.Equal(t, transfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, transfers[0].Amount.Amount, num.NewUint(10)) - assert.Equal(t, transfers[0].Amount.Asset, "eth") + assert.Equal(t, transfers[0].Amount.Asset, assetNameETH) assert.Equal(t, transfers[1].Owner, "0000000000000000000000000000000000000000000000000000000000000000") assert.Equal(t, transfers[1].Amount.Amount, num.NewUint(10)) - assert.Equal(t, transfers[1].Amount.Asset, "eth") + assert.Equal(t, transfers[1].Amount.Asset, assetNameETH) // 2 account types too assert.Len(t, accountTypes, 2) @@ -349,7 +349,7 @@ func testValidOneOffTransferWithDeliverOnInThePastStraightAway(t *testing.T) { assert.Len(t, feeTransfers, 1) assert.Equal(t, feeTransfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, feeTransfers[0].Amount.Amount, num.NewUint(10)) - assert.Equal(t, feeTransfers[0].Amount.Asset, "eth") + assert.Equal(t, feeTransfers[0].Amount.Asset, assetNameETH) // then the fees account types assert.Len(t, feeTransfersAccountTypes, 1) @@ -385,7 +385,7 @@ func testValidOneOffTransferWithDeliverOn(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "0000000000000000000000000000000000000000000000000000000000000000", ToAccountType: types.AccountTypeGlobalReward, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(10), Reference: "someref", }, @@ -404,7 +404,7 @@ func testValidOneOffTransferWithDeliverOn(t *testing.T) { }).Times(2) // asset exists - e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(1)}), nil) + e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) e.col.EXPECT().GetPartyGeneralAccount(gomock.Any(), gomock.Any()).Times(1).Return(&fromAcc, nil) // assert the calculation of fees and transfer request are correct @@ -422,7 +422,7 @@ func testValidOneOffTransferWithDeliverOn(t *testing.T) { assert.Len(t, transfers, 1) assert.Equal(t, transfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, transfers[0].Amount.Amount, num.NewUint(10)) - assert.Equal(t, transfers[0].Amount.Asset, "eth") + assert.Equal(t, transfers[0].Amount.Asset, assetNameETH) // 2 account types too assert.Len(t, accountTypes, 1) @@ -433,7 +433,7 @@ func testValidOneOffTransferWithDeliverOn(t *testing.T) { assert.Len(t, feeTransfers, 1) assert.Equal(t, feeTransfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, feeTransfers[0].Amount.Amount, num.NewUint(10)) - assert.Equal(t, feeTransfers[0].Amount.Asset, "eth") + assert.Equal(t, feeTransfers[0].Amount.Asset, assetNameETH) // then the fees account types assert.Len(t, feeTransfersAccountTypes, 1) @@ -474,7 +474,7 @@ func testValidOneOffTransferWithDeliverOn(t *testing.T) { // transfer is done fully instantly, we should have 2 transfer assert.Equal(t, transfers[0].Owner, "0000000000000000000000000000000000000000000000000000000000000000") assert.Equal(t, transfers[0].Amount.Amount, num.NewUint(10)) - assert.Equal(t, transfers[0].Amount.Asset, "eth") + assert.Equal(t, transfers[0].Amount.Asset, assetNameETH) // 1 account types too assert.Len(t, accountTypes, 1) diff --git a/core/banking/recurring_transfers.go b/core/banking/recurring_transfers.go index 653180760a..47234a3a07 100644 --- a/core/banking/recurring_transfers.go +++ b/core/banking/recurring_transfers.go @@ -41,9 +41,9 @@ func (e *Engine) recurringTransfer( ) (err error) { defer func() { if err != nil { - e.broker.Send(events.NewRecurringTransferFundsEventWithReason(ctx, transfer, err.Error())) + e.broker.Send(events.NewRecurringTransferFundsEventWithReason(ctx, transfer, err.Error(), e.getGameID(transfer))) } else { - e.broker.Send(events.NewRecurringTransferFundsEvent(ctx, transfer)) + e.broker.Send(events.NewRecurringTransferFundsEvent(ctx, transfer, e.getGameID(transfer))) } }() @@ -87,7 +87,7 @@ func (e *Engine) recurringTransfer( return err } - if err := e.ensureMinimalTransferAmount(a, transfer.Amount); err != nil { + if err := e.ensureMinimalTransferAmount(a, transfer.Amount, transfer.FromAccountType, transfer.From); err != nil { transfer.Status = types.TransferStatusRejected return err } @@ -112,6 +112,14 @@ func (e *Engine) recurringTransfer( return nil } +func (e *Engine) getGameID(transfer *types.RecurringTransfer) *string { + if transfer.DispatchStrategy == nil { + return nil + } + gameID := e.hashDispatchStrategy(transfer.DispatchStrategy) + return &gameID +} + func (e *Engine) hashDispatchStrategy(ds *vegapb.DispatchStrategy) string { p, err := proto.Marshal(ds) if err != nil { @@ -238,10 +246,10 @@ func (e *Engine) distributeRecurringTransfers(ctx context.Context, newEpoch uint e.log.Panic("this should never happen", logging.Error(err)) } - if err = e.ensureMinimalTransferAmount(a, amount); err != nil { + if err = e.ensureMinimalTransferAmount(a, amount, v.FromAccountType, v.From); err != nil { v.Status = types.TransferStatusStopped transfersDone = append(transfersDone, - events.NewRecurringTransferFundsEventWithReason(ctx, v, err.Error())) + events.NewRecurringTransferFundsEventWithReason(ctx, v, err.Error(), e.getGameID(v))) doneIDs = append(doneIDs, v.ID) continue } @@ -252,11 +260,11 @@ func (e *Engine) distributeRecurringTransfers(ctx context.Context, newEpoch uint var r []*types.LedgerMovement if v.DispatchStrategy == nil { resps, err = e.processTransfer( - ctx, v.From, v.To, v.Asset, "", v.FromAccountType, v.ToAccountType, amount, v.Reference, v.ID, newEpoch, nil, // last is eventual oneoff, which this is not + ctx, a, v.From, v.To, "", v.FromAccountType, v.ToAccountType, amount, v.Reference, v.ID, newEpoch, nil, // last is eventual oneoff, which this is not ) } else { // check if the amount + fees can be covered by the party issuing the transfer - if _, err = e.ensureFeeForTransferFunds(amount, v.From, v.Asset, v.FromAccountType); err == nil { + if err = e.ensureFeeForTransferFunds(a, amount, v.From, v.FromAccountType, v.To); err == nil { // NB: if the metric is market value we're going to transfer the bonus if any directly // to the market account of the asset/reward type - this is similar to previous behaviour and // different to how all other metric based rewards behave. The reason is that we need the context of the funder @@ -269,7 +277,7 @@ func (e *Engine) distributeRecurringTransfers(ctx context.Context, newEpoch uint continue } r, err = e.processTransfer( - ctx, v.From, v.To, v.Asset, fms.Market, v.FromAccountType, v.ToAccountType, amt, v.Reference, v.ID, newEpoch, nil, // last is eventual oneoff, which this is not + ctx, a, v.From, v.To, fms.Market, v.FromAccountType, v.ToAccountType, amt, v.Reference, v.ID, newEpoch, nil, // last is eventual oneoff, which this is not ) if err != nil { e.log.Error("failed to process transfer", @@ -295,7 +303,7 @@ func (e *Engine) distributeRecurringTransfers(ctx context.Context, newEpoch uint p, _ := proto.Marshal(v.DispatchStrategy) hash := hex.EncodeToString(crypto.Hash(p)) r, err = e.processTransfer( - ctx, v.From, v.To, v.Asset, hash, v.FromAccountType, v.ToAccountType, amount, v.Reference, v.ID, newEpoch, nil, // last is eventual oneoff, which this is not + ctx, a, v.From, v.To, hash, v.FromAccountType, v.ToAccountType, amount, v.Reference, v.ID, newEpoch, nil, // last is eventual oneoff, which this is not ) if err != nil { e.log.Error("failed to process transfer", logging.Error(err)) @@ -310,7 +318,7 @@ func (e *Engine) distributeRecurringTransfers(ctx context.Context, newEpoch uint e.log.Info("transferred stopped", logging.Error(err)) v.Status = types.TransferStatusStopped transfersDone = append(transfersDone, - events.NewRecurringTransferFundsEventWithReason(ctx, v, err.Error())) + events.NewRecurringTransferFundsEventWithReason(ctx, v, err.Error(), e.getGameID(v))) doneIDs = append(doneIDs, v.ID) continue } @@ -320,7 +328,7 @@ func (e *Engine) distributeRecurringTransfers(ctx context.Context, newEpoch uint // if we don't have anymore if v.EndEpoch != nil && *v.EndEpoch == e.currentEpoch { v.Status = types.TransferStatusDone - transfersDone = append(transfersDone, events.NewRecurringTransferFundsEvent(ctx, v)) + transfersDone = append(transfersDone, events.NewRecurringTransferFundsEvent(ctx, v, e.getGameID(v))) doneIDs = append(doneIDs, v.ID) } } diff --git a/core/banking/recurring_transfers_test.go b/core/banking/recurring_transfers_test.go index e0b851f0d6..498c12d3bd 100644 --- a/core/banking/recurring_transfers_test.go +++ b/core/banking/recurring_transfers_test.go @@ -27,6 +27,7 @@ import ( "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/protos/vega" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -47,7 +48,7 @@ func TestMaturation(t *testing.T) { ctx := context.Background() e.OnMinTransferQuantumMultiple(context.Background(), num.DecimalFromFloat(1)) - e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(10)}), nil) + e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(10)}), nil) e.tsvc.EXPECT().GetTimeNow().AnyTimes() e.broker.EXPECT().Send(gomock.Any()).AnyTimes() fromAcc := types.Account{ @@ -67,7 +68,7 @@ func TestMaturation(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: crypto.RandomHash(), ToAccountType: types.AccountTypeGeneral, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(10), Reference: "someref", }, @@ -114,7 +115,7 @@ func testInvalidRecurringTransfersBadAmount(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "0000000000000000000000000000000000000000000000000000000000000000", ToAccountType: types.AccountTypeGlobalReward, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(10), Reference: "someref", }, @@ -125,7 +126,7 @@ func testInvalidRecurringTransfersBadAmount(t *testing.T) { e.OnMinTransferQuantumMultiple(context.Background(), num.DecimalFromFloat(1)) // asset exists - e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(100)}), nil) + e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) e.tsvc.EXPECT().GetTimeNow().Times(1) e.broker.EXPECT().Send(gomock.Any()).Times(1) @@ -153,7 +154,7 @@ func testInvalidRecurringTransfersInThePast(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "0000000000000000000000000000000000000000000000000000000000000000", ToAccountType: types.AccountTypeGlobalReward, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(100), Reference: "someref", }, @@ -163,7 +164,7 @@ func testInvalidRecurringTransfersInThePast(t *testing.T) { }, } - e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{quantum: num.DecimalFromFloat(10)}), nil) + e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) e.tsvc.EXPECT().GetTimeNow().Times(2) e.broker.EXPECT().Send(gomock.Any()).Times(1) assert.EqualError(t, @@ -182,7 +183,7 @@ func testInvalidRecurringTransfersInThePast(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "0000000000000000000000000000000000000000000000000000000000000000", ToAccountType: types.AccountTypeGlobalReward, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(50), Reference: "someotherref", }, @@ -216,7 +217,7 @@ func testInvalidRecurringTransfersDuplicates(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "0000000000000000000000000000000000000000000000000000000000000000", ToAccountType: types.AccountTypeGlobalReward, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(100), Reference: "someref", }, @@ -226,7 +227,7 @@ func testInvalidRecurringTransfersDuplicates(t *testing.T) { }, } - e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{quantum: num.DecimalFromFloat(10)}), nil) + e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) e.tsvc.EXPECT().GetTimeNow().Times(3) e.broker.EXPECT().Send(gomock.Any()).Times(1) assert.NoError(t, e.TransferFunds(ctx, transfer)) @@ -242,7 +243,7 @@ func testInvalidRecurringTransfersDuplicates(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "0000000000000000000000000000000000000000000000000000000000000000", ToAccountType: types.AccountTypeGlobalReward, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(50), Reference: "someotherref", }, @@ -297,7 +298,7 @@ func testForeverTransferCancelledNotEnoughFunds(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "0000000000000000000000000000000000000000000000000000000000000000", ToAccountType: types.AccountTypeGlobalReward, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(100), Reference: "someref", }, @@ -314,7 +315,7 @@ func testForeverTransferCancelledNotEnoughFunds(t *testing.T) { e.marketActivityTracker.EXPECT().CalculateMetricForIndividuals(gomock.Any()).AnyTimes().Return([]*types.PartyContributionScore{ {Party: "", Score: num.DecimalFromFloat(1)}, }) - e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{quantum: num.DecimalFromFloat(10)}), nil) + e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) e.tsvc.EXPECT().GetTimeNow().Times(2) e.broker.EXPECT().Send(gomock.Any()).Times(2) assert.NoError(t, e.TransferFunds(ctx, transfer)) @@ -349,7 +350,7 @@ func testForeverTransferCancelledNotEnoughFunds(t *testing.T) { assert.Len(t, transfers, 2) assert.Equal(t, transfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, transfers[0].Amount.Amount, num.NewUint(100)) - assert.Equal(t, transfers[0].Amount.Asset, "eth") + assert.Equal(t, transfers[0].Amount.Asset, assetNameETH) // 1 account types too assert.Len(t, accountTypes, 2) @@ -360,7 +361,7 @@ func testForeverTransferCancelledNotEnoughFunds(t *testing.T) { assert.Len(t, feeTransfers, 1) assert.Equal(t, feeTransfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, feeTransfers[0].Amount.Amount, num.NewUint(50)) - assert.Equal(t, feeTransfers[0].Amount.Asset, "eth") + assert.Equal(t, feeTransfers[0].Amount.Asset, assetNameETH) // then the fees account types assert.Len(t, feeTransfersAccountTypes, 1) @@ -420,7 +421,7 @@ func testValidRecurringTransfer(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "0000000000000000000000000000000000000000000000000000000000000000", ToAccountType: types.AccountTypeGlobalReward, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(100), Reference: "someref", }, @@ -430,7 +431,7 @@ func testValidRecurringTransfer(t *testing.T) { }, } - e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{quantum: num.DecimalFromFloat(10)}), nil) + e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) e.tsvc.EXPECT().GetTimeNow().Times(3) e.broker.EXPECT().Send(gomock.Any()).Times(3) assert.NoError(t, e.TransferFunds(ctx, transfer)) @@ -465,7 +466,7 @@ func testValidRecurringTransfer(t *testing.T) { assert.Len(t, transfers, 2) assert.Equal(t, transfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, transfers[0].Amount.Amount, num.NewUint(100)) - assert.Equal(t, transfers[0].Amount.Asset, "eth") + assert.Equal(t, transfers[0].Amount.Asset, assetNameETH) // 1 account types too assert.Len(t, accountTypes, 2) @@ -476,7 +477,7 @@ func testValidRecurringTransfer(t *testing.T) { assert.Len(t, feeTransfers, 1) assert.Equal(t, feeTransfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, feeTransfers[0].Amount.Amount, num.NewUint(50)) - assert.Equal(t, feeTransfers[0].Amount.Asset, "eth") + assert.Equal(t, feeTransfers[0].Amount.Asset, assetNameETH) // then the fees account types assert.Len(t, feeTransfersAccountTypes, 1) @@ -507,7 +508,7 @@ func testValidRecurringTransfer(t *testing.T) { assert.Len(t, transfers, 2) assert.Equal(t, transfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, transfers[0].Amount.Amount, num.NewUint(90)) - assert.Equal(t, transfers[0].Amount.Asset, "eth") + assert.Equal(t, transfers[0].Amount.Asset, assetNameETH) // 1 account types too assert.Len(t, accountTypes, 2) @@ -518,7 +519,7 @@ func testValidRecurringTransfer(t *testing.T) { assert.Len(t, feeTransfers, 1) assert.Equal(t, feeTransfers[0].Owner, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301") assert.Equal(t, feeTransfers[0].Amount.Amount, num.NewUint(45)) - assert.Equal(t, feeTransfers[0].Amount.Asset, "eth") + assert.Equal(t, feeTransfers[0].Amount.Asset, assetNameETH) // then the fees account types assert.Len(t, feeTransfersAccountTypes, 1) @@ -559,13 +560,13 @@ func testRecurringTransferInvalidTransfers(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "2e05fd230f3c9f4eaf0bdc5bfb7ca0c9d00278afc44637aab60da76653d7ccf0", ToAccountType: types.AccountTypeGeneral, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(10), Reference: "someref", } // asset exists - e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(1)}), nil) + e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) var baseCpy types.TransferBase @@ -723,7 +724,7 @@ func TestMarketAssetMismatchRejectsTransfer(t *testing.T) { Balance: num.NewUint(1000), } - eng.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(100)}), nil) + eng.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) eng.tsvc.EXPECT().GetTimeNow().Times(1) eng.col.EXPECT().GetPartyGeneralAccount(gomock.Any(), gomock.Any()).AnyTimes().Return(&fromAcc, nil) eng.broker.EXPECT().Send(gomock.Any()).AnyTimes() @@ -737,7 +738,7 @@ func TestMarketAssetMismatchRejectsTransfer(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "2e05fd230f3c9f4eaf0bdc5bfb7ca0c9d00278afc44637aab60da76653d7ccf0", ToAccountType: types.AccountTypeGeneral, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(10), Reference: "someref", }, diff --git a/core/banking/snapshot.go b/core/banking/snapshot.go index fa5b16d4ce..81d01f051d 100644 --- a/core/banking/snapshot.go +++ b/core/banking/snapshot.go @@ -21,9 +21,12 @@ import ( "sort" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" + snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/emirpasic/gods/sets/treeset" ) @@ -37,6 +40,7 @@ var ( bridgeStateKey = (&types.PayloadBankingBridgeState{}).Key() recurringGovTransfersKey = (&types.PayloadBankingRecurringGovernanceTransfers{}).Key() scheduledGovTransfersKey = (&types.PayloadBankingScheduledGovernanceTransfers{}).Key() + transferFeeDiscountsKey = (&types.PayloadBankingTransferFeeDiscounts{}).Key() hashKeys = []string{ withdrawalsKey, @@ -48,6 +52,7 @@ var ( bridgeStateKey, recurringGovTransfersKey, scheduledGovTransfersKey, + transferFeeDiscountsKey, } ) @@ -61,6 +66,7 @@ type bankingSnapshotState struct { serialisedBridgeState []byte serialisedGovRecurringTransfers []byte serialisedGovScheduledTransfers []byte + serialisedTransferFeeDiscounts []byte } func (e *Engine) Namespace() types.SnapshotNamespace { @@ -129,6 +135,34 @@ func (e *Engine) serialiseScheduledGovernanceTransfers() ([]byte, error) { return proto.Marshal(payload.IntoProto()) } +func (e *Engine) serialisedTransferFeeDiscounts() ([]byte, error) { + partyAssetDiscounts := make([]*snapshot.PartyAssetAmount, 0, len(e.feeDiscountPerPartyAndAsset)) + + for k, v := range e.feeDiscountPerPartyAndAsset { + partyAssetDiscounts = append(partyAssetDiscounts, &snapshot.PartyAssetAmount{ + Party: k.party, + Asset: k.asset, + Amount: v.String(), + }) + } + sort.SliceStable(partyAssetDiscounts, func(i, j int) bool { + if partyAssetDiscounts[i].Party == partyAssetDiscounts[j].Party { + return partyAssetDiscounts[i].Asset < partyAssetDiscounts[j].Asset + } + return partyAssetDiscounts[i].Party < partyAssetDiscounts[j].Party + }) + + payload := types.Payload{ + Data: &types.PayloadBankingTransferFeeDiscounts{ + BankingTransferFeeDiscounts: &snapshot.BankingTransferFeeDiscounts{ + PartyAssetDiscount: partyAssetDiscounts, + }, + }, + } + + return proto.Marshal(payload.IntoProto()) +} + func (e *Engine) serialiseAssetActions() ([]byte, error) { payload := types.Payload{ Data: &types.PayloadBankingAssetActions{ @@ -227,6 +261,8 @@ func (e *Engine) serialise(k string) ([]byte, error) { return e.serialiseK(e.serialiseRecurringGovernanceTransfers, &e.bss.serialisedGovRecurringTransfers) case scheduledGovTransfersKey: return e.serialiseK(e.serialiseScheduledGovernanceTransfers, &e.bss.serialisedGovScheduledTransfers) + case transferFeeDiscountsKey: + return e.serialiseK(e.serialisedTransferFeeDiscounts, &e.bss.serialisedTransferFeeDiscounts) case bridgeStateKey: return e.serialiseK(e.serialiseBridgeState, &e.bss.serialisedBridgeState) default: @@ -263,6 +299,8 @@ func (e *Engine) LoadState(ctx context.Context, p *types.Payload) ([]types.State return nil, e.restoreScheduledGovernanceTransfers(ctx, pl.BankingScheduledGovernanceTransfers, p) case *types.PayloadBankingBridgeState: return nil, e.restoreBridgeState(pl.BankingBridgeState, p) + case *types.PayloadBankingTransferFeeDiscounts: + return nil, e.restoreTransferFeeDiscounts(pl.BankingTransferFeeDiscounts, p) default: return nil, types.ErrUnknownSnapshotType } @@ -370,6 +408,24 @@ func (e *Engine) restoreAssetActions(aa *types.BankingAssetActions, p *types.Pay return err } +func (e *Engine) restoreTransferFeeDiscounts( + state *snapshot.BankingTransferFeeDiscounts, + p *types.Payload, +) (err error) { + if state == nil { + return nil + } + + e.feeDiscountPerPartyAndAsset = make(map[partyAssetKey]*num.Uint, len(state.PartyAssetDiscount)) + for _, v := range state.PartyAssetDiscount { + discount, _ := num.UintFromString(v.Amount, 10) + e.feeDiscountPerPartyAndAsset[e.feeDiscountKey(v.Asset, v.Party)] = discount + } + + e.bss.serialisedTransferFeeDiscounts, err = proto.Marshal(p.IntoProto()) + return +} + func (e *Engine) OnEpochRestore(ctx context.Context, ep types.Epoch) { e.log.Debug("epoch restoration notification received", logging.String("epoch", ep.String())) e.currentEpoch = ep.Seq diff --git a/core/banking/snapshot_test.go b/core/banking/snapshot_test.go index 446fc5f9c8..040c7410b0 100644 --- a/core/banking/snapshot_test.go +++ b/core/banking/snapshot_test.go @@ -23,21 +23,22 @@ import ( "testing" "time" - "code.vegaprotocol.io/vega/libs/crypto" - "code.vegaprotocol.io/vega/core/assets" "code.vegaprotocol.io/vega/core/assets/builtin" "code.vegaprotocol.io/vega/core/integration/stubs" + "code.vegaprotocol.io/vega/core/snapshot" snp "code.vegaprotocol.io/vega/core/snapshot" "code.vegaprotocol.io/vega/core/stats" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" vgtest "code.vegaprotocol.io/vega/libs/test" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" "code.vegaprotocol.io/vega/protos/vega" - snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -294,7 +295,7 @@ func TestAssetActionsSnapshotRoundTrip(t *testing.T) { require.True(t, bytes.Equal(state, stateNoChange)) // reload the state - var assetActions snapshot.Payload + var assetActions snapshotpb.Payload snap := getTestEngine(t) snap.tsvc.EXPECT().GetTimeNow().AnyTimes() snap.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(testAsset, nil) @@ -338,7 +339,7 @@ func TestSeenSnapshotRoundTrip(t *testing.T) { require.True(t, bytes.Equal(state2, stateNoChange)) // reload the state - var seen snapshot.Payload + var seen snapshotpb.Payload snap := getTestEngine(t) proto.Unmarshal(state2, &seen) @@ -381,7 +382,7 @@ func TestWithdrawalsSnapshotRoundTrip(t *testing.T) { require.True(t, bytes.Equal(state, stateNoChange)) // reload the state - var withdrawals snapshot.Payload + var withdrawals snapshotpb.Payload snap := getTestEngine(t) proto.Unmarshal(state, &withdrawals) @@ -417,7 +418,7 @@ func TestDepositSnapshotRoundTrip(t *testing.T) { require.True(t, bytes.Equal(state, stateNoChange)) // reload the state - var deposits snapshot.Payload + var deposits snapshotpb.Payload snap := getTestEngine(t) proto.Unmarshal(state, &deposits) payload := types.PayloadFromProto(&deposits) @@ -437,7 +438,7 @@ func TestOneOffTransfersSnapshotRoundTrip(t *testing.T) { Balance: num.NewUint(1000), } - eng.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(100)}), nil) + eng.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) eng.tsvc.EXPECT().GetTimeNow().Times(4) eng.col.EXPECT().GetPartyGeneralAccount(gomock.Any(), gomock.Any()).AnyTimes().Return(&fromAcc, nil) eng.broker.EXPECT().Send(gomock.Any()).AnyTimes() @@ -458,7 +459,7 @@ func TestOneOffTransfersSnapshotRoundTrip(t *testing.T) { FromAccountType: types.AccountTypeGeneral, To: "2e05fd230f3c9f4eaf0bdc5bfb7ca0c9d00278afc44637aab60da76653d7ccf0", ToAccountType: types.AccountTypeGeneral, - Asset: "eth", + Asset: assetNameETH, Amount: num.NewUint(10), Reference: "someref", }, @@ -474,7 +475,7 @@ func TestOneOffTransfersSnapshotRoundTrip(t *testing.T) { require.False(t, bytes.Equal(state, state2)) // reload the state - var transfers snapshot.Payload + var transfers snapshotpb.Payload snap := getTestEngine(t) proto.Unmarshal(state2, &transfers) payload := types.PayloadFromProto(&transfers) @@ -493,7 +494,7 @@ func TestRecurringTransfersSnapshotRoundTrip(t *testing.T) { Balance: num.NewUint(1000), } - eng.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(100)}), nil) + eng.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) eng.tsvc.EXPECT().GetTimeNow().Times(1) eng.col.EXPECT().GetPartyGeneralAccount(gomock.Any(), gomock.Any()).AnyTimes().Return(&fromAcc, nil) eng.broker.EXPECT().Send(gomock.Any()).AnyTimes() @@ -542,7 +543,7 @@ func TestRecurringTransfersSnapshotRoundTrip(t *testing.T) { require.False(t, bytes.Equal(state, state2)) // reload the state - var transfers snapshot.Payload + var transfers snapshotpb.Payload snap := getTestEngine(t) proto.Unmarshal(state2, &transfers) payload := types.PayloadFromProto(&transfers) @@ -608,7 +609,7 @@ func TestRecurringGovTransfersSnapshotRoundTrip(t *testing.T) { require.NoError(t, err) // reload the state - var transfers snapshot.Payload + var transfers snapshotpb.Payload snap := getTestEngine(t) proto.Unmarshal(state, &transfers) payload := types.PayloadFromProto(&transfers) @@ -658,7 +659,7 @@ func TestScheduledgGovTransfersSnapshotRoundTrip(t *testing.T) { require.NoError(t, err) // reload the state - var transfers snapshot.Payload + var transfers snapshotpb.Payload snap := getTestEngine(t) proto.Unmarshal(state, &transfers) payload := types.PayloadFromProto(&transfers) @@ -673,18 +674,18 @@ func TestAssetListRoundTrip(t *testing.T) { key := (&types.PayloadBankingAssetActions{}).Key() eng := getTestEngine(t) eng.tsvc.EXPECT().GetTimeNow().AnyTimes() - eng.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(100)}), nil) + eng.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) require.NoError(t, eng.EnableERC20(ctx, &types.ERC20AssetList{}, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301", 1000, 1000, "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301")) state, _, err := eng.GetState(key) require.Nil(t, err) - var pp snapshot.Payload + var pp snapshotpb.Payload proto.Unmarshal(state, &pp) payload := types.PayloadFromProto(&pp) snap := getTestEngine(t) - snap.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(100)}), nil) + snap.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) _, err = snap.LoadState(ctx, payload) require.Nil(t, err) @@ -692,3 +693,100 @@ func TestAssetListRoundTrip(t *testing.T) { require.NoError(t, err) require.True(t, bytes.Equal(state, state2)) } + +func getTestEngineForSnapshot(t *testing.T) *testEngine { + t.Helper() + e := getTestEngine(t) + + e.tsvc.EXPECT().GetTimeNow().DoAndReturn( + func() time.Time { + return time.Unix(10, 0) + }).AnyTimes() + e.assets.EXPECT().Get(gomock.Any()).AnyTimes().Return(testAsset, nil) + e.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() + + return e +} + +func TestTransferFeeDiscountsSnapshotRoundTrip(t *testing.T) { + ctx := vgtest.VegaContext("chainid", 100) + + log := logging.NewTestLogger() + + vegaPath := paths.New(t.TempDir()) + + now := time.Now() + timeService := stubs.NewTimeStub() + timeService.SetTime(now) + + statsData := stats.New(log, stats.NewDefaultConfig()) + bankingEngine1 := getTestEngineForSnapshot(t) + + snapshotEngine1, err := snapshot.NewEngine(vegaPath, snapshot.DefaultConfig(), log, timeService, statsData.Blockchain) + require.NoError(t, err) + + closeSnapshotEngine1 := vgtest.OnlyOnce(snapshotEngine1.Close) + defer closeSnapshotEngine1() + + snapshotEngine1.AddProviders(bankingEngine1) + + // No snapshot yet, does nothing. + require.NoError(t, snapshotEngine1.Start(ctx)) + + // let's do a massive fee, easy to test. + bankingEngine1.OnTransferFeeFactorUpdate(context.Background(), num.NewDecimalFromFloat(1)) + bankingEngine1.OnTick(context.Background(), time.Unix(10, 0)) + + assetName := "asset-1" + assetName2 := "asset-2" + feeDiscounts := map[string]*num.Uint{"party-1": num.NewUint(5), "party-2": num.NewUint(10), "party-6": num.NewUint(33)} + feeDiscounts2 := map[string]*num.Uint{"party-1": num.NewUint(7), "party-2": num.NewUint(16), "party-4": num.NewUint(16)} + feeDiscounts3 := map[string]*num.Uint{"party-6": num.NewUint(2), "party-9": num.NewUint(5), "party-2": num.NewUint(33)} + feeDiscounts4 := map[string]*num.Uint{"party-1": num.NewUint(4), "party-2": num.NewUint(5), "party-6": num.NewUint(6)} + bankingEngine1.RegisterTradingFees(ctx, assetName, feeDiscounts) + bankingEngine1.RegisterTradingFees(ctx, assetName2, feeDiscounts2) + bankingEngine1.RegisterTradingFees(ctx, assetName2, feeDiscounts3) + + hash1, err := snapshotEngine1.SnapshotNow(ctx) + require.NoError(t, err) + + assetName3 := "asset-3" + bankingEngine1.RegisterTradingFees(ctx, assetName3, feeDiscounts4) + + state1 := map[string][]byte{} + for _, key := range bankingEngine1.Keys() { + state, additionalProvider, err := bankingEngine1.GetState(key) + require.NoError(t, err) + assert.Empty(t, additionalProvider) + state1[key] = state + } + + closeSnapshotEngine1() + + snapshotEngine2, err := snapshot.NewEngine(vegaPath, snapshot.DefaultConfig(), log, timeService, statsData.Blockchain) + require.NoError(t, err) + defer snapshotEngine2.Close() + + bankingEngine2 := getTestEngineForSnapshot(t) + + snapshotEngine2.AddProviders(bankingEngine2.Engine) + + require.NoError(t, snapshotEngine2.Start(ctx)) + + hash2, _, _ := snapshotEngine2.Info() + require.Equal(t, hash1, hash2) + + bankingEngine2.RegisterTradingFees(ctx, assetName3, feeDiscounts4) + + state2 := map[string][]byte{} + for _, key := range bankingEngine2.Keys() { + state, additionalProvider, err := bankingEngine2.GetState(key) + require.NoError(t, err) + assert.Empty(t, additionalProvider) + state2[key] = state + } + + for key := range state1 { + assert.Equalf(t, state1[key], state2[key], "Key %q does not have the same data", key) + } +} diff --git a/core/banking/transfer_common_test.go b/core/banking/transfer_common_test.go index 5dc89ac3e6..5a3b8ef977 100644 --- a/core/banking/transfer_common_test.go +++ b/core/banking/transfer_common_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/assets" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) @@ -45,7 +46,7 @@ func TestCheckTransfer(t *testing.T) { e.col.EXPECT().GetPartyGeneralAccount(gomock.Any(), gomock.Any()).Return(&types.Account{Balance: num.NewUint(200)}, nil).AnyTimes() // asset exists - e.assets.EXPECT().Get(gomock.Any()).Times(2).Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(100)}), nil) + e.assets.EXPECT().Get(gomock.Any()).Times(2).Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) require.EqualError(t, e.CheckTransfer(transfer), "could not transfer funds, less than minimal amount requested to transfer", @@ -63,7 +64,7 @@ func TestCheckTransfer(t *testing.T) { ) // invalid amount - e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(100)}), nil) + e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) transfer.Amount = num.UintZero() require.EqualError(t, e.CheckTransfer(transfer), @@ -71,7 +72,7 @@ func TestCheckTransfer(t *testing.T) { ) e.OnTransferFeeFactorUpdate(context.Background(), num.DecimalFromFloat(0.01)) - e.assets.EXPECT().Get(gomock.Any()).Times(2).Return(assets.NewAsset(&mockAsset{num.DecimalFromFloat(100)}), nil) + e.assets.EXPECT().Get(gomock.Any()).Times(2).Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) // sufficient balance to cover fees transfer.Amount = num.NewUint(100) require.NoError(t, e.CheckTransfer(transfer)) @@ -80,3 +81,49 @@ func TestCheckTransfer(t *testing.T) { transfer.Amount = num.NewUint(200) require.EqualError(t, e.CheckTransfer(transfer), "could not transfer funds, not enough funds to transfer") } + +func TestCheckTransferWithVestedAccount(t *testing.T) { + e := getTestEngine(t) + + transfer := &types.TransferBase{ + From: "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301", + FromAccountType: types.AccountTypeVestedRewards, + To: "03ae90688632c649c4beab6040ff5bd04dbde8efbf737d8673bbda792a110301", + ToAccountType: types.AccountTypeGeneral, + Asset: "eth", + Amount: num.NewUint(10), + Reference: "someref", + } + + e.OnMinTransferQuantumMultiple(context.Background(), num.DecimalFromFloat(1)) + + // balance is under the min amount + e.col.EXPECT().GetPartyVestedRewardAccount(gomock.Any(), gomock.Any()).Return(&types.Account{Balance: num.NewUint(90)}, nil).Times(1) + + // asset exists + e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) + // try to transfer a small balance, but not the whole balance + require.EqualError(t, + e.CheckTransfer(transfer), + "transfer from vested account under minimal transfer amount must be the full balance", + ) + + // now we try to transfre the full amount + e.col.EXPECT().GetPartyVestedRewardAccount(gomock.Any(), gomock.Any()).Return(&types.Account{Balance: num.NewUint(90)}, nil).Times(2) + transfer.Amount = num.NewUint(90) + e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) + require.NoError(t, + e.CheckTransfer(transfer), + ) + + // now we try again, with a balance above the min amount, but not the whole balance + + e.col.EXPECT().GetPartyVestedRewardAccount(gomock.Any(), gomock.Any()).Return(&types.Account{Balance: num.NewUint(300)}, nil).Times(1) + e.assets.EXPECT().Get(gomock.Any()).Times(1).Return(assets.NewAsset(&mockAsset{name: assetNameETH, quantum: num.DecimalFromFloat(100)}), nil) + + transfer.Amount = num.NewUint(110) + // try to transfer a small balance, but not the whole balance + require.NoError(t, + e.CheckTransfer(transfer), + ) +} diff --git a/core/banking/transfers_common.go b/core/banking/transfers_common.go index c20537c744..8795075b62 100644 --- a/core/banking/transfers_common.go +++ b/core/banking/transfers_common.go @@ -36,6 +36,21 @@ func (e *Engine) OnMinTransferQuantumMultiple(ctx context.Context, f num.Decimal return nil } +func (e *Engine) OnMaxQuantumAmountUpdate(ctx context.Context, f num.Decimal) error { + e.maxQuantumAmount = f + return nil +} + +func (e *Engine) OnTransferFeeDiscountDecayFractionUpdate(ctx context.Context, v num.Decimal) error { + e.feeDiscountDecayFraction = v + return nil +} + +func (e *Engine) OnTransferFeeDiscountMinimumTrackedAmountUpdate(ctx context.Context, v num.Decimal) error { + e.feeDiscountMinimumTrackedAmount = v + return nil +} + func (e *Engine) TransferFunds( ctx context.Context, transfer *types.TransferFunds, @@ -66,24 +81,32 @@ func (e *Engine) CheckTransfer(t *types.TransferBase) error { return fmt.Errorf("could not transfer funds, %w", err) } - if err := e.ensureMinimalTransferAmount(a, t.Amount); err != nil { + if err := e.ensureMinimalTransferAmount(a, t.Amount, t.FromAccountType, t.From); err != nil { return err } - _, err = e.ensureFeeForTransferFunds(t.Amount, t.From, t.Asset, t.FromAccountType) - if err != nil { + if err = e.ensureFeeForTransferFunds(a, t.Amount, t.From, t.FromAccountType, t.To); err != nil { return fmt.Errorf("could not transfer funds, %w", err) } return nil } -func (e *Engine) ensureMinimalTransferAmount(a *assets.Asset, amount *num.Uint) error { +func (e *Engine) ensureMinimalTransferAmount( + a *assets.Asset, + amount *num.Uint, + fromAccType types.AccountType, + from string, +) error { quantum := a.Type().Details.Quantum // no reason this would produce an error minAmount, _ := num.UintFromDecimal(quantum.Mul(e.minTransferQuantumMultiple)) // no verify amount if amount.LT(minAmount) { + if fromAccType == types.AccountTypeVestedRewards { + return e.ensureMinimalTransferAmountFromVested(amount, from, a.Type().ID) + } + e.log.Debug("cannot transfer funds, less than minimal amount requested to transfer", logging.BigUint("min-amount", minAmount), logging.BigUint("requested-amount", amount), @@ -94,9 +117,26 @@ func (e *Engine) ensureMinimalTransferAmount(a *assets.Asset, amount *num.Uint) return nil } +func (e *Engine) ensureMinimalTransferAmountFromVested( + transferAmount *num.Uint, + from, asset string, +) error { + account, err := e.col.GetPartyVestedRewardAccount(from, asset) + if err != nil { + return err + } + + if transferAmount.EQ(account.Balance) { + return nil + } + + return fmt.Errorf("transfer from vested account under minimal transfer amount must be the full balance") +} + func (e *Engine) processTransfer( ctx context.Context, - from, to, asset, toMarket string, + asset *assets.Asset, + from, to, toMarket string, fromAcc, toAcc types.AccountType, amount *num.Uint, reference string, @@ -106,15 +146,17 @@ func (e *Engine) processTransfer( // in case we need to schedule the delivery oneoff *types.OneOffTransfer, ) ([]*types.LedgerMovement, error) { + assetType := asset.ToAssetType() + // ensure the party have enough funds for both the // amount and the fee for the transfer - feeTransfer, err := e.ensureFeeForTransferFunds(amount, from, asset, fromAcc) + feeTransfer, discount, err := e.makeFeeTransferForFundsTransfer(ctx, assetType, amount, from, fromAcc, to) if err != nil { return nil, fmt.Errorf("could not pay the fee for transfer: %w", err) } feeTransferAccountType := []types.AccountType{fromAcc} - fromTransfer, toTransfer := e.makeTransfers(from, to, asset, "", toMarket, amount) + fromTransfer, toTransfer := e.makeTransfers(from, to, assetType.ID, "", toMarket, amount, &transferID) transfers := []*types.Transfer{fromTransfer} accountTypes := []types.AccountType{fromAcc} references := []string{reference} @@ -145,7 +187,8 @@ func (e *Engine) processTransfer( if err != nil { return nil, err } - e.broker.Send(events.NewTransferFeesEvent(ctx, transferID, feeTransfer.Amount.Amount, epoch)) + + e.broker.Send(events.NewTransferFeesEvent(ctx, transferID, feeTransfer.Amount.Amount, discount, epoch)) return tresps, nil } @@ -153,6 +196,7 @@ func (e *Engine) processTransfer( func (e *Engine) makeTransfers( from, to, asset, fromMarket, toMarket string, amount *num.Uint, + transferID *string, ) (*types.Transfer, *types.Transfer) { return &types.Transfer{ Owner: from, @@ -160,35 +204,62 @@ func (e *Engine) makeTransfers( Amount: amount.Clone(), Asset: asset, }, - Type: types.TransferTypeTransferFundsSend, - MinAmount: amount.Clone(), - Market: fromMarket, + Type: types.TransferTypeTransferFundsSend, + MinAmount: amount.Clone(), + Market: fromMarket, + TransferID: transferID, }, &types.Transfer{ Owner: to, Amount: &types.FinancialAmount{ Amount: amount.Clone(), Asset: asset, }, - Type: types.TransferTypeTransferFundsDistribute, - MinAmount: amount.Clone(), - Market: toMarket, + Type: types.TransferTypeTransferFundsDistribute, + MinAmount: amount.Clone(), + Market: toMarket, + TransferID: transferID, } } -func (e *Engine) makeFeeTransferForTransferFunds( +func (e *Engine) calculateFeeTransferForTransfer( + asset *types.Asset, amount *num.Uint, - from, asset string, + from string, fromAccountType types.AccountType, -) *types.Transfer { - // first we calculate the fee - feeAmount, _ := num.UintFromDecimal(amount.ToDecimal().Mul(e.transferFeeFactor)) + to string, +) *num.Uint { + return calculateFeeForTransfer( + asset.Details.Quantum, + e.maxQuantumAmount, + e.transferFeeFactor, + amount, + from, + fromAccountType, + to, + ) +} + +func (e *Engine) makeFeeTransferForFundsTransfer( + ctx context.Context, + asset *types.Asset, + amount *num.Uint, + from string, + fromAccountType types.AccountType, + to string, +) (*types.Transfer, *num.Uint, error) { + theoreticalFee := e.calculateFeeTransferForTransfer(asset, amount, from, fromAccountType, to) + feeAmount, discountAmount := e.ApplyFeeDiscount(ctx, asset.ID, from, theoreticalFee) + + if err := e.ensureEnoughFundsForTransfer(asset, amount, from, fromAccountType, feeAmount); err != nil { + return nil, nil, err + } switch fromAccountType { case types.AccountTypeGeneral, types.AccountTypeVestedRewards: default: e.log.Panic("from account not supported", logging.String("account-type", fromAccountType.String()), - logging.String("asset", asset), + logging.String("asset", asset.ID), logging.String("from", from), ) } @@ -197,43 +268,54 @@ func (e *Engine) makeFeeTransferForTransferFunds( Owner: from, Amount: &types.FinancialAmount{ Amount: feeAmount.Clone(), - Asset: asset, + Asset: asset.ID, }, Type: types.TransferTypeInfrastructureFeePay, MinAmount: feeAmount, - } + }, discountAmount, nil } func (e *Engine) ensureFeeForTransferFunds( + asset *assets.Asset, amount *num.Uint, - from, asset string, + from string, fromAccountType types.AccountType, -) (*types.Transfer, error) { - transfer := e.makeFeeTransferForTransferFunds( - amount, from, asset, fromAccountType, - ) + to string, +) error { + assetType := asset.ToAssetType() + theoreticalFee := e.calculateFeeTransferForTransfer(assetType, amount, from, fromAccountType, to) + feeAmount, _ := e.EstimateFeeDiscount(assetType.ID, from, theoreticalFee) + return e.ensureEnoughFundsForTransfer(assetType, amount, from, fromAccountType, feeAmount) +} +func (e *Engine) ensureEnoughFundsForTransfer( + asset *types.Asset, + amount *num.Uint, + from string, + fromAccountType types.AccountType, + feeAmount *num.Uint, +) error { var ( - totalAmount = num.Sum(transfer.Amount.Amount, amount) + totalAmount = num.Sum(feeAmount, amount) account *types.Account err error ) switch fromAccountType { case types.AccountTypeGeneral: - account, err = e.col.GetPartyGeneralAccount(from, asset) + account, err = e.col.GetPartyGeneralAccount(from, asset.ID) if err != nil { - return nil, err + return err } case types.AccountTypeVestedRewards: - account, err = e.col.GetPartyVestedRewardAccount(from, asset) + account, err = e.col.GetPartyVestedRewardAccount(from, asset.ID) if err != nil { - return nil, err + return err } default: e.log.Panic("from account not supported", logging.String("account-type", fromAccountType.String()), - logging.String("asset", asset), + logging.String("asset", asset.ID), logging.String("from", from), ) } @@ -241,15 +323,14 @@ func (e *Engine) ensureFeeForTransferFunds( if account.Balance.LT(totalAmount) { e.log.Debug("not enough funds to transfer", logging.BigUint("amount", amount), - logging.BigUint("fee", transfer.Amount.Amount), + logging.BigUint("fee", feeAmount), logging.BigUint("total-amount", totalAmount), logging.BigUint("account-balance", account.Balance), logging.String("account-type", fromAccountType.String()), - logging.String("asset", asset), + logging.String("asset", asset.ID), logging.String("from", from), ) - return nil, ErrNotEnoughFundsToTransfer + return ErrNotEnoughFundsToTransfer } - - return transfer, nil + return nil } diff --git a/core/blockchain/abci/abci.go b/core/blockchain/abci/abci.go index a8a4095d7f..eddb59a482 100644 --- a/core/blockchain/abci/abci.go +++ b/core/blockchain/abci/abci.go @@ -16,23 +16,24 @@ package abci import ( + "context" "encoding/hex" - "errors" + "strconv" "code.vegaprotocol.io/vega/core/blockchain" vgcontext "code.vegaprotocol.io/vega/libs/context" - "github.com/tendermint/tendermint/abci/types" + "github.com/cometbft/cometbft/abci/types" ) -func (app *App) Info(req types.RequestInfo) types.ResponseInfo { +func (app *App) Info(ctx context.Context, req *types.RequestInfo) (*types.ResponseInfo, error) { if fn := app.OnInfo; fn != nil { - return fn(req) + return fn(ctx, req) } - return app.BaseApplication.Info(req) + return app.BaseApplication.Info(ctx, req) } -func (app *App) InitChain(req types.RequestInitChain) (resp types.ResponseInitChain) { +func (app *App) InitChain(_ context.Context, req *types.RequestInitChain) (*types.ResponseInitChain, error) { _, err := LoadGenesisState(req.AppStateBytes) if err != nil { panic(err) @@ -41,42 +42,81 @@ func (app *App) InitChain(req types.RequestInitChain) (resp types.ResponseInitCh if fn := app.OnInitChain; fn != nil { return fn(req) } - return + return &types.ResponseInitChain{}, nil } -func (app *App) BeginBlock(req types.RequestBeginBlock) (resp types.ResponseBeginBlock) { - if fn := app.OnBeginBlock; fn != nil { - app.ctx, resp = fn(req) +// PrepareProposal will take the given transactions from the mempool and attempts to prepare a +// proposal from them when it's our turn to do so while keeping the size, gas, pow, and spam constraints. +func (app *App) PrepareProposal(_ context.Context, req *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { + txs := make([]Tx, 0, len(req.Txs)) + rawTxs := make([][]byte, 0, len(req.Txs)) + for _, v := range req.Txs { + tx, _, err := app.getTx(v) + // ignore transactions we can't verify + if err != nil { + continue + } + // ignore transactions we don't know to handle + if _, ok := app.deliverTxs[tx.Command()]; !ok { + continue + } + txs = append(txs, tx) + rawTxs = append(rawTxs, v) } - return + + // let the application decide on the order and the number of transactions it wants to pick up for this block + res := &types.ResponsePrepareProposal{Txs: app.OnPrepareProposal(txs, rawTxs)} + return res, nil } -func (app *App) EndBlock(req types.RequestEndBlock) (resp types.ResponseEndBlock) { - if fn := app.OnEndBlock; fn != nil { - app.ctx, resp = fn(req) +// ProcessProposal implements part of the Application interface. +// It accepts any proposal that does not contain a malformed transaction. +// NB: processProposal will not be called if the node is fast-sync-ing so no state change is allowed here!!!. +func (app *App) ProcessProposal(_ context.Context, req *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { + // check transaction signatures if any is wrong, reject the block + txs := make([]Tx, 0, len(req.Txs)) + for _, v := range req.Txs { + tx, _, err := app.getTx(v) + if err != nil { + // if there's a transaction we can't decode or verify, reject it + return &types.ResponseProcessProposal{Status: types.ResponseProcessProposal_REJECT}, err + } + // if there's no handler for a transaction, reject it + if _, ok := app.deliverTxs[tx.Command()]; !ok { + return &types.ResponseProcessProposal{Status: types.ResponseProcessProposal_REJECT}, nil + } + txs = append(txs, tx) + } + // let the application verify the block + if !app.OnProcessProposal(txs) { + return &types.ResponseProcessProposal{Status: types.ResponseProcessProposal_REJECT}, nil } - return + return &types.ResponseProcessProposal{Status: types.ResponseProcessProposal_ACCEPT}, nil } -func (app *App) Commit() (resp types.ResponseCommit) { +func (app *App) Commit(_ context.Context, req *types.RequestCommit) (*types.ResponseCommit, error) { if fn := app.OnCommit; fn != nil { return fn() } - return + return &types.ResponseCommit{}, nil } -func (app *App) CheckTx(req types.RequestCheckTx) (resp types.ResponseCheckTx) { +func (app *App) CheckTx(_ context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { // first, only decode the transaction but don't validate tx, code, err := app.getTx(req.GetTx()) + + var resp *types.ResponseCheckTx if err != nil { - return blockchain.NewResponseCheckTxError(code, err) + // TODO I think we need to return error in this case as now the API allows for it + // return blockchain.NewResponseCheckTxError(code, err), err + return blockchain.NewResponseCheckTxError(code, err), nil } // check for spam and replay if fn := app.OnCheckTxSpam; fn != nil { - resp = fn(tx) + resp := fn(tx) if resp.IsErr() { - return AddCommonCheckTxEvents(resp, tx) + return AddCommonCheckTxEvents(&resp, tx), nil } } @@ -84,14 +124,14 @@ func (app *App) CheckTx(req types.RequestCheckTx) (resp types.ResponseCheckTx) { if fn := app.OnCheckTx; fn != nil { ctx, resp = fn(ctx, req, tx) if resp.IsErr() { - return AddCommonCheckTxEvents(resp, tx) + return AddCommonCheckTxEvents(resp, tx), nil } } // Lookup for check tx, skip if not found if fn, ok := app.checkTxs[tx.Command()]; ok { if err := fn(ctx, tx); err != nil { - return AddCommonCheckTxEvents(blockchain.NewResponseCheckTxError(blockchain.AbciTxnInternalError, err), tx) + return AddCommonCheckTxEvents(blockchain.NewResponseCheckTxError(blockchain.AbciTxnInternalError, err), tx), nil } } @@ -100,99 +140,103 @@ func (app *App) CheckTx(req types.RequestCheckTx) (resp types.ResponseCheckTx) { if resp.IsOK() { app.cacheTx(req.Tx, tx) } - - return AddCommonCheckTxEvents(resp, tx) + return AddCommonCheckTxEvents(resp, tx), nil } -func (app *App) DeliverTx(req types.RequestDeliverTx) (resp types.ResponseDeliverTx) { - // first, only decode the transaction but don't validate - tx, code, err := app.getTx(req.GetTx()) - if err != nil { - return blockchain.NewResponseDeliverTxError(code, err) - } - app.removeTxFromCache(req.GetTx()) - - // check for spam and replay - if fn := app.OnDeliverTxSpam; fn != nil { - resp = fn(app.ctx, tx) - if resp.IsErr() { - return AddCommonDeliverTxEvents(resp, tx) - } - } - - // It's been validated by CheckTx so we can skip the validation here - ctx := app.ctx - if fn := app.OnDeliverTx; fn != nil { - ctx, resp = fn(ctx, req, tx) - if resp.IsErr() { - return AddCommonDeliverTxEvents(resp, tx) +// FinalizeBlock lets the application process a whole block end to end. +func (app *App) FinalizeBlock(_ context.Context, req *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { + blockHeight := uint64(req.Height) + blockTime := req.Time + + txs := make([]Tx, 0, len(req.Txs)) + for _, rtx := range req.Txs { + // getTx can't fail at this point as we've verified on processProposal, however as it can fail in nullblockchain, handle it here + tx, _, err := app.getTx(rtx) + if err != nil { + continue } + app.removeTxFromCache(rtx) + txs = append(txs, tx) } - // Lookup for deliver tx, fail if not found - fn := app.deliverTxs[tx.Command()] - if fn == nil { - return AddCommonDeliverTxEvents( - blockchain.NewResponseDeliverTxError(blockchain.AbciUnknownCommandError, errors.New("invalid vega command")), tx, - ) - } + app.ctx = app.OnBeginBlock(blockHeight, hex.EncodeToString(req.Hash), blockTime, hex.EncodeToString(req.ProposerAddress), txs) + results := make([]*types.ExecTxResult, 0, len(req.Txs)) + events := []types.Event{} - txHash := hex.EncodeToString(tx.Hash()) - ctx = vgcontext.WithTxHash(ctx, txHash) - - if err := fn(ctx, tx); err != nil { - if perr, ok := err.(MaybePartialError); ok { - if perr.IsPartial() { - return AddCommonDeliverTxEvents( - blockchain.NewResponseDeliverTxError(blockchain.AbciTxnPartialProcessingError, err), tx, - ) + for _, tx := range txs { + // there must be a handling function at this point + fn := app.deliverTxs[tx.Command()] + txHash := hex.EncodeToString(tx.Hash()) + ctx := vgcontext.WithTxHash(app.ctx, txHash) + // process the transaction and handle errors + var result *types.ExecTxResult + if err := fn(ctx, tx); err != nil { + if perr, ok := err.(MaybePartialError); ok && perr.IsPartial() { + result = blockchain.NewResponseDeliverTxError(blockchain.AbciTxnPartialProcessingError, err) + } else { + result = blockchain.NewResponseDeliverTxError(blockchain.AbciTxnInternalError, err) } + } else { + result = blockchain.NewResponseDeliverTx(types.CodeTypeOK, "") } - - return AddCommonDeliverTxEvents( - blockchain.NewResponseDeliverTxError(blockchain.AbciTxnInternalError, err), tx, - ) - } - - return AddCommonDeliverTxEvents( - blockchain.NewResponseDeliverTx(types.CodeTypeOK, ""), tx, + result.Events = getBaseTxEvents(tx) + results = append(results, result) + } + valUpdates, consensusUpdates := app.OnEndBlock(blockHeight) + events = append(events, types.Event{ + Type: "val_updates", + Attributes: []types.EventAttribute{ + { + Key: "size", + Value: strconv.Itoa(valUpdates.Len()), + }, + { + Key: "height", + Value: strconv.Itoa(int(req.Height)), + }, + }, + }, ) + + hash := app.OnFinalize() + return &types.ResponseFinalizeBlock{ + TxResults: results, + ValidatorUpdates: valUpdates, + ConsensusParamUpdates: &consensusUpdates, + AppHash: hash, + Events: events, + }, nil } -func (app *App) ListSnapshots(req types.RequestListSnapshots) (resp types.ResponseListSnapshots) { +func (app *App) ListSnapshots(ctx context.Context, req *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { if app.OnListSnapshots != nil { - resp = app.OnListSnapshots(req) + return app.OnListSnapshots(ctx, req) } - return + return &types.ResponseListSnapshots{}, nil } -func (app *App) OfferSnapshot(req types.RequestOfferSnapshot) (resp types.ResponseOfferSnapshot) { +func (app *App) OfferSnapshot(ctx context.Context, req *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { if app.OnOfferSnapshot != nil { - resp = app.OnOfferSnapshot(req) + return app.OnOfferSnapshot(ctx, req) } - return + return &types.ResponseOfferSnapshot{}, nil } -func (app *App) LoadSnapshotChunk(req types.RequestLoadSnapshotChunk) (resp types.ResponseLoadSnapshotChunk) { +func (app *App) LoadSnapshotChunk(ctx context.Context, req *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { if app.OnLoadSnapshotChunk != nil { - resp = app.OnLoadSnapshotChunk(req) + return app.OnLoadSnapshotChunk(ctx, req) } - return + return &types.ResponseLoadSnapshotChunk{}, nil } -func (app *App) ApplySnapshotChunk(req types.RequestApplySnapshotChunk) (resp types.ResponseApplySnapshotChunk) { +func (app *App) ApplySnapshotChunk(_ context.Context, req *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { if app.OnApplySnapshotChunk != nil { - resp = app.OnApplySnapshotChunk(app.ctx, req) + return app.OnApplySnapshotChunk(app.ctx, req) } - return -} - -func AddCommonCheckTxEvents(resp types.ResponseCheckTx, tx Tx) types.ResponseCheckTx { - resp.Events = getBaseTxEvents(tx) - return resp + return &types.ResponseApplySnapshotChunk{}, nil } -func AddCommonDeliverTxEvents(resp types.ResponseDeliverTx, tx Tx) types.ResponseDeliverTx { +func AddCommonCheckTxEvents(resp *types.ResponseCheckTx, tx Tx) *types.ResponseCheckTx { resp.Events = getBaseTxEvents(tx) return resp } @@ -203,8 +247,8 @@ func getBaseTxEvents(tx Tx) []types.Event { Type: "tx", Attributes: []types.EventAttribute{ { - Key: []byte("submitter"), - Value: []byte(tx.PubKeyHex()), + Key: "submitter", + Value: tx.PubKeyHex(), Index: true, }, }, @@ -213,8 +257,8 @@ func getBaseTxEvents(tx Tx) []types.Event { Type: "command", Attributes: []types.EventAttribute{ { - Key: []byte("type"), - Value: []byte(tx.Command().String()), + Key: "type", + Value: tx.Command().String(), Index: true, }, }, @@ -237,8 +281,8 @@ func getBaseTxEvents(tx Tx) []types.Event { } if len(market) > 0 { commandAttributes = append(commandAttributes, types.EventAttribute{ - Key: []byte("market"), - Value: []byte(market), + Key: "market", + Value: market, Index: true, }) } @@ -252,8 +296,8 @@ func getBaseTxEvents(tx Tx) []types.Event { } if len(asset) > 0 { commandAttributes = append(commandAttributes, types.EventAttribute{ - Key: []byte("asset"), - Value: []byte(asset), + Key: "asset", + Value: asset, Index: true, }) } @@ -264,8 +308,8 @@ func getBaseTxEvents(tx Tx) []types.Event { } if len(reference) > 0 { commandAttributes = append(commandAttributes, types.EventAttribute{ - Key: []byte("reference"), - Value: []byte(reference), + Key: "reference", + Value: reference, Index: true, }) } @@ -276,8 +320,8 @@ func getBaseTxEvents(tx Tx) []types.Event { } if len(proposal) > 0 { commandAttributes = append(commandAttributes, types.EventAttribute{ - Key: []byte("proposal"), - Value: []byte(proposal), + Key: "proposal", + Value: proposal, Index: true, }) } diff --git a/core/blockchain/abci/abci_test.go b/core/blockchain/abci/abci_test.go index 62ef7fe192..a2e5f0e6ca 100644 --- a/core/blockchain/abci/abci_test.go +++ b/core/blockchain/abci/abci_test.go @@ -24,8 +24,9 @@ import ( "code.vegaprotocol.io/vega/core/blockchain" "code.vegaprotocol.io/vega/core/blockchain/abci" "code.vegaprotocol.io/vega/core/txn" + + "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/abci/types" ) type testTx struct { @@ -39,6 +40,7 @@ type testTx struct { powTxID string } +func (tx *testTx) GetLength() int { return 0 } func (tx *testTx) Unmarshal(interface{}) error { return nil } func (tx *testTx) GetPoWTID() string { return tx.powTxID } func (tx *testTx) GetVersion() uint32 { return 2 } @@ -98,9 +100,8 @@ func TestABCICheckTx(t *testing.T) { return errors.New("boom") }) - app.OnCheckTx = func(ctx context.Context, req types.RequestCheckTx, _ abci.Tx) (context.Context, types.ResponseCheckTx) { - resp := types.ResponseCheckTx{} - return context.WithValue(ctx, testKey, "val"), resp + app.OnCheckTx = func(ctx context.Context, _ *types.RequestCheckTx, _ abci.Tx) (context.Context, *types.ResponseCheckTx) { + return context.WithValue(ctx, testKey, "val"), &types.ResponseCheckTx{} } t.Run("CommandWithNoError", func(t *testing.T) { @@ -110,7 +111,7 @@ func TestABCICheckTx(t *testing.T) { }) req := types.RequestCheckTx{Tx: tx} - resp := app.CheckTx(req) + resp, _ := app.CheckTx(context.Background(), &req) require.True(t, resp.IsOK()) }) @@ -121,7 +122,7 @@ func TestABCICheckTx(t *testing.T) { }) req := types.RequestCheckTx{Tx: tx} - resp := app.CheckTx(req) + resp, _ := app.CheckTx(context.Background(), &req) require.True(t, resp.IsErr()) require.Equal(t, blockchain.AbciTxnInternalError, resp.Code) }) @@ -130,7 +131,7 @@ func TestABCICheckTx(t *testing.T) { tx := []byte("tx-not-registered-on-the-codec") req := types.RequestCheckTx{Tx: tx} - resp := app.CheckTx(req) + resp, _ := app.CheckTx(context.Background(), &req) require.True(t, resp.IsErr()) require.Equal(t, blockchain.AbciTxnDecodingFailure, resp.Code) }) diff --git a/core/blockchain/abci/app.go b/core/blockchain/abci/app.go index efa61a7aab..06a13f78a7 100644 --- a/core/blockchain/abci/app.go +++ b/core/blockchain/abci/app.go @@ -22,8 +22,8 @@ import ( "code.vegaprotocol.io/vega/core/txn" "code.vegaprotocol.io/vega/core/types" + abci "github.com/cometbft/cometbft/abci/types" lru "github.com/hashicorp/golang-lru" - abci "github.com/tendermint/tendermint/abci/types" ) type ( @@ -40,16 +40,17 @@ type App struct { codec Codec // handlers - OnInitChain OnInitChainHandler - OnBeginBlock OnBeginBlockHandler - OnEndBlock OnEndBlockHandler - OnCheckTx OnCheckTxHandler - OnDeliverTx OnDeliverTxHandler - OnCommit OnCommitHandler + OnPrepareProposal PrepareProposalHandler + OnProcessProposal ProcessProposalHandler + OnInitChain OnInitChainHandler + OnCheckTx OnCheckTxHandler + OnCommit OnCommitHandler + OnBeginBlock OnBeginBlockHandler + OnEndBlock OnEndBlockHandler + OnFinalize FinalizeHandler // spam check - OnCheckTxSpam OnCheckTxSpamHandler - OnDeliverTxSpam OnDeliverTxSpamHandler + OnCheckTxSpam OnCheckTxSpamHandler // snapshot stuff diff --git a/core/blockchain/abci/client.go b/core/blockchain/abci/client.go index e06ab4c7ef..f7854c78a7 100644 --- a/core/blockchain/abci/client.go +++ b/core/blockchain/abci/client.go @@ -23,13 +23,13 @@ import ( "sync" "time" - cmtjson "github.com/tendermint/tendermint/libs/json" - tmlog "github.com/tendermint/tendermint/libs/log" - tmquery "github.com/tendermint/tendermint/libs/pubsub/query" - tmclihttp "github.com/tendermint/tendermint/rpc/client/http" - tmctypes "github.com/tendermint/tendermint/rpc/core/types" - "github.com/tendermint/tendermint/types" - tmtypes "github.com/tendermint/tendermint/types" + cmtjson "github.com/cometbft/cometbft/libs/json" + tmlog "github.com/cometbft/cometbft/libs/log" + tmquery "github.com/cometbft/cometbft/libs/pubsub/query" + tmclihttp "github.com/cometbft/cometbft/rpc/client/http" + tmctypes "github.com/cometbft/cometbft/rpc/core/types" + "github.com/cometbft/cometbft/types" + tmtypes "github.com/cometbft/cometbft/types" ) var ErrEmptyClientAddr = errors.New("abci client addr is empty in config") @@ -156,7 +156,7 @@ func (c *Client) GenesisValidators(ctx context.Context) ([]*tmtypes.Validator, e return validators, nil } -// Subscribe subscribes to any event matching query (https://godoc.org/github.com/tendermint/tendermint/types#pkg-constants). +// Subscribe subscribes to any event matching query (https://godoc.org/github.com/cometbft/cometbft/types#pkg-constants). // Subscribe will call fn each time it receives an event from the node. // The function returns nil when the context is canceled or when fn returns an error. func (c *Client) Subscribe(ctx context.Context, fn func(tmctypes.ResultEvent) error, queries ...string) error { diff --git a/core/blockchain/abci/local_client.go b/core/blockchain/abci/local_client.go index 20eb09d097..461cee6af3 100644 --- a/core/blockchain/abci/local_client.go +++ b/core/blockchain/abci/local_client.go @@ -19,12 +19,12 @@ import ( "context" "time" - tmquery "github.com/tendermint/tendermint/libs/pubsub/query" - "github.com/tendermint/tendermint/libs/service" - nm "github.com/tendermint/tendermint/node" - "github.com/tendermint/tendermint/rpc/client/local" - tmctypes "github.com/tendermint/tendermint/rpc/core/types" - tmtypes "github.com/tendermint/tendermint/types" + tmquery "github.com/cometbft/cometbft/libs/pubsub/query" + "github.com/cometbft/cometbft/libs/service" + nm "github.com/cometbft/cometbft/node" + "github.com/cometbft/cometbft/rpc/client/local" + tmctypes "github.com/cometbft/cometbft/rpc/core/types" + tmtypes "github.com/cometbft/cometbft/types" ) type LocalClient struct { @@ -139,7 +139,7 @@ func (c *LocalClient) GenesisValidators(ctx context.Context) ([]*tmtypes.Validat return validators, nil } -// Subscribe subscribes to any event matching query (https://godoc.org/github.com/tendermint/tendermint/types#pkg-constants). +// Subscribe subscribes to any event matching query (https://godoc.org/github.com/cometbft/cometbft/types#pkg-constants). // Subscribe will call fn each time it receives an event from the node. // The function returns nil when the context is canceled or when fn returns an error. func (c *LocalClient) Subscribe(ctx context.Context, fn func(tmctypes.ResultEvent) error, queries ...string) error { diff --git a/core/blockchain/abci/tm_logger.go b/core/blockchain/abci/tm_logger.go index c0045ca29b..b3c10de410 100644 --- a/core/blockchain/abci/tm_logger.go +++ b/core/blockchain/abci/tm_logger.go @@ -16,7 +16,7 @@ package abci import ( - tmlog "github.com/tendermint/tendermint/libs/log" + tmlog "github.com/cometbft/cometbft/libs/log" "go.uber.org/zap" ) diff --git a/core/blockchain/abci/tm_node.go b/core/blockchain/abci/tm_node.go index db8a2d9a57..b26e986776 100644 --- a/core/blockchain/abci/tm_node.go +++ b/core/blockchain/abci/tm_node.go @@ -21,20 +21,22 @@ import ( "code.vegaprotocol.io/vega/core/blockchain" "code.vegaprotocol.io/vega/logging" + "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/config" + bftconfig "github.com/cometbft/cometbft/config" + "github.com/cometbft/cometbft/libs/service" + nm "github.com/cometbft/cometbft/node" + "github.com/cometbft/cometbft/p2p" + "github.com/cometbft/cometbft/privval" + "github.com/cometbft/cometbft/proxy" + tmtypes "github.com/cometbft/cometbft/types" "github.com/spf13/viper" - "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/config" - "github.com/tendermint/tendermint/libs/service" - nm "github.com/tendermint/tendermint/node" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/privval" - "github.com/tendermint/tendermint/proxy" - tmtypes "github.com/tendermint/tendermint/types" ) type TmNode struct { - conf blockchain.Config - node service.Service + conf blockchain.Config + node service.Service + MempoolSize int64 } const namedLogger = "tendermint" @@ -101,7 +103,7 @@ func NewTmNode( nodeKey, proxy.NewLocalClientCreator(app), genesisDocProvider, - nm.DefaultDBProvider, + bftconfig.DefaultDBProvider, nm.DefaultMetricsProvider(config.Instrumentation), logger) if err != nil { @@ -114,7 +116,7 @@ func NewTmNode( // return nil, fmt.Errorf("creating tendermint node: %v", err) // } - return &TmNode{conf, node}, nil + return &TmNode{conf, node, config.Mempool.MaxTxsBytes}, nil } func (*TmNode) ReloadConf(cfg blockchain.Config) { @@ -156,9 +158,7 @@ func loadConfig(homeDir string) (*config.Config, error) { func overwriteConfig(config *config.Config) { config.Consensus.TimeoutCommit = 0 config.Consensus.CreateEmptyBlocks = true - // enforce using priority mempool - config.Mempool.Version = "v1" - // ensure transactions are continuously checked + // ensure rechecking tx is enabled config.Mempool.Recheck = true // enforce compatibility config.P2P.MaxPacketMsgPayloadSize = 16384 diff --git a/core/blockchain/abci/types.go b/core/blockchain/abci/types.go index ddafec89bf..80e7ae718e 100644 --- a/core/blockchain/abci/types.go +++ b/core/blockchain/abci/types.go @@ -17,9 +17,12 @@ package abci import ( "context" + "time" "code.vegaprotocol.io/vega/core/txn" - "github.com/tendermint/tendermint/abci/types" + + "github.com/cometbft/cometbft/abci/types" + types1 "github.com/cometbft/cometbft/proto/tendermint/types" ) //nolint:interfacebloat @@ -36,6 +39,7 @@ type Tx interface { GetPoWNonce() uint64 GetPoWTID() string GetVersion() uint32 + GetLength() int GetNonce() uint64 } @@ -45,17 +49,19 @@ type Codec interface { // ABCI hooks. type ( - OnInitChainHandler func(types.RequestInitChain) types.ResponseInitChain - OnBeginBlockHandler func(types.RequestBeginBlock) (context.Context, types.ResponseBeginBlock) - OnEndBlockHandler func(types.RequestEndBlock) (context.Context, types.ResponseEndBlock) - OnCheckTxHandler func(context.Context, types.RequestCheckTx, Tx) (context.Context, types.ResponseCheckTx) - OnDeliverTxHandler func(context.Context, types.RequestDeliverTx, Tx) (context.Context, types.ResponseDeliverTx) - OnCommitHandler func() types.ResponseCommit - ListSnapshotsHandler func(types.RequestListSnapshots) types.ResponseListSnapshots - OfferSnapshotHandler func(types.RequestOfferSnapshot) types.ResponseOfferSnapshot - LoadSnapshotChunkHandler func(types.RequestLoadSnapshotChunk) types.ResponseLoadSnapshotChunk - ApplySnapshotChunkHandler func(context.Context, types.RequestApplySnapshotChunk) types.ResponseApplySnapshotChunk - InfoHandler func(types.RequestInfo) types.ResponseInfo + PrepareProposalHandler func(txs []Tx, raWtxs [][]byte) [][]byte + ProcessProposalHandler func(txs []Tx) bool + OnInitChainHandler func(*types.RequestInitChain) (*types.ResponseInitChain, error) + OnBeginBlockHandler func(uint64, string, time.Time, string, []Tx) context.Context + OnEndBlockHandler func(blockHeight uint64) (types.ValidatorUpdates, types1.ConsensusParams) + OnCheckTxHandler func(context.Context, *types.RequestCheckTx, Tx) (context.Context, *types.ResponseCheckTx) + OnDeliverTxHandler func(context.Context, Tx) + OnCommitHandler func() (*types.ResponseCommit, error) + ListSnapshotsHandler func(context.Context, *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) + OfferSnapshotHandler func(context.Context, *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) + LoadSnapshotChunkHandler func(context.Context, *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) + ApplySnapshotChunkHandler func(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) + InfoHandler func(context.Context, *types.RequestInfo) (*types.ResponseInfo, error) OnCheckTxSpamHandler func(Tx) types.ResponseCheckTx - OnDeliverTxSpamHandler func(context.Context, Tx) types.ResponseDeliverTx + FinalizeHandler func() []byte ) diff --git a/core/blockchain/client.go b/core/blockchain/client.go index 5f27a59b42..786d573286 100644 --- a/core/blockchain/client.go +++ b/core/blockchain/client.go @@ -25,9 +25,9 @@ import ( "code.vegaprotocol.io/vega/libs/proto" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" - "github.com/tendermint/tendermint/libs/bytes" - tmctypes "github.com/tendermint/tendermint/rpc/core/types" - tmtypes "github.com/tendermint/tendermint/types" + "github.com/cometbft/cometbft/libs/bytes" + tmctypes "github.com/cometbft/cometbft/rpc/core/types" + tmtypes "github.com/cometbft/cometbft/types" ) var ErrClientNotReady = errors.New("tendermint client is not ready") @@ -53,8 +53,9 @@ type ChainClientImpl interface { // Client abstract all communication to the blockchain. type Client struct { *Config - clt ChainClientImpl - mu sync.RWMutex + clt ChainClientImpl + mempoolSize int64 + mu sync.RWMutex } // NewClient instantiate a new blockchain client. @@ -70,10 +71,11 @@ func NewClientWithImpl(clt ChainClientImpl) *Client { } } -func (c *Client) Set(clt ChainClientImpl) { +func (c *Client) Set(clt ChainClientImpl, mempoolSize int64) { c.mu.Lock() defer c.mu.Unlock() c.clt = clt + c.mempoolSize = mempoolSize } func (c *Client) isReady() bool { @@ -104,7 +106,7 @@ func (c *Client) CheckTransaction(ctx context.Context, tx *commandspb.Transactio if _, err := commands.CheckTransaction(tx, chainID); err != nil { return &tmctypes.ResultCheckTx{ - ResponseCheckTx: NewResponseCheckTxError(AbciTxnDecodingFailure, err), + ResponseCheckTx: *NewResponseCheckTxError(AbciTxnDecodingFailure, err), }, nil } @@ -149,7 +151,7 @@ func (c *Client) SubmitTransactionCommit(ctx context.Context, tx *commandspb.Tra if _, err := commands.CheckTransaction(tx, chainID); err != nil { return &tmctypes.ResultBroadcastTxCommit{ - CheckTx: NewResponseCheckTxError(AbciTxnDecodingFailure, err), + CheckTx: *NewResponseCheckTxError(AbciTxnDecodingFailure, err), }, nil } @@ -301,6 +303,10 @@ func (c *Client) GenesisValidators() ([]*tmtypes.Validator, error) { return c.clt.GenesisValidators(ctx) } +func (c *Client) MaxMempoolSize() int64 { + return c.mempoolSize +} + func (c *Client) Validators(height *int64) ([]*tmtypes.Validator, error) { if !c.isReady() { return nil, ErrClientNotReady diff --git a/core/blockchain/nullchain/mocks/mocks.go b/core/blockchain/nullchain/mocks/mocks.go index 0532c7ed69..17b4a0999c 100644 --- a/core/blockchain/nullchain/mocks/mocks.go +++ b/core/blockchain/nullchain/mocks/mocks.go @@ -5,11 +5,12 @@ package mocks import ( + context "context" reflect "reflect" time "time" + types "github.com/cometbft/cometbft/abci/types" gomock "github.com/golang/mock/gomock" - types "github.com/tendermint/tendermint/abci/types" ) // MockTimeService is a mock of TimeService interface. @@ -72,86 +73,62 @@ func (m *MockApplicationService) EXPECT() *MockApplicationServiceMockRecorder { return m.recorder } -// BeginBlock mocks base method. -func (m *MockApplicationService) BeginBlock(arg0 types.RequestBeginBlock) types.ResponseBeginBlock { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BeginBlock", arg0) - ret0, _ := ret[0].(types.ResponseBeginBlock) - return ret0 -} - -// BeginBlock indicates an expected call of BeginBlock. -func (mr *MockApplicationServiceMockRecorder) BeginBlock(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeginBlock", reflect.TypeOf((*MockApplicationService)(nil).BeginBlock), arg0) -} - // Commit mocks base method. -func (m *MockApplicationService) Commit() types.ResponseCommit { +func (m *MockApplicationService) Commit(arg0 context.Context, arg1 *types.RequestCommit) (*types.ResponseCommit, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Commit") - ret0, _ := ret[0].(types.ResponseCommit) - return ret0 + ret := m.ctrl.Call(m, "Commit", arg0, arg1) + ret0, _ := ret[0].(*types.ResponseCommit) + ret1, _ := ret[1].(error) + return ret0, ret1 } // Commit indicates an expected call of Commit. -func (mr *MockApplicationServiceMockRecorder) Commit() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockApplicationService)(nil).Commit)) -} - -// DeliverTx mocks base method. -func (m *MockApplicationService) DeliverTx(arg0 types.RequestDeliverTx) types.ResponseDeliverTx { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeliverTx", arg0) - ret0, _ := ret[0].(types.ResponseDeliverTx) - return ret0 -} - -// DeliverTx indicates an expected call of DeliverTx. -func (mr *MockApplicationServiceMockRecorder) DeliverTx(arg0 interface{}) *gomock.Call { +func (mr *MockApplicationServiceMockRecorder) Commit(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeliverTx", reflect.TypeOf((*MockApplicationService)(nil).DeliverTx), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockApplicationService)(nil).Commit), arg0, arg1) } -// EndBlock mocks base method. -func (m *MockApplicationService) EndBlock(arg0 types.RequestEndBlock) types.ResponseEndBlock { +// FinalizeBlock mocks base method. +func (m *MockApplicationService) FinalizeBlock(arg0 context.Context, arg1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EndBlock", arg0) - ret0, _ := ret[0].(types.ResponseEndBlock) - return ret0 + ret := m.ctrl.Call(m, "FinalizeBlock", arg0, arg1) + ret0, _ := ret[0].(*types.ResponseFinalizeBlock) + ret1, _ := ret[1].(error) + return ret0, ret1 } -// EndBlock indicates an expected call of EndBlock. -func (mr *MockApplicationServiceMockRecorder) EndBlock(arg0 interface{}) *gomock.Call { +// FinalizeBlock indicates an expected call of FinalizeBlock. +func (mr *MockApplicationServiceMockRecorder) FinalizeBlock(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndBlock", reflect.TypeOf((*MockApplicationService)(nil).EndBlock), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeBlock", reflect.TypeOf((*MockApplicationService)(nil).FinalizeBlock), arg0, arg1) } // Info mocks base method. -func (m *MockApplicationService) Info(arg0 types.RequestInfo) types.ResponseInfo { +func (m *MockApplicationService) Info(arg0 context.Context, arg1 *types.RequestInfo) (*types.ResponseInfo, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Info", arg0) - ret0, _ := ret[0].(types.ResponseInfo) - return ret0 + ret := m.ctrl.Call(m, "Info", arg0, arg1) + ret0, _ := ret[0].(*types.ResponseInfo) + ret1, _ := ret[1].(error) + return ret0, ret1 } // Info indicates an expected call of Info. -func (mr *MockApplicationServiceMockRecorder) Info(arg0 interface{}) *gomock.Call { +func (mr *MockApplicationServiceMockRecorder) Info(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockApplicationService)(nil).Info), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockApplicationService)(nil).Info), arg0, arg1) } // InitChain mocks base method. -func (m *MockApplicationService) InitChain(arg0 types.RequestInitChain) types.ResponseInitChain { +func (m *MockApplicationService) InitChain(arg0 context.Context, arg1 *types.RequestInitChain) (*types.ResponseInitChain, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InitChain", arg0) - ret0, _ := ret[0].(types.ResponseInitChain) - return ret0 + ret := m.ctrl.Call(m, "InitChain", arg0, arg1) + ret0, _ := ret[0].(*types.ResponseInitChain) + ret1, _ := ret[1].(error) + return ret0, ret1 } // InitChain indicates an expected call of InitChain. -func (mr *MockApplicationServiceMockRecorder) InitChain(arg0 interface{}) *gomock.Call { +func (mr *MockApplicationServiceMockRecorder) InitChain(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitChain", reflect.TypeOf((*MockApplicationService)(nil).InitChain), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitChain", reflect.TypeOf((*MockApplicationService)(nil).InitChain), arg0, arg1) } diff --git a/core/blockchain/nullchain/nullchain.go b/core/blockchain/nullchain/nullchain.go index 5c1f1dd464..9dda90a4d1 100644 --- a/core/blockchain/nullchain/nullchain.go +++ b/core/blockchain/nullchain/nullchain.go @@ -32,13 +32,12 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/logging" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/crypto/tmhash" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/proto/tendermint/crypto" - "github.com/tendermint/tendermint/proto/tendermint/types" - tmctypes "github.com/tendermint/tendermint/rpc/core/types" - tmtypes "github.com/tendermint/tendermint/types" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/crypto/tmhash" + "github.com/cometbft/cometbft/p2p" + "github.com/cometbft/cometbft/proto/tendermint/crypto" + tmctypes "github.com/cometbft/cometbft/rpc/core/types" + tmtypes "github.com/cometbft/cometbft/types" ) const namedLogger = "nullchain" @@ -55,12 +54,10 @@ type TimeService interface { } type ApplicationService interface { - InitChain(res abci.RequestInitChain) (resp abci.ResponseInitChain) - BeginBlock(req abci.RequestBeginBlock) (resp abci.ResponseBeginBlock) - EndBlock(req abci.RequestEndBlock) (resp abci.ResponseEndBlock) - Commit() (resp abci.ResponseCommit) - DeliverTx(req abci.RequestDeliverTx) (resp abci.ResponseDeliverTx) - Info(req abci.RequestInfo) (resp abci.ResponseInfo) + InitChain(context.Context, *abci.RequestInitChain) (*abci.ResponseInitChain, error) + FinalizeBlock(context.Context, *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error) + Commit(context.Context, *abci.RequestCommit) (*abci.ResponseCommit, error) + Info(context.Context, *abci.RequestInfo) (*abci.ResponseInfo, error) } // nullGenesis is a subset of a tendermint genesis file, just the bits we need to run the nullblockchain. @@ -82,7 +79,7 @@ type NullBlockchain struct { now time.Time blockHeight int64 - pending []*abci.RequestDeliverTx + pending [][]byte mu sync.Mutex replaying atomic.Bool @@ -105,7 +102,7 @@ func NewClient( transactionsPerBlock: cfg.TransactionsPerBlock, blockDuration: cfg.BlockDuration.Duration, blockHeight: 1, - pending: make([]*abci.RequestDeliverTx, 0), + pending: make([][]byte, 0), } return n @@ -138,7 +135,7 @@ func (n *NullBlockchain) StartChain() error { return err } - if r := n.app.Info(abci.RequestInfo{}); r.LastBlockHeight > 0 { + if r, _ := n.app.Info(context.Background(), &abci.RequestInfo{}); r.LastBlockHeight > 0 { n.log.Info("protocol loaded from snapshot", logging.Int64("height", r.LastBlockHeight)) n.blockHeight = r.LastBlockHeight + 1 n.now = n.timeService.GetTimeNow().Add(n.blockDuration) @@ -164,7 +161,7 @@ func (n *NullBlockchain) StartChain() error { if n.cfg.Replay.Replay { n.log.Info("nullchain is replaying chain", logging.String("replay-file", n.cfg.Replay.ReplayFile)) n.replaying.Store(true) - blockHeight, blockTime, err := r.replayChain(n.blockHeight, n.genesis.ChainID) + blockHeight, blockTime, err := r.replayChain(n.blockHeight) if err != nil { return err } @@ -190,20 +187,22 @@ func (n *NullBlockchain) processBlock() { n.log.Debugf("processing block %d with %d transactions", n.blockHeight, len(n.pending)) } - resp := abci.ResponseCommit{} + resp := &abci.ResponseFinalizeBlock{} if n.replayer != nil && n.cfg.Replay.Record { n.replayer.startBlock(n.blockHeight, n.now.UnixNano(), n.pending) - defer func() { n.replayer.saveBlock(resp.Data) }() + defer func() { + n.replayer.saveBlock(resp.AppHash) + }() } - n.BeginBlock() - for _, tx := range n.pending { - n.app.DeliverTx(*tx) - } + resp, _ = n.app.FinalizeBlock(context.Background(), &abci.RequestFinalizeBlock{ + Height: n.blockHeight, + Time: n.now, + Hash: vgcrypto.Hash([]byte(strconv.FormatInt(n.blockHeight+n.now.UnixNano(), 10))), + Txs: n.pending, + }) n.pending = n.pending[:0] - - n.EndBlock() - resp = n.app.Commit() + n.app.Commit(context.Background(), &abci.RequestCommit{}) // Increment time, blockheight, ready to start a new block n.blockHeight++ @@ -214,7 +213,7 @@ func (n *NullBlockchain) handleTransaction(tx []byte) { n.mu.Lock() defer n.mu.Unlock() - n.pending = append(n.pending, &abci.RequestDeliverTx{Tx: tx}) + n.pending = append(n.pending, tx) if n.log.GetLevel() <= logging.DebugLevel { n.log.Debugf("transaction added to block: %d of %d", len(n.pending), n.transactionsPerBlock) } @@ -309,8 +308,8 @@ func (n *NullBlockchain) InitChain() error { logging.String("time", n.now.String()), logging.Int("n_validators", len(validators)), ) - n.app.InitChain( - abci.RequestInitChain{ + n.app.InitChain(context.Background(), + &abci.RequestInitChain{ Time: n.now, ChainId: n.genesis.ChainID, InitialHeight: n.blockHeight, @@ -321,38 +320,6 @@ func (n *NullBlockchain) InitChain() error { return nil } -func (n *NullBlockchain) BeginBlock() *NullBlockchain { - if n.log.GetLevel() <= logging.DebugLevel { - n.log.Debug("sending BeginBlock", - logging.Int64("height", n.blockHeight), - logging.String("time", n.now.String()), - ) - } - - r := abci.RequestBeginBlock{ - Header: types.Header{ - Time: n.now, - Height: n.blockHeight, - ChainID: n.genesis.ChainID, - }, - Hash: vgcrypto.Hash([]byte(strconv.FormatInt(n.blockHeight+n.now.UnixNano(), 10))), - } - n.app.BeginBlock(r) - return n -} - -func (n *NullBlockchain) EndBlock() *NullBlockchain { - if n.log.GetLevel() <= logging.DebugLevel { - n.log.Debug("sending EndBlock", logging.Int64("blockHeight", n.blockHeight)) - } - n.app.EndBlock( - abci.RequestEndBlock{ - Height: n.blockHeight, - }, - ) - return n -} - func (n *NullBlockchain) GetGenesisTime(context.Context) (time.Time, error) { return *n.genesis.GenesisTime, nil } @@ -364,7 +331,7 @@ func (n *NullBlockchain) GetChainID(context.Context) (string, error) { func (n *NullBlockchain) GetStatus(context.Context) (*tmctypes.ResultStatus, error) { return &tmctypes.ResultStatus{ NodeInfo: p2p.DefaultNodeInfo{ - Version: "0.34.20", + Version: "0.38.0", }, SyncInfo: tmctypes.SyncInfo{ CatchingUp: n.replaying.Load(), diff --git a/core/blockchain/nullchain/nullchain_test.go b/core/blockchain/nullchain/nullchain_test.go index 799e2a962c..9588b309b8 100644 --- a/core/blockchain/nullchain/nullchain_test.go +++ b/core/blockchain/nullchain/nullchain_test.go @@ -24,18 +24,17 @@ import ( "time" "code.vegaprotocol.io/vega/core/blockchain" - vgfs "code.vegaprotocol.io/vega/libs/fs" - vgrand "code.vegaprotocol.io/vega/libs/rand" - "code.vegaprotocol.io/vega/core/blockchain/nullchain" "code.vegaprotocol.io/vega/core/blockchain/nullchain/mocks" "code.vegaprotocol.io/vega/libs/config/encoding" + vgfs "code.vegaprotocol.io/vega/libs/fs" + vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/logging" + + abci "github.com/cometbft/cometbft/abci/types" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/proto/tendermint/types" ) const ( @@ -78,18 +77,13 @@ func testTransactionsCreateBlock(t *testing.T) { // Expected BeginBlock to be called with time shuffled forward by a block now, _ := testChain.chain.GetGenesisTime(ctx) - r := abci.RequestBeginBlock{Header: types.Header{Time: now, ChainID: chainID, Height: 1}} // One round of block processing calls - testChain.app.EXPECT().BeginBlock(gomock.Any()).Do(func(rr abci.RequestBeginBlock) { - require.Equal(t, rr.Header, r.Header) + testChain.app.EXPECT().FinalizeBlock(gomock.Any(), gomock.Any()).Do(func(_ context.Context, rr *abci.RequestFinalizeBlock) { + require.Equal(t, now, rr.Time) + require.Equal(t, int64(1), rr.Height) }).Times(1) - testChain.app.EXPECT().EndBlock(gomock.Any()).Times(1) - testChain.app.EXPECT().Commit().Times(1) - - // Expect only two of the three transactions to be delivered - testChain.app.EXPECT().DeliverTx(gomock.Any()).Times(2) - + testChain.app.EXPECT().Commit(gomock.Any(), gomock.Any()).Times(1) // Send in three transactions, two gets delivered in the block, one left over testChain.chain.SendTransactionSync(ctx, []byte(vgrand.RandomStr(5))) testChain.chain.SendTransactionSync(ctx, []byte(vgrand.RandomStr(5))) @@ -117,14 +111,12 @@ func testTimeForwardingCreatesBlocks(t *testing.T) { testChain.chain.SendTransactionSync(ctx, []byte(vgrand.RandomStr(5))) // One round of block processing calls - testChain.app.EXPECT().BeginBlock(gomock.Any()).Times(10).Do(func(r abci.RequestBeginBlock) { - beginBlockTime = r.Header.Time - }) - testChain.app.EXPECT().EndBlock(gomock.Any()).Times(10).Do(func(r abci.RequestEndBlock) { + + testChain.app.EXPECT().FinalizeBlock(gomock.Any(), gomock.Any()).Times(10).Do(func(_ context.Context, r *abci.RequestFinalizeBlock) { + beginBlockTime = r.Time height = int(r.Height) }) - testChain.app.EXPECT().Commit().Times(10) - testChain.app.EXPECT().DeliverTx(gomock.Any()).Times(3) + testChain.app.EXPECT().Commit(gomock.Any(), gomock.Any()).Times(10) testChain.chain.ForwardTime(step) assert.True(t, beginBlockTime.Equal(now.Add(18*time.Second))) // the start of the next block will take us to +20 seconds @@ -194,17 +186,15 @@ func testReplayWithSnapshotRestore(t *testing.T) { // pretend the protocol restores to block height 10 restoredBlockTime := time.Unix(10000, 15) restoreBlockHeight := int64(10) - testChain.app.EXPECT().Info(gomock.Any()).Times(1).Return( - abci.ResponseInfo{ + testChain.app.EXPECT().Info(gomock.Any(), gomock.Any()).Times(1).Return( + &abci.ResponseInfo{ LastBlockHeight: restoreBlockHeight, - }, + }, nil, ) // we'll replay 5 blocks - testChain.app.EXPECT().BeginBlock(gomock.Any()).Times(5) - testChain.app.EXPECT().DeliverTx(gomock.Any()).Times(10) - testChain.app.EXPECT().EndBlock(gomock.Any()).Times(5) - testChain.app.EXPECT().Commit().Times(5) + testChain.app.EXPECT().FinalizeBlock(gomock.Any(), gomock.Any()).Times(5) + testChain.app.EXPECT().Commit(gomock.Any(), gomock.Any()).Times(5) testChain.ts.EXPECT().GetTimeNow().Times(1).Return(restoredBlockTime) // start the nullchain from a snapshot @@ -212,15 +202,13 @@ func testReplayWithSnapshotRestore(t *testing.T) { require.NoError(t, err) // continue the chain and check we're at the right block height and stuff - testChain.app.EXPECT().DeliverTx(gomock.Any()).Times(2) - testChain.app.EXPECT().EndBlock(gomock.Any()).Times(1) - testChain.app.EXPECT().Commit().Times(1) - // the next begin block should be at block height 16 (restored to 10, replayed 5, starting the next) - req := abci.RequestBeginBlock{} - testChain.app.EXPECT().BeginBlock(gomock.Any()).Times(1).Do(func(r abci.RequestBeginBlock) { + req := &abci.RequestFinalizeBlock{} + testChain.app.EXPECT().FinalizeBlock(gomock.Any(), gomock.Any()).DoAndReturn(func(_ context.Context, r *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error) { req = r - }) + return &abci.ResponseFinalizeBlock{}, nil + }).AnyTimes() + testChain.app.EXPECT().Commit(gomock.Any(), gomock.Any()).Times(1) // fill the block testChain.chain.SendTransactionSync(ctx, []byte(vgrand.RandomStr(5))) @@ -228,9 +216,8 @@ func testReplayWithSnapshotRestore(t *testing.T) { genesis, err := testChain.chain.GetGenesisTime(ctx) require.NoError(t, err) - require.Equal(t, int64(16), req.Header.Height) - require.Equal(t, genesis.Add(15*time.Second).UnixNano(), req.Header.Time.UnixNano()) - require.Equal(t, chainID, req.Header.ChainID) + require.Equal(t, int64(16), req.Height) + require.Equal(t, genesis.Add(15*time.Second).UnixNano(), req.Time.UnixNano()) } func testReplayFromGenesis(t *testing.T) { @@ -246,18 +233,16 @@ func testReplayFromGenesis(t *testing.T) { defer newChain.ctrl.Finish() // protocol is starting from 0 - newChain.app.EXPECT().Info(gomock.Any()).Times(1).Return( - abci.ResponseInfo{ + newChain.app.EXPECT().Info(gomock.Any(), gomock.Any()).Times(1).Return( + &abci.ResponseInfo{ LastBlockHeight: 0, - }, + }, nil, ) // we'll replay 15 blocks - newChain.app.EXPECT().InitChain(gomock.Any()).Times(1) - newChain.app.EXPECT().BeginBlock(gomock.Any()).Times(15) - newChain.app.EXPECT().DeliverTx(gomock.Any()).Times(30) - newChain.app.EXPECT().EndBlock(gomock.Any()).Times(15) - newChain.app.EXPECT().Commit().Times(15) + newChain.app.EXPECT().InitChain(gomock.Any(), gomock.Any()).Times(1) + newChain.app.EXPECT().FinalizeBlock(gomock.Any(), gomock.Any()).Times(15).Return(&abci.ResponseFinalizeBlock{}, nil) + newChain.app.EXPECT().Commit(gomock.Any(), gomock.Any()).Times(15) // start the nullchain from genesis err := newChain.chain.StartChain() @@ -274,14 +259,11 @@ func testReplayPanicBlock(t *testing.T) { generateChain(t, testChain, 5) // send in a single transaction that works - testChain.app.EXPECT().BeginBlock(gomock.Any()).Times(1) - testChain.app.EXPECT().DeliverTx(gomock.Any()).Times(1) - testChain.chain.SendTransactionSync(ctx, []byte(vgrand.RandomStr(5))) - // the next transaction will panic - testChain.app.EXPECT().DeliverTx(gomock.Any()).Do(func(rr abci.RequestDeliverTx) { + testChain.app.EXPECT().FinalizeBlock(gomock.Any(), gomock.Any()).Do(func(_ context.Context, rr *abci.RequestFinalizeBlock) { panic("ah panic processing transaction") }).Times(1) + testChain.chain.SendTransactionSync(ctx, []byte(vgrand.RandomStr(5))) require.Panics(t, func() { testChain.chain.SendTransactionSync(ctx, []byte(vgrand.RandomStr(5))) @@ -295,18 +277,16 @@ func testReplayPanicBlock(t *testing.T) { defer newChain.ctrl.Finish() // protocol is starting from 0 - newChain.app.EXPECT().Info(gomock.Any()).Times(1).Return( - abci.ResponseInfo{ + newChain.app.EXPECT().Info(gomock.Any(), gomock.Any()).Times(1).Return( + &abci.ResponseInfo{ LastBlockHeight: 0, - }, + }, nil, ) // we'll replay 5 full blocks, and process the 6th "panic" block ready to start the 7th - newChain.app.EXPECT().InitChain(gomock.Any()).Times(1) - newChain.app.EXPECT().BeginBlock(gomock.Any()).Times(6) - newChain.app.EXPECT().DeliverTx(gomock.Any()).Times(12) - newChain.app.EXPECT().EndBlock(gomock.Any()).Times(6) - newChain.app.EXPECT().Commit().Times(6) + newChain.app.EXPECT().InitChain(gomock.Any(), gomock.Any()).Times(1) + newChain.app.EXPECT().FinalizeBlock(gomock.Any(), gomock.Any()).Times(6) + newChain.app.EXPECT().Commit(gomock.Any(), gomock.Any()).Times(6) // start the nullchain from genesis err := newChain.chain.StartChain() @@ -355,8 +335,8 @@ func getTestNullChain(t *testing.T, txnPerBlock uint64, d time.Duration) *testNu t.Helper() nc := getTestUnstartedNullChain(t, txnPerBlock, d, nil) - nc.app.EXPECT().Info(gomock.Any()).Times(1) - nc.app.EXPECT().InitChain(gomock.Any()).Times(1) + nc.app.EXPECT().Info(gomock.Any(), gomock.Any()).Times(1).Return(&abci.ResponseInfo{}, nil) + nc.app.EXPECT().InitChain(gomock.Any(), gomock.Any()).Times(1) err := nc.chain.StartChain() require.NoError(t, err) @@ -382,15 +362,13 @@ func generateChain(t *testing.T, nc *testNullBlockChain, height int) { nTxns := int(nc.cfg.TransactionsPerBlock) * height ctx := context.Background() - nc.app.EXPECT().InitChain(gomock.Any()).Times(1) - nc.app.EXPECT().BeginBlock(gomock.Any()).Times(height) - nc.app.EXPECT().DeliverTx(gomock.Any()).Times(nTxns) - nc.app.EXPECT().EndBlock(gomock.Any()).Times(height) - nc.app.EXPECT().Commit().Times(height) - nc.app.EXPECT().Info(gomock.Any()).Times(1).Return( - abci.ResponseInfo{ + nc.app.EXPECT().InitChain(gomock.Any(), gomock.Any()).Times(1) + nc.app.EXPECT().FinalizeBlock(gomock.Any(), gomock.Any()).Times(height).Return(&abci.ResponseFinalizeBlock{}, nil) + nc.app.EXPECT().Commit(gomock.Any(), gomock.Any()).Times(height) + nc.app.EXPECT().Info(gomock.Any(), gomock.Any()).Times(1).Return( + &abci.ResponseInfo{ LastBlockHeight: 0, - }, + }, nil, ) // start the nullchain diff --git a/core/blockchain/nullchain/replay.go b/core/blockchain/nullchain/replay.go index 907c108fe2..a0396cf46b 100644 --- a/core/blockchain/nullchain/replay.go +++ b/core/blockchain/nullchain/replay.go @@ -18,6 +18,7 @@ package nullchain import ( "bufio" "bytes" + "context" "encoding/hex" "encoding/json" "errors" @@ -30,8 +31,8 @@ import ( "code.vegaprotocol.io/vega/core/blockchain" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/logging" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/proto/tendermint/types" + + abci "github.com/cometbft/cometbft/abci/types" ) var ErrReplayFileIsRequired = errors.New("replay-file is required when replay/record is enabled") @@ -74,8 +75,8 @@ func NewNullChainReplayer(app ApplicationService, cfg blockchain.ReplayConfig, l }, nil } -func (r *Replayer) InitChain(req abci.RequestInitChain) (resp abci.ResponseInitChain) { - return r.app.InitChain(req) +func (r *Replayer) InitChain(req abci.RequestInitChain) (*abci.ResponseInitChain, error) { + return r.app.InitChain(context.Background(), &req) } func (r *Replayer) Stop() error { @@ -86,14 +87,12 @@ func (r *Replayer) Stop() error { // startBlock saves in memory all the transactions in the block, we do not write until saveBlock us called // with a potential appHash. -func (r *Replayer) startBlock(height, now int64, txs []*abci.RequestDeliverTx) { +func (r *Replayer) startBlock(height, now int64, txs [][]byte) { r.current = &blockData{ Height: height, Time: now, } - for _, tx := range txs { - r.current.Txs = append(r.current.Txs, tx.Tx) - } + r.current.Txs = append(r.current.Txs, txs...) } // saveBlock writes to the replay file the details of the current block adding the appHash to it. @@ -123,7 +122,7 @@ func readLine(r *bufio.Reader) ([]byte, error) { // replayChain sends all the recorded per-block transactions into the protocol returning the block-height and block-time it reached // appHeight is the block-height the application will process next, any blocks less than this will not be replayed. -func (r *Replayer) replayChain(appHeight int64, chainID string) (int64, time.Time, error) { +func (r *Replayer) replayChain(appHeight int64) (int64, time.Time, error) { var replayedHeight int64 var replayedTime time.Time @@ -158,28 +157,14 @@ func (r *Replayer) replayChain(appHeight int64, chainID string) (int64, time.Tim } r.log.Info("replaying block", logging.Int64("height", data.Height), logging.Int("ntxns", len(data.Txs))) - r.app.BeginBlock( - abci.RequestBeginBlock{ - Header: types.Header{ - Time: time.Unix(0, data.Time), - Height: data.Height, - ChainID: chainID, - }, - Hash: vgcrypto.Hash([]byte(strconv.FormatInt(data.Height+data.Time, 10))), - }, - ) - - // deliever all the txns in that block - for _, tx := range data.Txs { - r.app.DeliverTx(abci.RequestDeliverTx{Tx: tx}) - } + resp, _ := r.app.FinalizeBlock(context.Background(), &abci.RequestFinalizeBlock{ + Height: data.Height, + Time: time.Unix(0, data.Time), + Hash: vgcrypto.Hash([]byte(strconv.FormatInt(data.Height+data.Time, 10))), + Txs: data.Txs, + }) - r.app.EndBlock( - abci.RequestEndBlock{ - Height: data.Height, - }, - ) - resp := r.app.Commit() + r.app.Commit(context.Background(), &abci.RequestCommit{}) if len(data.AppHash) == 0 { // we've replayed a block which when recorded must have panicked so we do not have a apphash @@ -188,8 +173,8 @@ func (r *Replayer) replayChain(appHeight int64, chainID string) (int64, time.Tim continue } - if !bytes.Equal(data.AppHash, resp.Data) { - return replayedHeight, replayedTime, fmt.Errorf("appHash mismatch on replay, expected %s got %s", hex.EncodeToString(data.AppHash), hex.EncodeToString(resp.Data)) + if !bytes.Equal(data.AppHash, resp.AppHash) { + return replayedHeight, replayedTime, fmt.Errorf("appHash mismatch on replay, expected %s got %s", hex.EncodeToString(data.AppHash), hex.EncodeToString(resp.AppHash)) } } diff --git a/core/blockchain/nullchain/replay_test.go b/core/blockchain/nullchain/replay_test.go index 5a04975218..0997316cf9 100644 --- a/core/blockchain/nullchain/replay_test.go +++ b/core/blockchain/nullchain/replay_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/core/blockchain/nullchain/mocks" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/logging" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/core/blockchain/nullchain/staking_loop.go b/core/blockchain/nullchain/staking_loop.go index c0b52bdebe..b5cfbef097 100644 --- a/core/blockchain/nullchain/staking_loop.go +++ b/core/blockchain/nullchain/staking_loop.go @@ -16,6 +16,7 @@ package nullchain import ( + "context" "time" "code.vegaprotocol.io/vega/core/assets" @@ -44,12 +45,16 @@ type StakingLoop struct { // from the collateral engine. Used by the null-blockchain to remove the need for an Ethereum connection. func NewStakingLoop(col Collateral, assets Assets) *StakingLoop { return &StakingLoop{ - col: col, - assets: assets, - stakingAsset: "VOTE", + col: col, + assets: assets, } } +func (s *StakingLoop) OnStakingAsstUpdate(_ context.Context, value string) error { + s.stakingAsset = value + return nil +} + func (s *StakingLoop) GetAvailableBalance(party string) (*num.Uint, error) { acc, err := s.col.GetPartyGeneralAccount(party, s.stakingAsset) if err != nil { diff --git a/core/blockchain/response.go b/core/blockchain/response.go index 4d57d1164d..44caa7b2ec 100644 --- a/core/blockchain/response.go +++ b/core/blockchain/response.go @@ -15,7 +15,7 @@ package blockchain -import "github.com/tendermint/tendermint/abci/types" +import "github.com/cometbft/cometbft/abci/types" const ( // AbciTxnValidationFailure ... @@ -37,30 +37,30 @@ const ( AbciSpamError uint32 = 89 ) -func NewResponseCheckTx(code uint32, info string) types.ResponseCheckTx { - return types.ResponseCheckTx{ +func NewResponseCheckTx(code uint32, info string) *types.ResponseCheckTx { + return &types.ResponseCheckTx{ Code: code, Info: info, } } -func NewResponseCheckTxError(code uint32, err error) types.ResponseCheckTx { - return types.ResponseCheckTx{ +func NewResponseCheckTxError(code uint32, err error) *types.ResponseCheckTx { + return &types.ResponseCheckTx{ Code: code, Info: err.Error(), Data: []byte(err.Error()), } } -func NewResponseDeliverTx(code uint32, info string) types.ResponseDeliverTx { - return types.ResponseDeliverTx{ +func NewResponseDeliverTx(code uint32, info string) *types.ExecTxResult { + return &types.ExecTxResult{ Code: code, Info: info, } } -func NewResponseDeliverTxError(code uint32, err error) types.ResponseDeliverTx { - return types.ResponseDeliverTx{ +func NewResponseDeliverTxError(code uint32, err error) *types.ExecTxResult { + return &types.ExecTxResult{ Code: code, Info: err.Error(), Data: []byte(err.Error()), diff --git a/core/bridges/erc20_common.go b/core/bridges/erc20_common.go index 99a648694e..a450fc684b 100644 --- a/core/bridges/erc20_common.go +++ b/core/bridges/erc20_common.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/core/nodewallets/eth/clef" + "github.com/ethereum/go-ethereum/accounts/abi" ethcmn "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" diff --git a/core/broker/broker.go b/core/broker/broker.go index 140e66fdb1..2de91c76bd 100644 --- a/core/broker/broker.go +++ b/core/broker/broker.go @@ -21,9 +21,8 @@ import ( "sync" "time" - "code.vegaprotocol.io/vega/libs/broker" - "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/libs/broker" "code.vegaprotocol.io/vega/logging" ) diff --git a/core/broker/broker_test.go b/core/broker/broker_test.go index c7b20d1e43..e4f7f4e46f 100644 --- a/core/broker/broker_test.go +++ b/core/broker/broker_test.go @@ -34,12 +34,12 @@ import ( vgcontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/logging" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - "github.com/stretchr/testify/require" - "go.nanomsg.org/mangos/v3/protocol/pair" "github.com/golang/mock/gomock" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.nanomsg.org/mangos/v3/protocol/pair" ) type brokerTst struct { diff --git a/core/broker/convert.go b/core/broker/convert.go index ae1180735a..9b5dba2cbe 100644 --- a/core/broker/convert.go +++ b/core/broker/convert.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package broker import ( diff --git a/core/broker/file_client.go b/core/broker/file_client.go index 9b191ea120..bfa0140e16 100644 --- a/core/broker/file_client.go +++ b/core/broker/file_client.go @@ -22,10 +22,10 @@ import ( "path/filepath" "sync" - "google.golang.org/protobuf/proto" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/logging" + + "google.golang.org/protobuf/proto" ) type FileClient struct { diff --git a/core/broker/mocks/broker_drop_in_mock.go b/core/broker/mocks/broker_drop_in_mock.go index 84c2df222e..287271b88d 100644 --- a/core/broker/mocks/broker_drop_in_mock.go +++ b/core/broker/mocks/broker_drop_in_mock.go @@ -19,6 +19,7 @@ import ( "sync" "code.vegaprotocol.io/vega/core/events" + "github.com/golang/mock/gomock" ) diff --git a/core/broker/socket_client.go b/core/broker/socket_client.go index 7797950f44..c2bacd25e0 100644 --- a/core/broker/socket_client.go +++ b/core/broker/socket_client.go @@ -23,20 +23,19 @@ import ( "sync" "time" + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/libs/proto" + "code.vegaprotocol.io/vega/logging" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" "go.nanomsg.org/mangos/v3" mangosErr "go.nanomsg.org/mangos/v3/errors" "go.nanomsg.org/mangos/v3/protocol" "go.nanomsg.org/mangos/v3/protocol/pair" - _ "go.nanomsg.org/mangos/v3/transport/inproc" // Does some nanomsg magic presumably - _ "go.nanomsg.org/mangos/v3/transport/tcp" // Does some nanomsg magic presumably "golang.org/x/sync/errgroup" - "code.vegaprotocol.io/vega/libs/proto" - - "code.vegaprotocol.io/vega/core/events" - "code.vegaprotocol.io/vega/logging" + _ "go.nanomsg.org/mangos/v3/transport/inproc" // Does some nanomsg magic presumably + _ "go.nanomsg.org/mangos/v3/transport/tcp" // Does some nanomsg magic presumably ) // SocketClient stream events sent to this broker over a socket to a remote broker. @@ -263,7 +262,7 @@ func (s *socketClient) Receive(ctx context.Context) (<-chan events.Event, <-chan evt := toEvent(ctx, &be) if evt == nil { - s.log.Error("Can not convert proto event to internal event", logging.String("event_type", be.GetType().String())) + s.log.Error("Cannot convert proto event to internal event", logging.String("event_type", be.GetType().String())) continue } diff --git a/core/checkpoint/engine.go b/core/checkpoint/engine.go index 8fd5790108..32298de102 100644 --- a/core/checkpoint/engine.go +++ b/core/checkpoint/engine.go @@ -22,11 +22,13 @@ import ( "encoding/hex" "errors" "fmt" + "os" "time" "code.vegaprotocol.io/vega/core/types" vegactx "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/logging" + "code.vegaprotocol.io/vega/paths" ) var ( @@ -254,7 +256,7 @@ func (e *Engine) makeCheckpoint(ctx context.Context) *types.CheckpointState { } // add block height to checkpoint h, _ := vegactx.BlockHeightFromContext(ctx) - if err := cp.SetBlockHeight(h); err != nil { + if err := cp.SetBlockHeight(int64(h)); err != nil { e.log.Panic("could not set block height", logging.Error(err)) } cpState := &types.CheckpointState{} @@ -263,7 +265,7 @@ func (e *Engine) makeCheckpoint(ctx context.Context) *types.CheckpointState { panic(fmt.Errorf("checkpoint could not be created: %w", err)) } - e.log.Debug("checkpoint taken", logging.Int64("block-height", h)) + e.log.Debug("checkpoint taken", logging.Uint64("block-height", h)) return cpState } @@ -377,3 +379,13 @@ func (e *Engine) onCheckpointLoaded(ctx context.Context) { e.onCheckpointLoadedCB(ctx) } } + +func RemoveAll(vegaPaths paths.Paths) error { + dbDirectory := vegaPaths.StatePathFor(paths.CheckpointStateHome) + + if err := os.RemoveAll(dbDirectory); err != nil { + return fmt.Errorf("an error occurred while removing directory %q: %w", dbDirectory, err) + } + + return nil +} diff --git a/core/checkpoint/snapshot.go b/core/checkpoint/snapshot.go index 2e8aaf2b7a..8c23f36ba9 100644 --- a/core/checkpoint/snapshot.go +++ b/core/checkpoint/snapshot.go @@ -20,9 +20,8 @@ import ( "time" "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/logging" - "code.vegaprotocol.io/vega/libs/proto" + "code.vegaprotocol.io/vega/logging" ) func (e *Engine) Namespace() types.SnapshotNamespace { diff --git a/core/checkpoint/snapshot_test.go b/core/checkpoint/snapshot_test.go index 27fe4d7397..c6aeac6010 100644 --- a/core/checkpoint/snapshot_test.go +++ b/core/checkpoint/snapshot_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/proto" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/stretchr/testify/require" ) diff --git a/core/client/eth/client.go b/core/client/eth/client.go index 8bf71c0540..1872fa9748 100644 --- a/core/client/eth/client.go +++ b/core/client/eth/client.go @@ -20,15 +20,13 @@ import ( "encoding/hex" "errors" "fmt" - "math/big" "strings" "sync" "time" "code.vegaprotocol.io/vega/core/types" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" - "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi/bind" + ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" ) @@ -46,16 +44,6 @@ var ContractHashes = map[string]string{ "multisig": "5b7070e6159628455b38f5796e8d0dc08185aaaa1fb6073767c88552d396c6c2", } -// ETHClient ... -// -//go:generate go run github.com/golang/mock/mockgen -destination mocks/eth_client_mock.go -package mocks code.vegaprotocol.io/vega/core/client/eth ETHClient -type ETHClient interface { //revive:disable:exported - bind.ContractBackend - ethereum.ChainReader - ChainID(context.Context) (*big.Int, error) - NetworkID(context.Context) (*big.Int, error) -} - type Client struct { ETHClient ethConfig *types.EthereumConfig @@ -79,7 +67,7 @@ func Dial(ctx context.Context, cfg Config) (*Client, error) { return nil, fmt.Errorf("couldn't instantiate Ethereum client: %w", err) } - return &Client{ETHClient: ethClient, cfg: cfg}, nil + return &Client{ETHClient: newEthClientWrapper(ethClient), cfg: cfg}, nil } func (c *Client) UpdateEthereumConfig(ethConfig *types.EthereumConfig) error { diff --git a/core/client/eth/client_test.go b/core/client/eth/client_test.go index 5fede2146f..729e86d241 100644 --- a/core/client/eth/client_test.go +++ b/core/client/eth/client_test.go @@ -21,14 +21,14 @@ import ( "math/big" "testing" + "code.vegaprotocol.io/vega/core/client/eth" + "code.vegaprotocol.io/vega/core/client/eth/mocks" + vgcrypto "code.vegaprotocol.io/vega/libs/crypto" + ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - - "code.vegaprotocol.io/vega/core/client/eth" - "code.vegaprotocol.io/vega/core/client/eth/mocks" - vgcrypto "code.vegaprotocol.io/vega/libs/crypto" ) func TestNullChain(t *testing.T) { diff --git a/core/client/eth/client_wrapper.go b/core/client/eth/client_wrapper.go new file mode 100644 index 0000000000..1aa50ce3dd --- /dev/null +++ b/core/client/eth/client_wrapper.go @@ -0,0 +1,190 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package eth + +import ( + "context" + "math/big" + "time" + + "code.vegaprotocol.io/vega/core/metrics" + + "github.com/ethereum/go-ethereum" + ethcommon "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/hashicorp/golang-lru/v2/expirable" +) + +// ETHClient ... +// +//go:generate go run github.com/golang/mock/mockgen -destination mocks/eth_client_mock.go -package mocks code.vegaprotocol.io/vega/core/client/eth ETHClient +type ETHClient interface { //revive:disable:exported + // bind.ContractBackend + // ethereum.ChainReader + + // client + ChainID(context.Context) (*big.Int, error) + NetworkID(context.Context) (*big.Int, error) + + // ethereum.ChainReader + BlockByHash(ctx context.Context, hash ethcommon.Hash) (*ethtypes.Block, error) + HeaderByNumber(ctx context.Context, number *big.Int) (*ethtypes.Header, error) + BlockByNumber(ctx context.Context, number *big.Int) (*ethtypes.Block, error) + HeaderByHash(ctx context.Context, hash ethcommon.Hash) (*ethtypes.Header, error) + SubscribeNewHead(ctx context.Context, ch chan<- *ethtypes.Header) (ethereum.Subscription, error) + TransactionCount(ctx context.Context, blockHash ethcommon.Hash) (uint, error) + TransactionInBlock(ctx context.Context, blockHash ethcommon.Hash, index uint) (*ethtypes.Transaction, error) + + // bind.ContractCaller + CodeAt(ctx context.Context, contract ethcommon.Address, blockNumber *big.Int) ([]byte, error) + CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) + + // bind.ContractTransactor + EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error) + PendingCodeAt(ctx context.Context, account ethcommon.Address) ([]byte, error) + PendingNonceAt(ctx context.Context, account ethcommon.Address) (uint64, error) + SendTransaction(ctx context.Context, tx *ethtypes.Transaction) error + SuggestGasPrice(ctx context.Context) (*big.Int, error) + SuggestGasTipCap(ctx context.Context) (*big.Int, error) + + // bind.ContractFilterer + FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]ethtypes.Log, error) + SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- ethtypes.Log) (ethereum.Subscription, error) +} + +type ethClientWrapper struct { + clt ETHClient + + headerByNumberCache *expirable.LRU[string, *ethtypes.Header] +} + +func newEthClientWrapper(clt ETHClient) *ethClientWrapper { + return ðClientWrapper{ + clt: clt, + // arbitrary size of 100 blocks, kept for at most 10 minutes, + // let see later how to make this less hardcoded + headerByNumberCache: expirable.NewLRU[string, *ethtypes.Header](100, nil, 10*time.Minute), + } +} + +func (c *ethClientWrapper) ChainID(ctx context.Context) (*big.Int, error) { + metrics.EthereumRPCCallCounterInc("chain_id") + return c.clt.ChainID(ctx) +} + +func (c *ethClientWrapper) NetworkID(ctx context.Context) (*big.Int, error) { + metrics.EthereumRPCCallCounterInc("network_id") + return c.clt.NetworkID(ctx) +} + +func (c *ethClientWrapper) BlockByHash(ctx context.Context, hash ethcommon.Hash) (*ethtypes.Block, error) { + metrics.EthereumRPCCallCounterInc("block_by_hash") + return c.clt.BlockByHash(ctx, hash) +} + +func (c *ethClientWrapper) HeaderByNumber(ctx context.Context, number *big.Int) (*ethtypes.Header, error) { + if number != nil { + // first check the cache + if header, ok := c.headerByNumberCache.Get(number.String()); ok { + return ethtypes.CopyHeader(header), nil + } + } + + // cache miss, so let's inc the counter, and call the rpc. + metrics.EthereumRPCCallCounterInc("header_by_number") + header, err := c.clt.HeaderByNumber(ctx, number) + if err != nil { + return nil, err + } + + c.headerByNumberCache.Add(header.Number.String(), ethtypes.CopyHeader(header)) + + return header, nil +} + +func (c *ethClientWrapper) BlockByNumber(ctx context.Context, number *big.Int) (*ethtypes.Block, error) { + metrics.EthereumRPCCallCounterInc("block_by_number") + return c.clt.BlockByNumber(ctx, number) +} + +func (c *ethClientWrapper) HeaderByHash(ctx context.Context, hash ethcommon.Hash) (*ethtypes.Header, error) { + metrics.EthereumRPCCallCounterInc("header_by_hash") + return c.clt.HeaderByHash(ctx, hash) +} + +func (c *ethClientWrapper) SubscribeNewHead(ctx context.Context, ch chan<- *ethtypes.Header) (ethereum.Subscription, error) { + return c.clt.SubscribeNewHead(ctx, ch) +} + +func (c *ethClientWrapper) TransactionCount(ctx context.Context, blockHash ethcommon.Hash) (uint, error) { + metrics.EthereumRPCCallCounterInc("transaction_count") + return c.clt.TransactionCount(ctx, blockHash) +} + +func (c *ethClientWrapper) TransactionInBlock(ctx context.Context, blockHash ethcommon.Hash, index uint) (*ethtypes.Transaction, error) { + metrics.EthereumRPCCallCounterInc("transaction_in_block") + return c.clt.TransactionInBlock(ctx, blockHash, index) +} + +func (c *ethClientWrapper) CodeAt(ctx context.Context, contract ethcommon.Address, blockNumber *big.Int) ([]byte, error) { + metrics.EthereumRPCCallCounterInc("code_at") + return c.clt.CodeAt(ctx, contract, blockNumber) +} + +func (c *ethClientWrapper) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { + metrics.EthereumRPCCallCounterInc("call_contract") + return c.clt.CallContract(ctx, call, blockNumber) +} + +func (c *ethClientWrapper) EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error) { + metrics.EthereumRPCCallCounterInc("estimate_gas") + return c.clt.EstimateGas(ctx, call) +} + +func (c *ethClientWrapper) PendingCodeAt(ctx context.Context, account ethcommon.Address) ([]byte, error) { + metrics.EthereumRPCCallCounterInc("pending_code_at") + return c.clt.PendingCodeAt(ctx, account) +} + +func (c *ethClientWrapper) PendingNonceAt(ctx context.Context, account ethcommon.Address) (uint64, error) { + metrics.EthereumRPCCallCounterInc("pending_nonce_at") + return c.clt.PendingNonceAt(ctx, account) +} + +func (c *ethClientWrapper) SendTransaction(ctx context.Context, tx *ethtypes.Transaction) error { + metrics.EthereumRPCCallCounterInc("send_transaction") + return c.clt.SendTransaction(ctx, tx) +} + +func (c *ethClientWrapper) SuggestGasPrice(ctx context.Context) (*big.Int, error) { + metrics.EthereumRPCCallCounterInc("suggest_gas_price") + return c.clt.SuggestGasPrice(ctx) +} + +func (c *ethClientWrapper) SuggestGasTipCap(ctx context.Context) (*big.Int, error) { + metrics.EthereumRPCCallCounterInc("suggest_gas_tip_cap") + return c.clt.SuggestGasTipCap(ctx) +} + +func (c *ethClientWrapper) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]ethtypes.Log, error) { + metrics.EthereumRPCCallCounterInc("filter_logs") + return c.clt.FilterLogs(ctx, query) +} + +func (c *ethClientWrapper) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- ethtypes.Log) (ethereum.Subscription, error) { + metrics.EthereumRPCCallCounterInc("subscribe_filter_logs") + return c.clt.SubscribeFilterLogs(ctx, query, ch) +} diff --git a/core/client/eth/config.go b/core/client/eth/config.go index 6a56e965c5..471ef424a1 100644 --- a/core/client/eth/config.go +++ b/core/client/eth/config.go @@ -22,10 +22,18 @@ import ( "code.vegaprotocol.io/vega/logging" ) +const namedLogger = "ethClient" + type Config struct { - Level encoding.LogLevel `long:"log-level"` + Level encoding.LogLevel `long:"log-level"` + RPCEndpoint string + RetryDelay encoding.Duration + EVMChainConfigs []EVMChainConfig +} + +type EVMChainConfig struct { + ChainID string RPCEndpoint string - RetryDelay encoding.Duration } // NewDefaultConfig creates an instance of the package specific configuration, diff --git a/core/client/eth/l2_clients.go b/core/client/eth/l2_clients.go new file mode 100644 index 0000000000..3b368676ae --- /dev/null +++ b/core/client/eth/l2_clients.go @@ -0,0 +1,175 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package eth + +import ( + "context" + "errors" + "fmt" + + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/logging" + + "github.com/ethereum/go-ethereum/ethclient" +) + +type L2Client struct { + ETHClient +} + +type L2Clients struct { + ctx context.Context + log *logging.Logger + // map of chainID -> Client + clients map[string]*L2Client + confirmations map[string]*EthereumConfirmations +} + +func NewL2Clients( + ctx context.Context, + log *logging.Logger, + cfg Config, +) (*L2Clients, error) { + // setup logger + log = log.Named(namedLogger) + log.SetLevel(cfg.Level.Get()) + + clients := map[string]*L2Client{} + confirmations := map[string]*EthereumConfirmations{} + + for _, v := range cfg.EVMChainConfigs { + log.Info("starting L2 client", + logging.String("chain-id", v.ChainID), + logging.String("endpoint", v.RPCEndpoint), + ) + if len(v.ChainID) <= 0 || len(v.RPCEndpoint) <= 0 { + return nil, errors.New("l2 rpc endpoint configured with empty strings") + } + clt, err := DialL2(ctx, v.RPCEndpoint) + if err != nil { + return nil, err + } + + chainID, err := clt.ChainID(ctx) + if err != nil { + return nil, fmt.Errorf("couldn't get chain id: %w", err) + } + + if chainID.String() != v.ChainID { + return nil, fmt.Errorf("client retrieve different chain id: %v vs %v", chainID.String(), v.ChainID) + } + + clients[v.ChainID] = clt + confirmations[v.ChainID] = NewEthereumConfirmations( + cfg, clt, nil) + } + + return &L2Clients{ + ctx: ctx, + log: log, + clients: clients, + confirmations: confirmations, + }, nil +} + +func (e *L2Clients) UpdateConfirmations(ethCfg *types.EthereumL2Configs) { + for _, v := range ethCfg.Configs { + confs, ok := e.confirmations[v.ChainID] + if !ok { + e.log.Panic("ethereum client for L2 is not configured", logging.String("name", v.Name), logging.String("chain-id", v.ChainID)) + } + + confs.UpdateConfirmations(v.Confirmations) + } +} + +// ReloadConf updates the internal configuration of the execution +// engine and its dependencies. +func (e *L2Clients) ReloadConf(cfg Config) { + e.log.Debug("reloading configuration") + + if e.log.GetLevel() != cfg.Level.Get() { + e.log.Info("updating log level", + logging.String("old", e.log.GetLevel().String()), + logging.String("new", cfg.Level.String()), + ) + e.log.SetLevel(cfg.Level.Get()) + } + + e.log.Info("updating L2 clients") + for _, v := range cfg.EVMChainConfigs { + if _, ok := e.clients[v.ChainID]; ok { + e.log.Warn("L2 client already setted up, please stop and restart node to update existing configuration", + logging.String("chain-id", v.ChainID), + logging.String("endpoint", v.RPCEndpoint), + ) + continue + } + + e.log.Info("starting L2 client", + logging.String("chain-id", v.ChainID), + logging.String("endpoint", v.RPCEndpoint), + ) + if len(v.ChainID) <= 0 || len(v.RPCEndpoint) <= 0 { + e.log.Warn("invalid L2 client configuration", + logging.String("chain-id", v.ChainID), + logging.String("endpoint", v.RPCEndpoint), + ) + continue + } + clt, err := DialL2(e.ctx, v.RPCEndpoint) + if err != nil { + e.log.Warn("couldn't start L2 client", + logging.String("chain-id", v.ChainID), + logging.String("endpoint", v.RPCEndpoint), + ) + continue + } + + chainID, err := clt.ChainID(e.ctx) + if err != nil { + e.log.Warn("couldn't get chain id", logging.Error(err)) + continue + } + + if chainID.String() != v.ChainID { + e.log.Warn("client retrieved different chain id", + logging.String("chain-id", chainID.String()), + logging.String("expected", v.ChainID), + ) + continue + } + + e.clients[v.ChainID] = clt + e.confirmations[v.ChainID] = NewEthereumConfirmations( + cfg, clt, nil) + } +} + +func DialL2(ctx context.Context, endpoint string) (*L2Client, error) { + ethClient, err := ethclient.DialContext(ctx, endpoint) + if err != nil { + return nil, fmt.Errorf("couldn't instantiate Ethereum client: %w", err) + } + + return &L2Client{ETHClient: newEthClientWrapper(ethClient)}, nil +} + +func (c *L2Clients) Get(chainID string) (*L2Client, *EthereumConfirmations, bool) { + clt, ok1 := c.clients[chainID] + confs, ok2 := c.confirmations[chainID] + return clt, confs, ok1 && ok2 +} diff --git a/core/collateral/checkpoint.go b/core/collateral/checkpoint.go index 1782c2a000..c1c6b655da 100644 --- a/core/collateral/checkpoint.go +++ b/core/collateral/checkpoint.go @@ -187,7 +187,7 @@ func (e *Engine) getCheckpointBalances() []*checkpoint.AssetBalance { } balance.AddSum(acc.Balance) - case types.AccountTypeMargin, types.AccountTypeGeneral, types.AccountTypeHolding, types.AccountTypeBond, types.AccountTypeFeesLiquidity, + case types.AccountTypeMargin, types.AccountTypeOrderMargin, types.AccountTypeGeneral, types.AccountTypeHolding, types.AccountTypeBond, types.AccountTypeFeesLiquidity, types.AccountTypeInsurance, types.AccountTypeGlobalReward, types.AccountTypeLiquidityFeesBonusDistribution, types.AccountTypeLPLiquidityFees, types.AccountTypeLPFeeReward, types.AccountTypeMakerReceivedFeeReward, types.AccountTypeMakerPaidFeeReward, types.AccountTypeMarketProposerReward, types.AccountTypeFeesInfrastructure, types.AccountTypePendingTransfers, diff --git a/core/collateral/checkpoint_test.go b/core/collateral/checkpoint_test.go index fa8acb1f84..62d22c34e7 100644 --- a/core/collateral/checkpoint_test.go +++ b/core/collateral/checkpoint_test.go @@ -29,6 +29,7 @@ import ( "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/collateral/engine.go b/core/collateral/engine.go index ce10441877..0af7df22dd 100644 --- a/core/collateral/engine.go +++ b/core/collateral/engine.go @@ -28,9 +28,9 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/protos/vega" - "golang.org/x/exp/maps" "github.com/pkg/errors" + "golang.org/x/exp/maps" ) const ( @@ -119,10 +119,6 @@ type Engine struct { nextBalancesSnapshot time.Time balanceSnapshotFrequency time.Duration - // this is a bit of a hack to work around the fact that the collateral engine is restored before the net patams engine. - // what we want to achieve is that when the balanceSnapshotFrequency net param is restored we don't use it to reschedule the nextBalancesSnapshot - // but rather just set the frequency. On post restore we release the active restore flag. - activeRestore bool // set to false when started // we'll use it only once after an upgrade @@ -149,7 +145,6 @@ func New(log *logging.Logger, conf Config, ts TimeService, broker Broker) *Engin vesting: map[string]map[string]*num.Uint{}, partiesAccsBalanceCache: map[string]*num.Uint{}, nextBalancesSnapshot: time.Time{}, - activeRestore: false, } } @@ -207,11 +202,6 @@ func (e *Engine) updateNextBalanceSnapshot(t time.Time) { } func (e *Engine) OnBalanceSnapshotFrequencyUpdated(ctx context.Context, d time.Duration) error { - if e.activeRestore { - e.balanceSnapshotFrequency = d - e.activeRestore = false - return nil - } if !e.nextBalancesSnapshot.IsZero() { e.updateNextBalanceSnapshot(e.nextBalancesSnapshot.Add(-e.balanceSnapshotFrequency)) } @@ -419,7 +409,6 @@ func (e *Engine) ensureAllAssetAccounts(ctx context.Context, asset types.Asset) // see https://github.com/vegaprotocol/vega/pull/2745 for more information e.addAccountToHashableSlice(externalAcc) e.broker.Send(events.NewAccountEvent(ctx, *externalAcc)) - e.log.Info("event emitted for new account", logging.String("accID", externalID)) } // when an asset is enabled a staking reward account is created for it @@ -438,7 +427,6 @@ func (e *Engine) ensureAllAssetAccounts(ctx context.Context, asset types.Asset) e.accs[rewardID] = rewardAcc e.addAccountToHashableSlice(rewardAcc) e.broker.Send(events.NewAccountEvent(ctx, *rewardAcc)) - e.log.Info("event emitted for new account", logging.String("accID", rewardID)) } } @@ -456,7 +444,6 @@ func (e *Engine) ensureAllAssetAccounts(ctx context.Context, asset types.Asset) e.accs[netTreasury] = ntAcc e.addAccountToHashableSlice(ntAcc) e.broker.Send(events.NewAccountEvent(ctx, *ntAcc)) - e.log.Info("event emitted for new account", logging.String("accID", netTreasury)) } // global insurance for the asset @@ -473,7 +460,6 @@ func (e *Engine) ensureAllAssetAccounts(ctx context.Context, asset types.Asset) e.accs[globalInsurance] = giAcc e.addAccountToHashableSlice(giAcc) e.broker.Send(events.NewAccountEvent(ctx, *giAcc)) - e.log.Info("event emitted for new account", logging.String("accID", globalInsurance)) } // pending transfers account @@ -491,7 +477,6 @@ func (e *Engine) ensureAllAssetAccounts(ctx context.Context, asset types.Asset) e.accs[pendingTransfersID] = pendingTransfersAcc e.addAccountToHashableSlice(pendingTransfersAcc) e.broker.Send(events.NewAccountEvent(ctx, *pendingTransfersAcc)) - e.log.Info("event emitted for new account", logging.String("accID", pendingTransfersID)) } pendingFeeReferrerRewardID := e.accountID(noMarket, systemOwner, asset.ID, types.AccountTypePendingFeeReferralReward) @@ -508,7 +493,6 @@ func (e *Engine) ensureAllAssetAccounts(ctx context.Context, asset types.Asset) e.accs[pendingFeeReferrerRewardID] = pendingFeeReferrerRewardAcc e.addAccountToHashableSlice(pendingFeeReferrerRewardAcc) e.broker.Send(events.NewAccountEvent(ctx, *pendingFeeReferrerRewardAcc)) - e.log.Info("event emitted for new account", logging.String("accID", pendingFeeReferrerRewardID)) } } @@ -804,7 +788,7 @@ func (e *Engine) TransferFees(ctx context.Context, marketID string, assetID stri // returns the corresponding transfer request for the slice of transfers // if the reward accound doesn't exist return error // if the party account doesn't exist log the error and continue. -func (e *Engine) getRewardTransferRequests(ctx context.Context, rewardAccountID string, transfers []*types.Transfer) ([]*types.TransferRequest, error) { +func (e *Engine) getRewardTransferRequests(ctx context.Context, rewardAccountID string, transfers []*types.Transfer, rewardType types.AccountType) ([]*types.TransferRequest, error) { rewardAccount, err := e.GetAccountByID(rewardAccountID) if err != nil { return nil, err @@ -812,27 +796,37 @@ func (e *Engine) getRewardTransferRequests(ctx context.Context, rewardAccountID rewardTRs := make([]*types.TransferRequest, 0, len(transfers)) for _, t := range transfers { - vesting := e.GetOrCreatePartyVestingRewardAccount(ctx, t.Owner, t.Amount.Asset) + var destination *types.Account + if rewardType == types.AccountTypeFeesInfrastructure { + destination, err = e.GetPartyGeneralAccount(t.Owner, t.Amount.Asset) + if err != nil { + e.CreatePartyGeneralAccount(ctx, t.Owner, t.Amount.Asset) + destination, _ = e.GetPartyGeneralAccount(t.Owner, t.Amount.Asset) + } + } else { + destination = e.GetOrCreatePartyVestingRewardAccount(ctx, t.Owner, t.Amount.Asset) + } + rewardTRs = append(rewardTRs, &types.TransferRequest{ Amount: t.Amount.Amount.Clone(), MinAmount: t.Amount.Amount.Clone(), Asset: t.Amount.Asset, Type: types.TransferTypeRewardPayout, FromAccount: []*types.Account{rewardAccount}, - ToAccount: []*types.Account{vesting}, + ToAccount: []*types.Account{destination}, }) } return rewardTRs, nil } // TransferRewards takes a slice of transfers and serves them to transfer rewards from the reward account to parties general account. -func (e *Engine) TransferRewards(ctx context.Context, rewardAccountID string, transfers []*types.Transfer) ([]*types.LedgerMovement, error) { +func (e *Engine) TransferRewards(ctx context.Context, rewardAccountID string, transfers []*types.Transfer, rewardType types.AccountType) ([]*types.LedgerMovement, error) { responses := make([]*types.LedgerMovement, 0, len(transfers)) if len(transfers) == 0 { return responses, nil } - transferReqs, err := e.getRewardTransferRequests(ctx, rewardAccountID, transfers) + transferReqs, err := e.getRewardTransferRequests(ctx, rewardAccountID, transfers, rewardType) if err != nil { return nil, err } @@ -1089,7 +1083,7 @@ func (e *Engine) CheckLeftOverBalance(ctx context.Context, settle *types.Account // FinalSettlement will process the list of transfers instructed by other engines // This func currently only expects TransferType_{LOSS,WIN} transfers // other transfer types have dedicated funcs (MarkToMarket, MarginUpdate). -func (e *Engine) FinalSettlement(ctx context.Context, marketID string, transfers []*types.Transfer, factor *num.Uint) ([]*types.LedgerMovement, error) { +func (e *Engine) FinalSettlement(ctx context.Context, marketID string, transfers []*types.Transfer, factor *num.Uint, useGeneralAccountForMarginSearch func(string) bool) ([]*types.LedgerMovement, error) { // stop immediately if there aren't any transfers, channels are closed if len(transfers) == 0 { return nil, nil @@ -1127,7 +1121,7 @@ func (e *Engine) FinalSettlement(ctx context.Context, marketID string, transfers break } - req, err := e.getTransferRequest(transfer, settle, insurance, &marginUpdate{}) + req, err := e.getTransferRequest(transfer, settle, insurance, &marginUpdate{}, useGeneralAccountForMarginSearch(transfer.Owner)) if err != nil { e.log.Error( "Failed to build transfer request for event", @@ -1169,7 +1163,7 @@ func (e *Engine) FinalSettlement(ctx context.Context, marketID string, transfers responses = append(responses, res) // Update to see how much we still need - requestAmount = requestAmount.Sub(requestAmount, amountCollected) + requestAmount.Sub(requestAmount, amountCollected) if transfer.Owner != types.NetworkParty { // no error possible here, we're just reloading the accounts to ensure the correct balance general, margin, bond, _ := e.getMTMPartyAccounts(transfer.Owner, marketID, asset) @@ -1238,7 +1232,7 @@ func (e *Engine) FinalSettlement(ctx context.Context, marketID string, transfers continue } - req, err := e.getTransferRequest(transfer, settle, insurance, &marginUpdate{}) + req, err := e.getTransferRequest(transfer, settle, insurance, &marginUpdate{}, useGeneralAccountForMarginSearch(transfer.Owner)) if err != nil { e.log.Error( "Failed to build transfer request for event", @@ -1301,17 +1295,17 @@ func (e *Engine) getMTMPartyAccounts(party, marketID, asset string) (gen, margin // PerpsFundingSettlement will run a funding settlement over given positions. // This works exactly the same as a MTM settlement, but uses different transfer types. -func (e *Engine) PerpsFundingSettlement(ctx context.Context, marketID string, transfers []events.Transfer, asset string, round *num.Uint) ([]events.Margin, []*types.LedgerMovement, error) { - return e.mtmOrFundingSettlement(ctx, marketID, transfers, asset, types.TransferTypePerpFundingWin, round) +func (e *Engine) PerpsFundingSettlement(ctx context.Context, marketID string, transfers []events.Transfer, asset string, round *num.Uint, useGeneralAccountForMarginSearch func(string) bool) ([]events.Margin, []*types.LedgerMovement, error) { + return e.mtmOrFundingSettlement(ctx, marketID, transfers, asset, types.TransferTypePerpFundingWin, round, useGeneralAccountForMarginSearch) } // MarkToMarket will run the mark to market settlement over a given set of positions // return ledger move stuff here, too (separate return value, because we need to stream those). -func (e *Engine) MarkToMarket(ctx context.Context, marketID string, transfers []events.Transfer, asset string) ([]events.Margin, []*types.LedgerMovement, error) { - return e.mtmOrFundingSettlement(ctx, marketID, transfers, asset, types.TransferTypeMTMWin, nil) +func (e *Engine) MarkToMarket(ctx context.Context, marketID string, transfers []events.Transfer, asset string, useGeneralAccountForMarginSearch func(string) bool) ([]events.Margin, []*types.LedgerMovement, error) { + return e.mtmOrFundingSettlement(ctx, marketID, transfers, asset, types.TransferTypeMTMWin, nil, useGeneralAccountForMarginSearch) } -func (e *Engine) mtmOrFundingSettlement(ctx context.Context, marketID string, transfers []events.Transfer, asset string, winType types.TransferType, round *num.Uint) ([]events.Margin, []*types.LedgerMovement, error) { +func (e *Engine) mtmOrFundingSettlement(ctx context.Context, marketID string, transfers []events.Transfer, asset string, winType types.TransferType, round *num.Uint, useGeneralAccountForMarginSearch func(string) bool) ([]events.Margin, []*types.LedgerMovement, error) { // stop immediately if there aren't any transfers, channels are closed if len(transfers) == 0 { return nil, nil, nil @@ -1354,6 +1348,7 @@ func (e *Engine) mtmOrFundingSettlement(ctx context.Context, marketID string, tr // get the state of the accounts before processing transfers // so they can be used in the marginEvt, and to calculate the missing funds marginEvt.general, marginEvt.margin, marginEvt.bond, err = e.getMTMPartyAccounts(party, settle.MarketID, asset) + marginEvt.orderMargin, _ = e.GetAccountByID(e.accountID(marginEvt.marketID, party, marginEvt.asset, types.AccountTypeOrderMargin)) if err != nil { e.log.Error("unable to get party account", logging.String("party-id", party), @@ -1366,9 +1361,7 @@ func (e *Engine) mtmOrFundingSettlement(ctx context.Context, marketID string, tr if transfer == nil { // no error when getting MTM accounts, and no margin account == network position // we are not interested in this event, continue here - if party != types.NetworkParty { - marginEvts = append(marginEvts, marginEvt) - } + marginEvts = append(marginEvts, marginEvt) continue } @@ -1378,7 +1371,7 @@ func (e *Engine) mtmOrFundingSettlement(ctx context.Context, marketID string, tr break } - req, err := e.getTransferRequest(transfer, settle, insurance, marginEvt) + req, err := e.getTransferRequest(transfer, settle, insurance, marginEvt, useGeneralAccountForMarginSearch(transfer.Owner)) if err != nil { e.log.Error( "Failed to build transfer request for event", @@ -1419,15 +1412,18 @@ func (e *Engine) mtmOrFundingSettlement(ctx context.Context, marketID string, tr responses = append(responses, res) // Update to see how much we still need - requestAmount = requestAmount.Sub(requestAmount, amountCollected) + requestAmount.Sub(requestAmount, amountCollected) // here we check if we were able to collect all monies, // if not send an event to notify the plugins if party != types.NetworkParty { // no error possible here, we're just reloading the accounts to ensure the correct balance marginEvt.general, marginEvt.margin, marginEvt.bond, _ = e.getMTMPartyAccounts(party, settle.MarketID, asset) - - totalInAccount := num.Sum(marginEvt.general.Balance, marginEvt.margin.Balance) + marginEvt.orderMargin, _ = e.GetAccountByID(e.accountID(marginEvt.marketID, party, marginEvt.asset, types.AccountTypeOrderMargin)) + totalInAccount := marginEvt.margin.Balance.Clone() + if useGeneralAccountForMarginSearch(marginEvt.Party()) { + totalInAccount.AddSum(marginEvt.general.Balance) + } if marginEvt.bond != nil { totalInAccount.Add(totalInAccount, marginEvt.bond.Balance) } @@ -1514,14 +1510,14 @@ func (e *Engine) mtmOrFundingSettlement(ctx context.Context, marketID string, tr logging.String("asset", asset), logging.String("market-id", settle.MarketID)) } - + marginEvt.orderMargin, _ = e.GetAccountByID(e.accountID(marginEvt.marketID, party, marginEvt.asset, types.AccountTypeOrderMargin)) if transfer == nil { marginEvts = append(marginEvts, marginEvt) continue } } - req, err := e.getTransferRequest(transfer, settle, insurance, marginEvt) + req, err := e.getTransferRequest(transfer, settle, insurance, marginEvt, true) if err != nil { e.log.Error( "Failed to build transfer request for event", @@ -1529,6 +1525,10 @@ func (e *Engine) mtmOrFundingSettlement(ctx context.Context, marketID string, tr ) return nil, nil, err } + if req == nil { + // nil transfer encountered + continue + } // set the amount (this can change the req.Amount value if we entered loss socialisation res, err := e.getLedgerEntries(ctx, req) @@ -1594,8 +1594,22 @@ func (e *Engine) mtmOrFundingSettlement(ctx context.Context, marketID string, tr // GetPartyMargin will return the current margin for a given party. func (e *Engine) GetPartyMargin(pos events.MarketPosition, asset, marketID string) (events.Margin, error) { + if pos.Party() == types.NetworkParty { + ins, err := e.GetMarketInsurancePoolAccount(marketID, asset) + if err != nil { + return nil, ErrAccountDoesNotExist + } + return marginUpdate{ + MarketPosition: pos, + margin: ins, + asset: asset, + marketID: marketID, + marginShortFall: num.UintZero(), + }, nil + } genID := e.accountID(noMarket, pos.Party(), asset, types.AccountTypeGeneral) marginID := e.accountID(marketID, pos.Party(), asset, types.AccountTypeMargin) + orderMarginID := e.accountID(marketID, pos.Party(), asset, types.AccountTypeOrderMargin) bondID := e.accountID(marketID, pos.Party(), asset, types.AccountTypeBond) genAcc, err := e.GetAccountByID(genID) if err != nil { @@ -1612,6 +1626,10 @@ func (e *Engine) GetPartyMargin(pos events.MarketPosition, asset, marketID strin logging.String("market-id", marketID)) return nil, ErrPartyAccountsMissing } + + // can be nil for a party in cross margin mode + orderMarAcc, _ := e.GetAccountByID(orderMarginID) + // do not check error, // not all parties have a bond account bondAcc, _ := e.GetAccountByID(bondID) @@ -1619,6 +1637,7 @@ func (e *Engine) GetPartyMargin(pos events.MarketPosition, asset, marketID strin return marginUpdate{ MarketPosition: pos, margin: marAcc, + orderMargin: orderMarAcc, general: genAcc, lock: nil, bond: bondAcc, @@ -1628,6 +1647,24 @@ func (e *Engine) GetPartyMargin(pos events.MarketPosition, asset, marketID strin }, nil } +// IsolatedMarginUpdate returns margin events for parties that don't meet their margin requirement (i.e. margin balance < maintenance). +func (e *Engine) IsolatedMarginUpdate(updates []events.Risk) []events.Margin { + closed := make([]events.Margin, 0, len(updates)) + if len(updates) == 0 { + return closed + } + for _, r := range updates { + mevt := &marginUpdate{ + MarketPosition: r, + asset: r.Asset(), + marketID: r.MarketID(), + marginShortFall: num.UintZero(), + } + closed = append(closed, mevt) + } + return closed +} + // MarginUpdate will run the margin updates over a set of risk events (margin updates). func (e *Engine) MarginUpdate(ctx context.Context, marketID string, updates []events.Risk) ([]*types.LedgerMovement, []events.Margin, []events.Margin, error) { response := make([]*types.LedgerMovement, 0, len(updates)) @@ -1640,6 +1677,10 @@ func (e *Engine) MarginUpdate(ctx context.Context, marketID string, updates []ev ) // create "fake" settle account for market ID for _, update := range updates { + if update.Party() == types.NetworkParty { + // network party is ignored here + continue + } transfer := update.Transfer() // although this is mainly a duplicate event, we need to pass it to getTransferRequest mevt := &marginUpdate{ @@ -1649,7 +1690,7 @@ func (e *Engine) MarginUpdate(ctx context.Context, marketID string, updates []ev marginShortFall: num.UintZero(), } - req, err := e.getTransferRequest(transfer, settle, nil, mevt) + req, err := e.getTransferRequest(transfer, settle, nil, mevt, true) if err != nil { return response, closed, toPenalise, err } @@ -1801,11 +1842,9 @@ func (e *Engine) TransferFunds( switch allTransfers[i].Type { case types.TransferTypeInfrastructureFeePay: req, err = e.getTransferFundsFeesTransferRequest(ctx, transfer, accType) - case types.TransferTypeTransferFundsDistribute, types.TransferTypeTransferFundsSend: req, err = e.getTransferFundsTransferRequest(ctx, transfer, accType) - default: e.log.Panic("unsupported transfer type", logging.String("types", accType.String())) @@ -1949,6 +1988,10 @@ func (e *Engine) RemoveBondAccount(partyID, marketID, asset string) error { // MarginUpdateOnOrder will run the margin updates over a set of risk events (margin updates). func (e *Engine) MarginUpdateOnOrder(ctx context.Context, marketID string, update events.Risk) (*types.LedgerMovement, events.Margin, error) { + // network party is ignored for margin stuff. + if update.Party() == types.NetworkParty { + return nil, nil, nil + } // create "fake" settle account for market ID settle := &types.Account{ MarketID: marketID, @@ -1962,17 +2005,19 @@ func (e *Engine) MarginUpdateOnOrder(ctx context.Context, marketID string, updat marginShortFall: num.UintZero(), } - req, err := e.getTransferRequest(transfer, settle, nil, &mevt) + req, err := e.getTransferRequest(transfer, settle, nil, &mevt, true) if err != nil { return nil, nil, err } // we do not have enough money to get to the minimum amount, // we return an error. - if num.Sum(mevt.GeneralBalance(), mevt.MarginBalance()).LT(transfer.MinAmount) { + if transfer.Type == types.TransferTypeMarginLow && num.Sum(mevt.GeneralBalance(), mevt.MarginBalance()).LT(transfer.MinAmount) { + return nil, mevt, ErrMinAmountNotReached + } + if transfer.Type == types.TransferTypeOrderMarginLow && num.Sum(mevt.GeneralBalance(), mevt.OrderMarginBalance()).LT(transfer.MinAmount) { return nil, mevt, ErrMinAmountNotReached } - if mevt.bond != nil && transfer.Amount.Amount.GT(mevt.general.Balance) { // this is a liquidity provider but it did not have enough funds to // pay from the general account, we'll have to penalize later on @@ -2014,6 +2059,9 @@ func (e *Engine) getFeeTransferRequest( marketID, assetID string, ) (*types.TransferRequest, error) { getAccountLogError := func(marketID, owner string, accountType vega.AccountType) (*types.Account, error) { + if owner == types.NetworkParty { + return e.GetMarketInsurancePoolAccount(marketID, assetID) + } acc, err := e.GetAccountByID(e.accountID(marketID, owner, assetID, accountType)) if err != nil { e.log.Error( @@ -2029,6 +2077,9 @@ func (e *Engine) getFeeTransferRequest( } partyLiquidityFeeAccount := func() (*types.Account, error) { + if t.Owner == types.NetworkParty { + return e.GetMarketInsurancePoolAccount(marketID, assetID) + } return e.GetOrCreatePartyLiquidityFeeAccount(ctx, t.Owner, marketID, assetID) } @@ -2044,15 +2095,26 @@ func (e *Engine) getFeeTransferRequest( return getAccountLogError(noMarket, systemOwner, types.AccountTypePendingFeeReferralReward) } - general, err := e.GetAccountByID(e.accountID(noMarket, t.Owner, assetID, types.AccountTypeGeneral)) - if err != nil { - generalID, err := e.CreatePartyGeneralAccount(ctx, t.Owner, assetID) + var ( + general *types.Account + err error + ) + if t.Owner == types.NetworkParty { + general, err = e.GetMarketInsurancePoolAccount(marketID, assetID) if err != nil { - return nil, err + return nil, fmt.Errorf("no insurance pool for the market %w", err) } - general, err = e.GetAccountByID(generalID) + } else { + general, err = e.GetAccountByID(e.accountID(noMarket, t.Owner, assetID, types.AccountTypeGeneral)) if err != nil { - return nil, err + generalID, err := e.CreatePartyGeneralAccount(ctx, t.Owner, assetID) + if err != nil { + return nil, err + } + general, err = e.GetAccountByID(generalID) + if err != nil { + return nil, err + } } } @@ -2075,7 +2137,6 @@ func (e *Engine) getFeeTransferRequest( } treq.FromAccount = []*types.Account{general, margin} treq.ToAccount = []*types.Account{pendingRewardAccount} - return treq, nil case types.TransferTypeFeeReferrerRewardDistribute: pendingRewardAccount, err := referralPendingRewardAccount() if err != nil { @@ -2083,7 +2144,6 @@ func (e *Engine) getFeeTransferRequest( } treq.FromAccount = []*types.Account{pendingRewardAccount} treq.ToAccount = []*types.Account{general} - return treq, nil case types.TransferTypeInfrastructureFeePay: margin, err := marginAccount() if err != nil { @@ -2092,11 +2152,9 @@ func (e *Engine) getFeeTransferRequest( treq.FromAccount = []*types.Account{general, margin} treq.ToAccount = []*types.Account{infraFee} - return treq, nil case types.TransferTypeInfrastructureFeeDistribute: treq.FromAccount = []*types.Account{infraFee} treq.ToAccount = []*types.Account{general} - return treq, nil case types.TransferTypeLiquidityFeePay: margin, err := marginAccount() if err != nil { @@ -2104,11 +2162,9 @@ func (e *Engine) getFeeTransferRequest( } treq.FromAccount = []*types.Account{general, margin} treq.ToAccount = []*types.Account{liquiFee} - return treq, nil case types.TransferTypeLiquidityFeeDistribute: treq.FromAccount = []*types.Account{liquiFee} treq.ToAccount = []*types.Account{general} - return treq, nil case types.TransferTypeMakerFeePay: margin, err := marginAccount() if err != nil { @@ -2116,11 +2172,9 @@ func (e *Engine) getFeeTransferRequest( } treq.FromAccount = []*types.Account{general, margin} treq.ToAccount = []*types.Account{makerFee} - return treq, nil case types.TransferTypeMakerFeeReceive: treq.FromAccount = []*types.Account{makerFee} treq.ToAccount = []*types.Account{general} - return treq, nil case types.TransferTypeLiquidityFeeAllocate: partyLiquidityFee, err := partyLiquidityFeeAccount() if err != nil { @@ -2129,7 +2183,6 @@ func (e *Engine) getFeeTransferRequest( treq.FromAccount = []*types.Account{liquiFee} treq.ToAccount = []*types.Account{partyLiquidityFee} - return treq, nil case types.TransferTypeLiquidityFeeNetDistribute: partyLiquidityFee, err := partyLiquidityFeeAccount() if err != nil { @@ -2138,7 +2191,6 @@ func (e *Engine) getFeeTransferRequest( treq.FromAccount = []*types.Account{partyLiquidityFee} treq.ToAccount = []*types.Account{general} - return treq, nil case types.TransferTypeLiquidityFeeUnpaidCollect: partyLiquidityFee, err := partyLiquidityFeeAccount() if err != nil { @@ -2151,7 +2203,6 @@ func (e *Engine) getFeeTransferRequest( treq.FromAccount = []*types.Account{partyLiquidityFee} treq.ToAccount = []*types.Account{bonusDistribution} - return treq, nil case types.TransferTypeSlaPerformanceBonusDistribute: bonusDistribution, err := bonusDistributionAccount() if err != nil { @@ -2160,7 +2211,6 @@ func (e *Engine) getFeeTransferRequest( treq.FromAccount = []*types.Account{bonusDistribution} treq.ToAccount = []*types.Account{general} - return treq, nil case types.TransferTypeSLAPenaltyLpFeeApply: partyLiquidityFee, err := partyLiquidityFeeAccount() if err != nil { @@ -2174,11 +2224,16 @@ func (e *Engine) getFeeTransferRequest( treq.FromAccount = []*types.Account{partyLiquidityFee} treq.ToAccount = []*types.Account{insurancePool} - return treq, nil - default: return nil, ErrInvalidTransferTypeForFeeRequest } + // we may be moving funds from the insurance pool, we cannot have more than 1 from account in that case + // because once the insurance pool is drained, and a copy of the same account without the updated balance + // sits in the FromAccount slice, we are magically doubling the available insurance pool funds. + if len(treq.FromAccount) > 0 && treq.FromAccount[0].Type == types.AccountTypeInsurance { + treq.FromAccount = treq.FromAccount[:1] // only the first account should be present + } + return treq, nil } func (e *Engine) getBondTransferRequest(t *types.Transfer, market string) (*types.TransferRequest, error) { @@ -2570,6 +2625,7 @@ func (e *Engine) getTransferFundsTransferRequest(ctx context.Context, t *types.T MinAmount: t.Amount.Amount.Clone(), Asset: t.Amount.Asset, Type: t.Type, + TransferID: t.TransferID, }, nil } @@ -2618,11 +2674,15 @@ func (e *Engine) getTransferFundsFeesTransferRequest(ctx context.Context, t *typ MinAmount: t.Amount.Amount.Clone(), Asset: t.Amount.Asset, Type: t.Type, + TransferID: t.TransferID, }, nil } // getTransferRequest builds the request, and sets the required accounts based on the type of the Transfer argument. -func (e *Engine) getTransferRequest(p *types.Transfer, settle, insurance *types.Account, mEvt *marginUpdate) (*types.TransferRequest, error) { +func (e *Engine) getTransferRequest(p *types.Transfer, settle, insurance *types.Account, mEvt *marginUpdate, useGeneralAccountForMarginSearch bool) (*types.TransferRequest, error) { + if p == nil || p.Amount == nil { + return nil, nil + } var ( asset = p.Amount.Asset err error @@ -2633,40 +2693,46 @@ func (e *Engine) getTransferRequest(p *types.Transfer, settle, insurance *types. Type: p.Type, } ) - if p.Type == types.TransferTypeMTMLoss || - p.Type == types.TransferTypePerpFundingLoss || - p.Type == types.TransferTypeWin || - p.Type == types.TransferTypeMarginLow { - // we do not care about errors here as the bond account is not mandatory for the transfers - // a partry would have a bond account only if it was also a market maker - mEvt.bond, _ = e.GetAccountByID(e.accountID(settle.MarketID, p.Owner, asset, types.AccountTypeBond)) - } - if settle != nil && mEvt.margin == nil && p.Owner != types.NetworkParty { - // the accounts for the party we need - // the accounts for the trader we need - mEvt.margin, err = e.GetAccountByID(e.accountID(settle.MarketID, p.Owner, asset, types.AccountTypeMargin)) - if err != nil { - e.log.Error( - "Failed to get the party margin account", - logging.String("owner-id", p.Owner), - logging.String("market-id", settle.MarketID), - logging.Error(err), - ) - return nil, err + if p.Owner != types.NetworkParty { + if p.Type == types.TransferTypeMTMLoss || + p.Type == types.TransferTypePerpFundingLoss || + p.Type == types.TransferTypeWin || + p.Type == types.TransferTypeMarginLow { + // we do not care about errors here as the bond account is not mandatory for the transfers + // a partry would have a bond account only if it was also a market maker + mEvt.bond, _ = e.GetAccountByID(e.accountID(settle.MarketID, p.Owner, asset, types.AccountTypeBond)) + } + if settle != nil && mEvt.margin == nil { + // the accounts for the party we need + // the accounts for the trader we need + mEvt.margin, err = e.GetAccountByID(e.accountID(settle.MarketID, p.Owner, asset, types.AccountTypeMargin)) + if err != nil { + e.log.Error( + "Failed to get the party margin account", + logging.String("owner-id", p.Owner), + logging.String("market-id", settle.MarketID), + logging.Error(err), + ) + return nil, err + } } - } - // we'll need this account for all transfer types anyway (settlements, margin-risk updates) - if mEvt.general == nil && p.Owner != types.NetworkParty { - mEvt.general, err = e.GetAccountByID(e.accountID(noMarket, p.Owner, asset, types.AccountTypeGeneral)) - if err != nil { - e.log.Error( - "Failed to get the party general account", - logging.String("owner-id", p.Owner), - logging.String("market-id", settle.MarketID), - logging.Error(err), - ) - return nil, err + + // we'll need this account for all transfer types anyway (settlements, margin-risk updates) + if mEvt.general == nil { + mEvt.general, err = e.GetAccountByID(e.accountID(noMarket, p.Owner, asset, types.AccountTypeGeneral)) + if err != nil { + e.log.Error( + "Failed to get the party general account", + logging.String("owner-id", p.Owner), + logging.String("market-id", settle.MarketID), + logging.Error(err), + ) + return nil, err + } } + } else if mEvt.general == nil { + // for the event, the insurance pool acts as the margin/general account + mEvt.general = insurance } if p.Type == types.TransferTypeWithdraw || p.Type == types.TransferTypeDeposit { // external account: @@ -2692,23 +2758,38 @@ func (e *Engine) getTransferRequest(p *types.Transfer, settle, insurance *types. // losses are collected first from the margin account, then the general account, and finally // taken out of the insurance pool. Network party will only have insurance pool available if mEvt.bond != nil { - // network party will never have a bond account, so we know what to do - req.FromAccount = []*types.Account{ - mEvt.margin, - mEvt.general, - mEvt.bond, - insurance, + if useGeneralAccountForMarginSearch { + // network party will never have a bond account, so we know what to do + req.FromAccount = []*types.Account{ + mEvt.margin, + mEvt.general, + mEvt.bond, + insurance, + } + } else { + req.FromAccount = []*types.Account{ + mEvt.margin, + mEvt.bond, + insurance, + } } } else if p.Owner == types.NetworkParty { req.FromAccount = []*types.Account{ insurance, } } else { - // regular party, no bond account: - req.FromAccount = []*types.Account{ - mEvt.margin, - mEvt.general, - insurance, + if useGeneralAccountForMarginSearch { + // regular party, no bond account: + req.FromAccount = []*types.Account{ + mEvt.margin, + mEvt.general, + insurance, + } + } else { + req.FromAccount = []*types.Account{ + mEvt.margin, + insurance, + } } } case types.TransferTypeWin, types.TransferTypeMTMWin, types.TransferTypePerpFundingWin: @@ -2757,6 +2838,36 @@ func (e *Engine) getTransferRequest(p *types.Transfer, settle, insurance *types. } req.Amount = p.Amount.Amount.Clone() req.MinAmount = p.MinAmount.Clone() + case types.TransferTypeIsolatedMarginLow: + mEvt.orderMargin, _ = e.GetAccountByID(e.accountID(settle.MarketID, p.Owner, asset, types.AccountTypeOrderMargin)) + req.FromAccount = []*types.Account{ + mEvt.orderMargin, + } + req.ToAccount = []*types.Account{ + mEvt.margin, + } + req.Amount = p.Amount.Amount.Clone() + req.MinAmount = p.MinAmount.Clone() + case types.TransferTypeOrderMarginLow: + mEvt.orderMargin, _ = e.GetAccountByID(e.accountID(settle.MarketID, p.Owner, asset, types.AccountTypeOrderMargin)) + req.FromAccount = []*types.Account{ + mEvt.general, + } + req.ToAccount = []*types.Account{ + mEvt.orderMargin, + } + req.Amount = p.Amount.Amount.Clone() + req.MinAmount = p.MinAmount.Clone() + case types.TransferTypeOrderMarginHigh: + mEvt.orderMargin, _ = e.GetAccountByID(e.accountID(settle.MarketID, p.Owner, asset, types.AccountTypeOrderMargin)) + req.FromAccount = []*types.Account{ + mEvt.orderMargin, + } + req.ToAccount = []*types.Account{ + mEvt.general, + } + req.Amount = p.Amount.Amount.Clone() + req.MinAmount = p.MinAmount.Clone() case types.TransferTypeDeposit: // ensure we have the funds req.ToAccount deposit eacc.Balance = eacc.Balance.Add(eacc.Balance, p.Amount.Amount) @@ -2849,6 +2960,7 @@ func (e *Engine) getLedgerEntries(ctx context.Context, req *types.TransferReques Timestamp: now, FromAccountBalance: acc.Balance.Clone(), ToAccountBalance: num.Sum(to.Account.Balance, parts), + TransferID: req.TransferID, } ret.Entries = append(ret.Entries, lm) to.Balance.AddSum(parts) @@ -2994,6 +3106,38 @@ func (e *Engine) ClearMarket(ctx context.Context, mktID, asset string, parties [ // as the entries to the response resps = append(resps, ledgerEntries) } + // clear order margin account + orderMarginAcc, err := e.GetAccountByID(e.accountID(mktID, v, asset, types.AccountTypeOrderMargin)) + if err != nil { + e.log.Debug( + "Failed to get the order margin account", + logging.String("party-id", v), + logging.String("market-id", mktID), + logging.String("asset", asset), + logging.Error(err)) + } else { + req.FromAccount[0] = orderMarginAcc + req.ToAccount[0] = generalAcc + req.Amount = orderMarginAcc.Balance + + if e.log.GetLevel() == logging.DebugLevel { + e.log.Debug("Clearing party order margin account", + logging.String("market-id", mktID), + logging.String("asset", asset), + logging.String("party", v), + logging.BigUint("margin-before", orderMarginAcc.Balance), + logging.BigUint("general-before", generalAcc.Balance), + logging.BigUint("general-after", num.Sum(generalAcc.Balance, orderMarginAcc.Balance))) + } + + ledgerEntries, err := e.clearAccount(ctx, req, v, asset, mktID) + if err != nil { + e.log.Panic("unable to clear party account", logging.Error(err)) + } + + // as the entries to the response + resps = append(resps, ledgerEntries) + } // Then we do bond account bondAcc, err := e.GetAccountByID(e.accountID(mktID, v, asset, types.AccountTypeBond)) @@ -3147,24 +3291,10 @@ func (e *Engine) ClearInsurancepool(ctx context.Context, mktID, asset string, cl return nil, nil } - // get all other market insurance accounts for the same asset - sortedAccKeys := maps.Keys(e.accs) - sort.Strings(sortedAccKeys) - - var insuranceAccounts []*types.Account - for _, accKey := range sortedAccKeys { - acc := e.accs[accKey] - if acc.ID != marketInsuranceID && acc.Asset == asset && acc.Type == types.AccountTypeInsurance { - insuranceAccounts = append(insuranceAccounts, acc.Clone()) - } - } - - // add the global insurance account globalIns, _ := e.GetGlobalInsuranceAccount(asset) - insuranceAccounts = append(insuranceAccounts, globalIns) // redistribute market insurance funds between the global and other markets equally req.FromAccount[0] = marketInsuranceAcc - req.ToAccount = insuranceAccounts + req.ToAccount[0] = globalIns req.Amount = marketInsuranceAcc.Balance.Clone() insuranceLedgerEntries, err := e.getLedgerEntries(ctx, req) if err != nil { @@ -3180,7 +3310,6 @@ func (e *Engine) ClearInsurancepool(ctx context.Context, mktID, asset string, cl } resp = append(resp, insuranceLedgerEntries) e.removeAccount(marketInsuranceID) - return resp, nil } @@ -3398,6 +3527,12 @@ func (e *Engine) GetPartyMarginAccount(market, party, asset string) (*types.Acco return e.GetAccountByID(margin) } +// GetPartyOrderMarginAccount returns a margin account given the partyID and market. +func (e *Engine) GetPartyOrderMarginAccount(market, party, asset string) (*types.Account, error) { + orderMargin := e.accountID(market, party, asset, types.AccountTypeOrderMargin) + return e.GetAccountByID(orderMargin) +} + // GetPartyHoldingAccount returns a holding account given the partyID and market. func (e *Engine) GetPartyHoldingAccount(party, asset string) (*types.Account, error) { margin := e.accountID(noMarket, party, asset, types.AccountTypeHolding) @@ -3513,7 +3648,7 @@ func (e *Engine) GetOrCreatePartyVestedRewardAccount(ctx context.Context, partyI // RemoveDistressed will remove all distressed party in the event positions // for a given market and asset. -func (e *Engine) RemoveDistressed(ctx context.Context, parties []events.MarketPosition, marketID, asset string) (*types.LedgerMovement, error) { +func (e *Engine) RemoveDistressed(ctx context.Context, parties []events.MarketPosition, marketID, asset string, useGeneralAccount func(string) bool) (*types.LedgerMovement, error) { tl := len(parties) if tl == 0 { return nil, nil @@ -3558,10 +3693,11 @@ func (e *Engine) RemoveDistressed(ctx context.Context, parties []events.MarketPo if err := e.UpdateBalance(ctx, bondAcc.ID, bondAcc.Balance.SetUint64(0)); err != nil { return nil, err } + marginAcc, _ = e.GetAccountByID(e.accountID(marketID, party.Party(), asset, types.AccountTypeMargin)) } // take whatever is left on the general account, and move to margin balance // we can take everything from the account, as whatever amount was left here didn't cover the minimum margin requirement - if genAcc.Balance != nil && !genAcc.Balance.IsZero() { + if useGeneralAccount(party.Party()) && genAcc.Balance != nil && !genAcc.Balance.IsZero() { resp.Entries = append(resp.Entries, &types.LedgerEntry{ FromAccount: genAcc.ToDetails(), ToAccount: marginAcc.ToDetails(), @@ -3578,6 +3714,7 @@ func (e *Engine) RemoveDistressed(ctx context.Context, parties []events.MarketPo if err := e.UpdateBalance(ctx, genAcc.ID, genAcc.Balance.SetUint64(0)); err != nil { return nil, err } + marginAcc, _ = e.GetAccountByID(e.accountID(marketID, party.Party(), asset, types.AccountTypeMargin)) } // move monies from the margin account (balance is general, bond, and margin combined now) if !marginAcc.Balance.IsZero() { @@ -3600,19 +3737,32 @@ func (e *Engine) RemoveDistressed(ctx context.Context, parties []events.MarketPo } // we remove the margin account - e.removeAccount(marginAcc.ID) - // remove account from balances tracking - e.rmPartyAccount(party.Party(), marginAcc.ID) + if useGeneralAccount(party.Party()) { + e.removeAccount(marginAcc.ID) + // remove account from balances tracking + e.rmPartyAccount(party.Party(), marginAcc.ID) + } } return &resp, nil } +func (e *Engine) ClearPartyOrderMarginAccount(ctx context.Context, party, market, asset string) (*types.LedgerMovement, error) { + acc, err := e.GetAccountByID(e.accountID(market, party, asset, types.AccountTypeOrderMargin)) + if err != nil { + return nil, err + } + return e.clearPartyMarginAccount(ctx, party, asset, acc, types.TransferTypeOrderMarginHigh) +} + func (e *Engine) ClearPartyMarginAccount(ctx context.Context, party, market, asset string) (*types.LedgerMovement, error) { acc, err := e.GetAccountByID(e.accountID(market, party, asset, types.AccountTypeMargin)) if err != nil { return nil, err } + return e.clearPartyMarginAccount(ctx, party, asset, acc, types.TransferTypeMarginHigh) +} +func (e *Engine) clearPartyMarginAccount(ctx context.Context, party, asset string, acc *types.Account, transferType types.TransferType) (*types.LedgerMovement, error) { // preevent returning empty ledger movements if acc.Balance.IsZero() { return nil, nil @@ -3632,7 +3782,7 @@ func (e *Engine) ClearPartyMarginAccount(ctx context.Context, party, market, ass FromAccount: acc.ToDetails(), ToAccount: genAcc.ToDetails(), Amount: acc.Balance.Clone(), - Type: types.TransferTypeMarginHigh, + Type: transferType, Timestamp: now, FromAccountBalance: num.UintZero(), ToAccountBalance: num.Sum(genAcc.Balance, acc.Balance), @@ -3754,7 +3904,7 @@ func (e *Engine) Withdraw(ctx context.Context, partyID, asset string, amount *nu mEvt := marginUpdate{ general: acc, } - req, err := e.getTransferRequest(&transf, nil, nil, &mEvt) + req, err := e.getTransferRequest(&transf, nil, nil, &mEvt, true) if err != nil { return nil, err } @@ -3865,7 +4015,7 @@ func (e *Engine) Deposit(ctx context.Context, partyID, asset string, amount *num general: acc, } - req, err := e.getTransferRequest(&transf, nil, nil, &mEvt) + req, err := e.getTransferRequest(&transf, nil, nil, &mEvt, true) if err != nil { return nil, err } @@ -4350,3 +4500,38 @@ func (e *Engine) TransferSpot(ctx context.Context, partyID, toPartyID, asset str } return res, nil } + +func (e *Engine) GetOrCreatePartyOrderMarginAccount(ctx context.Context, partyID, marketID, asset string) (string, error) { + if !e.AssetExists(asset) { + return "", ErrInvalidAssetID + } + marginID := e.accountID(marketID, partyID, asset, types.AccountTypeOrderMargin) + if _, ok := e.accs[marginID]; !ok { + acc := types.Account{ + ID: marginID, + Asset: asset, + MarketID: marketID, + Balance: num.UintZero(), + Owner: partyID, + Type: types.AccountTypeOrderMargin, + } + e.accs[marginID] = &acc + e.addPartyAccount(partyID, marginID, &acc) + e.addAccountToHashableSlice(&acc) + e.broker.Send(events.NewAccountEvent(ctx, acc)) + } + return marginID, nil +} + +func (e *Engine) GetVestingAccounts() []*types.Account { + accs := []*types.Account{} + for _, a := range e.accs { + if a.Type == types.AccountTypeVestingRewards { + accs = append(accs, a.Clone()) + } + } + sort.Slice(accs, func(i, j int) bool { + return accs[i].ID < accs[j].ID + }) + return accs +} diff --git a/core/collateral/engine_test.go b/core/collateral/engine_test.go index 3ace5dd0e8..2acc04ac65 100644 --- a/core/collateral/engine_test.go +++ b/core/collateral/engine_test.go @@ -30,10 +30,10 @@ import ( "code.vegaprotocol.io/vega/libs/config/encoding" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" ptypes "code.vegaprotocol.io/vega/protos/vega" - "code.vegaprotocol.io/vega/libs/proto" "github.com/golang/mock/gomock" "github.com/pkg/errors" "github.com/stretchr/testify/assert" @@ -250,7 +250,7 @@ func testTransferRewardsEmptySlice(t *testing.T) { eng := getTestEngine(t) defer eng.Finish() eng.broker.EXPECT().Send(gomock.Any()).AnyTimes() - res, err := eng.TransferRewards(context.Background(), "reward", []*types.Transfer{}) + res, err := eng.TransferRewards(context.Background(), "reward", []*types.Transfer{}, types.AccountTypeGlobalReward) assert.Nil(t, err) assert.Equal(t, 0, len(res)) } @@ -272,7 +272,7 @@ func testTransferRewardsNoRewardsAccount(t *testing.T) { }, } - res, err := eng.TransferRewards(context.Background(), "rewardAccID", transfers) + res, err := eng.TransferRewards(context.Background(), "rewardAccID", transfers, types.AccountTypeGlobalReward) require.Error(t, errors.New("account does not exists"), err) require.Nil(t, res) } @@ -300,7 +300,7 @@ func testTransferRewardsSuccess(t *testing.T) { }, } - lm, err := eng.TransferRewards(context.Background(), rewardAcc.ID, transfers) + lm, err := eng.TransferRewards(context.Background(), rewardAcc.ID, transfers, types.AccountTypeGlobalReward) require.Nil(t, err) partyAccount, _ := eng.GetAccountByID(partyAccountID) require.Equal(t, num.NewUint(1000), partyAccount.Balance) @@ -940,7 +940,7 @@ func testTransferLoss(t *testing.T) { } eng.broker.EXPECT().Send(gomock.Any()).AnyTimes() - responses, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne()) + responses, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne(), func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 2, len(responses)) resp := responses[0] @@ -1011,7 +1011,7 @@ func testTransferComplexLoss(t *testing.T) { } eng.broker.EXPECT().Send(gomock.Any()).AnyTimes() - responses, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne()) + responses, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne(), func(string) bool { return true }) assert.Equal(t, 2, len(responses)) resp := responses[0] assert.NoError(t, err) @@ -1049,7 +1049,7 @@ func testTransferLossMissingPartyAccounts(t *testing.T) { Type: types.TransferTypeLoss, }, } - resp, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne()) + resp, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne(), func(string) bool { return true }) assert.Nil(t, resp) require.Error(t, err) assert.Contains(t, err.Error(), "account does not exist:") @@ -1128,7 +1128,7 @@ func testProcessBoth(t *testing.T) { assert.Equal(t, int64(2000), acc.Balance) } }) - responses, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne()) + responses, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne(), func(string) bool { return true }) assert.Equal(t, 4, len(responses)) assert.NoError(t, err) resp := responses[0] @@ -1237,7 +1237,7 @@ func TestLossSocialization(t *testing.T) { assert.Equal(t, 534, stringToInt(acc.Balance)) } }) - raw, err := eng.FinalSettlement(context.Background(), testMarketID, transfers, num.UintOne()) + raw, err := eng.FinalSettlement(context.Background(), testMarketID, transfers, num.UintOne(), func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 4, len(raw)) @@ -1308,7 +1308,7 @@ func testSettleBalanceNotZero(t *testing.T) { r := recover() require.NotNil(t, r) }() - _, _, _ = eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC") + _, _, _ = eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC", func(string) bool { return true }) // this should return an error } @@ -1377,7 +1377,7 @@ func testProcessBothProRated(t *testing.T) { eng.broker.EXPECT().Send(gomock.Any()).AnyTimes() eng.broker.EXPECT().SendBatch(gomock.Any()).Times(2) - responses, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne()) + responses, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne(), func(string) bool { return true }) assert.Equal(t, 4, len(responses)) assert.NoError(t, err) @@ -1466,7 +1466,7 @@ func testProcessBothProRatedMTM(t *testing.T) { eng.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() // quickly get the interface mocked for this test transfers := getMTMTransfer(pos) - responses, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC") + responses, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC", func(string) bool { return true }) assert.Equal(t, 4, len(responses)) assert.NoError(t, err, "was error") assert.NotEmpty(t, raw) @@ -1516,7 +1516,7 @@ func testRemoveDistressedBalance(t *testing.T) { assert.Equal(t, num.UintZero().Add(insBalance, num.NewUint(100)).String(), acc.Balance) } }) - resp, err := eng.RemoveDistressed(context.Background(), data, testMarketID, testMarketAsset) + resp, err := eng.RemoveDistressed(context.Background(), data, testMarketID, testMarketAsset, func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 1, len(resp.Entries)) @@ -1552,7 +1552,7 @@ func testRemoveDistressedNoBalance(t *testing.T) { party: party, }, } - resp, err := eng.RemoveDistressed(context.Background(), data, testMarketID, testMarketAsset) + resp, err := eng.RemoveDistressed(context.Background(), data, testMarketID, testMarketAsset, func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 0, len(resp.Entries)) @@ -1644,7 +1644,7 @@ func testPerpFundingSuccess(t *testing.T) { } }) transfers := eng.getTestMTMTransfer(pos) - evts, raw, err := eng.PerpsFundingSettlement(context.Background(), testMarketID, transfers, testMarketAsset, nil) + evts, raw, err := eng.PerpsFundingSettlement(context.Background(), testMarketID, transfers, testMarketAsset, nil, func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 4, len(raw)) assert.NotEmpty(t, evts) @@ -1741,7 +1741,7 @@ func testPerpFundingSuccessWithRound(t *testing.T) { } }) transfers := eng.getTestMTMTransfer(pos) - evts, raw, err := eng.PerpsFundingSettlement(context.Background(), testMarketID, transfers, testMarketAsset, round) + evts, raw, err := eng.PerpsFundingSettlement(context.Background(), testMarketID, transfers, testMarketAsset, round, func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 3, len(raw)) assert.NotEmpty(t, evts) @@ -1847,7 +1847,7 @@ func testMTMSuccess(t *testing.T) { } }) transfers := eng.getTestMTMTransfer(pos) - evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC") + evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC", func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 4, len(raw)) assert.NotEmpty(t, evts) @@ -1885,7 +1885,7 @@ func TestInvalidMarketID(t *testing.T) { transfers := eng.getTestMTMTransfer(pos) invalidMarketID := testMarketID + "invalid" - evts, raw, err := eng.MarkToMarket(context.Background(), invalidMarketID, transfers, "BTC") + evts, raw, err := eng.MarkToMarket(context.Background(), invalidMarketID, transfers, "BTC", func(string) bool { return true }) assert.Error(t, err) assert.Equal(t, 0, len(raw)) assert.Empty(t, evts) @@ -1922,7 +1922,7 @@ func TestEmptyTransfer(t *testing.T) { } transfers := eng.getTestMTMTransfer(pos) - evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC") + evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC", func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 0, len(raw)) assert.Empty(t, evts) @@ -1957,7 +1957,7 @@ func TestNoMarginAccount(t *testing.T) { } transfers := eng.getTestMTMTransfer(pos) - evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC") + evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC", func(string) bool { return true }) assert.Error(t, err) assert.Equal(t, 0, len(raw)) assert.Empty(t, evts) @@ -1988,7 +1988,7 @@ func TestNoGeneralAccount(t *testing.T) { } transfers := eng.getTestMTMTransfer(pos) - evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC") + evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC", func(string) bool { return true }) assert.Error(t, err) assert.Equal(t, 0, len(raw)) assert.Empty(t, evts) @@ -2010,7 +2010,7 @@ func TestMTMNoTransfers(t *testing.T) { transfers := eng.getTestMTMTransfer(pos) // Empty list of transfers - evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC") + evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC", func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 0, len(raw)) assert.Empty(t, evts) @@ -2021,7 +2021,7 @@ func TestMTMNoTransfers(t *testing.T) { party: "test-party", } transfers = append(transfers, mt) - evts, raw, err = eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC") + evts, raw, err = eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC", func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 0, len(raw)) assert.Equal(t, len(evts), 1) @@ -2041,7 +2041,7 @@ func TestFinalSettlementNoTransfers(t *testing.T) { pos := []*types.Transfer{} - responses, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne()) + responses, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne(), func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 0, len(responses)) } @@ -2069,7 +2069,7 @@ func TestFinalSettlementNoSystemAccounts(t *testing.T) { }, } - responses, err := eng.FinalSettlement(context.Background(), "invalidMarketID", pos, num.UintOne()) + responses, err := eng.FinalSettlement(context.Background(), "invalidMarketID", pos, num.UintOne(), func(string) bool { return true }) assert.Error(t, err) assert.Equal(t, 0, len(responses)) } @@ -2112,7 +2112,7 @@ func TestFinalSettlementNotEnoughMargin(t *testing.T) { eng.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() eng.broker.EXPECT().Send(gomock.Any()).AnyTimes() - responses, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne()) + responses, err := eng.FinalSettlement(context.Background(), testMarketID, pos, num.UintOne(), func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 2, len(responses)) @@ -2198,6 +2198,104 @@ func TestGetPartyMarginEmpty(t *testing.T) { assert.NoError(t, err) } +func TestMTMLossSocializationUnderflow(t *testing.T) { + eng := getTestEngine(t) + defer eng.Finish() + lossParty1 := "lossparty1" + winParty1 := "winparty1" + winParty2 := "winparty2" + winParty3 := "winparty3" + + // create parties + eng.broker.EXPECT().Send(gomock.Any()).Times(13) + _, _ = eng.CreatePartyGeneralAccount(context.Background(), lossParty1, testMarketAsset) + margin, err := eng.CreatePartyMarginAccount(context.Background(), lossParty1, testMarketID, testMarketAsset) + eng.IncrementBalance(context.Background(), margin, num.NewUint(2)) + assert.Nil(t, err) + _, _ = eng.CreatePartyGeneralAccount(context.Background(), winParty1, testMarketAsset) + _, err = eng.CreatePartyMarginAccount(context.Background(), winParty1, testMarketID, testMarketAsset) + assert.Nil(t, err) + _, _ = eng.CreatePartyGeneralAccount(context.Background(), winParty2, testMarketAsset) + _, err = eng.CreatePartyMarginAccount(context.Background(), winParty2, testMarketID, testMarketAsset) + assert.Nil(t, err) + _, _ = eng.CreatePartyGeneralAccount(context.Background(), winParty3, testMarketAsset) + _, err = eng.CreatePartyMarginAccount(context.Background(), winParty3, testMarketID, testMarketAsset) + assert.Nil(t, err) + + // 1 party loses 3, 3 parties win 1, losing party only has a balance of 2 available + pos := []*types.Transfer{ + { + Owner: lossParty1, + Amount: &types.FinancialAmount{ + Amount: num.NewUint(3), + Asset: testMarketAsset, + }, + Type: types.TransferTypeMTMLoss, + }, + { + Owner: winParty3, + Amount: &types.FinancialAmount{ + Amount: num.NewUint(1), + Asset: testMarketAsset, + }, + Type: types.TransferTypeMTMWin, + }, + { + Owner: winParty1, + Amount: &types.FinancialAmount{ + Amount: num.NewUint(1), + Asset: testMarketAsset, + }, + Type: types.TransferTypeMTMWin, + }, + { + Owner: winParty2, + Amount: &types.FinancialAmount{ + Amount: num.NewUint(1), + Asset: testMarketAsset, + }, + Type: types.TransferTypeMTMWin, + }, + } + + eng.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() + eng.broker.EXPECT().Send(gomock.Any()).AnyTimes().Do(func(evt events.Event) { + ae, ok := evt.(accEvt) + assert.True(t, ok) + acc := ae.Account() + if acc.Owner == winParty3 && acc.Type == types.AccountTypeMargin { + assert.Equal(t, 0, stringToInt(acc.Balance)) + } + if acc.Owner == winParty1 && acc.Type == types.AccountTypeMargin { + assert.Equal(t, 0, stringToInt(acc.Balance)) + } + if acc.Owner == winParty2 && acc.Type == types.AccountTypeMargin { + assert.Equal(t, 2, stringToInt(acc.Balance)) + } + }) + transfers := eng.getTestMTMTransfer(pos) + evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC", func(string) bool { return true }) + assert.NoError(t, err) + assert.Equal(t, 4, len(raw)) + assert.NotEmpty(t, evts) + + assert.Equal(t, 1, len(raw[0].Entries)) + assert.Equal(t, num.NewUint(2), raw[0].Entries[0].ToAccountBalance) + assert.Equal(t, num.NewUint(2), raw[0].Entries[0].ToAccountBalance) + + assert.Equal(t, 1, len(raw[1].Entries)) + assert.Equal(t, num.NewUint(0), raw[1].Entries[0].ToAccountBalance) + assert.Equal(t, num.NewUint(0), raw[1].Entries[0].ToAccountBalance) + + assert.Equal(t, 1, len(raw[2].Entries)) + assert.Equal(t, num.NewUint(0), raw[2].Entries[0].ToAccountBalance) + assert.Equal(t, num.NewUint(0), raw[2].Entries[0].ToAccountBalance) + + assert.Equal(t, 1, len(raw[3].Entries)) + assert.Equal(t, num.NewUint(2), raw[3].Entries[0].ToAccountBalance) + assert.Equal(t, num.NewUint(2), raw[3].Entries[0].ToAccountBalance) +} + func TestMTMLossSocialization(t *testing.T) { eng := getTestEngine(t) defer eng.Finish() @@ -2273,7 +2371,7 @@ func TestMTMLossSocialization(t *testing.T) { } }) transfers := eng.getTestMTMTransfer(pos) - evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC") + evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC", func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 4, len(raw)) assert.NotEmpty(t, evts) @@ -3061,14 +3159,15 @@ type marketPositionFake struct { buySumProduct, sellSumProduct *num.Uint } -func (m marketPositionFake) Party() string { return m.party } -func (m marketPositionFake) Size() int64 { return m.size } -func (m marketPositionFake) Buy() int64 { return m.buy } -func (m marketPositionFake) Sell() int64 { return m.sell } -func (m marketPositionFake) Price() *num.Uint { return m.price } -func (m marketPositionFake) BuySumProduct() *num.Uint { return m.buySumProduct } -func (m marketPositionFake) SellSumProduct() *num.Uint { return m.sellSumProduct } -func (m marketPositionFake) ClearPotentials() {} +func (m marketPositionFake) AverageEntryPrice() *num.Uint { return num.UintZero() } +func (m marketPositionFake) Party() string { return m.party } +func (m marketPositionFake) Size() int64 { return m.size } +func (m marketPositionFake) Buy() int64 { return m.buy } +func (m marketPositionFake) Sell() int64 { return m.sell } +func (m marketPositionFake) Price() *num.Uint { return m.price } +func (m marketPositionFake) BuySumProduct() *num.Uint { return m.buySumProduct } +func (m marketPositionFake) SellSumProduct() *num.Uint { return m.sellSumProduct } +func (m marketPositionFake) ClearPotentials() {} func (m marketPositionFake) VWBuy() *num.Uint { if m.buy == 0 { @@ -3089,17 +3188,18 @@ type mtmFake struct { party string } -func (m mtmFake) Party() string { return m.party } -func (m mtmFake) Size() int64 { return 0 } -func (m mtmFake) Price() *num.Uint { return num.UintZero() } -func (m mtmFake) BuySumProduct() *num.Uint { return num.UintZero() } -func (m mtmFake) SellSumProduct() *num.Uint { return num.UintZero() } -func (m mtmFake) VWBuy() *num.Uint { return num.UintZero() } -func (m mtmFake) VWSell() *num.Uint { return num.UintZero() } -func (m mtmFake) Buy() int64 { return 0 } -func (m mtmFake) Sell() int64 { return 0 } -func (m mtmFake) ClearPotentials() {} -func (m mtmFake) Transfer() *types.Transfer { return m.t } +func (m mtmFake) AverageEntryPrice() *num.Uint { return num.UintZero() } +func (m mtmFake) Party() string { return m.party } +func (m mtmFake) Size() int64 { return 0 } +func (m mtmFake) Price() *num.Uint { return num.UintZero() } +func (m mtmFake) BuySumProduct() *num.Uint { return num.UintZero() } +func (m mtmFake) SellSumProduct() *num.Uint { return num.UintZero() } +func (m mtmFake) VWBuy() *num.Uint { return num.UintZero() } +func (m mtmFake) VWSell() *num.Uint { return num.UintZero() } +func (m mtmFake) Buy() int64 { return 0 } +func (m mtmFake) Sell() int64 { return 0 } +func (m mtmFake) ClearPotentials() {} +func (m mtmFake) Transfer() *types.Transfer { return m.t } func getMTMTransfer(transfers []*types.Transfer) []events.Transfer { r := make([]events.Transfer, 0, len(transfers)) @@ -3125,6 +3225,7 @@ type riskFake struct { marginShortFall *num.Uint } +func (m riskFake) AverageEntryPrice() *num.Uint { return num.UintZero() } func (m riskFake) Party() string { return m.party } func (m riskFake) Size() int64 { return m.size } func (m riskFake) Buy() int64 { return m.buy } @@ -3142,8 +3243,10 @@ func (m riskFake) Asset() string { return m.asset } func (m riskFake) MarketID() string { return "" } func (m riskFake) MarginBalance() *num.Uint { return num.UintZero() } func (m riskFake) GeneralBalance() *num.Uint { return num.UintZero() } +func (m riskFake) GeneralAccountBalance() *num.Uint { return num.UintZero() } func (m riskFake) BondBalance() *num.Uint { return num.UintZero() } func (m riskFake) MarginShortFall() *num.Uint { return m.marginShortFall } +func (m riskFake) OrderMarginBalance() *num.Uint { return num.UintZero() } type transferFees struct { tfs []*types.Transfer diff --git a/core/collateral/margins.go b/core/collateral/margins.go index 1b47c7871b..6d11a898a4 100644 --- a/core/collateral/margins.go +++ b/core/collateral/margins.go @@ -17,14 +17,14 @@ package collateral import ( "code.vegaprotocol.io/vega/core/events" - "code.vegaprotocol.io/vega/libs/num" - "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" ) type marginUpdate struct { events.MarketPosition margin *types.Account + orderMargin *types.Account general *types.Account lock *types.Account bond *types.Account @@ -52,6 +52,13 @@ func (n marginUpdate) MarginBalance() *num.Uint { return n.margin.Balance.Clone() } +func (n marginUpdate) OrderMarginBalance() *num.Uint { + if n.orderMargin == nil { + return num.UintZero() + } + return n.orderMargin.Balance.Clone() +} + // GeneralBalance here we cumulate both the general // account and bon account so other package do not have // to worry about how much funds are available in both @@ -69,6 +76,13 @@ func (n marginUpdate) GeneralBalance() *num.Uint { return num.Sum(bond, gen) } +func (n marginUpdate) GeneralAccountBalance() *num.Uint { + if n.general != nil && n.general.Balance != nil { + return n.general.Balance + } + return num.UintZero() +} + func (n marginUpdate) MarginShortFall() *num.Uint { return n.marginShortFall.Clone() } diff --git a/core/collateral/network_mtm_test.go b/core/collateral/network_mtm_test.go index 01a8032759..e4dec4f397 100644 --- a/core/collateral/network_mtm_test.go +++ b/core/collateral/network_mtm_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -116,7 +117,7 @@ func testMTMWithNetworkNoLossSoc(t *testing.T) { } }) transfers := eng.getTestMTMTransfer(pos) - evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC") + evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC", func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 3, len(raw)) assert.NotEmpty(t, evts) @@ -218,7 +219,7 @@ func testMTMWithNetworkLossSoc(t *testing.T) { } }) transfers := eng.getTestMTMTransfer(pos) - evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC") + evts, raw, err := eng.MarkToMarket(context.Background(), testMarketID, transfers, "BTC", func(string) bool { return true }) assert.NoError(t, err) assert.Equal(t, 3, len(raw)) assert.NotEmpty(t, evts) diff --git a/core/collateral/simple_distributor.go b/core/collateral/simple_distributor.go index bd730ed716..911e38fa70 100644 --- a/core/collateral/simple_distributor.go +++ b/core/collateral/simple_distributor.go @@ -72,7 +72,6 @@ func (s *simpleDistributor) Run(ctx context.Context) []events.Event { if v.request.Owner == types.NetworkParty { v := v netReq = &v - continue // network events are to be ignored } evt = events.NewLossSocializationEvent(ctx, v.request.Owner, s.marketID, loss, true, s.ts) s.log.Warn("loss socialization missing funds to be distributed", @@ -90,14 +89,16 @@ func (s *simpleDistributor) Run(ctx context.Context) []events.Event { } // last one get the remaining bits s.requests[len(s.requests)-1].request.Amount.Amount.AddSum(mismatch) - // decAmt is negative - loss := mismatch.Sub(evt.Amount().U, mismatch) + // if the remainder > the loss amount, this rounding error was profitable + // so the loss socialisation event should be flagged as profit + // profit will be true if the shortfall < mismatch amount + loss, profit := mismatch.Delta(evt.Amount().U, mismatch) evts[len(evts)-1] = events.NewLossSocializationEvent( evt.Context(), evt.PartyID(), evt.MarketID(), loss, - true, + !profit, // true if party still lost out, false if mismatch > shortfall s.ts) } return evts diff --git a/core/collateral/snapshot.go b/core/collateral/snapshot.go index 52093ef6e7..a25f965307 100644 --- a/core/collateral/snapshot.go +++ b/core/collateral/snapshot.go @@ -22,9 +22,9 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" - "code.vegaprotocol.io/vega/libs/proto" "github.com/pkg/errors" ) @@ -111,7 +111,6 @@ func (e *Engine) restoreAccounts(ctx context.Context, accs *types.CollateralAcco e.state.serialisedAccounts, err = proto.Marshal(p.IntoProto()) e.updateNextBalanceSnapshot(accs.NextBalanceSnapshot) e.snapshotBalances() - e.activeRestore = true return err } diff --git a/core/collateral/snapshot_test.go b/core/collateral/snapshot_test.go index ed06efbccc..947ef43782 100644 --- a/core/collateral/snapshot_test.go +++ b/core/collateral/snapshot_test.go @@ -33,6 +33,7 @@ import ( vgtest "code.vegaprotocol.io/vega/libs/test" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/collateral/transfer_funds_test.go b/core/collateral/transfer_funds_test.go index 4e8b0272d1..223dec3503 100644 --- a/core/collateral/transfer_funds_test.go +++ b/core/collateral/transfer_funds_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/config/flags.go b/core/config/flags.go index 8e1fc41678..d88637d477 100644 --- a/core/config/flags.go +++ b/core/config/flags.go @@ -23,6 +23,7 @@ import ( "strings" vgos "code.vegaprotocol.io/vega/libs/os" + "golang.org/x/crypto/ssh/terminal" ) diff --git a/core/config/watcher.go b/core/config/watcher.go index a40db81eb1..b0e788131a 100644 --- a/core/config/watcher.go +++ b/core/config/watcher.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + "github.com/fsnotify/fsnotify" ) diff --git a/core/coreapi/service.go b/core/coreapi/service.go index 76d11fa153..d48c17b17c 100644 --- a/core/coreapi/service.go +++ b/core/coreapi/service.go @@ -20,10 +20,9 @@ import ( "errors" "sync" - lb "code.vegaprotocol.io/vega/libs/broker" - "code.vegaprotocol.io/vega/core/broker" "code.vegaprotocol.io/vega/core/coreapi/services" + lb "code.vegaprotocol.io/vega/libs/broker" "code.vegaprotocol.io/vega/logging" apipb "code.vegaprotocol.io/vega/protos/vega/api/v1" ) diff --git a/core/coreapi/services/netlimits.go b/core/coreapi/services/netlimits.go index 4991c1de4b..5da08b6ce2 100644 --- a/core/coreapi/services/netlimits.go +++ b/core/coreapi/services/netlimits.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/subscribers" "code.vegaprotocol.io/vega/protos/vega" + "google.golang.org/protobuf/proto" ) diff --git a/core/coreapi/services/netparams.go b/core/coreapi/services/netparams.go index d46d0428f4..983045a2a3 100644 --- a/core/coreapi/services/netparams.go +++ b/core/coreapi/services/netparams.go @@ -35,6 +35,7 @@ type NetParams struct { mu sync.RWMutex netParams map[string]vegapb.NetworkParameter + isClosed bool ch chan vegapb.NetworkParameter } @@ -49,13 +50,28 @@ func NewNetParams(ctx context.Context) (netParams *NetParams) { } func (a *NetParams) consume() { - defer func() { close(a.ch) }() + defer func() { + // clear the channel before we close it + // can't use a WaitGroup as suggested because if we get to this point + // if the Push is still in progress and the queue is full, we'll + // end up in a situation where we're waiting for the queue to empty, but + // no consumer. + for range a.ch { + // do nothing just let the sender finish what it's doing and empty the channel + } + + close(a.ch) + }() + for { select { case <-a.Closed(): + a.mu.Lock() + a.isClosed = true + a.mu.Unlock() return case netParams, ok := <-a.ch: - if !ok { + if !ok || a.isClosed { // cleanup base a.Halt() // channel is closed @@ -71,6 +87,12 @@ func (a *NetParams) consume() { func (a *NetParams) Push(evts ...events.Event) { for _, e := range evts { if ae, ok := e.(netParamsE); ok { + a.mu.Lock() + if a.isClosed { + a.mu.Unlock() + return + } + a.mu.Unlock() a.ch <- ae.NetworkParameter() } } diff --git a/core/coreapi/services/netparams_test.go b/core/coreapi/services/netparams_test.go new file mode 100644 index 0000000000..bbedc960ab --- /dev/null +++ b/core/coreapi/services/netparams_test.go @@ -0,0 +1,64 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package services_test + +import ( + "context" + "sync" + "testing" + "time" + + "code.vegaprotocol.io/vega/core/coreapi/services" + "code.vegaprotocol.io/vega/core/events" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestNetParams(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + + np := services.NewNetParams(ctx) + wg := sync.WaitGroup{} + wg.Add(1) + allSent := false + + maxEvents := 1000000 + + evts := make([]events.Event, maxEvents) + + for i := 0; i < maxEvents; i++ { + evts[i] = events.NewNetworkParameterEvent(ctx, "foo", "bar") + } + + require.NotPanics(t, func() { + go func() { + np.Push( + evts..., + ) + allSent = true + wg.Done() + }() + }) + + // slight pause to give the goroutine a chance to start pushing before we cancel the context + time.Sleep(time.Millisecond) + cancel() + + wg.Wait() + + assert.True(t, allSent) +} diff --git a/core/datasource/common/data_signer.go b/core/datasource/common/data_signer.go index bdcb7a47aa..3781a4b6fa 100644 --- a/core/datasource/common/data_signer.go +++ b/core/datasource/common/data_signer.go @@ -22,7 +22,7 @@ import ( "fmt" "strings" - errors "code.vegaprotocol.io/vega/core/datasource/errors" + "code.vegaprotocol.io/vega/core/datasource/errors" "code.vegaprotocol.io/vega/libs/stringer" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" ) @@ -58,7 +58,7 @@ type SignerPubKey struct { func (s SignerPubKey) String() string { return fmt.Sprintf( "signerPubKey(%s)", - stringer.ReflectPointerToString(s.PubKey), + stringer.PtrToString(s.PubKey), ) } @@ -202,7 +202,7 @@ type SignerETHAddress struct { func (s SignerETHAddress) String() string { return fmt.Sprintf( "signerETHAddress(%s)", - stringer.ReflectPointerToString(s.ETHAddress), + stringer.PtrToString(s.ETHAddress), ) } @@ -355,7 +355,7 @@ func (s Signer) DeepClone() *Signer { } func (s Signer) String() string { - return stringer.ReflectPointerToString(s.Signer) + return stringer.ObjToString(s.Signer) } func (s Signer) IsEmpty() bool { diff --git a/core/datasource/common/data_signer_test.go b/core/datasource/common/data_signer_test.go index 2933a02fc8..2da9435938 100644 --- a/core/datasource/common/data_signer_test.go +++ b/core/datasource/common/data_signer_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/datasource/common" errors "code.vegaprotocol.io/vega/core/datasource/errors" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" ) diff --git a/core/datasource/common/data_test.go b/core/datasource/common/data_test.go index d1ec72db69..3941745232 100644 --- a/core/datasource/common/data_test.go +++ b/core/datasource/common/data_test.go @@ -19,10 +19,10 @@ import ( "testing" "code.vegaprotocol.io/vega/core/datasource/common" + "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "code.vegaprotocol.io/vega/libs/num" ) func TestOracleData(t *testing.T) { diff --git a/core/datasource/common/spec_test.go b/core/datasource/common/spec_test.go index 7748d8f861..add6b0ef47 100644 --- a/core/datasource/common/spec_test.go +++ b/core/datasource/common/spec_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/datasource/common" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" ) diff --git a/core/datasource/common/time_test.go b/core/datasource/common/time_test.go index ea50a80bed..8043ea0e2b 100644 --- a/core/datasource/common/time_test.go +++ b/core/datasource/common/time_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/core/datasource/common" "code.vegaprotocol.io/vega/libs/ptr" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" ) diff --git a/core/datasource/datasource.go b/core/datasource/datasource.go index 8d976e194d..4fb5836965 100644 --- a/core/datasource/datasource.go +++ b/core/datasource/datasource.go @@ -111,6 +111,35 @@ func (s Spec) GetDefinition() definition.Definition { return *s.Data } +type SpecBindingForCompositePrice struct { + PriceSourceProperty string +} + +func (b SpecBindingForCompositePrice) String() string { + return fmt.Sprintf( + "priceSource(%s)", + b.PriceSourceProperty, + ) +} + +func (b SpecBindingForCompositePrice) IntoProto() *vegapb.SpecBindingForCompositePrice { + return &vegapb.SpecBindingForCompositePrice{ + PriceSourceProperty: b.PriceSourceProperty, + } +} + +func (b SpecBindingForCompositePrice) DeepClone() *SpecBindingForCompositePrice { + return &SpecBindingForCompositePrice{ + PriceSourceProperty: b.PriceSourceProperty, + } +} + +func SpecBindingForCompositePriceFromProto(o *vegapb.SpecBindingForCompositePrice) *SpecBindingForCompositePrice { + return &SpecBindingForCompositePrice{ + PriceSourceProperty: o.PriceSourceProperty, + } +} + type SpecBindingForFuture struct { SettlementDataProperty string TradingTerminationProperty string diff --git a/core/datasource/definition/definition.go b/core/datasource/definition/definition.go index e96caba04f..0fe65fb286 100644 --- a/core/datasource/definition/definition.go +++ b/core/datasource/definition/definition.go @@ -247,6 +247,23 @@ func (s *Definition) IsEthCallSpec() bool { return false } +func (s *Definition) EnsureValidChainID(ids []uint64) bool { + data := s.Content() + if data != nil { + switch d := data.(type) { + case ethcallcommon.Spec: + for _, id := range ids { + if id == d.SourceChainID { + return true + } + } + return false + } + } + + return true +} + // Definition is also a `Timer`. func (s *Definition) GetTimeTriggers() common.InternalTimeTriggers { data := s.Content() diff --git a/core/datasource/definition/definition_test.go b/core/datasource/definition/definition_test.go index d7ef9df4c7..663f75f88a 100644 --- a/core/datasource/definition/definition_test.go +++ b/core/datasource/definition/definition_test.go @@ -28,6 +28,7 @@ import ( "code.vegaprotocol.io/vega/core/datasource/internal/vegatime" vegapb "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/datasource/external/ethcall/call.go b/core/datasource/external/ethcall/call.go index ffee76fbe1..66f08ea00f 100644 --- a/core/datasource/external/ethcall/call.go +++ b/core/datasource/external/ethcall/call.go @@ -38,6 +38,7 @@ type Call struct { abi abi.ABI abiJSON []byte filters dscommon.Filters + chainID uint64 } func NewCall(spec ethcallcommon.Spec) (Call, error) { @@ -85,6 +86,7 @@ func NewCall(spec ethcallcommon.Spec) (Call, error) { abiJSON: abiJSON, spec: spec, filters: filters, + chainID: spec.SourceChainID, }, nil } diff --git a/core/datasource/external/ethcall/call_test.go b/core/datasource/external/ethcall/call_test.go index 8d3612f438..bf581f53e9 100644 --- a/core/datasource/external/ethcall/call_test.go +++ b/core/datasource/external/ethcall/call_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/core/datasource/external/ethcall" ethcallcommon "code.vegaprotocol.io/vega/core/datasource/external/ethcall/common" v1 "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/datasource/external/ethcall/common/spec.go b/core/datasource/external/ethcall/common/spec.go index c910086bfd..f06689aac1 100644 --- a/core/datasource/external/ethcall/common/spec.go +++ b/core/datasource/external/ethcall/common/spec.go @@ -16,12 +16,16 @@ package common import ( + "encoding/base64" + "encoding/hex" "errors" "fmt" "sort" + "strings" "code.vegaprotocol.io/vega/core/datasource/common" vegapb "code.vegaprotocol.io/vega/protos/vega" + "google.golang.org/protobuf/types/known/structpb" ) @@ -42,6 +46,7 @@ type Spec struct { RequiredConfirmations uint64 Normalisers map[string]string Filters common.SpecFilters + SourceChainID uint64 } func SpecFromProto(proto *vegapb.EthCallSpec) (Spec, error) { @@ -60,9 +65,29 @@ func SpecFromProto(proto *vegapb.EthCallSpec) (Spec, error) { jsonArgs := []string{} for _, protoArg := range proto.Args { - jsonArg, err := protoArg.MarshalJSON() - if err != nil { - return Spec{}, errors.Join(ErrInvalidCallArgs, err) + // special case for string starting with 0x? and are 32bytes long. + // this is to match the ethereum bytes32 type + // down the line we are trying to call the contract with strings + // instead here we want to encode the value into a base64 string + // which gets unwrapped into a [32]byte by the ethereum library + var isBytes bool + var jsonArg []byte + stringValue := protoArg.GetStringValue() + + if stringValue != "" && strings.HasPrefix(stringValue, "0x") { + bytes, err := hex.DecodeString(stringValue[2:]) + if err == nil && len(bytes) == 32 { + base64Value := base64.StdEncoding.EncodeToString(bytes) + jsonArg = []byte(fmt.Sprintf("\"%v\"", base64Value)) + isBytes = true + } + } + + if !isBytes { + jsonArg, err = protoArg.MarshalJSON() + if err != nil { + return Spec{}, errors.Join(ErrInvalidCallArgs, err) + } } jsonArgs = append(jsonArgs, string(jsonArg)) } @@ -81,6 +106,7 @@ func SpecFromProto(proto *vegapb.EthCallSpec) (Spec, error) { RequiredConfirmations: proto.RequiredConfirmations, Filters: filters, Normalisers: normalisers, + SourceChainID: proto.SourceChainId, }, nil } @@ -115,6 +141,7 @@ func (s Spec) IntoProto() (*vegapb.EthCallSpec, error) { RequiredConfirmations: s.RequiredConfirmations, Filters: s.Filters.IntoProto(), Normalisers: normalisers, + SourceChainId: s.SourceChainID, }, nil } @@ -160,6 +187,7 @@ func (s Spec) DeepClone() common.DataSourceType { RequiredConfirmations: s.RequiredConfirmations, Filters: append(common.SpecFilters(nil), s.Filters...), Normalisers: clonedNormalisers, + SourceChainID: s.SourceChainID, } } diff --git a/core/datasource/external/ethcall/common/spec_test.go b/core/datasource/external/ethcall/common/spec_test.go index 0af813b1a6..422e7cff83 100644 --- a/core/datasource/external/ethcall/common/spec_test.go +++ b/core/datasource/external/ethcall/common/spec_test.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/core/datasource/external/ethcall/common" vegapb "code.vegaprotocol.io/vega/protos/vega" v1 "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" "google.golang.org/protobuf/types/known/structpb" ) diff --git a/core/datasource/external/ethcall/contract.go b/core/datasource/external/ethcall/contract.go index 028ca41e1b..eed794f5a8 100644 --- a/core/datasource/external/ethcall/contract.go +++ b/core/datasource/external/ethcall/contract.go @@ -25,11 +25,12 @@ import ( ) type ContractCallEvent struct { - BlockHeight uint64 - BlockTime uint64 - SpecId string - Result []byte - Error *string + BlockHeight uint64 + BlockTime uint64 + SpecId string + Result []byte + Error *string + SourceChainID *uint64 } func EthereumContractCallResultFromProto( @@ -41,21 +42,23 @@ func EthereumContractCallResultFromProto( } return ContractCallEvent{ - SpecId: qr.SpecId, - BlockHeight: qr.BlockHeight, - BlockTime: qr.BlockTime, - Result: qr.Result, - Error: qr.Error, + SpecId: qr.SpecId, + BlockHeight: qr.BlockHeight, + BlockTime: qr.BlockTime, + Result: qr.Result, + Error: qr.Error, + SourceChainID: qr.SourceChainId, }, nil } func (q *ContractCallEvent) IntoProto() *vegapb.EthContractCallEvent { return &vegapb.EthContractCallEvent{ - SpecId: q.SpecId, - BlockHeight: q.BlockHeight, - BlockTime: q.BlockTime, - Result: q.Result, - Error: q.Error, + SpecId: q.SpecId, + BlockHeight: q.BlockHeight, + BlockTime: q.BlockTime, + Result: q.Result, + Error: q.Error, + SourceChainId: q.SourceChainID, } } diff --git a/core/datasource/external/ethcall/engine.go b/core/datasource/external/ethcall/engine.go index 67882408e0..8a81ae0146 100644 --- a/core/datasource/external/ethcall/engine.go +++ b/core/datasource/external/ethcall/engine.go @@ -18,23 +18,27 @@ package ethcall import ( "context" "fmt" + "log" "math/big" "reflect" + "strconv" "sync" "time" "code.vegaprotocol.io/vega/core/datasource" "code.vegaprotocol.io/vega/core/datasource/external/ethcall/common" - + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/ethereum/go-ethereum" ) type EthReaderCaller interface { ethereum.ContractCaller ethereum.ChainReader + ChainID(context.Context) (*big.Int, error) } //go:generate go run github.com/golang/mock/mockgen -destination mocks/forwarder_mock.go -package mocks code.vegaprotocol.io/vega/core/datasource/external/ethcall Forwarder @@ -71,6 +75,8 @@ type Engine struct { cancelEthereumQueries context.CancelFunc poller *poller mu sync.Mutex + + chainID uint64 } func NewEngine(log *logging.Logger, cfg Config, isValidator bool, client EthReaderCaller, forwarder Forwarder) *Engine { @@ -83,10 +89,29 @@ func NewEngine(log *logging.Logger, cfg Config, isValidator bool, client EthRead calls: make(map[string]Call), poller: newPoller(cfg.PollEvery.Get()), } - return e } +// EnsureChainID tells the engine which chainID it should be related to, and it confirms this against the its client. +func (e *Engine) EnsureChainID(chainID string, confirmWithClient bool) { + e.chainID, _ = strconv.ParseUint(chainID, 10, 64) + + // if the node is a validator, we now check the chainID against the chain the client is connected to. + if confirmWithClient { + cid, err := e.client.ChainID(context.Background()) + if err != nil { + log.Panic("could not load chain ID", logging.Error(err)) + } + + if cid.Uint64() != e.chainID { + log.Panic("chain ID mismatch between ethCall engine and EVM client", + logging.Uint64("client-chain-id", cid.Uint64()), + logging.Uint64("engine-chain-id", e.chainID), + ) + } + } +} + // Start starts the polling of the Ethereum bridges, listens to the events // they emit and forward it to the network. func (e *Engine) Start() { @@ -96,10 +121,7 @@ func (e *Engine) Start() { defer cancelEthereumQueries() e.cancelEthereumQueries = cancelEthereumQueries - - if e.log.IsDebug() { - e.log.Debug("Starting ethereum contract call polling engine") - } + e.log.Info("Starting ethereum contract call polling engine", logging.Uint64("chain-id", e.chainID)) e.poller.Loop(func() { e.Poll(ctx, time.Now()) @@ -217,6 +239,12 @@ func (e *Engine) OnSpecActivated(ctx context.Context, spec datasource.Spec) erro return fmt.Errorf("failed to create data source: %w", err) } + // here ensure we are on the engine with the right network ID + // not an error, just return + if e.chainID != d.SourceChainID { + return nil + } + e.calls[id] = ethCall } @@ -239,62 +267,65 @@ func (e *Engine) Poll(ctx context.Context, wallTime time.Time) { // Instead call methods on the engine that take the mutex for a small time where needed. // We do need to make use direct use of of e.log, e.client and e.forwarder; but these are static after creation // and the methods used are safe for concurrent access. - lastEthBlock, err := e.client.BlockByNumber(ctx, nil) + lastEthBlock, err := e.client.HeaderByNumber(ctx, nil) if err != nil { e.log.Error("failed to get current block header", logging.Error(err)) return } e.log.Info("tick", + logging.Uint64("chainID", e.chainID), logging.Time("wallTime", wallTime), - logging.BigInt("ethBlock", lastEthBlock.Number()), - logging.Time("ethTime", time.Unix(int64(lastEthBlock.Time()), 0))) + logging.BigInt("ethBlock", lastEthBlock.Number), + logging.Time("ethTime", time.Unix(int64(lastEthBlock.Time), 0))) // If the previous eth block has not been set, set it to the current eth block if e.prevEthBlock == nil { - e.prevEthBlock = blockIndex{number: lastEthBlock.NumberU64(), time: lastEthBlock.Time()} + e.prevEthBlock = blockIndex{number: lastEthBlock.Number.Uint64(), time: lastEthBlock.Time} } // Go through an eth blocks one at a time until we get to the most recent one - for prevEthBlock := e.prevEthBlock; prevEthBlock.NumberU64() < lastEthBlock.NumberU64(); prevEthBlock = e.prevEthBlock { + for prevEthBlock := e.prevEthBlock; prevEthBlock.NumberU64() < lastEthBlock.Number.Uint64(); prevEthBlock = e.prevEthBlock { nextBlockNum := big.NewInt(0).SetUint64(prevEthBlock.NumberU64() + 1) - nextEthBlock, err := e.client.BlockByNumber(ctx, nextBlockNum) + nextEthBlock, err := e.client.HeaderByNumber(ctx, nextBlockNum) if err != nil { e.log.Error("failed to get next block header", logging.Error(err)) return } + nextEthBlockIsh := blockIndex{number: nextEthBlock.Number.Uint64(), time: nextEthBlock.Time} for specID, call := range e.getCalls() { - if call.triggered(prevEthBlock, nextEthBlock) { - res, err := call.Call(ctx, e.client, nextEthBlock.NumberU64()) + if call.triggered(prevEthBlock, nextEthBlockIsh) { + res, err := call.Call(ctx, e.client, nextEthBlock.Number.Uint64()) if err != nil { e.log.Error("failed to call contract", logging.Error(err)) - event := makeErrorChainEvent(err.Error(), specID, nextEthBlock) + event := makeErrorChainEvent(err.Error(), specID, nextEthBlockIsh, e.chainID) e.forwarder.ForwardFromSelf(event) continue } if res.PassesFilters { - event := makeChainEvent(res, specID, nextEthBlock) + event := makeChainEvent(res, specID, nextEthBlockIsh, e.chainID) e.forwarder.ForwardFromSelf(event) } } } - e.prevEthBlock = blockIndex{nextEthBlock.NumberU64(), nextEthBlock.Time()} + e.prevEthBlock = nextEthBlockIsh } } -func makeChainEvent(res Result, specID string, block blockish) *commandspb.ChainEvent { +func makeChainEvent(res Result, specID string, block blockish, chainID uint64) *commandspb.ChainEvent { ce := commandspb.ChainEvent{ TxId: "internal", // NA Nonce: 0, // NA Event: &commandspb.ChainEvent_ContractCall{ ContractCall: &vega.EthContractCallEvent{ - SpecId: specID, - BlockHeight: block.NumberU64(), - BlockTime: block.Time(), - Result: res.Bytes, + SpecId: specID, + BlockHeight: block.NumberU64(), + BlockTime: block.Time(), + Result: res.Bytes, + SourceChainId: ptr.From(chainID), }, }, } @@ -302,16 +333,17 @@ func makeChainEvent(res Result, specID string, block blockish) *commandspb.Chain return &ce } -func makeErrorChainEvent(errMsg string, specID string, block blockish) *commandspb.ChainEvent { +func makeErrorChainEvent(errMsg string, specID string, block blockish, chainID uint64) *commandspb.ChainEvent { ce := commandspb.ChainEvent{ TxId: "internal", // NA Nonce: 0, // NA Event: &commandspb.ChainEvent_ContractCall{ ContractCall: &vega.EthContractCallEvent{ - SpecId: specID, - BlockHeight: block.NumberU64(), - BlockTime: block.Time(), - Error: &errMsg, + SpecId: specID, + BlockHeight: block.NumberU64(), + BlockTime: block.Time(), + Error: &errMsg, + SourceChainId: ptr.From(chainID), }, }, } diff --git a/core/datasource/external/ethcall/engine_test.go b/core/datasource/external/ethcall/engine_test.go index 834ca55071..549eab4118 100644 --- a/core/datasource/external/ethcall/engine_test.go +++ b/core/datasource/external/ethcall/engine_test.go @@ -30,6 +30,7 @@ import ( "code.vegaprotocol.io/vega/core/datasource/external/ethcall/mocks" "code.vegaprotocol.io/vega/logging" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/datasource/external/ethcall/ethcall_test.go b/core/datasource/external/ethcall/ethcall_test.go index 3381ea6eca..3231d60efe 100644 --- a/core/datasource/external/ethcall/ethcall_test.go +++ b/core/datasource/external/ethcall/ethcall_test.go @@ -17,6 +17,7 @@ package ethcall_test import ( "bytes" + "context" "crypto/ecdsa" "embed" "fmt" @@ -37,12 +38,20 @@ var testData embed.FS type ToyChain struct { key *ecdsa.PrivateKey - client *backends.SimulatedBackend + client *Client addr common.Address contractAddr common.Address abiBytes []byte } +type Client struct { + *backends.SimulatedBackend +} + +func (c *Client) ChainID(context.Context) (*big.Int, error) { + return big.NewInt(1337), nil +} + func NewToyChain() (*ToyChain, error) { // Stop go-ethereum writing loads of uninteresting logs eth_log.Root().SetHandler(eth_log.DiscardHandler()) @@ -92,7 +101,7 @@ func NewToyChain() (*ToyChain, error) { return &ToyChain{ key: key, - client: client, + client: &Client{client}, addr: addr, contractAddr: contractAddr, abiBytes: contractAbiBytes, diff --git a/core/datasource/external/ethcall/json_args.go b/core/datasource/external/ethcall/json_args.go index f30290bdac..1d6f56f184 100644 --- a/core/datasource/external/ethcall/json_args.go +++ b/core/datasource/external/ethcall/json_args.go @@ -20,6 +20,7 @@ import ( "encoding/json" "fmt" "reflect" + "unsafe" "github.com/ethereum/go-ethereum/accounts/abi" ) @@ -54,9 +55,23 @@ func JsonArgsToAny(methodName string, jsonArgs []string, abiJSON []byte) ([]any, newArgValue := reflect.New(argType) // A reflect.Value of kind 'Pointer' to new instance of argType - err := json.Unmarshal([]byte(jsonArg), newArgValue.Interface()) - if err != nil { - return nil, fmt.Errorf("unable to unmarshal json argument %s: %w", jsonArg, err) + // here we handle specifically this type because the type returned by GetType() method + // is a [32]uint8, which is not assignable by the json marshaller + // we then instantiate specifically a []byte + // then set the reflect instatiated type with unsafe (...) by addressing to the first + // element of the byte slice + if argType.String() == "[32]uint8" { + b := []byte{} + err := json.Unmarshal([]byte(jsonArg), &b) + if err != nil { + return nil, fmt.Errorf("unable to unmarshal json argument %s: %w", jsonArg, err) + } + newArgValue = reflect.NewAt(argType, unsafe.Pointer(&b[0])) + } else { + err := json.Unmarshal([]byte(jsonArg), newArgValue.Interface()) + if err != nil { + return nil, fmt.Errorf("unable to unmarshal json argument %s: %w", jsonArg, err) + } } if argIsPointer { diff --git a/core/datasource/external/ethcall/json_args_test.go b/core/datasource/external/ethcall/json_args_test.go index b774f7d448..593d9845d3 100644 --- a/core/datasource/external/ethcall/json_args_test.go +++ b/core/datasource/external/ethcall/json_args_test.go @@ -20,6 +20,7 @@ import ( "testing" "code.vegaprotocol.io/vega/core/datasource/external/ethcall" + "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/datasource/external/ethcall/result.go b/core/datasource/external/ethcall/result.go index a6c75a637c..8b3ed034a6 100644 --- a/core/datasource/external/ethcall/result.go +++ b/core/datasource/external/ethcall/result.go @@ -24,6 +24,7 @@ import ( "text/scanner" ethcallcommon "code.vegaprotocol.io/vega/core/datasource/external/ethcall/common" + "github.com/PaesslerAG/gval" "github.com/PaesslerAG/jsonpath" ) diff --git a/core/datasource/external/ethverifier/l2_verifier_snapshot.go b/core/datasource/external/ethverifier/l2_verifier_snapshot.go new file mode 100644 index 0000000000..65038d2ea1 --- /dev/null +++ b/core/datasource/external/ethverifier/l2_verifier_snapshot.go @@ -0,0 +1,142 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package ethverifier + +import ( + "context" + "sort" + + "code.vegaprotocol.io/vega/core/datasource/external/ethcall" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/proto" + "code.vegaprotocol.io/vega/logging" + snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + + "golang.org/x/exp/maps" +) + +var ( + l2StateKey = (&types.PayloadL2EthOracles{}).Key() + l2HashKeys = []string{ + l2StateKey, + } +) + +func (s *L2Verifiers) Namespace() types.SnapshotNamespace { + return types.L2EthereumOraclesSnapshot +} + +func (s *L2Verifiers) Keys() []string { + return l2HashKeys +} + +func (s *L2Verifiers) Stopped() bool { + return false +} + +func (s *L2Verifiers) GetState(k string) ([]byte, []types.StateProvider, error) { + if k != s.Keys()[0] { + return nil, nil, types.ErrInvalidSnapshotNamespace + } + + ethOracles := &types.PayloadL2EthOracles{ + L2EthOracles: &snapshotpb.L2EthOracles{}, + } + + for k, v := range s.verifiers { + s.log.Debug("serialising state for evm verifier", logging.String("source-chain-id", k)) + ethOracles.L2EthOracles.ChainIdEthOracles = append( + ethOracles.L2EthOracles.ChainIdEthOracles, + &snapshotpb.ChainIdEthOracles{ + SourceChainId: k, + LastBlock: v.lastEthBlockPayloadData().IntoProto().EthOracleVerifierLastBlock, + CallResults: v.pendingContractCallEventsPayloadData().IntoProto().EthContractCallResults, + }, + ) + } + + sort.Slice(ethOracles.L2EthOracles.ChainIdEthOracles, func(i, j int) bool { + return ethOracles.L2EthOracles.ChainIdEthOracles[i].SourceChainId < ethOracles.L2EthOracles.ChainIdEthOracles[j].SourceChainId + }) + + pl := types.Payload{ + Data: ethOracles, + } + + data, err := proto.Marshal(pl.IntoProto()) + + return data, nil, err +} + +func (s *L2Verifiers) LoadState(ctx context.Context, payload *types.Payload) ([]types.StateProvider, error) { + if s.Namespace() != payload.Data.Namespace() { + return nil, types.ErrInvalidSnapshotNamespace + } + + switch pl := payload.Data.(type) { + case *types.PayloadL2EthOracles: + s.restoreState(ctx, pl.L2EthOracles) + return nil, nil + default: + return nil, types.ErrUnknownSnapshotType + } +} + +func (s *L2Verifiers) restoreState(ctx context.Context, l2EthOracles *snapshotpb.L2EthOracles) { + for _, v := range l2EthOracles.ChainIdEthOracles { + verifier, ok := s.verifiers[v.SourceChainId] + if !ok { + s.log.Panic("evm verifier for chain in snapshot, but not instantiated by network-parameter", logging.String("source-chain-id", v.SourceChainId)) + } + + s.log.Info("restoring evm verifier", logging.String("source-chain-id", v.SourceChainId)) + // might be nil so need proper check first here + var lastBlock *types.EthBlock + if v.LastBlock != nil { + lastBlock = &types.EthBlock{ + Height: v.LastBlock.BlockHeight, + Time: v.LastBlock.BlockTime, + } + } + verifier.restoreLastEthBlock(lastBlock) + + pending := []*ethcall.ContractCallEvent{} + + for _, pr := range v.CallResults.PendingContractCallResult { + pending = append(pending, ðcall.ContractCallEvent{ + BlockHeight: pr.BlockHeight, + BlockTime: pr.BlockTime, + SpecId: pr.SpecId, + Result: pr.Result, + Error: pr.Error, + }) + } + verifier.restorePendingCallEvents(ctx, pending) + } +} + +func (s *L2Verifiers) OnStateLoaded(ctx context.Context) error { + ids := maps.Keys(s.verifiers) + sort.Strings(ids) + + // restart ethCall engines + for _, v := range ids { + s.log.Info("calling OnStateLoaded for evm verifier", logging.String("source-chain-id", v)) + s.verifiers[v].OnStateLoaded(ctx) + } + + return nil +} diff --git a/core/datasource/external/ethverifier/l2_verifiers.go b/core/datasource/external/ethverifier/l2_verifiers.go new file mode 100644 index 0000000000..4d936009ed --- /dev/null +++ b/core/datasource/external/ethverifier/l2_verifiers.go @@ -0,0 +1,140 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package ethverifier + +import ( + "context" + "errors" + "fmt" + "sort" + "time" + + "code.vegaprotocol.io/vega/core/client/eth" + "code.vegaprotocol.io/vega/core/datasource/external/ethcall" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/logging" + + "golang.org/x/exp/maps" +) + +type L2Clients interface { + Get(chainID string) (*eth.L2Client, *eth.EthereumConfirmations, bool) +} + +type EthL2CallEngines interface { + GetOrInstantiate(chainID string) (EthCallEngine, error) +} + +type L2Verifiers struct { + log *logging.Logger + witness Witness + ts TimeService + broker Broker + oracleBroadcaster OracleDataBroadcaster + + isValidator bool + + clients L2Clients + + // chain id -> Verifier + verifiers map[string]*Verifier + + // eth L2 call engines + ethL2CallEngine EthL2CallEngines +} + +func NewL2Verifiers( + log *logging.Logger, + witness Witness, + ts TimeService, + broker Broker, + oracleBroadcaster OracleDataBroadcaster, + clients L2Clients, + callEngines EthL2CallEngines, + isValidator bool, +) (sv *L2Verifiers) { + return &L2Verifiers{ + log: log, + witness: witness, + ts: ts, + broker: broker, + oracleBroadcaster: oracleBroadcaster, + clients: clients, + verifiers: map[string]*Verifier{}, + ethL2CallEngine: callEngines, + isValidator: isValidator, + } +} + +func (v *L2Verifiers) OnEthereumL2ConfigsUpdated( + ctx context.Context, ethCfg *types.EthereumL2Configs, +) error { + // new L2 configured, instatiate the verifier for it. + for _, c := range ethCfg.Configs { + // if already exists, do nothing + if _, ok := v.verifiers[c.ChainID]; ok { + continue + } + v.verifiers[c.ChainID] = v.instantiate(c.ChainID) + } + + return nil +} + +func (v *L2Verifiers) instantiate(chainID string) *Verifier { + var confs *eth.EthereumConfirmations + if v.isValidator { + var ok bool + _, confs, ok = v.clients.Get(chainID) + if !ok { + v.log.Panic("ethereum client not configured for L2", + logging.String("chain-id", chainID), + ) + } + } + + ethCallEngine, err := v.ethL2CallEngine.GetOrInstantiate(chainID) + if err != nil { + v.log.Panic("could not get call engine for L2", logging.String("chain-id", chainID)) + } + + return New(v.log, v.witness, v.ts, v.broker, v.oracleBroadcaster, ethCallEngine, confs) +} + +func (v *L2Verifiers) OnTick(ctx context.Context, t time.Time) { + ids := maps.Keys(v.verifiers) + sort.Strings(ids) + for _, id := range ids { + v.verifiers[id].OnTick(ctx, t) + } +} + +func (v *L2Verifiers) ProcessEthereumContractCallResult(callEvent ethcall.ContractCallEvent) error { + if callEvent.SourceChainID == nil { + return errors.New("invalid non l2 event") + } + + verifier, ok := v.verifiers[fmt.Sprintf("%v", *callEvent.SourceChainID)] + if !ok { + return errors.New("unsupported l2 chain") + } + + return verifier.ProcessEthereumContractCallResult(callEvent) +} + +func (v *L2Verifiers) FromProtoSnapshot() {} + +func (v *L2Verifiers) ToProtoSnapshot() []byte { return nil } diff --git a/core/datasource/external/ethverifier/mocks/witness_mock.go b/core/datasource/external/ethverifier/mocks/witness_mock.go index 384659cd8b..ced6348770 100644 --- a/core/datasource/external/ethverifier/mocks/witness_mock.go +++ b/core/datasource/external/ethverifier/mocks/witness_mock.go @@ -49,16 +49,16 @@ func (mr *MockWitnessMockRecorder) RestoreResource(arg0, arg1 interface{}) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestoreResource", reflect.TypeOf((*MockWitness)(nil).RestoreResource), arg0, arg1) } -// StartCheck mocks base method. -func (m *MockWitness) StartCheck(arg0 validators.Resource, arg1 func(interface{}, bool), arg2 time.Time) error { +// StartCheckWithDelay mocks base method. +func (m *MockWitness) StartCheckWithDelay(arg0 validators.Resource, arg1 func(interface{}, bool), arg2 time.Time, arg3 int64) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StartCheck", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "StartCheckWithDelay", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(error) return ret0 } -// StartCheck indicates an expected call of StartCheck. -func (mr *MockWitnessMockRecorder) StartCheck(arg0, arg1, arg2 interface{}) *gomock.Call { +// StartCheckWithDelay indicates an expected call of StartCheckWithDelay. +func (mr *MockWitnessMockRecorder) StartCheckWithDelay(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartCheck", reflect.TypeOf((*MockWitness)(nil).StartCheck), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartCheckWithDelay", reflect.TypeOf((*MockWitness)(nil).StartCheckWithDelay), arg0, arg1, arg2, arg3) } diff --git a/core/datasource/external/ethverifier/verifier.go b/core/datasource/external/ethverifier/verifier.go index b4fa79e2fd..ea2304308d 100644 --- a/core/datasource/external/ethverifier/verifier.go +++ b/core/datasource/external/ethverifier/verifier.go @@ -25,20 +25,19 @@ import ( "code.vegaprotocol.io/vega/core/datasource/common" "code.vegaprotocol.io/vega/core/datasource/errors" - "code.vegaprotocol.io/vega/core/events" - vegapb "code.vegaprotocol.io/vega/protos/vega" - datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" - "code.vegaprotocol.io/vega/core/datasource/external/ethcall" - + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/metrics" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/core/validators" "code.vegaprotocol.io/vega/logging" + vegapb "code.vegaprotocol.io/vega/protos/vega" + datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" ) //go:generate go run github.com/golang/mock/mockgen -destination mocks/witness_mock.go -package mocks code.vegaprotocol.io/vega/core/datasource/external/ethverifier Witness type Witness interface { - StartCheck(validators.Resource, func(interface{}, bool), time.Time) error + StartCheckWithDelay(validators.Resource, func(interface{}, bool), time.Time, int64) error RestoreResource(validators.Resource, func(interface{}, bool)) error } @@ -107,9 +106,6 @@ type Verifier struct { mu sync.Mutex hashes map[string]struct{} - - // snapshot data - snapshotState *verifierSnapshotState } type pendingCallEvent struct { @@ -122,6 +118,7 @@ func (p pendingCallEvent) GetID() string { return p.callEvent.Hash() } func (p pendingCallEvent) GetType() types.NodeVoteType { return types.NodeVoteTypeEthereumContractCallResult } + func (p *pendingCallEvent) Check(ctx context.Context) error { return p.check(ctx) } func New( @@ -143,7 +140,6 @@ func New( ethEngine: ethCallEngine, ethConfirmations: ethConfirmations, hashes: map[string]struct{}{}, - snapshotState: &verifierSnapshotState{}, } return s } @@ -181,23 +177,32 @@ func (s *Verifier) ProcessEthereumContractCallResult(callEvent ethcall.ContractC check: func(ctx context.Context) error { return s.checkCallEventResult(ctx, callEvent) }, } + confirmations, err := s.ethEngine.GetRequiredConfirmations(callEvent.SpecId) + if err != nil { + return err + } + s.pendingCallEvents = append(s.pendingCallEvents, pending) s.log.Info("ethereum call event received, starting validation", logging.String("call-event", fmt.Sprintf("%+v", callEvent))) // Timeout for the check set to 1 day, to allow for validator outage scenarios - err := s.witness.StartCheck( - pending, s.onCallEventVerified, s.timeService.GetTimeNow().Add(24*time.Hour)) + err = s.witness.StartCheckWithDelay( + pending, s.onCallEventVerified, s.timeService.GetTimeNow().Add(30*time.Minute), int64(confirmations)) if err != nil { s.log.Error("could not start witness routine", logging.String("id", pending.GetID())) s.removePendingCallEvent(pending.GetID()) } + metrics.DataSourceEthVerifierCallGaugeAdd(1, callEvent.SpecId) + return err } func (s *Verifier) checkCallEventResult(ctx context.Context, callEvent ethcall.ContractCallEvent) error { + metrics.DataSourceEthVerifierCallCounterInc(callEvent.SpecId) + // Ensure that the ethtime on the call event matches the block number on the eth chain // (submitting call events with malicious times could subvert, e.g. TWAPs on perp markets) checkedTime, err := s.ethEngine.GetEthTime(ctx, callEvent.BlockHeight) @@ -210,6 +215,7 @@ func (s *Verifier) checkCallEventResult(ctx context.Context, callEvent ethcall.C callEvent.BlockHeight, callEvent.BlockTime, checkedTime) } + metrics.DataSourceEthVerifierCallCounterInc(callEvent.SpecId) checkResult, err := s.ethEngine.CallSpec(ctx, callEvent.SpecId, callEvent.BlockHeight) if callEvent.Error != nil { if err != nil { @@ -273,6 +279,8 @@ func (s *Verifier) onCallEventVerified(event interface{}, ok bool) { if err := s.removePendingCallEvent(pv.GetID()); err != nil { s.log.Error("could not remove pending call event", logging.Error(err)) + } else { + metrics.DataSourceEthVerifierCallGaugeAdd(-1, pv.callEvent.SpecId) } if ok { diff --git a/core/datasource/external/ethverifier/verifier_snapshot.go b/core/datasource/external/ethverifier/verifier_snapshot.go index c152179802..38bcade0cf 100644 --- a/core/datasource/external/ethverifier/verifier_snapshot.go +++ b/core/datasource/external/ethverifier/verifier_snapshot.go @@ -20,10 +20,10 @@ import ( "fmt" "code.vegaprotocol.io/vega/core/datasource/external/ethcall" + "code.vegaprotocol.io/vega/core/metrics" "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/logging" - "code.vegaprotocol.io/vega/libs/proto" + "code.vegaprotocol.io/vega/logging" ) var ( @@ -34,55 +34,56 @@ var ( } ) -type verifierSnapshotState struct { - serialisedPendingCallEvents []byte - serialisedLastEthBlock []byte -} - -func (s *Verifier) serialisePendingContractCallEvents() ([]byte, error) { - s.log.Info("serialising pending call events", logging.Int("n", len(s.pendingCallEvents))) +func (s *Verifier) pendingContractCallEventsPayloadData() *types.PayloadEthContractCallEvent { pendingCallEvents := make([]*ethcall.ContractCallEvent, 0, len(s.pendingCallEvents)) for _, p := range s.pendingCallEvents { pendingCallEvents = append(pendingCallEvents, &p.callEvent) } + return &types.PayloadEthContractCallEvent{ + EthContractCallEvent: pendingCallEvents, + } +} + +func (s *Verifier) serialisePendingContractCallEvents() ([]byte, error) { + s.log.Info("serialising pending call events", logging.Int("n", len(s.pendingCallEvents))) + pl := types.Payload{ - Data: &types.PayloadEthContractCallEvent{ - EthContractCallEvent: pendingCallEvents, - }, + Data: s.pendingContractCallEventsPayloadData(), } + return proto.Marshal(pl.IntoProto()) } -func (s *Verifier) serialiseLastEthBlock() ([]byte, error) { - s.log.Info("serialising last eth block", logging.String("last-eth-block", fmt.Sprintf("%+v", s.lastBlock))) - - var pl types.Payload +func (s *Verifier) lastEthBlockPayloadData() *types.PayloadEthOracleLastBlock { if s.lastBlock != nil { - pl = types.Payload{ - Data: &types.PayloadEthOracleLastBlock{ - EthOracleLastBlock: &types.EthBlock{ - Height: s.lastBlock.Height, - Time: s.lastBlock.Time, - }, + return &types.PayloadEthOracleLastBlock{ + EthOracleLastBlock: &types.EthBlock{ + Height: s.lastBlock.Height, + Time: s.lastBlock.Time, }, } - } else { - pl = types.Payload{ - Data: &types.PayloadEthOracleLastBlock{}, - } + } + + return &types.PayloadEthOracleLastBlock{} +} + +func (s *Verifier) serialiseLastEthBlock() ([]byte, error) { + s.log.Info("serialising last eth block", logging.String("last-eth-block", fmt.Sprintf("%+v", s.lastBlock))) + + pl := types.Payload{ + Data: s.lastEthBlockPayloadData(), } return proto.Marshal(pl.IntoProto()) } -func (s *Verifier) serialiseK(serialFunc func() ([]byte, error), dataField *[]byte) ([]byte, error) { +func (s *Verifier) serialiseK(serialFunc func() ([]byte, error)) ([]byte, error) { data, err := serialFunc() if err != nil { return nil, err } - *dataField = data return data, nil } @@ -90,9 +91,9 @@ func (s *Verifier) serialiseK(serialFunc func() ([]byte, error), dataField *[]by func (s *Verifier) serialise(k string) ([]byte, error) { switch k { case contractCall: - return s.serialiseK(s.serialisePendingContractCallEvents, &s.snapshotState.serialisedPendingCallEvents) + return s.serialiseK(s.serialisePendingContractCallEvents) case lastEthBlock: - return s.serialiseK(s.serialiseLastEthBlock, &s.snapshotState.serialisedLastEthBlock) + return s.serialiseK(s.serialiseLastEthBlock) default: return nil, types.ErrSnapshotKeyDoesNotExist } @@ -122,9 +123,11 @@ func (s *Verifier) LoadState(ctx context.Context, payload *types.Payload) ([]typ switch pl := payload.Data.(type) { case *types.PayloadEthContractCallEvent: - return nil, s.restorePendingCallEvents(ctx, pl.EthContractCallEvent, payload) + s.restorePendingCallEvents(ctx, pl.EthContractCallEvent) + return nil, nil case *types.PayloadEthOracleLastBlock: - return nil, s.restoreLastEthBlock(pl.EthOracleLastBlock, payload) + s.restoreLastEthBlock(pl.EthOracleLastBlock) + return nil, nil default: return nil, types.ErrUnknownSnapshotType } @@ -141,25 +144,26 @@ func (s *Verifier) OnStateLoaded(ctx context.Context) error { return nil } -func (s *Verifier) restoreLastEthBlock(lastBlock *types.EthBlock, p *types.Payload) error { +func (s *Verifier) restoreLastEthBlock(lastBlock *types.EthBlock) { s.log.Info("restoring last eth block", logging.String("last-eth-block", fmt.Sprintf("%+v", lastBlock))) s.lastBlock = lastBlock - - var err error - if s.snapshotState.serialisedLastEthBlock, err = proto.Marshal(p.IntoProto()); err != nil { - return fmt.Errorf("failed to unmarshal payload: %w", err) - } - - return nil } func (s *Verifier) restorePendingCallEvents(_ context.Context, - results []*ethcall.ContractCallEvent, p *types.Payload, -) error { + results []*ethcall.ContractCallEvent, +) { s.log.Debug("restoring pending call events snapshot", logging.Int("n_pending", len(results))) s.pendingCallEvents = make([]*pendingCallEvent, 0, len(results)) + // clear up all the metrics + seenSpecId := map[string]struct{}{} + for _, callEvent := range results { + if _, ok := seenSpecId[callEvent.SpecId]; !ok { + metrics.DataSourceEthVerifierCallGaugeReset(callEvent.SpecId) + seenSpecId[callEvent.SpecId] = struct{}{} + } + // this populates the id/hash structs if !s.ensureNotDuplicate(callEvent.Hash()) { s.log.Panic("pendingCallEvents's unexpectedly pre-populated when restoring from snapshot") @@ -175,12 +179,7 @@ func (s *Verifier) restorePendingCallEvents(_ context.Context, if err := s.witness.RestoreResource(pending, s.onCallEventVerified); err != nil { s.log.Panic("unable to restore pending call event resource", logging.String("ID", pending.GetID()), logging.Error(err)) } - } - var err error - if s.snapshotState.serialisedPendingCallEvents, err = proto.Marshal(p.IntoProto()); err != nil { - return fmt.Errorf("failed to unmarshal payload: %w", err) + metrics.DataSourceEthVerifierCallGaugeAdd(1, callEvent.SpecId) } - - return nil } diff --git a/core/datasource/external/ethverifier/verifier_snapshot_test.go b/core/datasource/external/ethverifier/verifier_snapshot_test.go index 83b8952b3d..561b4eb432 100644 --- a/core/datasource/external/ethverifier/verifier_snapshot_test.go +++ b/core/datasource/external/ethverifier/verifier_snapshot_test.go @@ -83,15 +83,15 @@ func TestEthereumOracleVerifierWithPendingQueryResults(t *testing.T) { eov.ethCallEngine.EXPECT().GetEthTime(gomock.Any(), uint64(5)).Return(uint64(100), nil) eov.ethCallEngine.EXPECT().CallSpec(gomock.Any(), "testspec", uint64(5)).Return(result, nil) eov.ethCallEngine.EXPECT().GetInitialTriggerTime("testspec").Return(uint64(90), nil) - eov.ethCallEngine.EXPECT().GetRequiredConfirmations("testspec").Return(uint64(5), nil) + eov.ethCallEngine.EXPECT().GetRequiredConfirmations("testspec").Return(uint64(5), nil).Times(2) eov.ts.EXPECT().GetTimeNow().Times(1) eov.ethConfirmations.EXPECT().CheckRequiredConfirmations(uint64(5), uint64(5)).Return(nil) var checkResult error - eov.witness.EXPECT().StartCheck(gomock.Any(), gomock.Any(), gomock.Any()). + eov.witness.EXPECT().StartCheckWithDelay(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). Times(1). - DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time) error { + DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time, _ int64) error { checkResult = toCheck.Check(context.Background()) return nil }) diff --git a/core/datasource/external/ethverifier/verifier_test.go b/core/datasource/external/ethverifier/verifier_test.go index 04797ab7bb..3a68a81d5d 100644 --- a/core/datasource/external/ethverifier/verifier_test.go +++ b/core/datasource/external/ethverifier/verifier_test.go @@ -24,21 +24,18 @@ import ( "testing" "time" + mocks2 "code.vegaprotocol.io/vega/core/broker/mocks" + "code.vegaprotocol.io/vega/core/client/eth" "code.vegaprotocol.io/vega/core/datasource/common" + "code.vegaprotocol.io/vega/core/datasource/external/ethcall" "code.vegaprotocol.io/vega/core/datasource/external/ethverifier" "code.vegaprotocol.io/vega/core/datasource/external/ethverifier/mocks" omocks "code.vegaprotocol.io/vega/core/datasource/spec/mocks" "code.vegaprotocol.io/vega/core/events" - vegapb "code.vegaprotocol.io/vega/protos/vega" - datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" - - mocks2 "code.vegaprotocol.io/vega/core/broker/mocks" - - "code.vegaprotocol.io/vega/core/client/eth" - "code.vegaprotocol.io/vega/core/datasource/external/ethcall" - "code.vegaprotocol.io/vega/core/validators" "code.vegaprotocol.io/vega/logging" + vegapb "code.vegaprotocol.io/vega/protos/vega" + datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" @@ -103,12 +100,13 @@ func testSpoofedEthTimeFails(t *testing.T) { assert.NotNil(t, eov) eov.ethCallEngine.EXPECT().GetEthTime(gomock.Any(), uint64(1)).Return(uint64(50), nil) + eov.ethCallEngine.EXPECT().GetRequiredConfirmations(gomock.Any()).Return(uint64(0), nil) eov.ts.EXPECT().GetTimeNow().Times(1) var checkResult error - eov.witness.EXPECT().StartCheck(gomock.Any(), gomock.Any(), gomock.Any()). + eov.witness.EXPECT().StartCheckWithDelay(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). Times(1). - DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time) error { + DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time, _ int64) error { checkResult = toCheck.Check(context.Background()) return nil }) @@ -126,6 +124,7 @@ func testProcessEthereumOracleChainEventWithGlobalError(t *testing.T) { testError := "test error" eov.ethCallEngine.EXPECT().GetEthTime(gomock.Any(), uint64(1)).Return(uint64(100), nil) eov.ethCallEngine.EXPECT().CallSpec(gomock.Any(), "testspec", uint64(1)).Return(ethcall.Result{}, errors.New(testError)) + eov.ethCallEngine.EXPECT().GetRequiredConfirmations(gomock.Any()).Return(uint64(0), nil) now := time.Now() eov.ts.EXPECT().GetTimeNow().Return(now).Times(1) @@ -133,9 +132,9 @@ func testProcessEthereumOracleChainEventWithGlobalError(t *testing.T) { var onQueryResultVerified func(interface{}, bool) var checkResult error var resourceToCheck interface{} - eov.witness.EXPECT().StartCheck(gomock.Any(), gomock.Any(), gomock.Any()). + eov.witness.EXPECT().StartCheckWithDelay(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). Times(1). - DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time) error { + DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time, _ int64) error { resourceToCheck = toCheck onQueryResultVerified = fn checkResult = toCheck.Check(context.Background()) @@ -191,11 +190,12 @@ func testProcessEthereumOracleChainEventWithLocalError(t *testing.T) { now := time.Now() eov.ts.EXPECT().GetTimeNow().Return(now).Times(1) + eov.ethCallEngine.EXPECT().GetRequiredConfirmations(gomock.Any()).Return(uint64(0), nil) var checkResult error - eov.witness.EXPECT().StartCheck(gomock.Any(), gomock.Any(), gomock.Any()). + eov.witness.EXPECT().StartCheckWithDelay(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). Times(1). - DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time) error { + DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time, _ int64) error { checkResult = toCheck.Check(context.Background()) return nil }) @@ -225,11 +225,12 @@ func testProcessEthereumOracleChainEventWithMismatchedError(t *testing.T) { now := time.Now() eov.ts.EXPECT().GetTimeNow().Return(now).Times(1) + eov.ethCallEngine.EXPECT().GetRequiredConfirmations(gomock.Any()).Return(uint64(0), nil) var checkResult error - eov.witness.EXPECT().StartCheck(gomock.Any(), gomock.Any(), gomock.Any()). + eov.witness.EXPECT().StartCheckWithDelay(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). Times(1). - DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time) error { + DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time, _ int64) error { checkResult = toCheck.Check(context.Background()) return nil }) @@ -257,7 +258,7 @@ func testProcessEthereumOracleQueryOK(t *testing.T) { eov.ethCallEngine.EXPECT().CallSpec(gomock.Any(), "testspec", uint64(1)).Return(result, nil) eov.ethCallEngine.EXPECT().MakeResult("testspec", []byte("testbytes")).Return(result, nil) - eov.ethCallEngine.EXPECT().GetRequiredConfirmations("testspec").Return(uint64(5), nil) + eov.ethCallEngine.EXPECT().GetRequiredConfirmations("testspec").Return(uint64(5), nil).Times(2) eov.ts.EXPECT().GetTimeNow().Times(1) eov.ethCallEngine.EXPECT().GetInitialTriggerTime("testspec").Return(uint64(90), nil) @@ -266,9 +267,9 @@ func testProcessEthereumOracleQueryOK(t *testing.T) { var onQueryResultVerified func(interface{}, bool) var checkResult error var resourceToCheck interface{} - eov.witness.EXPECT().StartCheck(gomock.Any(), gomock.Any(), gomock.Any()). + eov.witness.EXPECT().StartCheckWithDelay(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). Times(1). - DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time) error { + DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time, _ int64) error { resourceToCheck = toCheck onQueryResultVerified = fn checkResult = toCheck.Check(context.Background()) @@ -311,10 +312,12 @@ func testProcessEthereumOracleQueryWithBlockTimeBeforeInitialTime(t *testing.T) eov.ts.EXPECT().GetTimeNow().Times(1) eov.ethCallEngine.EXPECT().GetInitialTriggerTime("testspec").Return(uint64(110), nil) + eov.ethCallEngine.EXPECT().GetRequiredConfirmations(gomock.Any()).Return(uint64(0), nil) + var checkResult error - eov.witness.EXPECT().StartCheck(gomock.Any(), gomock.Any(), gomock.Any()). + eov.witness.EXPECT().StartCheckWithDelay(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). Times(1). - DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time) error { + DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time, _ int64) error { checkResult = toCheck.Check(context.Background()) return nil }) @@ -334,11 +337,12 @@ func testProcessEthereumOracleQueryResultMismatch(t *testing.T) { eov.ethCallEngine.EXPECT().GetEthTime(gomock.Any(), uint64(1)).Return(uint64(100), nil) eov.ethCallEngine.EXPECT().CallSpec(gomock.Any(), "testspec", uint64(1)).Return(result, nil) eov.ts.EXPECT().GetTimeNow().Times(1) + eov.ethCallEngine.EXPECT().GetRequiredConfirmations(gomock.Any()).Return(uint64(0), nil) var checkResult error - eov.witness.EXPECT().StartCheck(gomock.Any(), gomock.Any(), gomock.Any()). + eov.witness.EXPECT().StartCheckWithDelay(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). Times(1). - DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time) error { + DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time, _ int64) error { checkResult = toCheck.Check(context.Background()) return nil }) @@ -356,16 +360,16 @@ func testProcessEthereumOracleFilterMismatch(t *testing.T) { result := filterMismatchResult() eov.ethCallEngine.EXPECT().GetEthTime(gomock.Any(), uint64(1)).Return(uint64(100), nil) eov.ethCallEngine.EXPECT().CallSpec(gomock.Any(), "testspec", uint64(1)).Return(result, nil) - eov.ethCallEngine.EXPECT().GetRequiredConfirmations("testspec").Return(uint64(5), nil) + eov.ethCallEngine.EXPECT().GetRequiredConfirmations("testspec").Return(uint64(5), nil).Times(2) eov.ts.EXPECT().GetTimeNow().Times(1) eov.ethCallEngine.EXPECT().GetInitialTriggerTime("testspec").Return(uint64(90), nil) eov.ethConfirmations.EXPECT().CheckRequiredConfirmations(uint64(1), uint64(5)).Return(nil) var checkResult error - eov.witness.EXPECT().StartCheck(gomock.Any(), gomock.Any(), gomock.Any()). + eov.witness.EXPECT().StartCheckWithDelay(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). Times(1). - DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time) error { + DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time, _ int64) error { checkResult = toCheck.Check(context.Background()) return nil }) @@ -383,16 +387,16 @@ func testProcessEthereumOracleInsufficientConfirmations(t *testing.T) { result := okResult() eov.ethCallEngine.EXPECT().GetEthTime(gomock.Any(), uint64(1)).Return(uint64(100), nil) eov.ethCallEngine.EXPECT().CallSpec(gomock.Any(), "testspec", uint64(1)).Return(result, nil) - eov.ethCallEngine.EXPECT().GetRequiredConfirmations("testspec").Return(uint64(5), nil) + eov.ethCallEngine.EXPECT().GetRequiredConfirmations("testspec").Return(uint64(5), nil).Times(2) eov.ts.EXPECT().GetTimeNow().Times(1) eov.ethCallEngine.EXPECT().GetInitialTriggerTime("testspec").Return(uint64(90), nil) eov.ethConfirmations.EXPECT().CheckRequiredConfirmations(uint64(1), uint64(5)).Return(eth.ErrMissingConfirmations) var checkResult error - eov.witness.EXPECT().StartCheck(gomock.Any(), gomock.Any(), gomock.Any()). + eov.witness.EXPECT().StartCheckWithDelay(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). Times(1). - DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time) error { + DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time, _ int64) error { checkResult = toCheck.Check(context.Background()) return nil }) @@ -411,16 +415,16 @@ func testProcessEthereumOracleQueryDuplicateIgnored(t *testing.T) { result := okResult() eov.ethCallEngine.EXPECT().GetEthTime(gomock.Any(), uint64(1)).Return(uint64(100), nil) eov.ethCallEngine.EXPECT().CallSpec(gomock.Any(), "testspec", uint64(1)).Return(result, nil) - eov.ethCallEngine.EXPECT().GetRequiredConfirmations("testspec").Return(uint64(5), nil) + eov.ethCallEngine.EXPECT().GetRequiredConfirmations("testspec").Return(uint64(5), nil).Times(2) eov.ts.EXPECT().GetTimeNow().Times(1) eov.ethCallEngine.EXPECT().GetInitialTriggerTime("testspec").Return(uint64(90), nil) eov.ethConfirmations.EXPECT().CheckRequiredConfirmations(uint64(1), uint64(5)).Return(nil) var checkResult error - eov.witness.EXPECT().StartCheck(gomock.Any(), gomock.Any(), gomock.Any()). + eov.witness.EXPECT().StartCheckWithDelay(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). Times(1). - DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time) error { + DoAndReturn(func(toCheck validators.Resource, fn func(interface{}, bool), _ time.Time, _ int64) error { checkResult = toCheck.Check(context.Background()) return nil }) diff --git a/core/datasource/external/openoracle/openoracle_test.go b/core/datasource/external/openoracle/openoracle_test.go index 471be22606..290d17d95e 100644 --- a/core/datasource/external/openoracle/openoracle_test.go +++ b/core/datasource/external/openoracle/openoracle_test.go @@ -20,6 +20,7 @@ import ( "testing" "code.vegaprotocol.io/vega/core/datasource/external/openoracle" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/datasource/external/signedoracle/signedoracle_test.go b/core/datasource/external/signedoracle/signedoracle_test.go index 4f4098e2af..e5d7fc4919 100644 --- a/core/datasource/external/signedoracle/signedoracle_test.go +++ b/core/datasource/external/signedoracle/signedoracle_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/datasource/external/signedoracle" vegapb "code.vegaprotocol.io/vega/protos/vega" v1 "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" ) diff --git a/core/datasource/internal/timetrigger/timetrigger_test.go b/core/datasource/internal/timetrigger/timetrigger_test.go index a2a903db0f..4753d73e59 100644 --- a/core/datasource/internal/timetrigger/timetrigger_test.go +++ b/core/datasource/internal/timetrigger/timetrigger_test.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/core/datasource/internal/timetrigger" vegapb "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" ) diff --git a/core/datasource/internal/vegatime/vegatime_test.go b/core/datasource/internal/vegatime/vegatime_test.go index cc2a5e20ca..342ef50d2a 100644 --- a/core/datasource/internal/vegatime/vegatime_test.go +++ b/core/datasource/internal/vegatime/vegatime_test.go @@ -24,6 +24,7 @@ import ( vegapb "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" v1 "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" ) diff --git a/core/datasource/spec/adaptors/json_test.go b/core/datasource/spec/adaptors/json_test.go index 82ded3a6e9..683ff17542 100644 --- a/core/datasource/spec/adaptors/json_test.go +++ b/core/datasource/spec/adaptors/json_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/core/datasource/spec/adaptors" "code.vegaprotocol.io/vega/libs/crypto" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/datasource/spec/engine_test.go b/core/datasource/spec/engine_test.go index 1885712928..de025c74bf 100644 --- a/core/datasource/spec/engine_test.go +++ b/core/datasource/spec/engine_test.go @@ -33,6 +33,7 @@ import ( "code.vegaprotocol.io/vega/logging" vegapb "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/datasource/spec/validation/internal_test.go b/core/datasource/spec/validation/internal_test.go index 7d6108ea26..5abe1f8a67 100644 --- a/core/datasource/spec/validation/internal_test.go +++ b/core/datasource/spec/validation/internal_test.go @@ -19,6 +19,7 @@ import ( "testing" "code.vegaprotocol.io/vega/core/datasource/spec/validation" + "github.com/stretchr/testify/require" ) diff --git a/core/delegation/checkpoint.go b/core/delegation/checkpoint.go index db5f40dcc0..d15e0fd341 100644 --- a/core/delegation/checkpoint.go +++ b/core/delegation/checkpoint.go @@ -23,9 +23,8 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" - checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" - "code.vegaprotocol.io/vega/libs/proto" + checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" ) func (e *Engine) Name() types.CheckpointName { diff --git a/core/delegation/checkpoint_backcompatibility_test.go b/core/delegation/checkpoint_backcompatibility_test.go index 54ba14bb50..bd0328196f 100644 --- a/core/delegation/checkpoint_backcompatibility_test.go +++ b/core/delegation/checkpoint_backcompatibility_test.go @@ -20,13 +20,12 @@ import ( "context" "testing" - "github.com/stretchr/testify/require" - - "code.vegaprotocol.io/vega/libs/num" - "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" ) func TestCheckpointBackwardCompatibility(t *testing.T) { diff --git a/core/delegation/engine_test.go b/core/delegation/engine_test.go index 6e65d82bbf..6fb8cb0e16 100644 --- a/core/delegation/engine_test.go +++ b/core/delegation/engine_test.go @@ -38,6 +38,7 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/delegation/snapshot.go b/core/delegation/snapshot.go index 69dc7b465d..06373327d1 100644 --- a/core/delegation/snapshot.go +++ b/core/delegation/snapshot.go @@ -21,9 +21,8 @@ import ( "time" "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/logging" - "code.vegaprotocol.io/vega/libs/proto" + "code.vegaprotocol.io/vega/logging" ) var hashKeys = []string{ diff --git a/core/docs/chain-replay.md b/core/docs/chain-replay.md index bba529d610..25e24eae5d 100644 --- a/core/docs/chain-replay.md +++ b/core/docs/chain-replay.md @@ -62,11 +62,11 @@ Instead of a backup, which effectively replays the full chain from genesis, you ## References -- https://github.com/tendermint/tendermint/blob/master/docs/introduction/quick-start.md +- https://github.com/cometbft/cometbft/blob/master/docs/introduction/quick-start.md - https://docs.tendermint.com/master/spec/abci/apps.html - https://github.com/tendermint/spec/blob/master/spec/abci/README.md - https://docs.tendermint.com/master/spec/abci/apps.html#state-sync [wallet]: https://github.com/vegaprotocol/vega#configuration [gcloud]: https://cloud.google.com/sdk/docs/install -[tendermint]: https://github.com/tendermint/tendermint/blob/master/docs/introduction/install.md \ No newline at end of file +[tendermint]: https://github.com/cometbft/cometbft/blob/master/docs/introduction/install.md \ No newline at end of file diff --git a/core/epochtime/service.go b/core/epochtime/service.go index bca99e7871..256d19058b 100644 --- a/core/epochtime/service.go +++ b/core/epochtime/service.go @@ -21,11 +21,10 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - - "code.vegaprotocol.io/vega/libs/proto" ) type Broker interface { diff --git a/core/epochtime/snapshot.go b/core/epochtime/snapshot.go index 08f60cb648..f94c8fc054 100644 --- a/core/epochtime/snapshot.go +++ b/core/epochtime/snapshot.go @@ -19,9 +19,8 @@ import ( "context" "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/protos/vega" - "code.vegaprotocol.io/vega/libs/proto" + "code.vegaprotocol.io/vega/protos/vega" ) func (s *Svc) serialise() error { diff --git a/core/epochtime/snapshot_test.go b/core/epochtime/snapshot_test.go index a41165e0bb..636984c5b8 100644 --- a/core/epochtime/snapshot_test.go +++ b/core/epochtime/snapshot_test.go @@ -22,12 +22,12 @@ import ( "time" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/crypto" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "code.vegaprotocol.io/vega/libs/crypto" - "code.vegaprotocol.io/vega/libs/proto" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/core/events/asset_test.go b/core/events/asset_test.go index 1bd114d566..a359495936 100644 --- a/core/events/asset_test.go +++ b/core/events/asset_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" proto "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/assert" ) diff --git a/core/events/bus.go b/core/events/bus.go index 93811a48b5..b42198bac7 100644 --- a/core/events/bus.go +++ b/core/events/bus.go @@ -165,6 +165,10 @@ const ( PaidLiquidityFeesStatsEvent VestingBalancesSummaryEvent TransferFeesEvent + TransferFeesDiscountUpdatedEvent + PartyMarginModeUpdatedEvent + PartyProfileUpdatedEvent + TeamsStatsUpdatedEvent ) var ( @@ -260,7 +264,11 @@ var ( eventspb.BusEventType_BUS_EVENT_TYPE_PAID_LIQUIDITY_FEES_STATS_UPDATED: PaidLiquidityFeesStatsEvent, eventspb.BusEventType_BUS_EVENT_TYPE_VESTING_SUMMARY: VestingBalancesSummaryEvent, eventspb.BusEventType_BUS_EVENT_TYPE_TRANSFER_FEES_PAID: TransferFeesEvent, - // If adding a type here, please also add it to data-node/broker/convert.go + eventspb.BusEventType_BUS_EVENT_TYPE_TRANSFER_FEES_DISCOUNT_UPDATED: TransferFeesDiscountUpdatedEvent, + eventspb.BusEventType_BUS_EVENT_TYPE_PARTY_MARGIN_MODE_UPDATED: PartyMarginModeUpdatedEvent, + eventspb.BusEventType_BUS_EVENT_TYPE_PARTY_PROFILE_UPDATED: PartyProfileUpdatedEvent, + eventspb.BusEventType_BUS_EVENT_TYPE_TEAMS_STATS_UPDATED: TeamsStatsUpdatedEvent, + // If adding a type here, please also add it to datanode/broker/convert.go } toProto = map[Type]eventspb.BusEventType{ @@ -346,7 +354,11 @@ var ( PaidLiquidityFeesStatsEvent: eventspb.BusEventType_BUS_EVENT_TYPE_PAID_LIQUIDITY_FEES_STATS_UPDATED, VestingBalancesSummaryEvent: eventspb.BusEventType_BUS_EVENT_TYPE_VESTING_SUMMARY, TransferFeesEvent: eventspb.BusEventType_BUS_EVENT_TYPE_TRANSFER_FEES_PAID, - // If adding a type here, please also add it to data-node/broker/convert.go + TransferFeesDiscountUpdatedEvent: eventspb.BusEventType_BUS_EVENT_TYPE_TRANSFER_FEES_DISCOUNT_UPDATED, + PartyMarginModeUpdatedEvent: eventspb.BusEventType_BUS_EVENT_TYPE_PARTY_MARGIN_MODE_UPDATED, + PartyProfileUpdatedEvent: eventspb.BusEventType_BUS_EVENT_TYPE_PARTY_PROFILE_UPDATED, + TeamsStatsUpdatedEvent: eventspb.BusEventType_BUS_EVENT_TYPE_TEAMS_STATS_UPDATED, + // If adding a type here, please also add it to datanode/broker/convert.go } eventStrings = map[Type]string{ @@ -432,6 +444,9 @@ var ( FundingPaymentsEvent: "FundingPaymentsEvent", PaidLiquidityFeesStatsEvent: "LiquidityFeesStatsEvent", VestingBalancesSummaryEvent: "VestingBalancesSummaryEvent", + PartyMarginModeUpdatedEvent: "PartyMarginModeUpdatedEvent", + PartyProfileUpdatedEvent: "PartyProfileUpdatedEvent", + TeamsStatsUpdatedEvent: "TeamsStatsUpdatedEvent", } ) @@ -446,7 +461,7 @@ func newBase(ctx context.Context, t Type) *Base { traceID: tID, chainID: cID, txHash: txHash, - blockNr: h, + blockNr: int64(h), et: t, } } diff --git a/core/events/checkpoint.go b/core/events/checkpoint.go index fad7de425e..6daf6bc1ed 100644 --- a/core/events/checkpoint.go +++ b/core/events/checkpoint.go @@ -37,7 +37,7 @@ func NewCheckpointEvent(ctx context.Context, snap *types.CheckpointState) *Check data: eventspb.CheckpointEvent{ Hash: hex.EncodeToString(snap.Hash), BlockHash: block, - BlockHeight: uint64(height), + BlockHeight: height, }, } } diff --git a/core/events/erc20multisig_signer.go b/core/events/erc20multisig_signer.go index 81e8def451..f21be3fa08 100644 --- a/core/events/erc20multisig_signer.go +++ b/core/events/erc20multisig_signer.go @@ -18,9 +18,8 @@ package events import ( "context" - eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - "code.vegaprotocol.io/vega/core/types" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" ) type ERC20MultiSigSigner struct { diff --git a/core/events/erc20multisig_threshold_set.go b/core/events/erc20multisig_threshold_set.go index 39e62d7a38..56a52395a1 100644 --- a/core/events/erc20multisig_threshold_set.go +++ b/core/events/erc20multisig_threshold_set.go @@ -18,9 +18,8 @@ package events import ( "context" - eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - "code.vegaprotocol.io/vega/core/types" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" ) type ERC20MultiSigThresholdSet struct { diff --git a/core/events/events.go b/core/events/events.go index c4a78123db..aae49c0889 100644 --- a/core/events/events.go +++ b/core/events/events.go @@ -31,6 +31,7 @@ type MarketPosition interface { SellSumProduct() *num.Uint VWBuy() *num.Uint VWSell() *num.Uint + AverageEntryPrice() *num.Uint } // TradeSettlement Part of the SettlePosition interface -> traces trades as they happened. @@ -80,10 +81,14 @@ type Margin interface { MarketPosition Asset() string MarginBalance() *num.Uint + OrderMarginBalance() *num.Uint GeneralBalance() *num.Uint BondBalance() *num.Uint MarketID() string MarginShortFall() *num.Uint + // as opposed to the GeneralBalance() which actually returns the available balance (general+bond) + // this returns the actual balance of the general account + GeneralAccountBalance() *num.Uint } // Risk is an event that summarizes everything and an eventual update to margin account. diff --git a/core/events/events_test.go b/core/events/events_test.go index 785bc83992..9e0df32bcf 100644 --- a/core/events/events_test.go +++ b/core/events/events_test.go @@ -20,13 +20,12 @@ import ( "testing" "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/types" vgcontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/libs/num" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" "github.com/stretchr/testify/assert" - - "code.vegaprotocol.io/vega/core/types" ) func TestEventCtxIsSet(t *testing.T) { diff --git a/core/events/governance_proposal.go b/core/events/governance_proposal.go index 828ec5de00..ceb7da256e 100644 --- a/core/events/governance_proposal.go +++ b/core/events/governance_proposal.go @@ -29,10 +29,13 @@ type Proposal struct { } func NewProposalEvent(ctx context.Context, p types.Proposal) *Proposal { - ip := p.IntoProto() + return NewProposalEventFromProto(ctx, p.IntoProto()) +} + +func NewProposalEventFromProto(ctx context.Context, p *proto.Proposal) *Proposal { return &Proposal{ Base: newBase(ctx, ProposalEvent), - p: *ip, + p: *p, } } diff --git a/core/events/governance_proposal_test.go b/core/events/governance_proposal_test.go index 6bf2216e43..01aedccda0 100644 --- a/core/events/governance_proposal_test.go +++ b/core/events/governance_proposal_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" proto "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/assert" ) diff --git a/core/events/ledger_movements_test.go b/core/events/ledger_movements_test.go index dfeee7eb42..f14cfd936c 100644 --- a/core/events/ledger_movements_test.go +++ b/core/events/ledger_movements_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" proto "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/events/liquidity_provision_test.go b/core/events/liquidity_provision_test.go index 2e35d322d7..93a8c5d3b4 100644 --- a/core/events/liquidity_provision_test.go +++ b/core/events/liquidity_provision_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" ) diff --git a/core/events/margin_mode.go b/core/events/margin_mode.go new file mode 100644 index 0000000000..231f54d02e --- /dev/null +++ b/core/events/margin_mode.go @@ -0,0 +1,60 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package events + +import ( + "context" + + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" +) + +type PartyMarginModeUpdated struct { + *Base + update *eventspb.PartyMarginModeUpdated +} + +func (e PartyMarginModeUpdated) Proto() eventspb.PartyMarginModeUpdated { + return *e.update +} + +func (e *PartyMarginModeUpdated) PartyMarginModeUpdated() *eventspb.PartyMarginModeUpdated { + return e.update +} + +func (e PartyMarginModeUpdated) StreamMessage() *eventspb.BusEvent { + busEvent := newBusEventFromBase(e.Base) + busEvent.Event = &eventspb.BusEvent_PartyMarginModeUpdated{ + PartyMarginModeUpdated: e.update, + } + + return busEvent +} + +func NewPartyMarginModeUpdatedEvent(ctx context.Context, update *eventspb.PartyMarginModeUpdated) *PartyMarginModeUpdated { + e := &PartyMarginModeUpdated{ + Base: newBase(ctx, PartyMarginModeUpdatedEvent), + update: update, + } + return e +} + +func PartyMarginModeUpdatedEventFromStream(ctx context.Context, be *eventspb.BusEvent) *PartyMarginModeUpdated { + e := &PartyMarginModeUpdated{ + Base: newBaseFromBusEvent(ctx, PartyMarginModeUpdatedEvent, be), + update: be.GetPartyMarginModeUpdated(), + } + return e +} diff --git a/core/events/market_data_test.go b/core/events/market_data_test.go index 6e134b045a..ca1411f689 100644 --- a/core/events/market_data_test.go +++ b/core/events/market_data_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" proto "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/assert" ) diff --git a/core/events/market_event.go b/core/events/market_event.go index abf1ff809a..1a39f417a2 100644 --- a/core/events/market_event.go +++ b/core/events/market_event.go @@ -19,10 +19,9 @@ import ( "context" "fmt" + "code.vegaprotocol.io/vega/core/types" proto "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - - "code.vegaprotocol.io/vega/core/types" ) type MarketCreated struct { diff --git a/core/events/market_event_test.go b/core/events/market_event_test.go index a44bed5f65..afeb304b12 100644 --- a/core/events/market_event_test.go +++ b/core/events/market_event_test.go @@ -25,8 +25,10 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/protos/vega" vegapb "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -190,6 +192,9 @@ func TestMarketDeepClone(t *testing.T) { InfrastructureFee: "0.2", LiquidityFee: "0.3", }, + LiquidityFeeSettings: &vega.LiquidityFeeSettings{ + Method: vega.LiquidityFeeSettings_METHOD_MARGINAL_COST, + }, }, OpeningAuction: &vegapb.AuctionDuration{ Duration: 1000, @@ -211,8 +216,6 @@ func TestMarketDeepClone(t *testing.T) { TimeWindow: 1000, ScalingFactor: 2.0, }, - TriggeringRatio: "123.45", - AuctionExtension: 5000, }, LiquiditySlaParams: &vegapb.LiquiditySLAParameters{ PriceRange: "0.95", @@ -277,8 +280,6 @@ func TestMarketDeepClone(t *testing.T) { me.LiquidityMonitoringParameters.TargetStakeParameters.TimeWindow = 999 me.LiquidityMonitoringParameters.TargetStakeParameters.ScalingFactor = num.DecimalFromFloat(99.9) - me.LiquidityMonitoringParameters.TriggeringRatio = num.DecimalFromFloat(99.9) - me.LiquidityMonitoringParameters.AuctionExtension = 999 me.TradingMode = vegapb.Market_TRADING_MODE_UNSPECIFIED me.State = vegapb.Market_STATE_UNSPECIFIED @@ -327,8 +328,6 @@ func TestMarketDeepClone(t *testing.T) { assert.NotEqual(t, me.PriceMonitoringSettings.Parameters.Triggers[0].AuctionExtension, me2.PriceMonitoringSettings.Parameters.Triggers[0].AuctionExtension) assert.NotEqual(t, me.LiquidityMonitoringParameters.TargetStakeParameters.TimeWindow, me2.LiquidityMonitoringParameters.TargetStakeParameters.TimeWindow) assert.NotEqual(t, me.LiquidityMonitoringParameters.TargetStakeParameters.ScalingFactor, me2.LiquidityMonitoringParameters.TargetStakeParameters.ScalingFactor) - assert.NotEqual(t, me.LiquidityMonitoringParameters.TriggeringRatio, me2.LiquidityMonitoringParameters.TriggeringRatio) - assert.NotEqual(t, me.LiquidityMonitoringParameters.AuctionExtension, me2.LiquidityMonitoringParameters.AuctionExtension) assert.NotEqual(t, me.TradingMode, me2.TradingMode) assert.NotEqual(t, me.State, me2.State) assert.NotEqual(t, me.MarketTimestamps.Proposed, me2.MarketTimestamps.Proposed) diff --git a/core/events/market_updated_event.go b/core/events/market_updated_event.go index d818c9986a..74287752ab 100644 --- a/core/events/market_updated_event.go +++ b/core/events/market_updated_event.go @@ -19,10 +19,9 @@ import ( "context" "fmt" + "code.vegaprotocol.io/vega/core/types" proto "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - - "code.vegaprotocol.io/vega/core/types" ) type MarketUpdated struct { diff --git a/core/events/oracle_data_test.go b/core/events/oracle_data_test.go index 7eb6cb8cba..b9fad47649 100644 --- a/core/events/oracle_data_test.go +++ b/core/events/oracle_data_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/events" vegapb "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" ) diff --git a/core/events/oracle_spec_test.go b/core/events/oracle_spec_test.go index 6af9888fca..0eeecb76ec 100644 --- a/core/events/oracle_spec_test.go +++ b/core/events/oracle_spec_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/events" vegapb "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" "google.golang.org/protobuf/proto" ) diff --git a/core/events/order_test.go b/core/events/order_test.go index 4a373cd00e..f5e70dfc7b 100644 --- a/core/events/order_test.go +++ b/core/events/order_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" proto "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/assert" ) diff --git a/core/events/party.go b/core/events/party.go index 4c26576758..43e12b2183 100644 --- a/core/events/party.go +++ b/core/events/party.go @@ -17,10 +17,13 @@ package events import ( "context" + "strings" "code.vegaprotocol.io/vega/core/types" - proto "code.vegaprotocol.io/vega/protos/vega" + vegapb "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "golang.org/x/exp/slices" ) type Party struct { @@ -43,7 +46,7 @@ func (p *Party) Party() types.Party { return p.p } -func (p Party) Proto() *proto.Party { +func (p Party) Proto() *vegapb.Party { return p.p.IntoProto() } @@ -62,3 +65,54 @@ func PartyEventFromStream(ctx context.Context, be *eventspb.BusEvent) *Party { p: types.Party{Id: be.GetParty().Id}, } } + +type PartyProfileUpdated struct { + *Base + e eventspb.PartyProfileUpdated +} + +func (t PartyProfileUpdated) StreamMessage() *eventspb.BusEvent { + busEvent := newBusEventFromBase(t.Base) + busEvent.Event = &eventspb.BusEvent_PartyProfileUpdated{ + PartyProfileUpdated: &t.e, + } + + return busEvent +} + +func (t PartyProfileUpdated) PartyProfileUpdated() *eventspb.PartyProfileUpdated { + return &t.e +} + +func NewPartyProfileUpdatedEvent(ctx context.Context, p *types.PartyProfile) *PartyProfileUpdated { + metadata := make([]*vegapb.Metadata, 0, len(p.Metadata)) + for k, v := range p.Metadata { + metadata = append(metadata, &vegapb.Metadata{ + Key: k, + Value: v, + }) + } + + // Ensure deterministic order in event. + slices.SortStableFunc(metadata, func(a, b *vegapb.Metadata) int { + return strings.Compare(a.Key, b.Key) + }) + + return &PartyProfileUpdated{ + Base: newBase(ctx, PartyProfileUpdatedEvent), + e: eventspb.PartyProfileUpdated{ + UpdatedProfile: &vegapb.PartyProfile{ + PartyId: p.PartyID.String(), + Alias: p.Alias, + Metadata: metadata, + }, + }, + } +} + +func PartyProfileUpdatedEventFromStream(ctx context.Context, be *eventspb.BusEvent) *PartyProfileUpdated { + return &PartyProfileUpdated{ + Base: newBaseFromBusEvent(ctx, PartyProfileUpdatedEvent, be), + e: *be.GetPartyProfileUpdated(), + } +} diff --git a/core/events/referral_set.go b/core/events/referral_set.go index 704e7c2dad..7440065ec9 100644 --- a/core/events/referral_set.go +++ b/core/events/referral_set.go @@ -17,6 +17,7 @@ package events import ( "context" + "strings" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" @@ -117,8 +118,8 @@ func NewReferralSetStatsUpdatedEvent(ctx context.Context, update *types.Referral }) } - slices.SortStableFunc(refereesStats, func(a, b *eventspb.RefereeStats) bool { - return a.PartyId < b.PartyId + slices.SortStableFunc(refereesStats, func(a, b *eventspb.RefereeStats) int { + return strings.Compare(a.PartyId, b.PartyId) }) return &ReferralSetStatsUpdated{ diff --git a/core/events/reward_payout.go b/core/events/reward_payout.go index fee9e50038..b90eefe3cc 100644 --- a/core/events/reward_payout.go +++ b/core/events/reward_payout.go @@ -29,15 +29,16 @@ type RewardPayout struct { Party string EpochSeq string Asset string - Market string + GameID *string PercentageOfTotalReward string Amount *num.Uint + QuantumAmount num.Decimal Timestamp int64 RewardType types.AccountType LockedUntilEpoch string } -func NewRewardPayout(ctx context.Context, timestamp int64, party, epochSeq, asset string, amount *num.Uint, percentageOfTotalReward num.Decimal, rewardType types.AccountType, market string, lockedUntilEpoch string) *RewardPayout { +func NewRewardPayout(ctx context.Context, timestamp int64, party, epochSeq, asset string, amount *num.Uint, assetQuantum, percentageOfTotalReward num.Decimal, rewardType types.AccountType, gameID *string, lockedUntilEpoch string) *RewardPayout { return &RewardPayout{ Base: newBase(ctx, RewardPayoutEvent), Party: party, @@ -45,9 +46,10 @@ func NewRewardPayout(ctx context.Context, timestamp int64, party, epochSeq, asse Asset: asset, PercentageOfTotalReward: percentageOfTotalReward.String(), Amount: amount, + QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(6), Timestamp: timestamp, RewardType: rewardType, - Market: market, + GameID: gameID, LockedUntilEpoch: lockedUntilEpoch, } } @@ -62,10 +64,11 @@ func (rp RewardPayout) Proto() eventspb.RewardPayoutEvent { EpochSeq: rp.EpochSeq, Asset: rp.Asset, Amount: rp.Amount.String(), + QuantumAmount: rp.QuantumAmount.String(), PercentOfTotalReward: rp.PercentageOfTotalReward, Timestamp: rp.Timestamp, RewardType: vegapb.AccountType_name[int32(rp.RewardType)], - Market: rp.Market, + GameId: rp.GameID, LockedUntilEpoch: rp.LockedUntilEpoch, } } @@ -87,6 +90,7 @@ func RewardPayoutEventFromStream(ctx context.Context, be *eventspb.BusEvent) *Re } amount, _ := num.UintFromString(rp.Amount, 10) + quantumAmount, _ := num.DecimalFromString(rp.QuantumAmount) return &RewardPayout{ Base: newBaseFromBusEvent(ctx, RewardPayoutEvent, be), Party: rp.Party, @@ -94,8 +98,9 @@ func RewardPayoutEventFromStream(ctx context.Context, be *eventspb.BusEvent) *Re Asset: rp.Asset, PercentageOfTotalReward: rp.PercentOfTotalReward, Amount: amount, + QuantumAmount: quantumAmount, Timestamp: rp.Timestamp, - Market: rp.Market, + GameID: rp.GameId, LockedUntilEpoch: rp.LockedUntilEpoch, RewardType: types.AccountType(vegapb.AccountType_value[rp.RewardType]), } diff --git a/core/events/stake_linking.go b/core/events/stake_linking.go index 08b46eaf77..e5b0a09e38 100644 --- a/core/events/stake_linking.go +++ b/core/events/stake_linking.go @@ -18,9 +18,8 @@ package events import ( "context" - eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - "code.vegaprotocol.io/vega/core/types" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" ) type StakeLinking struct { diff --git a/core/events/team.go b/core/events/team.go index 35aace53de..ffea74cd42 100644 --- a/core/events/team.go +++ b/core/events/team.go @@ -17,8 +17,11 @@ package events import ( "context" + "slices" + "strings" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" ) @@ -42,18 +45,25 @@ func (t TeamCreated) TeamCreated() *eventspb.TeamCreated { } func NewTeamCreatedEvent(ctx context.Context, epoch uint64, t *types.Team) *TeamCreated { + e := eventspb.TeamCreated{ + TeamId: string(t.ID), + Referrer: string(t.Referrer.PartyID), + Name: t.Name, + TeamUrl: ptr.From(t.TeamURL), + AvatarUrl: ptr.From(t.AvatarURL), + CreatedAt: t.CreatedAt.UnixNano(), + AtEpoch: epoch, + Closed: t.Closed, + } + + e.AllowList = make([]string, 0, len(t.AllowList)) + for _, id := range t.AllowList { + e.AllowList = append(e.AllowList, id.String()) + } + return &TeamCreated{ Base: newBase(ctx, TeamCreatedEvent), - e: eventspb.TeamCreated{ - TeamId: string(t.ID), - Referrer: string(t.Referrer.PartyID), - Name: t.Name, - TeamUrl: ptr.From(t.TeamURL), - AvatarUrl: ptr.From(t.AvatarURL), - CreatedAt: t.CreatedAt.UnixNano(), - AtEpoch: epoch, - Closed: t.Closed, - }, + e: e, } } @@ -83,15 +93,22 @@ func (t TeamUpdated) TeamUpdated() *eventspb.TeamUpdated { } func NewTeamUpdatedEvent(ctx context.Context, t *types.Team) *TeamUpdated { + e := eventspb.TeamUpdated{ + TeamId: string(t.ID), + Name: t.Name, + TeamUrl: ptr.From(t.TeamURL), + AvatarUrl: ptr.From(t.AvatarURL), + Closed: t.Closed, + } + + e.AllowList = make([]string, 0, len(t.AllowList)) + for _, id := range t.AllowList { + e.AllowList = append(e.AllowList, id.String()) + } + return &TeamUpdated{ Base: newBase(ctx, TeamUpdatedEvent), - e: eventspb.TeamUpdated{ - TeamId: string(t.ID), - Name: t.Name, - TeamUrl: ptr.From(t.TeamURL), - AvatarUrl: ptr.From(t.AvatarURL), - Closed: t.Closed, - }, + e: e, } } @@ -176,3 +193,62 @@ func RefereeJoinedTeamEventFromStream(ctx context.Context, be *eventspb.BusEvent e: *be.GetRefereeJoinedTeam(), } } + +type TeamsStatsUpdated struct { + *Base + e eventspb.TeamsStatsUpdated +} + +func (t TeamsStatsUpdated) StreamMessage() *eventspb.BusEvent { + busEvent := newBusEventFromBase(t.Base) + busEvent.Event = &eventspb.BusEvent_TeamsStatsUpdated{ + TeamsStatsUpdated: &t.e, + } + + return busEvent +} + +func (t TeamsStatsUpdated) TeamsStatsUpdated() *eventspb.TeamsStatsUpdated { + return &t.e +} + +func NewTeamsStatsUpdatedEvent(ctx context.Context, seq uint64, rawTeamsStats map[string]map[string]*num.Uint) *TeamsStatsUpdated { + teamsStats := make([]*eventspb.TeamStats, 0, len(rawTeamsStats)) + for teamID, rawTeamStats := range rawTeamsStats { + ts := make([]*eventspb.TeamMemberStats, 0, len(rawTeamStats)) + for partyID, notionalVolume := range rawTeamStats { + ts = append(ts, &eventspb.TeamMemberStats{ + PartyId: partyID, + NotionalVolume: notionalVolume.String(), + }) + } + + slices.SortStableFunc(ts, func(a, b *eventspb.TeamMemberStats) int { + return strings.Compare(a.PartyId, b.PartyId) + }) + + teamsStats = append(teamsStats, &eventspb.TeamStats{ + TeamId: teamID, + MembersStats: ts, + }) + } + + slices.SortStableFunc(teamsStats, func(a, b *eventspb.TeamStats) int { + return strings.Compare(a.TeamId, b.TeamId) + }) + + return &TeamsStatsUpdated{ + Base: newBase(ctx, TeamsStatsUpdatedEvent), + e: eventspb.TeamsStatsUpdated{ + Stats: teamsStats, + AtEpoch: seq, + }, + } +} + +func TeamsStatsUpdatedEventFromStream(ctx context.Context, be *eventspb.BusEvent) *TeamsStatsUpdated { + return &TeamsStatsUpdated{ + Base: newBaseFromBusEvent(ctx, TeamsStatsUpdatedEvent, be), + e: *be.GetTeamsStatsUpdated(), + } +} diff --git a/core/events/trade.go b/core/events/trade.go index fb87bf1609..0c7ad31cda 100644 --- a/core/events/trade.go +++ b/core/events/trade.go @@ -31,6 +31,7 @@ type Trade struct { func NewTradeEvent(ctx context.Context, t types.Trade) *Trade { p := t.IntoProto() p.Price = t.MarketPrice.String() + p.AssetPrice = t.Price.String() return &Trade{ Base: newBase(ctx, TradeEvent), t: *p, diff --git a/core/events/trade_test.go b/core/events/trade_test.go index 7e264405f0..24f90a8025 100644 --- a/core/events/trade_test.go +++ b/core/events/trade_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" proto "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/assert" ) diff --git a/core/events/transaction_result.go b/core/events/transaction_result.go index 2a29c9b076..8c81f3552c 100644 --- a/core/events/transaction_result.go +++ b/core/events/transaction_result.go @@ -28,6 +28,18 @@ type TransactionResult struct { evt *eventspb.TransactionResult } +func (tr *TransactionResult) PartyID() string { + return tr.evt.PartyId +} + +func (tr *TransactionResult) Status() bool { + return tr.evt.Status +} + +func (tr *TransactionResult) Hash() string { + return tr.evt.Hash +} + func NewTransactionResultEventSuccess( ctx context.Context, hash, party string, @@ -170,9 +182,24 @@ func (t *TransactionResult) setTx(tx interface{}) *TransactionResult { t.evt.Transaction = &eventspb.TransactionResult_ApplyReferralCode{ ApplyReferralCode: tv, } - + case *commandspb.UpdateMarginMode: + t.evt.Transaction = &eventspb.TransactionResult_UpdateMarginMode{ + UpdateMarginMode: tv, + } + case *commandspb.JoinTeam: + t.evt.Transaction = &eventspb.TransactionResult_JoinTeam{ + JoinTeam: tv, + } + case *commandspb.BatchProposalSubmission: + t.evt.Transaction = &eventspb.TransactionResult_BatchProposal{ + BatchProposal: tv, + } + case *commandspb.UpdatePartyProfile: + t.evt.Transaction = &eventspb.TransactionResult_UpdatePartyProfile{ + UpdatePartyProfile: tv, + } default: - panic(fmt.Sprintf("unsupported command: %v", tv)) + panic(fmt.Sprintf("unsupported command %T", tv)) } return t @@ -186,6 +213,10 @@ func (t TransactionResult) Proto() eventspb.TransactionResult { return *t.evt } +func (t TransactionResult) TransactionResult() TransactionResult { + return t +} + func (t TransactionResult) StreamMessage() *eventspb.BusEvent { busEvent := newBusEventFromBase(t.Base) busEvent.Event = &eventspb.BusEvent_TransactionResult{ diff --git a/core/events/transfer.go b/core/events/transfer.go index 4c5328529e..b25f4e218b 100644 --- a/core/events/transfer.go +++ b/core/events/transfer.go @@ -23,7 +23,6 @@ import ( eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" ) -// Transfer ... type TransferFunds struct { *Base transfer *eventspb.Transfer @@ -33,10 +32,11 @@ func NewGovTransferFundsEvent( ctx context.Context, t *types.GovernanceTransfer, amount *num.Uint, + gameID *string, ) *TransferFunds { return &TransferFunds{ Base: newBase(ctx, TransferEvent), - transfer: t.IntoEvent(amount, nil), + transfer: t.IntoEvent(amount, nil, gameID), } } @@ -45,10 +45,11 @@ func NewGovTransferFundsEventWithReason( t *types.GovernanceTransfer, amount *num.Uint, reason string, + gameID *string, ) *TransferFunds { return &TransferFunds{ Base: newBase(ctx, TransferEvent), - transfer: t.IntoEvent(amount, &reason), + transfer: t.IntoEvent(amount, &reason, gameID), } } @@ -76,10 +77,11 @@ func NewOneOffTransferFundsEventWithReason( func NewRecurringTransferFundsEvent( ctx context.Context, t *types.RecurringTransfer, + gameID *string, ) *TransferFunds { return &TransferFunds{ Base: newBase(ctx, TransferEvent), - transfer: t.IntoEvent(nil), + transfer: t.IntoEvent(nil, gameID), } } @@ -87,10 +89,11 @@ func NewRecurringTransferFundsEventWithReason( ctx context.Context, t *types.RecurringTransfer, reason string, + gameID *string, ) *TransferFunds { return &TransferFunds{ Base: newBase(ctx, TransferEvent), - transfer: t.IntoEvent(&reason), + transfer: t.IntoEvent(&reason, gameID), } } diff --git a/core/events/transfer_fees.go b/core/events/transfer_fees.go index 51184e3510..802a76b633 100644 --- a/core/events/transfer_fees.go +++ b/core/events/transfer_fees.go @@ -28,13 +28,14 @@ type TransferFees struct { pb *eventspb.TransferFees } -func NewTransferFeesEvent(ctx context.Context, transferID string, amount *num.Uint, epoch uint64) *TransferFees { +func NewTransferFeesEvent(ctx context.Context, transferID string, amount *num.Uint, discount *num.Uint, epoch uint64) *TransferFees { return &TransferFees{ Base: newBase(ctx, TransferFeesEvent), pb: &eventspb.TransferFees{ - TransferId: transferID, - Amount: amount.String(), - Epoch: epoch, + TransferId: transferID, + Amount: amount.String(), + DiscountApplied: discount.String(), + Epoch: epoch, }, } } @@ -67,3 +68,50 @@ func TransferFeesEventFromStream(ctx context.Context, be *eventspb.BusEvent) *Tr pb: event, } } + +// TransferFeesDiscountUpdated ... +type TransferFeesDiscountUpdated struct { + *Base + pb *eventspb.TransferFeesDiscount +} + +func NewTransferFeesDiscountUpdated(ctx context.Context, party, asset string, amount *num.Uint, epoch uint64) *TransferFeesDiscountUpdated { + return &TransferFeesDiscountUpdated{ + Base: newBase(ctx, TransferFeesDiscountUpdatedEvent), + pb: &eventspb.TransferFeesDiscount{ + Party: party, + Asset: asset, + Amount: amount.String(), + Epoch: epoch, + }, + } +} + +func (t TransferFeesDiscountUpdated) Proto() eventspb.TransferFeesDiscount { + return *t.pb +} + +func (t TransferFeesDiscountUpdated) StreamMessage() *eventspb.BusEvent { + busEvent := newBusEventFromBase(t.Base) + busEvent.Event = &eventspb.BusEvent_TransferFeesDiscount{ + TransferFeesDiscount: t.pb, + } + + return busEvent +} + +func (t TransferFeesDiscountUpdated) TransferFeesDiscount() eventspb.TransferFeesDiscount { + return t.Proto() +} + +func TransferFeesDiscountUpdatedFromStream(ctx context.Context, be *eventspb.BusEvent) *TransferFeesDiscountUpdated { + event := be.GetTransferFeesDiscount() + if event == nil { + return nil + } + + return &TransferFeesDiscountUpdated{ + Base: newBaseFromBusEvent(ctx, TransferFeesDiscountUpdatedEvent, be), + pb: event, + } +} diff --git a/core/events/validator_update_test.go b/core/events/validator_update_test.go index 2d654a65d0..112a025add 100644 --- a/core/events/validator_update_test.go +++ b/core/events/validator_update_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/events" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/stretchr/testify/assert" ) diff --git a/core/evtforward/acked_events.go b/core/evtforward/acked_events.go new file mode 100644 index 0000000000..32885d935c --- /dev/null +++ b/core/evtforward/acked_events.go @@ -0,0 +1,98 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package evtforward + +import ( + "github.com/emirpasic/gods/sets/treeset" + "github.com/emirpasic/gods/utils" +) + +type ackedEvtBucket struct { + ts int64 + hashes []string +} + +func ackedEvtBucketComparator(a, b interface{}) int { + bucket1 := a.(*ackedEvtBucket) + bucket2 := b.(*ackedEvtBucket) + return utils.Int64Comparator(bucket1.ts, bucket2.ts) +} + +type ackedEvents struct { + timeService TimeService + events *treeset.Set // we only care about the key +} + +func (a *ackedEvents) AddAt(ts int64, hashes ...string) { + _, value := a.events.Find(func(i int, value interface{}) bool { + bucket := value.(*ackedEvtBucket) + return bucket.ts == ts + }) + + if value != nil { + bucket := value.(*ackedEvtBucket) + for _, newHash := range hashes { + found := false + for _, v := range bucket.hashes { + // hash already exists + if v == newHash { + found = true + break + } + } + + if !found { + bucket.hashes = append(bucket.hashes, newHash) + } + } + + return + } + + a.events.Add(&ackedEvtBucket{ts: ts, hashes: append([]string{}, hashes...)}) +} + +func (a *ackedEvents) Add(hash string) { + a.AddAt(a.timeService.GetTimeNow().Unix(), hash) +} + +func (a *ackedEvents) Contains(hash string) bool { + _, value := a.events.Find(func(index int, value interface{}) bool { + bucket := value.(*ackedEvtBucket) + for _, v := range bucket.hashes { + if hash == v { + return true + } + } + + return false + }) + + return value != nil +} + +func (a *ackedEvents) RemoveBefore(ts int64) { + set := a.events.Select(func(index int, value interface{}) bool { + bucket := value.(*ackedEvtBucket) + return bucket.ts <= ts + }) + + a.events.Remove(set.Values()...) +} + +func (a *ackedEvents) Size() int { + return a.events.Size() +} diff --git a/core/evtforward/config.go b/core/evtforward/config.go index c4679e487f..b85a4ea2ed 100644 --- a/core/evtforward/config.go +++ b/core/evtforward/config.go @@ -34,8 +34,9 @@ const ( // Config represents governance specific configuration. type Config struct { // Level specifies the logging level of the Event Forwarder engine. - Level encoding.LogLevel `long:"log-level"` - RetryRate encoding.Duration `long:"retry-rate"` + Level encoding.LogLevel `long:"log-level"` + RetryRate encoding.Duration `long:"retry-rate"` + KeepHashesDurationForTestOnlyDoNotChange encoding.Duration // a list of allowlisted blockchain queue public keys BlockchainQueueAllowlist []string `description:" " long:"blockchain-queue-allowlist"` // Ethereum groups the configuration related to Ethereum implementation of @@ -47,10 +48,11 @@ type Config struct { // NewDefaultConfig creates an instance of the package specific configuration. func NewDefaultConfig() Config { return Config{ - Level: encoding.LogLevel{Level: logging.InfoLevel}, - RetryRate: encoding.Duration{Duration: defaultRetryRate}, - BlockchainQueueAllowlist: []string{}, - Ethereum: ethereum.NewDefaultConfig(), - EthCall: ethcall.NewDefaultConfig(), + Level: encoding.LogLevel{Level: logging.InfoLevel}, + RetryRate: encoding.Duration{Duration: defaultRetryRate}, + KeepHashesDurationForTestOnlyDoNotChange: encoding.Duration{Duration: 24 * 7 * time.Hour}, + BlockchainQueueAllowlist: []string{}, + Ethereum: ethereum.NewDefaultConfig(), + EthCall: ethcall.NewDefaultConfig(), } } diff --git a/core/evtforward/ethereum/config.go b/core/evtforward/ethereum/config.go index 218172ae27..14421ab092 100644 --- a/core/evtforward/ethereum/config.go +++ b/core/evtforward/ethereum/config.go @@ -24,12 +24,14 @@ import ( const ( defaultDurationBetweenTwoRetry = 20 * time.Second + maxEthereumBlocks = 10000 // chosen because one of the validators wanted to use quicknode, and this is their limit ) type Config struct { // Level specifies the logging level of the Ethereum implementation of the // Event Forwarder. Level encoding.LogLevel `long:"log-level"` + MaxEthereumBlocks uint64 `long:"max-ethereum-blocks"` PollEventRetryDuration encoding.Duration } @@ -37,5 +39,6 @@ func NewDefaultConfig() Config { return Config{ Level: encoding.LogLevel{Level: logging.InfoLevel}, PollEventRetryDuration: encoding.Duration{Duration: defaultDurationBetweenTwoRetry}, + MaxEthereumBlocks: maxEthereumBlocks, } } diff --git a/core/evtforward/ethereum/engine.go b/core/evtforward/ethereum/engine.go index b3dda5fae1..78a09c7f1d 100644 --- a/core/evtforward/ethereum/engine.go +++ b/core/evtforward/ethereum/engine.go @@ -25,8 +25,7 @@ import ( ) const ( - engineLogger = "engine" - maxEthereumBlocks = 1000 // 3+ hour worth of blocks? + engineLogger = "engine" ) //go:generate go run github.com/golang/mock/mockgen -destination mocks/forwarder_mock.go -package mocks code.vegaprotocol.io/vega/core/evtforward/ethereum Forwarder @@ -136,11 +135,11 @@ func (e *Engine) Start() { }) } -func issueFilteringRequest(from, to uint64) (ok bool, actualTo uint64) { +func issueFilteringRequest(from, to, nBlocks uint64) (ok bool, actualTo uint64) { if from > to { return false, 0 } - return true, min(from+maxEthereumBlocks, to) + return true, min(from+nBlocks, to) } func min(a, b uint64) uint64 { @@ -151,10 +150,11 @@ func min(a, b uint64) uint64 { } func (e *Engine) gatherEvents(ctx context.Context) { + nBlocks := e.cfg.MaxEthereumBlocks currentHeight := e.filterer.CurrentHeight(ctx) // Ensure we are not issuing a filtering request for non-existing block. - if ok, nextHeight := issueFilteringRequest(e.nextCollateralBlockNumber, currentHeight); ok { + if ok, nextHeight := issueFilteringRequest(e.nextCollateralBlockNumber, currentHeight, nBlocks); ok { e.filterer.FilterCollateralEvents(ctx, e.nextCollateralBlockNumber, nextHeight, func(event *commandspb.ChainEvent) { e.forwarder.ForwardFromSelf(event) }) @@ -162,27 +162,31 @@ func (e *Engine) gatherEvents(ctx context.Context) { } // Ensure we are not issuing a filtering request for non-existing block. - if e.shouldFilterStakingBridge && e.nextStakingBlockNumber <= currentHeight { - e.filterer.FilterStakingEvents(ctx, e.nextStakingBlockNumber, currentHeight, func(event *commandspb.ChainEvent) { - e.forwarder.ForwardFromSelf(event) - }) - e.nextStakingBlockNumber = currentHeight + 1 + if e.shouldFilterStakingBridge { + if ok, nextHeight := issueFilteringRequest(e.nextStakingBlockNumber, currentHeight, nBlocks); ok { + e.filterer.FilterStakingEvents(ctx, e.nextStakingBlockNumber, nextHeight, func(event *commandspb.ChainEvent) { + e.forwarder.ForwardFromSelf(event) + }) + e.nextStakingBlockNumber = nextHeight + 1 + } } // Ensure we are not issuing a filtering request for non-existing block. - if e.shouldFilterVestingBridge && e.nextVestingBlockNumber <= currentHeight { - e.filterer.FilterVestingEvents(ctx, e.nextVestingBlockNumber, currentHeight, func(event *commandspb.ChainEvent) { - e.forwarder.ForwardFromSelf(event) - }) - e.nextVestingBlockNumber = currentHeight + 1 + if e.shouldFilterVestingBridge { + if ok, nextHeight := issueFilteringRequest(e.nextVestingBlockNumber, currentHeight, nBlocks); ok { + e.filterer.FilterVestingEvents(ctx, e.nextVestingBlockNumber, nextHeight, func(event *commandspb.ChainEvent) { + e.forwarder.ForwardFromSelf(event) + }) + e.nextVestingBlockNumber = nextHeight + 1 + } } // Ensure we are not issuing a filtering request for non-existing block. - if e.nextMultiSigControlBlockNumber <= currentHeight { - e.filterer.FilterMultisigControlEvents(ctx, e.nextMultiSigControlBlockNumber, currentHeight, func(event *commandspb.ChainEvent) { + if ok, nextHeight := issueFilteringRequest(e.nextMultiSigControlBlockNumber, currentHeight, nBlocks); ok { + e.filterer.FilterMultisigControlEvents(ctx, e.nextMultiSigControlBlockNumber, nextHeight, func(event *commandspb.ChainEvent) { e.forwarder.ForwardFromSelf(event) }) - e.nextMultiSigControlBlockNumber = currentHeight + 1 + e.nextMultiSigControlBlockNumber = nextHeight + 1 } } diff --git a/core/evtforward/forwarder.go b/core/evtforward/forwarder.go index fbe6d59261..ca8ff620ea 100644 --- a/core/evtforward/forwarder.go +++ b/core/evtforward/forwarder.go @@ -29,12 +29,12 @@ import ( "code.vegaprotocol.io/vega/core/metrics" "code.vegaprotocol.io/vega/core/txn" "code.vegaprotocol.io/vega/libs/crypto" + vgproto "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" - "github.com/emirpasic/gods/sets/treeset" - vgproto "code.vegaprotocol.io/vega/libs/proto" "github.com/cenkalti/backoff" + "github.com/emirpasic/gods/sets/treeset" "github.com/golang/protobuf/proto" ) @@ -71,8 +71,8 @@ type Forwarder struct { cmd Commander self string + ackedEvts *ackedEvents evtsmu sync.Mutex - ackedEvts *treeset.Set // we only care about the key evts map[string]tsEvt mu sync.RWMutex @@ -96,19 +96,20 @@ func New(log *logging.Logger, cfg Config, cmd Commander, timeService TimeService var allowlist atomic.Value allowlist.Store(buildAllowlist(cfg)) forwarder := &Forwarder{ - cfg: cfg, - log: log, - cmd: cmd, - timeService: timeService, - nodes: []string{}, - self: top.SelfNodeID(), - ackedEvts: treeset.NewWithStringComparator(), + cfg: cfg, + log: log, + cmd: cmd, + timeService: timeService, + nodes: []string{}, + self: top.SelfNodeID(), + ackedEvts: &ackedEvents{ + timeService: timeService, + events: treeset.NewWith(ackedEvtBucketComparator), + }, evts: map[string]tsEvt{}, top: top, bcQueueAllowlist: allowlist, - efss: &efSnapshotState{ - serialised: []byte{}, - }, + efss: &efSnapshotState{}, } forwarder.updateValidatorsList() return forwarder @@ -338,6 +339,11 @@ func (f *Forwarder) OnTick(ctx context.Context, t time.Time) { } } } + + // now delete old events + // get the oldest to remove + removeBefore := t.Add(-f.cfg.KeepHashesDurationForTestOnlyDoNotChange.Duration) + f.ackedEvts.RemoveBefore(removeBefore.Unix()) } func (f *Forwarder) getEvtKey(evt *commandspb.ChainEvent) (string, error) { diff --git a/core/evtforward/forwarder_test.go b/core/evtforward/forwarder_test.go index 92385f4392..badd6c6f8a 100644 --- a/core/evtforward/forwarder_test.go +++ b/core/evtforward/forwarder_test.go @@ -28,6 +28,7 @@ import ( snp "code.vegaprotocol.io/vega/core/snapshot" "code.vegaprotocol.io/vega/core/stats" "code.vegaprotocol.io/vega/core/types" + vgcontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/proto" vgtest "code.vegaprotocol.io/vega/libs/test" @@ -36,6 +37,7 @@ import ( prototypes "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -148,6 +150,7 @@ func testAckSuccess(t *testing.T) { state1, _, err := evtfwd.GetState("all") require.Nil(t, err) + evtfwd.time.EXPECT().GetTimeNow().Times(1) ok := evtfwd.Ack(evt) assert.True(t, ok) state2, _, err := evtfwd.GetState("all") @@ -179,6 +182,7 @@ func testAckSuccess(t *testing.T) { // ack a new event for the hash/state to change evt2 := getTestChainEvent("somenew") + evtfwd.time.EXPECT().GetTimeNow().Times(1) ok = evtfwd.Ack(evt2) assert.True(t, ok) state5, _, err := evtfwd.GetState("all") @@ -189,6 +193,7 @@ func testAckSuccess(t *testing.T) { func testAckFailureAlreadyAcked(t *testing.T) { evtfwd := getTestEvtFwd(t) evt := getTestChainEvent("some") + evtfwd.time.EXPECT().GetTimeNow().Times(1) ok := evtfwd.Ack(evt) assert.True(t, ok) // try to ack again @@ -213,10 +218,89 @@ func getTestChainEvent(txid string) *commandspb.ChainEvent { } } +func TestMigrationTo74(t *testing.T) { + evtFwd := getTestEvtFwd(t) + ctx := vgcontext.WithSnapshotInfo(context.Background(), "v0.73.13", true) + evtFwd.top.EXPECT().AllNodeIDs().AnyTimes().Return(testAllPubKeys) + + hashes := []string{ + crypto.RandomHash(), + crypto.RandomHash(), + crypto.RandomHash(), + crypto.RandomHash(), + } + // old payload, with couple of key + p := types.Payload{ + Data: &types.PayloadEventForwarder{ + Keys: hashes, + }, + } + _, err := evtFwd.LoadState(ctx, &p) + assert.NoError(t, err) + + // now get state, and make sure it's all fine, we have move time. + state, _, err := evtFwd.GetState((&types.PayloadEventForwarder{}).Key()) + require.Nil(t, err) + + // restore the state + var pl snapshot.Payload + proto.Unmarshal(state, &pl) + newP := types.PayloadFromProto(&pl).Data.(*types.PayloadEventForwarder) + assert.Len(t, newP.Buckets, 1) + assert.EqualValues(t, newP.Buckets[0].Hashes, hashes) + + // move time forward, should clear the buckets + now := time.Now() + evtFwd.OnTick(context.Background(), now) + + state, _, err = evtFwd.GetState((&types.PayloadEventForwarder{}).Key()) + require.Nil(t, err) + + proto.Unmarshal(state, &pl) + newP2 := types.PayloadFromProto(&pl).Data.(*types.PayloadEventForwarder) + assert.Len(t, newP2.Buckets, 0) // no acks left + + // now create new ones + + newHashes := []string{ + crypto.RandomHash(), + crypto.RandomHash(), + crypto.RandomHash(), + } + evtFwd.time.EXPECT().GetTimeNow().Times(2).Return(now) + evtFwd.Ack(getTestChainEvent(newHashes[0])) + evtFwd.Ack(getTestChainEvent(newHashes[1])) + + // increase time + now2 := now.Add(1 * time.Second) + evtFwd.OnTick(context.Background(), now2) + + evtFwd.time.EXPECT().GetTimeNow().Times(1).Return(now2) + evtFwd.Ack(getTestChainEvent(newHashes[2])) + + expects := map[int64][]string{ + now.Unix(): {newHashes[0], newHashes[1]}, + now2.Unix(): {newHashes[2]}, + } + + // get the state and we should have 2 buckets + state, _, err = evtFwd.GetState((&types.PayloadEventForwarder{}).Key()) + require.Nil(t, err) + + proto.Unmarshal(state, &pl) + newP3 := types.PayloadFromProto(&pl).Data.(*types.PayloadEventForwarder) + assert.Len(t, newP3.Buckets, 2) // 2 buckets + + for _, v := range newP3.Buckets { + assert.Len(t, v.Hashes, len(expects[v.Ts])) + } +} + func TestSnapshotRoundTripViaEngine(t *testing.T) { eventForwarder1 := getTestEvtFwd(t) for i := 0; i < 100; i++ { + eventForwarder1.time.EXPECT().GetTimeNow().Times(1) eventForwarder1.Ack(getTestChainEvent(crypto.RandomHash())) } @@ -242,6 +326,7 @@ func TestSnapshotRoundTripViaEngine(t *testing.T) { require.NoError(t, err) for i := 0; i < 10; i++ { + eventForwarder1.time.EXPECT().GetTimeNow().Times(1) eventForwarder1.Ack(getTestChainEvent(fmt.Sprintf("txHash%d", i))) } @@ -270,6 +355,7 @@ func TestSnapshotRoundTripViaEngine(t *testing.T) { require.Equal(t, hash1, hash2) for i := 0; i < 10; i++ { + eventForwarder2.time.EXPECT().GetTimeNow().Times(1) eventForwarder2.Ack(getTestChainEvent(fmt.Sprintf("txHash%d", i))) } diff --git a/core/evtforward/snapshot.go b/core/evtforward/snapshot.go index 5c20c03acc..d7ddec17c2 100644 --- a/core/evtforward/snapshot.go +++ b/core/evtforward/snapshot.go @@ -19,9 +19,11 @@ import ( "context" "code.vegaprotocol.io/vega/core/types" - "github.com/emirpasic/gods/sets/treeset" - + vgcontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/libs/proto" + snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + + "github.com/emirpasic/gods/sets/treeset" ) var ( @@ -32,9 +34,7 @@ var ( } ) -type efSnapshotState struct { - serialised []byte -} +type efSnapshotState struct{} func (f *Forwarder) Namespace() types.SnapshotNamespace { return types.EventForwarderSnapshot @@ -49,14 +49,19 @@ func (f *Forwarder) Stopped() bool { } func (f *Forwarder) serialise() ([]byte, error) { - slice := make([]string, 0, f.ackedEvts.Size()) - iter := f.ackedEvts.Iterator() + slice := make([]*snapshotpb.EventForwarderBucket, 0, f.ackedEvts.Size()) + iter := f.ackedEvts.events.Iterator() for iter.Next() { - slice = append(slice, (iter.Value().(string))) + v := (iter.Value().(*ackedEvtBucket)) + slice = append(slice, &snapshotpb.EventForwarderBucket{ + Ts: v.ts, + Hashes: v.hashes, + }) } + payload := types.Payload{ Data: &types.PayloadEventForwarder{ - Keys: slice, + Buckets: slice, }, } return proto.Marshal(payload.IntoProto()) @@ -68,12 +73,7 @@ func (f *Forwarder) getSerialised(k string) (data []byte, err error) { return nil, types.ErrSnapshotKeyDoesNotExist } - f.efss.serialised, err = f.serialise() - if err != nil { - return nil, err - } - - return f.efss.serialised, nil + return f.serialise() } func (f *Forwarder) GetState(k string) ([]byte, []types.StateProvider, error) { @@ -81,24 +81,38 @@ func (f *Forwarder) GetState(k string) ([]byte, []types.StateProvider, error) { return state, nil, err } -func (f *Forwarder) LoadState(_ context.Context, p *types.Payload) ([]types.StateProvider, error) { +func (f *Forwarder) LoadState(ctx context.Context, p *types.Payload) ([]types.StateProvider, error) { if f.Namespace() != p.Data.Namespace() { return nil, types.ErrInvalidSnapshotNamespace } // see what we're reloading if pl, ok := p.Data.(*types.PayloadEventForwarder); ok { - return nil, f.restore(pl.Keys, p) + f.restore(ctx, pl) + return nil, nil } return nil, types.ErrUnknownSnapshotType } -func (f *Forwarder) restore(keys []string, p *types.Payload) error { - f.ackedEvts = treeset.NewWithStringComparator() - for _, v := range keys { - f.ackedEvts.Add(v) +func (f *Forwarder) restore(ctx context.Context, p *types.PayloadEventForwarder) { + f.ackedEvts = &ackedEvents{ + timeService: f.timeService, + events: treeset.NewWith(ackedEvtBucketComparator), + } + + // upgrading from 73.12, we need to load previous snapshot format + if vgcontext.InProgressUpgradeFrom(ctx, "v0.73.13") { + // add at 0 time, so it's always way in the past. + bucket := &ackedEvtBucket{ + ts: 0, + hashes: []string{}, + } + bucket.hashes = append(bucket.hashes, p.Keys...) + f.ackedEvts.events.Add(bucket) + return + } + + for _, v := range p.Buckets { + f.ackedEvts.AddAt(v.Ts, v.Hashes...) } - var err error - f.efss.serialised, err = proto.Marshal(p.IntoProto()) - return err } diff --git a/core/examples/nullchain/transactions.go b/core/examples/nullchain/transactions.go index 4c966f2242..fbb44e9756 100644 --- a/core/examples/nullchain/transactions.go +++ b/core/examples/nullchain/transactions.go @@ -115,8 +115,7 @@ func MarketProposalTxn(now time.Time, oraclePubkey string) (*walletpb.SubmitTran PerformanceHysteresisEpochs: 4, SlaCompetitionFactor: "0.5", }, - LinearSlippageFactor: "0.1", - QuadraticSlippageFactor: "0.1", + LinearSlippageFactor: "0.1", }, }, }, diff --git a/core/execution/common/equity_shares_test.go b/core/execution/common/equity_shares_test.go index fa71641138..39a60badab 100644 --- a/core/execution/common/equity_shares_test.go +++ b/core/execution/common/equity_shares_test.go @@ -19,13 +19,13 @@ import ( "fmt" "testing" - "code.vegaprotocol.io/vega/libs/proto" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/core/execution/common" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/proto" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) // just a convenience type used in some tests. diff --git a/core/execution/common/errors.go b/core/execution/common/errors.go index 63371091e9..d8432ce8b4 100644 --- a/core/execution/common/errors.go +++ b/core/execution/common/errors.go @@ -75,5 +75,10 @@ var ( ErrStopOrderSideNotClosingThePosition = errors.New("side used in stop order does not close the position") ErrStopOrderMustBeReduceOnly = errors.New("stop order must be reduce only") ErrStopOrderExpiryInThePast = errors.New("stop order expiry in the past") + ErrStopOrderSizeOverridePercentageInvalid = errors.New("stop order size override percentage value is invalid") ErrPartyHasNoExistingLiquidityProvision = errors.New("party has no existing liquidity provision") + // ErrStopOrderNotAllowedDuringOpeningAuction is returned if a trader attempts to send a stop order to a market that is in opening auction. + ErrStopOrderNotAllowedDuringOpeningAuction = errors.New("stop orders are not accepted during the opening auction") + // ErrStopOrderNotAllowedSameExpiryTimeForOCO is returned if both sides of an OCO have the same expiry time. + ErrStopOrderNotAllowedSameExpiry = errors.New("stop order OCOs must not have the same expiry time") ) diff --git a/core/execution/common/expiring_orders_test.go b/core/execution/common/expiring_orders_test.go index d8da73651a..50b3991d44 100644 --- a/core/execution/common/expiring_orders_test.go +++ b/core/execution/common/expiring_orders_test.go @@ -19,6 +19,7 @@ import ( "testing" "code.vegaprotocol.io/vega/core/execution/common" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/execution/common/interfaces.go b/core/execution/common/interfaces.go index 216241f6d0..017a3a198f 100644 --- a/core/execution/common/interfaces.go +++ b/core/execution/common/interfaces.go @@ -24,7 +24,6 @@ import ( "code.vegaprotocol.io/vega/core/datasource/spec" "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/liquidity/v2" - lmon "code.vegaprotocol.io/vega/core/monitor/liquidity" "code.vegaprotocol.io/vega/core/monitor/price" "code.vegaprotocol.io/vega/core/risk" "code.vegaprotocol.io/vega/core/types" @@ -34,7 +33,7 @@ import ( var One = num.UintOne() -//go:generate go run github.com/golang/mock/mockgen -destination mocks/mocks.go -package mocks code.vegaprotocol.io/vega/core/execution/common TimeService,Assets,StateVarEngine,Collateral,OracleEngine,EpochEngine,AuctionState,LiquidityEngine,EquityLikeShares,MarketLiquidityEngine,Teams,AccountBalanceChecker +//go:generate go run github.com/golang/mock/mockgen -destination mocks/mocks.go -package mocks code.vegaprotocol.io/vega/core/execution/common TimeService,Assets,StateVarEngine,Collateral,OracleEngine,EpochEngine,AuctionState,LiquidityEngine,EquityLikeShares,MarketLiquidityEngine,Teams,AccountBalanceChecker,Banking // InitialOrderVersion is set on `Version` field for every new order submission read from the network. const InitialOrderVersion = 1 @@ -93,13 +92,11 @@ type IDGenerator interface { //nolint:interfacebloat type AuctionState interface { price.AuctionState - lmon.AuctionState // are we in auction, and what auction are we in? ExtendAuctionSuspension(delta types.AuctionDuration) InAuction() bool IsOpeningAuction() bool IsPriceAuction() bool - IsLiquidityAuction() bool IsFBA() bool IsMonitorAuction() bool ExceededMaxOpening(time.Time) bool @@ -124,6 +121,8 @@ type AuctionState interface { GetState() *types.AuctionState Changed() bool UpdateMaxDuration(ctx context.Context, d time.Duration) + StartGovernanceSuspensionAuction(t time.Time) + EndGovernanceSuspensionAuction() } type EpochEngine interface { @@ -141,6 +140,7 @@ type Collateral interface { EnableAsset(ctx context.Context, asset types.Asset) error GetPartyGeneralAccount(party, asset string) (*types.Account, error) GetPartyBondAccount(market, partyID, asset string) (*types.Account, error) + GetOrCreatePartyOrderMarginAccount(ctx context.Context, partyID, marketID, asset string) (string, error) BondUpdate(ctx context.Context, market string, transfer *types.Transfer) (*types.LedgerMovement, error) BondSpotUpdate(ctx context.Context, market string, transfer *types.Transfer) (*types.LedgerMovement, error) RemoveBondAccount(partyID, marketID, asset string) error @@ -150,10 +150,11 @@ type Collateral interface { RollbackMarginUpdateOnOrder(ctx context.Context, marketID string, assetID string, transfer *types.Transfer) (*types.LedgerMovement, error) GetOrCreatePartyBondAccount(ctx context.Context, partyID, marketID, asset string) (*types.Account, error) CreatePartyMarginAccount(ctx context.Context, partyID, marketID, asset string) (string, error) - FinalSettlement(ctx context.Context, marketID string, transfers []*types.Transfer, factor *num.Uint) ([]*types.LedgerMovement, error) + FinalSettlement(ctx context.Context, marketID string, transfers []*types.Transfer, factor *num.Uint, useGeneralAccountForMarginSearch func(string) bool) ([]*types.LedgerMovement, error) ClearMarket(ctx context.Context, mktID, asset string, parties []string, keepInsurance bool) ([]*types.LedgerMovement, error) HasGeneralAccount(party, asset string) bool ClearPartyMarginAccount(ctx context.Context, party, market, asset string) (*types.LedgerMovement, error) + ClearPartyOrderMarginAccount(ctx context.Context, party, market, asset string) (*types.LedgerMovement, error) CanCoverBond(market, party, asset string, amount *num.Uint) bool Hash() []byte TransferFeesContinuousTrading(ctx context.Context, marketID string, assetID string, ft events.FeesTransfer) ([]*types.LedgerMovement, error) @@ -161,9 +162,10 @@ type Collateral interface { TransferSpotFees(ctx context.Context, marketID string, assetID string, ft events.FeesTransfer) ([]*types.LedgerMovement, error) TransferSpotFeesContinuousTrading(ctx context.Context, marketID string, assetID string, ft events.FeesTransfer) ([]*types.LedgerMovement, error) MarginUpdate(ctx context.Context, marketID string, updates []events.Risk) ([]*types.LedgerMovement, []events.Margin, []events.Margin, error) - PerpsFundingSettlement(ctx context.Context, marketID string, transfers []events.Transfer, asset string, round *num.Uint) ([]events.Margin, []*types.LedgerMovement, error) - MarkToMarket(ctx context.Context, marketID string, transfers []events.Transfer, asset string) ([]events.Margin, []*types.LedgerMovement, error) - RemoveDistressed(ctx context.Context, parties []events.MarketPosition, marketID, asset string) (*types.LedgerMovement, error) + IsolatedMarginUpdate(updates []events.Risk) []events.Margin + PerpsFundingSettlement(ctx context.Context, marketID string, transfers []events.Transfer, asset string, round *num.Uint, useGeneralAccountForMarginSearch func(string) bool) ([]events.Margin, []*types.LedgerMovement, error) + MarkToMarket(ctx context.Context, marketID string, transfers []events.Transfer, asset string, useGeneralAccountForMarginSearch func(string) bool) ([]events.Margin, []*types.LedgerMovement, error) + RemoveDistressed(ctx context.Context, parties []events.MarketPosition, marketID, asset string, useGeneralAccount func(string) bool) (*types.LedgerMovement, error) GetMarketLiquidityFeeAccount(market, asset string) (*types.Account, error) GetAssetQuantum(asset string) (num.Decimal, error) GetInsurancePoolBalance(marketID, asset string) (*num.Uint, bool) @@ -209,6 +211,10 @@ func (o OrderReferenceCheck) HasMoved(changes uint8) bool { changes&PriceMoveBestAsk > 0) } +type Banking interface { + RegisterTradingFees(ctx context.Context, asset string, feesPerParty map[string]*num.Uint) +} + type LiquidityEngine interface { GetLegacyOrders() []string OnEpochRestore(ep types.Epoch) diff --git a/core/execution/common/liquidity_provision.go b/core/execution/common/liquidity_provision.go index 75a09ddbd2..bfd6bf960f 100644 --- a/core/execution/common/liquidity_provision.go +++ b/core/execution/common/liquidity_provision.go @@ -21,10 +21,9 @@ import ( "fmt" "time" + "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/fee" "code.vegaprotocol.io/vega/core/idgeneration" - - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/liquidity/v2" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" @@ -343,7 +342,7 @@ func (m *MarketLiquidity) EndBlock(markPrice, midPrice *num.Uint, positionFactor } func (m *MarketLiquidity) updateLiquidityScores() { - minLpPrice, maxLpPrice, err := m.validOrdersPriceRange() + minLpPrice, maxLpPrice, err := m.ValidOrdersPriceRange() if err != nil { m.log.Debug("liquidity score update error", logging.Error(err)) return @@ -763,8 +762,8 @@ func (m *MarketLiquidity) ensureMinCommitmentAmount(amount *num.Uint) error { return nil } -// validOrdersPriceRange returns min and max valid prices range for LP orders. -func (m *MarketLiquidity) validOrdersPriceRange() (*num.Uint, *num.Uint, error) { +// ValidOrdersPriceRange returns min and max valid prices range for LP orders. +func (m *MarketLiquidity) ValidOrdersPriceRange() (*num.Uint, *num.Uint, error) { bestBid, err := m.orderBook.GetBestStaticBidPrice() if err != nil { return num.UintOne(), num.MaxUint(), err diff --git a/core/execution/common/liquidity_provision_fees.go b/core/execution/common/liquidity_provision_fees.go index 706a264ab3..134510d336 100644 --- a/core/execution/common/liquidity_provision_fees.go +++ b/core/execution/common/liquidity_provision_fees.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "golang.org/x/exp/constraints" ) diff --git a/core/execution/common/liquidity_provision_test.go b/core/execution/common/liquidity_provision_test.go index ebbfeb9184..43bb6126fa 100644 --- a/core/execution/common/liquidity_provision_test.go +++ b/core/execution/common/liquidity_provision_test.go @@ -21,22 +21,21 @@ import ( "testing" "time" + bmocks "code.vegaprotocol.io/vega/core/broker/mocks" "code.vegaprotocol.io/vega/core/collateral" + cmocks "code.vegaprotocol.io/vega/core/collateral/mocks" "code.vegaprotocol.io/vega/core/execution/common" "code.vegaprotocol.io/vega/core/execution/common/mocks" "code.vegaprotocol.io/vega/core/fee" + "code.vegaprotocol.io/vega/core/liquidity/v2" + lmocks "code.vegaprotocol.io/vega/core/liquidity/v2/mocks" "code.vegaprotocol.io/vega/core/types" + vgcrypto "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - - vgcrypto "code.vegaprotocol.io/vega/libs/crypto" - - bmocks "code.vegaprotocol.io/vega/core/broker/mocks" - cmocks "code.vegaprotocol.io/vega/core/collateral/mocks" - "code.vegaprotocol.io/vega/core/liquidity/v2" - lmocks "code.vegaprotocol.io/vega/core/liquidity/v2/mocks" ) type marketLiquidityTest struct { diff --git a/core/execution/common/market_activity_tracker.go b/core/execution/common/market_activity_tracker.go index c47bed3258..1940bfbf6b 100644 --- a/core/execution/common/market_activity_tracker.go +++ b/core/execution/common/market_activity_tracker.go @@ -23,9 +23,8 @@ import ( "strings" "time" - "code.vegaprotocol.io/vega/libs/crypto" - "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" lproto "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" @@ -42,8 +41,8 @@ const ( ) var ( - uScalingFactor = num.NewUint(u64ScalingFactor) - dSscalingFactor = num.DecimalFromInt64(scalingFactor) + uScalingFactor = num.NewUint(u64ScalingFactor) + dScalingFactor = num.DecimalFromInt64(scalingFactor) ) type twPosition struct { @@ -55,7 +54,7 @@ type twPosition struct { type twNotional struct { notional *num.Uint // last position's price t time.Time // time of last recorded notional position - currentEpochTWNotional *num.Uint // current epoch's running time weightd notional position + currentEpochTWNotional *num.Uint // current epoch's running time-weighted notional position } // marketTracker tracks the activity in the markets in terms of fees and value. @@ -93,29 +92,35 @@ type marketTracker struct { // MarketActivityTracker tracks how much fees are paid and received for a market by parties by epoch. type MarketActivityTracker struct { - log *logging.Logger - assetToMarketTrackers map[string]map[string]*marketTracker - eligibilityChecker EligibilityChecker + log *logging.Logger + + teams Teams + balanceChecker AccountBalanceChecker + eligibilityChecker EligibilityChecker + currentEpoch uint64 epochStartTime time.Time - ss *snapshotState - teams Teams - balanceChecker AccountBalanceChecker minEpochsInTeamForRewardEligibility uint64 - partyContributionCache map[string][]*types.PartyContributionScore - partyTakerNotionalVolume map[string]*num.Uint + + assetToMarketTrackers map[string]map[string]*marketTracker + partyContributionCache map[string][]*types.PartyContributionScore + partyTakerNotionalVolume map[string]*num.Uint + marketToPartyTakerNotionalVolume map[string]map[string]*num.Uint + + ss *snapshotState } // NewMarketActivityTracker instantiates the fees tracker. func NewMarketActivityTracker(log *logging.Logger, teams Teams, balanceChecker AccountBalanceChecker) *MarketActivityTracker { mat := &MarketActivityTracker{ - assetToMarketTrackers: map[string]map[string]*marketTracker{}, - ss: &snapshotState{}, - log: log, - balanceChecker: balanceChecker, - teams: teams, - partyContributionCache: map[string][]*types.PartyContributionScore{}, - partyTakerNotionalVolume: map[string]*num.Uint{}, + log: log, + balanceChecker: balanceChecker, + teams: teams, + assetToMarketTrackers: map[string]map[string]*marketTracker{}, + partyContributionCache: map[string][]*types.PartyContributionScore{}, + partyTakerNotionalVolume: map[string]*num.Uint{}, + marketToPartyTakerNotionalVolume: map[string]map[string]*num.Uint{}, + ss: &snapshotState{}, } return mat @@ -126,9 +131,9 @@ func (mat *MarketActivityTracker) OnMinEpochsInTeamForRewardEligibilityUpdated(_ return nil } -// NeedsInitialisation is a heuristc migration - if there is no time weighted position data when restoring from snapshot, we will restore +// NeedsInitialisation is a heuristic migration - if there is no time weighted position data when restoring from snapshot, we will restore // positions from the market. This will only happen on the one time migration from a version preceding the new metrics. If we're already on a -// new version, either there are no timeweighted positions and no positions or there are time weighted positions and they will not be restored. +// new version, either there are no time-weighted positions and no positions or there are time weighted positions and they will not be restored. func (mat *MarketActivityTracker) NeedsInitialisation(asset, market string) bool { if tracker, ok := mat.getMarketTracker(asset, market); ok { return len(tracker.twPosition) == 0 @@ -266,7 +271,7 @@ func (mat *MarketActivityTracker) GetMarketsWithEligibleProposer(asset string, m for _, mcs := range scores { scoresString += mcs.Market + ":" + mcs.Score.String() + "," } - mat.log.Info("markets contibutions:", logging.String("asset", asset), logging.String("metric", proto.DispatchMetric_name[int32(proto.DispatchMetric_DISPATCH_METRIC_MARKET_VALUE)]), logging.String("market-scores", scoresString[:len(scoresString)-1])) + mat.log.Info("markets contributions:", logging.String("asset", asset), logging.String("metric", proto.DispatchMetric_name[int32(proto.DispatchMetric_DISPATCH_METRIC_MARKET_VALUE)]), logging.String("market-scores", scoresString[:len(scoresString)-1])) return scores } @@ -283,7 +288,7 @@ func (mat *MarketActivityTracker) clipScoresAt1(scores []*types.MarketContributi sort.SliceStable(scores, func(i, j int) bool { return scores[i].Market < scores[j].Market }) } -// MarkProposerPaid marks the proposer of the market as having been paid proposer bonus. +// MarkPaidProposer marks the proposer of the market as having been paid proposer bonus. func (mat *MarketActivityTracker) MarkPaidProposer(asset, market, payoutAsset string, marketsInScope []string, funder string) { markets := strings.Join(marketsInScope[:], "_") if len(marketsInScope) == 0 { @@ -362,7 +367,7 @@ func (mat *MarketActivityTracker) MarketTrackedForAsset(market, asset string) bo return false } -// removeMarket is called when the market is removed from the network. It is not immediately removed to give a chance for rewards to be paid at the end of the epoch for activity during the epoch. +// RemoveMarket is called when the market is removed from the network. It is not immediately removed to give a chance for rewards to be paid at the end of the epoch for activity during the epoch. // Instead it is marked for removal and will be removed at the beginning of the next epoch. func (mat *MarketActivityTracker) RemoveMarket(asset, marketID string) { if markets, ok := mat.assetToMarketTrackers[asset]; ok { @@ -372,15 +377,14 @@ func (mat *MarketActivityTracker) RemoveMarket(asset, marketID string) { } } -// onEpochEvent is called when the state of the epoch changes, we only care about new epochs starting. -func (mat *MarketActivityTracker) OnEpochEvent(_ context.Context, epoch types.Epoch) { +// OnEpochEvent is called when the state of the epoch changes, we only care about new epochs starting. +func (mat *MarketActivityTracker) OnEpochEvent(ctx context.Context, epoch types.Epoch) { if epoch.Action == proto.EpochAction_EPOCH_ACTION_START { mat.epochStartTime = epoch.StartTime mat.partyContributionCache = map[string][]*types.PartyContributionScore{} mat.clearDeletedMarkets() mat.clearNotionalTakerVolume() - } - if epoch.Action == proto.EpochAction_EPOCH_ACTION_END { + } else if epoch.Action == proto.EpochAction_EPOCH_ACTION_END { for _, market := range mat.assetToMarketTrackers { for _, mt := range market { mt.processNotionalEndOfEpoch(epoch.StartTime, epoch.EndTime) @@ -680,14 +684,14 @@ func calculateMetricForTeamUtil(asset string, return total.Div(num.DecimalFromInt64(int64(maxIndex))), teamPartyScores } -// calculateMetricForParty returns the value of a reward metric score for the given party for markets of the givem assets which are in scope over the given window size. +// calculateMetricForParty returns the value of a reward metric score for the given party for markets of the given assets which are in scope over the given window size. func (mat *MarketActivityTracker) calculateMetricForParty(asset, party string, marketsInScope []string, metric vega.DispatchMetric, windowSize int) num.Decimal { // exclude unsupported metrics if metric == vega.DispatchMetric_DISPATCH_METRIC_MARKET_VALUE { - mat.log.Panic("unexpected disaptch metric market value here") + mat.log.Panic("unexpected dispatch metric market value here") } if metric == vega.DispatchMetric_DISPATCH_METRIC_VALIDATOR_RANKING { - mat.log.Panic("unexpected disaptch metric validator ranking here") + mat.log.Panic("unexpected dispatch metric validator ranking here") } uTotal := uint64(0) total := num.DecimalZero() @@ -767,16 +771,27 @@ func (mat *MarketActivityTracker) calculateMetricForParty(asset, party string, m return num.DecimalZero() } -func (mat *MarketActivityTracker) RecordNotionalTakerVolume(party string, volumeToAdd *num.Uint) { +func (mat *MarketActivityTracker) RecordNotionalTakerVolume(marketID string, party string, volumeToAdd *num.Uint) { if _, ok := mat.partyTakerNotionalVolume[party]; !ok { mat.partyTakerNotionalVolume[party] = volumeToAdd - return + } else { + mat.partyTakerNotionalVolume[party].AddSum(volumeToAdd) + } + + if _, ok := mat.marketToPartyTakerNotionalVolume[marketID]; !ok { + mat.marketToPartyTakerNotionalVolume[marketID] = map[string]*num.Uint{ + party: volumeToAdd.Clone(), + } + } else if _, ok := mat.marketToPartyTakerNotionalVolume[marketID][party]; !ok { + mat.marketToPartyTakerNotionalVolume[marketID][party] = volumeToAdd.Clone() + } else { + mat.marketToPartyTakerNotionalVolume[marketID][party].AddSum(volumeToAdd) } - mat.partyTakerNotionalVolume[party].AddSum(volumeToAdd) } func (mat *MarketActivityTracker) clearNotionalTakerVolume() { mat.partyTakerNotionalVolume = map[string]*num.Uint{} + mat.marketToPartyTakerNotionalVolume = map[string]map[string]*num.Uint{} } func (mat *MarketActivityTracker) NotionalTakerVolumeForAllParties() map[types.PartyID]*num.Uint { @@ -787,6 +802,54 @@ func (mat *MarketActivityTracker) NotionalTakerVolumeForAllParties() map[types.P return res } +func (mat *MarketActivityTracker) TeamStatsForMarkets(allMarketsForAssets, onlyTheseMarkets []string) map[string]map[string]*num.Uint { + teams := mat.teams.GetAllTeamsWithParties(0) + + // Pre-fill stats for all teams and their members. + partyToTeam := map[string]string{} + teamsStats := map[string]map[string]*num.Uint{} + for teamID, members := range teams { + teamsStats[teamID] = map[string]*num.Uint{} + for _, member := range members { + teamsStats[teamID][member] = num.UintZero() + partyToTeam[member] = teamID + } + } + + // Filter the markets to get data from. + onlyMarketsStats := map[string]map[string]*num.Uint{} + if len(onlyTheseMarkets) == 0 { + onlyMarketsStats = mat.marketToPartyTakerNotionalVolume + } else { + for _, marketID := range onlyTheseMarkets { + onlyMarketsStats[marketID] = mat.marketToPartyTakerNotionalVolume[marketID] + } + } + + for _, asset := range allMarketsForAssets { + mkts, ok := mat.assetToMarketTrackers[asset] + if !ok { + continue + } + for marketID := range mkts { + onlyMarketsStats[marketID] = mat.marketToPartyTakerNotionalVolume[marketID] + } + } + + // Gather only party's stats from those who are in a team. + for _, marketStats := range onlyMarketsStats { + for partyID, volume := range marketStats { + teamID, inTeam := partyToTeam[partyID] + if !inTeam { + continue + } + teamsStats[teamID][partyID].AddSum(volume) + } + } + + return teamsStats +} + func (mat *MarketActivityTracker) NotionalTakerVolumeForParty(party string) *num.Uint { if _, ok := mat.partyTakerNotionalVolume[party]; !ok { return num.UintZero() @@ -895,7 +958,7 @@ func (mt *marketTracker) recordPosition(party string, absPos uint64, positionFac updatePosition(toi, uint64(scaledAbsPos), t, tn, time) } -// processPositionEndOfEpoch is called at the end of the epoch, calcualtes the time weight of the current position and moves it to the next epoch, and records +// processPositionEndOfEpoch is called at the end of the epoch, calculates the time weight of the current position and moves it to the next epoch, and records // the time weighted position of the current epoch in the history. func (mt *marketTracker) processPositionEndOfEpoch(epochStartTime time.Time, endEpochTime time.Time) { t := int64(endEpochTime.Sub(epochStartTime).Seconds()) @@ -916,7 +979,7 @@ func (mt *marketTracker) processPositionEndOfEpoch(epochStartTime time.Time, end // recordM2M records the amount corresponding to mark to market (profit or loss). func (mt *marketTracker) recordM2M(party string, amount num.Decimal) { - if party == "network" { + if party == "network" || amount.IsZero() { return } if _, ok := mt.partyM2M[party]; !ok { @@ -930,12 +993,15 @@ func (mt *marketTracker) recordM2M(party string, amount num.Decimal) { func (mt *marketTracker) processM2MEndOfEpoch() { m := map[string]num.Decimal{} for party, m2m := range mt.partyM2M { + if _, ok := mt.twPosition[party]; !ok { + continue + } p := mt.twPosition[party].currentEpochTWPosition var v num.Decimal if p == 0 { v = num.DecimalZero() } else { - v = m2m.Div(num.DecimalFromInt64(int64(p)).Div(dSscalingFactor)) + v = m2m.Div(num.DecimalFromInt64(int64(p)).Div(dScalingFactor)) } m[party] = v mt.partyM2M[party] = num.DecimalZero() diff --git a/core/execution/common/market_activity_tracker_checkpoint.go b/core/execution/common/market_activity_tracker_checkpoint.go index 35c67b2b59..5a29771e99 100644 --- a/core/execution/common/market_activity_tracker_checkpoint.go +++ b/core/execution/common/market_activity_tracker_checkpoint.go @@ -19,12 +19,10 @@ import ( "context" "sort" - checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" - "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" + checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" ) func (mat *MarketActivityTracker) Name() types.CheckpointName { @@ -53,8 +51,9 @@ func (mat *MarketActivityTracker) Checkpoint() ([]byte, error) { } msg := &checkpoint.MarketTracker{ - MarketActivity: marketTracker, - TakerNotionalVolume: takerNotionalToProto(mat.partyTakerNotionalVolume), + MarketActivity: marketTracker, + TakerNotionalVolume: takerNotionalToProto(mat.partyTakerNotionalVolume), + MarketToPartyTakerNotionalVolume: marketToPartyTakerNotionalToProto(mat.marketToPartyTakerNotionalVolume), } ret, err := proto.Marshal(msg) if err != nil { @@ -63,7 +62,7 @@ func (mat *MarketActivityTracker) Checkpoint() ([]byte, error) { return ret, nil } -func (mat *MarketActivityTracker) Load(ctx context.Context, data []byte) error { +func (mat *MarketActivityTracker) Load(_ context.Context, data []byte) error { b := checkpoint.MarketTracker{} if err := proto.Unmarshal(data, &b); err != nil { return err @@ -80,5 +79,13 @@ func (mat *MarketActivityTracker) Load(ctx context.Context, data []byte) error { mat.partyTakerNotionalVolume[tnv.Party] = num.UintFromBytes(tnv.Volume) } } + for _, marketToPartyStats := range b.MarketToPartyTakerNotionalVolume { + mat.marketToPartyTakerNotionalVolume[marketToPartyStats.Market] = map[string]*num.Uint{} + for _, partyStats := range marketToPartyStats.TakerNotionalVolume { + if len(partyStats.Volume) > 0 { + mat.marketToPartyTakerNotionalVolume[marketToPartyStats.Market][partyStats.Party] = num.UintFromBytes(partyStats.Volume) + } + } + } return nil } diff --git a/core/execution/common/market_activity_tracker_internal_test.go b/core/execution/common/market_activity_tracker_internal_test.go index 01d2bc0b88..93872067ac 100644 --- a/core/execution/common/market_activity_tracker_internal_test.go +++ b/core/execution/common/market_activity_tracker_internal_test.go @@ -27,6 +27,7 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/protos/vega" vgproto "code.vegaprotocol.io/vega/protos/vega" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) @@ -200,7 +201,6 @@ func TestPositions(t *testing.T) { tracker.recordPosition("p1", 30, num.DecimalOne(), time.Unix(45, 0), time.Unix(0, 0)) // 155555544 * ( 10000000 - 2500000 ) + ( 300000000 * 2500000 ) / 10000000 = 191666658 tracker.processPositionEndOfEpoch(time.Unix(0, 0), time.Unix(60, 0)) - println(tracker.getPositionMetricTotal("p1", 1)) require.Equal(t, uint64(191666658), tracker.getPositionMetricTotal("p1", 1)) // epoch 2 diff --git a/core/execution/common/market_activity_tracker_snapshot.go b/core/execution/common/market_activity_tracker_snapshot.go index 78a2452ed1..01e5d59a24 100644 --- a/core/execution/common/market_activity_tracker_snapshot.go +++ b/core/execution/common/market_activity_tracker_snapshot.go @@ -18,16 +18,16 @@ package common import ( "context" "errors" + "slices" "sort" + "strings" "time" - checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" - snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" - "code.vegaprotocol.io/vega/libs/proto" + checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" + snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" ) var ( @@ -167,6 +167,22 @@ func timeWeightedPositionToProto(partyPositions map[string]*twPosition) []*check return data } +func marketToPartyTakerNotionalToProto(stats map[string]map[string]*num.Uint) []*checkpoint.MarketToPartyTakerNotionalVolume { + ret := make([]*checkpoint.MarketToPartyTakerNotionalVolume, 0, len(stats)) + for marketID, partiesStats := range stats { + ret = append(ret, &checkpoint.MarketToPartyTakerNotionalVolume{ + Market: marketID, + TakerNotionalVolume: takerNotionalToProto(partiesStats), + }) + } + + slices.SortStableFunc(ret, func(a, b *checkpoint.MarketToPartyTakerNotionalVolume) int { + return strings.Compare(a.Market, b.Market) + }) + + return ret +} + func takerNotionalToProto(takerNotional map[string]*num.Uint) []*checkpoint.TakerNotionalVolume { ret := make([]*checkpoint.TakerNotionalVolume, 0, len(takerNotional)) for k, u := range takerNotional { @@ -266,8 +282,9 @@ func (mat *MarketActivityTracker) serialiseFeesTracker() *snapshot.MarketTracker } return &snapshot.MarketTracker{ - MarketActivity: marketActivity, - TakerNotionalVolume: takerNotionalToProto(mat.partyTakerNotionalVolume), + MarketActivity: marketActivity, + TakerNotionalVolume: takerNotionalToProto(mat.partyTakerNotionalVolume), + MarketToPartyTakerNotionalVolume: marketToPartyTakerNotionalToProto(mat.marketToPartyTakerNotionalVolume), } } @@ -296,7 +313,7 @@ func (mat *MarketActivityTracker) GetState(k string) ([]byte, []types.StateProvi return state, nil, err } -func (mat *MarketActivityTracker) LoadState(ctx context.Context, p *types.Payload) ([]types.StateProvider, error) { +func (mat *MarketActivityTracker) LoadState(_ context.Context, p *types.Payload) ([]types.StateProvider, error) { if mat.Namespace() != p.Data.Namespace() { return nil, types.ErrInvalidSnapshotNamespace } @@ -495,9 +512,17 @@ func (mat *MarketActivityTracker) restore(tracker *snapshot.MarketTracker) { mat.partyTakerNotionalVolume[tnv.Party] = num.UintFromBytes(tnv.Volume) } } + for _, marketToPartyStats := range tracker.MarketToPartyTakerNotionalVolume { + mat.marketToPartyTakerNotionalVolume[marketToPartyStats.Market] = map[string]*num.Uint{} + for _, partyStats := range marketToPartyStats.TakerNotionalVolume { + if len(partyStats.Volume) > 0 { + mat.marketToPartyTakerNotionalVolume[marketToPartyStats.Market][partyStats.Party] = num.UintFromBytes(partyStats.Volume) + } + } + } } -// onEpochRestore is called when the state of the epoch changes, we only care about new epochs starting. +// OnEpochRestore is called when the state of the epoch changes, we only care about new epochs starting. func (mat *MarketActivityTracker) OnEpochRestore(_ context.Context, epoch types.Epoch) { mat.currentEpoch = epoch.Seq mat.epochStartTime = epoch.StartTime diff --git a/core/execution/common/market_activity_tracker_test.go b/core/execution/common/market_activity_tracker_test.go index 6a6a40c6d3..8e15fd546a 100644 --- a/core/execution/common/market_activity_tracker_test.go +++ b/core/execution/common/market_activity_tracker_test.go @@ -25,11 +25,11 @@ import ( "code.vegaprotocol.io/vega/core/execution/common/mocks" "code.vegaprotocol.io/vega/core/integration/stubs" snp "code.vegaprotocol.io/vega/core/snapshot" - "code.vegaprotocol.io/vega/core/stats" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" + vgrand "code.vegaprotocol.io/vega/libs/rand" vgtest "code.vegaprotocol.io/vega/libs/test" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" @@ -141,7 +141,9 @@ func TestMarketTracker(t *testing.T) { pl := snapshotpb.Payload{} require.NoError(t, proto.Unmarshal(state1, &pl)) - trackerLoad.LoadState(context.Background(), types.PayloadFromProto(&pl)) + additionalProvider, err := trackerLoad.LoadState(context.Background(), types.PayloadFromProto(&pl)) + require.NoError(t, err) + assert.Nil(t, additionalProvider) state2, _, err := trackerLoad.GetState(key) require.NoError(t, err) @@ -610,7 +612,10 @@ func TestFeesTracker(t *testing.T) { pl := snapshotpb.Payload{} require.NoError(t, proto.Unmarshal(state2, &pl)) - trackerLoad.LoadState(context.Background(), types.PayloadFromProto(&pl)) + + additionalProvider, err := trackerLoad.LoadState(context.Background(), types.PayloadFromProto(&pl)) + require.NoError(t, err) + assert.Nil(t, additionalProvider) state3, _, err := trackerLoad.GetState(key) require.NoError(t, err) @@ -673,7 +678,10 @@ func TestSnapshot(t *testing.T) { pl := snapshotpb.Payload{} require.NoError(t, proto.Unmarshal(state1, &pl)) - trackerLoad.LoadState(context.Background(), types.PayloadFromProto(&pl)) + additionalProvider, err := trackerLoad.LoadState(context.Background(), types.PayloadFromProto(&pl)) + require.NoError(t, err) + assert.Nil(t, additionalProvider) + state2, _, err := trackerLoad.GetState(key) require.NoError(t, err) require.True(t, bytes.Equal(state1, state2)) @@ -689,7 +697,8 @@ func TestCheckpoint(t *testing.T) { teams := mocks.NewMockTeams(ctrl) balanceChecker := mocks.NewMockAccountBalanceChecker(ctrl) trackerLoad := common.NewMarketActivityTracker(logging.NewTestLogger(), teams, balanceChecker) - trackerLoad.Load(context.Background(), b) + + require.NoError(t, trackerLoad.Load(context.Background(), b)) bLoad, err := trackerLoad.Checkpoint() require.NoError(t, err) @@ -1102,6 +1111,114 @@ func TestRelativeReturnMetric(t *testing.T) { require.Equal(t, "0.0125", scores[0].Score.String()) } +func TestTeamStatsForMarkets(t *testing.T) { + ctrl := gomock.NewController(t) + teams := mocks.NewMockTeams(ctrl) + balanceChecker := mocks.NewMockAccountBalanceChecker(ctrl) + tracker := common.NewMarketActivityTracker(logging.NewTestLogger(), teams, balanceChecker) + + asset1 := vgrand.RandomStr(5) + asset2 := vgrand.RandomStr(5) + asset3 := vgrand.RandomStr(5) + + market1 := "market1" + market2 := "market2" + market3 := "market3" + market4 := "market4" + market5 := "market5" + market6 := "market6" + market7 := "market7" + + team1 := "team1" + team2 := "team2" + member11 := "member11" + member12 := "member12" + member21 := "member21" + member22 := "member22" + lonewolf1 := "lone-wolf1" + lonewolf2 := "lone-wolf2" + + // 1. Need markets with different assets. + tracker.MarketProposed(asset1, market1, vgrand.RandomStr(5)) + tracker.MarketProposed(asset1, market2, vgrand.RandomStr(5)) + tracker.MarketProposed(asset1, market3, vgrand.RandomStr(5)) + + tracker.MarketProposed(asset2, market4, vgrand.RandomStr(5)) + tracker.MarketProposed(asset2, market5, vgrand.RandomStr(5)) + + tracker.MarketProposed(asset3, market6, vgrand.RandomStr(5)) + tracker.MarketProposed(asset3, market7, vgrand.RandomStr(5)) + + // 2. Need to define teams. + teams.EXPECT().GetAllTeamsWithParties(uint64(0)).Return(map[string][]string{ + team1: {member11, member12}, + team2: {member21, member22}, + }).Times(1) + + // 3. Need parties generating volume on these markets. + tracker.RecordNotionalTakerVolume(market1, member11, num.NewUint(1)) + tracker.RecordNotionalTakerVolume(market1, member12, num.NewUint(2)) + tracker.RecordNotionalTakerVolume(market1, member21, num.NewUint(3)) + tracker.RecordNotionalTakerVolume(market1, member22, num.NewUint(4)) + tracker.RecordNotionalTakerVolume(market1, lonewolf1, num.NewUint(5)) + tracker.RecordNotionalTakerVolume(market1, lonewolf2, num.NewUint(6)) + + tracker.RecordNotionalTakerVolume(market2, member11, num.NewUint(1)) + tracker.RecordNotionalTakerVolume(market2, member12, num.NewUint(2)) + tracker.RecordNotionalTakerVolume(market2, member21, num.NewUint(3)) + tracker.RecordNotionalTakerVolume(market2, member22, num.NewUint(4)) + tracker.RecordNotionalTakerVolume(market2, lonewolf1, num.NewUint(5)) + tracker.RecordNotionalTakerVolume(market2, lonewolf2, num.NewUint(6)) + + // No participation of team 2 in market 3. + tracker.RecordNotionalTakerVolume(market3, member11, num.NewUint(1)) + tracker.RecordNotionalTakerVolume(market3, member12, num.NewUint(2)) + tracker.RecordNotionalTakerVolume(market3, lonewolf1, num.NewUint(5)) + tracker.RecordNotionalTakerVolume(market3, lonewolf2, num.NewUint(6)) + + // No participation of team 1 in market 4. + tracker.RecordNotionalTakerVolume(market4, member21, num.NewUint(3)) + tracker.RecordNotionalTakerVolume(market4, member22, num.NewUint(4)) + tracker.RecordNotionalTakerVolume(market4, lonewolf1, num.NewUint(5)) + tracker.RecordNotionalTakerVolume(market4, lonewolf2, num.NewUint(6)) + + // Market 5 is not expected to be filtered on, so none of these volume + // should show up in the stats. + tracker.RecordNotionalTakerVolume(market5, member11, num.NewUint(1000)) + tracker.RecordNotionalTakerVolume(market5, member12, num.NewUint(2000)) + tracker.RecordNotionalTakerVolume(market5, member12, num.NewUint(3000)) + tracker.RecordNotionalTakerVolume(market5, member22, num.NewUint(4000)) + tracker.RecordNotionalTakerVolume(market5, lonewolf1, num.NewUint(5000)) + tracker.RecordNotionalTakerVolume(market5, lonewolf2, num.NewUint(6000)) + + // Nobody likes market 6. So, no participation of any kind. + + // Only lone-wolves in market 7. + tracker.RecordNotionalTakerVolume(market7, lonewolf1, num.NewUint(5)) + tracker.RecordNotionalTakerVolume(market7, lonewolf2, num.NewUint(6)) + + // Regarding the dataset above, this should result in gathering the data from + // the market 1, 2, 3, 4, and 7, but not 5 and 6, because: + // - we want all markets from asset 1 -> market 1, 2, and 3. + // - we want specific market 1, 3, 4, and 7. + // + // NB: It's on purpose we have duplicated references to the market 1 and 3, so + // we can ensure it's duplicated and we don't add up stats from a market multiple + // times. + teamsStats := tracker.TeamStatsForMarkets([]string{asset1}, []string{market1, market3, market4, market7}) + + assert.Equal(t, map[string]map[string]*num.Uint{ + team1: { + member11: num.NewUint(3), + member12: num.NewUint(6), + }, + team2: { + member21: num.NewUint(9), + member22: num.NewUint(12), + }, + }, teamsStats) +} + func setupDefaultTrackerForTest(t *testing.T) *common.MarketActivityTracker { t.Helper() @@ -1132,6 +1249,23 @@ func setupDefaultTrackerForTest(t *testing.T) *common.MarketActivityTracker { tracker.RecordM2M("asset1", "p1", "market1", num.DecimalOne()) tracker.RecordM2M("asset1", "p1", "market2", num.DecimalFromInt64(5)) + tracker.RecordNotionalTakerVolume("market1", "p1", num.NewUint(10)) + tracker.RecordNotionalTakerVolume("market1", "p2", num.NewUint(10)) + tracker.RecordNotionalTakerVolume("market1", "p3", num.NewUint(10)) + tracker.RecordNotionalTakerVolume("market1", "p4", num.NewUint(10)) + tracker.RecordNotionalTakerVolume("market2", "p1", num.NewUint(20)) + tracker.RecordNotionalTakerVolume("market2", "p2", num.NewUint(20)) + tracker.RecordNotionalTakerVolume("market2", "p3", num.NewUint(20)) + tracker.RecordNotionalTakerVolume("market2", "p4", num.NewUint(20)) + tracker.RecordNotionalTakerVolume("market3", "p1", num.NewUint(30)) + tracker.RecordNotionalTakerVolume("market3", "p2", num.NewUint(30)) + tracker.RecordNotionalTakerVolume("market3", "p3", num.NewUint(30)) + tracker.RecordNotionalTakerVolume("market3", "p4", num.NewUint(30)) + tracker.RecordNotionalTakerVolume("market4", "p1", num.NewUint(40)) + tracker.RecordNotionalTakerVolume("market4", "p2", num.NewUint(40)) + tracker.RecordNotionalTakerVolume("market4", "p3", num.NewUint(40)) + tracker.RecordNotionalTakerVolume("market4", "p4", num.NewUint(40)) + // update with a few transfers transfersM1 := []*types.Transfer{ {Owner: "party1", Type: types.TransferTypeMakerFeeReceive, Amount: &types.FinancialAmount{Asset: "asset1", Amount: num.NewUint(100)}}, @@ -1161,5 +1295,6 @@ func setupDefaultTrackerForTest(t *testing.T) *common.MarketActivityTracker { {Owner: "party2", Type: types.TransferTypeMakerFeeReceive, Amount: &types.FinancialAmount{Asset: "asset2", Amount: num.NewUint(450)}}, } tracker.UpdateFeesFromTransfers("asset2", "market3", transfersM3) + return tracker } diff --git a/core/execution/common/mocks/mocks.go b/core/execution/common/mocks/mocks.go index d5516d31c4..46ddd547e7 100644 --- a/core/execution/common/mocks/mocks.go +++ b/core/execution/common/mocks/mocks.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: code.vegaprotocol.io/vega/core/execution/common (interfaces: TimeService,Assets,StateVarEngine,Collateral,OracleEngine,EpochEngine,AuctionState,LiquidityEngine,EquityLikeShares,MarketLiquidityEngine,Teams,AccountBalanceChecker) +// Source: code.vegaprotocol.io/vega/core/execution/common (interfaces: TimeService,Assets,StateVarEngine,Collateral,OracleEngine,EpochEngine,AuctionState,LiquidityEngine,EquityLikeShares,MarketLiquidityEngine,Teams,AccountBalanceChecker,Banking) // Package mocks is a generated GoMock package. package mocks @@ -296,6 +296,21 @@ func (mr *MockCollateralMockRecorder) ClearPartyMarginAccount(arg0, arg1, arg2, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearPartyMarginAccount", reflect.TypeOf((*MockCollateral)(nil).ClearPartyMarginAccount), arg0, arg1, arg2, arg3) } +// ClearPartyOrderMarginAccount mocks base method. +func (m *MockCollateral) ClearPartyOrderMarginAccount(arg0 context.Context, arg1, arg2, arg3 string) (*types.LedgerMovement, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ClearPartyOrderMarginAccount", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(*types.LedgerMovement) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ClearPartyOrderMarginAccount indicates an expected call of ClearPartyOrderMarginAccount. +func (mr *MockCollateralMockRecorder) ClearPartyOrderMarginAccount(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearPartyOrderMarginAccount", reflect.TypeOf((*MockCollateral)(nil).ClearPartyOrderMarginAccount), arg0, arg1, arg2, arg3) +} + // ClearSpotMarket mocks base method. func (m *MockCollateral) ClearSpotMarket(arg0 context.Context, arg1, arg2 string) ([]*types.LedgerMovement, error) { m.ctrl.T.Helper() @@ -401,18 +416,18 @@ func (mr *MockCollateralMockRecorder) EnableAsset(arg0, arg1 interface{}) *gomoc } // FinalSettlement mocks base method. -func (m *MockCollateral) FinalSettlement(arg0 context.Context, arg1 string, arg2 []*types.Transfer, arg3 *num.Uint) ([]*types.LedgerMovement, error) { +func (m *MockCollateral) FinalSettlement(arg0 context.Context, arg1 string, arg2 []*types.Transfer, arg3 *num.Uint, arg4 func(string) bool) ([]*types.LedgerMovement, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "FinalSettlement", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "FinalSettlement", arg0, arg1, arg2, arg3, arg4) ret0, _ := ret[0].([]*types.LedgerMovement) ret1, _ := ret[1].(error) return ret0, ret1 } // FinalSettlement indicates an expected call of FinalSettlement. -func (mr *MockCollateralMockRecorder) FinalSettlement(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockCollateralMockRecorder) FinalSettlement(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalSettlement", reflect.TypeOf((*MockCollateral)(nil).FinalSettlement), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalSettlement", reflect.TypeOf((*MockCollateral)(nil).FinalSettlement), arg0, arg1, arg2, arg3, arg4) } // GetAssetQuantum mocks base method. @@ -520,6 +535,21 @@ func (mr *MockCollateralMockRecorder) GetOrCreatePartyLiquidityFeeAccount(arg0, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOrCreatePartyLiquidityFeeAccount", reflect.TypeOf((*MockCollateral)(nil).GetOrCreatePartyLiquidityFeeAccount), arg0, arg1, arg2, arg3) } +// GetOrCreatePartyOrderMarginAccount mocks base method. +func (m *MockCollateral) GetOrCreatePartyOrderMarginAccount(arg0 context.Context, arg1, arg2, arg3 string) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetOrCreatePartyOrderMarginAccount", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOrCreatePartyOrderMarginAccount indicates an expected call of GetOrCreatePartyOrderMarginAccount. +func (mr *MockCollateralMockRecorder) GetOrCreatePartyOrderMarginAccount(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOrCreatePartyOrderMarginAccount", reflect.TypeOf((*MockCollateral)(nil).GetOrCreatePartyOrderMarginAccount), arg0, arg1, arg2, arg3) +} + // GetPartyBondAccount mocks base method. func (m *MockCollateral) GetPartyBondAccount(arg0, arg1, arg2 string) (*types.Account, error) { m.ctrl.T.Helper() @@ -623,6 +653,20 @@ func (mr *MockCollateralMockRecorder) Hash() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hash", reflect.TypeOf((*MockCollateral)(nil).Hash)) } +// IsolatedMarginUpdate mocks base method. +func (m *MockCollateral) IsolatedMarginUpdate(arg0 []events.Risk) []events.Margin { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsolatedMarginUpdate", arg0) + ret0, _ := ret[0].([]events.Margin) + return ret0 +} + +// IsolatedMarginUpdate indicates an expected call of IsolatedMarginUpdate. +func (mr *MockCollateralMockRecorder) IsolatedMarginUpdate(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsolatedMarginUpdate", reflect.TypeOf((*MockCollateral)(nil).IsolatedMarginUpdate), arg0) +} + // MarginUpdate mocks base method. func (m *MockCollateral) MarginUpdate(arg0 context.Context, arg1 string, arg2 []events.Risk) ([]*types.LedgerMovement, []events.Margin, []events.Margin, error) { m.ctrl.T.Helper() @@ -657,9 +701,9 @@ func (mr *MockCollateralMockRecorder) MarginUpdateOnOrder(arg0, arg1, arg2 inter } // MarkToMarket mocks base method. -func (m *MockCollateral) MarkToMarket(arg0 context.Context, arg1 string, arg2 []events.Transfer, arg3 string) ([]events.Margin, []*types.LedgerMovement, error) { +func (m *MockCollateral) MarkToMarket(arg0 context.Context, arg1 string, arg2 []events.Transfer, arg3 string, arg4 func(string) bool) ([]events.Margin, []*types.LedgerMovement, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "MarkToMarket", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "MarkToMarket", arg0, arg1, arg2, arg3, arg4) ret0, _ := ret[0].([]events.Margin) ret1, _ := ret[1].([]*types.LedgerMovement) ret2, _ := ret[2].(error) @@ -667,9 +711,9 @@ func (m *MockCollateral) MarkToMarket(arg0 context.Context, arg1 string, arg2 [] } // MarkToMarket indicates an expected call of MarkToMarket. -func (mr *MockCollateralMockRecorder) MarkToMarket(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockCollateralMockRecorder) MarkToMarket(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkToMarket", reflect.TypeOf((*MockCollateral)(nil).MarkToMarket), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkToMarket", reflect.TypeOf((*MockCollateral)(nil).MarkToMarket), arg0, arg1, arg2, arg3, arg4) } // PartyHasSufficientBalance mocks base method. @@ -687,9 +731,9 @@ func (mr *MockCollateralMockRecorder) PartyHasSufficientBalance(arg0, arg1, arg2 } // PerpsFundingSettlement mocks base method. -func (m *MockCollateral) PerpsFundingSettlement(arg0 context.Context, arg1 string, arg2 []events.Transfer, arg3 string, arg4 *num.Uint) ([]events.Margin, []*types.LedgerMovement, error) { +func (m *MockCollateral) PerpsFundingSettlement(arg0 context.Context, arg1 string, arg2 []events.Transfer, arg3 string, arg4 *num.Uint, arg5 func(string) bool) ([]events.Margin, []*types.LedgerMovement, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PerpsFundingSettlement", arg0, arg1, arg2, arg3, arg4) + ret := m.ctrl.Call(m, "PerpsFundingSettlement", arg0, arg1, arg2, arg3, arg4, arg5) ret0, _ := ret[0].([]events.Margin) ret1, _ := ret[1].([]*types.LedgerMovement) ret2, _ := ret[2].(error) @@ -697,9 +741,9 @@ func (m *MockCollateral) PerpsFundingSettlement(arg0 context.Context, arg1 strin } // PerpsFundingSettlement indicates an expected call of PerpsFundingSettlement. -func (mr *MockCollateralMockRecorder) PerpsFundingSettlement(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockCollateralMockRecorder) PerpsFundingSettlement(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PerpsFundingSettlement", reflect.TypeOf((*MockCollateral)(nil).PerpsFundingSettlement), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PerpsFundingSettlement", reflect.TypeOf((*MockCollateral)(nil).PerpsFundingSettlement), arg0, arg1, arg2, arg3, arg4, arg5) } // ReleaseFromHoldingAccount mocks base method. @@ -732,18 +776,18 @@ func (mr *MockCollateralMockRecorder) RemoveBondAccount(arg0, arg1, arg2 interfa } // RemoveDistressed mocks base method. -func (m *MockCollateral) RemoveDistressed(arg0 context.Context, arg1 []events.MarketPosition, arg2, arg3 string) (*types.LedgerMovement, error) { +func (m *MockCollateral) RemoveDistressed(arg0 context.Context, arg1 []events.MarketPosition, arg2, arg3 string, arg4 func(string) bool) (*types.LedgerMovement, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveDistressed", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "RemoveDistressed", arg0, arg1, arg2, arg3, arg4) ret0, _ := ret[0].(*types.LedgerMovement) ret1, _ := ret[1].(error) return ret0, ret1 } // RemoveDistressed indicates an expected call of RemoveDistressed. -func (mr *MockCollateralMockRecorder) RemoveDistressed(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockCollateralMockRecorder) RemoveDistressed(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveDistressed", reflect.TypeOf((*MockCollateral)(nil).RemoveDistressed), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveDistressed", reflect.TypeOf((*MockCollateral)(nil).RemoveDistressed), arg0, arg1, arg2, arg3, arg4) } // RollbackMarginUpdateOnOrder mocks base method. @@ -1139,18 +1183,6 @@ func (mr *MockAuctionStateMockRecorder) ExtendAuction(arg0 interface{}) *gomock. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExtendAuction", reflect.TypeOf((*MockAuctionState)(nil).ExtendAuction), arg0) } -// ExtendAuctionLiquidityUnmetTarget mocks base method. -func (m *MockAuctionState) ExtendAuctionLiquidityUnmetTarget(arg0 types.AuctionDuration) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "ExtendAuctionLiquidityUnmetTarget", arg0) -} - -// ExtendAuctionLiquidityUnmetTarget indicates an expected call of ExtendAuctionLiquidityUnmetTarget. -func (mr *MockAuctionStateMockRecorder) ExtendAuctionLiquidityUnmetTarget(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExtendAuctionLiquidityUnmetTarget", reflect.TypeOf((*MockAuctionState)(nil).ExtendAuctionLiquidityUnmetTarget), arg0) -} - // ExtendAuctionPrice mocks base method. func (m *MockAuctionState) ExtendAuctionPrice(arg0 types.AuctionDuration) { m.ctrl.T.Helper() @@ -1231,34 +1263,6 @@ func (mr *MockAuctionStateMockRecorder) IsFBA() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsFBA", reflect.TypeOf((*MockAuctionState)(nil).IsFBA)) } -// IsLiquidityAuction mocks base method. -func (m *MockAuctionState) IsLiquidityAuction() bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsLiquidityAuction") - ret0, _ := ret[0].(bool) - return ret0 -} - -// IsLiquidityAuction indicates an expected call of IsLiquidityAuction. -func (mr *MockAuctionStateMockRecorder) IsLiquidityAuction() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLiquidityAuction", reflect.TypeOf((*MockAuctionState)(nil).IsLiquidityAuction)) -} - -// IsLiquidityExtension mocks base method. -func (m *MockAuctionState) IsLiquidityExtension() bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsLiquidityExtension") - ret0, _ := ret[0].(bool) - return ret0 -} - -// IsLiquidityExtension indicates an expected call of IsLiquidityExtension. -func (mr *MockAuctionStateMockRecorder) IsLiquidityExtension() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLiquidityExtension", reflect.TypeOf((*MockAuctionState)(nil).IsLiquidityExtension)) -} - // IsMonitorAuction mocks base method. func (m *MockAuctionState) IsMonitorAuction() bool { m.ctrl.T.Helper() @@ -1381,18 +1385,6 @@ func (mr *MockAuctionStateMockRecorder) StartGovernanceSuspensionAuction(arg0 in return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartGovernanceSuspensionAuction", reflect.TypeOf((*MockAuctionState)(nil).StartGovernanceSuspensionAuction), arg0) } -// StartLiquidityAuctionUnmetTarget mocks base method. -func (m *MockAuctionState) StartLiquidityAuctionUnmetTarget(arg0 time.Time, arg1 *types.AuctionDuration) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "StartLiquidityAuctionUnmetTarget", arg0, arg1) -} - -// StartLiquidityAuctionUnmetTarget indicates an expected call of StartLiquidityAuctionUnmetTarget. -func (mr *MockAuctionStateMockRecorder) StartLiquidityAuctionUnmetTarget(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartLiquidityAuctionUnmetTarget", reflect.TypeOf((*MockAuctionState)(nil).StartLiquidityAuctionUnmetTarget), arg0, arg1) -} - // StartPriceAuction mocks base method. func (m *MockAuctionState) StartPriceAuction(arg0 time.Time, arg1 *types.AuctionDuration) { m.ctrl.T.Helper() @@ -2499,3 +2491,38 @@ func (mr *MockAccountBalanceCheckerMockRecorder) GetAvailableBalance(arg0 interf mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAvailableBalance", reflect.TypeOf((*MockAccountBalanceChecker)(nil).GetAvailableBalance), arg0) } + +// MockBanking is a mock of Banking interface. +type MockBanking struct { + ctrl *gomock.Controller + recorder *MockBankingMockRecorder +} + +// MockBankingMockRecorder is the mock recorder for MockBanking. +type MockBankingMockRecorder struct { + mock *MockBanking +} + +// NewMockBanking creates a new mock instance. +func NewMockBanking(ctrl *gomock.Controller) *MockBanking { + mock := &MockBanking{ctrl: ctrl} + mock.recorder = &MockBankingMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBanking) EXPECT() *MockBankingMockRecorder { + return m.recorder +} + +// RegisterTradingFees mocks base method. +func (m *MockBanking) RegisterTradingFees(arg0 context.Context, arg1 string, arg2 map[string]*num.Uint) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "RegisterTradingFees", arg0, arg1, arg2) +} + +// RegisterTradingFees indicates an expected call of RegisterTradingFees. +func (mr *MockBankingMockRecorder) RegisterTradingFees(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterTradingFees", reflect.TypeOf((*MockBanking)(nil).RegisterTradingFees), arg0, arg1, arg2) +} diff --git a/core/execution/common/pegged_orders_test.go b/core/execution/common/pegged_orders_test.go index 4f2b2b2db6..cf7ae6d3ce 100644 --- a/core/execution/common/pegged_orders_test.go +++ b/core/execution/common/pegged_orders_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" ) diff --git a/core/execution/engine.go b/core/execution/engine.go index fef0233996..89dae287db 100644 --- a/core/execution/engine.go +++ b/core/execution/engine.go @@ -34,6 +34,7 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/protos/vega" + "golang.org/x/exp/maps" ) @@ -50,7 +51,7 @@ var ( // ErrSuccessorMarketDoesNotExists is returned when SucceedMarket call is made with an invalid successor market ID. ErrSuccessorMarketDoesNotExist = errors.New("successor market does not exist") - // ErrParentMarketNotEnactedYEt is returned when trying to enact a successor market that is still in proposed state. + // ErrParentMarketNotEnactedYet is returned when trying to enact a successor market that is still in proposed state. ErrParentMarketNotEnactedYet = errors.New("parent market in proposed state, can't enact successor") // ErrInvalidStopOrdersCancellation is returned when an incomplete stop orders cancellation request is used. @@ -58,6 +59,9 @@ var ( // ErrMarketIDRequiredWhenOrderIDSpecified is returned when a stop order cancellation is emitted without an order id. ErrMarketIDRequiredWhenOrderIDSpecified = errors.New("market id required when order id specified") + + // ErrStopOrdersNotAcceptedDuringOpeningAuction is returned if a stop order is submitted when the market is in the opening auction. + ErrStopOrdersNotAcceptedDuringOpeningAuction = errors.New("stop orders are not accepted during the opening auction") ) // Engine is the execution engine. @@ -78,6 +82,7 @@ type Engine struct { assets common.Assets referralDiscountRewardService fee.ReferralDiscountRewardService volumeDiscountService fee.VolumeDiscountService + banking common.Banking broker common.Broker timeService common.TimeService @@ -108,22 +113,23 @@ type Engine struct { } type netParamsValues struct { - feeDistributionTimeStep time.Duration - marketValueWindowLength time.Duration - suppliedStakeToObligationFactor num.Decimal - infrastructureFee num.Decimal - makerFee num.Decimal - scalingFactors *types.ScalingFactors - maxLiquidityFee num.Decimal - bondPenaltyFactor num.Decimal - auctionMinDuration time.Duration - auctionMaxDuration time.Duration - probabilityOfTradingTauScaling num.Decimal - minProbabilityOfTradingLPOrders num.Decimal - minLpStakeQuantumMultiple num.Decimal - marketCreationQuantumMultiple num.Decimal - markPriceUpdateMaximumFrequency time.Duration - marketPartiesMaximumStopOrdersUpdate *num.Uint + feeDistributionTimeStep time.Duration + marketValueWindowLength time.Duration + suppliedStakeToObligationFactor num.Decimal + infrastructureFee num.Decimal + makerFee num.Decimal + scalingFactors *types.ScalingFactors + maxLiquidityFee num.Decimal + bondPenaltyFactor num.Decimal + auctionMinDuration time.Duration + auctionMaxDuration time.Duration + probabilityOfTradingTauScaling num.Decimal + minProbabilityOfTradingLPOrders num.Decimal + minLpStakeQuantumMultiple num.Decimal + marketCreationQuantumMultiple num.Decimal + markPriceUpdateMaximumFrequency time.Duration + internalCompositePriceUpdateFrequency time.Duration + marketPartiesMaximumStopOrdersUpdate *num.Uint // Liquidity version 2. liquidityV2BondPenaltyFactor num.Decimal @@ -133,6 +139,9 @@ type netParamsValues struct { liquidityV2SLANonPerformanceBondPenaltySlope num.Decimal liquidityV2StakeToCCYVolume num.Decimal liquidityV2ProvidersFeeCalculationTimeStep time.Duration + + // only used for protocol upgrade to v0.74 + chainID uint64 } func defaultNetParamsValues() netParamsValues { @@ -146,13 +155,14 @@ func defaultNetParamsValues() netParamsValues { maxLiquidityFee: num.DecimalFromInt64(-1), bondPenaltyFactor: num.DecimalFromInt64(-1), - auctionMinDuration: -1, - probabilityOfTradingTauScaling: num.DecimalFromInt64(-1), - minProbabilityOfTradingLPOrders: num.DecimalFromInt64(-1), - minLpStakeQuantumMultiple: num.DecimalFromInt64(-1), - marketCreationQuantumMultiple: num.DecimalFromInt64(-1), - markPriceUpdateMaximumFrequency: 5 * time.Second, // default is 5 seconds, should come from net params though - marketPartiesMaximumStopOrdersUpdate: num.UintZero(), + auctionMinDuration: -1, + probabilityOfTradingTauScaling: num.DecimalFromInt64(-1), + minProbabilityOfTradingLPOrders: num.DecimalFromInt64(-1), + minLpStakeQuantumMultiple: num.DecimalFromInt64(-1), + marketCreationQuantumMultiple: num.DecimalFromInt64(-1), + markPriceUpdateMaximumFrequency: 5 * time.Second, // default is 5 seconds, should come from net params though + internalCompositePriceUpdateFrequency: 5 * time.Second, + marketPartiesMaximumStopOrdersUpdate: num.UintZero(), // Liquidity version 2. liquidityV2BondPenaltyFactor: num.DecimalFromInt64(-1), @@ -179,6 +189,7 @@ func NewEngine( assets common.Assets, referralDiscountRewardService fee.ReferralDiscountRewardService, volumeDiscountService fee.VolumeDiscountService, + banking common.Banking, ) *Engine { // setup logger log = log.Named(namedLogger) @@ -204,6 +215,7 @@ func NewEngine( skipRestoreSuccessors: map[string]struct{}{}, referralDiscountRewardService: referralDiscountRewardService, volumeDiscountService: volumeDiscountService, + banking: banking, } // set the eligibility for proposer bonus checker @@ -681,6 +693,7 @@ func (e *Engine) submitMarket(ctx context.Context, marketConfig *types.Market, o e.peggedOrderCountUpdated, e.referralDiscountRewardService, e.volumeDiscountService, + e.banking, ) if err != nil { e.log.Error("failed to instantiate market", @@ -760,6 +773,7 @@ func (e *Engine) submitSpotMarket(ctx context.Context, marketConfig *types.Marke e.peggedOrderCountUpdated, e.referralDiscountRewardService, e.volumeDiscountService, + e.banking, ) if err != nil { e.log.Error("failed to instantiate market", @@ -872,6 +886,9 @@ func (e *Engine) propagateInitialNetParamsToFutureMarket(ctx context.Context, mk if e.npv.markPriceUpdateMaximumFrequency > 0 { mkt.OnMarkPriceUpdateMaximumFrequency(ctx, e.npv.markPriceUpdateMaximumFrequency) } + if e.npv.internalCompositePriceUpdateFrequency > 0 { + mkt.OnInternalCompositePriceUpdateFrequency(ctx, e.npv.internalCompositePriceUpdateFrequency) + } mkt.OnMarketPartiesMaximumStopOrdersUpdate(ctx, e.npv.marketPartiesMaximumStopOrdersUpdate) @@ -1529,6 +1546,14 @@ func (e *Engine) OnMarkPriceUpdateMaximumFrequency(ctx context.Context, d time.D return nil } +func (e *Engine) OnInternalCompositePriceUpdateFrequency(ctx context.Context, d time.Duration) error { + for _, mkt := range e.futureMarkets { + mkt.OnInternalCompositePriceUpdateFrequency(ctx, d) + } + e.npv.internalCompositePriceUpdateFrequency = d + return nil +} + // OnMarketLiquidityV2BondPenaltyUpdate stores net param on execution engine and applies to markets at the start of new epoch. func (e *Engine) OnMarketLiquidityV2BondPenaltyUpdate(_ context.Context, d num.Decimal) error { if e.log.IsDebug() { @@ -1879,3 +1904,24 @@ func (e *Engine) OnSuccessorMarketTimeWindowUpdate(ctx context.Context, window t e.successorWindow = window return nil } + +func (e *Engine) OnChainIDUpdate(cID uint64) error { + e.npv.chainID = cID + return nil +} + +func (e *Engine) UpdateMarginMode(ctx context.Context, party, marketID string, marginMode types.MarginMode, marginFactor num.Decimal) error { + if _, ok := e.futureMarkets[marketID]; !ok { + return types.ErrInvalidMarketID + } + market := e.futureMarkets[marketID] + if marginMode == types.MarginModeIsolatedMargin { + riskFactors := market.GetRiskFactors() + rf := num.MaxD(riskFactors.Long, riskFactors.Short) + if marginFactor.LessThanOrEqual(rf) { + return fmt.Errorf("margin factor (%s) must be greater than max(riskFactorLong (%s), riskFactorShort (%s))", marginFactor.String(), riskFactors.Long.String(), riskFactors.Short.String()) + } + } + + return market.UpdateMarginMode(ctx, party, marginMode, marginFactor) +} diff --git a/core/execution/engine_snapshot.go b/core/execution/engine_snapshot.go index ae4fb0e41c..ca455c1de7 100644 --- a/core/execution/engine_snapshot.go +++ b/core/execution/engine_snapshot.go @@ -22,10 +22,12 @@ import ( "time" "code.vegaprotocol.io/vega/core/assets" + ethcallcommon "code.vegaprotocol.io/vega/core/datasource/external/ethcall/common" "code.vegaprotocol.io/vega/core/execution/common" "code.vegaprotocol.io/vega/core/execution/future" "code.vegaprotocol.io/vega/core/execution/spot" "code.vegaprotocol.io/vega/core/types" + vgcontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" ) @@ -137,6 +139,7 @@ func (e *Engine) restoreSpotMarket(ctx context.Context, em *types.ExecSpotMarket e.peggedOrderCountUpdated, e.referralDiscountRewardService, e.volumeDiscountService, + e.banking, ) if err != nil { e.log.Error("failed to instantiate market", @@ -162,6 +165,10 @@ func (e *Engine) restoreSpotMarket(ctx context.Context, em *types.ExecSpotMarket func (e *Engine) restoreMarket(ctx context.Context, em *types.ExecMarket) (*future.Market, error) { marketConfig := em.Market + // ensure the default chain ID is set, can be removed after protocol upgrade + if vgcontext.InProgressUpgradeFrom(ctx, "v0.73.13") { + e.ensureChainIDSet(marketConfig) + } if len(marketConfig.ID) == 0 { return nil, ErrNoMarketID @@ -191,6 +198,8 @@ func (e *Engine) restoreMarket(ctx context.Context, em *types.ExecMarket) (*futu } nextMTM := time.Unix(0, em.NextMTM) + nextInternalCompositePriceCalc := time.Unix(0, em.NextInternalCompositePriceCalc) + // create market auction state e.log.Info("restoring market", logging.String("id", em.Market.ID)) mkt, err := future.NewMarketFromSnapshot( @@ -213,6 +222,7 @@ func (e *Engine) restoreMarket(ctx context.Context, em *types.ExecMarket) (*futu e.peggedOrderCountUpdated, e.referralDiscountRewardService, e.volumeDiscountService, + e.banking, ) if err != nil { e.log.Error("failed to instantiate market", @@ -234,11 +244,56 @@ func (e *Engine) restoreMarket(ctx context.Context, em *types.ExecMarket) (*futu } // ensure this is set correctly mkt.SetNextMTM(nextMTM) + mkt.SetNextInternalCompositePriceCalc(nextInternalCompositePriceCalc) e.publishNewMarketInfos(ctx, mkt.GetMarketData(), *mkt.Mkt()) return mkt, nil } +func (e *Engine) ensureChainIDSet(marketConfig *types.Market) { + if perp := marketConfig.GetPerps(); perp != nil { + if perp.Perps.DataSourceSpecForSettlementData != nil && perp.Perps.DataSourceSpecForSettlementData.Data != nil { + switch ct := perp.Perps.DataSourceSpecForSettlementData.Data.DataSourceType.(type) { + case ethcallcommon.Spec: + if ct.SourceChainID == 0 { + ct.SourceChainID = e.npv.chainID + perp.Perps.DataSourceSpecForSettlementData.Data.DataSourceType = ct + } + } + } + if perp.Perps.DataSourceSpecForSettlementSchedule != nil && perp.Perps.DataSourceSpecForSettlementSchedule.Data != nil { + switch ct := perp.Perps.DataSourceSpecForSettlementSchedule.Data.DataSourceType.(type) { + case ethcallcommon.Spec: + if ct.SourceChainID == 0 { + ct.SourceChainID = e.npv.chainID + perp.Perps.DataSourceSpecForSettlementSchedule.Data.DataSourceType = ct + } + } + } + return + } + if future := marketConfig.GetFuture(); future != nil { + if future.Future.DataSourceSpecForSettlementData != nil && future.Future.DataSourceSpecForSettlementData.Data != nil { + switch ft := future.Future.DataSourceSpecForSettlementData.Data.DataSourceType.(type) { + case ethcallcommon.Spec: + if ft.SourceChainID == 0 { + ft.SourceChainID = e.npv.chainID + future.Future.DataSourceSpecForSettlementData.Data.DataSourceType = ft + } + } + } + if future.Future.DataSourceSpecForTradingTermination != nil && future.Future.DataSourceSpecForTradingTermination.Data != nil { + switch ft := future.Future.DataSourceSpecForTradingTermination.Data.DataSourceType.(type) { + case ethcallcommon.Spec: + if ft.SourceChainID == 0 { + ft.SourceChainID = e.npv.chainID + future.Future.DataSourceSpecForTradingTermination.Data.DataSourceType = ft + } + } + } + } +} + func (e *Engine) restoreMarketsStates(ctx context.Context, ems []*types.ExecMarket) ([]types.StateProvider, error) { e.futureMarkets = map[string]*future.Market{} diff --git a/core/execution/engine_snapshot_test.go b/core/execution/engine_snapshot_test.go index dd2726f1e7..c249a68b02 100644 --- a/core/execution/engine_snapshot_test.go +++ b/core/execution/engine_snapshot_test.go @@ -23,27 +23,26 @@ import ( "testing" "time" - datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" - - snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "code.vegaprotocol.io/vega/core/assets" bmocks "code.vegaprotocol.io/vega/core/broker/mocks" "code.vegaprotocol.io/vega/core/datasource" dstypes "code.vegaprotocol.io/vega/core/datasource/common" "code.vegaprotocol.io/vega/core/datasource/external/signedoracle" "code.vegaprotocol.io/vega/core/datasource/spec" - fmock "code.vegaprotocol.io/vega/core/fee/mocks" - "code.vegaprotocol.io/vega/core/execution" "code.vegaprotocol.io/vega/core/execution/common" "code.vegaprotocol.io/vega/core/execution/common/mocks" + fmock "code.vegaprotocol.io/vega/core/fee/mocks" "code.vegaprotocol.io/vega/core/types" vgcontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" + "code.vegaprotocol.io/vega/protos/vega" + datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -95,9 +94,10 @@ func getMockedEngine(t *testing.T) *engineFake { referralDiscountReward.EXPECT().RewardsFactorMultiplierAppliedForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() volumeDiscount.EXPECT().VolumeDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() referralDiscountReward.EXPECT().GetReferrer(gomock.Any()).Return(types.PartyID(""), errors.New("not a referrer")).AnyTimes() + banking := mocks.NewMockBanking(ctrl) mat := common.NewMarketActivityTracker(log, teams, balanceChecker) - exec := execution.NewEngine(log, execConfig, timeService, collateralService, oracleService, broker, statevar, mat, asset, referralDiscountReward, volumeDiscount) + exec := execution.NewEngine(log, execConfig, timeService, collateralService, oracleService, broker, statevar, mat, asset, referralDiscountReward, volumeDiscount, banking) epochEngine.NotifyOnEpoch(mat.OnEpochEvent, mat.OnEpochRestore) return &engineFake{ Engine: exec, @@ -159,7 +159,9 @@ func createEngine(t *testing.T) (*execution.Engine, *gomock.Controller) { volumeDiscount.EXPECT().VolumeDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() referralDiscountReward.EXPECT().GetReferrer(gomock.Any()).Return(types.PartyID(""), errors.New("not a referrer")).AnyTimes() mat := common.NewMarketActivityTracker(log, teams, balanceChecker) - e := execution.NewEngine(log, executionConfig, timeService, collateralService, oracleService, broker, statevar, mat, asset, referralDiscountReward, volumeDiscount) + banking := mocks.NewMockBanking(ctrl) + + e := execution.NewEngine(log, executionConfig, timeService, collateralService, oracleService, broker, statevar, mat, asset, referralDiscountReward, volumeDiscount, banking) epochEngine.NotifyOnEpoch(mat.OnEpochEvent, mat.OnEpochRestore) return e, ctrl } @@ -200,8 +202,6 @@ func getSpotMarketConfig() *types.Market { TimeWindow: 101, ScalingFactor: num.DecimalFromFloat(1.0), }, - TriggeringRatio: num.DecimalZero(), - AuctionExtension: 0, }, Fees: &types.Fees{ Factors: &types.FeeFactors{ @@ -248,6 +248,14 @@ func getSpotMarketConfig() *types.Market { }, }, State: types.MarketStateActive, + MarkPriceConfiguration: &types.CompositePriceConfiguration{ + DecayWeight: num.DecimalZero(), + DecayPower: num.DecimalZero(), + CashAmount: num.UintZero(), + SourceWeights: []num.Decimal{num.DecimalFromFloat(0.1), num.DecimalFromFloat(0.2), num.DecimalFromFloat(0.3), num.DecimalFromFloat(0.4)}, + SourceStalenessTolerance: []time.Duration{0, 0, 0, 0}, + CompositePriceType: types.CompositePriceTypeByLastTrade, + }, } } @@ -275,8 +283,6 @@ func getMarketConfig() *types.Market { TimeWindow: 101, ScalingFactor: num.DecimalFromFloat(1.0), }, - TriggeringRatio: num.DecimalFromFloat(0.9), - AuctionExtension: 10000, }, Fees: &types.Fees{ Factors: &types.FeeFactors{ @@ -284,6 +290,9 @@ func getMarketConfig() *types.Market { InfrastructureFee: num.DecimalFromFloat(0.1), LiquidityFee: num.DecimalFromFloat(0.1), }, + LiquidityFeeSettings: &types.LiquidityFeeSettings{ + Method: vega.LiquidityFeeSettings_METHOD_MARGINAL_COST, + }, }, TradableInstrument: &types.TradableInstrument{ MarginCalculator: &types.MarginCalculator{ @@ -370,6 +379,14 @@ func getMarketConfig() *types.Market { PerformanceHysteresisEpochs: 1, }, State: types.MarketStateActive, + MarkPriceConfiguration: &types.CompositePriceConfiguration{ + DecayWeight: num.DecimalZero(), + DecayPower: num.DecimalZero(), + CashAmount: num.UintZero(), + SourceWeights: []num.Decimal{num.DecimalFromFloat(0.1), num.DecimalFromFloat(0.2), num.DecimalFromFloat(0.3), num.DecimalFromFloat(0.4)}, + SourceStalenessTolerance: []time.Duration{0, 0, 0, 0}, + CompositePriceType: types.CompositePriceTypeByLastTrade, + }, } } @@ -413,7 +430,7 @@ func TestValidMarketSnapshot(t *testing.T) { b, providers, err := engine.GetState(key) assert.NoError(t, err) assert.NotEmpty(t, b) - assert.Len(t, providers, 6) + assert.Len(t, providers, 7) // Turn the bytes back into a payload and restore to a new engine engine2, ctrl := createEngine(t) @@ -433,7 +450,7 @@ func TestValidMarketSnapshot(t *testing.T) { require.Equal(t, marketConfig2.ID, tt.ExecutionMarkets.Successors[0].SuccessorMarkets[0]) loadStateProviders, err := engine2.LoadState(ctx, types.PayloadFromProto(snap)) - assert.Len(t, loadStateProviders, 12) + assert.Len(t, loadStateProviders, 14) assert.NoError(t, err) providerMap := map[string]map[string]types.StateProvider{} @@ -571,7 +588,7 @@ func TestValidSettledMarketSnapshot(t *testing.T) { engine.collateral.EXPECT().GetMarketLiquidityFeeAccount(gomock.Any(), gomock.Any()).AnyTimes().Return(&types.Account{Balance: num.UintZero()}, nil) engine.collateral.EXPECT().GetLiquidityFeesBonusDistributionAccount(gomock.Any(), gomock.Any()).AnyTimes().Return(&types.Account{Balance: num.UintZero()}, nil) engine.collateral.EXPECT().GetInsurancePoolBalance(gomock.Any(), gomock.Any()).AnyTimes().Return(num.UintZero(), true) - engine.collateral.EXPECT().FinalSettlement(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes().Return(nil, nil) + engine.collateral.EXPECT().FinalSettlement(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes().Return(nil, nil) engine.collateral.EXPECT().ClearMarket(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), true).AnyTimes().Return(nil, nil) engine.collateral.EXPECT().TransferFees(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes() engine.timeSvc.EXPECT().GetTimeNow().AnyTimes() @@ -699,7 +716,7 @@ func TestSuccessorMapSnapshot(t *testing.T) { engine.collateral.EXPECT().CreateMarketAccounts(gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes() engine.collateral.EXPECT().GetMarketLiquidityFeeAccount(gomock.Any(), gomock.Any()).AnyTimes().Return(&types.Account{Balance: num.UintZero()}, nil) engine.collateral.EXPECT().GetInsurancePoolBalance(gomock.Any(), gomock.Any()).AnyTimes().Return(num.UintZero(), true) - engine.collateral.EXPECT().FinalSettlement(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes().Return(nil, nil) + engine.collateral.EXPECT().FinalSettlement(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes().Return(nil, nil) engine.collateral.EXPECT().ClearMarket(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes().Return(nil, nil) engine.timeSvc.EXPECT().GetTimeNow().AnyTimes() engine.broker.EXPECT().Send(gomock.Any()).AnyTimes() diff --git a/core/execution/engine_test.go b/core/execution/engine_test.go index f829a20391..066a74a40a 100644 --- a/core/execution/engine_test.go +++ b/core/execution/engine_test.go @@ -18,11 +18,13 @@ package execution_test import ( "context" "encoding/hex" + "errors" "fmt" "testing" "time" "code.vegaprotocol.io/vega/core/assets" + dstypes "code.vegaprotocol.io/vega/core/datasource/common" "code.vegaprotocol.io/vega/core/datasource/spec" "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" @@ -122,3 +124,24 @@ func TestMarketSuccession(t *testing.T) { exec.OnTick(ctx, time.Now()) require.True(t, seen) } + +func TestUpdateMarginUpdate(t *testing.T) { + engine, ctrl := createEngine(t) + defer ctrl.Finish() + + require.Equal(t, types.ErrInvalidMarketID, engine.UpdateMarginMode(context.Background(), "zohar", "unknown", types.MarginModeIsolatedMargin, num.DecimalOne())) + + pubKey := &dstypes.SignerPubKey{ + PubKey: &dstypes.PubKey{ + Key: "0xDEADBEEF", + }, + } + mkt := newMarket("market-id", pubKey) + require.NoError(t, engine.SubmitMarket(context.Background(), mkt, "zohar", time.Now())) + + // rfShort, rfLong = 1 + require.Equal(t, "margin factor (0.5) must be greater than max(riskFactorLong (1), riskFactorShort (1))", engine.UpdateMarginMode(context.Background(), "zohar", "market-id", types.MarginModeIsolatedMargin, num.DecimalFromFloat(0.5)).Error()) + + // all good, just not supported yet + require.Error(t, errors.New("Unsupported"), engine.UpdateMarginMode(context.Background(), "zohar", "market-id", types.MarginModeIsolatedMargin, num.DecimalFromFloat(1))) +} diff --git a/core/execution/future/2500_GTT_amended_to_GTC_expires_test.go b/core/execution/future/2500_GTT_amended_to_GTC_expires_test.go index e3b7bc9b7a..1dc1179d21 100644 --- a/core/execution/future/2500_GTT_amended_to_GTC_expires_test.go +++ b/core/execution/future/2500_GTT_amended_to_GTC_expires_test.go @@ -21,10 +21,10 @@ import ( "time" "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/types" vegacontext "code.vegaprotocol.io/vega/libs/context" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" - "code.vegaprotocol.io/vega/core/types" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/execution/future/2876_liquidity_providers_have_all_funds_removed_test.go b/core/execution/future/2876_liquidity_providers_have_all_funds_removed_test.go index 4fb319412f..0d9cec27d6 100644 --- a/core/execution/future/2876_liquidity_providers_have_all_funds_removed_test.go +++ b/core/execution/future/2876_liquidity_providers_have_all_funds_removed_test.go @@ -20,10 +20,9 @@ import ( "testing" "time" + "code.vegaprotocol.io/vega/core/types" vegacontext "code.vegaprotocol.io/vega/libs/context" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" - - "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "github.com/stretchr/testify/assert" diff --git a/core/execution/future/auction.go b/core/execution/future/auction.go index 68c28bba6c..f8ce2970d3 100644 --- a/core/execution/future/auction.go +++ b/core/execution/future/auction.go @@ -26,11 +26,8 @@ import ( func (m *Market) checkAuction(ctx context.Context, now time.Time, idgen common.IDGenerator) { if !m.as.InAuction() { - // new block, check liquidity, start auction if needed - m.checkLiquidity(ctx, nil, true) - if m.as.AuctionStart() { - m.enterAuction(ctx) - } + // new block, check bond balance, top up if needed + m.checkBondBalance(ctx) return } @@ -82,23 +79,25 @@ func (m *Market) checkAuction(ctx context.Context, now time.Time, idgen common.I // opening auction if isOpening { if len(trades) == 0 { - return - } - - // first check liquidity - before we mark auction as ready to leave - m.checkLiquidity(ctx, trades, true) - if !m.as.CanLeave() { if checkExceeded && m.as.ExceededMaxOpening(now) { - // cancel the market, exceeded opening auction m.log.Debug("Market was cancelled because it failed to leave opening auction in time", logging.MarketID(m.GetID())) m.terminateMarket(ctx, types.MarketStateCancelled, nil) - return - } - if e := m.as.AuctionExtended(ctx, now); e != nil { - m.broker.Send(e) } return } + + // first check liquidity - before we mark auction as ready to leave + m.checkBondBalance(ctx) + if checkExceeded && m.as.ExceededMaxOpening(now) { + // cancel the market, exceeded opening auction + m.log.Debug("Market was cancelled because it failed to leave opening auction in time", logging.MarketID(m.GetID())) + m.terminateMarket(ctx, types.MarketStateCancelled, nil) + return + } + if e := m.as.AuctionExtended(ctx, now); e != nil { + m.broker.Send(e) + return + } // opening auction requirements satisfied at this point, other requirements still need to be checked downstream though m.as.SetReadyToLeave() m.pMonitor.CheckPrice(ctx, m.as, trades, true) @@ -115,9 +114,6 @@ func (m *Market) checkAuction(ctx context.Context, now time.Time, idgen common.I m.log.Info("leaving opening auction for market", logging.String("market-id", m.mkt.ID)) m.leaveAuction(ctx, now) - // tell the product we're ready to start - m.tradableInstrument.Instrument.Product.OnLeaveOpeningAuction(ctx, now.UnixNano()) - m.equityShares.OpeningAuctionEnded() // start the market fee window m.feeSplitter.TimeWindowStart(now) @@ -132,17 +128,27 @@ func (m *Market) checkAuction(ctx context.Context, now time.Time, idgen common.I ) return } + // NOTE: This is a fix for the snapshot restores in case we're restoring a liquidity auction + // from a snapshot (or protocol upgrade) with state form before the liquidity monitoring was still + // in place. This can be removed once we've deployed the version without liquidity monitoring. + // Liquidity auctions are no longer a thing, we know we're not in opening auction here + // if we're not in price auction, we should just let the liquidity auction expire + if m.as.Trigger() == types.AuctionTriggerLiquidityTargetNotMet || m.as.Trigger() == types.AuctionTriggerUnableToDeployLPOrders { + if end := m.as.ExpiresAt(); end == nil || !end.Before(now) { + m.as.SetReadyToLeave() + } + } // price and liquidity auctions isPrice := m.as.IsPriceAuction() || m.as.IsPriceExtension() if !isPrice { - m.checkLiquidity(ctx, trades, true) + m.checkBondBalance(ctx) } if isPrice || m.as.CanLeave() { m.pMonitor.CheckPrice(ctx, m.as, trades, true) } end := m.as.CanLeave() if isPrice && end { - m.checkLiquidity(ctx, trades, true) + m.checkBondBalance(ctx) } if evt := m.as.AuctionExtended(ctx, m.timeService.GetTimeNow()); evt != nil { m.broker.Send(evt) diff --git a/core/execution/future/bond_slashing_test.go b/core/execution/future/bond_slashing_test.go index 3bebaa025a..4cea53494d 100644 --- a/core/execution/future/bond_slashing_test.go +++ b/core/execution/future/bond_slashing_test.go @@ -21,11 +21,11 @@ import ( "testing" "time" + "code.vegaprotocol.io/vega/core/types" vegacontext "code.vegaprotocol.io/vega/libs/context" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" - - "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/execution/future/equity_share_test.go b/core/execution/future/equity_share_test.go index b15d2e02d9..28ffe5c052 100644 --- a/core/execution/future/equity_share_test.go +++ b/core/execution/future/equity_share_test.go @@ -25,6 +25,7 @@ import ( vegacontext "code.vegaprotocol.io/vega/libs/context" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/execution/future/event_generation_test.go b/core/execution/future/event_generation_test.go index e915067552..a4fdc55546 100644 --- a/core/execution/future/event_generation_test.go +++ b/core/execution/future/event_generation_test.go @@ -177,7 +177,6 @@ func TestEvents_EnteringAuctionCancelsGFNOrders(t *testing.T) { ctx := context.Background() mdb := subscribers.NewMarketDepthBuilder(ctx, nil, true) tm := startMarketInAuction(t, ctx, &now) - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(0)) auxParty := "aux" addAccount(t, tm, auxParty) @@ -240,8 +239,6 @@ func TestEvents_CloseOutParty(t *testing.T) { mdb := subscribers.NewMarketDepthBuilder(ctx, nil, true) tm := startMarketInAuction(t, ctx, &now) - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(0)) - auxParty := "aux" addAccount(t, tm, auxParty) auxOrder1 := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "AuxOrderBuy", types.SideBuy, auxParty, 1, 1) @@ -320,8 +317,6 @@ func TestEvents_CloseOutPartyWithPeggedOrder(t *testing.T) { mdb := subscribers.NewMarketDepthBuilder(ctx, nil, true) tm := startMarketInAuction(t, ctx, &now) - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(0)) - auxParty := "aux" addAccount(t, tm, auxParty) auxOrder1 := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "AuxOrderBuy", types.SideBuy, auxParty, 1, 1) @@ -444,7 +439,6 @@ func TestEvents_EnteringAuctionParksAllPegs(t *testing.T) { ctx := context.Background() mdb := subscribers.NewMarketDepthBuilder(ctx, nil, true) tm := startMarketInAuction(t, ctx, &now) - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(0)) auxParty := "aux" addAccount(t, tm, auxParty) @@ -511,8 +505,6 @@ func TestEvents_SelfTrading(t *testing.T) { mdb := subscribers.NewMarketDepthBuilder(ctx, nil, true) tm := startMarketInAuction(t, ctx, &now) - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(0)) - auxParty := "aux" addAccount(t, tm, auxParty) auxOrder1 := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "AuxOrderBuy", types.SideBuy, auxParty, 1, 1) @@ -611,8 +603,6 @@ func TestEvents_MovingPegsAround(t *testing.T) { mdb := subscribers.NewMarketDepthBuilder(ctx, nil, true) tm := startMarketInAuction(t, ctx, &now) - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(0)) - auxParty := "aux" addAccount(t, tm, auxParty) auxOrder1 := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "AuxOrderBuy", types.SideBuy, auxParty, 1, 1) @@ -679,8 +669,6 @@ func TestEvents_MovingPegsAround2(t *testing.T) { mdb := subscribers.NewMarketDepthBuilder(ctx, nil, true) tm := startMarketInAuction(t, ctx, &now) - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(0)) - auxParty := "aux" addAccount(t, tm, auxParty) auxOrder1 := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "AuxOrderBuy", types.SideBuy, auxParty, 1, 1) @@ -737,8 +725,6 @@ func TestEvents_AmendOrderToSelfTrade(t *testing.T) { mdb := subscribers.NewMarketDepthBuilder(ctx, nil, true) tm := startMarketInAuction(t, ctx, &now) - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(0)) - auxParty := "aux" addAccount(t, tm, auxParty) auxOrder1 := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "AuxOrderBuy", types.SideBuy, auxParty, 1, 1) @@ -794,8 +780,6 @@ func TestEvents_AmendOrderToIncreaseSizeAndPartiallyFill(t *testing.T) { mdb := subscribers.NewMarketDepthBuilder(ctx, nil, true) tm := startMarketInAuction(t, ctx, &now) - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(0)) - auxParty := "aux" addAccount(t, tm, auxParty) auxOrder1 := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "AuxOrderBuy", types.SideBuy, auxParty, 1, 1) diff --git a/core/execution/future/helpers_test.go b/core/execution/future/helpers_test.go index cbe86a62aa..57a55f4892 100644 --- a/core/execution/future/helpers_test.go +++ b/core/execution/future/helpers_test.go @@ -17,6 +17,7 @@ package future_test import ( "code.vegaprotocol.io/vega/core/types" + "github.com/imdario/mergo" ) diff --git a/core/execution/future/isolated_margin.go b/core/execution/future/isolated_margin.go new file mode 100644 index 0000000000..fe6ae8bb82 --- /dev/null +++ b/core/execution/future/isolated_margin.go @@ -0,0 +1,75 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package future + +import ( + "context" + + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/positions" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" +) + +func (m *Market) updateIsolatedMarginsOnPositionChange(ctx context.Context, mpos *positions.MarketPosition, order *types.Order, trade *types.Trade) error { + pos, err := m.collateral.GetPartyMargin(mpos, m.settlementAsset, m.GetID()) + if err != nil { + return err + } + price := m.getMarketObservable(order.Price.Clone()) + increment := m.tradableInstrument.Instrument.Product.GetMarginIncrease(m.timeService.GetTimeNow().UnixNano()) + orders := m.matching.GetOrdersPerParty(order.Party) + marginFactor := m.getMarginFactor(order.Party) + r, err := m.risk.UpdateIsolatedMarginsOnPositionChange(ctx, pos, price, increment, orders, []*types.Trade{trade}, order.Side, marginFactor) + if err != nil { + return err + } + for _, rr := range r { + m.transferMargins(ctx, []events.Risk{rr}, nil) + } + pos, err = m.collateral.GetPartyMargin(mpos, m.settlementAsset, m.GetID()) + if err != nil { + return err + } + _, err = m.risk.CheckMarginInvariants(ctx, pos, price, increment, orders, marginFactor) + return err +} + +func (m *Market) getIsolatedMarginContext(mpos *positions.MarketPosition, order *types.Order) (*num.Uint, events.Margin, num.Decimal, *num.Uint, num.Decimal, []*types.Order, error) { + var orderPrice *num.Uint + if order != nil { + orderPrice = order.Price.Clone() + } else { + orderPrice = num.UintZero() + } + marketObservable := m.getMarketObservable(orderPrice) + mID := m.GetID() + pos, err := m.collateral.GetPartyMargin(mpos, m.settlementAsset, mID) + if err != nil { + return nil, nil, num.DecimalZero(), nil, num.DecimalZero(), nil, err + } + increment := m.tradableInstrument.Instrument.Product.GetMarginIncrease(m.timeService.GetTimeNow().UnixNano()) + var auctionPrice *num.Uint + if m.as.InAuction() { + auctionPrice = m.matching.GetIndicativePrice() + if markPrice := m.getCurrentMarkPrice(); markPrice != nil && !markPrice.IsZero() && (markPrice.GT(auctionPrice) || auctionPrice == nil) { + auctionPrice = markPrice + } + } + marginFactor := m.getMarginFactor(mpos.Party()) + orders := m.matching.GetOrdersPerParty(mpos.Party()) + return marketObservable, pos, increment, auctionPrice, marginFactor, orders, nil +} diff --git a/core/execution/future/liquidation.go b/core/execution/future/liquidation.go new file mode 100644 index 0000000000..324b71a43b --- /dev/null +++ b/core/execution/future/liquidation.go @@ -0,0 +1,94 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package future + +import ( + "context" + "time" + + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/logging" +) + +func (m *Market) checkNetwork(ctx context.Context, now time.Time) error { + // debug + // this only returns an error if we couldn't get the price range, incidating no orders on book + order, _ := m.liquidation.OnTick(ctx, now) + if order == nil { + return nil + } + // register the network order on the positions engine + _ = m.position.RegisterOrder(ctx, order) + order.OriginalPrice = num.UintZero().Div(order.Price, m.priceFactor) + m.broker.Send(events.NewOrderEvent(ctx, order)) + conf, err := m.matching.SubmitOrder(order) + if err != nil { + // order failed to uncross, reject and done + return m.unregisterAndReject(ctx, order, err) + } + order.ClearUpExtraRemaining() + // this should not be possible (network position can't really flip) + if order.ReduceOnly && order.Remaining > 0 { + order.Status = types.OrderStatusStopped + } + + // if the order is not staying in the book, then we remove it + // from the potential positions + if order.IsFinished() && order.Remaining > 0 { + _ = m.position.UnregisterOrder(ctx, order) + } + // send the event with the order in its final state + m.broker.Send(events.NewOrderEvent(ctx, order)) + + // no trades... + if len(conf.Trades) == 0 { + return nil + } + // transfer fees to the good party -> fees are now taken from the insurance pool + fees, _ := m.fee.GetFeeForPositionResolution(conf.Trades) + tresps, err := m.collateral.TransferFees(ctx, m.GetID(), m.settlementAsset, fees) + if err != nil { + // we probably should reject the order, although if we end up here we have a massive problem. + _ = m.position.UnregisterOrder(ctx, order) + // if we get an eror transfer fees, we are missing accounts, and something is terribly wrong. + // the fees we get from the fee engine result in transfers with the minimum amount set to 0, + // so the only thing that could go wrong is missing accounts. + m.log.Panic("unable to transfer fees for positions resolution", + logging.Error(err), + logging.String("market-id", m.GetID())) + return err + } + if len(tresps) > 0 { + m.broker.Send(events.NewLedgerMovements(ctx, tresps)) + } + // Now that the fees have been taken care of, get the current last traded price: + lastTraded := m.getLastTradedPrice() + tradeType := types.TradeTypeNetworkCloseOutGood + // now handle the confirmation like you would any other order/trade confirmation + m.handleConfirmation(ctx, conf, &tradeType) + // restore the last traded price, the network trades do not count towards the mark price + // nor do they factor in to the price monitoring logic. + m.lastTradedPrice = lastTraded + // update the liquidation engine to reflect the trades have happened + m.liquidation.UpdateNetworkPosition(conf.Trades) + + // check for reference moves again? We should've already done this + // This can probably be removed + m.checkForReferenceMoves(ctx, conf.PassiveOrdersAffected, false) + return nil +} diff --git a/core/execution/future/liquidity_provision.go b/core/execution/future/liquidity_provision.go index 54f269851c..0b32a81cf9 100644 --- a/core/execution/future/liquidity_provision.go +++ b/core/execution/future/liquidity_provision.go @@ -34,7 +34,10 @@ func (m *Market) SubmitLiquidityProvision( // add the party to the list of all parties involved with // this market - m.addParty(party) + if m.addParty(party) { + // First time seeing the party, we report his margin mode. + m.emitPartyMarginModeUpdated(ctx, party, m.getMarginMode(party), m.getMarginFactor(party)) + } _, err := m.collateral.CreatePartyMarginAccount(ctx, party, m.GetID(), m.settlementAsset) if err != nil { diff --git a/core/execution/future/liquidity_provision_test.go b/core/execution/future/liquidity_provision_test.go index 721654756d..bb08d46c87 100644 --- a/core/execution/future/liquidity_provision_test.go +++ b/core/execution/future/liquidity_provision_test.go @@ -20,11 +20,10 @@ import ( "testing" "time" - vegacontext "code.vegaprotocol.io/vega/libs/context" - vgcrypto "code.vegaprotocol.io/vega/libs/crypto" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" + vegacontext "code.vegaprotocol.io/vega/libs/context" + vgcrypto "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" proto "code.vegaprotocol.io/vega/protos/vega" @@ -87,12 +86,10 @@ func TestSubmit(t *testing.T) { mktCfg := getMarket(pMonitorSettings, &types.AuctionDuration{ Duration: 10000, }) - mktCfg.Fees = &types.Fees{ - Factors: &types.FeeFactors{ - LiquidityFee: num.DecimalFromFloat(0.001), - InfrastructureFee: num.DecimalFromFloat(0.0005), - MakerFee: num.DecimalFromFloat(0.00025), - }, + mktCfg.Fees.Factors = &types.FeeFactors{ + LiquidityFee: num.DecimalFromFloat(0.001), + InfrastructureFee: num.DecimalFromFloat(0.0005), + MakerFee: num.DecimalFromFloat(0.00025), } mktCfg.TradableInstrument.RiskModel = &types.TradableInstrumentLogNormalRiskModel{ LogNormalRiskModel: &types.LogNormalRiskModel{ @@ -248,12 +245,11 @@ func TestSubmit(t *testing.T) { mktCfg := getMarket(pMonitorSettings, &types.AuctionDuration{ Duration: 10000, }) - mktCfg.Fees = &types.Fees{ - Factors: &types.FeeFactors{ - InfrastructureFee: num.DecimalFromFloat(0.0005), - MakerFee: num.DecimalFromFloat(0.00025), - }, + mktCfg.Fees.Factors = &types.FeeFactors{ + InfrastructureFee: num.DecimalFromFloat(0.0005), + MakerFee: num.DecimalFromFloat(0.00025), } + mktCfg.TradableInstrument.RiskModel = &types.TradableInstrumentLogNormalRiskModel{ LogNormalRiskModel: &types.LogNormalRiskModel{ RiskAversionParameter: num.DecimalFromFloat(0.001), @@ -335,11 +331,9 @@ func TestAmend(t *testing.T) { mktCfg := getMarket(defaultPriceMonitorSettings, &types.AuctionDuration{ Duration: 10000, }) - mktCfg.Fees = &types.Fees{ - Factors: &types.FeeFactors{ - InfrastructureFee: num.DecimalFromFloat(0.0005), - MakerFee: num.DecimalFromFloat(0.00025), - }, + mktCfg.Fees.Factors = &types.FeeFactors{ + InfrastructureFee: num.DecimalFromFloat(0.0005), + MakerFee: num.DecimalFromFloat(0.00025), } mktCfg.TradableInstrument.RiskModel = &types.TradableInstrumentLogNormalRiskModel{ LogNormalRiskModel: &types.LogNormalRiskModel{ diff --git a/core/execution/future/margin_test.go b/core/execution/future/margin_test.go index 081f48e96c..b2099a0b5a 100644 --- a/core/execution/future/margin_test.go +++ b/core/execution/future/margin_test.go @@ -20,10 +20,9 @@ import ( "testing" "time" + "code.vegaprotocol.io/vega/core/types" vegacontext "code.vegaprotocol.io/vega/libs/context" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" - - "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "github.com/golang/mock/gomock" @@ -52,8 +51,6 @@ func TestMargins(t *testing.T) { addAccount(t, tm, auxParty2) addAccountWithAmount(tm, "lpprov", 100000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) // set auction durations to 1 second tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) @@ -189,8 +186,6 @@ func TestPartialFillMargins(t *testing.T) { addAccountWithAmount(tm, "lpprov", 100000000) tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) // ensure auction durations are 1 second tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) @@ -321,7 +316,6 @@ func TestPartialFillMargins(t *testing.T) { // tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() // // Assure liquidity auction won't be triggered -// tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(0)) // // ensure auction durations are 1 second // tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) // alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 500) diff --git a/core/execution/future/mark_price.go b/core/execution/future/mark_price.go new file mode 100644 index 0000000000..3625e25755 --- /dev/null +++ b/core/execution/future/mark_price.go @@ -0,0 +1,369 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package future + +import ( + "context" + "fmt" + "sort" + "time" + + "code.vegaprotocol.io/vega/core/datasource/common" + excommon "code.vegaprotocol.io/vega/core/execution/common" + "code.vegaprotocol.io/vega/core/matching" + "code.vegaprotocol.io/vega/core/products" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/protos/vega" + snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" +) + +type CompositePriceCalculator struct { + config *types.CompositePriceConfiguration + trades []*types.Trade + sourceLastUpdate []int64 + bookPriceAtTime map[int64]*num.Uint + price *num.Uint + timeService excommon.TimeService + // [0] trade mark price + // [1] book mark price + // [2] first oracel mark price + // [2+n] median mark price + priceSources []*num.Uint + oracles []*products.CompositePriceOracle + scalingFunc func(context.Context, *num.Numeric, int64) *num.Uint +} + +const ( + TradePriceIndex = 0 + BookPriceIndex = 1 + FirstOraclePriceIndex = 2 +) + +func NewCompositePriceCalculatorFromSnapshot(ctx context.Context, mp *num.Uint, timeService excommon.TimeService, oe excommon.OracleEngine, mpc *snapshot.CompositePriceCalculator) *CompositePriceCalculator { + if mpc == nil { + // migration - for existing markets loaded from snapshot, set the configuration to default to use last trade price + // for mark price + return &CompositePriceCalculator{ + config: &types.CompositePriceConfiguration{ + DecayWeight: num.DecimalZero(), + DecayPower: num.DecimalZero(), + CashAmount: num.UintZero(), + CompositePriceType: types.CompositePriceTypeByLastTrade, + }, + trades: []*types.Trade{}, + price: mp, + priceSources: make([]*num.Uint, 1), + sourceLastUpdate: make([]int64, 1), + timeService: timeService, + } + } + + config := types.CompositePriceConfigurationFromProto(mpc.PriceConfiguration) + trades := make([]*types.Trade, 0, len(mpc.Trades)) + for _, t := range mpc.Trades { + trades = append(trades, types.TradeFromProto(t)) + } + priceSources := make([]*num.Uint, 0, len(mpc.PriceSources)) + for _, v := range mpc.PriceSources { + if len(v) == 0 { + priceSources = append(priceSources, nil) + } else { + priceSources = append(priceSources, num.MustUintFromString(v, 10)) + } + } + var compositePrice *num.Uint + if len(mpc.CompositePrice) > 0 { + compositePrice = num.MustUintFromString(mpc.CompositePrice, 10) + } + + bookPriceAtTime := make(map[int64]*num.Uint, len(mpc.BookPriceAtTime)) + for _, tp := range mpc.BookPriceAtTime { + bookPriceAtTime[tp.Time] = num.MustUintFromString(tp.Price, 10) + } + + calc := &CompositePriceCalculator{ + config: config, + trades: trades, + sourceLastUpdate: mpc.PriceSourceLastUpdate, + priceSources: priceSources, + bookPriceAtTime: bookPriceAtTime, + price: compositePrice, + timeService: timeService, + } + + if len(config.DataSources) > 0 { + oracles := make([]*products.CompositePriceOracle, 0, len(config.DataSources)) + for i, s := range config.DataSources { + oracle, err := products.NewCompositePriceOracle(ctx, oe, s, config.SpecBindingForCompositePrice[i], calc.GetUpdateOraclePriceFunc(i)) + if err != nil { + return nil + } + oracles = append(oracles, oracle) + } + calc.oracles = oracles + } + return calc +} + +func NewCompositePriceCalculator(ctx context.Context, config *types.CompositePriceConfiguration, oe products.OracleEngine, timeService excommon.TimeService) *CompositePriceCalculator { + priceSourcesLen := len(config.SourceStalenessTolerance) + if priceSourcesLen == 0 { + priceSourcesLen = 1 + } + + mpc := &CompositePriceCalculator{ + config: config, + priceSources: make([]*num.Uint, priceSourcesLen), + sourceLastUpdate: make([]int64, priceSourcesLen), + bookPriceAtTime: map[int64]*num.Uint{}, + timeService: timeService, + } + if len(config.DataSources) > 0 { + oracles := make([]*products.CompositePriceOracle, 0, len(config.DataSources)) + for i, s := range config.DataSources { + oracle, err := products.NewCompositePriceOracle(ctx, oe, s, config.SpecBindingForCompositePrice[i], mpc.GetUpdateOraclePriceFunc(i)) + if err != nil { + return nil + } + oracles = append(oracles, oracle) + } + mpc.oracles = oracles + } + return mpc +} + +func (mpc *CompositePriceCalculator) UpdateConfig(ctx context.Context, oe excommon.OracleEngine, config *types.CompositePriceConfiguration) error { + // special case for only resetting the oracles + if mpc.oracles != nil { + for _, cpo := range mpc.oracles { + cpo.UnsubAll(ctx) + } + mpc.oracles = nil + } + + if config == nil { + return nil + } + + priceSourcesLen := len(config.SourceStalenessTolerance) + if priceSourcesLen == 0 { + priceSourcesLen = 1 + } + mpc.config = config + mpc.priceSources = make([]*num.Uint, priceSourcesLen) + mpc.sourceLastUpdate = make([]int64, priceSourcesLen) + if mpc.bookPriceAtTime == nil { + mpc.bookPriceAtTime = map[int64]*num.Uint{} + } + + if len(config.DataSources) > 0 { + oracles := make([]*products.CompositePriceOracle, 0, len(config.DataSources)) + for i, s := range config.DataSources { + oracle, err := products.NewCompositePriceOracle(ctx, oe, s, config.SpecBindingForCompositePrice[i], mpc.GetUpdateOraclePriceFunc(i)) + if err != nil { + return err + } + oracles = append(oracles, oracle) + } + mpc.oracles = oracles + } + return nil +} + +func (mpc *CompositePriceCalculator) Close(ctx context.Context) { + if mpc.oracles != nil { + for _, cpo := range mpc.oracles { + cpo.UnsubAll(ctx) + } + } +} + +func (mpc *CompositePriceCalculator) setOraclePriceScalingFunc(f func(context.Context, *num.Numeric, int64) *num.Uint) { + mpc.scalingFunc = f +} + +// overridePrice is called to set the price externally. This is used when leaving the opening auction if the +// methodology yielded no valid price. +func (mpc *CompositePriceCalculator) overridePrice(p *num.Uint) { + if p != nil { + mpc.price = p.Clone() + } +} + +// NewTrade is called to inform the mark price calculator on a new trade. +// All the trades for a given mark price calculation interval are saved until the end of the interval. +func (mpc *CompositePriceCalculator) NewTrade(trade *types.Trade) { + if trade.Seller == "network" || trade.Buyer == "network" { + return + } + mpc.trades = append(mpc.trades, trade) + mpc.sourceLastUpdate[TradePriceIndex] = trade.Timestamp +} + +// UpdateOraclePrice is called when a new oracle price is available. +func (mpc *CompositePriceCalculator) GetUpdateOraclePriceFunc(oracleIndex int) func(ctx context.Context, data common.Data) error { + return func(ctx context.Context, data common.Data) error { + oracle := mpc.oracles[oracleIndex] + pd, err := oracle.GetData(data) + if err != nil { + return err + } + p := mpc.scalingFunc(ctx, pd, mpc.oracles[oracleIndex].GetDecimals()) + if p == nil || p.IsZero() { + return nil + } + mpc.priceSources[FirstOraclePriceIndex+oracleIndex] = p.Clone() + mpc.sourceLastUpdate[FirstOraclePriceIndex+oracleIndex] = mpc.timeService.GetTimeNow().UnixNano() + return nil + } +} + +// CalculateBookMarkPriceAtTimeT is called every interval (currently at the end of each block) to calculate +// the mark price implied by the book. +// If there is insufficient quantity in the book, ignore this price +// IF the market is in auction set the mark price to the indicative price if not zero. +func (mpc *CompositePriceCalculator) CalculateBookMarkPriceAtTimeT(initialScalingFactor, slippageFactor, shortRiskFactor, longRiskFactor num.Decimal, t int64, ob *matching.CachedOrderBook) { + if mpc.config.CompositePriceType == types.CompositePriceTypeByLastTrade { + return + } + if ob.InAuction() { + indicative := ob.GetIndicativePrice() + if !indicative.IsZero() { + mpc.bookPriceAtTime[t] = indicative + mpc.sourceLastUpdate[BookPriceIndex] = t + } + return + } + mp := PriceFromBookAtTime(mpc.config.CashAmount, initialScalingFactor, slippageFactor, shortRiskFactor, longRiskFactor, ob) + if mp != nil { + mpc.bookPriceAtTime[t] = mp + mpc.sourceLastUpdate[BookPriceIndex] = t + } +} + +// CalculateMarkPrice is called at the end of each mark price calculation interval and calculates the mark price +// using the mark price type methodology. +func (mpc *CompositePriceCalculator) CalculateMarkPrice(t int64, ob *matching.CachedOrderBook, markPriceFrequency time.Duration, initialScalingFactor, slippageFactor, shortRiskFactor, longRiskFactor num.Decimal) *num.Uint { + if mpc.config.CompositePriceType == types.CompositePriceTypeByLastTrade { + // if there are no trades, the mark price remains what it was before. + if len(mpc.trades) > 0 { + mpc.price = mpc.trades[len(mpc.trades)-1].Price + } + mpc.trades = []*types.Trade{} + return mpc.price + } + if len(mpc.trades) > 0 { + if pft := PriceFromTrades(mpc.trades, mpc.config.DecayWeight, num.DecimalFromInt64(markPriceFrequency.Nanoseconds()), mpc.config.DecayPower, t); pft != nil && !pft.IsZero() { + mpc.priceSources[TradePriceIndex] = pft + } + } + if p := CalculateTimeWeightedAverageBookPrice(mpc.bookPriceAtTime, t, markPriceFrequency.Nanoseconds()); p != nil { + mpc.priceSources[BookPriceIndex] = p + } + + if p := CompositePriceByMedian(mpc.priceSources[:len(mpc.priceSources)-1], mpc.sourceLastUpdate[:len(mpc.priceSources)-1], mpc.config.SourceStalenessTolerance[:len(mpc.priceSources)-1], t); p != nil && !p.IsZero() { + mpc.priceSources[len(mpc.priceSources)-1] = p + latest := int64(-1) + for _, v := range mpc.sourceLastUpdate[:len(mpc.priceSources)-1] { + if v > latest { + latest = v + } + } + if latest > mpc.sourceLastUpdate[len(mpc.priceSources)-1] { + mpc.sourceLastUpdate[len(mpc.priceSources)-1] = latest + } + } + if mpc.config.CompositePriceType == types.CompositePriceTypeByMedian { + if p := CompositePriceByMedian(mpc.priceSources, mpc.sourceLastUpdate, mpc.config.SourceStalenessTolerance, t); p != nil && !p.IsZero() { + mpc.price = p + } + } else { + if p := CompositePriceByWeight(mpc.priceSources, mpc.config.SourceWeights, mpc.sourceLastUpdate, mpc.config.SourceStalenessTolerance, t); p != nil && !p.IsZero() { + mpc.price = p + } + } + mpc.trades = []*types.Trade{} + mpc.bookPriceAtTime = map[int64]*num.Uint{} + mpc.CalculateBookMarkPriceAtTimeT(initialScalingFactor, slippageFactor, shortRiskFactor, longRiskFactor, t, ob) + return mpc.price +} + +func (mpc *CompositePriceCalculator) IntoProto() *snapshot.CompositePriceCalculator { + var compositePrice string + if mpc.price != nil { + compositePrice = mpc.price.String() + } + + priceSources := make([]string, 0, len(mpc.priceSources)) + for _, u := range mpc.priceSources { + if u == nil { + priceSources = append(priceSources, "") + } else { + priceSources = append(priceSources, u.String()) + } + } + trades := make([]*vega.Trade, 0, len(mpc.trades)) + for _, t := range mpc.trades { + trades = append(trades, t.IntoProto()) + } + bookPriceAtTime := make([]*snapshot.TimePrice, 0, len(mpc.bookPriceAtTime)) + for k, u := range mpc.bookPriceAtTime { + var p string + if u != nil { + p = u.String() + } + bookPriceAtTime = append(bookPriceAtTime, &snapshot.TimePrice{Time: k, Price: p}) + } + sort.Slice(bookPriceAtTime, func(i, j int) bool { + return bookPriceAtTime[i].Time < bookPriceAtTime[j].Time + }) + + return &snapshot.CompositePriceCalculator{ + CompositePrice: compositePrice, + PriceConfiguration: mpc.config.IntoProto(), + PriceSources: priceSources, + Trades: trades, + PriceSourceLastUpdate: mpc.sourceLastUpdate, + BookPriceAtTime: bookPriceAtTime, + } +} + +func (mpc *CompositePriceCalculator) GetData() *types.CompositePriceState { + priceSources := make([]*types.CompositePriceSource, 0, len(mpc.priceSources)) + + for i, ps := range mpc.priceSources { + if ps != nil { + var priceSourceName string + if i == TradePriceIndex { + priceSourceName = "priceFromTrades" + } else if i == BookPriceIndex { + priceSourceName = "priceFromOrderBook" + } else if i == len(mpc.priceSources)-1 { + priceSourceName = "medianPrice" + } else { + priceSourceName = fmt.Sprintf("priceFromOracle%d", i-FirstOraclePriceIndex+1) + } + priceSources = append(priceSources, &types.CompositePriceSource{ + PriceSource: priceSourceName, + Price: ps, + LastUpdated: mpc.sourceLastUpdate[i], + }) + } + } + + return &types.CompositePriceState{PriceSources: priceSources} +} diff --git a/core/execution/future/mark_price_snapshot_test.go b/core/execution/future/mark_price_snapshot_test.go new file mode 100644 index 0000000000..8dc7ba3cc2 --- /dev/null +++ b/core/execution/future/mark_price_snapshot_test.go @@ -0,0 +1,67 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package future + +import ( + "testing" + + dstypes "code.vegaprotocol.io/vega/core/datasource/common" + "code.vegaprotocol.io/vega/core/types" + vega "code.vegaprotocol.io/vega/protos/vega" + datav1 "code.vegaprotocol.io/vega/protos/vega/data/v1" + + "github.com/stretchr/testify/require" +) + +func TestSerialisation(t *testing.T) { + pubKey := dstypes.CreateSignerFromString("0xDEADBEEF", dstypes.SignerTypePubKey) + mpcProto := &vega.CompositePriceConfiguration{ + DecayWeight: "0.1", + DecayPower: 2, + CashAmount: "100", + SourceStalenessTolerance: []string{"30s", "30s", "15s", "30s"}, + CompositePriceType: types.CompositePriceTypeByMedian, + DataSourcesSpec: []*vega.DataSourceDefinition{ + { + SourceType: &vega.DataSourceDefinition_External{ + External: &vega.DataSourceDefinitionExternal{ + SourceType: &vega.DataSourceDefinitionExternal_Oracle{ + Oracle: &vega.DataSourceSpecConfiguration{ + Signers: []*datav1.Signer{pubKey.IntoProto()}, + Filters: []*datav1.Filter{ + { + Key: &datav1.PropertyKey{ + Name: "ethereum.oracle.test.settlement_3DB2D971C6", + Type: datav1.PropertyKey_TYPE_INTEGER, + }, + Conditions: []*datav1.Condition{}, + }, + }, + }, + }, + }, + }, + }, + }, + DataSourcesSpecBinding: []*vega.SpecBindingForCompositePrice{ + {PriceSourceProperty: "ethereum.oracle.test.settlement_3DB2D971C6"}, + }, + } + + mpc := types.CompositePriceConfigurationFromProto(mpcProto) + mpcProto2 := mpc.IntoProto() + require.Equal(t, mpcProto, mpcProto2) +} diff --git a/core/execution/future/mark_price_utils.go b/core/execution/future/mark_price_utils.go new file mode 100644 index 0000000000..4e71fbce32 --- /dev/null +++ b/core/execution/future/mark_price_utils.go @@ -0,0 +1,181 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package future + +import ( + "sort" + "time" + + "code.vegaprotocol.io/vega/core/matching" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" +) + +// timeWeight calculates the time weight for the given trade time given the current time. +func timeWeight(alpha, lambda, decayPower num.Decimal, t, tradeTime int64) num.Decimal { + if alpha.IsZero() { + return num.DecimalOne() + } + timeFraction := num.DecimalFromInt64(t - tradeTime).Div(lambda) + res := num.DecimalOne().Sub(alpha.Mul(timeFraction.Pow(decayPower))) + if res.IsNegative() { + return num.DecimalZero() + } + return res +} + +// PriceFromTrades calculates the mark price from trades in the current price frequency. +func PriceFromTrades(trades []*types.Trade, decayWeight, lambda, decayPower num.Decimal, t int64) *num.Uint { + if lambda.IsZero() { + return nil + } + wSum := num.DecimalZero() + ptSum := num.DecimalZero() + + totalTradedSize := int64(0) + for _, trade := range trades { + totalTradedSize += int64(trade.Size) + } + totalTradedSizeD := num.DecimalFromInt64(totalTradedSize) + + for _, trade := range trades { + weightedSize := timeWeight(decayWeight, lambda, decayPower, t, trade.Timestamp).Mul(num.DecimalFromInt64(int64(trade.Size)).Div(totalTradedSizeD)) + wSum = wSum.Add(weightedSize) + ptSum = ptSum.Add(weightedSize.Mul(trade.Price.ToDecimal())) + } + // if all trades have time weight 0, there's no price from trades. + if wSum.IsZero() { + return nil + } + ptUint, _ := num.UintFromDecimal(ptSum.Div(wSum)) + return ptUint +} + +// PriceFromBookAtTime calculate the mark price as the average price of buying/selling the quantity implied by scaling C +// by the factors. If there is no bid or ask price for the required quantity, returns nil. +func PriceFromBookAtTime(C *num.Uint, initialScalingFactor, slippageFactor, shortRiskFactor, longRiskFactor num.Decimal, orderBook *matching.CachedOrderBook) *num.Uint { + bestAsk, err := orderBook.GetBestAskPrice() + // no best ask + if err != nil { + return nil + } + bestBid, err := orderBook.GetBestBidPrice() + // no best bid + if err != nil { + return nil + } + + vBuy := uint64(C.ToDecimal().Div(initialScalingFactor.Mul(slippageFactor.Add(shortRiskFactor))).Div(bestBid.ToDecimal()).IntPart()) + vwapBuy, err := orderBook.VWAP(vBuy, types.SideBuy) + // insufficient quantity in the book for vbuy quantity + if err != nil { + return nil + } + + vSell := uint64(C.ToDecimal().Div(initialScalingFactor.Mul(slippageFactor.Add(longRiskFactor))).Div(bestAsk.ToDecimal()).IntPart()) + vwapSell, err := orderBook.VWAP(vSell, types.SideSell) + // insufficient quantity in the book for vsell quantity + if err != nil { + return nil + } + + return num.UintZero().Div(vwapSell.AddSum(vwapBuy), num.NewUint(2)) +} + +// MedianPrice returns the median of the given prices (pBook, pTrades, pOracle1..n). +func MedianPrice(prices []*num.Uint) *num.Uint { + if prices == nil { + return nil + } + + return num.Median(prices) +} + +// CompositePriceByMedian returns the median mark price out of the non stale ones or nil if there is none. +func CompositePriceByMedian(prices []*num.Uint, lastUpdate []int64, delta []time.Duration, t int64) *num.Uint { + pricesToConsider := []*num.Uint{} + for i, u := range prices { + if t-lastUpdate[i] <= delta[i].Nanoseconds() && u != nil && !u.IsZero() { + pricesToConsider = append(pricesToConsider, u) + } + } + if len(pricesToConsider) == 0 { + return nil + } + return num.Median(pricesToConsider) +} + +// CompositePriceByWeight calculates the mid price out of the non-stale price by the weights assigned to each mid price. +func CompositePriceByWeight(prices []*num.Uint, weights []num.Decimal, lastUpdateTime []int64, delta []time.Duration, t int64) *num.Uint { + pricesToConsider := []*num.Uint{} + priceWeights := []num.Decimal{} + weightSum := num.DecimalZero() + for i, u := range prices { + if t-lastUpdateTime[i] <= delta[i].Nanoseconds() && u != nil && !u.IsZero() { + pricesToConsider = append(pricesToConsider, u) + priceWeights = append(priceWeights, weights[i]) + weightSum = weightSum.Add(weights[i]) + } + } + if len(pricesToConsider) == 0 || weightSum.IsZero() { + return nil + } + price := num.UintZero() + for i := 0; i < len(pricesToConsider); i++ { + mp, _ := num.UintFromDecimal(pricesToConsider[i].ToDecimal().Mul(priceWeights[i]).Div(weightSum)) + price.AddSum(mp) + } + return price +} + +// CalculateTimeWeightedAverageBookPrice calculates the time weighted average of the timepoints where book price +// was calculated. +func CalculateTimeWeightedAverageBookPrice(timeToPrice map[int64]*num.Uint, t int64, markPricePeriod int64) *num.Uint { + if len(timeToPrice) == 0 { + return nil + } + + keys := make([]int64, 0, len(timeToPrice)) + for k := range timeToPrice { + if k >= t-markPricePeriod { + keys = append(keys, k) + } + } + sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] }) + if len(keys) == 0 { + return nil + } + totalDuration := num.DecimalFromInt64(t - keys[0]) + mp := num.DecimalZero() + for i, timepoint := range keys { + var duration int64 + if i == len(keys)-1 { + duration = t - timepoint + } else { + duration = keys[i+1] - timepoint + } + var timeWeight num.Decimal + if totalDuration.IsZero() { + timeWeight = num.DecimalZero() + } else { + timeWeight = num.DecimalFromInt64(duration).Div(totalDuration) + } + + mp = mp.Add(timeWeight.Mul(timeToPrice[timepoint].ToDecimal())) + } + mpAsU, _ := num.UintFromDecimal(mp) + return mpAsU +} diff --git a/core/execution/future/mark_price_utils_test.go b/core/execution/future/mark_price_utils_test.go new file mode 100644 index 0000000000..d97f4e9de8 --- /dev/null +++ b/core/execution/future/mark_price_utils_test.go @@ -0,0 +1,200 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package future_test + +import ( + "testing" + "time" + + "code.vegaprotocol.io/vega/core/execution/future" + "code.vegaprotocol.io/vega/core/matching" + "code.vegaprotocol.io/vega/core/types" + vgcrypto "code.vegaprotocol.io/vega/libs/crypto" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/logging" + + "github.com/stretchr/testify/require" +) + +func TestMarkPriceByWeights(t *testing.T) { + // no mark prices + require.Nil(t, future.CompositePriceByWeight(nil, []num.Decimal{num.NewDecimalFromFloat(0.2), num.NewDecimalFromFloat(0.5)}, []int64{3, 2}, []time.Duration{0, 0}, 10)) + + // no non-stale mark prices + // time now is 10, both timestamps of prices are 2,3 with delta = 0 for both + require.Nil(t, future.CompositePriceByWeight([]*num.Uint{num.NewUint(100), num.NewUint(80)}, []num.Decimal{num.NewDecimalFromFloat(0.2), num.NewDecimalFromFloat(0.5)}, []int64{3, 2}, []time.Duration{0, 0}, 10)) + + // only the first price is non stale + // 10-8<=2 + require.Equal(t, num.NewUint(100), future.CompositePriceByWeight([]*num.Uint{num.NewUint(100), num.NewUint(80)}, []num.Decimal{num.NewDecimalFromFloat(0.2), num.NewDecimalFromFloat(0.5)}, []int64{8, 2}, []time.Duration{2, 0}, 10)) + + // only the second price is non stale + // 10-7<=3 + require.Equal(t, num.NewUint(80), future.CompositePriceByWeight([]*num.Uint{num.NewUint(100), num.NewUint(80)}, []num.Decimal{num.NewDecimalFromFloat(0.2), num.NewDecimalFromFloat(0.5)}, []int64{8, 7}, []time.Duration{1, 3}, 10)) + + // both prices are eligible use weights: + // 0.4*100+0.6*80 = 88 + require.Equal(t, num.NewUint(88), future.CompositePriceByWeight([]*num.Uint{num.NewUint(100), num.NewUint(80)}, []num.Decimal{num.NewDecimalFromFloat(0.2), num.NewDecimalFromFloat(0.3)}, []int64{8, 7}, []time.Duration{2, 3}, 10)) +} + +func TestMarkPriceByMedian(t *testing.T) { + // no prices + require.Nil(t, future.CompositePriceByMedian(nil, []int64{3, 2}, []time.Duration{0, 0}, 10)) + + // no non-stale mark prices + // time now is 10, both timestamps of prices are 2,3 with delta = 0 for both + require.Nil(t, future.CompositePriceByMedian([]*num.Uint{num.NewUint(100), num.NewUint(80)}, []int64{3, 2}, []time.Duration{0, 0}, 10)) + + // only the first price is non stale + // 10-8<=2 + require.Equal(t, num.NewUint(100), future.CompositePriceByMedian([]*num.Uint{num.NewUint(100), num.NewUint(80)}, []int64{8, 2}, []time.Duration{2, 0}, 10)) + + // only the second price is non stale + // 10-7<=3 + require.Equal(t, num.NewUint(80), future.CompositePriceByMedian([]*num.Uint{num.NewUint(100), num.NewUint(80)}, []int64{8, 7}, []time.Duration{1, 3}, 10)) + + // both prices are non stale, median is calculated (average in this even case) + require.Equal(t, num.NewUint(90), future.CompositePriceByMedian([]*num.Uint{num.NewUint(100), num.NewUint(80)}, []int64{8, 7}, []time.Duration{2, 3}, 10)) + + // all prices are non stale, median is calculated + require.Equal(t, num.NewUint(99), future.CompositePriceByMedian([]*num.Uint{num.NewUint(99), num.NewUint(100), num.NewUint(80)}, []int64{8, 8, 7}, []time.Duration{2, 2, 3}, 10)) +} + +func TestMedianMarkPrice(t *testing.T) { + require.Nil(t, future.MedianPrice(nil)) + require.Equal(t, "100", future.MedianPrice([]*num.Uint{num.NewUint(110), num.NewUint(99), num.NewUint(100)}).String()) + require.Equal(t, "100", future.MedianPrice([]*num.Uint{num.NewUint(110), num.NewUint(101), num.NewUint(99), num.NewUint(100)}).String()) +} + +func TestMarkPriceFromTrades(t *testing.T) { + alpha := num.DecimalZero() + decayPower := num.DecimalZero() + lambda := num.NewDecimalFromFloat(100) + + trade1 := &types.Trade{ + Price: num.NewUint(129), + Size: 10, + Timestamp: 120, + } + + trade2 := &types.Trade{ + Price: num.NewUint(124), + Size: 40, + Timestamp: 150, + } + trade3 := &types.Trade{ + Price: num.NewUint(133), + Size: 50, + Timestamp: 200, + } + + // given alpha is 0, the time_weight is 1 + // the total size is 60, so trade weights are: + // 1/10, 4/10, 5/10 + // so the markPrice = 0.1*129 + 0.4*124 + 0.5 * 133 = 129 + mp := future.PriceFromTrades([]*types.Trade{trade1, trade2, trade3}, alpha, lambda, decayPower, 200) + require.Equal(t, "129", mp.String()) + + // now lets repeat with non zero alpha + alpha = num.DecimalFromFloat(0.2) + decayPower = num.DecimalOne() + + // given alpha is 0, the time_weight is 1 + // the total size is 60, so trade weights are: + // 1/10 * (1 - 0.2 * (200-120)/100) = 0.084 + // 4/10 * (1 - 0.2 * (200-150)/100) = 0.36 + // 5/10 * (1 - 0.2 * (200-200)/100) = 0.5 + // total weight = 0.944 + // mp = (0.084 * 129 + 0.36 * 124 + 0.5 * 133)/0.944 = 172.1276595745 + mp = future.PriceFromTrades([]*types.Trade{trade1, trade2, trade3}, alpha, lambda, decayPower, 200) + require.Equal(t, "129", mp.String()) +} + +func TestPBookAtTimeT(t *testing.T) { + book := matching.NewCachedOrderBook(logging.NewTestLogger(), matching.NewDefaultConfig(), "market1", false, func(int64) {}) + C := num.NewUint(1000) + initialScaling := num.DecimalFromFloat(0.2) + slippage := num.DecimalFromFloat(0.1) + shortRisk := num.DecimalFromFloat(0.3) + longRisk := num.DecimalFromFloat(0.4) + + // empty book + require.Nil(t, future.PriceFromBookAtTime(C, initialScaling, slippage, shortRisk, longRisk, book)) + + // no bids + _, err := book.SubmitOrder(newOrder(num.NewUint(120), 10, types.SideSell)) + require.NoError(t, err) + require.Nil(t, future.PriceFromBookAtTime(C, initialScaling, slippage, shortRisk, longRisk, book)) + book.CancelAllOrders("party1") + + // no asks + _, err = book.SubmitOrder(newOrder(num.NewUint(125), 10, types.SideBuy)) + require.NoError(t, err) + require.Nil(t, future.PriceFromBookAtTime(C, initialScaling, slippage, shortRisk, longRisk, book)) + + // orders on both sides + _, err = book.SubmitOrder(newOrder(num.NewUint(200), 10, types.SideSell)) + require.NoError(t, err) + + // N_buy = 1000 / ((0.2) * (0.1+0.3)) = 12500 + // N_sell = 1000 / ((0.2) * (0.1+0.4)) = 10000 + // V_buy = N_buy/best_bid = 12500/125 = 100 + // V_sell = N_sell/best_ask = 10000/200 = 50 + // insufficient volume in the book for both sides + + require.Nil(t, future.PriceFromBookAtTime(C, initialScaling, slippage, shortRisk, longRisk, book)) + + // add orders on both sides + _, err = book.SubmitOrder(newOrder(num.NewUint(200), 40, types.SideSell)) + require.NoError(t, err) + _, err = book.SubmitOrder(newOrder(num.NewUint(125), 90, types.SideBuy)) + require.NoError(t, err) + + // (125+200)/2 = 162 + require.Equal(t, "162", future.PriceFromBookAtTime(C, initialScaling, slippage, shortRisk, longRisk, book).String()) +} + +func TestCalculateTimeWeightedAverageBookMarkPrice(t *testing.T) { + timeToPrice := map[int64]*num.Uint{0: num.NewUint(100), 30: num.NewUint(120), 45: num.NewUint(150)} + + // 100 * 30/60 + 120 * 15/60 + 150 * 15/60 = 117.5 => 117 + require.Equal(t, "117", future.CalculateTimeWeightedAverageBookPrice(timeToPrice, 60, 60).String()) + + // 120 * 15/30 + 150 * 15/30 = 97.5 => 135 + require.Equal(t, "135", future.CalculateTimeWeightedAverageBookPrice(timeToPrice, 60, 30).String()) + + // 100 * 30/120 + 120 * 15/120 + 150 * 75/120 = 133.75 => 133 + require.Equal(t, "133", future.CalculateTimeWeightedAverageBookPrice(timeToPrice, 120, 120).String()) + + // only the price from 45 is considered as the price from 30 is starting before the mark price period + require.Equal(t, "150", future.CalculateTimeWeightedAverageBookPrice(timeToPrice, 120, 80).String()) +} + +func newOrder(price *num.Uint, size uint64, side types.Side) *types.Order { + return &types.Order{ + ID: vgcrypto.RandomHash(), + Status: types.OrderStatusActive, + Type: types.OrderTypeLimit, + MarketID: "market1", + Party: "party1", + Side: side, + Price: price, + OriginalPrice: price, + Size: size, + Remaining: size, + TimeInForce: types.OrderTimeInForceGTC, + } +} diff --git a/core/execution/future/market.go b/core/execution/future/market.go index a5a680b8b0..8a1e390bba 100644 --- a/core/execution/future/market.go +++ b/core/execution/future/market.go @@ -24,8 +24,10 @@ import ( "time" "code.vegaprotocol.io/vega/core/assets" + "code.vegaprotocol.io/vega/core/collateral" "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/execution/common" + "code.vegaprotocol.io/vega/core/execution/liquidation" "code.vegaprotocol.io/vega/core/execution/stoporders" "code.vegaprotocol.io/vega/core/fee" "code.vegaprotocol.io/vega/core/idgeneration" @@ -35,7 +37,6 @@ import ( "code.vegaprotocol.io/vega/core/matching" "code.vegaprotocol.io/vega/core/metrics" "code.vegaprotocol.io/vega/core/monitor" - lmon "code.vegaprotocol.io/vega/core/monitor/liquidity" "code.vegaprotocol.io/vega/core/monitor/price" "code.vegaprotocol.io/vega/core/positions" "code.vegaprotocol.io/vega/core/products" @@ -48,19 +49,13 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" + "code.vegaprotocol.io/vega/protos/vega" vegapb "code.vegaprotocol.io/vega/protos/vega" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" "golang.org/x/exp/maps" ) -// LiquidityMonitor. -type LiquidityMonitor interface { - CheckLiquidity(as lmon.AuctionState, t time.Time, currentStake *num.Uint, trades []*types.Trade, rf types.RiskFactor, markPrice *num.Uint, bestStaticBidVolume, bestStaticAskVolume uint64, persistent bool) bool - SetMinDuration(d time.Duration) - UpdateTargetStakeTriggerRatio(ctx context.Context, ratio num.Decimal) - UpdateParameters(*types.LiquidityMonitoringParameters) -} - // TargetStakeCalculator interface. type TargetStakeCalculator interface { types.StateProvider @@ -87,7 +82,6 @@ type Market struct { mu sync.Mutex lastTradedPrice *num.Uint - markPrice *num.Uint priceFactor *num.Uint // own engines @@ -104,6 +98,7 @@ type Market struct { // deps engines collateral common.Collateral + banking common.Banking broker common.Broker closed bool @@ -112,10 +107,6 @@ type Market struct { parties map[string]struct{} pMonitor common.PriceMonitor - lMonitor LiquidityMonitor - - linearSlippageFactor num.Decimal - quadraticSlippageFactor num.Decimal tsCalc TargetStakeCalculator @@ -143,9 +134,11 @@ type Market struct { positionFactor num.Decimal // 10^pdp assetDP uint32 - settlementDataInMarket *num.Numeric - nextMTM time.Time - mtmDelta time.Duration + settlementDataInMarket *num.Numeric + nextMTM time.Time + nextInternalCompositePriceCalc time.Time + mtmDelta time.Duration + internalCompositePriceFrequency time.Duration settlementAsset string succeeded bool @@ -157,7 +150,8 @@ type Market struct { minDuration time.Duration perp bool - stats *types.MarketStats + stats *types.MarketStats + liquidation *liquidation.Engine // @TODO probably should be an interface for unit testing // set to false when started // we'll use it only once after an upgrade @@ -165,6 +159,11 @@ type Market struct { // are applied properly ensuredMigration73 bool epoch types.Epoch + + // party ID to isolated margin factor + partyMarginFactor map[string]num.Decimal + markPriceCalculator *CompositePriceCalculator + internalCompositePriceCalculator *CompositePriceCalculator } // NewMarket creates a new market using the market framework configuration and creates underlying engines. @@ -189,6 +188,7 @@ func NewMarket( peggedOrderNotify func(int64), referralDiscountRewardService fee.ReferralDiscountRewardService, volumeDiscountService fee.VolumeDiscountService, + banking common.Banking, ) (*Market, error) { if len(mkt.ID) == 0 { return nil, common.ErrEmptyMarketID @@ -252,8 +252,6 @@ func NewMarket( return nil, fmt.Errorf("unable to instantiate price monitoring engine: %w", err) } - lMonitor := lmon.NewMonitor(tsCalc, mkt.LiquidityMonitoringParameters) - now := timeService.GetTimeNow() liquidityEngine := liquidity.NewSnapshotEngine( @@ -285,6 +283,14 @@ func NewMarket( } mkt.MarketTimestamps = ts + // @TODO remove this once liquidation strategy is no longer optional + // consider mkt.LiquidationStrategy is currently still treated as optional, but we use + // mkt in the events we're sending to data-node, let's set the default strategy here + // and update the mkt object so the events will accurately reflect what this is being set to + if mkt.LiquidationStrategy == nil { + mkt.LiquidationStrategy = liquidation.GetLegacyStrat() + } + le := liquidation.New(log, mkt.LiquidationStrategy, mkt.GetID(), broker, book, auctionState, timeService, marketLiquidity, positionEngine) marketType := mkt.MarketType() market := &Market{ @@ -305,7 +311,6 @@ func NewMarket( parties: map[string]struct{}{}, as: auctionState, pMonitor: pMonitor, - lMonitor: lMonitor, tsCalc: tsCalc, peggedOrders: common.NewPeggedOrders(log, timeService), expiringOrders: common.NewExpiringOrders(), @@ -320,14 +325,25 @@ func NewMarket( priceFactor: priceFactor, positionFactor: positionFactor, nextMTM: time.Time{}, // default to zero time - linearSlippageFactor: mkt.LinearSlippageFactor, - quadraticSlippageFactor: mkt.QuadraticSlippageFactor, maxStopOrdersPerParties: num.UintZero(), stopOrders: stoporders.New(log), expiringStopOrders: common.NewExpiringOrders(), perp: marketType == types.MarketTypePerp, referralDiscountRewardService: referralDiscountRewardService, volumeDiscountService: volumeDiscountService, + partyMarginFactor: map[string]num.Decimal{}, + liquidation: le, + banking: banking, + markPriceCalculator: NewCompositePriceCalculator(ctx, mkt.MarkPriceConfiguration, oracleEngine, timeService), + } + market.markPriceCalculator.setOraclePriceScalingFunc(market.scaleOracleData) + + if market.IsPerp() { + internalCompositePriceConfig := mkt.TradableInstrument.Instrument.GetPerps().InternalCompositePriceConfig + if internalCompositePriceConfig != nil { + market.internalCompositePriceCalculator = NewCompositePriceCalculator(ctx, internalCompositePriceConfig, oracleEngine, timeService) + market.internalCompositePriceCalculator.setOraclePriceScalingFunc(market.scaleOracleData) + } } assets, _ := mkt.GetAssets() @@ -357,7 +373,7 @@ func (m *Market) OnEpochEvent(ctx context.Context, epoch types.Epoch) { switch epoch.Action { case vegapb.EpochAction_EPOCH_ACTION_START: m.liquidity.UpdateSLAParameters(m.mkt.LiquiditySLAParams) - m.liquidity.OnEpochStart(ctx, m.timeService.GetTimeNow(), m.markPrice, m.midPrice(), m.getTargetStake(), m.positionFactor) + m.liquidity.OnEpochStart(ctx, m.timeService.GetTimeNow(), m.markPriceCalculator.price, m.midPrice(), m.getTargetStake(), m.positionFactor) m.epoch = epoch case vegapb.EpochAction_EPOCH_ACTION_END: // compute parties stats for the previous epoch @@ -365,10 +381,14 @@ func (m *Market) OnEpochEvent(ctx context.Context, epoch types.Epoch) { if !m.finalFeesDistributed { m.liquidity.OnEpochEnd(ctx, m.timeService.GetTimeNow(), epoch) } + + m.banking.RegisterTradingFees(ctx, m.settlementAsset, m.fee.TotalTradingFeesPerParty()) + assetQuantum, _ := m.collateral.GetAssetQuantum(m.settlementAsset) feesStats := m.fee.GetFeesStatsOnEpochEnd(assetQuantum) feesStats.Market = m.GetID() feesStats.EpochSeq = epoch.Seq + m.broker.Send(events.NewFeesStatsEvent(ctx, feesStats)) } @@ -385,7 +405,7 @@ func (m *Market) IsOpeningAuction() bool { } func (m *Market) onEpochEndPartiesStats() { - if m.markPrice == nil { + if m.markPriceCalculator.price == nil { // no mark price yet, so no reason to calculate any of those return } @@ -409,7 +429,7 @@ func (m *Market) onEpochEndPartiesStats() { partiesOpenInterest := m.position.GetPartiesLowestOpenInterestForEpoch() for p, oi := range partiesOpenInterest { // volume - openInterestVolume := num.UintZero().Mul(num.NewUint(oi), m.markPrice) + openInterestVolume := num.UintZero().Mul(num.NewUint(oi), m.markPriceCalculator.price) // scale to position decimal scaledOpenInterest := openInterestVolume.ToDecimal().Div(m.positionFactor) // apply quantum @@ -422,7 +442,7 @@ func (m *Market) onEpochEndPartiesStats() { partiesTradedVolume := m.position.GetPartiesTradedVolumeForEpoch() for p, oi := range partiesTradedVolume { // volume - tradedVolume := num.UintZero().Mul(num.NewUint(oi), m.markPrice) + tradedVolume := num.UintZero().Mul(num.NewUint(oi), m.markPriceCalculator.price) // scale to position decimal scaledOpenInterest := tradedVolume.ToDecimal().Div(m.positionFactor) // apply quantum @@ -516,6 +536,7 @@ func (m *Market) StopSnapshots() { m.liquidityEngine.StopSnapshots() m.settlement.StopSnapshots() m.tsCalc.StopSnapshots() + m.liquidation.StopSnapshots() } func (m *Market) Mkt() *types.Market { @@ -543,6 +564,10 @@ func (m *Market) SetSucceeded() { m.succeeded = true } +func (m *Market) SetNextInternalCompositePriceCalc(tm time.Time) { + m.nextInternalCompositePriceCalc = tm +} + func (m *Market) SetNextMTM(tm time.Time) { m.nextMTM = tm } @@ -560,6 +585,11 @@ func (m *Market) Update(ctx context.Context, config *types.Market, oracleEngine config.State = m.mkt.State config.MarketTimestamps = m.mkt.MarketTimestamps recalcMargins := !config.TradableInstrument.RiskModel.Equal(m.mkt.TradableInstrument.RiskModel) + // update the liquidation strategy if required, ideally we want to use .LiquidationStrategy.EQ(), but that breaks the integration tests + // as the market config pointer is shared + if config.LiquidationStrategy != nil { + m.liquidation.Update(config.LiquidationStrategy) + } m.mkt = config assets, _ := config.GetAssets() m.settlementAsset = assets[0] @@ -567,14 +597,32 @@ func (m *Market) Update(ctx context.Context, config *types.Market, oracleEngine if err := m.tradableInstrument.UpdateInstrument(ctx, m.log, m.mkt.TradableInstrument, m.GetID(), oracleEngine, m.broker); err != nil { return err } - m.risk.UpdateModel(m.stateVarEngine, m.tradableInstrument.MarginCalculator, m.tradableInstrument.RiskModel) + m.risk.UpdateModel(m.stateVarEngine, m.tradableInstrument.MarginCalculator, m.tradableInstrument.RiskModel, m.mkt.LinearSlippageFactor, m.mkt.QuadraticSlippageFactor) m.settlement.UpdateProduct(m.tradableInstrument.Instrument.Product) m.tsCalc.UpdateParameters(*m.mkt.LiquidityMonitoringParameters.TargetStakeParameters) m.pMonitor.UpdateSettings(m.tradableInstrument.RiskModel, m.mkt.PriceMonitoringSettings) - m.linearSlippageFactor = m.mkt.LinearSlippageFactor - m.quadraticSlippageFactor = m.mkt.QuadraticSlippageFactor - m.lMonitor.UpdateParameters(m.mkt.LiquidityMonitoringParameters) m.liquidity.UpdateMarketConfig(m.tradableInstrument.RiskModel, m.pMonitor) + if err := m.markPriceCalculator.UpdateConfig(ctx, oracleEngine, m.mkt.MarkPriceConfiguration); err != nil { + m.markPriceCalculator.setOraclePriceScalingFunc(m.scaleOracleData) + return err + } + if m.IsPerp() { + internalCompositePriceConfig := m.mkt.TradableInstrument.Instrument.GetPerps().InternalCompositePriceConfig + if internalCompositePriceConfig == nil && m.internalCompositePriceCalculator != nil { + // unsubscribe existing oracles if any + m.internalCompositePriceCalculator.UpdateConfig(ctx, oracleEngine, nil) + m.internalCompositePriceCalculator = nil + } else if m.internalCompositePriceCalculator != nil { + // there was previously a intenal composite price calculator + if err := m.internalCompositePriceCalculator.UpdateConfig(ctx, oracleEngine, internalCompositePriceConfig); err != nil { + m.internalCompositePriceCalculator.setOraclePriceScalingFunc(m.scaleOracleData) + return err + } + } else if internalCompositePriceConfig != nil { + // it's a new index calculator + m.internalCompositePriceCalculator = NewCompositePriceCalculator(ctx, internalCompositePriceConfig, oracleEngine, m.timeService) + } + } // we should not need to rebind a replacement oracle here, the m.tradableInstrument.UpdateInstrument // call handles the callbacks for us. We only need to check the market state and unbind if needed @@ -699,7 +747,36 @@ func (m *Market) GetMarketData() types.MarketData { mode = m.mkt.TradingMode } - return types.MarketData{ + var internalCompositePrice *num.Uint + var nextInternalCompositePriceCalc int64 + var internalCompositePriceType vega.CompositePriceType + var internalCompositePriceState *types.CompositePriceState + pd := m.tradableInstrument.Instrument.Product.GetData(m.timeService.GetTimeNow().UnixNano()) + if m.perp && pd != nil { + if m.internalCompositePriceCalculator != nil { + internalCompositePriceState = m.internalCompositePriceCalculator.GetData() + internalCompositePriceType = m.internalCompositePriceCalculator.config.CompositePriceType + internalCompositePrice = m.internalCompositePriceCalculator.price + if internalCompositePrice == nil { + internalCompositePrice = num.UintZero() + } else { + internalCompositePrice = m.priceToMarketPrecision(internalCompositePrice) + } + nextInternalCompositePriceCalc = m.nextInternalCompositePriceCalc.UnixNano() + } else { + internalCompositePriceState = m.markPriceCalculator.GetData() + internalCompositePriceType = m.markPriceCalculator.config.CompositePriceType + internalCompositePrice = m.priceToMarketPrecision(m.getCurrentMarkPrice()) + nextInternalCompositePriceCalc = m.nextMTM.UnixNano() + } + perpData := pd.Data.(*types.PerpetualData) + perpData.InternalCompositePrice = internalCompositePrice + perpData.NextInternalCompositePriceCalc = nextInternalCompositePriceCalc + perpData.InternalCompositePriceType = internalCompositePriceType + perpData.InternalCompositePriceState = internalCompositePriceState + } + + md := types.MarketData{ Market: m.GetID(), BestBidPrice: m.priceToMarketPrecision(bestBidPrice), BestBidVolume: bestBidVolume, @@ -731,8 +808,12 @@ func (m *Market) GetMarketData() types.MarketData { LiquidityProviderSLA: m.liquidityEngine.LiquidityProviderSLAStats(m.timeService.GetTimeNow()), NextMTM: m.nextMTM.UnixNano(), MarketGrowth: m.equityShares.GetMarketGrowth(), - ProductData: m.tradableInstrument.Instrument.Product.GetData(m.timeService.GetTimeNow().UnixNano()), + ProductData: pd, + NextNetClose: m.liquidation.GetNextCloseoutTS(), + MarkPriceType: m.markPriceCalculator.config.CompositePriceType, + MarkPriceState: m.markPriceCalculator.GetData(), } + return md } // ReloadConf will trigger a reload of all the config settings in the market and all underlying engines @@ -889,8 +970,9 @@ func (m *Market) OnTick(ctx context.Context, t time.Time) bool { return true } - // first we expire orders + // first we check if we should reduce the network position, then we expire orders if !m.closed && m.canTrade() { + m.checkNetwork(ctx, t) expired := m.removeExpiredOrders(ctx, t.UnixNano()) metrics.OrderGaugeAdd(-len(expired), m.GetID()) confirmations := m.removeExpiredStopOrders(ctx, t.UnixNano(), m.idgen) @@ -931,6 +1013,7 @@ func (m *Market) OnTick(ctx context.Context, t time.Time) bool { // check auction, if any. If we leave auction, MTM is performed in this call m.checkAuction(ctx, t, m.idgen) + // check the position of the network, may place orders to close the network out timer.EngineTimeCounterAdd() m.updateMarketValueProxy() @@ -951,36 +1034,70 @@ func (m *Market) BlockEnd(ctx context.Context) { defer func() { m.idgen = nil }() - hasTraded := m.settlement.HasTraded() - mp := m.getLastTradedPrice() - if !hasTraded && m.markPrice != nil { - // no trades happened, make sure we're just using the current mark price - mp = m.markPrice.Clone() - } + t := m.timeService.GetTimeNow() - if mp != nil && !mp.IsZero() && !m.as.InAuction() && (m.nextMTM.IsZero() || !m.nextMTM.After(t)) { - m.markPrice = mp - m.nextMTM = t.Add(m.mtmDelta) // add delta here - if hasTraded { - // only MTM if we have traded - m.confirmMTM(ctx, false) + m.markPriceCalculator.CalculateBookMarkPriceAtTimeT(m.tradableInstrument.MarginCalculator.ScalingFactors.InitialMargin, m.mkt.LinearSlippageFactor, m.risk.GetRiskFactors().Short, m.risk.GetRiskFactors().Long, t.UnixNano(), m.matching) + if m.internalCompositePriceCalculator != nil { + m.internalCompositePriceCalculator.CalculateBookMarkPriceAtTimeT(m.tradableInstrument.MarginCalculator.ScalingFactors.InitialMargin, m.mkt.LinearSlippageFactor, m.risk.GetRiskFactors().Short, m.risk.GetRiskFactors().Long, t.UnixNano(), m.matching) + } + + // if we do have a separate configuration for the intenal composite price and we have a new intenal composite price we push it to the perp + if m.internalCompositePriceCalculator != nil && (m.nextInternalCompositePriceCalc.IsZero() || + !m.nextInternalCompositePriceCalc.After(t) && + !m.as.InAuction()) { + prevInternalCompositePrice := m.internalCompositePriceCalculator.price + m.internalCompositePriceCalculator.CalculateMarkPrice( + t.UnixNano(), + m.matching, + m.mtmDelta, + m.tradableInstrument.MarginCalculator.ScalingFactors.InitialMargin, m.mkt.LinearSlippageFactor, m.risk.GetRiskFactors().Short, m.risk.GetRiskFactors().Long) + m.nextInternalCompositePriceCalc = t.Add(m.internalCompositePriceFrequency) + if (prevInternalCompositePrice == nil || !m.internalCompositePriceCalculator.price.EQ(prevInternalCompositePrice) || m.settlement.HasTraded()) && + !m.getCurrentInternalCompositePrice().IsZero() { + m.tradableInstrument.Instrument.Product.SubmitDataPoint(ctx, m.getCurrentInternalCompositePrice(), m.timeService.GetTimeNow().UnixNano()) } + } - closedPositions := m.position.GetClosedPositions() - - if len(closedPositions) > 0 { - m.releaseExcessMargin(ctx, closedPositions...) - // also remove all stop orders - m.removeAllStopOrders(ctx, closedPositions...) + // if it's time for mtm, let's do it + if m.nextMTM.IsZero() || + !m.nextMTM.After(t) && + !m.as.InAuction() { + prevMarkPrice := m.markPriceCalculator.price + m.markPriceCalculator.CalculateMarkPrice( + t.UnixNano(), + m.matching, + m.mtmDelta, + m.tradableInstrument.MarginCalculator.ScalingFactors.InitialMargin, m.mkt.LinearSlippageFactor, m.risk.GetRiskFactors().Short, m.risk.GetRiskFactors().Long) + // if we don't have an alternative configuration (and schedule) for the mark price the we push the mark price to the perp as a new datapoint + // on the standard mark price + if m.internalCompositePriceCalculator == nil && m.perp && + (prevMarkPrice == nil || !m.markPriceCalculator.price.EQ(prevMarkPrice) || m.settlement.HasTraded()) && + !m.getCurrentMarkPrice().IsZero() { + m.tradableInstrument.Instrument.Product.SubmitDataPoint(ctx, m.getCurrentMarkPrice(), m.timeService.GetTimeNow().UnixNano()) + } + m.nextMTM = t.Add(m.mtmDelta) + // TODO @zohar not sure if the hasTraded is needed + if (prevMarkPrice == nil || !m.markPriceCalculator.price.EQ(prevMarkPrice) || m.settlement.HasTraded()) && + !m.getCurrentMarkPrice().IsZero() { + m.confirmMTM(ctx, false) + closedPositions := m.position.GetClosedPositions() + if len(closedPositions) > 0 { + m.releaseExcessMargin(ctx, closedPositions...) + // also remove all stop orders + m.removeAllStopOrders(ctx, closedPositions...) + } } - // last traded price should not reflect the closeout trades - m.lastTradedPrice = mp.Clone() } + m.releaseExcessMargin(ctx, m.position.Positions()...) // send position events m.position.FlushPositionEvents(ctx) - m.liquidity.EndBlock(m.markPrice, m.midPrice(), m.positionFactor) + var markPriceCopy *num.Uint + if m.markPriceCalculator.price != nil { + markPriceCopy = m.markPriceCalculator.price.Clone() + } + m.liquidity.EndBlock(markPriceCopy, m.midPrice(), m.positionFactor) } func (m *Market) removeAllStopOrders( @@ -993,7 +1110,7 @@ func (m *Market) removeAllStopOrders( sos, _ := m.stopOrders.Cancel(v.Party(), "") for _, so := range sos { if so.Expiry.Expires() { - _ = m.expiringOrders.RemoveOrder(so.Expiry.ExpiresAt.UnixNano(), so.ID) + _ = m.expiringStopOrders.RemoveOrder(so.Expiry.ExpiresAt.UnixNano(), so.ID) } evts = append(evts, events.NewStopOrderEvent(ctx, so)) } @@ -1060,6 +1177,11 @@ func (m *Market) cleanMarketWithState(ctx context.Context, mktState types.Market m.broker.Send(events.NewLedgerMovements(ctx, clearMarketTransfers)) } + m.markPriceCalculator.Close(ctx) + if m.internalCompositePriceCalculator != nil { + m.internalCompositePriceCalculator.Close(ctx) + } + m.mkt.State = mktState m.mkt.TradingMode = types.MarketTradingModeNoTrading m.mkt.MarketTimestamps.Close = m.timeService.GetTimeNow().UnixNano() @@ -1110,7 +1232,7 @@ func (m *Market) closeMarket(ctx context.Context, t time.Time, finalState types. m.recordPositionActivity(t) } - transfers, err := m.collateral.FinalSettlement(ctx, m.GetID(), positions, round) + transfers, err := m.collateral.FinalSettlement(ctx, m.GetID(), positions, round, m.useGeneralAccountForMarginSearch) if err != nil { m.log.Error("Failed to get ledger movements after settling closed market", logging.MarketID(m.GetID()), @@ -1266,6 +1388,7 @@ func (m *Market) UpdateMarketState(ctx context.Context, changes *types.MarketSta } } else { m.as.StartGovernanceSuspensionAuction(m.timeService.GetTimeNow()) + m.tradableInstrument.Instrument.UpdateAuctionState(ctx, true) m.enterAuction(ctx) m.broker.Send(events.NewMarketUpdatedEvent(ctx, *m.mkt)) } @@ -1314,9 +1437,10 @@ func (m *Market) enterAuction(ctx context.Context) { // Send an event bus update m.broker.Send(event) - if m.as.InAuction() && (m.as.IsLiquidityAuction() || m.as.IsPriceAuction()) { + if m.as.InAuction() && m.as.IsPriceAuction() { m.mkt.State = types.MarketStateSuspended m.mkt.TradingMode = types.MarketTradingModeMonitoringAuction + m.tradableInstrument.Instrument.UpdateAuctionState(ctx, true) m.broker.Send(events.NewMarketUpdatedEvent(ctx, *m.mkt)) } } @@ -1331,15 +1455,24 @@ func (m *Market) uncrossOnLeaveAuction(ctx context.Context) ([]*types.OrderConfi evts := make([]events.Event, 0, len(uncrossedOrders)) for _, uncrossedOrder := range uncrossedOrders { // handle fees first - err := m.applyFees(ctx, uncrossedOrder.Order, uncrossedOrder.Trades) + fees, err := m.calcFees(uncrossedOrder.Trades) if err != nil { // @TODO this ought to be an event - m.log.Error("Unable to apply fees to order", + m.log.Error("Unable to calculate fees to order", logging.String("OrderID", uncrossedOrder.Order.ID)) + } else { + if fees != nil { + err = m.applyFees(ctx, uncrossedOrder.Order, fees) + if err != nil { + // @TODO this ought to be an event + m.log.Error("Unable to apply fees to order", + logging.String("OrderID", uncrossedOrder.Order.ID)) + } + } } // then do the confirmation - m.handleConfirmation(ctx, uncrossedOrder) + m.handleConfirmation(ctx, uncrossedOrder, nil) if uncrossedOrder.Order.Remaining == 0 { uncrossedOrder.Order.Status = types.OrderStatusFilled @@ -1349,6 +1482,22 @@ func (m *Market) uncrossOnLeaveAuction(ctx context.Context) ([]*types.OrderConfi // send order events in a single batch, it's more efficient m.broker.SendBatch(evts) + + // after auction uncrossing we can relax the price requirement and release some excess order margin if any was placed during an auction. + for k, d := range m.partyMarginFactor { + partyPos, _ := m.position.GetPositionByPartyID(k) + if partyPos != nil && (partyPos.Buy() != 0 || partyPos.Sell() != 0) { + marketObservable, mpos, increment, _, _, orders, err := m.getIsolatedMarginContext(partyPos, nil) + if err != nil { + continue + } + r := m.risk.ReleaseExcessMarginAfterAuctionUncrossing(ctx, mpos, marketObservable, increment, d, orders) + if r != nil && r.Transfer() != nil { + m.transferMargins(ctx, []events.Risk{r}, nil) + } + } + } + return uncrossedOrders, ordersToCancel } @@ -1378,6 +1527,7 @@ func (m *Market) leaveAuction(ctx context.Context, now time.Time) { m.mkt.State = types.MarketStateActive m.mkt.TradingMode = types.MarketTradingModeContinuous + m.tradableInstrument.Instrument.UpdateAuctionState(ctx, false) m.broker.Send(events.NewMarketUpdatedEvent(ctx, *m.mkt)) m.updateLiquidityFee(ctx) @@ -1402,6 +1552,8 @@ func (m *Market) leaveAuction(ctx context.Context, now time.Time) { updatedOrders = append(updatedOrders, conf.Order) } + wasOpeningAuction := m.IsOpeningAuction() + // update auction state, so we know what the new tradeMode ought to be endEvt := m.as.Left(ctx, now) @@ -1411,13 +1563,42 @@ func (m *Market) leaveAuction(ctx context.Context, now time.Time) { updatedOrders, uncrossedOrder.PassiveOrdersAffected...) } - previousMarkPrice := m.getCurrentMarkPrice() - // set the mark price here so that margins checks for special orders use the correct value - m.markPrice = m.getLastTradedPrice() + m.markPriceCalculator.CalculateMarkPrice( + m.timeService.GetTimeNow().UnixNano(), + m.matching, + m.mtmDelta, + m.tradableInstrument.MarginCalculator.ScalingFactors.InitialMargin, + m.mkt.LinearSlippageFactor, + m.risk.GetRiskFactors().Short, + m.risk.GetRiskFactors().Long) + + if wasOpeningAuction && (m.getCurrentMarkPrice().IsZero()) { + m.markPriceCalculator.overridePrice(m.lastTradedPrice) + } + + if m.perp { + if m.internalCompositePriceCalculator != nil { + m.internalCompositePriceCalculator.CalculateMarkPrice( + m.timeService.GetTimeNow().UnixNano(), + m.matching, + m.internalCompositePriceFrequency, + m.tradableInstrument.MarginCalculator.ScalingFactors.InitialMargin, + m.mkt.LinearSlippageFactor, + m.risk.GetRiskFactors().Short, + m.risk.GetRiskFactors().Long) + + if wasOpeningAuction && (m.getCurrentInternalCompositePrice().IsZero()) { + m.internalCompositePriceCalculator.overridePrice(m.lastTradedPrice) + } + m.tradableInstrument.Instrument.Product.SubmitDataPoint(ctx, m.getCurrentInternalCompositePrice(), m.timeService.GetTimeNow().UnixNano()) + } else { + m.tradableInstrument.Instrument.Product.SubmitDataPoint(ctx, m.getCurrentMarkPrice(), m.timeService.GetTimeNow().UnixNano()) + } + } m.checkForReferenceMoves(ctx, updatedOrders, true) - m.checkLiquidity(ctx, nil, true) + m.checkBondBalance(ctx) m.commandLiquidityAuction(ctx) if !m.as.InAuction() { @@ -1429,9 +1610,8 @@ func (m *Market) leaveAuction(ctx context.Context, now time.Time) { m.confirmMTM(ctx, false) // set next MTM m.nextMTM = m.timeService.GetTimeNow().Add(m.mtmDelta) - } else { - // revert to old mark price if we're not leaving the auction after all - m.markPrice = previousMarkPrice + // we have just left auction, check the network position, dispose of volume if possible + m.checkNetwork(ctx, now) } } @@ -1497,6 +1677,9 @@ func (m *Market) validateOrder(ctx context.Context, order *types.Order) (err err // Validate pegged orders if order.PeggedOrder != nil { + if m.getMarginMode(order.Party) != types.MarginModeCrossMargin { + return types.ErrPeggedOrdersNotAllowedInIsolatedMargin + } if reason := order.ValidatePeggedOrder(); reason != types.OrderErrorUnspecified { order.Reason = reason if m.log.GetLevel() == logging.DebugLevel { @@ -1539,7 +1722,10 @@ func (m *Market) validateAccounts(ctx context.Context, order *types.Order) error // from this point we know the party have a margin account // we had it to the list of parties. - m.addParty(order.Party) + if m.addParty(order.Party) { + // First time seeing the party, we report his margin mode. + m.emitPartyMarginModeUpdated(ctx, order.Party, m.getMarginMode(order.Party), m.getMarginFactor(order.Party)) + } return nil } @@ -1569,6 +1755,7 @@ func (m *Market) releaseExcessMargin(ctx context.Context, positions ...events.Ma SearchLevel: num.UintZero(), InitialMargin: num.UintZero(), CollateralReleaseLevel: num.UintZero(), + OrderMargin: num.UintZero(), MarketID: mktID, Asset: m.settlementAsset, Timestamp: m.timeService.GetTimeNow().UnixNano(), @@ -1596,6 +1783,8 @@ func (m *Market) releaseExcessMargin(ctx context.Context, positions ...events.Ma continue } marginEvt.Party = party + marginEvt.MarginFactor = m.getMarginFactor(party) + marginEvt.MarginMode = m.getMarginMode(party) mEvts = append(mEvts, events.NewMarginLevelsEvent(ctx, marginEvt)) if transfers != nil { @@ -1603,7 +1792,19 @@ func (m *Market) releaseExcessMargin(ctx context.Context, positions ...events.Ma ctx, []*types.LedgerMovement{transfers}), ) } - + if marginEvt.MarginMode == types.MarginModeIsolatedMargin { + transfers, err = m.collateral.ClearPartyOrderMarginAccount( + ctx, party, mktID, m.settlementAsset) + if err != nil { + m.log.Error("unable to clear party order margin account", logging.Error(err)) + continue + } + if transfers != nil { + evts = append(evts, events.NewLedgerMovements( + ctx, []*types.LedgerMovement{transfers}), + ) + } + } // we can delete the party from the map here // unless the party is an LP if !m.liquidityEngine.IsLiquidityProvider(party) { @@ -1654,6 +1855,11 @@ func (m *Market) SubmitStopOrdersWithIDGeneratorAndOrderIDs( } }() + if m.IsOpeningAuction() { + rejectStopOrders(types.StopOrderRejectionNotAllowedDuringOpeningAuction, fallsBelow, risesAbove) + return nil, common.ErrStopOrderNotAllowedDuringOpeningAuction + } + if !m.canTrade() { rejectStopOrders(types.StopOrderRejectionTradingNotAllowed, fallsBelow, risesAbove) return nil, common.ErrTradingNotAllowed @@ -1684,6 +1890,13 @@ func (m *Market) SubmitStopOrdersWithIDGeneratorAndOrderIDs( orderCnt++ } + if risesAbove != nil && fallsBelow != nil { + if risesAbove.Expiry.Expires() && fallsBelow.Expiry.Expires() && risesAbove.Expiry.ExpiresAt.Compare(*fallsBelow.Expiry.ExpiresAt) == 0 { + rejectStopOrders(types.StopOrderRejectionOCONotAllowedSameExpiryTime, fallsBelow, risesAbove) + return nil, common.ErrStopOrderNotAllowedSameExpiry + } + } + // now check if that party hasn't exceeded the max amount per market if m.stopOrders.CountForParty(party)+uint64(orderCnt) > m.maxStopOrdersPerParties.Uint64() { rejectStopOrders(types.StopOrderRejectionMaxStopOrdersPerPartyReached, fallsBelow, risesAbove) @@ -1732,6 +1945,27 @@ func (m *Market) SubmitStopOrdersWithIDGeneratorAndOrderIDs( m.stopOrderWouldTriggerAtSubmission(risesAbove) triggered := fallsBelowTriggered || risesAboveTriggered + // if the stop order links to a position, see if we are scaling the size + if fallsBelow != nil && fallsBelow.SizeOverrideSetting == types.StopOrderSizeOverrideSettingPosition { + if fallsBelow.SizeOverrideValue != nil { + if fallsBelow.SizeOverrideValue.PercentageSize.LessThanOrEqual(num.DecimalFromFloat(0.0)) || + fallsBelow.SizeOverrideValue.PercentageSize.GreaterThan(num.DecimalFromFloat(1.0)) { + rejectStopOrders(types.StopOrderRejectionLinkedPercentageInvalid, fallsBelow, risesAbove) + return nil, common.ErrStopOrderSizeOverridePercentageInvalid + } + } + } + + if risesAbove != nil && risesAbove.SizeOverrideSetting == types.StopOrderSizeOverrideSettingPosition { + if risesAbove.SizeOverrideValue != nil { + if risesAbove.SizeOverrideValue.PercentageSize.LessThanOrEqual(num.DecimalFromFloat(0.0)) || + risesAbove.SizeOverrideValue.PercentageSize.GreaterThan(num.DecimalFromFloat(1.0)) { + rejectStopOrders(types.StopOrderRejectionLinkedPercentageInvalid, fallsBelow, risesAbove) + return nil, common.ErrStopOrderSizeOverridePercentageInvalid + } + } + } + // if we are in an auction // or no order is triggered // let's just submit it straight away @@ -1793,7 +2027,7 @@ func (m *Market) poolStopOrders( func (m *Market) stopOrderWouldTriggerAtSubmission( stopOrder *types.StopOrder, ) bool { - if m.lastTradedPrice == nil || stopOrder == nil || stopOrder.Trigger.IsTrailingPercenOffset() { + if m.lastTradedPrice == nil || stopOrder == nil || stopOrder.Trigger.IsTrailingPercentOffset() { return false } @@ -1819,11 +2053,13 @@ func (m *Market) triggerStopOrders( if m.lastTradedPrice == nil { return nil } - lastTradedPrice := m.priceToMarketPrecision(m.getLastTradedPrice()) triggered, cancelled := m.stopOrders.PriceUpdated(lastTradedPrice) - if len(triggered) <= 0 { + // See if there are any linked orders that are the wrong direction + cancelled = append(cancelled, m.stopOrders.CheckDirection(m.position)...) + + if len(triggered) <= 0 && len(cancelled) <= 0 { return nil } @@ -1843,6 +2079,10 @@ func (m *Market) triggerStopOrders( m.broker.SendBatch(evts) + if len(triggered) <= 0 { + return nil + } + confirmations := m.submitStopOrders(ctx, triggered, types.StopOrderStatusTriggered, idgen) return append(m.triggerStopOrders(ctx, idgen), confirmations...) @@ -1933,6 +2173,10 @@ func (m *Market) submitOrder(ctx context.Context, order *types.Order) (*types.Or return nil, nil, err } + if err := m.position.ValidateOrder(order); err != nil { + return nil, nil, err + } + // Now that validation is handled, call the code to place the order orderConf, orderUpdates, err := m.submitValidatedOrder(ctx, order) if err == nil { @@ -1995,9 +2239,11 @@ func (m *Market) submitValidatedOrder(ctx context.Context, order *types.Order) ( // keep track of the eventual reduce only size order.ReduceOnlyAdjustRemaining(extraSize) } + marginMode := m.getMarginMode(order.Party) // Perform check and allocate margin unless the order is (partially) closing the party position - if !order.ReduceOnly && !pos.OrderReducesExposure(order) { + // NB: this is only done at this point for cross margin mode + if marginMode == types.MarginModeCrossMargin && !order.ReduceOnly && !pos.OrderReducesExposure(order) { if err := m.checkMarginForOrder(ctx, pos, order); err != nil { if m.log.GetLevel() <= logging.DebugLevel { m.log.Debug("Unable to check/add margin for party", @@ -2015,6 +2261,7 @@ func (m *Market) submitValidatedOrder(ctx context.Context, order *types.Order) ( // If we are not in an opening auction, apply fees var trades []*types.Trade + var fees events.FeesTransfer // we're not in auction (not opening, not any other auction if !m.as.InAuction() { // first we call the order book to evaluate auction triggers and get the list of trades @@ -2025,11 +2272,12 @@ func (m *Market) submitValidatedOrder(ctx context.Context, order *types.Order) ( } // try to apply fees on the trade - err = m.applyFees(ctx, order, trades) + fees, err = m.calcFees(trades) if err != nil { return nil, nil, m.unregisterAndReject(ctx, order, err) } } + passiveOrders := m.getPassiveOrdersCopy(order, trades) // if an auction was trigger, and we are a pegged order // or a liquidity order, let's return now. @@ -2072,11 +2320,65 @@ func (m *Market) submitValidatedOrder(ctx context.Context, order *types.Order) ( // the contains the fees information confirmation.Trades = trades + if marginMode == types.MarginModeIsolatedMargin { + // NB: this is the position with the trades included and the order sizes updated to remaining!!! + // NB: this is not touching the actual position from the position engine but is all done on a clone, so that + // in handle confirmation this will be done as per normal. + posWithTrades := pos.UpdateInPlaceOnTrades(m.log, order.Side, trades, order) + // First, check whether the order will trade, either fully or in part, immediately upon entry. If so: + // If the trade would increase the party's position, the required additional funds as specified in the Increasing Position section will be calculated. + // The total expected margin balance (current plus new funds) will then be compared to the maintenance margin for the expected position, + // if the margin balance would be less than maintenance, instead reject the order in it's entirety. + // If the margin will be greater than the maintenance margin their general account will be checked for sufficient funds. + // If they have sufficient, that amount will be moved into their margin account and the immediately matching portion of the order will trade. + // If they do not have sufficient, the order will be rejected in it's entirety for not meeting margin requirements. + // If the trade would decrease the party's position, that portion will trade and margin will be released as in the Decreasing Position. + // If the order is not persistent this is the end, if it is persistent any portion of the order which + // has not traded in step 1 will move to being placed on the order book. + if len(trades) > 0 { + if err := m.updateIsolatedMarginOnAggressor(ctx, posWithTrades, order, trades, false); err != nil { + if m.log.GetLevel() <= logging.DebugLevel { + m.log.Debug("Unable to check/add immediate trade margin for party", + logging.Order(*order), logging.Error(err)) + } + m.matching.RollbackConfirmation(confirmation, passiveOrders) + _ = m.unregisterAndReject( + ctx, order, types.OrderErrorIsolatedMarginCheckFailed) + m.matching.RemoveOrder(order.ID) + return nil, nil, common.ErrMarginCheckFailed + } + } + // now we need to check if the party has sufficient funds to cover the order margin for the remaining size + // if not the remaining order is cancelled. + // if successful the required order margin are transferred to the order margin account. + if err := m.updateIsolatedMarginOnOrder(ctx, posWithTrades, order); err != nil { + if m.log.GetLevel() <= logging.DebugLevel { + m.log.Debug("Unable to check/add margin for party", + logging.Order(*order), logging.Error(err)) + } + _ = m.unregisterAndReject( + ctx, order, types.OrderErrorMarginCheckFailed) + m.matching.RemoveOrder(order.ID) + return nil, nil, common.ErrMarginCheckFailed + } + } + + if fees != nil { + err = m.applyFees(ctx, order, fees) + if err != nil { + m.matching.RollbackConfirmation(confirmation, passiveOrders) + _ = m.unregisterAndReject( + ctx, order, types.OrderErrorMarginCheckFailed) + m.matching.RemoveOrder(order.ID) + return nil, nil, common.ErrMarginCheckFailed + } + } + // Send out the order update here as handling the confirmation message // below might trigger an action that can change the order details. m.broker.Send(events.NewOrderEvent(ctx, order)) - orderUpdates := m.handleConfirmation(ctx, confirmation) + orderUpdates := m.handleConfirmation(ctx, confirmation, nil) return confirmation, orderUpdates, nil } @@ -2113,17 +2415,20 @@ func (m *Market) checkPriceAndGetTrades(ctx context.Context, order *types.Order) return trades, nil } -func (m *Market) addParty(party string) { - if _, ok := m.parties[party]; !ok { +// addParty returns true if the party is new to the market, false otherwise. +func (m *Market) addParty(party string) bool { + _, registered := m.parties[party] + if !registered { m.parties[party] = struct{}{} } + return !registered } -func (m *Market) applyFees(ctx context.Context, order *types.Order, trades []*types.Trade) error { +func (m *Market) calcFees(trades []*types.Trade) (events.FeesTransfer, error) { // if we have some trades, let's try to get the fees if len(trades) <= 0 || m.as.IsOpeningAuction() { - return nil + return nil, nil } // first we get the fees for these trades @@ -2142,10 +2447,14 @@ func (m *Market) applyFees(ctx context.Context, order *types.Order, trades []*ty } if err != nil { - return err + return nil, err } + return fees, nil +} +func (m *Market) applyFees(ctx context.Context, order *types.Order, fees events.FeesTransfer) error { var transfers []*types.LedgerMovement + var err error if !m.as.InAuction() { transfers, err = m.collateral.TransferFeesContinuousTrading(ctx, m.GetID(), m.settlementAsset, fees) @@ -2206,7 +2515,7 @@ func (m *Market) handleConfirmationPassiveOrders( } } -func (m *Market) handleConfirmation(ctx context.Context, conf *types.OrderConfirmation) []*types.Order { +func (m *Market) handleConfirmation(ctx context.Context, conf *types.OrderConfirmation, tradeT *types.TradeType) []*types.Order { // When re-submitting liquidity order, it happen that the pricing is putting // the order at a price which makes it uncross straight away. // then triggering this handleConfirmation flow, etc. @@ -2238,13 +2547,47 @@ func (m *Market) handleConfirmation(ctx context.Context, conf *types.OrderConfir conf.TradedValue().ToDecimal().Div(m.positionFactor)) for idx, trade := range conf.Trades { trade.SetIDs(m.idgen.NextID(), conf.Order, conf.PassiveOrdersAffected[idx]) + if tradeT != nil { + trade.Type = *tradeT + } else { + m.markPriceCalculator.NewTrade(trade) + if m.internalCompositePriceCalculator != nil { + m.internalCompositePriceCalculator.NewTrade(trade) + } + } tradeEvts = append(tradeEvts, events.NewTradeEvent(ctx, *trade)) - for _, mp := range m.position.Update(ctx, trade, conf.PassiveOrdersAffected[idx], conf.Order) { m.marketActivityTracker.RecordPosition(m.settlementAsset, mp.Party(), m.mkt.ID, mp.Size(), trade.Price, m.positionFactor, m.timeService.GetTimeNow()) } - + // if the passive party is in isolated margin we need to update the margin on the position change + if m.getMarginMode(conf.PassiveOrdersAffected[idx].Party) == types.MarginModeIsolatedMargin { + pos, _ := m.position.GetPositionByPartyID(conf.PassiveOrdersAffected[idx].Party) + err := m.updateIsolatedMarginsOnPositionChange(ctx, pos, conf.PassiveOrdersAffected[idx], trade) + if err != nil { + // if the evaluation after the position update means the party has insufficient funds, all of their orders need to be stopped + // but first we need to transfer the margins from the order margin account. + if err == risk.ErrInsufficientFundsForMaintenanceMargin { + m.handleIsolatedMarginInsufficientOrderMargin(ctx, conf.PassiveOrdersAffected[idx].Party) + } + m.log.Error("failed to update isolated margin on position change", logging.Error(err)) + } + } + // if we're uncrossing an auction then we need to do this also for parties with isolated margin on the "aggressive" side + if m.as.InAuction() { + aggressor := conf.Order.Party + if m.getMarginMode(aggressor) == types.MarginModeIsolatedMargin { + aggressorOrder := conf.Order + pos, _ := m.position.GetPositionByPartyID(aggressor) + err := m.updateIsolatedMarginsOnPositionChange(ctx, pos, aggressorOrder, trade) + if err != nil { + m.log.Error("failed to update isolated margin on position change", logging.Error(err)) + if err == risk.ErrInsufficientFundsForMaintenanceMargin { + m.handleIsolatedMarginInsufficientOrderMargin(ctx, conf.PassiveOrdersAffected[idx].Party) + } + } + } + } // Record open interest change if err := m.tsCalc.RecordOpenInterest(m.position.GetOpenInterest(), m.timeService.GetTimeNow()); err != nil { m.log.Debug("unable record open interest", @@ -2258,7 +2601,7 @@ func (m *Market) handleConfirmation(ctx context.Context, conf *types.OrderConfir aggressor := conf.Order.Party if quantum, err := m.collateral.GetAssetQuantum(m.settlementAsset); err == nil && !quantum.IsZero() { n, _ := num.UintFromDecimal(tradedValue.ToDecimal().Div(quantum)) - m.marketActivityTracker.RecordNotionalTakerVolume(aggressor, n) + m.marketActivityTracker.RecordNotionalTakerVolume(m.mkt.ID, aggressor, n) } } m.feeSplitter.AddTradeValue(tradedValue) @@ -2278,6 +2621,7 @@ func (m *Market) handleConfirmation(ctx context.Context, conf *types.OrderConfir func (m *Market) confirmMTM(ctx context.Context, skipMargin bool) { // now let's get the transfers for MTM settlement mp := m.getCurrentMarkPrice() + m.liquidation.UpdateMarkPrice(mp.Clone()) evts := m.position.UpdateMarkPrice(mp) settle := m.settlement.SettleMTM(ctx, mp, evts) @@ -2285,14 +2629,9 @@ func (m *Market) confirmMTM(ctx context.Context, skipMargin bool) { m.recordPositionActivity(t.Transfer()) } - // let the product know about the mark-price, incase its the sort of product that cares - if m.perp && m.markPrice != nil { - m.tradableInstrument.Instrument.Product.SubmitDataPoint(ctx, mp, m.timeService.GetTimeNow().UnixNano()) - } - // Only process collateral and risk once per order, not for every trade - margins := m.collateralAndRisk(ctx, settle) - orderUpdates := m.handleRiskEvts(ctx, margins) + margins, isolatedMarginPartiesToClose := m.collateralAndRisk(ctx, settle) + orderUpdates := m.handleRiskEvts(ctx, margins, isolatedMarginPartiesToClose) // orders updated -> check reference moves // force check @@ -2304,10 +2643,11 @@ func (m *Market) confirmMTM(ctx context.Context, skipMargin bool) { } } -func (m *Market) handleRiskEvts(ctx context.Context, margins []events.Risk) []*types.Order { +func (m *Market) handleRiskEvts(ctx context.Context, margins []events.Risk, isolatedMargin []events.Risk) []*types.Order { if len(margins) == 0 { return nil } + isolatedForCloseout := m.collateral.IsolatedMarginUpdate(isolatedMargin) transfers, closed, bondPenalties, err := m.collateral.MarginUpdate(ctx, m.GetID(), margins) if err != nil { m.log.Error("margin update had issues", logging.Error(err)) @@ -2343,18 +2683,13 @@ func (m *Market) handleRiskEvts(ctx context.Context, margins []events.Risk) []*t closed = closedRecalculated } } + closed = append(closed, isolatedForCloseout...) if len(closed) == 0 { m.updateLiquidityFee(ctx) return nil } var orderUpdates []*types.Order - upd, err := m.resolveClosedOutParties( - ctx, closed) - if err != nil { - m.log.Error("unable to closed out parties", - logging.String("market-id", m.GetID()), - logging.Error(err)) - } + upd := m.resolveClosedOutParties(ctx, closed) if len(upd) > 0 { orderUpdates = append(orderUpdates, upd...) } @@ -2366,8 +2701,22 @@ func (m *Market) handleRiskEvts(ctx context.Context, margins []events.Risk) []*t // updateLiquidityFee computes the current LiquidityProvision fee and updates // the fee engine. func (m *Market) updateLiquidityFee(ctx context.Context) { - stake := m.getTargetStake() - fee := m.liquidityEngine.ProvisionsPerParty().FeeForTarget(stake) + var fee num.Decimal + provisions := m.liquidityEngine.ProvisionsPerParty() + + switch m.mkt.Fees.LiquidityFeeSettings.Method { + case types.LiquidityFeeMethodConstant: + if len(provisions) != 0 { + fee = m.mkt.Fees.LiquidityFeeSettings.FeeConstant + } + case types.LiquidityFeeMethodMarginalCost: + fee = provisions.FeeForTarget(m.getTargetStake()) + case types.LiquidityFeeMethodWeightedAverage: + fee = provisions.FeeForWeightedAverage() + default: + m.log.Panic("unknown liquidity fee method") + } + if !fee.Equals(m.getLiquidityFee()) { m.fee.SetLiquidityFee(fee) m.setLiquidityFee(fee) @@ -2389,9 +2738,9 @@ func (m *Market) getLiquidityFee() num.Decimal { // need to be closed out -> the network buys/sells the open volume, and trades with the rest of the network // this flow is similar to the SubmitOrder bit where trades are made, with fewer checks (e.g. no MTM settlement, no risk checks) // pass in the order which caused parties to be distressed. -func (m *Market) resolveClosedOutParties(ctx context.Context, distressedMarginEvts []events.Margin) ([]*types.Order, error) { +func (m *Market) resolveClosedOutParties(ctx context.Context, distressedMarginEvts []events.Margin) []*types.Order { if len(distressedMarginEvts) == 0 { - return nil, nil + return nil } timer := metrics.NewTimeCounter(m.mkt.ID, "market", "resolveClosedOutParties") defer timer.EngineTimeCounterAdd() @@ -2409,7 +2758,10 @@ func (m *Market) resolveClosedOutParties(ctx context.Context, distressedMarginEv logging.PartyID(v.Party()), logging.MarketID(m.GetID())) } - distressedPos = append(distressedPos, v) + // we're not removing orders for isolated margin closed out parties + if m.getMarginMode(v.Party()) == types.MarginModeCrossMargin { + distressedPos = append(distressedPos, v) + } } rmorders, err := m.matching.RemoveDistressedOrders(distressedPos) @@ -2487,163 +2839,19 @@ func (m *Market) resolveClosedOutParties(ctx context.Context, distressedMarginEv // if no position are meant to be closed, just return now. if len(closed) <= 0 { - return orderUpdates, nil - } - - // we only need the MarketPosition events here, and rather than changing all the calls - // we can just keep the MarketPosition bit - closedMPs := make([]events.MarketPosition, 0, len(closed)) - closedParties := make([]string, 0, len(closed)) - // get the actual position, so we can work out what the total position of the market is going to be - var networkPos int64 - for _, pos := range closed { - networkPos += pos.Size() - closedMPs = append(closedMPs, pos) - closedParties = append(closedParties, pos.Party()) - } - if networkPos == 0 { - m.log.Warn("Network positions is 0 after closing out parties, nothing more to do", - logging.String("market-id", m.GetID())) - m.finalizePartiesCloseOut(ctx, closed, closedMPs) - return orderUpdates, nil - } - // network order - // @TODO this order is more of a placeholder than an actual final version - // of the network order we'll be using - size := uint64(networkPos) - if networkPos < 0 { - size = uint64(-networkPos) - } - - no := types.Order{ - MarketID: m.GetID(), - Remaining: size, - Status: types.OrderStatusActive, - Party: types.NetworkParty, // network is not a party as such - Side: types.SideSell, // assume sell, price is zero in that case anyway - CreatedAt: now.UnixNano(), - Reference: "LS", // liquidity sourcing, reference the order which caused the problem - TimeInForce: types.OrderTimeInForceFOK, // this is an all-or-nothing order, so TIME_IN_FORCE == FOK - Type: types.OrderTypeNetwork, - Price: num.UintZero(), - } - no.Size = no.Remaining - - no.ID = m.idgen.NextID() - // we need to buy, specify side + max price - if networkPos < 0 { - no.Side = types.SideBuy - } - // Send the aggressive order into matching engine - confirmation, err := m.matching.SubmitOrder(&no) - if err != nil { - // we can safely panic here, only possibility of failure - // with the orderbook is in case of order validation, it should - // not be possible for us to submit an invalid order at this - // point, and an invalid order would be a code error then. - m.log.Panic("Failure after submitting order to matching engine", - logging.Order(no), - logging.Error(err)) - } - // Whether we were able to uncross the network order or not, we have to update the positions - // any closedParties element that wasn't previously marked as distressed should be marked as now - // being distressed. Any previously distressed positions that are no longer distressed - // should also be updated. - // If the network order uncrosses, we can ignore the distressed parties (they are closed out) - // but the safe parties should still be sent out. - dp, sp := m.position.MarkDistressed(closedParties) - // FIXME(j): this is a temporary measure for the case where we do not have enough orders - // in the book to 0 out the positions. - // in this case we will just return now, cutting off the position resolution - // this means that party still being distressed will stay distressed, - // then when a new order is placed, the distressed parties will go again through positions resolution - // and if the volume of the book is acceptable, we will then process positions resolutions - if no.Remaining == no.Size { - // it is possible that we pass through here with the same distressed parties as before, no need - // to send the event if both distressed and safe parties slices are nil - if len(dp) != 0 || len(sp) != 0 { - devt := events.NewDistressedPositionsEvent(ctx, m.GetID(), dp, sp) - m.broker.Send(devt) - } - return orderUpdates, common.ErrNotEnoughVolumeToZeroOutNetworkOrder - } - // if we have any distressed positions that now no longer are distressed, emit the event - // no point in sending an event unless there's data - if len(sp) > 0 { - devt := events.NewDistressedPositionsEvent(ctx, m.GetID(), nil, sp) - m.broker.Send(devt) - } - - // @NOTE: At this point, the network order was updated by the orderbook - // the price field now contains the average trade price at which the order was fulfilled - m.broker.Send(events.NewOrderEvent(ctx, &no)) - - m.handleConfirmationPassiveOrders(ctx, confirmation) - - // also add the passive orders from the book into the list - // of updated orders to send to liquidity engine - orderUpdates = append(orderUpdates, confirmation.PassiveOrdersAffected...) - - // pay the fees now - fees, distressedPartiesFees := m.fee.CalculateFeeForPositionResolution( - confirmation.Trades, closedMPs) - - tresps, err := m.collateral.TransferFees(ctx, m.GetID(), m.settlementAsset, fees) - if err != nil { - // FIXME(): we may figure a better error handling in here - m.log.Error("unable to transfer fees for positions resolutions", - logging.Error(err), - logging.String("market-id", m.GetID())) - return orderUpdates, err - } - // send transfer to buffer - if len(tresps) > 0 { - m.broker.Send(events.NewLedgerMovements(ctx, tresps)) + return orderUpdates } - if len(confirmation.Trades) > 0 { - // Insert all trades resulted from the executed order - tradeEvts := make([]events.Event, 0, len(confirmation.Trades)) - // get total traded volume - tradedValue, _ := num.UintFromDecimal( - confirmation.TradedValue().ToDecimal().Div(m.positionFactor)) - for idx, trade := range confirmation.Trades { - trade.SetIDs(m.idgen.NextID(), &no, confirmation.PassiveOrdersAffected[idx]) - - // setup the type of the trade to network - // this trade did happen with a GOOD trader to - // 0 out the BAD trader position - trade.Type = types.TradeTypeNetworkCloseOutGood - tradeEvts = append(tradeEvts, events.NewTradeEvent(ctx, *trade)) - - // Update positions - this is a special trade involving the network as party - // so rather than checking this every time we call Update, call special UpdateNetwork - m.position.UpdateNetwork(ctx, trade, confirmation.PassiveOrdersAffected[idx]) - // record the updated passive side's position - partyPos, _ := m.position.GetPositionByPartyID(confirmation.PassiveOrdersAffected[idx].Party) - m.marketActivityTracker.RecordPosition(m.settlementAsset, confirmation.PassiveOrdersAffected[idx].Party, m.mkt.ID, partyPos.Size(), trade.Price, m.positionFactor, m.timeService.GetTimeNow()) - - if err := m.tsCalc.RecordOpenInterest(m.position.GetOpenInterest(), now); err != nil { - m.log.Debug("unable record open interest", - logging.String("market-id", m.GetID()), - logging.Error(err)) - } - - m.settlement.AddTrade(trade) - } - m.feeSplitter.AddTradeValue(tradedValue) - m.marketActivityTracker.AddValueTraded(m.settlementAsset, m.mkt.ID, tradedValue) - m.broker.SendBatch(tradeEvts) + currentMP := m.getCurrentMarkPrice() + mCmp := m.priceToMarketPrecision(currentMP) + closedMPs, closedParties, _ := m.liquidation.ClearDistressedParties(ctx, m.idgen, closed, currentMP, mCmp) + dp, sp := m.position.MarkDistressed(closedParties) + if len(dp) > 0 || len(sp) > 0 { + m.broker.Send(events.NewDistressedPositionsEvent(ctx, m.GetID(), dp, sp)) } - - m.zeroOutNetwork(ctx, closedMPs, &no, distressedPartiesFees) - - // swipe all accounts and stuff m.finalizePartiesCloseOut(ctx, closed, closedMPs) - - m.confirmMTM(ctx, false) - - return orderUpdates, nil + m.zeroOutNetwork(ctx, closedParties) + return orderUpdates } func (m *Market) finalizePartiesCloseOut( @@ -2655,7 +2863,14 @@ func (m *Market) finalizePartiesCloseOut( // from settlement engine first m.settlement.RemoveDistressed(ctx, closed) // then from positions - closedMPs = m.position.RemoveDistressed(closedMPs) + toRemoveFromPosition := []events.MarketPosition{} + for _, mp := range closedMPs { + if m.getMarginMode(mp.Party()) == types.MarginModeCrossMargin || (mp.Buy() == 0 && mp.Sell() == 0) { + toRemoveFromPosition = append(toRemoveFromPosition, mp) + } + } + m.position.RemoveDistressed(toRemoveFromPosition) + // but we want to update the market activity tracker on their 0 position for all of the closed parties for _, mp := range closedMPs { // record the updated closed out party's position m.marketActivityTracker.RecordPosition(m.settlementAsset, mp.Party(), m.mkt.ID, 0, mp.Price(), m.positionFactor, m.timeService.GetTimeNow()) @@ -2663,7 +2878,7 @@ func (m *Market) finalizePartiesCloseOut( // finally remove from collateral (moving funds where needed) movements, err := m.collateral.RemoveDistressed( - ctx, closedMPs, m.GetID(), m.settlementAsset) + ctx, closedMPs, m.GetID(), m.settlementAsset, m.useGeneralAccountForMarginSearch) if err != nil { m.log.Panic( "Failed to remove distressed accounts cleanly", @@ -2676,129 +2891,65 @@ func (m *Market) finalizePartiesCloseOut( ctx, []*types.LedgerMovement{movements}), ) } + + for _, mp := range closedMPs { + if m.getMarginMode(mp.Party()) == types.MarginModeIsolatedMargin || (mp.Buy() != 0 && mp.Sell() != 0) { + pp, _ := m.position.GetPositionByPartyID(mp.Party()) + if pp == nil { + continue + } + marketObservable, evt, increment, _, marginFactor, orders, err := m.getIsolatedMarginContext(pp, nil) + if err != nil { + m.log.Panic("failed to get isolated margin context") + } + _, err = m.risk.CheckMarginInvariants(ctx, evt, marketObservable, increment, orders, marginFactor) + if err == risk.ErrInsufficientFundsForOrderMargin { + m.log.Debug("party in isolated margin mode has insufficient order margin", logging.String("party", mp.Party())) + m.handleIsolatedMarginInsufficientOrderMargin(ctx, mp.Party()) + } + } + } } -func (m *Market) zeroOutNetwork(ctx context.Context, parties []events.MarketPosition, settleOrder *types.Order, fees map[string]*types.Fee) { +func (m *Market) zeroOutNetwork(ctx context.Context, parties []string) { timer := metrics.NewTimeCounter(m.mkt.ID, "market", "zeroOutNetwork") defer timer.EngineTimeCounterAdd() // ensure an original price is set - if settleOrder.OriginalPrice == nil { - settleOrder.OriginalPrice = num.UintZero().Div(settleOrder.Price, m.priceFactor) - } marketID := m.GetID() now := m.timeService.GetTimeNow().UnixNano() - order := types.Order{ - MarketID: marketID, - Status: types.OrderStatusFilled, - Party: types.NetworkParty, - Price: settleOrder.Price.Clone(), - OriginalPrice: settleOrder.OriginalPrice.Clone(), - CreatedAt: now, - Reference: "close-out distressed", - TimeInForce: types.OrderTimeInForceFOK, // this is an all-or-nothing order, so TIME_IN_FORCE == FOK - Type: types.OrderTypeNetwork, - } + + evts := make([]events.Event, 0, len(parties)) marginLevels := types.MarginLevels{ - MarketID: m.mkt.GetID(), + MarketID: marketID, Asset: m.settlementAsset, Timestamp: now, } - - tradeEvts := make([]events.Event, 0, len(parties)) - for _, party := range parties { - tSide, nSide := types.SideSell, types.SideSell // one of them will have to sell - if party.Size() < 0 { - tSide = types.SideBuy - } else { - nSide = types.SideBuy - } - tSize := party.Size() - order.Size = uint64(tSize) - if tSize < 0 { - order.Size = uint64(-tSize) - } - - // set order fields (network order) - order.Remaining = 0 - order.Side = nSide - order.Status = types.OrderStatusFilled // An order with no remaining must be filled - - order.ID = m.idgen.NextID() - - // this is the party order - partyOrder := types.Order{ - MarketID: marketID, - Size: order.Size, - Remaining: 0, - Status: types.OrderStatusFilled, - Party: party.Party(), - Side: tSide, // assume sell, price is zero in that case anyway - Price: settleOrder.Price.Clone(), // average price - OriginalPrice: settleOrder.OriginalPrice.Clone(), - CreatedAt: now, - Reference: fmt.Sprintf("distressed-%s", party.Party()), - TimeInForce: types.OrderTimeInForceFOK, // this is an all-or-nothing order, so TIME_IN_FORCE == FOK - Type: types.OrderTypeNetwork, - } - - partyOrder.ID = m.idgen.NextID() - - // store the party order, too - m.broker.Send(events.NewOrderEvent(ctx, &partyOrder)) - m.broker.Send(events.NewOrderEvent(ctx, &order)) - - // now let's create the trade between the party and network - var ( - buyOrder, sellOrder *types.Order - buySideFee, sellSideFee *types.Fee - ) - if order.Side == types.SideBuy { - buyOrder = &order - sellOrder = &partyOrder - sellSideFee = fees[party.Party()] - } else { - sellOrder = &order - buyOrder = &partyOrder - buySideFee = fees[party.Party()] - } - - trade := types.Trade{ - ID: m.idgen.NextID(), - MarketID: partyOrder.MarketID, - Price: partyOrder.Price.Clone(), - MarketPrice: partyOrder.OriginalPrice.Clone(), - Size: partyOrder.Size, - Aggressor: order.Side, // we consider network to be aggressor - BuyOrder: buyOrder.ID, - SellOrder: sellOrder.ID, - Buyer: buyOrder.Party, - Seller: sellOrder.Party, - Timestamp: partyOrder.CreatedAt, - Type: types.TradeTypeNetworkCloseOutBad, - SellerFee: sellSideFee, - BuyerFee: buySideFee, - } - tradeEvts = append(tradeEvts, events.NewTradeEvent(ctx, trade)) - - // 0 out margins levels for this trader - marginLevels.Party = party.Party() - m.broker.Send(events.NewMarginLevelsEvent(ctx, marginLevels)) - - if m.log.GetLevel() == logging.DebugLevel { - m.log.Debug("party closed-out with success", - logging.String("party-id", party.Party()), - logging.String("market-id", m.GetID())) + for _, p := range parties { + marginLevels.Party = p + marginLevels.MarginMode = m.getMarginMode(p) + marginLevels.MarginFactor = m.getMarginFactor(p) + if marginLevels.MarginMode == types.MarginModeIsolatedMargin { + // for isolated margin closed out for position, there may still be a valid order margin + marginLevels.OrderMargin = m.risk.CalcOrderMarginsForClosedOutParty(m.matching.GetOrdersPerParty(p), marginLevels.MarginFactor) } + evts = append(evts, events.NewMarginLevelsEvent(ctx, marginLevels)) } - if len(tradeEvts) > 0 { - m.broker.SendBatch(tradeEvts) + if len(evts) > 0 { + m.broker.SendBatch(evts) } } func (m *Market) recheckMargin(ctx context.Context, pos []events.MarketPosition) { - risk := m.updateMargin(ctx, pos) + posCrossMargin := make([]events.MarketPosition, 0, len(pos)) + + for _, mp := range pos { + if m.getMarginMode(mp.Party()) == types.MarginModeCrossMargin { + posCrossMargin = append(posCrossMargin, mp) + } + } + risk := m.updateMargin(ctx, posCrossMargin) if len(risk) == 0 { return } @@ -2818,6 +2969,38 @@ func (m *Market) checkMarginForOrder(ctx context.Context, pos *positions.MarketP return m.transferMargins(ctx, risk, closed) } +// updateIsolatedMarginOnAggressor is called when a new or amended order is matched immediately upon submission. +// it checks that new margin requirements can be satisfied and if so transfers the margin from the general account to the margin account. +func (m *Market) updateIsolatedMarginOnAggressor(ctx context.Context, pos *positions.MarketPosition, order *types.Order, trades []*types.Trade, isAmend bool) error { + marketObservable, mpos, increment, _, marginFactor, orders, err := m.getIsolatedMarginContext(pos, order) + if err != nil { + return err + } + risk, err := m.risk.UpdateIsolatedMarginOnAggressor(ctx, mpos, marketObservable, increment, orders, trades, marginFactor, order.Side, isAmend) + if err != nil { + return err + } + if risk == nil { + return nil + } + return m.transferMargins(ctx, risk, nil) +} + +func (m *Market) updateIsolatedMarginOnOrder(ctx context.Context, mpos *positions.MarketPosition, order *types.Order) error { + marketObservable, pos, increment, auctionPrice, marginFactor, orders, err := m.getIsolatedMarginContext(mpos, order) + if err != nil { + return err + } + risk, err := m.risk.UpdateIsolatedMarginOnOrder(ctx, pos, orders, marketObservable, auctionPrice, increment, marginFactor) + if err != nil { + return err + } + if risk == nil { + return nil + } + return m.transferMargins(ctx, []events.Risk{risk}, nil) +} + func (m *Market) checkMarginForAmendOrder(ctx context.Context, existingOrder *types.Order, amendedOrder *types.Order) error { origPos, ok := m.position.GetPositionByPartyID(existingOrder.Party) if !ok { @@ -2844,16 +3027,16 @@ func (m *Market) setLastTradedPrice(trade *types.Trade) { // this function handles moving money after settle MTM + risk margin updates // but does not move the money between party accounts (ie not to/from margin accounts after risk). -func (m *Market) collateralAndRisk(ctx context.Context, settle []events.Transfer) []events.Risk { +func (m *Market) collateralAndRisk(ctx context.Context, settle []events.Transfer) ([]events.Risk, []events.Risk) { timer := metrics.NewTimeCounter(m.mkt.ID, "market", "collateralAndRisk") defer timer.EngineTimeCounterAdd() - evts, response, err := m.collateral.MarkToMarket(ctx, m.GetID(), settle, m.settlementAsset) + evts, response, err := m.collateral.MarkToMarket(ctx, m.GetID(), settle, m.settlementAsset, m.useGeneralAccountForMarginSearch) if err != nil { m.log.Error( "Failed to process mark to market settlement (collateral)", logging.Error(err), ) - return nil + return nil, nil } // sending response to buffer if len(response) > 0 { @@ -2863,12 +3046,32 @@ func (m *Market) collateralAndRisk(ctx context.Context, settle []events.Transfer // let risk engine do its thing here - it returns a slice of money that needs // to be moved to and from margin accounts increment := m.tradableInstrument.Instrument.Product.GetMarginIncrease(m.timeService.GetTimeNow().UnixNano()) - riskUpdates := m.risk.UpdateMarginsOnSettlement(ctx, evts, m.getCurrentMarkPrice(), increment) - if len(riskUpdates) == 0 { - return nil + + // split to cross and isolated margins to handle separately + crossEvts := make([]events.Margin, 0, len(evts)) + isolatedEvts := make([]events.Margin, 0, len(evts)) + for _, evt := range evts { + if m.getMarginMode(evt.Party()) == types.MarginModeCrossMargin { + crossEvts = append(crossEvts, evt) + } else { + isolatedEvts = append(isolatedEvts, evt) + } + } + + crossRiskUpdates := m.risk.UpdateMarginsOnSettlement(ctx, crossEvts, m.getCurrentMarkPrice(), increment) + isolatedMarginPartiesToClose := []events.Risk{} + for _, evt := range isolatedEvts { + mrgns, err := m.risk.CheckMarginInvariants(ctx, evt, m.getMarketObservable(nil), increment, m.matching.GetOrdersPerParty(evt.Party()), m.getMarginFactor(evt.Party())) + if err == risk.ErrInsufficientFundsForMaintenanceMargin { + m.log.Debug("party in isolated margin mode has insufficient margin", logging.String("party", evt.Party())) + isolatedMarginPartiesToClose = append(isolatedMarginPartiesToClose, mrgns) + } } - return riskUpdates + // if len(crossRiskUpdates) == 0 { + // return nil, isolatedMarginPartiesToClose + // } + return crossRiskUpdates, isolatedMarginPartiesToClose } func (m *Market) CancelAllStopOrders(ctx context.Context, partyID string) error { @@ -3069,6 +3272,15 @@ func (m *Market) cancelOrder(ctx context.Context, partyID, orderID string) (*typ order.UpdatedAt = m.timeService.GetTimeNow().UnixNano() m.broker.Send(events.NewOrderEvent(ctx, order)) + // if the order was found in the book and we're in isolated margin we need to update the + // order margin + if foundOnBook && m.getMarginMode(partyID) == types.MarginModeIsolatedMargin { + pos, _ := m.position.GetPositionByPartyID(partyID) + if err := m.updateIsolatedMarginOnOrder(ctx, pos, order); err != nil { + m.log.Panic("failed to update order margin after order cancellation", logging.Order(order), logging.String("party", pos.Party())) + } + } + return &types.OrderCancellationConfirmation{Order: order}, nil } @@ -3102,6 +3314,23 @@ func (m *Market) AmendOrder( return m.AmendOrderWithIDGenerator(ctx, orderAmendment, party, idgen) } +// handleIsolatedMarginInsufficientOrderMargin stops all party orders +// Upon position/order update if there are insufficient funds in the order margin, all open orders are stopped and margin re-evaluated. +func (m *Market) handleIsolatedMarginInsufficientOrderMargin(ctx context.Context, party string) { + orders := m.matching.GetOrdersPerParty(party) + for _, o := range orders { + if !o.IsFinished() { + m.matching.RemoveOrder(o.ID) + m.unregisterAndReject(ctx, o, types.OrderErrorIsolatedMarginCheckFailed) + } + // TODO is there anywhere else that this order needs to be removed from? + } + pos, _ := m.position.GetPositionByPartyID(party) + if err := m.updateIsolatedMarginOnOrder(ctx, pos, nil); err != nil { + m.log.Panic("failed to release margin for party with insufficient order margin", logging.String("party", party)) + } +} + func (m *Market) AmendOrderWithIDGenerator( ctx context.Context, orderAmendment *types.OrderAmendment, @@ -3124,6 +3353,9 @@ func (m *Market) AmendOrderWithIDGenerator( conf, updatedOrders, err := m.amendOrder(ctx, orderAmendment, party) if err != nil { + if m.getMarginMode(party) == types.MarginModeIsolatedMargin && err == common.ErrMarginCheckFailed { + m.handleIsolatedMarginInsufficientOrderMargin(ctx, party) + } return nil, err } @@ -3212,6 +3444,10 @@ func (m *Market) amendOrder( return nil, nil, err } + if err := m.position.ValidateAmendOrder(existingOrder, amendedOrder); err != nil { + return nil, nil, err + } + // We do this first, just in case the party would also have // change the expiry, and that would have been catched by // the follow up checks, so we do not insert a non-existing @@ -3347,6 +3583,7 @@ func (m *Market) amendOrder( if err := m.checkMarginForAmendOrder(ctx, existingOrder, amendedOrder); err != nil { return nil, nil, err } + // we were parked, need to unpark m.peggedOrders.Unpark(amendedOrder.ID) return m.submitValidatedOrder(ctx, amendedOrder) @@ -3375,16 +3612,18 @@ func (m *Market) amendOrder( // will be updated later on for sure. // always update margin, even for price/size decrease - if err = m.checkMarginForOrder(ctx, pos, amendedOrder); err != nil { - // Undo the position registering - _ = m.position.AmendOrder(ctx, amendedOrder, existingOrder) + if m.getMarginMode(party) == types.MarginModeCrossMargin { + if err = m.checkMarginForOrder(ctx, pos, amendedOrder); err != nil { + // Undo the position registering + _ = m.position.AmendOrder(ctx, amendedOrder, existingOrder) - if m.log.GetLevel() == logging.DebugLevel { - m.log.Debug("Unable to check/add margin for party", - logging.String("market-id", m.GetID()), - logging.Error(err)) + if m.log.GetLevel() == logging.DebugLevel { + m.log.Debug("Unable to check/add margin for party", + logging.String("market-id", m.GetID()), + logging.Error(err)) + } + return nil, nil, common.ErrMarginCheckFailed } - return nil, nil, common.ErrMarginCheckFailed } icebergSizeIncrease := false @@ -3408,9 +3647,19 @@ func (m *Market) amendOrder( if expiryChange || sizeDecrease || timeInForceChange || icebergSizeIncrease { ret := m.orderAmendInPlace(existingOrder, amendedOrder) if sizeDecrease { - // ensure we release excess if party reduced the size of their order - m.recheckMargin(ctx, m.position.GetPositionsByParty(amendedOrder.Party)) + if m.getMarginMode(party) == types.MarginModeCrossMargin { + // ensure we release excess if party reduced the size of their order + m.recheckMargin(ctx, m.position.GetPositionsByParty(amendedOrder.Party)) + } } + if m.getMarginMode(party) == types.MarginModeIsolatedMargin { + pos, _ := m.position.GetPositionByPartyID(amendedOrder.Party) + if err := m.updateIsolatedMarginOnOrder(ctx, pos, amendedOrder); err == risk.ErrInsufficientFundsForMarginInGeneralAccount { + m.log.Error("party has insufficient margin to cover the order change, going to cancel all orders for the party") + return nil, nil, common.ErrMarginCheckFailed + } + } + m.broker.Send(events.NewOrderEvent(ctx, amendedOrder)) return ret, nil, nil } @@ -3474,15 +3723,25 @@ func (m *Market) orderCancelReplace( ctx context.Context, existingOrder, newOrder *types.Order, ) (conf *types.OrderConfirmation, orders []*types.Order, err error) { + var fees events.FeesTransfer + defer func() { if err != nil { - // if an error happen, the order never hit the book, so we can + // if an error happens, the order never hit the book, so we can // just rollback the position size _ = m.position.AmendOrder(ctx, newOrder, existingOrder) + // we have an error, but a non-nil confirmation object meaning we updated the book, + // but the amend was rejected because of the margin check, we have to restore the book + // to its original state return } - - orders = m.handleConfirmation(ctx, conf) + if fees != nil { + if err = m.applyFees(ctx, newOrder, fees); err != nil { + _ = m.position.AmendOrder(ctx, newOrder, existingOrder) + return + } + } + orders = m.handleConfirmation(ctx, conf, nil) m.broker.Send(events.NewOrderEvent(ctx, conf.Order)) }() @@ -3506,6 +3765,16 @@ func (m *Market) orderCancelReplace( m.log.Panic("should never reach this point") } + if m.getMarginMode(newOrder.Party) == types.MarginModeIsolatedMargin { + pos, _ := m.position.GetPositionByPartyID(newOrder.Party) + if err := m.updateIsolatedMarginOnOrder(ctx, pos, newOrder); err != nil { + if m.log.GetLevel() <= logging.DebugLevel { + m.log.Debug("Unable to check/add margin for party", + logging.Order(*newOrder), logging.Error(err)) + } + return nil, nil, common.ErrMarginCheckFailed + } + } return conf, nil, nil } @@ -3521,10 +3790,12 @@ func (m *Market) orderCancelReplace( if err != nil { return nil, nil, errors.New("couldn't insert order in book") } + // get the orders in their current state + passiveOrders := m.getPassiveOrdersCopy(newOrder, trades) // try to apply fees on the trade - if err := m.applyFees(ctx, newOrder, trades); err != nil { - return nil, nil, errors.New("could not apply fees for order") + if fees, err = m.calcFees(trades); err != nil { + return nil, nil, errors.New("could not calculate fees for order") } // "hot-swap" of the orders @@ -3532,10 +3803,61 @@ func (m *Market) orderCancelReplace( if err != nil { m.log.Panic("unable to submit order", logging.Error(err)) } + // now set up a defer call to roll back the orderbook if needed + defer func() { + if err == nil || conf == nil { + return + } + // we have a confirmation and error, so margin check failed + // if we have passive orders here, that means the order was submitted to the book and traded + // check if the order uncrossed either partially or in full + if len(passiveOrders) > 0 { + // we failed the margin check, and the order uncrossed in full. We have to roll the orders back + if conf.Order.TrueRemaining() == 0 { + m.matching.RollbackConfirmation(conf, passiveOrders) + conf = nil // the confirmation cannot be used/relied on, the amend failed + return + } + // in this case, we have traded, but not the full amended order. The order is stopped + // but the trades must go through + err = nil + return + } + // conf should not be returned/used after this + conf = nil + }() // replace the trades in the confirmation to have // the ones with the fees embedded conf.Trades = trades + marginMode := m.getMarginMode(newOrder.Party) + if marginMode == types.MarginModeIsolatedMargin { + pos, _ := m.position.GetPositionByPartyID(newOrder.Party) + posWithTrades := pos + if len(trades) > 0 { + posWithTrades = pos.UpdateInPlaceOnTrades(m.log, newOrder.Side, trades, newOrder) + // NB: this is the position with the trades included and the order sizes updated to remaining!!! + if err = m.updateIsolatedMarginOnAggressor(ctx, posWithTrades, newOrder, trades, true); err != nil { + if m.log.GetLevel() <= logging.DebugLevel { + m.log.Debug("Unable to check/add immediate trade margin for party", + logging.Order(*newOrder), logging.Error(err)) + } + newOrder.Status = types.OrderStatusStopped + m.broker.Send(events.NewOrderEvent(ctx, newOrder)) + return conf, nil, common.ErrMarginCheckFailed + } + } + if err = m.updateIsolatedMarginOnOrder(ctx, posWithTrades, newOrder); err != nil { + if m.log.GetLevel() <= logging.DebugLevel { + m.log.Debug("Unable to check/add margin for party", + logging.Order(*newOrder), logging.Error(err)) + } + existingOrder.Status = newOrder.Status + newOrder.Status = types.OrderStatusStopped + m.broker.Send(events.NewOrderEvent(ctx, newOrder)) + return conf, nil, common.ErrMarginCheckFailed + } + } // if the order is not staying in the book, then we remove it // from the potential positions @@ -3546,6 +3868,21 @@ func (m *Market) orderCancelReplace( return conf, orders, nil } +func (m *Market) getPassiveOrdersCopy(order *types.Order, trades []*types.Trade) []*types.Order { + ret := make([]*types.Order, 0, len(trades)) + checkBuy := order.Side == types.SideSell + for _, t := range trades { + id := t.SellOrder + if checkBuy { + id = t.BuyOrder + } + if o, _ := m.matching.GetOrderByID(id); o != nil { + ret = append(ret, o.Clone()) + } + } + return ret +} + func (m *Market) orderAmendInPlace( originalOrder, amendOrder *types.Order, ) *types.OrderConfirmation { @@ -3588,10 +3925,49 @@ func (m *Market) submitStopOrders( ) []*types.OrderConfirmation { confirmations := []*types.OrderConfirmation{} evts := make([]events.Event, 0, len(stopOrders)) + toDelete := []*types.Order{} - // might contains both the triggered orders and the expired OCO + // might contain both the triggered orders and the expired OCO for _, v := range stopOrders { if v.Status == status { + if v.SizeOverrideSetting == types.StopOrderSizeOverrideSettingPosition { + // Update the order size to match that of the party's position + pos, _ := m.position.GetPositionByPartyID(v.Party) + + // Scale this size if required + scaledPos := num.DecimalFromInt64(pos.Size()) + if v.SizeOverrideValue != nil { + scaledPos = scaledPos.Mul(v.SizeOverrideValue.PercentageSize) + scaledPos = scaledPos.Round(0) + } + orderSize := scaledPos.IntPart() + + if orderSize == 0 { + // Nothing to do + m.log.Error("position is flat so no order required", + logging.StopOrderSubmission(v)) + continue + } else if orderSize > 0 { + // We are long so need to sell + if v.OrderSubmission.Side != types.SideSell { + // Don't send an order as we are the wrong direction + m.log.Error("triggered order is the wrong side to flatten position", + logging.StopOrderSubmission(v)) + continue + } + v.OrderSubmission.Size = uint64(orderSize) + } else { + // We are short so need to buy + if v.OrderSubmission.Side != types.SideBuy { + // Don't send an order as we are the wrong direction + m.log.Error("triggered order is the wrong side to flatten position", + logging.StopOrderSubmission(v)) + continue + } + v.OrderSubmission.Size = uint64(-orderSize) + } + } + conf, err := m.SubmitOrderWithIDGeneratorAndOrderID( ctx, v.OrderSubmission, v.Party, idgen, idgen.NextID(), false, ) @@ -3606,10 +3982,14 @@ func (m *Market) submitStopOrders( confirmations = append(confirmations, conf) } } - evts = append(evts, events.NewStopOrderEvent(ctx, v)) } + // Remove any referenced orders + for _, order := range toDelete { + m.CancelOrder(ctx, order.Party, order.ID, order.ID) + } + m.broker.SendBatch(evts) return confirmations @@ -3676,7 +4056,7 @@ func (m *Market) removeExpiredStopOrdersInContinuous( filteredOCO := []*types.StopOrder{} for _, v := range stopOrders { v.UpdatedAt = updatedAt - if v.Expiry.Expires() && *v.Expiry.ExpiryStrategy == types.StopOrderExpiryStrategySubmit && len(v.OCOLinkID) <= 0 { + if v.Status == types.StopOrderStatusExpired && v.Expiry.Expires() && *v.Expiry.ExpiryStrategy == types.StopOrderExpiryStrategySubmit { filteredOCO = append(filteredOCO, v) continue } @@ -3721,8 +4101,14 @@ func (m *Market) removeExpiredOrders( // either a pegged + non parked // or a non-pegged order if foundOnBook { - m.position.UnregisterOrder(ctx, order) + pos := m.position.UnregisterOrder(ctx, order) m.matching.DeleteOrder(order) + if m.getMarginMode(order.Party) == types.MarginModeIsolatedMargin { + err := m.updateIsolatedMarginOnOrder(ctx, pos, order) + if err != nil { + m.log.Panic("failed to recalculate isolated margin after order cancellation", logging.String("party", order.Party), logging.Order(order)) + } + } } // if this was a pegged order @@ -3852,28 +4238,6 @@ func (m *Market) getSuppliedStake() *num.Uint { return m.liquidityEngine.CalculateSuppliedStake() } -//nolint:unparam -func (m *Market) checkLiquidity(ctx context.Context, trades []*types.Trade, persistentOrder bool) bool { - // before we check liquidity, ensure we've moved all funds that can go towards - // provided stake to the bond accounts so we don't trigger liquidity auction for no reason - m.checkBondBalance(ctx) - var vBid, vAsk uint64 - // if we're not in auction, or we are checking liquidity when leaving opening auction, or we have best bid/ask volume - if !m.as.InAuction() || m.matching.BidAndAskPresentAfterAuction() { - _, vBid, _ = m.getBestStaticBidPriceAndVolume() - _, vAsk, _ = m.getBestStaticAskPriceAndVolume() - } - - return m.lMonitor.CheckLiquidity( - m.as, m.timeService.GetTimeNow(), - m.getSuppliedStake(), - trades, - *m.risk.GetRiskFactors(), - m.getReferencePrice(), - vBid, vAsk, - persistentOrder) -} - // command liquidity auction checks if liquidity auction should be entered and if it can end. func (m *Market) commandLiquidityAuction(ctx context.Context) { // start the liquidity monitoring auction if required @@ -3921,7 +4285,9 @@ func (m *Market) terminateMarket(ctx context.Context, finalState types.MarketSta // we're either going to set state to trading terminated // or we'll be performing the final settlement (setting market status to settled) // in both cases, we want to MTM any pending trades - if mp := m.getLastTradedPrice(); mp != nil && !mp.IsZero() && m.settlement.HasTraded() { + // TODO @zohar do we need to keep this check? mark price + // can change even if there were no trades + if m.settlement.HasTraded() { // we need the ID-gen _, blockHash := vegacontext.TraceIDFromContext(ctx) m.idgen = idgeneration.New(blockHash + crypto.HashStrToHex("finalmtm"+m.GetID())) @@ -3930,7 +4296,39 @@ func (m *Market) terminateMarket(ctx context.Context, finalState types.MarketSta }() // we have trades, and the market has been closed. Perform MTM sequence now so the final settlement // works as expected. - m.markPrice = mp + m.markPriceCalculator.CalculateMarkPrice( + m.timeService.GetTimeNow().UnixNano(), + m.matching, + m.mtmDelta, + m.tradableInstrument.MarginCalculator.ScalingFactors.InitialMargin, + m.mkt.LinearSlippageFactor, + m.risk.GetRiskFactors().Short, + m.risk.GetRiskFactors().Long) + + if m.internalCompositePriceCalculator != nil { + m.internalCompositePriceCalculator.CalculateMarkPrice( + m.timeService.GetTimeNow().UnixNano(), + m.matching, + m.internalCompositePriceFrequency, + m.tradableInstrument.MarginCalculator.ScalingFactors.InitialMargin, + m.mkt.LinearSlippageFactor, + m.risk.GetRiskFactors().Short, + m.risk.GetRiskFactors().Long) + } + + if m.perp { + // if perp and we have an intenal composite price (direct or by mark price), feed it to the perp before the mark to market + if m.internalCompositePriceCalculator != nil { + if internalCompositePrice := m.getCurrentInternalCompositePrice(); !internalCompositePrice.IsZero() { + m.tradableInstrument.Instrument.Product.SubmitDataPoint(ctx, internalCompositePrice, m.timeService.GetTimeNow().UnixNano()) + } + } else { + if internalCompositePrice := m.getCurrentMarkPrice(); !internalCompositePrice.IsZero() { + m.tradableInstrument.Instrument.Product.SubmitDataPoint(ctx, internalCompositePrice, m.timeService.GetTimeNow().UnixNano()) + } + } + } + // send market data event with the updated mark price m.broker.Send(events.NewMarketDataEvent(ctx, m.GetMarketData())) m.confirmMTM(ctx, true) @@ -3975,6 +4373,23 @@ func (m *Market) terminateMarket(ctx context.Context, finalState types.MarketSta } } +func (m *Market) scaleOracleData(ctx context.Context, price *num.Numeric, dp int64) *num.Uint { + if price == nil { + return nil + } + + if !price.SupportDecimalPlaces(int64(m.assetDP)) { + return nil + } + + p, err := price.ScaleTo(dp, int64(m.assetDP)) + if err != nil { + m.log.Error(err.Error()) + return nil + } + return p +} + func (m *Market) settlementData(ctx context.Context, settlementData *num.Numeric) { m.mu.Lock() defer m.mu.Unlock() @@ -4011,6 +4426,7 @@ func (m *Market) settlementDataPerp(ctx context.Context, settlementData *num.Num if sdi == nil { return } + transfers, round := m.settlement.SettleFundingPeriod(ctx, m.position.Positions(), settlementData.Int()) if len(transfers) == 0 { m.log.Debug("Failed to get settle positions for funding period") @@ -4022,7 +4438,7 @@ func (m *Market) settlementDataPerp(ctx context.Context, settlementData *num.Num } m.broker.Send(events.NewFundingPaymentsEvent(ctx, m.mkt.ID, m.tradableInstrument.Instrument.Product.GetCurrentPeriod(), transfers)) - margins, ledgerMovements, err := m.collateral.PerpsFundingSettlement(ctx, m.GetID(), transfers, m.settlementAsset, round) + margins, ledgerMovements, err := m.collateral.PerpsFundingSettlement(ctx, m.GetID(), transfers, m.settlementAsset, round, m.useGeneralAccountForMarginSearch) if err != nil { m.log.Error("Failed to get ledger movements when performing the funding settlement", logging.MarketID(m.GetID()), @@ -4038,15 +4454,35 @@ func (m *Market) settlementDataPerp(ctx context.Context, settlementData *num.Num return } + // split to cross and isolated margins to handle separately + crossEvts := make([]events.Margin, 0, len(margins)) + isolatedEvts := make([]events.Margin, 0, len(margins)) + for _, evt := range margins { + if m.getMarginMode(evt.Party()) == types.MarginModeCrossMargin { + crossEvts = append(crossEvts, evt) + } else { + isolatedEvts = append(isolatedEvts, evt) + } + } + // check margin balances increment := m.tradableInstrument.Instrument.Product.GetMarginIncrease(m.timeService.GetTimeNow().UnixNano()) - riskUpdates := m.risk.UpdateMarginsOnSettlement(ctx, margins, m.getCurrentMarkPrice(), increment) + riskUpdates := m.risk.UpdateMarginsOnSettlement(ctx, crossEvts, m.getCurrentMarkPrice(), increment) + isolatedMarginPartiesToClose := []events.Risk{} + for _, evt := range isolatedEvts { + mrgns, err := m.risk.CheckMarginInvariants(ctx, evt, m.getMarketObservable(nil), increment, m.matching.GetOrdersPerParty(evt.Party()), m.getMarginFactor(evt.Party())) + if err == risk.ErrInsufficientFundsForMaintenanceMargin { + m.log.Debug("party in isolated margin mode has insufficient margin", logging.String("party", evt.Party())) + isolatedMarginPartiesToClose = append(isolatedMarginPartiesToClose, mrgns) + } + } + // no margin accounts need updating... - if len(riskUpdates) == 0 { + if len(riskUpdates)+len(isolatedMarginPartiesToClose) == 0 { return } // update margins, close-out any positions that don't have the required margin - orderUpdates := m.handleRiskEvts(ctx, riskUpdates) + orderUpdates := m.handleRiskEvts(ctx, riskUpdates, isolatedMarginPartiesToClose) m.checkForReferenceMoves(ctx, orderUpdates, false) } @@ -4066,7 +4502,11 @@ func (m *Market) settlementDataWithLock(ctx context.Context, finalState types.Ma // mark price should be updated here if settlementDataInAsset != nil { m.lastTradedPrice = settlementDataInAsset.Clone() - m.markPrice = settlementDataInAsset.Clone() + // the settlement price is the final mark price + m.markPriceCalculator.overridePrice(m.lastTradedPrice) + if m.internalCompositePriceCalculator != nil { + m.internalCompositePriceCalculator.overridePrice(m.lastTradedPrice) + } } // send the market data with all updated stuff @@ -4185,11 +4625,21 @@ func (m *Market) getReferencePrice() *num.Uint { return ip } +func (m *Market) getCurrentInternalCompositePrice() *num.Uint { + if !m.perp || m.internalCompositePriceCalculator == nil { + m.log.Panic("trying to get current internal composite price in a market with no intenal composite price configuration or not a perp market") + } + if m.internalCompositePriceCalculator.price == nil { + return num.UintZero() + } + return m.internalCompositePriceCalculator.price.Clone() +} + func (m *Market) getCurrentMarkPrice() *num.Uint { - if m.markPrice == nil { + if m.markPriceCalculator.price == nil { return num.UintZero() } - return m.markPrice.Clone() + return m.markPriceCalculator.price.Clone() } func (m *Market) getLastTradedPrice() *num.Uint { @@ -4211,3 +4661,156 @@ func (m *Market) GetMarketCounters() *types.MarketCounters { PositionCount: m.GetTotalOpenPositionCount(), } } + +func (m *Market) GetRiskFactors() *types.RiskFactor { + return m.risk.GetRiskFactors() +} + +func (m *Market) UpdateMarginMode(ctx context.Context, party string, marginMode types.MarginMode, marginFactor num.Decimal) error { + if err := m.switchMarginMode(ctx, party, marginMode, marginFactor); err != nil { + return err + } + + m.emitPartyMarginModeUpdated(ctx, party, marginMode, marginFactor) + + return nil +} + +func (m *Market) getMarginMode(party string) types.MarginMode { + marginFactor, ok := m.partyMarginFactor[party] + if !ok || marginFactor.IsZero() { + return types.MarginModeCrossMargin + } + return types.MarginModeIsolatedMargin +} + +func (m *Market) useGeneralAccountForMarginSearch(party string) bool { + return m.getMarginMode(party) == types.MarginModeCrossMargin +} + +func (m *Market) getMarginFactor(party string) num.Decimal { + marginFactor, ok := m.partyMarginFactor[party] + if !ok || marginFactor.IsZero() { + return num.DecimalZero() + } + return marginFactor +} + +// switchMarginMode handles a switch between margin modes and/or changes to the margin factor. +// When switching to isolated margin mode, the following steps will be taken: +// 1. For any active position, calculate average entry price * abs(position) * margin factor. +// Calculate the amount of funds which will be added to, or subtracted from, the general account in order to do this. +// If additional funds must be added which are not available, reject the transaction immediately. +// 2. For any active orders, calculate the quantity limit price * remaining size * margin factor which needs to be placed in the +// order margin account. Add this amount to the difference calculated in step 1. If this amount is less than or equal to the +// amount in the general account, perform the transfers (first move funds into/out of margin account, then move funds into +// the order margin account). If there are insufficient funds, reject the transaction. +// 3. Move account to isolated margin mode on this market +// +// When switching from isolated margin mode to cross margin mode, the following steps will be taken: +// 1. Any funds in the order margin account will be moved to the margin account. +// 2. At this point trading can continue with the account switched to the cross margining account type. +// If there are excess funds in the margin account they will be freed at the next margin release cycle. +func (m *Market) switchMarginMode(ctx context.Context, party string, marginMode types.MarginMode, marginFactor num.Decimal) error { + defer m.onTxProcessed() + if marginMode == m.getMarginMode(party) && marginFactor.Equal(m.getMarginFactor(party)) { + return nil + } + _ = m.addParty(party) + + pos, ok := m.position.GetPositionByPartyID(party) + if !ok { + pos = positions.NewMarketPosition(party) + } + + margins, err := m.collateral.GetPartyMargin(pos, m.settlementAsset, m.GetID()) + if err == collateral.ErrPartyAccountsMissing { + _, err = m.collateral.CreatePartyMarginAccount(ctx, party, m.mkt.ID, m.settlementAsset) + if err != nil { + return err + } + margins, err = m.collateral.GetPartyMargin(pos, m.settlementAsset, m.GetID()) + if err != nil { + return err + } + } else if err != nil { + return err + } + + marketObservable := m.getMarketObservable(nil) + if marketObservable == nil { + return fmt.Errorf("no market observable price") + } + increment := m.tradableInstrument.Instrument.Product.GetMarginIncrease(m.timeService.GetTimeNow().UnixNano()) + var auctionPrice *num.Uint + if m.as.InAuction() { + auctionPrice = marketObservable + markPrice := m.getCurrentMarkPrice() + if markPrice != nil && marketObservable.LT(markPrice) { + auctionPrice = markPrice + } + } + // switching to isolated or changing the margin factor + if marginMode == types.MarginModeIsolatedMargin { + risk, err := m.risk.SwitchToIsolatedMargin(ctx, margins, marketObservable, increment, m.matching.GetOrdersPerParty(party), marginFactor, auctionPrice) + if err != nil { + return err + } + // ensure we have an order margin account set up + m.collateral.GetOrCreatePartyOrderMarginAccount(ctx, party, m.mkt.ID, m.settlementAsset) + if len(risk) > 0 { + for _, r := range risk { + err = m.transferMargins(ctx, []events.Risk{r}, nil) + if err != nil { + return err + } + } + } + m.partyMarginFactor[party] = marginFactor + // cancel pegged orders + ordersAndParkedPegged := append(m.matching.GetOrdersPerParty(party), m.getPartyParkedPeggedOrders(party)...) + for _, o := range ordersAndParkedPegged { + if o.PeggedOrder != nil { + m.cancelOrder(ctx, o.Party, o.ID) + } + } + return nil + } else { + // switching from isolated margin to cross margin + // 1. Any funds in the order margin account will be moved to the margin account. + // 2. At this point trading can continue with the account switched to the cross margining account type. If there are excess funds in the margin account they will be freed at the next margin release cycle. + risk := m.risk.SwitchFromIsolatedMargin(ctx, margins, marketObservable, increment) + err = m.transferMargins(ctx, []events.Risk{risk}, nil) + if err != nil { + return err + } + delete(m.partyMarginFactor, party) + return nil + } +} + +func (m *Market) getPartyParkedPeggedOrders(party string) []*types.Order { + partyParkedPegged := []*types.Order{} + p := m.peggedOrders.Parked() + for _, o := range p { + if o.Party == party { + partyParkedPegged = append(partyParkedPegged, o) + } + } + return partyParkedPegged +} + +func (m *Market) emitPartyMarginModeUpdated(ctx context.Context, party string, mode types.MarginMode, factor num.Decimal) { + e := &eventspb.PartyMarginModeUpdated{ + MarketId: m.mkt.ID, + PartyId: party, + MarginMode: mode, + AtEpoch: m.epoch.Seq, + } + + if mode == types.MarginModeIsolatedMargin { + e.MarginFactor = ptr.From(factor.String()) + } + + m.broker.Send(events.NewPartyMarginModeUpdatedEvent(ctx, e)) +} diff --git a/core/execution/future/market_callbacks.go b/core/execution/future/market_callbacks.go index 69be195718..f25f76c2bb 100644 --- a/core/execution/future/market_callbacks.go +++ b/core/execution/future/market_callbacks.go @@ -76,14 +76,8 @@ func (m *Market) OnMarketProbabilityOfTradingTauScalingUpdate(_ context.Context, m.liquidity.OnProbabilityOfTradingTauScalingUpdate(d) } -func (m *Market) OnMarketLiquidityTargetStakeTriggeringRatio(ctx context.Context, d num.Decimal) { - m.lMonitor.UpdateTargetStakeTriggerRatio(ctx, d) - // TODO: Send an event containing updated parameter -} - func (m *Market) OnMarketAuctionMinimumDurationUpdate(ctx context.Context, d time.Duration) { m.pMonitor.SetMinDuration(d) - m.lMonitor.SetMinDuration(d) m.minDuration = d evt := m.as.UpdateMinDuration(ctx, d) // we were in an auction, and the duration of the auction was updated @@ -106,6 +100,17 @@ func (m *Market) OnMarkPriceUpdateMaximumFrequency(ctx context.Context, d time.D m.mtmDelta = d } +func (m *Market) OnInternalCompositePriceUpdateFrequency(ctx context.Context, d time.Duration) { + if !m.perp { + return + } + if !m.nextInternalCompositePriceCalc.IsZero() { + m.nextInternalCompositePriceCalc = m.nextInternalCompositePriceCalc.Add(-m.mtmDelta) + } + m.nextInternalCompositePriceCalc = m.nextInternalCompositePriceCalc.Add(d) + m.internalCompositePriceFrequency = d +} + func (m *Market) OnMarketPartiesMaximumStopOrdersUpdate(ctx context.Context, u *num.Uint) { m.maxStopOrdersPerParties = u.Clone() } diff --git a/core/execution/future/market_iceberg_test.go b/core/execution/future/market_iceberg_test.go index ad9f022207..e3cc674070 100644 --- a/core/execution/future/market_iceberg_test.go +++ b/core/execution/future/market_iceberg_test.go @@ -20,12 +20,11 @@ import ( "testing" "time" - vegacontext "code.vegaprotocol.io/vega/libs/context" - vgcrypto "code.vegaprotocol.io/vega/libs/crypto" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/execution/common" "code.vegaprotocol.io/vega/core/types" + vegacontext "code.vegaprotocol.io/vega/libs/context" + vgcrypto "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "github.com/stretchr/testify/assert" diff --git a/core/execution/future/market_snapshot.go b/core/execution/future/market_snapshot.go index bb234909e0..5bae569ac5 100644 --- a/core/execution/future/market_snapshot.go +++ b/core/execution/future/market_snapshot.go @@ -21,10 +21,9 @@ import ( "sort" "time" - "golang.org/x/exp/maps" - "code.vegaprotocol.io/vega/core/assets" "code.vegaprotocol.io/vega/core/execution/common" + "code.vegaprotocol.io/vega/core/execution/liquidation" "code.vegaprotocol.io/vega/core/execution/stoporders" "code.vegaprotocol.io/vega/core/fee" "code.vegaprotocol.io/vega/core/liquidity/target" @@ -32,16 +31,19 @@ import ( "code.vegaprotocol.io/vega/core/markets" "code.vegaprotocol.io/vega/core/matching" "code.vegaprotocol.io/vega/core/monitor" - lmon "code.vegaprotocol.io/vega/core/monitor/liquidity" "code.vegaprotocol.io/vega/core/monitor/price" "code.vegaprotocol.io/vega/core/positions" "code.vegaprotocol.io/vega/core/products" "code.vegaprotocol.io/vega/core/risk" "code.vegaprotocol.io/vega/core/settlement" "code.vegaprotocol.io/vega/core/types" + vgcontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" + snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + + "golang.org/x/exp/maps" ) func NewMarketFromSnapshot( @@ -64,8 +66,10 @@ func NewMarketFromSnapshot( peggedOrderNotify func(int64), referralDiscountRewardService fee.ReferralDiscountRewardService, volumeDiscountService fee.VolumeDiscountService, + banking common.Banking, ) (*Market, error) { mkt := em.Market + positionFactor := num.DecimalFromFloat(10).Pow(num.DecimalFromInt64(mkt.PositionDecimalPlaces)) if len(em.Market.ID) == 0 { return nil, common.ErrEmptyMarketID @@ -80,6 +84,19 @@ func NewMarketFromSnapshot( as := monitor.NewAuctionStateFromSnapshot(mkt, em.AuctionState) + if vgcontext.InProgressUpgradeFrom(ctx, "v0.73.13") { + // protocol upgrade from v0.73.12, lets populate the new liquidity-fee-settings with a default marginal-cost method + log.Info("migrating liquidity fee settings for existing market", logging.String("mid", mkt.ID)) + mkt.Fees.LiquidityFeeSettings = &types.LiquidityFeeSettings{ + Method: types.LiquidityFeeMethodMarginalCost, + } + + // if the market is in a none opening-auction we need to tell the instrument + if as.InAuction() && !as.IsOpeningAuction() { + tradableInstrument.Instrument.Product.UpdateAuctionState(ctx, true) + } + } + // @TODO -> the raw auctionstate shouldn't be something exposed to the matching engine // as far as matching goes: it's either an auction or not book := matching.NewCachedOrderBook( @@ -138,7 +155,6 @@ func NewMarketFromSnapshot( exp := assetDecimals - mkt.DecimalPlaces priceFactor := num.UintZero().Exp(num.NewUint(10), num.NewUint(exp)) - lMonitor := lmon.NewMonitor(tsCalc, mkt.LiquidityMonitoringParameters) // TODO(jeremy): remove this once the upgrade with the .73 have run on mainnet // this is required to support the migration to SLA liquidity @@ -171,9 +187,22 @@ func NewMarketFromSnapshot( if em.ExpiringStopOrders != nil { expiringStopOrders = common.NewExpiringOrdersFromState(em.ExpiringStopOrders) } + // @TODO same as in the non-snapshot market constructor: default to legacy liquidation strategy for the time being + // this can be removed once this parameter is no longer optional + if mkt.LiquidationStrategy == nil { + mkt.LiquidationStrategy = liquidation.GetLegacyStrat() + } + le := liquidation.New(log, mkt.LiquidationStrategy, mkt.GetID(), broker, book, as, timeService, marketLiquidity, positionEngine) + + partyMargin := make(map[string]num.Decimal, len(em.PartyMarginFactors)) + for _, pmf := range em.PartyMarginFactors { + partyMargin[pmf.Party], _ = num.DecimalFromString(pmf.MarginFactor) + } now := timeService.GetTimeNow() marketType := mkt.MarketType() + + markPriceCalculator := NewCompositePriceCalculatorFromSnapshot(ctx, em.CurrentMarkPrice, timeService, oracleEngine, em.MarkPriceCalculator) market := &Market{ log: log, mkt: mkt, @@ -192,7 +221,6 @@ func NewMarketFromSnapshot( liquidityEngine: liquidityEngine, liquidity: marketLiquidity, parties: map[string]struct{}{}, - lMonitor: lMonitor, tsCalc: tsCalc, feeSplitter: common.NewFeeSplitterFromSnapshot(em.FeeSplitter, now), as: as, @@ -204,7 +232,6 @@ func NewMarketFromSnapshot( lastBestAskPrice: em.LastBestAsk.Clone(), lastMidBuyPrice: em.LastMidBid.Clone(), lastMidSellPrice: em.LastMidAsk.Clone(), - markPrice: em.CurrentMarkPrice, lastTradedPrice: em.LastTradedPrice, priceFactor: priceFactor, lastMarketValueProxy: em.LastMarketValueProxy, @@ -212,12 +239,21 @@ func NewMarketFromSnapshot( positionFactor: positionFactor, stateVarEngine: stateVarEngine, settlementDataInMarket: em.SettlementData, - linearSlippageFactor: mkt.LinearSlippageFactor, - quadraticSlippageFactor: mkt.QuadraticSlippageFactor, settlementAsset: asset, stopOrders: stopOrders, expiringStopOrders: expiringStopOrders, perp: marketType == types.MarketTypePerp, + partyMarginFactor: partyMargin, + liquidation: le, + banking: banking, + markPriceCalculator: markPriceCalculator, + } + + markPriceCalculator.setOraclePriceScalingFunc(market.scaleOracleData) + + if em.InternalCompositePriceCalculator != nil { + market.internalCompositePriceCalculator = NewCompositePriceCalculatorFromSnapshot(ctx, nil, timeService, oracleEngine, em.InternalCompositePriceCalculator) + market.internalCompositePriceCalculator.setOraclePriceScalingFunc(market.scaleOracleData) } for _, p := range em.Parties { @@ -246,12 +282,14 @@ func NewMarketFromSnapshot( if mkt.State == types.MarketStateTradingTerminated { market.tradableInstrument.Instrument.UnsubscribeTradingTerminated(ctx) } - if mkt.State == types.MarketStateSettled { - market.tradableInstrument.Instrument.Unsubscribe(ctx) - } if em.Closed { market.closed = true + market.tradableInstrument.Instrument.Unsubscribe(ctx) + market.markPriceCalculator.Close(ctx) + if market.internalCompositePriceCalculator != nil { + market.internalCompositePriceCalculator.Close(ctx) + } stateVarEngine.UnregisterStateVariable(asset, mkt.ID) } return market, nil @@ -261,7 +299,7 @@ func (m *Market) GetNewStateProviders() []types.StateProvider { return []types.StateProvider{ m.position, m.matching, m.tsCalc, m.liquidityEngine.V1StateProvider(), m.liquidityEngine.V2StateProvider(), - m.settlement, + m.settlement, m.liquidation, } } @@ -276,33 +314,46 @@ func (m *Market) GetState() *types.ExecMarket { sort.Strings(parties) assetQuantum, _ := m.collateral.GetAssetQuantum(m.settlementAsset) + partyMarginFactors := make([]*snapshot.PartyMarginFactor, 0, len(m.partyMarginFactor)) + for k, d := range m.partyMarginFactor { + partyMarginFactors = append(partyMarginFactors, &snapshot.PartyMarginFactor{Party: k, MarginFactor: d.String()}) + } + sort.Slice(partyMarginFactors, func(i, j int) bool { + return partyMarginFactors[i].Party < partyMarginFactors[j].Party + }) + em := &types.ExecMarket{ - Market: m.mkt.DeepClone(), - PriceMonitor: m.pMonitor.GetState(), - AuctionState: m.as.GetState(), - PeggedOrders: m.peggedOrders.GetState(), - ExpiringOrders: m.expiringOrders.GetState(), - LastBestBid: m.lastBestBidPrice.Clone(), - LastBestAsk: m.lastBestAskPrice.Clone(), - LastMidBid: m.lastMidBuyPrice.Clone(), - LastMidAsk: m.lastMidSellPrice.Clone(), - LastMarketValueProxy: m.lastMarketValueProxy, - CurrentMarkPrice: m.markPrice, - LastTradedPrice: m.lastTradedPrice, - EquityShare: m.equityShares.GetState(), - RiskFactorConsensusReached: m.risk.IsRiskFactorInitialised(), - ShortRiskFactor: rf.Short, - LongRiskFactor: rf.Long, - FeeSplitter: m.feeSplitter.GetState(), - SettlementData: sp, - NextMTM: m.nextMTM.UnixNano(), - Parties: parties, - Closed: m.closed, - IsSucceeded: m.succeeded, - StopOrders: m.stopOrders.ToProto(), - ExpiringStopOrders: m.expiringStopOrders.GetState(), - Product: m.tradableInstrument.Instrument.Product.Serialize(), - FeesStats: m.fee.GetState(assetQuantum), + Market: m.mkt.DeepClone(), + PriceMonitor: m.pMonitor.GetState(), + AuctionState: m.as.GetState(), + PeggedOrders: m.peggedOrders.GetState(), + ExpiringOrders: m.expiringOrders.GetState(), + LastBestBid: m.lastBestBidPrice.Clone(), + LastBestAsk: m.lastBestAskPrice.Clone(), + LastMidBid: m.lastMidBuyPrice.Clone(), + LastMidAsk: m.lastMidSellPrice.Clone(), + LastMarketValueProxy: m.lastMarketValueProxy, + LastTradedPrice: m.lastTradedPrice, + EquityShare: m.equityShares.GetState(), + RiskFactorConsensusReached: m.risk.IsRiskFactorInitialised(), + ShortRiskFactor: rf.Short, + LongRiskFactor: rf.Long, + FeeSplitter: m.feeSplitter.GetState(), + SettlementData: sp, + NextMTM: m.nextMTM.UnixNano(), + NextInternalCompositePriceCalc: m.nextInternalCompositePriceCalc.UnixNano(), + Parties: parties, + Closed: m.closed, + IsSucceeded: m.succeeded, + StopOrders: m.stopOrders.ToProto(), + ExpiringStopOrders: m.expiringStopOrders.GetState(), + Product: m.tradableInstrument.Instrument.Product.Serialize(), + FeesStats: m.fee.GetState(assetQuantum), + PartyMarginFactors: partyMarginFactors, + MarkPriceCalculator: m.markPriceCalculator.IntoProto(), + } + if m.perp && m.internalCompositePriceCalculator != nil { + em.InternalCompositePriceCalculator = m.internalCompositePriceCalculator.IntoProto() } return em diff --git a/core/execution/future/market_snapshot_test.go b/core/execution/future/market_snapshot_test.go index ba39ddb211..5d7ebdbac4 100644 --- a/core/execution/future/market_snapshot_test.go +++ b/core/execution/future/market_snapshot_test.go @@ -42,6 +42,7 @@ import ( vgcrypto "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -60,14 +61,45 @@ func TestRestoreSettledMarket(t *testing.T) { oracleEngine.EXPECT().Subscribe(gomock.Any(), gomock.Any(), gomock.Any()).Times(1).Return(spec.SubscriptionID(1), unsubscribe, nil) oracleEngine.EXPECT().Subscribe(gomock.Any(), gomock.Any(), gomock.Any()).Times(1).Return(spec.SubscriptionID(2), unsubscribe, nil) - snap, err := newMarketFromSnapshot(t, ctrl, em, oracleEngine) + snap, err := newMarketFromSnapshot(t, context.Background(), ctrl, em, oracleEngine) require.NoError(t, err) require.NotEmpty(t, snap) // check the market is restored settled and that we have unsubscribed the two oracles assert.Equal(t, types.MarketStateSettled, snap.State()) assert.Equal(t, uint64(2), unsubs) - closed := tm.market.OnTick(vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()), time.Now()) + closed := snap.OnTick(vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()), time.Now()) + assert.True(t, closed) +} + +func TestRestoreClosedMarket(t *testing.T) { + tm := getActiveMarket(t) + ctx := vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()) + changes := &types.MarketStateUpdateConfiguration{ + MarketID: tm.mktCfg.ID, + SettlementPrice: num.UintOne(), + UpdateType: types.MarketStateUpdateTypeTerminate, + } + tm.market.UpdateMarketState(ctx, changes) + em := tm.market.GetState() + + ctrl := gomock.NewController(t) + defer ctrl.Finish() + oracleEngine := mocks.NewMockOracleEngine(ctrl) + + var unsubs uint64 + unsubscribe := func(_ context.Context, id spec.SubscriptionID) { unsubs++ } + oracleEngine.EXPECT().Subscribe(gomock.Any(), gomock.Any(), gomock.Any()).Times(1).Return(spec.SubscriptionID(1), unsubscribe, nil) + oracleEngine.EXPECT().Subscribe(gomock.Any(), gomock.Any(), gomock.Any()).Times(1).Return(spec.SubscriptionID(2), unsubscribe, nil) + + snap, err := newMarketFromSnapshot(t, context.Background(), ctrl, em, oracleEngine) + require.NoError(t, err) + require.NotEmpty(t, snap) + + // check the market is restored settled and that we have unsubscribed the two oracles + assert.Equal(t, types.MarketStateClosed, snap.State()) + assert.Equal(t, uint64(2), unsubs) + closed := snap.OnTick(vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()), time.Now()) assert.True(t, closed) } @@ -88,14 +120,14 @@ func TestRestoreTerminatedMarket(t *testing.T) { oracleEngine.EXPECT().Subscribe(gomock.Any(), gomock.Any(), gomock.Any()).Times(1).Return(spec.SubscriptionID(1), unsubscribe, nil) oracleEngine.EXPECT().Subscribe(gomock.Any(), gomock.Any(), gomock.Any()).Times(1).Return(spec.SubscriptionID(2), unsubscribe, nil) - snap, err := newMarketFromSnapshot(t, ctrl, em, oracleEngine) + snap, err := newMarketFromSnapshot(t, context.Background(), ctrl, em, oracleEngine) require.NoError(t, err) require.NotEmpty(t, snap) // check the market is restored terminated and that we have unsubscribed one oracles assert.Equal(t, types.MarketStateTradingTerminated, snap.State()) assert.True(t, termUnsub) - closed := tm.market.OnTick(vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()), time.Now()) + closed := snap.OnTick(vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()), time.Now()) assert.False(t, closed) } @@ -117,15 +149,47 @@ func TestRestoreNilLastTradedPrice(t *testing.T) { oracleEngine.EXPECT().Subscribe(gomock.Any(), gomock.Any(), gomock.Any()).Times(1).Return(spec.SubscriptionID(1), unsubscribe, nil) oracleEngine.EXPECT().Subscribe(gomock.Any(), gomock.Any(), gomock.Any()).Times(1).Return(spec.SubscriptionID(2), unsubscribe, nil) - snap, err := newMarketFromSnapshot(t, ctrl, em, oracleEngine) + snap, err := newMarketFromSnapshot(t, context.Background(), ctrl, em, oracleEngine) require.NoError(t, err) require.NotEmpty(t, snap) - em2 := tm.market.GetState() + em2 := snap.GetState() assert.Nil(t, em2.LastTradedPrice) assert.Nil(t, em2.CurrentMarkPrice) } +func TestRestoreMarketUpgradeV0_73_2(t *testing.T) { + now := time.Unix(10, 0) + tm := getTestMarket(t, now, nil, nil) + defer tm.ctrl.Finish() + + em := tm.market.GetState() + assert.Nil(t, em.LastTradedPrice) + assert.Nil(t, em.CurrentMarkPrice) + + ctrl := gomock.NewController(t) + defer ctrl.Finish() + oracleEngine := mocks.NewMockOracleEngine(ctrl) + + unsubscribe := func(_ context.Context, id spec.SubscriptionID) { + } + oracleEngine.EXPECT().Subscribe(gomock.Any(), gomock.Any(), gomock.Any()).Times(1).Return(spec.SubscriptionID(1), unsubscribe, nil) + oracleEngine.EXPECT().Subscribe(gomock.Any(), gomock.Any(), gomock.Any()).Times(1).Return(spec.SubscriptionID(2), unsubscribe, nil) + + // set the liquidity fee settings to nil, like if we can come from an older version + em.Market.Fees.LiquidityFeeSettings = nil + + // and set in the context the information that says we are upgrading + ctx := vegacontext.WithSnapshotInfo(context.Background(), "v0.73.13", true) + snap, err := newMarketFromSnapshot(t, ctx, ctrl, em, oracleEngine) + require.NoError(t, err) + require.NotEmpty(t, snap) + + em2 := snap.GetState() + require.NotNil(t, em2.Market.Fees.LiquidityFeeSettings) + assert.Equal(t, em2.Market.Fees.LiquidityFeeSettings.Method, types.LiquidityFeeMethodMarginalCost) +} + func getTerminatedMarket(t *testing.T) *testMarket { t.Helper() pubKeys := []*dstypes.Signer{ @@ -170,8 +234,26 @@ func getSettledMarket(t *testing.T) *testMarket { return tm } +func getActiveMarket(t *testing.T) *testMarket { + t.Helper() + + esm := newEquityShareMarket(t) + matchingPrice := uint64(900000) + ctx := vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()) + esm.WithSubmittedOrder(t, "some-id-1", "party1", types.SideSell, matchingPrice+1). + WithSubmittedOrder(t, "some-id-2", "party2", types.SideBuy, matchingPrice-1). + WithSubmittedOrder(t, "some-id-3", "party1", types.SideSell, matchingPrice). + WithSubmittedOrder(t, "some-id-4", "party2", types.SideBuy, matchingPrice). + WithSubmittedLiquidityProvision(t, "party1", "lp-id-1", 2000000, "0.5"). + WithSubmittedLiquidityProvision(t, "party2", "lp-id-2", 1000000, "0.5") + + // end opening auction + esm.tm.market.OnTick(ctx, esm.Now.Add(2*time.Second)) + return esm.tm +} + // newMarketFromSnapshot is a wrapper for NewMarketFromSnapshot with a lot of defaults handled. -func newMarketFromSnapshot(t *testing.T, ctrl *gomock.Controller, em *types.ExecMarket, oracleEngine products.OracleEngine) (*future.Market, error) { +func newMarketFromSnapshot(t *testing.T, ctx context.Context, ctrl *gomock.Controller, em *types.ExecMarket, oracleEngine products.OracleEngine) (*future.Market, error) { t.Helper() var ( riskConfig = risk.NewDefaultConfig() @@ -206,8 +288,9 @@ func newMarketFromSnapshot(t *testing.T, ctrl *gomock.Controller, em *types.Exec referralDiscountReward.EXPECT().ReferralDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() volumeDiscount.EXPECT().VolumeDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() referralDiscountReward.EXPECT().GetReferrer(gomock.Any()).Return(types.PartyID(""), errors.New("not a referrer")).AnyTimes() + banking := mocks.NewMockBanking(ctrl) - return future.NewMarketFromSnapshot(context.Background(), log, em, riskConfig, positionConfig, settlementConfig, matchingConfig, + return future.NewMarketFromSnapshot(ctx, log, em, riskConfig, positionConfig, settlementConfig, matchingConfig, feeConfig, liquidityConfig, collateralEngine, oracleEngine, timeService, broker, stubs.NewStateVar(), cfgAsset, marketActivityTracker, - peggedOrderCounterForTest, referralDiscountReward, volumeDiscount) + peggedOrderCounterForTest, referralDiscountReward, volumeDiscount, banking) } diff --git a/core/execution/future/market_state_test.go b/core/execution/future/market_state_test.go index 13d0989f9b..b359d8a49f 100644 --- a/core/execution/future/market_state_test.go +++ b/core/execution/future/market_state_test.go @@ -20,11 +20,10 @@ import ( "testing" "time" - vegacontext "code.vegaprotocol.io/vega/libs/context" - vgcrypto "code.vegaprotocol.io/vega/libs/crypto" - "code.vegaprotocol.io/vega/core/execution/common" "code.vegaprotocol.io/vega/core/types" + vegacontext "code.vegaprotocol.io/vega/libs/context" + vgcrypto "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "github.com/golang/mock/gomock" diff --git a/core/execution/future/market_test.go b/core/execution/future/market_test.go index 148d3fc2b1..b1936af93f 100644 --- a/core/execution/future/market_test.go +++ b/core/execution/future/market_test.go @@ -23,25 +23,21 @@ import ( "testing" "time" - fmocks "code.vegaprotocol.io/vega/core/fee/mocks" - vegacontext "code.vegaprotocol.io/vega/libs/context" - vgcrypto "code.vegaprotocol.io/vega/libs/crypto" - - "code.vegaprotocol.io/vega/core/datasource" - "code.vegaprotocol.io/vega/core/datasource/external/signedoracle" - "code.vegaprotocol.io/vega/core/idgeneration" - "code.vegaprotocol.io/vega/core/integration/stubs" - bmocks "code.vegaprotocol.io/vega/core/broker/mocks" "code.vegaprotocol.io/vega/core/collateral" + "code.vegaprotocol.io/vega/core/datasource" dstypes "code.vegaprotocol.io/vega/core/datasource/common" dserrors "code.vegaprotocol.io/vega/core/datasource/errors" + "code.vegaprotocol.io/vega/core/datasource/external/signedoracle" "code.vegaprotocol.io/vega/core/datasource/spec" "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/execution/common" "code.vegaprotocol.io/vega/core/execution/common/mocks" "code.vegaprotocol.io/vega/core/execution/future" "code.vegaprotocol.io/vega/core/fee" + fmocks "code.vegaprotocol.io/vega/core/fee/mocks" + "code.vegaprotocol.io/vega/core/idgeneration" + "code.vegaprotocol.io/vega/core/integration/stubs" "code.vegaprotocol.io/vega/core/liquidity/v2" "code.vegaprotocol.io/vega/core/matching" "code.vegaprotocol.io/vega/core/monitor" @@ -49,6 +45,8 @@ import ( "code.vegaprotocol.io/vega/core/risk" "code.vegaprotocol.io/vega/core/settlement" "code.vegaprotocol.io/vega/core/types" + vegacontext "code.vegaprotocol.io/vega/libs/context" + vgcrypto "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" proto "code.vegaprotocol.io/vega/protos/vega" @@ -243,11 +241,12 @@ func (tm *testMarket) Run(ctx context.Context, mktCfg types.Market) *testMarket referralDiscountReward.EXPECT().ReferralDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() referralDiscountReward.EXPECT().RewardsFactorMultiplierAppliedForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() volumeDiscount.EXPECT().VolumeDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() + banking := mocks.NewMockBanking(tm.ctrl) mktEngine, err := future.NewMarket(ctx, tm.log, riskConfig, positionConfig, settlementConfig, matchingConfig, feeConfig, liquidityConfig, collateralEngine, oracleEngine, &mktCfg, tm.timeService, tm.broker, mas, statevarEngine, marketActivityTracker, cfgAsset, - peggedOrderCounterForTest, referralDiscountReward, volumeDiscount, + peggedOrderCounterForTest, referralDiscountReward, volumeDiscount, banking, ) require.NoError(tm.t, err) @@ -648,11 +647,12 @@ func getTestMarket2WithDP( referralDiscountReward.EXPECT().ReferralDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() referralDiscountReward.EXPECT().RewardsFactorMultiplierAppliedForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() volumeDiscount.EXPECT().VolumeDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() + banking := mocks.NewMockBanking(ctrl) mktEngine, err := future.NewMarket(context.Background(), log, riskConfig, positionConfig, settlementConfig, matchingConfig, feeConfig, liquidityConfig, collateralEngine, oracleEngine, mktCfg, timeService, broker, mas, statevar, marketActivityTracker, cfgAsset, - peggedOrderCounterForTest, referralDiscountReward, volumeDiscount) + peggedOrderCounterForTest, referralDiscountReward, volumeDiscount, banking) if err != nil { t.Fatalf("couldn't create a market: %v", err) } @@ -708,6 +708,9 @@ func getMarketWithDP(pMonitorSettings *types.PriceMonitoringSettings, openingAuc InfrastructureFee: num.DecimalFromFloat(0.001), MakerFee: num.DecimalFromFloat(0.004), }, + LiquidityFeeSettings: &types.LiquidityFeeSettings{ + Method: types.LiquidityFeeMethodMarginalCost, + }, }, TradableInstrument: &types.TradableInstrument{ Instrument: &types.Instrument{ @@ -795,7 +798,6 @@ func getMarketWithDP(pMonitorSettings *types.PriceMonitoringSettings, openingAuc TimeWindow: 3600, // seconds = 1h ScalingFactor: num.DecimalFromFloat(10), }, - TriggeringRatio: num.DecimalZero(), }, LiquiditySLAParams: &types.LiquiditySLAParams{ PriceRange: num.DecimalOne(), @@ -805,6 +807,12 @@ func getMarketWithDP(pMonitorSettings *types.PriceMonitoringSettings, openingAuc }, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + MarkPriceConfiguration: &types.CompositePriceConfiguration{ + DecayWeight: num.DecimalZero(), + DecayPower: num.DecimalZero(), + CashAmount: num.UintZero(), + CompositePriceType: types.CompositePriceTypeByLastTrade, + }, } return mkt @@ -1216,8 +1224,6 @@ func TestLiquidityFeeWhenTargetStakeDropsDueToFlowOfTime(t *testing.T) { addAccountWithAmount(tm, lp1, 100000000000) addAccountWithAmount(tm, lp2, 100000000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, lp1, 1, 10) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -1941,8 +1947,6 @@ func TestMarketGetMarginOnFailNoFund(t *testing.T) { addAccount(t, tm, auxParty) addAccount(t, tm, auxParty2) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -2136,8 +2140,6 @@ func TestTriggerByPriceNoTradesInAuction(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 100000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Duration(auctionExtensionSeconds)*time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -2309,8 +2311,6 @@ func TestTriggerByPriceAuctionPriceInBounds(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 100000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) // set auction duration tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Duration(auctionExtensionSeconds)*time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) @@ -2562,8 +2562,6 @@ func TestTriggerByPriceAuctionPriceOutsideBounds(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 100000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) // set auction duration tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Duration(auctionExtensionSeconds)*time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) @@ -2795,8 +2793,6 @@ func TestTriggerByMarketOrder(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 100000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Duration(auctionExtensionSeconds)*time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -3024,8 +3020,6 @@ func TestPriceMonitoringBoundsInGetMarketData(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 100000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Duration(extension)*time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -3246,8 +3240,6 @@ func TestTargetStakeReturnedAndCorrect(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 100000000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -3324,8 +3316,6 @@ func TestTargetStakeReturnedAndCorrect(t *testing.T) { require.Equal(t, expectedTargetStake.String(), mktData.TargetStake) } -// TODO karel - implement test for amending commitment - func TestSuppliedStakeReturnedAndCorrect(t *testing.T) { party1 := "party1" party2 := "party2" @@ -3622,8 +3612,6 @@ func TestOrderBook_Crash2599(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -3792,8 +3780,6 @@ func TestTriggerAfterOpeningAuction(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Duration(auctionExtensionSeconds)*time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -3969,8 +3955,6 @@ func TestOrderBook_Crash2718(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -4188,8 +4172,6 @@ func TestOrderBook_CrashWithDistressedPartyPeggedOrderNotRemovedFromPeggedList27 tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -4359,8 +4341,6 @@ func TestOrderBook_AmendTIME_IN_FORCEForPeggedOrder(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -4456,8 +4436,6 @@ func TestOrderBook_AmendTIME_IN_FORCEForPeggedOrder2(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -4558,8 +4536,6 @@ func TestOrderBook_AmendFilledWithActiveStatus2736(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -4706,8 +4682,6 @@ func TestOrderBook_AmendGFNToGTCOrGTTNotAllowed2486(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -4912,8 +4886,6 @@ func TestOrderBook_ParkPeggedOrderWhenMovingToAuction(t *testing.T) { tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -5011,9 +4983,6 @@ func TestMarket_LeaveAuctionAndRepricePeggedOrders(t *testing.T) { addAccount(t, tm, auxParty) tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(0)) - // Start the opening auction tm.mas.StartOpeningAuction(now, &types.AuctionDuration{Duration: 10}) tm.mas.AuctionStarted(ctx, now) @@ -5074,8 +5043,6 @@ func TestOrderBook_PartiallyFilledMarketOrderThatWouldWashIOC(t *testing.T) { auxParty := "auxParty" addAccount(t, tm, auxParty) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) require.NotNil(t, conf) @@ -5123,8 +5090,6 @@ func TestOrderBook_PartiallyFilledMarketOrderThatWouldWashFOKSell(t *testing.T) auxParty := "auxParty" addAccount(t, tm, auxParty) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) require.NotNil(t, conf) @@ -5260,8 +5225,6 @@ func TestOrderBook_PartiallyFilledLimitOrderThatWouldWashFOK(t *testing.T) { auxParty := "auxParty" addAccount(t, tm, auxParty) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) require.NotNil(t, conf) @@ -5312,8 +5275,6 @@ func TestOrderBook_PartiallyFilledLimitOrderThatWouldWashFOK(t *testing.T) { assert.Equal(t, uint64(0), o4.Remaining) } -// TODO karel - test that LP can't be cancelled without penalty - func Test3008And3007CancelLiquidityProvision(t *testing.T) { now := time.Unix(10, 0) ctx := vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()) @@ -5321,12 +5282,10 @@ func Test3008And3007CancelLiquidityProvision(t *testing.T) { mktCfg := getMarket(defaultPriceMonitorSettings, &types.AuctionDuration{ Duration: 10000, }) - mktCfg.Fees = &types.Fees{ - Factors: &types.FeeFactors{ - LiquidityFee: num.DecimalFromFloat(0.001), - InfrastructureFee: num.DecimalFromFloat(0.0005), - MakerFee: num.DecimalFromFloat(0.00025), - }, + mktCfg.Fees.Factors = &types.FeeFactors{ + LiquidityFee: num.DecimalFromFloat(0.001), + InfrastructureFee: num.DecimalFromFloat(0.0005), + MakerFee: num.DecimalFromFloat(0.00025), } mktCfg.TradableInstrument.RiskModel = &types.TradableInstrumentLogNormalRiskModel{ LogNormalRiskModel: &types.LogNormalRiskModel{ @@ -5514,12 +5473,10 @@ func Test2963EnsureEquityShareAreInMarketData(t *testing.T) { mktCfg := getMarket(defaultPriceMonitorSettings, &types.AuctionDuration{ Duration: 10000, }) - mktCfg.Fees = &types.Fees{ - Factors: &types.FeeFactors{ - LiquidityFee: num.DecimalFromFloat(0.001), - InfrastructureFee: num.DecimalFromFloat(0.0005), - MakerFee: num.DecimalFromFloat(0.00025), - }, + mktCfg.Fees.Factors = &types.FeeFactors{ + LiquidityFee: num.DecimalFromFloat(0.001), + InfrastructureFee: num.DecimalFromFloat(0.0005), + MakerFee: num.DecimalFromFloat(0.00025), } mktCfg.TradableInstrument.RiskModel = &types.TradableInstrumentLogNormalRiskModel{ LogNormalRiskModel: &types.LogNormalRiskModel{ @@ -5648,7 +5605,7 @@ func Test2963EnsureEquityShareAreInMarketData(t *testing.T) { tm.market.OnTick(ctx, tm.now) require.NoError(t, tm.market.SubmitLiquidityProvision(ctx, lp, "party-2", vgcrypto.RandomHash())) - assert.Equal(t, 1, tm.market.GetLPSCount()) + assert.Equal(t, 0, tm.market.GetLPSCount()) // this is our second stake provider // small player @@ -5663,7 +5620,7 @@ func Test2963EnsureEquityShareAreInMarketData(t *testing.T) { require.NoError(t, tm.market.SubmitLiquidityProvision( ctx, lp2, "party-2-bis", vgcrypto.RandomHash())) - assert.Equal(t, 2, tm.market.GetLPSCount()) + assert.Equal(t, 0, tm.market.GetLPSCount()) tm.now = now.Add(10011 * time.Second) tm.market.OnTick(ctx, tm.now) @@ -5681,12 +5638,10 @@ func TestAverageEntryValuation(t *testing.T) { mktCfg := getMarket(defaultPriceMonitorSettings, &types.AuctionDuration{ Duration: 10000, }) - mktCfg.Fees = &types.Fees{ - Factors: &types.FeeFactors{ - LiquidityFee: num.DecimalFromFloat(0.001), - InfrastructureFee: num.DecimalFromFloat(0.0005), - MakerFee: num.DecimalFromFloat(0.00025), - }, + mktCfg.Fees.Factors = &types.FeeFactors{ + LiquidityFee: num.DecimalFromFloat(0.001), + InfrastructureFee: num.DecimalFromFloat(0.0005), + MakerFee: num.DecimalFromFloat(0.00025), } mktCfg.TradableInstrument.RiskModel = &types.TradableInstrumentLogNormalRiskModel{ LogNormalRiskModel: &types.LogNormalRiskModel{ @@ -5788,12 +5743,10 @@ func TestBondAccountIsReleasedItMarketRejected(t *testing.T) { mktCfg := getMarket(defaultPriceMonitorSettings, &types.AuctionDuration{ Duration: 10000, }) - mktCfg.Fees = &types.Fees{ - Factors: &types.FeeFactors{ - LiquidityFee: num.DecimalFromFloat(0.001), - InfrastructureFee: num.DecimalFromFloat(0.0005), - MakerFee: num.DecimalFromFloat(0.00025), - }, + mktCfg.Fees.Factors = &types.FeeFactors{ + LiquidityFee: num.DecimalFromFloat(0.001), + InfrastructureFee: num.DecimalFromFloat(0.0005), + MakerFee: num.DecimalFromFloat(0.00025), } mktCfg.TradableInstrument.RiskModel = &types.TradableInstrumentLogNormalRiskModel{ LogNormalRiskModel: &types.LogNormalRiskModel{ @@ -5869,7 +5822,6 @@ func TestBondAccountIsReleasedItMarketRejected(t *testing.T) { // tm := getTestMarket(t, now, nil, openingDuration) // c1 := 0.7 // ctx := vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()) -// tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(c1)) // tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) // md := tm.market.GetMarketData() @@ -6183,9 +6135,7 @@ func TestLiquidityMonitoring_BestBidAskExistAfterAuction(t *testing.T) { Duration: 1, } tm := getTestMarket(t, now, nil, openingDuration) - c1 := 0.0 ctx := vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()) - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(c1)) err := tm.market.OnMarketTargetStakeScalingFactorUpdate(num.DecimalFromFloat(0.0)) require.NoError(t, err) md := tm.market.GetMarketData() @@ -6308,12 +6258,10 @@ func TestAmendTrade(t *testing.T) { mktCfg := getMarket(defaultPriceMonitorSettings, &types.AuctionDuration{ Duration: 10000, }) - mktCfg.Fees = &types.Fees{ - Factors: &types.FeeFactors{ - LiquidityFee: num.DecimalFromFloat(0.001), - InfrastructureFee: num.DecimalFromFloat(0.0005), - MakerFee: num.DecimalFromFloat(0.00025), - }, + mktCfg.Fees.Factors = &types.FeeFactors{ + LiquidityFee: num.DecimalFromFloat(0.001), + InfrastructureFee: num.DecimalFromFloat(0.0005), + MakerFee: num.DecimalFromFloat(0.00025), } mktCfg.TradableInstrument.RiskModel = &types.TradableInstrumentLogNormalRiskModel{ LogNormalRiskModel: &types.LogNormalRiskModel{ @@ -6453,3 +6401,94 @@ func Test_7017_UpdatingMarketDuringOpeningAuction(t *testing.T) { tm.market.OnTick(ctx, tm.now) require.Equal(t, types.MarketTradingModeContinuous, tm.market.GetMarketData().MarketTradingMode) } + +func TestLiquidityFeeSettingsWeightedAverage(t *testing.T) { + ctx := vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()) + mktCfg := getMarket(defaultPriceMonitorSettings, &types.AuctionDuration{Duration: 1}) + mktCfg.Fees.LiquidityFeeSettings = &types.LiquidityFeeSettings{ + Method: proto.LiquidityFeeSettings_METHOD_WEIGHTED_AVERAGE, + } + + now := time.Unix(10, 0) + tm := newTestMarket(t, now).Run(context.Background(), mktCfg) + tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) + + tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() + addAccountWithAmount(tm, "lpprov", 10000000) + addAccountWithAmount(tm, "lpprov2", 10000000) + tm.StartOpeningAuction() + + lp := &types.LiquidityProvisionSubmission{ + MarketID: tm.market.GetID(), + CommitmentAmount: num.NewUint(27500), + Fee: num.DecimalFromFloat(0.01), + } + require.NoError(t, tm.market.SubmitLiquidityProvision(context.Background(), lp, "lpprov", vgcrypto.RandomHash())) + + lp2 := &types.LiquidityProvisionSubmission{ + MarketID: tm.market.GetID(), + CommitmentAmount: num.NewUint(27500), + Fee: num.DecimalFromFloat(0.02), + } + require.NoError(t, tm.market.SubmitLiquidityProvision(context.Background(), lp2, "lpprov2", vgcrypto.RandomHash())) + + // leave opening auction + now = now.Add(2 * time.Second) + tm.now = now + tm.market.OnTick(ctx, now) + + var fee string + for _, evt := range tm.events { + if mup, ok := evt.(*events.MarketUpdated); ok { + fee = mup.Market().Fees.Factors.LiquidityFee + } + } + // two LPs with same comittment, fee should be the average (0.01 + 0.02) / 2 = 0.015 + assert.Equal(t, "0.015", fee) +} + +func TestLiquidityFeeSettingsConstantFee(t *testing.T) { + ctx := vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()) + mktCfg := getMarket(defaultPriceMonitorSettings, &types.AuctionDuration{Duration: 1}) + mktCfg.Fees.LiquidityFeeSettings = &types.LiquidityFeeSettings{ + Method: proto.LiquidityFeeSettings_METHOD_CONSTANT, + FeeConstant: num.NewDecimalFromFloat(0.8), + } + + now := time.Unix(10, 0) + tm := newTestMarket(t, now).Run(context.Background(), mktCfg) + tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) + + tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() + addAccountWithAmount(tm, "lpprov", 10000000) + addAccountWithAmount(tm, "lpprov2", 10000000) + tm.StartOpeningAuction() + + lp := &types.LiquidityProvisionSubmission{ + MarketID: tm.market.GetID(), + CommitmentAmount: num.NewUint(27500), + Fee: num.DecimalFromFloat(0.01), + } + require.NoError(t, tm.market.SubmitLiquidityProvision(context.Background(), lp, "lpprov", vgcrypto.RandomHash())) + + lp2 := &types.LiquidityProvisionSubmission{ + MarketID: tm.market.GetID(), + CommitmentAmount: num.NewUint(27500), + Fee: num.DecimalFromFloat(0.02), + } + require.NoError(t, tm.market.SubmitLiquidityProvision(context.Background(), lp2, "lpprov2", vgcrypto.RandomHash())) + + // leave opening auction + now = now.Add(2 * time.Second) + tm.now = now + tm.market.OnTick(ctx, now) + + var fee string + for _, evt := range tm.events { + if mup, ok := evt.(*events.MarketUpdated); ok { + fee = mup.Market().Fees.Factors.LiquidityFee + } + } + // doesn't matter what the LP's set in their nomination, the fee is going to be a constant 0.8 + assert.Equal(t, "0.8", fee) +} diff --git a/core/execution/future/order_test.go b/core/execution/future/order_test.go index ece31464ec..5eccec6819 100644 --- a/core/execution/future/order_test.go +++ b/core/execution/future/order_test.go @@ -21,10 +21,9 @@ import ( "time" "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/types" vegacontext "code.vegaprotocol.io/vega/libs/context" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" - - "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "github.com/golang/mock/gomock" @@ -549,8 +548,6 @@ func TestMarkPriceUpdateAfterPartialFill(t *testing.T) { addAccount(t, tm, auxParty2) addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -690,8 +687,6 @@ func TestAmendPartialFillCancelReplace(t *testing.T) { addAccount(t, tm, auxParty2) addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -835,8 +830,6 @@ func TestPartialFilledWashTrade(t *testing.T) { addAccount(t, tm, auxParty2) addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) @@ -1062,8 +1055,6 @@ func TestUnableToAmendGFAGFN(t *testing.T) { addAccount(t, tm, auxParty2) addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(context.Background(), time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -2017,8 +2008,6 @@ func testPeggedOrderOutputMessages(t *testing.T) { addAccount(t, tm, auxParty2) addAccountWithAmount(tm, "lpprov", 10000000) - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, "alwaysOnBid", types.SideBuy, auxParty, 1, 1) conf, err := tm.market.SubmitOrder(context.Background(), alwaysOnBid) @@ -2994,9 +2983,6 @@ func TestGTTExpiredPartiallyFilled(t *testing.T) { addAccount(t, tm, "bbb") // We probably don't need these orders anymore, but they don't do any harm - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(context.Background(), num.DecimalFromFloat(0)) - // place expiring order o1 := getMarketOrder(tm, tm.now, types.OrderTypeLimit, types.OrderTimeInForceGTT, "Order01", types.SideSell, "aaa", 10, 100) o1.ExpiresAt = tm.now.Add(5 * time.Second).UnixNano() @@ -3128,8 +3114,6 @@ func TestMissingLP(t *testing.T) { addAccount(t, tm, auxParty2) tm.broker.EXPECT().Send(gomock.Any()).AnyTimes() - // Assure liquidity auction won't be triggered - tm.market.OnMarketLiquidityTargetStakeTriggeringRatio(ctx, num.DecimalFromFloat(0)) // ensure auction durations are 1 second tm.market.OnMarketAuctionMinimumDurationUpdate(ctx, time.Second) alwaysOnBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, vgcrypto.RandomHash(), types.SideBuy, auxParty, 1, 800000) @@ -3158,7 +3142,7 @@ func TestMissingLP(t *testing.T) { tm.market.OnTick(ctx, now) // Here we are in auction - assert.True(t, tm.mas.InAuction()) + assert.False(t, tm.mas.InAuction()) // Send LP order lps := &types.LiquidityProvisionSubmission{ @@ -3169,8 +3153,7 @@ func TestMissingLP(t *testing.T) { tm.market.SubmitLiquidityProvision(ctx, lps, party1, vgcrypto.RandomHash()) - // Check we have 2 orders on each side of the book (4 in total) - assert.EqualValues(t, 4, tm.market.GetOrdersOnBookCount()) + assert.EqualValues(t, 2, tm.market.GetOrdersOnBookCount()) // Send in a limit order to move the BEST_BID and MID price newBestBid := getMarketOrder(tm, now, types.OrderTypeLimit, types.OrderTimeInForceGTC, vgcrypto.RandomHash(), types.SideBuy, auxParty, 1, 810000) @@ -3179,8 +3162,8 @@ func TestMissingLP(t *testing.T) { require.NoError(t, err) require.Equal(t, types.OrderStatusActive, conf.Order.Status) - // Check we have 5 orders in total - assert.EqualValues(t, 5, tm.market.GetOrdersOnBookCount()) + // Check we have 3 orders in total + assert.EqualValues(t, 3, tm.market.GetOrdersOnBookCount()) now = now.Add(time.Second * 2) // opening auction is 1 second, move time ahead by 2 seconds so we leave auction tm.now = now tm.market.OnTick(ctx, now) diff --git a/core/execution/future/special_orders.go b/core/execution/future/special_orders.go index 583f22e399..e6393ac470 100644 --- a/core/execution/future/special_orders.go +++ b/core/execution/future/special_orders.go @@ -186,6 +186,9 @@ func (m *Market) updateMargins(ctx context.Context, partiesPos map[string]events ) // now we can check parties positions for party, pos := range partiesPos { + if m.getMarginMode(pos.Party()) == types.MarginModeIsolatedMargin { + continue + } positions = append(positions, pos) mar, err := m.collateral.GetPartyMarginAccount(id, party, m.settlementAsset) if err != nil { diff --git a/core/execution/liquidation/engine.go b/core/execution/liquidation/engine.go new file mode 100644 index 0000000000..4676223a00 --- /dev/null +++ b/core/execution/liquidation/engine.go @@ -0,0 +1,332 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package liquidation + +import ( + "context" + "fmt" + "math" + "time" + + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/execution/common" + "code.vegaprotocol.io/vega/core/idgeneration" + "code.vegaprotocol.io/vega/core/positions" + "code.vegaprotocol.io/vega/core/types" + vegacontext "code.vegaprotocol.io/vega/libs/context" + "code.vegaprotocol.io/vega/libs/crypto" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/logging" +) + +//go:generate go run github.com/golang/mock/mockgen -destination mocks/mocks.go -package mocks code.vegaprotocol.io/vega/core/execution/liquidation Book,MarketLiquidity,IDGen,Positions + +type Book interface { + GetVolumeAtPrice(price *num.Uint, side types.Side) uint64 +} + +type MarketLiquidity interface { + ValidOrdersPriceRange() (*num.Uint, *num.Uint, error) +} + +type IDGen interface { + NextID() string +} + +type Positions interface { + RegisterOrder(ctx context.Context, order *types.Order) *positions.MarketPosition + Update(ctx context.Context, trade *types.Trade, passiveOrder, aggressiveOrder *types.Order) []events.MarketPosition +} + +type Engine struct { + // settings, orderbook, network pos data + log *logging.Logger + cfg *types.LiquidationStrategy + broker common.Broker + mID string + pos *Pos + book Book + as common.AuctionState + nextStep time.Time + tSvc common.TimeService + ml MarketLiquidity + position Positions + stopped bool +} + +// protocol upgrade - default values for existing markets/proposals. +var ( + defaultStrat = &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.05), + } + + // this comes closest to the existing behaviour (trying to close the network position in full in one go). + legacyStrat = &types.LiquidationStrategy{ + DisposalTimeStep: 0 * time.Second, + DisposalFraction: num.DecimalOne(), + FullDisposalSize: math.MaxUint64, + MaxFractionConsumed: num.DecimalOne(), + } +) + +// GetDefaultStrat is exporeted, expected to be used to update existing proposals on protocol upgrade +// once that's happened, this code can be removed. +func GetDefaultStrat() *types.LiquidationStrategy { + return defaultStrat.DeepClone() +} + +// GetLegacyStrat is exported, same as defaul. This can be used for protocol upgrade +// it most closely resebles the old behaviour (network attempts to close out fully, in one go) +// this can be removed once protocol upgrade has completed. +func GetLegacyStrat() *types.LiquidationStrategy { + return legacyStrat.DeepClone() +} + +func New(log *logging.Logger, cfg *types.LiquidationStrategy, mktID string, broker common.Broker, book Book, as common.AuctionState, tSvc common.TimeService, ml MarketLiquidity, pe Positions) *Engine { + // NOTE: This can be removed after protocol upgrade + if cfg == nil { + cfg = legacyStrat.DeepClone() + } + return &Engine{ + log: log, + cfg: cfg, + broker: broker, + mID: mktID, + book: book, + as: as, + tSvc: tSvc, + ml: ml, + position: pe, + pos: &Pos{}, + } +} + +func (e *Engine) Update(cfg *types.LiquidationStrategy) { + if !e.nextStep.IsZero() { + since := e.nextStep.Add(-e.cfg.DisposalTimeStep) // work out when the network position was last updated + e.nextStep = since.Add(cfg.DisposalTimeStep) + } + // now update the config + e.cfg = cfg +} + +func (e *Engine) OnTick(ctx context.Context, now time.Time) (*types.Order, error) { + if e.pos.open == 0 || e.as.InAuction() || e.nextStep.After(now) { + return nil, nil + } + minP, maxP, err := e.ml.ValidOrdersPriceRange() + if err != nil { + return nil, err + } + vol := e.pos.open + bookSide := types.SideBuy + side := types.SideSell + bound := minP + price := minP + if vol < 0 { + vol *= -1 + side, bookSide = bookSide, side + price, bound = maxP, maxP + } + size := uint64(vol) + if size > e.cfg.FullDisposalSize { + // absolute size of network position * disposal fraction -> rounded + size = uint64(num.DecimalFromFloat(float64(size)).Mul(e.cfg.DisposalFraction).Ceil().IntPart()) + } + available := e.book.GetVolumeAtPrice(bound, bookSide) + if available == 0 { + return nil, nil + } + // round up, avoid a value like 0.1 to be floored, favour closing out a position of 1 at least + maxCons := uint64(num.DecimalFromFloat(float64(available)).Mul(e.cfg.MaxFractionConsumed).Ceil().IntPart()) + if maxCons < size { + size = maxCons + } + // get the block hash + _, blockHash := vegacontext.TraceIDFromContext(ctx) + idgen := idgeneration.New(blockHash + crypto.HashStrToHex("networkLS"+e.mID)) + // set time for next order, if the position ends up closed out, then that's fine + // we'll remove this time when the position is updated + if size == 0 { + return nil, nil + } + e.nextStep = now.Add(e.cfg.DisposalTimeStep) + // place order using size + return &types.Order{ + ID: idgen.NextID(), + MarketID: e.mID, + Party: types.NetworkParty, + Side: side, + Price: price, + Size: size, + Remaining: size, + TimeInForce: types.OrderTimeInForceIOC, + Type: types.OrderTypeLimit, + CreatedAt: now.UnixNano(), + Status: types.OrderStatusActive, + Reference: "LS", // Liquidity sourcing + }, nil +} + +// ClearDistressedParties transfers the open positions to the network, returns the market position events and party ID's +// for the market to remove the parties from things like positions engine and collateral. +func (e *Engine) ClearDistressedParties(ctx context.Context, idgen IDGen, closed []events.Margin, mp, mmp *num.Uint) ([]events.MarketPosition, []string, []*types.Trade) { + if len(closed) == 0 { + return nil, nil, nil + } + // netork is most likely going to hold an actual position now, let's set up the time step when we attempt to dispose + // of (some) of the volume + if e.pos.open == 0 || e.nextStep.IsZero() { + e.nextStep = e.tSvc.GetTimeNow().Add(e.cfg.DisposalTimeStep) + } + mps := make([]events.MarketPosition, 0, len(closed)) + parties := make([]string, 0, len(closed)) + // order events here + orders := make([]events.Event, 0, len(closed)*2) + // trade events here + trades := make([]events.Event, 0, len(closed)) + netTrades := make([]*types.Trade, 0, len(closed)) + now := e.tSvc.GetTimeNow() + for _, cp := range closed { + e.pos.open += cp.Size() + // get the orders and trades so we can send events to update the datanode + o1, o2, t := e.getOrdersAndTrade(ctx, cp, idgen, now, mp, mmp) + orders = append(orders, events.NewOrderEvent(ctx, o1), events.NewOrderEvent(ctx, o2)) + trades = append(trades, events.NewTradeEvent(ctx, *t)) + netTrades = append(netTrades, t) + // add the confiscated balance to the fee pool that can be taken from the insurance pool to pay fees to + // the good parties when the network closes itself out. + mps = append(mps, cp) + parties = append(parties, cp.Party()) + } + // send order events + e.broker.SendBatch(orders) + // send trade events + e.broker.SendBatch(trades) + // the network has no (more) remaining open position -> no need for the e.nextStep to be set + e.log.Info("network position after close-out", logging.Int64("network-position", e.pos.open)) + if e.pos.open == 0 { + e.nextStep = time.Time{} + } + return mps, parties, netTrades +} + +func (e *Engine) UpdateMarkPrice(mp *num.Uint) { + e.pos.price = mp +} + +func (e *Engine) GetNetworkPosition() events.MarketPosition { + return e.pos +} + +func (e *Engine) UpdateNetworkPosition(trades []*types.Trade) { + sign := int64(1) + if e.pos.open < 0 { + sign *= -1 + } + for _, t := range trades { + delta := int64(t.Size) * sign + e.pos.open -= delta + } + if e.pos.open == 0 { + e.nextStep = time.Time{} + } else if e.nextStep.IsZero() { + e.nextStep = e.tSvc.GetTimeNow().Add(e.cfg.DisposalTimeStep) + } +} + +func (e *Engine) getOrdersAndTrade(ctx context.Context, pos events.Margin, idgen IDGen, now time.Time, price, dpPrice *num.Uint) (*types.Order, *types.Order, *types.Trade) { + tSide, nSide := types.SideSell, types.SideBuy // one of them will have to sell + s := pos.Size() + size := uint64(s) + if s < 0 { + size = uint64(-s) + // swap sides + nSide, tSide = tSide, nSide + } + var buyID, sellID, buyParty, sellParty string + order := types.Order{ + ID: idgen.NextID(), + MarketID: e.mID, + Status: types.OrderStatusFilled, + Party: types.NetworkParty, + Price: price, + OriginalPrice: dpPrice, + CreatedAt: now.UnixNano(), + Reference: "close-out distressed", + TimeInForce: types.OrderTimeInForceFOK, // this is an all-or-nothing order, so TIME_IN_FORCE == FOK + Type: types.OrderTypeNetwork, + Size: size, + Remaining: size, + Side: nSide, + } + e.position.RegisterOrder(ctx, &order) + order.Remaining = 0 + partyOrder := types.Order{ + ID: idgen.NextID(), + MarketID: e.mID, + Size: size, + Remaining: size, + Status: types.OrderStatusFilled, + Party: pos.Party(), + Side: tSide, // assume sell, price is zero in that case anyway + Price: price, // average price + OriginalPrice: dpPrice, + CreatedAt: now.UnixNano(), + Reference: fmt.Sprintf("distressed-%s", pos.Party()), + TimeInForce: types.OrderTimeInForceFOK, // this is an all-or-nothing order, so TIME_IN_FORCE == FOK + Type: types.OrderTypeNetwork, + } + e.position.RegisterOrder(ctx, &partyOrder) + partyOrder.Remaining = 0 + buyParty = order.Party + sellParty = partyOrder.Party + sellID = partyOrder.ID + buyID = order.ID + if tSide == types.SideBuy { + sellID, buyID = buyID, sellID + buyParty, sellParty = sellParty, buyParty + } + trade := types.Trade{ + ID: idgen.NextID(), + MarketID: e.mID, + Price: price, + MarketPrice: dpPrice, + Size: size, + Aggressor: order.Side, // we consider network to be aggressor + BuyOrder: buyID, + SellOrder: sellID, + Buyer: buyParty, + Seller: sellParty, + Timestamp: now.UnixNano(), + Type: types.TradeTypeNetworkCloseOutBad, + SellerFee: types.NewFee(), + BuyerFee: types.NewFee(), + } + // the for the rest of the core, this should not seem like a wash trade though... + e.position.Update(ctx, &trade, &order, &partyOrder) + return &order, &partyOrder, &trade +} + +func (e *Engine) GetNextCloseoutTS() int64 { + if e.nextStep.IsZero() { + return 0 + } + return e.nextStep.UnixNano() +} diff --git a/core/execution/liquidation/engine_test.go b/core/execution/liquidation/engine_test.go new file mode 100644 index 0000000000..34aab3a0f3 --- /dev/null +++ b/core/execution/liquidation/engine_test.go @@ -0,0 +1,575 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package liquidation_test + +import ( + "context" + "errors" + "fmt" + "testing" + "time" + + bmocks "code.vegaprotocol.io/vega/core/broker/mocks" + "code.vegaprotocol.io/vega/core/events" + cmocks "code.vegaprotocol.io/vega/core/execution/common/mocks" + "code.vegaprotocol.io/vega/core/execution/liquidation" + "code.vegaprotocol.io/vega/core/execution/liquidation/mocks" + "code.vegaprotocol.io/vega/core/types" + vegacontext "code.vegaprotocol.io/vega/libs/context" + vgcrypto "code.vegaprotocol.io/vega/libs/crypto" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/logging" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" +) + +type tstEngine struct { + *liquidation.Engine + ctrl *gomock.Controller + book *mocks.MockBook + ml *mocks.MockMarketLiquidity + idgen *mocks.MockIDGen + as *cmocks.MockAuctionState + broker *bmocks.MockBroker + tSvc *cmocks.MockTimeService + pos *mocks.MockPositions +} + +type marginStub struct { + party string + size int64 + market string +} + +type SliceLenMatcher[T any] int + +func TestOrderbookPriceLimits(t *testing.T) { + t.Run("orderbook has no volume", testOrderbookHasNoVolume) + t.Run("orderbook has a volume of one (consumed fraction rounding)", testOrderbookFractionRounding) + t.Run("orderbook has plenty of volume (should not increase order size)", testOrderbookExceedsVolume) +} + +func TestNetworkReducesOverTime(t *testing.T) { + // basic setup can be shared across these tests + mID := "intervalMkt" + ctx := vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()) + config := &types.LiquidationStrategy{ + DisposalTimeStep: 5 * time.Second, // decrease volume every 5 seconds + DisposalFraction: num.DecimalFromFloat(0.1), // remove 10% each step + FullDisposalSize: 10, // a volume of 10 or less can be removed in one go + MaxFractionConsumed: num.DecimalFromFloat(0.2), // never use more than 20% of the available volume + } + eng := getTestEngine(t, mID, config.DeepClone()) + defer eng.Finish() + // setup: create a party with volume of 10 long as the distressed party + closed := []events.Margin{ + createMarginEvent("party1", mID, 10), + createMarginEvent("party2", mID, 10), + createMarginEvent("party3", mID, 10), + createMarginEvent("party4", mID, 10), + createMarginEvent("party5", mID, 10), + } + totalSize := uint64(50) + now := time.Now() + eng.tSvc.EXPECT().GetTimeNow().Times(2).Return(now) + idCount := len(closed) * 3 + eng.idgen.EXPECT().NextID().Times(idCount).Return("nextID") + // 2 orders per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](2 * len(closed))).Times(1) + // 1 trade per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](1 * len(closed))).Times(1) + eng.pos.EXPECT().RegisterOrder(gomock.Any(), gomock.Any()).Times(2 * len(closed)) + eng.pos.EXPECT().Update(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(len(closed)) + pos, parties, trades := eng.ClearDistressedParties(ctx, eng.idgen, closed, num.UintZero(), num.UintZero()) + require.Equal(t, len(closed), len(trades)) + require.Equal(t, len(closed), len(pos)) + require.Equal(t, len(closed), len(parties)) + require.Equal(t, closed[0].Party(), parties[0]) + + t.Run("call to ontick within the time step does nothing", func(t *testing.T) { + now = now.Add(2 * time.Second) + eng.as.EXPECT().InAuction().Times(1).Return(false) + order, err := eng.OnTick(ctx, now) + require.Nil(t, order) + require.NoError(t, err) + }) + + t.Run("after the time step passes, the first batch is disposed of", func(t *testing.T) { + now = now.Add(3 * time.Second) + minP, maxP := num.UintZero(), num.UintOne() + eng.as.EXPECT().InAuction().Times(1).Return(false) + eng.ml.EXPECT().ValidOrdersPriceRange().Times(1).Return(minP, maxP, nil) + // return a large volume so the full step is disposed + eng.book.EXPECT().GetVolumeAtPrice(gomock.Any(), gomock.Any()).Times(1).Return(uint64(1000)) + order, err := eng.OnTick(ctx, now) + require.NoError(t, err) + require.NotNil(t, order) + require.Equal(t, uint64(5), order.Size) + }) + + t.Run("ensure the next time step is set", func(t *testing.T) { + now = now.Add(2 * time.Second) + eng.as.EXPECT().InAuction().Times(1).Return(false) + order, err := eng.OnTick(ctx, now) + require.Nil(t, order) + require.NoError(t, err) + }) + + // ready to dispose again from here on + t.Run("while in auction, the position is not reduced", func(t *testing.T) { + // pass another step + now = now.Add(3 * time.Second) + eng.as.EXPECT().InAuction().Times(1).Return(true) + order, err := eng.OnTick(ctx, now) + require.Nil(t, order) + require.NoError(t, err) + }) + + t.Run("when not in auction, if there is no price range, there is no trade", func(t *testing.T) { + eng.as.EXPECT().InAuction().Times(1).Return(false) + mlErr := errors.New("some error") + eng.ml.EXPECT().ValidOrdersPriceRange().Times(1).Return(nil, nil, mlErr) + order, err := eng.OnTick(ctx, now) + require.Nil(t, order) + require.Error(t, err) + require.Equal(t, mlErr, err) + }) + + t.Run("No longer in auction and we have a price range finally generates the order", func(t *testing.T) { + minP, maxP := num.UintZero(), num.UintOne() + eng.as.EXPECT().InAuction().Times(1).Return(false) + eng.ml.EXPECT().ValidOrdersPriceRange().Times(1).Return(minP, maxP, nil) + // return a large volume so the full step is disposed + eng.book.EXPECT().GetVolumeAtPrice(gomock.Any(), gomock.Any()).Times(1).Return(uint64(1000)) + order, err := eng.OnTick(ctx, now) + require.NoError(t, err) + require.NotNil(t, order) + require.Equal(t, uint64(5), order.Size) + }) + + t.Run("increasing the position of the network does not change the time step", func(t *testing.T) { + now = now.Add(time.Second) + closed := []events.Margin{ + createMarginEvent("party", mID, 1), + } + eng.tSvc.EXPECT().GetTimeNow().Times(1).Return(now) + idCount := len(closed) * 3 + eng.idgen.EXPECT().NextID().Times(idCount).Return("nextID") + // 2 orders per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](2 * len(closed))).Times(1) + // 1 trade per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](1 * len(closed))).Times(1) + eng.pos.EXPECT().RegisterOrder(gomock.Any(), gomock.Any()).Times(len(closed) * 2) + eng.pos.EXPECT().Update(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(len(closed)) + pos, parties, trades := eng.ClearDistressedParties(ctx, eng.idgen, closed, num.UintZero(), num.UintZero()) + require.Equal(t, len(closed), len(trades)) + require.Equal(t, len(closed), len(pos)) + require.Equal(t, len(closed), len(parties)) + require.Equal(t, closed[0].Party(), parties[0]) + totalSize++ + // now increase time by 4 seconds should dispose 5.1 -> 5 + now = now.Add(4 * time.Second) + minP, maxP := num.UintZero(), num.UintOne() + eng.as.EXPECT().InAuction().Times(1).Return(false) + eng.ml.EXPECT().ValidOrdersPriceRange().Times(1).Return(minP, maxP, nil) + // return a large volume so the full step is disposed + eng.book.EXPECT().GetVolumeAtPrice(gomock.Any(), gomock.Any()).Times(1).Return(uint64(1000)) + order, err := eng.OnTick(ctx, now) + require.NoError(t, err) + require.NotNil(t, order) + require.Equal(t, uint64(num.DecimalFromFloat(float64(totalSize)).Div(num.DecimalFromFloat(float64(10))).Ceil().IntPart()), order.Size) + }) + + t.Run("Updating the config changes the time left until the next step", func(t *testing.T) { + now = now.Add(time.Second) + eng.as.EXPECT().InAuction().Times(1).Return(false) + order, err := eng.OnTick(ctx, now) + require.Nil(t, order) + require.NoError(t, err) + // 4s to go, but... + config.DisposalTimeStep = 3 * time.Second + eng.Update(config.DeepClone()) + now = now.Add(2 * time.Second) + // only 3 seconds later and we dispose of the next batch + minP, maxP := num.UintZero(), num.UintOne() + eng.as.EXPECT().InAuction().Times(1).Return(false) + eng.ml.EXPECT().ValidOrdersPriceRange().Times(1).Return(minP, maxP, nil) + // return a large volume so the full step is disposed + eng.book.EXPECT().GetVolumeAtPrice(gomock.Any(), gomock.Any()).Times(1).Return(uint64(1000)) + order, err = eng.OnTick(ctx, now) + require.NoError(t, err) + require.NotNil(t, order) + require.Equal(t, uint64(num.DecimalFromFloat(float64(totalSize)).Div(num.DecimalFromFloat(float64(10))).Ceil().IntPart()), order.Size) + }) + + t.Run("Once the remaining volume of the network is LTE full disposal position, the network creates an order for its full position", func(t *testing.T) { + // use trades to reduce its position + size := uint64(eng.GetNetworkPosition().Size()) - config.FullDisposalSize + eng.UpdateNetworkPosition([]*types.Trade{ + { + ID: "someTrade", + MarketID: mID, + Size: size, + }, + }) + require.True(t, uint64(eng.GetNetworkPosition().Size()) <= config.FullDisposalSize) + now = now.Add(3 * time.Second) + // only 3 seconds later and we dispose of the next batch + minP, maxP := num.UintZero(), num.UintOne() + eng.as.EXPECT().InAuction().Times(1).Return(false) + eng.ml.EXPECT().ValidOrdersPriceRange().Times(1).Return(minP, maxP, nil) + // return a large volume so the full step is disposed + eng.book.EXPECT().GetVolumeAtPrice(gomock.Any(), gomock.Any()).Times(1).Return(uint64(1000)) + order, err := eng.OnTick(ctx, now) + require.NoError(t, err) + require.NotNil(t, order) + require.Equal(t, config.FullDisposalSize, order.Size) + }) +} + +func testOrderbookHasNoVolume(t *testing.T) { + mID := "market" + ctx := vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()) + eng := getTestEngine(t, mID, nil) + defer eng.Finish() + // setup: create a party with volume of 10 long as the distressed party + closed := []events.Margin{ + createMarginEvent("party", mID, 10), + } + now := time.Now() + eng.tSvc.EXPECT().GetTimeNow().Times(2).Return(now) + idCount := len(closed) * 3 + eng.idgen.EXPECT().NextID().Times(idCount).Return("nextID") + // 2 orders per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](2 * len(closed))).Times(1) + // 1 trade per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](1 * len(closed))).Times(1) + eng.pos.EXPECT().RegisterOrder(gomock.Any(), gomock.Any()).Times(len(closed) * 2) + eng.pos.EXPECT().Update(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(len(closed)) + pos, parties, trades := eng.ClearDistressedParties(ctx, eng.idgen, closed, num.UintZero(), num.UintZero()) + require.Equal(t, len(closed), len(trades)) + require.Equal(t, len(closed), len(pos)) + require.Equal(t, len(closed), len(parties)) + require.Equal(t, closed[0].Party(), parties[0]) + // now when we close out, the book returns a volume of 0 is available + minP, maxP := num.UintZero(), num.UintOne() + eng.as.EXPECT().InAuction().Times(1).Return(false) + eng.ml.EXPECT().ValidOrdersPriceRange().Times(1).Return(minP, maxP, nil) + eng.book.EXPECT().GetVolumeAtPrice(minP, types.SideBuy).Times(1).Return(uint64(0)) + order, err := eng.OnTick(ctx, now) + require.NoError(t, err) + require.Nil(t, order) +} + +func testOrderbookFractionRounding(t *testing.T) { + mID := "smallMkt" + ctx := vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()) + config := types.LiquidationStrategy{ + DisposalTimeStep: 0, + DisposalFraction: num.DecimalOne(), + FullDisposalSize: 1000000, // plenty + MaxFractionConsumed: num.DecimalFromFloat(0.5), + } + eng := getTestEngine(t, mID, &config) + defer eng.Finish() + closed := []events.Margin{ + createMarginEvent("party", mID, 10), + } + var netVol int64 + for _, c := range closed { + netVol += c.Size() + } + now := time.Now() + eng.tSvc.EXPECT().GetTimeNow().Times(2).Return(now) + idCount := len(closed) * 3 + eng.idgen.EXPECT().NextID().Times(idCount).Return("nextID") + // 2 orders per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](2 * len(closed))).Times(1) + // 1 trade per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](1 * len(closed))).Times(1) + eng.pos.EXPECT().RegisterOrder(gomock.Any(), gomock.Any()).Times(len(closed) * 2) + eng.pos.EXPECT().Update(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(len(closed)) + pos, parties, trades := eng.ClearDistressedParties(ctx, eng.idgen, closed, num.UintZero(), num.UintZero()) + require.Equal(t, len(closed), len(trades)) + require.Equal(t, len(closed), len(pos)) + require.Equal(t, len(closed), len(parties)) + require.Equal(t, closed[0].Party(), parties[0]) + // now the available volume on the book is 1, with the fraction that gets rounded to 0.5 + // which should be rounded UP to 1. + minP, maxP := num.UintZero(), num.UintOne() + eng.as.EXPECT().InAuction().Times(1).Return(false) + eng.ml.EXPECT().ValidOrdersPriceRange().Times(1).Return(minP, maxP, nil) + eng.book.EXPECT().GetVolumeAtPrice(minP, types.SideBuy).Times(1).Return(uint64(1)) + order, err := eng.OnTick(ctx, now) + require.NoError(t, err) + require.Equal(t, uint64(1), order.Size) +} + +func testOrderbookExceedsVolume(t *testing.T) { + mID := "market" + ctx := vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()) + config := types.LiquidationStrategy{ + DisposalTimeStep: 0, + DisposalFraction: num.DecimalOne(), + FullDisposalSize: 1000000, // plenty + MaxFractionConsumed: num.DecimalFromFloat(0.5), + } + eng := getTestEngine(t, mID, &config) + defer eng.Finish() + closed := []events.Margin{ + createMarginEvent("party", mID, 10), + } + var netVol int64 + for _, c := range closed { + netVol += c.Size() + } + now := time.Now() + eng.tSvc.EXPECT().GetTimeNow().Times(2).Return(now) + idCount := len(closed) * 3 + eng.idgen.EXPECT().NextID().Times(idCount).Return("nextID") + // 2 orders per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](2 * len(closed))).Times(1) + // 1 trade per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](1 * len(closed))).Times(1) + eng.pos.EXPECT().RegisterOrder(gomock.Any(), gomock.Any()).Times(len(closed) * 2) + eng.pos.EXPECT().Update(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(len(closed)) + pos, parties, trades := eng.ClearDistressedParties(ctx, eng.idgen, closed, num.UintZero(), num.UintZero()) + require.Equal(t, len(closed), len(trades)) + require.Equal(t, len(closed), len(pos)) + require.Equal(t, len(closed), len(parties)) + require.Equal(t, closed[0].Party(), parties[0]) + minP, maxP := num.UintZero(), num.UintOne() + eng.as.EXPECT().InAuction().Times(1).Return(false) + eng.ml.EXPECT().ValidOrdersPriceRange().Times(1).Return(minP, maxP, nil) + // orderbook has 100x the available volume, with a factor of 0.5, that's still 50x + eng.book.EXPECT().GetVolumeAtPrice(minP, types.SideBuy).Times(1).Return(uint64(netVol * 10)) + order, err := eng.OnTick(ctx, now) + require.NoError(t, err) + require.Equal(t, uint64(netVol), order.Size) +} + +func TestLegacySupport(t *testing.T) { + // simple test to make sure that passing nil for the config does not cause issues. + mID := "market" + ctx := vegacontext.WithTraceID(context.Background(), vgcrypto.RandomHash()) + eng := getTestEngine(t, mID, nil) + defer eng.Finish() + require.False(t, eng.Stopped()) + // let's check if we get back an order, create the margin events + closed := []events.Margin{ + createMarginEvent("party", mID, 10), + } + var netVol int64 + for _, c := range closed { + netVol += c.Size() + } + now := time.Now() + eng.tSvc.EXPECT().GetTimeNow().Times(2).Return(now) + idCount := len(closed) * 3 + eng.idgen.EXPECT().NextID().Times(idCount).Return("nextID") + // 2 orders per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](2 * len(closed))).Times(1) + // 1 trade per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](1 * len(closed))).Times(1) + eng.pos.EXPECT().RegisterOrder(gomock.Any(), gomock.Any()).Times(len(closed) * 2) + eng.pos.EXPECT().Update(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(len(closed)) + pos, parties, trades := eng.ClearDistressedParties(ctx, eng.idgen, closed, num.UintZero(), num.UintZero()) + require.Equal(t, len(closed), len(trades)) + require.Equal(t, len(closed), len(pos)) + require.Equal(t, len(closed), len(parties)) + require.Equal(t, closed[0].Party(), parties[0]) + // now that the network has a position, do the same thing, we should see the time service gets called only once + closed = []events.Margin{ + createMarginEvent("another party", mID, 5), + } + for _, c := range closed { + netVol += c.Size() + } + eng.tSvc.EXPECT().GetTimeNow().Times(1).Return(now) + idCount = len(closed) * 3 + eng.idgen.EXPECT().NextID().Times(idCount).Return("nextID") + // 2 orders per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](2 * len(closed))).Times(1) + // 1 trade per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](1 * len(closed))).Times(1) + eng.pos.EXPECT().RegisterOrder(gomock.Any(), gomock.Any()).Times(len(closed) * 2) + eng.pos.EXPECT().Update(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(len(closed)) + pos, parties, trades = eng.ClearDistressedParties(ctx, eng.idgen, closed, num.UintZero(), num.UintZero()) + require.Equal(t, len(closed), len(trades)) + require.Equal(t, len(closed), len(pos)) + require.Equal(t, len(closed), len(parties)) + require.Equal(t, closed[0].Party(), parties[0]) + // now we should see an order for size 15 returned + minP, maxP := num.UintZero(), num.UintOne() + eng.as.EXPECT().InAuction().Times(1).Return(false) + eng.ml.EXPECT().ValidOrdersPriceRange().Times(1).Return(minP, maxP, nil) + eng.book.EXPECT().GetVolumeAtPrice(minP, types.SideBuy).Times(1).Return(uint64(netVol)) + order, err := eng.OnTick(ctx, now) + require.NoError(t, err) + require.Equal(t, uint64(netVol), order.Size) + // now reduce the network size through distressed short position + closed = []events.Margin{ + createMarginEvent("another party", mID, -netVol), + } + for _, c := range closed { + netVol += c.Size() + } + require.Equal(t, int64(0), netVol) + // just check the margin position event we return, too + eng.tSvc.EXPECT().GetTimeNow().Times(1).Return(now) + idCount = len(closed) * 3 + eng.idgen.EXPECT().NextID().Times(idCount).Return("nextID") + // 2 orders per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](2 * len(closed))).Times(1) + // 1 trade per closed position + eng.broker.EXPECT().SendBatch(SliceLenMatcher[events.Event](1 * len(closed))).Times(1) + eng.pos.EXPECT().RegisterOrder(gomock.Any(), gomock.Any()).Times(len(closed) * 2) + eng.pos.EXPECT().Update(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(len(closed)) + pos, parties, trades = eng.ClearDistressedParties(ctx, eng.idgen, closed, num.UintZero(), num.UintZero()) + require.Equal(t, len(closed), len(trades)) + require.Equal(t, len(closed), len(pos)) + require.Equal(t, len(closed), len(parties)) + require.Equal(t, closed[0].Party(), parties[0]) + require.Equal(t, netVol, eng.GetNetworkPosition().Size()) + // now we should see no error, and no order returned + order, err = eng.OnTick(ctx, now) + require.NoError(t, err) + require.Nil(t, order) + // now just make sure stopping for snapshots works as expected + eng.StopSnapshots() + require.True(t, eng.Stopped()) +} + +func createMarginEvent(party, market string, size int64) events.Margin { + return &marginStub{ + party: party, + market: market, + size: size, + } +} + +func (m *marginStub) Party() string { + return m.party +} + +func (m *marginStub) Size() int64 { + return m.size +} + +func (m *marginStub) Buy() int64 { + return 0 +} + +func (m *marginStub) Sell() int64 { + return 0 +} + +func (m *marginStub) Price() *num.Uint { + return nil +} + +func (m *marginStub) BuySumProduct() *num.Uint { + return nil +} + +func (m *marginStub) SellSumProduct() *num.Uint { + return nil +} + +func (m *marginStub) VWBuy() *num.Uint { + return nil +} + +func (m *marginStub) VWSell() *num.Uint { + return nil +} + +func (m *marginStub) AverageEntryPrice() *num.Uint { + return nil +} + +func (m *marginStub) Asset() string { + return "" +} + +func (m *marginStub) MarginBalance() *num.Uint { + return nil +} + +func (m *marginStub) OrderMarginBalance() *num.Uint { + return nil +} + +func (m *marginStub) GeneralBalance() *num.Uint { + return nil +} + +func (m *marginStub) GeneralAccountBalance() *num.Uint { + return nil +} + +func (m *marginStub) BondBalance() *num.Uint { + return nil +} + +func (m *marginStub) MarketID() string { + return m.market +} + +func (m *marginStub) MarginShortFall() *num.Uint { + return nil +} + +func getTestEngine(t *testing.T, marketID string, config *types.LiquidationStrategy) *tstEngine { + t.Helper() + ctrl := gomock.NewController(t) + book := mocks.NewMockBook(ctrl) + ml := mocks.NewMockMarketLiquidity(ctrl) + idgen := mocks.NewMockIDGen(ctrl) + as := cmocks.NewMockAuctionState(ctrl) + broker := bmocks.NewMockBroker(ctrl) + tSvc := cmocks.NewMockTimeService(ctrl) + pe := mocks.NewMockPositions(ctrl) + engine := liquidation.New(logging.NewDevLogger(), config, marketID, broker, book, as, tSvc, ml, pe) + return &tstEngine{ + Engine: engine, + ctrl: ctrl, + book: book, + ml: ml, + idgen: idgen, + as: as, + broker: broker, + tSvc: tSvc, + pos: pe, + } +} + +func (t *tstEngine) Finish() { + t.ctrl.Finish() +} + +func (l SliceLenMatcher[T]) Matches(v any) bool { + sv, ok := v.([]T) + if !ok { + return false + } + return len(sv) == int(l) +} + +func (l SliceLenMatcher[T]) String() string { + return fmt.Sprintf("matches slice of length %d", int(l)) +} diff --git a/core/execution/liquidation/mocks/mocks.go b/core/execution/liquidation/mocks/mocks.go new file mode 100644 index 0000000000..8437a88868 --- /dev/null +++ b/core/execution/liquidation/mocks/mocks.go @@ -0,0 +1,181 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: code.vegaprotocol.io/vega/core/execution/liquidation (interfaces: Book,MarketLiquidity,IDGen,Positions) + +// Package mocks is a generated GoMock package. +package mocks + +import ( + context "context" + reflect "reflect" + + events "code.vegaprotocol.io/vega/core/events" + positions "code.vegaprotocol.io/vega/core/positions" + types "code.vegaprotocol.io/vega/core/types" + num "code.vegaprotocol.io/vega/libs/num" + vega "code.vegaprotocol.io/vega/protos/vega" + gomock "github.com/golang/mock/gomock" +) + +// MockBook is a mock of Book interface. +type MockBook struct { + ctrl *gomock.Controller + recorder *MockBookMockRecorder +} + +// MockBookMockRecorder is the mock recorder for MockBook. +type MockBookMockRecorder struct { + mock *MockBook +} + +// NewMockBook creates a new mock instance. +func NewMockBook(ctrl *gomock.Controller) *MockBook { + mock := &MockBook{ctrl: ctrl} + mock.recorder = &MockBookMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBook) EXPECT() *MockBookMockRecorder { + return m.recorder +} + +// GetVolumeAtPrice mocks base method. +func (m *MockBook) GetVolumeAtPrice(arg0 *num.Uint, arg1 vega.Side) uint64 { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetVolumeAtPrice", arg0, arg1) + ret0, _ := ret[0].(uint64) + return ret0 +} + +// GetVolumeAtPrice indicates an expected call of GetVolumeAtPrice. +func (mr *MockBookMockRecorder) GetVolumeAtPrice(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVolumeAtPrice", reflect.TypeOf((*MockBook)(nil).GetVolumeAtPrice), arg0, arg1) +} + +// MockMarketLiquidity is a mock of MarketLiquidity interface. +type MockMarketLiquidity struct { + ctrl *gomock.Controller + recorder *MockMarketLiquidityMockRecorder +} + +// MockMarketLiquidityMockRecorder is the mock recorder for MockMarketLiquidity. +type MockMarketLiquidityMockRecorder struct { + mock *MockMarketLiquidity +} + +// NewMockMarketLiquidity creates a new mock instance. +func NewMockMarketLiquidity(ctrl *gomock.Controller) *MockMarketLiquidity { + mock := &MockMarketLiquidity{ctrl: ctrl} + mock.recorder = &MockMarketLiquidityMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockMarketLiquidity) EXPECT() *MockMarketLiquidityMockRecorder { + return m.recorder +} + +// ValidOrdersPriceRange mocks base method. +func (m *MockMarketLiquidity) ValidOrdersPriceRange() (*num.Uint, *num.Uint, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidOrdersPriceRange") + ret0, _ := ret[0].(*num.Uint) + ret1, _ := ret[1].(*num.Uint) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// ValidOrdersPriceRange indicates an expected call of ValidOrdersPriceRange. +func (mr *MockMarketLiquidityMockRecorder) ValidOrdersPriceRange() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidOrdersPriceRange", reflect.TypeOf((*MockMarketLiquidity)(nil).ValidOrdersPriceRange)) +} + +// MockIDGen is a mock of IDGen interface. +type MockIDGen struct { + ctrl *gomock.Controller + recorder *MockIDGenMockRecorder +} + +// MockIDGenMockRecorder is the mock recorder for MockIDGen. +type MockIDGenMockRecorder struct { + mock *MockIDGen +} + +// NewMockIDGen creates a new mock instance. +func NewMockIDGen(ctrl *gomock.Controller) *MockIDGen { + mock := &MockIDGen{ctrl: ctrl} + mock.recorder = &MockIDGenMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockIDGen) EXPECT() *MockIDGenMockRecorder { + return m.recorder +} + +// NextID mocks base method. +func (m *MockIDGen) NextID() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NextID") + ret0, _ := ret[0].(string) + return ret0 +} + +// NextID indicates an expected call of NextID. +func (mr *MockIDGenMockRecorder) NextID() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextID", reflect.TypeOf((*MockIDGen)(nil).NextID)) +} + +// MockPositions is a mock of Positions interface. +type MockPositions struct { + ctrl *gomock.Controller + recorder *MockPositionsMockRecorder +} + +// MockPositionsMockRecorder is the mock recorder for MockPositions. +type MockPositionsMockRecorder struct { + mock *MockPositions +} + +// NewMockPositions creates a new mock instance. +func NewMockPositions(ctrl *gomock.Controller) *MockPositions { + mock := &MockPositions{ctrl: ctrl} + mock.recorder = &MockPositionsMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockPositions) EXPECT() *MockPositionsMockRecorder { + return m.recorder +} + +// RegisterOrder mocks base method. +func (m *MockPositions) RegisterOrder(arg0 context.Context, arg1 *types.Order) *positions.MarketPosition { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RegisterOrder", arg0, arg1) + ret0, _ := ret[0].(*positions.MarketPosition) + return ret0 +} + +// RegisterOrder indicates an expected call of RegisterOrder. +func (mr *MockPositionsMockRecorder) RegisterOrder(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterOrder", reflect.TypeOf((*MockPositions)(nil).RegisterOrder), arg0, arg1) +} + +// Update mocks base method. +func (m *MockPositions) Update(arg0 context.Context, arg1 *types.Trade, arg2, arg3 *types.Order) []events.MarketPosition { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].([]events.MarketPosition) + return ret0 +} + +// Update indicates an expected call of Update. +func (mr *MockPositionsMockRecorder) Update(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPositions)(nil).Update), arg0, arg1, arg2, arg3) +} diff --git a/core/execution/liquidation/position.go b/core/execution/liquidation/position.go new file mode 100644 index 0000000000..06e6e89831 --- /dev/null +++ b/core/execution/liquidation/position.go @@ -0,0 +1,72 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package liquidation + +import ( + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" +) + +type Pos struct { + open int64 + price *num.Uint +} + +func (p *Pos) Party() string { + return types.NetworkParty +} + +func (p *Pos) Size() int64 { + return p.open +} + +func (p *Pos) Buy() int64 { + return 0 +} + +func (p *Pos) Sell() int64 { + return 0 +} + +func (p *Pos) Price() *num.Uint { + if p.price == nil { + return num.UintZero() + } + return p.price.Clone() +} + +func (p *Pos) BuySumProduct() *num.Uint { + return num.UintZero() // shouldn't be used +} + +func (p *Pos) SellSumProduct() *num.Uint { + return num.UintZero() // shouldn't be used +} + +func (p *Pos) VWBuy() *num.Uint { + return num.UintZero() // shouldn't be used +} + +func (p *Pos) VWSell() *num.Uint { + return num.UintZero() // shouldn't be used +} + +func (p *Pos) AverageEntryPrice() *num.Uint { + if p.price != nil { + return p.price.Clone() // not sure + } + return num.UintZero() // shouldn't be used +} diff --git a/core/execution/liquidation/snapshot.go b/core/execution/liquidation/snapshot.go new file mode 100644 index 0000000000..2239188968 --- /dev/null +++ b/core/execution/liquidation/snapshot.go @@ -0,0 +1,91 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package liquidation + +import ( + "context" + + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/proto" +) + +func (e *Engine) Namespace() types.SnapshotNamespace { + return types.LiquidationSnapshot +} + +func (e *Engine) Keys() []string { + return []string{e.mID} +} + +// GetState must be thread-safe as it may be called from multiple goroutines concurrently! +func (e *Engine) GetState(key string) ([]byte, []types.StateProvider, error) { + if key != e.mID { + return nil, nil, types.ErrSnapshotKeyDoesNotExist + } + if e.stopped { + return nil, nil, nil + } + payload := e.buildPayload() + + s, err := proto.Marshal(payload.IntoProto()) + return s, nil, err +} + +func (e *Engine) LoadState(ctx context.Context, pl *types.Payload) ([]types.StateProvider, error) { + if e.Namespace() != pl.Namespace() { + return nil, types.ErrInvalidSnapshotNamespace + } + + switch d := pl.Data.(type) { + case *types.LiquidationNode: + e.mID = d.MarketID + e.pos.open = d.NetworkPos + e.nextStep = d.NextStep + if d.Config != nil { + e.cfg = d.Config.DeepClone() + } else { + // @NOTE this can be removed after protocol upgrade has completed + e.cfg = GetLegacyStrat() + } + default: + return nil, types.ErrUnknownSnapshotType + } + return nil, nil +} + +func (e *Engine) Stopped() bool { + return e.stopped +} + +func (e *Engine) StopSnapshots() { + e.stopped = true +} + +func (e *Engine) buildPayload() *types.Payload { + // this should not be needed + var cfg *types.LiquidationStrategy + if e.cfg != nil { + cfg = e.cfg.DeepClone() + } + return &types.Payload{ + Data: &types.LiquidationNode{ + MarketID: e.mID, + NetworkPos: e.pos.open, + NextStep: e.nextStep, + Config: cfg, + }, + } +} diff --git a/core/execution/snapshot_test.go b/core/execution/snapshot_test.go index b9af368a18..75a4d2bcc6 100644 --- a/core/execution/snapshot_test.go +++ b/core/execution/snapshot_test.go @@ -45,8 +45,10 @@ import ( vgtest "code.vegaprotocol.io/vega/libs/test" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -476,8 +478,6 @@ func newMarket(ID string, pubKey *dstypes.SignerPubKey) *types.Market { TimeWindow: 100, ScalingFactor: num.DecimalFromFloat(1.0), }, - TriggeringRatio: num.DecimalFromFloat(0.9), - AuctionExtension: 10000, }, Fees: &types.Fees{ Factors: &types.FeeFactors{ @@ -485,6 +485,9 @@ func newMarket(ID string, pubKey *dstypes.SignerPubKey) *types.Market { InfrastructureFee: num.DecimalFromFloat(0.1), LiquidityFee: num.DecimalFromFloat(0.1), }, + LiquidityFeeSettings: &types.LiquidityFeeSettings{ + Method: vega.LiquidityFeeSettings_METHOD_MARGINAL_COST, + }, }, TradableInstrument: &types.TradableInstrument{ MarginCalculator: &types.MarginCalculator{ @@ -571,6 +574,14 @@ func newMarket(ID string, pubKey *dstypes.SignerPubKey) *types.Market { SlaCompetitionFactor: num.NewDecimalFromFloat(0.5), }, State: types.MarketStateActive, + MarkPriceConfiguration: &types.CompositePriceConfiguration{ + DecayWeight: num.DecimalZero(), + DecayPower: num.DecimalZero(), + CashAmount: num.UintZero(), + SourceWeights: []num.Decimal{num.DecimalFromFloat(0.1), num.DecimalFromFloat(0.2), num.DecimalFromFloat(0.3), num.DecimalFromFloat(0.4)}, + SourceStalenessTolerance: []time.Duration{0, 0, 0, 0}, + CompositePriceType: types.CompositePriceTypeByLastTrade, + }, } } @@ -606,6 +617,7 @@ func getEngine(t *testing.T, vegaPath paths.Paths, now time.Time) *snapshotTestD referralDiscountReward.EXPECT().RewardsFactorMultiplierAppliedForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() volumeDiscount.EXPECT().VolumeDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() referralDiscountReward.EXPECT().GetReferrer(gomock.Any()).Return(types.PartyID(""), errors.New("not a referrer")).AnyTimes() + banking := mocks.NewMockBanking(ctrl) eng := execution.NewEngine( log, @@ -619,6 +631,7 @@ func getEngine(t *testing.T, vegaPath paths.Paths, now time.Time) *snapshotTestD stubs.NewAssetStub(), referralDiscountReward, volumeDiscount, + banking, ) statsData := stats.New(log, stats.NewDefaultConfig()) @@ -673,6 +686,7 @@ func getEngineWithParties(t *testing.T, now time.Time, balance *num.Uint, partie referralDiscountReward.EXPECT().RewardsFactorMultiplierAppliedForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() volumeDiscount.EXPECT().VolumeDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() referralDiscountReward.EXPECT().GetReferrer(gomock.Any()).Return(types.PartyID(""), errors.New("not a referrer")).AnyTimes() + banking := mocks.NewMockBanking(ctrl) eng := execution.NewEngine( log, @@ -686,6 +700,7 @@ func getEngineWithParties(t *testing.T, now time.Time, balance *num.Uint, partie stubs.NewAssetStub(), referralDiscountReward, volumeDiscount, + banking, ) statsData := stats.New(log, stats.NewDefaultConfig()) diff --git a/core/execution/spot/fees_test.go b/core/execution/spot/fees_test.go index 9109d9a8e0..59615639f2 100644 --- a/core/execution/spot/fees_test.go +++ b/core/execution/spot/fees_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/types" vegacontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/libs/crypto" + "github.com/stretchr/testify/require" ) @@ -53,7 +54,7 @@ func setupToLeaveOpeningAuction(t *testing.T) (*testMarket, context.Context) { return tm, ctx } -func TestNoFeesInOpenintAuction(t *testing.T) { +func TestNoFeesInOpeningAuction(t *testing.T) { tm, _ := setupToLeaveOpeningAuction(t) // at this point party 1 bought 1 BTC and has one outstanding order at price 30k as we've left opening auction diff --git a/core/execution/spot/holding_account_tracker.go b/core/execution/spot/holding_account_tracker.go index a57bdf9255..fb2a1ba601 100644 --- a/core/execution/spot/holding_account_tracker.go +++ b/core/execution/spot/holding_account_tracker.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" + "golang.org/x/exp/maps" ) diff --git a/core/execution/spot/holding_account_tracker_test.go b/core/execution/spot/holding_account_tracker_test.go index 818cf5a8f9..170e3e7235 100644 --- a/core/execution/spot/holding_account_tracker_test.go +++ b/core/execution/spot/holding_account_tracker_test.go @@ -30,6 +30,7 @@ import ( "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/core/execution/spot/market.go b/core/execution/spot/market.go index bc69b55bc1..3f29dbe2b2 100644 --- a/core/execution/spot/market.go +++ b/core/execution/spot/market.go @@ -15,17 +15,20 @@ package spot -// Copyright (c) 2022 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // -// Use of this software is governed by the Business Source License included -// in the LICENSE.VEGA file and at https://www.mariadb.com/bsl11. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. // -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. // -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . import ( "context" @@ -45,7 +48,6 @@ import ( "code.vegaprotocol.io/vega/core/liquidity/v2" "code.vegaprotocol.io/vega/core/matching" "code.vegaprotocol.io/vega/core/metrics" - "code.vegaprotocol.io/vega/core/monitor" "code.vegaprotocol.io/vega/core/monitor/price" "code.vegaprotocol.io/vega/core/risk" "code.vegaprotocol.io/vega/core/types" @@ -99,6 +101,7 @@ type Market struct { // deps engines collateral common.Collateral + banking common.Banking broker common.Broker closed bool @@ -159,7 +162,7 @@ func NewMarket( mkt *types.Market, timeService common.TimeService, broker common.Broker, - as *monitor.AuctionState, + as common.AuctionState, stateVarEngine common.StateVarEngine, marketActivityTracker *common.MarketActivityTracker, baseAssetDetails *assets.Asset, @@ -167,6 +170,7 @@ func NewMarket( peggedOrderNotify func(int64), referralDiscountRewardService fee.ReferralDiscountRewardService, volumeDiscountService fee.VolumeDiscountService, + banking common.Banking, ) (*Market, error) { if len(mkt.ID) == 0 { return nil, common.ErrEmptyMarketID @@ -265,6 +269,7 @@ func NewMarket( maxStopOrdersPerParties: num.UintZero(), stopOrders: stoporders.New(log), expiringStopOrders: common.NewExpiringOrders(), + banking: banking, } liquidity.SetGetStaticPricesFunc(market.getBestStaticPricesDecimal) @@ -1065,6 +1070,11 @@ func (m *Market) SubmitStopOrdersWithIDGeneratorAndOrderIDs( } }() + if m.IsOpeningAuction() { + rejectStopOrders(types.StopOrderRejectionNotAllowedDuringOpeningAuction, fallsBelow, risesAbove) + return nil, common.ErrStopOrderNotAllowedDuringOpeningAuction + } + if !m.canTrade() { rejectStopOrders(types.StopOrderRejectionTradingNotAllowed, fallsBelow, risesAbove) return nil, common.ErrTradingNotAllowed @@ -1171,7 +1181,7 @@ func (m *Market) poolStopOrders( func (m *Market) stopOrderWouldTriggerAtSubmission( stopOrder *types.StopOrder, ) bool { - if m.lastTradedPrice == nil || stopOrder == nil || stopOrder.Trigger.IsTrailingPercenOffset() { + if m.lastTradedPrice == nil || stopOrder == nil || stopOrder.Trigger.IsTrailingPercentOffset() { return false } @@ -1544,8 +1554,18 @@ func (m *Market) handleConfirmation(ctx context.Context, conf *types.OrderConfir // updateLiquidityFee computes the current LiquidityProvision fee and updates // the fee engine. func (m *Market) updateLiquidityFee(ctx context.Context) { - stake := m.getTargetStake() - fee := m.liquidity.ProvisionsPerParty().FeeForTarget(stake) + var fee num.Decimal + switch m.mkt.Fees.LiquidityFeeSettings.Method { + case types.LiquidityFeeMethodConstant: + fee = m.mkt.Fees.LiquidityFeeSettings.FeeConstant + case types.LiquidityFeeMethodMarginalCost: + fee = m.liquidityEngine.ProvisionsPerParty().FeeForTarget(m.getTargetStake()) + case types.LiquidityFeeMethodWeightedAverage: + fee = m.liquidityEngine.ProvisionsPerParty().FeeForWeightedAverage() + default: + m.log.Panic("unknown liquidity fee method") + } + if !fee.Equals(m.getLiquidityFee()) { m.fee.SetLiquidityFee(fee) m.setLiquidityFee(fee) @@ -2878,10 +2898,14 @@ func (m *Market) OnEpochEvent(ctx context.Context, epoch types.Epoch) { } else if epoch.Action == vega.EpochAction_EPOCH_ACTION_END { m.liquidity.OnEpochEnd(ctx, m.timeService.GetTimeNow(), epoch) m.updateLiquidityFee(ctx) + + m.banking.RegisterTradingFees(ctx, m.quoteAsset, m.fee.TotalTradingFeesPerParty()) + quoteAssetQuantum, _ := m.collateral.GetAssetQuantum(m.quoteAsset) feesStats := m.fee.GetFeesStatsOnEpochEnd(quoteAssetQuantum) feesStats.EpochSeq = epoch.Seq feesStats.Market = m.GetID() + m.broker.Send(events.NewFeesStatsEvent(ctx, feesStats)) } } diff --git a/core/execution/spot/market_iceberg_test.go b/core/execution/spot/market_iceberg_test.go index 365a1fb73d..e528ea84f2 100644 --- a/core/execution/spot/market_iceberg_test.go +++ b/core/execution/spot/market_iceberg_test.go @@ -20,13 +20,12 @@ import ( "testing" "time" - vegacontext "code.vegaprotocol.io/vega/libs/context" - "code.vegaprotocol.io/vega/libs/crypto" - vgcrypto "code.vegaprotocol.io/vega/libs/crypto" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/execution/common" "code.vegaprotocol.io/vega/core/types" + vegacontext "code.vegaprotocol.io/vega/libs/context" + "code.vegaprotocol.io/vega/libs/crypto" + vgcrypto "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "github.com/stretchr/testify/require" diff --git a/core/execution/spot/market_snapshot.go b/core/execution/spot/market_snapshot.go index 7186011fb0..1c2c881dde 100644 --- a/core/execution/spot/market_snapshot.go +++ b/core/execution/spot/market_snapshot.go @@ -21,8 +21,6 @@ import ( "sort" "time" - "golang.org/x/exp/maps" - "code.vegaprotocol.io/vega/core/assets" "code.vegaprotocol.io/vega/core/execution/common" "code.vegaprotocol.io/vega/core/execution/stoporders" @@ -39,6 +37,8 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + + "golang.org/x/exp/maps" ) func NewMarketFromSnapshot( @@ -62,6 +62,7 @@ func NewMarketFromSnapshot( peggedOrderNotify func(int64), referralDiscountRewardService fee.ReferralDiscountRewardService, volumeDiscountService fee.VolumeDiscountService, + banking common.Banking, ) (*Market, error) { mkt := em.Market if len(em.Market.ID) == 0 { @@ -116,7 +117,7 @@ func NewMarketFromSnapshot( } els := common.NewEquitySharesFromSnapshot(em.EquityShare) liquidity := liquidity.NewSnapshotEngine(liquidityConfig, log, timeService, broker, riskModel, pMonitor, book, as, quoteAsset, mkt.ID, stateVarEngine, positionFactor, mkt.LiquiditySLAParams) - marketLiquidity := common.NewMarketLiquidity(log, liquidity, collateralEngine, broker, book, els, marketActivityTracker, feeEngine, common.FutureMarketType, mkt.ID, quoteAsset, priceFactor, mkt.LiquiditySLAParams.PriceRange) + marketLiquidity := common.NewMarketLiquidity(log, liquidity, collateralEngine, broker, book, els, marketActivityTracker, feeEngine, common.SpotMarketType, mkt.ID, quoteAsset, priceFactor, mkt.LiquiditySLAParams.PriceRange) // backward compatibility check for nil stopOrders := stoporders.New(log) @@ -175,6 +176,7 @@ func NewMarketFromSnapshot( expiringStopOrders: expiringStopOrders, hasTraded: em.HasTraded, orderHoldingTracker: NewHoldingAccountTracker(mkt.ID, log, collateralEngine), + banking: banking, } liquidity.SetGetStaticPricesFunc(market.getBestStaticPricesDecimal) for _, p := range em.Parties { diff --git a/core/execution/spot/market_test.go b/core/execution/spot/market_test.go index 2d733679f4..9a4ea7038c 100644 --- a/core/execution/spot/market_test.go +++ b/core/execution/spot/market_test.go @@ -37,6 +37,8 @@ import ( "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "code.vegaprotocol.io/vega/protos/vega" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) @@ -48,6 +50,7 @@ type testMarket struct { collateralEngine *collateral.Engine broker *bmocks.MockBroker timeService *mocks.MockTimeService + banking *mocks.MockBanking now time.Time baseAsset string quoteAsset string @@ -119,6 +122,9 @@ func getMarketWithDP(base, quote string, pMonitorSettings *types.PriceMonitoring InfrastructureFee: num.DecimalFromFloat(0.001), MakerFee: num.DecimalFromFloat(0.004), }, + LiquidityFeeSettings: &types.LiquidityFeeSettings{ + Method: vega.LiquidityFeeSettings_METHOD_MARGINAL_COST, + }, }, TradableInstrument: &types.TradableInstrument{ Instrument: &types.Instrument{ @@ -158,7 +164,6 @@ func getMarketWithDP(base, quote string, pMonitorSettings *types.PriceMonitoring TimeWindow: 3600, // seconds = 1h ScalingFactor: num.DecimalFromFloat(10), }, - TriggeringRatio: num.DecimalZero(), }, LiquiditySLAParams: &types.LiquiditySLAParams{ PriceRange: num.DecimalFromFloat(0.05), @@ -215,8 +220,9 @@ func newTestMarket( referralDiscountReward.EXPECT().ReferralDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() referralDiscountReward.EXPECT().RewardsFactorMultiplierAppliedForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() volumeDiscount.EXPECT().VolumeDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() + banking := mocks.NewMockBanking(ctrl) - market, _ := spot.NewMarket(log, matching.NewDefaultConfig(), fee.NewDefaultConfig(), liquidity.NewDefaultConfig(), collateral, &mkt, ts, broker, as, statevarEngine, mat, baseAsset, quoteAsset, peggedOrderCounterForTest, referralDiscountReward, volumeDiscount) + market, _ := spot.NewMarket(log, matching.NewDefaultConfig(), fee.NewDefaultConfig(), liquidity.NewDefaultConfig(), collateral, &mkt, ts, broker, as, statevarEngine, mat, baseAsset, quoteAsset, peggedOrderCounterForTest, referralDiscountReward, volumeDiscount, banking) tm := &testMarket{ market: market, @@ -224,6 +230,7 @@ func newTestMarket( ctrl: ctrl, broker: broker, timeService: ts, + banking: banking, baseAsset: base, quoteAsset: quote, mas: as, diff --git a/core/execution/spot/spot_execution_test.go b/core/execution/spot/spot_execution_test.go index 5178fcbfab..598c7b6f04 100644 --- a/core/execution/spot/spot_execution_test.go +++ b/core/execution/spot/spot_execution_test.go @@ -25,6 +25,7 @@ import ( vegacontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/require" ) diff --git a/core/execution/spot/spot_monitoring_auction_execution_test.go b/core/execution/spot/spot_monitoring_auction_execution_test.go index 7c7ebcf262..83408baa82 100644 --- a/core/execution/spot/spot_monitoring_auction_execution_test.go +++ b/core/execution/spot/spot_monitoring_auction_execution_test.go @@ -24,6 +24,7 @@ import ( vegacontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/require" ) diff --git a/core/execution/stoporders/priced_stop_orders.go b/core/execution/stoporders/priced_stop_orders.go index e8dbf2a5bc..dee0c05c93 100644 --- a/core/execution/stoporders/priced_stop_orders.go +++ b/core/execution/stoporders/priced_stop_orders.go @@ -21,9 +21,9 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" v1 "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "golang.org/x/exp/slices" "github.com/google/btree" + "golang.org/x/exp/slices" ) type ordersAtPrice struct { diff --git a/core/execution/stoporders/priced_stop_orders_test.go b/core/execution/stoporders/priced_stop_orders_test.go index 88380f2f3e..100fa277c0 100644 --- a/core/execution/stoporders/priced_stop_orders_test.go +++ b/core/execution/stoporders/priced_stop_orders_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/execution/stoporders" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" ) diff --git a/core/execution/stoporders/stop_orders.go b/core/execution/stoporders/stop_orders.go index e2e0d35a54..8ff0c93b2b 100644 --- a/core/execution/stoporders/stop_orders.go +++ b/core/execution/stoporders/stop_orders.go @@ -19,10 +19,12 @@ import ( "log" "sort" + "code.vegaprotocol.io/vega/core/positions" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" v1 "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "golang.org/x/exp/maps" ) @@ -106,6 +108,42 @@ func (p *Pool) Settled() []*types.StopOrder { return out } +func (p *Pool) CheckDirection(positions *positions.SnapshotEngine) []*types.StopOrder { + toCancel := []*types.StopOrder{} + for partyID, orders := range p.orders { + pos, ok := positions.GetPositionByPartyID(partyID) + if !ok { + continue + } + for _, order := range orders { + if order.SizeOverrideSetting == types.StopOrderSizeOverrideSettingPosition { + if pos.Size() == 0 { + continue + } else if pos.Size() > 0 { + // Order needs to be a sell + if order.OrderSubmission.Side != types.SideSell { + order.Status = types.StopOrderStatusCancelled + toCancel = append(toCancel, order) + } + } else { + // Order needs to be a buy + if order.OrderSubmission.Side != types.SideBuy { + order.Status = types.StopOrderStatusCancelled + toCancel = append(toCancel, order) + } + } + } + } + } + + // Remove the deleted items from the map + for _, stopOrder := range toCancel { + delete(p.orders[stopOrder.Party], stopOrder.OrderID) + delete(p.orderToParty, stopOrder.OrderID) + } + return toCancel +} + func (p *Pool) PriceUpdated(newPrice *num.Uint) (triggered, cancelled []*types.StopOrder) { // first update prices and get triggered orders ids := append( @@ -147,7 +185,7 @@ func (p *Pool) PriceUpdated(newPrice *num.Uint) (triggered, cancelled []*types.S } } - // now we get all the OCO oposit to them as they shall + // now we get all the OCO opposite to them as they shall // be cancelled as well for _, v := range triggered[:] { if len(v.OCOLinkID) <= 0 { @@ -187,7 +225,7 @@ func (p *Pool) Insert(order *types.StopOrder) { switch { case order.Trigger.IsPrice(): p.priced.Insert(order.ID, order.Trigger.Price().Clone(), order.Trigger.Direction) - case order.Trigger.IsTrailingPercenOffset(): + case order.Trigger.IsTrailingPercentOffset(): p.trailing.Insert(order.ID, order.Trigger.TrailingPercentOffset(), order.Trigger.Direction) } } @@ -259,7 +297,7 @@ func (p *Pool) remove(orders []*types.StopOrder) { switch { case order.Trigger.IsPrice(): p.priced.Remove(order.ID) - case order.Trigger.IsTrailingPercenOffset(): + case order.Trigger.IsTrailingPercentOffset(): p.trailing.Remove(order.ID) } } @@ -281,7 +319,7 @@ func (p *Pool) RemoveExpired(orderIDs []string) []*types.StopOrder { // is the OCO link already mapped if _, ok := ordersM[order.OCOLinkID]; !ok { ordersM[order.OCOLinkID] = p.orders[p.orderToParty[id]][order.OCOLinkID] - ordersM[order.OCOLinkID].Status = types.StopOrderStatusExpired + ordersM[order.OCOLinkID].Status = types.StopOrderStatusStopped } } } diff --git a/core/execution/stoporders/stop_orders_ext_test.go b/core/execution/stoporders/stop_orders_ext_test.go index b0e7259aff..1922b0ac40 100644 --- a/core/execution/stoporders/stop_orders_ext_test.go +++ b/core/execution/stoporders/stop_orders_ext_test.go @@ -18,6 +18,7 @@ package stoporders import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "golang.org/x/exp/slices" ) diff --git a/core/execution/stoporders/stop_orders_snapshot_test.go b/core/execution/stoporders/stop_orders_snapshot_test.go index e5580d9f07..c3c7bc8911 100644 --- a/core/execution/stoporders/stop_orders_snapshot_test.go +++ b/core/execution/stoporders/stop_orders_snapshot_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" v1 "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/stretchr/testify/assert" ) diff --git a/core/execution/stoporders/stop_orders_test.go b/core/execution/stoporders/stop_orders_test.go index d707b82f07..364f20053a 100644 --- a/core/execution/stoporders/stop_orders_test.go +++ b/core/execution/stoporders/stop_orders_test.go @@ -36,7 +36,7 @@ func TestSingleStopOrders(t *testing.T) { pool.Insert(newPricedStopOrder("a", "p1", "", num.NewUint(40), types.StopOrderTriggerDirectionFallsBelow)) pool.Insert(newPricedStopOrder("b", "p1", "", num.NewUint(57), types.StopOrderTriggerDirectionRisesAbove)) - // this will be triggered when going from 60 to 57, and triggre the falls below + // this will be triggered when going from 60 to 57, and trigger the falls below pool.Insert(newTrailingStopOrder("c", "p2", "", num.MustDecimalFromString("0.05"), types.StopOrderTriggerDirectionFallsBelow)) pool.Insert(newTrailingStopOrder("d", "p2", "", num.MustDecimalFromString("0.5"), types.StopOrderTriggerDirectionRisesAbove)) @@ -44,7 +44,11 @@ func TestSingleStopOrders(t *testing.T) { pool.Insert(newPricedStopOrder("e", "p2", "", num.NewUint(40), types.StopOrderTriggerDirectionFallsBelow)) pool.Insert(newTrailingStopOrder("f", "p2", "", num.MustDecimalFromString("0.5"), types.StopOrderTriggerDirectionRisesAbove)) - assert.Equal(t, pool.Len(), 6) + // mixing around both, will be triggered by the end + pool.Insert(newPricedStopOrderWithOverride("g", "p2", "", num.MustDecimalFromString("1.0"), num.NewUint(20), types.StopOrderTriggerDirectionFallsBelow)) + pool.Insert(newTrailingStopOrderWithOverride("h", "p2", "", num.MustDecimalFromString("1.0"), num.MustDecimalFromString("1"), types.StopOrderTriggerDirectionRisesAbove)) + + assert.Equal(t, pool.Len(), 8) // move the price a little, nothing should happen. triggeredOrders, cancelledOrders := pool.PriceUpdated(num.NewUint(55)) @@ -56,7 +60,7 @@ func TestSingleStopOrders(t *testing.T) { triggeredOrders, cancelledOrders = pool.PriceUpdated(num.NewUint(60)) assert.Len(t, triggeredOrders, 1) assert.Len(t, cancelledOrders, 0) - assert.Equal(t, pool.Len(), 5) + assert.Equal(t, pool.Len(), 7) assert.Equal(t, triggeredOrders[0].Status, types.StopOrderStatusTriggered) assert.Equal(t, triggeredOrders[0].ID, "b") }) @@ -73,7 +77,7 @@ func TestSingleStopOrders(t *testing.T) { triggeredOrders, cancelledOrders = pool.PriceUpdated(num.NewUint(57)) assert.Len(t, triggeredOrders, 1) assert.Len(t, cancelledOrders, 0) - assert.Equal(t, pool.Len(), 4) + assert.Equal(t, pool.Len(), 6) assert.Equal(t, triggeredOrders[0].Status, types.StopOrderStatusTriggered) assert.Equal(t, triggeredOrders[0].ID, "c") }) @@ -90,7 +94,7 @@ func TestSingleStopOrders(t *testing.T) { triggeredOrders, cancelledOrders = pool.PriceUpdated(num.NewUint(75)) assert.Len(t, triggeredOrders, 2) assert.Len(t, cancelledOrders, 0) - assert.Equal(t, pool.Len(), 2) + assert.Equal(t, pool.Len(), 4) assert.Equal(t, triggeredOrders[0].Status, types.StopOrderStatusTriggered) assert.Equal(t, triggeredOrders[0].ID, "d") assert.Equal(t, triggeredOrders[1].Status, types.StopOrderStatusTriggered) @@ -187,7 +191,7 @@ func TestRemoveExpiredStopOrders(t *testing.T) { assert.Equal(t, affectedOrders[0].ID, "b") assert.Equal(t, affectedOrders[0].Status, types.StopOrderStatusExpired) assert.Equal(t, affectedOrders[1].ID, "e") - assert.Equal(t, affectedOrders[1].Status, types.StopOrderStatusExpired) + assert.Equal(t, affectedOrders[1].Status, types.StopOrderStatusStopped) assert.Equal(t, affectedOrders[2].ID, "f") assert.Equal(t, affectedOrders[2].Status, types.StopOrderStatusExpired) @@ -308,6 +312,34 @@ func newPricedStopOrder( } } +func newPricedStopOrderWithOverride( + id, party, ocoLinkID string, + sizeOverrideScale num.Decimal, + price *num.Uint, + direction types.StopOrderTriggerDirection, +) *types.StopOrder { + return &types.StopOrder{ + ID: id, + Party: party, + OCOLinkID: ocoLinkID, + Trigger: types.NewPriceStopOrderTrigger(direction, price), + Expiry: &types.StopOrderExpiry{}, // no expiry, not important here + CreatedAt: time.Now(), + UpdatedAt: time.Now().Add(10 * time.Second), + Status: types.StopOrderStatusPending, + OrderSubmission: &types.OrderSubmission{ + MarketID: "some", + Type: types.OrderTypeMarket, + ReduceOnly: true, + Size: 10, + TimeInForce: types.OrderTimeInForceIOC, + Side: types.SideBuy, + }, + SizeOverrideSetting: types.StopOrderSizeOverrideSettingPosition, + SizeOverrideValue: &types.StopOrderSizeOverrideValue{PercentageSize: sizeOverrideScale}, + } +} + //nolint:unparam func newTrailingStopOrder( id, party, ocoLinkID string, @@ -333,3 +365,32 @@ func newTrailingStopOrder( }, } } + +//nolint:unparam +func newTrailingStopOrderWithOverride( + id, party, ocoLinkID string, + sizeOverrideScale num.Decimal, + offset num.Decimal, + direction types.StopOrderTriggerDirection, +) *types.StopOrder { + return &types.StopOrder{ + ID: id, + Party: party, + OCOLinkID: ocoLinkID, + Trigger: types.NewTrailingStopOrderTrigger(direction, offset), + Expiry: &types.StopOrderExpiry{}, // no expiry, not important here + CreatedAt: time.Now(), + UpdatedAt: time.Now().Add(10 * time.Second), + Status: types.StopOrderStatusPending, + OrderSubmission: &types.OrderSubmission{ + MarketID: "some", + Type: types.OrderTypeMarket, + ReduceOnly: true, + Size: 10, + TimeInForce: types.OrderTimeInForceIOC, + Side: types.SideBuy, + }, + SizeOverrideSetting: types.StopOrderSizeOverrideSettingPosition, + SizeOverrideValue: &types.StopOrderSizeOverrideValue{PercentageSize: sizeOverrideScale}, + } +} diff --git a/core/execution/stoporders/trailing_stop_orders.go b/core/execution/stoporders/trailing_stop_orders.go index 6135d4d4dd..a2844cc510 100644 --- a/core/execution/stoporders/trailing_stop_orders.go +++ b/core/execution/stoporders/trailing_stop_orders.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" v1 "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/google/btree" "golang.org/x/exp/slices" ) diff --git a/core/execution/stoporders/trailing_stop_orders_test.go b/core/execution/stoporders/trailing_stop_orders_test.go index 23acf14514..3d0f85157a 100644 --- a/core/execution/stoporders/trailing_stop_orders_test.go +++ b/core/execution/stoporders/trailing_stop_orders_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/execution/stoporders" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" ) diff --git a/core/execution/update_market_state_test.go b/core/execution/update_market_state_test.go index ce33a7cf4c..f5090eb8e8 100644 --- a/core/execution/update_market_state_test.go +++ b/core/execution/update_market_state_test.go @@ -29,6 +29,7 @@ import ( "code.vegaprotocol.io/vega/libs/num" vgtest "code.vegaprotocol.io/vega/libs/test" paths2 "code.vegaprotocol.io/vega/paths" + "github.com/stretchr/testify/require" ) diff --git a/core/faucet/service.go b/core/faucet/service.go index 99aa761d67..0d5f0ff63f 100644 --- a/core/faucet/service.go +++ b/core/faucet/service.go @@ -33,12 +33,12 @@ import ( types "code.vegaprotocol.io/vega/protos/vega" api "code.vegaprotocol.io/vega/protos/vega/api/v1" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" - "google.golang.org/grpc/credentials/insecure" "github.com/cenkalti/backoff" "github.com/julienschmidt/httprouter" "github.com/rs/cors" "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" ) var ( diff --git a/core/fee/engine.go b/core/fee/engine.go index 4670bdc270..516988a724 100644 --- a/core/fee/engine.go +++ b/core/fee/engine.go @@ -103,6 +103,10 @@ func (e *Engine) GetState(assetQuantum num.Decimal) *eventspb.FeesStats { return e.feesStats.ToProto(e.asset, assetQuantum) } +func (e *Engine) TotalTradingFeesPerParty() map[string]*num.Uint { + return e.feesStats.TotalTradingFeesPerParty() +} + func (e *Engine) GetFeesStatsOnEpochEnd(assetQuantum num.Decimal) (FeesStats *eventspb.FeesStats) { FeesStats, e.feesStats = e.feesStats.ToProto(e.asset, assetQuantum), NewFeesStats() return @@ -179,6 +183,8 @@ func (e *Engine) CalculateForContinuousMode( e.feesStats.RegisterMakerFee(maker, taker, fee.MakerFee) + totalTradingFees := num.UintZero().AddSum(fee.MakerFee, fee.InfrastructureFee, fee.LiquidityFee) + switch trade.Aggressor { case types.SideBuy: trade.BuyerFee = fee @@ -190,7 +196,10 @@ func (e *Engine) CalculateForContinuousMode( maker = trade.Buyer } - totalFeeAmount.AddSum(fee.InfrastructureFee, fee.LiquidityFee, fee.MakerFee) + e.feesStats.RegisterTradingFees(taker, totalTradingFees) + e.feesStats.RegisterTradingFees(maker, fee.MakerFee) + + totalFeeAmount.AddSum(totalTradingFees) totalInfrastructureFeeAmount.AddSum(fee.InfrastructureFee) totalLiquidityFeeAmount.AddSum(fee.LiquidityFee) // create a transfer for the aggressor @@ -387,93 +396,35 @@ func (e *Engine) CalculateForFrequentBatchesAuctionMode( }, nil } -func (e *Engine) CalculateFeeForPositionResolution( - // the trade from the good parties which 0 out the network order - trades []*types.Trade, - // the positions of the parties being closed out. - closedMPs []events.MarketPosition, -) (events.FeesTransfer, map[string]*types.Fee) { +func (e *Engine) GetFeeForPositionResolution(trades []*types.Trade) (events.FeesTransfer, *types.Fee) { + if len(trades) == 0 { + return nil, nil + } var ( - totalFeesAmounts = map[string]*num.Uint{} - partiesFees = map[string]*types.Fee{} - // this is the share of each party to be paid - partiesShare = map[string]*feeShare{} - totalAbsolutePos uint64 - transfers = []*types.Transfer{} + netFee *types.Fee + gt *types.Transfer ) - - // first calculate the share of all distressedParties - for _, v := range closedMPs { - size := v.Size() - if size < 0 { - size = -size - } - totalAbsolutePos += uint64(size) - partiesShare[v.Party()] = &feeShare{pos: uint64(size)} - - // while we are at it, we initial the map of all fees per party - partiesFees[v.Party()] = types.NewFee() - } - - // no we accumulated all the absolute position, we - // will get the share of each party - for _, v := range partiesShare { - v.share = num.DecimalFromInt64(int64(v.pos)).Div(num.DecimalFromInt64(int64(totalAbsolutePos))) - } - - // now we have the share of each distressed parties - // we can iterate over the trades, and make the transfers + transfers := make([]*types.Transfer, 0, len(trades)) for _, t := range trades { - // continuous trading fees apply here - // the we'll split them in between all parties fees := e.calculateContinuousModeFees(t) - - // lets fine which side is the good party goodParty := t.Buyer t.SellerFee = fees - if goodParty == "network" { + if t.Buyer == types.NetworkParty { goodParty = t.Seller t.SellerFee = types.NewFee() - t.BuyerFee = fees.Clone() - } - - // now we iterate over all parties, - // and create a pay for each distressed parties - for _, v := range closedMPs { - partyTransfers, fees, feesAmount := e.getPositionResolutionFeesTransfers( - v.Party(), partiesShare[v.Party()].share, fees) - - if prevTotalFee, ok := totalFeesAmounts[v.Party()]; !ok { - totalFeesAmounts[v.Party()] = feesAmount.Clone() - } else { - prevTotalFee.AddSum(feesAmount) - } - transfers = append(transfers, partyTransfers...) - - // increase the party full fees - pf := partiesFees[v.Party()] - pf.MakerFee.AddSum(fees.MakerFee) - pf.InfrastructureFee.AddSum(fees.InfrastructureFee) - pf.LiquidityFee.AddSum(fees.LiquidityFee) - partiesFees[v.Party()] = pf + t.BuyerFee = fees } - - // then 1 receive transfer for the good party - transfers = append(transfers, &types.Transfer{ - Owner: goodParty, - Amount: &types.FinancialAmount{ - Asset: e.asset, - Amount: fees.MakerFee, - }, - Type: types.TransferTypeMakerFeeReceive, - }) + netFee, gt = e.getNetworkFeeWithMakerTransfer(fees, netFee, goodParty) + transfers = append(transfers, gt) } - + netTf, total := e.getNetworkFeeTransfers(netFee) // calculate the return &feesTransfer{ - totalFeesAmountsPerParty: totalFeesAmounts, - transfers: transfers, - }, partiesFees + totalFeesAmountsPerParty: map[string]*num.Uint{ + types.NetworkParty: total, + }, + transfers: append(netTf, transfers...), + }, netFee } // BuildLiquidityFeeDistributionTransfer returns the set of transfers that will @@ -543,53 +494,55 @@ func (e *Engine) buildLiquidityFeesTransfer( return ft } -// this will calculate the transfer the distressed party needs -// to do. -func (e *Engine) getPositionResolutionFeesTransfers( - party string, share num.Decimal, fees *types.Fee, -) ([]*types.Transfer, *types.Fee, *num.Uint) { - makerFee, _ := num.UintFromDecimal(fees.MakerFee.ToDecimal().Mul(share).Ceil()) - infraFee, _ := num.UintFromDecimal(fees.InfrastructureFee.ToDecimal().Mul(share).Ceil()) - liquiFee, _ := num.UintFromDecimal(fees.LiquidityFee.ToDecimal().Mul(share).Ceil()) +func (e *Engine) getNetworkFeeWithMakerTransfer(fees *types.Fee, current *types.Fee, goodParty string) (*types.Fee, *types.Transfer) { + transfer := &types.Transfer{ + Owner: goodParty, + Amount: &types.FinancialAmount{ + Asset: e.asset, + Amount: fees.MakerFee, + }, + MinAmount: num.UintZero(), + Type: types.TransferTypeMakerFeeReceive, + } + if current == nil { + return fees.Clone(), transfer + } + current.MakerFee.AddSum(fees.MakerFee) + current.LiquidityFee.AddSum(fees.LiquidityFee) + current.InfrastructureFee.AddSum(fees.InfrastructureFee) + return current, transfer +} +func (e *Engine) getNetworkFeeTransfers(fees *types.Fee) ([]*types.Transfer, *num.Uint) { return []*types.Transfer{ - { - Owner: party, - Amount: &types.FinancialAmount{ - Asset: e.asset, - Amount: makerFee.Clone(), - }, - Type: types.TransferTypeMakerFeePay, + { + Owner: types.NetworkParty, + Amount: &types.FinancialAmount{ + Asset: e.asset, + Amount: fees.MakerFee.Clone(), }, - { - Owner: party, - Amount: &types.FinancialAmount{ - Asset: e.asset, - Amount: infraFee.Clone(), - }, - Type: types.TransferTypeInfrastructureFeePay, + MinAmount: num.UintZero(), + Type: types.TransferTypeMakerFeePay, + }, + { + Owner: types.NetworkParty, + Amount: &types.FinancialAmount{ + Asset: e.asset, + Amount: fees.InfrastructureFee.Clone(), }, - { - Owner: party, - Amount: &types.FinancialAmount{ - Asset: e.asset, - Amount: liquiFee.Clone(), - }, - Type: types.TransferTypeLiquidityFeePay, + MinAmount: num.UintZero(), + Type: types.TransferTypeInfrastructureFeePay, + }, + { + Owner: types.NetworkParty, + Amount: &types.FinancialAmount{ + Asset: e.asset, + Amount: fees.LiquidityFee.Clone(), }, + MinAmount: num.UintZero(), + Type: types.TransferTypeLiquidityFeePay, }, - &types.Fee{ - MakerFee: makerFee, - InfrastructureFee: infraFee, - LiquidityFee: liquiFee, - }, num.Sum(makerFee, infraFee, liquiFee) -} - -type feeShare struct { - // the absolute position of the party which had to be recovered - pos uint64 - // the share out of the total volume - share num.Decimal + }, num.Sum(fees.MakerFee, fees.InfrastructureFee, fees.LiquidityFee) } func (e *Engine) applyDiscountsAndRewards(taker string, fees *types.Fee, referral ReferralDiscountRewardService, volumeDiscount VolumeDiscountService) (*types.Fee, *types.ReferrerReward) { diff --git a/core/fee/engine_test.go b/core/fee/engine_test.go index a0590e5f06..30c0889ace 100644 --- a/core/fee/engine_test.go +++ b/core/fee/engine_test.go @@ -19,7 +19,6 @@ import ( "errors" "testing" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/fee" "code.vegaprotocol.io/vega/core/fee/mocks" "code.vegaprotocol.io/vega/core/types" @@ -77,9 +76,9 @@ func TestFeeEngine(t *testing.T) { t.Run("calculate batch auction trading fee empty trade", testCalcBatchAuctionTradingErrorEmptyTrade) t.Run("calculate batch auction trading fee same batch", testCalcBatchAuctionTradingSameBatch) t.Run("calculate batch auction trading fee different batches", testCalcBatchAuctionTradingDifferentBatches) - t.Run("calculate position resolution", testCalcPositionResolution) t.Run("Build liquidity fee transfers with remainder", testBuildLiquidityFeesRemainder) + t.Run("calculate closeout fees", testCloseoutFees) } func testUpdateFeeFactors(t *testing.T) { @@ -230,6 +229,18 @@ func testCalcContinuousTradingAndCheckAmounts(t *testing.T) { }, }, }, + TotalFeesPaidAndReceived: []*eventspb.PartyAmount{ + { + Party: "party1", + Amount: "875", + QuantumAmount: "875", + }, + { + Party: "party2", + Amount: "125", + QuantumAmount: "125", + }, + }, }, eng.GetFeesStatsOnEpochEnd(num.DecimalFromInt64(1))) } @@ -341,6 +352,18 @@ func testCalcContinuousTradingAndCheckAmountsWithDiscount(t *testing.T) { }, }, }, + TotalFeesPaidAndReceived: []*eventspb.PartyAmount{ + { + Party: "party1", + Amount: "443", + QuantumAmount: "443", + }, + { + Party: "party2", + Amount: "64", + QuantumAmount: "64", + }, + }, }, eng.GetFeesStatsOnEpochEnd(num.DecimalFromInt64(1))) } @@ -1000,92 +1023,83 @@ func testCalcBatchAuctionTradingDifferentBatches(t *testing.T) { assert.Equal(t, pay, 1) } -func testCalcPositionResolution(t *testing.T) { +func testCloseoutFees(t *testing.T) { eng := getTestFee(t) + ctrl := gomock.NewController(t) + discountRewardService := mocks.NewMockReferralDiscountRewardService(ctrl) + volumeDiscountService := mocks.NewMockVolumeDiscountService(ctrl) + discountRewardService.EXPECT().ReferralDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() + discountRewardService.EXPECT().RewardsFactorMultiplierAppliedForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() + volumeDiscountService.EXPECT().VolumeDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() + discountRewardService.EXPECT().GetReferrer(gomock.Any()).Return(types.PartyID(""), errors.New("not a referrer")).AnyTimes() trades := []*types.Trade{ { Aggressor: types.SideSell, - Seller: "party1", - Buyer: "network", - Size: 3, - Price: num.NewUint(1000), + Seller: types.NetworkParty, + Buyer: "party1", + Size: 1, + Price: num.NewUint(100), }, { Aggressor: types.SideSell, - Seller: "party2", - Buyer: "network", - Size: 2, - Price: num.NewUint(1100), + Seller: types.NetworkParty, + Buyer: "party2", + Size: 1, + Price: num.NewUint(100), + }, + { + Aggressor: types.SideSell, + Seller: types.NetworkParty, + Buyer: "party3", + Size: 1, + Price: num.NewUint(100), + }, + { + Aggressor: types.SideSell, + Seller: types.NetworkParty, + Buyer: "party4", + Size: 1, + Price: num.NewUint(100), }, } - positions := []events.MarketPosition{ - fakeMktPos{party: "bad-party1", size: -10}, - fakeMktPos{party: "bad-party2", size: 7}, - fakeMktPos{party: "bad-party3", size: -2}, - fakeMktPos{party: "bad-party4", size: 10}, + ft, fee := eng.GetFeeForPositionResolution(trades) + assert.NotNil(t, fee) + allTransfers := ft.Transfers() + // first we have the network -> pay transfers, then 1 transfer per good party + assert.Equal(t, len(trades), len(allTransfers)-3) + goodPartyTransfers := allTransfers[3:] + networkTransfers := allTransfers[:3] + + numTrades := num.NewUint(uint64(len(trades))) + // maker fee is 100 * 0.02 == 2 + // total network fee is 2 * len(trades) + feeAmt := num.NewUint(2) + total := num.UintZero().Mul(feeAmt, numTrades) + // this must be the total fee for the network + require.True(t, total.EQ(fee.MakerFee)) + + // now check the transfers for the fee payouts + for _, trans := range goodPartyTransfers { + require.True(t, trans.Amount.Amount.EQ(feeAmt)) + require.True(t, trans.MinAmount.EQ(num.UintZero())) } - - ft, partiesFee := eng.CalculateFeeForPositionResolution(trades, positions) - assert.NotNil(t, ft) - assert.NotNil(t, partiesFee) - - // get the amounts map - feeAmounts := ft.TotalFeesAmountPerParty() - party1Amount, ok := feeAmounts["bad-party1"] - assert.True(t, ok) - assert.Equal(t, num.NewUint(307), party1Amount) - party2Amount, ok := feeAmounts["bad-party2"] - assert.True(t, ok) - assert.Equal(t, num.NewUint(217), party2Amount) - party3Amount, ok := feeAmounts["bad-party3"] - assert.True(t, ok) - assert.Equal(t, num.NewUint(65), party3Amount) - party4Amount, ok := feeAmounts["bad-party4"] - assert.True(t, ok) - assert.Equal(t, num.NewUint(307), party4Amount) - - // check the details of the parties - // 307 as expected - assert.Equal(t, num.NewUint(90), partiesFee["bad-party1"].InfrastructureFee) - assert.Equal(t, num.NewUint(37), partiesFee["bad-party1"].MakerFee) - assert.Equal(t, num.NewUint(180), partiesFee["bad-party1"].LiquidityFee) - - // get the transfer and check we have enough of each types - transfers := ft.Transfers() - var pay, recv, infra, liquidity int - for _, v := range transfers { - if v.Type == types.TransferTypeLiquidityFeePay { - liquidity++ - } - if v.Type == types.TransferTypeInfrastructureFeePay { - infra++ - } - if v.Type == types.TransferTypeMakerFeeReceive { - recv++ - } - if v.Type == types.TransferTypeMakerFeePay { - pay++ + // other fees below, making these transfers may be a bit silly at times... + // liquidity fees are 100 * 0.1 -> 10 * 4 = 40 + liqFee := num.UintZero().Mul(numTrades, num.NewUint(10)) + require.True(t, liqFee.EQ(fee.LiquidityFee)) + // infraFee is 100 * 0.05 -> 5 * 4 == 20 + infraFee := num.UintZero().Mul(numTrades, num.NewUint(5)) + require.True(t, infraFee.EQ(fee.InfrastructureFee)) + for _, tf := range networkTransfers { + require.True(t, num.UintZero().EQ(tf.MinAmount)) + switch tf.Type { + case types.TransferTypeMakerFeePay: + require.True(t, tf.Amount.Amount.EQ(fee.MakerFee)) + case types.TransferTypeLiquidityFeePay: + require.True(t, tf.Amount.Amount.EQ(fee.LiquidityFee)) + case types.TransferTypeInfrastructureFeePay: + require.True(t, tf.Amount.Amount.EQ(fee.InfrastructureFee)) } } - - assert.Equal(t, liquidity, len(trades)*len(positions)) - assert.Equal(t, infra, len(trades)*len(positions)) - assert.Equal(t, recv, len(trades)) - assert.Equal(t, pay, len(trades)*len(positions)) -} - -type fakeMktPos struct { - party string - size int64 } - -func (f fakeMktPos) Party() string { return f.party } -func (f fakeMktPos) Size() int64 { return f.size } -func (f fakeMktPos) Buy() int64 { return 0 } -func (f fakeMktPos) Sell() int64 { return 0 } -func (f fakeMktPos) Price() *num.Uint { return num.UintZero() } -func (f fakeMktPos) BuySumProduct() *num.Uint { return num.UintZero() } -func (f fakeMktPos) SellSumProduct() *num.Uint { return num.UintZero() } -func (f fakeMktPos) VWBuy() *num.Uint { return num.UintZero() } -func (f fakeMktPos) VWSell() *num.Uint { return num.UintZero() } diff --git a/core/fee/rebate_stats.go b/core/fee/rebate_stats.go index 19273e4dbb..6b6f0b87ce 100644 --- a/core/fee/rebate_stats.go +++ b/core/fee/rebate_stats.go @@ -28,6 +28,8 @@ type FeesStats struct { // TotalMakerFeesReceived is the total of maker fees received by the maker side. // maker -> amount TotalMakerFeesReceived map[string]*num.Uint + // TradingFeesPaidAndReceived tracks all trading fees paid and received by party. + TradingFeesPaidAndReceived map[string]*num.Uint // MakerFeesGenerated tracks maker fees paid by taker (aggressor) to the maker. // taker -> maker -> amount MakerFeesGenerated map[string]map[string]*num.Uint @@ -41,12 +43,13 @@ type FeesStats struct { func NewFeesStats() *FeesStats { return &FeesStats{ - TotalMakerFeesReceived: map[string]*num.Uint{}, - MakerFeesGenerated: map[string]map[string]*num.Uint{}, - TotalRewardsReceived: map[string]*num.Uint{}, - ReferrerRewardsGenerated: map[string]map[string]*num.Uint{}, - RefereeDiscountApplied: map[string]*num.Uint{}, - VolumeDiscountApplied: map[string]*num.Uint{}, + TotalMakerFeesReceived: map[string]*num.Uint{}, + MakerFeesGenerated: map[string]map[string]*num.Uint{}, + TradingFeesPaidAndReceived: map[string]*num.Uint{}, + TotalRewardsReceived: map[string]*num.Uint{}, + ReferrerRewardsGenerated: map[string]map[string]*num.Uint{}, + RefereeDiscountApplied: map[string]*num.Uint{}, + VolumeDiscountApplied: map[string]*num.Uint{}, } } @@ -87,6 +90,10 @@ func NewFeesStatsFromProto(fsp *eventspb.FeesStats) *FeesStats { fs.MakerFeesGenerated[f.Taker] = rg } + for _, f := range fsp.TotalFeesPaidAndReceived { + fs.TradingFeesPaidAndReceived[f.Party] = num.MustUintFromString(f.Amount, 10) + } + return fs } @@ -114,6 +121,15 @@ func (f *FeesStats) RegisterMakerFee(makerID, takerID string, amount *num.Uint) makerTally.Add(makerTally, amount) } +// RegisterTradingFees registers fees paid or received by the party. +func (f *FeesStats) RegisterTradingFees(partyID string, amount *num.Uint) { + if _, ok := f.TradingFeesPaidAndReceived[partyID]; !ok { + f.TradingFeesPaidAndReceived[partyID] = num.UintZero() + } + + f.TradingFeesPaidAndReceived[partyID].AddSum(amount) +} + func (f *FeesStats) RegisterReferrerReward( referrer, referee string, amount *num.Uint, @@ -161,6 +177,11 @@ func (f *FeesStats) RegisterVolumeDiscount(party string, amount *num.Uint) { total.Add(total, amount) } +// TotalTradingFeesPerParty returns per party sum of all paid and received trading fees. +func (f *FeesStats) TotalTradingFeesPerParty() map[string]*num.Uint { + return f.TradingFeesPaidAndReceived +} + func (f *FeesStats) ToProto(asset string, assetQuantum num.Decimal) *eventspb.FeesStats { fs := &eventspb.FeesStats{ Asset: asset, @@ -170,6 +191,7 @@ func (f *FeesStats) ToProto(asset string, assetQuantum num.Decimal) *eventspb.Fe VolumeDiscountApplied: make([]*eventspb.PartyAmount, 0, len(f.VolumeDiscountApplied)), TotalMakerFeesReceived: make([]*eventspb.PartyAmount, 0, len(f.TotalMakerFeesReceived)), MakerFeesGenerated: make([]*eventspb.MakerFeesGenerated, 0, len(f.MakerFeesGenerated)), + TotalFeesPaidAndReceived: make([]*eventspb.PartyAmount, 0, len(f.TradingFeesPaidAndReceived)), } totalRewardsReceivedParties := maps.Keys(f.TotalRewardsReceived) @@ -179,7 +201,7 @@ func (f *FeesStats) ToProto(asset string, assetQuantum num.Decimal) *eventspb.Fe fs.TotalRewardsReceived = append(fs.TotalRewardsReceived, &eventspb.PartyAmount{ Party: party, Amount: amount.String(), - QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(2).String(), + QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(6).String(), }) } @@ -190,7 +212,7 @@ func (f *FeesStats) ToProto(asset string, assetQuantum num.Decimal) *eventspb.Fe fs.RefereesDiscountApplied = append(fs.RefereesDiscountApplied, &eventspb.PartyAmount{ Party: party, Amount: amount.String(), - QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(2).String(), + QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(6).String(), }) } @@ -201,7 +223,7 @@ func (f *FeesStats) ToProto(asset string, assetQuantum num.Decimal) *eventspb.Fe fs.VolumeDiscountApplied = append(fs.VolumeDiscountApplied, &eventspb.PartyAmount{ Party: party, Amount: amount.String(), - QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(2).String(), + QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(6).String(), }) } @@ -224,7 +246,7 @@ func (f *FeesStats) ToProto(asset string, assetQuantum num.Decimal) *eventspb.Fe &eventspb.PartyAmount{ Party: party, Amount: amount.String(), - QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(2).String(), + QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(6).String(), }, ) } @@ -239,7 +261,7 @@ func (f *FeesStats) ToProto(asset string, assetQuantum num.Decimal) *eventspb.Fe fs.TotalMakerFeesReceived = append(fs.TotalMakerFeesReceived, &eventspb.PartyAmount{ Party: maker, Amount: amount.String(), - QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(2).String(), + QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(6).String(), }) } @@ -262,7 +284,7 @@ func (f *FeesStats) ToProto(asset string, assetQuantum num.Decimal) *eventspb.Fe &eventspb.PartyAmount{ Party: maker, Amount: amount.String(), - QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(2).String(), + QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(6).String(), }, ) } @@ -270,5 +292,17 @@ func (f *FeesStats) ToProto(asset string, assetQuantum num.Decimal) *eventspb.Fe fs.MakerFeesGenerated = append(fs.MakerFeesGenerated, rewardsGenerated) } + tradingFeesGeneratedParties := maps.Keys(f.TradingFeesPaidAndReceived) + sort.Strings(tradingFeesGeneratedParties) + for _, party := range tradingFeesGeneratedParties { + amount := f.TradingFeesPaidAndReceived[party] + + fs.TotalFeesPaidAndReceived = append(fs.TotalFeesPaidAndReceived, &eventspb.PartyAmount{ + Party: party, + Amount: amount.String(), + QuantumAmount: amount.ToDecimal().Div(assetQuantum).Truncate(6).String(), + }) + } + return fs } diff --git a/core/fee/rebate_stats_test.go b/core/fee/rebate_stats_test.go new file mode 100644 index 0000000000..78041ed5c1 --- /dev/null +++ b/core/fee/rebate_stats_test.go @@ -0,0 +1,42 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package fee_test + +import ( + "testing" + + "code.vegaprotocol.io/vega/core/fee" + "code.vegaprotocol.io/vega/libs/num" + + "github.com/stretchr/testify/assert" +) + +func TestFeesStats(t *testing.T) { + t.Run("test TotalTradingFeesPerParty", testFeesStatsTotalTradingFeesPerParty) +} + +func testFeesStatsTotalTradingFeesPerParty(t *testing.T) { + stats := fee.NewFeesStats() + + stats.RegisterTradingFees("party1", num.NewUint(10)) + stats.RegisterTradingFees("party2", num.NewUint(20)) + stats.RegisterTradingFees("party1", num.NewUint(5)) + stats.RegisterTradingFees("party1", num.NewUint(20)) + stats.RegisterTradingFees("party2", num.NewUint(20)) + + expected := map[string]*num.Uint{"party1": num.NewUint(35), "party2": num.NewUint(40)} + assert.Equal(t, expected, stats.TotalTradingFeesPerParty()) +} diff --git a/core/genesis/sign.go b/core/genesis/sign.go index aa79599c85..b6d2813b23 100644 --- a/core/genesis/sign.go +++ b/core/genesis/sign.go @@ -18,7 +18,7 @@ package genesis import ( "encoding/json" - tmtypes "github.com/tendermint/tendermint/types" + tmtypes "github.com/cometbft/cometbft/types" ) func FromJSON(rawGenesisDoc []byte) (*tmtypes.GenesisDoc, *State, error) { diff --git a/core/governance/checkpoint.go b/core/governance/checkpoint.go index f0c9dffc55..3b4e1f73d8 100644 --- a/core/governance/checkpoint.go +++ b/core/governance/checkpoint.go @@ -24,12 +24,11 @@ import ( "code.vegaprotocol.io/vega/core/liquidity/v2" "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/proto" + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/protos/vega" checkpointpb "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" - - "code.vegaprotocol.io/vega/libs/proto" - "code.vegaprotocol.io/vega/libs/ptr" ) type enactmentTime struct { @@ -108,9 +107,13 @@ func (e *Engine) Load(ctx context.Context, data []byte) error { } enct.current = prop.Terms.EnactmentTimestamp + // handle markets that were proposed in older versions so will not have these new fields when we resubmit if prop.NewMarket().Changes.LiquiditySLAParameters == nil { prop.NewMarket().Changes.LiquiditySLAParameters = ptr.From(liquidity.DefaultSLAParameters) } + if prop.NewMarket().Changes.LiquidityFeeSettings == nil { + prop.NewMarket().Changes.LiquidityFeeSettings = &types.LiquidityFeeSettings{Method: types.LiquidityFeeMethodMarginalCost} + } toSubmit, err := e.intoToSubmit(ctx, prop, enct, true) if err != nil { diff --git a/core/governance/engine.go b/core/governance/engine.go index 73b50ebda0..8ac25fd85c 100644 --- a/core/governance/engine.go +++ b/core/governance/engine.go @@ -24,8 +24,6 @@ import ( "strings" "time" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/assets" "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/netparams" @@ -34,6 +32,8 @@ import ( vgcrypto "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + + "github.com/pkg/errors" ) var ( @@ -135,11 +135,14 @@ type Engine struct { // we store proposals in slice // not as easy to access them directly, but by doing this we can keep // them in order of arrival, which makes their processing deterministic - activeProposals []*proposal - enactedProposals []*proposal + activeBatchProposals map[string]*batchProposal + activeProposals []*proposal + enactedProposals []*proposal // snapshot state gss *governanceSnapshotState + // main chain ID + chainID uint64 } func NewEngine( @@ -163,6 +166,7 @@ func NewEngine( log: log, activeProposals: []*proposal{}, enactedProposals: []*proposal{}, + activeBatchProposals: map[string]*batchProposal{}, nodeProposalValidation: NewNodeValidation(log, assets, tm.GetTimeNow(), witness), timeService: tm, broker: broker, @@ -332,16 +336,16 @@ func (e *Engine) removeActiveProposalByID(ctx context.Context, id string) { } } -// OnTick triggers time bound state changes. func (e *Engine) OnTick(ctx context.Context, t time.Time) ([]*ToEnact, []*VoteClosed) { + now := t.Unix() + + voteClosed, addToActiveProposals := e.evaluateBatchProposals(ctx, now) + var ( preparedToEnact []*ToEnact - voteClosed []*VoteClosed toBeRemoved []string // ids ) - now := t.Unix() - for _, proposal := range e.activeProposals { // check if the market for successor proposals still exists, if not, reject the proposal if nm := proposal.Terms.GetNewMarket(); nm != nil && nm.Successor() != nil { @@ -436,6 +440,9 @@ func (e *Engine) OnTick(ctx context.Context, t time.Time) ([]*ToEnact, []*VoteCl e.removeActiveProposalByID(ctx, id) } + // add these passed proposals from batch to prepare them for enactment + e.activeProposals = append(e.activeProposals, addToActiveProposals...) + // flush here for now return toBeEnacted, voteClosed } @@ -484,7 +491,13 @@ func (e *Engine) SubmitProposal( e.broker.Send(events.NewProposalEvent(ctx, *p)) }() - if perr, err := e.validateOpenProposal(p); err != nil { + params, err := e.getProposalParams(p.Terms.Change) + if err != nil { + p.RejectWithErr(types.ProposalErrorUnknownType, err) + return nil, err + } + + if perr, err := e.validateOpenProposal(p, params); err != nil { p.RejectWithErr(perr, err) if e.log.IsDebug() { e.log.Debug("Proposal rejected", @@ -650,8 +663,8 @@ func (e *Engine) isAutoEnactableProposal(p *types.Proposal) bool { return false } -func (e *Engine) getProposalParams(terms *types.ProposalTerms) (*ProposalParameters, error) { - switch terms.Change.GetTermType() { +func (e *Engine) getProposalParams(proposalTerm types.ProposalTerm) (*types.ProposalParameters, error) { + switch proposalTerm.GetTermType() { case types.ProposalTermsTypeNewMarket: return e.getNewMarketProposalParameters(), nil case types.ProposalTermsTypeUpdateMarket: @@ -685,12 +698,7 @@ func (e *Engine) getProposalParams(terms *types.ProposalTerms) (*ProposalParamet } } -func (e *Engine) validateOpenProposal(proposal *types.Proposal) (types.ProposalError, error) { - params, err := e.getProposalParams(proposal.Terms) - if err != nil { - return types.ProposalErrorUnknownType, err - } - +func (e *Engine) validateOpenProposal(proposal *types.Proposal, params *types.ProposalParameters) (types.ProposalError, error) { // assign all requirement to the proposal itself. proposal.RequiredMajority = params.RequiredMajority proposal.RequiredParticipation = params.RequiredParticipation @@ -825,8 +833,33 @@ func (e *Engine) ValidatorKeyChanged(ctx context.Context, oldKey, newKey string) // AddVote adds a vote onto an existing active proposal. func (e *Engine) AddVote(ctx context.Context, cmd types.VoteSubmission, party string) error { - proposal, err := e.validateVote(cmd, party) + proposal, found := e.getProposal(cmd.ProposalID) + batchProposal, batchFound := e.getBatchProposal(cmd.ProposalID) + + if found { + if !proposal.IsOpenForVotes() { + return ErrProposalNotOpenForVotes + } + return e.addVote(ctx, cmd, proposal, party) + } + + if batchFound { + if !batchProposal.IsOpenForVotes() { + return ErrProposalNotOpenForVotes + } + return e.addBatchVote(ctx, batchProposal, cmd, party) + } + + return ErrProposalDoesNotExist +} + +func (e *Engine) addVote(ctx context.Context, cmd types.VoteSubmission, proposal *proposal, party string) error { + params, err := e.getProposalParams(proposal.Terms.Change) if err != nil { + return err + } + + if err := e.canVote(proposal.Proposal, params, party); err != nil { e.log.Debug("invalid vote submission", logging.PartyID(party), logging.String("vote", cmd.String()), @@ -860,47 +893,40 @@ func (e *Engine) AddVote(ctx context.Context, cmd types.VoteSubmission, party st ) } e.broker.Send(events.NewVoteEvent(ctx, vote)) + return nil } -func (e *Engine) validateVote(vote types.VoteSubmission, party string) (*proposal, error) { - proposal, found := e.getProposal(vote.ProposalID) - if !found { - return nil, ErrProposalDoesNotExist - } else if !proposal.IsOpenForVotes() { - return nil, ErrProposalNotOpenForVotes - } - - params, err := e.getProposalParams(proposal.Terms) - if err != nil { - return nil, err - } - +func (e *Engine) canVote( + proposal *types.Proposal, + params *types.ProposalParameters, + party string, +) error { voterTokens, err := getGovernanceTokens(e.accs, party) if err != nil { - return nil, err + return err } if proposal.IsMarketUpdate() { partyELS, _ := e.markets.GetEquityLikeShareForMarketAndParty(proposal.MarketUpdate().MarketID, party) if partyELS.IsZero() && voterTokens.IsZero() { - return nil, ErrVoterInsufficientTokensAndEquityLikeShare + return ErrVoterInsufficientTokensAndEquityLikeShare } // If he is not voting using his equity-like share, he should at least // have enough tokens. if partyELS.IsZero() && voterTokens.LT(params.MinVoterBalance) { - return nil, ErrVoterInsufficientTokens + return ErrVoterInsufficientTokens } } else { if voterTokens.LT(params.MinVoterBalance) { - return nil, ErrVoterInsufficientTokens + return ErrVoterInsufficientTokens } } - return proposal, nil + return nil } -func (e *Engine) validateMarketUpdate(ID, marketID, party string, params *ProposalParameters) (types.ProposalError, error) { +func (e *Engine) validateMarketUpdate(ID, marketID, party string, params *types.ProposalParameters) (types.ProposalError, error) { if !e.markets.MarketExists(marketID) { e.log.Debug("market does not exist", logging.MarketID(marketID), @@ -929,7 +955,7 @@ func (e *Engine) validateMarketUpdate(ID, marketID, party string, params *Propos return types.ProposalErrorUnspecified, nil } -func (e *Engine) validateSpotMarketUpdate(proposal *types.Proposal, params *ProposalParameters) (types.ProposalError, error) { +func (e *Engine) validateSpotMarketUpdate(proposal *types.Proposal, params *types.ProposalParameters) (types.ProposalError, error) { updateMarket := proposal.SpotMarketUpdate() if !e.markets.MarketExists(updateMarket.MarketID) { e.log.Debug("market does not exist", @@ -984,7 +1010,7 @@ func (e *Engine) validateChange(terms *types.ProposalTerms) (types.ProposalError return types.ProposalErrorInvalidMarket, ErrParentMarketDoesNotExist } - return validateUpdateMarketChange(marketUpdate, mkt, enct, e.timeService.GetTimeNow()) + return validateUpdateMarketChange(marketUpdate, mkt, enct, e.timeService.GetTimeNow(), e.netp) case types.ProposalTermsTypeNewAsset: return e.validateNewAssetProposal(terms.GetNewAsset()) case types.ProposalTermsTypeUpdateAsset: @@ -1178,7 +1204,7 @@ func (e *Engine) updatedMarketFromProposal(p *proposal) (*types.Market, types.Pr newMarket := &types.NewMarket{ Changes: &types.NewMarketConfiguration{ Instrument: &types.InstrumentConfiguration{ - Name: existingMarket.TradableInstrument.Instrument.Name, + Name: terms.Changes.Instrument.Name, Code: terms.Changes.Instrument.Code, }, DecimalPlaces: existingMarket.DecimalPlaces, @@ -1189,6 +1215,9 @@ func (e *Engine) updatedMarketFromProposal(p *proposal) (*types.Market, types.Pr LiquiditySLAParameters: terms.Changes.LiquiditySLAParameters, LinearSlippageFactor: terms.Changes.LinearSlippageFactor, QuadraticSlippageFactor: terms.Changes.QuadraticSlippageFactor, + LiquidityFeeSettings: terms.Changes.LiquidityFeeSettings, + LiquidationStrategy: terms.Changes.LiquidationStrategy, + MarkPriceConfiguration: terms.Changes.MarkPriceConfiguration, }, } @@ -1231,6 +1260,9 @@ func (e *Engine) updatedMarketFromProposal(p *proposal) (*types.Market, types.Pr InterestRate: product.Perps.InterestRate, ClampLowerBound: product.Perps.ClampLowerBound, ClampUpperBound: product.Perps.ClampUpperBound, + FundingRateScalingFactor: product.Perps.FundingRateScalingFactor, + FundingRateLowerBound: product.Perps.FundingRateLowerBound, + FundingRateUpperBound: product.Perps.FundingRateUpperBound, DataSourceSpecForSettlementData: product.Perps.DataSourceSpecForSettlementData, DataSourceSpecForSettlementSchedule: product.Perps.DataSourceSpecForSettlementSchedule, DataSourceSpecBinding: product.Perps.DataSourceSpecBinding, @@ -1239,8 +1271,12 @@ func (e *Engine) updatedMarketFromProposal(p *proposal) (*types.Market, types.Pr default: return nil, types.ProposalErrorUnsupportedProduct, ErrUnsupportedProduct } + // assign the current liquidation strategy if none was set on the update proposal + if newMarket.Changes.LiquidationStrategy == nil { + newMarket.Changes.LiquidationStrategy = existingMarket.LiquidationStrategy + } - if perr, err := validateUpdateMarketChange(terms, existingMarket, &enactmentTime{current: p.Terms.EnactmentTimestamp, shouldNotVerify: true}, e.timeService.GetTimeNow()); err != nil { + if perr, err := validateUpdateMarketChange(terms, existingMarket, &enactmentTime{current: p.Terms.EnactmentTimestamp, shouldNotVerify: true}, e.timeService.GetTimeNow(), e.netp); err != nil { return nil, perr, err } @@ -1285,196 +1321,11 @@ func (e *Engine) updatedAssetFromProposal(p *proposal) (*types.Asset, types.Prop return newAsset, types.ProposalErrorUnspecified, nil } -type proposal struct { - *types.Proposal - yes map[string]*types.Vote - no map[string]*types.Vote - invalidVotes map[string]*types.Vote -} - -func (p *proposal) IsTimeToEnact(now int64) bool { - return p.Terms.EnactmentTimestamp < now -} - -// ShouldClose tells if the proposal should be closed or not. -// We also check the "open" state, alongside the closing timestamp as solely -// relying on the closing timestamp could lead to call Close() on an -// already-closed proposal. -func (p *proposal) ShouldClose(now int64) bool { - return p.IsOpen() && p.Terms.ClosingTimestamp < now -} - -func (p *proposal) SucceedsMarket(parentID string) bool { - nm := p.NewMarket() - if nm == nil { - return false - } - if pid, ok := nm.ParentMarketID(); !ok || pid != parentID { - return false - } - return true -} - -func (p *proposal) IsOpen() bool { - return p.State == types.ProposalStateOpen -} - -func (p *proposal) IsPassed() bool { - return p.State == types.ProposalStatePassed -} - -func (p *proposal) IsDeclined() bool { - return p.State == types.ProposalStateDeclined -} - -func (p *proposal) IsOpenForVotes() bool { - // It's allowed to vote during the validation of the proposal by the node. - return p.State == types.ProposalStateOpen || p.State == types.ProposalStateWaitingForNodeVote -} - -// AddVote registers the last vote casted by a party. The proposal has to be -// open, it returns an error otherwise. -func (p *proposal) AddVote(vote types.Vote) error { - if !p.IsOpenForVotes() { - return ErrProposalNotOpenForVotes - } - - if vote.Value == types.VoteValueYes { - delete(p.no, vote.PartyID) - p.yes[vote.PartyID] = &vote - } else { - delete(p.yes, vote.PartyID) - p.no[vote.PartyID] = &vote - } - +func (e *Engine) OnChainIDUpdate(cID uint64) error { + e.chainID = cID return nil } -// Close determines the state of the proposal, passed or declined based on the -// vote balance and weight. -// Warning: this method should only be called once. Use ShouldClose() to know -// when to call. -func (p *proposal) Close(accounts StakingAccounts, markets Markets) { - if !p.IsOpen() { - return - } - - defer func() { - p.purgeBlankVotes(p.yes) - p.purgeBlankVotes(p.no) - }() - - tokenVoteState, tokenVoteError := p.computeVoteStateUsingTokens(accounts) - - p.State = tokenVoteState - p.Reason = tokenVoteError - - // Proposals, other than market updates, solely relies on votes using the - // governance tokens. So, only proposals for market update can go beyond this - // guard. - if !p.IsMarketUpdate() { - return - } - - if tokenVoteState == types.ProposalStateDeclined && tokenVoteError == types.ProposalErrorParticipationThresholdNotReached { - elsVoteState, elsVoteError := p.computeVoteStateUsingEquityLikeShare(markets) - p.State = elsVoteState - p.Reason = elsVoteError - } -} - -func (p *proposal) computeVoteStateUsingTokens(accounts StakingAccounts) (types.ProposalState, types.ProposalError) { - totalStake := accounts.GetStakingAssetTotalSupply() - - yes := p.countTokens(p.yes, accounts) - yesDec := num.DecimalFromUint(yes) - no := p.countTokens(p.no, accounts) - totalTokens := num.Sum(yes, no) - totalTokensDec := num.DecimalFromUint(totalTokens) - p.weightVotesFromToken(p.yes, totalTokensDec) - p.weightVotesFromToken(p.no, totalTokensDec) - majorityThreshold := totalTokensDec.Mul(p.RequiredMajority) - totalStakeDec := num.DecimalFromUint(totalStake) - participationThreshold := totalStakeDec.Mul(p.RequiredParticipation) - - // if we have 0 votes, then just return straight away, - // prevents a proposal to go through if the participation is set to 0 - if totalTokens.IsZero() { - return types.ProposalStateDeclined, types.ProposalErrorParticipationThresholdNotReached - } - - if yesDec.GreaterThanOrEqual(majorityThreshold) && totalTokensDec.GreaterThanOrEqual(participationThreshold) { - return types.ProposalStatePassed, types.ProposalErrorUnspecified - } - - if totalTokensDec.LessThan(participationThreshold) { - return types.ProposalStateDeclined, types.ProposalErrorParticipationThresholdNotReached - } - - return types.ProposalStateDeclined, types.ProposalErrorMajorityThresholdNotReached -} - -func (p *proposal) computeVoteStateUsingEquityLikeShare(markets Markets) (types.ProposalState, types.ProposalError) { - yes := p.countEquityLikeShare(p.yes, markets) - no := p.countEquityLikeShare(p.no, markets) - totalEquityLikeShare := yes.Add(no) - - if yes.GreaterThanOrEqual(p.RequiredLPMajority) && totalEquityLikeShare.GreaterThanOrEqual(p.RequiredLPParticipation) { - return types.ProposalStatePassed, types.ProposalErrorUnspecified - } - - if totalEquityLikeShare.LessThan(p.RequiredLPParticipation) { - return types.ProposalStateDeclined, types.ProposalErrorParticipationThresholdNotReached - } - - return types.ProposalStateDeclined, types.ProposalErrorMajorityThresholdNotReached -} - -func (p *proposal) countTokens(votes map[string]*types.Vote, accounts StakingAccounts) *num.Uint { - tally := num.UintZero() - for _, v := range votes { - v.TotalGovernanceTokenBalance = getTokensBalance(accounts, v.PartyID) - tally.AddSum(v.TotalGovernanceTokenBalance) - } - - return tally -} - -func (p *proposal) countEquityLikeShare(votes map[string]*types.Vote, markets Markets) num.Decimal { - tally := num.DecimalZero() - for _, v := range votes { - v.TotalEquityLikeShareWeight, _ = markets.GetEquityLikeShareForMarketAndParty(p.MarketUpdate().MarketID, v.PartyID) - tally = tally.Add(v.TotalEquityLikeShareWeight) - } - - return tally -} - -func (p *proposal) weightVotesFromToken(votes map[string]*types.Vote, totalVotes num.Decimal) { - if totalVotes.IsZero() { - return - } - - for _, v := range votes { - tokenBalanceDec := num.DecimalFromUint(v.TotalGovernanceTokenBalance) - v.TotalGovernanceTokenWeight = tokenBalanceDec.Div(totalVotes) - } -} - -// purgeBlankVotes removes votes that don't have tokens or equity-like share -// associated. The user may have withdrawn their governance token or their -// equity-like share before the end of the vote. -// We will then purge them from the map if it's the case. -func (p *proposal) purgeBlankVotes(votes map[string]*types.Vote) { - for k, v := range votes { - if v.TotalGovernanceTokenBalance.IsZero() && v.TotalEquityLikeShareWeight.IsZero() { - p.invalidVotes[k] = v - delete(votes, k) - continue - } - } -} - func getTokensBalance(accounts StakingAccounts, partyID string) *num.Uint { balance, _ := getGovernanceTokens(accounts, partyID) return balance diff --git a/core/governance/engine_batch.go b/core/governance/engine_batch.go new file mode 100644 index 0000000000..8f4de2ff59 --- /dev/null +++ b/core/governance/engine_batch.go @@ -0,0 +1,365 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package governance + +import ( + "context" + "fmt" + "sort" + + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/types" + vgerrors "code.vegaprotocol.io/vega/libs/errors" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/logging" + + "golang.org/x/exp/maps" +) + +func (e *Engine) SubmitBatchProposal( + ctx context.Context, + bpsub types.BatchProposalSubmission, + batchID, party string, +) ([]*ToSubmit, error) { + if _, ok := e.getBatchProposal(batchID); ok { + return nil, ErrProposalIsDuplicate // state is not allowed to change externally + } + + timeNow := e.timeService.GetTimeNow().UnixNano() + + bp := &types.BatchProposal{ + ID: batchID, + Timestamp: timeNow, + ClosingTimestamp: bpsub.Terms.ClosingTimestamp, + Party: party, + State: types.ProposalStateOpen, + Reference: bpsub.Reference, + Rationale: bpsub.Rationale, + Proposals: make([]*types.Proposal, 0, len(bpsub.Terms.Changes)), + } + + var proposalsEvents []events.Event //nolint:prealloc + defer func() { + e.broker.Send(events.NewProposalEventFromProto(ctx, bp.ToProto())) + + if len(proposalsEvents) > 0 { + e.broker.SendBatch(proposalsEvents) + } + }() + + proposalParamsPerProposalTermType := map[types.ProposalTermsType]*types.ProposalParameters{} + + for _, change := range bpsub.Terms.Changes { + p := &types.Proposal{ + ID: change.ID, + BatchID: &batchID, + Timestamp: timeNow, + Party: party, + State: bp.State, + Reference: bp.Reference, + Rationale: bp.Rationale, + Terms: &types.ProposalTerms{ + ClosingTimestamp: bp.ClosingTimestamp, + EnactmentTimestamp: change.EnactmentTime, + Change: change.Change, + }, + } + + params, err := e.getProposalParams(change.Change) + if err != nil { + bp.RejectWithErr(types.ProposalErrorUnknownType, err) + return nil, err + } + + proposalParamsPerProposalTermType[change.Change.GetTermType()] = params + + bp.SetProposalParams(params.Clone()) + bp.Proposals = append(bp.Proposals, p) + } + + var toSubmits []*ToSubmit //nolint:prealloc + errs := vgerrors.NewCumulatedErrors() + + for _, p := range bp.Proposals { + perTypeParams := proposalParamsPerProposalTermType[p.Terms.Change.GetTermType()] + params := bp.ProposalParameters.Clone() + + submit, err := e.validateProposalFromBatch(ctx, p, params, *perTypeParams) + if err != nil { + errs.Add(err) + continue + } + + toSubmits = append(toSubmits, submit) + } + + for _, p := range bp.Proposals { + if !p.IsRejected() && errs.HasAny() { + p.Reject(types.ProposalErrorProposalInBatchRejected) + } + + proposalsEvents = append(proposalsEvents, events.NewProposalEvent(ctx, *p)) + } + + if errs.HasAny() { + bp.State = types.ProposalStateRejected + bp.Reason = types.ProposalErrorProposalInBatchRejected + + return nil, errs + } + + e.startBatchProposal(bp) + + return toSubmits, nil +} + +func (e *Engine) RejectBatchProposal( + ctx context.Context, proposalID string, r types.ProposalError, errorDetails error, +) error { + bp, ok := e.getBatchProposal(proposalID) + if !ok { + return ErrProposalDoesNotExist + } + + bp.RejectWithErr(r, errorDetails) + + evts := make([]events.Event, 0, len(bp.Proposals)) + for _, proposal := range bp.Proposals { + e.rejectProposal(ctx, proposal, r, errorDetails) + evts = append(evts, events.NewProposalEvent(ctx, *proposal)) + } + + e.broker.Send(events.NewProposalEventFromProto(ctx, bp.ToProto())) + e.broker.SendBatch(evts) + return nil +} + +func (e *Engine) evaluateBatchProposals( + ctx context.Context, now int64, +) (voteClosed []*VoteClosed, addToActiveProposals []*proposal) { + batchIDs := maps.Keys(e.activeBatchProposals) + sort.Strings(batchIDs) + + for _, batchID := range batchIDs { + batchProposal := e.activeBatchProposals[batchID] + + var batchHasRejectedProposal bool + var batchHasDeclinedProposal bool + var closedProposals []*proposal + for _, propType := range batchProposal.Proposals { + proposal := &proposal{ + Proposal: propType, + yes: batchProposal.yes, + no: batchProposal.no, + invalidVotes: map[string]*types.Vote{}, + } + + // check if the market for successor proposals still exists, if not, reject the proposal + // in case a single proposal is rejected we can reject the whole batch + if nm := proposal.Terms.GetNewMarket(); nm != nil && nm.Successor() != nil { + if _, err := e.markets.GetMarketState(proposal.ID); err != nil { + proposal.RejectWithErr(types.ProposalErrorInvalidSuccessorMarket, + ErrParentMarketSucceededByCompeting) + batchHasRejectedProposal = true + break + } + } + + // do not check parent market, the market was either rejected when the parent was succeeded + // or, if the parent market state is gone (ie succession window has expired), the proposal simply + // loses its parent market reference + if proposal.ShouldClose(now) { + proposal.Close(e.accs, e.markets) + if proposal.IsPassed() { + e.log.Debug("Proposal passed", + logging.ProposalID(proposal.ID), + logging.ProposalBatchID(batchID), + ) + } else if proposal.IsDeclined() { + e.log.Debug("Proposal declined", + logging.ProposalID(proposal.ID), + logging.String("details", proposal.ErrorDetails), + logging.String("reason", proposal.Reason.String()), + logging.ProposalBatchID(batchID), + ) + batchHasDeclinedProposal = true + } + + closedProposals = append(closedProposals, proposal) + voteClosed = append(voteClosed, e.preVoteClosedProposal(proposal)) + } + } + + if batchHasRejectedProposal { + batchProposal.State = types.ProposalStateRejected + batchProposal.Reason = types.ProposalErrorProposalInBatchRejected + + proposalsEvents := make([]events.Event, 0, len(batchProposal.Proposals)) + for _, proposal := range batchProposal.Proposals { + if proposal.IsPassed() { + proposal.Reject(types.ProposalErrorProposalInBatchRejected) + } + + proposalsEvents = append(proposalsEvents, events.NewProposalEvent(ctx, *proposal)) + } + + e.broker.Send(events.NewProposalEventFromProto(ctx, batchProposal.ToProto())) + e.broker.SendBatch(proposalsEvents) + + delete(e.activeBatchProposals, batchProposal.ID) + continue + } + + if len(closedProposals) < 1 { + continue + } + + // all the proposal in the batch should close at the same time so this should never happen + if len(closedProposals) != len(batchProposal.Proposals) { + e.log.Panic("Failed to close all proposals in batch proposal", + logging.ProposalBatchID(batchID), + ) + } + + proposalEvents := make([]events.Event, 0, len(closedProposals)) + for _, proposal := range closedProposals { + if proposal.IsPassed() && batchHasDeclinedProposal { + proposal.Decline(types.ProposalErrorProposalInBatchDeclined) + } else if proposal.IsPassed() { + addToActiveProposals = append(addToActiveProposals, proposal) + } + + proposalEvents = append(proposalEvents, events.NewProposalEvent(ctx, *proposal.Proposal)) + proposalEvents = append(proposalEvents, newUpdatedProposalEvents(ctx, proposal)...) + } + + batchProposal.State = types.ProposalStatePassed + if batchHasDeclinedProposal { + batchProposal.State = types.ProposalStateDeclined + batchProposal.Reason = types.ProposalErrorProposalInBatchDeclined + } + + e.broker.Send(events.NewProposalEventFromProto(ctx, batchProposal.ToProto())) + e.broker.SendBatch(proposalEvents) + delete(e.activeBatchProposals, batchProposal.ID) + } + + return +} + +func (e *Engine) getBatchProposal(id string) (*batchProposal, bool) { + bp, ok := e.activeBatchProposals[id] + return bp, ok +} + +func (e *Engine) validateProposalFromBatch( + ctx context.Context, + p *types.Proposal, + batchParams, perTypeParams types.ProposalParameters, +) (*ToSubmit, error) { + batchParams.MaxEnact = perTypeParams.MaxEnact + batchParams.MinEnact = perTypeParams.MinEnact + + if proposalErr, err := e.validateOpenProposal(p, &batchParams); err != nil { + p.RejectWithErr(proposalErr, err) + + if e.log.IsDebug() { + e.log.Debug("Batch proposal rejected", + logging.String("proposal-id", p.ID), + logging.String("proposal details", p.String()), + logging.Error(err), + ) + } + + return nil, err + } + + submit, err := e.intoToSubmit(ctx, p, &enactmentTime{current: p.Terms.EnactmentTimestamp}, false) + if err != nil { + if e.log.IsDebug() { + e.log.Debug("Batch proposal rejected", + logging.String("proposal-id", p.ID), + logging.String("proposal details", p.String()), + logging.Error(err), + ) + } + return nil, err + } + + return submit, nil +} + +func (e *Engine) startBatchProposal(p *types.BatchProposal) { + e.activeBatchProposals[p.ID] = &batchProposal{ + BatchProposal: p, + yes: map[string]*types.Vote{}, + no: map[string]*types.Vote{}, + invalidVotes: map[string]*types.Vote{}, + } +} + +func (e *Engine) addBatchVote(ctx context.Context, batchProposal *batchProposal, cmd types.VoteSubmission, party string) error { + validationErrs := vgerrors.NewCumulatedErrors() + + perMarketELS := map[string]num.Decimal{} + for _, proposal := range batchProposal.Proposals { + if err := e.canVote(proposal, batchProposal.ProposalParameters, party); err != nil { + validationErrs.Add(fmt.Errorf("proposal term %q has failed with: %w", proposal.Terms.Change.GetTermType(), err)) + continue + } + + if proposal.IsMarketUpdate() { + marketID := proposal.MarketUpdate().MarketID + els, _ := e.markets.GetEquityLikeShareForMarketAndParty(marketID, party) + + perMarketELS[marketID] = els + } + } + + if validationErrs.HasAny() { + e.log.Debug("invalid vote submission", + logging.PartyID(party), + logging.String("vote", cmd.String()), + logging.Error(validationErrs), + ) + return validationErrs + } + + vote := types.Vote{ + PartyID: party, + ProposalID: cmd.ProposalID, + Value: cmd.Value, + Timestamp: e.timeService.GetTimeNow().UnixNano(), + TotalGovernanceTokenBalance: getTokensBalance(e.accs, party), + TotalGovernanceTokenWeight: num.DecimalZero(), + TotalEquityLikeShareWeight: num.DecimalZero(), + PerMarketEquityLikeShareWeight: perMarketELS, + } + + if err := batchProposal.AddVote(vote); err != nil { + return fmt.Errorf("couldn't cast the vote: %w", err) + } + + if e.log.IsDebug() { + e.log.Debug("vote submission accepted", + logging.PartyID(party), + logging.String("vote", cmd.String()), + ) + } + e.broker.Send(events.NewVoteEvent(ctx, vote)) + + return nil +} diff --git a/core/governance/engine_batch_test.go b/core/governance/engine_batch_test.go new file mode 100644 index 0000000000..ed905a02b0 --- /dev/null +++ b/core/governance/engine_batch_test.go @@ -0,0 +1,419 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package governance_test + +import ( + "context" + "fmt" + "testing" + "time" + + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/governance" + "code.vegaprotocol.io/vega/core/netparams" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" + vgrand "code.vegaprotocol.io/vega/libs/rand" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestSubmitBatchProposals(t *testing.T) { + t.Run("Submitted batch proposal is declined", testSubmittingBatchProposalDeclined) + t.Run("Submitted batch proposal has passed", testSubmittingBatchProposalPassed) + t.Run("Submitting batch fails if any of the terms fails validation", testSubmittingBatchProposalFailsWhenTermValidationFails) + + t.Run("Voting with non-existing account fails", testVotingOnBatchWithNonExistingAccountFails) + t.Run("Voting without token fails", testVotingOnBatchWithoutTokenFails) +} + +func testSubmittingBatchProposalDeclined(t *testing.T) { + eng := getTestEngine(t, time.Now()) + + now := eng.tsvc.GetTimeNow().Add(2 * time.Hour) + party := vgrand.RandomStr(5) + + eng.ensureAllAssetEnabled(t) + eng.ensureTokenBalanceForParty(t, party, 1) + + batchID := eng.newProposalID() + + newFormProposal := eng.newFreeformProposal(party, now) + newNetParamProposal := eng.newProposalForNetParam(party, netparams.MarketAuctionMaximumDuration, "10h", now) + newMarketProposal := eng.newProposalForNewMarket(party, now, nil, nil, true) + + // expect + eng.expectOpenProposalEvent(t, party, batchID) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: party, + proposalID: newFormProposal.ID, + state: types.ProposalStateOpen, + reason: types.ProposalErrorUnspecified, + }, + { + partyID: party, + proposalID: newNetParamProposal.ID, + state: types.ProposalStateOpen, + reason: types.ProposalErrorUnspecified, + }, + { + partyID: party, + proposalID: newMarketProposal.ID, + state: types.ProposalStateOpen, + reason: types.ProposalErrorUnspecified, + }, + }) + + batchClosingTime := now.Add(48 * time.Hour) + + // when + _, err := eng.submitBatchProposal(t, eng.newBatchSubmission( + batchClosingTime.Unix(), + newFormProposal, + newNetParamProposal, + newMarketProposal, + ), batchID, party) + + assert.NoError(t, err) + ctx := context.Background() + + eng.expectDeclinedProposalEvent(t, batchID, types.ProposalErrorProposalInBatchDeclined) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: party, + proposalID: newFormProposal.ID, + state: types.ProposalStateDeclined, + reason: types.ProposalErrorParticipationThresholdNotReached, + }, + { + partyID: party, + proposalID: newNetParamProposal.ID, + state: types.ProposalStateDeclined, + reason: types.ProposalErrorParticipationThresholdNotReached, + }, + { + partyID: party, + proposalID: newMarketProposal.ID, + state: types.ProposalStateDeclined, + reason: types.ProposalErrorParticipationThresholdNotReached, + }, + }) + + eng.accounts.EXPECT().GetStakingAssetTotalSupply().AnyTimes().Return(num.NewUint(200)) + eng.OnTick(ctx, batchClosingTime.Add(1*time.Second)) +} + +func testSubmittingBatchProposalPassed(t *testing.T) { + eng := getTestEngine(t, time.Now()) + + now := eng.tsvc.GetTimeNow().Add(2 * time.Hour) + party := vgrand.RandomStr(5) + + eng.ensureAllAssetEnabled(t) + eng.ensureTokenBalanceForParty(t, party, 1) + + batchID := eng.newProposalID() + + newFormProposal := eng.newFreeformProposal(party, now) + newNetParamProposal := eng.newProposalForNetParam(party, netparams.MarketAuctionMaximumDuration, "10h", now) + newMarketProposal := eng.newProposalForNewMarket(party, now, nil, nil, true) + + // expect + eng.expectOpenProposalEvent(t, party, batchID) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: party, + proposalID: newFormProposal.ID, + state: types.ProposalStateOpen, + reason: types.ProposalErrorUnspecified, + }, + { + partyID: party, + proposalID: newNetParamProposal.ID, + state: types.ProposalStateOpen, + reason: types.ProposalErrorUnspecified, + }, + { + partyID: party, + proposalID: newMarketProposal.ID, + state: types.ProposalStateOpen, + reason: types.ProposalErrorUnspecified, + }, + }) + + batchClosingTime := now.Add(48 * time.Hour) + + // when + _, err := eng.submitBatchProposal(t, eng.newBatchSubmission( + batchClosingTime.Unix(), + newFormProposal, + newNetParamProposal, + newMarketProposal, + ), batchID, party) + + assert.NoError(t, err) + ctx := context.Background() + + eng.accounts.EXPECT().GetStakingAssetTotalSupply().AnyTimes().Return(num.NewUint(200)) + + for i := 0; i < 10; i++ { + partyID := fmt.Sprintf("party-%d", i) + eng.ensureTokenBalanceForParty(t, partyID, 20) + eng.expectVoteEvent(t, partyID, batchID) + err = eng.addYesVote(t, partyID, batchID) + assert.NoError(t, err) + } + + eng.expectPassedProposalEvent(t, batchID) + + expectedProposals := []expectedProposal{ + { + partyID: party, + proposalID: newFormProposal.ID, + state: types.ProposalStatePassed, + }, + { + partyID: party, + proposalID: newNetParamProposal.ID, + state: types.ProposalStatePassed, + }, + { + partyID: party, + proposalID: newMarketProposal.ID, + state: types.ProposalStatePassed, + }, + } + + eng.broker.EXPECT().SendBatch(gomock.Any()).Times(1).Do(func(evts []events.Event) { + i := 0 + for _, evt := range evts { + switch e := evt.(type) { + case *events.Proposal: + p := e.Proposal() + assert.Equal(t, expectedProposals[i].proposalID, p.Id) + assert.Equal(t, expectedProposals[i].partyID, p.PartyId) + assert.Equal(t, expectedProposals[i].state.String(), p.State.String()) + i++ + } + } + }) + + eng.OnTick(ctx, batchClosingTime.Add(1*time.Second)) +} + +func testSubmittingBatchProposalFailsWhenTermValidationFails(t *testing.T) { + eng := getTestEngine(t, time.Now()) + + now := eng.tsvc.GetTimeNow().Add(2 * time.Hour) + party := vgrand.RandomStr(5) + + newFormProposal := eng.newFreeformProposal(party, now) + newNetParamProposal := eng.newProposalForNetParam(party, netparams.MarketAuctionMaximumDuration, "10h", now) + newMarketProposal := eng.newProposalForNewMarket(party, now, nil, nil, true) + newMarketProposal.Terms.EnactmentTimestamp = time.Now().Unix() + + newFormProposal2 := eng.newFreeformProposal(party, now) + newNetParamProposal2 := eng.newProposalForNetParam(party, netparams.MarketAuctionMaximumDuration, "10h", now) + newNetParamProposal2.Terms.EnactmentTimestamp = now.Add(24 * 365 * time.Hour).Unix() + newMarketProposal2 := eng.newProposalForNewMarket(party, now, nil, nil, true) + + batchClosingTime := now.Add(48 * time.Hour).Unix() + + cases := []struct { + msg string + submission types.BatchProposalSubmission + expectProposal []expectedProposal + containsError string + }{ + { + msg: "New market rejected and other proposals with it", + containsError: "proposal enactment time too soon", + submission: eng.newBatchSubmission( + batchClosingTime, + newFormProposal, + newNetParamProposal, + newMarketProposal, + ), + expectProposal: []expectedProposal{ + { + partyID: party, + proposalID: newFormProposal.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorProposalInBatchRejected, + }, + { + partyID: party, + proposalID: newNetParamProposal.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorProposalInBatchRejected, + }, + { + partyID: party, + proposalID: newMarketProposal.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorEnactTimeTooSoon, + }, + }, + }, + { + msg: "Net parameter is rejected and the whole batch with it", + containsError: "proposal enactment time too late", + submission: eng.newBatchSubmission( + batchClosingTime, + newNetParamProposal2, + newFormProposal2, + newMarketProposal2, + ), + expectProposal: []expectedProposal{ + { + partyID: party, + proposalID: newNetParamProposal2.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorEnactTimeTooLate, + }, + { + partyID: party, + proposalID: newFormProposal2.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorProposalInBatchRejected, + }, + { + partyID: party, + proposalID: newMarketProposal2.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorProposalInBatchRejected, + }, + }, + }, + } + + for _, tc := range cases { + t.Run(tc.msg, func(tt *testing.T) { + // setup + eng.ensureAllAssetEnabled(tt) + eng.ensureTokenBalanceForParty(t, party, 1) + + batchID := eng.newProposalID() + + // expect + eng.expectRejectedProposalEvent(tt, party, batchID, types.ProposalErrorProposalInBatchRejected) + eng.expectProposalEvents(tt, tc.expectProposal) + + // when + _, err := eng.submitBatchProposal(tt, tc.submission, batchID, party) + + // then + require.Error(tt, err) + if tc.containsError != "" { + assert.Contains(tt, err.Error(), tc.containsError) + } + }) + } +} + +func testVotingOnBatchWithNonExistingAccountFails(t *testing.T) { + eng := getTestEngine(t, time.Now()) + + // given + proposer := vgrand.RandomStr(5) + proposal := eng.newProposalForNewMarket(proposer, eng.tsvc.GetTimeNow().Add(2*time.Hour), nil, nil, true) + + // setup + eng.ensureAllAssetEnabled(t) + eng.ensureTokenBalanceForParty(t, proposer, 1) + + batchID := eng.newProposalID() + + // expect + eng.expectOpenProposalEvent(t, proposer, batchID) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: proposer, + proposalID: proposal.ID, + state: types.ProposalStateOpen, + }, + }) + + // when + sub := eng.newBatchSubmission( + proposal.Terms.ClosingTimestamp, + proposal, + ) + _, err := eng.submitBatchProposal(t, sub, batchID, proposer) + + // then + require.NoError(t, err) + + // given + voterWithoutAccount := "voter-no-account" + + // setup + eng.ensureNoAccountForParty(t, voterWithoutAccount) + + // when + err = eng.addYesVote(t, voterWithoutAccount, batchID) + + // then + require.Error(t, err) + assert.ErrorContains(t, err, "no balance for party") +} + +func testVotingOnBatchWithoutTokenFails(t *testing.T) { + eng := getTestEngine(t, time.Now()) + + // given + proposer := eng.newValidParty("proposer", 1) + proposal := eng.newProposalForNewMarket(proposer.Id, eng.tsvc.GetTimeNow().Add(2*time.Hour), nil, nil, true) + + // setup + batchID := eng.newProposalID() + + eng.ensureAllAssetEnabled(t) + eng.expectOpenProposalEvent(t, proposer.Id, batchID) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: proposer.Id, + proposalID: proposal.ID, + state: types.ProposalStateOpen, + }, + }) + + // when + sub := eng.newBatchSubmission( + proposal.Terms.ClosingTimestamp, + proposal, + ) + _, err := eng.submitBatchProposal(t, sub, batchID, proposer.Id) + + // then + require.NoError(t, err) + + // given + voterWithEmptyAccount := vgrand.RandomStr(5) + + // setup + eng.ensureTokenBalanceForParty(t, voterWithEmptyAccount, 0) + + // when + err = eng.addYesVote(t, voterWithEmptyAccount, batchID) + + // then + require.Error(t, err) + assert.ErrorContains(t, err, governance.ErrVoterInsufficientTokens.Error()) +} diff --git a/core/governance/engine_freeform_test.go b/core/governance/engine_freeform_test.go index eb05928ba6..bde1ddd877 100644 --- a/core/governance/engine_freeform_test.go +++ b/core/governance/engine_freeform_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/governance" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/governance/engine_new_asset_test.go b/core/governance/engine_new_asset_test.go index a449d1332c..3d850ec4d3 100644 --- a/core/governance/engine_new_asset_test.go +++ b/core/governance/engine_new_asset_test.go @@ -29,6 +29,7 @@ import ( "code.vegaprotocol.io/vega/core/validators" "code.vegaprotocol.io/vega/libs/num" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/governance/engine_new_market_test.go b/core/governance/engine_new_market_test.go index 0f12790ea6..196ca45065 100644 --- a/core/governance/engine_new_market_test.go +++ b/core/governance/engine_new_market_test.go @@ -33,6 +33,7 @@ import ( "code.vegaprotocol.io/vega/libs/ptr" vgrand "code.vegaprotocol.io/vega/libs/rand" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/golang/mock/gomock" "github.com/pkg/errors" "github.com/stretchr/testify/assert" @@ -467,6 +468,12 @@ func testSubmittingProposalWithInternalTimeSettlingForNewMarketFails(t *testing. }, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, @@ -541,6 +548,12 @@ func testSubmittingProposalWithEmptySettlingDataForNewMarketFails(t *testing.T) }, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, @@ -624,6 +637,12 @@ func testSubmittingProposalWithEmptyTerminationDataForNewMarketFails(t *testing. }, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, @@ -732,6 +751,12 @@ func testSubmittingProposalWithInternalTimeTerminationWithLessThanEqualCondition }, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, @@ -795,6 +820,12 @@ func testSubmittingProposalWithInternalTimeTerminationWithLessThanEqualCondition }, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, @@ -923,6 +954,12 @@ func testSubmittingProposalWithInternalTimeTriggerTerminationFails(t *testing.T) DecimalPlaces: 0, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, @@ -1017,6 +1054,12 @@ func testSubmittingProposalWithInternalTimeTriggerSettlementFails(t *testing.T) DecimalPlaces: 0, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, diff --git a/core/governance/engine_new_net_param_test.go b/core/governance/engine_new_net_param_test.go index 4ca6021f76..9cc5200202 100644 --- a/core/governance/engine_new_net_param_test.go +++ b/core/governance/engine_new_net_param_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/core/governance/engine_new_spot_market_test.go b/core/governance/engine_new_spot_market_test.go index 1e5150111d..0cc0374230 100644 --- a/core/governance/engine_new_spot_market_test.go +++ b/core/governance/engine_new_spot_market_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/governance/engine_test.go b/core/governance/engine_test.go index 5615b8bdcc..470b24286a 100644 --- a/core/governance/engine_test.go +++ b/core/governance/engine_test.go @@ -24,10 +24,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/core/assets" "code.vegaprotocol.io/vega/core/assets/builtin" bmocks "code.vegaprotocol.io/vega/core/broker/mocks" @@ -45,6 +41,10 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/logging" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) var errNoBalanceForParty = errors.New("no balance for party") @@ -70,7 +70,6 @@ func TestSubmitProposals(t *testing.T) { t.Run("Submitting a proposal with closing time too late fails", testSubmittingProposalWithClosingTimeTooLateFails) t.Run("Submitting a proposal with internal time termination with closing time too late fails", testSubmittingProposalWithInternalTimeTerminationWithClosingTimeTooLateFails) t.Run("Submitting a proposal with enactment time too soon fails", testSubmittingProposalWithEnactmentTimeTooSoonFails) - t.Run("Submitting a proposal with enactment time too soon fails", testSubmittingProposalWithEnactmentTimeTooSoonFails) t.Run("Submitting a proposal with enactment time too late fails", testSubmittingProposalWithEnactmentTimeTooLateFails) t.Run("Submitting a proposal with non-existing account fails", testSubmittingProposalWithNonExistingAccountFails) t.Run("Submitting a proposal with internal time termination with non-existing account fails", testSubmittingProposalWithInternalTimeTerminationWithNonExistingAccountFails) @@ -269,6 +268,37 @@ func testSubmittingProposalWithNonExistingAccountFails(t *testing.T) { require.Error(tt, err) assert.EqualError(tt, err, errNoBalanceForParty.Error()) }) + + t.Run(fmt.Sprintf("%s batch version", tc.name), func(tt *testing.T) { + // setup + eng.ensureAllAssetEnabled(tt) + eng.ensureNoAccountForParty(tt, party) + + batchID := eng.newProposalID() + + // expect + eng.expectRejectedProposalEvent(tt, party, batchID, types.ProposalErrorProposalInBatchRejected) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: party, + proposalID: tc.proposal.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorInsufficientTokens, + }, + }) + + sub := eng.newBatchSubmission( + now.Add(48*time.Hour).Unix(), + tc.proposal, + ) + + // when + _, err := eng.submitBatchProposal(tt, sub, batchID, party) + + // then + require.Error(tt, err) + assert.EqualError(tt, err, errNoBalanceForParty.Error()) + }) } } @@ -387,6 +417,37 @@ func testSubmittingProposalWithoutEnoughStakeFails(t *testing.T) { require.Error(tt, err) assert.Contains(t, err.Error(), "proposer have insufficient governance token, expected >=") }) + + t.Run(fmt.Sprintf("%s batch version", tc.name), func(tt *testing.T) { + // setup + eng.ensureAllAssetEnabled(tt) + eng.ensureNoAccountForParty(tt, party) + + batchID := eng.newProposalID() + + // expect + eng.expectRejectedProposalEvent(tt, party, batchID, types.ProposalErrorProposalInBatchRejected) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: party, + proposalID: tc.proposal.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorInsufficientTokens, + }, + }) + + sub := eng.newBatchSubmission( + now.Add(48*time.Hour).Unix(), + tc.proposal, + ) + + // when + _, err := eng.submitBatchProposal(tt, sub, batchID, party) + + // then + require.Error(tt, err) + assert.EqualError(tt, err, errNoBalanceForParty.Error()) + }) } } @@ -423,6 +484,38 @@ func testSubmittingUpdateMarketProposalWithoutEnoughStakeAndELSFails(t *testing. require.Error(tt, err) assert.Contains(t, err.Error(), "proposer have insufficient governance token, expected >=") }) + + t.Run(fmt.Sprintf("%s batch version", tc.name), func(tt *testing.T) { + // setup + eng.ensureTokenBalanceForParty(tt, party, 10) + eng.ensureNetworkParameter(tt, tc.minProposerBalanceParam, "10000") + eng.ensureAllAssetEnabled(tt) + + // when + eng.markets.EXPECT().MarketExists(gomock.Any()).Return(true) + eng.markets.EXPECT().GetEquityLikeShareForMarketAndParty(gomock.Any(), gomock.Any()).Return(num.DecimalZero(), true) + batchID := eng.newProposalID() + + eng.expectRejectedProposalEvent(tt, party, batchID, types.ProposalErrorProposalInBatchRejected) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: party, + proposalID: tc.proposal.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorInsufficientTokens, + }, + }) + + sub := eng.newBatchSubmission( + now.Add(48*time.Hour).Unix(), + tc.proposal, + ) + _, err := eng.submitBatchProposal(tt, sub, batchID, party) + + // then + require.Error(tt, err) + assert.Contains(t, err.Error(), "proposer have insufficient governance token, expected >=") + }) } func testSubmittingProposalWithInternalTimeTerminationWithoutEnoughStakeFails(t *testing.T) { @@ -467,6 +560,36 @@ func testSubmittingProposalWithInternalTimeTerminationWithoutEnoughStakeFails(t require.Error(tt, err) assert.Contains(t, err.Error(), "proposer have insufficient governance token, expected >=") }) + + t.Run(fmt.Sprintf("%s batch version", tc.name), func(tt *testing.T) { + // setup + eng.ensureTokenBalanceForParty(tt, party, 10) + eng.ensureNetworkParameter(tt, tc.minProposerBalanceParam, "10000") + eng.ensureAllAssetEnabled(tt) + + // when + batchID := eng.newProposalID() + + eng.expectRejectedProposalEvent(tt, party, batchID, types.ProposalErrorProposalInBatchRejected) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: party, + proposalID: tc.proposal.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorInsufficientTokens, + }, + }) + + sub := eng.newBatchSubmission( + now.Add(48*time.Hour).Unix(), + tc.proposal, + ) + _, err := eng.submitBatchProposal(tt, sub, batchID, party) + + // then + require.Error(tt, err) + assert.Contains(t, err.Error(), "proposer have insufficient governance token, expected >=") + }) } } @@ -510,6 +633,36 @@ func testSubmittingProposalWithClosingTimeTooSoonFails(t *testing.T) { require.Error(tt, err) assert.Contains(tt, err.Error(), "proposal closing time too soon, expected >") }) + + t.Run(fmt.Sprintf("%s batch version", tc.msg), func(tt *testing.T) { + // setup + eng.ensureAllAssetEnabled(tt) + + batchID := eng.newProposalID() + + // expect + eng.expectRejectedProposalEvent(tt, party, batchID, types.ProposalErrorProposalInBatchRejected) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: party, + proposalID: tc.proposal.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorCloseTimeTooSoon, + }, + }) + + sub := eng.newBatchSubmission( + now.Unix(), + tc.proposal, + ) + + // when + _, err := eng.submitBatchProposal(tt, sub, batchID, party) + + // then + require.Error(tt, err) + assert.Contains(tt, err.Error(), "proposal closing time too soon, expected >") + }) } } @@ -553,6 +706,36 @@ func testSubmittingProposalWithInternalTimeTerminationWithClosingTimeTooSoonFail require.Error(tt, err) assert.Contains(tt, err.Error(), "proposal closing time too soon, expected >") }) + + t.Run(fmt.Sprintf("%s batch version", tc.msg), func(tt *testing.T) { + // setup + eng.ensureAllAssetEnabled(tt) + + batchID := eng.newProposalID() + + // expect + eng.expectRejectedProposalEvent(tt, party, batchID, types.ProposalErrorProposalInBatchRejected) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: party, + proposalID: tc.proposal.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorCloseTimeTooSoon, + }, + }) + + sub := eng.newBatchSubmission( + now.Unix(), + tc.proposal, + ) + + // when + _, err := eng.submitBatchProposal(tt, sub, batchID, party) + + // then + require.Error(tt, err) + assert.Contains(tt, err.Error(), "proposal closing time too soon, expected >") + }) } } @@ -596,6 +779,36 @@ func testSubmittingProposalWithClosingTimeTooLateFails(t *testing.T) { require.Error(tt, err) assert.Contains(tt, err.Error(), "proposal closing time too late, expected <") }) + + t.Run(fmt.Sprintf("%s batch version", tc.msg), func(tt *testing.T) { + // setup + eng.ensureAllAssetEnabled(tt) + + batchID := eng.newProposalID() + + // expect + eng.expectRejectedProposalEvent(tt, party, batchID, types.ProposalErrorProposalInBatchRejected) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: party, + proposalID: tc.proposal.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorCloseTimeTooLate, + }, + }) + + sub := eng.newBatchSubmission( + now.Add(3*365*24*time.Hour).Unix(), + tc.proposal, + ) + + // when + _, err := eng.submitBatchProposal(tt, sub, batchID, party) + + // then + require.Error(tt, err) + assert.Contains(tt, err.Error(), "proposal closing time too late, expected <") + }) } } @@ -639,6 +852,36 @@ func testSubmittingProposalWithInternalTimeTerminationWithClosingTimeTooLateFail require.Error(tt, err) assert.Contains(tt, err.Error(), "proposal closing time too late, expected <") }) + + t.Run(fmt.Sprintf("%s batch version", tc.msg), func(tt *testing.T) { + // setup + eng.ensureAllAssetEnabled(tt) + + batchID := eng.newProposalID() + + // expect + eng.expectRejectedProposalEvent(tt, party, batchID, types.ProposalErrorProposalInBatchRejected) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: party, + proposalID: tc.proposal.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorCloseTimeTooLate, + }, + }) + + sub := eng.newBatchSubmission( + now.Add(3*365*24*time.Hour).Unix(), + tc.proposal, + ) + + // when + _, err := eng.submitBatchProposal(tt, sub, batchID, party) + + // then + require.Error(tt, err) + assert.Contains(tt, err.Error(), "proposal closing time too late, expected <") + }) } } @@ -716,6 +959,39 @@ func testSubmittingProposalWithEnactmentTimeTooSoonFails(t *testing.T) { require.Error(tt, err) assert.Contains(tt, err.Error(), "proposal enactment time too soon, expected >") }) + + t.Run(fmt.Sprintf("%s batch version", tc.msg), func(tt *testing.T) { + // given + tc.proposal.Terms.EnactmentTimestamp = now.Unix() + + // setup + eng.ensureAllAssetEnabled(tt) + + batchID := eng.newProposalID() + + // expect + eng.expectRejectedProposalEvent(tt, party, batchID, types.ProposalErrorProposalInBatchRejected) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: party, + proposalID: tc.proposal.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorEnactTimeTooSoon, + }, + }) + + sub := eng.newBatchSubmission( + now.Add(48*time.Hour).Unix(), + tc.proposal, + ) + + // when + _, err := eng.submitBatchProposal(tt, sub, batchID, party) + + // then + require.Error(tt, err) + assert.Contains(tt, err.Error(), "proposal enactment time too soon, expected >") + }) } } @@ -759,6 +1035,39 @@ func testSubmittingProposalWithEnactmentTimeTooLateFails(t *testing.T) { require.Error(tt, err) assert.Contains(tt, err.Error(), "proposal enactment time too late, expected <") }) + + t.Run(fmt.Sprintf("%s batch version", tc.msg), func(tt *testing.T) { + // given + tc.proposal.Terms.EnactmentTimestamp = now.Add(3 * 365 * 24 * time.Hour).Unix() + + // setup + eng.ensureAllAssetEnabled(tt) + + batchID := eng.newProposalID() + + // expect + eng.expectRejectedProposalEvent(tt, party, batchID, types.ProposalErrorProposalInBatchRejected) + eng.expectProposalEvents(t, []expectedProposal{ + { + partyID: party, + proposalID: tc.proposal.ID, + state: types.ProposalStateRejected, + reason: types.ProposalErrorEnactTimeTooLate, + }, + }) + + sub := eng.newBatchSubmission( + now.Add(48*time.Hour).Unix(), + tc.proposal, + ) + + // when + _, err := eng.submitBatchProposal(tt, sub, batchID, party) + + // then + require.Error(tt, err) + assert.Contains(tt, err.Error(), "proposal enactment time too late, expected <") + }) } } @@ -1144,6 +1453,9 @@ func getTestEngine(t *testing.T, now time.Time) *tstEngine { els: map[string]map[string]float64{}, } // ensure the balance is always returned as expected + + broker.EXPECT().Send(gomock.Any()).Times(1) + tEng.netp.Update(context.Background(), netparams.BlockchainsEthereumConfig, "{\"network_id\":\"1\",\"chain_id\":\"1\",\"collateral_bridge_contract\":{\"address\":\"0x23872549cE10B40e31D6577e0A920088B0E0666a\"},\"confirmations\":64,\"staking_bridge_contract\":{\"address\":\"0x195064D33f09e0c42cF98E665D9506e0dC17de68\",\"deployment_block_height\":13146644},\"token_vesting_contract\":{\"address\":\"0x23d1bFE8fA50a167816fBD79D7932577c06011f4\",\"deployment_block_height\":12834524},\"multisig_control_contract\":{\"address\":\"0xDD2df0E7583ff2acfed5e49Df4a424129cA9B58F\",\"deployment_block_height\":15263593}}") tEng.accounts.EXPECT().GetAvailableBalance(gomock.Any()).AnyTimes().DoAndReturn(func(p string) (*num.Uint, error) { b, ok := tEng.tokenBal[p] if !ok { @@ -1311,6 +1623,12 @@ func newMarketTerms(termFilter *dstypes.SpecFilter, termBinding *datasource.Spec LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), Successor: successor, + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, } @@ -1394,6 +1712,12 @@ func newPerpsMarketTerms(termFilter *dstypes.SpecFilter, binding *datasource.Spe }, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, } @@ -1497,6 +1821,7 @@ func updateMarketTerms(termFilter *dstypes.SpecFilter, termBinding *datasource.S Changes: &types.UpdateMarketConfiguration{ Instrument: &types.UpdateInstrumentConfiguration{ Code: "CRYPTO:GBPVUSD/JUN20", + Name: "UPDATED_MARKET_NAME", Product: &types.UpdateInstrumentConfigurationFuture{ Future: &types.UpdateFutureProduct{ QuoteName: "VUSD", @@ -1541,6 +1866,12 @@ func updateMarketTerms(termFilter *dstypes.SpecFilter, termBinding *datasource.S }, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, } @@ -1556,6 +1887,20 @@ func (e *tstEngine) submitProposal(t *testing.T, proposal types.Proposal) (*gove ) } +func (e *tstEngine) submitBatchProposal( + t *testing.T, + submission types.BatchProposalSubmission, + proposalID, party string, +) ([]*governance.ToSubmit, error) { + t.Helper() + return e.SubmitBatchProposal( + context.Background(), + submission, + proposalID, + party, + ) +} + func (e *tstEngine) addYesVote(t *testing.T, party, proposal string) error { t.Helper() return e.AddVote(context.Background(), types.VoteSubmission{ @@ -1587,6 +1932,33 @@ func (e *tstEngine) newProposalID() string { return fmt.Sprintf("proposal-id-%d", e.proposalCounter) } +func (e *tstEngine) newBatchSubmission( + closingTimestamp int64, + proposals ...types.Proposal, +) types.BatchProposalSubmission { + id := e.newProposalID() + + sub := types.BatchProposalSubmission{ + Reference: id, + Terms: &types.BatchProposalTerms{ + ClosingTimestamp: closingTimestamp, + }, + Rationale: &types.ProposalRationale{ + Description: "some description", + }, + } + + for _, proposal := range proposals { + sub.Terms.Changes = append(sub.Terms.Changes, types.BatchProposalChange{ + ID: proposal.ID, + Change: proposal.Terms.Change, + EnactmentTime: proposal.Terms.EnactmentTimestamp, + }) + } + + return sub +} + //nolint:unparam func (e *tstEngine) newProposalForNewPerpsMarket( partyID string, @@ -1891,6 +2263,33 @@ func (e *tstEngine) expectRejectedProposalEvent(t *testing.T, partyID, proposalI }) } +type expectedProposal struct { + partyID string + proposalID string + state types.ProposalState + reason types.ProposalError +} + +func (e *tstEngine) expectProposalEvents(t *testing.T, expected []expectedProposal) { + t.Helper() + e.broker.EXPECT().SendBatch(gomock.Any()).Times(1).Do(func(evts []events.Event) { + assert.GreaterOrEqual(t, len(evts), len(expected)) + for i, expect := range expected { + e := evts[i] + pe, ok := e.(*events.Proposal) + require.True(t, ok) + p := pe.Proposal() + + assert.Equal(t, expect.proposalID, p.Id) + assert.Equal(t, expect.partyID, p.PartyId) + assert.Equal(t, expect.state.String(), p.State.String()) + if p.Reason != nil { + assert.Equal(t, expect.reason.String(), p.Reason.String()) + } + } + }) +} + func (e *tstEngine) expectVoteEvent(t *testing.T, party, proposal string) { t.Helper() e.broker.EXPECT().Send(gomock.Any()).Times(1).Do(func(e events.Event) { diff --git a/core/governance/engine_update_discount_volume_program_test.go b/core/governance/engine_update_discount_volume_program_test.go index c3ba1a99e0..e6c82993b9 100644 --- a/core/governance/engine_update_discount_volume_program_test.go +++ b/core/governance/engine_update_discount_volume_program_test.go @@ -19,15 +19,15 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" vgrand "code.vegaprotocol.io/vega/libs/rand" vgtest "code.vegaprotocol.io/vega/libs/test" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" ) func TestProposalForUpdateDiscountVolumeProgram(t *testing.T) { diff --git a/core/governance/engine_update_market_state_test.go b/core/governance/engine_update_market_state_test.go index 1c6691b024..25a2be5bdb 100644 --- a/core/governance/engine_update_market_state_test.go +++ b/core/governance/engine_update_market_state_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/governance" "code.vegaprotocol.io/vega/core/types" + "github.com/stretchr/testify/require" ) diff --git a/core/governance/engine_update_market_test.go b/core/governance/engine_update_market_test.go index e8243bb305..8c8df706b0 100644 --- a/core/governance/engine_update_market_test.go +++ b/core/governance/engine_update_market_test.go @@ -26,12 +26,14 @@ import ( dsdefinition "code.vegaprotocol.io/vega/core/datasource/definition" dserrors "code.vegaprotocol.io/vega/core/datasource/errors" "code.vegaprotocol.io/vega/core/datasource/external/signedoracle" + "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/governance" "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" vgrand "code.vegaprotocol.io/vega/libs/rand" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -65,6 +67,77 @@ func TestProposalForMarketUpdate(t *testing.T) { t.Run("Submitting a proposal with inconsistent products fails", TestSubmitProposalWithInconsistentProductFails) } +func TestSubmittingProposalForMarketUpdateSucceeds(t *testing.T) { + eng := getTestEngine(t, time.Now()) + + ctx := context.Background() + + // custom settings here: + eng.broker.EXPECT().Send(events.NewNetworkParameterEvent(ctx, "governance.proposal.updateMarket.requiredParticipationLP", "0")).Times(1) + require.NoError(t, eng.netp.Update(ctx, "governance.proposal.updateMarket.requiredParticipationLP", "0")) + + eng.broker.EXPECT().Send(events.NewNetworkParameterEvent(ctx, "governance.proposal.updateMarket.requiredParticipation", "0.07")).Times(1) + require.NoError(t, eng.netp.Update(ctx, "governance.proposal.updateMarket.requiredParticipation", "0.07")) + + eng.broker.EXPECT().Send(events.NewNetworkParameterEvent(ctx, "governance.proposal.updateMarket.requiredMajority", "0.66")).Times(1) + require.NoError(t, eng.netp.Update(ctx, "governance.proposal.updateMarket.requiredMajority", "0.66")) + + eng.broker.EXPECT().Send(events.NewNetworkParameterEvent(ctx, "governance.proposal.updateMarket.requiredMajorityLP", "0.66")).Times(1) + require.NoError(t, eng.netp.Update(ctx, "governance.proposal.updateMarket.requiredMajorityLP", "0.66")) + + // given + proposer := vgrand.RandomStr(5) + proposal := eng.newProposalForMarketUpdate("market-1", proposer, eng.tsvc.GetTimeNow(), nil, nil, true) + marketID := proposal.MarketUpdate().MarketID + + // setup + eng.ensureTokenBalanceForParty(t, proposer, 1000) + eng.ensureEquityLikeShareForMarketAndParty(t, marketID, proposer, 0.29) + eng.ensureExistingMarket(t, marketID) + eng.ensureGetMarketFuture(t, marketID) + + // expect + eng.expectOpenProposalEvent(t, proposer, proposal.ID) + + // when + toSubmit, err := eng.submitProposal(t, proposal) + + // then + require.NoError(t, err) + require.NotNil(t, toSubmit) + + // setup + voterWithELS := vgrand.RandomStr(5) + eng.ensureTokenBalanceForParty(t, voterWithELS, 0) + eng.ensureEquityLikeShareForMarketAndParty(t, marketID, voterWithELS, 0.1) + + // expect + eng.expectVoteEvent(t, voterWithELS, proposal.ID) + + // when + err = eng.addYesVote(t, voterWithELS, proposal.ID) + + // then + require.NoError(t, err) + + // Closing the proposal. + // given + afterClosing := time.Unix(proposal.Terms.ClosingTimestamp, 0).Add(time.Second) + + // setup + eng.ensureStakingAssetTotalSupply(t, 1000000) + eng.ensureTokenBalanceForParty(t, voterWithELS, 0) + eng.ensureEquityLikeShareForMarketAndParty(t, marketID, voterWithELS, 0.29) + + // // expect + eng.expectPassedProposalEvent(t, proposal.ID) + eng.expectVoteEvents(t) + eng.expectGetMarketState(t, proposal.ID) + + // // when + eng.OnTick(context.Background(), afterClosing) +} + func testSubmittingProposalForMarketUpdateSucceeds(t *testing.T) { eng := getTestEngine(t, time.Now()) @@ -152,6 +225,7 @@ func testSubmittingProposalForMarketUpdateWithInternalTimeSetllingFails(t *testi Changes: &types.UpdateMarketConfiguration{ Instrument: &types.UpdateInstrumentConfiguration{ Code: "CRYPTO:GBPVUSD/JUN20", + Name: "CRYPTO:GBPVUSD/JUN20", Product: &types.UpdateInstrumentConfigurationFuture{ Future: &types.UpdateFutureProduct{ QuoteName: "VUSD", @@ -190,6 +264,12 @@ func testSubmittingProposalForMarketUpdateWithInternalTimeSetllingFails(t *testi }, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, @@ -284,6 +364,7 @@ func testSubmittingProposalForMarketUpdateWithInternalTimeTerminationWithLessTha Changes: &types.UpdateMarketConfiguration{ Instrument: &types.UpdateInstrumentConfiguration{ Code: "CRYPTO:GBPVUSD/JUN20", + Name: "CRYPTO:GBPVUSD/JUN20", Product: &types.UpdateInstrumentConfigurationFuture{ Future: &types.UpdateFutureProduct{ QuoteName: "VUSD", @@ -303,6 +384,12 @@ func testSubmittingProposalForMarketUpdateWithInternalTimeTerminationWithLessTha }, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, @@ -356,6 +443,7 @@ func testSubmittingProposalForMarketUpdateWithInternalTimeTerminationWithLessTha Changes: &types.UpdateMarketConfiguration{ Instrument: &types.UpdateInstrumentConfiguration{ Code: "CRYPTO:GBPVUSD/JUN20", + Name: "CRYPTO:GBPVUSD/JUN20", Product: &types.UpdateInstrumentConfigurationFuture{ Future: &types.UpdateFutureProduct{ QuoteName: "VUSD", @@ -375,6 +463,12 @@ func testSubmittingProposalForMarketUpdateWithInternalTimeTerminationWithLessTha }, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, @@ -476,6 +570,7 @@ func testSubmittingProposalForMarketUpdateWithEmptySettlementDataFails(t *testin Changes: &types.UpdateMarketConfiguration{ Instrument: &types.UpdateInstrumentConfiguration{ Code: "CRYPTO:GBPVUSD/JUN20", + Name: "CRYPTO:GBPVUSD/JUN20", Product: &types.UpdateInstrumentConfigurationFuture{ Future: &types.UpdateFutureProduct{ QuoteName: "VUSD", @@ -495,6 +590,12 @@ func testSubmittingProposalForMarketUpdateWithEmptySettlementDataFails(t *testin }, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, @@ -573,6 +674,7 @@ func testSubmittingProposalForMarketUpdateWithEmptyTerminationDataFails(t *testi Changes: &types.UpdateMarketConfiguration{ Instrument: &types.UpdateInstrumentConfiguration{ Code: "CRYPTO:GBPVUSD/JUN20", + Name: "CRYPTO:GBPVUSD/JUN20", Product: &types.UpdateInstrumentConfigurationFuture{ Future: &types.UpdateFutureProduct{ QuoteName: "VUSD", @@ -592,6 +694,12 @@ func testSubmittingProposalForMarketUpdateWithEmptyTerminationDataFails(t *testi }, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, @@ -733,7 +841,8 @@ func testSubmittingProposalForMarketUpdateWithEarlyTerminationSucceeds(t *testin require.True(t, enacted[0].IsUpdateMarket()) updatedMarket := enacted[0].UpdateMarket() assert.Equal(t, existingMarket.ID, updatedMarket.ID) - assert.Equal(t, existingMarket.TradableInstrument.Instrument.Name, updatedMarket.TradableInstrument.Instrument.Name) + assert.Equal(t, "UPDATED_MARKET_NAME", updatedMarket.TradableInstrument.Instrument.Name) + assert.Equal(t, existingMarket.TradableInstrument.Instrument.Product.(*types.InstrumentFuture).Future.SettlementAsset, updatedMarket.TradableInstrument.Instrument.Product.(*types.InstrumentFuture).Future.SettlementAsset) assert.Equal(t, existingMarket.DecimalPlaces, updatedMarket.DecimalPlaces) assert.Equal(t, existingMarket.PositionDecimalPlaces, updatedMarket.PositionDecimalPlaces) @@ -848,6 +957,7 @@ func testSubmittingProposalForMarketUpdateWithInternalTimeTriggerTerminationFail Changes: &types.UpdateMarketConfiguration{ Instrument: &types.UpdateInstrumentConfiguration{ Code: "CRYPTO:GBPVUSD/JUN20", + Name: "CRYPTO:GBPVUSD/JUN20", Product: &types.UpdateInstrumentConfigurationFuture{ Future: &types.UpdateFutureProduct{ QuoteName: "VUSD", @@ -861,6 +971,12 @@ func testSubmittingProposalForMarketUpdateWithInternalTimeTriggerTerminationFail Metadata: []string{"asset_class:fx/crypto", "product:futures"}, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, @@ -943,6 +1059,7 @@ func testSubmittingProposalForMarketUpdateWithInternalTimeTriggerSettlementFails Changes: &types.UpdateMarketConfiguration{ Instrument: &types.UpdateInstrumentConfiguration{ Code: "CRYPTO:GBPVUSD/JUN20", + Name: "CRYPTO:GBPVUSD/JUN20", Product: &types.UpdateInstrumentConfigurationFuture{ Future: &types.UpdateFutureProduct{ QuoteName: "VUSD", @@ -956,6 +1073,12 @@ func testSubmittingProposalForMarketUpdateWithInternalTimeTriggerSettlementFails Metadata: []string{"asset_class:fx/crypto", "product:futures"}, LinearSlippageFactor: num.DecimalFromFloat(0.1), QuadraticSlippageFactor: num.DecimalFromFloat(0.1), + LiquidationStrategy: &types.LiquidationStrategy{ + DisposalTimeStep: 10 * time.Second, + DisposalFraction: num.DecimalFromFloat(0.1), + FullDisposalSize: 20, + MaxFractionConsumed: num.DecimalFromFloat(0.01), + }, }, }, }, @@ -1183,7 +1306,7 @@ func testPreEnactmentOfMarketUpdateSucceeds(t *testing.T) { require.True(t, enacted[0].IsUpdateMarket()) updatedMarket := enacted[0].UpdateMarket() assert.Equal(t, existingMarket.ID, updatedMarket.ID) - assert.Equal(t, existingMarket.TradableInstrument.Instrument.Name, updatedMarket.TradableInstrument.Instrument.Name) + assert.Equal(t, "UPDATED_MARKET_NAME", updatedMarket.TradableInstrument.Instrument.Name) assert.Equal(t, existingMarket.TradableInstrument.Instrument.Product.(*types.InstrumentFuture).Future.SettlementAsset, updatedMarket.TradableInstrument.Instrument.Product.(*types.InstrumentFuture).Future.SettlementAsset) assert.Equal(t, existingMarket.DecimalPlaces, updatedMarket.DecimalPlaces) assert.Equal(t, existingMarket.PositionDecimalPlaces, updatedMarket.PositionDecimalPlaces) @@ -1299,7 +1422,7 @@ func testPreEnactmentOfMarketUpdateWithInternalTimeTerminationSucceeds(t *testin require.True(t, enacted[0].IsUpdateMarket()) updatedMarket := enacted[0].UpdateMarket() assert.Equal(t, existingMarket.ID, updatedMarket.ID) - assert.Equal(t, existingMarket.TradableInstrument.Instrument.Name, updatedMarket.TradableInstrument.Instrument.Name) + assert.Equal(t, "UPDATED_MARKET_NAME", updatedMarket.TradableInstrument.Instrument.Name) assert.Equal(t, existingMarket.TradableInstrument.Instrument.Product.(*types.InstrumentFuture).Future.SettlementAsset, updatedMarket.TradableInstrument.Instrument.Product.(*types.InstrumentFuture).Future.SettlementAsset) assert.Equal(t, existingMarket.DecimalPlaces, updatedMarket.DecimalPlaces) assert.Equal(t, existingMarket.PositionDecimalPlaces, updatedMarket.PositionDecimalPlaces) diff --git a/core/governance/engine_update_referral_program_test.go b/core/governance/engine_update_referral_program_test.go index e7ffc347db..d5550a37a2 100644 --- a/core/governance/engine_update_referral_program_test.go +++ b/core/governance/engine_update_referral_program_test.go @@ -19,15 +19,15 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" vgrand "code.vegaprotocol.io/vega/libs/rand" vgtest "code.vegaprotocol.io/vega/libs/test" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" ) func TestProposalForUpdateReferralProgram(t *testing.T) { diff --git a/core/governance/engine_update_spot_market_test.go b/core/governance/engine_update_spot_market_test.go index 838293adf1..a86b88a25a 100644 --- a/core/governance/engine_update_spot_market_test.go +++ b/core/governance/engine_update_spot_market_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/types" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -267,7 +268,7 @@ func testPreEnactmentOfSpotMarketUpdateSucceeds(t *testing.T) { require.True(t, enacted[0].IsUpdateMarket()) updatedMarket := enacted[0].UpdateMarket() assert.Equal(t, existingMarket.ID, updatedMarket.ID) - assert.Equal(t, existingMarket.TradableInstrument.Instrument.Name, updatedMarket.TradableInstrument.Instrument.Name) + assert.Equal(t, "UPDATED_MARKET_NAME", updatedMarket.TradableInstrument.Instrument.Name) assert.Equal(t, existingMarket.TradableInstrument.Instrument.Product.(*types.InstrumentFuture).Future.SettlementAsset, updatedMarket.TradableInstrument.Instrument.Product.(*types.InstrumentFuture).Future.SettlementAsset) assert.Equal(t, existingMarket.DecimalPlaces, updatedMarket.DecimalPlaces) assert.Equal(t, existingMarket.PositionDecimalPlaces, updatedMarket.PositionDecimalPlaces) diff --git a/core/governance/market.go b/core/governance/market.go index 4baea92c98..f00e5dc0a4 100644 --- a/core/governance/market.go +++ b/core/governance/market.go @@ -21,11 +21,11 @@ import ( "strconv" "time" + "code.vegaprotocol.io/vega/core/datasource" dsdefinition "code.vegaprotocol.io/vega/core/datasource/definition" ethcallcommon "code.vegaprotocol.io/vega/core/datasource/external/ethcall/common" - - "code.vegaprotocol.io/vega/core/datasource" "code.vegaprotocol.io/vega/core/datasource/spec" + "code.vegaprotocol.io/vega/core/execution/liquidation" "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" @@ -67,8 +67,9 @@ var ( // ErrInvalidRiskParameter ... ErrInvalidRiskParameter = errors.New("invalid risk parameter") // ErrInvalidInsurancePoolFraction is returned if the insurance pool fraction parameter is outside of the 0-1 range. - ErrInvalidInsurancePoolFraction = errors.New("insurnace pool fraction invalid") - ErrUpdateMarketDifferentProduct = errors.New("cannot update a market to a different product type") + ErrInvalidInsurancePoolFraction = errors.New("insurnace pool fraction invalid") + ErrUpdateMarketDifferentProduct = errors.New("cannot update a market to a different product type") + ErrInvalidEVMChainIDInEthereumOracleSpec = errors.New("invalid source chain id in ethereum oracle spec") ) func assignProduct( @@ -127,9 +128,13 @@ func assignProduct( MarginFundingFactor: product.Perps.MarginFundingFactor, ClampLowerBound: product.Perps.ClampLowerBound, ClampUpperBound: product.Perps.ClampUpperBound, + FundingRateScalingFactor: product.Perps.FundingRateScalingFactor, + FundingRateLowerBound: product.Perps.FundingRateLowerBound, + FundingRateUpperBound: product.Perps.FundingRateUpperBound, DataSourceSpecForSettlementData: datasource.SpecFromDefinition(product.Perps.DataSourceSpecForSettlementData), DataSourceSpecForSettlementSchedule: datasource.SpecFromDefinition(product.Perps.DataSourceSpecForSettlementSchedule), DataSourceSpecBinding: product.Perps.DataSourceSpecBinding, + InternalCompositePriceConfig: product.Perps.InternalCompositePriceConfig, }, } case *types.InstrumentConfigurationSpot: @@ -229,6 +234,18 @@ func buildMarketFromProposal( definition.Changes.PriceMonitoringParameters = types.PriceMonitoringParametersFromProto(pmParams) } + // if a liquidity fee setting isn't supplied in the proposal, we'll default to margin-cost. + if definition.Changes.LiquidityFeeSettings == nil { + definition.Changes.LiquidityFeeSettings = &types.LiquidityFeeSettings{ + Method: proto.LiquidityFeeSettings_METHOD_MARGINAL_COST, + } + } + + // this can be nil for market updates. + var lstrat *types.LiquidationStrategy + if definition.Changes.LiquidationStrategy != nil { + lstrat = definition.Changes.LiquidationStrategy.DeepClone() + } makerFeeDec, _ := num.DecimalFromString(makerFee) infraFeeDec, _ := num.DecimalFromString(infraFee) market := &types.Market{ @@ -240,6 +257,7 @@ func buildMarketFromProposal( MakerFee: makerFeeDec, InfrastructureFee: infraFeeDec, }, + LiquidityFeeSettings: definition.Changes.LiquidityFeeSettings, }, OpeningAuction: &types.AuctionDuration{ Duration: int64(openingAuctionDuration.Seconds()), @@ -257,6 +275,8 @@ func buildMarketFromProposal( LiquiditySLAParams: definition.Changes.LiquiditySLAParameters, LinearSlippageFactor: definition.Changes.LinearSlippageFactor, QuadraticSlippageFactor: definition.Changes.QuadraticSlippageFactor, + LiquidationStrategy: lstrat, + MarkPriceConfiguration: definition.Changes.MarkPriceConfiguration, } // successor proposal if suc := definition.Successor(); suc != nil { @@ -290,10 +310,15 @@ func buildSpotMarketFromProposal( definition.Changes.PriceMonitoringParameters = types.PriceMonitoringParametersFromProto(pmParams) } + // if a liquidity fee setting isn't supplied in the proposal, we'll default to margin-cost. + if definition.Changes.LiquidityFeeSettings == nil { + definition.Changes.LiquidityFeeSettings = &types.LiquidityFeeSettings{ + Method: proto.LiquidityFeeSettings_METHOD_MARGINAL_COST, + } + } + liquidityMonitoring := &types.LiquidityMonitoringParameters{ TargetStakeParameters: definition.Changes.TargetStakeParameters, - TriggeringRatio: num.DecimalZero(), - AuctionExtension: 0, } makerFeeDec, _ := num.DecimalFromString(makerFee) @@ -307,6 +332,7 @@ func buildSpotMarketFromProposal( MakerFee: makerFeeDec, InfrastructureFee: infraFeeDec, }, + LiquidityFeeSettings: definition.Changes.LiquidityFeeSettings, }, OpeningAuction: &types.AuctionDuration{ Duration: int64(openingAuctionDuration.Seconds()), @@ -328,6 +354,7 @@ func buildSpotMarketFromProposal( LinearSlippageFactor: num.DecimalZero(), QuadraticSlippageFactor: num.DecimalZero(), LiquiditySLAParams: definition.Changes.SLAParams, + MarkPriceConfiguration: defaultMarkPriceConfig, } if err := assignSpotRiskModel(definition.Changes, market.TradableInstrument); err != nil { return nil, types.ProposalErrorUnspecified, err @@ -389,7 +416,7 @@ func validateSpot(spot *types.SpotProduct, decimals uint64, assets Assets, deepC return validateAssetBasic(spot.BaseAsset, assets, deepCheck) } -func validateFuture(future *types.FutureProduct, decimals uint64, assets Assets, et *enactmentTime, deepCheck bool) (types.ProposalError, error) { +func validateFuture(future *types.FutureProduct, decimals uint64, assets Assets, et *enactmentTime, deepCheck bool, evmChainIDs []uint64) (types.ProposalError, error) { future.DataSourceSpecForSettlementData = setDatasourceDefinitionDefaults(future.DataSourceSpecForSettlementData, et) future.DataSourceSpecForTradingTermination = setDatasourceDefinitionDefaults(future.DataSourceSpecForTradingTermination, et) @@ -398,6 +425,10 @@ func validateFuture(future *types.FutureProduct, decimals uint64, assets Assets, return types.ProposalErrorInvalidFutureProduct, ErrMissingDataSourceSpecForSettlementData } + if !settlData.EnsureValidChainID(evmChainIDs) { + return types.ProposalErrorInvalidFutureProduct, ErrInvalidEVMChainIDInEthereumOracleSpec + } + if settlData.Content() == nil { return types.ProposalErrorInvalidFutureProduct, ErrMissingDataSourceSpecForSettlementData } @@ -416,6 +447,10 @@ func validateFuture(future *types.FutureProduct, decimals uint64, assets Assets, return types.ProposalErrorInvalidFutureProduct, ErrMissingDataSourceSpecForTradingTermination } + if !tterm.EnsureValidChainID(evmChainIDs) { + return types.ProposalErrorInvalidFutureProduct, ErrInvalidEVMChainIDInEthereumOracleSpec + } + if tterm.Content() == nil { return types.ProposalErrorInvalidFutureProduct, ErrMissingDataSourceSpecForTradingTermination } @@ -488,7 +523,7 @@ func validateFuture(future *types.FutureProduct, decimals uint64, assets Assets, return validateAsset(future.SettlementAsset, decimals, assets, deepCheck) } -func validatePerps(perps *types.PerpsProduct, decimals uint64, assets Assets, et *enactmentTime, currentTime time.Time, deepCheck bool) (types.ProposalError, error) { +func validatePerps(perps *types.PerpsProduct, decimals uint64, assets Assets, et *enactmentTime, currentTime time.Time, deepCheck bool, evmChainIDs []uint64) (types.ProposalError, error) { perps.DataSourceSpecForSettlementData = setDatasourceDefinitionDefaults(perps.DataSourceSpecForSettlementData, et) perps.DataSourceSpecForSettlementSchedule = setDatasourceDefinitionDefaults(perps.DataSourceSpecForSettlementSchedule, et) @@ -497,6 +532,10 @@ func validatePerps(perps *types.PerpsProduct, decimals uint64, assets Assets, et return types.ProposalErrorInvalidPerpsProduct, ErrMissingDataSourceSpecForSettlementData } + if !settlData.EnsureValidChainID(evmChainIDs) { + return types.ProposalErrorInvalidPerpsProduct, ErrInvalidEVMChainIDInEthereumOracleSpec + } + if settlData.Content() == nil { return types.ProposalErrorInvalidPerpsProduct, ErrMissingDataSourceSpecForSettlementData } @@ -515,6 +554,10 @@ func validatePerps(perps *types.PerpsProduct, decimals uint64, assets Assets, et return types.ProposalErrorInvalidPerpsProduct, ErrMissingDataSourceSpecForSettlementSchedule } + if !settlSchedule.EnsureValidChainID(evmChainIDs) { + return types.ProposalErrorInvalidPerpsProduct, ErrInvalidEVMChainIDInEthereumOracleSpec + } + if settlSchedule.Content() == nil { return types.ProposalErrorInvalidPerpsProduct, ErrMissingDataSourceSpecForSettlementSchedule } @@ -575,17 +618,25 @@ func validatePerps(perps *types.PerpsProduct, decimals uint64, assets Assets, et return types.ProposalErrorInvalidPerpsProduct, fmt.Errorf("time trigger only supported for now") } + if perps.InternalCompositePriceConfig != nil { + for _, v := range perps.InternalCompositePriceConfig.DataSources { + if !v.Data.EnsureValidChainID(evmChainIDs) { + return types.ProposalErrorInvalidFutureProduct, ErrInvalidEVMChainIDInEthereumOracleSpec + } + } + } + return validateAsset(perps.SettlementAsset, decimals, assets, deepCheck) } -func validateNewInstrument(instrument *types.InstrumentConfiguration, decimals uint64, assets Assets, et *enactmentTime, deepCheck bool, currentTime *time.Time) (types.ProposalError, error) { +func validateNewInstrument(instrument *types.InstrumentConfiguration, decimals uint64, assets Assets, et *enactmentTime, deepCheck bool, currentTime *time.Time, evmChainIDs []uint64) (types.ProposalError, error) { switch product := instrument.Product.(type) { case nil: return types.ProposalErrorNoProduct, ErrMissingProduct case *types.InstrumentConfigurationFuture: - return validateFuture(product.Future, decimals, assets, et, deepCheck) + return validateFuture(product.Future, decimals, assets, et, deepCheck, evmChainIDs) case *types.InstrumentConfigurationPerps: - return validatePerps(product.Perps, decimals, assets, et, *currentTime, deepCheck) + return validatePerps(product.Perps, decimals, assets, et, *currentTime, deepCheck, evmChainIDs) case *types.InstrumentConfigurationSpot: return validateSpot(product.Spot, decimals, assets, deepCheck) default: @@ -629,6 +680,26 @@ func validateRiskParameters(rp interface{}) (types.ProposalError, error) { } } +func validateLiquidationStrategy(ls *types.LiquidationStrategy) (types.ProposalError, error) { + if ls == nil { + // @TODO this will become a required parameter, but for now leave it as is + // this will be implemented in at a later stage + return types.ProposalErrorUnspecified, nil + } + if ls.DisposalFraction.IsZero() || ls.DisposalFraction.IsNegative() || ls.DisposalFraction.GreaterThan(num.DecimalOne()) { + return types.ProposalErrorInvalidMarket, fmt.Errorf("liquidation strategy disposal fraction must be in the 0-1 range and non-zero") + } + if ls.MaxFractionConsumed.IsZero() || ls.DisposalFraction.IsNegative() || ls.DisposalFraction.GreaterThan(num.DecimalOne()) { + return types.ProposalErrorInvalidMarket, fmt.Errorf("liquidation max fraction must be in the 0-1 range and non-zero") + } + if ls.DisposalTimeStep < time.Second { + return types.ProposalErrorInvalidMarket, fmt.Errorf("liquidation strategy time step has to be 1s or more") + } else if ls.DisposalTimeStep > time.Hour { + return types.ProposalErrorInvalidMarket, fmt.Errorf("liquidation strategy time step can't be more than 1h") + } + return types.ProposalErrorUnspecified, nil +} + func validateLPSLAParams(slaParams *types.LiquiditySLAParams) (types.ProposalError, error) { if slaParams == nil { return types.ProposalErrorMissingSLAParams, fmt.Errorf("liquidity provision SLA must be provided") @@ -679,6 +750,33 @@ func validateSlippageFactor(slippageFactor num.Decimal, isLinear bool) (types.Pr return types.ProposalErrorUnspecified, nil } +func getEVMChainIDs(netp NetParams) []uint64 { + ethCfg := &proto.EthereumConfig{} + if err := netp.GetJSONStruct(netparams.BlockchainsEthereumConfig, ethCfg); err != nil { + panic(fmt.Sprintf("could not load ethereum config from network parameter, this should never happen: %v", err)) + } + cID, err := strconv.ParseUint(ethCfg.ChainId, 10, 64) + if err != nil { + panic(fmt.Sprintf("could not convert chain id from ethereum config into integer: %v", err)) + } + + allIDs := []uint64{cID} + l2Cfgs := &proto.EthereumL2Configs{} + if err := netp.GetJSONStruct(netparams.BlockchainsEthereumL2Configs, l2Cfgs); err != nil { + panic(fmt.Sprintf("could not load ethereum l2 config from network parameter, this should never happen: %v", err)) + } + + for _, v := range l2Cfgs.Configs { + l2ID, err := strconv.ParseUint(v.ChainId, 10, 64) + if err != nil { + panic(fmt.Sprintf("could not convert chain id from ethereum l2 config into integer: %v", err)) + } + allIDs = append(allIDs, l2ID) + } + + return allIDs +} + func validateNewSpotMarketChange( terms *types.NewSpotMarket, assets Assets, @@ -687,7 +785,7 @@ func validateNewSpotMarketChange( openingAuctionDuration time.Duration, etu *enactmentTime, ) (types.ProposalError, error) { - if perr, err := validateNewInstrument(terms.Changes.Instrument, terms.Changes.DecimalPlaces, assets, etu, deepCheck, nil); err != nil { + if perr, err := validateNewInstrument(terms.Changes.Instrument, terms.Changes.DecimalPlaces, assets, etu, deepCheck, nil, getEVMChainIDs(netp)); err != nil { return perr, err } if perr, err := validateAuctionDuration(openingAuctionDuration, netp); err != nil { @@ -719,7 +817,7 @@ func validateNewMarketChange( restore bool, ) (types.ProposalError, error) { // in all cases, the instrument must be specified and validated, successor markets included. - if perr, err := validateNewInstrument(terms.Changes.Instrument, terms.Changes.DecimalPlaces, assets, etu, deepCheck, ptr.From(currentTime)); err != nil { + if perr, err := validateNewInstrument(terms.Changes.Instrument, terms.Changes.DecimalPlaces, assets, etu, deepCheck, ptr.From(currentTime), getEVMChainIDs(netp)); err != nil { return perr, err } // verify opening auction duration, works the same for successor markets @@ -746,6 +844,21 @@ func validateNewMarketChange( if perr, err := validateSlippageFactor(terms.Changes.QuadraticSlippageFactor, false); err != nil { return perr, err } + if terms.Changes.LiquidationStrategy == nil { + // @TODO At this stage, we don't require the liquidation strategy to be specified, treating nil as an implied legacy strategy. + terms.Changes.LiquidationStrategy = liquidation.GetLegacyStrat() + } else if perr, err := validateLiquidationStrategy(terms.Changes.LiquidationStrategy); err != nil { + return perr, err + } + + if terms.Changes.MarkPriceConfiguration != nil { + for _, v := range terms.Changes.MarkPriceConfiguration.DataSources { + if !v.Data.EnsureValidChainID(getEVMChainIDs(netp)) { + return types.ProposalErrorInvalidFutureProduct, ErrInvalidEVMChainIDInEthereumOracleSpec + } + } + } + return types.ProposalErrorUnspecified, nil } @@ -800,8 +913,8 @@ func validateUpdateSpotMarketChange(terms *types.UpdateSpotMarket) (types.Propos } // validateUpdateMarketChange checks market update proposal terms. -func validateUpdateMarketChange(terms *types.UpdateMarket, mkt types.Market, etu *enactmentTime, currentTime time.Time) (types.ProposalError, error) { - if perr, err := validateUpdateInstrument(terms.Changes.Instrument, mkt, etu, currentTime); err != nil { +func validateUpdateMarketChange(terms *types.UpdateMarket, mkt types.Market, etu *enactmentTime, currentTime time.Time, netp NetParams) (types.ProposalError, error) { + if perr, err := validateUpdateInstrument(terms.Changes.Instrument, mkt, etu, currentTime, getEVMChainIDs(netp)); err != nil { return perr, err } if perr, err := validateRiskParameters(terms.Changes.RiskParameters); err != nil { @@ -816,23 +929,26 @@ func validateUpdateMarketChange(terms *types.UpdateMarket, mkt types.Market, etu if perr, err := validateSlippageFactor(terms.Changes.QuadraticSlippageFactor, false); err != nil { return perr, err } + if perr, err := validateLiquidationStrategy(terms.Changes.LiquidationStrategy); err != nil { + return perr, err + } return types.ProposalErrorUnspecified, nil } -func validateUpdateInstrument(instrument *types.UpdateInstrumentConfiguration, mkt types.Market, et *enactmentTime, currentTime time.Time) (types.ProposalError, error) { +func validateUpdateInstrument(instrument *types.UpdateInstrumentConfiguration, mkt types.Market, et *enactmentTime, currentTime time.Time, evmChainIDs []uint64) (types.ProposalError, error) { switch product := instrument.Product.(type) { case nil: return types.ProposalErrorNoProduct, ErrMissingProduct case *types.UpdateInstrumentConfigurationFuture: - return validateUpdateFuture(product.Future, mkt, et) + return validateUpdateFuture(product.Future, mkt, et, evmChainIDs) case *types.UpdateInstrumentConfigurationPerps: - return validateUpdatePerps(product.Perps, mkt, et, currentTime) + return validateUpdatePerps(product.Perps, mkt, et, currentTime, evmChainIDs) default: return types.ProposalErrorUnsupportedProduct, ErrUnsupportedProduct } } -func validateUpdateFuture(future *types.UpdateFutureProduct, mkt types.Market, et *enactmentTime) (types.ProposalError, error) { +func validateUpdateFuture(future *types.UpdateFutureProduct, mkt types.Market, et *enactmentTime, evmChainIDs []uint64) (types.ProposalError, error) { if mkt.GetFuture() == nil { return types.ProposalErrorInvalidFutureProduct, ErrUpdateMarketDifferentProduct } @@ -845,6 +961,10 @@ func validateUpdateFuture(future *types.UpdateFutureProduct, mkt types.Market, e return types.ProposalErrorInvalidFutureProduct, ErrMissingDataSourceSpecForSettlementData } + if !settlData.EnsureValidChainID(evmChainIDs) { + return types.ProposalErrorInvalidFutureProduct, ErrInvalidEVMChainIDInEthereumOracleSpec + } + if settlData.Content() == nil { return types.ProposalErrorInvalidFutureProduct, ErrMissingDataSourceSpecForSettlementData } @@ -863,6 +983,10 @@ func validateUpdateFuture(future *types.UpdateFutureProduct, mkt types.Market, e return types.ProposalErrorInvalidFutureProduct, ErrMissingDataSourceSpecForTradingTermination } + if !tterm.EnsureValidChainID(evmChainIDs) { + return types.ProposalErrorInvalidFutureProduct, ErrInvalidEVMChainIDInEthereumOracleSpec + } + if tterm.Content() == nil { return types.ProposalErrorInvalidFutureProduct, ErrMissingDataSourceSpecForTradingTermination } @@ -937,7 +1061,7 @@ func validateUpdateFuture(future *types.UpdateFutureProduct, mkt types.Market, e return types.ProposalErrorUnspecified, nil } -func validateUpdatePerps(perps *types.UpdatePerpsProduct, mkt types.Market, et *enactmentTime, currentTime time.Time) (types.ProposalError, error) { +func validateUpdatePerps(perps *types.UpdatePerpsProduct, mkt types.Market, et *enactmentTime, currentTime time.Time, evmChainIDs []uint64) (types.ProposalError, error) { if mkt.GetPerps() == nil { return types.ProposalErrorInvalidPerpsProduct, ErrUpdateMarketDifferentProduct } @@ -950,6 +1074,10 @@ func validateUpdatePerps(perps *types.UpdatePerpsProduct, mkt types.Market, et * return types.ProposalErrorInvalidPerpsProduct, ErrMissingDataSourceSpecForSettlementData } + if !settlData.EnsureValidChainID(evmChainIDs) { + return types.ProposalErrorInvalidPerpsProduct, ErrInvalidEVMChainIDInEthereumOracleSpec + } + if settlData.Content() == nil { return types.ProposalErrorInvalidPerpsProduct, ErrMissingDataSourceSpecForSettlementData } @@ -968,6 +1096,10 @@ func validateUpdatePerps(perps *types.UpdatePerpsProduct, mkt types.Market, et * return types.ProposalErrorInvalidPerpsProduct, ErrMissingDataSourceSpecForSettlementSchedule } + if !settlSchedule.EnsureValidChainID(evmChainIDs) { + return types.ProposalErrorInvalidPerpsProduct, ErrInvalidEVMChainIDInEthereumOracleSpec + } + if settlSchedule.Content() == nil { return types.ProposalErrorInvalidPerpsProduct, ErrMissingDataSourceSpecForSettlementSchedule } diff --git a/core/governance/market_cp_restore_test.go b/core/governance/market_cp_restore_test.go index 9a74afed78..a4d270cde2 100644 --- a/core/governance/market_cp_restore_test.go +++ b/core/governance/market_cp_restore_test.go @@ -17,7 +17,6 @@ package governance_test import ( "context" - _ "embed" "encoding/base64" "encoding/json" "testing" @@ -44,9 +43,12 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" checkpointpb "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" + "github.com/golang/mock/gomock" "github.com/pkg/errors" "github.com/stretchr/testify/require" + + _ "embed" ) //go:embed testcp/checkpoint.cp @@ -206,15 +208,16 @@ func createExecutionEngine(t *testing.T, tm time.Time) (*execution.Engine, *gove referralDiscountReward.EXPECT().ReferralDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() referralDiscountReward.EXPECT().RewardsFactorMultiplierAppliedForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() volumeDiscount.EXPECT().VolumeDiscountFactorForParty(gomock.Any()).Return(num.DecimalZero()).AnyTimes() + execBanking := emocks.NewMockBanking(ctrl) - exec := execution.NewEngine(log, executionConfig, timeService, collateralService, oracleService, broker, statevar, marketTracker, asset, referralDiscountReward, volumeDiscount) + exec := execution.NewEngine(log, executionConfig, timeService, collateralService, oracleService, broker, statevar, marketTracker, asset, referralDiscountReward, volumeDiscount, execBanking) accounts := mocks.NewMockStakingAccounts(ctrl) witness := mocks.NewMockWitness(ctrl) netp := netparams.New(log, netparams.NewDefaultConfig(), broker) - banking := mocks.NewMockBanking(ctrl) - gov := governance.NewEngine(log, governance.NewDefaultConfig(), accounts, timeService, broker, asset, witness, exec, netp, banking) + govBanking := mocks.NewMockBanking(ctrl) + gov := governance.NewEngine(log, governance.NewDefaultConfig(), accounts, timeService, broker, asset, witness, exec, netp, govBanking) valFake := fakeCPComponent{ name: types.ValidatorsCheckpoint, } diff --git a/core/governance/netparams.go b/core/governance/netparams.go index 6637e33f5f..8075af2561 100644 --- a/core/governance/netparams.go +++ b/core/governance/netparams.go @@ -27,7 +27,7 @@ var ( ErrEmptyNetParamValue = errors.New("empty network parameter value") ) -func (e *Engine) getNewSpotMarketProposalParameters() *ProposalParameters { +func (e *Engine) getNewSpotMarketProposalParameters() *types.ProposalParameters { return e.getProposalParametersFromNetParams( netparams.GovernanceProposalMarketMinClose, netparams.GovernanceProposalMarketMaxClose, @@ -43,7 +43,7 @@ func (e *Engine) getNewSpotMarketProposalParameters() *ProposalParameters { ) } -func (e *Engine) getNewMarketProposalParameters() *ProposalParameters { +func (e *Engine) getNewMarketProposalParameters() *types.ProposalParameters { return e.getProposalParametersFromNetParams( netparams.GovernanceProposalMarketMinClose, netparams.GovernanceProposalMarketMaxClose, @@ -59,7 +59,7 @@ func (e *Engine) getNewMarketProposalParameters() *ProposalParameters { ) } -func (e *Engine) getUpdateMarketProposalParameters() *ProposalParameters { +func (e *Engine) getUpdateMarketProposalParameters() *types.ProposalParameters { return e.getProposalParametersFromNetParams( netparams.GovernanceProposalUpdateMarketMinClose, netparams.GovernanceProposalUpdateMarketMaxClose, @@ -75,7 +75,7 @@ func (e *Engine) getUpdateMarketProposalParameters() *ProposalParameters { ) } -func (e *Engine) getUpdateSpotMarketProposalParameters() *ProposalParameters { +func (e *Engine) getUpdateSpotMarketProposalParameters() *types.ProposalParameters { return e.getProposalParametersFromNetParams( netparams.GovernanceProposalUpdateMarketMinClose, netparams.GovernanceProposalUpdateMarketMaxClose, @@ -92,7 +92,7 @@ func (e *Engine) getUpdateSpotMarketProposalParameters() *ProposalParameters { } // getUpdatetMarketStateProposalParameters is reusing the net params defined for market update! -func (e *Engine) getUpdateMarketStateProposalParameters() *ProposalParameters { +func (e *Engine) getUpdateMarketStateProposalParameters() *types.ProposalParameters { return e.getProposalParametersFromNetParams(netparams.GovernanceProposalUpdateMarketMinClose, netparams.GovernanceProposalUpdateMarketMaxClose, netparams.GovernanceProposalUpdateMarketMinEnact, @@ -107,7 +107,7 @@ func (e *Engine) getUpdateMarketStateProposalParameters() *ProposalParameters { ) } -func (e *Engine) getReferralProgramNetworkParameters() *ProposalParameters { +func (e *Engine) getReferralProgramNetworkParameters() *types.ProposalParameters { return e.getProposalParametersFromNetParams( netparams.GovernanceProposalReferralProgramMinClose, netparams.GovernanceProposalReferralProgramMaxClose, @@ -123,7 +123,7 @@ func (e *Engine) getReferralProgramNetworkParameters() *ProposalParameters { ) } -func (e *Engine) getVolumeDiscountProgramNetworkParameters() *ProposalParameters { +func (e *Engine) getVolumeDiscountProgramNetworkParameters() *types.ProposalParameters { return e.getProposalParametersFromNetParams( netparams.GovernanceProposalVolumeDiscountProgramMinClose, netparams.GovernanceProposalVolumeDiscountProgramMaxClose, @@ -139,7 +139,7 @@ func (e *Engine) getVolumeDiscountProgramNetworkParameters() *ProposalParameters ) } -func (e *Engine) getNewAssetProposalParameters() *ProposalParameters { +func (e *Engine) getNewAssetProposalParameters() *types.ProposalParameters { return e.getProposalParametersFromNetParams( netparams.GovernanceProposalAssetMinClose, netparams.GovernanceProposalAssetMaxClose, @@ -155,7 +155,7 @@ func (e *Engine) getNewAssetProposalParameters() *ProposalParameters { ) } -func (e *Engine) getUpdateAssetProposalParameters() *ProposalParameters { +func (e *Engine) getUpdateAssetProposalParameters() *types.ProposalParameters { return e.getProposalParametersFromNetParams( netparams.GovernanceProposalUpdateAssetMinClose, netparams.GovernanceProposalUpdateAssetMaxClose, @@ -171,7 +171,7 @@ func (e *Engine) getUpdateAssetProposalParameters() *ProposalParameters { ) } -func (e *Engine) getUpdateNetworkParameterProposalParameters() *ProposalParameters { +func (e *Engine) getUpdateNetworkParameterProposalParameters() *types.ProposalParameters { return e.getProposalParametersFromNetParams( netparams.GovernanceProposalUpdateNetParamMinClose, netparams.GovernanceProposalUpdateNetParamMaxClose, @@ -187,7 +187,7 @@ func (e *Engine) getUpdateNetworkParameterProposalParameters() *ProposalParamete ) } -func (e *Engine) getNewFreeformProposalParameters() *ProposalParameters { +func (e *Engine) getNewFreeformProposalParameters() *types.ProposalParameters { return e.getProposalParametersFromNetParams( netparams.GovernanceProposalFreeformMinClose, netparams.GovernanceProposalFreeformMaxClose, @@ -203,7 +203,7 @@ func (e *Engine) getNewFreeformProposalParameters() *ProposalParameters { ) } -func (e *Engine) getNewTransferProposalParameters() *ProposalParameters { +func (e *Engine) getNewTransferProposalParameters() *types.ProposalParameters { return e.getProposalParametersFromNetParams( netparams.GovernanceProposalTransferMinClose, netparams.GovernanceProposalTransferMaxClose, @@ -223,8 +223,8 @@ func (e *Engine) getProposalParametersFromNetParams( minCloseKey, maxCloseKey, minEnactKey, maxEnactKey, requiredParticipationKey, requiredMajorityKey, minProposerBalanceKey, minVoterBalanceKey, requiredParticipationLPKey, requiredMajorityLPKey, minEquityLikeShareKey string, -) *ProposalParameters { - pp := ProposalParameters{} +) *types.ProposalParameters { + pp := types.ProposalParameters{} pp.MinClose, _ = e.netp.GetDuration(minCloseKey) pp.MaxClose, _ = e.netp.GetDuration(maxCloseKey) pp.MinEnact, _ = e.netp.GetDuration(minEnactKey) diff --git a/core/governance/node_validation.go b/core/governance/node_validation.go index 0870b66cae..618b81dfc8 100644 --- a/core/governance/node_validation.go +++ b/core/governance/node_validation.go @@ -227,17 +227,17 @@ func (n *NodeValidation) Start(ctx context.Context, p *types.Proposal) error { np, n.onResChecked, time.Unix(p.Terms.ValidationTimestamp, 0)) } -func (n *NodeValidation) restore(ctx context.Context, p *types.Proposal) error { - checker, err := n.getChecker(ctx, p) +func (n *NodeValidation) restore(ctx context.Context, p *types.ProposalData) error { + checker, err := n.getChecker(ctx, p.Proposal) if err != nil { return err } np := &nodeProposal{ proposal: &proposal{ - Proposal: p, - yes: map[string]*types.Vote{}, - no: map[string]*types.Vote{}, - invalidVotes: map[string]*types.Vote{}, + Proposal: p.Proposal, + yes: votesAsMap(p.Yes), + no: votesAsMap(p.No), + invalidVotes: votesAsMap(p.Invalid), }, state: atomic.Uint32{}, checker: checker, diff --git a/core/governance/proposal.go b/core/governance/proposal.go index 043857b33c..615be5c00b 100644 --- a/core/governance/proposal.go +++ b/core/governance/proposal.go @@ -22,19 +22,213 @@ import ( "code.vegaprotocol.io/vega/libs/num" ) -// ProposalParameters stores proposal specific parameters. -type ProposalParameters struct { - MinClose time.Duration - MaxClose time.Duration - MinEnact time.Duration - MaxEnact time.Duration - RequiredParticipation num.Decimal - RequiredMajority num.Decimal - MinProposerBalance *num.Uint - MinVoterBalance *num.Uint - RequiredParticipationLP num.Decimal - RequiredMajorityLP num.Decimal - MinEquityLikeShare num.Decimal +type batchProposal struct { + *types.BatchProposal + yes map[string]*types.Vote + no map[string]*types.Vote + invalidVotes map[string]*types.Vote +} + +// AddVote registers the last vote casted by a party. The proposal has to be +// open, it returns an error otherwise. +func (p *batchProposal) AddVote(vote types.Vote) error { + if !p.IsOpenForVotes() { + return ErrProposalNotOpenForVotes + } + + if vote.Value == types.VoteValueYes { + delete(p.no, vote.PartyID) + p.yes[vote.PartyID] = &vote + } else { + delete(p.yes, vote.PartyID) + p.no[vote.PartyID] = &vote + } + + return nil +} + +func (p *batchProposal) IsOpenForVotes() bool { + // It's allowed to vote during the validation of the proposal by the node. + return p.State == types.ProposalStateOpen || p.State == types.ProposalStateWaitingForNodeVote +} + +type proposal struct { + *types.Proposal + yes map[string]*types.Vote + no map[string]*types.Vote + invalidVotes map[string]*types.Vote +} + +// ShouldClose tells if the proposal should be closed or not. +// We also check the "open" state, alongside the closing timestamp as solely +// relying on the closing timestamp could lead to call Close() on an +// already-closed proposal. +func (p *proposal) ShouldClose(now int64) bool { + return p.IsOpen() && p.Terms.ClosingTimestamp < now +} + +func (p *proposal) IsTimeToEnact(now int64) bool { + return p.Terms.EnactmentTimestamp < now +} + +func (p *proposal) SucceedsMarket(parentID string) bool { + nm := p.NewMarket() + if nm == nil { + return false + } + if pid, ok := nm.ParentMarketID(); !ok || pid != parentID { + return false + } + return true +} + +func (p *proposal) IsOpenForVotes() bool { + // It's allowed to vote during the validation of the proposal by the node. + return p.State == types.ProposalStateOpen || p.State == types.ProposalStateWaitingForNodeVote +} + +// AddVote registers the last vote casted by a party. The proposal has to be +// open, it returns an error otherwise. +func (p *proposal) AddVote(vote types.Vote) error { + if !p.IsOpenForVotes() { + return ErrProposalNotOpenForVotes + } + + if vote.Value == types.VoteValueYes { + delete(p.no, vote.PartyID) + p.yes[vote.PartyID] = &vote + } else { + delete(p.yes, vote.PartyID) + p.no[vote.PartyID] = &vote + } + + return nil +} + +// Close determines the state of the proposal, passed or declined based on the +// vote balance and weight. +// Warning: this method should only be called once. Use ShouldClose() to know +// when to call. +func (p *proposal) Close(accounts StakingAccounts, markets Markets) { + if !p.IsOpen() { + return + } + + defer func() { + p.purgeBlankVotes(p.yes) + p.purgeBlankVotes(p.no) + }() + + tokenVoteState, tokenVoteError := p.computeVoteStateUsingTokens(accounts) + + p.State = tokenVoteState + p.Reason = tokenVoteError + + // Proposals, other than market updates, solely relies on votes using the + // governance tokens. So, only proposals for market update can go beyond this + // guard. + if !p.IsMarketUpdate() { + return + } + + if tokenVoteState == types.ProposalStateDeclined && tokenVoteError == types.ProposalErrorParticipationThresholdNotReached { + elsVoteState, elsVoteError := p.computeVoteStateUsingEquityLikeShare(markets) + p.State = elsVoteState + p.Reason = elsVoteError + } +} + +func (p *proposal) computeVoteStateUsingTokens(accounts StakingAccounts) (types.ProposalState, types.ProposalError) { + totalStake := accounts.GetStakingAssetTotalSupply() + + yes := p.countTokens(p.yes, accounts) + yesDec := num.DecimalFromUint(yes) + no := p.countTokens(p.no, accounts) + totalTokens := num.Sum(yes, no) + totalTokensDec := num.DecimalFromUint(totalTokens) + p.weightVotesFromToken(p.yes, totalTokensDec) + p.weightVotesFromToken(p.no, totalTokensDec) + majorityThreshold := totalTokensDec.Mul(p.RequiredMajority) + totalStakeDec := num.DecimalFromUint(totalStake) + participationThreshold := totalStakeDec.Mul(p.RequiredParticipation) + + // if we have 0 votes, then just return straight away, + // prevents a proposal to go through if the participation is set to 0 + if totalTokens.IsZero() { + return types.ProposalStateDeclined, types.ProposalErrorParticipationThresholdNotReached + } + + if yesDec.GreaterThanOrEqual(majorityThreshold) && totalTokensDec.GreaterThanOrEqual(participationThreshold) { + return types.ProposalStatePassed, types.ProposalErrorUnspecified + } + + if totalTokensDec.LessThan(participationThreshold) { + return types.ProposalStateDeclined, types.ProposalErrorParticipationThresholdNotReached + } + + return types.ProposalStateDeclined, types.ProposalErrorMajorityThresholdNotReached +} + +func (p *proposal) computeVoteStateUsingEquityLikeShare(markets Markets) (types.ProposalState, types.ProposalError) { + yes := p.countEquityLikeShare(p.yes, markets) + no := p.countEquityLikeShare(p.no, markets) + totalEquityLikeShare := yes.Add(no) + threshold := totalEquityLikeShare.Mul(p.RequiredLPMajority) + + if yes.GreaterThanOrEqual(threshold) && totalEquityLikeShare.GreaterThanOrEqual(p.RequiredLPParticipation) { + return types.ProposalStatePassed, types.ProposalErrorUnspecified + } + + if totalEquityLikeShare.LessThan(p.RequiredLPParticipation) { + return types.ProposalStateDeclined, types.ProposalErrorParticipationThresholdNotReached + } + + return types.ProposalStateDeclined, types.ProposalErrorMajorityThresholdNotReached +} + +func (p *proposal) countTokens(votes map[string]*types.Vote, accounts StakingAccounts) *num.Uint { + tally := num.UintZero() + for _, v := range votes { + v.TotalGovernanceTokenBalance = getTokensBalance(accounts, v.PartyID) + tally.AddSum(v.TotalGovernanceTokenBalance) + } + + return tally +} + +func (p *proposal) countEquityLikeShare(votes map[string]*types.Vote, markets Markets) num.Decimal { + tally := num.DecimalZero() + for _, v := range votes { + v.TotalEquityLikeShareWeight, _ = markets.GetEquityLikeShareForMarketAndParty(p.MarketUpdate().MarketID, v.PartyID) + tally = tally.Add(v.TotalEquityLikeShareWeight) + } + + return tally +} + +func (p *proposal) weightVotesFromToken(votes map[string]*types.Vote, totalVotes num.Decimal) { + if totalVotes.IsZero() { + return + } + + for _, v := range votes { + tokenBalanceDec := num.DecimalFromUint(v.TotalGovernanceTokenBalance) + v.TotalGovernanceTokenWeight = tokenBalanceDec.Div(totalVotes) + } +} + +// purgeBlankVotes removes votes that don't have tokens or equity-like share +// associated. The user may have withdrawn their governance token or their +// equity-like share before the end of the vote. +// We will then purge them from the map if it's the case. +func (p *proposal) purgeBlankVotes(votes map[string]*types.Vote) { + for k, v := range votes { + if v.TotalGovernanceTokenBalance.IsZero() && v.TotalEquityLikeShareWeight.IsZero() { + p.invalidVotes[k] = v + delete(votes, k) + continue + } + } } // ToEnact wraps the proposal in a type that has a convenient interface diff --git a/core/governance/snapshot.go b/core/governance/snapshot.go index 6a45a9f61c..1c9781a498 100644 --- a/core/governance/snapshot.go +++ b/core/governance/snapshot.go @@ -19,22 +19,37 @@ import ( "context" "sort" + ethcallcommon "code.vegaprotocol.io/vega/core/datasource/external/ethcall/common" "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" + vgcontext "code.vegaprotocol.io/vega/libs/context" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" + "code.vegaprotocol.io/vega/protos/vega" + vegapb "code.vegaprotocol.io/vega/protos/vega" + snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "code.vegaprotocol.io/vega/libs/proto" + "golang.org/x/exp/maps" ) var ( activeKey = (&types.PayloadGovernanceActive{}).Key() enactedKey = (&types.PayloadGovernanceEnacted{}).Key() nodeValidationKey = (&types.PayloadGovernanceNode{}).Key() + batchActiveKey = (&types.PayloadGovernanceBatchActive{}).Key() hashKeys = []string{ activeKey, enactedKey, nodeValidationKey, + batchActiveKey, + } + defaultMarkPriceConfig = &types.CompositePriceConfiguration{ + DecayWeight: num.DecimalZero(), + DecayPower: num.DecimalZero(), + CashAmount: num.UintZero(), + CompositePriceType: types.CompositePriceTypeByLastTrade, } ) @@ -42,6 +57,7 @@ type governanceSnapshotState struct { serialisedActive []byte serialisedEnacted []byte serialisedNodeValidation []byte + serialisedBatchActive []byte } func (e *Engine) OnStateLoaded(ctx context.Context) error { @@ -88,6 +104,43 @@ func (e *Engine) serialiseActiveProposals() ([]byte, error) { return proto.Marshal(pl.IntoProto()) } +// serialiseBatchActiveProposals returns the engine's batch active proposals as marshalled bytes. +func (e *Engine) serialiseBatchActiveProposals() ([]byte, error) { + batchIDs := maps.Keys(e.activeBatchProposals) + sort.Strings(batchIDs) + + batchProposals := make([]*snapshotpb.BatchProposalData, 0, len(batchIDs)) + for _, batchID := range batchIDs { + batchProposal := e.activeBatchProposals[batchID] + + bpd := &snapshotpb.BatchProposalData{ + BatchProposal: &snapshotpb.ProposalData{ + Proposal: batchProposal.ToProto(), + Yes: votesAsProtoSlice(batchProposal.yes), + No: votesAsProtoSlice(batchProposal.no), + Invalid: votesAsProtoSlice(batchProposal.invalidVotes), + }, + Proposals: make([]*vegapb.Proposal, 0, len(batchProposal.Proposals)), + } + + for _, proposal := range batchProposal.Proposals { + bpd.Proposals = append(bpd.Proposals, proposal.IntoProto()) + } + + batchProposals = append(batchProposals, bpd) + } + + pl := types.Payload{ + Data: &types.PayloadGovernanceBatchActive{ + GovernanceBatchActive: &types.GovernanceBatchActive{ + BatchProposals: batchProposals, + }, + }, + } + + return proto.Marshal(pl.IntoProto()) +} + // serialiseEnactedProposals returns the engine's enacted proposals as marshalled bytes. func (e *Engine) serialiseEnactedProposals() ([]byte, error) { enacted := make([]*types.ProposalData, 0, len(e.activeProposals)) @@ -114,22 +167,21 @@ func (e *Engine) serialiseEnactedProposals() ([]byte, error) { // serialiseNodeProposals returns the engine's proposals waiting for node validation. func (e *Engine) serialiseNodeProposals() ([]byte, error) { nodeProposals := e.nodeProposalValidation.getProposals() - proposals := make([]*types.Proposal, 0, len(nodeProposals)) + proposals := make([]*types.ProposalData, 0, len(nodeProposals)) for _, np := range nodeProposals { - // Given a snapshot is always taken at the end of a block the value of `state` in np will - // always be pending since any that are not will have already been resolved as accepted/rejected - // and removed from the slice. The yes/no/invalid fields in `np.proposal` are also unnecessary to - // save since "voting" as is done for active proposals is not done on node-proposals, and so the - // maps will always be empty - p := np.proposal.Proposal - proposals = append(proposals, p) + proposals = append(proposals, &types.ProposalData{ + Proposal: np.Proposal, + Yes: votesAsSlice(np.yes), + No: votesAsSlice(np.no), + Invalid: votesAsSlice(np.invalidVotes), + }) } pl := types.Payload{ Data: &types.PayloadGovernanceNode{ GovernanceNode: &types.GovernanceNode{ - Proposals: proposals, + ProposalData: proposals, }, }, } @@ -153,6 +205,8 @@ func (e *Engine) serialise(k string) ([]byte, error) { return e.serialiseK(e.serialiseEnactedProposals, &e.gss.serialisedEnacted) case nodeValidationKey: return e.serialiseK(e.serialiseNodeProposals, &e.gss.serialisedNodeValidation) + case batchActiveKey: + return e.serialiseK(e.serialiseBatchActiveProposals, &e.gss.serialisedBatchActive) default: return nil, types.ErrSnapshotKeyDoesNotExist } @@ -188,6 +242,8 @@ func (e *Engine) LoadState(ctx context.Context, p *types.Payload) ([]types.State return nil, nil case *types.PayloadGovernanceNode: return nil, e.restoreNodeProposals(ctx, pl.GovernanceNode, p) + case *types.PayloadGovernanceBatchActive: + return nil, e.restoreBatchActiveProposals(ctx, pl.GovernanceBatchActive, p) default: return nil, types.ErrUnknownSnapshotType } @@ -199,12 +255,39 @@ func (e *Engine) restoreActiveProposals(ctx context.Context, active *types.Gover vevts := []events.Event{} e.log.Debug("restoring active proposals snapshot", logging.Int("nproposals", len(active.Proposals))) for _, p := range active.Proposals { + if vgcontext.InProgressUpgradeFrom(ctx, "v0.73.13") { + e.ensureChainIDSet(p.Proposal) + } pp := &proposal{ Proposal: p.Proposal, yes: votesAsMap(p.Yes), no: votesAsMap(p.No), invalidVotes: votesAsMap(p.Invalid), } + + if vgcontext.InProgressUpgradeFrom(ctx, "v0.73.13") { + if nm := pp.Proposal.Terms.GetNewMarket(); nm != nil { + e.log.Info("migrating liquidity fee settings for new market proposal", logging.String("pid", pp.ID)) + nm.Changes.LiquidityFeeSettings = &types.LiquidityFeeSettings{ + Method: vega.LiquidityFeeSettings_METHOD_MARGINAL_COST, + } + } + if nm := pp.Proposal.Terms.GetUpdateMarket(); nm != nil { + e.log.Info("migrating liquidity fee settings update market proposal", logging.String("pid", pp.ID)) + nm.Changes.LiquidityFeeSettings = &types.LiquidityFeeSettings{ + Method: vega.LiquidityFeeSettings_METHOD_MARGINAL_COST, + } + } + } + if vgcontext.InProgressUpgradeFrom(ctx, "v0.73.13") { + if pp.Terms.IsNewMarket() { + pp.Terms.GetNewMarket().Changes.MarkPriceConfiguration = defaultMarkPriceConfig.DeepClone() + } + if pp.Terms.IsMarketUpdate() { + pp.Terms.GetUpdateMarket().Changes.MarkPriceConfiguration = defaultMarkPriceConfig.DeepClone() + } + } + e.log.Debug("proposals", logging.String("id", pp.ID), logging.Int("yes", len(pp.yes)), @@ -233,11 +316,73 @@ func (e *Engine) restoreActiveProposals(ctx context.Context, active *types.Gover return err } +func (e *Engine) restoreBatchActiveProposals(ctx context.Context, active *types.GovernanceBatchActive, p *types.Payload) error { + e.activeBatchProposals = make(map[string]*batchProposal, len(active.BatchProposals)) + + evts := []events.Event{} + vevts := []events.Event{} + e.log.Debug("restoring active proposals snapshot", logging.Int("nproposals", len(active.BatchProposals))) + for _, bpp := range active.BatchProposals { + bpt := types.BatchProposalFromSnapshotProto(bpp.BatchProposal.Proposal, bpp.Proposals) + if vgcontext.InProgressUpgradeFrom(ctx, "v0.73.13") { + e.ensureChainIDSet(bpt.Proposals...) + } + bp := &batchProposal{ + BatchProposal: bpt, + yes: votesAsMapFromProto(bpp.BatchProposal.Yes), + no: votesAsMapFromProto(bpp.BatchProposal.No), + invalidVotes: votesAsMapFromProto(bpp.BatchProposal.Invalid), + } + + evts = append(evts, events.NewProposalEventFromProto(ctx, bp.BatchProposal.ToProto())) + for _, p := range bp.BatchProposal.Proposals { + if vgcontext.InProgressUpgradeFrom(ctx, "v0.73.13") { + if p.Terms.IsNewMarket() { + p.Terms.GetNewMarket().Changes.MarkPriceConfiguration = defaultMarkPriceConfig.DeepClone() + } + if p.Terms.IsMarketUpdate() { + p.Terms.GetUpdateMarket().Changes.MarkPriceConfiguration = defaultMarkPriceConfig.DeepClone() + } + } + evts = append(evts, events.NewProposalEvent(ctx, *p)) + } + + e.log.Debug("batch proposal", + logging.String("id", bp.ID), + logging.Int("yes", len(bp.yes)), + logging.Int("no", len(bp.no)), + logging.Int("invalid", len(bp.invalidVotes)), + ) + + e.activeBatchProposals[bp.ID] = bp + + for _, v := range bp.yes { + vevts = append(vevts, events.NewVoteEvent(ctx, *v)) + } + for _, v := range bp.no { + vevts = append(vevts, events.NewVoteEvent(ctx, *v)) + } + + for _, v := range bp.invalidVotes { + vevts = append(vevts, events.NewVoteEvent(ctx, *v)) + } + } + + var err error + e.gss.serialisedBatchActive, err = proto.Marshal(p.IntoProto()) + e.broker.SendBatch(evts) + e.broker.SendBatch(vevts) + return err +} + func (e *Engine) restoreEnactedProposals(ctx context.Context, enacted *types.GovernanceEnacted, p *types.Payload) { evts := []events.Event{} vevts := []events.Event{} e.log.Debug("restoring enacted proposals snapshot", logging.Int("nproposals", len(enacted.Proposals))) for _, p := range enacted.Proposals { + if vgcontext.InProgressUpgradeFrom(ctx, "v0.73.13") { + e.ensureChainIDSet(p.Proposal) + } pp := &proposal{ Proposal: p.Proposal, yes: votesAsMap(p.Yes), @@ -270,15 +415,99 @@ func (e *Engine) restoreEnactedProposals(ctx context.Context, enacted *types.Gov } func (e *Engine) restoreNodeProposals(ctx context.Context, node *types.GovernanceNode, p *types.Payload) error { + // node.Proposals should be empty for new snapshots because they are the old version that didn't include votes for _, p := range node.Proposals { - e.nodeProposalValidation.restore(ctx, p) + e.nodeProposalValidation.restore(ctx, &types.ProposalData{Proposal: p}) e.broker.Send(events.NewProposalEvent(ctx, *p)) } + + for _, p := range node.ProposalData { + e.nodeProposalValidation.restore(ctx, p) + e.broker.Send(events.NewProposalEvent(ctx, *p.Proposal)) + } + var err error e.gss.serialisedNodeValidation, err = proto.Marshal(p.IntoProto()) return err } +// ensureChainIDSet can be removed after protocol upgrade. +func (e *Engine) ensureChainIDSet(props ...*types.Proposal) { + for _, p := range props { + if nm := p.Terms.GetNewMarket(); nm != nil { + if perp := nm.Changes.GetPerps(); perp != nil { + switch pt := perp.Perps.DataSourceSpecForSettlementData.DataSourceType.(type) { + case ethcallcommon.Spec: + if pt.SourceChainID == 0 { + pt.SourceChainID = e.chainID + perp.Perps.DataSourceSpecForSettlementData.DataSourceType = pt + } + } + switch pt := perp.Perps.DataSourceSpecForSettlementSchedule.DataSourceType.(type) { + case ethcallcommon.Spec: + if pt.SourceChainID == 0 { + pt.SourceChainID = e.chainID + perp.Perps.DataSourceSpecForSettlementSchedule.DataSourceType = pt + } + } + continue + } + if future := nm.Changes.GetFuture(); future != nil { + switch ft := future.Future.DataSourceSpecForSettlementData.DataSourceType.(type) { + case ethcallcommon.Spec: + if ft.SourceChainID == 0 { + ft.SourceChainID = e.chainID + future.Future.DataSourceSpecForSettlementData.DataSourceType = ft + } + } + switch ft := future.Future.DataSourceSpecForTradingTermination.DataSourceType.(type) { + case ethcallcommon.Spec: + if ft.SourceChainID == 0 { + ft.SourceChainID = e.chainID + future.Future.DataSourceSpecForTradingTermination.DataSourceType = ft + } + } + } + continue + } + if um := p.Terms.GetUpdateMarket(); um != nil { + if perp := um.Changes.GetPerps(); perp != nil { + switch pt := perp.Perps.DataSourceSpecForSettlementData.DataSourceType.(type) { + case ethcallcommon.Spec: + if pt.SourceChainID == 0 { + pt.SourceChainID = e.chainID + perp.Perps.DataSourceSpecForSettlementData.DataSourceType = pt + } + } + switch pt := perp.Perps.DataSourceSpecForSettlementSchedule.DataSourceType.(type) { + case ethcallcommon.Spec: + if pt.SourceChainID == 0 { + pt.SourceChainID = e.chainID + perp.Perps.DataSourceSpecForSettlementSchedule.DataSourceType = pt + } + } + continue + } + if future := um.Changes.GetFuture(); future != nil { + switch ft := future.Future.DataSourceSpecForSettlementData.DataSourceType.(type) { + case ethcallcommon.Spec: + if ft.SourceChainID == 0 { + ft.SourceChainID = e.chainID + future.Future.DataSourceSpecForSettlementData.DataSourceType = ft + } + } + switch ft := future.Future.DataSourceSpecForTradingTermination.DataSourceType.(type) { + case ethcallcommon.Spec: + if ft.SourceChainID == 0 { + ft.SourceChainID = e.chainID + future.Future.DataSourceSpecForTradingTermination.DataSourceType = ft + } + } + } + } + } +} + // votesAsSlice returns a sorted slice of votes from a given map of votes. func votesAsSlice(votes map[string]*types.Vote) []*types.Vote { ret := make([]*types.Vote, 0, len(votes)) @@ -289,6 +518,16 @@ func votesAsSlice(votes map[string]*types.Vote) []*types.Vote { return ret } +// votesAsProtoSlice returns a sorted slice of proto votes from a given map of votes. +func votesAsProtoSlice(votes map[string]*types.Vote) []*vegapb.Vote { + ret := make([]*vegapb.Vote, 0, len(votes)) + for _, v := range votes { + ret = append(ret, v.IntoProto()) + } + sort.SliceStable(ret, func(i, j int) bool { return ret[i].PartyId < ret[j].PartyId }) + return ret +} + // votesAsMap returns an partyID => Vote map from the given slice of votes. func votesAsMap(votes []*types.Vote) map[string]*types.Vote { r := make(map[string]*types.Vote, len(votes)) @@ -297,3 +536,13 @@ func votesAsMap(votes []*types.Vote) map[string]*types.Vote { } return r } + +// votesAsMapFromProto returns an partyID => Vote map from the given slice of proto votes. +func votesAsMapFromProto(votes []*vegapb.Vote) map[string]*types.Vote { + r := make(map[string]*types.Vote, len(votes)) + for _, v := range votes { + v, _ := types.VoteFromProto(v) + r[v.PartyID] = v + } + return r +} diff --git a/core/governance/snapshot_test.go b/core/governance/snapshot_test.go index b031b74240..bb3b56f96f 100644 --- a/core/governance/snapshot_test.go +++ b/core/governance/snapshot_test.go @@ -21,10 +21,18 @@ import ( "testing" "time" + "code.vegaprotocol.io/vega/core/integration/stubs" + "code.vegaprotocol.io/vega/core/netparams" + "code.vegaprotocol.io/vega/core/snapshot" + "code.vegaprotocol.io/vega/core/stats" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/proto" vgrand "code.vegaprotocol.io/vega/libs/rand" - snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + vgtest "code.vegaprotocol.io/vega/libs/test" + "code.vegaprotocol.io/vega/logging" + "code.vegaprotocol.io/vega/paths" + snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -205,6 +213,13 @@ func TestGovernanceSnapshotNodeProposal(t *testing.T) { _, err = eng.SubmitProposal(context.Background(), *types.ProposalSubmissionFromProposal(&proposal), proposal.ID, party.Id) require.Nil(t, err) + // vote on it even though its in waiting-for-node-vote-state + voter1 := vgrand.RandomStr(5) + eng.ensureTokenBalanceForParty(t, voter1, 1) + eng.expectVoteEvent(t, voter1, proposal.ID) + err = eng.addYesVote(t, voter1, proposal.ID) + require.NoError(t, err) + // get snapshot state for node proposals and hope its changed s1, _, err := eng.GetState(nodeValidationKey) require.Nil(t, err) @@ -214,7 +229,7 @@ func TestGovernanceSnapshotNodeProposal(t *testing.T) { state, _, err := eng.GetState(nodeValidationKey) require.Nil(t, err) - snap := &snapshot.Payload{} + snap := &snapshotpb.Payload{} err = proto.Unmarshal(state, snap) require.Nil(t, err) @@ -235,6 +250,13 @@ func TestGovernanceSnapshotNodeProposal(t *testing.T) { s2, _, err := snapEng.GetState(nodeValidationKey) require.Nil(t, err) require.True(t, bytes.Equal(s1, s2)) + + // check the vote still exists + err = proto.Unmarshal(s2, snap) + require.Nil(t, err) + pp := types.PayloadFromProto(snap) + dd := pp.Data.(*types.PayloadGovernanceNode) + assert.Equal(t, 1, len(dd.GovernanceNode.ProposalData[0].Yes)) } func TestGovernanceSnapshotRoundTrip(t *testing.T) { @@ -276,7 +298,7 @@ func TestGovernanceSnapshotRoundTrip(t *testing.T) { state, _, err := eng.GetState(activeKey) require.Nil(t, err) - snap := &snapshot.Payload{} + snap := &snapshotpb.Payload{} err = proto.Unmarshal(state, snap) require.Nil(t, err) @@ -328,7 +350,7 @@ func TestGovernanceWithInternalTimeTerminationSnapshotRoundTrip(t *testing.T) { state, _, err := eng.GetState(activeKey) require.Nil(t, err) - snap := &snapshot.Payload{} + snap := &snapshotpb.Payload{} err = proto.Unmarshal(state, snap) require.Nil(t, err) @@ -358,3 +380,116 @@ func TestGovernanceSnapshotEmpty(t *testing.T) { require.Nil(t, err) require.NotNil(t, s) } + +func TestGovernanceSnapshotBatchProposals(t *testing.T) { + ctx := vgtest.VegaContext("chainid", 100) + + log := logging.NewTestLogger() + + vegaPath := paths.New(t.TempDir()) + + now := time.Now() + timeService := stubs.NewTimeStub() + timeService.SetTime(now) + + statsData := stats.New(log, stats.NewDefaultConfig()) + + // Create the engines + govEngine1 := getTestEngine(t, now) + + snapshotEngine1, err := snapshot.NewEngine(vegaPath, snapshot.DefaultConfig(), log, timeService, statsData.Blockchain) + require.NoError(t, err) + + closeSnapshotEngine1 := vgtest.OnlyOnce(snapshotEngine1.Close) + defer closeSnapshotEngine1() + + snapshotEngine1.AddProviders(govEngine1) + + require.NoError(t, snapshotEngine1.Start(ctx)) + + batchProposalID1 := "batch-1" + party := govEngine1.newValidParty("a-valid-party", 123456789) + govEngine1.ensureAllAssetEnabled(t) + + govEngine1.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() + govEngine1.expectOpenProposalEvent(t, party.Id, batchProposalID1) + + proposalNow := govEngine1.tsvc.GetTimeNow().Add(2 * time.Hour) + + sub1 := govEngine1.newBatchSubmission( + proposalNow.Add(48*time.Hour).Unix(), + govEngine1.newProposalForNewMarket(party.Id, proposalNow, nil, nil, true), + govEngine1.newProposalForNetParam(party.Id, netparams.MarketAuctionMaximumDuration, "10h", now), + ) + _, err = govEngine1.SubmitBatchProposal(ctx, sub1, batchProposalID1, party.Id) + require.NoError(t, err) + + batchProposalID2 := "batch-2" + govEngine1.expectOpenProposalEvent(t, party.Id, batchProposalID2) + + sub2 := govEngine1.newBatchSubmission( + proposalNow.Add(49*time.Hour).Unix(), + govEngine1.newProposalForNewMarket(party.Id, now, nil, nil, true), + govEngine1.newProposalForNetParam(party.Id, netparams.MarketAuctionMaximumDuration, "10h", now), + ) + _, err = govEngine1.SubmitBatchProposal(ctx, sub2, batchProposalID2, party.Id) + require.NoError(t, err) + + hash1, err := snapshotEngine1.SnapshotNow(ctx) + require.NoError(t, err) + + batchProposalID3 := "batch-3" + govEngine1.expectOpenProposalEvent(t, party.Id, batchProposalID3) + + sub3 := govEngine1.newBatchSubmission( + proposalNow.Add(50*time.Hour).Unix(), + govEngine1.newProposalForNewMarket(party.Id, now, nil, nil, true), + govEngine1.newProposalForNetParam(party.Id, netparams.MarketAuctionMaximumDuration, "10h", now), + ) + _, err = govEngine1.SubmitBatchProposal(ctx, sub3, batchProposalID3, party.Id) + require.NoError(t, err) + + state1 := map[string][]byte{} + for _, key := range govEngine1.Keys() { + state, additionalProvider, err := govEngine1.GetState(key) + require.NoError(t, err) + assert.Empty(t, additionalProvider) + state1[key] = state + } + + closeSnapshotEngine1() + + // Create the engines + govEngine2 := getTestEngine(t, now) + snapshotEngine2, err := snapshot.NewEngine(vegaPath, snapshot.DefaultConfig(), log, timeService, statsData.Blockchain) + require.NoError(t, err) + defer snapshotEngine2.Close() + + snapshotEngine2.AddProviders(govEngine2.Engine) + + govEngine2.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() + + require.NoError(t, snapshotEngine2.Start(ctx)) + + hash2, _, _ := snapshotEngine2.Info() + require.Equal(t, hash1, hash2) + + party2 := govEngine2.newValidParty("a-valid-party", 123456789) + govEngine2.ensureAllAssetEnabled(t) + + govEngine2.expectOpenProposalEvent(t, party2.Id, batchProposalID3) + _, err = govEngine2.SubmitBatchProposal(ctx, sub3, batchProposalID3, party2.Id) + require.NoError(t, err) + + state2 := map[string][]byte{} + for _, key := range govEngine2.Keys() { + state, additionalProvider, err := govEngine2.GetState(key) + require.NoError(t, err) + assert.Empty(t, additionalProvider) + state2[key] = state + } + + for key := range state1 { + assert.Equalf(t, state1[key], state2[key], "Key %q does not have the same data", key) + } +} diff --git a/core/idgeneration/generator_test.go b/core/idgeneration/generator_test.go index 04e70d45e6..6b3cef5d86 100644 --- a/core/idgeneration/generator_test.go +++ b/core/idgeneration/generator_test.go @@ -19,6 +19,7 @@ import ( "testing" "code.vegaprotocol.io/vega/core/idgeneration" + "github.com/stretchr/testify/assert" ) diff --git a/core/integration/execution_test.go b/core/integration/execution_test.go index 47d0fa78cf..f96337e6aa 100644 --- a/core/integration/execution_test.go +++ b/core/integration/execution_test.go @@ -200,3 +200,7 @@ func (n noopValidation) CheckStopOrdersCancellation(cancel *commandspb.StopOrder func (n noopValidation) CheckStopOrdersSubmission(order *commandspb.StopOrdersSubmission) error { return nil } + +func (n noopValidation) CheckUpdateMarginMode(order *commandspb.UpdateMarginMode) error { + return nil +} diff --git a/core/integration/features/0084-VDPR-013.feature b/core/integration/features/0084-VDPR-013.feature index 1388f491bf..e9e4ca4f88 100644 --- a/core/integration/features/0084-VDPR-013.feature +++ b/core/integration/features/0084-VDPR-013.feature @@ -64,7 +64,8 @@ Feature: A parties volume_discount_factor is set equal to the factors in the hig | market.liquidity.earlyExitPenalty | 0.25 | Given the average block duration is "1" - @Now + + @Now @DebugNoLA Scenario: 001: Check that the volume discount factor is updated after each epoch Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -131,14 +132,14 @@ Feature: A parties volume_discount_factor is set equal to the factors in the hig | id | party | market id | commitment amount | fee | lp type | | lp1 | lp1 | ETH/MAR24 | 0 | 0.001 | cancellation | And the network moves ahead "1" epochs - And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/MAR24" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/MAR24" And the party "party3" has the following discount factor "0.03" Given the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | party1 | ETH/MAR24 | buy | 100 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | party3 | ETH/MAR24 | sell | 100 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/MAR24 | sell | 100 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -146,10 +147,6 @@ Feature: A parties volume_discount_factor is set equal to the factors in the hig When the network moves ahead "1" epochs Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/MAR24" - # the parties split the fees but party3 has a discount and au - # infra fee discount - floor(50 *0.03) = 1 - # no lp fee Then the following transfers should happen: | from | to | from account | to account | market id | amount | asset | - | party3 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 49 | ETH | - | party1 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 50 | ETH | + | party3 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 97 | ETH | diff --git a/core/integration/features/accounts/2943-distressed-trader-has-general-balance.feature b/core/integration/features/accounts/2943-distressed-trader-has-general-balance.feature index 1e1479aff2..313e15b4ef 100644 --- a/core/integration/features/accounts/2943-distressed-trader-has-general-balance.feature +++ b/core/integration/features/accounts/2943-distressed-trader-has-general-balance.feature @@ -6,10 +6,10 @@ Feature: Distressed parties should not have general balance left | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | | ETH/DEC20 | ETH | ETH | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e6 | 1e6 | default-futures | And the following network parameters are set: - | name | value | - | market.auction.minimumDuration | 1 | - | network.markPriceUpdateMaximumFrequency | 0s | - | limits.markets.maxPeggedOrders | 4 | + | name | value | + | market.auction.minimumDuration | 1 | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 4 | | market.liquidity.providersFeeCalculationTimeStep | 1s | Scenario: Upper bound breached @@ -71,11 +71,11 @@ Feature: Distressed parties should not have general balance left Then the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp2 | party3 | ETH/DEC20 | 20000 | 0.1 | submission | - And the parties place the following pegged iceberg orders: + And the parties place the following pegged iceberg orders: | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | reference | | party3 | ETH/DEC20 | 189 | 1 | buy | BID | 189 | 10 | lp2-ice-buy | | party3 | ETH/DEC20 | 117 | 1 | sell | ASK | 117 | 10 | lp2-ice-sell | - + Then the liquidity provisions should have the following states: | id | party | market | commitment amount | status | | lp2 | party3 | ETH/DEC20 | 20000 | STATUS_PENDING | @@ -84,11 +84,11 @@ Feature: Distressed parties should not have general balance left Then the liquidity provisions should have the following states: | id | party | market | commitment amount | status | | lp2 | party3 | ETH/DEC20 | 20000 | STATUS_ACTIVE | - + Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party3 | ETH/DEC20 | buy | 189 | 100 | STATUS_ACTIVE | - | party3 | ETH/DEC20 | sell | 117 | 130 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party3 | ETH/DEC20 | buy | 189 | 189 | 100 | STATUS_ACTIVE | + | party3 | ETH/DEC20 | sell | 117 | 117 | 130 | STATUS_ACTIVE | ## The sum of the margin + general account == 24000 - 10000 (commitment amount) Then the parties should have the following account balances: | party | asset | market id | margin | general | @@ -101,28 +101,28 @@ Feature: Distressed parties should not have general balance left | party1 | ETH/DEC20 | sell | 20 | 1850 | 0 | TYPE_LIMIT | TIF_GTC | ref-3 | Then the mark price should be "120" for the market "ETH/DEC20" Then the liquidity provider fee shares for the market "ETH/DEC20" should be: - | party | equity like share | average entry valuation | - | lpprov | 0.6428571428571429 | 10000 | - | party3 | 0.3571428571428571 | 60000.0000000000000556 | + | party | equity like share | average entry valuation | + | lpprov | 0.6428571428571429 | 10000 | + | party3 | 0.3571428571428571 | 60000.0000000000000556 | And the following trades should be executed: | buyer | price | size | seller | - | party5 | 120 | 20 | party1 | - | party5 | 120 | 20 | party3 | - Then the parties should have the following account balances: + | party5 | 120 | 20 | party1 | + | party5 | 120 | 20 | party3 | + Then the parties should have the following account balances: | party | asset | market id | margin | general | | party3 | ETH | ETH/DEC20 | 3152 | 1040 | Then the parties cancel the following orders: - | party | reference | - | party3 | lp2-ice-sell | - | party3 | lp2-ice-buy | + | party | reference | + | party3 | lp2-ice-sell | + | party3 | lp2-ice-buy | And the parties place the following pegged iceberg orders: | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | | party3 | ETH/DEC20 | 189 | 1 | buy | BID | 189 | 10 | | party3 | ETH/DEC20 | 136 | 1 | sell | ASK | 136 | 10 | - - Then the network moves ahead "10" blocks + + Then the network moves ahead "10" blocks And the parties should have the following account balances: | party | asset | market id | margin | general | diff --git a/core/integration/features/activity-streak/0086-ASPR-evaluating_activity.feature b/core/integration/features/activity-streak/0086-ASPR-evaluating_activity.feature index 60647d7715..be64990cb5 100644 --- a/core/integration/features/activity-streak/0086-ASPR-evaluating_activity.feature +++ b/core/integration/features/activity-streak/0086-ASPR-evaluating_activity.feature @@ -128,12 +128,12 @@ Feature: Evaluating trader activity | id | party | market id | commitment amount | fee | lp type | | lp1 | lpprov | ETH/USD.0.1 | 0 | 0.001 | cancellation | And the network moves ahead "1" epochs - And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/USD.0.1" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD.0.1" Given the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | aux1 | ETH/USD.0.1 | buy | | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | trader1 | ETH/USD.0.1 | sell | | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | trader1 | ETH/USD.0.1 | sell | | 1000 | 1 | TYPE_LIMIT | TIF_GTC | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp2 | lpprov | ETH/USD.0.1 | 1000000 | 0.001 | submission | diff --git a/core/integration/features/auctions/0043-MKTL-010.feature b/core/integration/features/auctions/0043-MKTL-010.feature new file mode 100644 index 0000000000..6ed735de80 --- /dev/null +++ b/core/integration/features/auctions/0043-MKTL-010.feature @@ -0,0 +1,80 @@ +Feature: Ensure the markets expire if they cannot leave opening auction within the configured period + + + Background: + + Given the following assets are registered: + | id | decimal places | + | ETH | 5 | + And the simple risk model named "my-simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.08628781058136630000 | 0.09370922348428490000 | -1 | -1 | 0.2 | + And the fees configuration named "my-fees-config": + | maker fee | infrastructure fee | + | 0.004 | 0.001 | + And the following network parameters are set: + | name | value | + | limits.markets.maxPeggedOrders | 2 | + | market.auction.minimumDuration | 5 | + | market.auction.maximumDuration | 100s | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | decimal places | linear slippage factor | quadratic slippage factor | sla params | is passed | + | ETH/DEC20 | ETH | ETH | my-simple-risk-model | default-margin-calculator | 5 | my-fees-config | default-none | default-eth-for-future | 2 | 1e6 | 1e6 | default-futures | true | + + @Expires + Scenario: Covers 0043-MKTL-010 + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | ETH | 1000000000000 | + | party2 | ETH | 1000000000000 | + | party3 | ETH | 1000000000000 | + | lpprov | ETH | 1000000000000 | + And the initial insurance pool balance is "10000" for all the markets + + # place only buy orders, we will never leave opening auction + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC20 | 937000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC20 | 937000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC20 | 2 | 1 | buy | MID | 50 | 100 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party2 | ETH/DEC20 | buy | 1 | 950000 | 0 | TYPE_LIMIT | TIF_GTC | t2-b-1 | + | party1 | ETH/DEC20 | buy | 1 | 1000000 | 0 | TYPE_LIMIT | TIF_GFA | t1-b-1 | + | party3 | ETH/DEC20 | buy | 1 | 1000000 | 0 | TYPE_LIMIT | TIF_GFA | t3-b-1 | + Then the market data for the market "ETH/DEC20" should be: + | trading mode | supplied stake | + | TRADING_MODE_OPENING_AUCTION | 937000000 | + And the insurance pool balance should be "10000" for the market "ETH/DEC20" + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | ETH | ETH/DEC20 | 103545373 | 999896454627 | | + | party2 | ETH | ETH/DEC20 | 98368105 | 999901631895 | | + | party3 | ETH | ETH/DEC20 | 103545373 | 999896454627 | | + | lpprov | ETH | ETH/DEC20 | 0 | 999063000000 | 937000000 | + + # And then some more time, way past the min auction duration, but before the max duration + When the network moves ahead "50" blocks + # Ensure we're still in opening auction + Then the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC20" + And the insurance pool balance should be "10000" for the market "ETH/DEC20" + And the market state should be "STATE_PENDING" for the market "ETH/DEC20" + + # Now move ahead past to when the market is expected to expire + When the network moves ahead "51" blocks + # The market should be cancelled + Then the last market state should be "STATE_CANCELLED" for the market "ETH/DEC20" + # The market was cancelled, the insurance pool is released instantly + And the insurance pool balance should be "0" for the market "ETH/DEC20" + # The insurance pool balance is accounted for, though + And the global insurance pool balance should be "10000" for the asset "ETH" + # Account balances have been resotred, though + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | ETH | ETH/DEC20 | 0 | 1000000000000 | | + | party2 | ETH | ETH/DEC20 | 0 | 1000000000000 | | + | party3 | ETH | ETH/DEC20 | 0 | 1000000000000 | | + | lpprov | ETH | ETH/DEC20 | 0 | 1000000000000 | 0 | diff --git a/core/integration/features/auctions/3528-indefinite-auction-extension.feature b/core/integration/features/auctions/3528-indefinite-auction-extension.feature index 1973acb92d..4c16193bc4 100644 --- a/core/integration/features/auctions/3528-indefinite-auction-extension.feature +++ b/core/integration/features/auctions/3528-indefinite-auction-extension.feature @@ -40,9 +40,6 @@ Feature: Replicate issue 3528, where price monitoring continuously extended liqu Given the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | party0 | ETH/DEC21 | 700 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 700 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 700 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 700 | 0.001 | amendment | And the parties place the following pegged iceberg orders: | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | @@ -58,95 +55,52 @@ Feature: Replicate issue 3528, where price monitoring continuously extended liqu | party2 | ETH/DEC21 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | When the opening auction period ends for market "ETH/DEC21" - # In this case, the required time has expired, and the book is fine, so the trigger probably should be LIQUIDITY - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | extension trigger | - | TRADING_MODE_OPENING_AUCTION | AUCTION_TRIGGER_OPENING | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | - # liquidity auction should only have an end time at T+1s - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | extension trigger | horizon | min bound | max bound | target stake | supplied stake | open interest | auction end | - | 0 | TRADING_MODE_OPENING_AUCTION | AUCTION_TRIGGER_OPENING | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 100 | 990 | 1010 | 1000 | 700 | 0 | 2 | - And the parties submit the following liquidity provision: + Then the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | party0 | ETH/DEC21 | 800 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 800 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 800 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 800 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | When the network moves ahead "1" blocks - Then the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC21" + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC21" # liquidity auction is extended by 1 second this block (duration accrues) - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | extension trigger | horizon | min bound | max bound | target stake | supplied stake | open interest | auction end | - | 0 | TRADING_MODE_OPENING_AUCTION | AUCTION_TRIGGER_OPENING | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 100 | 990 | 1010 | 1000 | 800 | 0 | 3 | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | party0 | ETH/DEC21 | 801 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 801 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 801 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 801 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 10 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 20 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | extension trigger | - | TRADING_MODE_OPENING_AUCTION | AUCTION_TRIGGER_OPENING | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | - # we're still in the same block so auction end is start + 3 seconds now - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | extension trigger | horizon | min bound | max bound | target stake | supplied stake | open interest | auction end | - | 0 | TRADING_MODE_OPENING_AUCTION | AUCTION_TRIGGER_OPENING | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 100 | 990 | 1010 | 1010 | 801 | 0 | 3 | + | party1 | ETH/DEC21 | buy | 20 | 1020 | 1 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC21 | sell | 10 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | party0 | ETH/DEC21 | 10000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 10000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 10000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 10000 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | When the network moves ahead "1" blocks - # we've met the liquidity requirements so the opening auction uncrosses now + ## Price auction kicked off + Then the market data for the market "ETH/DEC21" should be: + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 1000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 2244 | 10000 | 12 | 300 | + ## End of price auction -> trade goes through and the mark price is updated + When the network moves ahead "301" blocks Then the market data for the market "ETH/DEC21" should be: | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | - | 1010 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 1010 | 10000 | 10 | 0 | + | 1020 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 2244 | 10000 | 22 | 0 | + Scenario: Enter liquidity auction, extended by trades at liq. auction end, multiple trades -> still a single extension Given the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | party0 | ETH/DEC21 | 700 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 700 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 700 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 700 | 0.001 | amendment | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | -2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | -1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | + | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | + | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | + | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | party1 | ETH/DEC21 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | @@ -155,88 +109,38 @@ Feature: Replicate issue 3528, where price monitoring continuously extended liqu | party2 | ETH/DEC21 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | When the opening auction period ends for market "ETH/DEC21" - # In this case, the required time has expired, and the book is fine, so the trigger probably should be LIQUIDITY - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | extension trigger | - | TRADING_MODE_OPENING_AUCTION | AUCTION_TRIGGER_OPENING | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | - # opening auction (extended by liquidity auction() should have an end time at T+2s - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | extension trigger | horizon | min bound | max bound | target stake | supplied stake | open interest | auction end | - | 0 | TRADING_MODE_OPENING_AUCTION | AUCTION_TRIGGER_OPENING | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 100 | 990 | 1010 | 1000 | 700 | 0 | 2 | - And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | party0 | ETH/DEC21 | 800 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 800 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 800 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 800 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | When the network moves ahead "1" blocks - Then the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC21" - # liquidity auction is extended by 1 second this block - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | extension trigger | horizon | min bound | max bound | target stake | supplied stake | open interest | auction end | - | 0 | TRADING_MODE_OPENING_AUCTION | AUCTION_TRIGGER_OPENING | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 100 | 990 | 1010 | 1000 | 800 | 0 | 3 | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | party0 | ETH/DEC21 | 801 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 801 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 801 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 801 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 10 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/DEC21 | buy | 10 | 1020 | 1 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/DEC21 | sell | 20 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - # Still in the same block, so auction end is start + 3 seconds now - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | extension trigger | horizon | min bound | max bound | target stake | supplied stake | open interest | auction end | - | 0 | TRADING_MODE_OPENING_AUCTION | AUCTION_TRIGGER_OPENING | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 100 | 990 | 1010 | 1010 | 801 | 0 | 3 | - And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | party0 | ETH/DEC21 | 1010 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 1010 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 1010 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 1010 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 9 | 1 | buy | BID | 10 | 2 | - | party0 | ETH/DEC21 | 9 | 1 | buy | MID | 20 | 1 | - | party0 | ETH/DEC21 | 9 | 1 | sell | ASK | 10 | 2 | - | party0 | ETH/DEC21 | 9 | 1 | sell | MID | 20 | 1 | When the network moves ahead "1" blocks # liquidity requirements met -> opening auction finishes (price monitoring extension not possible in opening auction) Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | min bound | max bound | - | 1010 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 1010 | 1010 | 10 | 0 | 1001 | 1019 | + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | min bound | max bound | + | 1000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 2040 | 1010 | 12 | 300 | 1001 | 1019 | When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | party1 | ETH/DEC21 | buy | 10 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 10 | 1010 | 3 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC21 | sell | 10 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | And the network moves ahead "1" blocks - # open interest changes from 10 to 20, because the trade _does_ happen - Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | extension trigger | target stake | supplied stake | open interest | auction end | min bound | max bound | - | 1010 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | AUCTION_TRIGGER_UNSPECIFIED | 2020 | 1010 | 20 | 1 | 1001 | 1019 | # Place order outwith price monitoring bounds And the parties place the following orders: @@ -248,45 +152,19 @@ Feature: Replicate issue 3528, where price monitoring continuously extended liqu | party4 | ETH/DEC21 | sell | 6 | 1040 | 0 | TYPE_LIMIT | TIF_GTC | | party6 | ETH/DEC21 | sell | 4 | 1040 | 0 | TYPE_LIMIT | TIF_GTC | - When the network moves ahead "2" blocks - - # trade at 1010 changes the target stake, too - Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | extension trigger | target stake | supplied stake | open interest | auction end | min bound | max bound | - | 1010 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 3090 | 1010 | 20 | 2 | 1001 | 1019 | - When the network moves ahead "10" blocks And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | party0 | ETH/DEC21 | 10000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 10000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 10000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 10000 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - # we've met the liquidity requirements, but the auction uncrosses out of bounds - # Auction end is now 12s (2+10 blocks) + 300 price extension - When the network moves ahead "1" blocks - Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | extension trigger | target stake | supplied stake | open interest | auction end | - | 1010 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | AUCTION_TRIGGER_PRICE | 3090 | 10000 | 20 | 312 | - When the network moves ahead "150" blocks - - Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | extension trigger | target stake | supplied stake | open interest | auction end | - | 1010 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | AUCTION_TRIGGER_PRICE | 3090 | 10000 | 20 | 312 | + # Auction end is now 290 blocks away - Then the network moves ahead "150" blocks + When the network moves ahead "290" blocks # price auction ends as expected event though uncrossing price is outwith the previous bounds (price extension can be called at most once per trigger) # Now the open interest is 30 (previously was 20) -> because the initial trade at 1010 went through. The target stake is increased because of the time + leaving auction # The price bounds have also changed from 1016-1034, and the mark price is now 1030 (the 1010 orders are gone, so the uncrossing price is different) Then the market data for the market "ETH/DEC21" should be: | mark price | trading mode | auction trigger | extension trigger | horizon | min bound | max bound | target stake | supplied stake | open interest | auction end | - | 1030 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | AUCTION_TRIGGER_UNSPECIFIED | 100 | 1020 | 1040 | 3090 | 10000 | 30 | 0 | + | 1020 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | AUCTION_TRIGGER_UNSPECIFIED | 100 | 1010 | 1030 | 3060 | 10000 | 30 | 0 | diff --git a/core/integration/features/auctions/enter-leave-liquidity-auction.feature b/core/integration/features/auctions/enter-leave-liquidity-auction.feature index cfab092ba0..c8342ee2e8 100644 --- a/core/integration/features/auctions/enter-leave-liquidity-auction.feature +++ b/core/integration/features/auctions/enter-leave-liquidity-auction.feature @@ -145,7 +145,6 @@ Feature: Ensure we can enter and leave liquidity auction Then the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | party1 | ETH/DEC19 | 1 | 0.1 | submission | - | lp1 | party1 | ETH/DEC19 | 1 | 0.1 | submission | And the parties place the following pegged iceberg orders: | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | | party1 | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 10 | @@ -158,23 +157,18 @@ Feature: Ensure we can enter and leave liquidity auction | aux2 | ETH/DEC19 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | oa-b-2 | | auxiliary | ETH/DEC19 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | oa-s-2 | Then the opening auction period ends for market "ETH/DEC19" - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" - And the market data for the market "ETH/DEC19" should be: - | trading mode | extension trigger | supplied stake | target stake | - | TRADING_MODE_OPENING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 1 | 11 | # Amend LP, set the commitment amount to be enough to leave opening auction When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | party1 | ETH/DEC19 | 30000 | 0.1 | amendment | - | lp1 | party1 | ETH/DEC19 | 30000 | 0.1 | amendment | And the parties place the following pegged iceberg orders: | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | | party1 | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 10 | | party1 | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 10 | Then the market data for the market "ETH/DEC19" should be: - | trading mode | supplied stake | target stake | - | TRADING_MODE_OPENING_AUCTION | 30000 | 11 | + | trading mode | supplied stake | target stake | + | TRADING_MODE_CONTINUOUS | 30000 | 11 | # after updating the LP, we now can leave opening auction When the network moves ahead "3" blocks @@ -201,7 +195,6 @@ Feature: Ensure we can enter and leave liquidity auction When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | reference | lp type | | lp1 | party1 | ETH/DEC19 | 3000 | 0.1 | lp1 | amendment | - | lp1 | party1 | ETH/DEC19 | 3000 | 0.1 | lp1 | amendment | And the parties place the following pegged iceberg orders: | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | | party1 | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 10 | diff --git a/core/integration/features/auctions/opening-auction-expiry.feature b/core/integration/features/auctions/opening-auction-expiry.feature index a2eadf87a6..cb7f953abd 100644 --- a/core/integration/features/auctions/opening-auction-expiry.feature +++ b/core/integration/features/auctions/opening-auction-expiry.feature @@ -10,11 +10,12 @@ Feature: Set up a market, create indiciative price different to actual opening a And the following network parameters are set: | name | value | | market.auction.minimumDuration | 5 | - | market.auction.maximumDuration | 10 | + | market.auction.maximumDuration | 10s | | network.floatingPointUpdates.delay | 10s | | network.markPriceUpdateMaximumFrequency | 0s | | limits.markets.maxPeggedOrders | 2 | + @DebugAuctionMax @Expires Scenario: Simple test verifying the market is cancelled if it failes to leave opening auction # setup accounts Given the parties deposit on asset's general account the following amount: @@ -29,7 +30,7 @@ Feature: Set up a market, create indiciative price different to actual opening a | lpprov | BTC | 100000000 | # Start market with some dead time - When the network moves ahead "2" blocks + And the network moves ahead "5" blocks Then the market data for the market "ETH/DEC19" should be: | trading mode | | TRADING_MODE_OPENING_AUCTION | @@ -43,11 +44,13 @@ Feature: Set up a market, create indiciative price different to actual opening a | TRADING_MODE_OPENING_AUCTION | And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | - | party5 | ETH/DEC19 | sell | 1 | 10 | 0 | TYPE_LIMIT | TIF_GFA | t5-s-1 | + | party5 | ETH/DEC19 | buy | 1 | 10 | 0 | TYPE_LIMIT | TIF_GFA | t5-s-1 | # place orders to set the actual price point at which we'll uncross to be 10000 When the network moves ahead "1" blocks Then the market data for the market "ETH/DEC19" should be: | trading mode | | TRADING_MODE_OPENING_AUCTION | When the network moves ahead "10" blocks + + # Now the market should be cancelled Then the last market state should be "STATE_CANCELLED" for the market "ETH/DEC19" diff --git a/core/integration/features/closeouts/0012-POSR-009.feature b/core/integration/features/closeouts/0012-POSR-009.feature new file mode 100644 index 0000000000..72cf1b3ce6 --- /dev/null +++ b/core/integration/features/closeouts/0012-POSR-009.feature @@ -0,0 +1,61 @@ +Feature: When a party is distressed and gets closed out the network's position gets modified to reflect that it's now the network party that holds that volume. (0012-POSR-009) + + Background: + Given the liquidation strategies: + | name | disposal step | disposal fraction | full disposal size | max fraction consumed | + | disposal-strat | 10 | 1.0 | 1000 | 1.0 | + + Given the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | liquidation strategy | + | ETH/DEC19 | BTC | BTC | default-simple-risk-model-2 | default-overkill-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e3 | 1e3 | default-futures | disposal-strat | + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | network.markPriceUpdateMaximumFrequency | 0s | + + @NoPerp + Scenario: Implement trade and order network + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | sellSideProvider | BTC | 1000000000000 | + | buySideProvider | BTC | 1000000000000 | + | designatedLoser | BTC | 12000 | + | aux | BTC | 1000000000000 | + | aux2 | BTC | 1000000000000 | + + # insurance pool generation - setup orderbook + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/DEC19 | sell | 290 | 150 | 0 | TYPE_LIMIT | TIF_GTC | sell-provider-1 | + | buySideProvider | ETH/DEC19 | buy | 1 | 140 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-1 | + | aux | ETH/DEC19 | sell | 100 | 159 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-1 | + | aux | ETH/DEC19 | sell | 1 | 149 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-2 | + | aux2 | ETH/DEC19 | buy | 1 | 149 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-1 | + | aux2 | ETH/DEC19 | buy | 100 | 140 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-2 | + Then the opening auction period ends for market "ETH/DEC19" + When the network moves ahead "1" blocks + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + Then the parties should have the following account balances: + | party | asset | market id | general | + | designatedLoser | BTC | ETH/DEC19 | 12000 | + + # insurance pool generation - trade + When the parties place the following orders "1" blocks apart: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | designatedLoser | ETH/DEC19 | buy | 105 | 150 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + # The designatedLoser will be closed out and have all their funds moved to the insurance pool + Then the parties should have the following account balances: + | party | asset | market id | general | margin | + | designatedLoser | BTC | ETH/DEC19 | 0 | 0 | + + And the global insurance pool balance should be "0" for the asset "BTC" + And the insurance pool balance should be "12000" for the market "ETH/DEC19" + + # check the network trades happened and the network party holds the volume + Then the following network trades should be executed: + | party | aggressor side | volume | + | designatedLoser | buy | 105 | diff --git a/core/integration/features/closeouts/0012-POSR-010.feature b/core/integration/features/closeouts/0012-POSR-010.feature new file mode 100644 index 0000000000..945d97b1b9 --- /dev/null +++ b/core/integration/features/closeouts/0012-POSR-010.feature @@ -0,0 +1,121 @@ +Feature: When the network party holds a non-zero position and there are not enough funds in market's insurance pool + to meet the mark-to-market payment the network's position is unaffected and loss socialisation is applied. (0012-POSR-010) + + Background: + Given the liquidation strategies: + | name | disposal step | disposal fraction | full disposal size | max fraction consumed | + | disposal-strat | 1000 | 1.0 | 1000 | 1.0 | + + Given the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | liquidation strategy | + | ETH/DEC19 | BTC | BTC | default-simple-risk-model-2 | default-overkill-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e3 | 1e3 | default-futures | disposal-strat | + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | network.markPriceUpdateMaximumFrequency | 0s | + + @NoPerp + Scenario: Implement trade and order network. Covers both 0012-POSR-012 and 0012-POSR-011 + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | sellSideProvider | BTC | 1000000000000 | + | buySideProvider | BTC | 1000000000000 | + | designatedLoser | BTC | 120 | + | aux | BTC | 1000000000000 | + | aux2 | BTC | 1000000000000 | + + # insurance pool generation - setup orderbook + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/DEC19 | sell | 290 | 150 | 0 | TYPE_LIMIT | TIF_GTC | sell-provider-1 | + | buySideProvider | ETH/DEC19 | buy | 1 | 140 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-1 | + | aux | ETH/DEC19 | sell | 100 | 159 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-1 | + | aux | ETH/DEC19 | sell | 1 | 149 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-2 | + | aux2 | ETH/DEC19 | buy | 1 | 149 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-1 | + | aux2 | ETH/DEC19 | buy | 100 | 140 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-2 | + Then the opening auction period ends for market "ETH/DEC19" + When the network moves ahead "1" blocks + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + And the mark price should be "149" for the market "ETH/DEC19" + + Then the parties should have the following account balances: + | party | asset | market id | general | + | designatedLoser | BTC | ETH/DEC19 | 120 | + + # insurance pool generation - trade + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | designatedLoser | ETH/DEC19 | buy | 250 | 150 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + When the network moves ahead "1" blocks + + And the mark price should be "150" for the market "ETH/DEC19" + + # The designatedLoser will be closed out and have all their funds moved to the insurance pool + Then the parties should have the following account balances: + | party | asset | market id | general | margin | + | designatedLoser | BTC | ETH/DEC19 | 0 | 0 | + | aux | BTC | ETH/DEC19 | 999999999999 | 0 | + | aux2 | BTC | ETH/DEC19 | 999999999964 | 37 | + | sellSideProvider | BTC | ETH/DEC19 | 962350000000 | 37650000000 | + | buySideProvider | BTC | ETH/DEC19 | 1000000000000 | 0 | + + And the insurance pool balance should be "120" for the market "ETH/DEC19" + + # check the network trades happened and the network party holds the volume + Then the following network trades should be executed: + | party | aggressor side | volume | + | designatedLoser | buy | 250 | + + Then the parties should have the following account balances: + | party | asset | market id | general | margin | + | aux | BTC | ETH/DEC19 | 999999999999 | 0 | + | aux2 | BTC | ETH/DEC19 | 999999999964 | 37 | + | sellSideProvider | BTC | ETH/DEC19 | 962350000000 | 37650000000 | + | buySideProvider | BTC | ETH/DEC19 | 1000000000000 | 0 | + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux2 | 1 | 1 | 0 | + | aux | -1 | -1 | 0 | + | sellSideProvider | -250 | 0 | 0 | + | designatedLoser | 0 | 0 | -120 | + | network | 250 | 0 | 0 | + + # Move the mark price to make our network trader lose money + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 145 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | sell | 1 | 145 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + + And the mark price should be "145" for the market "ETH/DEC19" + + # The insurance pool will be depleted due to the price move + And the insurance pool balance should be "0" for the market "ETH/DEC19" + + # Check that funds have not been fully paid (lose socialisation has taken place) + # aux is short and should gain 6 but only gets 1 (will lose 5), + # sellSideProvider is short and should gain 1250 but only gets 124 (will lose 1126) + # Total distributed is 125 when it should have been 1255 + Then the parties should have the following account balances: + | party | asset | market id | general | margin | + | aux | BTC | ETH/DEC19 | 1000000000000 | 0 | + | aux2 | BTC | ETH/DEC19 | 999999999996 | 0 | + | sellSideProvider | BTC | ETH/DEC19 | 962350000000 | 37650000124 | + | buySideProvider | BTC | ETH/DEC19 | 1000000000000 | 0 | + # This part explicitly covers 0012-POSR-011: + # The insurance pool balance is zero, so the network does not meet the required margin balance + # Despite this, it can maintain its position, and loss socialisation kicks in during the MTM settlement. + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux2 | 0 | 0 | -4 | + | aux | 0 | 0 | 0 | + | sellSideProvider | -250 | 1250 | -1126 | + | designatedLoser | 0 | 0 | -120 | + | network | 250 | -1250 | 0 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | network | ETH/DEC19 | 9098750000 | 29116000000 | 36395000000 | 45493750000 | + And the insurance pool balance should be "0" for the market "ETH/DEC19" diff --git a/core/integration/features/closeouts/1847-closeout-long-with-fees.feature b/core/integration/features/closeouts/1847-closeout-long-with-fees.feature index 99e8ab9ad1..4e1584c2dd 100644 --- a/core/integration/features/closeouts/1847-closeout-long-with-fees.feature +++ b/core/integration/features/closeouts/1847-closeout-long-with-fees.feature @@ -14,6 +14,7 @@ Feature: Long close-out test (see ln 293 of system-tests/grpc/trading/tradesTest | network.markPriceUpdateMaximumFrequency | 0s | | limits.markets.maxPeggedOrders | 2 | + @Liquidation @NoPerp Scenario: https://drive.google.com/file/d/1bYWbNJvG7E-tcqsK26JMu2uGwaqXqm0L/view # setup accounts Given the parties deposit on asset's general account the following amount: @@ -60,10 +61,17 @@ Feature: Long close-out test (see ln 293 of system-tests/grpc/trading/tradesTest And the mark price should be "100" for the market "ETH/DEC19" + # Ensure the network position is closed out + When the network moves ahead "2" blocks # checking margins Then the parties should have the following account balances: | party | asset | market id | margin | general | | tt_5 | BTC | ETH/DEC19 | 0 | 0 | + And debug trades + And the following trades should be executed: + | buyer | price | size | seller | + | network | 100 | 4 | tt_5 | + | tt_10 | 100 | 4 | network | # then we make sure the insurance pool collected the funds And the insurance pool balance should be "0" for the market "ETH/DEC19" diff --git a/core/integration/features/closeouts/1847-closeout-long.feature b/core/integration/features/closeouts/1847-closeout-long.feature index beaf7c9eec..a1e736ac37 100644 --- a/core/integration/features/closeouts/1847-closeout-long.feature +++ b/core/integration/features/closeouts/1847-closeout-long.feature @@ -10,6 +10,7 @@ Feature: Long close-out test (see ln 293 of system-tests/grpc/trading/tradesTest | network.markPriceUpdateMaximumFrequency | 0s | | limits.markets.maxPeggedOrders | 2 | + @NoPerp Scenario: https://drive.google.com/file/d/1bYWbNJvG7E-tcqsK26JMu2uGwaqXqm0L/view # setup accounts Given the parties deposit on asset's general account the following amount: @@ -53,6 +54,7 @@ Feature: Long close-out test (see ln 293 of system-tests/grpc/trading/tradesTest | tt_6 | ETH/DEC19 | sell | 2 | 150 | 1 | TYPE_LIMIT | TIF_GTC | tt_6-2 | | | tt_10 | ETH/DEC19 | buy | 25 | 100 | 0 | TYPE_LIMIT | TIF_GTC | tt_10-2 | | | tt_11 | ETH/DEC19 | sell | 25 | 0 | 3 | TYPE_MARKET | TIF_FOK | tt_11-2 | | + And the network moves ahead "1" blocks And the mark price should be "100" for the market "ETH/DEC19" diff --git a/core/integration/features/closeouts/1847-closeout-short-with-fees.feature b/core/integration/features/closeouts/1847-closeout-short-with-fees.feature index 7b6b5f9615..00b5a7e7bf 100644 --- a/core/integration/features/closeouts/1847-closeout-short-with-fees.feature +++ b/core/integration/features/closeouts/1847-closeout-short-with-fees.feature @@ -14,6 +14,7 @@ Feature: Short close-out test (see ln 449 of system-tests/grpc/trading/tradesTes | network.markPriceUpdateMaximumFrequency | 0s | | limits.markets.maxPeggedOrders | 2 | + @Liquidation @NoPerp Scenario: https://drive.google.com/file/d/1bYWbNJvG7E-tcqsK26JMu2uGwaqXqm0L/view # setup accounts Given the parties deposit on asset's general account the following amount: @@ -60,6 +61,7 @@ Feature: Short close-out test (see ln 449 of system-tests/grpc/trading/tradesTes And the mark price should be "20" for the market "ETH/DEC19" + When the network moves ahead "3" blocks # checking margins Then the parties should have the following account balances: | party | asset | market id | margin | general | diff --git a/core/integration/features/closeouts/1847-closeout-short.feature b/core/integration/features/closeouts/1847-closeout-short.feature index 028f7ce7a7..d96adab30b 100644 --- a/core/integration/features/closeouts/1847-closeout-short.feature +++ b/core/integration/features/closeouts/1847-closeout-short.feature @@ -11,6 +11,7 @@ Feature: Short close-out test (see ln 449 of system-tests/grpc/trading/tradesTes | network.markPriceUpdateMaximumFrequency | 0s | | limits.markets.maxPeggedOrders | 2 | + @NoPerp Scenario: https://drive.google.com/file/d/1bYWbNJvG7E-tcqsK26JMu2uGwaqXqm0L/view # setup accounts Given the parties deposit on asset's general account the following amount: @@ -53,6 +54,7 @@ Feature: Short close-out test (see ln 449 of system-tests/grpc/trading/tradesTes | tt_16 | ETH/DEC19 | buy | 2 | 20 | 1 | TYPE_LIMIT | TIF_GTC | tt_16-1 | | | tt_15 | ETH/DEC19 | sell | 2 | 20 | 0 | TYPE_LIMIT | TIF_GTC | tt_15-2 | | | tt_16 | ETH/DEC19 | buy | 2 | 20 | 1 | TYPE_LIMIT | TIF_GTC | tt_16-2 | | + And the network moves ahead "1" blocks And the mark price should be "20" for the market "ETH/DEC19" diff --git a/core/integration/features/closeouts/630-position-resolution-negative-insurance-pool.feature b/core/integration/features/closeouts/630-position-resolution-negative-insurance-pool.feature index 43f57ddb95..1516617153 100644 --- a/core/integration/features/closeouts/630-position-resolution-negative-insurance-pool.feature +++ b/core/integration/features/closeouts/630-position-resolution-negative-insurance-pool.feature @@ -10,17 +10,19 @@ Feature: Regression test for issue 630 | network.markPriceUpdateMaximumFrequency | 0s | | limits.markets.maxPeggedOrders | 2 | + @Liquidation @NoPerp Scenario: Trader is being closed out. # setup accounts Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | sellSideProvider | BTC | 1000000 | - | buySideProvider | BTC | 1000000 | - | partyGuy | BTC | 240000 | - | party1 | BTC | 1000000 | - | party2 | BTC | 1000000 | - | aux | BTC | 100000 | - | lpprov | BTC | 1000000 | + | party | asset | amount | + | sellSideProvider | BTC | 1000000 | + | buySideProvider | BTC | 11000000 | + | partyGuy | BTC | 240000 | + | party1 | BTC | 1000000 | + | party2 | BTC | 1000000 | + | aux | BTC | 100000 | + | lpprov | BTC | 1000000 | + | closeout | BTC | 1000000 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction Then the parties place the following orders: @@ -49,7 +51,7 @@ Feature: Regression test for issue 630 | party | market id | side | volume | price | resulting trades | type | tif | reference | | sellSideProvider | ETH/DEC19 | sell | 200 | 10000 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | | buySideProvider | ETH/DEC19 | buy | 200 | 1 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | - And the cumulated balance for all accounts should be worth "5340000" + And the cumulated balance for all accounts should be worth "16340000" Then the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | | sellSideProvider | ETH/DEC19 | 2000 | 2200 | 2400 | 2800 | @@ -60,5 +62,15 @@ Feature: Regression test for issue 630 | party | asset | market id | margin | general | | partyGuy | BTC | ETH/DEC19 | 0 | 0 | | sellSideProvider | BTC | ETH/DEC19 | 240000 | 760000 | - And the insurance pool balance should be "0" for the market "ETH/DEC19" - And the cumulated balance for all accounts should be worth "5340000" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | closeout | ETH/DEC19 | buy | 100 | 105 | 0 | TYPE_LIMIT | TIF_GTC | + And the network moves ahead "1" blocks + Then the insurance pool balance should be "0" for the market "ETH/DEC19" + And debug trades + And the following trades should be executed: + | buyer | price | size | seller | + | network | 10000 | 100 | partyGuy | + | buySideProvider | 1 | 99 | network | + | aux | 1 | 1 | network | + And the cumulated balance for all accounts should be worth "16340000" diff --git a/core/integration/features/closeouts/closeout-long-with-custom-strategy.feature b/core/integration/features/closeouts/closeout-long-with-custom-strategy.feature new file mode 100644 index 0000000000..cb3d292b63 --- /dev/null +++ b/core/integration/features/closeouts/closeout-long-with-custom-strategy.feature @@ -0,0 +1,107 @@ +Feature: Same as 1847-closeout-long test, but with a custom liquidation strategy in place + + Background: + # disposal strategy every 5 seconds, 20% until 10 or less, max 10% of the book used + Given the liquidation strategies: + | name | disposal step | disposal fraction | full disposal size | max fraction consumed | + | disposal-strat-1 | 5 | 0.2 | 10 | 0.1 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | liquidation strategy | + | ETH/DEC19 | BTC | BTC | default-simple-risk-model-4 | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e6 | 1e6 | default-futures | disposal-strat-1 | + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 2 | + + @NoPerp @DisposalStrat + Scenario: https://drive.google.com/file/d/1bYWbNJvG7E-tcqsK26JMu2uGwaqXqm0L/view + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | tt_4 | BTC | 500000 | + | tt_5 | BTC | 100 | + | tt_6 | BTC | 100000000 | + | tt_10 | BTC | 10000000 | + | tt_11 | BTC | 10000000 | + | tt_aux | BTC | 100000000 | + | t2_aux | BTC | 100000000 | + | lpprov | BTC | 100000000 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + Then the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | tt_aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-1 | + | tt_aux | ETH/DEC19 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-1 | + | t2_aux | ETH/DEC19 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-2 | + | tt_aux | ETH/DEC19 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-2 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | MID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | MID | 50 | 100 | + Then the opening auction period ends for market "ETH/DEC19" + + # place orders and generate trades, do not progress time + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | expires in | + | tt_10 | ETH/DEC19 | buy | 5 | 100 | 0 | TYPE_LIMIT | TIF_GTT | tt_10-1 | 3600 | + | tt_11 | ETH/DEC19 | sell | 5 | 100 | 1 | TYPE_LIMIT | TIF_GTT | tt_11-1 | 3600 | + | tt_4 | ETH/DEC19 | buy | 2 | 150 | 0 | TYPE_LIMIT | TIF_GTC | tt_4-1 | | + | tt_4 | ETH/DEC19 | buy | 2 | 150 | 0 | TYPE_LIMIT | TIF_GTC | tt_4-2 | | + | tt_5 | ETH/DEC19 | buy | 2 | 150 | 0 | TYPE_LIMIT | TIF_GTC | tt_5-1 | | + | tt_6 | ETH/DEC19 | sell | 2 | 150 | 1 | TYPE_LIMIT | TIF_GTC | tt_6-1 | | + | tt_5 | ETH/DEC19 | buy | 2 | 150 | 0 | TYPE_LIMIT | TIF_GTC | tt_5-2 | | + | tt_6 | ETH/DEC19 | sell | 2 | 150 | 1 | TYPE_LIMIT | TIF_GTC | tt_6-2 | | + | tt_10 | ETH/DEC19 | buy | 25 | 100 | 0 | TYPE_LIMIT | TIF_GTC | tt_10-2 | | + | tt_11 | ETH/DEC19 | sell | 25 | 0 | 3 | TYPE_MARKET | TIF_FOK | tt_11-2 | | + + And the mark price should be "100" for the market "ETH/DEC19" + + # checking margins + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | tt_5 | BTC | ETH/DEC19 | 0 | 0 | + + # then we make sure the insurance pool collected the funds + And the insurance pool balance should be "0" for the market "ETH/DEC19" + + #check positions + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | tt_4 | 4 | -200 | 0 | + | tt_5 | 0 | 0 | -100 | + | tt_6 | -4 | 200 | -27 | + | tt_10 | 26 | 0 | 0 | + | tt_11 | -30 | 200 | -65 | + + # some time passes, position network still hasn't been closed/disposed of + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | tt_4 | 4 | -200 | 0 | + | tt_5 | 0 | 0 | -100 | + | tt_6 | -4 | 200 | -27 | + | tt_10 | 26 | 0 | 0 | + | tt_11 | -30 | 200 | -65 | + # clear trade events to ensure that we are not picking up a closeout trade that happened before the disposal step expires + And clear trade events + + + # some time passes, now the network disposes of its position + When the network moves ahead "4" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | tt_4 | 4 | -200 | 0 | + | tt_5 | 0 | 0 | -100 | + | tt_6 | -4 | 200 | -27 | + | tt_10 | 26 | 0 | 0 | + | tt_11 | -30 | 200 | -65 | + And debug trades + And the following network trades should be executed: + | party | aggressor side | volume | + | tt_10 | sell | 4 | + diff --git a/core/integration/features/closeouts/distressed-safe-event.feature b/core/integration/features/closeouts/distressed-safe-event.feature index dd48546922..e0a1a79b33 100644 --- a/core/integration/features/closeouts/distressed-safe-event.feature +++ b/core/integration/features/closeouts/distressed-safe-event.feature @@ -10,7 +10,7 @@ Feature: Ensure distressed status events are correctly emitted, both for safe an | market.auction.minimumDuration | 1 | | network.markPriceUpdateMaximumFrequency | 0s | - @CloseOut + @CloseOut @Liquidation @NoPerp Scenario: Implement trade and order network # setup accounts Given the parties deposit on asset's general account the following amount: @@ -38,18 +38,12 @@ Feature: Ensure distressed status events are correctly emitted, both for safe an | party | market id | side | volume | price | resulting trades | type | tif | reference | | designatedLoser | ETH/DEC19 | buy | 290 | 150 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And debug trades - # insurance pool generation - modify order book - When the parties cancel the following orders: - | party | reference | - | buySideProvider | buy-provider-1 | # buy side provider provides insufficient volume on the book to zero out the network And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | | buySideProvider | ETH/DEC19 | buy | 4 | 40 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | - And the parties cancel the following orders: - | party | reference | - | aux2 | aux-b-2 | Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" # insurance pool generation - set new mark price (and trigger closeout) @@ -62,5 +56,5 @@ Feature: Ensure distressed status events are correctly emitted, both for safe an # however, their position status is flagged as being distressed And the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | status | - | designatedLoser | 290 | -8700 | 0 | POSITION_STATUS_DISTRESSED | + | designatedLoser | 0 | 0 | -12000 | POSITION_STATUS_CLOSED_OUT | diff --git a/core/integration/features/closeouts/network-order-and-trades-sub.feature b/core/integration/features/closeouts/network-order-and-trades-sub.feature index 62c2f134c3..a295a64dcb 100644 --- a/core/integration/features/closeouts/network-order-and-trades-sub.feature +++ b/core/integration/features/closeouts/network-order-and-trades-sub.feature @@ -10,6 +10,7 @@ Feature: Ensure network party are generated | market.auction.minimumDuration | 1 | | network.markPriceUpdateMaximumFrequency | 0s | + @NoPerp Scenario: Implement trade and order network # setup accounts Given the parties deposit on asset's general account the following amount: @@ -36,29 +37,25 @@ Feature: Ensure network party are generated When the parties place the following orders "1" blocks apart: | party | market id | side | volume | price | resulting trades | type | tif | reference | | designatedLoser | ETH/DEC19 | buy | 290 | 150 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | - And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" - # insurance pool generation - modify order book - Then the parties cancel the following orders: - | party | reference | - | buySideProvider | buy-provider-1 | When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | | buySideProvider | ETH/DEC19 | buy | 400 | 40 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | - And the parties cancel the following orders: - | party | reference | - | aux2 | aux-b-2 | - And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" # insurance pool generation - set new mark price (and trigger closeout) When the parties place the following orders "1" blocks apart: | party | market id | side | volume | price | resulting trades | type | tif | reference | | sellSideProvider | ETH/DEC19 | sell | 1 | 120 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | | buySideProvider | ETH/DEC19 | buy | 1 | 120 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | - And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" - # check the network trade happened + And debug trades + # check the network trades happened Then the following network trades should be executed: - | party | aggressor side | volume | - | designatedLoser | buy | 290 | - | buySideProvider | sell | 290 | + | party | aggressor side | volume | + | designatedLoser | buy | 290 | + | buySideProvider | sell | 1 | + | aux2 | sell | 100 | + | buySideProvider | sell | 189 | diff --git a/core/integration/features/closeouts/position-resolution-after-auction.feature b/core/integration/features/closeouts/position-resolution-after-auction.feature index 952cf9d9b4..817dcc4fed 100644 --- a/core/integration/features/closeouts/position-resolution-after-auction.feature +++ b/core/integration/features/closeouts/position-resolution-after-auction.feature @@ -16,6 +16,7 @@ Feature: Set up a market with an opening auction, then uncross the book so that | name | value | | limits.markets.maxPeggedOrders | 2 | + @Liquidation @NoPerp Scenario: When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | @@ -42,28 +43,29 @@ Feature: Set up a market with an opening auction, then uncross the book so that | party | asset | market id | margin | general | | party1 | BTC | ETH/DEC19 | 13440 | 6560 | When the opening auction period ends for market "ETH/DEC19" - And the market data for the market "ETH/DEC19" should be: - | mark price | trading mode | auction trigger | extension trigger | target stake | supplied stake | open interest | - | 10000 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED| AUCTION_TRIGGER_UNSPECIFIED | 160000 | 160000 | 8 | + Then the market data for the market "ETH/DEC19" should be: + | mark price | trading mode | auction trigger | extension trigger | target stake | supplied stake | open interest | + | 10000 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | AUCTION_TRIGGER_UNSPECIFIED | 80000 | 160000 | 8 | + When the network moves ahead "1" blocks + And debug trades And the following trades should be executed: | buyer | price | size | seller | | party1 | 10000 | 3 | party2a | | party1 | 10000 | 2 | party2a | | party1 | 10000 | 3 | party2c | + | network | 10000 | 8 | party1 | | lp | 5900 | 8 | network | - | network | 5900 | 8 | party1 | Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | - | party2a | -5 | 0 | 0 | - | party2c | -3 | 0 | 0 | - | party1 | 0 | 0 | -20000 | - | lp | 8 | 32800 | -13272 | + | party2a | -5 | 0 | 0 | + | party2c | -3 | 0 | 0 | + | party1 | 0 | 0 | -20000 | And the accumulated liquidity fees should be "472" for the market "ETH/DEC19" - And the insurance pool balance should be "0" for the market "ETH/DEC19" + And the insurance pool balance should be "19528" for the market "ETH/DEC19" And the parties should have the following account balances: - | party | asset | market id | margin | general | bond | - | party1 | BTC | ETH/DEC19 | 0 | 0 | | - | lp | BTC | ETH/DEC19 | 82560 | 99776968 | 160000 | + | party | asset | market id | margin | general | bond | + | party1 | BTC | ETH/DEC19 | 0 | 0 | | + | lp | BTC | ETH/DEC19 | 43200 | 99796800 | 160000 | # sum of lp accounts = 100019528 # lp started with 100000000, should've made 8*(10000-5900)=32800 in MTM gains following the closeout, # but party1 only had 20000, of which 472 has been put towards liquidity fees, diff --git a/core/integration/features/fees/0042-LIQF-fees_settings.feature b/core/integration/features/fees/0042-LIQF-fees_settings.feature new file mode 100644 index 0000000000..fa5288d034 --- /dev/null +++ b/core/integration/features/fees/0042-LIQF-fees_settings.feature @@ -0,0 +1,106 @@ +Feature: Test liquidity fee settings, using 3 different methods + + Background: + + Given the simple risk model named "simple-risk-model-1": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 500 | 500 | 0.1 | + And the fees configuration named "fees-config-1": + | maker fee | infrastructure fee | liquidity fee method | liquidity fee constant | + | 0.0004 | 0.001 | METHOD_CONSTANT | 0.08 | + And the fees configuration named "fees-config-2": + | maker fee | infrastructure fee | liquidity fee method | liquidity fee constant | + | 0.0004 | 0.001 | METHOD_CONSTANT | 0.01 | + And the fees configuration named "fees-config-3": + | maker fee | infrastructure fee | liquidity fee method | liquidity fee constant | + | 0.0004 | 0.001 | METHOD_WEIGHTED_AVERAGE | 0.01 | + And the fees configuration named "fees-config-4": + | maker fee | infrastructure fee | liquidity fee method | liquidity fee constant | + | 0.0004 | 0.001 | METHOD_MARGINAL_COST | 0.01 | + + And the price monitoring named "price-monitoring": + | horizon | probability | auction extension | + | 3600 | 0.99 | 3 | + Given the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.0 | 24h | 1.0 | + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 1.0 | 0.5 | 1 | 1.0 | + And the following network parameters are set: + | name | value | + | market.value.windowLength | 1h | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 12 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/MAR22 | USD | USD | lqm-params | simple-risk-model-1 | default-margin-calculator | 2 | fees-config-1 | price-monitoring | default-eth-for-future | 0.2 | 0 | SLA | + + Scenario: 001 Liquidity fee setting to METHOD_CONSTANT(0042-LIQF-058), METHOD_MARGINAL_COST, and METHOD_WEIGHTED_AVERAGE(0042-LIQF-057) + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | USD | 1000000000 | + | lp2 | USD | 1000000000 | + | party1 | USD | 100000000 | + | party2 | USD | 100000000 | + + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR22 | 800 | 0.005 | submission | + | lp2 | lp2 | ETH/MAR22 | 300 | 0.004 | submission | + + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lp1 | ETH/MAR22 | 12 | 1 | buy | BID | 12 | 2 | + | lp1 | ETH/MAR22 | 12 | 1 | buy | MID | 12 | 1 | + | lp1 | ETH/MAR22 | 12 | 1 | sell | ASK | 12 | 2 | + | lp1 | ETH/MAR22 | 12 | 1 | sell | MID | 12 | 1 | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/MAR22 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/MAR22 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/MAR22 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/MAR22 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the opening auction period ends for market "ETH/MAR22" + + And the following trades should be executed: + | buyer | price | size | seller | + | party1 | 1000 | 10 | party2 | + + And the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 1000 | TRADING_MODE_CONTINUOUS | 3600 | 500 | 1500 | 1000 | 1100 | 10 | + + And the liquidity fee factor should be "0.08" for the market "ETH/MAR22" + + When the markets are updated: + | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | liquidity fee settings | + | ETH/MAR22 | lqm-params | 1e-3 | 0 | fees-config-2 | + Then the network moves ahead "1" blocks + And the liquidity fee factor should be "0.01" for the market "ETH/MAR22" + + When the markets are updated: + | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | liquidity fee settings | + | ETH/MAR22 | lqm-params | 1e-3 | 0 | fees-config-3 | + Then the network moves ahead "1" blocks + And the liquidity fee factor should be "0.0047272727272727" for the market "ETH/MAR22" + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR22 | 800 | 0.006 | amendment | + Then the network moves ahead "1" blocks + And the liquidity fee factor should be "0.0054545454545455" for the market "ETH/MAR22" + + # Use the MARGINAL COST to calculate the liquidity fee. This value with be one of the LP fee values (0042-LIQF-059) + When the markets are updated: + | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | liquidity fee settings | + | ETH/MAR22 | lqm-params | 1e-3 | 0 | fees-config-4 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR22 | 800 | 0.0375 | amendment | + Then the network moves ahead "1" blocks + And the liquidity fee factor should be "0.0375" for the market "ETH/MAR22" diff --git a/core/integration/features/fees/trading-fees-pdp.feature b/core/integration/features/fees/trading-fees-pdp.feature index 518b86cf89..80d08980a9 100644 --- a/core/integration/features/fees/trading-fees-pdp.feature +++ b/core/integration/features/fees/trading-fees-pdp.feature @@ -654,6 +654,7 @@ Feature: Fees calculations | trader3 | ETH | ETH/DEC21 | 240 | 9999766 | | trader4 | ETH | ETH/DEC21 | 104 | 0 | + @NoPerp Scenario: WIP - Testing fees in continuous trading when insufficient balance in their general and margin account with LP, then the trade does not execute # - Just need to confirm if the trades doesn't go through, then general and margin account balances are expected to be 0. # - Also need to confirm if all 4 internal levels of margin should be 0, as in another case where the trade shouldn't be going through it's non-zero @@ -729,13 +730,14 @@ Feature: Fees calculations | buyer | price | size | seller | | trader3 | 1002 | 100 | trader4 | + #And debug transfers And the following transfers should happen: | from | to | from account | to account | market id | amount | asset | | trader4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_MAKER | ETH/DEC21 | 6 | ETH | | trader4 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | ETH/DEC21 | 3 | ETH | | trader4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC21 | 2 | ETH | - | trader4 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC21 | 2 | ETH | | market | trader3 | ACCOUNT_TYPE_FEES_MAKER | ACCOUNT_TYPE_GENERAL | ETH/DEC21 | 6 | ETH | + | market | | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | ETH/DEC21 | 3 | ETH | Then the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | @@ -744,8 +746,7 @@ Feature: Fees calculations Then the parties should have the following account balances: | party | asset | market id | margin | general | | trader3 | ETH | ETH/DEC21 | 339 | 9999667 | - #| trader3 | ETH | ETH/DEC21 | 240 | 9999766 | - | trader4 | ETH | ETH/DEC21 | 0 | 0 | + | trader4 | ETH | ETH/DEC21 | 0 | 0 | And the liquidity fee factor should be "0.001" for the market "ETH/DEC21" And the accumulated liquidity fees should be "4" for the market "ETH/DEC21" @@ -893,10 +894,6 @@ Feature: Fees calculations | trader4 | ETH/DEC21 | sell | 300 | 1002 | 1 | TYPE_LIMIT | TIF_GTC | And the network moves ahead "1" blocks - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | - Given the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | aux1 | ETH/DEC21 | 10000 | 0.001 | amendment | @@ -934,10 +931,6 @@ Feature: Fees calculations | trader4 | ETH | ETH/DEC21 | 5234 | 0 | # We apparently left auction - # we're still in liquidity auction - #Then the market data for the market "ETH/DEC21" should be: - #| trading mode | auction trigger | - # | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | When the network moves ahead "1" blocks Then the market data for the market "ETH/DEC21" should be: @@ -1049,7 +1042,7 @@ Feature: Fees calculations | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | - + @NoPerp Scenario: Testing fees in Price auction session trading with insufficient balance in their general and margin account, then the trade still goes ahead Given the liquidity monitoring parameters: | name | triggering ratio | time window | scaling factor | @@ -1121,14 +1114,15 @@ Feature: Fees calculations | trading mode | auction trigger | | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | - Then the network moves ahead "301" blocks + Then the network moves ahead "302" blocks + And debug trades Then the following trades should be executed: | buyer | price | size | seller | | trader3a | 1002 | 100 | trader4 | | trader3a | 900 | 200 | trader4 | + | network | 900 | 300 | trader3a | | aux1 | 500 | 100 | network | | aux1 | 490 | 200 | network | - | network | 493 | 300 | trader3a | # For trader3a & 4- Sharing IF and LP # trade_value_for_fee_purposes for trader3a = size_of_trade * price_of_trade = 2 * 900 = 1800 @@ -1267,6 +1261,7 @@ Feature: Fees calculations | trading mode | auction trigger | | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | + @NoPerp Scenario: Testing fees in continuous trading during position resolution Given the fees configuration named "fees-config-1": @@ -1315,12 +1310,9 @@ Feature: Fees calculations Then the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader3a | ETH/DEC21 | 2000 | 6400 | 8000 | 10000 | - | trader3b | ETH/DEC21 | 54000 | 172800 | 216000 | 270000 | - - Then the parties cancel the following orders: - | party | reference | - | aux1 | sell-provider-1 | + | trader3a | ETH/DEC21 | 18000 | 57600 | 72000 | 90000 | + | trader3b | ETH/DEC21 | 0 | 0 | 0 | 0 | + #| trader3b | ETH/DEC21 | 54000 | 172800 | 216000 | 270000 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | @@ -1331,6 +1323,15 @@ Feature: Fees calculations | aux1 | ETH/DEC21 | sell | 100 | 300 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | | aux2 | ETH/DEC21 | buy | 100 | 300 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | + Then debug trades + Then the following trades should be executed: + | buyer | price | size | seller | + | trader3b | 180 | 30000 | network | + | network | 200 | 15000 | aux1 | + | network | 1000 | 100 | aux1 | + | network | 350 | 14900 | aux1 | + | network | 350 | 10000 | aux1 | + And the mark price should be "300" for the market "ETH/DEC21" Then the parties should have the following profit and loss: @@ -1364,6 +1365,7 @@ Feature: Fees calculations And the insurance pool balance should be "0" for the market "ETH/DEC21" + @NoPerp Scenario: WIP - Testing fees in continuous trading during position resolution with insufficient balance in their general and margin account, partial or full fees does not get paid # Fees calculations during Position Resolution when insufficient balance in their general and margin account, then the fees gets paid in order - Maker, IP and then LP else don't get paid @@ -1406,6 +1408,7 @@ Feature: Fees calculations | party | market id | side | volume | price | resulting trades | type | tif | reference | | trader3a | ETH/DEC21 | sell | 10000 | 180 | 2 | TYPE_LIMIT | TIF_GTC | ref-1 | | trader3b | ETH/DEC21 | sell | 30000 | 180 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | + And the network moves ahead "1" blocks Then the following trades should be executed: | buyer | price | size | seller | @@ -1415,12 +1418,8 @@ Feature: Fees calculations Then the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader3a | ETH/DEC21 | 2000 | 6400 | 8000 | 10000 | - | trader3b | ETH/DEC21 | 54000 | 172800 | 216000 | 270000 | - - Then the parties cancel the following orders: - | party | reference | - | aux1 | sell-provider-1 | + | trader3a | ETH/DEC21 | 18000 | 57600 | 72000 | 90000 | + | trader3b | ETH/DEC21 | 0 | 0 | 0 | 0 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | diff --git a/core/integration/features/liquidation/0012-POSR-012.feature b/core/integration/features/liquidation/0012-POSR-012.feature new file mode 100644 index 0000000000..34140c2bca --- /dev/null +++ b/core/integration/features/liquidation/0012-POSR-012.feature @@ -0,0 +1,115 @@ +Feature: 0012-POSR-012 Update the liquidation strategy through market update + + Background: + Given the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | liquidation strategy | + | ETH/DEC19 | BTC | BTC | default-simple-risk-model-4 | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e6 | 1e6 | default-futures | slow-liquidation-strat | + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 2 | + + @NoPerp @LiquidationUpdate + Scenario: Update liquidation strategy through market update + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | tt_4 | BTC | 500000 | + | tt_5 | BTC | 100 | + | tt_6 | BTC | 100000000 | + | tt_10 | BTC | 10000000 | + | tt_11 | BTC | 10000000 | + | tt_aux | BTC | 100000000 | + | t2_aux | BTC | 100000000 | + | lpprov | BTC | 100000000 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + Then the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | tt_aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-1 | + | tt_aux | ETH/DEC19 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-1 | + | t2_aux | ETH/DEC19 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-2 | + | tt_aux | ETH/DEC19 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-2 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | MID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | MID | 50 | 100 | + Then the opening auction period ends for market "ETH/DEC19" + + # place orders and generate trades + When the parties place the following orders "1" blocks apart: + | party | market id | side | volume | price | resulting trades | type | tif | reference | expires in | + | tt_10 | ETH/DEC19 | buy | 5 | 100 | 0 | TYPE_LIMIT | TIF_GTT | tt_10-1 | 3600 | + | tt_11 | ETH/DEC19 | sell | 5 | 100 | 1 | TYPE_LIMIT | TIF_GTT | tt_11-1 | 3600 | + | tt_4 | ETH/DEC19 | buy | 2 | 150 | 0 | TYPE_LIMIT | TIF_GTC | tt_4-1 | | + | tt_4 | ETH/DEC19 | buy | 2 | 150 | 0 | TYPE_LIMIT | TIF_GTC | tt_4-2 | | + | tt_5 | ETH/DEC19 | buy | 2 | 150 | 0 | TYPE_LIMIT | TIF_GTC | tt_5-1 | | + | tt_6 | ETH/DEC19 | sell | 2 | 150 | 1 | TYPE_LIMIT | TIF_GTC | tt_6-1 | | + | tt_5 | ETH/DEC19 | buy | 2 | 150 | 0 | TYPE_LIMIT | TIF_GTC | tt_5-2 | | + | tt_6 | ETH/DEC19 | sell | 2 | 150 | 1 | TYPE_LIMIT | TIF_GTC | tt_6-2 | | + | tt_10 | ETH/DEC19 | buy | 25 | 100 | 0 | TYPE_LIMIT | TIF_GTC | tt_10-2 | | + | tt_11 | ETH/DEC19 | sell | 25 | 0 | 3 | TYPE_MARKET | TIF_FOK | tt_11-2 | | + And the network moves ahead "1" blocks + + And the mark price should be "100" for the market "ETH/DEC19" + + # checking margins + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | tt_5 | BTC | ETH/DEC19 | 0 | 0 | + + # then we make sure the insurance pool collected the funds + And the insurance pool balance should be "0" for the market "ETH/DEC19" + + #check positions + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | tt_4 | 4 | -200 | 0 | + | tt_5 | 0 | 0 | -100 | + | tt_6 | -4 | 200 | -27 | + | tt_10 | 26 | 0 | 0 | + | tt_11 | -30 | 200 | -65 | + | network | 4 | 0 | 0 | + And the following trades should be executed: + | buyer | price | size | seller | + | network | 100 | 4 | tt_5 | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | tt_10 | ETH/DEC19 | buy | 50 | 100 | 0 | TYPE_LIMIT | TIF_GTC | tt_10-n | + And the network moves ahead "101" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | tt_4 | 4 | -200 | 0 | + | tt_5 | 0 | 0 | -100 | + | tt_6 | -4 | 200 | -27 | + | tt_10 | 27 | 0 | 0 | + | tt_11 | -30 | 200 | -65 | + | network | 3 | 0 | 0 | + # Network trades with good party for a size of 1 + And the following trades should be executed: + | buyer | price | size | seller | + | tt_10 | 100 | 1 | network | + # Now update the market + When the markets are updated: + | id | linear slippage factor | quadratic slippage factor | liquidation strategy | + | ETH/DEC19 | 1e6 | 1e6 | default-liquidation-strat | + # Now the network should dispose of its entire position + When the network moves ahead "11" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | tt_4 | 4 | -200 | 0 | + | tt_5 | 0 | 0 | -100 | + | tt_6 | -4 | 200 | -27 | + | tt_10 | 30 | 0 | 0 | + | tt_11 | -30 | 200 | -65 | + | network | 0 | 0 | 0 | + # Network has been closed out entirely now + And the following trades should be executed: + | buyer | price | size | seller | + | tt_10 | 100 | 3 | network | diff --git a/core/integration/features/liquidation/0012-POSR-013.feature b/core/integration/features/liquidation/0012-POSR-013.feature new file mode 100644 index 0000000000..874ea6bad9 --- /dev/null +++ b/core/integration/features/liquidation/0012-POSR-013.feature @@ -0,0 +1,170 @@ +Feature: 0012-POSR-013 Gradual release of position. + + Background: + Given the oracle spec for settlement data filtering data from "0xCAFECAFE1" named "ethDec21Oracle": + | property | type | binding | + | prices.BTC.value | TYPE_INTEGER | settlement data | + And the oracle spec for trading termination filtering data from "0xCAFECAFE1" named "ethDec21Oracle": + | property | type | binding | + | trading.terminated | TYPE_BOOLEAN | trading termination | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | liquidation strategy | + | ETH/DEC19 | BTC | BTC | default-simple-risk-model-2 | default-overkill-margin-calculator | 1 | default-none | default-none | ethDec21Oracle | 0.9145 | 0 | default-futures | AC-013-strat | + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | network.markPriceUpdateMaximumFrequency | 0s | + + + @LiquidationAC + Scenario: 0012-POSR-013 based on verified-positions-resolution-1.feature + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | sellSideProvider | BTC | 1000000000000 | + | buySideProvider | BTC | 1000000000000 | + | desginatedLoser | BTC | 11600 | + | aux | BTC | 1000000000000 | + | aux2 | BTC | 1000000000000 | + | bulkSeller | BTC | 9999999999999 | + | bulkBuyer | BTC | 9999999999999 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + Then the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 10 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 10 | 2000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | buy | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | sell | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/DEC19" + And the mark price should be "150" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + # insurance pool generation - setup orderbook + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/DEC19 | sell | 290 | 150 | 0 | TYPE_LIMIT | TIF_GTC | sell-provider-1 | + | buySideProvider | ETH/DEC19 | buy | 1 | 140 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-1 | + + # insurance pool generation - trade + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | desginatedLoser | ETH/DEC19 | buy | 280 | 150 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | + And the network moves ahead "1" blocks + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | desginatedLoser | BTC | ETH/DEC19 | 0 | 0 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | desginatedLoser | ETH/DEC19 | 0 | 0 | 0 | 0 | + + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux | 1 | 0 | 0 | + | aux2 | -1 | 0 | 0 | + | sellSideProvider | -280 | 0 | 0 | + | buySideProvider | 0 | 0 | 0 | + | desginatedLoser | 0 | 0 | -11600 | + | network | 280 | 0 | 0 | + # Now that the network has the position as per AC (280 long), ensure the volume on the book is correct + # The buy volume should always be 10,000. Place sell orders to match to avoid increased margin requirement + # as a result of an unknown exit price. + # Current book: + # SELL orders: + # | Party | Volume | Remaining | Price | + # | sellSideProvider | 290 | 10 | 150 | + # | aux | 10 | 10 | 2000 | + # BUY orders: + # | Party | Volume | Remaining | Price | + # | buySideProvider | 1 | 1 | 140 | + # | aux | 10 | 10 | 1 | + # First bring both sides to 100, then increase gradually to avoid margin issues, both sides will have 10k volume on the book after this step + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/DEC19 | sell | 80 | 150 | 0 | TYPE_LIMIT | TIF_GTC | sell-provider-2 | + | buySideProvider | ETH/DEC19 | buy | 89 | 140 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | + | bulkBuyer | ETH/DEC19 | buy | 200 | 145 | 0 | TYPE_LIMIT | TIF_GTC | bbuy-1 | + | bulkSeller | ETH/DEC19 | sell | 200 | 150 | 0 | TYPE_LIMIT | TIF_GTC | bsell-1 | + | bulkBuyer | ETH/DEC19 | buy | 400 | 145 | 0 | TYPE_LIMIT | TIF_GTC | bbuy-2 | + | bulkSeller | ETH/DEC19 | sell | 400 | 150 | 0 | TYPE_LIMIT | TIF_GTC | bsell-2 | + | bulkBuyer | ETH/DEC19 | buy | 800 | 145 | 0 | TYPE_LIMIT | TIF_GTC | bbuy-3 | + | bulkSeller | ETH/DEC19 | sell | 800 | 150 | 0 | TYPE_LIMIT | TIF_GTC | bsell-3 | + | bulkBuyer | ETH/DEC19 | buy | 1500 | 145 | 0 | TYPE_LIMIT | TIF_GTC | bbuy-4 | + | bulkSeller | ETH/DEC19 | sell | 1500 | 150 | 0 | TYPE_LIMIT | TIF_GTC | bsell-4 | + | bulkBuyer | ETH/DEC19 | buy | 7000 | 145 | 0 | TYPE_LIMIT | TIF_GTC | bbuy-5 | + | bulkSeller | ETH/DEC19 | sell | 7000 | 150 | 0 | TYPE_LIMIT | TIF_GTC | bsell-5 | + # Move network forwards 10 blocks to have the network reduce its position + And the network moves ahead "10" blocks + Then the following trades should be executed: + | buyer | price | size | seller | + | bulkBuyer | 145 | 100 | network | + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux | 1 | 0 | 0 | + | aux2 | -1 | 0 | 0 | + | sellSideProvider | -280 | 0 | 0 | + | buySideProvider | 0 | 0 | 0 | + | desginatedLoser | 0 | 0 | -11600 | + | network | 180 | 0 | -500 | + | bulkBuyer | 100 | 500 | 0 | + # Restore the volume on the book, use a different party just because + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux | ETH/DEC19 | buy | 100 | 140 | 0 | TYPE_LIMIT | TIF_GTC | aux-provider-2 | + # Next release of position + And the network moves ahead "10" blocks + Then the following trades should be executed: + | buyer | price | size | seller | + | bulkBuyer | 145 | 90 | network | + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux | 1 | 0 | 0 | + | aux2 | -1 | 0 | 0 | + | sellSideProvider | -280 | 0 | 0 | + | buySideProvider | 0 | 0 | 0 | + | desginatedLoser | 0 | 0 | -11600 | + | network | 90 | 0 | -950 | + | bulkBuyer | 190 | 950 | 0 | + # Restore the volume on the book, use a different party just because + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux2 | ETH/DEC19 | buy | 90 | 140 | 0 | TYPE_LIMIT | TIF_GTC | aux-provider-3 | + + # Next release of position + And the network moves ahead "10" blocks + ## We provided the volume on the book in separate orders, the trades will reflect this + ## so in this case, the trade for 45 is split across 2 orders. This does show that this batch/trade + ## is different to the next, making all network trades unique in this scenario. + Then the following trades should be executed: + | buyer | price | size | seller | + | bulkBuyer | 145 | 10 | network | + | bulkBuyer | 145 | 35 | network | + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux | 1 | 0 | 0 | + | aux2 | -1 | 0 | 0 | + | sellSideProvider | -280 | 0 | 0 | + | buySideProvider | 0 | 0 | 0 | + | desginatedLoser | 0 | 0 | -11600 | + | network | 45 | 0 | -1175 | + | bulkBuyer | 235 | 1175 | 0 | + # Restore the volume on the book, use a different party just because + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/DEC19 | buy | 45 | 140 | 0 | TYPE_LIMIT | TIF_GTC | aux-provider-3 | + # Last release of position + And the network moves ahead "10" blocks + Then the following trades should be executed: + | buyer | price | size | seller | + | bulkBuyer | 145 | 45 | network | + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux | 1 | 0 | 0 | + | aux2 | -1 | 0 | 0 | + | sellSideProvider | -280 | 0 | 0 | + | buySideProvider | 0 | 0 | 0 | + | desginatedLoser | 0 | 0 | -11600 | + | network | 0 | 0 | -1400 | + | bulkBuyer | 280 | 1400 | 0 | diff --git a/core/integration/features/liquidity-provision/0044-LIME-014.feature b/core/integration/features/liquidity-provision/0044-LIME-014.feature index 782c1d5a4b..12b356a828 100644 --- a/core/integration/features/liquidity-provision/0044-LIME-014.feature +++ b/core/integration/features/liquidity-provision/0044-LIME-014.feature @@ -125,8 +125,8 @@ Feature: Test LP SLA Bond penalty; And the network moves ahead "1" epochs And the market data for the market "ETH/MAR22" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_MONITORING_AUCTION | 3600 | 973 | 1027 | 3556 | 1820 | 1 | + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 1000 | TRADING_MODE_CONTINUOUS | 3600 | 973 | 1027 | 3556 | 1820 | 1 | Then the following transfers should happen: | from | to | from account | to account | market id | amount | asset | diff --git a/core/integration/features/liquidity-provision/0044-LIME-020.feature b/core/integration/features/liquidity-provision/0044-LIME-020.feature index b6a0ebd10d..85a7dca247 100644 --- a/core/integration/features/liquidity-provision/0044-LIME-020.feature +++ b/core/integration/features/liquidity-provision/0044-LIME-020.feature @@ -128,6 +128,8 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | party1 | USD | 100000 | | party2 | USD | 100000 | | party3 | USD | 100000 | + | ptbuy | USD | 1000000 | + | ptsell | USD | 1000000 | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -230,6 +232,8 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | party | market id | side | volume | price | resulting trades | type | tif | | party1 | ETH/MAR22 | buy | 5 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/MAR22 | sell | 5 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/MAR22 | buy | 1 | 960 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/MAR22 | sell | 1 | 970 | 0 | TYPE_LIMIT | TIF_GTC | And the liquidity fee factor should be "0.008" for the market "ETH/MAR22" #liquidity fee collected: 5*1000*0.008=40 @@ -248,14 +252,27 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | party | asset | market id | margin | general | bond | | lp1 | USD | ETH/MAR22 | 640243 | 309757 | 50000 | | lp2 | USD | ETH/MAR22 | 320122 | 669878 | 10000 | - Then the network moves ahead "10" blocks - And the parties should have the following account balances: + # trigger price auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | ptsell | ETH/MAR22 | sell | 1 | 940 | 0 | TYPE_LIMIT | TIF_GTC | + | ptbuy | ETH/MAR22 | buy | 1 | 940 | 0 | TYPE_LIMIT | TIF_GTC | + And the network moves ahead "1" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lp1 | USD | ETH/MAR22 | 0 | 950000 | 50000 | + | lp2 | USD | ETH/MAR22 | 0 | 990000 | 10000 | + And the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 1000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 20274 | 60000 | 6 | 3 | + When the network moves ahead "10" blocks + Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/MAR22 | 0 | 994878 | 1001 | - | lp2 | USD | ETH/MAR22 | 0 | 998699 | 502 | + | lp1 | USD | ETH/MAR22 | 608232 | 386874 | 1002 | + | lp2 | USD | ETH/MAR22 | 304116 | 694629 | 501 | And the market data for the market "ETH/MAR22" should be: - | mark price | trading mode | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_MONITORING_AUCTION | 21341 | 1503 | 6 | + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | horizon | min bound | max bound | + | 950 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 20274 | 1503 | 6 | 3600 | 925 | 976 | Then the following transfers should happen: | from | to | from account | to account | market id | amount | asset | diff --git a/core/integration/features/liquidity-provision/0044-LIME-063.feature b/core/integration/features/liquidity-provision/0044-LIME-063.feature index 35835a789b..fe0de5bca4 100644 --- a/core/integration/features/liquidity-provision/0044-LIME-063.feature +++ b/core/integration/features/liquidity-provision/0044-LIME-063.feature @@ -48,7 +48,7 @@ Feature: Test LP mechanics when there are multiple liquidity providers, and LPs | market.liquidity.bondPenaltyParameter | 0.2 | | market.liquidity.stakeToCcyVolume | 1 | | market.liquidity.successorLaunchWindowLength | 1h | - | market.liquidity.sla.nonPerformanceBondPenaltySlope | 0.1 | + | market.liquidity.sla.nonPerformanceBondPenaltySlope | 0.1 | | market.liquidity.sla.nonPerformanceBondPenaltyMax | 0.6 | | validators.epoch.length | 10s | | market.liquidity.earlyExitPenalty | 0.25 | @@ -61,10 +61,12 @@ Feature: Test LP mechanics when there are multiple liquidity providers, and LPs | party | asset | amount | | lp1 | USD | 100000 | | lp2 | USD | 100000 | - | lp3 | USD | 100000 | + | lp3 | USD | 100000 | | party1 | USD | 100000 | | party2 | USD | 100000 | | party3 | USD | 100000 | + | ptbuy | USD | 100000 | + | ptsell | USD | 100000 | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -136,10 +138,21 @@ Feature: Test LP mechanics when there are multiple liquidity providers, and LPs | party2 | ETH/MAR22 | sell | 2 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | When the network moves ahead "1" blocks - And the current epoch is "1" + Then the current epoch is "1" + # Check the current price bounds, then place some orders to trigger the auction + And the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 1000 | TRADING_MODE_CONTINUOUS | 3600 | 973 | 1027 | 10670 | 6000 | 3 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | ptbuy | ETH/MAR22 | buy | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + | ptsell | ETH/MAR22 | sell | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + | ptsell | ETH/MAR22 | sell | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | + | ptbuy | ETH/MAR22 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | + Then the network moves ahead "1" blocks And the market data for the market "ETH/MAR22" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_MONITORING_AUCTION | 3600 | 973 | 1027 | 10670 | 6000 | 3 | + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 1000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 17250 | 6000 | 3 | 3 | Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | | lp1 | USD | ETH/MAR22 | 0 | 97000 | 2400 | @@ -153,12 +166,17 @@ Feature: Test LP mechanics when there are multiple liquidity providers, and LPs | lp1 | ETH/MAR22 | sell | 10 | 1050 | 0 | TYPE_LIMIT | TIF_GFA | lp1-GFA-s | Then the network moves ahead "1" epochs And the current epoch is "2" + And the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 970 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 17250 | 5652 | 5 | 0 | - #margin accont for lp1 and lp2 increased after placing GFA orders during liquidity auction + ## No margin for lp1 and lp2, orders were GFA only Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/MAR22 | 56022 | 40978 | 2400 | - | lp2 | USD | ETH/MAR22 | 54421 | 41579 | 3600 | + | lp1 | USD | ETH/MAR22 | 0 | 97000 | 2261 | + | lp2 | USD | ETH/MAR22 | 0 | 96000 | 3391 | + #| lp1 | USD | ETH/MAR22 | 56022 | 40978 | 2400 | + #| lp2 | USD | ETH/MAR22 | 54421 | 41579 | 3600 | #lp3 mades a new LP commitment and get the market out of liquidity auction And the parties submit the following liquidity provision: @@ -168,24 +186,24 @@ Feature: Test LP mechanics when there are multiple liquidity providers, and LPs And the current epoch is "2" And the market data for the market "ETH/MAR22" should be: | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_CONTINUOUS | 3600 | 973 | 1027 | 10670 | 11000 | 3 | + | 970 | TRADING_MODE_CONTINUOUS | 3600 | 944 | 996 | 17250 | 10652 | 5 | Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/MAR22 | 0 | 97000 | 2400 | - | lp2 | USD | ETH/MAR22 | 0 | 96000 | 3600 | - And the insurance pool balance should be "1030" for the market "ETH/MAR22" + | lp1 | USD | ETH/MAR22 | 0 | 97000 | 2261 | + | lp2 | USD | ETH/MAR22 | 0 | 96000 | 3391 | + And the insurance pool balance should be "1417" for the market "ETH/MAR22" Then the network moves ahead "1" epochs And the current epoch is "3" #AC 0044-LIME-081: GFA orders during continuous trading mode from LP do not count towards the LP's liquidity commitment Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/MAR22 | 0 | 97000 | 2194 | - | lp2 | USD | ETH/MAR22 | 0 | 96000 | 3290 | + | lp1 | USD | ETH/MAR22 | 0 | 97000 | 2035 | + | lp2 | USD | ETH/MAR22 | 0 | 96000 | 3052 | Then the following transfers should happen: | from | to | from account | to account | market id | amount | asset | - | lp1 | market | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_INSURANCE | ETH/MAR22 | 206 | USD | - | lp2 | market | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_INSURANCE | ETH/MAR22 | 310 | USD | - And the insurance pool balance should be "1546" for the market "ETH/MAR22" + | lp1 | market | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_INSURANCE | ETH/MAR22 | 226 | USD | + | lp2 | market | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_INSURANCE | ETH/MAR22 | 339 | USD | + And the insurance pool balance should be "1982" for the market "ETH/MAR22" diff --git a/core/integration/features/liquidity-provision/0044-LIME-065.feature b/core/integration/features/liquidity-provision/0044-LIME-065.feature index 0f7dd3144b..3f3673f24d 100644 --- a/core/integration/features/liquidity-provision/0044-LIME-065.feature +++ b/core/integration/features/liquidity-provision/0044-LIME-065.feature @@ -45,13 +45,13 @@ Feature: Test LP mechanics when there are multiple liquidity providers, and LPs And the following network parameters are set: | name | value | - | market.liquidity.bondPenaltyParameter | 0.2 | + | market.liquidity.bondPenaltyParameter | 0.2 | | market.liquidity.stakeToCcyVolume | 1 | | market.liquidity.successorLaunchWindowLength | 1h | | market.liquidity.sla.nonPerformanceBondPenaltySlope | 0.7 | | market.liquidity.sla.nonPerformanceBondPenaltyMax | 0.6 | | validators.epoch.length | 10s | - | market.liquidity.earlyExitPenalty | 0.25 | + | market.liquidity.earlyExitPenalty | 0.25 | | market.liquidity.maximumLiquidityFeeFactorLevel | 0.25 | Given the average block duration is "1" @@ -87,8 +87,8 @@ Feature: Test LP mechanics when there are multiple liquidity providers, and LPs | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | reference | | lp1 | ETH/MAR22 | 12 | 1 | buy | BID | 12 | 20 | lp-b-1 | | lp1 | ETH/MAR22 | 12 | 1 | sell | ASK | 12 | 20 | lp-s-1 | - | lp2 | ETH/MAR22 | 12 | 1 | buy | BID | 12 | 20 | lp-b-2 | - | lp2 | ETH/MAR22 | 12 | 1 | sell | ASK | 12 | 20 | lp-s-2 | + | lp2 | ETH/MAR22 | 12 | 1 | buy | BID | 12 | 20 | lp-b-2 | + | lp2 | ETH/MAR22 | 12 | 1 | sell | ASK | 12 | 20 | lp-s-2 | Then the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -155,22 +155,18 @@ Feature: Test LP mechanics when there are multiple liquidity providers, and LPs Then the network moves ahead "1" epochs And the market data for the market "ETH/MAR22" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_MONITORING_AUCTION | 3600 | 973 | 1027 | 7113 | 5001 | 2 | + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 1000 | TRADING_MODE_CONTINUOUS | 3600 | 973 | 1027 | 7113 | 5001 | 2 | #AC 0044-LIME-067:When LP1 decreases its commitment more than maximum-penalty-free-reduction-amount, then penalty-incurring-reduction-amount= 3000-(8000-7113) = 2112,we should see SLA bond peanlty by transfering 0.25*2112=528 in insurance pool and 0.75*2112=1584 to general account, and ELS updated Then the liquidity provider fee shares for the market "ETH/MAR22" should be: | party | equity like share | average entry valuation | - | lp1 | 0.2001599680063987 | 6000 | - | lp2 | 0.7998400319936013 | 10000 | + | lp1 | 0.2001599680063987 | 6000 | + | lp2 | 0.7998400319936013 | 10000 | Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/MAR22 | 0 | 98478 | 1001 | - | lp2 | USD | ETH/MAR22 | 0 | 96007 | 4000 | + | lp1 | USD | ETH/MAR22 | 64024 | 34454 | 1001 | + | lp2 | USD | ETH/MAR22 | 64024 | 31983 | 4000 | And the insurance pool balance should be "528" for the market "ETH/MAR22" And the current epoch is "2" - - - - diff --git a/core/integration/features/liquidity-provision/0044-LIME-077.feature b/core/integration/features/liquidity-provision/0044-LIME-077.feature index 37b04f5932..cbe487485d 100644 --- a/core/integration/features/liquidity-provision/0044-LIME-077.feature +++ b/core/integration/features/liquidity-provision/0044-LIME-077.feature @@ -9,17 +9,17 @@ Feature: Test LP mechanics when there are multiple liquidity providers, test sto | risk aversion | tau | mu | r | sigma | | 0.000001 | 0.1 | 0 | 0 | 1.0 | And the following network parameters are set: - | name | value | - | market.value.windowLength | 60s | - | network.markPriceUpdateMaximumFrequency | 0s | - | limits.markets.maxPeggedOrders | 6 | - | market.auction.minimumDuration | 1 | - | market.fee.factors.infrastructureFee | 0.001 | - | market.fee.factors.makerFee | 0.004 | - | spam.protection.max.stopOrdersPerMarket | 5 | + | name | value | + | market.value.windowLength | 60s | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 6 | + | market.auction.minimumDuration | 1 | + | market.fee.factors.infrastructureFee | 0.001 | + | market.fee.factors.makerFee | 0.004 | + | spam.protection.max.stopOrdersPerMarket | 5 | And the liquidity monitoring parameters: - | name | triggering ratio | time window | scaling factor | - | lqm-params | 1.0 | 20s | 1 | + | name | triggering ratio | time window | scaling factor | + | lqm-params | 1.0 | 20s | 1 | #risk factor short:3.5569036 #risk factor long:0.801225765 And the following assets are registered: @@ -28,9 +28,10 @@ Feature: Test LP mechanics when there are multiple liquidity providers, test sto And the fees configuration named "fees-config-1": | maker fee | infrastructure fee | | 0.0004 | 0.001 | + ## Set auction duration to 3 epochs And the price monitoring named "price-monitoring": | horizon | probability | auction extension | - | 3600 | 0.99 | 3 | + | 3600 | 0.99 | 30 | And the liquidity sla params named "SLA-22": | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | @@ -66,6 +67,8 @@ Feature: Test LP mechanics when there are multiple liquidity providers, test sto | party1 | USD | 100000 | | party2 | USD | 100000 | | party3 | USD | 100000 | + | ptbuy | USD | 100000 | + | ptsell | USD | 100000 | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -144,17 +147,26 @@ Feature: Test LP mechanics when there are multiple liquidity providers, test sto When the network moves ahead "1" epochs - And the supplied stake should be "9400" for the market "ETH/MAR22" + Then the supplied stake should be "9400" for the market "ETH/MAR22" And the current epoch is "3" And the insurance pool balance should be "600" for the market "ETH/MAR22" - And the market data for the market "ETH/MAR22" should be: - | mark price | trading mode | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_MONITORING_AUCTION | 10670 | 9400 | 3 | - - Then the following transfers should happen: + And the following transfers should happen: | from | to | from account | to account | market id | amount | asset | | lp1 | market | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_INSURANCE | ETH/MAR22 | 600 | USD | + ## Trigger price monitoring auction by trading outside of price bound (973-1027) + ## Ensure volume on the book after leaving auction at 900-990 + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | ptbuy | ETH/MAR22 | buy | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + | ptsell | ETH/MAR22 | sell | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + | ptbuy | ETH/MAR22 | sell | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | + | ptsell | ETH/MAR22 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 1000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 17250 | 9400 | 3 | 30 | + And the parties place the following pegged iceberg orders: | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | reference | | lp1 | ETH/MAR22 | 12 | 1 | buy | BID | 12 | 20 | lp1-b | @@ -168,8 +180,8 @@ Feature: Test LP mechanics when there are multiple liquidity providers, test sto When the network moves ahead "1" epochs And the market data for the market "ETH/MAR22" should be: - | mark price | trading mode | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_MONITORING_AUCTION | 10670 | 8860 | 3 | + | mark price | trading mode | target stake | supplied stake | open interest | auction end | + | 1000 | TRADING_MODE_MONITORING_AUCTION | 17250 | 8860 | 3 | 30 | #lp1 got bond penalty for placing parked order Then the following transfers should happen: diff --git a/core/integration/features/liquidity-provision/0044-LIME-091.feature b/core/integration/features/liquidity-provision/0044-LIME-091.feature index a654da9f96..7f41e68671 100644 --- a/core/integration/features/liquidity-provision/0044-LIME-091.feature +++ b/core/integration/features/liquidity-provision/0044-LIME-091.feature @@ -66,11 +66,13 @@ Feature: Test change of SLA market parameter Scenario: 001: lp1 and lp2 on the market ETH/MAR22, 0044-LIME-091, 0044-LIME-093, 0044-LIME-029 Given the parties deposit on asset's general account the following amount: | party | asset | amount | - | lp1 | USD | 200000 | - | lp2 | USD | 200000 | + | lp1 | USD | 200000 | + | lp2 | USD | 200000 | | party1 | USD | 100000 | | party2 | USD | 100000 | | party3 | USD | 100000 | + | ptbuy | USD | 100000 | + | ptsell | USD | 100000 | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -125,39 +127,46 @@ Feature: Test change of SLA market parameter | lp2 | market | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_INSURANCE | ETH/MAR22 | 2400 | USD | And the insurance pool balance should be "4800" for the market "ETH/MAR22" - And the market data for the market "ETH/MAR22" should be: - | mark price | trading mode | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_MONITORING_AUCTION | 3556 | 3200 | 1 | - - And the parties submit the following liquidity provision: + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | ptbuy | ETH/MAR22 | buy | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + | ptsell | ETH/MAR22 | sell | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + | ptbuy | ETH/MAR22 | sell | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | + | ptsell | ETH/MAR22 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | + Then the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 1000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 10350 | 3200 | 1 | 3 | + + When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp_1 | lp1 | ETH/MAR22 | 4000 | 0.02 | amendment | | lp_2 | lp2 | ETH/MAR22 | 4000 | 0.015 | amendment | #0044-LIME-095:during auction the parties place orders within the price range: 0.1 which should count as SLA - Then the parties place the following orders: + And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | lp1 | ETH/MAR22 | buy | 12 | 998 | 0 | TYPE_LIMIT | TIF_GTC | | lp1 | ETH/MAR22 | sell | 12 | 1002 | 0 | TYPE_LIMIT | TIF_GTC | | lp2 | ETH/MAR22 | buy | 12 | 998 | 0 | TYPE_LIMIT | TIF_GTC | | lp2 | ETH/MAR22 | sell | 12 | 1002 | 0 | TYPE_LIMIT | TIF_GTC | + Then the network moves ahead "4" blocks #indicative price buy is (990*10+998*24)/34=995; (1010*10+1002*24)/34=1004, #last trade price is 1000, so the price range should be: (0.9*995, 1.1*1004)=(895, 1104) # (1.0-market.liquidity.priceRange) x min(last trade price, indicative uncrossing price) <= price levels <= (1.0+market.liquidity.priceRange) x max(last trade price, indicative uncrossing price). Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/MAR22 | 64153 | 129447 | 4000 | - | lp2 | USD | ETH/MAR22 | 64153 | 129447 | 4000 | + | lp1 | USD | ETH/MAR22 | 127281 | 66287 | 4000 | + | lp2 | USD | ETH/MAR22 | 127281 | 66319 | 4000 | When the network moves ahead "11" blocks - And the insurance pool balance should be "4800" for the market "ETH/MAR22" + And the insurance pool balance should be "4860" for the market "ETH/MAR22" And the market data for the market "ETH/MAR22" should be: | mark price | trading mode | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_CONTINUOUS | 3556 | 8000 | 1 | + | 994 | TRADING_MODE_CONTINUOUS | 14142 | 8000 | 4 | Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/MAR22 | 128049 | 65551 | 4000 | - | lp2 | USD | ETH/MAR22 | 128049 | 65551 | 4000 | + | lp1 | USD | ETH/MAR22 | 127281 | 66287 | 4000 | + | lp2 | USD | ETH/MAR22 | 127281 | 66319 | 4000 | diff --git a/core/integration/features/liquidity-provision/0044-LIME-092.feature b/core/integration/features/liquidity-provision/0044-LIME-092.feature index 455f092d37..f4c680ef10 100644 --- a/core/integration/features/liquidity-provision/0044-LIME-092.feature +++ b/core/integration/features/liquidity-provision/0044-LIME-092.feature @@ -7,7 +7,7 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | 1.2 | 1.5 | 1.7 | Given the log normal risk model named "log-normal-risk-model": | risk aversion | tau | mu | r | sigma | - | 0.000001 | 0.1 | 0 | 0 | 1.0 | + | 0.000001 | 0.1 | 0 | 0 | 1.0 | #risk factor short:3.5569036 #risk factor long:0.801225765 And the following assets are registered: @@ -16,13 +16,14 @@ Feature: Test LP mechanics when there are multiple liquidity providers; And the fees configuration named "fees-config-1": | maker fee | infrastructure fee | | 0.0004 | 0.001 | + # price monitoring duration should be > 3 epochs And the price monitoring named "price-monitoring": | horizon | probability | auction extension | - | 3600 | 0.99 | 3 | + | 3600 | 0.99 | 40 | And the liquidity sla params named "SLA": | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | - | 0.00001 | 0.5 | 1 | 1.0 | + | 0.00001 | 0.5 | 1 | 1.0 | And the liquidity sla params named "SLA2": | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | @@ -38,20 +39,20 @@ Feature: Test LP mechanics when there are multiple liquidity providers; And the following network parameters are set: | name | value | - | market.value.windowLength | 60s | - | network.markPriceUpdateMaximumFrequency | 0s | - | limits.markets.maxPeggedOrders | 6 | - | market.auction.minimumDuration | 1 | - | market.fee.factors.infrastructureFee | 0.001 | - | market.fee.factors.makerFee | 0.004 | + | market.value.windowLength | 60s | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 6 | + | market.auction.minimumDuration | 1 | + | market.fee.factors.infrastructureFee | 0.001 | + | market.fee.factors.makerFee | 0.004 | | market.liquidity.bondPenaltyParameter | 0.2 | | validators.epoch.length | 5s | | market.liquidity.stakeToCcyVolume | 1 | | market.liquidity.successorLaunchWindowLength | 1h | - | market.liquidity.sla.nonPerformanceBondPenaltySlope | 0.5 | - | market.liquidity.sla.nonPerformanceBondPenaltyMax | 1 | + | market.liquidity.sla.nonPerformanceBondPenaltySlope | 0.5 | + | market.liquidity.sla.nonPerformanceBondPenaltyMax | 1 | | validators.epoch.length | 10s | - | market.liquidity.providersFeeCalculationTimeStep | 10s | + | market.liquidity.providersFeeCalculationTimeStep | 10s | And the liquidity monitoring parameters: | name | triggering ratio | time window | scaling factor | | lqm-params | 0.5 | 20s | 1 | @@ -64,8 +65,8 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | ETH/JAN23 | USD | USD | lqm-params | log-normal-risk-model | margin-calculator-1 | 2 | fees-config-1 | price-monitoring | default-eth-for-future | 1e0 | 0 | SLA3 | lqm-params | Given the average block duration is "2" - @Now + @Now Scenario: An LP with bid orders inside valid range during auction (and market has no indicative price), is not penalised (0044-LIME-092) Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -73,6 +74,8 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | party1 | USD | 1000000000 | | party2 | USD | 1000000000 | | party3 | USD | 1000000 | + | ptbuy | USD | 10000000 | + | ptsell | USD | 10000000 | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -83,10 +86,11 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | party | market id | side | volume | price | resulting trades | type | tif | | lp1 | ETH/JAN23 | buy | 100 | 4750 | 0 | TYPE_LIMIT | TIF_GTC | | lp1 | ETH/JAN23 | sell | 100 | 5250 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/JAN23 | buy | 10 | 4900 | 0 | TYPE_LIMIT | TIF_GTC | | party1 | ETH/JAN23 | buy | 1 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/JAN23 | sell | 10 | 5100 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/JAN23 | sell | 1 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | + # Remove this so we can trigger price auction, we add it back later + #| party1 | ETH/JAN23 | buy | 10 | 4900 | 0 | TYPE_LIMIT | TIF_GTC | Then the opening auction period ends for market "ETH/JAN23" And the following trades should be executed: @@ -102,14 +106,22 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | party1 | ETH/JAN23 | buy | 5000 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/JAN23 | sell | 5000 | 5000 | 1 | TYPE_LIMIT | TIF_GTC | - When the network moves ahead "2" blocks + When the network moves ahead "1" blocks Then the market data for the market "ETH/JAN23" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 5000 | TRADING_MODE_MONITORING_AUCTION | 3600 | 4865 | 5139 | 88940284 | 180000 | 5001 | - And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 5000 | TRADING_MODE_CONTINUOUS | 3600 | 4865 | 5139 | 88940284 | 180000 | 5001 | + ## Now trigger price monitoring auction - sell outside of max bound, and make sure orders can't uncross with existing volume + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | ptbuy | ETH/JAN23 | buy | 1 | 4740 | 0 | TYPE_LIMIT | TIF_GTC | pt-buy | + | ptsell | ETH/JAN23 | sell | 1 | 4740 | 0 | TYPE_LIMIT | TIF_GTC | pt-sell | + Then the market data for the market "ETH/JAN23" should be: + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 5000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 84421207 | 180000 | 5001 | 40 | Then the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/JAN23 | buy | 10 | 4900 | 0 | TYPE_LIMIT | TIF_GTC | | party1 | ETH/JAN23 | buy | 1 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/JAN23 | sell | 1 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | @@ -117,13 +129,13 @@ Feature: Test LP mechanics when there are multiple liquidity providers; And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/JAN23 | 2801062 | 17518938 | 180000 | + | lp1 | USD | ETH/JAN23 | 2801062 | 17018938 | 162000 | When the network moves ahead "2" epochs Then the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/JAN23 | 2801062 | 17518938 | 180000 | + | lp1 | USD | ETH/JAN23 | 2801062 | 17018938 | 162000 | Scenario: An LP with ask orders outside valid range during auction is penalised (0044-LIME-094) Given the parties deposit on asset's general account the following amount: @@ -132,6 +144,8 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | party1 | USD | 1000000000 | | party2 | USD | 1000000000 | | party3 | USD | 1000000 | + | ptbuy | USD | 10000000 | + | ptsell | USD | 10000000 | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -142,7 +156,6 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | party | market id | side | volume | price | resulting trades | type | tif | | lp1 | ETH/JAN23 | buy | 100 | 3790 | 0 | TYPE_LIMIT | TIF_GTC | | lp1 | ETH/JAN23 | sell | 100 | 5250 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/JAN23 | buy | 10 | 4900 | 0 | TYPE_LIMIT | TIF_GTC | | party1 | ETH/JAN23 | buy | 1 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/JAN23 | sell | 10 | 5100 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/JAN23 | sell | 1 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | @@ -156,41 +169,39 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | | 5000 | TRADING_MODE_CONTINUOUS | 3600 | 4865 | 5139 | 17784 | 180000 | 1 | - Then the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/JAN23 | buy | 5000 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/JAN23 | sell | 5000 | 5000 | 1 | TYPE_LIMIT | TIF_GTC | - - When the network moves ahead "2" blocks + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | ptbuy | ETH/JAN23 | buy | 1 | 4740 | 0 | TYPE_LIMIT | TIF_GTC | pt-buy | + | ptsell | ETH/JAN23 | sell | 1 | 4740 | 0 | TYPE_LIMIT | TIF_GTC | pt-sell | + And the network moves ahead "2" blocks Then the market data for the market "ETH/JAN23" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 5000 | TRADING_MODE_MONITORING_AUCTION | 3600 | 4865 | 5139 | 88940284 | 180000 | 5001 | - And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 5000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 33719 | 180000 | 1 | 40 | - Then the parties place the following orders: + When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/JAN23 | buy | 10 | 4900 | 0 | TYPE_LIMIT | TIF_GTC | | party1 | ETH/JAN23 | buy | 1 | 4000 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/JAN23 | sell | 1 | 4000 | 0 | TYPE_LIMIT | TIF_GTC | - - When the network moves ahead "1" epochs + Then the network moves ahead "1" epochs And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" - Then the parties should have the following account balances: - | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/JAN23 | 2801062 | 17018938 | 108000 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lp1 | USD | ETH/JAN23 | 2801062 | 17018938 | 90000 | When the network moves ahead "2" epochs Then the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/JAN23 | 2801062 | 17018938 | 27000 | + | lp1 | USD | ETH/JAN23 | 2801062 | 17018938 | 22500 | Then the following transfers should happen: | from | to | from account | to account | market id | amount | asset | - | market | lp1 | ACCOUNT_TYPE_FEES_LIQUIDITY | ACCOUNT_TYPE_LP_LIQUIDITY_FEES | ETH/JAN23 | 500000 | USD | - | lp1 | market | ACCOUNT_TYPE_LP_LIQUIDITY_FEES | ACCOUNT_TYPE_INSURANCE | ETH/JAN23 | 500000 | USD | - | lp1 | market | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_INSURANCE | ETH/JAN23 | 72000 | USD | - | lp1 | market | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_INSURANCE | ETH/JAN23 | 54000 | USD | - | lp1 | market | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_INSURANCE | ETH/JAN23 | 27000 | USD | + | lp1 | market | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_INSURANCE | ETH/JAN23 | 90000 | USD | + | lp1 | market | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_INSURANCE | ETH/JAN23 | 45000 | USD | + | lp1 | market | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_INSURANCE | ETH/JAN23 | 22500 | USD | + #| market | lp1 | ACCOUNT_TYPE_FEES_LIQUIDITY | ACCOUNT_TYPE_LP_LIQUIDITY_FEES | ETH/JAN23 | 500000 | USD | + #| lp1 | market | ACCOUNT_TYPE_LP_LIQUIDITY_FEES | ACCOUNT_TYPE_INSURANCE | ETH/JAN23 | 500000 | USD | diff --git a/core/integration/features/liquidity-provision/0044-LIME-102.feature b/core/integration/features/liquidity-provision/0044-LIME-102.feature index 8167196af7..a1e530cc54 100644 --- a/core/integration/features/liquidity-provision/0044-LIME-102.feature +++ b/core/integration/features/liquidity-provision/0044-LIME-102.feature @@ -31,7 +31,7 @@ Feature: Consider a market in liquidity auction, when a LP increases their commi | 0.0004 | 0.001 | And the price monitoring named "price-monitoring": | horizon | probability | auction extension | - | 3600 | 0.99 | 3 | + | 3600 | 0.99 | 40 | And the liquidity sla params named "SLA-22": | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | @@ -42,7 +42,7 @@ Feature: Consider a market in liquidity auction, when a LP increases their commi And the markets: | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | - | ETH/MAR22 | USD | USD | lqm-params | log-normal-risk-model | margin-calculator-1 | 2 | fees-config-1 | price-monitoring | default-eth-for-future | 1e0 | 0 | SLA-22 | + | ETH/MAR22 | USD | USD | lqm-params | log-normal-risk-model | margin-calculator-1 | 2 | fees-config-1 | price-monitoring | default-eth-for-future | 1e0 | 0 | SLA-22 | And the following network parameters are set: | name | value | @@ -66,6 +66,8 @@ Feature: Consider a market in liquidity auction, when a LP increases their commi | party1 | USD | 100000 | | party2 | USD | 100000 | | party3 | USD | 100000 | + | ptbuy | USD | 100000 | + | ptsell | USD | 100000 | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -102,10 +104,14 @@ Feature: Consider a market in liquidity auction, when a LP increases their commi | party2 | ETH/MAR22 | sell | 2 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | When the network moves ahead "1" blocks - And the current epoch is "0" + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | ptbuy | ETH/MAR22 | buy | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + | ptsell | ETH/MAR22 | sell | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + Then the current epoch is "0" And the market data for the market "ETH/MAR22" should be: - | mark price | trading mode | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_MONITORING_AUCTION | 10670 | 10000 | 3 | + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 1000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 17250 | 10000 | 3 | 40 | Then the network moves ahead "1" epochs #SLA bond penalty happened in this epoch for lp1/2 not supplying liquidiy @@ -130,7 +136,7 @@ Feature: Consider a market in liquidity auction, when a LP increases their commi And the supplied stake should be "9000" for the market "ETH/MAR22" And the market data for the market "ETH/MAR22" should be: | mark price | trading mode | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_MONITORING_AUCTION | 10670 | 9000 | 3 | + | 1000 | TRADING_MODE_MONITORING_AUCTION | 17250 | 9000 | 3 | diff --git a/core/integration/features/liquidity-provision/0044-LIME-LP_amendment.feature b/core/integration/features/liquidity-provision/0044-LIME-LP_amendment.feature index 73262e8ffd..f1de25b75c 100644 --- a/core/integration/features/liquidity-provision/0044-LIME-LP_amendment.feature +++ b/core/integration/features/liquidity-provision/0044-LIME-LP_amendment.feature @@ -35,20 +35,20 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | market.liquidity.providersFeeCalculationTimeStep | 5s | And the following network parameters are set: - | name | value | - | market.value.windowLength | 60s | - | network.markPriceUpdateMaximumFrequency | 0s | - | limits.markets.maxPeggedOrders | 6 | - | market.auction.minimumDuration | 1 | - | market.fee.factors.infrastructureFee | 0.001 | - | market.fee.factors.makerFee | 0.004 | + | name | value | + | market.value.windowLength | 60s | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 6 | + | market.auction.minimumDuration | 1 | + | market.fee.factors.infrastructureFee | 0.001 | + | market.fee.factors.makerFee | 0.004 | | market.liquidity.bondPenaltyParameter | 0.2 | - | validators.epoch.length | 5s | + | validators.epoch.length | 5s | | market.liquidity.stakeToCcyVolume | 1 | - | market.liquidity.successorLaunchWindowLength | 1h | + | market.liquidity.successorLaunchWindowLength | 1h | | market.liquidity.sla.nonPerformanceBondPenaltySlope | 0.5 | | market.liquidity.sla.nonPerformanceBondPenaltyMax | 1 | - | validators.epoch.length | 10s | + | validators.epoch.length | 10s | Given the average block duration is "2" @Now Scenario: 001: lp1 and lp2 under supplies liquidity @@ -59,6 +59,8 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | party1 | USD | 100000 | | party2 | USD | 100000 | | party3 | USD | 100000 | + | ptbuy | USD | 100000 | + | ptsell | USD | 100000 | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -100,7 +102,12 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | lp1 | USD | ETH/MAR22 | 64024 | 0 | 35976 | | lp2 | USD | ETH/MAR22 | 32013 | 57987 | 10000 | # #margin_intial lp1: 12*1000*3.5569036*1.5=64024 - Then the network moves ahead "6" blocks + When the network moves ahead "6" blocks + # Trigger auction + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | ptbuy | ETH/MAR22 | buy | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + | ptsell | ETH/MAR22 | sell | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | And the parties should have the following account balances: | party | asset | market id | margin | general | bond | | lp1 | USD | ETH/MAR22 | 0 | 64024 | 17988 | diff --git a/core/integration/features/liquidity-provision/lp-distressed-closeout-pdp.feature b/core/integration/features/liquidity-provision/lp-distressed-closeout-pdp.feature index b60180f898..04cdc604ca 100644 --- a/core/integration/features/liquidity-provision/lp-distressed-closeout-pdp.feature +++ b/core/integration/features/liquidity-provision/lp-distressed-closeout-pdp.feature @@ -52,6 +52,7 @@ Feature: Replicate LP getting distressed during continuous trading, and after le | party2 | ETH/DEC21 | sell | 100000 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/DEC21 | sell | 1000 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + @Liquidation Scenario: 001, LP gets distressed during continuous trading (0042-LIQF-014) When the opening auction period ends for market "ETH/DEC21" And the auction ends with a traded volume of "1000" at a price of "1000" @@ -99,11 +100,9 @@ Feature: Replicate LP getting distressed during continuous trading, and after le Then the liquidity provisions should have the following states: | id | party | market | commitment amount | status | | lp1 | party0 | ETH/DEC21 | 1000 | STATUS_CANCELLED | - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | - | 1055 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 1793 | 0 | 1700 | - And the insurance pool balance should be "1152" for the market "ETH/DEC21" + And the insurance pool balance should be "1111" for the market "ETH/DEC21" + @Liquidation Scenario: 002, LP gets distressed after auction When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -168,8 +167,9 @@ Feature: Replicate LP getting distressed during continuous trading, and after le And the liquidity provisions should have the following states: | id | party | market | commitment amount | status | | lp1 | party0 | ETH/DEC21 | 1000 | STATUS_CANCELLED | - And the insurance pool balance should be "1152" for the market "ETH/DEC21" + And the insurance pool balance should be "1111" for the market "ETH/DEC21" + @Liquidation Scenario: 003, 2 LPs on the market, LP1 gets distressed and closed-out during continuous trading (0042-LIQF-014) When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -228,4 +228,4 @@ Feature: Replicate LP getting distressed during continuous trading, and after le And the market data for the market "ETH/DEC21" should be: | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | | 1055 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 1793 | 1000 | 1700 | - And the insurance pool balance should be "1152" for the market "ETH/DEC21" + And the insurance pool balance should be "1111" for the market "ETH/DEC21" diff --git a/core/integration/features/liquidity-provision/lp-distressed-closeout.feature b/core/integration/features/liquidity-provision/lp-distressed-closeout.feature index 1290f6aa6f..d2d536f583 100644 --- a/core/integration/features/liquidity-provision/lp-distressed-closeout.feature +++ b/core/integration/features/liquidity-provision/lp-distressed-closeout.feature @@ -52,6 +52,7 @@ Feature: Replicate LP getting distressed during continuous trading, and after le | party2 | ETH/DEC21 | sell | 1000 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/DEC21 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + @Liquidation Scenario: 001, LP gets distressed during continuous trading (0042-LIQF-014) When the opening auction period ends for market "ETH/DEC21" And the auction ends with a traded volume of "10" at a price of "1000" @@ -99,11 +100,9 @@ Feature: Replicate LP getting distressed during continuous trading, and after le Then the liquidity provisions should have the following states: | id | party | market | commitment amount | status | | lp1 | party0 | ETH/DEC21 | 1000 | STATUS_CANCELLED | - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | - | 1055 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 1793 | 0 | 17 | - And the insurance pool balance should be "1152" for the market "ETH/DEC21" + And the insurance pool balance should be "1111" for the market "ETH/DEC21" + @Liquidation Scenario: 002, LP gets distressed after auction (0044-LIME-073) When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -175,8 +174,9 @@ Feature: Replicate LP getting distressed during continuous trading, and after le And the liquidity provisions should have the following states: | id | party | market | commitment amount | status | | lp1 | party0 | ETH/DEC21 | 1000 | STATUS_CANCELLED | - And the insurance pool balance should be "1152" for the market "ETH/DEC21" + And the insurance pool balance should be "1111" for the market "ETH/DEC21" + @Liquidation Scenario: 003, 2 LPs on the market, LP1 gets distressed and closed-out during continuous trading (0042-LIQF-014) When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -235,4 +235,4 @@ Feature: Replicate LP getting distressed during continuous trading, and after le And the market data for the market "ETH/DEC21" should be: | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | | 1055 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 1793 | 1000 | 17 | - And the insurance pool balance should be "1152" for the market "ETH/DEC21" + And the insurance pool balance should be "1111" for the market "ETH/DEC21" diff --git a/core/integration/features/liquidity-provision/lp-margin-account-transfer-when-bestorder-change.feature b/core/integration/features/liquidity-provision/lp-margin-account-transfer-when-bestorder-change.feature deleted file mode 100644 index cd6e9a66b3..0000000000 --- a/core/integration/features/liquidity-provision/lp-margin-account-transfer-when-bestorder-change.feature +++ /dev/null @@ -1,145 +0,0 @@ - -Feature: test 0038-OLIQ-008 - Background: - Given the log normal risk model named "lognormal-risk-model-fish": - | risk aversion | tau | mu | r | sigma | - | 0.001 | 0.01 | 0 | 0.0 | 2 | - #rf_short=0.9247862 - #rf_long=0.499476497 - And the price monitoring named "price-monitoring-1": - | horizon | probability | auction extension | - | 36000 | 0.999999999999999 | 300 | - And the margin calculator named "margin-calculator-1": - | search factor | initial factor | release factor | - | 1.2 | 1.5 | 2 | - - And the markets: - | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | - | ETH/DEC19 | ETH | USD | lognormal-risk-model-fish | margin-calculator-1 | 1 | default-none | price-monitoring-1 | default-eth-for-future | 1e6 | 1e6 | default-futures | - - And the following network parameters are set: - | name | value | - | market.liquidity.minimum.probabilityOfTrading.lpOrders | 0.01 | - | network.markPriceUpdateMaximumFrequency | 0s | - | limits.markets.maxPeggedOrders | 2 | - And the average block duration is "1" - - Scenario: If best bid / ask has changed and the LP order volume is moved around to match the new peg levels then the margin requirement for the party may change. There is at most one transfer in / out of the margin account of the LP party as a result of one of the pegs moving. 0038-OLIQ-008 - - Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | aux | USD | 1000000000000 | - | aux2 | USD | 1000000000000 | - | aux3 | USD | 1000000000000 | - | aux4 | USD | 1000000000000 | - | lp | USD | 1000000000000 | - - When the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | lp | ETH/DEC19 | 90000 | 0 | submission | - | lp1 | lp | ETH/DEC19 | 90000 | 0 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | reference | - | lp | ETH/DEC19 | 693 | 693 | buy | BID | 693 | 10 | ice-buy | - | lp | ETH/DEC19 | 530 | 530 | sell | ASK | 530 | 10 | ice-sell | - Then the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | aux3 | ETH/DEC19 | buy | 10 | 140 | 0 | TYPE_LIMIT | TIF_GTC | bestBid | - | aux4 | ETH/DEC19 | sell | 10 | 160 | 0 | TYPE_LIMIT | TIF_GTC | bestOffer | - | aux | ETH/DEC19 | buy | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | | - | aux2 | ETH/DEC19 | sell | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | | - Then the opening auction period ends for market "ETH/DEC19" - And the market data for the market "ETH/DEC19" should be: - | mark price | trading mode | auction trigger | horizon | min bound | max bound | - | 150 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 36000 | 88 | 257 | - - And the liquidity provisions should have the following states: - | id | party | market | commitment amount | status | - | lp1 | lp | ETH/DEC19 | 90000 | STATUS_ACTIVE | - - # LP pegged order should be replaced with respect to LP_price_range rather than price_monitoring_bounds - Then the order book should have the following volumes for market "ETH/DEC19": - | side | price | volume | - | sell | 170 | 530 | - | sell | 160 | 10 | - | buy | 140 | 10 | - | buy | 130 | 693 | - - Then the parties should have the following margin levels: - | party | market id | maintenance | search | initial | release | - | aux3 | ETH/DEC19 | 750 | 900 | 1125 | 1500 | - | aux4 | ETH/DEC19 | 1388 | 1665 | 2082 | 2776 | - | lp | ETH/DEC19 | 73521 | 88225 | 110281 | 147042 | - #lp_margin = max(530*150*0.9247862,693*150*0.499476491)=73521 - - Then the parties should have the following account balances: - | party | asset | market id | margin | general | - | aux3 | USD | ETH/DEC19 | 1050 | 999999998950 | - | aux4 | USD | ETH/DEC19 | 2220 | 999999997780 | - | lp | USD | ETH/DEC19 | 110281 | 999999799719 | - - And the network moves ahead "10" blocks - Then the order book should have the following volumes for market "ETH/DEC19": - | side | price | volume | - | sell | 170 | 530 | - | sell | 160 | 10 | - | buy | 140 | 10 | - | buy | 130 | 693 | - - # update the best offer - When the parties amend the following orders: - | party | reference | price | size delta | tif | - | aux4 | bestOffer | 165 | 0 | TIF_GTC | - And the parties amend the following pegged iceberg orders: - | party | reference | size delta | - | lp | ice-sell | -15 | - - # observe volumes change - Then the order book should have the following volumes for market "ETH/DEC19": - | side | price | volume | - | sell | 175 | 515 | - | sell | 165 | 10 | - | buy | 140 | 10 | - | buy | 130 | 693 | - - Then the parties should have the following margin levels: - | party | market id | maintenance | search | initial | release | - | aux3 | ETH/DEC19 | 750 | 900 | 1125 | 1500 | - | aux4 | ETH/DEC19 | 1388 | 1665 | 2082 | 2776 | - | lp | ETH/DEC19 | 71440 | 85728 | 107160 | 142880 | - - # no transfer in lp account since the existing margin is under release level, and above search level - Then the parties should have the following account balances: - | party | asset | market id | margin | general | - | aux3 | USD | ETH/DEC19 | 1050 | 999999998950 | - | aux4 | USD | ETH/DEC19 | 2220 | 999999997780 | - | lp | USD | ETH/DEC19 | 110281 | 999999799719 | - - # update the best offer - When the parties amend the following orders: - | party | reference | price | size delta | tif | - | aux4 | bestOffer | 220 | 0 | TIF_GTC | - And the parties amend the following pegged iceberg orders: - | party | reference | size delta | - | lp | ice-sell | -123 | - - # observe volumes change - Then the order book should have the following volumes for market "ETH/DEC19": - | side | price | volume | - | sell | 230 | 392 | - | sell | 220 | 10 | - | buy | 140 | 10 | - | buy | 130 | 693 | - - Then the parties should have the following margin levels: - | party | market id | maintenance | search | initial | release | - | aux3 | ETH/DEC19 | 750 | 900 | 1125 | 1500 | - | aux4 | ETH/DEC19 | 1388 | 1665 | 2082 | 2776 | - | lp | ETH/DEC19 | 54378 | 65253 | 81567 | 108756 | - - # transder from general to margin account since the existing margin account is above release level - Then the parties should have the following account balances: - | party | asset | market id | margin | general | - | aux3 | USD | ETH/DEC19 | 1050 | 999999998950 | - | aux4 | USD | ETH/DEC19 | 2220 | 999999997780 | - | lp | USD | ETH/DEC19 | 81567 | 999999828433 | \ No newline at end of file diff --git a/core/integration/features/margin/0019-MCAL-032.feature b/core/integration/features/margin/0019-MCAL-032.feature new file mode 100644 index 0000000000..6fc30acb63 --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-032.feature @@ -0,0 +1,248 @@ +Feature: Test magin under isolated margin mode + Background: + # Set liquidity parameters to allow "zero" target-stake which is needed to construct the order-book defined in the ACs + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + | ETH/MAR23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 100 | 0 | default-futures | + @SLABug + Scenario: Check margin update when switch between margin modes (0019-MCAL-031, 0019-MCAL-032) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 100000000000 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider | ETH/FEB23 | buy | 1 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | + | party | ETH/FEB23 | sell | 1 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/MAR23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider | ETH/MAR23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider | ETH/MAR23 | buy | 1 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | + | party | ETH/MAR23 | sell | 1 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/MAR23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/MAR23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | + # Checks for 0019-MCAL-031 + When the network moves ahead "2" blocks + # Check mark-price matches the specification + Then the mark price should be "15900" for the market "ETH/FEB23" + # Check order book matches the specification + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | buy | 14900 | 10 | + | buy | 15000 | 1 | + | sell | 100000 | 1 | + | sell | 100100 | 10 | + # Check party margin levels match the specification + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | party | ETH/FEB23 | 5565 | 6121 | 6678 | 7791 | + #margin = min((100000-15900), 15900*(0.25))+0.1*15900=5565 + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 6678 | 99999890494 | + + #AC: 0019-MCAL-032, switch to isolated margin is rejected becuase selected margin factor is too small + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party | ETH/FEB23 | isolated margin | 0.11 | required position margin must be greater than initial margin | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 5565 | 6121 | 6678 | 7791 | cross margin | 0.9 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 6678 | 99999890494 | + + And the network moves ahead "1" blocks + #AC: 0019-MCAL-033, switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party | ETH/FEB23 | isolated margin | 0.9 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 14310 | 99999882862 | + And the network moves ahead "2" blocks + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 5565 | 0 | 6678 | 0 | isolated margin | 0.9 | 0 | + + #AC: 0019-MCAL-031, decrease margin factor + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party | ETH/FEB23 | isolated margin | 0.7 | | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 11130 | 99999886042 | + And the network moves ahead "2" blocks + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 5565 | 0 | 6678 | 0 | isolated margin | 0.9 | 0 | + + #AC: 0019-MCAL-059, increase margin factor + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party | ETH/FEB23 | isolated margin | 0.9 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 14310 | 99999882862 | + And the network moves ahead "2" blocks + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 5565 | 0 | 6678 | 0 | isolated margin | 0.9 | 0 | + + #AC: 0019-MCAL-065, switch margin mode from isolated margin to cross margin when party holds position only + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party | ETH/FEB23 | cross margin | | + And the network moves ahead "1" blocks + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 5565 | 6121 | 6678 | 7791 | cross margin | 0 | 0 | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 14310 | 99999882862 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party | ETH/FEB23 | isolated margin | 0.9 | + And the network moves ahead "1" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 14310 | 99999882862 | + + #trigger MTM + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 15910 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15910 | 1 | TYPE_LIMIT | TIF_GTC | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 14310 | 99999882862 | + + And the network moves ahead "1" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 14300 | 99999882862 | + + #AC: 0019-MCAL-034, party places a new order which can not offset their position + #addional margin should be: limit price x current position x new margin factor = 15910 x 10 x 0.9 = 143190 + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party | ETH/FEB23 | sell | 10 | 15912 | 0 | TYPE_LIMIT | TIF_GTC | sell-10 | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 14300 | 99999739654 | 143208 | + + #AC 0019-MCAL-060, Amend order,check the updated order margin + When the parties amend the following orders: + | party | reference | price | size delta | tif | + | party | sell-10 | 15912 | -5 | TIF_GTC | + # And the network moves ahead "1" blocks + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 14300 | 99999811258 | 71604 | + + #AC 0019-MCAL-061, party's order get partially filled, check the updated margin account and order account + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 3 | 15912 | 1 | TYPE_LIMIT | TIF_GTC | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 57262 | 99999811258 | 28642 | + + Then the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | sell | 15912 | 2 | + + #AC: 0019-MCAL-063, switch margin mode from isolated margin to cross margin when party holds both position and orders + And the parties submit update margin mode: + | party | market | margin_mode | + | party | ETH/FEB23 | cross margin | + + And the network moves ahead "1" blocks + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | order | margin factor | + | party | ETH/FEB23 | 25460 | 28006 | 30552 | 35644 | cross margin | 0 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 30552 | 99999866608 | 0 | + + #AC: 0019-MCAL-064, switch margin mode from cross margin to isolated margin when party holds both position and orders + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party | ETH/FEB23 | isolated margin | 0.9 | + And the network moves ahead "1" blocks + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | order | margin factor | + | party | ETH/FEB23 | 22277 | 0 | 26732 | 0 | isolated margin | 28641 | 0.9 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 57272 | 99999811247 | 28641 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 15912 | 1 | TYPE_LIMIT | TIF_GTC | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 71592 | 99999811247 | 14321 | + + #AC 0019-MCAL-062, when party has no orders, the order margin account shoule be 0 + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 15912 | 1 | TYPE_LIMIT | TIF_GTC | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 85912 | 99999811248 | 0 | + + #AC: 0019-MCAL-038,when party places a new order which can offset the party's position, no additional margin will be needed + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party | ETH/FEB23 | buy | 3 | 15912 | 0 | TYPE_LIMIT | TIF_GTC | + And the network moves ahead "1" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 85912 | 99999811248 | 0 | + + #AC: 0019-MCAL-039,when party places a large order which can offset all of the party's position and then add new orders, additional margin will be needed + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party | ETH/FEB23 | buy | 10 | 15912 | 0 | TYPE_LIMIT | TIF_GTC | + And the network moves ahead "1" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 85912 | 99999711003 | 100245 | + + + + diff --git a/core/integration/features/margin/0019-MCAL-037.feature b/core/integration/features/margin/0019-MCAL-037.feature new file mode 100644 index 0000000000..247b50746b --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-037.feature @@ -0,0 +1,293 @@ +Feature: Test magin under isolated margin mode when there is not enough collateral + Background: + # Set liquidity parameters to allow "zero" target-stake which is needed to construct the order-book defined in the ACs + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + + Scenario: 001 Check margin update when party does not have sufficient collateral + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | party-sell | + | party1 | ETH/FEB23 | sell | 3 | 16100 | 0 | TYPE_LIMIT | TIF_GTC | party1-sell | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + # Checks for 0019-MCAL-031 + When the network moves ahead "2" blocks + # Check mark-price matches the specification + Then the mark price should be "15900" for the market "ETH/FEB23" + # Check order book matches the specification + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | buy | 14900 | 10 | + | buy | 15000 | 1 | + | sell | 100000 | 1 | + | sell | 100100 | 10 | + # Check party margin levels match the specification + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | party | ETH/FEB23 | 9540 | 10494 | 11448 | 13356 | + #margin = min(3*(100000-15900), 15900*(0.25))+0.1*15900=5565 + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 11448 | 36602 | + + #AC: 0019-MCAL-032, switch to isolated margin is rejected becuase selected margin factor is too small + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party | ETH/FEB23 | isolated margin | 0.11 | required position margin must be greater than initial margin | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 9540 | 10494 | 11448 | 13356 | cross margin | 0.9 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 11448 | 36602 | + + And the network moves ahead "1" blocks + + #AC: 0019-MCAL-066, 0019-MCAL-037 switch to isolated margin is rejected when party got insufficent balance + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party | ETH/FEB23 | isolated margin | 0.9 | insufficient balance in general account to cover for required order margin | + And the network moves ahead "2" blocks + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 9540 | 10494 | 11448 | 13356 | cross margin | 0.9 | 0 | + + #AC: 0019-MCAL-066 switch to isolated margin is accepted when party has sufficent balance + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party | ETH/FEB23 | isolated margin | 0.5 | + | party1 | ETH/FEB23 | isolated margin | 0.3 | + And the network moves ahead "2" blocks + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 4770 | 0 | 5724 | 0 | isolated margin | 0.5 | 23850 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 23850 | 350 | 23850 | + + #AC 0019-MCAL-035 order will be rejected if the party does not have enough asset in the general account + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | error | + | party | ETH/FEB23 | sell | 10 | 15910 | 0 | TYPE_LIMIT | TIF_GTC | sell-order-1 | margin check failed | + + #trigger MTM with party has both short position and short orders + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 15890 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15890 | 1 | TYPE_LIMIT | TIF_GTC | + + And the network moves ahead "1" blocks + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 23880 | 350 | 23850 | + + #trigger more MTM with party has both short position and short orders + #AC 0019-MCAL-067:When the mark price moves, the margin account should be updated while order margin account should not + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 15850 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15850 | 1 | TYPE_LIMIT | TIF_GTC | + + And the network moves ahead "1" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 24000 | 350 | 23850 | + + #AC 0019-MCAL-068 amend the order so that new side margin + margin account balance < maintenance margin, the remainding should be stopped + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party | party-sell | 19000 | 0 | TIF_GTC | margin check failed | + # If the new side margin + margin account balance < maintenance margin => + # As the evaluation is the result of any other position/order update, all open orders are stopped and margin re-evaluated. + + And the orders should have the following status: + | party | reference | status | + | party | party-sell | STATUS_STOPPED | + And the network moves ahead "1" blocks + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.3 | 14490 | + + #AC 0019-MCAL-069 when order is partially filled, the order margin should be udpated + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 16100 | 1 | TYPE_LIMIT | TIF_GTC | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 1835 | 0 | 2202 | 0 | isolated margin | 0.3 | 9660 | + + @MCAL037 + Scenario: 002 replicate panic in testnet: when party has an long order and they increase the price, (the order would be filled and then party does not have enough to cover the margin), the order should be stopped + #and for party1, part of the orders are filled immediately, and the rest should fail + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 3000 | + | party1 | USD | 30000 | + | party2 | USD | 100000000000 | + | party3 | USD | 100000000000 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | party-buy | + | party1 | ETH/FEB23 | buy | 10 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | party1-buy | + | buySideProvider | ETH/FEB23 | buy | 10 | 15400 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 3 | 16900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 3 | 17000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + # Check mark-price matches the specification + Then the mark price should be "15900" for the market "ETH/FEB23" + # Check order book matches the specification + + # Check party margin levels match the specification + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | party | ETH/FEB23 | 1590 | 1749 | 1908 | 2226 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 1800 | 1200 | + | party1 | USD | ETH/FEB23 | 18000 | 12000 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party | ETH/FEB23 | isolated margin | 0.2 | | + | party1 | ETH/FEB23 | isolated margin | 0.2 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 0 | 0 | 0 | | isolated margin | 0.2 | 3000 | + | party1 | ETH/FEB23 | 0 | 0 | 0 | | isolated margin | 0.2 | 30000 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 0 | 0 | 3000 | + | party1 | USD | ETH/FEB23 | 0 | 0 | 30000 | + + And the network moves ahead "1" blocks + + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party | party-buy | 16900 | 0 | TIF_GTC | margin check failed | + | party1 | party1-buy | 16900 | 0 | TIF_GTC | | + + And the orders should have the following status: + | party | reference | status | + | party | party-buy | STATUS_STOPPED | + | party1 | party1-buy | STATUS_STOPPED | + + Then the network moves ahead "2" blocks + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 0 | 0 | 0 | | isolated margin | 0.2 | 0 | + | party1 | ETH/FEB23 | 5070 | 0 | 6084 | | isolated margin | 0.2 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 0 | 3000 | 0 | + | party1 | USD | ETH/FEB23 | 10140 | 0 | 19860 | + When the parties submit update margin mode: + | party | market | margin_mode | + | party1 | ETH/FEB23 | cross margin | + Then the network moves ahead "2" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 30000 | 0 | 0 | + + Scenario: 003 test when party holds short orders + #and for party1, part of the orders are filled immediately, and the rest should fail + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 33800 | + | party1 | USD | 200000 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 10 | 16900 | 0 | TYPE_LIMIT | TIF_GTC | party-sell | + | party1 | ETH/FEB23 | sell | 10 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | party1-sell | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + # Check mark-price matches the specification + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party | ETH/FEB23 | isolated margin | 0.2 | | + | party1 | ETH/FEB23 | isolated margin | 0.2 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 0 | 0 | 0 | | isolated margin | 0.2 | 33800 | + | party1 | ETH/FEB23 | 0 | 0 | 0 | | isolated margin | 0.2 | 200000 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 0 | 0 | 33800 | + | party1 | USD | ETH/FEB23 | 0 | 0 | 200000 | + + And the network moves ahead "1" blocks + + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party | party-sell | 14900 | 0 | TIF_GTC | margin check failed | + | party1 | party1-sell | 14900 | 0 | TIF_GTC | margin check failed | + + And the orders should have the following status: + | party | reference | status | + | party | party-sell | STATUS_STOPPED | + | party1 | party1-sell | STATUS_STOPPED | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 0 | 0 | 0 | | isolated margin | 0.2 | 0 | + | party1 | ETH/FEB23 | 0 | 0 | 0 | | isolated margin | 0.2 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 0 | 33800 | 0 | + | party1 | USD | ETH/FEB23 | 0 | 200000 | 0 | diff --git a/core/integration/features/margin/0019-MCAL-041.feature b/core/integration/features/margin/0019-MCAL-041.feature new file mode 100644 index 0000000000..da357fb74a --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-041.feature @@ -0,0 +1,144 @@ +Feature: Test order margin during auction + Background: + # Set liquidity parameters to allow "zero" target-stake which is needed to construct the order-book defined in the ACs + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 2 | + Given the average block duration is "1" + + Scenario: Check order margin during openning auction + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 2 | 15910 | 0 | TYPE_LIMIT | TIF_GTC | s-GTC-2 | + | party1 | ETH/FEB23 | sell | 1 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | s-GTC-1 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 0 | TRADING_MODE_OPENING_AUCTION | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 4774 | 5251 | 5728 | 6683 | cross margin | 0 | 0 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.3 | | + + #AC: 0019-MCAL-200, when party has no position, and place 2 short orders during auction, order margin should be updated + #order margin short: (2*15910+1*15920)*0.3=14322 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 14322 | + + #AC: 0019-MCAL-201, when party has no position, and place short orders size -3 during auction, and long order size 1 which can offset, order margin should be updated using max(price, markPrice, indicativePrice) + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | buy | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | b-GTC-1 | + + #order margin short: (2*15910+1*15920)*0.3=14322 + #order margin long: 1*15800*0.3=5750 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 14322 | + + #AC: 0019-MCAL-202, when party has no position, and place short orders size -3 during auction, and long orders size 2 which can offset, order margin should be updated using max(price, markPrice, indicativePrice) + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | buy | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | b-GTC-2 | + + #order margin short: (2*15910+1*15920)*0.3=14322 + #order margin long: 2*15800*0.3=9480 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 14322 | + + #AC: 0019-MCAL-203, when party has no position, and place short orders size -3 during auction, and long orders size 3 which can offset, order margin should be updated using max(price, markPrice, indicativePrice) + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | buy | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | b-GTC-3 | + + #order margin short: (2*15910+1*15920)*0.3=14322 + #order margin long: 3*15800*0.3=14220 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 14322 | + + #AC: 0019-MCAL-204, when party has no position, and place short orders size -3 during auction, and long orders size 4, which is over the offset size, order margin should be updated using max(price, markPrice, indicativePrice) + #order margin short: (2*15910+1*15920)*0.3=14322 + #order margin long: 4*15900*0.3=19080 + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | buy | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | b-GTC-4 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 19080 | + + #AC: 0019-MCAL-205,When the party changes the order price during auction, order margin should be updated using max(price, markPrice, indicativePrice) + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | b-GTC-3 | 15750 | 0 | TIF_GTC | | + When the network moves ahead "1" blocks + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.3 | 19080 | + + #AC: 0019-MCAL-206,When the party reduces the order size only during auction, the order margin should be reduced + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | b-GTC-4 | 15800 | -1 | TIF_GTC | | + + And the orders should have the following status: + | party | reference | status | + | party1 | b-GTC-4 | STATUS_CANCELLED | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 14322 | + When the network moves ahead "2" blocks + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15900 | TRADING_MODE_CONTINUOUS | + + #order margin long: 3*15800*0.3=14220 + #order margin short: (2*15910+1*15920)*0.3=14322 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 14322 | + + #AC: 0019-MCAL-207, when party has no position, and place 2 short orders size 3 and 4 long orders of size 4, which is over the offset size, order margin should be updated using max(price, markPrice, indicativePrice) + #order margin long: (3*15800+15750)*0.3=18945 + #order margin short: (2*15910+1*15920)*0.3=14322 + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | buy | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | b-GTC-4 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 18945 | + diff --git a/core/integration/features/margin/0019-MCAL-042.feature b/core/integration/features/margin/0019-MCAL-042.feature new file mode 100644 index 0000000000..7b001879dc --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-042.feature @@ -0,0 +1,166 @@ +Feature: Test order margin during continuous + Background: + # Set liquidity parameters to allow "zero" target-stake which is needed to construct the order-book defined in the ACs + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.2 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | 1 | default-futures | + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 2 | + Given the average block duration is "1" + + Scenario: Check order margin during continuous + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 100 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | buy | 20 | 15800 | 0 | TYPE_LIMIT | TIF_GFA | b-GFA-1 | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 20 | 15910 | 0 | TYPE_LIMIT | TIF_GTC | s-GTC-2 | + | party1 | ETH/FEB23 | sell | 10 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | s-GTC-1 | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 100 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "3" blocks + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15900 | TRADING_MODE_CONTINUOUS | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 9540 | 10494 | 11448 | 13356 | cross margin | 0 | 0 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.3 | | + + #AC: 0019-MCAL-220, GFA order added during auction should not be used to count order margin in continuous + #AC: 0019-MCAL-221, when party has no position, and place 2 short orders during auction, order margin should be updated + #order margin short: (2*15910+1*15920)*0.3=14322 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 14322 | + + #AC: 0019-MCAL-222,When the party increases the order price during continunous, order margin should increase + #order margin short: (2*15912+1*15920)*0.3=14323 + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | s-GTC-2 | 15912 | 0 | TIF_GTC | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 14323 | + + #AC: 0019-MCAL-223,When the party decreases the order price during continunous, order margin should decrease + #order margin short: (2*15902+1*15920)*0.3=14317 + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | s-GTC-2 | 15902 | 0 | TIF_GTC | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 14317 | + + #AC: 0019-MCAL-224,When the party decreases the order volume during continunous, order margin should decrease + #AC: 0019-MCAL-090,A feature test that checks margin in case market PDP > 0 is created and passes. + #order margin short: (1*15902+1*15920)*0.3=9546 + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | s-GTC-2 | 15902 | -10 | TIF_GTC | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 9546 | + + #AC: 0019-MCAL-225,When the party increases the order volume while decrease price during continunous, order margin should update accordingly + #order margin short: (4*15900+1*15920)*0.3=23856 + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | s-GTC-2 | 15900 | 30 | TIF_GTC | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 23856 | + + #AC: 0019-MCAL-226,When the party's order is partially filled during continunous, order margin should update accordingly + #order margin short: (3*15900+1*15920)*0.3=19086 + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 1 | TYPE_LIMIT | TIF_GTC | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 3180 | 0 | 3816 | 0 | isolated margin | 0.3 | 19086 | + + When the network moves ahead "1" blocks + + #AC: 0019-MCAL-227,When the party cancel one of the two orders during continunous, order margin should be reduced + #order margin short: (3*15900+0*15920)*0.3=14310 + When the parties amend the following orders: + | party | reference | size delta | tif | error | + | party1 | s-GTC-1 | -10 | TIF_GTC | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 3180 | 0 | 3816 | 0 | isolated margin | 0 | 14310 | + + #AC: 0019-MCAL-228, place a GFA order duing continuous, order should be rejected + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | error | + | party1 | ETH/FEB23 | buy | 10 | 15800 | 0 | TYPE_LIMIT | TIF_GFA | GFA-1 | gfa order received during continuous trading | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 3180 | 0 | 3816 | 0 | isolated margin | 0 | 14310 | + + #AC: 0019-MCAL-229,When the party has position -1 and order -3, and new long order with size 1 will be offset + #order margin short: 3*15900*0.3=14310 + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | buy | 10 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 3180 | 0 | 3816 | 0 | isolated margin | 0.3 | 14310 | + + #AC: 0019-MCAL-230,When the party has position -1 and order -3, and new long orders with size 2 will be offset + #order margin short: 3*15900*0.3=14310 + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | buy | 10 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 3180 | 0 | 3816 | 0 | isolated margin | 0.3 | 14310 | + + #AC: 0019-MCAL-231,When the party has position -1 and order -3, and new long orders with size 3 will be offset + #order margin short: 3*15900*0.3=14310 + #order margin short: 3*15800*0.3=14220 + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | buy | 10 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 3180 | 0 | 3816 | 0 | isolated margin | 0.3 | 14310 | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15900 | TRADING_MODE_CONTINUOUS | diff --git a/core/integration/features/margin/0019-MCAL-043.feature b/core/integration/features/margin/0019-MCAL-043.feature new file mode 100644 index 0000000000..0e7cb0a1f2 --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-043.feature @@ -0,0 +1,1173 @@ +Feature: Iceberg orders in isolated margin mode + + Background: + Given the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/DEC19 | BTC | BTC | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e6 | 0 | default-futures | + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 1500 | + Given the average block duration is "1" + + @iceberg + Scenario: 001 Iceberg order submission with valid TIF's + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + + When the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | only | + | party1 | ETH/DEC19 | buy | 100 | 10 | 0 | TYPE_LIMIT | TIF_GTC | 10 | 5 | post | + + Then the iceberg orders should have the following states: + | party | market id | side | visible volume | price | status | reserved volume | + | party1 | ETH/DEC19 | buy | 10 | 10 | STATUS_ACTIVE | 90 | + + When the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | expires in | peak size | minimum visible size | only | + | party2 | ETH/DEC19 | buy | 100 | 10 | 0 | TYPE_LIMIT | TIF_GTT | 3600 | 8 | 4 | post | + + Then the iceberg orders should have the following states: + | party | market id | side | visible volume | price | status | reserved volume | + | party2 | ETH/DEC19 | buy | 8 | 10 | STATUS_ACTIVE | 92 | + + @iceberg + Scenario: 002 An iceberg order with either an ordinary can be submitted, and iceberg order with pegged limit price will be rejected + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + + Given the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party2 | ETH/DEC19 | buy | 1 | 10 | 0 | TYPE_LIMIT | TIF_GTC | best-bid | + | party2 | ETH/DEC19 | sell | 1 | 20 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | + When the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | reference | + | party1 | ETH/DEC19 | buy | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 3 | 1 | ordinary-iceberg | + And the parties place the following pegged iceberg orders: + | party | market id | side | volume | resulting trades | type | tif | peak size | minimum visible size | pegged reference | offset | reference | error | + | party1 | ETH/DEC19 | buy | 10 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | BID | 1 | pegged-iceberg | invalid OrderError | + Then the order book should have the following volumes for market "ETH/DEC19": + | side | price | volume | + | buy | 5 | 3 | + | buy | 9 | 0 | + | buy | 10 | 1 | + + # Move best-bid and check pegged iceberg order is re-priced + When the parties amend the following orders: + | party | reference | price | size delta | tif | + | party2 | best-bid | 9 | 0 | TIF_GTC | + Then the order book should have the following volumes for market "ETH/DEC19": + | side | price | volume | + | buy | 5 | 3 | + | buy | 8 | 0 | + | buy | 9 | 1 | + + @iceberg + Scenario: 003 Iceberg order margin calculation + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + + When the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | only | reference | + | party1 | ETH/DEC19 | buy | 100 | 10 | 0 | TYPE_LIMIT | TIF_GTC | 10 | 5 | post | iceberg-order-1 | + + Then the iceberg orders should have the following states: + | party | market id | side | visible volume | price | status | reserved volume | + | party1 | ETH/DEC19 | buy | 10 | 10 | STATUS_ACTIVE | 90 | + + #order margin level: 10*100*0.15=150 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 150 | + + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | BTC | ETH/DEC19 | 0 | 9850 | + + # And another party places a normal limit order for the same price and quantity, then the same margin should be taken + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party2 | ETH/DEC19 | buy | 100 | 10 | 0 | TYPE_LIMIT | TIF_GTC | normal-limit-order-1 | + + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | party2 | BTC | ETH/DEC19 | 26 | 9974 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party2 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party2 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 150 | + + # Now we cancel the iceberg order + Then the parties cancel the following orders: + | party | reference | + | party1 | iceberg-order-1 | + + # And the margin taken for the iceberg order is released + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | BTC | ETH/DEC19 | 0 | 10000 | + + # Now we cancel the normal limit order + Then the parties cancel the following orders: + | party | reference | + | party2 | normal-limit-order-1 | + + # And the margin taken for the normal limit order is released + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | party2 | BTC | ETH/DEC19 | 0 | 10000 | + + @iceberg + Scenario: 004 iceberg basic refresh + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + When the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | + | party1 | ETH/DEC19 | buy | 100 | 10 | 0 | TYPE_LIMIT | TIF_GTC | 10 | 5 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 150 | + + Then the iceberg orders should have the following states: + | party | market id | side | visible volume | price | status | reserved volume | + | party1 | ETH/DEC19 | buy | 10 | 10 | STATUS_ACTIVE | 90 | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2 | ETH/DEC19 | sell | 6 | 10 | 1 | TYPE_LIMIT | TIF_GTC | + + Then the iceberg orders should have the following states: + | party | market id | side | visible volume | price | status | reserved volume | + | party1 | ETH/DEC19 | buy | 10 | 10 | STATUS_ACTIVE | 84 | + + #order margin: 10*94*0.15=141 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 2 | 0 | 2 | 0 | isolated margin | 0.15 | 141 | + + @iceberg + Scenario: 005 Iceberg order trading during auction uncrossing + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | party3 | BTC | 10000 | + | aux | BTC | 100000 | + | lpprov | BTC | 90000000 | + + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + + Given the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | peak size | minimum visible size | + | party1 | ETH/DEC19 | buy | 10 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 2 | 1 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2 | ETH/DEC19 | buy | 8 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + When the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | peak size | minimum visible size | + | party3 | ETH/DEC19 | sell | 10 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 2 | 1 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 3 | + And the opening auction period ends for market "ETH/DEC19" + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + # Check only the display volume of party1 is filled and is refreshed at the back of the que + And the following trades should be executed: + | buyer | seller | price | size | + | party1 | party3 | 2 | 2 | + # Check the remaining volume of party3s iceberg is filled in a single trade with party2 + And the following trades should be executed: + | buyer | seller | price | size | + | party2 | party3 | 2 | 8 | + + @iceberg + @margin + Scenario: 006 Iceberg increase size success and not losing position in order book + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | party3 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + + And the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | peak size | minimum visible size | + | party1 | ETH/DEC19 | sell | 50 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 2 | 1 | + | party2 | ETH/DEC19 | sell | 5 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-2 | 2 | 1 | + + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | BTC | ETH/DEC19 | 0 | 9985 | 15 | + + # increasing size + Then the parties amend the following orders: + | party | reference | price | size delta | tif | + | party1 | this-order-1 | 2 | 50 | TIF_GTC | + + # the visible is the same and only the reserve amount has increased + Then the iceberg orders should have the following states: + | party | market id | side | visible volume | price | status | reserved volume | + | party1 | ETH/DEC19 | sell | 2 | 2 | STATUS_ACTIVE | 98 | + + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | BTC | ETH/DEC19 | 0 | 9970 | 30 | + + # matching the order now + # this should match with the size 2 order of party1 + Then the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party3 | ETH/DEC19 | buy | 2 | 2 | 1 | TYPE_LIMIT | TIF_GTC | party3 | + + Then the following trades should be executed: + | buyer | seller | price | size | + | party3 | party1 | 2 | 2 | + + @iceberg + Scenario: 007 Iceberg decrease size success and not losing position in order book + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | party3 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + And the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | peak size | minimum visible size | + | party1 | ETH/DEC19 | sell | 100 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 2 | 1 | + | party2 | ETH/DEC19 | sell | 100 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-2 | 2 | 1 | + + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | BTC | ETH/DEC19 | 0 | 9970 | 30 | + + # decreasing size + Then the parties amend the following orders: + | party | reference | price | size delta | tif | + | party1 | this-order-1 | 2 | -50 | TIF_GTC | + + # the visible is the same and only the reserve amount has decreased + Then the iceberg orders should have the following states: + | party | market id | side | visible volume | price | status | reserved volume | + | party1 | ETH/DEC19 | sell | 2 | 2 | STATUS_ACTIVE | 48 | + + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | BTC | ETH/DEC19 | 0 | 9985 | 15 | + + # matching the order now + # this should match with the size 2 order of party1 + Then the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party3 | ETH/DEC19 | buy | 2 | 2 | 1 | TYPE_LIMIT | TIF_GTC | party3 | + + Then the following trades should be executed: + | buyer | seller | price | size | + | party3 | party1 | 2 | 2 | + + @iceberg + Scenario: 008 Iceberg amend price reenters aggressively + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + And the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | peak size | minimum visible size | + | party1 | ETH/DEC19 | sell | 16 | 5 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 5 | 1 | + | party2 | ETH/DEC19 | buy | 10 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-2 | 2 | 1 | + + # amend the buy order so that it will cross with the other iceberg + Then the parties amend the following orders: + | party | reference | price | size delta | tif | + | party2 | this-order-2 | 5 | 0 | TIF_GTC | + + # the amended iceberg will trade aggressively and be fully consumed + Then the iceberg orders should have the following states: + | party | market id | side | visible volume | price | status | reserved volume | + | party1 | ETH/DEC19 | sell | 5 | 5 | STATUS_ACTIVE | 1 | + | party2 | ETH/DEC19 | buy | 0 | 5 | STATUS_FILLED | 0 | + + @margin + @iceberg + Scenario: 009 Cancelling an active iceberg order + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + + Given the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | reference | + | party1 | ETH/DEC19 | buy | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | BTC | ETH/DEC19 | 0 | 9925 | 75 | + And the order book should have the following volumes for market "ETH/DEC19": + | side | price | volume | + | buy | 5 | 2 | + When the parties cancel the following orders: + | party | reference | + | party1 | iceberg | + # The order should be cancelled + Then the iceberg orders should have the following states: + | party | market id | side | visible volume | price | status | reserved volume | reference | + | party1 | ETH/DEC19 | buy | 2 | 5 | STATUS_CANCELLED | 98 | iceberg | + # The margin released + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | BTC | ETH/DEC19 | 0 | 10000 | 0 | + # And the order book updated + And the order book should have the following volumes for market "ETH/DEC19": + | side | price | volume | + | buy | 5 | 0 | + + @iceberg + Scenario: 010 An aggressive iceberg order crosses an order with volume > iceberg volume + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000000000 | + | party2 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | reference | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | p-1 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | p-2 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 20 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + + When the network moves ahead "1" blocks + And the orders should have the following status: + | party | reference | status | + | lpprov | p-1 | STATUS_PARKED | + | lpprov | p-2 | STATUS_ACTIVE | + + Given the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2 | ETH/DEC19 | sell | 15 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the order book should have the following volumes for market "ETH/DEC19": + | side | price | volume | + | sell | 105 | 2 | + | sell | 5 | 15 | + + #requried position margin: 10*5*0.15 = 7.5 + #maintenance margin: 10*min(5, 2*1e6)+10*0.1*2=52 + When the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | error | + | party1 | ETH/DEC19 | buy | 10 | 5 | 1 | TYPE_LIMIT | TIF_GTC | 2 | 1 | margin check failed | + + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | BTC | ETH/DEC19 | 0 | 10000000000 | 0 | + + @iceberg + Scenario: 011 An aggressive iceberg order crosses an order with volume < iceberg volume + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + + Given the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2 | ETH/DEC19 | sell | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + When the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | error | + | party1 | ETH/DEC19 | buy | 15 | 5 | 1 | TYPE_LIMIT | TIF_GTC | 2 | 1 | margin check failed | + + @iceberg + Scenario: 012 A passive iceberg order (the only order at the price level) crosses an order with volume > iceberg volume + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + + Given the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | + | party1 | ETH/DEC19 | buy | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2 | ETH/DEC19 | sell | 15 | 5 | 1 | TYPE_LIMIT | TIF_GTC | + Then the following trades should be executed: + | buyer | seller | price | size | + | party1 | party2 | 5 | 10 | + And the iceberg orders should have the following states: + | party | market id | side | visible volume | price | status | reserved volume | + | party1 | ETH/DEC19 | buy | 0 | 5 | STATUS_FILLED | 0 | + + @iceberg + Scenario: 013 A passive iceberg order (one of multiple orders at the price level) crosses an order with volume > iceberg volume + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | party3 | BTC | 10000 | + | party4 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + Given the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | + | party1 | ETH/DEC19 | buy | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2 | ETH/DEC19 | buy | 7 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | buy | 7 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party4 | ETH/DEC19 | sell | 15 | 5 | 3 | TYPE_LIMIT | TIF_GTC | + Then the following trades should be executed: + | buyer | seller | price | size | + | party1 | party4 | 5 | 2 | + | party2 | party4 | 5 | 7 | + | party3 | party4 | 5 | 6 | + And the iceberg orders should have the following states: + | party | market id | side | visible volume | price | status | reserved volume | + | party1 | ETH/DEC19 | buy | 2 | 5 | STATUS_ACTIVE | 6 | + + @iceberg + Scenario: 014 An aggressive iceberg order crosses orders where the cumulative volume > iceberg volume + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | party3 | BTC | 10000 | + | party4 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + Given the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2 | ETH/DEC19 | sell | 30 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | sell | 40 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + | party4 | ETH/DEC19 | sell | 50 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + When the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | error | + | party1 | ETH/DEC19 | buy | 100 | 5 | 3 | TYPE_LIMIT | TIF_GTC | 2 | 1 | margin check failed | + + @iceberg + Scenario: 015 An aggressive iceberg order crosses orders where the cumulative volume < iceberg volume + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | party3 | BTC | 10000 | + | party4 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + Given the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2 | ETH/DEC19 | sell | 30 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | sell | 40 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + When the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | error | + | party1 | ETH/DEC19 | buy | 100 | 5 | 2 | TYPE_LIMIT | TIF_GTC | 2 | 1 | margin check failed | + + @iceberg + Scenario: 016 Amended order trades with iceberg order triggering a refresh + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | party3 | BTC | 10000 | + | party4 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + Given the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | + | party1 | ETH/DEC19 | sell | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party2 | ETH/DEC19 | buy | 7 | 4 | 0 | TYPE_LIMIT | TIF_GTC | order-to-amend | + | party3 | ETH/DEC19 | sell | 5 | 5 | 0 | TYPE_LIMIT | TIF_GTC | | + When the parties amend the following orders: + | party | reference | price | size delta | tif | + | party2 | order-to-amend | 5 | 0 | TIF_GTC | + Then the following trades should be executed: + | buyer | seller | price | size | + | party2 | party1 | 5 | 2 | + | party2 | party3 | 5 | 5 | + And the iceberg orders should have the following states: + | party | market id | side | visible volume | price | status | reserved volume | + | party1 | ETH/DEC19 | sell | 2 | 5 | STATUS_ACTIVE | 6 | + + @iceberg + Scenario: 017 Attempting to wash trade with iceberg orders + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | party3 | BTC | 10000 | + | party4 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + Given the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2 | ETH/DEC19 | sell | 5 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | sell | 5 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + And the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | reference | + | party1 | ETH/DEC19 | sell | 5 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | error | + | party1 | ETH/DEC19 | buy | 20 | 5 | 0 | TYPE_LIMIT | TIF_GTC | normal | margin check failed | + + And the iceberg orders should have the following states: + | party | market id | reference | side | visible volume | price | status | reserved volume | + | party1 | ETH/DEC19 | iceberg | sell | 2 | 5 | STATUS_ACTIVE | 3 | + + @iceberg + Scenario: 018 An order matches multiple icebergs at the same level where the order volume < cumulative iceberg display volume + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | party3 | BTC | 10000 | + | party4 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + Given the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | reference | + | party1 | ETH/DEC19 | sell | 200 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + | party2 | ETH/DEC19 | sell | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + | party3 | ETH/DEC19 | sell | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party4 | ETH/DEC19 | buy | 300 | 5 | 3 | TYPE_LIMIT | TIF_GTC | + Then the following trades should be executed: + | buyer | seller | price | size | + | party4 | party1 | 5 | 150 | + | party4 | party2 | 5 | 75 | + | party4 | party3 | 5 | 75 | + And the iceberg orders should have the following states: + | party | market id | side | visible volume | price | status | reserved volume | + | party1 | ETH/DEC19 | sell | 2 | 5 | STATUS_ACTIVE | 48 | + | party2 | ETH/DEC19 | sell | 2 | 5 | STATUS_ACTIVE | 23 | + | party3 | ETH/DEC19 | sell | 2 | 5 | STATUS_ACTIVE | 23 | + + @iceberg + Scenario: 019 An order matches multiple icebergs at the same level where the order volume > cumulative iceberg display volume + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | party3 | BTC | 10000 | + | party4 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + Given the parties place the following iceberg orders: + | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | reference | + | party1 | ETH/DEC19 | sell | 200 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + | party2 | ETH/DEC19 | sell | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + | party3 | ETH/DEC19 | sell | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party4 | ETH/DEC19 | buy | 600 | 5 | 3 | TYPE_LIMIT | TIF_GTC | + Then the following trades should be executed: + | buyer | seller | price | size | + | party4 | party1 | 5 | 200 | + | party4 | party2 | 5 | 100 | + | party4 | party3 | 5 | 100 | + + @iceberg + Scenario: 020 Pegged orders are not re-priced as price-levels are consumed + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | party3 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.15 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | 0 | 0 | isolated margin | 0.15 | 0 | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + Given the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2 | ETH/DEC19 | buy | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 1 | 10 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 20 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 10 | 25 | 0 | TYPE_LIMIT | TIF_GTC | + And the parties place the following pegged iceberg orders: + | party | market id | side | volume | resulting trades | type | tif | peak size | minimum visible size | pegged reference | offset | error | + | party1 | ETH/DEC19 | buy | 10 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | BID | 1 | invalid OrderError | + And the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | error | + | party1 | ETH/DEC19 | buy | 1 | BID | 2 | invalid OrderError | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 12 | 8 | 1 | TYPE_LIMIT | TIF_GTC | + # Check pegged ordinary and iceberg orders are not re-priced as the best-bid price-level is consumed + Then the following trades should be executed: + | buyer | seller | price | size | + | party2 | party3 | 10 | 1 | + diff --git a/core/integration/features/margin/0019-MCAL-068.feature b/core/integration/features/margin/0019-MCAL-068.feature new file mode 100644 index 0000000000..c449be527b --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-068.feature @@ -0,0 +1,164 @@ +Feature: Test order amendment which lead to cancellation of all orders and fund returned to the genral account, and active positions shoule be untouched and active + Background: + # Set liquidity parameters to allow "zero" target-stake which is needed to construct the order-book defined in the ACs + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + + Scenario: 001 when party has open position, check margin and general account when mark price increases and MTM, then closeout (0019-MCAL-070) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 275500 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 2 | 49920 | 0 | TYPE_LIMIT | TIF_GTC | sell-1 | + | party1 | ETH/FEB23 | sell | 4 | 49940 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties should have the following margin levels: + | party | market id | maintenance | initial | + | party1 | ETH/FEB23 | 65190 | 78228 | + #margin = min(3*(100000-15900), 15900*(0.25))+0.1*15900=5565 + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/FEB23 | 78228 | 197272 | + + #switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party1 | ETH/FEB23 | isolated margin | 0.6 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 0 | 66780 | 0 | isolated margin | 0.6 | 179760 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 95400 | 340 | 179760 | + + #AC 0019-MCAL-068 amend the order (increase size) so that new side margin + margin account balance < maintenance margin, the remainding should be stopped + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | sell-1 | 49940 | 2 | TIF_GTC | margin check failed | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 95400 | 180100 | 0 | + + And the orders should have the following status: + | party | reference | status | + | party1 | sell-1 | STATUS_STOPPED | + | party1 | sell-2 | STATUS_STOPPED | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | sell | 2 | 49920 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | party1 | ETH/FEB23 | sell | 4 | 49940 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 95400 | 340 | 179760 | + + #check amendment does happened when new side margin + margin account balance > maintenance margin + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | sell-3 | 49920 | -2 | TIF_GTC | | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 95400 | 60244 | 119856 | + + And the orders should have the following status: + | party | reference | status | + | party1 | sell-3 | STATUS_CANCELLED | + | party1 | sell-4 | STATUS_ACTIVE | + + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | buy | 14900 | 10 | + | buy | 15800 | 6 | + | sell | 49920 | 0 | + | sell | 200000 | 1 | + + #check amendment does happened when new side margin + margin account balance > maintenance margin + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | sell-4 | 49910 | 0 | TIF_GTC | | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 95400 | 60316 | 119784 | + + And the orders should have the following status: + | party | reference | status | + | party1 | sell-3 | STATUS_CANCELLED | + | party1 | sell-4 | STATUS_ACTIVE | + + #AC 0019-MCAL-074 amend the order (increase price) so that new side margin + margin account balance < maintenance margin, the remainding should be stopped + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | sell-4 | 109910 | 0 | TIF_GTC | margin check failed | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 95400 | 180100 | 0 | + + And the orders should have the following status: + | party | reference | status | + | party1 | sell-3 | STATUS_CANCELLED | + | party1 | sell-4 | STATUS_STOPPED | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | sell | 2 | 49920 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | party1 | ETH/FEB23 | sell | 4 | 49940 | 0 | TYPE_LIMIT | TIF_GTC | sell-6 | + + #AC 0019-MCAL-075 amend the order (decrease size, increase price) so that new side margin + margin account balance < maintenance margin, the remainding should be stopped + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | sell-5 | 109910 | -1 | TIF_GTC | margin check failed | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 95400 | 180100 | 0 | + + And the orders should have the following status: + | party | reference | status | + | party1 | sell-5 | STATUS_STOPPED | + | party1 | sell-6 | STATUS_STOPPED | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | sell | 2 | 49920 | 0 | TYPE_LIMIT | TIF_GTC | sell-7 | + | party1 | ETH/FEB23 | sell | 4 | 49940 | 0 | TYPE_LIMIT | TIF_GTC | sell-8 | + + #AC 0019-MCAL-076 amend the order (increase size, decrease price) so that new side margin + margin account balance < maintenance margin, the remainding should be stopped + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | sell-7 | 19920 | 5 | TIF_GTC | margin check failed | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 95400 | 180100 | 0 | + + And the orders should have the following status: + | party | reference | status | + | party1 | sell-7 | STATUS_STOPPED | + | party1 | sell-8 | STATUS_STOPPED | + + diff --git a/core/integration/features/margin/0019-MCAL-070.feature b/core/integration/features/margin/0019-MCAL-070.feature new file mode 100644 index 0000000000..dcb2ccd6ca --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-070.feature @@ -0,0 +1,543 @@ +Feature: Test mark price changes and closeout under isolated margin mode + Background: + # Set liquidity parameters to allow "zero" target-stake which is needed to construct the order-book defined in the ACs + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + + Scenario: 001 closeout when party's open position is under maintenance level (0019-MCAL-070) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 172500 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 8 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | s-1 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | buy | 14900 | 10 | + | buy | 15800 | 6 | + | sell | 15900 | 8 | + | sell | 200000 | 1 | + | sell | 200100 | 10 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 68370 | 75207 | 82044 | 95718 | cross margin | 0 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/FEB23 | 82044 | 90456 | + + #switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party1 | ETH/FEB23 | isolated margin | 0.6 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 0 | 66780 | 0 | isolated margin | 0.6 | 76320 | + + #order margin: 15900*8*0.6=76320 + #position margin: 15900*10*0.6=95400 + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 95400 | 780 | 76320 | + + #trigger more MTM with party has both short position and short orders + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 10 | 17000 | 1 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 2 | 17000 | 1 | TYPE_LIMIT | TIF_GTC | + + And the orders should have the following status: + | party | reference | status | + | party1 | s-1 | STATUS_FILLED | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15900 | TRADING_MODE_CONTINUOUS | + And the network moves ahead "1" blocks + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 17000 | TRADING_MODE_CONTINUOUS | + + #position margin: 15900*18*0.6=171720 + #MTM: 171720-(17000-15900)*18=151920 + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 151920 | 780 | 0 | + + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/FEB23 | 19800 | USD | + | market | buySideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/FEB23 | 19800 | USD | + + #trigger more MTM with party has short position + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 20000 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 20000 | 1 | TYPE_LIMIT | TIF_GTC | + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 17000 | TRADING_MODE_CONTINUOUS | + And the network moves ahead "1" blocks + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 0 | 780 | 0 | + + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/FEB23 | 54000 | USD | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/FEB23 | 97920 | USD | + + Scenario: 002 Open positions should be closed in the case of open positions dropping below maintenance margin level, active orders will be cancelled if closing positions lead order margin level to increase. + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 215500 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 1 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | party-sell | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | buy | 14900 | 10 | + | buy | 15800 | 6 | + | sell | 200000 | 11 | + | sell | 200100 | 10 | + And the parties should have the following margin levels: + | party | market id | maintenance | initial | + | party1 | ETH/FEB23 | 57240 | 68688 | + #slippage_per_unit: (19500+200000*9)/10-15900)=166050 + #margin: 10*min(166050, 15900*0.25)+0.1*15900*11=57240 + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/FEB23 | 68688 | 146812 | + + #switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party1 | ETH/FEB23 | isolated margin | 0.5 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 0 | 66780 | 0 | isolated margin | 0.5 | 100000 | + + #margin level: 15900*10*0.5=79500 + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 79500 | 36000 | 100000 | + + #AC 0019-MCAL-132:increase margin factor in isolated margin with position and with orders successful in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.50001 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 0 | 66780 | 0 | isolated margin | 0.50001 | 100002 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 79501 | 35997 | 100002 | + + #at this point you can't change to 0.4 as the initial margin = 66780 and the the position margin with 0.4 would be 63600 + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.4 | required position margin must be greater than initial margin | + + #the the position margin with 0.45 would be 71550 which is greater than initial margin, update of margin factor is accepted + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.45 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 0 | 66780 | 0 | isolated margin | 0.45 | 90000 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 71550 | 33946 | 110004 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.6 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 0 | 66780 | 0 | isolated margin | 0.6 | 120000 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 95400 | 100 | 120000 | + + #trigger MTM (18000-15900)*10= 21000 with party has both short position and short orders, when party is distressed, order will remain active + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 18000 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 18000 | 1 | TYPE_LIMIT | TIF_GTC | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15900 | TRADING_MODE_CONTINUOUS | + And the network moves ahead "1" blocks + + #MTM for party1: 95400-21000=74400 + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 74400 | 100 | 120000 | + + #trigger MTM (25440-18000)*10= 74400 which will empty the position margin account + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 25440 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 25440 | 1 | TYPE_LIMIT | TIF_GTC | + + And the network moves ahead "1" blocks + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/FEB23 | 74400 | USD | + | party1 | party1 | ACCOUNT_TYPE_ORDER_MARGIN | ACCOUNT_TYPE_MARGIN | ETH/FEB23 | 120000 | USD | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 120000 | 100 | 0 | + + #MTM for party1: 10*(25540-25440)=1000 + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 25540 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 25540 | 1 | TYPE_LIMIT | TIF_GTC | + + And the network moves ahead "2" blocks + + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | party1 | -1 | 174460 | -269860 | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 25540 | TRADING_MODE_CONTINUOUS | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 120000 | 100 | 0 | + + Scenario: 003 When a party (who holds open positions and bond account) gets distressed, open positions will be closed, the bond account will be emptied (0019-MCAL-072) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 172500 | + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15900 | TRADING_MODE_CONTINUOUS | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 61215 | 66780 | 77910 | cross margin | 0 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 66780 | 104720 | 1000 | + + #switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.5 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 0 | 66780 | 0 | isolated margin | 0.5 | 0 | + + #order margin: 15900*8*0.6=76320 + #position margin: 15900*10*0.6=95400 + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 79500 | 92000 | 0 | 1000 | + + #trigger more MTM (18285-15900)*10=23850 with party has both short position and bond account + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 18285 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 18285 | 1 | TYPE_LIMIT | TIF_GTC | + + When the network moves ahead "2" blocks + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 18285 | TRADING_MODE_CONTINUOUS | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 0 | 92000 | 0 | 0 | + + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | party1 | party1 | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_MARGIN | ETH/FEB23 | 1000 | USD | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/FEB23 | 56650 | USD | + | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/FEB23 | 56650 | USD | + | market | sellSideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/FEB23 | 56650 | USD | + + Scenario: 004 When a party (who holds open positions, orders and bond account) gets distressed, open positions will be closed, the bond account will be emptied (0019-MCAL-073) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 172500 | + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 28900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 2 | 28910 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15900 | TRADING_MODE_CONTINUOUS | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 58830 | 64713 | 70596 | 82362 | cross margin | 0 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 70596 | 100904 | 1000 | + + #switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.5 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 0 | 66780 | 0 | isolated margin | 0.5 | 28910 | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 79500 | 63090 | 28910 | 1000 | + + #trigger more MTM (18385-15900)*10=24850 with party has both short position and bond account + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 18385 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 18385 | 1 | TYPE_LIMIT | TIF_GTC | + + When the network moves ahead "2" blocks + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 18385 | TRADING_MODE_CONTINUOUS | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 0 | 63090 | 28910 | 0 | + + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | party1 | party1 | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_MARGIN | ETH/FEB23 | 1000 | USD | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/FEB23 | 55650 | USD | + | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/FEB23 | 55650 | USD | + | market | sellSideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/FEB23 | 55650 | USD | + + Scenario: 005 Open positions should be closed in the case of open positions dropping below maintenance margin level, active orders will be cancelled if closing positions lead order margin level to increase. (0019-MCAL-071) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 172500 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 28900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15900 | TRADING_MODE_CONTINUOUS | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 61215 | 66780 | 77910 | cross margin | 0 | 0 | + + #switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.5 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 0 | 66780 | 0 | isolated margin | 0.5 | 0 | + When the network moves ahead "1" blocks + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | b-1 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 79500 | 93000 | 0 | + + #trigger more MTM (18385-15900)*10=24850 with party has both short position and bond account + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 18385 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 18385 | 1 | TYPE_LIMIT | TIF_GTC | + + When the network moves ahead "2" blocks + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 18385 | TRADING_MODE_CONTINUOUS | + And the orders should have the following status: + | party | reference | status | + | party1 | b-1 | STATUS_STOPPED | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 0 | 93000 | 0 | + + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/FEB23 | 54650 | USD | + | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/FEB23 | 54650 | USD | + | market | sellSideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/FEB23 | 54650 | USD | + + Scenario: 006 When a party (who holds open positions, orders and bond account) gets distressed, open positions will be closed, the bond account will be emptied (0019-MCAL-074) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 172500 | + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15900 | TRADING_MODE_CONTINUOUS | + + #margin maintenance: min(10*(200000-15900),15900*10*0.25)+10*0.1*15900 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 61215 | 66780 | 77910 | cross margin | 0 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 66780 | 104720 | 1000 | + + #switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.5 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 0 | 66780 | 0 | isolated margin | 0.5 | 0 | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 79500 | 92000 | 0 | 1000 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | b-1 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 79500 | 92000 | 0 | 1000 | + + #trigger more MTM (18585-15900)*10=26850 with party has both short position and bond account + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 23585 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 23585 | 1 | TYPE_LIMIT | TIF_GTC | + + When the network moves ahead "1" blocks + #margin maintenance: min(10*(20000-18585),18585*10*0.25)+10*0.1*18585=32735 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.5 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 0 | 92000 | 0 | 0 | + + And the orders should have the following status: + | party | reference | status | + | party1 | b-1 | STATUS_STOPPED | + + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/FEB23 | 76850 | USD | + | market | buySideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/FEB23 | 76850 | USD | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/FEB23 | 3650 | USD | + | party1 | party1 | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_MARGIN | ETH/FEB23 | 1000 | USD | + + + + + diff --git a/core/integration/features/margin/0019-MCAL-072.feature b/core/integration/features/margin/0019-MCAL-072.feature new file mode 100644 index 0000000000..48fd19035e --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-072.feature @@ -0,0 +1,237 @@ +Feature: Test closeout under isolated margin mode when party has bond account + Background: + # Set liquidity parameters to allow "zero" target-stake which is needed to construct the order-book defined in the ACs + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + + Scenario: 001 closeout when party has open position and bond account (0019-MCAL-072) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 173500 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 8 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | buy | 14900 | 10 | + | buy | 15800 | 6 | + | sell | 15900 | 8 | + | sell | 200000 | 1 | + | sell | 200100 | 10 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | party1 | ETH/FEB23 | 68370 | 75207 | 82044 | 95718 | + #margin = min(3*(100000-15900), 15900*(0.25))+0.1*15900=5565 + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 82044 | 90456 | 1000 | + + #switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party1 | ETH/FEB23 | isolated margin | 0.6 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 0 | 66780 | 0 | isolated margin | 0.6 | 76320 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 95400 | 780 | 76320 | + + #trigger more MTM with party has both short position and short orders + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 10 | 17000 | 1 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 2 | 17000 | 1 | TYPE_LIMIT | TIF_GTC | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15900 | TRADING_MODE_CONTINUOUS | + And the network moves ahead "1" blocks + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 17000 | TRADING_MODE_CONTINUOUS | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 151920 | 780 | 0 | 1000 | + + #MTM for party1: 18*(17000-15900)=19800 + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/FEB23 | 19800 | USD | + | market | buySideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/FEB23 | 19800 | USD | + + #increase margin factor + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.9 | insufficient balance in general account to cover for required order margin | + + #trigger more MTM with party has both short position and short orders + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 20000 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 20000 | 1 | TYPE_LIMIT | TIF_GTC | + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 17000 | TRADING_MODE_CONTINUOUS | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 151920 | 780 | 0 | 1000 | + + And the network moves ahead "1" blocks + + # what happens here is that the party gets closed out, their general account balance is untouched + # but their bond balance is taken and then topped up from the general account + # it's a bit weird but that's how it works + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 0 | 0 | 0 | 780 | + + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/FEB23 | 54000 | USD | + | party1 | party1 | ACCOUNT_TYPE_BOND | ACCOUNT_TYPE_MARGIN | ETH/FEB23 | 1000 | USD | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/FEB23 | 98920 | USD | + + Scenario: 002 closeout when party has open position, order, and bond account(0019-MCAL-073) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 216500 | + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 1 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | party-sell | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | buy | 14900 | 10 | + | buy | 15800 | 6 | + | sell | 200000 | 11 | + # | sell | 200100 | 10 | + And the parties should have the following margin levels: + | party | market id | maintenance | initial | + | party1 | ETH/FEB23 | 57240 | 68688 | + #slippage_per_unit: (19500+200000*9)/10-15900)=166050 + #margin: 10*min(166050, 15900*0.25)+0.1*15900*11=57240 + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 68688 | 146812 | 1000 | + + #switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party1 | ETH/FEB23 | isolated margin | 0.6 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 55650 | 0 | 66780 | 0 | isolated margin | 0.6 | 120000 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 95400 | 100 | 120000 | 1000 | + + #trigger more MTM (18000-15900)*10= 21000 with party has both short position and short orders, when party is distressed, order will remain active + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 18000 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 18000 | 1 | TYPE_LIMIT | TIF_GTC | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15900 | TRADING_MODE_CONTINUOUS | + And the network moves ahead "1" blocks + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 18000 | TRADING_MODE_CONTINUOUS | + + #party1's open position is distressed + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 74400 | 100 | 120000 | 1000 | + + # #MTM for party1: 10*(25440-18000)=74400 + #trigger more MTM with party has both short position and short orders and empty the margin account + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 25440 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 25440 | 1 | TYPE_LIMIT | TIF_GTC | + + And the network moves ahead "1" blocks + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 25440 | TRADING_MODE_CONTINUOUS | + + # @jiajia this is quite a funny case... their long position is getting closed out + # but they have short order, so the network is trading with them which gets them back into a position + # this time the other side + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 120000 | 0 | 0 | 100 | + + # #MTM for party1: 10*(25540-25440)=1000 + #trigger more MTM with party has both short position and the margin account is already empty + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1 | 25540 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1 | 25540 | 1 | TYPE_LIMIT | TIF_GTC | + + And the network moves ahead "1" blocks + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 25540 | TRADING_MODE_CONTINUOUS | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/FEB23 | 120000 | | 0 | 100 | + + And the insurance pool balance should be "0" for the market "ETH/FEB23" + + diff --git a/core/integration/features/margin/0019-MCAL-100.feature b/core/integration/features/margin/0019-MCAL-100.feature new file mode 100644 index 0000000000..77aed12649 --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-100.feature @@ -0,0 +1,171 @@ +Feature: Test switch between margin mode + Background: + # Set liquidity parameters to allow "zero" target-stake which is needed to construct the order-book defined in the ACs + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + + Scenario: 001 closeout when party's open position is under maintenance level (0019-MCAL-070) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 172500 | + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | sell | 1 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | s-1 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + #switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party1 | ETH/FEB23 | isolated margin | 0.4 | + + #AC0019-MCAL-100:switch to isolated margin with no position and no order (before the first order ever has been sent) in continuous mode + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.4 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/FEB23 | 0 | 171500 | + + When the network moves ahead "2" blocks + + #switch to cross margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party1 | ETH/FEB23 | cross margin | 0.4 | + + #AC0019-MCAL-101:switch back to cross margin with no position and no order in continuous mode + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | cross margin | 0.4 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/FEB23 | 0 | 171500 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | b-1 | + When the network moves ahead "1" blocks + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 9540 | 10494 | 11448 | 13356 | cross margin | 0.4 | 0 | + + #AC0019-MCAL-106:switch to isolated margin without position and with orders with margin factor such that position margin is < initial should fail in continuous + #order margin: 6*15800*0.11=10428 + #maintenance margin level in cross margin: 15900*0.1*6=9540 + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.11 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.11 | 10428 | + + And the orders should have the following status: + | party | reference | status | + | party1 | b-1 | STATUS_ACTIVE | + + Scenario: 002 switch to isolated margin mode without position and no order (0019-MCAL-110) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 22000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | s-1 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + #switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.4 | | + + #AC0019-MCAL-100:switch to isolated margin with no position and no order (before the first order ever has been sent) in continuous mode + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.4 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 0 | 21000 | 1000 | + + #AC0019-MCAL-117:update margin factor when already in isolated mode to the same cases as in switch to isolated failures. + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.4 | | + + #switch back to cross margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | cross margin | | | + When the network moves ahead "2" blocks + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | sell | 5 | 15900 | 1 | TYPE_LIMIT | TIF_GTC | s-2 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 7950 | 8745 | 9540 | 11130 | cross margin | 0.4 | 0 | + + #AC0019-MCAL-115:switch to isolate margin with out of range margin factor + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.1 | margin factor (0.1) must be greater than max(riskFactorLong (0.1), riskFactorShort (0.1)) | + + #this number should be validated with correct message + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 1.2 | insufficient balance in general account to cover for required order margin | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | -0.2 | margin factor (-0.2) must be greater than max(riskFactorLong (0.1), riskFactorShort (0.1)) | + + #AC0019-MCAL-114:switch to isolated margin with position and with orders with margin factor such that there is insufficient balance in the general account in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.4 | insufficient balance in general account to cover for required order margin | + + #AC0019-MCAL-116:submit update margin mode transaction with no state change (already in cross margin, "change" to cross margin, or already in isolated, submit with same margin factor) + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | cross margin | | | + + diff --git a/core/integration/features/margin/0019-MCAL-102.feature b/core/integration/features/margin/0019-MCAL-102.feature new file mode 100644 index 0000000000..a9fddd45a0 --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-102.feature @@ -0,0 +1,122 @@ +Feature: Switch mode during auction + Background: + # switch to isolated margin with no position and no order (before the first order ever has been sent) in auction + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 2 | + + Scenario: 001 switch to isolated margin with no position and no order (before the first order ever has been sent) in auction (0019-MCAL-102) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 273500 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | buy | 14900 | 10 | + | buy | 15800 | 6 | + | sell | 15900 | 0 | + | sell | 200000 | 1 | + And the parties should have the following margin levels: + | party | market id | maintenance | + | buySideProvider | ETH/FEB23 | 24380 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 0 | 272500 | 1000 | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 0 | TRADING_MODE_OPENING_AUCTION | + + #switch to isolated margin, failed because party has no order + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.6 | no market observable price | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | sell | 8 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | party1-sell | + + And the orders should have the following status: + | party | reference | status | + | party1 | party1-sell | STATUS_ACTIVE | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 0 | TRADING_MODE_OPENING_AUCTION | + When the network moves ahead "1" blocks + + #switch to isolated margin, failed because of no market observable price + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.6 | no market observable price | + + When the network moves ahead "1" blocks + And the parties should have the following margin levels: + | party | market id | maintenance | initial | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 12720 | 15264 | cross margin | 0.6 | 0 | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 15264 | 257236 | 1000 | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 0 | TRADING_MODE_OPENING_AUCTION | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | sellP-2 | + + When the network moves ahead "2" blocks + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15800 | TRADING_MODE_CONTINUOUS | + #MTM from price change + And the parties should have the following margin levels: + | party | market id | maintenance | initial | search | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 12640 | 15168 | 13904 | 17696 | cross margin | 0.6 | 0 | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 15264 | 257236 | 1000 | + + #switch to isolated margin, when there is market observable price + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party1 | ETH/FEB23 | isolated margin | 0.6 | + When the network moves ahead "1" blocks + And the parties should have the following margin levels: + | party | market id | maintenance | release | search | initial | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.6 | 76320 | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 0 | 196180 | 1000 | + + diff --git a/core/integration/features/margin/0019-MCAL-105.feature b/core/integration/features/margin/0019-MCAL-105.feature new file mode 100644 index 0000000000..5d1257461a --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-105.feature @@ -0,0 +1,162 @@ +Feature: switch to isolated margin with position during auction + Background: + # switch between cross margin and isolated margin mode during auction + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the price monitoring named "my-price-monitoring": + | horizon | probability | auction extension | + | 5 | 0.95 | 6 | + | 10 | 0.99 | 8 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring | default-eth-for-future | 0.25 | 0 | default-futures | + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + Given the average block duration is "1" + + Scenario: 001 switch to isolated margin during auction + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 14110 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | p1-sell | + | sellSideProvider | ETH/FEB23 | sell | 1 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 1 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 6636 | 6474 | 1000 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 6083 | 6636 | 7742 | cross margin | 0 | 0 | + + #AC0019-MCAL-104: switch to isolated margin with position and no orders with margin factor such that position margin is < initial should fail in continuous + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.1 | margin factor (0.1) must be greater than max(riskFactorLong (0.1), riskFactorShort (0.1)) | + + #AC0019-MCAL-112:switch to isolated margin with position and no orders with margin factor such that there is insufficient balance in the general account in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.9 | insufficient balance in general account to cover for required order margin | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 6636 | 6474 | 1000 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 6083 | 6636 | 7742 | cross margin | 0 | 0 | + + #AC0019-MCAL-120: witch to isolated margin with position and no orders successful in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.6 | | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 9480 | 3630 | 1000 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 0 | 6636 | 0 | isolated margin | 0.6 | 0 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | cross margin | | | + + #now trigger price monitoring auction + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15800 | TRADING_MODE_MONITORING_AUCTION | + + #AC0019-MCAL-105: switch to isolated margin with position and no orders with margin factor such that position margin is < initial should fail in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.1 | margin factor (0.1) must be greater than max(riskFactorLong (0.1), riskFactorShort (0.1)) | + + When the network moves ahead "1" blocks + #AC0019-MCAL-113:switch to isolated margin with position and no orders with margin factor such that there is insufficient balance in the general account in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.95 | insufficient balance in general account to cover for required order margin | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 9480 | 3630 | 1000 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 6083 | 6636 | 7742 | cross margin | 0 | 0 | + + #AC0019-MCAL-121:switch to isolated margin with position and no orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.6 | | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 9480 | 3630 | 1000 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 0 | 6636 | 0 | isolated margin | 0.6 | 0 | + + #AC0019-MCAL-128:increase margin factor in isolated margin with position and no orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.7 | | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 11060 | 2050 | 1000 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 0 | 6636 | 0 | isolated margin | 0.7 | 0 | + + #AC0019-MCAL-040:When increasing the `margin factor` and the party does not have enough asset in the general account to cover the new maintenance margin, then the new margin factor will be rejected + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.9 | insufficient balance in general account to cover for required order margin | + + #AC0019-MCAL-137:switch to cross margin with position and no orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | cross margin | | | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 11060 | 2050 | 1000 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 6083 | 6636 | 7742 | cross margin | 0 | 0 | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15800 | TRADING_MODE_MONITORING_AUCTION | + diff --git a/core/integration/features/margin/0019-MCAL-107.feature b/core/integration/features/margin/0019-MCAL-107.feature new file mode 100644 index 0000000000..5ec4238610 --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-107.feature @@ -0,0 +1,129 @@ +Feature: switch to isolated margin without position and with orders in auction + Background: + # switch between cross margin and isolated margin mode during auction + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 8 | + Given the average block duration is "1" + + Scenario: 001 switch to isolated margin during auction + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 273500 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | p1-sell | + | sellSideProvider | ETH/FEB23 | sell | 1 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | buy | 14900 | 10 | + | buy | 15800 | 6 | + | sell | 15800 | 1 | + | sell | 15900 | 0 | + | sell | 200000 | 1 | + And the parties should have the following margin levels: + | party | market id | maintenance | + | buySideProvider | ETH/FEB23 | 24380 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 1896 | 270604 | 1000 | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 0 | TRADING_MODE_OPENING_AUCTION | + + #AC0019-MCAL-107: switch to isolated margin without position and with orders with margin factor such that position margin is < initial should fail in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.1 | margin factor (0.1) must be greater than max(riskFactorLong (0.1), riskFactorShort (0.1)) | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 1580 | 1738 | 1896 | 2212 | cross margin | 0 | 0 | + + #AC0019-MCAL-123:switch to isolated margin without position and with orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.6 | | + + # @jiajia + # the party has no position so position initial/maintenance is 0... + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.6 | 9480 | + + #AC0019-MCAL-131:increase margin factor in isolated margin without position and with orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.7 | | + + # same, the don't have position so their maintenance margin (which doesn't consider orders) is 0 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.7 | 11060 | + + And the orders should have the following status: + | party | reference | status | + | party1 | p1-sell | STATUS_ACTIVE | + + When the parties cancel the following orders: + | party | reference | + | party1 | p1-sell | + + And the orders should have the following status: + | party | reference | status | + | party1 | p1-sell | STATUS_CANCELLED | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 0 | TRADING_MODE_OPENING_AUCTION | + + #AC0019-MCAL-135:switch to cross margin without position and no orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | cross margin | | no market observable price | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.7 | 0 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + + #AC0019-MCAL-103:switch back to cross margin with no position and no order in continuous mode in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party1 | ETH/FEB23 | cross margin | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | cross margin | 0.7 | 0 | + + diff --git a/core/integration/features/margin/0019-MCAL-109.feature b/core/integration/features/margin/0019-MCAL-109.feature new file mode 100644 index 0000000000..bd5cbdfa0d --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-109.feature @@ -0,0 +1,273 @@ +Feature: switch to isolated margin without position and with orders during auction + Background: + # switch between cross margin and isolated margin mode during auction + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the price monitoring named "my-price-monitoring": + | horizon | probability | auction extension | + | 5 | 0.95 | 6 | + | 10 | 0.99 | 8 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring | default-eth-for-future | 0.25 | 0 | default-futures | + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + Given the average block duration is "1" + + Scenario: 001 switch to isolated margin during auction + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 28550 | + | party2 | USD | 84110 | + | party3 | USD | 84110 | + | party4 | USD | 84110 | + | party5 | USD | 84110 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | party4 | ETH/FEB23 | sell | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 1 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | p1-sell | + | party2 | ETH/FEB23 | sell | 1 | 15802 | 0 | TYPE_LIMIT | TIF_GTC | p1-sell | + | party1 | ETH/FEB23 | sell | 2 | 15804 | 0 | TYPE_LIMIT | TIF_GTC | p1-sell | + | sellSideProvider | ETH/FEB23 | sell | 3 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 2 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 5689 | 21861 | 1000 | + + #maintenance margin: min((15802-15800),15800*0.1)+0.1*15800+2*0.1*15800=4742 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 4742 | 5216 | 5690 | 6638 | cross margin | 0 | 0 | + + #AC0019-MCAL-134:switch to cross margin without position and no orders successful in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party5 | ETH/FEB23 | isolated margin | 0.4 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party5 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.4 | 0 | + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party5 | ETH/FEB23 | cross margin | 0.4 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party5 | ETH/FEB23 | 0 | 0 | 0 | 0 | cross margin | 0.4 | 0 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party5 | ETH/FEB23 | buy | 1 | 14800 | 0 | TYPE_LIMIT | TIF_GTC | | + + #AC0019-MCAL-130: increase margin factor in isolated margin without position and with orders successful in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party5 | ETH/FEB23 | isolated margin | 0.4 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party5 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.4 | 5920 | + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party5 | ETH/FEB23 | isolated margin | 0.5 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party5 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.5 | 7400 | + + #now trigger price monitoring auction + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15800 | TRADING_MODE_MONITORING_AUCTION | + + #AC0019-MCAL-109: switch to isolated margin with position and with orders with margin factor such that position margin is < initial should fail in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.2 | required position margin must be greater than initial margin | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 5689 | 21861 | 1000 | + + #AC0019-MCAL-122: switch to isolated margin without position and with orders successful in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party2 | ETH/FEB23 | isolated margin | 0.4 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party2 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.4 | 6320 | + + #AC0019-MCAL-138: switch to cross margin without position and with orders successful in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party2 | ETH/FEB23 | cross margin | | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party2 | ETH/FEB23 | 1581 | 1739 | 1897 | 2213 | cross margin | 0 | 0 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 4742 | 5216 | 5690 | 6638 | cross margin | 0 | 0 | + + When the network moves ahead "1" blocks + #AC0019-MCAL-142:switch to isolated margin with position and with orders with margin factor such that there is insufficient balance in the general account in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.9 | insufficient balance in general account to cover for required order margin | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 5689 | 21861 | 1000 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 4742 | 5216 | 5690 | 6638 | cross margin | 0 | 0 | + + #AC0019-MCAL-123:switch to isolated margin with position and with orders successful in auction + #required position margin: 15800*0.6=9480 + #maintenance margin for position: 15800*0.25+0.1*15800=5530 + #initial margin for position: 5530*1.2=6636 + # @jiajia there's insufficient in the general account here: + # for this switch to work they need 22755 in their general account, they only have 21861 + # requiredPositionMargin 9480 + # requireOrderMargin 18964.8 + # total required: 9480 + 18964 - 5689 = 22,755 + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.6 | insufficient balance in general account to cover for required order margin | + + #AC0019-MCAL-124:switch to isolated margin with position and with orders successful in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.55 | | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 8690 | 1476 | 1000 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 0 | 6636 | 0 | isolated margin | 0.55 | 17384 | + + #AC0019-MCAL-141:switch to cross margin with position and with orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | cross margin | | | + + #AC0019-MCAL-036: When the party switches to cross margin mode, the margin accounts will not be updated until the next MTM + When the network moves ahead "1" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 26074 | 1476 | 1000 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 8691 | 9560 | 10429 | 12167 | cross margin | 0 | 0 | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15800 | TRADING_MODE_MONITORING_AUCTION | + + #AC0019-MCAL-119:switch to isolated margin without position and no orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party3 | ETH/FEB23 | isolated margin | 0.4 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.4 | 0 | + + #AC0019-MCAL-126:increase margin factor without position and no orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party3 | ETH/FEB23 | isolated margin | 0.6 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.6 | 0 | + + #AC0019-MCAL-127:increase margin factor without position and no orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party3 | ETH/FEB23 | isolated margin | 0.65 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.65 | 0 | + + #AC0019-MCAL-135:switch to cross margin without position and no orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party3 | ETH/FEB23 | cross margin | 0.4 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party3 | ETH/FEB23 | 0 | 0 | 0 | 0 | cross margin | 0.4 | 0 | + + #AC0019-MCAL-125:switch to isolated margin with position and orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.55 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 0 | 6636 | 0 | isolated margin | 0.55 | 17384 | + + #AC0019-MCAL-133:increase margin factor in isolated margin with position and with orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.56 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 0 | 6636 | 0 | isolated margin | 0.56 | 17700 | + + #AC0019-MCAL-129:increase margin factor in isolated margin with position and no orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party4 | ETH/FEB23 | isolated margin | 0.5 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party4 | ETH/FEB23 | 5530 | 0 | 6636 | 0 | isolated margin | 0.5 | 0 | + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party4 | ETH/FEB23 | isolated margin | 0.6 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party4 | ETH/FEB23 | 5530 | 0 | 6636 | 0 | isolated margin | 0.6 | 0 | + + #AC0019-MCAL-140:switch to cross margin with position and orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | cross margin | 0.4 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 8691 | 9560 | 10429 | 12167 | cross margin | 0.4 | 0 | + + #AC0019-MCAL-139:switch to cross margin without position and with orders successful in auction + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party5 | ETH/FEB23 | cross margin | 0.5 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party5 | ETH/FEB23 | 1480 | 1628 | 1776 | 2072 | cross margin | 0.5 | 0 | + diff --git a/core/integration/features/margin/0019-MCAL-128.feature b/core/integration/features/margin/0019-MCAL-128.feature new file mode 100644 index 0000000000..55072be0ef --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-128.feature @@ -0,0 +1,132 @@ +Feature: switch to isolated margin with position and without orders during continuous + Background: + # switch between cross margin and isolated margin mode during auction + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the price monitoring named "my-price-monitoring": + | horizon | probability | auction extension | + | 5 | 0.95 | 6 | + | 10 | 0.99 | 8 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring | default-eth-for-future | 0.25 | 0 | default-futures | + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + Given the average block duration is "1" + + Scenario: 001 switch to isolated margin during auction + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 20908 | + | party2 | USD | 84110 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 3 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | p1-sell | + | sellSideProvider | ETH/FEB23 | sell | 3 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 3 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 19908 | 0 | 1000 | + + #maintenance margin: min((200000-15800),15800*0.25)+0.1*15800=5530 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 16590 | 18249 | 19908 | 23226 | cross margin | 0 | 0 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.1 | margin factor (0.1) must be greater than max(riskFactorLong (0.1), riskFactorShort (0.1)) | + + #AC0019-MCAL-108: switch to isolated margin with position and with orders with margin factor such that position margin is < initial should fail in continuous + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.2 | required position margin must be greater than initial margin | + + #AC0019-MCAL-112: switch to isolated margin with position and no orders with margin factor such that there is insufficient balance in the general account in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.8 | insufficient balance in general account to cover for required order margin | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/FEB23 | buy | 2 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | p1-sell-1 | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15800 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 6636 | 13272 | 1000 | + + #AC0019-MCAL-120: switch to isolated margin with position and no orders successful in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.5 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 0 | 6636 | 0 | isolated margin | 0.5 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 7900 | 12008 | 1000 | + + #AC0019-MCAL-128: increase margin factor in isolated margin with position and no orders successful in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.7 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 0 | 6636 | 0 | isolated margin | 0.7 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 11060 | 8848 | 1000 | + + #AC0019-MCAL-128: decrease margin factor in isolated margin with position and no orders successful in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.6 | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 0 | 6636 | 0 | isolated margin | 0.6 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 9480 | 10428 | 1000 | + + #AC0019-MCAL-136: switch to cross margin with position and no orders successful in continuous mode + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | cross margin | | | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 5530 | 6083 | 6636 | 7742 | cross margin | 0 | 0 | + + When the network moves ahead "1" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 9480 | 10428 | 1000 | diff --git a/core/integration/features/margin/0019-MCAL-145.feature b/core/integration/features/margin/0019-MCAL-145.feature new file mode 100644 index 0000000000..c21d2cf4ff --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-145.feature @@ -0,0 +1,148 @@ +Feature: pegged order in isoalted margin is not supported during auction + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 6 | + And the price monitoring named "my-price-monitoring-1": + | horizon | probability | auction extension | + | 5 | 0.99 | 6 | + + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.2 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring-1 | default-eth-for-future | 0.25 | 0 | 2 | default-futures | + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + Given the average block duration is "1" + + Scenario: 001 (0019-MCAL-145) A market in auction and party with a partially filled pegged order switches from cross margin mode to isolated margin mode the unfilled portion of the pegged order is cancelled + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 158550 | + | aux | USD | 1585510000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1000 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 100 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 100 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 100 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 100 | 15810 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1000 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 100 | + + #now we try to place short pegged order which does offset the current short position, order margin should be 0 + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | party1 | ETH/FEB23 | buy | 200 | BID | 10 | buy_peg_1 | + | party1 | ETH/FEB23 | buy | 200 | BID | 100 | buy_peg_2 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/FEB23 | sell | 200 | 15790 | 2 | TYPE_LIMIT | TIF_GTC | + + And the following trades should be executed: + | buyer | price | size | seller | + | party1 | 15790 | 100 | aux | + + Then the orders should have the following status: + | party | reference | status | + | party1 | buy_peg_1 | STATUS_ACTIVE | + | party1 | buy_peg_2 | STATUS_ACTIVE | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/FEB23 | sell | 2 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15800 | TRADING_MODE_MONITORING_AUCTION | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.5 | | + + Then the orders should have the following status: + | party | reference | status | + | party1 | buy_peg_1 | STATUS_CANCELLED | + | party1 | buy_peg_2 | STATUS_CANCELLED | + + Scenario: 002 (0019-MCAL-146) A market in an auction and party with a partially filled iceberg pegged order switches from cross margin mode to isolated margin mode the unfilled portion of the iceberg pegged order is cancelled + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 158550 | + | aux | USD | 1585510000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 1000 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider | ETH/FEB23 | buy | 100 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider | ETH/FEB23 | buy | 100 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 100 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 100 | 15810 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 1000 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | + + When the network moves ahead "2" blocks + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 100 | + + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | reference | + | party1 | ETH/FEB23 | 200 | 200 | buy | BID | 200 | 10 | buy_peg_1 | + | party1 | ETH/FEB23 | 200 | 200 | buy | BID | 200 | 100 | buy_peg_2 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/FEB23 | sell | 200 | 15790 | 2 | TYPE_LIMIT | TIF_GTC | + + And the following trades should be executed: + | buyer | price | size | seller | + | party1 | 15790 | 100 | aux | + + Then the orders should have the following status: + | party | reference | status | + | party1 | buy_peg_1 | STATUS_ACTIVE | + | party1 | buy_peg_2 | STATUS_ACTIVE | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/FEB23 | sell | 2 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | + + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15800 | TRADING_MODE_MONITORING_AUCTION | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.5 | | + + Then the orders should have the following status: + | party | reference | status | + | party1 | buy_peg_1 | STATUS_CANCELLED | + | party1 | buy_peg_2 | STATUS_CANCELLED | + +# \ No newline at end of file diff --git a/core/integration/features/margin/0019-MCAL-150.feature b/core/integration/features/margin/0019-MCAL-150.feature new file mode 100644 index 0000000000..01df25a844 --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-150.feature @@ -0,0 +1,138 @@ +Feature: pegged order in isoalted margin is not supported + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 6 | + And the price monitoring named "my-price-monitoring-1": + | horizon | probability | auction extension | + | 5 | 0.99 | 6 | + + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.2 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring-1 | default-eth-for-future | 0.25 | 0 | 2 | default-futures | + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + Given the average block duration is "1" + + Scenario: When the party has pegged orders and switches from cross margin mode to isolated margin mode, all the pegged orders will be stopped. (0019-MCAL-050,0019-MCAL-090) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 158550 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1000 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 300 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | buy | 100 | 15700 | 0 | TYPE_LIMIT | TIF_GTC | p1-buy-1 | + | buySideProvider | ETH/FEB23 | buy | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | p1-sell-1 | + | sellSideProvider | ETH/FEB23 | sell | 600 | 15802 | 0 | TYPE_LIMIT | TIF_GTC | sP-sell | + | sellSideProvider | ETH/FEB23 | sell | 300 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1000 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + And the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 300 | + + #now we try to place short pegged order which does offset the current short position, order margin should be 0 + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | party1 | ETH/FEB23 | buy | 100 | BID | 10 | buy_peg_1 | + | party1 | ETH/FEB23 | buy | 200 | BID | 20 | buy_peg_2 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 9486 | 10434 | 11383 | 13280 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party1 | USD | ETH/FEB23 | 11383 | 146167 | 1000 | + + #switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.1 | margin factor (0.1) must be greater than max(riskFactorLong (0.1), riskFactorShort (0.2)) | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.2 | margin factor (0.2) must be greater than max(riskFactorLong (0.1), riskFactorShort (0.2)) | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.21 | required position margin must be greater than initial margin | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.3 | | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 9486 | 0 | 11383 | 0 | isolated margin | 0.3 | 0 | + + #0019-MCAL-149:A party with a parked pegged order switches from cross margin mode to isolated margin mode, the parked pegged order is cancelled + Then the orders should have the following status: + | party | reference | status | + | party1 | buy_peg_1 | STATUS_CANCELLED | + | party1 | buy_peg_2 | STATUS_CANCELLED | + | party1 | p1-sell-1 | STATUS_FILLED | + | party1 | p1-buy-1 | STATUS_ACTIVE | + + #0019-MCAL-049:When the party submit a pegged order, it should be rejected + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | error | + | party1 | ETH/FEB23 | buy | 100 | BID | 10 | buy_peg_3 | invalid OrderError | + | party1 | ETH/FEB23 | buy | 200 | BID | 20 | buy_peg_4 | invalid OrderError | + + Then the orders should have the following status: + | party | reference | status | + | party1 | buy_peg_3 | STATUS_REJECTED | + | party1 | buy_peg_4 | STATUS_REJECTED | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | cross margin | 0 | | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 9486 | 10434 | 11383 | 13280 | cross margin | 0 | 0 | + + #0019-MCAL-051:When the party has iceberg pegged orders and switches from cross margin mode to isolated margin mode, all the iceberg pegged orders will be stopped. + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | error | + | party1 | ETH/FEB23 | buy | 100 | BID | 10 | buy_peg_5 | | + | party1 | ETH/FEB23 | buy | 200 | BID | 20 | buy_peg_6 | | + + Then the orders should have the following status: + | party | reference | status | + | party1 | buy_peg_5 | STATUS_ACTIVE | + | party1 | buy_peg_6 | STATUS_ACTIVE | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/FEB23 | isolated margin | 0.3 | | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 9486 | 0 | 11383 | 0 | isolated margin | 0.3 | 0 | + + Then the orders should have the following status: + | party | reference | status | + | party1 | buy_peg_5 | STATUS_CANCELLED | + | party1 | buy_peg_6 | STATUS_CANCELLED | + + + diff --git a/core/integration/features/margin/0019-MCAL-160.feature b/core/integration/features/margin/0019-MCAL-160.feature new file mode 100644 index 0000000000..f841396f20 --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-160.feature @@ -0,0 +1,97 @@ +Feature: amend the order and it isn't matched and it's all good and it just moves some funds around and it sits in the book and wait + Background: + # Set liquidity parameters to allow "zero" target-stake which is needed to construct the order-book defined in the ACs + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 1s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + + Scenario: 001 party holds orders only, and party1 holds both orders and positions + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | party-sell | + | party1 | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | party1-sell | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + # Check mark-price matches the specification + Then the mark price should be "15900" for the market "ETH/FEB23" + + #AC: 0019-MCAL-160, 0019-MCAL-161 + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party | ETH/FEB23 | isolated margin | 0.2 | | + | party1 | ETH/FEB23 | isolated margin | 0.2 | | + + #maintenance margin: min(3*(15900-15900),15900*3*0.25)+3*0.1*15900=4770 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 4770 | 0 | 5724 | 0 | isolated margin | 0.2 | 9540 | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.2 | 9540 | + + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party | party-sell | 16900 | 0 | TIF_GTC | | + | party1 | party1-sell | 16900 | 0 | TIF_GTC | | + + When the network moves ahead "2" blocks + + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | sell | 15900 | 0 | + | sell | 16900 | 6 | + + And the orders should have the following status: + | party | reference | status | + | party | party-sell | STATUS_ACTIVE | + | party1 | party1-sell | STATUS_ACTIVE | + + # margin should be: min(3*(16900-15900),15900*3*0.25)+3*0.1*15900=7770 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 4770 | 0 | 5724 | 0 | isolated margin | 0.2 | 10140 | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.2 | 10140 | + + #AC: 0019-MCAL-162, 0019-MCAL-163 + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party | party-sell | 16900 | 1 | TIF_GTC | | + | party1 | party1-sell | 16900 | 1 | TIF_GTC | | + When the network moves ahead "2" blocks + + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | sell | 15900 | 0 | + | sell | 16900 | 8 | + + And the orders should have the following status: + | party | reference | status | + | party | party-sell | STATUS_ACTIVE | + | party1 | party1-sell | STATUS_ACTIVE | + + #maintenance margin: min(3*(16900-15900),15900*3*0.25)+3*0.1*15900=7770 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 7770 | 0 | 9324 | 0 | isolated margin | 0.2 | 13520 | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.2 | 13520 | + + Then the mark price should be "15900" for the market "ETH/FEB23" diff --git a/core/integration/features/margin/0019-MCAL-164.feature b/core/integration/features/margin/0019-MCAL-164.feature new file mode 100644 index 0000000000..aef6e19b4e --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-164.feature @@ -0,0 +1,111 @@ +Feature: amend the order and it isn't matched and it's all good and it just moves some funds around and it sits in the book and wait + Background: + # Set liquidity parameters to allow "zero" target-stake which is needed to construct the order-book defined in the ACs + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 1s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + + Scenario: 001 party holds orders only, and party1 holds both orders and positions + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 5 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | party-sell | + | party1 | ETH/FEB23 | sell | 5 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | party1-sell | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + #AC: 0019-MCAL-164, 0019-MCAL-165 + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party | ETH/FEB23 | isolated margin | 0.2 | | + | party1 | ETH/FEB23 | isolated margin | 0.2 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 4770 | 0 | 5724 | 0 | isolated margin | 0.2 | 15900 | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.2 | 15900 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 9540 | 22610 | 15900 | + | party1 | USD | ETH/FEB23 | 0 | 32150 | 15900 | + + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party | party-sell | 15500 | 0 | TIF_GTC | | + | party1 | party1-sell | 15500 | 0 | TIF_GTC | | + + When the network moves ahead "2" blocks + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 9540 | 23010 | 15500 | + | party1 | USD | ETH/FEB23 | 0 | 32550 | 15500 | + + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | sell | 15900 | 0 | + | sell | 15500 | 10 | + + And the orders should have the following status: + | party | reference | status | + | party | party-sell | STATUS_ACTIVE | + | party1 | party1-sell | STATUS_ACTIVE | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 4770 | 0 | 5724 | 0 | isolated margin | 0.2 | 15500 | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.2 | 15500 | + + #AC: 0019-MCAL-166, 0019-MCAL-167 + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party | party-sell | 15500 | -2 | TIF_GTC | | + | party1 | party1-sell | 15500 | -2 | TIF_GTC | | + When the network moves ahead "2" blocks + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 9540 | 29210 | 9300 | + | party1 | USD | ETH/FEB23 | 0 | 38750 | 9300 | + + When the network moves ahead "2" blocks + + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | sell | 15900 | 0 | + | sell | 15500 | 6 | + + And the orders should have the following status: + | party | reference | status | + | party | party-sell | STATUS_ACTIVE | + | party1 | party1-sell | STATUS_ACTIVE | + + #maintenance margin: min(3*0,15900*3*0.25)+3*0.1*15900=4770 + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 4770 | 0 | 5724 | 0 | isolated margin | 0.2 | 9300 | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.2 | 9300 | + + Then the mark price should be "15900" for the market "ETH/FEB23" diff --git a/core/integration/features/margin/0019-MCAL-168.feature b/core/integration/features/margin/0019-MCAL-168.feature new file mode 100644 index 0000000000..f86da13b6c --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-168.feature @@ -0,0 +1,103 @@ +Feature: when party holds both orders and positions, amend order so order is filled\partially filled while party does not have enough collateral to cover + Background: + # Set liquidity parameters to allow "zero" target-stake which is needed to construct the order-book defined in the ACs + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 1s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + + Scenario: 001 party and party1 both orders and positions + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 26440 | + | party1 | USD | 26440 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 2 | 15300 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 5 | 15500 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 6 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 5 | 16900 | 0 | TYPE_LIMIT | TIF_GTC | party-sell | + | party1 | ETH/FEB23 | sell | 5 | 16900 | 0 | TYPE_LIMIT | TIF_GTC | party1-sell | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | sell | 15900 | 0 | + | sell | 16900 | 10 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party | ETH/FEB23 | isolated margin | 0.2 | | + | party1 | ETH/FEB23 | isolated margin | 0.2 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 7770 | 0 | 9324 | 0 | isolated margin | 0.2 | 16900 | + | party1 | ETH/FEB23 | 7770 | 0 | 9324 | 0 | isolated margin | 0.2 | 16900 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 9540 | 0 | 16900 | + | party1 | USD | ETH/FEB23 | 9540 | 0 | 16900 | + + #AC: 0019-MCAL-168, 0019-MCAL-169, amend order price so order get filled/partially filled + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party | party-sell | 15500 | 0 | TIF_GTC | margin check failed | + | party1 | party1-sell | 15300 | 0 | TIF_GTC | margin check failed | + When the network moves ahead "2" blocks + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 7770 | 0 | 9324 | 0 | isolated margin | 0.2 | 0 | + | party1 | ETH/FEB23 | 16695 | 0 | 20034 | 0 | isolated margin | 0.2 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 9540 | 16900 | 0 | + | party1 | USD | ETH/FEB23 | 9540 | 16900 | 0 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party | ETH/FEB23 | sell | 5 | 16900 | 0 | TYPE_LIMIT | TIF_GTC | party-sell | + | party1 | ETH/FEB23 | sell | 5 | 16900 | 0 | TYPE_LIMIT | TIF_GTC | party1-sell | + + #AC: 0019-MCAL-168, 0019-MCAL-169, amend order size when party has/does not have enough collateral + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party | party-sell | 16900 | 1 | TIF_GTC | margin check failed | + | party1 | party1-sell | 16900 | -1 | TIF_GTC | | + When the network moves ahead "2" blocks + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 7770 | 0 | 9324 | 0 | isolated margin | 0.2 | 0 | + | party1 | ETH/FEB23 | 7770 | 0 | 9324 | 0 | isolated margin | 0.2 | 13520 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 9540 | 16900 | 0 | + | party1 | USD | ETH/FEB23 | 9540 | 3380 | 13520 | + + + + + + diff --git a/core/integration/features/margin/0019-MCAL-172.feature b/core/integration/features/margin/0019-MCAL-172.feature new file mode 100644 index 0000000000..fd2df578ae --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-172.feature @@ -0,0 +1,119 @@ +Feature: when party holds both orders and positions, amend order so order is filled\partially filled while party does have enough collateral to cover + Background: + # Set liquidity parameters to allow "zero" target-stake which is needed to construct the order-book defined in the ACs + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 1s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.35 | 0 | default-futures | + + Scenario: 001 party and party1 both orders and positions + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 12644000 | + | party1 | USD | 12644000 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 2 | 15300 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 5 | 15500 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 6 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 5 | 16900 | 0 | TYPE_LIMIT | TIF_GTC | party-sell | + | party1 | ETH/FEB23 | sell | 5 | 16900 | 0 | TYPE_LIMIT | TIF_GTC | party1-sell | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | sell | 15900 | 0 | + | sell | 16900 | 10 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party | ETH/FEB23 | isolated margin | 0.2 | | + | party1 | ETH/FEB23 | isolated margin | 0.2 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 7770 | 0 | 9324 | 0 | isolated margin | 0.2 | 16900 | + | party1 | ETH/FEB23 | 7770 | 0 | 9324 | 0 | isolated margin | 0.2 | 16900 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 9540 | 12617560 | 16900 | + | party1 | USD | ETH/FEB23 | 9540 | 12617560 | 16900 | + + #add additional order to reduce exit_price, hence slippage + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/FEB23 | sell | 10 | 16000 | 0 | TYPE_LIMIT | TIF_GTC | s-liq | + + #AC: 0019-MCAL-172, 0019-MCAL-173, amend order price so order get filled/partially filled + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party | party-sell | 15500 | 0 | TIF_GTC | | + | party1 | party1-sell | 15300 | 0 | TIF_GTC | | + + And the orders should have the following status: + | party | reference | status | + | party | party-sell | STATUS_FILLED | + | party1 | party1-sell | STATUS_ACTIVE | + + When the network moves ahead "2" blocks + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 15736 | 0 | 18883 | 0 | isolated margin | 0.2 | 0 | + | party1 | ETH/FEB23 | 9050 | 0 | 10860 | 0 | isolated margin | 0.2 | 9180 | + + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | sellSideProvider | s-liq | | -10 | TIF_GTC | | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 5 | 15300 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 5 | 15500 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 5 | 16900 | 0 | TYPE_LIMIT | TIF_GTC | party-sell2 | + | party1 | ETH/FEB23 | sell | 3 | 16900 | 0 | TYPE_LIMIT | TIF_GTC | party1-sell2 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 55080 | 0 | 66096 | 0 | isolated margin | 0.2 | 16900 | + | party1 | ETH/FEB23 | 25040 | 0 | 30048 | 0 | isolated margin | 0.2 | 10140 | + + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | sell | 15900 | 0 | + | sell | 16900 | 8 | + + #AC: 0019-MCAL-174, 0019-MCAL-175, amend order price so order get filled/partially filled + #however, after trade, their margin balance will be less than the margin maintenance level, so order will be stopped + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party | party-sell2 | 15500 | 0 | TIF_GTC | margin check failed | + | party1 | party1-sell2 | 15300 | 0 | TIF_GTC | margin check failed | + + And the orders should have the following status: + | party | reference | status | + | party | party-sell2 | STATUS_STOPPED | + | party1 | party1-sell2 | STATUS_STOPPED | + + + + + diff --git a/core/integration/features/margin/0019-MCAL-176.feature b/core/integration/features/margin/0019-MCAL-176.feature new file mode 100644 index 0000000000..00dbc76615 --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-176.feature @@ -0,0 +1,83 @@ +Feature: amend the order and it gets partially matched and you have cover for the trade but not for the remaining order - the trade is done but all of your remaining orders are cancelled + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 1s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.35 | 0 | default-futures | + + Scenario: 001 party and party1 both orders and positions + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 113040 | + | party1 | USD | 264400 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 2 | 15300 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | buy | 6 | 15500 | 0 | TYPE_LIMIT | TIF_GTC | party-buy | + | buySideProvider | ETH/FEB23 | buy | 6 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 6 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | sell | 4 | 16900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | buy | 15500 | 6 | + | sell | 16900 | 4 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party | ETH/FEB23 | isolated margin | 0.6 | | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 42930 | 0 | 51516 | 0 | isolated margin | 0.2 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 57240 | 0 | 55800 | + + #add additional order to reduce exit_price, hence slippage + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/FEB23 | sell | 10 | 16000 | 0 | TYPE_LIMIT | TIF_GTC | s-liq | + + #AC: 0019-MCAL-176, amend order price so order get filled/partially filled + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party | party-buy | 16900 | 0 | TIF_GTC | | + + And the orders should have the following status: + | party | reference | status | + | party | party-buy | STATUS_FILLED | + + And the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | buy | 15500 | 0 | + + When the network moves ahead "2" blocks + + #party's order is closed + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.6 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party | USD | ETH/FEB23 | 0 | 113040 | 0 | + + diff --git a/core/integration/features/margin/0019-MCAL-200.feature b/core/integration/features/margin/0019-MCAL-200.feature new file mode 100644 index 0000000000..8a9f30fc30 --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-200.feature @@ -0,0 +1,207 @@ +Feature: Amending order does not result in trades, margin is not covered, orders are cancelled + Background: + Given the average block duration is "1" + And the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 6 | + | market.auction.minimumDuration | 1 | + And the price monitoring named "my-price-monitoring-1": + | horizon | probability | auction extension | + | 5 | 0.99 | 6 | + + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.2 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring-1 | default-eth-for-future | 0.25 | 0 | 2 | default-futures | + + @MCAL200 + Scenario: amending party has a position, and is increasing its potential position + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | trader1 | USD | 100000000000 | + | trader2 | USD | 100000000000 | + | trader3 | USD | 100000000000 | + | trader4 | USD | 100000000000 | + | lprov1 | USD | 100000000000 | + + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lprov1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader1 | ETH/FEB23 | buy | 1000 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader1 | ETH/FEB23 | buy | 300 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | buy | 100 | 15700 | 0 | TYPE_LIMIT | TIF_GTC | lp-buy-1 | + | trader3 | ETH/FEB23 | buy | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | sell | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | lp-sell-1 | + | trader2 | ETH/FEB23 | sell | 600 | 15802 | 0 | TYPE_LIMIT | TIF_GTC | t2-sell-1 | + | trader2 | ETH/FEB23 | sell | 300 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader2 | ETH/FEB23 | sell | 1000 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 300 | + + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | lprov1 | ETH/FEB23 | buy | 100 | BID | 10 | buy_peg_1 | + | lprov1 | ETH/FEB23 | buy | 200 | BID | 20 | buy_peg_2 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | lprov1 | ETH/FEB23 | 9486 | 10434 | 11383 | 13280 | cross margin | 0 | 0 | + | trader1 | ETH/FEB23 | 20540 | 22594 | 24648 | 28756 | cross margin | 0 | 0 | + | trader3 | ETH/FEB23 | 5241 | 5765 | 6289 | 7337 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lprov1 | USD | ETH/FEB23 | 11383 | 99999987617 | 1000 | + | trader1 | USD | ETH/FEB23 | 23496 | 99999976504 | | + | trader3 | USD | ETH/FEB23 | 6289 | 99999993711 | | + + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader3 | ETH/FEB23 | buy | 100 | 15500 | 0 | TYPE_LIMIT | TIF_GTC | t3-to-amend | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 6650 | 7315 | 7980 | 9310 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | trader3 | USD | ETH/FEB23 | 7980 | 99999992020 | + + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | trader3 | ETH/FEB23 | isolated margin | 0.3 | | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 5070 | 0 | 6084 | 0 | isolated margin | 0.3 | 4650 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | trader3 | USD | ETH/FEB23 | 14220 | 99999981130 | + + When the parties withdraw the following assets: + | party | asset | amount | error | + | trader3 | USD | 99999981130 | | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 5070 | 0 | 6084 | 0 | isolated margin | 0.3 | 4650 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 14220 | 0 | 4650 | + + # amend the order to increase the required margin, but ensure the order does not trade + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | trader3 | t3-to-amend | 15801 | 400 | TIF_GTC | margin check failed | + Then the orders should have the following status: + | party | reference | status | + | trader3 | t3-to-amend | STATUS_STOPPED | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 4740 | 0 | 5688 | 0 | isolated margin | 0.3 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | trader3 | USD | ETH/FEB23 | 14220 | 4650 | + + + @MCAL200 + Scenario: amending party does not hold a position, and is increasing its potential position + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | trader1 | USD | 100000000000 | + | trader2 | USD | 100000000000 | + | trader3 | USD | 100000000000 | + | trader4 | USD | 100000000000 | + | lprov1 | USD | 100000000000 | + + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lprov1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader1 | ETH/FEB23 | buy | 1000 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader1 | ETH/FEB23 | buy | 300 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | buy | 100 | 15700 | 0 | TYPE_LIMIT | TIF_GTC | lp-buy-1 | + | trader3 | ETH/FEB23 | buy | 300 | 15795 | 0 | TYPE_LIMIT | TIF_GTC | t3-base-1 | + | trader4 | ETH/FEB23 | buy | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | sell | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | lp-sell-1 | + | trader2 | ETH/FEB23 | sell | 600 | 15802 | 0 | TYPE_LIMIT | TIF_GTC | t2-sell-1 | + | trader2 | ETH/FEB23 | sell | 300 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader2 | ETH/FEB23 | sell | 1000 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 300 | + + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | lprov1 | ETH/FEB23 | buy | 100 | BID | 10 | buy_peg_1 | + | lprov1 | ETH/FEB23 | buy | 200 | BID | 20 | buy_peg_2 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | lprov1 | ETH/FEB23 | 9486 | 10434 | 11383 | 13280 | cross margin | 0 | 0 | + | trader1 | ETH/FEB23 | 20540 | 22594 | 24648 | 28756 | cross margin | 0 | 0 | + | trader3 | ETH/FEB23 | 4740 | 5214 | 5688 | 6636 | cross margin | 0 | 0 | + | trader4 | ETH/FEB23 | 4755 | 5230 | 5706 | 6657 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lprov1 | USD | ETH/FEB23 | 11383 | 99999987617 | 1000 | + | trader1 | USD | ETH/FEB23 | 23496 | 99999976504 | | + | trader3 | USD | ETH/FEB23 | 5686 | 99999994314 | | + | trader4 | USD | ETH/FEB23 | 5688 | 99999994312 | | + + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader3 | ETH/FEB23 | buy | 100 | 15500 | 0 | TYPE_LIMIT | TIF_GTC | t3-to-amend | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 6320 | 6952 | 7584 | 8848 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | trader3 | USD | ETH/FEB23 | 7584 | 99999992416 | + + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | trader3 | ETH/FEB23 | isolated margin | 0.3 | | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.3 | 18865 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 0 | 99999981135 | 18865 | + + When the parties withdraw the following assets: + | party | asset | amount | error | + | trader3 | USD | 99999981135 | | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.3 | 18865 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 0 | 0 | 18865 | + + # amend the order to increase the required margin, but ensure the order does not trade + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | trader3 | t3-to-amend | 15801 | 400 | TIF_GTC | margin check failed | + Then the orders should have the following status: + | party | reference | status | + | trader3 | t3-to-amend | STATUS_STOPPED | + | trader3 | t3-base-1 | STATUS_STOPPED | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.3 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | trader3 | USD | ETH/FEB23 | 0 | 18865 | + diff --git a/core/integration/features/margin/0019-MCAL-201.feature b/core/integration/features/margin/0019-MCAL-201.feature new file mode 100644 index 0000000000..5b5b1c389d --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-201.feature @@ -0,0 +1,102 @@ +Feature: Amending order trades in full, plenty of balance to cover the order amendment + trades + fees + Background: + Given the average block duration is "1" + And the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 6 | + | market.auction.minimumDuration | 1 | + And the price monitoring named "my-price-monitoring-1": + | horizon | probability | auction extension | + | 5 | 0.99 | 6 | + + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.2 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring-1 | default-eth-for-future | 0.25 | 0 | 2 | default-futures | + + @MCAL201 + Scenario: + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | trader1 | USD | 100000000000 | + | trader2 | USD | 100000000000 | + | trader3 | USD | 100000000000 | + | trader4 | USD | 100000000000 | + | lprov1 | USD | 100000000000 | + + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lprov1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader1 | ETH/FEB23 | buy | 1000 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader1 | ETH/FEB23 | buy | 300 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | buy | 100 | 15700 | 0 | TYPE_LIMIT | TIF_GTC | lp-buy-1 | + | trader3 | ETH/FEB23 | buy | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | sell | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | lp-sell-1 | + | trader2 | ETH/FEB23 | sell | 600 | 15802 | 0 | TYPE_LIMIT | TIF_GTC | t2-sell-1 | + | trader2 | ETH/FEB23 | sell | 300 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader2 | ETH/FEB23 | sell | 1000 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 300 | + + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | lprov1 | ETH/FEB23 | buy | 100 | BID | 10 | buy_peg_1 | + | lprov1 | ETH/FEB23 | buy | 200 | BID | 20 | buy_peg_2 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | lprov1 | ETH/FEB23 | 9486 | 10434 | 11383 | 13280 | cross margin | 0 | 0 | + | trader1 | ETH/FEB23 | 20540 | 22594 | 24648 | 28756 | cross margin | 0 | 0 | + | trader3 | ETH/FEB23 | 5241 | 5765 | 6289 | 7337 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lprov1 | USD | ETH/FEB23 | 11383 | 99999987617 | 1000 | + | trader1 | USD | ETH/FEB23 | 23496 | 99999976504 | | + | trader3 | USD | ETH/FEB23 | 6289 | 99999993711 | | + + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader3 | ETH/FEB23 | buy | 100 | 15500 | 0 | TYPE_LIMIT | TIF_GTC | t3-to-amend | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 6650 | 7315 | 7980 | 9310 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | trader3 | USD | ETH/FEB23 | 7980 | 99999992020 | + + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | trader3 | ETH/FEB23 | isolated margin | 0.3 | | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 5070 | 0 | 6084 | 0 | isolated margin | 0.3 | 4650 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | trader3 | USD | ETH/FEB23 | 14220 | 99999981130 | + + # amend the order to increase the required margin, and the order trades in full + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | trader3 | t3-to-amend | 15802 | -90 | TIF_GTC | | + Then the orders should have the following status: + | party | reference | status | + | trader3 | t3-to-amend | STATUS_FILLED | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 5243 | 0 | 6291 | 0 | isolated margin | 0.3 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | trader3 | USD | ETH/FEB23 | 14694 | 99999985147 | + diff --git a/core/integration/features/margin/0019-MCAL-202.feature b/core/integration/features/margin/0019-MCAL-202.feature new file mode 100644 index 0000000000..f1b96e71d1 --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-202.feature @@ -0,0 +1,103 @@ +Feature: Amending order partially trades, plenty of balance to cover the order amendment + trades + fees + Background: + Given the average block duration is "1" + And the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 6 | + | market.auction.minimumDuration | 1 | + And the price monitoring named "my-price-monitoring-1": + | horizon | probability | auction extension | + | 5 | 0.99 | 6 | + + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.2 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring-1 | default-eth-for-future | 0.25 | 0 | 2 | default-futures | + + @MCAL202 + Scenario: + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | trader1 | USD | 100000000000 | + | trader2 | USD | 100000000000 | + | trader3 | USD | 100000000000 | + | trader4 | USD | 100000000000 | + | lprov1 | USD | 100000000000 | + + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lprov1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader1 | ETH/FEB23 | buy | 1000 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader1 | ETH/FEB23 | buy | 300 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | buy | 100 | 15700 | 0 | TYPE_LIMIT | TIF_GTC | lp-buy-1 | + | trader3 | ETH/FEB23 | buy | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | sell | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | lp-sell-1 | + | trader2 | ETH/FEB23 | sell | 600 | 15802 | 0 | TYPE_LIMIT | TIF_GTC | t2-sell-1 | + | trader2 | ETH/FEB23 | sell | 300 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader2 | ETH/FEB23 | sell | 1000 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 300 | + + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | lprov1 | ETH/FEB23 | buy | 100 | BID | 10 | buy_peg_1 | + | lprov1 | ETH/FEB23 | buy | 200 | BID | 20 | buy_peg_2 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | lprov1 | ETH/FEB23 | 9486 | 10434 | 11383 | 13280 | cross margin | 0 | 0 | + | trader1 | ETH/FEB23 | 20540 | 22594 | 24648 | 28756 | cross margin | 0 | 0 | + | trader3 | ETH/FEB23 | 5241 | 5765 | 6289 | 7337 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lprov1 | USD | ETH/FEB23 | 11383 | 99999987617 | 1000 | + | trader1 | USD | ETH/FEB23 | 23496 | 99999976504 | | + | trader3 | USD | ETH/FEB23 | 6289 | 99999993711 | | + + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader3 | ETH/FEB23 | buy | 100 | 15500 | 0 | TYPE_LIMIT | TIF_GTC | t3-to-amend | + | trader4 | ETH/FEB23 | sell | 5 | 15801 | 0 | TYPE_LIMIT | TIF_GTC | t4-for-amend | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 6650 | 7315 | 7980 | 9310 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | trader3 | USD | ETH/FEB23 | 7980 | 99999992020 | + + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | trader3 | ETH/FEB23 | isolated margin | 0.3 | | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 5070 | 0 | 6084 | 0 | isolated margin | 0.3 | 4650 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 14220 | 99999981130 | 4650 | + + # amend the order to increase the required margin, and the order partially trades (trader4 has a buy position for 5 @ 15801) + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | trader3 | t3-to-amend | 15801 | -90 | TIF_GTC | | + Then the orders should have the following status: + | party | reference | status | + | trader3 | t3-to-amend | STATUS_ACTIVE | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 5152 | 0 | 6182 | 0 | isolated margin | 0.3 | 237 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 14457 | 99999985226 | 237 | + diff --git a/core/integration/features/margin/0019-MCAL-203.feature b/core/integration/features/margin/0019-MCAL-203.feature new file mode 100644 index 0000000000..2f9ce0ba6e --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-203.feature @@ -0,0 +1,102 @@ +Feature: Amending order no trades, plenty of balance to cover the order amendment + Background: + Given the average block duration is "1" + And the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 6 | + | market.auction.minimumDuration | 1 | + And the price monitoring named "my-price-monitoring-1": + | horizon | probability | auction extension | + | 5 | 0.99 | 6 | + + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.2 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring-1 | default-eth-for-future | 0.25 | 0 | 2 | default-futures | + + @MCAL203 + Scenario: + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | trader1 | USD | 100000000000 | + | trader2 | USD | 100000000000 | + | trader3 | USD | 100000000000 | + | trader4 | USD | 100000000000 | + | lprov1 | USD | 100000000000 | + + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lprov1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader1 | ETH/FEB23 | buy | 1000 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader1 | ETH/FEB23 | buy | 300 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | buy | 100 | 15700 | 0 | TYPE_LIMIT | TIF_GTC | lp-buy-1 | + | trader3 | ETH/FEB23 | buy | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | sell | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | lp-sell-1 | + | trader2 | ETH/FEB23 | sell | 600 | 15802 | 0 | TYPE_LIMIT | TIF_GTC | t2-sell-1 | + | trader2 | ETH/FEB23 | sell | 300 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader2 | ETH/FEB23 | sell | 1000 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 300 | + + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | lprov1 | ETH/FEB23 | buy | 100 | BID | 10 | buy_peg_1 | + | lprov1 | ETH/FEB23 | buy | 200 | BID | 20 | buy_peg_2 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | lprov1 | ETH/FEB23 | 9486 | 10434 | 11383 | 13280 | cross margin | 0 | 0 | + | trader1 | ETH/FEB23 | 20540 | 22594 | 24648 | 28756 | cross margin | 0 | 0 | + | trader3 | ETH/FEB23 | 5241 | 5765 | 6289 | 7337 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lprov1 | USD | ETH/FEB23 | 11383 | 99999987617 | 1000 | + | trader1 | USD | ETH/FEB23 | 23496 | 99999976504 | | + | trader3 | USD | ETH/FEB23 | 6289 | 99999993711 | | + + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader3 | ETH/FEB23 | buy | 100 | 15500 | 0 | TYPE_LIMIT | TIF_GTC | t3-to-amend | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 6650 | 7315 | 7980 | 9310 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | trader3 | USD | ETH/FEB23 | 7980 | 99999992020 | + + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | trader3 | ETH/FEB23 | isolated margin | 0.3 | | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 5070 | 0 | 6084 | 0 | isolated margin | 0.3 | 4650 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 14220 | 99999981130 | 4650 | + + # amend the order to increase the required margin, the order remains on the book without issue + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | trader3 | t3-to-amend | 15801 | -90 | TIF_GTC | | + Then the orders should have the following status: + | party | reference | status | + | trader3 | t3-to-amend | STATUS_ACTIVE | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 5058 | 0 | 6069 | 0 | isolated margin | 0.3 | 474 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 14220 | 99999985306 | 474 | + diff --git a/core/integration/features/margin/0019-MCAL-204.feature b/core/integration/features/margin/0019-MCAL-204.feature new file mode 100644 index 0000000000..35e7c757f4 --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-204.feature @@ -0,0 +1,93 @@ +Feature: Test switch between margin mode + Background: + # Set liquidity parameters to allow "zero" target-stake which is needed to construct the order-book defined in the ACs + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + + Scenario: Amending an order to make it match while in isolated mode can fail if the margin requirements are not met. + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 16000 | + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | party1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | sell | 1 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | s-1 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + #switch to isolated margin + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party1 | ETH/FEB23 | isolated margin | 0.4 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.4 | 0 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/FEB23 | 0 | 15000 | + + # Now place an order that sits on the book which we can amend to match later + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/FEB23 | sell | 1 | 20000 | 0 | TYPE_LIMIT | TIF_GTC | sell-1 | + | party1 | ETH/FEB23 | buy | 1 | 19000 | 0 | TYPE_LIMIT | TIF_GTC | party1-buy | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.4 | 7600 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/FEB23 | 0 | 7400 | + + # Set up two orders which do not cross so we can amend one of them to force the trade + Then the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | buy | 19000 | 1 | + | sell | 20000 | 1 | + + # This will make the two orders cross but will fail the margin check once the order has already been cancelled/replaced. + When the parties amend the following orders: + | party | reference | price | tif | error | + | party1| party1-buy | 20001 | TIF_GTC | margin check failed | + + # party 1 no longer has it's order due to insufficient margin + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.4 | 0 | + + Then the orders should have the following status: + | party | reference | status | + | party1 | party1-buy | STATUS_STOPPED | + | sellSideProvider | sell-1 | STATUS_ACTIVE | + + # The amended order should be removed from the book and the order it was trying to match with will be restored + Then the order book should have the following volumes for market "ETH/FEB23": + | side | price | volume | + | buy | 19000 | 0 | + | sell | 20000 | 1 | + + diff --git a/core/integration/features/margin/0019-MCAL-205.feature b/core/integration/features/margin/0019-MCAL-205.feature new file mode 100644 index 0000000000..2bf1c25155 --- /dev/null +++ b/core/integration/features/margin/0019-MCAL-205.feature @@ -0,0 +1,367 @@ +Feature: Submitting an order that with isolated margin when the party doesn't have sufficient balance to cover the new order + Background: + Given the average block duration is "1" + And the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 6 | + | market.auction.minimumDuration | 1 | + And the price monitoring named "my-price-monitoring-1": + | horizon | probability | auction extension | + | 5 | 0.99 | 6 | + + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.2 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring-1 | default-eth-for-future | 0.25 | 0 | 2 | default-futures | + + @MCAL205 + Scenario: The new order would result in trades does not change the state of the book + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | trader1 | USD | 100000000000 | + | trader2 | USD | 100000000000 | + | trader3 | USD | 5000 | + | trader4 | USD | 100000000000 | + | trader5 | USD | 100000000000 | + | lprov1 | USD | 100000000000 | + + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lprov1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader1 | ETH/FEB23 | buy | 1000 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader1 | ETH/FEB23 | buy | 300 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | buy | 100 | 15700 | 0 | TYPE_LIMIT | TIF_GTC | lp-buy-1 | + | trader4 | ETH/FEB23 | buy | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | sell | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | lp-sell-1 | + | trader2 | ETH/FEB23 | sell | 600 | 15802 | 0 | TYPE_LIMIT | TIF_GTC | t2-sell-1 | + | trader2 | ETH/FEB23 | sell | 300 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader2 | ETH/FEB23 | sell | 1000 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 300 | + + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | lprov1 | ETH/FEB23 | buy | 100 | BID | 10 | buy_peg_1 | + | lprov1 | ETH/FEB23 | buy | 200 | BID | 20 | buy_peg_2 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | lprov1 | ETH/FEB23 | 9486 | 10434 | 11383 | 13280 | cross margin | 0 | 0 | + | trader1 | ETH/FEB23 | 20540 | 22594 | 24648 | 28756 | cross margin | 0 | 0 | + | trader4 | ETH/FEB23 | 5241 | 5765 | 6289 | 7337 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lprov1 | USD | ETH/FEB23 | 11383 | 99999987617 | 1000 | + | trader1 | USD | ETH/FEB23 | 23496 | 99999976504 | | + | trader4 | USD | ETH/FEB23 | 6289 | 99999993711 | | + + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | trader3 | ETH/FEB23 | isolated margin | 0.3 | | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.3 | 0 | + + # trader3 to place first order in isolated margin mode, check balance and margin levels + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader3 | ETH/FEB23 | buy | 100 | 15500 | 0 | TYPE_LIMIT | TIF_GTC | t3-first | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 4650 | + And the order book should have the following volumes for market "ETH/FEB23": + | volume | price | side | + | 1000 | 200100 | sell | + | 300 | 200000 | sell | + | 600 | 15802 | sell | + | 100 | 15700 | buy | + | 100 | 15690 | buy | + | 200 | 15680 | buy | + | 300 | 15600 | buy | + | 100 | 15500 | buy | + | 1000 | 14900 | buy | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 0 | 350 | 4650 | + + # trader3 submits an order that would result in a trade, but they don't have enough margin + # Make sure the book is in the correct state, and the order gets rejected. + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | error | + | trader3 | ETH/FEB23 | buy | 50 | 15802 | 0 | TYPE_LIMIT | TIF_GTC | t3-second | margin check failed | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 4650 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 0 | 350 | 4650 | + And the order book should have the following volumes for market "ETH/FEB23": + | volume | price | side | + | 1000 | 200100 | sell | + | 300 | 200000 | sell | + | 600 | 15802 | sell | + | 100 | 15700 | buy | + | 100 | 15690 | buy | + | 200 | 15680 | buy | + | 300 | 15600 | buy | + | 100 | 15500 | buy | + | 1000 | 14900 | buy | + # Now ensure the order is still on the book, and we can trade + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | error | + | trader5 | ETH/FEB23 | buy | 50 | 15802 | 1 | TYPE_LIMIT | TIF_GTC | t5-first | | + Then the order book should have the following volumes for market "ETH/FEB23": + | volume | price | side | + | 1000 | 200100 | sell | + | 300 | 200000 | sell | + | 550 | 15802 | sell | + | 100 | 15700 | buy | + | 100 | 15690 | buy | + | 200 | 15680 | buy | + | 300 | 15600 | buy | + | 100 | 15500 | buy | + | 1000 | 14900 | buy | + + @MCAL205 + Scenario: The new order doesn't result in trades still does not change the state of the book + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | trader1 | USD | 100000000000 | + | trader2 | USD | 100000000000 | + | trader3 | USD | 5000 | + | trader4 | USD | 100000000000 | + | trader5 | USD | 100000000000 | + | lprov1 | USD | 100000000000 | + + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lprov1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader1 | ETH/FEB23 | buy | 1000 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader1 | ETH/FEB23 | buy | 300 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | buy | 100 | 15700 | 0 | TYPE_LIMIT | TIF_GTC | lp-buy-1 | + | trader4 | ETH/FEB23 | buy | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | sell | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | lp-sell-1 | + | trader2 | ETH/FEB23 | sell | 600 | 15802 | 0 | TYPE_LIMIT | TIF_GTC | t2-sell-1 | + | trader2 | ETH/FEB23 | sell | 300 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader2 | ETH/FEB23 | sell | 1000 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 300 | + + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | lprov1 | ETH/FEB23 | buy | 100 | BID | 10 | buy_peg_1 | + | lprov1 | ETH/FEB23 | buy | 200 | BID | 20 | buy_peg_2 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | lprov1 | ETH/FEB23 | 9486 | 10434 | 11383 | 13280 | cross margin | 0 | 0 | + | trader1 | ETH/FEB23 | 20540 | 22594 | 24648 | 28756 | cross margin | 0 | 0 | + | trader4 | ETH/FEB23 | 5241 | 5765 | 6289 | 7337 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lprov1 | USD | ETH/FEB23 | 11383 | 99999987617 | 1000 | + | trader1 | USD | ETH/FEB23 | 23496 | 99999976504 | | + | trader4 | USD | ETH/FEB23 | 6289 | 99999993711 | | + + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | trader3 | ETH/FEB23 | isolated margin | 0.3 | | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.3 | 0 | + + # trader3 to place first order in isolated margin mode, check balance and margin levels + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader3 | ETH/FEB23 | buy | 100 | 15500 | 0 | TYPE_LIMIT | TIF_GTC | t3-first | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 4650 | + And the order book should have the following volumes for market "ETH/FEB23": + | volume | price | side | + | 1000 | 200100 | sell | + | 300 | 200000 | sell | + | 600 | 15802 | sell | + | 100 | 15700 | buy | + | 100 | 15690 | buy | + | 200 | 15680 | buy | + | 300 | 15600 | buy | + | 100 | 15500 | buy | + | 1000 | 14900 | buy | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 0 | 350 | 4650 | + + # trader3 submits an order that would result in a trade, but they don't have enough margin + # Make sure the book is in the correct state, and the order gets rejected. + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | error | + | trader3 | ETH/FEB23 | buy | 50 | 15801 | 0 | TYPE_LIMIT | TIF_GTC | t3-second | margin check failed | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 4650 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 0 | 350 | 4650 | + And the order book should have the following volumes for market "ETH/FEB23": + | volume | price | side | + | 1000 | 200100 | sell | + | 300 | 200000 | sell | + | 600 | 15802 | sell | + | 100 | 15700 | buy | + | 100 | 15690 | buy | + | 200 | 15680 | buy | + | 300 | 15600 | buy | + | 100 | 15500 | buy | + | 1000 | 14900 | buy | + # Now ensure the order is still on the book, and we can trade + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | error | + | trader5 | ETH/FEB23 | buy | 50 | 15802 | 1 | TYPE_LIMIT | TIF_GTC | t5-first | | + | trader5 | ETH/FEB23 | buy | 549 | 15802 | 1 | TYPE_LIMIT | TIF_GTC | t5-first | | + Then the order book should have the following volumes for market "ETH/FEB23": + | volume | price | side | + | 1000 | 200100 | sell | + | 300 | 200000 | sell | + | 1 | 15802 | sell | + | 100 | 15700 | buy | + | 100 | 15690 | buy | + | 200 | 15680 | buy | + | 300 | 15600 | buy | + | 100 | 15500 | buy | + | 1000 | 14900 | buy | + + @MCAL205 + Scenario: The new order would result in trades, enough margin for both orders, not for orders and trades. does not change the state of the book + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | trader1 | USD | 100000000000 | + | trader2 | USD | 100000000000 | + | trader3 | USD | 4750 | + | trader4 | USD | 100000000000 | + | trader5 | USD | 100000000000 | + | lprov1 | USD | 100000000000 | + + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lprov1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader1 | ETH/FEB23 | buy | 1000 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader1 | ETH/FEB23 | buy | 300 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | buy | 100 | 15700 | 0 | TYPE_LIMIT | TIF_GTC | lp-buy-1 | + | trader4 | ETH/FEB23 | buy | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | sell | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | lp-sell-1 | + | trader2 | ETH/FEB23 | sell | 6 | 15802 | 0 | TYPE_LIMIT | TIF_GTC | t2-sell-1 | + | trader2 | ETH/FEB23 | sell | 300 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader2 | ETH/FEB23 | sell | 1000 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 300 | + + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | lprov1 | ETH/FEB23 | buy | 100 | BID | 10 | buy_peg_1 | + | lprov1 | ETH/FEB23 | buy | 200 | BID | 20 | buy_peg_2 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader1 | ETH/FEB23 | 20540 | 22594 | 24648 | 28756 | cross margin | 0 | 0 | + | trader4 | ETH/FEB23 | 5241 | 5765 | 6289 | 7337 | cross margin | 0 | 0 | + #| lprov1 | ETH/FEB23 | 9486 | 10434 | 11383 | 13280 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | trader1 | USD | ETH/FEB23 | 23496 | 99999976504 | | + | trader4 | USD | ETH/FEB23 | 6289 | 99999993711 | | + #| lprov1 | USD | ETH/FEB23 | 11383 | 99999987617 | 1000 | + + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | trader3 | ETH/FEB23 | isolated margin | 0.3 | | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.3 | 0 | + + # trader3 to place first order in isolated margin mode, check balance and margin levels + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader3 | ETH/FEB23 | buy | 100 | 15500 | 0 | TYPE_LIMIT | TIF_GTC | t3-first | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 4650 | + And the order book should have the following volumes for market "ETH/FEB23": + | volume | price | side | + | 1000 | 200100 | sell | + | 300 | 200000 | sell | + | 6 | 15802 | sell | + | 100 | 15700 | buy | + | 100 | 15690 | buy | + | 200 | 15680 | buy | + | 300 | 15600 | buy | + | 100 | 15500 | buy | + | 1000 | 14900 | buy | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 0 | 100 | 4650 | + + # trader3 submits an order that would result in a trade, but they don't have enough margin + # Make sure the book is in the correct state, and the order gets rejected. + # The order + trade would require 4768 of total margin balance + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | error | + | trader3 | ETH/FEB23 | buy | 7 | 15802 | 0 | TYPE_LIMIT | TIF_GTC | t3-second | margin check failed | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0 | 4650 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 0 | 100 | 4650 | + And the order book should have the following volumes for market "ETH/FEB23": + | volume | price | side | + | 1000 | 200100 | sell | + | 300 | 200000 | sell | + | 6 | 15802 | sell | + | 100 | 15700 | buy | + | 100 | 15690 | buy | + | 200 | 15680 | buy | + | 300 | 15600 | buy | + | 100 | 15500 | buy | + | 1000 | 14900 | buy | + + # Now ensure the order is still on the book, and we can trade + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | error | + | trader5 | ETH/FEB23 | buy | 5 | 15802 | 1 | TYPE_LIMIT | TIF_GTC | t5-first | | + Then the order book should have the following volumes for market "ETH/FEB23": + | volume | price | side | + | 1000 | 200100 | sell | + | 300 | 200000 | sell | + | 1 | 15802 | sell | + | 100 | 15700 | buy | + | 100 | 15690 | buy | + | 200 | 15680 | buy | + | 300 | 15600 | buy | + | 100 | 15500 | buy | + | 1000 | 14900 | buy | + diff --git a/core/integration/features/margin/margin-for-parked-orders.feature b/core/integration/features/margin/margin-for-parked-orders.feature new file mode 100644 index 0000000000..c93980fc94 --- /dev/null +++ b/core/integration/features/margin/margin-for-parked-orders.feature @@ -0,0 +1,283 @@ +Feature: Test for parked/unparked pegged orders + Background: Background name: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 6 | + And the average block duration is "1" + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the price monitoring named "price-monitoring": + | horizon | probability | auction extension | + | 3600 | 0.95 | 3 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | price-monitoring | default-eth-for-future | 0.25 | 0 | default-futures | + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lpprov | USD | 100000000000 | + | aux_buys | USD | 100000000000 | + | aux_sells | USD | 100000000000 | + | test_party | USD | 100000 | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux_buys | ETH/FEB23 | buy | 10 | 995 | 0 | TYPE_LIMIT | TIF_GTC | buy-1 | + | aux_buys | ETH/FEB23 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | buy-trade-1 | + | aux_sells | ETH/FEB23 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | sell-trade-1 | + | aux_sells | ETH/FEB23 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | sell-1 | + | aux_sells | ETH/FEB23 | sell | 10 | 1505 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | lpprov | ETH/FEB23 | buy | 10 | 100 | 0 | TYPE_LIMIT | TIF_GTC | lp-buy-1 | + | lpprov | ETH/FEB23 | sell | 10 | 10000 | 0 | TYPE_LIMIT | TIF_GTC | lp-sell-1 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/FEB23 | 900000 | 0.1 | submission | + | lp1 | lpprov | ETH/FEB23 | 900000 | 0.1 | submission | + + Then the opening auction period ends for market "ETH/FEB23" + And the mark price should be "1000" for the market "ETH/FEB23" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB23" + And the network moves ahead "1" blocks + + Scenario: In cross margin mode, party park pegged order, switch to isolated margin and the pegged order is cancelled 0019-MCAL-143 + # enter pegged order here + Given the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | cross margin | | | + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | test_party | ETH/FEB23 | buy | 5 | MID | 1 | buy_peg | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 500 | 550 | 600 | 700 | cross margin | | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | test_party | USD | ETH/FEB23 | 600 | 99400 | + + Given the orders should have the following status: + | party | reference | status | + | test_party | buy_peg | STATUS_ACTIVE | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux_buys | ETH/FEB23 | buy | 1000 | 10000 | 0 | TYPE_LIMIT | TIF_GTC | auction-trigger-1 | + Then the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/FEB23" + And the orders should have the following status: + | party | reference | status | + | test_party | buy_peg | STATUS_PARKED | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 0 | 0 | 0 | 0 | cross margin | | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | test_party | USD | ETH/FEB23 | 0 | 100000 | + + Given the parties cancel the following orders: + | party | reference | + | aux_buys | auction-trigger-1 | + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | isolated margin | 0.50 | | + Then the orders should have the following status: + | party | reference | status | + | test_party | buy_peg | STATUS_CANCELLED | + + Given the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/FEB23" + When the network moves ahead "4" blocks + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB23" + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.50 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | test_party | USD | ETH/FEB23 | 0 | 100000 | 0 | + + Scenario: In cross margin mode, party park pegged order, switch to isolated margin and the pegged order is cancelled 0019-MCAL-144 + # enter pegged iceberg order here + Given the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | cross margin | | | + When the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | reference | pegged reference | volume | offset | + | test_party | ETH/FEB23 | 5 | 2 | buy | buy_ice_peg | MID | 5 | 1 | + # (1000 - 1) * 5 * 0.5 = 2492 + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 500 | 550 | 600 | 700 | cross margin | | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | test_party | USD | ETH/FEB23 | 600 | 99400 | + + Given the orders should have the following status: + | party | reference | status | + | test_party | buy_ice_peg | STATUS_ACTIVE | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux_buys | ETH/FEB23 | buy | 1000 | 10000 | 0 | TYPE_LIMIT | TIF_GTC | auction-trigger-1 | + Then the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/FEB23" + And the orders should have the following status: + | party | reference | status | + | test_party | buy_ice_peg | STATUS_PARKED | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 0 | 0 | 0 | 0 | cross margin | | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | test_party | USD | ETH/FEB23 | 0 | 100000 | + + Given the parties cancel the following orders: + | party | reference | + | aux_buys | auction-trigger-1 | + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | isolated margin | 0.50 | | + Then the orders should have the following status: + | party | reference | status | + | test_party | buy_ice_peg | STATUS_CANCELLED | + + Given the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/FEB23" + When the network moves ahead "4" blocks + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB23" + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.50 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | test_party | USD | ETH/FEB23 | 0 | 100000 | 0 | + + Scenario: In cross margin mode, partially fill pegged order, park then switch to isolated margin. Pegged order is cancelled 0019-MCAL-147 + # enter pegged order here + Given the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | cross margin | | | + And the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | test_party | ETH/FEB23 | buy | 5 | MID | 1 | buy_peg | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux_sells | ETH/FEB23 | sell | 2 | 995 | 1 | TYPE_LIMIT | TIF_GTC | pfill_test_order | + And the following trades should be executed: + | buyer | price | size | seller | + | test_party | 997 | 2 | aux_sells | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 500 | 550 | 600 | 700 | cross margin | | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | test_party | USD | ETH/FEB23 | 600 | 99400 | + Given the orders should have the following status: + | party | reference | status | + | test_party | buy_peg | STATUS_ACTIVE | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux_buys | ETH/FEB23 | buy | 1000 | 10000 | 0 | TYPE_LIMIT | TIF_GTC | auction-trigger-1 | + Then the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/FEB23" + And the orders should have the following status: + | party | reference | status | + | test_party | buy_peg | STATUS_PARKED | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 500 | 550 | 600 | 700 | cross margin | | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | test_party | USD | ETH/FEB23 | 600 | 99400 | + + Given the parties cancel the following orders: + | party | reference | + | aux_buys | auction-trigger-1 | + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | isolated margin | 0.50 | | + Then the orders should have the following status: + | party | reference | status | + | test_party | buy_peg | STATUS_CANCELLED | + + Given the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/FEB23" + When the network moves ahead "4" blocks + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB23" + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 204 | 0 | 244 | 0 | isolated margin | 0.50 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | test_party | USD | ETH/FEB23 | 997 | 99003 | 0 | + + Scenario: In cross margin mode, partially fill pegged order, park then switch to isolated margin. Pegged order is cancelled 0019-MCAL-148 + # enter pegged iceberg order here + Given the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | cross margin | | | + When the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | reference | pegged reference | volume | offset | + | test_party | ETH/FEB23 | 5 | 2 | buy | buy_ice_peg | MID | 5 | 1 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux_sells | ETH/FEB23 | sell | 2 | 995 | 1 | TYPE_LIMIT | TIF_GTC | pfill_test_order | + And the following trades should be executed: + | buyer | price | size | seller | + | test_party | 997 | 2 | aux_sells | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 500 | 550 | 600 | 700 | cross margin | | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | test_party | USD | ETH/FEB23 | 600 | 99400 | + Given the orders should have the following status: + | party | reference | status | + | test_party | buy_ice_peg | STATUS_ACTIVE | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux_buys | ETH/FEB23 | buy | 1000 | 10000 | 0 | TYPE_LIMIT | TIF_GTC | auction-trigger-1 | + Then the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/FEB23" + And the orders should have the following status: + | party | reference | status | + | test_party | buy_ice_peg | STATUS_PARKED | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 500 | 550 | 600 | 700 | cross margin | | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | test_party | USD | ETH/FEB23 | 600 | 99400 | + + Given the parties cancel the following orders: + | party | reference | + | aux_buys | auction-trigger-1 | + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | isolated margin | 0.50 | | + Then the orders should have the following status: + | party | reference | status | + | test_party | buy_ice_peg | STATUS_CANCELLED | + + Given the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/FEB23" + When the network moves ahead "4" blocks + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB23" + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 204 | 0 | 244 | 0 | isolated margin | 0.50 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | test_party | USD | ETH/FEB23 | 997 | 99003 | 0 | + + Scenario: In auction a party in isolated margin mode enter pegged order that is rejected 0019-MCAL-049 + Given the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB23" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux_buys | ETH/FEB23 | buy | 1000 | 10000 | 0 | TYPE_LIMIT | TIF_GTC | auction-trigger-1 | + Then the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/FEB23" + + Given the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | isolated margin | 0.5 | | + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | error | + | test_party | ETH/FEB23 | buy | 5 | MID | 1 | buy_peg | invalid OrderError | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | reference | pegged reference | volume | offset | error | + | test_party | ETH/FEB23 | 5 | 2 | buy | buy_ice_peg | MID | 5 | 1 | invalid OrderError | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | | 0 | \ No newline at end of file diff --git a/core/integration/features/margin/margin-for-pegged-orders.feature b/core/integration/features/margin/margin-for-pegged-orders.feature new file mode 100644 index 0000000000..14ee89d9de --- /dev/null +++ b/core/integration/features/margin/margin-for-pegged-orders.feature @@ -0,0 +1,246 @@ +Feature: Test pegged order amend under isolated margin mode + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 6 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lpprov | USD | 100000000000 | + | aux_buys | USD | 100000000000 | + | aux_sells | USD | 100000000000 | + | test_party | USD | 100000 | + | test_party2 | USD | 100000 | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux_buys | ETH/FEB23 | buy | 10 | 995 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | + | aux_buys | ETH/FEB23 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | + | aux_sells | ETH/FEB23 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + | aux_sells | ETH/FEB23 | sell | 10 | 1005 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + | lpprov | ETH/FEB23 | buy | 10 | 100 | 0 | TYPE_LIMIT | TIF_GTC | ref-3 | + | lpprov | ETH/FEB23 | sell | 10 | 10000 | 0 | TYPE_LIMIT | TIF_GTC | ref-4 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/FEB23 | 900000 | 0.1 | submission | + | lp1 | lpprov | ETH/FEB23 | 900000 | 0.1 | submission | + + Then the opening auction period ends for market "ETH/FEB23" + And the mark price should be "1000" for the market "ETH/FEB23" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB23" + + Scenario: Party cannot enter a pegged order when in isolated margin mode (0019-MCAL-049) + # pegged order + Given the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | isolated margin | 0.91 | | + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | error | + | test_party | ETH/FEB23 | sell | 10 | ASK | 9 | sell_peg | invalid OrderError | + | test_party | ETH/FEB23 | buy | 5 | BID | 9 | buy_peg | invalid OrderError | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.91 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | test_party | USD | ETH/FEB23 | 0 | 100000 | 0 | + + Scenario: Party cannot enter a pegged order when in isolated margin mode (0019-MCAL-052) + # pegged iceberg order + Given the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | isolated margin | 0.91 | | + When the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | reference | pegged reference | volume | offset | error | + | test_party | ETH/FEB23 | 100 | 10 | buy | buy_ice_peg | BID | 100 | 9 | invalid OrderError | + | test_party | ETH/FEB23 | 100 | 10 | sell | sell_ice_peg | ASK | 100 | 9 | invalid OrderError | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.91 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | test_party | USD | ETH/FEB23 | 0 | 100000 | 0 | + + Scenario: When the party has a pegged order in cross margin mode switches to isolated margin mode the pegged order is cancelled (0019-MCAL-050) + # pegged order + Given the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | cross margin | | | + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | test_party | ETH/FEB23 | buy | 5 | BID | 9 | buy_peg | + | test_party | ETH/FEB23 | sell | 10 | ASK | 9 | sell_peg | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 1000 | 1100 | 1200 | 1400 | cross margin | | | + + Given the parties should have the following account balances: + | party | asset | market id | margin | general | + | test_party | USD | ETH/FEB23 | 1200 | 98800 | + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | isolated margin | 0.91 | | + Then the orders should have the following status: + | party | reference | status | + | test_party | buy_peg | STATUS_CANCELLED | + | test_party | sell_peg | STATUS_CANCELLED | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.91 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | test_party | USD | ETH/FEB23 | 0 | 100000 | 0 | + + Scenario: When the party has a pegged order in cross margin mode switches to isolated margin mode the pegged order is cancelled (0019-MCAL-051) + # pegged iceberg + Given the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | cross margin | | | + When the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | reference | pegged reference | volume | offset | + | test_party | ETH/FEB23 | 100 | 10 | buy | buy_ice_peg | BID | 100 | 9 | + | test_party | ETH/FEB23 | 100 | 10 | sell | sell_ice_peg | ASK | 100 | 9 | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 10000 | 11000 | 12000 | 14000 | cross margin | | 0 | + + Given the parties should have the following account balances: + | party | asset | market id | margin | general | + | test_party | USD | ETH/FEB23 | 12000 | 88000 | + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | isolated margin | 0.5 | | + Then the orders should have the following status: + | party | reference | status | + | test_party | buy_ice_peg | STATUS_CANCELLED | + | test_party | sell_ice_peg | STATUS_CANCELLED | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.91 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | test_party | USD | ETH/FEB23 | 0 | 100000 | 0 | + + Scenario: When in cross margin mode and multiple parties enter multiple types of orders, when one party switches to isolated margin mode only their pegged orders are cancelled. (0019-MCAL-057) + # pegged order + Given the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | cross margin | | | + | test_party2 | ETH/FEB23 | cross margin | | | + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | test_party | ETH/FEB23 | buy | 5 | BID | 1 | buy_peg | + | test_party | ETH/FEB23 | sell | 5 | ASK | 1 | sell_peg | + | test_party2 | ETH/FEB23 | buy | 5 | BID | 1 | buy_peg2 | + | test_party2 | ETH/FEB23 | sell | 5 | MID | 1 | sell_peg2 | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | reference | pegged reference | volume | offset | + | test_party | ETH/FEB23 | 10 | 5 | buy | buy_ice_peg | BID | 10 | 9 | + | test_party | ETH/FEB23 | 10 | 5 | sell | sell_ice_peg | ASK | 10 | 9 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | test_party | ETH/FEB23 | buy | 10 | 995 | 0 | TYPE_LIMIT | TIF_GTC | buy_lim | + | test_party2 | ETH/FEB23 | buy | 10 | 996 | 0 | TYPE_LIMIT | TIF_GTC | buy_lim2 | + | test_party | ETH/FEB23 | sell | 10 | 1005 | 0 | TYPE_LIMIT | TIF_GTC | sell_lim | + | test_party2 | ETH/FEB23 | sell | 10 | 1006 | 0 | TYPE_LIMIT | TIF_GTC | sell_lim2 | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 2500 | 2750 | 3000 | 3500 | cross margin | | 0 | + | test_party2 | ETH/FEB23 | 1500 | 1650 | 1800 | 2100 | cross margin | | 0 | + + Given the parties should have the following account balances: + | party | asset | market id | margin | general | + | test_party | USD | ETH/FEB23 | 3000 | 97000 | + | test_party2 | USD | ETH/FEB23 | 1800 | 98200 | + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | isolated margin | 0.91 | | + Then the orders should have the following status: + | party | reference | status | + | test_party | buy_peg | STATUS_CANCELLED | + | test_party | sell_peg | STATUS_CANCELLED | + | test_party | buy_lim | STATUS_ACTIVE | + | test_party | sell_lim | STATUS_ACTIVE | + | test_party2 | buy_peg2 | STATUS_ACTIVE | + | test_party2 | sell_peg2 | STATUS_ACTIVE | + | test_party2 | buy_lim2 | STATUS_ACTIVE | + | test_party2 | sell_lim2 | STATUS_ACTIVE | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.91 | 9145 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | test_party | USD | ETH/FEB23 | 0 | 90855 | 9145 | + + Scenario: A party in cross maring mode has a partially filled pegged order, when the party switches to isolated margin mode the pegged order is cancelled (0019-MCAL-075) + Given the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | cross margin | | | + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | test_party | ETH/FEB23 | sell | 20 | ASK | -5 | sell_peg | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux_buys | ETH/FEB23 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | auc-trade-1 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 2000 | 2200 | 2400 | 2800 | cross margin | | 0 | + + Given the parties should have the following account balances: + | party | asset | market id | margin | general | + | test_party | USD | ETH/FEB23 | 2400 | 97600 | + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | isolated margin | 0.91 | | + Then the orders should have the following status: + | party | reference | status | + | test_party | sell_peg | STATUS_CANCELLED | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 1050 | 0 | 1260 | 0 | isolated margin | 0.91 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | test_party | USD | ETH/FEB23 | 9100 | 90900 | 0 | + + Scenario: A party in cross maring mode has a partially filled pegged order, when the party switches to isolated margin mode the pegged order is cancelled (0019-MCAL-078) + # iceberg pegged + Given the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | cross margin | | | + When the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | reference | pegged reference | volume | offset | + | test_party | ETH/FEB23 | 20 | 10 | sell | sell_ice_peg | ASK | 20 | -5 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux_buys | ETH/FEB23 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | auc-trade-1 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 2000 | 2200 | 2400 | 2800 | cross margin | | 0 | + + Given the parties should have the following account balances: + | party | asset | market id | margin | general | + | test_party | USD | ETH/FEB23 | 2400 | 97600 | + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | test_party | ETH/FEB23 | isolated margin | 0.91 | | + Then the orders should have the following status: + | party | reference | status | + | test_party | sell_ice_peg | STATUS_CANCELLED | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | test_party | ETH/FEB23 | 1050 | 0 | 1260 | 0 | isolated margin | 0.91 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | test_party | USD | ETH/FEB23 | 9100 | 90900 | 0 | \ No newline at end of file diff --git a/core/integration/features/margin/testnet_crash.feature b/core/integration/features/margin/testnet_crash.feature new file mode 100644 index 0000000000..2fabb33062 --- /dev/null +++ b/core/integration/features/margin/testnet_crash.feature @@ -0,0 +1,115 @@ +Feature: Test order amendment such that the full order is matched but the party doesn't have sufficient cover and their orders should be cancelled and funds released. This is testing the fix for https://github.com/vegaprotocol/vega/issues/10493 + + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the fees configuration named "fees-config-1": + | maker fee | infrastructure fee | + | 0.0004 | 0.001 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | fees-config-1 | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + + Scenario: 001 The party tried to amend an order which is fully matched after the price change but they don't have sufficient cover. + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 320000 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | buy | 100 | 15850 | 0 | TYPE_LIMIT | TIF_GTC | buy-1 | + | sellSideProvider | ETH/FEB23 | sell | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 100 | 20100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties should have the following margin levels: + | party | market id | maintenance | initial | + | party1 | ETH/FEB23 | 159000 | 190800 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/FEB23 | 190200 | 129800 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party1 | ETH/FEB23 | isolated margin | 0.2 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.2 | 317000 | + + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | buy-1 | 20100 | 0 | TIF_GTC | margin check failed | + + And the orders should have the following status: + | party | reference | status | + | party1 | buy-1 | STATUS_STOPPED | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/FEB23 | 0 | 320000 | + + + @Fail + Scenario: 002 The party tried to amend an order which is partially matched after the price change but they don't have sufficient cover. + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party1 | USD | 320000 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 6 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB23 | buy | 100 | 15850 | 0 | TYPE_LIMIT | TIF_GTC | buy-1 | + | sellSideProvider | ETH/FEB23 | sell | 10 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 20100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties should have the following margin levels: + | party | market id | maintenance | initial | + | party1 | ETH/FEB23 | 159000 | 190800 | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/FEB23 | 190200 | 129800 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | + | party1 | ETH/FEB23 | isolated margin | 0.2 | + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | party1 | ETH/FEB23 | 0 | 0 | 0 | 0 | isolated margin | 0.2 | 317000 | + + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | party1 | buy-1 | 20100 | 0 | TIF_GTC | | + + And the orders should have the following status: + | party | reference | status | + | party1 | buy-1 | STATUS_STOPPED | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/FEB23 | 40200 | 2718 | 276800 | + diff --git a/core/integration/features/mark-price/0009-MRKP-001.feature b/core/integration/features/mark-price/0009-MRKP-001.feature new file mode 100644 index 0000000000..69ef622a0c --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-001.feature @@ -0,0 +1,52 @@ +Feature: Test setting of mark price + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 0.1 | 0.5 | 500000 | 0,1,0,0 | 3h0m0s,2s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | weight | 0.1 | 0.5 | 500000 | 0,1,0,0 | 3h0m0s,2s,24h0m0s,1h25m0s | perp | + + Scenario: when mark price methodology hasn't provided a price at the point of uncrossing the opening auction (0009-MRKP-001,0009-MRKP-003) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 14000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 2 | 15902 | 0 | TYPE_LIMIT | TIF_GTC | party-sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 14000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 2 | 15902 | 0 | TYPE_LIMIT | TIF_GTC | party-sell-3 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "0" for the market "ETH/FEB23" + And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/FEB23" + Then the mark price should be "0" for the market "ETH/FEB22" + And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/FEB22" + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + diff --git a/core/integration/features/mark-price/0009-MRKP-002.feature b/core/integration/features/mark-price/0009-MRKP-002.feature new file mode 100644 index 0000000000..ea5a6ffdec --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-002.feature @@ -0,0 +1,61 @@ +Feature: Test setting of mark price + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | last trade | 0.1 | 0.5 | 0 | 0.1,0.2,0.3,0.6 | 3h0m0s,2s,24h0m0s,1h25m0s | + + Scenario: 001 when network.markPriceUpdateMaximumFrequency=0s + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 2 | 15902 | 0 | TYPE_LIMIT | TIF_GTC | party-sell-2 | + | party | ETH/FEB23 | sell | 1 | 15904 | 0 | TYPE_LIMIT | TIF_GTC | party-sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-002 0009-MRKP-003 when network.markPriceUpdateMaximumFrequency=0s + When the network moves ahead "2" blocks + # Check mark-price matches the specification + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | + | party | ETH/FEB23 | 9546 | 10500 | 11455 | 13364 | cross margin | + #margin = min(3*(15900-15900), 3*15900*(0.25))+3*0.1*15900 + 3*0.1*15900=9540 + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 11449 | 36601 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15902 | 1 | TYPE_LIMIT | TIF_GTC | | + + Then the mark price should be "15900" for the market "ETH/FEB23" + When the network moves ahead "1" blocks + Then the mark price should be "15902" for the market "ETH/FEB23" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15904 | 1 | TYPE_LIMIT | TIF_GTC | | + + Then the mark price should be "15902" for the market "ETH/FEB23" + When the network moves ahead "1" blocks + Then the mark price should be "15904" for the market "ETH/FEB23" \ No newline at end of file diff --git a/core/integration/features/mark-price/0009-MRKP-007.feature b/core/integration/features/mark-price/0009-MRKP-007.feature new file mode 100644 index 0000000000..695bba7f0f --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-007.feature @@ -0,0 +1,63 @@ +Feature: Test setting of mark price + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | last trade | 0.1 | 0.5 | 0 | 0.1,0.2,0.3,0.6 | 3h0m0s,2s,24h0m0s,1h25m0s | + + Scenario: 001 when network.markPriceUpdateMaximumFrequency>0s + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 2 | 15902 | 0 | TYPE_LIMIT | TIF_GTC | party-sell-2 | + | party | ETH/FEB23 | sell | 1 | 15904 | 0 | TYPE_LIMIT | TIF_GTC | party-sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-007 when network.markPriceUpdateMaximumFrequency>0s + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | + | party | ETH/FEB23 | 9546 | 10500 | 11455 | 13364 | cross margin | + #margin = min(3*(15900-15900), 3*15900*(0.25))+3*0.1*15900 + 3*0.1*15900=9540 + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 11449 | 36601 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15902 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + When the network moves ahead "3" blocks + Then the mark price should be "15902" for the market "ETH/FEB23" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15904 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15902" for the market "ETH/FEB23" + When the network moves ahead "3" blocks + Then the mark price should be "15904" for the market "ETH/FEB23" + diff --git a/core/integration/features/mark-price/0009-MRKP-010.feature b/core/integration/features/mark-price/0009-MRKP-010.feature new file mode 100644 index 0000000000..41c92db754 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-010.feature @@ -0,0 +1,52 @@ +Feature: Test setting of mark price algorithm for futures and perpetual markets + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | last trade | 0.1 | 0.5 | 0 | 0.1,0.2,0.3,0.6 | 3h0m0s,2s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | last trade | 0.1 | 0.5 | 0 | 0.1,0.2,0.3,0.6 | 3h0m0s,2s,24h0m0s,1h25m0s | perp | + + Scenario: Check that a market has been created successfully with the last trade price algo for mark price (0009-MRKP-010, 0009-MRKP-011) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 2 | 15902 | 0 | TYPE_LIMIT | TIF_GTC | party-sell-2 | + | party | ETH/FEB23 | sell | 1 | 15904 | 0 | TYPE_LIMIT | TIF_GTC | party-sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 2 | 15902 | 0 | TYPE_LIMIT | TIF_GTC | party-sell-2 | + | party1 | ETH/FEB22 | sell | 1 | 15904 | 0 | TYPE_LIMIT | TIF_GTC | party-sell-3 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider1 | ETH/FEB22 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + And the mark price algo should be "COMPOSITE_PRICE_TYPE_LAST_TRADE" for the market "ETH/FEB23" + And the mark price algo should be "COMPOSITE_PRICE_TYPE_LAST_TRADE" for the market "ETH/FEB22" + + + diff --git a/core/integration/features/mark-price/0009-MRKP-012.feature b/core/integration/features/mark-price/0009-MRKP-012.feature new file mode 100644 index 0000000000..b2f5d59fbf --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-012.feature @@ -0,0 +1,133 @@ +Feature: Test setting of mark price + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + + # this is just an example of setting up oracles + And the composite price oracles from "0xCAFECAFE1": + | name | price property | price type | price decimals | + | oracle1 | price1.USD.value | TYPE_INTEGER | 0 | + | oracle2 | price2.USD.value | TYPE_INTEGER | 0 | + | oracle3 | price3.USD.value | TYPE_INTEGER | 0 | + | oracle4 | price4.USD.value | TYPE_INTEGER | 0 | + | oracle5 | price4.USD.value | TYPE_INTEGER | 0 | + + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | oracle1 | oracle2 | oracle3 | oracle4 | oracle5 | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 1 | 1 | 0 | 1,0,0,0,0,0,0,0 | 3h0m0s,2s,24h0m0s,24h0m0s,24h0m0s,24h0m0s,24h0m0s,1h25m0s | oracle1 | oracle2 | oracle3 | oracle4 | oracle5 | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | weight | 1 | 1 | 0 | 1,0,0,0,0,0,0,0 | 3h0m0s,2s,24h0m0s,24h0m0s,24h0m0s,24h0m0s,24h0m0s,1h25m0s | oracle1 | oracle2 | oracle3 | oracle4 | oracle5 | perp | + Scenario: 001 check mark price using weight average + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider | ETH/FEB23 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider | ETH/FEB23 | sell | 2 | 16000 | 0 | TYPE_LIMIT | TIF_GTC | sell-7 | + | sellSideProvider | ETH/FEB23 | sell | 4 | 16020 | 0 | TYPE_LIMIT | TIF_GTC | sell-8 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider1 | ETH/FEB22 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-21 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-31 | + | sellSideProvider1 | ETH/FEB22 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-41 | + | sellSideProvider1 | ETH/FEB22 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-51 | + | sellSideProvider1 | ETH/FEB22 | sell | 2 | 16000 | 0 | TYPE_LIMIT | TIF_GTC | sell-71 | + | sellSideProvider1 | ETH/FEB22 | sell | 4 | 16020 | 0 | TYPE_LIMIT | TIF_GTC | sell-81 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-012,0009-MRKP-013 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + # example of pushing oracle prices + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price1.USD.value | 16000 | -1s | + | price2.USD.value | 15900 | -1s | + | price3.USD.value | 15940 | -1s | + | price4.USD.value | 16001 | -1s | + | price5.USD.value | 16002 | -1s | + + When the network moves ahead "1" blocks + Then the mark price should be "15940" for the market "ETH/FEB23" + Then the mark price should be "15940" for the market "ETH/FEB22" + + When the markets are updated: + | id | decay weight | decay power | linear slippage factor | quadratic slippage factor | + | ETH/FEB23 | 0 | 1 | 0.25 | 0 | + | ETH/FEB22 | 0 | 1 | 0.25 | 0 | + + Then the mark price should be "15940" for the market "ETH/FEB23" + Then the mark price should be "15940" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 3 | 15960 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15960 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15940" for the market "ETH/FEB23" + Then the mark price should be "15940" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 5 | 15990 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 5 | 15990 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15940" for the market "ETH/FEB23" + Then the mark price should be "15940" for the market "ETH/FEB22" + + When the network moves ahead "1" blocks + Then the mark price should be "15990" for the market "ETH/FEB23" + Then the mark price should be "15990" for the market "ETH/FEB22" + + diff --git a/core/integration/features/mark-price/0009-MRKP-016.feature b/core/integration/features/mark-price/0009-MRKP-016.feature new file mode 100644 index 0000000000..fe810a5609 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-016.feature @@ -0,0 +1,83 @@ +Feature: It is possible to configure a cash settled futures market to use an oracle source for the mark price (0009-MRKP-016) and a perps market (with the oracle source different to that used for the external price in the perps market) (0009-MRKP-017) + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 1s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + + # this is just an example of setting up oracles + And the composite price oracles from "0xCAFECAFE1": + | name | price property | price type | price decimals | + | oracle1 | price1.USD.value | TYPE_INTEGER | 0 | + | oracle2 | price2.USD.value | TYPE_INTEGER | 0 | + + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | oracle1 | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 1 | 1 | 0 | 0,0,1,0 | 0s,0s,10s,0s | oracle1 | + + Scenario: 001 check mark with oracle + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider | ETH/FEB23 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider | ETH/FEB23 | sell | 2 | 16000 | 0 | TYPE_LIMIT | TIF_GTC | sell-7 | + | sellSideProvider | ETH/FEB23 | sell | 4 | 16020 | 0 | TYPE_LIMIT | TIF_GTC | sell-8 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + # pushing price from oracle + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price1.USD.value | 16000 | -1s | + + When the network moves ahead "1" blocks + # only the first oracle has ticked so mark price is set fully from oracle1 + Then the mark price should be "16000" for the market "ETH/FEB23" + + # update oracle price + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price1.USD.value | 15000 | -1s | + + When the network moves ahead "2" blocks + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price1.USD.value | 15000 | -1s | + + When the network moves ahead "1" blocks + Then the mark price should be "15000" for the market "ETH/FEB23" \ No newline at end of file diff --git a/core/integration/features/mark-price/0009-MRKP-018.feature b/core/integration/features/mark-price/0009-MRKP-018.feature new file mode 100644 index 0000000000..05d5d67a83 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-018.feature @@ -0,0 +1,94 @@ +Feature: Test It is possible to configure a cash settled futures market to use a weighted average of 1. weighted average of trades over network.markPriceUpdateMaximumFrequency and 2. impact of leveraged notional on the order book with the value of USDT 100 and 3. an oracle source and if last trade is last updated more than 1 minute ago then it is removed and the remaining re-weighted and if the oracle is last updated more than 5 minutes ago then it is removed and the remaining re-weighted (0009-MRKP-018) and a perps market (with the oracle source different to that used for the external price in the perps market) (0009-MRKP-019). + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 1s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + + And the composite price oracles from "0xCAFECAFE1": + | name | price property | price type | price decimals | + | oracle1 | price1.USD.value | TYPE_INTEGER | 0 | + + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | oracle1 | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 0 | 1 | 100 | 1,4,5,0 | 1s,5s,20s,1h25m0s | oracle1 | + + Scenario: 001 check mark price using weight average + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + # leaving opening auction + # mark price calcualted from the trade price + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price1.USD.value | 16000 | -1s | + + When the network moves ahead "2" blocks + # we have: + # price from trades = 15930 - 2 trades in scope + # price from book = 15900 - since the opening auction there are no orders on the sell side so not updating but still not stale + # price from oracle = 16000 + # markprice = 0.1*15930 + 0.4*15900 + 0.5*16000 + Then the mark price should be "15953" for the market "ETH/FEB23" + + # now place and order and let trades go out of scope + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + # we have: + # price from trades = 0 - no trades, price is already stale + # price from book = 15930 fresh + # price from oracle = 16000 still not stale + # markprice = 4/9*15930 + 5/9*16000 = 15968 + Then the mark price should be "15968" for the market "ETH/FEB23" + + # trade the buy side to get rid of the book mid + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + + # now we have no orders on the buy side + When the network moves ahead "10" blocks + # we have: + # price from trades = 0 - no trades, price is already stale + # price from book = 0 stale + # price from oracle = 16000 still not stale + # markprice = 16000 + Then the mark price should be "16000" for the market "ETH/FEB23" + + # get the oracle price to stale and submit a fresh order + When the network moves ahead "10" blocks + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | | + + # now we only have a book price of 15930 (trade and oracle are stale) so it gets a weight of 1 + When the network moves ahead "2" blocks + Then the mark price should be "15930" for the market "ETH/FEB23" \ No newline at end of file diff --git a/core/integration/features/mark-price/0009-MRKP-022.feature b/core/integration/features/mark-price/0009-MRKP-022.feature new file mode 100644 index 0000000000..3c0f02bf84 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-022.feature @@ -0,0 +1,56 @@ +Feature: Composite mark price calculation + + Background: + Given the average block duration is "1" + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 1s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the composite price oracles from "0xCAFECAFE1": + | name | price property | price type | price decimals | + | oracle1 | price1.USD.value | TYPE_INTEGER | 0 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | oracle1 | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 0 | 0 | 100 | 1,1,1,0 | 1m0s,1h0m0s,5m0s,0s | oracle1 | + + Scenario: Composite price composed of last traded, order book, and oracle price (0009-MRKP-022)(0009-MRKP-023) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14970 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 15090 | 0 | TYPE_LIMIT | TIF_GTC | | + When the opening auction period ends for market "ETH/FEB23" + Then the mark price should be "15000" for the market "ETH/FEB23" + + # No price sources stale, composite price average of last traded price, book price and oracle price + Given the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price1.USD.value | 15060 | 0s | + When the network moves ahead "2" blocks + Then the mark price should be "15030" for the market "ETH/FEB23" + + # Last traded price stale, composite price average of book price and oracle price + When the network moves ahead "61" blocks + Then the mark price should be "15045" for the market "ETH/FEB23" + + # Last traded and oracle price stale, composite price average of book price + When the network moves ahead "241" blocks + Then the mark price should be "15030" for the market "ETH/FEB23" + + + + + + + + diff --git a/core/integration/features/mark-price/0009-MRKP-024.feature b/core/integration/features/mark-price/0009-MRKP-024.feature new file mode 100644 index 0000000000..4f9dce0890 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-024.feature @@ -0,0 +1,98 @@ +Feature: Test setting of mark price + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the price monitoring named "my-price-monitoring": + | horizon | probability | auction extension | + | 43200 | 0.9999999 | 10 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring | default-eth-for-future | 0.25 | 0 | default-futures | weight | 1 | 1 | 50000000 | 1,0,0,0 | 20s,20s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring | perp-oracle | 0.25 | 0 | default-futures | weight | 1 | 1 | 50000000 | 1,0,0,0 | 20s,20s,24h0m0s,1h25m0s | perp | + + Scenario: 001 check mark price using weight average + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 5 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 3 | 17000 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 5 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider1 | ETH/FEB22 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider1 | ETH/FEB22 | sell | 3 | 17000 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-024 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + Then the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15900 | TRADING_MODE_CONTINUOUS | 43200 | 15801 | 15999 | 0 | 0 | 3 | + Then the market data for the market "ETH/FEB22" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15900 | TRADING_MODE_CONTINUOUS | 43200 | 15801 | 15999 | 0 | 0 | 3 | + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + When the network moves ahead "2" blocks + Then the mark price should be "15940" for the market "ETH/FEB23" + Then the mark price should be "15940" for the market "ETH/FEB22" + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 3 | 17000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 17000 | 0 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "2" blocks + Then the mark price should be "15940" for the market "ETH/FEB23" + Then the mark price should be "15940" for the market "ETH/FEB22" + And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/FEB23" + And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/FEB22" + + When the network moves ahead "9" blocks + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB23" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB22" + Then the mark price should be "17000" for the market "ETH/FEB23" + Then the mark price should be "17000" for the market "ETH/FEB22" + diff --git a/core/integration/features/mark-price/0009-MRKP-026.feature b/core/integration/features/mark-price/0009-MRKP-026.feature new file mode 100644 index 0000000000..3ea10c581f --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-026.feature @@ -0,0 +1,71 @@ +Feature: Mark price calculation on auction exit + + Background: + Given the average block duration is "1" + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 5s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the price monitoring named "price-monitoring": + | horizon | probability | auction extension | + | 60 | 0.99 | 10 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | price-monitoring | default-eth-for-future | 0.25 | 0 | default-futures | weight | 0 | 0 | 100 | 0,1,0 | 1m0s,1m0s,1m0s | + + Scenario: Order book price set to indicative price during auctions and mark price calcualted on auction exit (0009-MRKP-024)(0009-MRKP-025)(0009-MRKP-026)(0009-MRKP-027) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | aux1 | USD | 100000000000 | + | aux2 | USD | 100000000000 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14970 | 0 | TYPE_LIMIT | TIF_GTC | bestBid | + | aux1 | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | aux2 | ETH/FEB23 | sell | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 10 | 15090 | 0 | TYPE_LIMIT | TIF_GTC | bestAsk | + When the opening auction period ends for market "ETH/FEB23" + Then the mark price should be "15000" for the market "ETH/FEB23" + + When the network moves ahead "6" blocks + Then the mark price should be "15030" for the market "ETH/FEB23" + + Given the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | + | 15030 | TRADING_MODE_CONTINUOUS | 60 | 14900 | 15100 | + And the parties amend the following orders: + | party | reference | price | size delta | tif | + | sellSideProvider | bestAsk | 15190 | 0 | TIF_GTC | + | buySideProvider | bestBid | 15070 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux1 | ETH/FEB23 | buy | 1 | 15110 | 0 | TYPE_LIMIT | TIF_GTC | auctionBid | + | aux2 | ETH/FEB23 | sell | 1 | 15110 | 0 | TYPE_LIMIT | TIF_GTC | auctionAsk | + When the network moves ahead "10" blocks + Then the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15030 | TRADING_MODE_MONITORING_AUCTION | + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | aux1 | auctionBid | 15100 | 0 | TIF_GTC | + | aux2 | auctionAsk | 15100 | 0 | TIF_GTC | + When the network moves ahead "1" blocks + Then the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | + | 15108 | TRADING_MODE_CONTINUOUS | + + + + + + + + + diff --git a/core/integration/features/mark-price/0009-MRKP-028.feature b/core/integration/features/mark-price/0009-MRKP-028.feature new file mode 100644 index 0000000000..3d5105d393 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-028.feature @@ -0,0 +1,105 @@ +Feature: Test setting of mark price + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 1 | 1 | 50000000 | 1,1,0,0 | 8s,5s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | weight | 1 | 1 | 50000000 | 1,1,0,0 | 8s,5s,24h0m0s,1h25m0s | perp | + + Scenario: 001 check mark price using weight average + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 5 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider | ETH/FEB23 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 5 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider1 | ETH/FEB22 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider1 | ETH/FEB22 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider1 | ETH/FEB22 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-028,0009-MRKP-029 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 3 | 15960 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15960 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 5 | 15990 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 5 | 15990 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + #decay weight is 1, so with time weight, mark price is: (15920*2*0+15940*1*0.25+15960*3*0.5+15990*5*0.75)/11=15979 + #median of (15900, 15979)=15939 + When the network moves ahead "1" blocks + Then the mark price should be "15939" for the market "ETH/FEB23" + Then the mark price should be "15939" for the market "ETH/FEB22" + + #AC 0009-MRKP-020,0009-MRKP-021 + #book mark price is stale, and we only have trade mark price available + When the network moves ahead "4" blocks + Then the mark price should be "15979" for the market "ETH/FEB23" + Then the mark price should be "15979" for the market "ETH/FEB22" + + + + + + + diff --git a/core/integration/features/mark-price/0009-MRKP-030.feature b/core/integration/features/mark-price/0009-MRKP-030.feature new file mode 100644 index 0000000000..d45e5a6548 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-030.feature @@ -0,0 +1,75 @@ +Feature: Test setting of mark price + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 1 | 1 | 0 | 1,2,0,0 | 8s,5s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | weight | 1 | 1 | 0 | 1,2,0,0 | 8s,5s,24h0m0s,1h25m0s | perp | + + Scenario: 001 check mark price using weight average + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 5 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider | ETH/FEB23 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 5 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider1 | ETH/FEB22 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider1 | ETH/FEB22 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider1 | ETH/FEB22 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-030,0009-MRKP-031 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "4" blocks + + #book mark price would be (15480*3+15470)/4 = 15,477 + #traded mark price should 15940 + #weighted price: (15477*2+15940)/3=15631 + Then the mark price should be "15631" for the market "ETH/FEB23" + Then the mark price should be "15631" for the market "ETH/FEB22" + diff --git a/core/integration/features/mark-price/0009-MRKP-032.feature b/core/integration/features/mark-price/0009-MRKP-032.feature new file mode 100644 index 0000000000..22deab5b1e --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-032.feature @@ -0,0 +1,76 @@ +Feature: Test setting of mark price + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | median | 1 | 1 | 100 | 1,1,0,0 | 8s,5s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | median | 1 | 1 | 100 | 1,1,0,0 | 8s,5s,24h0m0s,1h25m0s | perp | + + Scenario: 001 check mark price using median price type + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 5 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider | ETH/FEB23 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 5 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider1 | ETH/FEB22 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider1 | ETH/FEB22 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider1 | ETH/FEB22 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-032,0009-MRKP-033 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "4" blocks + #book price: (15480*3+15470)/4 = 15,477.5 + #trade price: 15940 + #median of the two: 15708 + Then the mark price should be "15708" for the market "ETH/FEB23" + Then the mark price should be "15708" for the market "ETH/FEB22" + + diff --git a/core/integration/features/mark-price/0009-MRKP-110.feature b/core/integration/features/mark-price/0009-MRKP-110.feature new file mode 100644 index 0000000000..9d644f4d14 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-110.feature @@ -0,0 +1,100 @@ +Feature: Test setting of mark price + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 0 | 1 | 0 | 1,0,0,0 | 5s,5s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | weight | 0 | 1 | 0 | 1,0,0,0 | 5s,5s,24h0m0s,1h25m0s | perp | + + Scenario: 001 check mark price using weight average + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider | ETH/FEB23 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider1 | ETH/FEB22 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider1 | ETH/FEB22 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider1 | ETH/FEB22 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-110, 0009-MRKP-111 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 3 | 15960 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15960 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 5 | 15990 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 5 | 15990 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + #decay weight is 0, so no time weight, mark price is: (15920*2+15940*1+15960*3+15990*5)/11=15964 + When the network moves ahead "1" blocks + Then the mark price should be "15964" for the market "ETH/FEB23" + Then the mark price should be "15964" for the market "ETH/FEB22" + + + + + + diff --git a/core/integration/features/mark-price/0009-MRKP-112.feature b/core/integration/features/mark-price/0009-MRKP-112.feature new file mode 100644 index 0000000000..a569366cc6 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-112.feature @@ -0,0 +1,92 @@ +Feature: Test setting of mark price + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 0 | 1 | 0 | 1,0,0,0 | 5s,5s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | weight | 0 | 1 | 0 | 1,0,0,0 | 5s,5s,24h0m0s,1h25m0s | perp | + + Scenario: 001 check mark price using weight average + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider | ETH/FEB23 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider1 | ETH/FEB22 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider1 | ETH/FEB22 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-112, 0009-MRKP-113 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 3 | 15960 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15960 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 5 | 15990 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 5 | 15990 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + #decay weight is 0, so no time weight, mark price is: (15940*1+15960*3+15990*5)/9=15974 + When the network moves ahead "1" blocks + Then the mark price should be "15974" for the market "ETH/FEB23" + Then the mark price should be "15974" for the market "ETH/FEB22" + + + + + + diff --git a/core/integration/features/mark-price/0009-MRKP-114.feature b/core/integration/features/mark-price/0009-MRKP-114.feature new file mode 100644 index 0000000000..5da4c76966 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-114.feature @@ -0,0 +1,96 @@ +Feature: Test setting of mark price + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 1 | 1 | 0 | 1,0,0,0 | 5s,5s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | weight | 1 | 1 | 0 | 1,0,0,0 | 5s,5s,24h0m0s,1h25m0s | perp | + + Scenario: 001 check mark price using weight average + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider | ETH/FEB23 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider1 | ETH/FEB22 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider1 | ETH/FEB22 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider1 | ETH/FEB22 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-114,0009-MRKP-115 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 3 | 15960 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15960 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 5 | 15990 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 5 | 15990 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + #decay weight is 1, so with time weight, mark price is: (15920*2*0+15940*1*0.25+15960*3*0.5+15990*5*0.75)/5.5=15979 + When the network moves ahead "1" blocks + Then the mark price should be "15979" for the market "ETH/FEB23" + Then the mark price should be "15979" for the market "ETH/FEB22" + + + + + + diff --git a/core/integration/features/mark-price/0009-MRKP-116.feature b/core/integration/features/mark-price/0009-MRKP-116.feature new file mode 100644 index 0000000000..cba7344dd3 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-116.feature @@ -0,0 +1,63 @@ +Feature: Test setting of mark price + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 1 | 0 | 0 | 1,0,0,0 | 5s,5s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | weight | 1 | 0 | 0 | 1,0,0,0 | 5s,5s,24h0m0s,1h25m0s | perp | + + Scenario: 001 check mark price using weight average + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider1 | ETH/FEB22 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-116, 0009-MRKP-117 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB23" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + When the network moves ahead "8" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + diff --git a/core/integration/features/mark-price/0009-MRKP-118.feature b/core/integration/features/mark-price/0009-MRKP-118.feature new file mode 100644 index 0000000000..8978bfebe8 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-118.feature @@ -0,0 +1,98 @@ +Feature: Test setting of mark price + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 0.5 | 1 | 0 | 1,0,0,0 | 5s,5s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | weight | 0.5 | 1 | 0 | 1,0,0,0 | 5s,5s,24h0m0s,1h25m0s | perp | + + Scenario: 001 check mark price using weight average + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider | ETH/FEB23 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider1 | ETH/FEB22 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider1 | ETH/FEB22 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider1 | ETH/FEB22 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider1 | ETH/FEB22 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-118, 0009-MRKP-119 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 3 | 15960 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15960 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 5 | 15990 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 5 | 15990 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + #decay weight is 0.5, power is 1, so mark price is: (15920*2*0.5+15940*1*0.625+15960*3*0.75+15990*5*0.875)/(2*0.5+1*0.625+3*0.75+5*0.875)=15969 + When the network moves ahead "1" blocks + Then the mark price should be "15969" for the market "ETH/FEB23" + Then the mark price should be "15969" for the market "ETH/FEB22" + + + + + + diff --git a/core/integration/features/mark-price/0009-MRKP-120.feature b/core/integration/features/mark-price/0009-MRKP-120.feature new file mode 100644 index 0000000000..cddcd570a4 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-120.feature @@ -0,0 +1,87 @@ +Feature: Test setting of mark price + Background: + Given the average block duration is "1" + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 0.5 | 2 | 100 | 0,1,0,0 | 6s,4s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | weight | 0.5 | 2 | 100 | 0,1,0,0 | 6s,4s,24h0m0s,1h25m0s | perp | + + + Scenario: 001 check mark price using order price with cash amount 100 USD + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | + | party | ETH/FEB23 | sell | 2 | 15902 | 0 | TYPE_LIMIT | TIF_GTC | + | party | ETH/FEB23 | sell | 1 | 15904 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider1 | ETH/FEB22 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/FEB22 | sell | 2 | 15902 | 0 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/FEB22 | sell | 1 | 15904 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider1 | ETH/FEB22 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | + + #AC 0009-MRKP-120,0009-MRKP-121, 0009-MRKP-014,0009-MRKP-015 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB23" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB22" + + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | + | party | ETH/FEB23 | 9546 | 10500 | 11455 | 13364 | cross margin | + #margin = min(3*(15900-15900), 3*15900*(0.25))+3*0.1*15900 + 3*0.1*15900=9546 + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party | USD | ETH/FEB23 | 11449 | 36601 | + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + When the network moves ahead "1" blocks + Then the mark price should be "15451" for the market "ETH/FEB23" + Then the mark price should be "15451" for the market "ETH/FEB22" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15904 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15904 | 1 | TYPE_LIMIT | TIF_GTC | | + When the network moves ahead "2" blocks + Then the mark price should be "15451" for the market "ETH/FEB23" + Then the mark price should be "15451" for the market "ETH/FEB22" + + + + diff --git a/core/integration/features/mark-price/0009-MRKP-122.feature b/core/integration/features/mark-price/0009-MRKP-122.feature new file mode 100644 index 0000000000..1cc1118c1f --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-122.feature @@ -0,0 +1,77 @@ +Feature: Test setting of mark price + Background: + Given the average block duration is "1" + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 0.5 | 2 | 100000 | 0,1,0,0 | 6s,4s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | weight | 0.5 | 2 | 100000 | 0,1,0,0 | 6s,4s,24h0m0s,1h25m0s | perp | + + Scenario: 001 check mark price using order price with cash amount 100 USD + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 20 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 20 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 20 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-1 | + | sellSideProvider | ETH/FEB23 | sell | 20 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 20 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 20 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider1 | ETH/FEB22 | sell | 20 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-1-p | + | sellSideProvider1 | ETH/FEB22 | sell | 20 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | | + + #AC 0009-MRKP-122,0009-MRKP-123 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB22" + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + When the network moves ahead "1" blocks + Then the mark price should be "15470" for the market "ETH/FEB23" + Then the mark price should be "15470" for the market "ETH/FEB22" + + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | sellSideProvider | sell-1 | 16940 | 0 | TIF_GTC | | + | sellSideProvider1 | sell-1-p | 16940 | 0 | TIF_GTC | | + + When the network moves ahead "5" blocks + Then the mark price should be "15845" for the market "ETH/FEB23" + Then the mark price should be "15845" for the market "ETH/FEB22" + + + + + diff --git a/core/integration/features/mark-price/0009-MRKP-124.feature b/core/integration/features/mark-price/0009-MRKP-124.feature new file mode 100644 index 0000000000..d41c37b5ab --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-124.feature @@ -0,0 +1,93 @@ +Feature: Test book mark price + Background: + Given the average block duration is "1" + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 4s | + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | market type | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 0.5 | 2 | 50000 | 0,1,0,0 | 6s,4s,24h0m0s,1h25m0s | future | + | ETH/FEB22 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | default-futures | weight | 0.5 | 2 | 50000 | 0,1,0,0 | 6s,4s,24h0m0s,1h25m0s | perp | + + Scenario: 001 check mark price using order price with cash amount 50000 USD + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + | buySideProvider1 | USD | 100000000000 | + | sellSideProvider1 | USD | 100000000000 | + | party1 | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | buySideProvider | ETH/FEB23 | buy | 20 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15950 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider | ETH/FEB23 | sell | 20 | 20000 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider1 | ETH/FEB22 | buy | 20 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | + | buySideProvider1 | ETH/FEB22 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/FEB22 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider1 | ETH/FEB22 | sell | 2 | 15950 | 0 | TYPE_LIMIT | TIF_GTC | + | sellSideProvider1 | ETH/FEB22 | sell | 20 | 20000 | 0 | TYPE_LIMIT | TIF_GTC | + + #AC 0009-MRKP-124, 0009-MRKP-125 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB23" + Then the mark price should be "15900" for the market "ETH/FEB22" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB22" + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + #N=50000/(0.1+0.25)/1.2=119047.6 + #V_sell = 119047.6/15950=7 + #V_buy = 119047.6/15000=7 + #p_book_buy=(15000+14900*6)/7=14914.28571 + #p_book_sell=(15950*2+20000*5)/7=18842.85714 + #p_book=1/2*(p_book_buy+p_book_sell)=16878 + + When the network moves ahead "1" blocks + Then the mark price should be "16878" for the market "ETH/FEB23" + Then the mark price should be "16878" for the market "ETH/FEB22" + + When the network moves ahead "4" blocks + Then the mark price should be "16878" for the market "ETH/FEB23" + Then the mark price should be "16878" for the market "ETH/FEB22" + + #0009-MRKP-126, 0009-MRKP-127 + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15950 | 1 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider1 | ETH/FEB22 | buy | 1 | 15950 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the mark price should be "16878" for the market "ETH/FEB23" + Then the mark price should be "16878" for the market "ETH/FEB22" + + When the network moves ahead "2" blocks + Then the mark price should be "17094" for the market "ETH/FEB23" + Then the mark price should be "17094" for the market "ETH/FEB22" + + + + + diff --git a/core/integration/features/mark-price/0009-MRKP-130.feature b/core/integration/features/mark-price/0009-MRKP-130.feature new file mode 100644 index 0000000000..d0006ff60b --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-130.feature @@ -0,0 +1,85 @@ +Feature: Test setting of mark price from 2 oracles with one getting stale (AC 0009-MRKP-130) + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 1s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + + # this is just an example of setting up oracles + And the composite price oracles from "0xCAFECAFE1": + | name | price property | price type | price decimals | + | oracle1 | price1.USD.value | TYPE_INTEGER | 0 | + | oracle2 | price2.USD.value | TYPE_INTEGER | 0 | + + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | oracle1 | oracle2 | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 1 | 1 | 0 | 0,0,1,3,0 | 0s,0s,10s,20s,0s | oracle1 | oracle2 | + + Scenario: 001 check mark price using weight average + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider | ETH/FEB23 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider | ETH/FEB23 | sell | 2 | 16000 | 0 | TYPE_LIMIT | TIF_GTC | sell-7 | + | sellSideProvider | ETH/FEB23 | sell | 4 | 16020 | 0 | TYPE_LIMIT | TIF_GTC | sell-8 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-012 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + # example of pushing oracle prices + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price1.USD.value | 16000 | -1s | + + When the network moves ahead "1" blocks + # only the first oracle has ticked so mark price is set fully from oracle1 + Then the mark price should be "16000" for the market "ETH/FEB23" + + When the network moves ahead "2" blocks + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price2.USD.value | 15900 | -1s | + + When the network moves ahead "1" blocks + # 0.25 * 16000 + 0.75 * 15900 = 15925 + Then the mark price should be "15925" for the market "ETH/FEB23" + + # lets get the first oracle price out of scope (it has 10s tolerance) + When the network moves ahead "10" blocks + # 0 * 16000 + 1 * 15900 = 15900 + Then the mark price should be "15900" for the market "ETH/FEB23" \ No newline at end of file diff --git a/core/integration/features/mark-price/0009-MRKP-131.feature b/core/integration/features/mark-price/0009-MRKP-131.feature new file mode 100644 index 0000000000..ea0a5e1609 --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-131.feature @@ -0,0 +1,99 @@ +Feature: Test setting of mark price from 2 oracles - check mark price is updating on schedule (AC 0009-MRKP-131) + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 5s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + + # this is just an example of setting up oracles + And the composite price oracles from "0xCAFECAFE1": + | name | price property | price type | price decimals | + | oracle1 | price1.USD.value | TYPE_INTEGER | 0 | + | oracle2 | price2.USD.value | TYPE_INTEGER | 0 | + + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | oracle1 | oracle2 | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 1 | 1 | 0 | 0,0,1,3,0 | 0s,0s,10s,20s,0s | oracle1 | oracle2 | + + Scenario: 001 check mark price using weight average + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider | ETH/FEB23 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider | ETH/FEB23 | sell | 2 | 16000 | 0 | TYPE_LIMIT | TIF_GTC | sell-7 | + | sellSideProvider | ETH/FEB23 | sell | 4 | 16020 | 0 | TYPE_LIMIT | TIF_GTC | sell-8 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-012 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + # 1s into the mark price period + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price1.USD.value | 16000 | -1s | + Then the mark price should be "15900" for the market "ETH/FEB23" + + # 2s into the mark price period + When the network moves ahead "1" blocks + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price2.USD.value | 15000 | -1s | + Then the mark price should be "15900" for the market "ETH/FEB23" + + # 3s into the mark price period + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + # 4s into the mark price period + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + # 5s into the mark price period + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + # now mtm has happened + When the network moves ahead "1" blocks + Then the mark price should be "15250" for the market "ETH/FEB23" + + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price2.USD.value | 20000 | -1s | + When the network moves ahead "3" blocks + + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price1.USD.value | 10000 | -1s | + When the network moves ahead "2" blocks + # 10000*0.25+20000*0.75 = 17500 + Then the mark price should be "17500" for the market "ETH/FEB23" + + + + + + diff --git a/core/integration/features/mark-price/0009-MRKP-132.feature b/core/integration/features/mark-price/0009-MRKP-132.feature new file mode 100644 index 0000000000..c6dfc9f36a --- /dev/null +++ b/core/integration/features/mark-price/0009-MRKP-132.feature @@ -0,0 +1,82 @@ +Feature: Test setting of mark price from oracles with one getting stale (AC 0009-MRKP-132) + Background: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 1s | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.1 | 100 | -100 | 0.2 | + + # this is just an example of setting up oracles + And the composite price oracles from "0xCAFECAFE1": + | name | price property | price type | price decimals | + | oracle1 | price1.USD.value | TYPE_INTEGER | 0 | + | oracle2 | price2.USD.value | TYPE_INTEGER | 0 | + | oracle3 | price3.USD.value | TYPE_INTEGER | 0 | + + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | oracle1 | oracle2 | oracle3 | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | weight | 1 | 1 | 0 | 0,0,1,1,1,0 | 0s,0s,0s,0s,0s,0s | oracle1 | oracle2 | oracle3 | + + Scenario: 001 check mark price using weight average + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | buySideProvider | USD | 100000000000 | + | sellSideProvider | USD | 100000000000 | + | party | USD | 48050 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | + | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | + | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | + | sellSideProvider | ETH/FEB23 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | + | sellSideProvider | ETH/FEB23 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | + | sellSideProvider | ETH/FEB23 | sell | 2 | 16000 | 0 | TYPE_LIMIT | TIF_GTC | sell-7 | + | sellSideProvider | ETH/FEB23 | sell | 4 | 16020 | 0 | TYPE_LIMIT | TIF_GTC | sell-8 | + | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | + + # AC 0009-MRKP-012 + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 2 | 15920 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | buySideProvider | ETH/FEB23 | buy | 1 | 15940 | 1 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "1" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + When the network moves ahead "2" blocks + Then the mark price should be "15900" for the market "ETH/FEB23" + + # example of pushing oracle prices + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price1.USD.value | 16000 | -1s | + | price2.USD.value | 15900 | -1s | + | price3.USD.value | 15940 | -1s | + + + When the network moves ahead "1" blocks + Then the mark price should be "15946" for the market "ETH/FEB23" + + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | price1.USD.value | 16000 | -1s | + | price2.USD.value | 17000 | -1s | + + When the network moves ahead "1" blocks + Then the mark price should be "16500" for the market "ETH/FEB23" \ No newline at end of file diff --git a/core/integration/features/orders/amend-order.feature b/core/integration/features/orders/amend-order.feature index 856b5202e7..0d20c96b98 100644 --- a/core/integration/features/orders/amend-order.feature +++ b/core/integration/features/orders/amend-order.feature @@ -9,21 +9,23 @@ Feature: Amend orders | market.auction.minimumDuration | 1 | | network.markPriceUpdateMaximumFrequency | 0s | - Scenario: Amend rejected for non existing order + Scenario: Amend rejected for non existing order, amend the order to cancel 0004-AMND-058 # setup accounts Given the parties deposit on asset's general account the following amount: | party | asset | amount | | myboi | BTC | 10000 | | aux | BTC | 100000 | + | aux1 | BTC | 100000 | | aux2 | BTC | 100000 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | - | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | - | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | - | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif |reference | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | | + | aux | ETH/DEC19 | sell | 3 | 10001 | 0 | TYPE_LIMIT | TIF_GTC |aux_s | + | aux1 | ETH/DEC19 | sell | 3 | 10002 | 0 | TYPE_LIMIT | TIF_GTC |aux_s1| + | aux2 | ETH/DEC19 | buy | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | | + | aux | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | | Then the opening auction period ends for market "ETH/DEC19" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" @@ -31,6 +33,19 @@ Feature: Amend orders | party | market id | side | volume | price | resulting trades | type | tif | reference | | myboi | ETH/DEC19 | sell | 1 | 2 | 0 | TYPE_LIMIT | TIF_GTC | myboi-ref-1 | + #0004-AMND-058: Size change amends which would result in the remaining part of the order being reduced below zero should instead cancel the order + Then the parties amend the following orders: + | party | reference | price | size delta | tif | + | aux | aux_s | 10001 | -4 | TIF_GTC | + + And the orders should have the following status: + | party | reference | status | + | aux |aux_s | STATUS_CANCELLED | + + And the order book should have the following volumes for market "ETH/DEC21": + | side | price | volume | + | sell | 10001 | 0 | + # cancel the order, so we cannot edit it. And the parties cancel the following orders: | party | reference | @@ -40,7 +55,7 @@ Feature: Amend orders | party | reference | price | size delta | tif | error | | myboi | myboi-ref-1 | 2 | 3 | TIF_GTC | OrderError: Invalid Order ID | - Scenario: Reduce size success and not loosing position in order book + Scenario: Reduce size with delta success and not loosing position in order book (0004-AMND-003, 0004-AMND-057) # setup accounts Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -61,34 +76,51 @@ Feature: Amend orders And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | myboi | ETH/DEC19 | sell | 5 | 2 | 0 | TYPE_LIMIT | TIF_GTC | myboi-ref-1 | - | myboi2 | ETH/DEC19 | sell | 5 | 2 | 0 | TYPE_LIMIT | TIF_GTC | myboi-ref-2 | + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | myboi | ETH/DEC19 | sell | 10 | 2 | 0 | TYPE_LIMIT | TIF_GTC | myboi-ref-1 | + | myboi2 | ETH/DEC19 | sell | 5 | 2 | 0 | TYPE_LIMIT | TIF_GTC | myboi2-ref-1 | - # reducing size + # reducing size with delta Then the parties amend the following orders: | party | reference | price | size delta | tif | | myboi | myboi-ref-1 | 0 | -2 | TIF_GTC | + And the orders should have the following states: + | party | market id | reference | side | volume | remaining | price | status | + | myboi | ETH/DEC19 | myboi-ref-1 | sell | 8 | 8 | 2 | STATUS_ACTIVE | + # matching the order now # this should match with the size 3 order of myboi - Then the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | myboi3 | ETH/DEC19 | buy | 3 | 2 | 1 | TYPE_LIMIT | TIF_GTC | myboi-ref-3 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | myboi3 | ETH/DEC19 | buy | 3 | 2 | 1 | TYPE_LIMIT | TIF_GTC | myboi3-ref-1 | Then the following trades should be executed: | buyer | seller | price | size | | myboi3 | myboi | 2 | 3 | - Scenario: Increase size success and loosing position in order book + And the orders should have the following states: + | party | market id | reference | side | volume | remaining | price | status | + | myboi | ETH/DEC19 | myboi-ref-1 | sell | 8 | 5 | 2 | STATUS_ACTIVE | + + # reducing size with target + When the parties amend the following orders: + | party | reference | price | size | tif | + | myboi | myboi-ref-1 | 0 | 6 | TIF_GTC | + + Then the orders should have the following states: + | party | market id | reference | side | volume | remaining | price | status | + | myboi | ETH/DEC19 | myboi-ref-1 | sell | 6 | 3 | 2 | STATUS_ACTIVE | + + Scenario: Increase size success and loosing position in order book (0004-AMND-005, 0004-AMND-056) # setup accounts Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | myboi | BTC | 10000 | - | myboi2 | BTC | 10000 | - | myboi3 | BTC | 10000 | - | aux | BTC | 100000 | - | aux2 | BTC | 100000 | + | party | asset | amount | + | myboi | BTC | 10000 | + | myboi2 | BTC | 10000 | + | myboi3 | BTC | 100000000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -100,34 +132,61 @@ Feature: Amend orders Then the opening auction period ends for market "ETH/DEC19" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" - Then the parties place the following orders: + When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | | myboi | ETH/DEC19 | sell | 5 | 2 | 0 | TYPE_LIMIT | TIF_GTC | myboi-ref-1 | | myboi2 | ETH/DEC19 | sell | 5 | 2 | 0 | TYPE_LIMIT | TIF_GTC | myboi-ref-2 | - # reducing size And the parties amend the following orders: | party | reference | price | size delta | tif | | myboi | myboi-ref-1 | 0 | 3 | TIF_GTC | - # matching the order now - # this should match with the size 3 order of myboi + Then the orders should have the following states: + | party | market id | reference | side | volume | remaining | price | status | + | myboi | ETH/DEC19 | myboi-ref-1 | sell | 8 | 8 | 2 | STATUS_ACTIVE | + When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | | myboi3 | ETH/DEC19 | buy | 3 | 2 | 1 | TYPE_LIMIT | TIF_GTC | myboi-ref-3 | + Then the following trades should be executed: | buyer | seller | price | size | | myboi3 | myboi2 | 2 | 3 | - Scenario: Reduce size success and order cancelled as < to remaining + And the orders should have the following states: + | party | market id | reference | side | volume | remaining | price | status | + | myboi | ETH/DEC19 | myboi-ref-1 | sell | 8 | 8 | 2 | STATUS_ACTIVE | + | myboi2 | ETH/DEC19 | myboi-ref-2 | sell | 5 | 2 | 2 | STATUS_ACTIVE | + + When the parties amend the following orders: + | party | reference | price | size | tif | + | myboi2 | myboi-ref-2 | 0 | 10 | TIF_GTC | + + Then the orders should have the following states: + | party | market id | reference | side | volume | remaining | price | status | + | myboi | ETH/DEC19 | myboi-ref-1 | sell | 8 | 8 | 2 | STATUS_ACTIVE | + | myboi2 | ETH/DEC19 | myboi-ref-2 | sell | 10 | 7 | 2 | STATUS_ACTIVE | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | myboi3 | ETH/DEC19 | buy | 3 | 2 | 1 | TYPE_LIMIT | TIF_GTC | myboi-ref-3 | + + Then the following trades should be executed: + | buyer | seller | price | size | + | myboi3 | myboi | 2 | 3 | + And the orders should have the following states: + | party | market id | reference | side | volume | remaining | price | status | + | myboi | ETH/DEC19 | myboi-ref-1 | sell | 8 | 5 | 2 | STATUS_ACTIVE | + | myboi2 | ETH/DEC19 | myboi-ref-2 | sell | 10 | 7 | 2 | STATUS_ACTIVE | + + + Scenario: Reduce size success and order cancelled as remaining is less than or equal to 0 (0004-AMND-058) # setup accounts Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | myboi | BTC | 10000 | - | myboi2 | BTC | 10000 | - | myboi3 | BTC | 10000 | - | aux | BTC | 100000 | - | aux2 | BTC | 100000 | + | party | asset | amount | + | myboi | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -139,24 +198,27 @@ Feature: Amend orders Then the opening auction period ends for market "ETH/DEC19" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" - Then the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | myboi | ETH/DEC19 | sell | 5 | 2 | 0 | TYPE_LIMIT | TIF_GTC | myboi-ref-1 | - | myboi2 | ETH/DEC19 | sell | 5 | 2 | 0 | TYPE_LIMIT | TIF_GTC | myboi-ref-2 | - - # matching the order now - # this will reduce the remaining to 2 so it get cancelled later on When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | myboi3 | ETH/DEC19 | buy | 3 | 2 | 1 | TYPE_LIMIT | TIF_GTC | myboi-ref-3 | + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | myboi | ETH/DEC19 | sell | 5 | 2 | 0 | TYPE_LIMIT | TIF_GTC | myboi-ref-1 | - # reducing size, remaining goes from 2 to -1, this will cancel - Then the parties amend the following orders: + And the parties amend the following orders: | party | reference | price | size delta | tif | - | myboi | myboi-ref-1 | 0 | -3 | TIF_GTC | + | myboi | myboi-ref-1 | 0 | -5 | TIF_GTC | - # check the order status, it should be cancelled - And the orders should have the following status: + Then the orders should have the following status: + | party | reference | status | + | myboi | myboi-ref-1 | STATUS_CANCELLED | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | myboi | ETH/DEC19 | sell | 5 | 2 | 0 | TYPE_LIMIT | TIF_GTC | myboi-ref-1 | + + And the parties amend the following orders: + | party | reference | price | size | tif | + | myboi | myboi-ref-1 | 0 | 0 | TIF_GTC | + + Then the orders should have the following status: | party | reference | status | | myboi | myboi-ref-1 | STATUS_CANCELLED | diff --git a/core/integration/features/orders/amend-trade-panic.feature b/core/integration/features/orders/amend-trade-panic.feature new file mode 100644 index 0000000000..330ed8ea7c --- /dev/null +++ b/core/integration/features/orders/amend-trade-panic.feature @@ -0,0 +1,117 @@ +Feature: Amending orders with isolated margins should never panic + Background: + Given the average block duration is "1" + And the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 6 | + | market.auction.minimumDuration | 1 | + And the price monitoring named "my-price-monitoring-1": + | horizon | probability | auction extension | + | 5 | 0.99 | 6 | + + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1e-9 | + And the simple risk model named "simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.1 | 0.2 | 100 | -100 | 0.2 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | sla params | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring-1 | default-eth-for-future | 0.25 | 0 | 2 | default-futures | + + @AmendEdge + Scenario: Edge-case 1: Amending an order will cause it to trade in full, but leaves the party with insufficient margin to maintain its position. The old order should be restored, without any trades beign made + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | trader1 | USD | 100000000000 | + | trader2 | USD | 100000000000 | + | trader3 | USD | 100000000000 | + | trader4 | USD | 100000000000 | + | trader5 | USD | 100000000000 | + | lprov1 | USD | 100000000000 | + + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lprov1 | ETH/FEB23 | 1000 | 0.1 | submission | + + And the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader1 | ETH/FEB23 | buy | 1000 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader1 | ETH/FEB23 | buy | 300 | 15600 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | buy | 100 | 15700 | 0 | TYPE_LIMIT | TIF_GTC | lp-buy-1 | + | trader3 | ETH/FEB23 | buy | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | | + | lprov1 | ETH/FEB23 | sell | 300 | 15800 | 0 | TYPE_LIMIT | TIF_GTC | lp-sell-1 | + | trader2 | ETH/FEB23 | sell | 600 | 15802 | 0 | TYPE_LIMIT | TIF_GTC | t2-sell-1 | + | trader2 | ETH/FEB23 | sell | 300 | 200000 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader2 | ETH/FEB23 | sell | 1000 | 200100 | 0 | TYPE_LIMIT | TIF_GTC | | + + When the network moves ahead "2" blocks + Then the market data for the market "ETH/FEB23" should be: + | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 15800 | TRADING_MODE_CONTINUOUS | 5 | 15701 | 15899 | 0 | 1000 | 300 | + + When the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | reference | + | lprov1 | ETH/FEB23 | buy | 100 | BID | 10 | buy_peg_1 | + | lprov1 | ETH/FEB23 | buy | 200 | BID | 20 | buy_peg_2 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | lprov1 | ETH/FEB23 | 9486 | 10434 | 11383 | 13280 | cross margin | 0 | 0 | + | trader1 | ETH/FEB23 | 20540 | 22594 | 24648 | 28756 | cross margin | 0 | 0 | + | trader3 | ETH/FEB23 | 5241 | 5765 | 6289 | 7337 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lprov1 | USD | ETH/FEB23 | 11383 | 99999987617 | 1000 | + | trader1 | USD | ETH/FEB23 | 23496 | 99999976504 | | + | trader3 | USD | ETH/FEB23 | 6289 | 99999993711 | | + + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader3 | ETH/FEB23 | buy | 100 | 15500 | 0 | TYPE_LIMIT | TIF_GTC | t3-to-amend | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 6650 | 7315 | 7980 | 9310 | cross margin | 0 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | trader3 | USD | ETH/FEB23 | 7980 | 99999992020 | + + When the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | trader3 | ETH/FEB23 | isolated margin | 0.3 | | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 5070 | 0 | 6084 | 0 | isolated margin | 0.3 | 4650 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | trader3 | USD | ETH/FEB23 | 14220 | 99999981130 | + + When the parties withdraw the following assets: + | party | asset | amount | error | + | trader3 | USD | 99999981130 | | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 5070 | 0 | 6084 | 0 | isolated margin | 0.3 | 4650 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | trader3 | USD | ETH/FEB23 | 14220 | 0 | 4650 | + + When the parties amend the following orders: + | party | reference | price | size delta | tif | error | + | trader3 | t3-to-amend | 15805 | 400 | TIF_GTC | margin check failed | + Then the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | margin mode | margin factor | order | + | trader3 | ETH/FEB23 | 5070 | 0 | 6084 | 0 | isolated margin | 0.3 | 0 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | trader3 | USD | ETH/FEB23 | 14220 | 4650 | + + And debug detailed orderbook volumes for market "ETH/FEB23" + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader5 | ETH/FEB23 | buy | 90 | 15802 | 1 | TYPE_LIMIT | TIF_GTC | | + Then the following trades should be executed: + | buyer | seller | price | size | + | trader5 | trader2 | 15802 | 90 | + And debug detailed orderbook volumes for market "ETH/FEB23" diff --git a/core/integration/features/orders/iceberg-orders.feature b/core/integration/features/orders/iceberg-orders.feature index b136d792b3..3ed8edfeab 100644 --- a/core/integration/features/orders/iceberg-orders.feature +++ b/core/integration/features/orders/iceberg-orders.feature @@ -26,9 +26,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -41,7 +41,7 @@ Feature: Iceberg orders When the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | only | - | party1 | ETH/DEC19 | buy | 100 | 10 | 0 | TYPE_LIMIT | TIF_GTC | 10 | 5 | post | + | party1 | ETH/DEC19 | buy | 100 | 10 | 0 | TYPE_LIMIT | TIF_GTC | 10 | 5 | post | Then the iceberg orders should have the following states: | party | market id | side | visible volume | price | status | reserved volume | @@ -49,7 +49,7 @@ Feature: Iceberg orders When the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | expires in | peak size | minimum visible size | only | - | party2 | ETH/DEC19 | buy | 100 | 10 | 0 | TYPE_LIMIT | TIF_GTT | 3600 | 8 | 4 | post | + | party2 | ETH/DEC19 | buy | 100 | 10 | 0 | TYPE_LIMIT | TIF_GTT | 3600 | 8 | 4 | post | Then the iceberg orders should have the following states: | party | market id | side | visible volume | price | status | reserved volume | @@ -72,9 +72,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -91,10 +91,10 @@ Feature: Iceberg orders | party2 | ETH/DEC19 | sell | 1 | 20 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | When the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | reference | - | party1 | ETH/DEC19 | buy | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 3 | 1 | ordinary-iceberg | + | party1 | ETH/DEC19 | buy | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 3 | 1 | ordinary-iceberg | And the parties place the following pegged iceberg orders: | party | market id | side | volume | resulting trades | type | tif | peak size | minimum visible size | pegged reference | offset | reference | - | party1 | ETH/DEC19 | buy | 10 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | BID | 1 | pegged-iceberg | + | party1 | ETH/DEC19 | buy | 10 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | BID | 1 | pegged-iceberg | Then the order book should have the following volumes for market "ETH/DEC19": | side | price | volume | | buy | 5 | 3 | @@ -128,9 +128,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -143,7 +143,7 @@ Feature: Iceberg orders When the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | only | reference | - | party1 | ETH/DEC19 | buy | 100 | 10 | 0 | TYPE_LIMIT | TIF_GTC | 10 | 5 | post | iceberg-order-1 | + | party1 | ETH/DEC19 | buy | 100 | 10 | 0 | TYPE_LIMIT | TIF_GTC | 10 | 5 | post | iceberg-order-1 | Then the iceberg orders should have the following states: | party | market id | side | visible volume | price | status | reserved volume | @@ -199,9 +199,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -214,7 +214,7 @@ Feature: Iceberg orders When the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | - | party1 | ETH/DEC19 | buy | 100 | 10 | 0 | TYPE_LIMIT | TIF_GTC | 10 | 5 | + | party1 | ETH/DEC19 | buy | 100 | 10 | 0 | TYPE_LIMIT | TIF_GTC | 10 | 5 | Then the iceberg orders should have the following states: | party | market id | side | visible volume | price | status | reserved volume | @@ -244,13 +244,13 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place an iceberg order that will trade when coming out of auction When the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | - | party1 | ETH/DEC19 | buy | 100 | 2 | 0 | TYPE_LIMIT | TIF_GTC | 10 | 10 | + | party1 | ETH/DEC19 | buy | 100 | 2 | 0 | TYPE_LIMIT | TIF_GTC | 10 | 10 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -267,7 +267,7 @@ Feature: Iceberg orders | party1 | ETH/DEC19 | buy | 10 | 2 | STATUS_ACTIVE | 89 | -@iceberg + @iceberg Scenario: Iceberg order trading during auction uncrossing (0014-ORDT-013) # setup accounts Given the parties deposit on asset's general account the following amount: @@ -283,9 +283,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction And the parties place the following orders: @@ -295,13 +295,13 @@ Feature: Iceberg orders Given the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | peak size | minimum visible size | - | party1 | ETH/DEC19 | buy | 10 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 2 | 1 | + | party1 | ETH/DEC19 | buy | 10 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 2 | 1 | And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | + | party | market id | side | volume | price | resulting trades | type | tif | | party2 | ETH/DEC19 | buy | 8 | 2 | 0 | TYPE_LIMIT | TIF_GTC | When the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | peak size | minimum visible size | - | party3 | ETH/DEC19 | sell | 10 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 2 | 1 | + | party3 | ETH/DEC19 | sell | 10 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 2 | 1 | And the opening auction period ends for market "ETH/DEC19" Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" # Check only the display volume of party1 is filled and is refreshed at the back of the que @@ -332,9 +332,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -347,8 +347,8 @@ Feature: Iceberg orders And the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | peak size | minimum visible size | - | party1 | ETH/DEC19 | sell | 50 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 2 | 1 | - | party2 | ETH/DEC19 | sell | 5 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-2 | 2 | 1 | + | party1 | ETH/DEC19 | sell | 50 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 2 | 1 | + | party2 | ETH/DEC19 | sell | 5 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-2 | 2 | 1 | And the parties should have the following account balances: | party | asset | market id | margin | general | @@ -395,9 +395,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -410,8 +410,8 @@ Feature: Iceberg orders And the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | peak size | minimum visible size | - | party1 | ETH/DEC19 | sell | 100 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 2 | 1 | - | party2 | ETH/DEC19 | sell | 100 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-2 | 2 | 1 | + | party1 | ETH/DEC19 | sell | 100 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 2 | 1 | + | party2 | ETH/DEC19 | sell | 100 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-2 | 2 | 1 | And the parties should have the following account balances: | party | asset | market id | margin | general | @@ -457,9 +457,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -472,8 +472,8 @@ Feature: Iceberg orders And the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | peak size | minimum visible size | - | party1 | ETH/DEC19 | sell | 16 | 5 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 5 | 1 | - | party2 | ETH/DEC19 | buy | 10 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-2 | 2 | 1 | + | party1 | ETH/DEC19 | sell | 16 | 5 | 0 | TYPE_LIMIT | TIF_GTC | this-order-1 | 5 | 1 | + | party2 | ETH/DEC19 | buy | 10 | 2 | 0 | TYPE_LIMIT | TIF_GTC | this-order-2 | 2 | 1 | # amend the buy order so that it will cross with the other iceberg Then the parties amend the following orders: @@ -503,9 +503,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -518,7 +518,7 @@ Feature: Iceberg orders Given the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | reference | - | party1 | ETH/DEC19 | buy | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + | party1 | ETH/DEC19 | buy | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | And the parties should have the following account balances: | party | asset | market id | margin | general | | party1 | BTC | ETH/DEC19 | 26 | 9974 | @@ -558,9 +558,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -576,7 +576,7 @@ Feature: Iceberg orders | party2 | ETH/DEC19 | sell | 15 | 5 | 0 | TYPE_LIMIT | TIF_GTC | When the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | - | party1 | ETH/DEC19 | buy | 10 | 5 | 1 | TYPE_LIMIT | TIF_GTC | 2 | 1 | + | party1 | ETH/DEC19 | buy | 10 | 5 | 1 | TYPE_LIMIT | TIF_GTC | 2 | 1 | Then the following trades should be executed: | buyer | seller | price | size | | party1 | party2 | 5 | 10 | @@ -601,9 +601,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -619,7 +619,7 @@ Feature: Iceberg orders | party2 | ETH/DEC19 | sell | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | When the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | - | party1 | ETH/DEC19 | buy | 15 | 5 | 1 | TYPE_LIMIT | TIF_GTC | 2 | 1 | + | party1 | ETH/DEC19 | buy | 15 | 5 | 1 | TYPE_LIMIT | TIF_GTC | 2 | 1 | Then the following trades should be executed: | buyer | seller | price | size | | party1 | party2 | 5 | 10 | @@ -644,9 +644,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -659,7 +659,7 @@ Feature: Iceberg orders Given the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | - | party1 | ETH/DEC19 | buy | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | + | party1 | ETH/DEC19 | buy | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | party2 | ETH/DEC19 | sell | 15 | 5 | 1 | TYPE_LIMIT | TIF_GTC | @@ -689,9 +689,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -704,7 +704,7 @@ Feature: Iceberg orders Given the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | - | party1 | ETH/DEC19 | buy | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | + | party1 | ETH/DEC19 | buy | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | party2 | ETH/DEC19 | buy | 7 | 5 | 0 | TYPE_LIMIT | TIF_GTC | @@ -740,9 +740,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -760,7 +760,7 @@ Feature: Iceberg orders | party4 | ETH/DEC19 | sell | 50 | 5 | 0 | TYPE_LIMIT | TIF_GTC | When the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | - | party1 | ETH/DEC19 | buy | 100 | 5 | 3 | TYPE_LIMIT | TIF_GTC | 2 | 1 | + | party1 | ETH/DEC19 | buy | 100 | 5 | 3 | TYPE_LIMIT | TIF_GTC | 2 | 1 | Then the following trades should be executed: | buyer | seller | price | size | | party1 | party2 | 5 | 30 | @@ -789,9 +789,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -808,7 +808,7 @@ Feature: Iceberg orders | party3 | ETH/DEC19 | sell | 40 | 5 | 0 | TYPE_LIMIT | TIF_GTC | When the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | - | party1 | ETH/DEC19 | buy | 100 | 5 | 2 | TYPE_LIMIT | TIF_GTC | 2 | 1 | + | party1 | ETH/DEC19 | buy | 100 | 5 | 2 | TYPE_LIMIT | TIF_GTC | 2 | 1 | Then the following trades should be executed: | buyer | seller | price | size | | party1 | party2 | 5 | 30 | @@ -836,9 +836,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -851,7 +851,7 @@ Feature: Iceberg orders Given the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | - | party1 | ETH/DEC19 | sell | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | + | party1 | ETH/DEC19 | sell | 10 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | | party2 | ETH/DEC19 | buy | 7 | 4 | 0 | TYPE_LIMIT | TIF_GTC | order-to-amend | @@ -886,9 +886,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -905,7 +905,7 @@ Feature: Iceberg orders | party3 | ETH/DEC19 | sell | 5 | 5 | 0 | TYPE_LIMIT | TIF_GTC | And the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | reference | - | party1 | ETH/DEC19 | sell | 5 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + | party1 | ETH/DEC19 | sell | 5 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | | party1 | ETH/DEC19 | buy | 20 | 5 | 2 | TYPE_LIMIT | TIF_GTC | normal | @@ -914,8 +914,8 @@ Feature: Iceberg orders | party1 | party2 | 5 | 5 | | party1 | party3 | 5 | 5 | And the orders should have the following states: - | party | market id | reference | side | volume | price | status | - | party1 | ETH/DEC19 | normal | buy | 20 | 5 | STATUS_PARTIALLY_FILLED | + | party | market id | reference | side | volume | remaining | price | status | + | party1 | ETH/DEC19 | normal | buy | 20 | 10 | 5 | STATUS_PARTIALLY_FILLED | And the iceberg orders should have the following states: | party | market id | reference | side | visible volume | price | status | reserved volume | | party1 | ETH/DEC19 | iceberg | sell | 2 | 5 | STATUS_ACTIVE | 3 | @@ -938,9 +938,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -953,9 +953,9 @@ Feature: Iceberg orders Given the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | reference | - | party1 | ETH/DEC19 | sell | 200 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | - | party2 | ETH/DEC19 | sell | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | - | party3 | ETH/DEC19 | sell | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + | party1 | ETH/DEC19 | sell | 200 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + | party2 | ETH/DEC19 | sell | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + | party3 | ETH/DEC19 | sell | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | party4 | ETH/DEC19 | buy | 300 | 5 | 3 | TYPE_LIMIT | TIF_GTC | @@ -989,9 +989,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -1004,9 +1004,9 @@ Feature: Iceberg orders Given the parties place the following iceberg orders: | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | reference | - | party1 | ETH/DEC19 | sell | 200 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | - | party2 | ETH/DEC19 | sell | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | - | party3 | ETH/DEC19 | sell | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + | party1 | ETH/DEC19 | sell | 200 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + | party2 | ETH/DEC19 | sell | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | + | party3 | ETH/DEC19 | sell | 100 | 5 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | iceberg | When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | party4 | ETH/DEC19 | buy | 600 | 5 | 3 | TYPE_LIMIT | TIF_GTC | @@ -1034,9 +1034,9 @@ Feature: Iceberg orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -1055,7 +1055,7 @@ Feature: Iceberg orders | party2 | ETH/DEC19 | sell | 10 | 25 | 0 | TYPE_LIMIT | TIF_GTC | And the parties place the following pegged iceberg orders: | party | market id | side | volume | resulting trades | type | tif | peak size | minimum visible size | pegged reference | offset | - | party1 | ETH/DEC19 | buy | 10 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | BID | 1 | + | party1 | ETH/DEC19 | buy | 10 | 0 | TYPE_LIMIT | TIF_GTC | 2 | 1 | BID | 1 | And the parties place the following pegged orders: | party | market id | side | volume | pegged reference | offset | | party1 | ETH/DEC19 | buy | 1 | BID | 2 | diff --git a/core/integration/features/orders/market-depth-1.feature b/core/integration/features/orders/market-depth-1.feature index 355e028e9b..5923e9c5c6 100644 --- a/core/integration/features/orders/market-depth-1.feature +++ b/core/integration/features/orders/market-depth-1.feature @@ -40,9 +40,9 @@ Feature: Test market depth events for pegged orders | aux | ETH/DEC19 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-1 | | aux2 | ETH/DEC19 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-1 | Then the orders should have the following states: - | party | market id | side | volume | price | status | - | sellSideProvider | ETH/DEC19 | sell | 1000 | 120 | STATUS_ACTIVE | - | buySideProvider | ETH/DEC19 | buy | 1000 | 80 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | sellSideProvider | ETH/DEC19 | sell | 1000 | 1000 | 120 | STATUS_ACTIVE | + | buySideProvider | ETH/DEC19 | buy | 1000 | 1000 | 80 | STATUS_ACTIVE | # Checked out, remove the order events we've checked, now let's have a look at the pegged order events Then the opening auction period ends for market "ETH/DEC19" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" diff --git a/core/integration/features/orders/market-depth-2.feature b/core/integration/features/orders/market-depth-2.feature index 53968d3378..9dd27a76d8 100644 --- a/core/integration/features/orders/market-depth-2.feature +++ b/core/integration/features/orders/market-depth-2.feature @@ -41,9 +41,9 @@ Feature: Test market depth events for pegged orders | aux | ETH/DEC19 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-1 | | aux2 | ETH/DEC19 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-1 | Then the orders should have the following states: - | party | market id | side | volume | price | status | - | sellSideProvider | ETH/DEC19 | sell | 1000 | 120 | STATUS_ACTIVE | - | buySideProvider | ETH/DEC19 | buy | 1000 | 80 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | sellSideProvider | ETH/DEC19 | sell | 1000 | 1000 | 120 | STATUS_ACTIVE | + | buySideProvider | ETH/DEC19 | buy | 1000 | 1000 | 80 | STATUS_ACTIVE | # Checked out, remove the order events we've checked, now let's have a look at the pegged order events Then the opening auction period ends for market "ETH/DEC19" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" diff --git a/core/integration/features/orders/market-depth-3.feature b/core/integration/features/orders/market-depth-3.feature index 525db5b880..dca4641130 100644 --- a/core/integration/features/orders/market-depth-3.feature +++ b/core/integration/features/orders/market-depth-3.feature @@ -43,9 +43,9 @@ Feature: Test market depth events for pegged orders (with BID and ASK price) | aux | ETH/DEC19 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-1 | | aux2 | ETH/DEC19 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-1 | Then the orders should have the following states: - | party | market id | side | volume | price | status | - | sellSideProvider | ETH/DEC19 | sell | 1000 | 120 | STATUS_ACTIVE | - | buySideProvider | ETH/DEC19 | buy | 1000 | 80 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | sellSideProvider | ETH/DEC19 | sell | 1000 | 1000 | 120 | STATUS_ACTIVE | + | buySideProvider | ETH/DEC19 | buy | 1000 | 1000 | 80 | STATUS_ACTIVE | Then the opening auction period ends for market "ETH/DEC19" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" # Now check what happened to our pegged orders diff --git a/core/integration/features/orders/market-depth-4.feature b/core/integration/features/orders/market-depth-4.feature index 9554aadf49..c8207aeaa3 100644 --- a/core/integration/features/orders/market-depth-4.feature +++ b/core/integration/features/orders/market-depth-4.feature @@ -44,9 +44,9 @@ Feature: Test market depth events for pegged orders (cancelling pegged orders) | aux | ETH/DEC19 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-1 | | aux2 | ETH/DEC19 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-1 | Then the orders should have the following states: - | party | market id | side | volume | price | status | - | sellSideProvider | ETH/DEC19 | sell | 1000 | 120 | STATUS_ACTIVE | - | buySideProvider | ETH/DEC19 | buy | 1000 | 80 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | sellSideProvider | ETH/DEC19 | sell | 1000 | 1000 | 120 | STATUS_ACTIVE | + | buySideProvider | ETH/DEC19 | buy | 1000 | 1000 | 80 | STATUS_ACTIVE | Then the opening auction period ends for market "ETH/DEC19" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" # Now check what happened to our pegged orders diff --git a/core/integration/features/orders/offsets_with_decimals.feature b/core/integration/features/orders/offsets_with_decimals.feature index d6bccfc35a..52d3fe49ef 100644 --- a/core/integration/features/orders/offsets_with_decimals.feature +++ b/core/integration/features/orders/offsets_with_decimals.feature @@ -1,95 +1,95 @@ Feature: Test how offsets are applied with decimals - Scenario: + Scenario: - Given the following network parameters are set: - | name | value | - | market.value.windowLength | 1h | - | network.markPriceUpdateMaximumFrequency | 0s | - | limits.markets.maxPeggedOrders | 8 | - And the liquidity monitoring parameters: - | name | triggering ratio | time window | scaling factor | - | lqm-params | 0.00 | 24h | 1 | - And the following assets are registered: - | id | decimal places | - | ETH | 5 | - | USD | 2 | - And the average block duration is "2" + Given the following network parameters are set: + | name | value | + | market.value.windowLength | 1h | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 8 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.00 | 24h | 1 | + And the following assets are registered: + | id | decimal places | + | ETH | 5 | + | USD | 2 | + And the average block duration is "2" - And the log normal risk model named "log-normal-risk-model-1": - | risk aversion | tau | mu | r | sigma | - | 0.000001 | 0.1 | 0 | 0 | 1.0 | - And the fees configuration named "fees-config-1": - | maker fee | infrastructure fee | - | 0.0004 | 0.001 | - And the price monitoring named "price-monitoring-1": - | horizon | probability | auction extension | - | 100000 | 0.99 | 3 | + And the log normal risk model named "log-normal-risk-model-1": + | risk aversion | tau | mu | r | sigma | + | 0.000001 | 0.1 | 0 | 0 | 1.0 | + And the fees configuration named "fees-config-1": + | maker fee | infrastructure fee | + | 0.0004 | 0.001 | + And the price monitoring named "price-monitoring-1": + | horizon | probability | auction extension | + | 100000 | 0.99 | 3 | - And the liquidity sla params named "SLA": - | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | - | 1.0 | 0.5 | 1 | 1.0 | - And the following network parameters are set: - | name | value | - | market.liquidity.providersFeeCalculationTimeStep | 660s | + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 1.0 | 0.5 | 1 | 1.0 | + And the following network parameters are set: + | name | value | + | market.liquidity.providersFeeCalculationTimeStep | 660s | - And the markets: - | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | decimal places | position decimal places | linear slippage factor | quadratic slippage factor | sla params | - | USD/DEC19 | USD | ETH | lqm-params | log-normal-risk-model-1 | default-margin-calculator | 1 | default-none | price-monitoring-1 | default-usd-for-future | 3 | 3 | 1e6 | 1e6 | SLA | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | decimal places | position decimal places | linear slippage factor | quadratic slippage factor | sla params | + | USD/DEC19 | USD | ETH | lqm-params | log-normal-risk-model-1 | default-margin-calculator | 1 | default-none | price-monitoring-1 | default-usd-for-future | 3 | 3 | 1e6 | 1e6 | SLA | - Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | lp1 | ETH | 100000000000000 | - | party1 | ETH | 10000000000000 | - | party2 | ETH | 10000000000000 | - | party3 | ETH | 10000000000000 | + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | ETH | 100000000000000 | + | party1 | ETH | 10000000000000 | + | party2 | ETH | 10000000000000 | + | party3 | ETH | 10000000000000 | - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | lp1 | USD/DEC19 | 10000000000 | 0.001 | submission | - | lp1 | lp1 | USD/DEC19 | 10000000000 | 0.001 | submission | - | lp1 | lp1 | USD/DEC19 | 10000000000 | 0.001 | submission | - | lp1 | lp1 | USD/DEC19 | 10000000000 | 0.001 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lp1 | USD/DEC19 | 2 | 1 | buy | BID | 66667 | 0 | - | lp1 | USD/DEC19 | 2 | 1 | buy | MID | 33334 | 1 | - | lp1 | USD/DEC19 | 2 | 1 | sell | MID | 33334 | 1 | - | lp1 | USD/DEC19 | 2 | 1 | sell | ASK | 66667 | 0 | - - Then the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | USD/DEC19 | buy | 10000 | 999999 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | USD/DEC19 | buy | 10000 | 1000000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | USD/DEC19 | sell | 10000 | 1000000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | USD/DEC19 | sell | 10000 | 1000001 | 0 | TYPE_LIMIT | TIF_GTC | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | USD/DEC19 | 10000000000 | 0.001 | submission | + | lp1 | lp1 | USD/DEC19 | 10000000000 | 0.001 | submission | + | lp1 | lp1 | USD/DEC19 | 10000000000 | 0.001 | submission | + | lp1 | lp1 | USD/DEC19 | 10000000000 | 0.001 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lp1 | USD/DEC19 | 2 | 1 | buy | BID | 66667 | 0 | + | lp1 | USD/DEC19 | 2 | 1 | buy | MID | 33334 | 1 | + | lp1 | USD/DEC19 | 2 | 1 | sell | MID | 33334 | 1 | + | lp1 | USD/DEC19 | 2 | 1 | sell | ASK | 66667 | 0 | - Then the opening auction period ends for market "USD/DEC19" - And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "USD/DEC19" - And the market data for the market "USD/DEC19" should be: - | mark price | trading mode | best static bid price | static mid price | best static offer price | - | 1000000 | TRADING_MODE_CONTINUOUS | 999999 | 1000000 | 1000001 | - Then the orders should have the following states: - | party | market id | side | volume | price | status | - | lp1 | USD/DEC19 | buy | 66667 | 999999 | STATUS_ACTIVE | - | lp1 | USD/DEC19 | buy | 33334 | 999999 | STATUS_ACTIVE | - | lp1 | USD/DEC19 | sell | 33334 | 1000001 | STATUS_ACTIVE | - | lp1 | USD/DEC19 | sell | 66667 | 1000001 | STATUS_ACTIVE | + Then the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | USD/DEC19 | buy | 10000 | 999999 | 0 | TYPE_LIMIT | TIF_GTC | + | party1 | USD/DEC19 | buy | 10000 | 1000000 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | USD/DEC19 | sell | 10000 | 1000000 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | USD/DEC19 | sell | 10000 | 1000001 | 0 | TYPE_LIMIT | TIF_GTC | - Then the parties place the following pegged orders: - | party | market id | side | volume | pegged reference | offset | - | party3 | USD/DEC19 | buy | 5 | BID | 0 | - | party3 | USD/DEC19 | buy | 4 | MID | 1 | - | party3 | USD/DEC19 | sell | 3 | ASK | 0 | - | party3 | USD/DEC19 | sell | 2 | MID | 1 | + Then the opening auction period ends for market "USD/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "USD/DEC19" + And the market data for the market "USD/DEC19" should be: + | mark price | trading mode | best static bid price | static mid price | best static offer price | + | 1000000 | TRADING_MODE_CONTINUOUS | 999999 | 1000000 | 1000001 | + Then the orders should have the following states: + | party | market id | side | volume | remaining | price | status | + | lp1 | USD/DEC19 | buy | 66667 | 2 | 999999 | STATUS_ACTIVE | + | lp1 | USD/DEC19 | buy | 33334 | 2 | 999999 | STATUS_ACTIVE | + | lp1 | USD/DEC19 | sell | 33334 | 2 | 1000001 | STATUS_ACTIVE | + | lp1 | USD/DEC19 | sell | 66667 | 2 | 1000001 | STATUS_ACTIVE | - Then the orders should have the following states: - | party | market id | side | volume | price | status | - | lp1 | USD/DEC19 | buy | 66667 | 999999 | STATUS_ACTIVE | - | lp1 | USD/DEC19 | buy | 33334 | 999999 | STATUS_ACTIVE | - | lp1 | USD/DEC19 | sell | 33334 | 1000001 | STATUS_ACTIVE | - | lp1 | USD/DEC19 | sell | 66667 | 1000001 | STATUS_ACTIVE | - | party3 | USD/DEC19 | buy | 5 | 999999 | STATUS_ACTIVE | - | party3 | USD/DEC19 | buy | 4 | 999999 | STATUS_ACTIVE | - | party3 | USD/DEC19 | sell | 3 | 1000001 | STATUS_ACTIVE | - | party3 | USD/DEC19 | sell | 2 | 1000001 | STATUS_ACTIVE | \ No newline at end of file + Then the parties place the following pegged orders: + | party | market id | side | volume | pegged reference | offset | + | party3 | USD/DEC19 | buy | 5 | BID | 0 | + | party3 | USD/DEC19 | buy | 4 | MID | 1 | + | party3 | USD/DEC19 | sell | 3 | ASK | 0 | + | party3 | USD/DEC19 | sell | 2 | MID | 1 | + + Then the orders should have the following states: + | party | market id | side | volume | remaining | price | status | + | lp1 | USD/DEC19 | buy | 66667 | 2 | 999999 | STATUS_ACTIVE | + | lp1 | USD/DEC19 | buy | 33334 | 2 | 999999 | STATUS_ACTIVE | + | lp1 | USD/DEC19 | sell | 33334 | 2 | 1000001 | STATUS_ACTIVE | + | lp1 | USD/DEC19 | sell | 66667 | 2 | 1000001 | STATUS_ACTIVE | + | party3 | USD/DEC19 | buy | 5 | 5 | 999999 | STATUS_ACTIVE | + | party3 | USD/DEC19 | buy | 4 | 4 | 999999 | STATUS_ACTIVE | + | party3 | USD/DEC19 | sell | 3 | 3 | 1000001 | STATUS_ACTIVE | + | party3 | USD/DEC19 | sell | 2 | 2 | 1000001 | STATUS_ACTIVE | diff --git a/core/integration/features/orders/stop-orders-all-market-types.feature b/core/integration/features/orders/stop-orders-all-market-types.feature index 8153ca1caa..a0f69d4a21 100644 --- a/core/integration/features/orders/stop-orders-all-market-types.feature +++ b/core/integration/features/orders/stop-orders-all-market-types.feature @@ -435,7 +435,7 @@ Feature: stop orders in all market types - Scenario:3 Make sure we can send buy side stop orders with all possible TIFs and order types (MARKET/LIMIT) while in auction + Scenario:3 Make sure we cannot send buy side stop orders with all possible TIFs and order types (MARKET/LIMIT) while in auction # setup accounts Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -473,16 +473,16 @@ Feature: stop orders in all market types When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | expires in | only | fb price trigger | ra price trigger | reference | error | - | party1 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GTT | 50 | reduce | 899 | 1101 | stop1-1 | | - | party2 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GTC | | reduce | 899 | 1101 | stop2-1 | | - | party3 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | | reduce | 899 | 1101 | stop3-1 | | - | party4 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_FOK | | reduce | 899 | 1101 | stop4-1 | | - | party5 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GFA | | reduce | 899 | 1101 | stop5-1 | | - | party6 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTT | 50 | reduce | 899 | 1101 | stop6-1 | | - | party7 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | | reduce | 899 | 1101 | stop7-1 | | - | party8 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_IOC | | reduce | 899 | 1101 | stop8-1 | | - | party9 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_FOK | | reduce | 899 | 1101 | stop8-1 | | - | party10 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | | reduce | 899 | 1101 | stop10-1 | | + | party1 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GTT | 50 | reduce | 899 | 1101 | stop1-1 | stop orders are not accepted during the opening auction | + | party2 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GTC | | reduce | 899 | 1101 | stop2-1 | stop orders are not accepted during the opening auction | + | party3 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | | reduce | 899 | 1101 | stop3-1 | stop orders are not accepted during the opening auction | + | party4 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_FOK | | reduce | 899 | 1101 | stop4-1 | stop orders are not accepted during the opening auction | + | party5 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GFA | | reduce | 899 | 1101 | stop5-1 | stop orders are not accepted during the opening auction | + | party6 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTT | 50 | reduce | 899 | 1101 | stop6-1 | stop orders are not accepted during the opening auction | + | party7 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | | reduce | 899 | 1101 | stop7-1 | stop orders are not accepted during the opening auction | + | party8 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_IOC | | reduce | 899 | 1101 | stop8-1 | stop orders are not accepted during the opening auction | + | party9 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_FOK | | reduce | 899 | 1101 | stop8-1 | stop orders are not accepted during the opening auction | + | party10 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | | reduce | 899 | 1101 | stop10-1 | stop orders are not accepted during the opening auction | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction @@ -501,7 +501,7 @@ Feature: stop orders in all market types - Scenario:3b Make sure we can send buy side stop orders with all possible TIFs and order types (MARKET/LIMIT) while in auction + Scenario:3b Make sure we cannot send buy side stop orders with all possible TIFs and order types (MARKET/LIMIT) while in auction # setup accounts Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -539,16 +539,16 @@ Feature: stop orders in all market types When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | expires in | only | fb price trigger | ra price trigger | reference | error | - | party1 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GTT | 50 | reduce | 899 | 1101 | stop1-1 | | - | party2 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GTC | | reduce | 899 | 1101 | stop2-1 | | - | party3 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | | reduce | 899 | 1101 | stop3-1 | | - | party4 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_FOK | | reduce | 899 | 1101 | stop4-1 | | - | party5 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GFA | | reduce | 899 | 1101 | stop5-1 | | - | party6 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTT | 50 | reduce | 899 | 1101 | stop6-1 | | - | party7 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | | reduce | 899 | 1101 | stop7-1 | | - | party8 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_IOC | | reduce | 899 | 1101 | stop8-1 | | - | party9 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_FOK | | reduce | 899 | 1101 | stop8-1 | | - | party10 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | | reduce | 899 | 1101 | stop10-1 | | + | party1 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GTT | 50 | reduce | 899 | 1101 | stop1-1 | stop orders are not accepted during the opening auction | + | party2 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GTC | | reduce | 899 | 1101 | stop2-1 | stop orders are not accepted during the opening auction | + | party3 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | | reduce | 899 | 1101 | stop3-1 | stop orders are not accepted during the opening auction | + | party4 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_FOK | | reduce | 899 | 1101 | stop4-1 | stop orders are not accepted during the opening auction | + | party5 | ETH/DEC23 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GFA | | reduce | 899 | 1101 | stop5-1 | stop orders are not accepted during the opening auction | + | party6 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTT | 50 | reduce | 899 | 1101 | stop6-1 | stop orders are not accepted during the opening auction | + | party7 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | | reduce | 899 | 1101 | stop7-1 | stop orders are not accepted during the opening auction | + | party8 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_IOC | | reduce | 899 | 1101 | stop8-1 | stop orders are not accepted during the opening auction | + | party9 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_FOK | | reduce | 899 | 1101 | stop8-1 | stop orders are not accepted during the opening auction | + | party10 | ETH/DEC23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | | reduce | 899 | 1101 | stop10-1 | stop orders are not accepted during the opening auction | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction @@ -564,7 +564,7 @@ Feature: stop orders in all market types - Scenario:4 Make sure we can send sell side stop orders with all possible TIFs and order types (MARKET/LIMIT) while in auction + Scenario:4 Make sure we cannot send sell side stop orders with all possible TIFs and order types (MARKET/LIMIT) while in auction # setup accounts Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -602,16 +602,16 @@ Feature: stop orders in all market types When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | expires in | only | fb price trigger | ra price trigger | reference | error | - | party1 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_GTT | 50 | reduce | 899 | 1101 | stop1-1 | | - | party2 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_GTC | | reduce | 899 | 1101 | stop2-1 | | - | party3 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | | reduce | 899 | 1101 | stop3-1 | | - | party4 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_FOK | | reduce | 899 | 1101 | stop4-1 | | - | party5 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_GFA | | reduce | 899 | 1101 | stop5-1 | | - | party6 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTT | 50 | reduce | 899 | 1101 | stop6-1 | | - | party7 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | | reduce | 899 | 1101 | stop7-1 | | - | party8 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_IOC | | reduce | 899 | 1101 | stop8-1 | | - | party9 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_FOK | | reduce | 899 | 1101 | stop8-1 | | - | party10 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | | reduce | 899 | 1101 | stop10-1 | | + | party1 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_GTT | 50 | reduce | 899 | 1101 | stop1-1 | stop orders are not accepted during the opening auction | + | party2 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_GTC | | reduce | 899 | 1101 | stop2-1 | stop orders are not accepted during the opening auction | + | party3 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | | reduce | 899 | 1101 | stop3-1 | stop orders are not accepted during the opening auction | + | party4 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_FOK | | reduce | 899 | 1101 | stop4-1 | stop orders are not accepted during the opening auction | + | party5 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_GFA | | reduce | 899 | 1101 | stop5-1 | stop orders are not accepted during the opening auction | + | party6 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTT | 50 | reduce | 899 | 1101 | stop6-1 | stop orders are not accepted during the opening auction | + | party7 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | | reduce | 899 | 1101 | stop7-1 | stop orders are not accepted during the opening auction | + | party8 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_IOC | | reduce | 899 | 1101 | stop8-1 | stop orders are not accepted during the opening auction | + | party9 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_FOK | | reduce | 899 | 1101 | stop8-1 | stop orders are not accepted during the opening auction | + | party10 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | | reduce | 899 | 1101 | stop10-1 | stop orders are not accepted during the opening auction | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction @@ -626,7 +626,7 @@ Feature: stop orders in all market types And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC23" - Scenario:4b Make sure we can send sell side stop orders with all possible TIFs and order types (MARKET/LIMIT) while in auction + Scenario:4b Make sure we cannot send sell side stop orders with all possible TIFs and order types (MARKET/LIMIT) while in auction # setup accounts Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -664,16 +664,16 @@ Feature: stop orders in all market types When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | expires in | only | fb price trigger | ra price trigger | reference | error | - | party1 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_GTT | 50 | reduce | 899 | 1101 | stop1-1 | | - | party2 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_GTC | | reduce | 899 | 1101 | stop2-1 | | - | party3 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | | reduce | 899 | 1101 | stop3-1 | | - | party4 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_FOK | | reduce | 899 | 1101 | stop4-1 | | - | party5 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_GFA | | reduce | 899 | 1101 | stop5-1 | | - | party6 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTT | 50 | reduce | 899 | 1101 | stop6-1 | | - | party7 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | | reduce | 899 | 1101 | stop7-1 | | - | party8 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_IOC | | reduce | 899 | 1101 | stop8-1 | | - | party9 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_FOK | | reduce | 899 | 1101 | stop8-1 | | - | party10 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | | reduce | 899 | 1101 | stop10-1 | | + | party1 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_GTT | 50 | reduce | 899 | 1101 | stop1-1 | stop orders are not accepted during the opening auction | + | party2 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_GTC | | reduce | 899 | 1101 | stop2-1 | stop orders are not accepted during the opening auction | + | party3 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | | reduce | 899 | 1101 | stop3-1 | stop orders are not accepted during the opening auction | + | party4 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_FOK | | reduce | 899 | 1101 | stop4-1 | stop orders are not accepted during the opening auction | + | party5 | ETH/DEC23 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_GFA | | reduce | 899 | 1101 | stop5-1 | stop orders are not accepted during the opening auction | + | party6 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTT | 50 | reduce | 899 | 1101 | stop6-1 | stop orders are not accepted during the opening auction | + | party7 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | | reduce | 899 | 1101 | stop7-1 | stop orders are not accepted during the opening auction | + | party8 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_IOC | | reduce | 899 | 1101 | stop8-1 | stop orders are not accepted during the opening auction | + | party9 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_FOK | | reduce | 899 | 1101 | stop8-1 | stop orders are not accepted during the opening auction | + | party10 | ETH/DEC23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | | reduce | 899 | 1101 | stop10-1 | stop orders are not accepted during the opening auction | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction diff --git a/core/integration/features/orders/stop-orders-linked.feature b/core/integration/features/orders/stop-orders-linked.feature new file mode 100644 index 0000000000..5e1c2351e7 --- /dev/null +++ b/core/integration/features/orders/stop-orders-linked.feature @@ -0,0 +1,316 @@ +Feature: linked stop orders + + Background: + Given the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/DEC19 | BTC | BTC | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e6 | 1e6 | default-futures | + | ETH/DEC20 | BTC | BTC | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-basic | default-eth-for-future | 1e-3 | 0 | default-futures | + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 1500 | + | spam.protection.max.stopOrdersPerMarket | 5 | + + # setup accounts + Given time is updated to "2019-11-30T00:00:00Z" + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 1000000 | + | party2 | BTC | 1000000 | + | party3 | BTC | 1000000 | + | aux | BTC | 1000000 | + | aux2 | BTC | 1000000 | + | aux3 | BTC | 1000000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 10 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 10 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 20 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 20 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/DEC19 | sell | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + + + Scenario: A linked stop order with position size override will be cancelled if the position flips short to long (0014-ORDT-128) + + # party1 will start 10 short + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1| ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | sellorder | + | party2| ETH/DEC19 | buy | 11 | 50 | 1 | TYPE_LIMIT | TIF_GTC | buyorder | + + # Place a buy position linked stop order + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | reference | ra size override setting | ra size override percentage | + | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce | 52 | stop1 | POSITION | 1.0 | + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_PENDING | stop1 | + + # Now let party1 change their position to be long so we can trigger the stop order to be cancelled + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1| ETH/DEC19 | buy | 11 | 51 | 0 | TYPE_LIMIT | TIF_GTC | + | party2| ETH/DEC19 | sell | 11 | 51 | 1 | TYPE_LIMIT | TIF_GTC | + + # Stop order should have been cancelled + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_CANCELLED | stop1 | + + + + Scenario: A linked stop order with position size override will be cancelled if the position flips long to short (0014-ORDT-128) + + # party1 will start 10 long + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1| ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | buyorder | + | party2| ETH/DEC19 | sell | 11 | 50 | 1 | TYPE_LIMIT | TIF_GTC | sellorder | + + # Place a sell position linked stop order + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | reference | fb size override setting | fb size override percentage | + | party1| ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce | 48 | stop1 | POSITION | 1.0 | + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_PENDING | stop1 | + + # Now let party1 change their position to be short so we can trigger the stop order to be cancelled + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2| ETH/DEC19 | buy | 11 | 49 | 0 | TYPE_LIMIT | TIF_GTC | + | party1| ETH/DEC19 | sell | 11 | 49 | 1 | TYPE_LIMIT | TIF_GTC | + + # Stop order should have been cancelled + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_CANCELLED | stop1 | + + + Scenario: A linked stop order with position size override will not be cancelled if the position is flat (0014-ORDT-128) + + # party1 will start 10 short + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1| ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | sellorder | + | party2| ETH/DEC19 | buy | 11 | 50 | 1 | TYPE_LIMIT | TIF_GTC | buyorder | + + # Place a buy position linked stop order + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | reference | ra size override setting | ra size override percentage | + | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce | 52 | stop1 | POSITION | 1.0 | + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_PENDING | stop1 | + + # Now let party1 change their position to be flat and check the stop[ order is not cancelled] + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1| ETH/DEC19 | buy | 10 | 51 | 0 | TYPE_LIMIT | TIF_GTC | + | party2| ETH/DEC19 | sell | 10 | 51 | 1 | TYPE_LIMIT | TIF_GTC | + + # Stop order should not have triggered + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_PENDING | stop1 | + + + + Scenario: A linked stop order with position size override will not be cancelled if the position is flat (0014-ORDT-128) + + # party1 will start 10 long + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1| ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | buyorder | + | party2| ETH/DEC19 | sell | 11 | 50 | 1 | TYPE_LIMIT | TIF_GTC | sellorder | + + # Place a sell position linked stop order + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | reference | fb size override setting | fb size override percentage | + | party1| ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce | 48 | stop1 | POSITION | 1.0 | + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_PENDING | stop1 | + + # Now let party1 change their position to be flat and make sure the stop order is not cancelled + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2| ETH/DEC19 | buy | 10 | 49 | 0 | TYPE_LIMIT | TIF_GTC | + | party1| ETH/DEC19 | sell | 10 | 49 | 1 | TYPE_LIMIT | TIF_GTC | + + # Stop order should not have triggered + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_PENDING | stop1 | + + + + Scenario: A linked stop order with position size override will flatten the position after being triggered (0014-ORDT-127) + + # party1 will start 10 short + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1| ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | sellorder | + | party2| ETH/DEC19 | buy | 11 | 50 | 1 | TYPE_LIMIT | TIF_GTC | buyorder | + + # Place a buy position linked stop order + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | reference | ra size override setting | ra size override percentage | + | party1| ETH/DEC19 | buy | 2 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce | 52 | stop1 | POSITION | 1.0 | + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_PENDING | stop1 | + + # Place some orders on the book to give liquidity and to move the last price to trigger the stop order + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party3| ETH/DEC19 | sell | 30 | 52 | 0 | TYPE_LIMIT | TIF_GTC | + | party2| ETH/DEC19 | buy | 1 | 52 | 1 | TYPE_LIMIT | TIF_GTC | + + # Stop order should have triggered + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_TRIGGERED | stop1 | + + + + Scenario: A linked stop order with position size override will be flattened when the stop order is triggered (0014-ORDT-127) + + # party1 will start 10 long + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1| ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | buyorder | + | party2| ETH/DEC19 | sell | 11 | 50 | 1 | TYPE_LIMIT | TIF_GTC | sellorder | + + # Place a sell position linked stop order + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | reference | fb size override setting | fb size override percentage | + | party1| ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce | 48 | stop1 | POSITION | 1.0 | + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_PENDING | stop1 | + + # Now let add some liquidity to the book and move the last price to trigger the stop order + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2| ETH/DEC19 | buy | 30 | 48 | 0 | TYPE_LIMIT | TIF_GTC | + | party3| ETH/DEC19 | sell | 1 | 48 | 1 | TYPE_LIMIT | TIF_GTC | + + # Stop order should have been triggered + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_TRIGGERED | stop1 | + + + Scenario: A linked stop order with position size override and scaling will partially flatten the position after being triggered (0014-ORDT-129) + + # party1 will start 20 short + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1| ETH/DEC19 | sell | 20 | 50 | 0 | TYPE_LIMIT | TIF_GTC | sellorder | + | party2| ETH/DEC19 | buy | 21 | 50 | 1 | TYPE_LIMIT | TIF_GTC | buyorder | + + # Place a buy position linked stop order with a size scaling + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | reference | ra size override setting | ra size override percentage | + | party1| ETH/DEC19 | buy | 2 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce | 52 | stop1 | POSITION | 0.75 | + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_PENDING | stop1 | + + # Place some orders on the book to give liquidity and to move the last price to trigger the stop order + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party3| ETH/DEC19 | sell | 30 | 52 | 0 | TYPE_LIMIT | TIF_GTC | + | party2| ETH/DEC19 | buy | 1 | 52 | 1 | TYPE_LIMIT | TIF_GTC | + + # Stop order should have triggered + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_TRIGGERED | stop1 | + + # Check we have created a trade matching the scaled size of the position + And the following trades should be executed: + | buyer | seller | price | size | + | party1 | party3 | 52 | 15 | + + + Scenario: A linked stop order with position size override and scaling will partially flattened the position when the stop order is triggered (0014-ORDT-129) + + # party1 will start 20 long + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1| ETH/DEC19 | buy | 20 | 50 | 0 | TYPE_LIMIT | TIF_GTC | buyorder | + | party2| ETH/DEC19 | sell | 21 | 50 | 1 | TYPE_LIMIT | TIF_GTC | sellorder | + + # Place a sell position linked stop order with size scaling + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | reference | fb size override setting | fb size override percentage | + | party1| ETH/DEC19 | sell | 2 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce | 48 | stop1 | POSITION | 0.75 | + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_PENDING | stop1 | + + # Now let add some liquidity to the book and move the last price to trigger the stop order + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party2| ETH/DEC19 | buy | 30 | 48 | 0 | TYPE_LIMIT | TIF_GTC | + | party3| ETH/DEC19 | sell | 1 | 48 | 1 | TYPE_LIMIT | TIF_GTC | + + # Stop order should have been triggered + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_TRIGGERED | stop1 | + + # Check we have created a trade matching the scaled size of the position + And the following trades should be executed: + | buyer | seller | price | size | + | party2 | party1 | 48 | 15 | + + + Scenario: A linked stop order with position size override and scaling will be validated for correct scaling value + + # party1 will start 10 long + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1| ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | buyorder | + | party2| ETH/DEC19 | sell | 11 | 50 | 1 | TYPE_LIMIT | TIF_GTC | sellorder | + + # Place a stop order with invalid size scaling + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | reference | fb size override setting | fb size override percentage | error | + | party1| ETH/DEC19 | sell | 2 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce | 48 | stop1 | POSITION | 0.0 | stop order size override percentage value is invalid | + + # Place a stop order with invalid size scaling + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | reference | fb size override setting | fb size override percentage | error | + | party1| ETH/DEC19 | sell | 2 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce | 48 | stop1 | POSITION | 1.000001 | stop order size override percentage value is invalid | + + # Place a stop order with invalid size scaling + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | reference | fb size override setting | fb size override percentage | error | + | party1| ETH/DEC19 | sell | 2 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce | 48 | stop1 | POSITION | -0.000001 | stop order size override percentage value is invalid | diff --git a/core/integration/features/orders/stoporders-auctions.feature b/core/integration/features/orders/stoporders-auctions.feature new file mode 100644 index 0000000000..63f405bf84 --- /dev/null +++ b/core/integration/features/orders/stoporders-auctions.feature @@ -0,0 +1,193 @@ +Feature: stop orders + Background: + Given time is updated to "2020-10-16T00:00:00Z" + And the price monitoring named "my-price-monitoring": + | horizon | probability | auction extension | + | 60 | 0.95 | 240 | + | 600 | 0.99 | 360 | + And the simple risk model named "my-simple-risk-model": + | long | short | max move up | min move down | probability of trading | + | 0.11 | 0.1 | 10 | 11 | 0.1 | + And the markets: + | id | quote name | asset | auction duration | risk model | margin calculator | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/DEC20 | ETH | ETH | 240 | my-simple-risk-model | default-margin-calculator | default-none | my-price-monitoring | default-eth-for-future | 0.01 | 0 | default-futures | + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 240 | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 2 | + | spam.protection.max.stopOrdersPerMarket | 5 | + + Scenario: A stop order placed either prior to or during an auction will not execute during an auction, nor will it participate in the uncrossing. (0014-ORDT-065) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | ETH | 10000 | + | party2 | ETH | 10000 | + | aux | ETH | 100000000000 | + | aux2 | ETH | 100000000000 | + | lpprov | ETH | 100000000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC20 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC20 | 90000000 | 0.1 | submission | + + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC20 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC20 | 2 | 1 | sell | ASK | 50 | 100 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + Then the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC20 | buy | 1 | 25 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC20 | sell | 1 | 134 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC20 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC20 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/DEC20" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" + And the mark price should be "100" for the market "ETH/DEC20" + And time is updated to "2020-10-16T00:10:00Z" + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/DEC20 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | + | party2 | ETH/DEC20 | buy | 1 | 100 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | + + And the mark price should be "100" for the market "ETH/DEC20" + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/DEC20 | sell | 1 | 111 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | + | party2 | ETH/DEC20 | buy | 1 | 111 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + + And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/DEC20" + And the mark price should be "100" for the market "ETH/DEC20" + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | fb trailing | reference | + | party1 | ETH/DEC20 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 0.05 | tstop | + + # Now we make sure the trailing stop is working correctly + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC20 | STATUS_PENDING | tstop | + + # Now let's move back out of auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/DEC20 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | + | party2 | ETH/DEC20 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + + And time is updated to "2020-10-16T00:15:00Z" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" + And the mark price should be "105" for the market "ETH/DEC20" + + # The stop should still be waiting and has not been triggered + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC20 | STATUS_PENDING | tstop | + + # Move the mark price down by <10% to not trigger the stop orders + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux2 | ETH/DEC20 | buy | 1 | 102 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC20 | sell | 1 | 102 | 1 | TYPE_LIMIT | TIF_GTC | + And then the network moves ahead "5" blocks + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" + And the mark price should be "102" for the market "ETH/DEC20" + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC20 | STATUS_PENDING | tstop | + + # Move the mark price down by 10% to trigger the orders + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC20 | buy | 2 | 95 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC20 | sell | 2 | 95 | 2 | TYPE_LIMIT | TIF_GTC | + And then the network moves ahead "10" blocks + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" + And the mark price should be "95" for the market "ETH/DEC20" + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC20 | STATUS_TRIGGERED | tstop | + + + Scenario: A stop order placed either prior to or during an auction, where the uncrossing price is within the triggering range, will immediately execute following uncrossing. (0014-ORDT-066) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | ETH | 10000 | + | party2 | ETH | 10000 | + | aux | ETH | 100000000000 | + | aux2 | ETH | 100000000000 | + | lpprov | ETH | 100000000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC20 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC20 | 90000000 | 0.1 | submission | + + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC20 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC20 | 2 | 1 | sell | ASK | 50 | 100 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + Then the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC20 | buy | 1 | 25 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC20 | sell | 1 | 134 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC20 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC20 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/DEC20" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" + And the mark price should be "100" for the market "ETH/DEC20" + And time is updated to "2020-10-16T00:10:00Z" + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/DEC20 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | + | party2 | ETH/DEC20 | buy | 1 | 100 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | + + And the mark price should be "100" for the market "ETH/DEC20" + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux | ETH/DEC20 | sell | 1 | 85 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | + | aux2 | ETH/DEC20 | buy | 1 | 85 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + + And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/DEC20" + And the mark price should be "100" for the market "ETH/DEC20" + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | fb trailing | reference | + | party1 | ETH/DEC20 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 0.01 | tstop | + + # Now we make sure the trailing stop is working correctly + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC20 | STATUS_PENDING | tstop | + + # Now let's move back out of auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/DEC20 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | + | party2 | ETH/DEC20 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + + And time is updated to "2020-10-16T00:15:00Z" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" + And the mark price should be "92" for the market "ETH/DEC20" + + # The stop should still be waiting and has not been triggered + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC20 | STATUS_TRIGGERED | tstop | + + # check that the order got submitted (it will be stopped due to self trading) + Then the orders should have the following states: + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC20 | buy | 1 | 1 | 0 | STATUS_STOPPED | tstop | + + diff --git a/core/integration/features/orders/stoporders.feature b/core/integration/features/orders/stoporders.feature index 45a3ec8bdb..f555c70228 100644 --- a/core/integration/features/orders/stoporders.feature +++ b/core/integration/features/orders/stoporders.feature @@ -12,40 +12,6 @@ Feature: stop orders | limits.markets.maxPeggedOrders | 1500 | | spam.protection.max.stopOrdersPerMarket | 5 | - Scenario: A stop order with reduce only set to false will be rejected. (0014-ORDT-040) - # setup accounts - Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | party1 | BTC | 10000 | - | party2 | BTC | 10000 | - | aux | BTC | 100000 | - | aux2 | BTC | 100000 | - | lpprov | BTC | 90000000 | - - When the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | - | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | - - # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | - | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | - | aux2 | ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | aux | ETH/DEC19 | sell | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - - Then the opening auction period ends for market "ETH/DEC19" - And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" - - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | - | party1| ETH/DEC19 | buy | 1 | 0 | 0 | TYPE_MARKET| TIF_GTC | post| 47 | stop order must be reduce only | - Scenario: A stop order placed by a key with a zero position and no open orders will be rejected. (0014-ORDT-042) # setup accounts Given the parties deposit on asset's general account the following amount: @@ -61,9 +27,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -77,8 +43,8 @@ Feature: stop orders And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | - | party1| ETH/DEC19 | buy | 1 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 47 | stop order submission not allowed without existing position | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | + | party1 | ETH/DEC19 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 47 | stop order submission not allowed without existing position | Scenario: A stop order placed by a key with a zero position but open orders will be accepted. (0014-ORDT-043) @@ -96,9 +62,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -112,9 +78,9 @@ Feature: stop orders And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | - | party1| ETH/DEC19 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | - | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 47 | | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | + | party1 | ETH/DEC19 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 47 | | Scenario: Attempting to create more stop orders than is allowed by the relevant network parameter will result in the transaction failing to execute. (0014-ORDT-044) @@ -132,9 +98,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -148,15 +114,15 @@ Feature: stop orders And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | - | party1| ETH/DEC19 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | - | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 47 | | - | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 47 | | - | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 47 | | - | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 47 | | - | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 47 | | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | + | party1 | ETH/DEC19 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 47 | | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 47 | | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 47 | | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 47 | | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 47 | | # this next one goes over the top - | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 47 | max stop orders per party reached | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 47 | max stop orders per party reached | Scenario: A stop order wrapping a limit order will, once triggered, place the limit order as if it just arrived as an order without the stop order wrapping. (0014-ORDT-045) @@ -175,9 +141,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 900000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 900000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -191,31 +157,31 @@ Feature: stop orders # setup party1 position, open a 10 short position Given the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # place an order to match with the limit order then check the stop is filled And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | sell | 10 | 80 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 10 | 80 | 0 | TYPE_LIMIT | TIF_GTC | # create party1 stop order And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | reference | - | party1| ETH/DEC19 | buy | 5 | 80 | 0 | TYPE_LIMIT | TIF_IOC | reduce | 75 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | reference | + | party1 | ETH/DEC19 | buy | 5 | 80 | 0 | TYPE_LIMIT | TIF_IOC | reduce | 75 | | stop1 | # now we trade at 75, this will breach the trigger When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | buy | 10 | 75 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 10 | 75 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | buy | 10 | 75 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 10 | 75 | 1 | TYPE_LIMIT | TIF_GTC | # check that the order was triggered Then the stop orders should have the following states | party | market id | status | reference | | party1 | ETH/DEC19 | STATUS_TRIGGERED | stop1 | And the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | buy | 5 | 80 | STATUS_FILLED | stop1 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC19 | buy | 5 | 0 | 80 | STATUS_FILLED | stop1 | Scenario: With a last traded price at 50, a stop order placed with Rises Above setting at 75 will be triggered by any trade at price 75 or higher. (0014-ORDT-047) (0014-ORDT-046) @@ -234,9 +200,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -250,31 +216,31 @@ Feature: stop orders # setup party1 position, open a 10 short position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # create party1 stop order When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | reference | - | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 75 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | reference | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 75 | | stop1 | # volume for the stop trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | sell | 20 | 80 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 20 | 80 | 0 | TYPE_LIMIT | TIF_GTC | # now we trade at 75, this will breach the trigger When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | buy | 10 | 75 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 10 | 75 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | buy | 10 | 75 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 10 | 75 | 1 | TYPE_LIMIT | TIF_GTC | # check that the order got submitted Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | buy | 10 | 0 | STATUS_FILLED | stop1 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | STATUS_FILLED | stop1 | Scenario: With a last traded price at 50, a stop order placed with Rises Above setting at 25 will be triggered immediately (before another trade is even necessary). (0014-ORDT-048) @@ -293,9 +259,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -309,26 +275,26 @@ Feature: stop orders # setup party1 position, open a 10 long position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # volume for the stop trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | # create party1 stop order, results in a trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | reference | - | party1| ETH/DEC19 | sell | 10 | 0 | 1 | TYPE_MARKET| TIF_IOC | reduce| 25 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | reference | + | party1 | ETH/DEC19 | sell | 10 | 0 | 1 | TYPE_MARKET | TIF_IOC | reduce | 25 | | stop1 | # check that the order got submitted Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | sell | 10 | 0 | STATUS_FILLED | stop1 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC19 | sell | 10 | 0 | 0 | STATUS_FILLED | stop1 | Scenario: With a last traded price at 50, a stop order placed with Falls Below setting at 25 will be triggered by any trade at price 25 or lower. (0014-ORDT-049) @@ -347,9 +313,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -363,31 +329,31 @@ Feature: stop orders # setup party1 position, open a 10 short position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # create party1 stop order, results in a trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | - | party1| ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 25 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | + | party1 | ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 25 | | stop1 | # volume for the stop trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | buy | 10 | 20 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | buy | 10 | 20 | 0 | TYPE_LIMIT | TIF_GTC | # now we trade at 75, this will breach the trigger When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | sell | 10 | 25 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 10 | 25 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 10 | 25 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 10 | 25 | 1 | TYPE_LIMIT | TIF_GTC | # check that the order got submitted Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | sell | 10 | 0 | STATUS_FILLED | stop1 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC19 | sell | 10 | 0 | 0 | STATUS_FILLED | stop1 | Scenario: With a last traded price at 50, a stop order placed with Falls Below setting at 75 will be triggered immediately (before another trade is even necessary). (0014-ORDT-050) @@ -406,15 +372,15 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | - | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | buy | 5 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 5 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | | aux2 | ETH/DEC19 | buy | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | | aux | ETH/DEC19 | sell | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | @@ -423,29 +389,29 @@ Feature: stop orders # setup party1 position, open a 10 long position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # volume for the stop trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | # create party1 stop order, results in a trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | - | party1| ETH/DEC19 | buy | 10 | 0 | 1 | TYPE_MARKET| TIF_IOC | reduce| 75 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | + | party1 | ETH/DEC19 | buy | 10 | 0 | 1 | TYPE_MARKET | TIF_IOC | reduce | 75 | | stop1 | # check that the order got submitted Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | buy | 10 | 0 | STATUS_FILLED | stop1 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | STATUS_FILLED | stop1 | + @Liquidation Scenario: With a last traded price at 50, a stop order placed with any trigger price which does not trigger immediately will trigger as soon as a trade occurs at a trigger price, and will not wait until the next mark price update to trigger. (0014-ORDT-051) - # setup network parameters Given the following network parameters are set: | name | value | @@ -467,9 +433,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -484,31 +450,31 @@ Feature: stop orders # setup party1 position, open a 10 long position Given the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # place volume to trade with stop order Given the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | buy | 10 | 20 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | buy | 10 | 20 | 0 | TYPE_LIMIT | TIF_GTC | # place stop order And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | - | party1| ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce | 25 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | + | party1 | ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 25 | | stop1 | # trigger stop order When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party2| ETH/DEC19 | buy | 10 | 24 | 0 | TYPE_LIMIT | TIF_GTC | - | party3| ETH/DEC19 | sell | 10 | 24 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party2 | ETH/DEC19 | buy | 10 | 24 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | sell | 10 | 24 | 1 | TYPE_LIMIT | TIF_GTC | # check that the stop order was triggered despite the mark price not updating Then the mark price should be "50" for the market "ETH/DEC19" Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | sell | 10 | 0 | STATUS_FILLED | stop1 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC19 | sell | 10 | 0 | 0 | STATUS_FILLED | stop1 | # check the mark price is later updated correctly - Given the network moves ahead "2" blocks + When the network moves ahead "2" blocks Then the mark price should be "20" for the market "ETH/DEC19" Scenario: A stop order with expiration time T set to expire at that time will expire at time T if reached without being triggered. (0014-ORDT-052) @@ -529,9 +495,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -546,20 +512,20 @@ Feature: stop orders # setup party1 position, open a 10 long position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # volume for the stop trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | When time is updated to "2019-11-30T00:00:10Z" # create party1 stop order, no trade resulting, expires in 10 secs When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | reference | so expires in | so expiry strategy | - | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 75 | | stop1 | 10 | EXPIRY_STRATEGY_CANCELS | + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | reference | ra expires in | ra expiry strategy | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 75 | | stop1 | 10 | EXPIRY_STRATEGY_CANCELS | # add 20 secs, should expire When time is updated to "2019-11-30T00:00:30Z" @@ -587,9 +553,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -597,28 +563,28 @@ Feature: stop orders | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | | aux2 | ETH/DEC19 | buy | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | aux3 | ETH/DEC19 | sell | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/DEC19 | sell | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | Then the opening auction period ends for market "ETH/DEC19" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" # setup party1 position, open a 10 long position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # volume for the stop trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | When time is updated to "2019-11-30T00:00:10Z" # create party1 stop order, no trade resulting, expires in 10 secs When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | reference | so expires in | so expiry strategy | - | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 75 | | stop1 | 10 | EXPIRY_STRATEGY_SUBMIT | + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | reference | ra expires in | ra expiry strategy | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 75 | | stop1 | 10 | EXPIRY_STRATEGY_SUBMIT | # add 20 secs, should expire When time is updated to "2019-11-30T00:00:30Z" @@ -629,9 +595,10 @@ Feature: stop orders # check that the order got submitted Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | buy | 10 | 0 | STATUS_FILLED | stop1 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | STATUS_FILLED | stop1 | + @NoPerp Scenario: If the order is triggered before reaching time T, the order will have been removed and will not trigger at time T. (0014-ORDT-054) (0014-ORDT-041) # setup accounts @@ -651,9 +618,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 900000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 900000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -669,23 +636,23 @@ Feature: stop orders Given time is updated to "2019-11-30T00:00:10Z" # setup party1 position, open a 10 long position And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | buy | 20 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 20 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 20 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 20 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # volume for the stop trade And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | buy | 20 | 20 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | buy | 20 | 20 | 0 | TYPE_LIMIT | TIF_GTC | # create party1 stop order, no trade resulting, expires in 10 secs And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | so expires in | so expiry strategy | - | party1| ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 25 | | stop1 | 10 | EXPIRY_STRATEGY_SUBMIT | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | fb expires in | fb expiry strategy | + | party1 | ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 25 | | stop1 | 10 | EXPIRY_STRATEGY_SUBMIT | # trigger the stop order When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party2| ETH/DEC19 | buy | 1 | 24 | 0 | TYPE_LIMIT | TIF_GTC | - | party3| ETH/DEC19 | sell | 1 | 24 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party2 | ETH/DEC19 | buy | 1 | 24 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | sell | 1 | 24 | 1 | TYPE_LIMIT | TIF_GTC | # check the stop order is filled Then the stop orders should have the following states | party | market id | status | reference | @@ -716,9 +683,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -733,9 +700,9 @@ Feature: stop orders # setup party1 position, open a 10 short position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | Then the network moves ahead "1" blocks @@ -748,24 +715,24 @@ Feature: stop orders # create party1 stop order, results in a trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | - | party1| ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 25 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | + | party1 | ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 25 | | stop1 | # volume for the stop trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | buy | 10 | 20 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | buy | 10 | 20 | 0 | TYPE_LIMIT | TIF_GTC | # now we trade at 25, this will breach the trigger When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | sell | 10 | 25 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 10 | 25 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 10 | 25 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 10 | 25 | 1 | TYPE_LIMIT | TIF_GTC | # check that the order got submitted Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | sell | 1 | 0 | STATUS_FILLED | stop1 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC19 | sell | 1 | 0 | 0 | STATUS_FILLED | stop1 | Then the network moves ahead "1" blocks And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" @@ -793,9 +760,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -809,58 +776,58 @@ Feature: stop orders # setup party1 position, open a 10 short position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # create party1 stop order, results in a trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | ra price trigger | error | reference | - | party1| ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 25 | 75 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | ra price trigger | error | reference | + | party1 | ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 25 | 75 | | stop1 | # volume for the stop trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | buy | 10 | 20 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | buy | 10 | 20 | 0 | TYPE_LIMIT | TIF_GTC | # now we trade at 75, this will breach the trigger When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | sell | 10 | 25 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 10 | 25 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 10 | 25 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 10 | 25 | 1 | TYPE_LIMIT | TIF_GTC | # check that the order got submitted Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | sell | 10 | 0 | STATUS_FILLED | stop1-1 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC19 | sell | 10 | 0 | 0 | STATUS_FILLED | stop1-1 | Then the stop orders should have the following states | party | market id | status | reference | | party1 | ETH/DEC19 | STATUS_TRIGGERED | stop1-1 | | party1 | ETH/DEC19 | STATUS_STOPPED | stop1-2 | + @Liquidation Scenario: If a pair of stop orders are specified as OCO and one triggers but is invalid at time of triggering (e.g. a buy when the trader is already long) the other will still be cancelled. (0014-ORDT-058) - # setup accounts Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | party1 | BTC | 10000000 | - | party2 | BTC | 10000000 | - | party3 | BTC | 10000000 | - | aux | BTC | 10000000 | - | aux2 | BTC | 10000000 | - | aux3 | BTC | 10000000 | - | lpprov | BTC | 90000000 | + | party | asset | amount | + | party1 | BTC | 10000000 | + | party2 | BTC | 10000000 | + | party3 | BTC | 900000000 | + | aux | BTC | 10000000 | + | aux2 | BTC | 10000000 | + | aux3 | BTC | 10000000 | + | lpprov | BTC | 90000000 | When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -875,9 +842,9 @@ Feature: stop orders # setup party1 position, open a 10 short position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | Then the network moves ahead "1" blocks @@ -890,15 +857,15 @@ Feature: stop orders # create party1 stop order, results in a trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | ra price trigger |error | reference | - | party1| ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 25 | 100 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | ra price trigger | error | reference | + | party1 | ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 25 | 100 | | stop1 | # close party1 position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | buy | 2 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party1| ETH/DEC19 | sell | 2 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | buy | 2 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/DEC19 | sell | 2 | 50 | 1 | TYPE_LIMIT | TIF_GTC | Then the network moves ahead "1" blocks And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" @@ -910,15 +877,15 @@ Feature: stop orders # now we trade at 25, this will breach the trigger When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | sell | 1 | 25 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 1 | 25 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party3 | ETH/DEC19 | sell | 1 | 25 | 0 | TYPE_LIMIT | TIF_GTC | p3-ord | + | party2 | ETH/DEC19 | buy | 1 | 25 | 1 | TYPE_LIMIT | TIF_GTC | p2-ord | # check that the order got submitted and stopped as would not reduce the position Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | sell | 1 | 0 | STATUS_STOPPED | stop1-1 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC19 | sell | 1 | 1 | 0 | STATUS_STOPPED | stop1-1 | Then the stop orders should have the following states | party | market id | status | reference | @@ -929,22 +896,22 @@ Feature: stop orders # setup accounts Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | party1 | BTC | 10000000000| - | party2 | BTC | 10000000000| - | party3 | BTC | 10000000000| - | aux | BTC | 10000000000| - | aux2 | BTC | 10000000000| - | lpprov | BTC | 9000000000 | + | party | asset | amount | + | party1 | BTC | 10000000000 | + | party2 | BTC | 10000000000 | + | party3 | BTC | 10000000000 | + | aux | BTC | 10000000000 | + | aux2 | BTC | 10000000000 | + | lpprov | BTC | 9000000000 | When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -959,20 +926,20 @@ Feature: stop orders # setup party1 position, open a 10 long position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # create party1 stop order, results in a trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb trailing | error | reference | - | party1| ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 0.05 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb trailing | error | reference | + | party1 | ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 0.05 | | stop1 | # create volume to close party 1 # high price sell so it doesn't trade When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | aux | ETH/DEC19 | buy | 1 | 20 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | buy | 1 | 20 | 0 | TYPE_LIMIT | TIF_GTC | # move prive to 60, nothing happen @@ -1001,7 +968,7 @@ Feature: stop orders # check the volum as not reduced Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | - | party1 | 1 | 8 | 0 | + | party1 | 1 | 8 | 0 | # move first to 57, nothing happen When the parties place the following orders: @@ -1011,8 +978,8 @@ Feature: stop orders # check that the order got submitted Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | sell | 1 | 0 | STATUS_FILLED | stop1 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC19 | sell | 1 | 0 | 0 | STATUS_FILLED | stop1 | Then the stop orders should have the following states | party | market id | status | reference | @@ -1022,22 +989,22 @@ Feature: stop orders # setup accounts Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | party1 | BTC | 10000000000| - | party2 | BTC | 10000000000| - | party3 | BTC | 10000000000| - | aux | BTC | 10000000000| - | aux2 | BTC | 10000000000| - | lpprov | BTC | 9000000000 | + | party | asset | amount | + | party1 | BTC | 10000000000 | + | party2 | BTC | 10000000000 | + | party3 | BTC | 10000000000 | + | aux | BTC | 10000000000 | + | aux2 | BTC | 10000000000 | + | lpprov | BTC | 9000000000 | When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -1052,20 +1019,20 @@ Feature: stop orders # setup party1 position, open a 10 short position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | sell | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # create party1 stop order, results in a trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | ra trailing | error | reference | - | party1| ETH/DEC19 | buy | 1 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 0.05 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | ra trailing | error | reference | + | party1 | ETH/DEC19 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 0.05 | | stop1 | # create volume to close party 1 # high price sell so it doesn't trade When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | aux | ETH/DEC19 | sell | 1 | 70 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 70 | 0 | TYPE_LIMIT | TIF_GTC | # move prive to 60, nothing happen @@ -1104,8 +1071,8 @@ Feature: stop orders # check that the order got submitted Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | buy | 1 | 0 | STATUS_FILLED | stop1 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC19 | buy | 1 | 0 | 0 | STATUS_FILLED | stop1 | Then the stop orders should have the following states | party | market id | status | reference | @@ -1115,22 +1082,22 @@ Feature: stop orders # setup accounts Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | party1 | BTC | 10000000000| - | party2 | BTC | 10000000000| - | party3 | BTC | 10000000000| - | aux | BTC | 10000000000| - | aux2 | BTC | 10000000000| - | lpprov | BTC | 9000000000 | + | party | asset | amount | + | party1 | BTC | 10000000000 | + | party2 | BTC | 10000000000 | + | party3 | BTC | 10000000000 | + | aux | BTC | 10000000000 | + | aux2 | BTC | 10000000000 | + | lpprov | BTC | 9000000000 | When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -1145,20 +1112,20 @@ Feature: stop orders # setup party1 position, open a 10 long position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # create party1 stop order, results in a trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb trailing | error | reference | - | party1| ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 0.25 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb trailing | error | reference | + | party1 | ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 0.25 | | stop1 | # create volume to close party 1 # high price sell so it doesn't trade When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | aux | ETH/DEC19 | buy | 1 | 20 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | buy | 1 | 20 | 0 | TYPE_LIMIT | TIF_GTC | # move prive to 60, nothing happen @@ -1215,7 +1182,7 @@ Feature: stop orders # check the volum as not reduced Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | - | party1 | 1 | -4 | 0 | + | party1 | 1 | -4 | 0 | # move first to 46, nothing happen @@ -1227,133 +1194,14 @@ Feature: stop orders # check that the order got submitted Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | sell | 1 | 0 | STATUS_FILLED | stop1 | - - Then the stop orders should have the following states - | party | market id | status | reference | - | party1 | ETH/DEC19 | STATUS_TRIGGERED | stop1 | - - Scenario: A stop order placed either prior to or during an auction will not execute during an auction, nor will it participate in the uncrossing. (0014-ORDT-065) - - # setup accounts - Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | party1 | BTC | 100000000 | - | party2 | BTC | 100000000 | - | party3 | BTC | 100000000 | - | aux | BTC | 100000000 | - | aux2 | BTC | 100000000 | - | lpprov | BTC | 900000000 | - - When the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | - | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | - - # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | - | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | - | aux2 | ETH/DEC19 | buy | 5 | 51 | 0 | TYPE_LIMIT | TIF_GTC | - | aux | ETH/DEC19 | sell | 5 | 51 | 0 | TYPE_LIMIT | TIF_GTC | - # setup our order for later - | party1| ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - - - # create party1 stop order - # still in auction - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | - | party1| ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 25 | | stop1 | - - - Then the opening auction period ends for market "ETH/DEC19" - And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" - - # trade with party 1 - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party2| ETH/DEC19 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | - - # volume for the stop trade - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | buy | 1 | 20 | 0 | TYPE_LIMIT | TIF_GTC | - - # now we trade at 25, this will breach the trigger - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | sell | 1 | 25 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 1 | 25 | 1 | TYPE_LIMIT | TIF_GTC | - - # check that the order got submitted - Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | sell | 1 | 0 | STATUS_FILLED | stop1 | - - Then the stop orders should have the following states - | party | market id | status | reference | - | party1 | ETH/DEC19 | STATUS_TRIGGERED | stop1 | - - Scenario: A stop order placed either prior to or during an auction, where the uncrossing price is within the triggering range, will immediately execute following uncrossing. (0014-ORDT-066) - - # setup accounts - Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | party1 | BTC | 100000000 | - | party2 | BTC | 100000000 | - | party3 | BTC | 100000000 | - | aux | BTC | 100000000 | - | aux2 | BTC | 100000000 | - | lpprov | BTC | 900000000 | - - When the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | - | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | - - # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | - | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | - | aux2 | ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | aux | ETH/DEC19 | sell | 2 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - # setup our order for later - | party1| ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - - - # create party1 stop order - # still in auction - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | - | party1| ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 50 | | stop1 | - - - Then the opening auction period ends for market "ETH/DEC19" - And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" - - - - # check that the order got submitted - Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | ETH/DEC19 | sell | 1 | 0 | STATUS_FILLED | stop1 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | ETH/DEC19 | sell | 1 | 0 | 0 | STATUS_FILLED | stop1 | Then the stop orders should have the following states | party | market id | status | reference | | party1 | ETH/DEC19 | STATUS_TRIGGERED | stop1 | + Scenario: If a trader has open stop orders and their position moves to zero whilst they still have open limit orders their stop orders will remain active. (0014-ORDT-067) # setup accounts @@ -1371,9 +1219,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 900000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 900000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -1388,40 +1236,40 @@ Feature: stop orders # open position Given the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # create party1 stop order And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | - | party1| ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 25 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | + | party1 | ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 25 | | stop1 | # create party1 limit orders And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | sell | 1 | 51 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 1 | 51 | 0 | TYPE_LIMIT | TIF_GTC | # close position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | sell | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | And the network moves ahead "1" blocks # check stop orders have not been cancelled and are still pending Then the stop orders should have the following states - | party | market id | status | reference | - | party1 | ETH/DEC19 | STATUS_PENDING | stop1 | + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_PENDING | stop1 | Scenario: If a trader has open stop orders and their position moves to zero with no open limit orders their stop orders are cancelled. (0014-ORDT-068) # setup accounts Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | party1 | BTC | 100000000 | - | party2 | BTC | 100000000 | - | party3 | BTC | 100000000 | - | aux | BTC | 100000000 | - | aux2 | BTC | 100000000 | + | party | asset | amount | + | party1 | BTC | 100000000 | + | party2 | BTC | 100000000 | + | party3 | BTC | 100000000 | + | aux | BTC | 100000000 | + | aux2 | BTC | 100000000 | | lpprov | BTC | 900000000 | When the parties submit the following liquidity provision: @@ -1429,9 +1277,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -1446,21 +1294,21 @@ Feature: stop orders # open position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # create party1 stop order When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | - | party1| ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 25 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | + | party1 | ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 25 | | stop1 | # close position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | sell | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTC | Then the network moves ahead "1" blocks And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" @@ -1486,9 +1334,9 @@ Feature: stop orders | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -1502,9 +1350,9 @@ Feature: stop orders And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | - | party1| ETH/DEC19 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | | - | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 47 | | stop1 | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | + | party1 | ETH/DEC19 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 47 | | stop1 | Then the parties cancel the following stop orders: | party | reference | @@ -1514,8 +1362,8 @@ Feature: stop orders | party | market id | status | reference | | party1 | ETH/DEC19 | STATUS_CANCELLED | stop1 | -@SLABug -Scenario: All stop orders for a specific party can be cancelled by a single stop order cancellation. (0014-ORDT-072) + @SLABug + Scenario: All stop orders for a specific party can be cancelled by a single stop order cancellation. (0014-ORDT-072) # setup accounts Given the parties deposit on asset's general account the following amount: @@ -1533,11 +1381,11 @@ Scenario: All stop orders for a specific party can be cancelled by a single stop | lp2 | lpprov | ETH/DEC20 | 900000 | 0.1 | submission | | lp2 | lpprov | ETH/DEC20 | 900000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | - | lpprov | ETH/DEC20 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC20 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | lpprov | ETH/DEC20 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC20 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -1556,13 +1404,13 @@ Scenario: All stop orders for a specific party can be cancelled by a single stop And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | - | party1| ETH/DEC19 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | | - | party1| ETH/DEC19 | buy | 2 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 47 | | stop1 | - | party1| ETH/DEC19 | buy | 2 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 48 | | stop2 | - | party1| ETH/DEC20 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | | - | party1| ETH/DEC20 | buy | 2 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 49 | | stop3 | - | party1| ETH/DEC20 | buy | 2 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 49 | | stop4 | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | + | party1 | ETH/DEC19 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | | + | party1 | ETH/DEC19 | buy | 2 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 47 | | stop1 | + | party1 | ETH/DEC19 | buy | 2 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 48 | | stop2 | + | party1 | ETH/DEC20 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | | + | party1 | ETH/DEC20 | buy | 2 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 49 | | stop3 | + | party1 | ETH/DEC20 | buy | 2 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 49 | | stop4 | Then the party "party1" cancels all their stop orders @@ -1573,8 +1421,8 @@ Scenario: All stop orders for a specific party can be cancelled by a single stop | party1 | ETH/DEC20 | STATUS_CANCELLED | stop3 | | party1 | ETH/DEC20 | STATUS_CANCELLED | stop4 | -@SLABug -Scenario: All stop orders for a specific party for a specific market can be cancelled by a single stop order cancellation. (0014-ORDT-073) + @SLABug + Scenario: All stop orders for a specific party for a specific market can be cancelled by a single stop order cancellation. (0014-ORDT-073) # setup accounts Given the parties deposit on asset's general account the following amount: @@ -1592,11 +1440,11 @@ Scenario: All stop orders for a specific party for a specific market can be canc | lp2 | lpprov | ETH/DEC20 | 900000 | 0.1 | submission | | lp2 | lpprov | ETH/DEC20 | 900000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | - | lpprov | ETH/DEC20 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC20 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | lpprov | ETH/DEC20 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC20 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -1615,13 +1463,13 @@ Scenario: All stop orders for a specific party for a specific market can be canc And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | - | party1| ETH/DEC19 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | | - | party1| ETH/DEC19 | buy | 2 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 47 | | stop1 | - | party1| ETH/DEC19 | buy | 2 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 48 | | stop2 | - | party1| ETH/DEC20 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | | - | party1| ETH/DEC20 | buy | 2 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 49 | | stop3 | - | party1| ETH/DEC20 | buy | 2 | 0 | 0 | TYPE_MARKET| TIF_GTC | reduce| 49 | | stop4 | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | error | reference | + | party1 | ETH/DEC19 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | | + | party1 | ETH/DEC19 | buy | 2 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 47 | | stop1 | + | party1 | ETH/DEC19 | buy | 2 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 48 | | stop2 | + | party1 | ETH/DEC20 | sell | 10 | 60 | 0 | TYPE_LIMIT | TIF_GTC | | | | | + | party1 | ETH/DEC20 | buy | 2 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 49 | | stop3 | + | party1 | ETH/DEC20 | buy | 2 | 0 | 0 | TYPE_MARKET | TIF_GTC | reduce | 49 | | stop4 | Then the party "party1" cancels all their stop orders for the market "ETH/DEC19" @@ -1632,7 +1480,7 @@ Scenario: All stop orders for a specific party for a specific market can be canc | party1 | ETH/DEC20 | STATUS_PENDING | stop3 | | party1 | ETH/DEC20 | STATUS_PENDING | stop4 | -Scenario: A stop order cannot be triggered by orders crossing during an auction. (WIP TEST CASE 2) + Scenario: A stop order cannot be triggered by orders crossing during an auction. (WIP TEST CASE 2) # setup accounts Given the parties deposit on asset's general account the following amount: @@ -1649,9 +1497,9 @@ Scenario: A stop order cannot be triggered by orders crossing during an auction. | lp2 | lpprov | ETH/DEC20 | 900000 | 0.1 | submission | | lp2 | lpprov | ETH/DEC20 | 900000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC20 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC20 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC20 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC20 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -1699,7 +1547,7 @@ Scenario: A stop order cannot be triggered by orders crossing during an auction. | party | market id | status | reference | | party1 | ETH/DEC20 | STATUS_PENDING | stop | -Scenario: A stop order cannot be triggered by a stop order expiring during an auction. (WIP TEST CASE 2) + Scenario: A stop order cannot be triggered by a stop order expiring during an auction. (WIP TEST CASE 2) # setup accounts Given time is updated to "2019-11-30T00:00:00Z" @@ -1716,9 +1564,9 @@ Scenario: A stop order cannot be triggered by a stop order expiring during an au | lp1 | lpprov | ETH/DEC20 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC20 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC20 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC20 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC20 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC20 | 2 | 1 | sell | ASK | 50 | 100 | And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | aux | ETH/DEC20 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | @@ -1738,7 +1586,7 @@ Scenario: A stop order cannot be triggered by a stop order expiring during an au | party2 | ETH/DEC20 | sell | 1 | 5000 | 1 | TYPE_LIMIT | TIF_GTC | # Place a stop order which will expire during the auction And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | so expires in | so expiry strategy | reference | + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | ra expires in | ra expiry strategy | reference | | party1 | ETH/DEC20 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 5020 | | 5 | EXPIRY_STRATEGY_SUBMIT | stop | # Trigger a price-monitoring auction When the parties place the following orders: @@ -1777,6 +1625,7 @@ Scenario: A stop order cannot be triggered by a stop order expiring during an au | party1 | 1 | 10 | 0 | + @NoPerp Scenario: If the order is triggered before reaching time T, the order will have been removed and will not trigger at time T. (0014-ORDT-054) (0014-ORDT-041) # setup accounts @@ -1796,9 +1645,9 @@ Scenario: A stop order cannot be triggered by a stop order expiring during an au | lp1 | lpprov | ETH/DEC19 | 900000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 900000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -1814,28 +1663,28 @@ Scenario: A stop order cannot be triggered by a stop order expiring during an au Given time is updated to "2019-11-30T00:00:10Z" # setup party1 position, open a 10 long position And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | buy | 20 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | sell | 20 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 20 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 20 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # volume for the stop trade And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | buy | 20 | 20 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | buy | 20 | 20 | 0 | TYPE_LIMIT | TIF_GTC | # create party1 stop order, no trade resulting, expires in 10 secs And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | ra price trigger| error | reference | so expires in | so expiry strategy | - | party1| ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 25 | 100 | | stop1 | 10 | EXPIRY_STRATEGY_SUBMIT | + | party | market id | side | volume | price | resulting trades | type | tif | only | fb price trigger | ra price trigger | error | reference | fb expires in | fb expiry strategy | + | party1 | ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 25 | 100 | | stop1 | 10 | EXPIRY_STRATEGY_SUBMIT | # trigger the stop order When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party2| ETH/DEC19 | buy | 1 | 24 | 0 | TYPE_LIMIT | TIF_GTC | - | party3| ETH/DEC19 | sell | 1 | 24 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party2 | ETH/DEC19 | buy | 1 | 24 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | sell | 1 | 24 | 1 | TYPE_LIMIT | TIF_GTC | # check the stop order is filled Then the stop orders should have the following states - | party | market id | status | reference | - | party1 | ETH/DEC19 | STATUS_TRIGGERED | stop1-1 | - | party1 | ETH/DEC19 | STATUS_STOPPED | stop1-2 | + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_TRIGGERED | stop1-1 | + | party1 | ETH/DEC19 | STATUS_STOPPED | stop1-2 | # add 20 secs, should expire Given time is updated to "2019-11-30T00:00:30Z" @@ -1864,9 +1713,9 @@ Scenario: A stop order cannot be triggered by a stop order expiring during an au | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | - | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction When the parties place the following orders: @@ -1874,29 +1723,345 @@ Scenario: A stop order cannot be triggered by a stop order expiring during an au | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | | aux2 | ETH/DEC19 | buy | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | aux3 | ETH/DEC19 | sell | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/DEC19 | sell | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | Then the opening auction period ends for market "ETH/DEC19" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" # setup party1 position, open a 10 long position When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1| ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2| ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | # volume for the stop trade When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3| ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | When time is updated to "2019-11-30T00:00:10Z" # create party1 stop order, no trade resulting, expires in 10 secs When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | reference | so expires in | so expiry strategy | - | party1| ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET| TIF_IOC | reduce| 75 | stop order expiry in the past | stop1 | -10 | EXPIRY_STRATEGY_SUBMIT | + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | error | reference | ra expires in | ra expiry strategy | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 75 | stop order expiry in the past | stop1 | -10 | EXPIRY_STRATEGY_SUBMIT | Then the stop orders should have the following states | party | market id | status | reference | | party1 | ETH/DEC19 | STATUS_REJECTED | stop1 | + + + + Scenario: An OCO stop order with expiration time T with both sides set to execute at that time will be rejected on submission (0014-ORDT-130) + + # setup accounts + Given time is updated to "2019-11-30T00:00:00Z" + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000 | + | party2 | BTC | 10000 | + | party3 | BTC | 10000 | + | aux | BTC | 100000 | + | aux2 | BTC | 100000 | + | aux3 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/DEC19 | sell | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + + # volume for the stop trade + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + + + When time is updated to "2019-11-30T00:00:10Z" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | fb price trigger | reference | ra expires in | ra expiry strategy | fb expires in | fb expiry strategy | error | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 75 | 25 | stop1 | 10 | EXPIRY_STRATEGY_SUBMIT | 10 | EXPIRY_STRATEGY_SUBMIT | stop order OCOs must not have the same expiry time | + + + Scenario: An OCO stop order with expiration time T with one side set to execute at that time will execute at time T + # if reached without being triggered, with the specified side triggering and the other side cancelling. (0014-ORDT-131) + + # setup accounts + Given time is updated to "2019-11-30T00:00:00Z" + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000000 | + | party2 | BTC | 10000000 | + | party3 | BTC | 10000000 | + | aux | BTC | 10000000 | + | aux2 | BTC | 10000000 | + | aux3 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 100 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 100 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/DEC19 | sell | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + + # volume for the stop trade + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | buy | 10 | 51 | 0 | TYPE_LIMIT | TIF_GTC | + + + When time is updated to "2019-11-30T00:00:10Z" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | fb price trigger | reference | ra expires in | ra expiry strategy | fb expires in | fb expiry strategy | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 75 | 25 | stop | 10 | EXPIRY_STRATEGY_SUBMIT | 15 | EXPIRY_STRATEGY_SUBMIT | + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_PENDING | stop-1 | + | party1 | ETH/DEC19 | STATUS_PENDING | stop-2 | + + Then clear all events + When time is updated to "2019-11-30T00:00:20Z" + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_STOPPED | stop-1 | + | party1 | ETH/DEC19 | STATUS_EXPIRED | stop-2 | + + # Now perform the same test but from the other side + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | fb price trigger | reference | ra expires in | ra expiry strategy | fb expires in | fb expiry strategy | + | party2 | ETH/DEC19 | sell | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 75 | 25 | stop2 | 15 | EXPIRY_STRATEGY_SUBMIT | 10 | EXPIRY_STRATEGY_SUBMIT | + + Then the stop orders should have the following states + | party | market id | status | reference | + | party2 | ETH/DEC19 | STATUS_PENDING | stop2-1 | + | party2 | ETH/DEC19 | STATUS_PENDING | stop2-2 | + + Then clear all events + When time is updated to "2019-11-30T00:00:30Z" + + Then the stop orders should have the following states + | party | market id | status | reference | + | party2 | ETH/DEC19 | STATUS_STOPPED | stop2-2 | + | party2 | ETH/DEC19 | STATUS_EXPIRED | stop2-1 | + + + Scenario: A party with a long position cannot enter a buy stop order, + and a party with a short position cannot enter a sell stop order. (0014-ORDT-137) + + # setup accounts + Given time is updated to "2019-11-30T00:00:00Z" + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000000 | + | party2 | BTC | 10000000 | + | party3 | BTC | 10000000 | + | aux | BTC | 10000000 | + | aux2 | BTC | 10000000 | + | aux3 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 100 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 100 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/DEC19 | sell | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + + # volume for the stop trade + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | buy | 10 | 51 | 0 | TYPE_LIMIT | TIF_GTC | + + # We should not be able to place a but stop order for party2 as they have a long position and it would make it more long + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | fb price trigger | reference | error | + | party2 | ETH/DEC19 | buy | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 75 | 25 | stop | side used in stop order does not close the position | + + # We should not be able to place a sell stop order for party1 as they have a short position and it would make it more short + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | fb price trigger | reference | error | + | party1 | ETH/DEC19 | sell | 1 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 75 | 25 | stop | side used in stop order does not close the position | + + + Scenario: If a stop order is placed with a position_fraction equal to 0.5 and the position + size is 5 then the rounding should be equal to 3 (0014-ORDT-138) + + # setup accounts + Given time is updated to "2019-11-30T00:00:00Z" + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000000 | + | party2 | BTC | 10000000 | + | party3 | BTC | 10000000 | + | aux | BTC | 10000000 | + | aux2 | BTC | 10000000 | + | aux3 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 100 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 100 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/DEC19 | sell | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 5 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + + # volume for the stop trade + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | buy | 10 | 51 | 0 | TYPE_LIMIT | TIF_GTC | + + When time is updated to "2019-11-30T00:00:10Z" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | fb price trigger | reference | ra expires in | ra expiry strategy | fb expires in | fb expiry strategy | ra size override setting | ra size override percentage | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 75 | 25 | stop | 10 | EXPIRY_STRATEGY_SUBMIT | 15 | EXPIRY_STRATEGY_SUBMIT | POSITION | 0.5 | + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_PENDING | stop-1 | + | party1 | ETH/DEC19 | STATUS_PENDING | stop-2 | + + Then clear all events + When time is updated to "2019-11-30T00:00:20Z" + + Then the stop orders should have the following states + | party | market id | status | reference | + | party1 | ETH/DEC19 | STATUS_STOPPED | stop-1 | + | party1 | ETH/DEC19 | STATUS_EXPIRED | stop-2 | + + # Now we check that the order size was 3 as the position was 5 and the were scaling by 0.5 (5*0.5)==3, we round up + And the following trades should be executed: + | buyer | price | size | seller | + | party1 | 50 | 3 | party3 | + + + Scenario: If a stop order is placed with a position_fraction equal to 0 the order should be rejected. (0014-ORDT-139) + + # setup accounts + Given time is updated to "2019-11-30T00:00:00Z" + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | BTC | 10000000 | + | party2 | BTC | 10000000 | + | party3 | BTC | 10000000 | + | aux | BTC | 10000000 | + | aux2 | BTC | 10000000 | + | aux3 | BTC | 100000 | + | lpprov | BTC | 90000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 100 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 100 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 100 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/DEC19 | sell | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 5 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 5 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + + # volume for the stop trade + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | sell | 10 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | buy | 10 | 51 | 0 | TYPE_LIMIT | TIF_GTC | + + When time is updated to "2019-11-30T00:00:10Z" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | only | ra price trigger | reference | ra expires in | ra expiry strategy | ra size override setting | ra size override percentage | error | + | party1 | ETH/DEC19 | buy | 10 | 0 | 0 | TYPE_MARKET | TIF_IOC | reduce | 75 | stop | 10 | EXPIRY_STRATEGY_SUBMIT | POSITION | 0.0 | stop order size override percentage value is invalid | + + diff --git a/core/integration/features/perpetual-mark-and-index-price.feature b/core/integration/features/perpetual-mark-and-index-price.feature new file mode 100644 index 0000000000..d9dcbcda56 --- /dev/null +++ b/core/integration/features/perpetual-mark-and-index-price.feature @@ -0,0 +1,172 @@ +Feature: Simple tests for perpetual market mark price. + + Background: + Given the following assets are registered: + | id | decimal places | + | ETH | 5 | + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 1.0 | 0.5 | 1 | 1.0 | + And the liquidity monitoring parameters: + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.01 | 10s | 5 | + + And the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 1s | + | network.internalCompositePriceUpdateFrequency | 1s | + | market.auction.minimumDuration | 1 | + | market.fee.factors.infrastructureFee | 0.001 | + | market.fee.factors.makerFee | 0.004 | + | market.value.windowLength | 60s | + | market.liquidity.bondPenaltyParameter | 0.1 | + | validators.epoch.length | 5s | + | limits.markets.maxPeggedOrders | 2 | + | market.liquidity.providersFeeCalculationTimeStep | 5s | + + And the average block duration is "1" + + # All parties have 1,000,000.000,000,000,000,000,000 + # Add as many parties as needed here + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lpprov | ETH | 10000000000000000000000000 | + | trader1 | ETH | 10000000000000000000000000 | + | trader2 | ETH | 10000000000000000000000000 | + + Scenario: 0053-PERP-033 + When the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | price type | cash amount | source weights | source staleness tolerance | + | perp-oracle | ETH | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0 | 0 | 0 | 0 | ETH | 5 | weight | 1000 | 0,1,0,0 | 0s,100s,0s,0s | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | decimal places | position decimal places | market type | sla params | price type | + | ETH/DEC19 | ETH | ETH | lqm-params | default-st-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.1 | 0 | 5 | 5 | perp | SLA | last trade | + Given the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 3905000000000000 | 0.3 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | reference | + | lpprov | ETH/DEC19 | 4000000000000000 | 3905000000000000 | buy | BID | 4000000000000000 | 1 | lp-ice-buy | + | lpprov | ETH/DEC19 | 4000000000000000 | 3905000000000000 | sell | ASK | 4000000000000000 | 1 | lp-ice-sell | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader1 | ETH/DEC19 | buy | 5 | 1001 | 0 | TYPE_LIMIT | TIF_GTC | t1-b-1 | + | trader1 | ETH/DEC19 | buy | 5 | 900 | 0 | TYPE_LIMIT | TIF_GTC | t1-b-2 | + | trader1 | ETH/DEC19 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | t1-b-3 | + | trader2 | ETH/DEC19 | sell | 5 | 1200 | 0 | TYPE_LIMIT | TIF_GTC | t2-s-1 | + | trader2 | ETH/DEC19 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | t2-s-2 | + | trader2 | ETH/DEC19 | sell | 5 | 951 | 0 | TYPE_LIMIT | TIF_GTC | t2-s-3 | + When the opening auction period ends for market "ETH/DEC19" + Then the market data for the market "ETH/DEC19" should be: + | mark price | trading mode | + | 976 | TRADING_MODE_CONTINUOUS | + + And the network moves ahead "2" blocks + + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 140 | -1s | + + Then the product data for the market "ETH/DEC19" should be: + | internal twap | external twap | + | 1050 | 140 | + + Scenario: 0053-PERP-034 + When the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | price type | cash amount | source weights | source staleness tolerance | + | perp-oracle | ETH | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0 | 0 | 0 | 0 | ETH | 5 | weight | 1000 | 0,1,0,0 | 0s,100s,0s,0s | + And the composite price oracles from "0xCAFECAFE2": + | name | price property | price type | price decimals | + | oracle1 | prices.ETH.value | TYPE_INTEGER | 5 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | decimal places | position decimal places | market type | sla params | price type | source weights | source staleness tolerance | oracle1 | + | ETH/DEC19 | ETH | ETH | lqm-params | default-st-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.1 | 0 | 5 | 5 | perp | SLA | weight | 0,0,1,0 | 0s,0s,24h0m0s,0s | oracle1 | + Given the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 3905000000000000 | 0.3 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | reference | + | lpprov | ETH/DEC19 | 4000000000000000 | 3905000000000000 | buy | BID | 4000000000000000 | 1 | lp-ice-buy | + | lpprov | ETH/DEC19 | 4000000000000000 | 3905000000000000 | sell | ASK | 4000000000000000 | 1 | lp-ice-sell | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader1 | ETH/DEC19 | buy | 5 | 1001 | 0 | TYPE_LIMIT | TIF_GTC | t1-b-1 | + | trader1 | ETH/DEC19 | buy | 5 | 900 | 0 | TYPE_LIMIT | TIF_GTC | t1-b-2 | + | trader1 | ETH/DEC19 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | t1-b-3 | + | trader2 | ETH/DEC19 | sell | 5 | 1200 | 0 | TYPE_LIMIT | TIF_GTC | t2-s-1 | + | trader2 | ETH/DEC19 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | t2-s-2 | + | trader2 | ETH/DEC19 | sell | 5 | 951 | 0 | TYPE_LIMIT | TIF_GTC | t2-s-3 | + When the opening auction period ends for market "ETH/DEC19" + Then the market data for the market "ETH/DEC19" should be: + | mark price | trading mode | + | 976 | TRADING_MODE_CONTINUOUS | + + And the network moves ahead "2" blocks + + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 140 | -1s | + + And the oracles broadcast data with block time signed with "0xCAFECAFE2": + | name | value | time offset | + | prices.ETH.value | 500 | -1s | + + And the network moves ahead "15" blocks + + Then the market data for the market "ETH/DEC19" should be: + | mark price | trading mode | + | 500 | TRADING_MODE_CONTINUOUS | + + And the product data for the market "ETH/DEC19" should be: + | internal twap | external twap | + | 1050 | 140 | + + Scenario: 0053-PERP-035 + When the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | price type | cash amount | source weights | source staleness tolerance | + | perp-oracle | ETH | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0 | 0 | 0 | 0 | ETH | 5 | weight | 0 | 1,1,0,0 | 30s,100s,0s,0s | + And the composite price oracles from "0xCAFECAFE2": + | name | price property | price type | price decimals | + | oracle1 | prices.ETH.value | TYPE_INTEGER | 5 | + And the markets: + | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | decimal places | position decimal places | market type | sla params | price type | source weights | source staleness tolerance | oracle1 | + | ETH/DEC19 | ETH | ETH | lqm-params | default-st-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.1 | 0 | 5 | 5 | perp | SLA | weight | 0,0,1,0 | 0s,0s,24h0m0s,0s | oracle1 | + Given the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 3905000000000000 | 0.3 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | reference | + | lpprov | ETH/DEC19 | 4000000000000000 | 3905000000000000 | buy | BID | 4000000000000000 | 1 | lp-ice-buy | + | lpprov | ETH/DEC19 | 4000000000000000 | 3905000000000000 | sell | ASK | 4000000000000000 | 1 | lp-ice-sell | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader1 | ETH/DEC19 | buy | 5 | 1001 | 0 | TYPE_LIMIT | TIF_GTC | t1-b-1 | + | trader1 | ETH/DEC19 | buy | 5 | 900 | 0 | TYPE_LIMIT | TIF_GTC | t1-b-2 | + | trader1 | ETH/DEC19 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | t1-b-3 | + | trader2 | ETH/DEC19 | sell | 5 | 1200 | 0 | TYPE_LIMIT | TIF_GTC | t2-s-1 | + | trader2 | ETH/DEC19 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | t2-s-2 | + | trader2 | ETH/DEC19 | sell | 5 | 951 | 0 | TYPE_LIMIT | TIF_GTC | t2-s-3 | + When the opening auction period ends for market "ETH/DEC19" + Then the market data for the market "ETH/DEC19" should be: + | mark price | trading mode | + | 976 | TRADING_MODE_CONTINUOUS | + + And the network moves ahead "2" blocks + + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 140 | -1s | + + And the oracles broadcast data with block time signed with "0xCAFECAFE2": + | name | value | time offset | + | prices.ETH.value | 500 | -1s | + + And the network moves ahead "15" blocks + + Then the market data for the market "ETH/DEC19" should be: + | mark price | trading mode | + | 500 | TRADING_MODE_CONTINUOUS | + + And the product data for the market "ETH/DEC19" should be: + | internal twap | external twap | + | 1013 | 140 | diff --git a/core/integration/features/position_tracking/verified-positions-resolution-5-lognormal.feature b/core/integration/features/position_tracking/verified-positions-resolution-5-lognormal.feature index e863a064c1..daf367d81d 100644 --- a/core/integration/features/position_tracking/verified-positions-resolution-5-lognormal.feature +++ b/core/integration/features/position_tracking/verified-positions-resolution-5-lognormal.feature @@ -25,7 +25,7 @@ Feature: Position resolution case 5 lognormal risk model | limits.markets.maxPeggedOrders | 2 | @MTMDelta - Scenario: using lognormal risk model, set "designatedLoser " closeout while the position of "designatedLoser " is not fully covered by orders on the order book (0007-POSN-013, 0038-OLIQ-011) + Scenario: using lognormal risk model, set "designatedLoser " closeout while the position of "designatedLoser " is not fully covered by orders on the order book (0007-POSN-013) # setup accounts Given the parties deposit on asset's general account the following amount: @@ -84,20 +84,16 @@ Feature: Position resolution case 5 lognormal risk model | side | price | volume | | sell | 2100 | 36 | | sell | 2000 | 10 | - | buy | 40 | 225 | - | buy | 1 | 10 | + | buy | 40 | 0 | + | buy | 1 | 0 | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | designatedLoser | USD | ETH/DEC19 | 17631 | 0 | + | designatedLoser | USD | ETH/DEC19 | 0 | 0 | Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | - | designatedLoser | 290 | 0 | 0 | - - Then the parties cancel the following orders: - | party | reference | - | buySideProvider | buy-provider-1 | + | designatedLoser | 0 | 0 | -17631 | Then the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | @@ -107,10 +103,11 @@ Feature: Position resolution case 5 lognormal risk model | party | market id | side | volume | price | resulting trades | type | tif | reference | | sellSideProvider | ETH/DEC19 | sell | 1 | 140 | 0 | TYPE_LIMIT | TIF_GTC | ref-3 | | buySideProvider | ETH/DEC19 | buy | 1 | 140 | 1 | TYPE_LIMIT | TIF_GTC | ref-4 | + And the network moves ahead "1" blocks - And the mark price should be "140" for the market "ETH/DEC19" + Then the mark price should be "140" for the market "ETH/DEC19" - Then the parties should have the following account balances: + And the parties should have the following account balances: | party | asset | market id | margin | general | | designatedLoser | USD | ETH/DEC19 | 0 | 0 | @@ -118,6 +115,7 @@ Feature: Position resolution case 5 lognormal risk model | party | volume | unrealised pnl | realised pnl | | designatedLoser | 0 | 0 | -17631 | + #And debug transfers # then we make sure the insurance pool collected the funds (however they get later spent on MTM payment to closeout-facilitating party) Then the following transfers should happen: | from | to | from account | to account | market id | amount | asset | @@ -126,9 +124,9 @@ Feature: Position resolution case 5 lognormal risk model | buySideProvider | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC19 | 14 | USD | | designatedLoser | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | ETH/DEC19 | 0 | USD | | market | lpprov | ACCOUNT_TYPE_FEES_MAKER | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 0 | USD | - | designatedLoser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/DEC19 | 14702 | USD | - | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 14702 | USD | - | market | lpprov | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 14196 | USD | + | designatedLoser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/DEC19 | 17631 | USD | + | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 16710 | USD | + | market | lpprov | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 15979 | USD | | buySideProvider | buySideProvider | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 76 | USD | And the insurance pool balance should be "0" for the market "ETH/DEC19" diff --git a/core/integration/features/position_tracking/verified-positions-resolution-5-lognormal_pdp.feature b/core/integration/features/position_tracking/verified-positions-resolution-5-lognormal_pdp.feature index 87af4bd4bc..212a3383e5 100644 --- a/core/integration/features/position_tracking/verified-positions-resolution-5-lognormal_pdp.feature +++ b/core/integration/features/position_tracking/verified-positions-resolution-5-lognormal_pdp.feature @@ -24,8 +24,8 @@ Feature: Position resolution case 5 lognormal risk model | network.markPriceUpdateMaximumFrequency | 0s | | limits.markets.maxPeggedOrders | 2 | + @Liquidation @NoPerp Scenario: using lognormal risk model, set "designatedLoser " closeout while the position of "designatedLoser " is not fully covered by orders on the order book - # setup accounts Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -115,17 +115,19 @@ Feature: Position resolution case 5 lognormal risk model | party | volume | unrealised pnl | realised pnl | | designatedLoser | 0 | 0 | -27650 | + When the network moves ahead "1" blocks + #Then debug transfers # then we make sure the insurance pool collected the funds (however they get later spent on MTM payment to closeout-facilitating party) Then the following transfers should happen: | from | to | from account | to account | market id | amount | asset | - | designatedLoser | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_MAKER | ETH/DEC19 | 0 | USD | + | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_FEES_MAKER | ETH/DEC19 | 0 | USD | + | market | | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | ETH/DEC19 | 0 | USD | + | designatedLoser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/DEC19 | 24750 | USD | | buySideProvider | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_MAKER | ETH/DEC19 | 0 | USD | | buySideProvider | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC19 | 1 | USD | - | designatedLoser | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | ETH/DEC19 | 0 | USD | + | buySideProvider | buySideProvider | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 76 | USD | | market | lpprov | ACCOUNT_TYPE_FEES_MAKER | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 0 | USD | - | designatedLoser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/DEC19 | 24721 | USD | | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 24721 | USD | | market | lpprov | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 23869 | USD | - | buySideProvider | buySideProvider | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 76 | USD | And the insurance pool balance should be "0" for the market "ETH/DEC19" diff --git a/core/integration/features/referrals/0083-RFPR-benefit_factors.feature b/core/integration/features/referrals/0083-RFPR-benefit_factors.feature index 34adfcb6ef..5b9a65cb65 100644 --- a/core/integration/features/referrals/0083-RFPR-benefit_factors.feature +++ b/core/integration/features/referrals/0083-RFPR-benefit_factors.feature @@ -5,6 +5,15 @@ Feature: Setting and applying referee benefit factors # Initialise timings Given time is updated to "2023-01-01T00:00:00Z" And the average block duration is "1" + And the margin calculator named "margin-calculator-1": + | search factor | initial factor | release factor | + | 1.2 | 1.5 | 1.7 | + And the log normal risk model named "log-normal-risk-model": + | risk aversion | tau | mu | r | sigma | + | 0.000001 | 0.1 | 0 | 0 | 1.0 | + And the price monitoring named "price-monitoring": + | horizon | probability | auction extension | + | 3600 | 0.99 | 3 | # Initialise the markets and network parameters Given the following network parameters are set: @@ -37,39 +46,54 @@ Feature: Setting and applying referee benefit factors And the markets: | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | decimal places | position decimal places | | ETH/USD.1.1 | ETH | USD.1.1 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e-3 | 0 | default-futures | 1 | 1 | + | ETH/USD.1.2 | ETH | USD.1.1 | log-normal-risk-model | margin-calculator-1 | 1 | default-none | price-monitoring | default-eth-for-future | 1e-3 | 0 | default-futures | 1 | 1 | And the liquidity monitoring parameters: | name | triggering ratio | time window | scaling factor | | lqm-params | 1.0 | 3600s | 1 | When the markets are updated: | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | | ETH/USD.1.1 | lqm-params | 1e-3 | 0 | + | ETH/USD.1.2 | lqm-params | 1e-3 | 0 | # Initialise the parties Given the parties deposit on asset's general account the following amount: | party | asset | amount | | lpprov | USD.1.1 | 1000000000 | + | lpprov2 | USD.1.1 | 1000000000 | | aux1 | USD.1.1 | 1000000000 | | aux2 | USD.1.1 | 1000000000 | + | aux3 | USD.1.1 | 1000000000 | + | aux4 | USD.1.1 | 1000000000 | | referrer1 | USD.1.1 | 1000000000 | | referee1 | USD.1.1 | 1000000000 | | referee2 | USD.1.1 | 1000000000 | + | ptbuy | USD.1.1 | 1000000000 | + | ptsell | USD.1.1 | 1000000000 | # Exit the opening auction Given the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | lpprov | ETH/USD.1.1 | 1000000 | 0.01 | submission | + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/USD.1.1 | 1000000 | 0.01 | submission | + | lp2 | lpprov2 | ETH/USD.1.2 | 1000000 | 0.01 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/USD.1.1 | 5000 | 1000 | buy | BID | 10000 | 1 | - | lpprov | ETH/USD.1.1 | 5000 | 1000 | sell | ASK | 10000 | 1 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/USD.1.1 | 5000 | 1000 | buy | BID | 10000 | 1 | + | lpprov | ETH/USD.1.1 | 5000 | 1000 | sell | ASK | 10000 | 1 | + | lpprov2 | ETH/USD.1.2 | 5000 | 1000 | buy | BID | 10000 | 1 | + | lpprov2 | ETH/USD.1.2 | 5000 | 1000 | sell | ASK | 10000 | 1 | When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | aux1 | ETH/USD.1.1 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | | aux1 | ETH/USD.1.1 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | | aux2 | ETH/USD.1.1 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | | aux2 | ETH/USD.1.1 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/USD.1.2 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/USD.1.2 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux4 | ETH/USD.1.2 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux4 | ETH/USD.1.2 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | And the opening auction period ends for market "ETH/USD.1.1" - And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD.1.1" + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD.1.1" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD.1.2" # Create the referral set and codes Given the parties create the following referral codes: @@ -190,29 +214,27 @@ Feature: Setting and applying referee benefit factors | id | party | market id | commitment amount | fee | lp type | | lp1 | lpprov | ETH/USD.1.1 | 0 | 0.1 | cancellation | And the network moves ahead "1" epochs - And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/USD.1.1" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD.1.1" When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | aux1 | ETH/USD.1.1 | buy | 200 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | referee1 | ETH/USD.1.1 | sell | 200 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee1 | ETH/USD.1.1 | sell | 200 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + Then the following trades should be executed: + | buyer | price | size | seller | + | aux1 | 1000 | 200 | referee1 | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp2 | lpprov | ETH/USD.1.1 | 1000000 | 0.01 | submission | And the network moves ahead "1" epochs - Then the following trades should be executed: - | buyer | price | size | seller | - | aux1 | 1000 | 200 | referee1 | # fees are split between referee1 and aux1 # aux1 has no discounts or rewards so is paying 100, 100 # referee1 has a discount of 1 and pays a reward of 2 to the referrer And the following transfers should happen: | from | to | from account | to account | market id | amount | asset | - | referee1 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/USD.1.1 | 97 | USD.1.1 | - | referee1 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 97 | USD.1.1 | - | referee1 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD | | 2 | USD.1.1 | - | | referrer1 | ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD | ACCOUNT_TYPE_GENERAL | | 2 | USD.1.1 | - | aux1 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/USD.1.1 | 100 | USD.1.1 | - | aux1 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 100 | USD.1.1 | + | referee1 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/USD.1.1 | 0 | USD.1.1 | + | referee1 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 193 | USD.1.1 | + | referee1 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD | | 6 | USD.1.1 | + | | referrer1 | ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD | ACCOUNT_TYPE_GENERAL | | 6 | USD.1.1 | Scenario: Referrer incurs fees when exiting an auction (0029-FEES-024)(0029-FEES-026) @@ -220,34 +242,39 @@ Feature: Setting and applying referee benefit factors Given the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | aux1 | ETH/USD.1.1 | buy | 20 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | referee1 | ETH/USD.1.1 | sell | 20 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/USD.1.2 | buy | 20 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee1 | ETH/USD.1.2 | sell | 20 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | When the network moves ahead "2" epochs Then the referral set stats for code "referral-code-1" at epoch "2" should have a running volume of 2000: | party | reward factor | discount factor | | referee1 | 0.02 | 0.02 | + And the market data for the market "ETH/USD.1.2" should be: + | mark price | trading mode | target stake | supplied stake | open interest | horizon | min bound | max bound | + | 1000 | TRADING_MODE_CONTINUOUS | 7469 | 1000000 | 21 | 3600 | 973 | 1027 | - # Cancel the liquidity commitment triggering an auction - Given the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | lpprov | ETH/USD.1.1 | 0 | 0.01 | cancellation | - And the network moves ahead "1" epochs - And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/USD.1.1" + # Submit ourders out of price range to trigger auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | ptbuy | ETH/USD.1.2 | buy | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + | ptsell | ETH/USD.1.2 | sell | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + Then the market data for the market "ETH/USD.1.2" should be: + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 1000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 7935 | 1000000 | 21 | 3 | When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | aux1 | ETH/USD.1.1 | buy | 200 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | referrer1 | ETH/USD.1.1 | sell | 200 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp2 | lpprov | ETH/USD.1.1 | 1000000 | 0.01 | submission | + | aux3 | ETH/USD.1.2 | buy | 200 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referrer1 | ETH/USD.1.2 | sell | 200 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | And the network moves ahead "1" epochs - Then the following trades should be executed: + And the network moves ahead "3" blocks + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD.1.2" + And the following trades should be executed: | buyer | price | size | seller | - | aux1 | 1000 | 200 | referrer1 | + | aux3 | 1000 | 198 | referrer1 | + | aux3 | 1000 | 2 | ptsell | And the following transfers should happen: | from | to | from account | to account | market id | amount | asset | - | referrer1 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/USD.1.1 | 100 | USD.1.1 | - | referrer1 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 100 | USD.1.1 | + | referrer1 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/USD.1.2 | 99 | USD.1.1 | + | referrer1 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 99 | USD.1.1 | Scenario: Insufficent fees after discounts applied to pay a referral commision to the referrer (0029-FEES-029) diff --git a/core/integration/features/referrals/0083-RFPR-running_volume.feature b/core/integration/features/referrals/0083-RFPR-running_volume.feature index 4b518694be..60a11649dd 100644 --- a/core/integration/features/referrals/0083-RFPR-running_volume.feature +++ b/core/integration/features/referrals/0083-RFPR-running_volume.feature @@ -5,6 +5,15 @@ Feature: Calculating referral set running volumes # Initialise the network Given time is updated to "2023-01-01T00:00:00Z" And the average block duration is "1" + And the margin calculator named "margin-calculator-1": + | search factor | initial factor | release factor | + | 1.2 | 1.5 | 1.7 | + And the log normal risk model named "log-normal-risk-model": + | risk aversion | tau | mu | r | sigma | + | 0.000001 | 0.1 | 0 | 0 | 1.0 | + And the price monitoring named "price-monitoring": + | horizon | probability | auction extension | + | 3600 | 0.99 | 3 | And the following network parameters are set: | name | value | | market.fee.factors.infrastructureFee | 0.001 | @@ -37,6 +46,7 @@ Feature: Calculating referral set running volumes | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | decimal places | position decimal places | | ETH/USD-1-1 | ETH | USD-1-1 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e-3 | 0 | default-futures | 0 | 0 | | ETH/USD-2-10 | ETH | USD-2-10 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e-3 | 0 | default-futures | 1 | 1 | + | ETH/USD-1-2 | ETH | USD-1-1 | log-normal-risk-model | margin-calculator-1 | 1 | default-none | price-monitoring | default-eth-for-future | 1e-3 | 0 | default-futures | 0 | 0 | And the liquidity monitoring parameters: | name | triggering ratio | time window | scaling factor | | lqm-params | 1.0 | 3600s | 1 | @@ -44,6 +54,7 @@ Feature: Calculating referral set running volumes | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | | ETH/USD-1-1 | lqm-params | 1e-3 | 0 | | ETH/USD-2-10 | lqm-params | 1e-3 | 0 | + | ETH/USD-1-2 | lqm-params | 1e-3 | 0 | And the network moves ahead "1" blocks # Initialise the parties @@ -56,23 +67,31 @@ Feature: Calculating referral set running volumes | referee1 | USD-2-10 | 10000000 | | referee2 | USD-2-10 | 10000000 | | lpprov | USD-1-1 | 10000000000 | + | lpprov2 | USD-1-1 | 10000000000 | | aux1 | USD-1-1 | 10000000 | | aux2 | USD-1-1 | 10000000 | + | aux3 | USD-1-1 | 10000000 | + | aux4 | USD-1-1 | 10000000 | | referrer1 | USD-1-1 | 10000000 | | referee1 | USD-1-1 | 10000000 | | referee2 | USD-1-1 | 10000000 | + | ptbuy | USD-1-1 | 10000000 | + | ptsell | USD-1-1 | 10000000 | # Exit opening auctions Given the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | lpprov | ETH/USD-1-1 | 1000000 | 0.01 | submission | - | lp2 | lpprov | ETH/USD-2-10 | 10000000 | 0.01 | submission | + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/USD-1-1 | 1000000 | 0.01 | submission | + | lp2 | lpprov | ETH/USD-2-10 | 10000000 | 0.01 | submission | + | lp3 | lpprov2 | ETH/USD-1-2 | 10000000 | 0.01 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/USD-1-1 | 5000 | 1000 | buy | BID | 10000 | 1 | - | lpprov | ETH/USD-1-1 | 5000 | 1000 | sell | ASK | 10000 | 1 | - | lpprov | ETH/USD-2-10 | 50000 | 10000 | buy | BID | 100000 | 10 | - | lpprov | ETH/USD-2-10 | 50000 | 10000 | sell | ASK | 100000 | 10 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/USD-1-1 | 5000 | 1000 | buy | BID | 10000 | 1 | + | lpprov | ETH/USD-1-1 | 5000 | 1000 | sell | ASK | 10000 | 1 | + | lpprov | ETH/USD-2-10 | 50000 | 10000 | buy | BID | 100000 | 10 | + | lpprov | ETH/USD-2-10 | 50000 | 10000 | sell | ASK | 100000 | 10 | + | lpprov2 | ETH/USD-1-2 | 5000 | 1000 | buy | BID | 10000 | 1 | + | lpprov2 | ETH/USD-1-2 | 5000 | 1000 | sell | ASK | 10000 | 1 | When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | aux1 | ETH/USD-1-1 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | @@ -83,10 +102,15 @@ Feature: Calculating referral set running volumes | aux1 | ETH/USD-2-10 | buy | 1 | 10000 | 0 | TYPE_LIMIT | TIF_GTC | | aux2 | ETH/USD-2-10 | sell | 1 | 10000 | 0 | TYPE_LIMIT | TIF_GTC | | aux2 | ETH/USD-2-10 | sell | 1 | 11000 | 0 | TYPE_LIMIT | TIF_GTC | - And the opening auction period ends for market "ETH/USD-1-1" + | aux3 | ETH/USD-1-2 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/USD-1-2 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux4 | ETH/USD-1-2 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux4 | ETH/USD-1-2 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | + When the opening auction period ends for market "ETH/USD-1-1" And the opening auction period ends for market "ETH/USD-2-10" - And the network moves ahead "1" blocks + Then the network moves ahead "1" blocks And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-1-1" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-1-2" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-2-10" # Create the referral set and codes @@ -147,21 +171,26 @@ Feature: Calculating referral set running volumes # Expectation: the members taker volume is not increased, and thus we see no increase in the sets taker volume # Cancel the liquidity commitment triggering an auction - Given the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | lpprov | ETH/USD-1-1 | 0 | 0.001 | cancellation | - And the network moves ahead "1" epochs - And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/USD-1-1" + + Given the market data for the market "ETH/USD-1-2" should be: + | mark price | trading mode | target stake | supplied stake | open interest | horizon | min bound | max bound | + | 1000 | TRADING_MODE_CONTINUOUS | 35569 | 10000000 | 1 | 3600 | 973 | 1027 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | ptbuy | ETH/USD-1-2 | buy | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + | ptsell | ETH/USD-1-2 | sell | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + Then the market data for the market "ETH/USD-1-2" should be: + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 1000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 103505 | 10000000 | 1 | 3 | + And the network moves ahead "1" blocks + And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/USD-1-2" When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | aux1 | ETH/USD-1-1 | | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | | ETH/USD-1-1 | | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp2 | lpprov | ETH/USD-1-1 | 1000000 | 0.001 | submission | + | aux3 | ETH/USD-1-2 | | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | | ETH/USD-1-2 | | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | And the network moves ahead "1" epochs - Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-1-1" + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-1-2" And the referral set stats for code "referral-code-1" at epoch "1" should have a running volume of 0: | party | reward factor | discount factor | | referee1 | 0 | 0 | diff --git a/core/integration/features/release-margins-issues-decimals.feature b/core/integration/features/release-margins-issues-decimals.feature index 13f28914ff..b8ddd89a3d 100644 --- a/core/integration/features/release-margins-issues-decimals.feature +++ b/core/integration/features/release-margins-issues-decimals.feature @@ -199,7 +199,7 @@ Feature: Test margin release on order cancel | party | asset | market id | margin | general | | partyGuy | ETH | ETH/DEC19 | 60000 | 60000 | - @MarginRelease + @MarginRelease @NoPerp Scenario: a party place a new order in the system, party is closing position via closeout of other parties Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -260,20 +260,18 @@ Feature: Test margin release on order cancel When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | party2 | ETH/DEC19 | buy | 1 | 9999 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | + And the network moves ahead "1" blocks - And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" # now the margins should be back to 0, but it's actually # not being released when the party is used in the distressed flow - Then the parties should have the following account balances: + And the parties should have the following account balances: | party | asset | market id | margin | general | | partyGuy | ETH | ETH/DEC19 | 0 | 0 | | partyGuyGood | ETH | ETH/DEC19 | 0 | 1008999000 | - # TODO: FIX THIS - # partyGuyGood should have a margin of 0 here. - # Position is actuall 0, and the party have no potential position - # so we just have collateral stuck in the margin account - Then the parties should have the following profit and loss: + # TODO: FIX THIS -> PnL bug when dealing with decimal places... + And the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | | partyGuyGood | 0 | 0 | 8999000 | diff --git a/core/integration/features/release-margins-issues.feature b/core/integration/features/release-margins-issues.feature index ad8576002a..9b6f5e5878 100644 --- a/core/integration/features/release-margins-issues.feature +++ b/core/integration/features/release-margins-issues.feature @@ -193,7 +193,7 @@ Feature: Test margin release on order cancel | party | asset | market id | margin | general | | partyGuy | ETH | ETH/DEC19 | 60 | 60 | - @MarginRelease + @MarginRelease @NoPerp Scenario: a party place a new order in the system, party is closing position via closeout of other parties Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -255,6 +255,7 @@ Feature: Test margin release on order cancel When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | party2 | ETH/DEC19 | buy | 1 | 9999 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | + And the network moves ahead "1" blocks And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" diff --git a/core/integration/features/rewards/0056-REWA-105.feature b/core/integration/features/rewards/0056-REWA-105.feature new file mode 100644 index 0000000000..027553debd --- /dev/null +++ b/core/integration/features/rewards/0056-REWA-105.feature @@ -0,0 +1,110 @@ +Feature: Team Rewards 0056-REWA-105 If the entity scope is `ENTITY_SCOPE_TEAMS`, then rewards should be allocated to teams according to each teams reward metric value + + Background: + + # Initialise the network + Given time is updated to "2023-01-01T00:00:00Z" + And the average block duration is "1" + And the following network parameters are set: + | name | value | + | market.fee.factors.makerFee | 0.001 | + | network.markPriceUpdateMaximumFrequency | 0s | + | market.auction.minimumDuration | 1 | + | validators.epoch.length | 60s | + | limits.markets.maxPeggedOrders | 4 | + | referralProgram.minStakedVegaTokens | 0 | + + # Initialise the markets + And the following assets are registered: + | id | decimal places | quantum | + | USD-1-10 | 1 | 10 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | decimal places | position decimal places | + | ETH/USD-1-10 | ETH | USD-1-10 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e-3 | 0 | default-futures | 0 | 0 | + + # Initialise the parties + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lpprov | USD-1-10 | 10000000000 | + | aux1 | USD-1-10 | 10000000 | + | aux2 | USD-1-10 | 10000000 | + | aux3 | USD-1-10 | 10000000000 | + | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | USD-1-10 | 10000000000 | + + # Exit opening auctions + Given the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/USD-1-10 | 1000000 | 0.01 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/USD-1-10 | 5000 | 1000 | buy | BID | 10000 | 1 | + | lpprov | ETH/USD-1-10 | 5000 | 1000 | sell | ASK | 10000 | 1 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/USD-1-10 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/USD-1-10 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/USD-1-10" + When the network moves ahead "1" blocks + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-1-10" + + # Create the teams + Given the following teams with referees are created: + | referrer | prefix | code | team name | referees | balance | asset | + | referrer1 | ref1 | referral-code-1 | team1 | 2 | 10000000 | USD-1-10 | + | referrer2 | ref2 | referral-code-2 | team2 | 2 | 10000000 | USD-1-10 | + + @TeamStep + Scenario: 001 check if entity_scope is individual and in a team + #we first check the reward if scope is indivisual + Given the parties submit the following recurring transfers: + | id | from | from_account_type | to | to_account_type | entity_scope | individual_scope | ntop | asset | amount | start_epoch | end_epoch | factor | metric | metric_asset | markets | + | 1 | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | 0000000000000000000000000000000000000000000000000000000000000000 | ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES | INDIVIDUALS | IN_A_TEAM | 1 | USD-1-10 | 10000 | 1 | | 1 | DISPATCH_METRIC_MAKER_FEES_PAID | USD-1-10 | ETH/USD-1-10 | + # ntop is set to 1, and only 1 team receives the rewards, so no numbers to crunch here + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref1-0001 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/USD-1-10 | sell | 20 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref1-0002 | ETH/USD-1-10 | buy | 20 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 21 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref2-0001 | ETH/USD-1-10 | buy | 21 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 5 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref2-0002 | ETH/USD-1-10 | buy | 5 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" epochs + Then parties should have the following vesting account balances: + | party | asset | balance | + | ref1-0001 | USD-1-10 | 1785 | + | ref1-0002 | USD-1-10 | 3571 | + | ref2-0001 | USD-1-10 | 3750 | + | ref2-0002 | USD-1-10 | 892 | + | aux1 | USD-1-10 | 0 | + | aux3 | USD-1-10 | 0 | + + Scenario: 002 check if entity_scope is team + + Given the parties submit the following recurring transfers: + | id | from | from_account_type | to | to_account_type | entity_scope | teams | ntop | asset | amount | start_epoch | end_epoch | factor | metric | metric_asset | markets | + | 1 | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | 0000000000000000000000000000000000000000000000000000000000000000 | ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES | TEAMS | team1,team2 | 1 | USD-1-10 | 10000 | 1 | | 1 | DISPATCH_METRIC_MAKER_FEES_PAID | USD-1-10 | ETH/USD-1-10 | + # ntop is set to 1, and only 1 team receives the rewards, so no numbers to crunch here + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref1-0001 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/USD-1-10 | sell | 20 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref1-0002 | ETH/USD-1-10 | buy | 20 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 21 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref2-0001 | ETH/USD-1-10 | buy | 21 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 5 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref2-0002 | ETH/USD-1-10 | buy | 5 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" epochs + Then parties should have the following vesting account balances: + | party | asset | balance | + | ref1-0001 | USD-1-10 | 2678 | + | ref1-0002 | USD-1-10 | 2678 | + | ref2-0001 | USD-1-10 | 2321 | + | ref2-0002 | USD-1-10 | 2321 | + | aux1 | USD-1-10 | 0 | + | aux3 | USD-1-10 | 0 | + diff --git a/core/integration/features/rewards/0056-REWA-108.feature b/core/integration/features/rewards/0056-REWA-108.feature new file mode 100644 index 0000000000..7f50ec1cd8 --- /dev/null +++ b/core/integration/features/rewards/0056-REWA-108.feature @@ -0,0 +1,89 @@ +Feature: Team Rewards + + Background: + + # Initialise the network + Given time is updated to "2023-01-01T00:00:00Z" + And the average block duration is "1" + And the following network parameters are set: + | name | value | + | market.fee.factors.makerFee | 0.001 | + | network.markPriceUpdateMaximumFrequency | 0s | + | market.auction.minimumDuration | 1 | + | validators.epoch.length | 60s | + | limits.markets.maxPeggedOrders | 4 | + | referralProgram.minStakedVegaTokens | 0 | + + # Initialise the markets + And the following assets are registered: + | id | decimal places | quantum | + | USD-1-10 | 1 | 10 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | decimal places | position decimal places | + | ETH/USD-1-10 | ETH | USD-1-10 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e-3 | 0 | default-futures | 0 | 0 | + + # Initialise the parties + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lpprov | USD-1-10 | 10000000000 | + | aux1 | USD-1-10 | 10000000 | + | aux2 | USD-1-10 | 10000000 | + | aux3 | USD-1-10 | 10000000000 | + | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | USD-1-10 | 10000000000 | + + # Exit opening auctions + Given the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/USD-1-10 | 1000000 | 0.01 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/USD-1-10 | 5000 | 1000 | buy | BID | 10000 | 1 | + | lpprov | ETH/USD-1-10 | 5000 | 1000 | sell | ASK | 10000 | 1 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/USD-1-10 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/USD-1-10 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/USD-1-10" + When the network moves ahead "1" blocks + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-1-10" + + # Create the teams + Given the following teams with referees are created: + | referrer | prefix | code | team name | referees | balance | asset | + | referrer1 | ref1 | referral-code-1 | team1 | 2 | 10000000 | USD-1-10 | + | referrer2 | ref2 | referral-code-2 | team2 | 2 | 10000000 | USD-1-10 | + | referrer3 | ref3 | referral-code-3 | team3 | 2 | 10000000 | USD-1-10 | + + @TeamStep + Scenario: 001 0056-REWA-108 If a team member has a zero reward metric, they should receive no share of the rewards allocated to the team + + Given the parties submit the following recurring transfers: + | id | from | from_account_type | to | to_account_type | entity_scope | teams | ntop | asset | amount | start_epoch | end_epoch | factor | metric | metric_asset | markets | + | 1 | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | 0000000000000000000000000000000000000000000000000000000000000000 | ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES | TEAMS | team1,team2,team3 | 1 | USD-1-10 | 10000 | 1 | | 1 | DISPATCH_METRIC_MAKER_FEES_PAID | USD-1-10 | ETH/USD-1-10 | + # ntop is set to 1, and only 1 team receives the rewards, so no numbers to crunch here + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref1-0001 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref1-0002 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 21 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref2-0001 | ETH/USD-1-10 | buy | 21 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 5 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref2-0002 | ETH/USD-1-10 | buy | 5 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref3-0001 | ETH/USD-1-10 | buy | 10 | 900 | 0 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 12 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref3-0002 | ETH/USD-1-10 | buy | 12 | 1000 | 2 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" epochs + Then parties should have the following vesting account balances: + | party | asset | balance | + | ref1-0001 | USD-1-10 | 1724 | + | ref1-0002 | USD-1-10 | 1724 | + | ref3-0001 | USD-1-10 | 0 | + | ref3-0002 | USD-1-10 | 2068 | + | ref2-0001 | USD-1-10 | 2241 | + | ref2-0002 | USD-1-10 | 2241 | + diff --git a/core/integration/features/rewards/average_position_with_liquidation_reward.feature b/core/integration/features/rewards/average_position_with_liquidation_reward.feature index f74a50968b..c8339ba09d 100644 --- a/core/integration/features/rewards/average_position_with_liquidation_reward.feature +++ b/core/integration/features/rewards/average_position_with_liquidation_reward.feature @@ -33,7 +33,6 @@ Feature: Calculation of average position during closeout trades | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | USD-1-10 | 10000000000 | | party1 | USD-1-10 | 1000 | - # Exit opening auctions Given the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -52,6 +51,7 @@ Feature: Calculation of average position during closeout trades When the network moves ahead "1" blocks And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-1-10" + @Liquidation @NoPerp Scenario: Bug time-weighted average position not updated correctly during closeout trades # Setup such that distributed rewards are all vested the following epoch, i,e. the balance in the vested account is equal to the rewards distributed that epocha @@ -80,11 +80,11 @@ Feature: Calculation of average position during closeout trades | party | market id | side | volume | price | resulting trades | type | tif | | aux2 | ETH/USD-1-10 | buy | 1 | 1099 | 0 | TYPE_LIMIT | TIF_GTC | | aux1 | ETH/USD-1-10 | sell | 1 | 1099 | 1 | TYPE_LIMIT | TIF_GTC | - When the network moves ahead "1" blocks + When the network moves ahead "2" blocks # Trades should result in all parties having no open position Then the following trades should be executed: | buyer | price | size | seller | aggressor side | - | party1 | 1100 | 1 | network | sell | + | party1 | 1099 | 1 | network | sell | | network | 1100 | 1 | aux2 | buy | And the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | @@ -101,9 +101,9 @@ Feature: Calculation of average position during closeout trades # At the beginning of the epoch the party had some position so they still get some reward at this epoch Then parties should have the following vesting account balances: | party | asset | balance | - | party1 | USD-1-10 | 5000 | - | aux1 | USD-1-10 | 5000 | - | aux2 | USD-1-10 | 0 | + | party1 | USD-1-10 | 4000 | + | aux1 | USD-1-10 | 4000 | + | aux2 | USD-1-10 | 2000 | Given the network moves ahead "1" epochs # Expect to see no rewards as no positions open at the start of the epoch @@ -111,5 +111,6 @@ Feature: Calculation of average position during closeout trades | party | asset | balance | | party1 | USD-1-10 | 0 | | aux2 | USD-1-10 | 0 | + | aux1 | USD-1-10 | 0 | diff --git a/core/integration/features/settlement/0002-STTL-settlement_at_expiry_with_dp.feature b/core/integration/features/settlement/0002-STTL-settlement_at_expiry_with_dp.feature index 4816fcbf07..531964e1e6 100644 --- a/core/integration/features/settlement/0002-STTL-settlement_at_expiry_with_dp.feature +++ b/core/integration/features/settlement/0002-STTL-settlement_at_expiry_with_dp.feature @@ -244,6 +244,7 @@ Feature: Test settlement at expiry with decimal places for asset and market (dif And the global insurance pool balance should be "2000000000" for the asset "ETH" And the insurance pool balance should be "0" for the market "ETH/DEC21" + Scenario: Same as above, but the other market already terminated before the end of scenario, expecting 0 balances in per market insurance pools - all should go to per asset insurance pool (0002-STTL-additional-tests, 0005-COLL-002, 0015-INSR-002, 0032-PRIM-018) Given the initial insurance pool balance is "1000000000" for all the markets @@ -335,8 +336,8 @@ Feature: Test settlement at expiry with decimal places for asset and market (dif Then the market state should be "STATE_SETTLED" for the market "ETH/DEC21" And the network moves ahead "6" blocks And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the insurance pool balance should be "1500000000" for the market "ETH/DEC19" - And the global insurance pool balance should be "500000000" for the asset "ETH" + And the insurance pool balance should be "1000000000" for the market "ETH/DEC19" + And the global insurance pool balance should be "1000000000" for the asset "ETH" Then the market state should be "STATE_ACTIVE" for the market "ETH/DEC19" @@ -466,9 +467,9 @@ Feature: Test settlement at expiry with decimal places for asset and market (dif When the network moves ahead "2" blocks And the cumulated balance for all accounts should be worth "10021300000000" And the insurance pool balance should be "0" for the market "ETH/DEC19" - # 916 were taken from the insurance pool to cover the losses of party 2, the remaining is split between global and the other market - And the global insurance pool balance should be "4200000" for the asset "ETH" - And the insurance pool balance should be "104200000" for the market "ETH/DEC21" + # 916 were taken from the insurance pool to cover the losses of party 2, the remaining is moved to the global insurance account + And the global insurance pool balance should be "8400000" for the asset "ETH" + And the insurance pool balance should be "100000000" for the market "ETH/DEC21" @SLABug Scenario: Settlement happened when market is being closed - loss socialisation in action - insurance doesn't cover all losses (0002-STTL-009) @@ -649,8 +650,8 @@ Feature: Test settlement at expiry with decimal places for asset and market (dif And the cumulated balance for all accounts should be worth "10201200000000" And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the global insurance pool balance should be "25000000" for the asset "ETH" - And the insurance pool balance should be "75000000" for the market "ETH/DEC19" + And the global insurance pool balance should be "50000000" for the asset "ETH" + And the insurance pool balance should be "50000000" for the market "ETH/DEC19" diff --git a/core/integration/features/settlement/0019-MCAL_053.feature b/core/integration/features/settlement/0019-MCAL_053.feature new file mode 100644 index 0000000000..c99eb0611c --- /dev/null +++ b/core/integration/features/settlement/0019-MCAL_053.feature @@ -0,0 +1,207 @@ +Feature: Test funding margin for Perps market under isolated margin mode + + Background: + + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.9 | ETH | 18 | + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 1.0 | 0.5 | 1 | 1.0 | + + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | market type | sla params | + | ETH/DEC19 | ETH | USD | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | -3 | perp | default-futures | + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | limits.markets.maxPeggedOrders | 2 | + + @Perpetual + Scenario: (0019-MCAL-053) check funding margin for Perps market when clumps are 0.1 and 0.9 in isolated margin mode + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 5s | + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | USD | 10000000 | + | party2 | USD | 10000000 | + | party3 | USD | 10000000 | + | aux | USD | 100000000 | + | aux2 | USD | 100000000 | + | lpprov | USD | 100000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 10000000 | 0.001 | submission | + | lp1 | lpprov | ETH/DEC19 | 10000000 | 0.001 | submission | + | lp2 | party1 | ETH/DEC19 | 1000 | 0.001 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 1 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 1 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 49 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 5001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + + # back sure we end the block so we're in a new one after opening auction + When the network moves ahead "1" blocks + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 1 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/DEC19 | 120000 | 9879000 | + | party2 | USD | ETH/DEC19 | 132000 | 9867000 | + + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/DEC19 | sell | 2 | 2000 | 0 | TYPE_LIMIT | TIF_GTC | party1-sell-0 | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/DEC19 | 660000 | 9339000 | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | buy | 1 | 2000 | 1 | TYPE_LIMIT | TIF_GTC | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/DEC19 | 660000 | 9339000 | + | party2 | USD | ETH/DEC19 | 132000 | 9867000 | + | party3 | USD | ETH/DEC19 | 132000 | 9866000 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.3 | | + | party2 | ETH/DEC19 | isolated margin | 0.45 | | + | party3 | ETH/DEC19 | isolated margin | 0.4 | | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | error | reference | + | party1 | ETH/DEC19 | sell | 1 | 3000 | 0 | TYPE_LIMIT | TIF_GTC | | party1-sell | + And the network moves ahead "2" blocks + Then the parties should have the following margin levels: + | party | market id | maintenance | initial | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 700000 | 840000 | isolated margin | 0.3 | 1500000 | + | party2 | ETH/DEC19 | 360000 | 432000 | isolated margin | 0.45 | 0 | + | party3 | ETH/DEC19 | 360000 | 432000 | isolated margin | 0.4 | 0 | + + When the network moves ahead "1" blocks + + #order margin: 2000*1*0.3+3000*1*0.3=1500 + #position margin: 1000*1*0.3+2000*1*0.3=900 + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | bond | + | party1 | USD | ETH/DEC19 | 900000 | 7599000 | 1500000 | 1000 | + | party2 | USD | ETH/DEC19 | 450000 | 9549000 | | | + | party3 | USD | ETH/DEC19 | 800000 | 9198000 | | | + And the mark price should be "1000" for the market "ETH/DEC19" + + # send in external data to the perpetual market, it should not change anything and a MTM should not happen + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 1600000000000000000000 | 0s | + | perp.funding.cue | 1612998252 | 0s | + + And the orders should have the following status: + | party | reference | status | + | party1 | party1-sell | STATUS_ACTIVE | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/DEC19 | 900000 | 7599000 | 1500000 | + | party2 | USD | ETH/DEC19 | 450000 | 9549000 | | + | party3 | USD | ETH/DEC19 | 800000 | 9198000 | | + + # move to the block before we should MTM and check for no changes + When the network moves ahead "3" blocks + And the mark price should be "2000" for the market "ETH/DEC19" + And the orders should have the following status: + | party | reference | status | + | party1 | party1-sell-0 | STATUS_FILLED | + | party1 | party1-sell | STATUS_ACTIVE | + + #MTM: (2000-1500)*2*0.3=300 (1500 is entry price for party1's position) + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/DEC19 | 600000 | 7599000 | 900000 | + | party2 | USD | ETH/DEC19 | 1400500 | 9549000 | | + | party3 | USD | ETH/DEC19 | 800000 | 9198000 | | + # Now take us past the MTM frequency time + #after MTM, party1's margin account is lower than maintenance level, so position is closeout, however, one of the order is used in closed out, so party1 still has position 1 + When the network moves ahead "1" blocks + + Then the parties should have the following margin levels: + | party | market id | maintenance | initial | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 201000 | 241200 | isolated margin | 0.3 | 900000 | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/DEC19 | 600000 | 7599000 | 900000 | + | party2 | USD | ETH/DEC19 | 1400500 | 9549000 | | + | party3 | USD | ETH/DEC19 | 800000 | 9198000 | | + + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 900000 | USD | + | aux | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 540000 | USD | + | market | aux2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 950500 | USD | + | market | party2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 950500 | USD | + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | party1 | 0 | 0 | -901000 | + When the network moves ahead "1" blocks + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | sell | 1 | 2001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2001 | 1 | TYPE_LIMIT | TIF_GTC | + And the mark price should be "2000" for the market "ETH/DEC19" + + #1 year has 8760 hours,so 0.002 year would be: 8760*0.002*3600 = 63072second, so next funding time (with delta_t = 0.002) would be 1612998252+63072=1613061324 + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.funding.cue | 1613061324 | 0s | + + #funding payment = f_twap - s_twap + clamp_lower_bound*s_twap =2000-1600+(0.1*1600)=560 + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | aux2 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 1120000 | USD | + | party2 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 560000 | USD | + | party3 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 560000 | USD | + | market | aux | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 1120000 | USD | + | market | party1 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 560000 | USD | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/DEC19 | 1160000 | 7599000 | 900000 | + | party2 | USD | ETH/DEC19 | 840500 | 9549000 | | + | party3 | USD | ETH/DEC19 | 0 | 9198000 | | + + #move to the block before the next MTM should be no changes + When the network moves ahead "3" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/DEC19 | 1159000 | 7599000 | 900000 | + | party2 | USD | ETH/DEC19 | 840624 | 9549000 | | + | party3 | USD | ETH/DEC19 | 0 | 9198000 | | + + ## Now take us past the MTM frequency time and things should change + When the network moves ahead "5" blocks + And the mark price should be "2001" for the market "ETH/DEC19" + + diff --git a/core/integration/features/settlement/0019-MCAL_055.feature b/core/integration/features/settlement/0019-MCAL_055.feature new file mode 100644 index 0000000000..bde4ff23b2 --- /dev/null +++ b/core/integration/features/settlement/0019-MCAL_055.feature @@ -0,0 +1,199 @@ +Feature: Test funding margin for Perps market in isolated margin mode + + Background: + + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | -0.05 | 0.9 | ETH | 18 | + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 1.0 | 0.5 | 1 | 1.0 | + + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | market type | sla params | + | ETH/DEC19 | ETH | USD | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | -3 | perp | default-futures | + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | limits.markets.maxPeggedOrders | 2 | + + @Perpetual + Scenario: (0019-MCAL-055,0019-MCAL-056) check funding margin for Perps market when clumps are -0.05 and 0.9 + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 5s | + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | USD | 10000000 | + | party2 | USD | 10000000 | + | party3 | USD | 10000000 | + | aux | USD | 100000000 | + | aux2 | USD | 100000000 | + | lpprov | USD | 100000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 10000000 | 0.001 | submission | + | lp1 | lpprov | ETH/DEC19 | 10000000 | 0.001 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 1 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 1 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 49 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 5001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + + And the market data for the market "ETH/DEC19" should be: + | target stake | supplied stake | + | 1100000 | 10000000 | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + + # back sure we end the block so we're in a new one after opening auction + When the network moves ahead "1" blocks + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 1 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/DEC19 | 120000 | 9880000 | + | party2 | USD | ETH/DEC19 | 132000 | 9867000 | + + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 1 | 2000 | 0 | TYPE_LIMIT | TIF_GTC | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/DEC19 | 540000 | 9460000 | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | buy | 1 | 2000 | 1 | TYPE_LIMIT | TIF_GTC | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/DEC19 | 540000 | 9460000 | + | party2 | USD | ETH/DEC19 | 132000 | 9867000 | + | party3 | USD | ETH/DEC19 | 132000 | 9866000 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | initial | + | party1 | ETH/DEC19 | 450000 | 540000 | + | party2 | ETH/DEC19 | 110000 | 132000 | + | party3 | ETH/DEC19 | 110000 | 132000 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.3 | | + | party2 | ETH/DEC19 | isolated margin | 0.45 | | + | party3 | ETH/DEC19 | isolated margin | 0.4 | | + + Then the parties should have the following margin levels: + | party | market id | maintenance | initial | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 700000 | 840000 | isolated margin | 0.3 | 0 | + | party2 | ETH/DEC19 | 360000 | 432000 | isolated margin | 0.45 | 0 | + | party3 | ETH/DEC19 | 360000 | 432000 | isolated margin | 0.4 | 0 | + + And the market data for the market "ETH/DEC19" should be: + | mark price | trading mode | target stake | supplied stake | open interest | + | 1000 | TRADING_MODE_CONTINUOUS | 3300000 | 10000000 | 3 | + # send in external data to the perpetual market, it should not change anything and a MTM should not happen + When the network moves ahead "1" blocks + And the mark price should be "1000" for the market "ETH/DEC19" + + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 1600000000000000000000 | 0s | + | perp.funding.cue | 1612998252 | 0s | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/DEC19 | 900000 | 9100000 | 0 | + | party2 | USD | ETH/DEC19 | 450000 | 9549000 | | + | party3 | USD | ETH/DEC19 | 800000 | 9198000 | | + + # move to the block before we should MTM and check for no changes + When the network moves ahead "3" blocks + Then the parties should have the following margin levels: + | party | market id | maintenance | initial | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 700000 | 840000 | isolated margin | 0.3 | 0 | + | party2 | ETH/DEC19 | 360000 | 432000 | isolated margin | 0.45 | 0 | + | party3 | ETH/DEC19 | 360000 | 432000 | isolated margin | 0.4 | 0 | + ## Now take us past the MTM frequency time + When the network moves ahead "1" blocks + Then the parties should have the following margin levels: + | party | market id | maintenance | initial | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | isolated margin | 0.3 | 0 | + | party2 | ETH/DEC19 | 720000 | 864000 | isolated margin | 0.45 | 0 | + | party3 | ETH/DEC19 | 720000 | 864000 | isolated margin | 0.4 | 0 | + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 900000 | USD | + | aux | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 540000 | USD | + | market | aux2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 950000 | USD | + | market | party2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 950000 | USD | + And the cumulated balance for all accounts should be worth "330000000" + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + + When the network moves ahead "1" blocks + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | sell | 1 | 2001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2001 | 1 | TYPE_LIMIT | TIF_GTC | + And the mark price should be "2000" for the market "ETH/DEC19" + #1 year has 8760 hours,so 0.002 year would be: 8760*0.002*3600 = 63072second, so next funding time (with delta_t = 0.002) would be 1612998252+63072=1613061324 + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.funding.cue | 1613061324 | 0s | + + #funding payment = f_twap - s_twap + clamp_lower_bound*s_twap =2000-1600+(-0.05*1600)=320 + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | aux2 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 640000 | USD | + | party2 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 320000 | USD | + | party3 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 320000 | USD | + | market | aux | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 960000 | USD | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/DEC19 | 0 | 9100000 | 0 | + | party2 | USD | ETH/DEC19 | 1080000 | 9549000 | | + | party3 | USD | ETH/DEC19 | 0 | 9198000 | | + + #move to the block before the next MTM should be no changes + When the network moves ahead "3" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/DEC19 | 0 | 9100000 | 0 | + | party2 | USD | ETH/DEC19 | 1080000 | 9549000 | | + | party3 | USD | ETH/DEC19 | 0 | 9198000 | | + + ## Now take us past the MTM frequency time and things should change + When the network moves ahead "1" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/DEC19 | 0 | 9100000 | + | party2 | USD | ETH/DEC19 | 1080082 | 9549000 | + | party3 | USD | ETH/DEC19 | 0 | 9198000 | + + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 483000 | USD | + | market | aux | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 241339 | USD | + | market | aux2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 80 | USD | + | market | party2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 82 | USD | + | market | lpprov | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 241499 | USD | + + And the cumulated balance for all accounts should be worth "330000000" + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + diff --git a/core/integration/features/settlement/0019-MCAL_058.feature b/core/integration/features/settlement/0019-MCAL_058.feature new file mode 100644 index 0000000000..9159cfa97e --- /dev/null +++ b/core/integration/features/settlement/0019-MCAL_058.feature @@ -0,0 +1,199 @@ +Feature: Test funding margin for Perps market in isolated margin mode + + Background: + + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.05 | 0.1 | 0.15 | ETH | 18 | + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 1.0 | 0.5 | 1 | 1.0 | + + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | market type | sla params | + | ETH/DEC19 | ETH | USD | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.25 | 0 | -3 | perp | default-futures | + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | limits.markets.maxPeggedOrders | 2 | + + @Perpetual + Scenario: (0019-MCAL-058, 0019-MCAL-054, 0019-MCAL-091) check funding margin for Perps market when clumps are 0.1 and 0.15 + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 5s | + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | USD | 10000000 | + | party2 | USD | 10000000 | + | party3 | USD | 10000000 | + | aux | USD | 100000000 | + | aux2 | USD | 100000000 | + | lpprov | USD | 100000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 10000000 | 0.001 | submission | + | lp1 | lpprov | ETH/DEC19 | 10000000 | 0.001 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 1 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 1 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 49 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 5001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + + And the market data for the market "ETH/DEC19" should be: + | target stake | supplied stake | + | 1100000 | 10000000 | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + + # back sure we end the block so we're in a new one after opening auction + When the network moves ahead "1" blocks + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 1 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/DEC19 | 120000 | 9880000 | + | party2 | USD | ETH/DEC19 | 132000 | 9867000 | + + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 1 | 2000 | 0 | TYPE_LIMIT | TIF_GTC | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/DEC19 | 540000 | 9460000 | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party3 | ETH/DEC19 | buy | 1 | 2000 | 1 | TYPE_LIMIT | TIF_GTC | + Then the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/DEC19 | 540000 | 9460000 | + | party2 | USD | ETH/DEC19 | 132000 | 9867000 | + | party3 | USD | ETH/DEC19 | 132000 | 9866000 | + + Then the parties should have the following margin levels: + | party | market id | maintenance | initial | + | party1 | ETH/DEC19 | 450000 | 540000 | + | party2 | ETH/DEC19 | 110000 | 132000 | + | party3 | ETH/DEC19 | 110000 | 132000 | + + And the parties submit update margin mode: + | party | market | margin_mode | margin_factor | error | + | party1 | ETH/DEC19 | isolated margin | 0.3 | | + | party2 | ETH/DEC19 | isolated margin | 0.45 | | + | party3 | ETH/DEC19 | isolated margin | 0.4 | | + + Then the parties should have the following margin levels: + | party | market id | maintenance | initial | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 700000 | 840000 | isolated margin | 0.3 | 0 | + | party2 | ETH/DEC19 | 360000 | 432000 | isolated margin | 0.45 | 0 | + | party3 | ETH/DEC19 | 360000 | 432000 | isolated margin | 0.4 | 0 | + + And the market data for the market "ETH/DEC19" should be: + | mark price | trading mode | target stake | supplied stake | open interest | + | 1000 | TRADING_MODE_CONTINUOUS | 3300000 | 10000000 | 3 | + # send in external data to the perpetual market, it should not change anything and a MTM should not happen + When the network moves ahead "1" blocks + And the mark price should be "1000" for the market "ETH/DEC19" + + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 3000000000000000000000 | 0s | + | perp.funding.cue | 1612998252 | 0s | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/DEC19 | 900000 | 9100000 | 0 | + | party2 | USD | ETH/DEC19 | 450000 | 9549000 | | + | party3 | USD | ETH/DEC19 | 800000 | 9198000 | | + + # move to the block before we should MTM and check for no changes + When the network moves ahead "3" blocks + Then the parties should have the following margin levels: + | party | market id | maintenance | initial | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 700000 | 840000 | isolated margin | 0.3 | 0 | + | party2 | ETH/DEC19 | 360000 | 432000 | isolated margin | 0.45 | 0 | + | party3 | ETH/DEC19 | 360000 | 432000 | isolated margin | 0.4 | 0 | + ## Now take us past the MTM frequency time + When the network moves ahead "1" blocks + Then the parties should have the following margin levels: + | party | market id | maintenance | initial | margin mode | margin factor | order | + | party1 | ETH/DEC19 | 0 | 0 | isolated margin | 0.3 | 0 | + | party2 | ETH/DEC19 | 720000 | 864000 | isolated margin | 0.45 | 0 | + | party3 | ETH/DEC19 | 720000 | 864000 | isolated margin | 0.4 | 0 | + + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 900000 | USD | + | aux | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 540000 | USD | + | market | aux2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 950000 | USD | + | market | party2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 950000 | USD | + And the cumulated balance for all accounts should be worth "330000000" + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + + When the network moves ahead "1" blocks + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | sell | 1 | 2001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 2001 | 1 | TYPE_LIMIT | TIF_GTC | + And the mark price should be "2000" for the market "ETH/DEC19" + #1 year has 8760 hours,so 0.002 year would be: 8760*0.002*3600 = 63072second, so next funding time (with delta_t = 0.002) would be 1612998252+63072=1613061324 + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.funding.cue | 1613061324 | 0s | + + #funding payment = f_twap - s_twap + clamp_upper_bound*s_twap =2000-3000+(0.15*3000)=-550 + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | aux | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 1650000 | USD | + | market | aux2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 1100000 | USD | + | market | party2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 550000 | USD | + | market | party3 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 550000 | USD | + + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/DEC19 | 0 | 9100000 | 0 | + | party2 | USD | ETH/DEC19 | 1950000 | 9549000 | | + | party3 | USD | ETH/DEC19 | 1350000 | 9198000 | | + + #move to the block before the next MTM should be no changes + When the network moves ahead "3" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/DEC19 | 0 | 9100000 | 0 | + | party2 | USD | ETH/DEC19 | 1950000 | 9549000 | | + | party3 | USD | ETH/DEC19 | 1350000 | 9198000 | | + ## Now take us past the MTM frequency time and things should change + When the network moves ahead "1" blocks + Then the parties should have the following account balances: + | party | asset | market id | margin | general | order margin | + | party1 | USD | ETH/DEC19 | 0 | 9100000 | 0 | + | party2 | USD | ETH/DEC19 | 1950000 | 9549000 | | + | party3 | USD | ETH/DEC19 | 1350003 | 9198000 | | + + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 3000 | USD | + | market | aux | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 1498 | USD | + | market | aux2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 0 | USD | + | market | lpprov | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 1499 | USD | + | market | party2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 0 | USD | + | market | party3 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 3 | USD | + + And the cumulated balance for all accounts should be worth "330000000" + And the settlement account should have a balance of "0" for the market "ETH/DEC19" diff --git a/core/integration/features/settlement/0019-MCAL_fundingMargin2.feature b/core/integration/features/settlement/0019-MCAL_fundingMargin2.feature index 92ef7bd975..645e6244f2 100644 --- a/core/integration/features/settlement/0019-MCAL_fundingMargin2.feature +++ b/core/integration/features/settlement/0019-MCAL_fundingMargin2.feature @@ -11,7 +11,7 @@ Feature: Test funding margin for Perps market And the markets: | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | market type | sla params | - | ETH/DEC19 | ETH | USD | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 1e6 | 1e6 | -3 | perp | default-futures | + | ETH/DEC19 | ETH | USD | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 1e6 | 0 | -3 | perp | default-futures | And the following network parameters are set: | name | value | @@ -19,7 +19,7 @@ Feature: Test funding margin for Perps market | limits.markets.maxPeggedOrders | 2 | @Perpetual - Scenario: (0019-MCAL-019) check funding margin for Perps market when clumps are 0.1 and 0.9 + Scenario: (0019-MCAL-026) check funding margin for Perps market when clumps are 0.1 and 0.9 Given the following network parameters are set: | name | value | | network.markPriceUpdateMaximumFrequency | 5s | @@ -145,7 +145,7 @@ Feature: Test funding margin for Perps market | name | value | time offset | | perp.funding.cue | 1613061324 | 0s | -#funding payment = f_twap - s_twap + clamp_lower_bound*s_twap =2000-1600+(0.1*1600)=560 + #funding payment = f_twap - s_twap + clamp_lower_bound*s_twap =2000-1600+(0.1*1600)=560 And the following transfers should happen: | from | to | from account | to account | market id | amount | asset | | aux2 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 1120000 | USD | @@ -185,6 +185,4 @@ Feature: Test funding margin for Perps market | market | party3 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 1000 | USD | And the cumulated balance for all accounts should be worth "330000000" - And the settlement account should have a balance of "0" for the market "ETH/DEC19" - -# Then debug transfers + And the settlement account should have a balance of "0" for the market "ETH/DEC19" \ No newline at end of file diff --git a/core/integration/features/settlement/0019-MCAL_fundingMargin3.feature b/core/integration/features/settlement/0019-MCAL_fundingMargin3.feature index 957352e633..deeb1c94da 100644 --- a/core/integration/features/settlement/0019-MCAL_fundingMargin3.feature +++ b/core/integration/features/settlement/0019-MCAL_fundingMargin3.feature @@ -11,7 +11,7 @@ Feature: Test funding margin for Perps market And the markets: | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | market type | sla params | - | ETH/DEC19 | ETH | USD | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 1e6 | 1e6 | -3 | perp | default-futures | + | ETH/DEC19 | ETH | USD | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 1e6 | 0 | -3 | perp | default-futures | And the following network parameters are set: | name | value | @@ -19,7 +19,7 @@ Feature: Test funding margin for Perps market | limits.markets.maxPeggedOrders | 2 | @Perpetual - Scenario: (0019-MCAL-022,0019-MCAL-023) check funding margin for Perps market when clumps are -0.05 and 0.9 + Scenario: (0019-MCAL-028,0019-MCAL-029) check funding margin for Perps market when clumps are -0.05 and 0.9 Given the following network parameters are set: | name | value | | network.markPriceUpdateMaximumFrequency | 5s | @@ -187,4 +187,3 @@ Feature: Test funding margin for Perps market And the cumulated balance for all accounts should be worth "330000000" And the settlement account should have a balance of "0" for the market "ETH/DEC19" -# Then debug transfers diff --git a/core/integration/features/settlement/0019-MCAL_fundingMargin4.feature b/core/integration/features/settlement/0019-MCAL_fundingMargin4.feature index c15ff46ae5..a6eee8a5c4 100644 --- a/core/integration/features/settlement/0019-MCAL_fundingMargin4.feature +++ b/core/integration/features/settlement/0019-MCAL_fundingMargin4.feature @@ -11,7 +11,7 @@ Feature: Test funding margin for Perps market And the markets: | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | market type | sla params | - | ETH/DEC19 | ETH | USD | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 1e6 | 1e6 | -3 | perp | default-futures | + | ETH/DEC19 | ETH | USD | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 1e6 | 0 | -3 | perp | default-futures | And the following network parameters are set: | name | value | @@ -19,7 +19,7 @@ Feature: Test funding margin for Perps market | limits.markets.maxPeggedOrders | 2 | @Perpetual - Scenario: (0019-MCAL-020, 0019-MCAL-021) check funding margin for Perps market when clumps are 0.1 and 0.15 + Scenario: (0019-MCAL-027, 0019-MCAL-030) check funding margin for Perps market when clumps are 0.1 and 0.15 Given the following network parameters are set: | name | value | | network.markPriceUpdateMaximumFrequency | 5s | diff --git a/core/integration/features/settlement/0019-MCAL_fundingMargin5.feature b/core/integration/features/settlement/0019-MCAL_fundingMargin5.feature index 7866a62468..4af25d56a3 100644 --- a/core/integration/features/settlement/0019-MCAL_fundingMargin5.feature +++ b/core/integration/features/settlement/0019-MCAL_fundingMargin5.feature @@ -131,6 +131,6 @@ Feature: check when settlement data precision is different/equal to the settleme | market | party2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 432741366 | USD | | market | party3 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 432741368 | USD | | market | aux2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 432741366 | USD | - | aux2 | aux2 | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 432666666 | USD | - | party2 | party2 | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 432666666 | USD | - | party3 | party3 | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 432666668 | USD | + | aux2 | aux2 | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 434311866 | USD | + | party2 | party2 | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 434311866 | USD | + | party3 | party3 | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 434311868 | USD | diff --git a/core/integration/features/settlement/0053-PERP-024_Closeout.feature b/core/integration/features/settlement/0053-PERP-024_Closeout.feature index c475cf55a7..07d9f5d2ce 100644 --- a/core/integration/features/settlement/0053-PERP-024_Closeout.feature +++ b/core/integration/features/settlement/0053-PERP-024_Closeout.feature @@ -19,7 +19,7 @@ Feature: Test funding payment triggering closeout for Perps market | market.auction.minimumDuration | 1 | | limits.markets.maxPeggedOrders | 2 | - @Perpetual + @Perpetual @Liquidation Scenario: (0053-PERP-024) Funding payment triggering closeout but no loss soccialization Given the following network parameters are set: | name | value | @@ -117,13 +117,15 @@ Feature: Test funding payment triggering closeout for Perps market | party2 | 1 | 1000000 | 0 | | party3 | 1 | 0 | 0 | | lpprov | 0 | 0 | 0 | + ## allow close-outs to happen + When the network moves ahead "1" blocks #1 year has 8760 hours,so 0.002 year would be: 8760*0.002*3600 = 63072second, so next funding time (with delta_t = 0.002) would be 1612998252+63072=1613061324 - When the oracles broadcast data with block time signed with "0xCAFECAFE1": + And the oracles broadcast data with block time signed with "0xCAFECAFE1": | name | value | time offset | | perp.funding.cue | 1613061324 | 0s | #funding payment = f_twap - s_twap + clamp_lower_bound*s_twap =2000-1600+(0.1*1600)=560 - And the following transfers should happen: + Then the following transfers should happen: | from | to | from account | to account | market id | amount | asset | | aux2 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 1120000 | USD | | party2 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 560000 | USD | @@ -131,23 +133,23 @@ Feature: Test funding payment triggering closeout for Perps market | market | aux | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 1120000 | USD | | market | party1 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 1120000 | USD | - Then the parties should have the following account balances: + And the parties should have the following account balances: | party | asset | market id | margin | general | | party1 | USD | ETH/DEC19 | 8802400 | 1317600 | | party3 | USD | ETH/DEC19 | 2605200 | 6832800 | | party2 | USD | ETH/DEC19 | 2605200 | 7833800 | | aux2 | USD | ETH/DEC19 | 0 | 0 | - Then the parties should have the following profit and loss: + And the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | - | aux | -1 | -499500 | 1754710 | + | aux | -1 | -1000000 | 1120000 | | aux2 | 0 | 0 | -2388999 | | party1 | -2 | -1000000 | 1120000 | | party2 | 1 | 1000000 | -560000 | | party3 | 1 | 0 | -560000 | - | lpprov | 1 | 1952000 | -817208 | + | lpprov | 0 | 0 | 0 | - And the insurance pool balance should be "0" for the market "ETH/DEC19" + And the insurance pool balance should be "2269099" for the market "ETH/DEC19" diff --git a/core/integration/features/settlement/0053-PERP-024_LossSocialisation.feature b/core/integration/features/settlement/0053-PERP-024_LossSocialisation.feature index 9a496ce41f..4e98256611 100644 --- a/core/integration/features/settlement/0053-PERP-024_LossSocialisation.feature +++ b/core/integration/features/settlement/0053-PERP-024_LossSocialisation.feature @@ -18,7 +18,7 @@ Feature: Test funding payment triggering closeout for Perps market | market.auction.minimumDuration | 1 | | limits.markets.maxPeggedOrders | 2 | - @Perpetual + @Perpetual @Liquidation Scenario: (0053-PERP-024) Funding payment triggering loss soccialization Given the following network parameters are set: | name | value | @@ -102,6 +102,8 @@ Feature: Test funding payment triggering closeout for Perps market | party | market id | side | volume | price | resulting trades | type | tif | | aux | ETH/DEC19 | sell | 1 | 2001 | 0 | TYPE_LIMIT | TIF_GTC | | aux2 | ETH/DEC19 | buy | 1 | 2001 | 1 | TYPE_LIMIT | TIF_GTC | + # Allow network close-outs to kick in + Then the network moves ahead "1" blocks Then the parties should have the following margin levels: | party | market id | maintenance | initial | @@ -129,6 +131,6 @@ Feature: Test funding payment triggering closeout for Perps market | party | market id | maintenance | initial | | aux2 | ETH/DEC19 | 0 | 0 | #loss socialisaton happened - And the insurance pool balance should be "0" for the market "ETH/DEC19" + And the insurance pool balance should be "1563199" for the market "ETH/DEC19" And the settlement account should have a balance of "0" for the market "ETH/DEC19" diff --git a/core/integration/features/settlement/0053-PERP-027_twap_calculation.feature b/core/integration/features/settlement/0053-PERP-027_twap_calculation.feature new file mode 100644 index 0000000000..bceec83558 --- /dev/null +++ b/core/integration/features/settlement/0053-PERP-027_twap_calculation.feature @@ -0,0 +1,143 @@ +Feature: Test internal and external twap calculation + + Background: + # epoch time is 1602806400 + Given time is updated to "2020-10-16T00:00:00Z" + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.00 | 0.0 | 0.0 | ETH | 1 | + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 1.0 | 0.5 | 1 | 1.0 | + + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | market type | sla params | + | ETH/DEC19 | ETH | USD | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 1e6 | 1e6 | -3 | perp | default-futures | + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | limits.markets.maxPeggedOrders | 2 | + And the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the average block duration is "1" + + @Perpetual @twap + Scenario: 0053-PERP-027 Internal and External TWAP calculation + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 120s | + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | USD | 10000000 | + | party2 | USD | 10000000 | + | party3 | USD | 10000000 | + | aux | USD | 100000000 | + | aux2 | USD | 100000000 | + | lpprov | USD | 100000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 100000 | 0.001 | submission | + + # move market to continuous + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | lpprov | ETH/DEC19 | buy | 1000 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | buy | 1 | 5 | 0 | TYPE_LIMIT | TIF_GTC | + | lpprov | ETH/DEC19 | sell | 1000 | 15 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 15 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 11 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 11 | 0 | TYPE_LIMIT | TIF_GTC | + + And the market data for the market "ETH/DEC19" should be: + | target stake | supplied stake | + | 12100 | 100000 | + Then the opening auction period ends for market "ETH/DEC19" + + Given the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + When time is updated to "2020-10-16T00:02:00Z" + # 1602806400 + 120s = 1602806520 + # funding period is ended with perp.funding.cue + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 110 | -1s | + | perp.funding.cue | 1602806520 | 0s | + + # 1 min in to the next funding period + Given time is updated to "2020-10-16T00:03:00Z" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 11 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 11 | 1 | TYPE_LIMIT | TIF_GTC | + + And the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 90 | -1s | + + # 3 min in to the next funding period + Given time is updated to "2020-10-16T00:05:00Z" + And the mark price should be "11" for the market "ETH/DEC19" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 10 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 10 | 1 | TYPE_LIMIT | TIF_GTC | + + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 100 | -1s | + + + # 5 min in to the next funding period + Given time is updated to "2020-10-16T00:07:00Z" + And the mark price should be "10" for the market "ETH/DEC19" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 9 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 9 | 1 | TYPE_LIMIT | TIF_GTC | + + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 120 | -1s | + + # 6 min in to the funding period emit spot price + Given time is updated to "2020-10-16T00:08:00Z" + And the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 110 | -1s | + + # 7 mins in to the funding period + When time is updated to "2020-10-16T00:09:00Z" + + And the mark price should be "9" for the market "ETH/DEC19" + + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 8 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 8 | 1 | TYPE_LIMIT | TIF_GTC | + + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 80 | -1s | + + # 9 min in to the next funding period + Given time is updated to "2020-10-16T00:11:00Z" + And the mark price should be "8" for the market "ETH/DEC19" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 7 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 7 | 1 | TYPE_LIMIT | TIF_GTC | + + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 140 | -1s | + + # if the funding period ended here, check the twap + Given time is updated to "2020-10-16T00:12:00Z" + + # in theory internal TWAP = 9.3 external TWAP = 10.3 + # but these are type int so the decimal is truncated + Then the product data for the market "ETH/DEC19" should be: + | internal twap | external twap | + | 9 | 10 | diff --git a/core/integration/features/settlement/0053-PERP-028_twap_calculation_with_auction.feature b/core/integration/features/settlement/0053-PERP-028_twap_calculation_with_auction.feature new file mode 100644 index 0000000000..860ad953bf --- /dev/null +++ b/core/integration/features/settlement/0053-PERP-028_twap_calculation_with_auction.feature @@ -0,0 +1,157 @@ +Feature: Test internal and external twap calculation + + Background: + # epoch time is 1602806400 + Given time is updated to "2020-10-16T00:00:00Z" + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.5 | 0.00 | 0.0 | 0.0 | ETH | 18 | + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 100.0 | 0.5 | 1 | 1.0 | + And the price monitoring named "my-price-monitoring": + | horizon | probability | auction extension | + | 43200 | 0.9999999 | 120 | + And the log normal risk model named "my-log-normal-risk-model": + | risk aversion | tau | mu | r | sigma | + | 0.000001 | 0.00011407711613050422 | 0 | 0.016 | 0.8 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | market type | sla params | + | ETH/DEC19 | ETH | USD | my-log-normal-risk-model | default-margin-calculator | 120 | default-none | my-price-monitoring | perp-oracle | 1e6 | 1e6 | -3 | perp | SLA | + And the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the average block duration is "1" + When the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | USD | 100000000000 | + | party2 | USD | 100000000000 | + | party3 | USD | 100000000000 | + | aux | USD | 100000000000 | + | aux2 | USD | 100000000000 | + | lpprov | USD | 100000000000 | + Then the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 100000 | 0.001 | submission | + # move market to continuous + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux2 | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | lpprov | ETH/DEC19 | buy | 100000 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 10 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 10 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 35 | 0 | TYPE_LIMIT | TIF_GTC | + | lpprov | ETH/DEC19 | sell | 100000 | 35 | 0 | TYPE_LIMIT | TIF_GTC | + And the market data for the market "ETH/DEC19" should be: + | target stake | supplied stake | + | 4315 | 100000 | + And the opening auction period ends for market "ETH/DEC19" + + @Perpetual @twap + Scenario: 0053-PERP-028 Internal and External TWAP calculation, auction in funding period + Given the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And time is updated to "2020-10-16T00:05:00Z" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 10 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 10 | 1 | TYPE_LIMIT | TIF_GTC | + Then time is updated to "2020-10-16T00:10:00Z" + + # 1602806400 + 120s = 1602807000 + # funding period is ended with perp.funding.cue + And the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 11000000000000000000 | -1s | + | perp.funding.cue | 1602807000 | 0s | + And the mark price should be "10" for the market "ETH/DEC19" + + # 1 min in to the next funding period + Given time is updated to "2020-10-16T00:11:00Z" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 11 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 11 | 1 | TYPE_LIMIT | TIF_GTC | + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 9000000000000000000 | -1s | + + # 3 min in to the next funding period + Given time is updated to "2020-10-16T00:13:00Z" + And the mark price should be "11" for the market "ETH/DEC19" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 11 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 11 | 1 | TYPE_LIMIT | TIF_GTC | + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 10000000000000000000 | -1s | + + # 5 min in to the next funding period market moves into auction + Given time is updated to "2020-10-16T00:15:00Z" + And the mark price should be "11" for the market "ETH/DEC19" + # this spot price is not counted in external twap calclation because it was broadcast during auction + # if it did then the External spot price would be pushed to 11.625 or 11 since field type is int + # similarly the mark price woul dbe pushed to 12.125 + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 30000000000000000000 | -1s | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux2 | ETH/DEC19 | buy | 1 | 15 | 0 | TYPE_LIMIT | TIF_GTC | trigger-auction2 | + | aux | ETH/DEC19 | sell | 1 | 15 | 0 | TYPE_LIMIT | TIF_GTC | trigger-auction1 | + Then the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/DEC19" + + ### 6 mins in Now we cancel the aux2 order, its served its purpose + Given the parties cancel the following orders: + | party | reference | + | aux | trigger-auction1 | + | aux2 | trigger-auction2 | + When time is updated to "2020-10-16T00:16:00Z" + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 11000000000000000000 | -1s | + And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/DEC19" + + # 7 mins in, the auction period will end + Given time is updated to "2020-10-16T00:17:01Z" + When the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + Then the markets are updated: + | id | price monitoring | linear slippage factor | quadratic slippage factor | + | ETH/DEC19 | default-none | 1e6 | 1e6 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 10 | 9 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 10 | 9 | 1 | TYPE_LIMIT | TIF_GTC | + + # 8 mins in, the auction period will end + Given time is updated to "2020-10-16T00:18:00Z" + When the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + Then the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 8 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 8 | 1 | TYPE_LIMIT | TIF_GTC | + And the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 8000000000000000000 | -1s | + + # 9 mins in, the auction period will end + Given time is updated to "2020-10-16T00:19:00Z" + Then the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 14000000000000000000 | -1s | + + # 10 mins in, the auction period will end + Given time is updated to "2020-10-16T00:20:00Z" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 30 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 30 | 1 | TYPE_LIMIT | TIF_GTC | + # in theory internal TWAP = 9.625 external TWAP = 10.25 + # if the auction period is included then the internal TWAP = 10.1 and external TWAP = 11.2 + # but these are type int so the decimal is truncated + Then the product data for the market "ETH/DEC19" should be: + | internal twap | external twap | + | 9 | 10 | + + + diff --git a/core/integration/features/settlement/0053-PERP-039.feature b/core/integration/features/settlement/0053-PERP-039.feature new file mode 100644 index 0000000000..66660275d8 --- /dev/null +++ b/core/integration/features/settlement/0053-PERP-039.feature @@ -0,0 +1,169 @@ +Feature: If a market insurance pool does not have enough funds to cover a funding payment, + loss socialisation occurs and the total balances across the network remains constant (0053-PERP-039). + + Background: + + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 1.0 | 0.75 | 0.1 | 0.9 | ETH | 18 | + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 1.0 | 0.5 | 1 | 1.0 | + + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | market type | sla params | + | ETH/DEC19 | ETH | USD | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 1e6 | 1e6 | -3 | perp | default-futures | + And the initial insurance pool balance is "200" for all the markets + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | limits.markets.maxPeggedOrders | 2 | + + @Perpetual @Liquidation + Scenario: + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 5s | + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | USD | 10000000 | + | party2 | USD | 10000000 | + | party3 | USD | 10000000 | + | aux | USD | 100000000 | + | aux2 | USD | 1515000 | + | lpprov | USD | 100000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 10000000 | 0.001 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 1 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 1 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 49 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 5001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + + And the market data for the market "ETH/DEC19" should be: + | target stake | supplied stake | + | 1100000 | 10000000 | + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + And the cumulated balance for all accounts should be worth "231515200" + And the insurance pool balance should be "200" for the market "ETH/DEC19" + + # back sure we end the block so we're in a new one after opening auction + When the network moves ahead "1" blocks + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 1 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 1 | 1200 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | buy | 1 | 1200 | 1 | TYPE_LIMIT | TIF_GTC | + + And the market data for the market "ETH/DEC19" should be: + | mark price | trading mode | target stake | supplied stake | open interest | + | 1000 | TRADING_MODE_CONTINUOUS | 3300000 | 10000000 | 3 | + + # send in external data to the perpetual market, it should not change anything and a MTM should not happen + When the network moves ahead "1" blocks + And the mark price should be "1000" for the market "ETH/DEC19" + + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 3000000000000000000000 | 0s | + | perp.funding.cue | 1612998252 | 0s | + When the network moves ahead "4" blocks + + #MTM for mark price 1000 to 1200 + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | party1 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 200000 | USD | + | aux | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 200000 | USD | + | market | aux2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 200000 | USD | + | market | party2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 200000 | USD | + + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + And the insurance pool balance should be "200" for the market "ETH/DEC19" + And the cumulated balance for all accounts should be worth "231515200" + When the network moves ahead "1" blocks + + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/DEC19 | 9410400 | 389600 | + | party2 | USD | ETH/DEC19 | 1539600 | 8659400 | + | party3 | USD | ETH/DEC19 | 1539600 | 8459200 | + | aux | USD | ETH/DEC19 | 4841200 | 94958800 | + | aux2 | USD | ETH/DEC19 | 1473200 | 241800 | + | lpprov | USD | ETH/DEC19 | 7920000 | 82080000 | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | sell | 1 | 1500 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 1500 | 1 | TYPE_LIMIT | TIF_GTC | + # Allow network close-outs to kick in + Then the network moves ahead "1" blocks + + Then the parties should have the following margin levels: + | party | market id | maintenance | initial | + | party1 | ETH/DEC19 | 7842000 | 9410400 | + | party2 | ETH/DEC19 | 1283000 | 1539600 | + | aux2 | ETH/DEC19 | 1415000 | 1698000 | + And the mark price should be "1200" for the market "ETH/DEC19" + + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/DEC19 | 9410400 | 389600 | + | party2 | USD | ETH/DEC19 | 1539600 | 8659400 | + | party3 | USD | ETH/DEC19 | 1539600 | 8459200 | + | aux | USD | ETH/DEC19 | 4993200 | 94806800 | + | aux2 | USD | ETH/DEC19 | 1698000 | 15500 | + | lpprov | USD | ETH/DEC19 | 7920000 | 82082200 | + + #delta_t = 0.5 + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 3000000000000000000000 | 0s | + | perp.funding.cue | 1628766252 | 0s | + + #funding payment = s_twap * delta_t * interest_rate = 3000*1*0.75 = 225,000 (which is more than the aux2 party has) + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | aux2 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 1698000 | USD | + | aux2 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 15500 | USD | + | party2 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 900000 | USD | + | party3 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 900000 | USD | + | market | aux | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 1756850 | USD | + | market | party1 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 1756850 | USD | + + Then the parties should have the following margin levels: + | party | market id | maintenance | initial | + | aux2 | ETH/DEC19 | 0 | 0 | + + # check that loss socialisation has happened and that the insurance pool has been cleared to indicate + # that there wasn't enough in there to cover the funding payment. + And the insurance pool balance should be "0" for the market "ETH/DEC19" + And the settlement account should have a balance of "0" for the market "ETH/DEC19" + + # Check we still have a constant total amount in all accounts + And the cumulated balance for all accounts should be worth "231515200" + + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | USD | ETH/DEC19 | 9410400 | 2146450 | + | party2 | USD | ETH/DEC19 | 1539600 | 7759400 | + | party3 | USD | ETH/DEC19 | 1539600 | 7559200 | + | aux | USD | ETH/DEC19 | 9554400 | 92002450 | + | aux2 | USD | ETH/DEC19 | 0 | 0 | + | lpprov | USD | ETH/DEC19 | 7920000 | 82082200 | diff --git a/core/integration/features/settlement/0053-PERP-040.feature b/core/integration/features/settlement/0053-PERP-040.feature new file mode 100644 index 0000000000..46fae32894 --- /dev/null +++ b/core/integration/features/settlement/0053-PERP-040.feature @@ -0,0 +1,165 @@ +Feature: Assert that the scaling factor is applied before the funding cap is applied (0053-PERP-040). + + @Perpetual + Scenario: Make sure that the scaling is handled first and the bounds do not touch the result + + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | funding rate scaling factor | funding rate lower bound | funding rate upper bound | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 1.0 | 0.0 | 0.1 | 0.9 | ETH | 18 | 10.0 | -6.0 | 6.0 | + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 1.0 | 0.5 | 1 | 1.0 | + + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | market type | sla params | + | ETH/DEC19 | ETH | USD | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 1e6 | 1e6 | -3 | perp | default-futures | + And the initial insurance pool balance is "200" for all the markets + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | limits.markets.maxPeggedOrders | 2 | + + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 5s | + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | USD | 100000000 | + | party2 | USD | 100000000 | + | party3 | USD | 100000000 | + | aux | USD | 100000000 | + | aux2 | USD | 100000000 | + | lpprov | USD | 100000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 10000000 | 0.001 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 1 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 1 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 49 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 5001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + # back sure we end the block so we're in a new one after opening auction + When the network moves ahead "1" blocks + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 1 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/DEC19 | sell | 1 | 1200 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | buy | 1 | 1200 | 1 | TYPE_LIMIT | TIF_GTC | + + # send in external data to the perpetual market, it should not change anything and a MTM should not happen + When the network moves ahead "1" blocks + + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 3000000000000000000000 | 0s | + | perp.funding.cue | 1612998252 | 0s | + When the network moves ahead "6" blocks + + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 3000000000000000000000 | 0s | + | perp.funding.cue | 1628766252 | 0s | + + # funding payments = s_twap * delta_t * interest_rate * fund rate scaling * dp = (3000-1200)*1*10.0*1000 = 18,000,000 + # funding rate will be funding payment / s_twap = 18,000,000/(3,000*dp) = 6 + # So having a lower/upper bound of -6/+6 will not change the result + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | market | party2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 18000000| USD | + + + + @Perpetual + Scenario: Make sure that the scaling is handled first and the bounds can change the final result + + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | funding rate scaling factor | funding rate lower bound | funding rate upper bound | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 1.0 | 0.0 | 0.1 | 0.9 | ETH | 18 | 10.0 | -5.0 | 5.0 | + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 1.0 | 0.5 | 1 | 1.0 | + + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | market type | sla params | + | ETH/DEC19 | ETH | USD | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 1e6 | 1e6 | -3 | perp | default-futures | + And the initial insurance pool balance is "200" for all the markets + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | limits.markets.maxPeggedOrders | 2 | + + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 5s | + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | USD | 100000000 | + | party2 | USD | 100000000 | + | party3 | USD | 100000000 | + | aux | USD | 100000000 | + | aux2 | USD | 100000000 | + | lpprov | USD | 100000000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 10000000 | 0.001 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 1 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 1 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | ETH/DEC19 | buy | 1 | 49 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 5001 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + # back sure we end the block so we're in a new one after opening auction + When the network moves ahead "1" blocks + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | buy | 1 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/DEC19 | sell | 1 | 1200 | 0 | TYPE_LIMIT | TIF_GTC | + | party3 | ETH/DEC19 | buy | 1 | 1200 | 1 | TYPE_LIMIT | TIF_GTC | + + # send in external data to the perpetual market, it should not change anything and a MTM should not happen + When the network moves ahead "1" blocks + + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 3000000000000000000000 | 0s | + | perp.funding.cue | 1612998252 | 0s | + When the network moves ahead "6" blocks + + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 3000000000000000000000 | 0s | + | perp.funding.cue | 1628766252 | 0s | + + # funding payments = s_twap * delta_t * interest_rate * fund rate scaling * dp = (3000-1200)*1*10.0*1000 = 18,000,000 + # funding rate will be funding payment / s_twap = 18,000,000/(3,000*dp) = 6 + # So having a lower/upper bound of -5/+5 if applied after the scaling will reduce the payment to 15,000,000 + # If the bounds are incorrectly handled first the result will be the same as the run above, 18,000,000 + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | market | party2 | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 15000000 | USD | + diff --git a/core/integration/features/settlement/0053-PERP-funding-rate-modifiers.feature b/core/integration/features/settlement/0053-PERP-funding-rate-modifiers.feature new file mode 100644 index 0000000000..cd2408b830 --- /dev/null +++ b/core/integration/features/settlement/0053-PERP-funding-rate-modifiers.feature @@ -0,0 +1,92 @@ +Feature: Test internal and external twap calculation + + Background: + # epoch time is 1602806400 + Given time is updated to "2020-10-16T00:00:00Z" + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | funding rate scaling factor | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 2.5 | ETH | 18 | + + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | funding rate lower bound | funding rate upper bound | quote name | settlement decimals | + | perp-oracle2 | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | -0.005 | 0.005 | ETH | 18 | + + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 100.0 | 0.5 | 1 | 1.0 | + And the price monitoring named "my-price-monitoring": + | horizon | probability | auction extension | + | 43200 | 0.9999999 | 120 | + And the log normal risk model named "my-log-normal-risk-model": + | risk aversion | tau | mu | r | sigma | + | 0.000001 | 0.00011407711613050422 | 0 | 0.016 | 0.8 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | market type | sla params | + | ETH/DEC19 | ETH | USD | my-log-normal-risk-model | default-margin-calculator | 120 | default-none | my-price-monitoring | perp-oracle | 1e6 | 1e6 | -3 | perp | SLA | + And the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the average block duration is "1" + When the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | USD | 100000000000 | + | party2 | USD | 100000000000 | + | party3 | USD | 100000000000 | + | aux | USD | 100000000000 | + | aux2 | USD | 100000000000 | + | lpprov | USD | 100000000000 | + Then the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 100000 | 0.001 | submission | + # move market to continuous + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux2 | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | lpprov | ETH/DEC19 | buy | 100000 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 3500 | 0 | TYPE_LIMIT | TIF_GTC | + | lpprov | ETH/DEC19 | sell | 100000 | 3500 | 0 | TYPE_LIMIT | TIF_GTC | + And the market data for the market "ETH/DEC19" should be: + | target stake | supplied stake | + | 431500 | 100000 | + And the opening auction period ends for market "ETH/DEC19" + + @Perpetual @funding-rate + Scenario: 0053-PERP-029, 0053-PERP-030 Funding rate modified by perpetual parameters + Given the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And time is updated to "2020-10-16T00:05:00Z" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 990 | 1 | TYPE_LIMIT | TIF_GTC | + Then time is updated to "2020-10-16T00:10:00Z" + + # 1602806400 + 120s = 1602807000 + # funding period is ended with perp.funding.cue + And the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 1000000000000000000000 | -1s | + | perp.funding.cue | 1602807000 | 0s | + And the mark price should be "990" for the market "ETH/DEC19" + + # 0053-PERP-029 funding rate will be 2.5 times what it would normally be given funding-rate-scaling-factor + Then the product data for the market "ETH/DEC19" should be: + | internal twap | external twap | funding payment | funding rate | + | 990 | 1000 | -25 | -0.025 | + + # update to the perp spec with the lower bound on the funding rate + And the markets are updated: + | id | data source config | linear slippage factor | quadratic slippage factor | + | ETH/DEC19 | perp-oracle2 | 1e-3 | 0 | + + Then time is updated to "2020-10-16T00:10:01Z" + + # 0053-PERP-030 funding rate will be snapped to -0.005 since it should *really* be -0.01, but thats lower than funding-rate-lower-bound + Then the product data for the market "ETH/DEC19" should be: + | internal twap | external twap | funding payment | funding rate | + | 990 | 1000 | -5 | -0.005 | + + + + diff --git a/core/integration/features/settlement/0053-PERP-funding-rate-modifiers2.feature b/core/integration/features/settlement/0053-PERP-funding-rate-modifiers2.feature new file mode 100644 index 0000000000..a77c5e72bc --- /dev/null +++ b/core/integration/features/settlement/0053-PERP-funding-rate-modifiers2.feature @@ -0,0 +1,76 @@ +Feature: Test internal and external twap calculation + + Background: + # epoch time is 1602806400 + Given time is updated to "2020-10-16T00:00:00Z" + + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | funding rate lower bound | funding rate upper bound | quote name | settlement decimals | + | perp-oracle | USD | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | -0.015 | 0.005 | ETH | 18 | + + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 100.0 | 0.5 | 1 | 1.0 | + And the price monitoring named "my-price-monitoring": + | horizon | probability | auction extension | + | 43200 | 0.9999999 | 120 | + And the log normal risk model named "my-log-normal-risk-model": + | risk aversion | tau | mu | r | sigma | + | 0.000001 | 0.00011407711613050422 | 0 | 0.016 | 0.8 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | position decimal places | market type | sla params | + | ETH/DEC19 | ETH | USD | my-log-normal-risk-model | default-margin-calculator | 120 | default-none | my-price-monitoring | perp-oracle | 1e6 | 1e6 | -3 | perp | SLA | + And the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the average block duration is "1" + When the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | USD | 100000000000 | + | party2 | USD | 100000000000 | + | party3 | USD | 100000000000 | + | aux | USD | 100000000000 | + | aux2 | USD | 100000000000 | + | lpprov | USD | 100000000000 | + Then the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 100000 | 0.001 | submission | + # move market to continuous + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux2 | ETH/DEC19 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | lpprov | ETH/DEC19 | buy | 100000 | 1 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 3500 | 0 | TYPE_LIMIT | TIF_GTC | + | lpprov | ETH/DEC19 | sell | 100000 | 3500 | 0 | TYPE_LIMIT | TIF_GTC | + And the market data for the market "ETH/DEC19" should be: + | target stake | supplied stake | + | 431500 | 100000 | + And the opening auction period ends for market "ETH/DEC19" + + @Perpetual @funding-rate + Scenario: 0053-PERP-031 Funding rate calculated correctly when the internel TWAP is greater than the external TWAP + Given the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And time is updated to "2020-10-16T00:05:00Z" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | party1 | ETH/DEC19 | buy | 1 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/DEC19 | sell | 1 | 1010 | 1 | TYPE_LIMIT | TIF_GTC | + Then time is updated to "2020-10-16T00:10:00Z" + + # 1602806400 + 120s = 1602807000 + # funding period is ended with perp.funding.cue + And the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.ETH.value | 1000000000000000000000 | -1s | + | perp.funding.cue | 1602807000 | 0s | + And the mark price should be "1010" for the market "ETH/DEC19" + + Then the product data for the market "ETH/DEC19" should be: + | internal twap | external twap | funding payment | funding rate | + | 1010 | 1000 | 5 | 0.005 | + + + + diff --git a/core/integration/features/settlement/10568-pnl-underflow.feature b/core/integration/features/settlement/10568-pnl-underflow.feature new file mode 100644 index 0000000000..abada188c3 --- /dev/null +++ b/core/integration/features/settlement/10568-pnl-underflow.feature @@ -0,0 +1,76 @@ +Feature: Test loss socialization case 1 + + Background: + Given the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/DEC19 | BTC | BTC | default-simple-risk-model-2 | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e6 | 1e6 | default-futures | + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | network.markPriceUpdateMaximumFrequency | 0s | + + @LossSocEvts + Scenario: Case 1: trader1 has insufficient MTM & only trader2 socialises the losses (0002-STTL-009) + Description : Case 1 from https://docs.google.com/spreadsheets/d/1CIPH0aQmIKj6YeFW9ApP_l-jwB4OcsNQ/edit#gid=1555964910 + + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | sellSideProvider | BTC | 100000000 | + | buySideProvider | BTC | 100000000 | + | party1 | BTC | 5000 | + | party2 | BTC | 50000 | + | party3 | BTC | 50000 | + | aux1 | BTC | 100000000 | + | aux2 | BTC | 100000000 | + # setup order book + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/DEC19 | sell | 1000 | 120 | 0 | TYPE_LIMIT | TIF_GTC | sell-provider-1 | + | buySideProvider | ETH/DEC19 | buy | 1000 | 80 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-1 | + | aux1 | ETH/DEC19 | sell | 1 | 120 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-1 | + | aux2 | ETH/DEC19 | buy | 1 | 80 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-1 | + | aux1 | ETH/DEC19 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-2 | + | aux2 | ETH/DEC19 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-2 | + Then the opening auction period ends for market "ETH/DEC19" + And the mark price should be "100" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + # party 1 place an order + we check margins + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/DEC19 | sell | 100 | 100 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + # then party2 place an order, and we calculate the margins again + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party2 | ETH/DEC19 | buy | 100 | 100 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + # then we change the volume in the book + Then the parties cancel the following orders: + | party | reference | + | sellSideProvider | sell-provider-1 | + | buySideProvider | buy-provider-1 | + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | sellSideProvider | ETH/DEC19 | sell | 1000 | 200 | 0 | TYPE_LIMIT | TIF_GTC | sell-provider-2 | + | buySideProvider | ETH/DEC19 | buy | 1000 | 80 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | + Then the parties cancel the following orders: + | party | reference | + | aux1 | aux-s-1 | + | aux2 | aux-b-1 | + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party2 | ETH/DEC19 | buy | 100 | 180 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | + | party3 | ETH/DEC19 | sell | 100 | 180 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | + Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | party1 | 0 | 0 | -5000 | + | party2 | 200 | 8000 | -2970 | + | party3 | -100 | 0 | 0 | + | aux2 | 1 | 80 | -30 | + And the insurance pool balance should be "0" for the market "ETH/DEC19" + And debug loss socialisation events + And the cumulated balance for all accounts should be worth "400105000" diff --git a/core/integration/features/settlement/insurance-pools-at-settlement.feature b/core/integration/features/settlement/insurance-pools-at-settlement.feature index 9e67760338..b57d17e3e1 100644 --- a/core/integration/features/settlement/insurance-pools-at-settlement.feature +++ b/core/integration/features/settlement/insurance-pools-at-settlement.feature @@ -9,7 +9,7 @@ Feature: Test the transfers to and from the insurance pools when markets termina And the following network parameters are set: | name | value | | market.auction.minimumDuration | 1 | - | market.auction.maximumDuration | 10 | + | market.auction.maximumDuration | 10s | | network.markPriceUpdateMaximumFrequency | 0s | | market.liquidity.successorLaunchWindowLength | 5s | | limits.markets.maxPeggedOrders | 2 | @@ -177,12 +177,12 @@ Feature: Test the transfers to and from the insurance pools when markets termina And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC21" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC22" And the trading mode should be "TRADING_MODE_NO_TRADING" for the market "ETH/DEC23" - And the insurance pool balance should be "1200000" for the market "ETH/DEC19" - And the insurance pool balance should be "1200000" for the market "ETH/DEC20" - And the insurance pool balance should be "1200000" for the market "ETH/DEC21" - And the insurance pool balance should be "1200000" for the market "ETH/DEC22" + And the insurance pool balance should be "1000000" for the market "ETH/DEC19" + And the insurance pool balance should be "1000000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000000" for the market "ETH/DEC21" + And the insurance pool balance should be "1000000" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "200000" for the asset "ETH" + And the global insurance pool balance should be "1000000" for the asset "ETH" # OK, let's terminate a market via governance that is in continuous trading # The successor time window now comes in to play @@ -195,12 +195,12 @@ Feature: Test the transfers to and from the insurance pools when markets termina And the trading mode should be "TRADING_MODE_NO_TRADING" for the market "ETH/DEC22" And the trading mode should be "TRADING_MODE_NO_TRADING" for the market "ETH/DEC23" # insurance pool is not yet distributed - And the insurance pool balance should be "1200000" for the market "ETH/DEC19" - And the insurance pool balance should be "1200000" for the market "ETH/DEC20" - And the insurance pool balance should be "1200000" for the market "ETH/DEC21" - And the insurance pool balance should be "1200000" for the market "ETH/DEC22" + And the insurance pool balance should be "1000000" for the market "ETH/DEC19" + And the insurance pool balance should be "1000000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000000" for the market "ETH/DEC21" + And the insurance pool balance should be "1000000" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "200000" for the asset "ETH" + And the global insurance pool balance should be "1000000" for the asset "ETH" # pass the successor time window When the network moves ahead "10" blocks Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" @@ -209,13 +209,13 @@ Feature: Test the transfers to and from the insurance pools when markets termina #And the trading mode should be "TRADING_MODE_NO_TRADING" for the market "ETH/DEC22" #And the trading mode should be "TRADING_MODE_NO_TRADING" for the market "ETH/DEC23" ## now we should see the update - And the insurance pool balance should be "1500000" for the market "ETH/DEC19" - And the insurance pool balance should be "1500000" for the market "ETH/DEC20" - And the insurance pool balance should be "1500000" for the market "ETH/DEC21" + And the insurance pool balance should be "1000000" for the market "ETH/DEC19" + And the insurance pool balance should be "1000000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000000" for the market "ETH/DEC21" ## Nothing in the drained pool, nothing goes to the insurance pool of the old market And the insurance pool balance should be "0" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "500000" for the asset "ETH" + And the global insurance pool balance should be "2000000" for the asset "ETH" ## Now settle a market via the oracle When the oracles broadcast data signed with "0xCAFECAFE2": @@ -223,36 +223,36 @@ Feature: Test the transfers to and from the insurance pools when markets termina | trading.terminated | true | And the network moves ahead "1" blocks Then the trading mode should be "TRADING_MODE_NO_TRADING" for the market "ETH/DEC21" - And the insurance pool balance should be "1500000" for the market "ETH/DEC19" - And the insurance pool balance should be "1500000" for the market "ETH/DEC20" - And the insurance pool balance should be "1500000" for the market "ETH/DEC21" + And the insurance pool balance should be "1000000" for the market "ETH/DEC19" + And the insurance pool balance should be "1000000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000000" for the market "ETH/DEC21" ## Nothing in the drained pool, nothing goes to the insurance pool of the old market And the insurance pool balance should be "0" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "500000" for the asset "ETH" + And the global insurance pool balance should be "2000000" for the asset "ETH" # Moving past the successor window means nothing here, market is not settled When the network moves ahead "10" blocks Then the trading mode should be "TRADING_MODE_NO_TRADING" for the market "ETH/DEC21" - And the insurance pool balance should be "1500000" for the market "ETH/DEC19" - And the insurance pool balance should be "1500000" for the market "ETH/DEC20" - And the insurance pool balance should be "1500000" for the market "ETH/DEC21" + And the insurance pool balance should be "1000000" for the market "ETH/DEC19" + And the insurance pool balance should be "1000000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000000" for the market "ETH/DEC21" ## Nothing in the drained pool, nothing goes to the insurance pool of the old market And the insurance pool balance should be "0" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "500000" for the asset "ETH" + And the global insurance pool balance should be "2000000" for the asset "ETH" ## Now settle the terminated market When the oracles broadcast data signed with "0xCAFECAFE2": | name | value | | prices.ETH.value | 150 | And the network moves ahead "10" blocks - Then the insurance pool balance should be "2000000" for the market "ETH/DEC19" - And the insurance pool balance should be "2000000" for the market "ETH/DEC20" + Then the insurance pool balance should be "1000000" for the market "ETH/DEC19" + And the insurance pool balance should be "1000000" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC21" ## Nothing in the drained pool, nothing goes to the insurance pool of the old market And the insurance pool balance should be "0" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "1000000" for the asset "ETH" + And the global insurance pool balance should be "3000000" for the asset "ETH" ## Now terminate both of the other markets When the oracles broadcast data signed with "0xCAFECAFE1": @@ -263,17 +263,17 @@ Feature: Test the transfers to and from the insurance pools when markets termina | trading.terminated | true | Then the trading mode should be "TRADING_MODE_NO_TRADING" for the market "ETH/DEC20" And the trading mode should be "TRADING_MODE_NO_TRADING" for the market "ETH/DEC19" - And the insurance pool balance should be "2000000" for the market "ETH/DEC19" - And the insurance pool balance should be "2000000" for the market "ETH/DEC20" - And the global insurance pool balance should be "1000000" for the asset "ETH" + And the insurance pool balance should be "1000000" for the market "ETH/DEC19" + And the insurance pool balance should be "1000000" for the market "ETH/DEC20" + And the global insurance pool balance should be "3000000" for the asset "ETH" ## Now settle one market, pass the successor window and ensure the insurance pool is divided between the global insurance pool and the terminated market When the oracles broadcast data signed with "0xCAFECAFE1": | name | value | | prices.ETH.value | 150 | And the network moves ahead "10" blocks - Then the insurance pool balance should be "3000000" for the market "ETH/DEC19" - And the global insurance pool balance should be "2000000" for the asset "ETH" + Then the insurance pool balance should be "1000000" for the market "ETH/DEC19" + And the global insurance pool balance should be "4000000" for the asset "ETH" ## the insurance pools from the settled/cancelled markets are all drained And the insurance pool balance should be "0" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC21" @@ -285,7 +285,7 @@ Feature: Test the transfers to and from the insurance pools when markets termina | name | value | | prices.ETH.value | 150 | And the network moves ahead "10" blocks - And the global insurance pool balance should be "5000000" for the asset "ETH" + And the global insurance pool balance should be "5000000" for the asset "ETH" ## the insurance pools from the settled/cancelled markets are all drained Then the insurance pool balance should be "0" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC20" diff --git a/core/integration/features/settlement/mark_to_market_interval_positions.feature b/core/integration/features/settlement/mark_to_market_interval_positions.feature index d32b3630d0..50340a8449 100644 --- a/core/integration/features/settlement/mark_to_market_interval_positions.feature +++ b/core/integration/features/settlement/mark_to_market_interval_positions.feature @@ -25,6 +25,7 @@ Feature: Check position tracking matches expected behaviour with MTM intervals. | network.markPriceUpdateMaximumFrequency | 5s | | limits.markets.maxPeggedOrders | 2 | + @Liquidation @NoPerp Scenario: 001, using lognormal risk model, set "designatedLoser" closeout while the position of "designatedLoser" is not fully covered by orders on the order book (0007-POSN-013) # setup accounts Given the parties deposit on asset's general account the following amount: @@ -130,20 +131,12 @@ Feature: Check position tracking matches expected behaviour with MTM intervals. When the network moves ahead "4" blocks Then the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | designatedLoser | ETH/DEC19 | 58154 | 69784 | 87231 | 116308 | + | designatedLoser | ETH/DEC19 | 0 | 0 | 0 | 0 | - # insurance pool generation - modify order book - And the parties cancel the following orders: - | party | reference | - | buySideProvider | buy-provider-1 | And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | | buySideProvider | ETH/DEC19 | buy | 290 | 20 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | - Then the parties cancel the following orders: - | party | reference | - | lpprov | peg-3 | - Then the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | | lpprov | ETH/DEC19 | buy | 5800 | 1 | 0 | TYPE_LIMIT | TIF_GTC | peg-5 | @@ -158,46 +151,55 @@ Feature: Check position tracking matches expected behaviour with MTM intervals. Then the following trades should be executed: | buyer | price | size | seller | | buySideProvider | 140 | 1 | sellSideProvider | - | buySideProvider | 20 | 290 | network | - | network | 20 | 290 | designatedLoser | + | network | 150 | 290 | designatedLoser | + | buySideProvider | 140 | 1 | network | + | lpprov | 40 | 225 | network | + | aux | 1 | 10 | network | + | buySideProvider | 20 | 54 | network | - Then the following network trades should be executed: + And the following network trades should be executed: | party | aggressor side | volume | - | buySideProvider | sell | 290 | | designatedLoser | buy | 290 | + | buySideProvider | sell | 1 | + | lpprov | sell | 225 | + | aux | sell | 10 | + | buySideProvider | sell | 54 | + | buySideProvider | buy | 1 | # check positions and verify loss socialisation is reflected in realised P&L (0007-POSN-013) - Then the parties should have the following profit and loss: + And the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | | designatedLoser | 0 | 0 | -17631 | - | buySideProvider | 291 | 34800 | -20649 | + | buySideProvider | 56 | 6480 | -3242 | # check margin levels - Then the parties should have the following margin levels: + And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | | designatedLoser | ETH/DEC19 | 0 | 0 | 0 | 0 | # checking margins - Then the parties should have the following account balances: + And the parties should have the following account balances: | party | asset | market id | margin | general | | designatedLoser | USD | ETH/DEC19 | 0 | 0 | + Then debug transfers # then we make sure the insurance pool collected the funds (however they get later spent on MTM payment to closeout-facilitating party) + Then the following transfers should happen: | from | to | from account | to account | market id | amount | asset | | designatedLoser | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_MAKER | ETH/DEC19 | 0 | USD | | buySideProvider | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC19 | 14 | USD | | designatedLoser | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | ETH/DEC19 | 0 | USD | | market | buySideProvider | ACCOUNT_TYPE_FEES_MAKER | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 0 | USD | - | designatedLoser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/DEC19 | 14151 | USD | - | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 14151 | USD | - | market | buySideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 14151 | USD | - | buySideProvider | buySideProvider | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 76 | USD | - | buySideProvider | buySideProvider | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 21981 | USD | + | designatedLoser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/DEC19 | 17631 | USD | + | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 16608 | USD | + | market | buySideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 3238 | USD | | buySideProvider | buySideProvider | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 76 | USD | - | buySideProvider | buySideProvider | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 45052 | USD | + | buySideProvider | buySideProvider | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 22205 | USD | + | buySideProvider | buySideProvider | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 46 | USD | And the insurance pool balance should be "0" for the market "ETH/DEC19" + @Liquidation @NoPerp Scenario: 002, closeout trade with price outside price mornitoring bounds will not trigger auction 0032-PRIM-019 # setup accounts Given the parties deposit on asset's general account the following amount: @@ -302,20 +304,12 @@ Feature: Check position tracking matches expected behaviour with MTM intervals. When the network moves ahead "4" blocks Then the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | designatedLoser | ETH/DEC20 | 58154 | 69784 | 87231 | 116308 | + | designatedLoser | ETH/DEC20 | 0 | 0 | 0 | 0 | - # insurance pool generation - modify order book - And the parties cancel the following orders: - | party | reference | - | buySideProvider | buy-provider-1 | And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | | buySideProvider | ETH/DEC20 | buy | 290 | 20 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | - Then the parties cancel the following orders: - | party | reference | - | lpprov | peg-3 | - Then the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | | lpprov | ETH/DEC19 | buy | 5800 | 1 | 0 | TYPE_LIMIT | TIF_GTC | peg-5 | @@ -326,28 +320,34 @@ Feature: Check position tracking matches expected behaviour with MTM intervals. | buySideProvider | ETH/DEC20 | buy | 1 | 140 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | And the network moves ahead "6" blocks - And the market data for the market "ETH/DEC20" should be: + Then the market data for the market "ETH/DEC20" should be: | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | best static bid price | static mid price | best static offer price | - | 140 | TRADING_MODE_CONTINUOUS | 3600 | 140 | 161 | 397516 | 9000 | 292 | 1 | 1000 | 2000 | + | 140 | TRADING_MODE_CONTINUOUS | 3600 | 140 | 161 | 199441 | 9000 | 292 | 20 | 1010 | 2000 | - Then the following trades should be executed: + And the following trades should be executed: | buyer | price | size | seller | | buySideProvider | 140 | 1 | sellSideProvider | - | buySideProvider | 20 | 290 | network | - | network | 20 | 290 | designatedLoser | + | network | 150 | 290 | designatedLoser | + | buySideProvider | 140 | 1 | network | + | lpprov | 40 | 225 | network | + | aux | 1 | 10 | network | + | buySideProvider | 20 | 54 | network | # closeout trade price is 20 which is outside price mornitoring bounds, and does not trigger auction And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" Then the following network trades should be executed: | party | aggressor side | volume | - | buySideProvider | sell | 290 | | designatedLoser | buy | 290 | + | buySideProvider | buy | 1 | + | buySideProvider | sell | 1 | + | buySideProvider | sell | 54 | + | lpprov | sell | 225 | + | aux | sell | 10 | Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | | designatedLoser | 0 | 0 | -17631 | - | buySideProvider | 291 | 34800 | -20649 | - + | buySideProvider | 56 | 6480 | -3242 | # check margin levels Then the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | diff --git a/core/integration/features/settlement/mark_to_market_settlement_pdp.feature b/core/integration/features/settlement/mark_to_market_settlement_pdp.feature index c4d406e220..ca3e6ba944 100644 --- a/core/integration/features/settlement/mark_to_market_settlement_pdp.feature +++ b/core/integration/features/settlement/mark_to_market_settlement_pdp.feature @@ -10,6 +10,7 @@ Feature: Test mark to market settlement | network.markPriceUpdateMaximumFrequency | 0s | | limits.markets.maxPeggedOrders | 2 | + @Liquidation Scenario: If settlement amount <= the party’s margin account balance entire settlement amount is transferred from party’s margin account to the market’s temporary settlement account Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -66,7 +67,7 @@ Feature: Test mark to market settlement | party3 | ETH/DEC19 | buy | 1000 | 2000 | 1 | TYPE_LIMIT | TIF_GTC | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | party1 | ETH | ETH/DEC19 | 9000 | 0 | + | party1 | ETH | ETH/DEC19 | 0 | 0 | | party3 | ETH | ETH/DEC19 | 2605 | 7393 | | party2 | ETH | ETH/DEC19 | 2605 | 8394 | @@ -76,15 +77,16 @@ Feature: Test mark to market settlement And the cumulated balance for all accounts should be worth "330000" And the settlement account should have a balance of "0" for the market "ETH/DEC19" + @Liquidation Scenario: If settlement amount > party’s margin account balance and <= party's margin account balance + general account balance for the asset, he full balance of the party’s margin account is transferred to the market’s temporary settlement account the remainder, i.e. difference between the amount transferred from the margin account and the settlement amount, is transferred from the party’s general account for the asset to the market’s temporary settlement account Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | party1 | ETH | 10000 | - | party2 | ETH | 10000 | - | party3 | ETH | 10000 | - | aux | ETH | 100000 | - | aux2 | ETH | 100000 | - | lpprov | ETH | 100000 | + | party | asset | amount | + | party1 | ETH | 10000 | + | party2 | ETH | 10000 | + | party3 | ETH | 100000 | + | aux | ETH | 100000000000 | + | aux2 | ETH | 100000 | + | lpprov | ETH | 100000000000 | When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -129,8 +131,8 @@ Feature: Test mark to market settlement | party3 | ETH/DEC19 | buy | 1000 | 5000 | 1 | TYPE_LIMIT | TIF_GTC | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | party1 | ETH | ETH/DEC19 | 6000 | 0 | - | party3 | ETH | ETH/DEC19 | 5461 | 4534 | + | party1 | ETH | ETH/DEC19 | 0 | 0 | + | party3 | ETH | ETH/DEC19 | 5461 | 94534 | | party2 | ETH | ETH/DEC19 | 5461 | 8538 | Then the following transfers should happen: | from | to | from account | to account | market id | amount | asset | @@ -140,19 +142,20 @@ Feature: Test mark to market settlement # this part show that funds are moved from margin account general account for party 3 as he does not have # enough funds in the margin account And the settlement account should have a balance of "0" for the market "ETH/DEC19" + And debug trades When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | - | party3 | ETH/DEC19 | buy | 1000 | 50 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC19 | sell | 1000 | 50 | 1 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party3 | ETH/DEC19 | buy | 1000 | 50 | 0 | TYPE_LIMIT | TIF_GTC | p3-ref | + | party2 | ETH/DEC19 | sell | 1000 | 50 | 1 | TYPE_LIMIT | TIF_GTC | p2-ref | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | party1 | ETH | ETH/DEC19 | 14002 | 0 | - | party3 | ETH | ETH/DEC19 | 1402 | 4592 | - | party2 | ETH | ETH/DEC19 | 0 | 9997 | + | party1 | ETH | ETH/DEC19 | 0 | 0 | + | party3 | ETH | ETH/DEC19 | 1402 | 94592 | + | party2 | ETH | ETH/DEC19 | 0 | 9997 | Then the following transfers should happen: | from | to | from account | to account | market id | amount | asset | | party3 | party3 | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 660 | ETH | | party3 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 4001 | ETH | - And the cumulated balance for all accounts should be worth "330000" + And the cumulated balance for all accounts should be worth "200000220000" diff --git a/core/integration/features/settlement/settlement_at_expiry_by_time_from_internal_oracle.feature b/core/integration/features/settlement/settlement_at_expiry_by_time_from_internal_oracle.feature index 5ac58b9552..c964d605e2 100644 --- a/core/integration/features/settlement/settlement_at_expiry_by_time_from_internal_oracle.feature +++ b/core/integration/features/settlement/settlement_at_expiry_by_time_from_internal_oracle.feature @@ -300,8 +300,7 @@ Feature: Test settlement at expiry time from internal oracle And the network moves ahead "3" blocks And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the insurance pool balance should be "15000" for the market "ETH/DEC19" - + And the insurance pool balance should be "10000" for the market "ETH/DEC19" Then the market state should be "STATE_ACTIVE" for the market "ETH/DEC19" When the parties place the following orders with ticks: @@ -421,8 +420,9 @@ Feature: Test settlement at expiry time from internal oracle When the network moves ahead "2" blocks Then the cumulated balance for all accounts should be worth "100213000" And the insurance pool balance should be "0" for the market "ETH/DEC19" - # 916 were taken from the insurance pool to cover the losses of party 2, the remaining is split between global and the other market - And the insurance pool balance should be "1042" for the market "ETH/DEC21" + # 916 were taken from the insurance pool to cover the losses of party 2, the remaining is moved to the global insurance pool + And the insurance pool balance should be "1000" for the market "ETH/DEC21" + And the global insurance pool balance should be "84" for the asset "ETH" @SLABug Scenario: Settlement happened when market is being closed - loss socialisation in action - insurance doesn't cover all losses @@ -598,7 +598,8 @@ Feature: Test settlement at expiry time from internal oracle And the cumulated balance for all accounts should be worth "102012000" And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the insurance pool balance should be "750" for the market "ETH/DEC19" + And the insurance pool balance should be "500" for the market "ETH/DEC19" + And the global insurance pool balance should be "500" for the asset "ETH" @Oracle Scenario: Orders can still be placed if the order expiry was sent with the wrong pub key diff --git a/core/integration/features/spots/SpotFunctionalTests/TC-0001-SimpleSpot.feature b/core/integration/features/spots/SpotFunctionalTests/TC-0001-SimpleSpot.feature index f76840a7af..c8fd13c1e6 100644 --- a/core/integration/features/spots/SpotFunctionalTests/TC-0001-SimpleSpot.feature +++ b/core/integration/features/spots/SpotFunctionalTests/TC-0001-SimpleSpot.feature @@ -1,5 +1,7 @@ Feature: Simple Spot Order between two parties match successfully + Scenario: Simple Spot Order matches with counter party + Background: Given the fees configuration named "fees-config-1": | maker fee | infrastructure fee | @@ -27,9 +29,9 @@ Feature: Simple Spot Order between two parties match successfully Then "party1" should have holding account balance of "100" for asset "ETH" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 1 | 100 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 1 | 100 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 1 | 1 | 100 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 1 | 1 | 100 | STATUS_ACTIVE | Then the opening auction period ends for market "BTC/ETH" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH" @@ -39,4 +41,4 @@ Feature: Simple Spot Order between two parties match successfully | buyer | price | size | seller | | party1 | 100 | 1 | party2 | Then "party2" should have holding account balance of "0" for asset "BTC" - Then "party1" should have holding account balance of "0" for asset "ETH" \ No newline at end of file + Then "party1" should have holding account balance of "0" for asset "ETH" diff --git a/core/integration/features/spots/SpotFunctionalTests/TC-0002-SimpleSpot-No-Fill.feature b/core/integration/features/spots/SpotFunctionalTests/TC-0002-SimpleSpot-No-Fill.feature index 7dfd4576bc..f4ad9ba314 100644 --- a/core/integration/features/spots/SpotFunctionalTests/TC-0002-SimpleSpot-No-Fill.feature +++ b/core/integration/features/spots/SpotFunctionalTests/TC-0002-SimpleSpot-No-Fill.feature @@ -1,5 +1,7 @@ Feature: Simple Spot Order between two parties do not match successfully + Scenario: Simple Spot Order does not match with counter party + Background: Given the fees configuration named "fees-config-1": | maker fee | infrastructure fee | @@ -20,16 +22,16 @@ Feature: Simple Spot Order between two parties do not match successfully | party2 | BTC | 100 | # place orders and generate trades And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | party1 | BTC/ETH | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GFA | t1-b-1 | - | party2 | BTC/ETH | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | t2-s-1 | + | party | market id | side | volume | volume | price | resulting trades | type | tif | reference | + | party1 | BTC/ETH | buy | 1 | 1 | 100 | 0 | TYPE_LIMIT | TIF_GFA | t1-b-1 | + | party2 | BTC/ETH | sell | 1 | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | t2-s-1 | Then "party2" should have holding account balance of "1" for asset "BTC" Then "party1" should have holding account balance of "100" for asset "ETH" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 1 | 100 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 1 | 200 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 1 | 1 | 100 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 1 | 1 | 200 | STATUS_ACTIVE | Then the opening auction period ends for market "BTC/ETH" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "BTC/ETH" diff --git a/core/integration/features/spots/SpotFunctionalTests/TC-0003-Spot-OrderAmend-Price-Down.feature b/core/integration/features/spots/SpotFunctionalTests/TC-0003-Spot-OrderAmend-Price-Down.feature index afaa4dfc92..afa94bb4a6 100644 --- a/core/integration/features/spots/SpotFunctionalTests/TC-0003-Spot-OrderAmend-Price-Down.feature +++ b/core/integration/features/spots/SpotFunctionalTests/TC-0003-Spot-OrderAmend-Price-Down.feature @@ -1,4 +1,5 @@ Feature: Amend the price down to match and fill the order with counter party + Scenario: Amend the price down to match and fill the order with counter party Background: @@ -28,9 +29,9 @@ Feature: Amend the price down to match and fill the order with counter party Then "party1" should have holding account balance of "300" for asset "ETH" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 1 | 300 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 1 | 400 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 1 | 1 | 300 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 1 | 1 | 400 | STATUS_ACTIVE | And the parties amend the following orders: | party | reference | price | size delta | tif | @@ -45,4 +46,4 @@ Feature: Amend the price down to match and fill the order with counter party | buyer | price | size | seller | | party1 | 100 | 1 | party2 | Then "party2" should have holding account balance of "0" for asset "BTC" - Then "party1" should have holding account balance of "0" for asset "ETH" \ No newline at end of file + Then "party1" should have holding account balance of "0" for asset "ETH" diff --git a/core/integration/features/spots/SpotFunctionalTests/TC-0004-Spot-OrderAmend-QuantityDown.feature b/core/integration/features/spots/SpotFunctionalTests/TC-0004-Spot-OrderAmend-QuantityDown.feature index 3a7cfe5933..1c40d7655e 100644 --- a/core/integration/features/spots/SpotFunctionalTests/TC-0004-Spot-OrderAmend-QuantityDown.feature +++ b/core/integration/features/spots/SpotFunctionalTests/TC-0004-Spot-OrderAmend-QuantityDown.feature @@ -1,4 +1,5 @@ Feature: Amend the quantity down for a spot order + Scenario: Amend the quantity down for a spot order Background: @@ -28,9 +29,9 @@ Feature: Amend the quantity down for a spot order Then "party1" should have holding account balance of "200" for asset "ETH" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 2 | 100 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 2 | 100 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 2 | 2 | 100 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 2 | 2 | 100 | STATUS_ACTIVE | And the parties amend the following orders: | party | reference | price | size delta | tif | @@ -38,9 +39,9 @@ Feature: Amend the quantity down for a spot order | party2 | t2-s-1 | 100 | -1 | TIF_GTC | Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 1 | 100 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 1 | 100 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 1 | 1 | 100 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 1 | 1 | 100 | STATUS_ACTIVE | Then the opening auction period ends for market "BTC/ETH" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH" @@ -50,4 +51,4 @@ Feature: Amend the quantity down for a spot order | buyer | price | size | seller | | party1 | 100 | 1 | party2 | Then "party2" should have holding account balance of "0" for asset "BTC" - Then "party1" should have holding account balance of "0" for asset "ETH" \ No newline at end of file + Then "party1" should have holding account balance of "0" for asset "ETH" diff --git a/core/integration/features/spots/SpotFunctionalTests/TC-0005-Spot-OrderAmend-Price-And-Quantity.feature b/core/integration/features/spots/SpotFunctionalTests/TC-0005-Spot-OrderAmend-Price-And-Quantity.feature index 38cb6be34b..9e70ae7df0 100644 --- a/core/integration/features/spots/SpotFunctionalTests/TC-0005-Spot-OrderAmend-Price-And-Quantity.feature +++ b/core/integration/features/spots/SpotFunctionalTests/TC-0005-Spot-OrderAmend-Price-And-Quantity.feature @@ -1,4 +1,5 @@ Feature: Amend the price and quantity amend to match and fill the order with counter party + Scenario: Amend the price and quantity match and fill the order with counter party Background: @@ -28,9 +29,9 @@ Feature: Amend the price and quantity amend to match and fill the order with cou Then "party1" should have holding account balance of "600" for asset "ETH" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 2 | 300 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 2 | 400 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 2 | 2 | 300 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 2 | 2 | 400 | STATUS_ACTIVE | And the parties amend the following orders: | party | reference | price | size delta | tif | @@ -38,9 +39,9 @@ Feature: Amend the price and quantity amend to match and fill the order with cou | party1 | t1-b-1 | 350 | -1 | TIF_GTC | Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 1 | 350 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 1 | 350 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 1 | 1 | 350 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 1 | 1 | 350 | STATUS_ACTIVE | Then the opening auction period ends for market "BTC/ETH" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH" @@ -51,4 +52,4 @@ Feature: Amend the price and quantity amend to match and fill the order with cou | party1 | 350 | 1 | party2 | Then "party2" should have holding account balance of "0" for asset "BTC" - Then "party1" should have holding account balance of "0" for asset "ETH" \ No newline at end of file + Then "party1" should have holding account balance of "0" for asset "ETH" diff --git a/core/integration/features/spots/SpotFunctionalTests/TC-0006-Spot-OrderAmend-Price-Up.feature b/core/integration/features/spots/SpotFunctionalTests/TC-0006-Spot-OrderAmend-Price-Up.feature index f8aba02da0..0fb85d54dd 100644 --- a/core/integration/features/spots/SpotFunctionalTests/TC-0006-Spot-OrderAmend-Price-Up.feature +++ b/core/integration/features/spots/SpotFunctionalTests/TC-0006-Spot-OrderAmend-Price-Up.feature @@ -1,4 +1,5 @@ Feature: Amend the price up to match and fill the order with counter party + Scenario: Amend the price up to match and fill the order with counter party Background: @@ -28,9 +29,9 @@ Feature: Amend the price up to match and fill the order with counter party Then "party1" should have holding account balance of "300" for asset "ETH" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 1 | 300 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 1 | 400 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 1 | 1 | 300 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 1 | 1 | 400 | STATUS_ACTIVE | And the parties amend the following orders: | party | reference | price | size delta | tif | @@ -46,4 +47,4 @@ Feature: Amend the price up to match and fill the order with counter party | party1 | 450 | 1 | party2 | Then "party2" should have holding account balance of "0" for asset "BTC" - Then "party1" should have holding account balance of "0" for asset "ETH" \ No newline at end of file + Then "party1" should have holding account balance of "0" for asset "ETH" diff --git a/core/integration/features/spots/SpotFunctionalTests/TC-0007-Spot-OrderAmend-QuantityUp.feature b/core/integration/features/spots/SpotFunctionalTests/TC-0007-Spot-OrderAmend-QuantityUp.feature index cd4e954d38..abae368993 100644 --- a/core/integration/features/spots/SpotFunctionalTests/TC-0007-Spot-OrderAmend-QuantityUp.feature +++ b/core/integration/features/spots/SpotFunctionalTests/TC-0007-Spot-OrderAmend-QuantityUp.feature @@ -1,4 +1,5 @@ Feature: Amend the quantity increase for a spot order + Scenario: Amend the quantity increase for a spot order Background: @@ -29,9 +30,9 @@ Feature: Amend the quantity increase for a spot order Then "party1" should have holding account balance of "2000" for asset "ETH" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 20 | 100 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 20 | 100 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 20 | 20 | 100 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 20 | 20 | 100 | STATUS_ACTIVE | And the parties amend the following orders: | party | reference | price | size delta | tif | @@ -39,9 +40,9 @@ Feature: Amend the quantity increase for a spot order # | party2 | t2-s-1 | 100 | 1 | TIF_GTC | Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 21 | 100 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 20 | 100 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 21 | 21 | 100 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 20 | 20 | 100 | STATUS_ACTIVE | Then the opening auction period ends for market "BTC/ETH" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH" @@ -52,4 +53,4 @@ Feature: Amend the quantity increase for a spot order | party1 | 100 | 20 | party2 | Then "party2" should have holding account balance of "0" for asset "BTC" - Then "party1" should have holding account balance of "100" for asset "ETH" \ No newline at end of file + Then "party1" should have holding account balance of "100" for asset "ETH" diff --git a/core/integration/features/spots/SpotFunctionalTests/TC-0009-Spot-SamePartyTradesDontMatch.feature b/core/integration/features/spots/SpotFunctionalTests/TC-0009-Spot-SamePartyTradesDontMatch.feature index 3c4af04d0e..3007a099ee 100644 --- a/core/integration/features/spots/SpotFunctionalTests/TC-0009-Spot-SamePartyTradesDontMatch.feature +++ b/core/integration/features/spots/SpotFunctionalTests/TC-0009-Spot-SamePartyTradesDontMatch.feature @@ -1,5 +1,7 @@ Feature: Simple Spot Order between two parties do not match successfully + Scenario: Simple Spot Order does not match with counter party + Background: Given the fees configuration named "fees-config-1": | maker fee | infrastructure fee | @@ -27,9 +29,9 @@ Feature: Simple Spot Order between two parties do not match successfully Then "party1" should have holding account balance of "100" for asset "ETH" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 1 | 100 | STATUS_ACTIVE | - | party1 | BTC/ETH | sell | 1 | 100 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 1 | 1 | 100 | STATUS_ACTIVE | + | party1 | BTC/ETH | sell | 1 | 1 | 100 | STATUS_ACTIVE | Then the opening auction period ends for market "BTC/ETH" @@ -40,9 +42,9 @@ Feature: Simple Spot Order between two parties do not match successfully # see https://github.com/vegaprotocol/specs/blob/95afe22b7807b47e6231b3cdab21f6196b7dab91/protocol/0024-OSTA-order_status.md#wash-trading Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 1 | 100 | STATUS_FILLED | - | party1 | BTC/ETH | sell | 1 | 100 | STATUS_FILLED | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 1 | 0 | 100 | STATUS_FILLED | + | party1 | BTC/ETH | sell | 1 | 0 | 100 | STATUS_FILLED | # now that we're in continuous trading, lets try to do a wash trade by part @@ -55,7 +57,7 @@ Feature: Simple Spot Order between two parties do not match successfully Then "party1" should have holding account balance of "0" for asset "BTC" Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | party1 | BTC/ETH | buy | 1 | 100 | STATUS_ACTIVE | t1-b-111 | - | party1 | BTC/ETH | sell | 1 | 100 | STATUS_STOPPED | t2-s-112 | + | party | market id | side | volume | remaining | price | status | reference | + | party1 | BTC/ETH | buy | 1 | 1 | 100 | STATUS_ACTIVE | t1-b-111 | + | party1 | BTC/ETH | sell | 1 | 1 | 100 | STATUS_STOPPED | t2-s-112 | diff --git a/core/integration/features/spots/SpotFunctionalTests/TC-0010-Spot-Bid-Decimals.feature b/core/integration/features/spots/SpotFunctionalTests/TC-0010-Spot-Bid-Decimals.feature index 0e6623a39a..d39a760631 100644 --- a/core/integration/features/spots/SpotFunctionalTests/TC-0010-Spot-Bid-Decimals.feature +++ b/core/integration/features/spots/SpotFunctionalTests/TC-0010-Spot-Bid-Decimals.feature @@ -1,5 +1,7 @@ Feature: Simple Spot Order between two parties match successfully + Scenario: Simple Spot Order matches with counter party + Background: Given the following assets are registered: | id | decimal places | @@ -31,9 +33,9 @@ Feature: Simple Spot Order between two parties match successfully Then "party1" should have holding account balance of "1000000" for asset "ETH" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 100000 | 10000 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 100000 | 10000 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 100000 | 100000 | 10000 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 100000 | 100000 | 10000 | STATUS_ACTIVE | Then the opening auction period ends for market "BTC/ETH" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH" diff --git a/core/integration/features/spots/SpotFunctionalTests/TC-0011-Spot-Ask-Decimals.feature b/core/integration/features/spots/SpotFunctionalTests/TC-0011-Spot-Ask-Decimals.feature index f76840a7af..c8fd13c1e6 100644 --- a/core/integration/features/spots/SpotFunctionalTests/TC-0011-Spot-Ask-Decimals.feature +++ b/core/integration/features/spots/SpotFunctionalTests/TC-0011-Spot-Ask-Decimals.feature @@ -1,5 +1,7 @@ Feature: Simple Spot Order between two parties match successfully + Scenario: Simple Spot Order matches with counter party + Background: Given the fees configuration named "fees-config-1": | maker fee | infrastructure fee | @@ -27,9 +29,9 @@ Feature: Simple Spot Order between two parties match successfully Then "party1" should have holding account balance of "100" for asset "ETH" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 1 | 100 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 1 | 100 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 1 | 1 | 100 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 1 | 1 | 100 | STATUS_ACTIVE | Then the opening auction period ends for market "BTC/ETH" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH" @@ -39,4 +41,4 @@ Feature: Simple Spot Order between two parties match successfully | buyer | price | size | seller | | party1 | 100 | 1 | party2 | Then "party2" should have holding account balance of "0" for asset "BTC" - Then "party1" should have holding account balance of "0" for asset "ETH" \ No newline at end of file + Then "party1" should have holding account balance of "0" for asset "ETH" diff --git a/core/integration/features/spots/SpotFunctionalTests/TC-0012-Spot-Infra-FeeCalculation.feature b/core/integration/features/spots/SpotFunctionalTests/TC-0012-Spot-Infra-FeeCalculation.feature index 901588b61c..220e1a5ea3 100644 --- a/core/integration/features/spots/SpotFunctionalTests/TC-0012-Spot-Infra-FeeCalculation.feature +++ b/core/integration/features/spots/SpotFunctionalTests/TC-0012-Spot-Infra-FeeCalculation.feature @@ -1,5 +1,7 @@ Feature: Simple Spot Order Market fee and infrastructure fee calculation + Scenario: Simple Spot Order Market fee and infrastructure fee calculation + Background: Given the following network parameters are set: | name | value | @@ -37,9 +39,9 @@ Feature: Simple Spot Order Market fee and infrastructure fee calculation Then "party1" should have holding account balance of "1000" for asset "ETH" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 1 | 100000 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 1 | 100000 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 1 | 1 | 100000 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 1 | 1 | 100000 | STATUS_ACTIVE | Then the opening auction period ends for market "BTC/ETH" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH" diff --git a/core/integration/features/spots/SpotFunctionalTests/TC-0012-Spot-Maker-FeeCalculation.feature b/core/integration/features/spots/SpotFunctionalTests/TC-0012-Spot-Maker-FeeCalculation.feature index 472fd0df5e..a68cae47fc 100644 --- a/core/integration/features/spots/SpotFunctionalTests/TC-0012-Spot-Maker-FeeCalculation.feature +++ b/core/integration/features/spots/SpotFunctionalTests/TC-0012-Spot-Maker-FeeCalculation.feature @@ -1,5 +1,7 @@ Feature: Simple Spot Order Market fee and infrastructure fee calculation + Scenario: Simple Spot Order Market fee and infrastructure fee calculation + Background: Given the following network parameters are set: | name | value | @@ -42,9 +44,9 @@ Feature: Simple Spot Order Market fee and infrastructure fee calculation Then "party1" should have holding account balance of "1000" for asset "ETH" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 1 | 100000 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 1 | 100000 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 1 | 1 | 100000 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 1 | 1 | 100000 | STATUS_ACTIVE | Then the opening auction period ends for market "BTC/ETH" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH" diff --git a/core/integration/features/spots/SpotFunctionalTests/TC-0013-Spot-OrderAmend-account-balance.feature b/core/integration/features/spots/SpotFunctionalTests/TC-0013-Spot-OrderAmend-account-balance.feature index 13705aa25e..7710e2ec08 100644 --- a/core/integration/features/spots/SpotFunctionalTests/TC-0013-Spot-OrderAmend-account-balance.feature +++ b/core/integration/features/spots/SpotFunctionalTests/TC-0013-Spot-OrderAmend-account-balance.feature @@ -1,4 +1,5 @@ Feature: Amend the price up above the account balance + Scenario: Amend the price up above the account balance Background: @@ -28,9 +29,9 @@ Feature: Amend the price up above the account balance Then "party1" should have holding account balance of "300" for asset "ETH" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | BTC/ETH | buy | 1 | 300 | STATUS_ACTIVE | - | party2 | BTC/ETH | sell | 1 | 1100 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | BTC/ETH | buy | 1 | 1 | 300 | STATUS_ACTIVE | + | party2 | BTC/ETH | sell | 1 | 1 | 1100 | STATUS_ACTIVE | Given the parties amend the following orders: | party | reference | price | size delta | tif | error | @@ -51,4 +52,4 @@ Feature: Amend the price up above the account balance | party1 | 1000 | 1 | party2 | Then "party2" should have holding account balance of "0" for asset "BTC" - Then "party1" should have holding account balance of "0" for asset "ETH" \ No newline at end of file + Then "party1" should have holding account balance of "0" for asset "ETH" diff --git a/core/integration/features/spots/opening-auction-expires.feature b/core/integration/features/spots/opening-auction-expires.feature index c12c330067..8579086ff0 100644 --- a/core/integration/features/spots/opening-auction-expires.feature +++ b/core/integration/features/spots/opening-auction-expires.feature @@ -13,7 +13,7 @@ Feature: Set up a spot market, with an opening auction, then uncross the book. M And the following network parameters are set: | name | value | | market.auction.minimumDuration | 5 | - | market.auction.maximumDuration | 10 | + | market.auction.maximumDuration | 10s | And the spot markets: | id | name | base asset | quote asset | risk model | auction duration | fees | price monitoring | sla params | | BTC/ETH | BTC/ETH | BTC | ETH | my-simple-risk-model | 5 | fees-config-1 | default-none | default-basic | diff --git a/core/integration/features/successor-markets-ELS.feature b/core/integration/features/successor-markets-ELS.feature index f08c3dab5b..afacf33cf3 100644 --- a/core/integration/features/successor-markets-ELS.feature +++ b/core/integration/features/successor-markets-ELS.feature @@ -6,16 +6,16 @@ Feature: Simple example of successor markets | name | triggering ratio | time window | scaling factor | | lqm-params | 0.01 | 10s | 10 | And the following network parameters are set: - | name | value | - | network.markPriceUpdateMaximumFrequency | 0s | - | market.auction.minimumDuration | 1 | - | market.fee.factors.infrastructureFee | 0.001 | - | market.fee.factors.makerFee | 0.004 | - | market.value.windowLength | 60s | - | market.liquidity.bondPenaltyParameter | 0.1 | - | validators.epoch.length | 5s | - | market.liquidity.stakeToCcyVolume | 0.2 | - | market.liquidity.successorLaunchWindowLength | 1h | + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + | market.auction.minimumDuration | 1 | + | market.fee.factors.infrastructureFee | 0.001 | + | market.fee.factors.makerFee | 0.004 | + | market.value.windowLength | 60s | + | market.liquidity.bondPenaltyParameter | 0.1 | + | validators.epoch.length | 5s | + | market.liquidity.stakeToCcyVolume | 0.2 | + | market.liquidity.successorLaunchWindowLength | 1h | And the following assets are registered: | id | decimal places | | ETH | 0 | @@ -63,7 +63,7 @@ Feature: Simple example of successor markets | trader4 | USD | 2000000 | | trader5 | USD | 22000 | - @SuccessorMarketActive @NoPerp + @SuccessorMarketActive @NoPerp @Liquidation Scenario: 001 Enact a successor market when the parent market is still active; Two proposals that name the same parent can be submitted; 0081-SUCM-005, 0081-SUCM-006, 0081-SUCM-020, 0081-SUCM-021, 0081-SUCM-022 Given the markets: | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | decimal places | position decimal places | parent market id | insurance pool fraction | successor auction | sla params | @@ -104,21 +104,18 @@ Feature: Simple example of successor markets Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader5 | USD | ETH/DEC19 | 17432 | 0 | + | trader5 | USD | ETH/DEC19 | 0 | 0 | - Then the parties cancel the following orders: - | party | reference | - | trader3 | buy-provider-1 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | trader3 | ETH/DEC19 | buy | 290 | 120 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | - When the parties place the following orders with ticks: + And the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | trader4 | ETH/DEC19 | sell | 1 | 140 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | | trader3 | ETH/DEC19 | buy | 1 | 140 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | - And the insurance pool balance should be "5077" for the market "ETH/DEC19" + Then the insurance pool balance should be "4027" for the market "ETH/DEC19" And the global insurance pool balance should be "0" for the asset "USD" And the liquidity provider fee shares for the market "ETH/DEC19" should be: | party | equity like share | average entry valuation | @@ -143,7 +140,7 @@ Feature: Simple example of successor markets | lpprov3 | USD | ETH/DEC21 | 0 | 19999992000 | 8000 | # market ETH/DEC19 is not settled yet, it still active - And the insurance pool balance should be "5077" for the market "ETH/DEC19" + And the insurance pool balance should be "4027" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC20" And the global insurance pool balance should be "0" for the asset "USD" @@ -168,8 +165,8 @@ Feature: Simple example of successor markets #check assets held to support trader1's orders in market ETH/DEC21 is released Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader1 | USD | ETH/DEC20 | 122 | 1998780 | - | trader1 | USD | ETH/DEC21 | 0 | 1998780 | + | trader1 | USD | ETH/DEC20 | 122 | 2000288 | + | trader1 | USD | ETH/DEC21 | 0 | 2000288 | #check all the orders in market ETH/DEC21 is canceled And the orders should have the following status: @@ -177,8 +174,8 @@ Feature: Simple example of successor markets | trader1 | order1-DEC21 | STATUS_STOPPED | | trader1 | order2-DEC21 | STATUS_STOPPED | - And the insurance pool balance should be "2031" for the market "ETH/DEC19" - And the insurance pool balance should be "3046" for the market "ETH/DEC20" + And the insurance pool balance should be "1611" for the market "ETH/DEC19" + And the insurance pool balance should be "2416" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC21" And the global insurance pool balance should be "0" for the asset "USD" @@ -224,10 +221,10 @@ Feature: Simple example of successor markets | lpprov2 | 0.7272727272727273 | 10000 | When the network moves ahead "1" blocks Then the insurance pool balance should be "0" for the market "ETH/DEC19" - And the insurance pool balance should be "7983" for the market "ETH/DEC20" - And the global insurance pool balance should be "4938" for the asset "USD" + And the insurance pool balance should be "2416" for the market "ETH/DEC20" + And the global insurance pool balance should be "9338" for the asset "USD" - @SuccessorMarketSimple + @SuccessorMarketSimple @Liquidation Scenario: 002 Successor market enacted with parent market still active, ELS is copied over and both states can change independently. 0042-LIQF-031, 0042-LIQF-048, 0042-LIQF-033 Given the markets: | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | decimal places | position decimal places | parent market id | insurance pool fraction | successor auction | sla params | @@ -267,11 +264,8 @@ Feature: Simple example of successor markets Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader5 | USD | ETH/DEC19 | 17432 | 0 | + | trader5 | USD | ETH/DEC19 | 0 | 0 | - Then the parties cancel the following orders: - | party | reference | - | trader3 | buy-provider-1 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | trader3 | ETH/DEC19 | buy | 290 | 120 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | @@ -281,7 +275,7 @@ Feature: Simple example of successor markets | trader4 | ETH/DEC19 | sell | 1 | 140 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | | trader3 | ETH/DEC19 | buy | 1 | 140 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | - And the insurance pool balance should be "5077" for the market "ETH/DEC19" + Then the insurance pool balance should be "4027" for the market "ETH/DEC19" And the global insurance pool balance should be "0" for the asset "USD" And the liquidity provider fee shares for the market "ETH/DEC19" should be: | party | equity like share | average entry valuation | @@ -324,8 +318,8 @@ Feature: Simple example of successor markets | 150 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 82 | 10000 | 1 | And the insurance pool balance should be "0" for the market "ETH/DEC19" - And the insurance pool balance should be "10336" for the market "ETH/DEC20" - And the global insurance pool balance should be "2585" for the asset "USD" + And the insurance pool balance should be "7052" for the market "ETH/DEC20" + And the global insurance pool balance should be "4702" for the asset "USD" #this is from ETH/DEC19 market And the liquidity provider fee shares for the market "ETH/DEC20" should be: @@ -347,7 +341,7 @@ Feature: Simple example of successor markets | lpprov2 | 0.7272727272727273 | 11750 | - @SuccessorMarketActive @NoPerp + @SuccessorMarketActive @NoPerp @Liquidation Scenario: 003 Enact a successor market while the parent is still active. Pending successors get rejected Given the markets: | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | decimal places | position decimal places | parent market id | insurance pool fraction | successor auction | sla params | @@ -388,11 +382,8 @@ Feature: Simple example of successor markets Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader5 | USD | ETH/DEC19 | 17432 | 0 | + | trader5 | USD | ETH/DEC19 | 0 | 0 | - Then the parties cancel the following orders: - | party | reference | - | trader3 | buy-provider-1 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | trader3 | ETH/DEC19 | buy | 290 | 120 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | @@ -402,7 +393,7 @@ Feature: Simple example of successor markets | trader4 | ETH/DEC19 | sell | 1 | 140 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | | trader3 | ETH/DEC19 | buy | 1 | 140 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | - And the insurance pool balance should be "5077" for the market "ETH/DEC19" + And the insurance pool balance should be "4027" for the market "ETH/DEC19" And the global insurance pool balance should be "0" for the asset "USD" And the liquidity provider fee shares for the market "ETH/DEC19" should be: | party | equity like share | average entry valuation | @@ -419,7 +410,7 @@ Feature: Simple example of successor markets #market ETH/DEC19 is not settled yet, it still active - And the insurance pool balance should be "5077" for the market "ETH/DEC19" + And the insurance pool balance should be "4027" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC20" And the global insurance pool balance should be "0" for the asset "USD" When the successor market "ETH/DEC20" is enacted @@ -435,8 +426,8 @@ Feature: Simple example of successor markets And the market data for the market "ETH/DEC20" should be: | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | | 150 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 82 | 10000 | 1 | - And the insurance pool balance should be "2031" for the market "ETH/DEC19" - And the insurance pool balance should be "3046" for the market "ETH/DEC20" + And the insurance pool balance should be "1611" for the market "ETH/DEC19" + And the insurance pool balance should be "2416" for the market "ETH/DEC20" And the global insurance pool balance should be "0" for the asset "USD" # this is from ETH/DEC19 market @@ -481,11 +472,11 @@ Feature: Simple example of successor markets | lpprov2 | 0.8 | 10000 | When the network moves ahead "1" blocks Then the insurance pool balance should be "0" for the market "ETH/DEC19" - And the insurance pool balance should be "7983" for the market "ETH/DEC20" - And the global insurance pool balance should be "4938" for the asset "USD" + And the insurance pool balance should be "2416" for the market "ETH/DEC20" + And the global insurance pool balance should be "9338" for the asset "USD" - @SuccessorMarketExpires2 + @SuccessorMarketExpires2 @Liquidation Scenario: 004 Enact a successor market while the parent is still active. Pending successors get rejected Given the markets: | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | decimal places | position decimal places | parent market id | insurance pool fraction | successor auction | sla params | @@ -527,11 +518,8 @@ Feature: Simple example of successor markets Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader5 | USD | ETH/DEC19 | 17432 | 0 | + | trader5 | USD | ETH/DEC19 | 0 | 0 | - Then the parties cancel the following orders: - | party | reference | - | trader3 | buy-provider-1 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | trader3 | ETH/DEC19 | buy | 290 | 120 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | @@ -541,7 +529,7 @@ Feature: Simple example of successor markets | trader4 | ETH/DEC19 | sell | 1 | 140 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | | trader3 | ETH/DEC19 | buy | 1 | 140 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | - Then the insurance pool balance should be "5077" for the market "ETH/DEC19" + Then the insurance pool balance should be "4027" for the market "ETH/DEC19" Then the insurance pool balance should be "0" for the market "ETH/DEC20" And the global insurance pool balance should be "0" for the asset "USD" And the liquidity provider fee shares for the market "ETH/DEC19" should be: @@ -549,7 +537,7 @@ Feature: Simple example of successor markets | lpprov1 | 0.9 | 9000 | | lpprov2 | 0.1 | 10000 | - And the insurance pool balance should be "5077" for the market "ETH/DEC19" + And the insurance pool balance should be "4027" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC20" And the global insurance pool balance should be "0" for the asset "USD" @@ -561,8 +549,8 @@ Feature: Simple example of successor markets And the successor market "ETH/DEC20" is enacted When the network moves ahead "5" blocks Then the insurance pool balance should be "0" for the market "ETH/DEC19" - Then the insurance pool balance should be "6460" for the market "ETH/DEC20" - And the global insurance pool balance should be "6461" for the asset "USD" + Then the insurance pool balance should be "0" for the market "ETH/DEC20" + And the global insurance pool balance should be "11754" for the asset "USD" # make LP commitment while market is still pending Then the parties submit the following liquidity provision: @@ -583,8 +571,8 @@ Feature: Simple example of successor markets | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | | 150 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 82 | 10000 | 1 | And the insurance pool balance should be "0" for the market "ETH/DEC19" - And the insurance pool balance should be "6460" for the market "ETH/DEC20" - And the global insurance pool balance should be "6461" for the asset "USD" + And the insurance pool balance should be "0" for the market "ETH/DEC20" + And the global insurance pool balance should be "11754" for the asset "USD" # this is from ETH/DEC19 market And the liquidity provider fee shares for the market "ETH/DEC20" should be: @@ -606,5 +594,5 @@ Feature: Simple example of successor markets | lpprov2 | 0.7272727272727273 | 10000 | When the network moves ahead "1" blocks Then the insurance pool balance should be "0" for the market "ETH/DEC19" - And the insurance pool balance should be "6460" for the market "ETH/DEC20" - And the global insurance pool balance should be "6461" for the asset "USD" + And the insurance pool balance should be "0" for the market "ETH/DEC20" + And the global insurance pool balance should be "11754" for the asset "USD" diff --git a/core/integration/features/successor-markets-SLA.feature b/core/integration/features/successor-markets-SLA.feature index 4534dfa3cb..f097511445 100644 --- a/core/integration/features/successor-markets-SLA.feature +++ b/core/integration/features/successor-markets-SLA.feature @@ -71,7 +71,7 @@ Feature: Simple example of successor markets | trader4 | USD | 2000000 | | trader5 | USD | 22000 | - @SuccessorMarketActive + @SuccessorMarketActive @Liquidation Scenario: 001 Enact a successor market when the parent market is still active; Two proposals that name the same parent can be submitted; 0081-SUCM-005, 0081-SUCM-006, 0081-SUCM-020, 0081-SUCM-021, 0081-SUCM-022 Given the markets: | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | decimal places | position decimal places | parent market id | insurance pool fraction | successor auction | sla params | @@ -192,13 +192,11 @@ Feature: Simple example of successor markets Then the parties should have the following account balances: | party | asset | market id | margin | general | - | lpprov1 | USD | ETH/DEC19 | 0 | 1999996905 | - | lpprov2 | USD | ETH/DEC19 | 0 | 19999999657 | + | lpprov1 | USD | ETH/DEC19 | 0 | 1999996905 | + | lpprov2 | USD | ETH/DEC19 | 0 | 19999999657 | | trader1 | USD | ETH/DEC19 | 0 | 1999990 | | trader2 | USD | ETH/DEC19 | 0 | 2000010 | | trader3 | USD | ETH/DEC19 | 0 | 2005924 | | trader4 | USD | ETH/DEC19 | 0 | 2003075 | | trader5 | USD | ETH/DEC19 | 0 | 0 | - - diff --git a/core/integration/features/successor-markets-expiration.feature b/core/integration/features/successor-markets-expiration.feature index 7fb62124cb..840fcc737f 100644 --- a/core/integration/features/successor-markets-expiration.feature +++ b/core/integration/features/successor-markets-expiration.feature @@ -25,20 +25,20 @@ Feature: Simple example of successor markets | trading.terminated | TYPE_BOOLEAN | trading termination | And the settlement data decimals for the oracle named "ethDec20Oracle" is given in "5" decimal places And the liquidity monitoring parameters: - | name | triggering ratio | time window | scaling factor | - | lqm-params | 0.01 | 10s | 5 | - + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.01 | 10s | 5 | + And the following network parameters are set: - | name | value | - | network.markPriceUpdateMaximumFrequency | 0s | - | market.auction.minimumDuration | 1 | - | market.fee.factors.infrastructureFee | 0.001 | - | market.fee.factors.makerFee | 0.004 | - | market.value.windowLength | 60s | - | market.liquidity.bondPenaltyParameter | 0.1 | - | validators.epoch.length | 5s | - | market.liquidity.stakeToCcyVolume | 0.2 | - | market.liquidity.successorLaunchWindowLength | 8s | + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + | market.auction.minimumDuration | 1 | + | market.fee.factors.infrastructureFee | 0.001 | + | market.fee.factors.makerFee | 0.004 | + | market.value.windowLength | 60s | + | market.liquidity.bondPenaltyParameter | 0.1 | + | validators.epoch.length | 5s | + | market.liquidity.stakeToCcyVolume | 0.2 | + | market.liquidity.successorLaunchWindowLength | 8s | And the average block duration is "1" @@ -53,9 +53,8 @@ Feature: Simple example of successor markets | trader4 | ETH | 10000000000000000000000000 | | trader5 | ETH | 10000000000000000000000000 | - @SuccessorMarketExpires - Scenario: 0081-SUCM-007 Enact a successor market once the parent market is settled, and the succession window has expired + Scenario: 0081-SUCM-035 Enact a successor market once the parent market is settled, and the succession window has expired Given the markets: | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | decimal places | position decimal places | parent market id | insurance pool fraction | successor auction | sla params | | ETH/DEC19 | ETH | ETH | lqm-params | default-st-risk-model | default-margin-calculator | 1 | default-none | default-none | ethDec19Oracle | 0.1 | 0 | 5 | 5 | | | | default-futures | @@ -90,7 +89,7 @@ Feature: Simple example of successor markets When the oracles broadcast data signed with "0xCAFECAFE1": | name | value | | trading.terminated | true | - | prices.ETH.value | 975 | + | prices.ETH.value | 975 | Then the market state should be "STATE_SETTLED" for the market "ETH/DEC19" # enactment timestamp @@ -116,8 +115,8 @@ Feature: Simple example of successor markets And the last market state should be "STATE_SETTLED" for the market "ETH/DEC19" And the last market state should be "STATE_PENDING" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC19" - And the insurance pool balance should be "1500" for the market "ETH/DEC20" - And the global insurance pool balance should be "500" for the asset "ETH" + And the insurance pool balance should be "1000" for the market "ETH/DEC20" + And the global insurance pool balance should be "1000" for the asset "ETH" And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -136,16 +135,15 @@ Feature: Simple example of successor markets When the opening auction period ends for market "ETH/DEC20" Then the market data for the market "ETH/DEC20" should be: | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | - | 976 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 134907600000 | 1905000000000000 | 5 | + | 976 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 134907600000 | 1905000000000000 | 5 | # Average entry valuation, though the stake is less/different is not carried over When the network moves ahead "2" blocks And the liquidity provider fee shares for the market "ETH/DEC20" should be: | party | equity like share | average entry valuation | - | lpprov | 1 | 1905000000000000 | + | lpprov | 1 | 1905000000000000 | And the last market state should be "STATE_SETTLED" for the market "ETH/DEC19" And the last market state should be "STATE_ACTIVE" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC19" - And the insurance pool balance should be "1500" for the market "ETH/DEC20" - And the global insurance pool balance should be "500" for the asset "ETH" - + And the insurance pool balance should be "1000" for the market "ETH/DEC20" + And the global insurance pool balance should be "1000" for the asset "ETH" diff --git a/core/integration/features/successor-markets-insurance.feature b/core/integration/features/successor-markets-insurance.feature index e8da45f870..4b7a335bd1 100644 --- a/core/integration/features/successor-markets-insurance.feature +++ b/core/integration/features/successor-markets-insurance.feature @@ -1,4 +1,4 @@ -Feature: Successor markets: Global insurance pool account collects all outstanding funds from closed/expired markets in a risk universe (0013-ACCT-032) +Feature: Successor markets: Global insurance pool account collects all outstanding funds from closed/expired markets in a risk universe (0013-ACCT-032 0013-ACCT-033) Background: Given time is updated to "2019-11-30T00:00:00Z" @@ -144,13 +144,13 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" ## Insurance pool for closed market is distributed - And the insurance pool balance should be "1500" for the market "ETH/DEC19" - And the insurance pool balance should be "2500" for the market "ETH/DEC20" + And the insurance pool balance should be "500" for the market "ETH/DEC19" + And the insurance pool balance should be "1500" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC21" And the insurance pool balance should be "0" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "1000" for the asset "USD" + And the global insurance pool balance should be "3000" for the asset "USD" ## Cancel ETH/DEC19 When the market states are updated through governance: @@ -160,9 +160,9 @@ Feature: Successor markets: Global insurance pool account collects all outstandi ## Insurance pool for closed market is distributed as two equal parts to the remaining successor ## and the global insurance pool And the insurance pool balance should be "0" for the market "ETH/DEC19" - And the insurance pool balance should be "3250" for the market "ETH/DEC20" + And the insurance pool balance should be "1500" for the market "ETH/DEC20" - And the global insurance pool balance should be "1750" for the asset "USD" + And the global insurance pool balance should be "3500" for the asset "USD" And the network moves ahead "1" blocks @@ -181,8 +181,8 @@ Feature: Successor markets: Global insurance pool account collects all outstandi Then the market state should be "STATE_SETTLED" for the market "ETH/DEC20" And then the network moves ahead "1" blocks - And the insurance pool balance should be "3250" for the market "ETH/DEC20" - And the global insurance pool balance should be "1750" for the asset "USD" + And the insurance pool balance should be "1500" for the market "ETH/DEC20" + And the global insurance pool balance should be "3500" for the asset "USD" And the network moves ahead "10" blocks @@ -257,12 +257,12 @@ Feature: Successor markets: Global insurance pool account collects all outstandi ## The balance from the settled parent market gets distributed equally among the remaining ## 4 successor markets in TRADING_MODE_OPENING_AUCTION and the global insurance pool And the insurance pool balance should be "0" for the market "ETH/DEC19" - And the insurance pool balance should be "1200" for the market "ETH/DEC20" - And the insurance pool balance should be "1200" for the market "ETH/DEC21" - And the insurance pool balance should be "1200" for the market "ETH/DEC22" - And the insurance pool balance should be "1200" for the market "ETH/DEC23" + And the insurance pool balance should be "1000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000" for the market "ETH/DEC21" + And the insurance pool balance should be "1000" for the market "ETH/DEC22" + And the insurance pool balance should be "1000" for the market "ETH/DEC23" - And the global insurance pool balance should be "200" for the asset "USD" + And the global insurance pool balance should be "1000" for the asset "USD" ## Get one of the successors into continous mode And the parties place the following orders: @@ -283,31 +283,32 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC23" ## Insurance pool balances are not changed at this point - And the insurance pool balance should be "1200" for the market "ETH/DEC20" - And the insurance pool balance should be "1200" for the market "ETH/DEC21" - And the insurance pool balance should be "1200" for the market "ETH/DEC22" - And the insurance pool balance should be "1200" for the market "ETH/DEC23" + And the insurance pool balance should be "1000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000" for the market "ETH/DEC21" + And the insurance pool balance should be "1000" for the market "ETH/DEC22" + And the insurance pool balance should be "1000" for the market "ETH/DEC23" + And the global insurance pool balance should be "1000" for the asset "USD" ## Cancel ETH/DEC20 When the market states are updated through governance: | market id | state | settlement price | | ETH/DEC20 | MARKET_STATE_UPDATE_TYPE_TERMINATE | 150 | - And the insurance pool balance should be "1200" for the market "ETH/DEC20" - And the insurance pool balance should be "1200" for the market "ETH/DEC21" - And the insurance pool balance should be "1200" for the market "ETH/DEC22" - And the insurance pool balance should be "1200" for the market "ETH/DEC23" + And the insurance pool balance should be "1000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000" for the market "ETH/DEC21" + And the insurance pool balance should be "1000" for the market "ETH/DEC22" + And the insurance pool balance should be "1000" for the market "ETH/DEC23" And the network moves ahead "10" blocks - ## Insurance balance from ETH/DEC20 is distributed amond existing successor markets + ## Insurance balance from ETH/DEC20 is moved to global insurance account ## and the global insurance pool And the insurance pool balance should be "0" for the market "ETH/DEC20" - And the insurance pool balance should be "1500" for the market "ETH/DEC21" - And the insurance pool balance should be "1500" for the market "ETH/DEC22" - And the insurance pool balance should be "1500" for the market "ETH/DEC23" + And the insurance pool balance should be "1000" for the market "ETH/DEC21" + And the insurance pool balance should be "1000" for the market "ETH/DEC22" + And the insurance pool balance should be "1000" for the market "ETH/DEC23" - And the global insurance pool balance should be "500" for the asset "USD" + And the global insurance pool balance should be "2000" for the asset "USD" ## Now we need to cancel the remaining successor markets one by one. ## Cancel ETH/DEC21 @@ -318,10 +319,10 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the network moves ahead "10" blocks And the insurance pool balance should be "0" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the insurance pool balance should be "2000" for the market "ETH/DEC22" - And the insurance pool balance should be "2000" for the market "ETH/DEC23" + And the insurance pool balance should be "1000" for the market "ETH/DEC22" + And the insurance pool balance should be "1000" for the market "ETH/DEC23" - And the global insurance pool balance should be "1000" for the asset "USD" + And the global insurance pool balance should be "3000" for the asset "USD" ## Cancel ETH/DEC22 When the market states are updated through governance: @@ -332,9 +333,9 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the insurance pool balance should be "0" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC21" And the insurance pool balance should be "0" for the market "ETH/DEC22" - And the insurance pool balance should be "3000" for the market "ETH/DEC23" + And the insurance pool balance should be "1000" for the market "ETH/DEC23" - And the global insurance pool balance should be "2000" for the asset "USD" + And the global insurance pool balance should be "4000" for the asset "USD" ## Cancel ETH/DEC23 When the market states are updated through governance: @@ -423,26 +424,26 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the network moves ahead "2" blocks Then the mark price should be "150" for the market "ETH/DEC21" - Then the mark price should be "0" for the market "ETH/DEC19" + Then the mark price should be "150" for the market "ETH/DEC19" ## The enacted successor market caused the rest of the successors to be closed. - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC21" ## Insurance pool balances for canceled successors got distributed as: ## 50% to the enacted successor, remaining amount in two parts 1:2 to the parent and global insurance pool - And the insurance pool balance should be "1500" for the market "ETH/DEC19" + And the insurance pool balance should be "500" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC20" - And the insurance pool balance should be "2500" for the market "ETH/DEC21" + And the insurance pool balance should be "1500" for the market "ETH/DEC21" And the insurance pool balance should be "0" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "1000" for the asset "USD" + And the global insurance pool balance should be "3000" for the asset "USD" And the network moves ahead "10" blocks ## Market price for the parent is still 0 and it is in TRADING_MODE_OPENING_AUCTION - Then the mark price should be "0" for the market "ETH/DEC19" - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + Then the mark price should be "150" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" ## Mark price for the earlier traded ETH/DEC21 is already 150 Then the mark price should be "150" for the market "ETH/DEC21" @@ -454,28 +455,27 @@ Feature: Successor markets: Global insurance pool account collects all outstandi | ETH/DEC21 | MARKET_STATE_UPDATE_TYPE_TERMINATE | 150 | And the network moves ahead "1" blocks - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" - And the insurance pool balance should be "1500" for the market "ETH/DEC19" - And the insurance pool balance should be "2500" for the market "ETH/DEC21" + And the insurance pool balance should be "500" for the market "ETH/DEC19" + And the insurance pool balance should be "1500" for the market "ETH/DEC21" And the insurance pool balance should be "0" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "1000" for the asset "USD" + And the global insurance pool balance should be "3000" for the asset "USD" And the network moves ahead "10" blocks - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" - ## After ETH/DEC21 was canceled it distributed its insurance pool balance as - ## 1250 to parent and 1250 to the global insurance pool - And the insurance pool balance should be "2750" for the market "ETH/DEC19" + ## After ETH/DEC21 was canceled its insurance pool balance is moved into the global insurance account + And the insurance pool balance should be "500" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC21" And the insurance pool balance should be "0" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "2250" for the asset "USD" + And the global insurance pool balance should be "4500" for the asset "USD" ## Cancel ETH/DEC19 When the market states are updated through governance: @@ -564,26 +564,26 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the network moves ahead "2" blocks Then the mark price should be "150" for the market "ETH/DEC21" - Then the mark price should be "0" for the market "ETH/DEC19" + Then the mark price should be "150" for the market "ETH/DEC19" ## The enacted successor market caused the rest of the successors to be closed. - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC21" ## Insurance pool balances for canceled successors got distributed as: - ## 50% to the enacted successor, remaining amount in two parts 1:2 to the parent and global insurance pool - And the insurance pool balance should be "1500" for the market "ETH/DEC19" + ## 50% to the enacted successor, remaining amount in two parts 1:2 to the parent and global insurance account + And the insurance pool balance should be "500" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC20" - And the insurance pool balance should be "2500" for the market "ETH/DEC21" + And the insurance pool balance should be "1500" for the market "ETH/DEC21" And the insurance pool balance should be "0" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "1000" for the asset "USD" + And the global insurance pool balance should be "3000" for the asset "USD" And the network moves ahead "10" blocks ## Market price for the parent is still 0 and it is in TRADING_MODE_OPENING_AUCTION - Then the mark price should be "0" for the market "ETH/DEC19" - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + Then the mark price should be "150" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" ## Mark price for the earlier traded ETH/DEC21 is already 150 Then the mark price should be "150" for the market "ETH/DEC21" @@ -603,28 +603,27 @@ Feature: Successor markets: Global insurance pool account collects all outstandi Then the market state should be "STATE_SETTLED" for the market "ETH/DEC21" And the network moves ahead "1" blocks - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" - And the insurance pool balance should be "1500" for the market "ETH/DEC19" - And the insurance pool balance should be "2500" for the market "ETH/DEC21" + And the insurance pool balance should be "500" for the market "ETH/DEC19" + And the insurance pool balance should be "1500" for the market "ETH/DEC21" And the insurance pool balance should be "0" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "1000" for the asset "USD" + And the global insurance pool balance should be "3000" for the asset "USD" And the network moves ahead "10" blocks - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" - ## After ETH/DEC21 was canceled it distributed its insurance pool balance as - ## 1250 to parent and 1250 to the global insurance pool - And the insurance pool balance should be "2750" for the market "ETH/DEC19" + ## After ETH/DEC21 was canceled - its insurance pool balance is moved into the global insruance account + And the insurance pool balance should be "500" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC21" And the insurance pool balance should be "0" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "2250" for the asset "USD" + And the global insurance pool balance should be "4500" for the asset "USD" ## Cancel ETH/DEC19 When the market states are updated through governance: @@ -679,16 +678,10 @@ Feature: Successor markets: Global insurance pool account collects all outstandi | lpprov1 | ETH/DEC19 | buy | 225 | 40 | 0 | TYPE_LIMIT | TIF_GTC | | lpprov1 | ETH/DEC19 | sell | 36 | 250 | 0 | TYPE_LIMIT | TIF_GTC | | trader1 | ETH/DEC21 | buy | 10 | 1 | 0 | TYPE_LIMIT | TIF_GTC | - | trader1 | ETH/DEC21 | sell | 10 | 2000 | 0 | TYPE_LIMIT | TIF_GTC | | trader1 | ETH/DEC21 | buy | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | - | trader2 | ETH/DEC21 | sell | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | | lpprov1 | ETH/DEC21 | buy | 225 | 40 | 0 | TYPE_LIMIT | TIF_GTC | - | lpprov1 | ETH/DEC21 | sell | 36 | 250 | 0 | TYPE_LIMIT | TIF_GTC | - | trader1 | ETH/DEC22 | buy | 10 | 1 | 0 | TYPE_LIMIT | TIF_GTC | | trader1 | ETH/DEC22 | sell | 10 | 2000 | 0 | TYPE_LIMIT | TIF_GTC | - | trader1 | ETH/DEC22 | buy | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | | trader2 | ETH/DEC22 | sell | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | - | lpprov1 | ETH/DEC22 | buy | 225 | 40 | 0 | TYPE_LIMIT | TIF_GTC | | lpprov1 | ETH/DEC22 | sell | 36 | 250 | 0 | TYPE_LIMIT | TIF_GTC | And the network moves ahead "1" blocks @@ -712,10 +705,10 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the global insurance pool balance should be "0" for the asset "USD" And the network moves ahead "10" blocks - Then the mark price should be "0" for the market "ETH/DEC19" + Then the mark price should be "150" for the market "ETH/DEC19" Then the mark price should be "0" for the market "ETH/DEC21" Then the mark price should be "0" for the market "ETH/DEC22" - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC20" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC21" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC22" @@ -724,21 +717,18 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | trader1 | ETH/DEC23 | buy | 10 | 1 | 0 | TYPE_LIMIT | TIF_GTC | - | trader1 | ETH/DEC23 | sell | 10 | 2000 | 0 | TYPE_LIMIT | TIF_GTC | | trader1 | ETH/DEC23 | buy | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | - | trader2 | ETH/DEC23 | sell | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | | lpprov2 | ETH/DEC23 | buy | 225 | 40 | 0 | TYPE_LIMIT | TIF_GTC | - | lpprov2 | ETH/DEC23 | sell | 36 | 250 | 0 | TYPE_LIMIT | TIF_GTC | And the network moves ahead "2" blocks Then the mark price should be "0" for the market "ETH/DEC23" Then the mark price should be "0" for the market "ETH/DEC21" Then the mark price should be "0" for the market "ETH/DEC22" - Then the mark price should be "0" for the market "ETH/DEC19" + Then the mark price should be "150" for the market "ETH/DEC19" ## The enacted successor market caused the rest of the successors to be closed. - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC20" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC21" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC22" @@ -757,7 +747,7 @@ Feature: Successor markets: Global insurance pool account collects all outstandi Then the mark price should be "0" for the market "ETH/DEC23" Then the mark price should be "0" for the market "ETH/DEC21" Then the mark price should be "0" for the market "ETH/DEC22" - Then the mark price should be "0" for the market "ETH/DEC19" + Then the mark price should be "150" for the market "ETH/DEC19" ## Settle one of the successors that initially had orders Then the oracles broadcast data signed with "0xCAFECABB": @@ -771,19 +761,19 @@ Feature: Successor markets: Global insurance pool account collects all outstandi | prices.ETH.value | 14000000 | And the network moves ahead "2" blocks - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC20" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC22" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC23" - ## Settled successor distributed its insurance pool balance across in 5 equal parts. - And the insurance pool balance should be "1200" for the market "ETH/DEC19" + ## Settled successor moved into global insurnace account + And the insurance pool balance should be "1000" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the insurance pool balance should be "1200" for the market "ETH/DEC20" - And the insurance pool balance should be "1200" for the market "ETH/DEC22" - And the insurance pool balance should be "1200" for the market "ETH/DEC23" + And the insurance pool balance should be "1000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000" for the market "ETH/DEC22" + And the insurance pool balance should be "1000" for the market "ETH/DEC23" - And the global insurance pool balance should be "200" for the asset "USD" + And the global insurance pool balance should be "1000" for the asset "USD" ## Settle another of the successors that initially had orders Then the oracles broadcast data signed with "0xCAFECACC": @@ -797,20 +787,20 @@ Feature: Successor markets: Global insurance pool account collects all outstandi | prices.ETH.value | 14000000 | And the network moves ahead "2" blocks - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC20" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC23" - ## Settled successor distributed its insurance pool balance across in 4 equal parts. - And the insurance pool balance should be "1500" for the market "ETH/DEC19" + ## Settled successor moved into the global insurance account. + And the insurance pool balance should be "1000" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the insurance pool balance should be "1500" for the market "ETH/DEC20" - And the insurance pool balance should be "1500" for the market "ETH/DEC23" + And the insurance pool balance should be "1000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000" for the market "ETH/DEC23" - And the global insurance pool balance should be "500" for the asset "USD" + And the global insurance pool balance should be "2000" for the asset "USD" And the network moves ahead "10" blocks - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC23" ## Settle ETH/DEC19 @@ -825,15 +815,25 @@ Feature: Successor markets: Global insurance pool account collects all outstandi | prices.ETH.value | 14000000 | And the network moves ahead "1" blocks - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC23" + Then the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC23" - And the insurance pool balance should be "0" for the market "ETH/DEC19" + And the insurance pool balance should be "1000" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the insurance pool balance should be "2000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC22" - And the insurance pool balance should be "2000" for the market "ETH/DEC23" + And the insurance pool balance should be "1000" for the market "ETH/DEC23" - And the global insurance pool balance should be "1000" for the asset "USD" + And the global insurance pool balance should be "2000" for the asset "USD" + ## wait until successor window expires + When the network moves ahead "9" blocks + Then the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC23" + + And the insurance pool balance should be "0" for the market "ETH/DEC19" + And the insurance pool balance should be "0" for the market "ETH/DEC21" + And the insurance pool balance should be "1000" for the market "ETH/DEC20" + And the insurance pool balance should be "0" for the market "ETH/DEC22" + And the insurance pool balance should be "1000" for the market "ETH/DEC23" + And the global insurance pool balance should be "3000" for the asset "USD" ## Cancel the last successor When the market states are updated through governance: @@ -842,11 +842,11 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the insurance pool balance should be "0" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the insurance pool balance should be "3000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "2000" for the asset "USD" + And the global insurance pool balance should be "4000" for the asset "USD" ## Cancel the ETH/DEC20 successor When the market states are updated through governance: @@ -880,10 +880,6 @@ Feature: Successor markets: Global insurance pool account collects all outstandi | lp1 | lpprov1 | ETH/DEC23 | 9000 | 0.1 | submission | | lp2 | lpprov2 | ETH/DEC23 | 1000 | 0.1 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov2 | ETH/DEC21 | 2 | 1 | buy | BID | 500 | 10 | - | lpprov2 | ETH/DEC21 | 2 | 1 | sell | ASK | 500 | 10 | ## Place orders on one of the successor markets And the parties place the following orders: @@ -900,11 +896,8 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | trader1 | ETH/DEC23 | buy | 10 | 1 | 0 | TYPE_LIMIT | TIF_GTC | - | trader1 | ETH/DEC23 | sell | 10 | 2000 | 0 | TYPE_LIMIT | TIF_GTC | | trader1 | ETH/DEC23 | buy | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | - | trader2 | ETH/DEC23 | sell | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | | lpprov2 | ETH/DEC23 | buy | 225 | 40 | 0 | TYPE_LIMIT | TIF_GTC | - | lpprov2 | ETH/DEC23 | sell | 36 | 250 | 0 | TYPE_LIMIT | TIF_GTC | ## Successor window did not pass, mark price 0, ETH/DEC19 in opening auction yet @@ -928,11 +921,8 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | trader1 | ETH/DEC21 | buy | 10 | 1 | 0 | TYPE_LIMIT | TIF_GTC | - | trader1 | ETH/DEC21 | sell | 10 | 2000 | 0 | TYPE_LIMIT | TIF_GTC | | trader1 | ETH/DEC21 | buy | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | - | trader2 | ETH/DEC21 | sell | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | | lpprov2 | ETH/DEC21 | buy | 225 | 40 | 0 | TYPE_LIMIT | TIF_GTC | - | lpprov2 | ETH/DEC21 | sell | 36 | 250 | 0 | TYPE_LIMIT | TIF_GTC | And the network moves ahead "2" blocks @@ -978,14 +968,14 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC22" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC23" - ## Settled successor distributed its insurance pool balance across in 5 equal parts. - And the insurance pool balance should be "1200" for the market "ETH/DEC19" + ## Settled successor moved into global insurance account + And the insurance pool balance should be "1000" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the insurance pool balance should be "1200" for the market "ETH/DEC20" - And the insurance pool balance should be "1200" for the market "ETH/DEC22" - And the insurance pool balance should be "1200" for the market "ETH/DEC23" + And the insurance pool balance should be "1000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000" for the market "ETH/DEC22" + And the insurance pool balance should be "1000" for the market "ETH/DEC23" - And the global insurance pool balance should be "200" for the asset "USD" + And the global insurance pool balance should be "1000" for the asset "USD" ## Settle the other of the successors that had orders - ETH/DEC23 Then the oracles broadcast data signed with "0xCAFECADD": @@ -1002,14 +992,14 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC20" - ## Settled successor distributed its insurance pool balance across in 3 equal parts. - And the insurance pool balance should be "1500" for the market "ETH/DEC19" + ## Settled successor remaining insurance pool balance is moved into the global insurance account. + And the insurance pool balance should be "1000" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the insurance pool balance should be "1500" for the market "ETH/DEC22" - And the insurance pool balance should be "1500" for the market "ETH/DEC20" + And the insurance pool balance should be "1000" for the market "ETH/DEC22" + And the insurance pool balance should be "1000" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "500" for the asset "USD" + And the global insurance pool balance should be "2000" for the asset "USD" And the network moves ahead "10" blocks And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" @@ -1029,22 +1019,22 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the network moves ahead "1" blocks And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC20" - And the insurance pool balance should be "1500" for the market "ETH/DEC19" + And the insurance pool balance should be "1000" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the insurance pool balance should be "1500" for the market "ETH/DEC20" - And the insurance pool balance should be "1500" for the market "ETH/DEC22" + And the insurance pool balance should be "1000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "500" for the asset "USD" + And the global insurance pool balance should be "2000" for the asset "USD" And the network moves ahead "10" blocks And the insurance pool balance should be "0" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the insurance pool balance should be "2000" for the market "ETH/DEC20" - And the insurance pool balance should be "2000" for the market "ETH/DEC22" + And the insurance pool balance should be "1000" for the market "ETH/DEC20" + And the insurance pool balance should be "1000" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "1000" for the asset "USD" + And the global insurance pool balance should be "3000" for the asset "USD" ## Cancel the ETH/DEC20 successor When the market states are updated through governance: @@ -1054,10 +1044,10 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the insurance pool balance should be "0" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC21" And the insurance pool balance should be "0" for the market "ETH/DEC20" - And the insurance pool balance should be "3000" for the market "ETH/DEC22" + And the insurance pool balance should be "1000" for the market "ETH/DEC22" And the insurance pool balance should be "0" for the market "ETH/DEC23" - And the global insurance pool balance should be "2000" for the asset "USD" + And the global insurance pool balance should be "4000" for the asset "USD" ## Cancel the ETH/DEC22 successor When the market states are updated through governance: @@ -1111,17 +1101,12 @@ Feature: Successor markets: Global insurance pool account collects all outstandi | lpprov1 | ETH/DEC23 | buy | 225 | 40 | 0 | TYPE_LIMIT | TIF_GTC | | lpprov1 | ETH/DEC23 | sell | 36 | 250 | 0 | TYPE_LIMIT | TIF_GTC | | trader1 | ETH/DEC22 | buy | 10 | 1 | 0 | TYPE_LIMIT | TIF_GTC | - | trader1 | ETH/DEC22 | sell | 10 | 2000 | 0 | TYPE_LIMIT | TIF_GTC | | trader1 | ETH/DEC22 | buy | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | - | trader2 | ETH/DEC22 | sell | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | | lpprov1 | ETH/DEC22 | buy | 225 | 40 | 0 | TYPE_LIMIT | TIF_GTC | | lpprov1 | ETH/DEC22 | sell | 36 | 250 | 0 | TYPE_LIMIT | TIF_GTC | | trader1 | ETH/DEC21 | buy | 10 | 1 | 0 | TYPE_LIMIT | TIF_GTC | - | trader1 | ETH/DEC21 | sell | 10 | 2000 | 0 | TYPE_LIMIT | TIF_GTC | | trader1 | ETH/DEC21 | buy | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | - | trader2 | ETH/DEC21 | sell | 1 | 150 | 0 | TYPE_LIMIT | TIF_GTC | | lpprov1 | ETH/DEC21 | buy | 225 | 40 | 0 | TYPE_LIMIT | TIF_GTC | - | lpprov1 | ETH/DEC21 | sell | 36 | 250 | 0 | TYPE_LIMIT | TIF_GTC | And the network moves ahead "1" blocks @@ -1141,6 +1126,11 @@ Feature: Successor markets: Global insurance pool account collects all outstandi Then the mark price should be "0" for the market "ETH/DEC22" Then the mark price should be "0" for the market "ETH/DEC21" + And the network moves ahead "2" blocks + + Then the mark price should be "150" for the market "ETH/DEC23" + Then the mark price should be "0" for the market "ETH/DEC19" + And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | trader1 | ETH/DEC19 | buy | 10 | 1 | 0 | TYPE_LIMIT | TIF_GTC | @@ -1153,21 +1143,20 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the network moves ahead "2" blocks Then the mark price should be "150" for the market "ETH/DEC23" - Then the mark price should be "0" for the market "ETH/DEC19" + Then the mark price should be "150" for the market "ETH/DEC19" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC23" - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" And the network moves ahead "10" blocks - ## Remaining successor markets redistributed their insurance pool balances as: - ## 3 x 500 to ETH/DEC23, 500 to ETH/DEC19 and 1000 to the global insurance pool - And the insurance pool balance should be "1500" for the market "ETH/DEC19" + ## Remaining successor markets moved into the global insurance account + And the insurance pool balance should be "500" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC21" And the insurance pool balance should be "0" for the market "ETH/DEC22" - And the insurance pool balance should be "2500" for the market "ETH/DEC23" - And the global insurance pool balance should be "1000" for the asset "USD" + And the insurance pool balance should be "1500" for the market "ETH/DEC23" + And the global insurance pool balance should be "3000" for the asset "USD" ## Settle ETH/DEC23 Then the oracles broadcast data signed with "0xCAFECADD": @@ -1184,10 +1173,10 @@ Feature: Successor markets: Global insurance pool account collects all outstandi And the network moves ahead "10" blocks - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" ## Settled successor distributed its insurance pool balance across in 2 equal parts. - And the insurance pool balance should be "2750" for the market "ETH/DEC19" + And the insurance pool balance should be "500" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC21" And the insurance pool balance should be "0" for the market "ETH/DEC20" And the insurance pool balance should be "0" for the market "ETH/DEC22" diff --git a/core/integration/features/system-test-default.feature b/core/integration/features/system-test-default.feature index 43f9ca547d..4266a9e728 100644 --- a/core/integration/features/system-test-default.feature +++ b/core/integration/features/system-test-default.feature @@ -122,7 +122,7 @@ Feature: Basic feature-file matching the system-test setup like for like -@SystemTestBase +@SystemTestBase @NoPerp Scenario: 003 Funding insurance pool Given the parties deposit on asset's general account the following amount: | party | asset | amount | diff --git a/core/integration/features/teams/0083-RFPR-061.feature b/core/integration/features/teams/0083-RFPR-061.feature new file mode 100644 index 0000000000..1c57fc65c4 --- /dev/null +++ b/core/integration/features/teams/0083-RFPR-061.feature @@ -0,0 +1,107 @@ +Feature: Test allow lists, based on team_rewards.feature test in rewards set. + + Background: + # Initialise the network + Given time is updated to "2023-01-01T00:00:00Z" + And the average block duration is "1" + And the following network parameters are set: + | name | value | + | market.fee.factors.makerFee | 0.001 | + | network.markPriceUpdateMaximumFrequency | 0s | + | market.auction.minimumDuration | 1 | + | validators.epoch.length | 60s | + | limits.markets.maxPeggedOrders | 4 | + | referralProgram.minStakedVegaTokens | 0 | + + # Initialise the markets + And the following assets are registered: + | id | decimal places | quantum | + | USD-1-10 | 1 | 10 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | decimal places | position decimal places | + | ETH/USD-1-10 | ETH | USD-1-10 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e-3 | 0 | default-futures | 0 | 0 | + + # Initialise the parties + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lpprov | USD-1-10 | 10000000000 | + | aux1 | USD-1-10 | 10000000 | + | aux2 | USD-1-10 | 10000000 | + | referrer1 | USD-1-10 | 10000000 | + | referrer2 | USD-1-10 | 10000000 | + | referrer3 | USD-1-10 | 10000000 | + | referee1 | USD-1-10 | 10000000 | + | referee2 | USD-1-10 | 10000000 | + | referee3 | USD-1-10 | 10000000 | + | another1 | USD-1-10 | 10000000 | + | another2 | USD-1-10 | 10000000 | + | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | USD-1-10 | 10000000 | + + # Exit opening auctions + Given the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/USD-1-10 | 1000000 | 0.01 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/USD-1-10 | 5000 | 1000 | buy | BID | 10000 | 1 | + | lpprov | ETH/USD-1-10 | 5000 | 1000 | sell | ASK | 10000 | 1 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/USD-1-10 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/USD-1-10 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/USD-1-10" + When the network moves ahead "1" blocks + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-1-10" + + # Create the teams + Given the parties create the following referral codes: + | party | code | is_team | team | closed | allow list | + | referrer1 | referral-code-1 | true | team1 | true | referee1,another1 | + | referrer2 | referral-code-2 | true | team2 | false | | + | referrer3 | referral-code-3 | true | team3 | true | | + And the parties apply the following referral codes: + | party | code | is_team | team | + | referee1 | referral-code-1 | true | team1 | + | referee2 | referral-code-2 | true | team2 | + | referee3 | referral-code-2 | true | team2 | + And the team "team1" has the following members: + | party | + | referrer1 | + | referee1 | + And the team "team2" has the following members: + | party | + | referrer2 | + | referee2 | + | referee3 | + And the team "team3" has the following members: + | party | + | referrer3 | + + @Closed + Scenario: 0083-RFPR-061 adding parties to non-closed team works as expected. + Given the parties submit the following recurring transfers: + | id | from | from_account_type | to | to_account_type | entity_scope | teams | ntop | asset | amount | start_epoch | end_epoch | factor | metric | metric_asset | markets | + | 1 | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | 0000000000000000000000000000000000000000000000000000000000000000 | ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES | TEAMS | team1,team2 | 1 | USD-1-10 | 10000 | 1 | | 1 | DISPATCH_METRIC_MAKER_FEES_PAID | USD-1-10 | ETH/USD-1-10 | + When the parties apply the following referral codes: + | party | code | is_team | team | + | another2 | referral-code-2 | true | team2 | + Then the team "team2" has the following members: + | party | + | referrer2 | + | referee2 | + | referee3 | + | another2 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee1 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee2 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 5 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee3 | ETH/USD-1-10 | buy | 5 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" epochs + Then "referee1" should have vesting account balance of "5714" for asset "USD-1-10" + And "referee2" should have vesting account balance of "2142" for asset "USD-1-10" + And "referee3" should have vesting account balance of "2142" for asset "USD-1-10" diff --git a/core/integration/features/teams/0083-RFPR-062.feature b/core/integration/features/teams/0083-RFPR-062.feature new file mode 100644 index 0000000000..9595657fac --- /dev/null +++ b/core/integration/features/teams/0083-RFPR-062.feature @@ -0,0 +1,114 @@ +Feature: Test allow lists, based on team_rewards.feature test in rewards set. + + Background: + # Initialise the network + Given time is updated to "2023-01-01T00:00:00Z" + And the average block duration is "1" + And the following network parameters are set: + | name | value | + | market.fee.factors.makerFee | 0.001 | + | network.markPriceUpdateMaximumFrequency | 0s | + | market.auction.minimumDuration | 1 | + | validators.epoch.length | 60s | + | limits.markets.maxPeggedOrders | 4 | + | referralProgram.minStakedVegaTokens | 0 | + + # Initialise the markets + And the following assets are registered: + | id | decimal places | quantum | + | USD-1-10 | 1 | 10 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | decimal places | position decimal places | + | ETH/USD-1-10 | ETH | USD-1-10 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e-3 | 0 | default-futures | 0 | 0 | + + # Initialise the parties + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lpprov | USD-1-10 | 10000000000 | + | aux1 | USD-1-10 | 10000000 | + | aux2 | USD-1-10 | 10000000 | + | referrer1 | USD-1-10 | 10000000 | + | referrer2 | USD-1-10 | 10000000 | + | referrer3 | USD-1-10 | 10000000 | + | referee1 | USD-1-10 | 10000000 | + | referee2 | USD-1-10 | 10000000 | + | referee3 | USD-1-10 | 10000000 | + | another1 | USD-1-10 | 10000000 | + | another2 | USD-1-10 | 10000000 | + | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | USD-1-10 | 10000000 | + + # Exit opening auctions + Given the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/USD-1-10 | 1000000 | 0.01 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/USD-1-10 | 5000 | 1000 | buy | BID | 10000 | 1 | + | lpprov | ETH/USD-1-10 | 5000 | 1000 | sell | ASK | 10000 | 1 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/USD-1-10 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/USD-1-10 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/USD-1-10" + When the network moves ahead "1" blocks + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-1-10" + + # Create the teams + Given the parties create the following referral codes: + | party | code | is_team | team | closed | allow list | + | referrer1 | referral-code-1 | true | team1 | true | referee1,another1 | + | referrer2 | referral-code-2 | true | team2 | false | | + | referrer3 | referral-code-3 | true | team3 | true | | + And the parties apply the following referral codes: + | party | code | is_team | team | + | referee1 | referral-code-1 | true | team1 | + | referee2 | referral-code-2 | true | team2 | + | referee3 | referral-code-2 | true | team2 | + And the team "team1" has the following members: + | party | + | referrer1 | + | referee1 | + And the team "team2" has the following members: + | party | + | referrer2 | + | referee2 | + | referee3 | + And the team "team3" has the following members: + | party | + | referrer3 | + + @Closed + Scenario: 0083-RFPR-062 adding parties to non-closed team works as expected. + Given the parties submit the following recurring transfers: + | id | from | from_account_type | to | to_account_type | entity_scope | teams | ntop | asset | amount | start_epoch | end_epoch | factor | metric | metric_asset | markets | + | 1 | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | 0000000000000000000000000000000000000000000000000000000000000000 | ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES | TEAMS | team1,team2 | 1 | USD-1-10 | 10000 | 1 | | 1 | DISPATCH_METRIC_MAKER_FEES_PAID | USD-1-10 | ETH/USD-1-10 | + When the parties apply the following referral codes: + | party | code | is_team | team | + | another1 | referral-code-1 | true | team1 | + Then the team "team2" has the following members: + | party | + | referrer2 | + | referee2 | + | referee3 | + And the team "team1" has the following members: + | party | + | referrer1 | + | referee1 | + | another1 | + And the team "team3" has the following members: + | party | + | referrer3 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee1 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee2 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 5 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee3 | ETH/USD-1-10 | buy | 5 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" epochs + Then "referee1" should have vesting account balance of "3999" for asset "USD-1-10" + And "referee2" should have vesting account balance of "3000" for asset "USD-1-10" + And "referee3" should have vesting account balance of "3000" for asset "USD-1-10" diff --git a/core/integration/features/teams/0083-RFPR-063-bulk.feature b/core/integration/features/teams/0083-RFPR-063-bulk.feature new file mode 100644 index 0000000000..ccf5a93e31 --- /dev/null +++ b/core/integration/features/teams/0083-RFPR-063-bulk.feature @@ -0,0 +1,113 @@ +Feature: Team Rewards + + Background: + + # Initialise the network + Given time is updated to "2023-01-01T00:00:00Z" + And the average block duration is "1" + And the following network parameters are set: + | name | value | + | market.fee.factors.makerFee | 0.001 | + | network.markPriceUpdateMaximumFrequency | 0s | + | market.auction.minimumDuration | 1 | + | validators.epoch.length | 60s | + | limits.markets.maxPeggedOrders | 4 | + | referralProgram.minStakedVegaTokens | 0 | + + # Initialise the markets + And the following assets are registered: + | id | decimal places | quantum | + | USD-1-10 | 1 | 10 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | decimal places | position decimal places | + | ETH/USD-1-10 | ETH | USD-1-10 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e-3 | 0 | default-futures | 0 | 0 | + + # Initialise the parties + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lpprov | USD-1-10 | 10000000000 | + | aux1 | USD-1-10 | 10000000 | + | aux2 | USD-1-10 | 10000000 | + | aux3 | USD-1-10 | 10000000000 | + | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | USD-1-10 | 10000000000 | + | another1 | USD-1-10 | 10000000000 | + | another2 | USD-1-10 | 10000000000 | + + # Exit opening auctions + Given the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/USD-1-10 | 1000000 | 0.01 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/USD-1-10 | 5000 | 1000 | buy | BID | 10000 | 1 | + | lpprov | ETH/USD-1-10 | 5000 | 1000 | sell | ASK | 10000 | 1 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/USD-1-10 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/USD-1-10 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/USD-1-10" + When the network moves ahead "1" blocks + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-1-10" + + # Create the teams + Given the following teams with referees are created: + | referrer | prefix | code | team name | referees | balance | asset | closed | allow list | + | referrer1 | ref1 | referral-code-1 | team1 | 20 | 10000000 | USD-1-10 | true | another1 | + | referrer2 | ref2 | referral-code-2 | team2 | 20 | 10000000 | USD-1-10 | true | | + + @Closed + Scenario: 0083-RFPR-063 with bulk team creation + + When the parties apply the following referral codes: + | party | code | is_team | team | reference | error | + | another2 | referral-code-2 | true | team2 | some ref | party is not allowed to join team "team2" | + When the parties apply the following referral codes: + | party | code | is_team | team | reference | + | another1 | referral-code-1 | true | team1 | some ref | + Given the parties submit the following recurring transfers: + | id | from | from_account_type | to | to_account_type | entity_scope | teams | ntop | asset | amount | start_epoch | end_epoch | factor | metric | metric_asset | markets | + | 1 | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | 0000000000000000000000000000000000000000000000000000000000000000 | ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES | TEAMS | team1,team2 | 0.2 | USD-1-10 | 10000 | 1 | | 1 | DISPATCH_METRIC_MAKER_FEES_PAID | USD-1-10 | ETH/USD-1-10 | + ## Bunch of orders: + # Team1: 20, 10, 10, 10, 1 (out of 20) + # Team2: 21, 19, 10, 5 (out of 10) + # TopN 0.2 should be based on 50/4 and 40/2 -> 12.5 and 20 + # This is then divided between 5 parties in team1, 4 in team2 respectively, + # so team1 parties receive 12.5/5 (or 2.5), whereas team2 referees receive 20/4 (or 5) + # We expect to see the vesting account balances of team2 to be 2x those of team1 + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref1-0001 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref1-0002 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref1-0003 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/USD-1-10 | sell | 20 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref1-0004 | ETH/USD-1-10 | buy | 20 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/USD-1-10 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref1-0005 | ETH/USD-1-10 | buy | 1 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 21 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref2-0001 | ETH/USD-1-10 | buy | 21 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 5 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref2-0002 | ETH/USD-1-10 | buy | 5 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 19 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref2-0003 | ETH/USD-1-10 | buy | 19 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | ref2-0004 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" epochs + Then parties should have the following vesting account balances: + | party | asset | balance | + | ref1-0001 | USD-1-10 | 952 | + | ref1-0002 | USD-1-10 | 952 | + | ref1-0003 | USD-1-10 | 952 | + | ref1-0004 | USD-1-10 | 952 | + | ref1-0005 | USD-1-10 | 952 | + | ref1-0006 | USD-1-10 | 0 | + | ref2-0001 | USD-1-10 | 1309 | + | ref2-0002 | USD-1-10 | 1309 | + | ref2-0003 | USD-1-10 | 1309 | + | ref2-0004 | USD-1-10 | 1309 | + | ref2-0005 | USD-1-10 | 0 | + #And "ref1-0002" should have vesting account balance of "0" for asset "USD-1-10" diff --git a/core/integration/features/teams/0083-RFPR-063.feature b/core/integration/features/teams/0083-RFPR-063.feature new file mode 100644 index 0000000000..992ec64139 --- /dev/null +++ b/core/integration/features/teams/0083-RFPR-063.feature @@ -0,0 +1,147 @@ +Feature: Test allow lists, based on team_rewards.feature test in rewards set. + + Background: + # Initialise the network + Given time is updated to "2023-01-01T00:00:00Z" + And the average block duration is "1" + And the following network parameters are set: + | name | value | + | market.fee.factors.makerFee | 0.001 | + | network.markPriceUpdateMaximumFrequency | 0s | + | market.auction.minimumDuration | 1 | + | validators.epoch.length | 60s | + | limits.markets.maxPeggedOrders | 4 | + | referralProgram.minStakedVegaTokens | 0 | + + # Initialise the markets + And the following assets are registered: + | id | decimal places | quantum | + | USD-1-10 | 1 | 10 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | decimal places | position decimal places | + | ETH/USD-1-10 | ETH | USD-1-10 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e-3 | 0 | default-futures | 0 | 0 | + + # Initialise the parties + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lpprov | USD-1-10 | 10000000000 | + | aux1 | USD-1-10 | 10000000 | + | aux2 | USD-1-10 | 10000000 | + | referrer1 | USD-1-10 | 10000000 | + | referrer2 | USD-1-10 | 10000000 | + | referrer3 | USD-1-10 | 10000000 | + | referee1 | USD-1-10 | 10000000 | + | referee2 | USD-1-10 | 10000000 | + | referee3 | USD-1-10 | 10000000 | + | another1 | USD-1-10 | 10000000 | + | another2 | USD-1-10 | 10000000 | + | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | USD-1-10 | 10000000 | + + # Exit opening auctions + Given the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/USD-1-10 | 1000000 | 0.01 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/USD-1-10 | 5000 | 1000 | buy | BID | 10000 | 1 | + | lpprov | ETH/USD-1-10 | 5000 | 1000 | sell | ASK | 10000 | 1 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/USD-1-10 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/USD-1-10 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/USD-1-10" + When the network moves ahead "1" blocks + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-1-10" + + # Create the teams + Given the parties create the following referral codes: + | party | code | is_team | team | closed | allow list | + | referrer1 | referral-code-1 | true | team1 | true | referee1,another1 | + | referrer2 | referral-code-2 | true | team2 | false | | + | referrer3 | referral-code-3 | true | team3 | true | | + And the parties apply the following referral codes: + | party | code | is_team | team | + | referee1 | referral-code-1 | true | team1 | + | referee2 | referral-code-2 | true | team2 | + | referee3 | referral-code-2 | true | team2 | + And the team "team1" has the following members: + | party | + | referrer1 | + | referee1 | + And the team "team2" has the following members: + | party | + | referrer2 | + | referee2 | + | referee3 | + And the team "team3" has the following members: + | party | + | referrer3 | + + @Closed + Scenario: 0083-RFPR-063 Joining a closed team while not on the allow list should fail + Given the parties submit the following recurring transfers: + | id | from | from_account_type | to | to_account_type | entity_scope | teams | ntop | asset | amount | start_epoch | end_epoch | factor | metric | metric_asset | markets | + | 1 | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | 0000000000000000000000000000000000000000000000000000000000000000 | ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES | TEAMS | team1,team2 | 1 | USD-1-10 | 10000 | 1 | | 1 | DISPATCH_METRIC_MAKER_FEES_PAID | USD-1-10 | ETH/USD-1-10 | + When the parties apply the following referral codes: + | party | code | is_team | team | reference | error | + | another2 | referral-code-3 | true | team3 | some ref | team "team3" is closed | + Then the team "team2" has the following members: + | party | + | referrer2 | + | referee2 | + | referee3 | + And the team "team1" has the following members: + | party | + | referrer1 | + | referee1 | + And the team "team3" has the following members: + | party | + | referrer3 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee1 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee2 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 5 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee3 | ETH/USD-1-10 | buy | 5 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" epochs + Then "referee1" should have vesting account balance of "5000" for asset "USD-1-10" + And "referee2" should have vesting account balance of "2500" for asset "USD-1-10" + And "referee3" should have vesting account balance of "2500" for asset "USD-1-10" + + @Closed + Scenario: 0083-RFPR-063 Joining a closed team while not on the allow list should fail, team with non-empty join list + Given the parties submit the following recurring transfers: + | id | from | from_account_type | to | to_account_type | entity_scope | teams | ntop | asset | amount | start_epoch | end_epoch | factor | metric | metric_asset | markets | + | 1 | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | 0000000000000000000000000000000000000000000000000000000000000000 | ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES | TEAMS | team1,team2 | 1 | USD-1-10 | 10000 | 1 | | 1 | DISPATCH_METRIC_MAKER_FEES_PAID | USD-1-10 | ETH/USD-1-10 | + When the parties apply the following referral codes: + | party | code | is_team | team | reference | error | + | another2 | referral-code-1 | true | team1 | some ref | party is not allowed to join team "team1" | + Then the team "team2" has the following members: + | party | + | referrer2 | + | referee2 | + | referee3 | + And the team "team1" has the following members: + | party | + | referrer1 | + | referee1 | + And the team "team3" has the following members: + | party | + | referrer3 | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee1 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee2 | ETH/USD-1-10 | buy | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/USD-1-10 | sell | 5 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee3 | ETH/USD-1-10 | buy | 5 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" epochs + Then "referee1" should have vesting account balance of "5000" for asset "USD-1-10" + And "referee2" should have vesting account balance of "2500" for asset "USD-1-10" + And "referee3" should have vesting account balance of "2500" for asset "USD-1-10" + diff --git a/core/integration/features/transfers/0057-TRAN-023.feature b/core/integration/features/transfers/0057-TRAN-023.feature new file mode 100644 index 0000000000..60f0f91056 --- /dev/null +++ b/core/integration/features/transfers/0057-TRAN-023.feature @@ -0,0 +1,134 @@ +Feature: Test one off transfers + +Background: + Given time is updated to "2021-08-26T00:00:00Z" + + Given the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | BTC/DEC23 | BTC | BTC | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e6 | 1e6 | default-futures | + + Given the following network parameters are set: + | name | value | + | transfer.fee.factor | 0.5 | + | network.markPriceUpdateMaximumFrequency | 0s | + | transfer.fee.maxQuantumAmount | 1 | + | transfer.feeDiscountDecayFraction | 0.9 | + | limits.markets.maxPeggedOrders | 1500 | + + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | 1234567890123456789012345678901234567890123456789012345678900001 | BTC | 1000000000000 | + | 1234567890123456789012345678901234567890123456789012345678900002 | BTC | 1000000000000 | + | aux | BTC | 1000000 | + | aux2 | BTC | 1000000 | + | lpprov | BTC | 90000000 | + + And create the network treasury account for asset "VEGA" + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | BTC/DEC23 | 90000000 | 0.1 | submission | + | lp1 | lpprov | BTC/DEC23 | 90000000 | 0.1 | submission | + + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | BTC/DEC23 | 2 | 1 | buy | BID | 50 | 100 | + | lpprov | BTC/DEC23 | 2 | 1 | sell | ASK | 50 | 100 | + + # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux | BTC/DEC23 | buy | 1 | 40 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | BTC/DEC23 | sell | 1 | 60 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | BTC/DEC23 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | BTC/DEC23 | sell | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the opening auction period ends for market "BTC/DEC23" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/DEC23" + +Scenario: Make sure we are not charged for a transfer if we have a discount (0057-TRAN-023) + # party1 needs to place trades so they pay a taker fee + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | 1234567890123456789012345678901234567890123456789012345678900002 | BTC/DEC23 | sell | 100 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | 1234567890123456789012345678901234567890123456789012345678900001 | BTC/DEC23 | buy | 100 | 0 | 1 | TYPE_MARKET | TIF_FOK | + + # Move forward 3 epochs and check the discount after each step + Then the network moves ahead "1" epochs + + And the parties have the following transfer fee discounts: + | party | asset | available discount | + | 1234567890123456789012345678901234567890123456789012345678900001 | BTC | 500 | + + Then the network moves ahead "1" epochs + + And the parties have the following transfer fee discounts: + | party | asset | available discount | + | 1234567890123456789012345678901234567890123456789012345678900001 | BTC | 450 | + + Then the network moves ahead "1" epochs + + And the parties have the following transfer fee discounts: + | party | asset | available discount | + | 1234567890123456789012345678901234567890123456789012345678900001 | BTC | 405 | + + # Make sure we know how much BTC party1 has + Then "1234567890123456789012345678901234567890123456789012345678900001" should have general account balance of "393999998840" for asset "BTC" + + # party1 makes a transfer and should get a reduced transfer fee + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | + | 1 | 1234567890123456789012345678901234567890123456789012345678900001 | ACCOUNT_TYPE_GENERAL | 1234567890123456789012345678901234567890123456789012345678900002 | ACCOUNT_TYPE_GENERAL | BTC | 100 | 2021-08-26T00:00:00Z | + + # Make sure that party1 has not paid a fee for this transfer (only the transferred amount is removed from the GENERAL account) 393999998840-100 + Then "1234567890123456789012345678901234567890123456789012345678900001" should have general account balance of "393999998740" for asset "BTC" + + # After the transfer the discount amount will be reduced by the amount we didn't get charged (50) + And the parties have the following transfer fee discounts: + | party | asset | available discount | + | 1234567890123456789012345678901234567890123456789012345678900001 | BTC | 355 | + + + +Scenario: Make sure we are only charged for a transfer after the discount is used up (0057-TRAN-023) + # party1 needs to place trades so they pay a taker fee + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | 1234567890123456789012345678901234567890123456789012345678900002 | BTC/DEC23 | sell | 100 | 50 | 0 | TYPE_LIMIT | TIF_GTC | + | 1234567890123456789012345678901234567890123456789012345678900001 | BTC/DEC23 | buy | 100 | 0 | 1 | TYPE_MARKET | TIF_FOK | + + # Move forward 3 epochs and check the discount after each step + Then the network moves ahead "1" epochs + + And the parties have the following transfer fee discounts: + | party | asset | available discount | + | 1234567890123456789012345678901234567890123456789012345678900001 | BTC | 500 | + + Then the network moves ahead "1" epochs + + And the parties have the following transfer fee discounts: + | party | asset | available discount | + | 1234567890123456789012345678901234567890123456789012345678900001 | BTC | 450 | + + Then the network moves ahead "1" epochs + + And the parties have the following transfer fee discounts: + | party | asset | available discount | + | 1234567890123456789012345678901234567890123456789012345678900001 | BTC | 405 | + + # Make sure we know how much BTC party1 has + Then "1234567890123456789012345678901234567890123456789012345678900001" should have general account balance of "393999998840" for asset "BTC" + + # party1 makes a transfer and should get a reduced transfer fee + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | + | 1 | 1234567890123456789012345678901234567890123456789012345678900001 | ACCOUNT_TYPE_GENERAL | 1234567890123456789012345678901234567890123456789012345678900002 | ACCOUNT_TYPE_GENERAL | BTC | 1000 | 2021-08-26T00:00:00Z | + + # fee = 1000 * 0.5 == 500. fee after discount = 500-405 = 95 + # 393999998840-(1000+95) + Then "1234567890123456789012345678901234567890123456789012345678900001" should have general account balance of "393999997745" for asset "BTC" + + # After the transfer the discount amount will be reduced by the amount we didn't get charged (50) + And the parties have the following transfer fee discounts: + | party | asset | available discount | + | 1234567890123456789012345678901234567890123456789012345678900001 | BTC | 0 | diff --git a/core/integration/features/transfers/fee_discounts.feature b/core/integration/features/transfers/fee_discounts.feature new file mode 100644 index 0000000000..736795406f --- /dev/null +++ b/core/integration/features/transfers/fee_discounts.feature @@ -0,0 +1,124 @@ +Feature: Transfer fee discounts + + +# this sets up party f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c with a tranfer discount of 324 +Background: + Given time is updated to "2021-08-26T00:00:00Z" + + Given the fees configuration named "fees-config-1": + | maker fee | infrastructure fee | + | 0.005 | 0.002 | + And the price monitoring named "price-monitoring": + | horizon | probability | auction extension | + | 1 | 0.99 | 3 | + + And the simple risk model named "simple-risk-model-1": + | long | short | max move up | min move down | probability of trading | + | 0.2 | 0.1 | 100 | -100 | 0.1 | + + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | position decimal places | linear slippage factor | quadratic slippage factor | sla params | + | ETH/DEC21 | ETH | ETH | simple-risk-model-1 | default-margin-calculator | 2 | fees-config-1 | price-monitoring | default-eth-for-future | 2 | 1e6 | 1e6 | default-futures | + And the following network parameters are set: + | name | value | + | market.liquidity.providersFeeCalculationTimeStep | 1s | + + Given the following network parameters are set: + | name | value | + | transfer.fee.factor | 1 | + | network.markPriceUpdateMaximumFrequency | 0s | + | transfer.fee.maxQuantumAmount | 1 | + | transfer.feeDiscountDecayFraction | 0.9 | + | limits.markets.maxPeggedOrders | 4 | + | validators.epoch.length | 20s | + + # setup accounts + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | aux1 | ETH | 100000000 | + | aux2 | ETH | 100000000 | + | trader3 | ETH | 10000 | + | trader4 | ETH | 10000 | + | lpprov | ETH | 10000000 | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 10000000 | + + Then the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/DEC21 | buy | 1000 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC21 | sell | 1000 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux1 | ETH/DEC21 | buy | 100 | 900 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC21 | sell | 100 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC21 | 90000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC21 | 90000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC21 | 10000 | 1 | buy | BID | 20000 | 100 | + | lpprov | ETH/DEC21 | 10000 | 1 | sell | ASK | 20000 | 100 | + + Then the opening auction period ends for market "ETH/DEC21" + And the market data for the market "ETH/DEC21" should be: + | mark price | trading mode | + | 1000 | TRADING_MODE_CONTINUOUS | + When the parties place the following orders "1" blocks apart: + | party | market id | side | volume | price | resulting trades | type | tif | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH/DEC21 | buy | 300 | 1002 | 0 | TYPE_LIMIT | TIF_GTC | + | trader4 | ETH/DEC21 | sell | 400 | 1002 | 1 | TYPE_LIMIT | TIF_GTC | + + Then the following trades should be executed: + | buyer | price | size | seller | aggressor side | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | 1002 | 300 | trader4 | sell | + + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | trader4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_MAKER | ETH/DEC21 | 16 | ETH | + | trader4 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 7 | ETH | + | trader4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC21 | 301 | ETH | + | market | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_FEES_MAKER | ACCOUNT_TYPE_GENERAL | ETH/DEC21 | 16 | ETH | + + # make the epoch end so that the fees are registered + And the network moves ahead "1" epochs + And the current epoch is "2" + + +@fee-discount +Scenario: transfer where fee-discount has decayed to 0 results in no fee discount (0057-TRAN-016) + + And the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 16 | + + # let the discount decay to zero + Given the following network parameters are set: + | name | value | + | transfer.feeDiscountDecayFraction | 0.0 | + And the network moves ahead "1" epochs + + And the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 0 | + + + Given "f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c" should have general account balance of "9998686" for asset "ETH" + And the accumulated infrastructure fees should be "7" for the asset "ETH" + + # now do a transfer and check we pay the full fees + # They will transfers 10000, fee is 0.5 * 10000 = 5000, discount is 0 + # 9998686 - 10000 - 5000 = 9983686 + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | + | 1 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | ETH | 10000 | 2021-08-26T00:09:01Z | + + Given time is updated to "2021-08-26T00:10:01Z" + Then "f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c" should have general account balance of "9983686" for asset "ETH" + Then "a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4" should have general account balance of "10000" for asset "ETH" + + # check fee went to insurance account + And the accumulated infrastructure fees should be "5007" for the asset "ETH" + + # now try to transfer the rest, we won't have enough so it should get rejected + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | error | + | 1 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | ETH | 9983686 | 2021-08-26T00:09:01Z | could not pay the fee for transfer: not enough funds to transfer | + \ No newline at end of file diff --git a/core/integration/features/transfers/one_off_transfers.feature b/core/integration/features/transfers/one_off_transfers.feature index 8e1e5cfda7..0885b8c60f 100644 --- a/core/integration/features/transfers/one_off_transfers.feature +++ b/core/integration/features/transfers/one_off_transfers.feature @@ -7,7 +7,11 @@ Background: | transfer.fee.factor | 0.5 | | transfer.fee.factor | 0.5 | | network.markPriceUpdateMaximumFrequency | 0s | + | transfer.fee.maxQuantumAmount | 1 | + Given the following assets are updated: + | id | decimal places | quantum | + | VEGA | 0 | 50000 | Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -16,7 +20,7 @@ Background: And create the network treasury account for asset "VEGA" -Scenario: simple successful transfers (0057-TRAN-001, 0057-TRAN-007, 0057-TRAN-008) +Scenario: simple successful transfers when (transfer amount * transfer.fee.factor <= transfer.fee.maxQuantumAmount * quantum) (0057-TRAN-001, 0057-TRAN-007, 0057-TRAN-008) Given the parties submit the following one off transfers: | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | | 1 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | VEGA | 10000 | 2021-08-26T00:00:01Z | @@ -40,11 +44,64 @@ Scenario: simple successful transfers (0057-TRAN-001, 0057-TRAN-007, 0057-TRAN-0 Then "576380694832d9271682e86fffbbcebc09ca79c259baa5d4d0298e12ecdee303" should have general account balance of "20000" for asset "VEGA" Then "a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf" should have general account balance of "30000" for asset "VEGA" +# Scenario: discount is applied for transaction fee (0057-TRAN-013) +# Given the parties submit the following one off transfers: +# | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | +# | 1 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | VEGA | 10000 | 2021-08-26T00:00:01Z | +# | 2 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | 576380694832d9271682e86fffbbcebc09ca79c259baa5d4d0298e12ecdee303 | ACCOUNT_TYPE_GENERAL | VEGA | 20000 | 2021-08-26T00:00:02Z | +# | 3 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | VEGA | 30000 | 2021-08-26T00:00:03Z | + +# Then "f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c" should have general account balance of "9910000" for asset "VEGA" + +# Given time is updated to "2021-08-26T00:00:01Z" +# Then "f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c" should have general account balance of "9910000" for asset "VEGA" +# Then "a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4" should have general account balance of "10000" for asset "VEGA" + +# Given time is updated to "2021-08-26T00:00:02Z" +# Then "f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c" should have general account balance of "9910000" for asset "VEGA" +# Then "a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4" should have general account balance of "10000" for asset "VEGA" +# Then "576380694832d9271682e86fffbbcebc09ca79c259baa5d4d0298e12ecdee303" should have general account balance of "20000" for asset "VEGA" + +# Given time is updated to "2021-08-26T00:00:03Z" +# Then "f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c" should have general account balance of "9910000" for asset "VEGA" +# Then "a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4" should have general account balance of "10000" for asset "VEGA" +# Then "576380694832d9271682e86fffbbcebc09ca79c259baa5d4d0298e12ecdee303" should have general account balance of "20000" for asset "VEGA" +# Then "a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf" should have general account balance of "30000" for asset "VEGA" + +Scenario: simple successful transfers when (transfer amount * transfer.fee.factor > transfer.fee.maxQuantumAmount * quantum) (0057-TRAN-011) + Given the following network parameters are set: + | name | value | + | transfer.fee.maxQuantumAmount | 0.1 | + + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | + | 1 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | VEGA | 10000 | 2021-08-26T00:00:01Z | + | 2 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | 576380694832d9271682e86fffbbcebc09ca79c259baa5d4d0298e12ecdee303 | ACCOUNT_TYPE_GENERAL | VEGA | 20000 | 2021-08-26T00:00:02Z | + | 3 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | VEGA | 30000 | 2021-08-26T00:00:03Z | + + # original balance - all transactions + fee for each transaction = 10000000-(10000+20000+30000+3*5000) + Then "f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c" should have general account balance of "9925000" for asset "VEGA" + + Given time is updated to "2021-08-26T00:00:01Z" + Then "f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c" should have general account balance of "9925000" for asset "VEGA" + Then "a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4" should have general account balance of "10000" for asset "VEGA" + + Given time is updated to "2021-08-26T00:00:02Z" + Then "f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c" should have general account balance of "9925000" for asset "VEGA" + Then "a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4" should have general account balance of "10000" for asset "VEGA" + Then "576380694832d9271682e86fffbbcebc09ca79c259baa5d4d0298e12ecdee303" should have general account balance of "20000" for asset "VEGA" + + Given time is updated to "2021-08-26T00:00:03Z" + Then "f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c" should have general account balance of "9925000" for asset "VEGA" + Then "a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4" should have general account balance of "10000" for asset "VEGA" + Then "576380694832d9271682e86fffbbcebc09ca79c259baa5d4d0298e12ecdee303" should have general account balance of "20000" for asset "VEGA" + Then "a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf" should have general account balance of "30000" for asset "VEGA" + Scenario: invalid transfers (0057-TRAN-005, 0057-TRAN-006) Given the parties submit the following one off transfers: - | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | error | - | 1 | | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | VEGA | 10000 | 2021-08-26T00:00:01Z | invalid from account | - | 2 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | | ACCOUNT_TYPE_GENERAL | VEGA | 20000 | 2021-08-26T00:00:02Z | invalid to account | + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | error | + | 1 | | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | VEGA | 10000 | 2021-08-26T00:00:01Z | invalid from account | + | 2 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | | ACCOUNT_TYPE_GENERAL | VEGA | 20000 | 2021-08-26T00:00:02Z | invalid to account | | 3 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | VEGA | 0 | 2021-08-26T00:00:03Z | cannot transfer zero funds | | 4 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_UNSPECIFIED | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | VEGA | 10000 | 2021-08-26T00:00:03Z | unsupported from account type | | 5 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_INSURANCE | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | ACCOUNT_TYPE_GENERAL | VEGA | 10000 | 2021-08-26T00:00:03Z | unsupported from account type | diff --git a/core/integration/features/transfers/one_off_transfers_fee_discount.feature b/core/integration/features/transfers/one_off_transfers_fee_discount.feature new file mode 100644 index 0000000000..a761615920 --- /dev/null +++ b/core/integration/features/transfers/one_off_transfers_fee_discount.feature @@ -0,0 +1,313 @@ +Feature: Test fee discounts for one off transfers + + Background: + Given time is updated to "2021-08-26T00:00:00Z" + And the following network parameters are set: + | name | value | + | transfer.fee.factor | 0.5 | + | market.fee.factors.makerFee | 0.004 | + | market.fee.factors.infrastructureFee | 0.002 | + | network.markPriceUpdateMaximumFrequency | 0s | + | transfer.fee.maxQuantumAmount | 100000 | + | transfer.feeDiscountDecayFraction | 0.9 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/DEC19 | ETH | ETH | default-simple-risk-model-2 | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e6 | 1e6 | default-futures | + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | limits.markets.maxPeggedOrders | 1500 | + | network.markPriceUpdateMaximumFrequency | 0s | + + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH | 100000000000 | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 100000000000 | + + When the parties deposit on asset's general account the following amount: + | party | asset | amount | + | aux | ETH | 100000000000 | + | aux2 | ETH | 100000000000 | + | lpprov | ETH | 100000000000 | + | tx_to_party | ETH | 100000000000 | + Then the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 10000000 | 0.001 | submission | + # move market to continuous + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | lpprov | ETH/DEC19 | buy | 1000 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | lpprov | ETH/DEC19 | sell | 1000 | 1035 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + Given the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH/DEC19 | buy | 1000 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH/DEC19 | sell | 1000 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" epochs + Then the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_MAKER | ETH/DEC19 | 4000 | ETH | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 2000 | ETH | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC19 | 1000 | ETH | + | market | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_FEES_MAKER | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 4000 | ETH | + + + @transfer @fee-discount + Scenario: 0057-TRAN-021 when a party paid taker fee g in previous epoch, and transfer.feeDiscountDecayFraction = 0.9, then in the next epoch when a party (did not generate any fees) makes a transfer and the theoretical fee the party should pay is f, fee-free amount is then c = 0.9 x g. If c > f, then no transfer fee is paid. And a party makes another transfer, and the theoretical fee the party should pay is f, then the party is not getting any fee-free discount + # fee free discount total = 400000 + 200000 + 100000 + Given the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 7000 | + + # assert decay is 7000 * 0.9 + When the network moves ahead "1" epochs + Then the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 6300 | + + # transfer depletes fees discount total + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | + | 1 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | ETH | 12600 | 2021-08-26T00:00:10Z | + And time is updated to "2021-08-26T00:00:10Z" + When the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 0 | + Then the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 0 | ETH | + + # one more transfer that will incur fees + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | + | 1 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | ETH | 10000 | 2021-08-26T00:00:10Z | + When the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 0 | + Then the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 5000 | ETH | + + @transfer @fee-discount + Scenario: 0057-TRAN-020 and 0057-TRAN-022 when a party made maker fee g in previous epoch, and transfer.feeDiscountDecayFraction = 0.9, then in the next epoch when a party (did not generate any fees) makes a transfer and the theoretical fee the party should pay is f, fee-free amount is then c = 0.9 x g. If c > f, then no transfer fee is paid. And a party makes another transfer, and the theoretical fee the party should pay is f, then the party is not getting any fee-free discount + # 0057-TRAN-020: when a party made maker fee g in previous epoch, and transfer.feeDiscountDecayFraction = 0.9, then in the next epoch when a party (did not generate any fees) makes a transfer and the theoretical fee the party should pay is f, fee-free amount is then c = 0.9 x g. If c > f, then no transfer fee is paid + # fee free discount total = maker fees made = 4000 + Given the parties have the following transfer fee discounts: + | party | asset | available discount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH | 4000 | + + # assert decay is 7000 * 0.9 + When the network moves ahead "1" epochs + Then the parties have the following transfer fee discounts: + | party | asset | available discount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH | 3600 | + + # transfer depletes fees discount total 0057-TRAN-020 + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | + | 1 | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | ETH | 7200 | 2021-08-26T00:00:10Z | + And time is updated to "2021-08-26T00:00:10Z" + When the parties have the following transfer fee discounts: + | party | asset | available discount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH | 0 | + Then the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 0 | ETH | + + # now we have used up the fee discount, one more transfer that will incur fees 0057-TRAN-022 + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | + | 1 | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | ETH | 10000 | 2021-08-26T00:00:10Z | + When the parties have the following transfer fee discounts: + | party | asset | available discount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH | 0 | + Then the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 5000 | ETH | + + @transfer @fee-discount + Scenario: 0057-TRAN-027 when a party makes a transfer and f would be the theoretical fee the party should pay then the fee on the transfer that is actually charged is -min(f-c,0). The system subsequently updates c <- max(0,c-f). At the end of epoch, update c <- c x D and c <- c + all_trading_fees_for_trades_involved_in, if c < M x quantum(M is transfer.feeDiscountMinimumTrackedAmount), then set c <- 0 + # Scenario make a transfer that total discount < below transfer.feeDiscountMinimumTrackedAmount and next epoch check total discount = 0 + + # fee free discount total = 4000 + 2000 + 1000 + Given the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 7000 | + # min fee discount = transfer.feeDiscountMinimumTrackedAmount x quamtum = 0.5 x 100 = 50 + And the following network parameters are set: + | name | value | + | transfer.feeDiscountMinimumTrackedAmount | 0.5 | + And the following assets are updated: + | id | decimal places | quantum | + | ETH | 0 | 100 | + # assert decay is 7000 * 0.9 + When the network moves ahead "1" epochs + Then the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 6300 | + + # transfer depletes fees discount total + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | + | 1 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | ETH | 12490 | 2021-08-26T00:00:10Z | + When time is updated to "2021-08-26T00:00:10Z" + Then the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 55 | + + Given the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 0 | ETH | + When the network moves ahead "1" epochs + # fee discount decay = 55 * 0.9 = 49.5 < 50 so it becomes 0 + Then the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 0 | + + @transfer @fee-discount + Scenario: 0057-TRAN-027 when a party makes a transfer and f would be the theoretical fee the party should pay then the fee on the transfer that is actually charged is -min(f-c,0). The system subsequently updates c <- max(0,c-f). At the end of epoch, update c <- c x D and c <- c + all_trading_fees_for_trades_involved_in, if c < M x quantum(M is transfer.feeDiscountMinimumTrackedAmount), then set c <- 0 + # Scenario make a trade that generates discount > transfer.feeDiscountMinimumTrackedAmount and next epoch check total discount is retained + + # fee free discount total = 4000 + 2000 + 1000 + Given the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 7000 | + # min fee discount = transfer.feeDiscountMinimumTrackedAmount x quamtum = 0.5 x 100 = 50 + And the following network parameters are set: + | name | value | + | transfer.feeDiscountMinimumTrackedAmount | 0.5 | + And the following assets are updated: + | id | decimal places | quantum | + | ETH | 0 | 100 | + + # transfer depletes fees discount total + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | + | 1 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | ETH | 13950 | 2021-08-26T00:00:10Z | + When time is updated to "2021-08-26T00:00:10Z" + Then the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 25 | + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 0 | ETH | + + Given the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH/DEC19 | buy | 5 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH/DEC19 | sell | 5 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" epochs + Then the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_MAKER | ETH/DEC19 | 20 | ETH | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 10 | ETH | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC19 | 5 | ETH | + | market | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_FEES_MAKER | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 20 | ETH | + # fee discount previous epoch decayed to 25 * 0.9 = 22.5 + (trade fees - 20 + 10 + 5) = 57.5 > 50 + # trade at previous epoch generated total fee discount of 16 + 8 + 4 = 28 < 50 so it becomes 0 + And the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 57 | + + @transfer @fee-discount + Scenario: 0057-TRAN-027 when a party makes a transfer and f would be the theoretical fee the party should pay then the fee on the transfer that is actually charged is -min(f-c,0). The system subsequently updates c <- max(0,c-f). At the end of epoch, update c <- c x D and c <- c + all_trading_fees_for_trades_involved_in, if c < M x quantum(M is transfer.feeDiscountMinimumTrackedAmount), then set c <- 0 + # Scenario make a trade that generates discount but the total discount < transfer.feeDiscountMinimumTrackedAmount and next epoch check total discount is 0 + + # fee free discount total = 4000 + 2000 + 1000 + Given the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 7000 | + # min fee discount = transfer.feeDiscountMinimumTrackedAmount x quamtum = 0.5 x 100 = 50 + And the following network parameters are set: + | name | value | + | transfer.feeDiscountMinimumTrackedAmount | 0.5 | + And the following assets are updated: + | id | decimal places | quantum | + | ETH | 0 | 100 | + + # transfer depletes fees discount total + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | + | 1 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | ETH | 13950 | 2021-08-26T00:00:10Z | + When time is updated to "2021-08-26T00:00:10Z" + Then the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 25 | + And the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 0 | ETH | + + Given the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH/DEC19 | buy | 3 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH/DEC19 | sell | 3 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" epochs + Then the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_MAKER | ETH/DEC19 | 12 | ETH | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 6 | ETH | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC19 | 3 | ETH | + | market | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_FEES_MAKER | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 12 | ETH | + # fee discount previous epoch decayed to 25 * 0.9 = 22.5 + (trade fees = 12 + 6 + 3=21) = 43.5 < 50 + # trade at previous epoch generated total fee discount of 16 + 8 + 4 = 28 < 50 so it becomes 0 + And the parties have the following transfer fee discounts: + | party | asset | available discount | + | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ETH | 0 | + + @transfer @fee-discount + Scenario: 0057-TRAN-024 when a party received maker fee f in previous epoch, and transfer.feeDiscountDecayFraction = 0.9, then in 3 epochs the fee-free discount amount would be c = 0.9^3 x f, when a party makes a transfer and the theoretical fee the party should pay is f1, and f1 <= 0.729 x f, then no amount is paid for transfer + # fee free discount total = maker fees made = 4000 + # move ahead 3 epochs but check discount at each epoch + Given the parties have the following transfer fee discounts: + | party | asset | available discount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH | 4000 | + # assert decay is 3240 * 0.9 + When the network moves ahead "1" epochs + Then the parties have the following transfer fee discounts: + | party | asset | available discount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH | 3600 | + + Given the parties have the following transfer fee discounts: + | party | asset | available discount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH | 3600 | + # assert decay is 3600 * 0.9 + When the network moves ahead "1" epochs + Then the parties have the following transfer fee discounts: + | party | asset | available discount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH | 3240 | + + Given the parties have the following transfer fee discounts: + | party | asset | available discount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH | 3240 | + # assert decay is 3240 * 0.9 + When the network moves ahead "1" epochs + Then the parties have the following transfer fee discounts: + | party | asset | available discount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH | 2916 | + + # transfer depletes fees discount total + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | + | 1 | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | ETH | 5832 | 2021-08-26T00:00:10Z | + And time is updated to "2021-08-26T00:00:10Z" + When the parties have the following transfer fee discounts: + | party | asset | available discount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH | 0 | + Then the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 0 | ETH | + + # one more transfer that will incur fees + Given the parties submit the following one off transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | delivery_time | + | 1 | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | ETH | 10000 | 2021-08-26T00:00:10Z | + When the parties have the following transfer fee discounts: + | party | asset | available discount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ETH | 0 | + Then the following transfers should happen: + | from | to | from account | to account | market id | amount | asset | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 5000 | ETH | diff --git a/core/integration/features/transfers/recurring_transfers.feature b/core/integration/features/transfers/recurring_transfers.feature index f0bcc33cea..d1b4cb8b29 100644 --- a/core/integration/features/transfers/recurring_transfers.feature +++ b/core/integration/features/transfers/recurring_transfers.feature @@ -6,8 +6,14 @@ Background: | name | value | | transfer.fee.factor | 0.5 | | validators.epoch.length | 10s | - | transfer.minTransferQuantumMultiple | 0.1 | + | transfer.minTransferQuantumMultiple | 0.01 | | network.markPriceUpdateMaximumFrequency | 0s | + | transfer.fee.maxQuantumAmount | 1 | + + + Given the following assets are updated: + | id | decimal places | quantum | + | VEGA | 0 | 50000 | Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -97,7 +103,7 @@ Scenario: invalid recurring transfers | 33 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | VEGA | 10000 | 1 | 0 | 0.5 | end epoch is zero | | 34 | f0b40ebdc5b92cf2cf82ff5d0c3f94085d23d5ec2d37d0b929e177c6d4d37e4c | ACCOUNT_TYPE_GENERAL | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | VEGA | 10000 | 0 | | 0.5 | start epoch is zero | -Scenario: As a user I can create a recurring transfer that decreases over time (0057-TRAN-050, 0057-TRAN-051) +Scenario: As a user I can create a recurring transfer that decreases over time when start amount * transfer.fee.factor <= transfer.fee.maxQuantumAmount * quantum (0057-TRAN-050, 0057-TRAN-051) Given the parties deposit on asset's general account the following amount: | party | asset | amount | | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | VEGA | 1000000 | @@ -134,6 +140,48 @@ Scenario: As a user I can create a recurring transfer that decreases over time ( | party | transfer_id | error | | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | 1 | recurring transfer does not exists | +Scenario: As a user I can create a recurring transfer that decreases over time when start amount * transfer.fee.factor > transfer.fee.maxQuantumAmount * quantum (0057-TRAN-065) + Given the following network parameters are set: + | name | value | + | transfer.fee.factor | 1 | + | transfer.fee.maxQuantumAmount | 0.1 | + + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | VEGA | 1000000 | + + Given the parties submit the following recurring transfers: + | id | from | from_account_type | to | to_account_type | asset | amount | start_epoch | end_epoch | factor | + | 1 | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | ACCOUNT_TYPE_GENERAL | 576380694832d9271682e86fffbbcebc09ca79c259baa5d4d0298e12ecdee303 | ACCOUNT_TYPE_GENERAL | VEGA | 10000 | 2 | 5 | 0.7 | + + # end of epoch 1 + When the network moves ahead "14" blocks + Then "a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4" should have general account balance of "1000000" for asset "VEGA" + + # end of epoch 2 + When the network moves ahead "7" blocks + Then "a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4" should have general account balance of "985000" for asset "VEGA" + Then "576380694832d9271682e86fffbbcebc09ca79c259baa5d4d0298e12ecdee303" should have general account balance of "10000" for asset "VEGA" + + # end of epoch 3 + When the network moves ahead "7" blocks + Then "a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4" should have general account balance of "973000" for asset "VEGA" + Then "576380694832d9271682e86fffbbcebc09ca79c259baa5d4d0298e12ecdee303" should have general account balance of "17000" for asset "VEGA" + + # end of epoch 4 + When the network moves ahead "7" blocks + Then "a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4" should have general account balance of "963200" for asset "VEGA" + Then "576380694832d9271682e86fffbbcebc09ca79c259baa5d4d0298e12ecdee303" should have general account balance of "21900" for asset "VEGA" + + # end of epoch 5 - the transfer is ended so can't be cancelled + When the network moves ahead "7" blocks + Then "a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4" should have general account balance of "956340" for asset "VEGA" + Then "576380694832d9271682e86fffbbcebc09ca79c259baa5d4d0298e12ecdee303" should have general account balance of "25330" for asset "VEGA" + + When the parties submit the following transfer cancellations: + | party | transfer_id | error | + | a7c4b181ef9bf5e9029a016f854e4ad471208020fd86187d07f0b420004f06a4 | 1 | recurring transfer does not exists | + Scenario: As a user I can create a recurring transfer that recurs forever, with the same balance transferred each time (0057-TRAN-052) Given the parties deposit on asset's general account the following amount: diff --git a/core/integration/features/verified/0002-STTL-settlement_at_expiry.feature b/core/integration/features/verified/0002-STTL-settlement_at_expiry.feature index 7fb0644da0..77bad1acab 100644 --- a/core/integration/features/verified/0002-STTL-settlement_at_expiry.feature +++ b/core/integration/features/verified/0002-STTL-settlement_at_expiry.feature @@ -309,8 +309,8 @@ Feature: Test settlement at expiry (0016-PFUT-012) And the network moves ahead "3" blocks And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the insurance pool balance should be "15000" for the market "ETH/DEC19" - And the global insurance pool balance should be "5000" for the asset "ETH" + And the insurance pool balance should be "10000" for the market "ETH/DEC19" + And the global insurance pool balance should be "10000" for the asset "ETH" Then the market state should be "STATE_ACTIVE" for the market "ETH/DEC19" @@ -423,9 +423,9 @@ Feature: Test settlement at expiry (0016-PFUT-012) When the network moves ahead "2" blocks Then the cumulated balance for all accounts should be worth "100213000" And the insurance pool balance should be "0" for the market "ETH/DEC19" - # 916 were taken from the insurance pool to cover the losses of party 2, the remaining is split between global and the other market - And the global insurance pool balance should be "42" for the asset "ETH" - And the insurance pool balance should be "1042" for the market "ETH/DEC21" + # 916 were taken from the insurance pool to cover the losses of party 2, the remaining is moved into the global insurance pool + And the global insurance pool balance should be "84" for the asset "ETH" + And the insurance pool balance should be "1000" for the market "ETH/DEC21" Scenario: Settlement happened when market is being closed - loss socialisation in action - insurance doesn't cover all losses (0002-STTL-009) Given the initial insurance pool balance is "500" for all the markets @@ -587,5 +587,5 @@ Feature: Test settlement at expiry (0016-PFUT-012) And the cumulated balance for all accounts should be worth "102012000" And the insurance pool balance should be "0" for the market "ETH/DEC21" - And the global insurance pool balance should be "250" for the asset "ETH" - And the insurance pool balance should be "750" for the market "ETH/DEC19" + And the global insurance pool balance should be "500" for the asset "ETH" + And the insurance pool balance should be "500" for the market "ETH/DEC19" diff --git a/core/integration/features/verified/0002-STTL-settlement_future_example_paths.feature b/core/integration/features/verified/0002-STTL-settlement_future_example_paths.feature new file mode 100644 index 0000000000..3fbf24560f --- /dev/null +++ b/core/integration/features/verified/0002-STTL-settlement_future_example_paths.feature @@ -0,0 +1,322 @@ +Feature: Test settlement future example paths (0002-STTL-011), (0002-STTL-012), (0002-STTL-013) + + Background: + Given time is updated to "2019-11-30T00:00:00Z" + And the average block duration is "1" + + And the oracle spec for settlement data filtering data from "0xCAFECAFE" named "ethDec20Oracle": + | property | type | binding | + | prices.ETH.value | TYPE_INTEGER | settlement data | + + And the oracle spec for trading termination filtering data from "0xCAFECAFE" named "ethDec20Oracle": + | property | type | binding | + | trading.terminated | TYPE_BOOLEAN | trading termination | + + And the settlement data decimals for the oracle named "ethDec20Oracle" is given in "0" decimal places + + And the following network parameters are set: + | name | value | + | market.auction.minimumDuration | 1 | + | network.markPriceUpdateMaximumFrequency | 0s | + | market.liquidity.successorLaunchWindowLength | 1s | + | limits.markets.maxPeggedOrders | 4 | + + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | + | ETH/DEC19 | ETH | ETH | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-basic | ethDec20Oracle | 1e6 | 1e6 | default-futures | + And the initial insurance pool balance is "1000" for all the markets + + Scenario: A typical path of a cash settled futures market nearing expiry when market is trading in continuous session (0002-STTL-011) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | aux1 | ETH | 100000 | + | aux2 | ETH | 100000 | + | lpprov | ETH | 100000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 10 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 10 | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux1 | ETH/DEC19 | buy | 1 | 999 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | + | aux2 | ETH/DEC19 | sell | 1 | 1001 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + | aux1 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | ref-3 | + | aux2 | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | ref-4 | + Then the opening auction period ends for market "ETH/DEC19" + And the mark price should be "1000" for the market "ETH/DEC19" + And the market state should be "STATE_ACTIVE" for the market "ETH/DEC19" + And the insurance pool balance should be "1000" for the market "ETH/DEC19" + + # check bond + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lpprov | ETH | ETH/DEC19 | 6600 | 3400 | 90000 | + # check margin + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | aux1 | ETH | ETH/DEC19 | 264 | 99736 | + | aux2 | ETH | ETH/DEC19 | 241 | 99759 | + # check positions + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux1 | 1 | 0 | 0 | + | aux2 | -1 | 0 | 0 | + + When the oracles broadcast data signed with "0xCAFECAFE": + | name | value | + | trading.terminated | true | + And time is updated to "2020-01-01T01:01:01Z" + Then the market state should be "STATE_TRADING_TERMINATED" for the market "ETH/DEC19" + # check margin + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | aux1 | ETH | ETH/DEC19 | 264 | 99736 | + | aux2 | ETH | ETH/DEC19 | 241 | 99759 | + # check positions + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux1 | 1 | 0 | 0 | + | aux2 | -1 | 0 | 0 | + + When the oracles broadcast data signed with "0xCAFECAFE": + | name | value | + | prices.ETH.value | 42 | + Then time is updated to "2020-01-01T01:01:02Z" + + # check margin + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | aux1 | ETH | ETH/DEC19 | 0 | 99042 | + | aux2 | ETH | ETH/DEC19 | 0 | 100958 | + + # check bond + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lpprov | ETH | ETH/DEC19 | 0 | 100000 | 0 | + + # check positions + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux1 | 1 | 0 | -958 | + | aux2 | -1 | 0 | 958 | + + And the network moves ahead "2" blocks + And the insurance pool balance should be "0" for the market "ETH/DEC19" + And the global insurance pool balance should be "1000" for the asset "ETH" + + Scenario: A less typical path of such a futures market nearing expiry when market is suspended (0002-STTL-012) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | party1 | ETH | 10000 | + | party2 | ETH | 1000 | + | aux1 | ETH | 100000 | + | aux2 | ETH | 100000 | + | lpprov | ETH | 100000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 10 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 10 | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux1 | ETH/DEC19 | buy | 1 | 999 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | + | aux2 | ETH/DEC19 | sell | 1 | 1001 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + | aux1 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | ref-3 | + | aux2 | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | ref-4 | + Then the opening auction period ends for market "ETH/DEC19" + And the mark price should be "1000" for the market "ETH/DEC19" + And the insurance pool balance should be "1000" for the market "ETH/DEC19" + And the market state should be "STATE_ACTIVE" for the market "ETH/DEC19" + + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | ref-5 | + | party2 | ETH/DEC19 | buy | 1 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | ref-6 | + + And the mark price should be "1000" for the market "ETH/DEC19" + + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | party1 | -1 | 0 | 0 | + | party2 | 1 | 0 | 0 | + + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | party1 | ETH | ETH/DEC19 | 120 | 9880 | + | party2 | ETH | ETH/DEC19 | 132 | 768 | + + And then the network moves ahead "10" blocks + + When the parties place the following orders with ticks: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party1 | ETH/DEC19 | sell | 1 | 1101 | 0 | TYPE_LIMIT | TIF_GTC | ref-7 | + | party2 | ETH/DEC19 | buy | 1 | 1101 | 0 | TYPE_LIMIT | TIF_GTC | ref-8 | + + And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/DEC19" + And the market state should be "STATE_SUSPENDED" for the market "ETH/DEC19" + + # check bond + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lpprov | ETH | ETH/DEC19 | 0 | 10100 | 90000 | + # check margin + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | aux1 | ETH | ETH/DEC19 | 264 | 99736 | + | aux2 | ETH | ETH/DEC19 | 241 | 99759 | + # check positions + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux1 | 1 | 0 | 0 | + | aux2 | -1 | 0 | 0 | + + When the oracles broadcast data signed with "0xCAFECAFE": + | name | value | + | trading.terminated | true | + And time is updated to "2020-01-01T01:01:01Z" + Then the market state should be "STATE_TRADING_TERMINATED" for the market "ETH/DEC19" + # check margin + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | aux1 | ETH | ETH/DEC19 | 264 | 99736 | + | aux2 | ETH | ETH/DEC19 | 241 | 99759 | + # check positions + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux1 | 1 | 0 | 0 | + | aux2 | -1 | 0 | 0 | + + When the oracles broadcast data signed with "0xCAFECAFE": + | name | value | + | prices.ETH.value | 42 | + Then time is updated to "2020-01-01T01:01:02Z" + + # check margin + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | aux1 | ETH | ETH/DEC19 | 0 | 99042 | + | aux2 | ETH | ETH/DEC19 | 0 | 100958 | + + # check bond + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lpprov | ETH | ETH/DEC19 | 0 | 100100 | 0 | + + # check positions + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux1 | 1 | 0 | -958 | + | aux2 | -1 | 0 | 958 | + + Then the network moves ahead "2" blocks + And the insurance pool balance should be "0" for the market "ETH/DEC19" + And the global insurance pool balance should be "942" for the asset "ETH" + + Scenario: Settlement data to cash settled future is submitted before trading is terminated (0002-STTL-013) + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | aux1 | ETH | 1000000 | + | aux2 | ETH | 1000000 | + | lpprov | ETH | 100000 | + + When the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/DEC19 | 90000 | 0.1 | submission | + | lp1 | lpprov | ETH/DEC19 | 90000 | 0.1 | submission | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/DEC19 | 2 | 1 | buy | BID | 50 | 10 | + | lpprov | ETH/DEC19 | 2 | 1 | sell | ASK | 50 | 10 | + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux1 | ETH/DEC19 | buy | 1 | 999 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | + | aux2 | ETH/DEC19 | sell | 1 | 1001 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + | aux1 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | ref-3 | + | aux2 | ETH/DEC19 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | ref-4 | + Then the opening auction period ends for market "ETH/DEC19" + And the mark price should be "1000" for the market "ETH/DEC19" + And the market state should be "STATE_ACTIVE" for the market "ETH/DEC19" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + And the insurance pool balance should be "1000" for the market "ETH/DEC19" + + # check bond + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lpprov | ETH | ETH/DEC19 | 6600 | 3400 | 90000 | + # check margin + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | aux1 | ETH | ETH/DEC19 | 264 | 999736 | + | aux2 | ETH | ETH/DEC19 | 241 | 999759 | + # check positions + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux1 | 1 | 0 | 0 | + | aux2 | -1 | 0 | 0 | + + When the oracles broadcast data signed with "0xCAFECAFE": + | name | value | + | prices.ETH.value | 42 | + Then time is updated to "2020-01-01T01:01:02Z" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux1 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | ref-5 | + | aux2 | ETH/DEC19 | sell | 1 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | ref-6 | + + And the following trades should be executed: + | buyer | price | size | seller | + | aux1 | 1000 | 1 | aux2 | + + When the oracles broadcast data signed with "0xCAFECAFE": + | name | value | + | prices.ETH.value | 45 | + Then time is updated to "2020-01-01T01:01:02Z" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" + + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | aux1 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | ref-7 | + | aux2 | ETH/DEC19 | sell | 1 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | ref-8 | + + And the following trades should be executed: + | buyer | price | size | seller | + | aux1 | 1000 | 1 | aux2 | + + When the oracles broadcast data signed with "0xCAFECAFE": + | name | value | + | trading.terminated | true | + And time is updated to "2020-01-01T01:01:01Z" + + # check margin + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | aux1 | ETH | ETH/DEC19 | 0 | 997135 | + | aux2 | ETH | ETH/DEC19 | 0 | 1002665 | + # check positions + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | aux1 | 3 | 0 | -2865 | + | aux2 | -3 | 0 | 2865 | + + # check bond + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | lpprov | ETH | ETH/DEC19 | 0 | 100200 | 0 | + + And the network moves ahead "2" blocks + And the insurance pool balance should be "0" for the market "ETH/DEC19" + And the global insurance pool balance should be "1000" for the asset "ETH" \ No newline at end of file diff --git a/core/integration/features/verified/0003-MTMK-mark_to_market_settlement_using_insurance_pool.feature b/core/integration/features/verified/0003-MTMK-mark_to_market_settlement_using_insurance_pool.feature index 27fa15923c..982a267ea5 100644 --- a/core/integration/features/verified/0003-MTMK-mark_to_market_settlement_using_insurance_pool.feature +++ b/core/integration/features/verified/0003-MTMK-mark_to_market_settlement_using_insurance_pool.feature @@ -10,6 +10,7 @@ Feature: Test mark to market settlement with insurance pool | network.markPriceUpdateMaximumFrequency | 0s | | limits.markets.maxPeggedOrders | 2 | + @Liquidation @NoPerp Scenario: If settlement amount > party’s margin account balance + party’s general account balance for the asset, the full balance of the party’s margin account is transferred to the market’s temporary settlement account, the full balance of the party’s general account for the assets are transferred to the market’s temporary settlement account, the minimum insurance pool account balance for the market & asset, and the remainder, i.e. the difference between the total amount transferred from the trader’s margin + general accounts and the settlement amount, is transferred from the insurance pool account for the market to the temporary settlement account for the market (0003-MTMK-003) Given the initial insurance pool balance is "10000" for all the markets Given the parties deposit on asset's general account the following amount: @@ -67,24 +68,25 @@ Feature: Test mark to market settlement with insurance pool When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | party3 | ETH/DEC19 | sell | 1 | 6000 | 1 | TYPE_LIMIT | TIF_GTC | ref-3 | + And the network moves ahead "1" blocks Then the parties should have the following account balances: | party | asset | market id | margin | general | | party1 | ETH | ETH/DEC19 | 0 | 0 | - | party2 | ETH | ETH/DEC19 | 13598 | 1302 | + | party2 | ETH | ETH/DEC19 | 14900 | 0 | | party3 | ETH | ETH/DEC19 | 7920 | 1480 | #party1 is closed out and traded with sell order ref-2, so there is no best ask to peg And the orders should have the following status: | party | reference | status | | aux | ref-2 | STATUS_FILLED | - | lpprov | lp-buy | STATUS_ACTIVE | + | lpprov | lp-buy | STATUS_PARKED | | lpprov | lp-sell | STATUS_PARKED | And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" And the cumulated balance for all accounts should be worth "155122" And the settlement account should have a balance of "0" for the market "ETH/DEC19" - And the insurance pool balance should be "9999" for the market "ETH/DEC19" + And the insurance pool balance should be "14521" for the market "ETH/DEC19" diff --git a/core/integration/features/verified/0011-MARA-006.feature b/core/integration/features/verified/0011-MARA-006.feature index 062c24efe4..07ec25f994 100644 --- a/core/integration/features/verified/0011-MARA-006.feature +++ b/core/integration/features/verified/0011-MARA-006.feature @@ -24,15 +24,16 @@ Feature: check margin account with partially filled order | limits.markets.maxPeggedOrders | 2 | And the average block duration is "1" + @Liquidation Scenario: 001 If an order is partially filled and if this leads to a reduced position and reduced riskiest long / short then the margin requirements are seen to be reduced and if margin balance is above release level then the excess amount is transferred to the general account.0011-MARA-006. 0011-MARA-008 Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | auxiliary1 | USD | 1000000000000 | - | auxiliary2 | USD | 1000000000000 | - | trader2 | USD | 90000 | - | trader20 | USD | 10000 | - | trader3 | USD | 90000 | - | lprov | USD | 1000000000000 | + | party | asset | amount | + | auxiliary1 | USD | 1000000000000 | + | auxiliary2 | USD | 1000000000000 | + | trader2 | USD | 90000 | + | trader20 | USD | 1000000000000 | + | trader3 | USD | 90000 | + | lprov | USD | 1000000000000 | When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -61,11 +62,11 @@ Feature: check margin account with partially filled order And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader2 | ETH/DEC20 | 46754 | 56104 | 70131 | 93508 | + | trader2 | ETH/DEC20 | 46754 | 56104 | 70131 | 93508 | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader2 | USD | ETH/DEC20 | 70131 | 19869 | + | trader2 | USD | ETH/DEC20 | 70131 | 19869 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | @@ -73,11 +74,11 @@ Feature: check margin account with partially filled order And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader2 | ETH/DEC20 | 46754 | 56104 | 70131 | 93508 | + | trader2 | ETH/DEC20 | 46754 | 56104 | 70131 | 93508 | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader2 | USD | ETH/DEC20 | 70131 | 19869 | + | trader2 | USD | ETH/DEC20 | 70131 | 19869 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | @@ -85,7 +86,7 @@ Feature: check margin account with partially filled order And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader2 | ETH/DEC20 | 34916 | 41899 | 52374 | 69832 | + | trader2 | ETH/DEC20 | 34916 | 41899 | 52374 | 69832 | # margin is under above level, then the excess amount is transferred to the general account Then the parties should have the following account balances: @@ -105,13 +106,14 @@ Feature: check margin account with partially filled order | party | asset | market id | margin | general | | trader2 | USD | ETH/DEC20 | 52374 | 37626 | +@Liquidation Scenario: 002 check margin for GTT order type.0011-MARA-007 Given the parties deposit on asset's general account the following amount: | party | asset | amount | | auxiliary1 | USD | 1000000000000 | | auxiliary2 | USD | 1000000000000 | | trader2 | USD | 90000 | - | trader20 | USD | 10000 | + | trader20 | USD | 1000000000000 | | trader3 | USD | 90000 | | trader4 | USD | 90000 | | lprov | USD | 1000000000000 | @@ -121,9 +123,9 @@ Scenario: 002 check margin for GTT order type.0011-MARA-007 | lp0 | lprov | ETH/DEC20 | 100000 | 0.001 | submission | | lp0 | lprov | ETH/DEC20 | 100000 | 0.001 | amendment | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lprov | ETH/DEC20 | 2 | 1 | sell | ASK | 100 | 55 | - | lprov | ETH/DEC20 | 2 | 1 | buy | BID | 100 | 55 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lprov | ETH/DEC20 | 2 | 1 | sell | ASK | 100 | 55 | + | lprov | ETH/DEC20 | 2 | 1 | buy | BID | 100 | 55 | Then the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | expires in | @@ -137,17 +139,17 @@ Scenario: 002 check margin for GTT order type.0011-MARA-007 # setup trader2 position for an order which is partially filled and leading to a reduced position When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif |expires in | - | trader2 | ETH/DEC20 | sell | 40 | 50 | 0 | TYPE_LIMIT | TIF_GTT |6 | - | trader20 | ETH/DEC20 | buy | 40 | 50 | 1 | TYPE_LIMIT | TIF_GTT |6 | + | party | market id | side | volume | price | resulting trades | type | tif | expires in | + | trader2 | ETH/DEC20 | sell | 40 | 50 | 0 | TYPE_LIMIT | TIF_GTT | 6 | + | trader20 | ETH/DEC20 | buy | 40 | 50 | 1 | TYPE_LIMIT | TIF_GTT | 6 | And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader2 | ETH/DEC20 | 46754 | 56104 | 70131 | 93508 | + | trader2 | ETH/DEC20 | 46754 | 56104 | 70131 | 93508 | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader2 | USD | ETH/DEC20 | 70131 | 19869 | + | trader2 | USD | ETH/DEC20 | 70131 | 19869 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif |expires in | @@ -155,39 +157,39 @@ Scenario: 002 check margin for GTT order type.0011-MARA-007 And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader2 | ETH/DEC20 | 46754 | 56104 | 70131 | 93508 | + | trader2 | ETH/DEC20 | 46754 | 56104 | 70131 | 93508 | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader2 | USD | ETH/DEC20 | 70131 | 19869 | + | trader2 | USD | ETH/DEC20 | 70131 | 19869 | When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif |expires in | - | trader20 | ETH/DEC20 | sell | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTT | 6 | + | party | market id | side | volume | price | resulting trades | type | tif | expires in | + | trader20 | ETH/DEC20 | sell | 10 | 50 | 1 | TYPE_LIMIT | TIF_GTT | 6 | And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader2 | ETH/DEC20 | 34916 | 41899 | 52374 | 69832 | + | trader2 | ETH/DEC20 | 34916 | 41899 | 52374 | 69832 | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader2 | USD | ETH/DEC20 | 52374 | 37626 | + | trader2 | USD | ETH/DEC20 | 52374 | 37626 | When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif |expires in | - | trader20 | ETH/DEC20 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTT | 6 | + | party | market id | side | volume | price | resulting trades | type | tif | expires in | + | trader20 | ETH/DEC20 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTT | 6 | And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader2 | ETH/DEC20 | 33752 | 40502 | 50628 | 67504 | + | trader2 | ETH/DEC20 | 33752 | 40502 | 50628 | 67504 | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader2 | USD | ETH/DEC20 | 52374 | 37626 | + | trader2 | USD | ETH/DEC20 | 52374 | 37626 | # trader3 places a new order When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif |expires in | - | trader3 | ETH/DEC20 | buy | 20 | 45 | 0 | TYPE_LIMIT | TIF_GTT | 3 | + | party | market id | side | volume | price | resulting trades | type | tif | expires in | + | trader3 | ETH/DEC20 | buy | 20 | 45 | 0 | TYPE_LIMIT | TIF_GTT | 3 | And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | @@ -208,9 +210,9 @@ Scenario: 002 check margin for GTT order type.0011-MARA-007 | trader3 | USD | ETH/DEC20 | 0 | 90000 | #reset mark price When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif |expires in | - | trader2 | ETH/DEC20 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTT | 6 | - | trader20 | ETH/DEC20 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTT | 6 | + | party | market id | side | volume | price | resulting trades | type | tif | expires in | + | trader2 | ETH/DEC20 | buy | 1 | 50 | 0 | TYPE_LIMIT | TIF_GTT | 6 | + | trader20 | ETH/DEC20 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GTT | 6 | And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | @@ -221,12 +223,12 @@ Scenario: 002 check margin for GTT order type.0011-MARA-007 | trader3 | USD | ETH/DEC20 | 0 | 90000 | When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif |expires in | - | trader3 | ETH/DEC20 | buy | 10 | 45 | 0 | TYPE_LIMIT | TIF_GTT | 3 | + | party | market id | side | volume | price | resulting trades | type | tif | expires in | + | trader3 | ETH/DEC20 | buy | 10 | 45 | 0 | TYPE_LIMIT | TIF_GTT | 3 | And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader3 | ETH/DEC20 | 401 | 481 | 601 | 802 | + | trader3 | ETH/DEC20 | 401 | 481 | 601 | 802 | Then the parties should have the following account balances: | party | asset | market id | margin | general | @@ -244,9 +246,9 @@ Scenario: 002 check margin for GTT order type.0011-MARA-007 # now we create a case when trader 4 place a GTC order first and then GTT order When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif |expires in | - | trader4 | ETH/DEC20 | buy | 5 | 45 | 0 | TYPE_LIMIT | TIF_GTC | | - | trader4 | ETH/DEC20 | buy | 10 | 45 | 0 | TYPE_LIMIT | TIF_GTT | 3 | + | party | market id | side | volume | price | resulting trades | type | tif | expires in | + | trader4 | ETH/DEC20 | buy | 5 | 45 | 0 | TYPE_LIMIT | TIF_GTC | | + | trader4 | ETH/DEC20 | buy | 10 | 45 | 0 | TYPE_LIMIT | TIF_GTT | 3 | And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | @@ -265,15 +267,16 @@ Scenario: 002 check margin for GTT order type.0011-MARA-007 | party | asset | market id | margin | general | | trader4 | USD | ETH/DEC20 | 901 | 89099 | + @Liquidation Scenario: 003 check margin for GFN order type 0011-MARA-009 Given the parties deposit on asset's general account the following amount: - | party | asset | amount | - | auxiliary1 | USD | 1000000000000 | - | auxiliary2 | USD | 1000000000000 | - | trader2 | USD | 90000 | - | trader20 | USD | 10000 | - | trader3 | USD | 90000 | - | lprov | USD | 1000000000000 | + | party | asset | amount | + | auxiliary1 | USD | 1000000000000 | + | auxiliary2 | USD | 1000000000000 | + | trader2 | USD | 90000 | + | trader20 | USD | 9000000000000 | + | trader3 | USD | 90000 | + | lprov | USD | 1000000000000 | When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -302,11 +305,11 @@ Scenario: 002 check margin for GTT order type.0011-MARA-007 And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader2 | ETH/DEC21 | 46754 | 56104 | 70131 | 93508 | + | trader2 | ETH/DEC21 | 46754 | 56104 | 70131 | 93508 | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader2 | USD | ETH/DEC21 | 70131 | 19869 | + | trader2 | USD | ETH/DEC21 | 70131 | 19869 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif |reference | @@ -314,24 +317,24 @@ Scenario: 002 check margin for GTT order type.0011-MARA-007 And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader2 | ETH/DEC21 | 46754 | 56104 | 70131 | 93508 | + | trader2 | ETH/DEC21 | 46754 | 56104 | 70131 | 93508 | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader2 | USD | ETH/DEC21 | 70131 | 19869 | + | trader2 | USD | ETH/DEC21 | 70131 | 19869 | When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | - | trader20 | ETH/DEC21 | sell | 10 | 50 | 1 | TYPE_LIMIT | TIF_GFN | + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader20 | ETH/DEC21 | sell | 1 | 50 | 1 | TYPE_LIMIT | TIF_GFN | t20-ref | And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader2 | ETH/DEC21 | 34916 | 41899 | 52374 | 69832 | + | trader2 | ETH/DEC21 | 45546 | 54655 | 68319 | 91092 | # margin is under above level, then the excess amount is transferred to the general account Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader2 | USD | ETH/DEC21 | 52374 | 37626 | + | trader2 | USD | ETH/DEC21 | 70131 | 19869 | And the orders should have the following status: | party | reference | status | diff --git a/core/integration/features/verified/0015-INSR-insurance_pool_balance_test.feature b/core/integration/features/verified/0015-INSR-insurance_pool_balance_test.feature index d16056d4a7..7ae839b0fa 100644 --- a/core/integration/features/verified/0015-INSR-insurance_pool_balance_test.feature +++ b/core/integration/features/verified/0015-INSR-insurance_pool_balance_test.feature @@ -1,5 +1,6 @@ Feature: Test closeout type 1: margin >= cost of closeout + @NoPerp @PanicDebug Scenario: case 1 (using simple risk model) from https://docs.google.com/spreadsheets/d/1CIPH0aQmIKj6YeFW9ApP_l-jwB4OcsNQ/edit#gid=1555964910 (0015-INSR-001, 0015-INSR-003, 0018-RSKM-001, 0018-RSKM-003, 0010-MARG-004, 0010-MARG-005, 0010-MARG-006, 0010-MARG-007, 0010-MARG-008. 0010-MARG-009) Given the simple risk model named "simple-risk-model-1": | long | short | max move up | min move down | probability of trading | @@ -149,6 +150,7 @@ Feature: Test closeout type 1: margin >= cost of closeout When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | party3 | ETH/DEC19 | sell | 1 | 126 | 1 | TYPE_LIMIT | TIF_GTC | ref-1-xxx | + And the network moves ahead "1" blocks Then the mark price should be "126" for the market "ETH/DEC19" And the insurance pool balance should be "38500" for the market "ETH/DEC19" @@ -164,10 +166,10 @@ Feature: Test closeout type 1: margin >= cost of closeout | side | price | volume | | sell | 300 | 1 | | sell | 160 | 563 | - | sell | 150 | 900 | + | sell | 150 | 900 | | buy | 80 | 1000 | - | buy | 70 | 2286 | - | buy | 20 | 1 | + | buy | 70 | 2286 | + | buy | 20 | 1 | # Margin account balance not updated following a trade (above search) Then the parties should have the following margin levels: @@ -195,10 +197,10 @@ Feature: Test closeout type 1: margin >= cost of closeout Then the parties should have the following account balances: | party | asset | market id | margin | general | | party1 | USD | ETH/DEC19 | 0 | 0 | - | party2 | USD | ETH/DEC19 | 20750 | 49980850 | + | party2 | USD | ETH/DEC19 | 20750 | 49980850 | | party3 | USD | ETH/DEC19 | 414 | 30073 | | aux1 | USD | ETH/DEC19 | 792 | 999999182 | - | aux2 | USD | ETH/DEC19 | 356 | 999999670 | + | aux2 | USD | ETH/DEC19 | 356 | 999999670 | | sellSideProvider | USD | ETH/DEC19 | 380400 | 999622000 | | buySideProvider | USD | ETH/DEC19 | 189000 | 999811000 | @@ -208,7 +210,7 @@ Feature: Test closeout type 1: margin >= cost of closeout #check margin account and margin level | party | market id | maintenance | initial | | party1 | ETH/DEC19 | 0 | 0 | - | party2 | ETH/DEC19 | 13736 | 20604 | + | party2 | ETH/DEC19 | 13736 | 20604 | | party3 | ETH/DEC19 | 276 | 414 | And the cumulated balance for all accounts should be worth "5050075500" @@ -230,12 +232,12 @@ Feature: Test closeout type 1: margin >= cost of closeout #check margin account and margin level And the parties should have the following account balances: | party | asset | market id | margin | general | - | party2 | USD | ETH/DEC19 | 20750 | 49980850 | + | party2 | USD | ETH/DEC19 | 20750 | 49980850 | | party3 | USD | ETH/DEC19 | 414 | 30073 | Then the parties should have the following margin levels: | party | market id | maintenance | initial | | party3 | ETH/DEC19 | 276 | 414 | - | party2 | ETH/DEC19 | 13736 | 20604 | + | party2 | ETH/DEC19 | 13736 | 20604 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | @@ -244,12 +246,12 @@ Feature: Test closeout type 1: margin >= cost of closeout #check margin account and margin level And the parties should have the following account balances: | party | asset | market id | margin | general | - | party2 | USD | ETH/DEC19 | 37023 | 49964577 | + | party2 | USD | ETH/DEC19 | 37023 | 49964577 | | party3 | USD | ETH/DEC19 | 414 | 30073 | Then the parties should have the following margin levels: | party | market id | maintenance | initial | - | party2 | ETH/DEC19 | 24682 | 37023 | + | party2 | ETH/DEC19 | 24682 | 37023 | | party3 | ETH/DEC19 | 276 | 414 | When the parties place the following orders with ticks: @@ -265,23 +267,23 @@ Feature: Test closeout type 1: margin >= cost of closeout Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | - | party3 | -51 | 56 | 0 | + | party3 | -51 | 56 | 0 | #check margin account and margin level And the parties should have the following account balances: | party | asset | market id | margin | general | - | party2 | USD | ETH/DEC19 | 15855 | 49980089 | - | party3 | USD | ETH/DEC19 | 19385 | 10808 | + | party2 | USD | ETH/DEC19 | 15855 | 49980089 | + | party3 | USD | ETH/DEC19 | 19385 | 10808 | Then the parties should have the following margin levels: | party | market id | maintenance | initial | - | party2 | ETH/DEC19 | 10570 | 15855 | - | party3 | ETH/DEC19 | 11730 | 17595 | + | party2 | ETH/DEC19 | 10570 | 15855 | + | party3 | ETH/DEC19 | 11730 | 17595 | Then the order book should have the following volumes for market "ETH/DEC19": | side | price | volume | | sell | 500 | 1000 | - | sell | 300 | 1 | + | sell | 300 | 1 | Scenario: case 2 using lognomal risk model (0015-INSR-003, 0010-MARG-009, 0010-MARG-010, 0010-MARG-011) Given the log normal risk model named "lognormal-risk-model-fish": diff --git a/core/integration/features/verified/0019-MCAL-margin_calculator-slippage.feature b/core/integration/features/verified/0019-MCAL-margin_calculator-slippage.feature index 9c4fa8b025..8b437e8f33 100644 --- a/core/integration/features/verified/0019-MCAL-margin_calculator-slippage.feature +++ b/core/integration/features/verified/0019-MCAL-margin_calculator-slippage.feature @@ -15,12 +15,12 @@ Feature: Test capped maximum slippage values are calculated correctly in range o And the markets: | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | - | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0.25 | default-futures | - | ETH/MAR23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 100 | 100 | default-futures | + | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | + | ETH/MAR23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 100 | 0 | default-futures | @SLABug - Scenario: Check slippage-factors yield the correct maximum slippage for a specific market state (0019-MCAL-011)(0019-MCAL-012) + Scenario: Check slippage-factors yield the correct maximum slippage for a specific market state (0019-MCAL-024)(0019-MCAL-025) # Create position, order book, and mark price conditions matching the spec Given the parties deposit on asset's general account the following amount: @@ -46,7 +46,7 @@ Feature: Test capped maximum slippage values are calculated correctly in range o | sellSideProvider| ETH/MAR23 | sell | 10 | 100100 | 0 | TYPE_LIMIT | TIF_GTC | - # Checks for 0019-MCAL-012 +# Checks for 0019-MCAL-025 When the network moves ahead "2" blocks # Check mark-price matches the specification Then the mark price should be "15900" for the market "ETH/FEB23" @@ -60,8 +60,8 @@ Feature: Test capped maximum slippage values are calculated correctly in range o # Check party margin levels match the specification And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | party | ETH/FEB23 | 9540 | 10494 | 11448 | 13356 | - + | party | ETH/FEB23 | 5565 | 6121 | 6678 | 7791 | +#margin = min((100000-15900), 15900*(0.25))+0.1*15900=5565 # Checks for 0019-MCAL-013 # Network has moved ahead to leave ETH/FEB23 opening auction, ends this opening auction, too @@ -79,6 +79,7 @@ Feature: Test capped maximum slippage values are calculated correctly in range o And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | | party | ETH/MAR23 | 85690 | 94259 | 102828 | 119966 | +#margin = min((100000-15900), 15900*(100))+0.1*15900=85690 Scenario: Check margin is calculated correctly using capped slippage depending on the volume of orders on the book (0019-MCAL-014)(0019-MCAL-015)(0019-MCAL-016)(0019-MCAL-017)(0019-MCAL-018) @@ -99,7 +100,6 @@ Feature: Test capped maximum slippage values are calculated correctly in range o | sellSideProvider | ETH/FEB23 | sell | 5 | 502 | 0 | TYPE_LIMIT | TIF_GTC | ssp-2 | | sellSideProvider | ETH/FEB23 | sell | 10 | 504 | 0 | TYPE_LIMIT | TIF_GTC | ssp-1 | - # Case for 0019-MCAL-017 and 0019-MCAL-018: # - For the party 'longTrader'; riskiest long > 0 && abs(riskiest long) < sum of volume of order book bids # - For the party 'shortTrader'; riskiest short < 0 && abs(riskiest long) < sum of volume of order book bids @@ -116,7 +116,6 @@ Feature: Test capped maximum slippage values are calculated correctly in range o | longTrader | ETH/FEB23 | 530 | 583 | 636 | 742 | | shortTrader | ETH/FEB23 | 530 | 583 | 636 | 742 | - # Case for 0019-MCAL-015: # - For the party 'longTrader'; riskiest long > 0 && abs(riskiest long) > sum of volume of order book bids When the parties cancel the following orders: @@ -139,8 +138,7 @@ Feature: Test capped maximum slippage values are calculated correctly in range o Then the mark price should be "500" for the market "ETH/FEB23" And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | longTrader | ETH/FEB23 | 14250 | 15675 | 17100 | 19950 | - + | longTrader | ETH/FEB23 | 1750 | 1925 | 2100 | 2450 | # Case for 0019-MCAL-016: # - For the party 'shortTrader'; riskiest short < 0 && abs(riskiest short) > sum of volume of order book asks @@ -164,9 +162,8 @@ Feature: Test capped maximum slippage values are calculated correctly in range o Then the mark price should be "500" for the market "ETH/FEB23" And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | shortTrader | ETH/FEB23 | 14250 | 15675 | 17100 | 19950 | + | shortTrader | ETH/FEB23 | 1750 | 1925 | 2100 | 2450 | - # Case for 0019-MCAL-014: # - For the party 'longTrader'; riskiest long > 0 && no bids on the book # - For the party 'shortTrader'; riskiest short < 0 && no asks on the book @@ -184,5 +181,5 @@ Feature: Test capped maximum slippage values are calculated correctly in range o Then the mark price should be "498" for the market "ETH/FEB23" And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | longTrader | ETH/FEB23 | 14193 | 15612 | 17031 | 19870 | - | shortTrader | ETH/FEB23 | 14193 | 15612 | 17031 | 19870 | + | longTrader | ETH/FEB23 | 1743 | 1917 | 2091 | 2440 | + | shortTrader | ETH/FEB23 | 1743 | 1917 | 2091 | 2440 | diff --git a/core/integration/features/verified/0026-AUCT-auction_interaction.feature b/core/integration/features/verified/0026-AUCT-auction_interaction.feature index 326b72a9ff..34366224a3 100644 --- a/core/integration/features/verified/0026-AUCT-auction_interaction.feature +++ b/core/integration/features/verified/0026-AUCT-auction_interaction.feature @@ -129,720 +129,3 @@ Feature: Test interactions between different auction types (0035-LIQM-001) And the market data for the market "ETH/DEC21" should be: | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | | 1000 | TRADING_MODE_CONTINUOUS | 100 | 990 | 1010 | 1000 | 10000 | 10 | - - @NoPerp - Scenario: When trying to exit opening auction liquidity monitoring is triggered due to insufficient supplied stake (0026-AUCT-004, 0026-AUCT-005) - - Given the liquidity monitoring parameters: - | name | triggering ratio | time window | scaling factor | - | updated-lqm-params | 0.8 | 24h | 1 | - When the markets are updated: - | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | - | ETH/DEC21 | updated-lqm-params | 0.5 | 0 | - - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 700 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 700 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 700 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 700 | 0.001 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - - And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - - When the opening auction period ends for market "ETH/DEC21" - - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | extension trigger | - | TRADING_MODE_OPENING_AUCTION | AUCTION_TRIGGER_OPENING | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | - - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 799 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 799 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 799 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 799 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - - When the network moves ahead "1" blocks - And the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | target stake | supplied stake | open interest | - | TRADING_MODE_OPENING_AUCTION | AUCTION_TRIGGER_OPENING | 1000 | 799 | 0 | - - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 800 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 800 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 800 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 800 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - - And the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | extension trigger | target stake | supplied stake | open interest | - | TRADING_MODE_OPENING_AUCTION | AUCTION_TRIGGER_OPENING | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 1000 | 800 | 0 | - - When the network moves ahead "1" blocks - - Then the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC21" - - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - - When the network moves ahead "1" blocks - Then the auction ends with a traded volume of "10" at a price of "1000" - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_CONTINUOUS | 100 | 990 | 1010 | 1000 | 1000 | 10 | - - @NoPerp - Scenario: Once market is in continuous trading mode: post a persistent order that should trigger liquidity auction (not enough target stake), appropriate event is sent and market in TRADING_MODE_MONITORING_AUCTION (0026-AUCT-005, 0035-LIQM-003) - Given the liquidity monitoring parameters: - | name | triggering ratio | time window | scaling factor | - | updated-lqm-params | 0.8 | 24h | 1 | - When the markets are updated: - | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | - | ETH/DEC21 | updated-lqm-params | 0.5 | 0 | - - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 1 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - - When the opening auction period ends for market "ETH/DEC21" - Then the auction ends with a traded volume of "10" at a price of "1000" - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_CONTINUOUS | 100 | 990 | 1010 | 1000 | 1000 | 10 | - - Then clear all events - - # Trade is expected to go through - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party2 | ETH/DEC21 | sell | 20 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 20 | 1010 | 3 | TYPE_LIMIT | TIF_GTC | - - # verify that we don't enter liquidity auction immediately, but at the end of block as per 0035-LIQM-003 - And the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | target stake | supplied stake | open interest | - | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 3000 | 1000 | 30 | - - # move to the next block to perform liquidity check - Then the network moves ahead "1" blocks - # open interest updates to include buy order of size 20 - And the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | target stake | supplied stake | open interest | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 3030 | 1000 | 30 | - - Then the following events should be emitted: - | type | - | PositionStateEvent | - | MarginLevelsEvent | - | AccountEvent | - | LedgerMovements | - | OrderEvent | - | AuctionEvent | - | MarketUpdatedEvent | - # LP repricing, checking, and cancelling emits a ton of events - And a total of "80" events should be emitted - - Then the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 10000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 10000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 10000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 10000 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - - When the network moves ahead "11" blocks - - And the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | target stake | supplied stake | open interest | - | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 3030 | 10000 | 30 | - - @NoPerp - Scenario: Once market is in continuous trading mode: post a non-persistent order that should trigger liquidity auction (not enough target stake), still goes through, but auction is triggered the next block - Given the liquidity monitoring parameters: - | name | triggering ratio | time window | scaling factor | - | updated-lqm-params | 0.8 | 24h | 1 | - When the markets are updated: - | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | - | ETH/DEC21 | updated-lqm-params | 0.5 | 0 | - - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - - And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 1 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - - When the opening auction period ends for market "ETH/DEC21" - Then the auction ends with a traded volume of "10" at a price of "1000" - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_CONTINUOUS | 100 | 990 | 1010 | 1000 | 1000 | 10 | - - And the order book should have the following volumes for market "ETH/DEC21": - | side | price | volume | - | sell | 1100 | 1 | - | sell | 1012 | 1 | - | sell | 1010 | 1 | - | sell | 1001 | 2 | - | buy | 999 | 2 | - | buy | 990 | 1 | - | buy | 988 | 1 | - | buy | 900 | 1 | - - Then the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | party2 | ETH/DEC21 | sell | 2 | 1010 | 0 | TYPE_LIMIT | TIF_GFN | ref-ref | - | party1 | ETH/DEC21 | buy | 20 | 1010 | 3 | TYPE_LIMIT | TIF_GFN | ref-ref | - - And the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | target stake | supplied stake | open interest | - | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 1500 | 1000 | 15 | - When the network moves ahead "1" blocks - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | target stake | supplied stake | open interest | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 1515 | 1000 | 15 | - - Scenario: Once market is in continuous trading mode: post a non-persistent order that should trigger price auction, check that the order gets stopped, appropriate event is sent and market remains in TRADING_MODE_CONTINUOUS, 0024-OSTA-012 - Given the liquidity monitoring parameters: - | name | triggering ratio | time window | scaling factor | - | updated-lqm-params | 0.8 | 24h | 1.0 | - When the markets are updated: - | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | - | ETH/DEC21 | updated-lqm-params | 0.5 | 0.0 | - - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - - And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 1 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - - When the opening auction period ends for market "ETH/DEC21" - Then the auction ends with a traded volume of "10" at a price of "1000" - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_CONTINUOUS | 100 | 990 | 1010 | 1000 | 1000 | 10 | - - When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | reference | error | - | party2 | ETH/DEC21 | sell | 10 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | no-reject | | - | party1 | ETH/DEC21 | buy | 10 | 1020 | 0 | TYPE_LIMIT | TIF_GFN | reject-me | OrderError: non-persistent order trades out of price bounds | - Then the following orders should be stopped: - | party | market id | reason | - | party1 | ETH/DEC21 | ORDER_ERROR_NON_PERSISTENT_ORDER_OUT_OF_PRICE_BOUNDS | - - When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | reference | error | - | party2 | ETH/DEC21 | sell | 10 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | no-reject | | - | party1 | ETH/DEC21 | buy | 10 | 1020 | 0 | TYPE_LIMIT | TIF_FOK | reject-me | OrderError: non-persistent order trades out of price bounds | - Then the following orders should be stopped: - | party | market id | reason | - | party1 | ETH/DEC21 | ORDER_ERROR_NON_PERSISTENT_ORDER_OUT_OF_PRICE_BOUNDS | - - Then the network moves ahead "5" blocks - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_CONTINUOUS | 100 | 990 | 1010 | 1000 | 1000 | 10 | - - @NoPerp - Scenario: Once market is in continuous trading mode: enter liquidity monitoring auction -> extend with price monitoring auction -> leave auction mode (0068-MATC-033,0026-AUCT-005) - - Given the liquidity monitoring parameters: - | name | triggering ratio | time window | scaling factor | - | updated-lqm-params | 0.8 | 24h | 1 | - When the markets are updated: - | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | - | ETH/DEC21 | updated-lqm-params | 0.5 | 0 | - - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - - And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 1 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - - When the opening auction period ends for market "ETH/DEC21" - Then the auction ends with a traded volume of "10" at a price of "1000" - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_CONTINUOUS | 100 | 990 | 1010 | 1000 | 1000 | 10 | - - And the order book should have the following volumes for market "ETH/DEC21": - | side | price | volume | - | sell | 1012 | 1 | - | sell | 1010 | 1 | - | sell | 1001 | 2 | - | buy | 999 | 2 | - | buy | 988 | 1 | - | buy | 900 | 1 | - - # If the order traded there'd be insufficient liquidity for the market to operate, the next block will trigger auction - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party2 | ETH/DEC21 | sell | 3 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 4 | 1010 | 3 | TYPE_LIMIT | TIF_FOK | - Then the market data for the market "ETH/DEC21" should be: - | mark price | last traded price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | 1010 | TRADING_MODE_CONTINUOUS | 100 | 990 | 1010 | 1400 | 1000 | 14 | - - When the network moves ahead "1" blocks - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | horizon | min bound | max bound | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 100 | 992 | 1011 | - - # submit the order during auction so we can cancel it later on - And the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | party1 | ETH/DEC21 | buy | 10 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | cancel-me-1 | - | party2 | ETH/DEC21 | sell | 10 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | cancel-me-2 | - - When the network moves ahead "10" blocks - Then the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 20 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 20 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - - And the parties cancel the following orders: - | party | reference | - | party1 | cancel-me-1 | - | party2 | cancel-me-2 | - - When the network moves ahead "2" blocks - - Then the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 4080 | 0.001 | amendment | - - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - - # leave liquidity auction - When the network moves ahead "2" blocks - - # We should be able to leave liquidity auction now (price extension keep the market in auction mode though) - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | extension trigger | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | AUCTION_TRIGGER_PRICE | - - # End price auction extension - When the network moves ahead "301" blocks - Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1020 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 100 | 1010 | 1030 | 3468 | 4080 | 34 | - - @NoPerp - Scenario: Once market is in continuous trading mode: enter liquidity monitoring auction -> extend with price monitoring auction -> extend with liquidity monitoring -> leave auction mode (0068-MATC-033,0026-AUCT-005) - Given the liquidity monitoring parameters: - | name | triggering ratio | time window | scaling factor | - | updated-lqm-params | 0.8 | 24h | 1 | - When the markets are updated: - | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | - | ETH/DEC21 | updated-lqm-params | 0.5 | 0 | - - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - - And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 1 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - - When the opening auction period ends for market "ETH/DEC21" - Then the auction ends with a traded volume of "10" at a price of "1000" - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_CONTINUOUS | 100 | 990 | 1010 | 1000 | 1000 | 10 | - - And the order book should have the following volumes for market "ETH/DEC21": - | side | price | volume | - | sell | 1100 | 1 | - | sell | 1012 | 1 | - | sell | 1010 | 1 | - | sell | 1001 | 2 | - | buy | 999 | 2 | - | buy | 988 | 1 | - | buy | 900 | 1 | - - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | party2 | ETH/DEC21 | sell | 2 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | trigger-liq | - | party1 | ETH/DEC21 | buy | 10 | 1010 | 3 | TYPE_LIMIT | TIF_GTC | trigger-liq | - Then the market data for the market "ETH/DEC21" should be: - | mark price | last traded price | trading mode | target stake | supplied stake | open interest | - | 1000 | 1010 | TRADING_MODE_CONTINUOUS | 1500 | 1000 | 15 | - - When the network moves ahead "1" blocks - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | - - When the network moves ahead "1" blocks - Then the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | party1 | ETH/DEC21 | buy | 10 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | cancel-me-1 | - | party2 | ETH/DEC21 | sell | 10 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | cancel-me-2 | - And the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 20 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 20 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - - And the parties cancel the following orders: - | party | reference | - | party1 | cancel-me-1 | - | party2 | cancel-me-2 | - - When the network moves ahead "1" blocks - - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 4468 | 0.001 | amendment | - - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - - When the network moves ahead "11" blocks - # We should be able to leave liquidity auction now (price extension keep the market in auction mode though) - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | extension trigger | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | AUCTION_TRIGGER_PRICE | - - And the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 10 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 10 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - - # Jump ahead to the end of the price monitoring auction period - When the network moves ahead "301" blocks - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | - | 1010 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 4590 | 4468 | 15 | - - When the network moves ahead "1" blocks - - # Increasing the supplied stake should end the auction - Then the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 4591 | 0.001 | amendment | - - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - - When the network moves ahead "1" blocks - Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | - | 1020 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 4590 | 4591 | 45 | - - @NoPerp - Scenario: Once market is in continuous trading mode: enter price monitoring auction -> extend with liquidity monitoring auction -> leave auction mode (0068-MATC-033,0026-AUCT-005) - Given the liquidity monitoring parameters: - | name | triggering ratio | time window | scaling factor | - | updated-lqm-params | 0.8 | 24h | 1 | - When the markets are updated: - | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | - | ETH/DEC21 | updated-lqm-params | 0.5 | 0 | - - Then the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 2000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 2000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 2000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 2000 | 0.001 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - - And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 10 | 900 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 10 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 1 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - - When the opening auction period ends for market "ETH/DEC21" - Then the auction ends with a traded volume of "10" at a price of "1000" - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_CONTINUOUS | 100 | 990 | 1010 | 1000 | 2000 | 10 | - - When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | - | party2 | ETH/DEC21 | sell | 20 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 20 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | - - # end price auction (gets extended by liquidity) - When the network moves ahead "301" blocks - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | extension trigger | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | - - # We were in liquidity auction, we've updated the commitment amount - When the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 4000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 4000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 4000 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 4000 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | buy | MID | 2 | 1 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | MID | 2 | 1 | - And the network moves ahead "1" blocks - Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1020 | TRADING_MODE_CONTINUOUS | 100 | 1010 | 1030 | 3060 | 4000 | 30 | - - @NoPerp - Scenario: Once market is in continuous trading mode: enter liquidity monitoring auction -> extend with price monitoring auction -> extend with liquidity auction -> leave auction mode (0068-MATC-033, 0026-AUCT-005) - - Given the liquidity monitoring parameters: - | name | triggering ratio | time window | scaling factor | - | updated-lqm-params | 0.8 | 24h | 1 | - When the markets are updated: - | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | - | ETH/DEC21 | updated-lqm-params | 0.5 | 0 | - - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - | lp1 | party0 | ETH/DEC21 | 1000 | 0.001 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - - And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/DEC21 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - - When the opening auction period ends for market "ETH/DEC21" - Then the auction ends with a traded volume of "10" at a price of "1000" - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1000 | TRADING_MODE_CONTINUOUS | 100 | 990 | 1010 | 1000 | 1000 | 10 | - - # Triggering liquidity monitoring auction - When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | party1 | ETH/DEC21 | buy | 10 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | trigger-l-1 | - | party2 | ETH/DEC21 | sell | 10 | 1010 | 1 | TYPE_LIMIT | TIF_GTC | trigger-l-2 | - Then the network moves ahead "1" blocks - - And the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | extension trigger | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | AUCTION_TRIGGER_UNSPECIFIED | - - When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | party1 | ETH/DEC21 | buy | 10 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | cancel-me-1 | - | party2 | ETH/DEC21 | sell | 10 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | cancel-me-2 | - - And the network moves ahead "1" blocks - Then the parties cancel the following orders: - | party | reference | - | party1 | cancel-me-1 | - | party2 | cancel-me-2 | - - # Updating the commitment amount to come out of liquidity auction - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 2080 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 2080 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - - When the network moves ahead "1" blocks - Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | extension trigger | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1010 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | AUCTION_TRIGGER_UNSPECIFIED | 100 | 995 | 1015 | 2020 | 2080 | 20 | - - # Now we place some orders that are outside the price range to trigger price auction - When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 20 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 20 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 4080 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 4080 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - - Then the network moves ahead "9" blocks - - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | extension trigger | target stake | supplied stake | open interest | - | 1010 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | AUCTION_TRIGGER_PRICE | 4080 | 4080 | 20 | - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | extension trigger | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | AUCTION_TRIGGER_PRICE | - - # increase open interest - When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/DEC21 | buy | 20 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/DEC21 | sell | 20 | 1020 | 0 | TYPE_LIMIT | TIF_GTC | - # Jump ahead to when the end price monitoring auction should end - And the network moves ahead "301" blocks - - Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | extension trigger | target stake | supplied stake | open interest | - | 1010 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 6120 | 4080 | 20 | - - When the network moves ahead "1" blocks - - # Updating the commitment amount to come out of liquidity auction - Then the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/DEC21 | 6120 | 0.001 | amendment | - | lp1 | party0 | ETH/DEC21 | 6120 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 2 | - | party0 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 2 | - - When the network moves ahead "10" blocks - And the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1020 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 100 | 1010 | 1030 | 6120 | 6120 | 60 | diff --git a/core/integration/features/verified/0029-FEES-multiple_discounts.feature b/core/integration/features/verified/0029-FEES-multiple_discounts.feature index a95f8ec330..8013c434ad 100644 --- a/core/integration/features/verified/0029-FEES-multiple_discounts.feature +++ b/core/integration/features/verified/0029-FEES-multiple_discounts.feature @@ -5,6 +5,15 @@ Feature: Discounts from multiple sources # Initialise timings Given time is updated to "2023-01-01T00:00:00Z" And the average block duration is "1" + And the margin calculator named "margin-calculator-1": + | search factor | initial factor | release factor | + | 1.2 | 1.5 | 1.7 | + And the log normal risk model named "log-normal-risk-model": + | risk aversion | tau | mu | r | sigma | + | 0.000001 | 0.1 | 0 | 0 | 1.0 | + And the price monitoring named "price-monitoring": + | horizon | probability | auction extension | + | 3600 | 0.99 | 15 | # Initialise the markets and network parameters Given the following network parameters are set: @@ -16,6 +25,7 @@ Feature: Discounts from multiple sources | referralProgram.minStakedVegaTokens | 0 | | referralProgram.maxPartyNotionalVolumeByQuantumPerEpoch | 1000000000 | | referralProgram.maxReferralRewardProportion | 0.1 | + | validators.epoch.length | 10s | # Initalise the referral program @@ -50,39 +60,54 @@ Feature: Discounts from multiple sources And the markets: | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | decimal places | position decimal places | | ETH/USD.1.1 | ETH | USD.1.1 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e-3 | 0 | default-futures | 1 | 1 | + | ETH/USD.1.2 | ETH | USD.1.1 | log-normal-risk-model | margin-calculator-1 | 1 | default-none | price-monitoring | default-eth-for-future | 1e-3 | 0 | default-futures | 1 | 1 | And the liquidity monitoring parameters: | name | triggering ratio | time window | scaling factor | | lqm-params | 1.0 | 3600s | 1 | When the markets are updated: | id | liquidity monitoring | linear slippage factor | quadratic slippage factor | | ETH/USD.1.1 | lqm-params | 1e-3 | 0 | + | ETH/USD.1.2 | lqm-params | 1e-3 | 0 | # Initialise the parties Given the parties deposit on asset's general account the following amount: | party | asset | amount | | lpprov | USD.1.1 | 1000000000 | + | lpprov2 | USD.1.1 | 1000000000 | | aux1 | USD.1.1 | 1000000000 | | aux2 | USD.1.1 | 1000000000 | + | aux3 | USD.1.1 | 1000000000 | + | aux4 | USD.1.1 | 1000000000 | | referrer1 | USD.1.1 | 1000000000 | | referee1 | USD.1.1 | 1000000000 | | referee2 | USD.1.1 | 1000000000 | + | ptbuy | USD.1.1 | 1000000000 | + | ptsell | USD.1.1 | 1000000000 | # Exit the opening auction Given the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | lpprov | ETH/USD.1.1 | 1000000 | 0.01 | submission | + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lpprov | ETH/USD.1.1 | 1000000 | 0.01 | submission | + | lp2 | lpprov2 | ETH/USD.1.2 | 1000000 | 0.01 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | lpprov | ETH/USD.1.1 | 5000 | 1000 | buy | BID | 10000 | 1 | - | lpprov | ETH/USD.1.1 | 5000 | 1000 | sell | ASK | 10000 | 1 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | lpprov | ETH/USD.1.1 | 5000 | 1000 | buy | BID | 10000 | 1 | + | lpprov | ETH/USD.1.1 | 5000 | 1000 | sell | ASK | 10000 | 1 | + | lpprov2 | ETH/USD.1.2 | 5000 | 1000 | buy | BID | 10000 | 1 | + | lpprov2 | ETH/USD.1.2 | 5000 | 1000 | sell | ASK | 10000 | 1 | When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | aux1 | ETH/USD.1.1 | buy | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | | aux1 | ETH/USD.1.1 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | | aux2 | ETH/USD.1.1 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | | aux2 | ETH/USD.1.1 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | - And the opening auction period ends for market "ETH/USD.1.1" + | aux3 | ETH/USD.1.2 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/USD.1.2 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux4 | ETH/USD.1.2 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux4 | ETH/USD.1.2 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | + Then the opening auction period ends for market "ETH/USD.1.1" And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD.1.1" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD.1.2" # Create the referral set and codes Given the parties create the following referral codes: @@ -149,10 +174,13 @@ Feature: Discounts from multiple sources Scenario: When exiting an auction, fees discounted correctly when party has non-zero referral and volume discount factors (0029-FEES-033) # Expectation: fee should be split between buyer and seller, referral discount applied before volume discount - Given the parties place the following orders: + When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | aux1 | ETH/USD.1.1 | buy | 20 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | referee1 | ETH/USD.1.1 | sell | 20 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + | aux3 | ETH/USD.1.2 | buy | 20 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee1 | ETH/USD.1.2 | sell | 20 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + Then the market data for the market "ETH/USD.1.2" should be: + | mark price | trading mode | target stake | supplied stake | open interest | horizon | min bound | max bound | + | 1000 | TRADING_MODE_CONTINUOUS | 7469 | 1000000 | 21 | 3600 | 973 | 1027 | When the network moves ahead "2" epochs Then the referral set stats for code "referral-code-1" at epoch "2" should have a running volume of 2000: | party | reward factor | discount factor | @@ -160,24 +188,28 @@ Feature: Discounts from multiple sources And the party "referee1" has the following taker notional "2000" And the party "referee1" has the following discount factor "0.1" + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | ptbuy | ETH/USD.1.2 | buy | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + | ptsell | ETH/USD.1.2 | sell | 2 | 970 | 0 | TYPE_LIMIT | TIF_GTC | + Then the market data for the market "ETH/USD.1.2" should be: + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 1000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 7935 | 1000000 | 21 | 15 | + ## Triger price auction # Cancel the liquidity commitment triggering an auction - Given the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | lpprov | ETH/USD.1.1 | 0 | 0.1 | cancellation | And the network moves ahead "1" epochs - And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/USD.1.1" + And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/USD.1.2" When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | aux1 | ETH/USD.1.1 | buy | 200 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - | referee1 | ETH/USD.1.1 | sell | 200 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | - And the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp2 | lpprov | ETH/USD.1.1 | 1000000 | 0.01 | submission | + | aux3 | ETH/USD.1.2 | buy | 200 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | referee1 | ETH/USD.1.2 | sell | 200 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | And the network moves ahead "1" epochs + Then debug trades Then the following trades should be executed: | buyer | price | size | seller | - | aux1 | 1000 | 200 | referee1 | + | aux3 | 1000 | 198 | referee1 | + | aux3 | 1000 | 2 | ptsell | And the following transfers should happen: | from | to | from account | to account | market id | amount | asset | - | referee1 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/USD.1.1 | 81 | USD.1.1 | - | referee1 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 81 | USD.1.1 | \ No newline at end of file + | referee1 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/USD.1.2 | 81 | USD.1.1 | + | referee1 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 81 | USD.1.1 | diff --git a/core/integration/features/verified/0029-FEES-trading_fees.feature b/core/integration/features/verified/0029-FEES-trading_fees.feature index 2ca58452ec..7137510dbc 100644 --- a/core/integration/features/verified/0029-FEES-trading_fees.feature +++ b/core/integration/features/verified/0029-FEES-trading_fees.feature @@ -607,6 +607,7 @@ Feature: Fees calculations | trader3 | ETH | ETH/DEC21 | 339 | 9999667 | | trader4 | ETH | ETH/DEC21 | 0 | 0 | + @NoPerp Scenario: S008, Testing fees in continuous trading when insufficient balance in their general and margin account with LP, then the trade does not execute (0029-FEES-007,0029-FEES-008) And the markets: | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | @@ -748,16 +749,11 @@ Feature: Fees calculations | trader4 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 7 | ETH | | trader4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC21 | 4 | ETH | - When the network moves ahead "1" blocks - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | - # now place orders during auction When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | | trader3a | ETH/DEC21 | buy | 3 | 1002 | 0 | TYPE_LIMIT | TIF_GTC | - | trader4 | ETH/DEC21 | sell | 3 | 1002 | 0 | TYPE_LIMIT | TIF_GTC | + | trader4 | ETH/DEC21 | sell | 3 | 1002 | 1 | TYPE_LIMIT | TIF_GTC | Given the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -781,15 +777,13 @@ Feature: Fees calculations # liquidity_fee = fee_factor[liquidity] * trade_value_for_fee_purposes = 0.001 * 3006 = 3.006 = 4 (rounded up) And the following transfers should happen: | from | to | from account | to account | market id | amount | asset | - | trader4 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 4 | ETH | - | trader4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC21 | 2 | ETH | - | trader3a | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 4 | ETH | - | trader3a | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC21 | 2 | ETH | + | trader4 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 7 | ETH | + | trader4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC21 | 4 | ETH | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader3a | ETH | ETH/DEC21 | 6493 | 3517 | - | trader4 | ETH | ETH/DEC21 | 9259 | 708 | + | trader3a | ETH | ETH/DEC21 | 5976 | 4056 | + | trader4 | ETH | ETH/DEC21 | 9259 | 687 | And the market data for the market "ETH/DEC21" should be: | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | @@ -825,8 +819,8 @@ Feature: Fees calculations Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader4 | ETH | ETH/DEC21 | 10093 | 586 | - | trader3a | ETH | ETH/DEC21 | 5779 | 3515 | + | trader4 | ETH | ETH/DEC21 | 10093 | 565 | + | trader3a | ETH | ETH/DEC21 | 5503 | 3813 | Then the market data for the market "ETH/DEC21" should be: | trading mode | auction trigger | @@ -834,7 +828,7 @@ Feature: Fees calculations Scenario: S011, Testing fees in Liquidity auction session trading with insufficient balance in their general account but margin covers the fees (0029-FEES-006) - And the average block duration is "1" + Given the average block duration is "1" And the markets: | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | @@ -880,14 +874,10 @@ Feature: Fees calculations When the network moves ahead "1" blocks - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | - When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | | trader3a | ETH/DEC21 | buy | 3 | 1002 | 0 | TYPE_LIMIT | TIF_GTC | - | trader4 | ETH/DEC21 | sell | 3 | 1002 | 0 | TYPE_LIMIT | TIF_GTC | + | trader4 | ETH/DEC21 | sell | 3 | 1002 | 1 | TYPE_LIMIT | TIF_GTC | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -909,10 +899,8 @@ Feature: Fees calculations And the following transfers should happen: | from | to | from account | to account | market id | amount | asset | - | trader4 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 4 | ETH | - | trader4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC21 | 2 | ETH | - | trader3a | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 4 | ETH | - | trader3a | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC21 | 2 | ETH | + | trader4 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 7 | ETH | + | trader4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC21 | 4 | ETH | Then the parties should have the following margin levels: | party | market id | maintenance | initial | @@ -920,8 +908,8 @@ Feature: Fees calculations Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader3a | ETH | ETH/DEC21 | 4994 | 0 | - | trader4 | ETH | ETH/DEC21 | 5255 | 0 | + | trader3a | ETH | ETH/DEC21 | 5016 | 0 | + | trader4 | ETH | ETH/DEC21 | 5234 | 0 | Then the market data for the market "ETH/DEC21" should be: | trading mode | auction trigger | @@ -1014,9 +1002,10 @@ Feature: Fees calculations | trading mode | auction trigger | | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | + @Liquidation Scenario: S014, Testing fees in Liquidity auction session trading with insufficient balance in their general and margin account, then the trade still goes ahead, (0029-FEES-008) - And the average block duration is "1" + Given the average block duration is "1" And the fees configuration named "fees-config-1": | maker fee | infrastructure fee | @@ -1031,8 +1020,8 @@ Feature: Fees calculations | party | asset | amount | | aux1 | ETH | 100000000 | | aux2 | ETH | 100000000 | - | trader3a | ETH | 5173 | - | trader4 | ETH | 5432 | + | trader3a | ETH | 5273 | + | trader4 | ETH | 6032 | | trader5 | ETH | 100000000 | | trader6 | ETH | 100000000 | @@ -1046,7 +1035,6 @@ Feature: Fees calculations Given the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | aux1 | ETH/DEC21 | 200 | 0.001 | submission | - | lp1 | aux1 | ETH/DEC21 | 200 | 0.001 | amendment | And the parties place the following pegged iceberg orders: | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | | aux1 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 10 | @@ -1057,30 +1045,21 @@ Feature: Fees calculations #Scenario: S015, Triggering Liquidity auction (0029-FEES-008) Then the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | + | party | market id | side | volume | price | resulting trades | type | tif | | trader5 | ETH/DEC21 | buy | 3 | 1002 | 0 | TYPE_LIMIT | TIF_GTC | | trader6 | ETH/DEC21 | sell | 3 | 1002 | 1 | TYPE_LIMIT | TIF_GTC | And the following trades should be executed: - | buyer | price | size | seller | + | buyer | price | size | seller | | trader5 | 1002 | 3 | trader6 | When the network moves ahead "1" blocks - Then the market data for the market "ETH/DEC21" should be: - | trading mode | auction trigger | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | - And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | aux1 | ETH/DEC21 | 20000 | 0.001 | amendment | - | lp1 | aux1 | ETH/DEC21 | 20000 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | aux1 | ETH/DEC21 | 2 | 1 | buy | BID | 1 | 10 | - | aux1 | ETH/DEC21 | 2 | 1 | sell | ASK | 1 | 10 | And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | - | trader3a | ETH/DEC21 | buy | 3 | 1002 | 0 | TYPE_LIMIT | TIF_GTC | - | trader4 | ETH/DEC21 | sell | 3 | 1002 | 0 | TYPE_LIMIT | TIF_GTC | + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | trader3a | ETH/DEC21 | buy | 3 | 1002 | 0 | TYPE_LIMIT | TIF_GTC | t3a-buy | + | trader4 | ETH/DEC21 | sell | 3 | 1002 | 1 | TYPE_LIMIT | TIF_GTC | t4-sell | When the network moves ahead "2" blocks Then the market data for the market "ETH/DEC21" should be: @@ -1098,25 +1077,24 @@ Feature: Fees calculations # liquidity_fee = fee_factor[liquidity] * trade_value_for_fee_purposes = 0.001 * 3006 = 3.006 = 4 (rounded up) And the following transfers should happen: - | from | to | from account | to account | market id | amount | asset | - | trader4 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 3006 | ETH | - | trader4 | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC21 | 2 | ETH | - | trader3a | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 3006 | ETH | - | trader3a | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC21 | 2 | ETH | + | from | to | from account | to account | market id | amount | asset | + | trader4 | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC21 | 4 | ETH | + | trader4 | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | | 4338 | ETH | Then the parties should have the following margin levels: | party | market id | maintenance | initial | - | trader4 | ETH/DEC21 | 4409 | 5290 | + | trader4 | ETH/DEC21 | 0 | 0 | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | trader3a | ETH | ETH/DEC21 | 0 | 0 | + | trader3a | ETH | ETH/DEC21 | 5289 | 0 | | trader4 | ETH | ETH/DEC21 | 0 | 0 | Then the market data for the market "ETH/DEC21" should be: | trading mode | auction trigger | | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | + @Liquidation @NoPerp Scenario:S016, Testing fees in Price auction session trading with insufficient balance in their general and margin account, then the trade still goes ahead (0029-FEES-008) And the average block duration is "1" @@ -1176,14 +1154,17 @@ Feature: Fees calculations | trading mode | auction trigger | | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | + # Leave auction + close network position Then the network moves ahead "301" blocks + Then debug trades Then the following trades should be executed: | buyer | price | size | seller | | trader3a | 1002 | 1 | trader4 | | trader3a | 900 | 2 | trader4 | - | aux1 | 500 | 1 | network | - | network | 493 | 3 | trader3a | + | network | 900 | 3 | trader3a | + | aux1 | 500 | 1 | network | + | aux1 | 490 | 2 | network | # For trader3a & 4- Sharing IF and LP # trade_value_for_fee_purposes for trader3a = size_of_trade * price_of_trade = 2 * 900 = 1800 @@ -1304,7 +1285,7 @@ Feature: Fees calculations | trading mode | auction trigger | | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | - @now + @now @Liquidation @NoPerp Scenario: S018, Testing fees in continuous trading during position resolution (0029-FEES-001) Given the fees configuration named "fees-config-1": @@ -1343,6 +1324,7 @@ Feature: Fees calculations | party | market id | side | volume | price | resulting trades | type | tif | reference | | trader3a | ETH/DEC21 | sell | 100 | 180 | 2 | TYPE_LIMIT | TIF_GTC | ref-1 | | trader3b | ETH/DEC21 | sell | 300 | 180 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | + And the network moves ahead "1" blocks Then the following trades should be executed: | buyer | price | size | seller | @@ -1352,12 +1334,8 @@ Feature: Fees calculations Then the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader3a | ETH/DEC21 | 2000 | 6400 | 8000 | 10000 | - | trader3b | ETH/DEC21 | 54000 | 172800 | 216000 | 270000 | - - Then the parties cancel the following orders: - | party | reference | - | aux1 | sell-provider-1 | + | trader3a | ETH/DEC21 | 18000 | 57600 | 72000 | 90000 | + | trader3b | ETH/DEC21 | 0 | 0 | 0 | 0 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | @@ -1365,8 +1343,8 @@ Feature: Fees calculations And the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | - | aux1 | ETH/DEC21 | sell | 1 | 300 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | - | aux2 | ETH/DEC21 | buy | 1 | 300 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | + | aux2 | ETH/DEC21 | buy | 1 | 300 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + | aux1 | ETH/DEC21 | sell | 1 | 300 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | And the mark price should be "300" for the market "ETH/DEC21" @@ -1401,6 +1379,7 @@ Feature: Fees calculations And the insurance pool balance should be "0" for the market "ETH/DEC21" + @Liquidation @NoPerp Scenario: S019, Testing fees in continuous trading during position resolution with insufficient balance in their general and margin account, partial or full fees does not get paid (0029-FEES-008) Given the fees configuration named "fees-config-1": @@ -1439,6 +1418,7 @@ Feature: Fees calculations | party | market id | side | volume | price | resulting trades | type | tif | reference | | trader3a | ETH/DEC21 | sell | 100 | 180 | 2 | TYPE_LIMIT | TIF_GTC | ref-1 | | trader3b | ETH/DEC21 | sell | 300 | 180 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | + And the network moves ahead "1" blocks Then the following trades should be executed: | buyer | price | size | seller | @@ -1448,12 +1428,8 @@ Feature: Fees calculations Then the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | trader3a | ETH/DEC21 | 2000 | 6400 | 8000 | 10000 | - | trader3b | ETH/DEC21 | 54000 | 172800 | 216000 | 270000 | - - Then the parties cancel the following orders: - | party | reference | - | aux1 | sell-provider-1 | + | trader3a | ETH/DEC21 | 18000 | 57600 | 72000 | 90000 | + | trader3b | ETH/DEC21 | 0 | 0 | 0 | 0 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | @@ -1461,8 +1437,8 @@ Feature: Fees calculations And the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | - | aux1 | ETH/DEC21 | sell | 1 | 300 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | - | aux2 | ETH/DEC21 | buy | 1 | 300 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | + | aux2 | ETH/DEC21 | buy | 1 | 300 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + | aux1 | ETH/DEC21 | sell | 1 | 300 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | And the mark price should be "300" for the market "ETH/DEC21" diff --git a/core/integration/features/verified/0034-PROB-liquidity_TauScaling.feature b/core/integration/features/verified/0034-PROB-liquidity_TauScaling.feature index 74052e1718..e2b4bba48a 100644 --- a/core/integration/features/verified/0034-PROB-liquidity_TauScaling.feature +++ b/core/integration/features/verified/0034-PROB-liquidity_TauScaling.feature @@ -1,4 +1,4 @@ -Feature: Tests impact from change of tau.scaling parameter on probability of trading, 0038-OLIQ-006 +Feature: Tests impact from change of tau.scaling parameter on probability of trading Scenario: 001: set tau.scaling to 1 Given the following network parameters are set: diff --git a/core/integration/features/verified/0035-LIQM-liquidity_monitoring.feature b/core/integration/features/verified/0035-LIQM-liquidity_monitoring.feature index 69bf9d3c45..7fceb9cc57 100644 --- a/core/integration/features/verified/0035-LIQM-liquidity_monitoring.feature +++ b/core/integration/features/verified/0035-LIQM-liquidity_monitoring.feature @@ -2,14 +2,14 @@ Feature: Test liquidity monitoring Background: Given the following network parameters are set: - | name | value | - | network.floatingPointUpdates.delay | 10s | - | market.auction.minimumDuration | 1 | - | network.markPriceUpdateMaximumFrequency | 0s | - | limits.markets.maxPeggedOrders | 4 | + | name | value | + | network.floatingPointUpdates.delay | 10s | + | market.auction.minimumDuration | 1 | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 4 | Given the liquidity monitoring parameters: - | name | triggering ratio | time window | scaling factor | - | lqm-params | 1.0 | 1s | 1.0 | + | name | triggering ratio | time window | scaling factor | + | lqm-params | 1.0 | 1s | 1.0 | And the average block duration is "1" And the margin calculator named "margin-calculator-1": | search factor | initial factor | release factor | @@ -108,7 +108,7 @@ Feature: Test liquidity monitoring | AuctionEvent | Scenario: 002: A market which enters a state requiring liquidity auction through reduced current stake (e.g. through LP bankruptcy) during a block but then leaves state again prior to block completion never enters liquidity auction. (0035-LIQM-006) - + And the average block duration is "1" And the parties submit the following liquidity provision: @@ -167,11 +167,12 @@ Feature: Test liquidity monitoring | type | | AuctionEvent | + # perhaps a bit pointless, liquidity auction was removed, keeping the scenario to make sure everything else works as expected. Scenario: 004: When the Max Open Interest field decreases for a created block to a level such that a liquidity auction which is active at the start of a block can now be exited the block stays in auction within the block but leaves at the end. (0035-LIQM-008) Given the following network parameters are set: - | name | value | - | market.liquidity.bondPenaltyParameter | 1 | + | name | value | + | market.liquidity.bondPenaltyParameter | 1 | Given the liquidity monitoring parameters: | name | triggering ratio | time window | scaling factor | | updated-lqm-params | 1.0 | 5s | 1 | @@ -211,11 +212,11 @@ Feature: Test liquidity monitoring When the network moves ahead "1" blocks Then the orders should have the following states: - | party | market id | side | volume | price | status | reference | - | lprov1 | ETH/DEC21 | buy | 1 | 968 | STATUS_ACTIVE | lp1_buy | - | lprov1 | ETH/DEC21 | sell | 1 | 1032 | STATUS_ACTIVE | lp1_sell | - | lp2Bdistressed | ETH/DEC21 | buy | 1 | 960 | STATUS_ACTIVE | lp2_buy | - | lp2Bdistressed | ETH/DEC21 | sell | 1 | 1040 | STATUS_ACTIVE | lp2_sell | + | party | market id | side | volume | remaining | price | status | reference | + | lprov1 | ETH/DEC21 | buy | 1 | 1 | 968 | STATUS_ACTIVE | lp1_buy | + | lprov1 | ETH/DEC21 | sell | 1 | 1 | 1032 | STATUS_ACTIVE | lp1_sell | + | lp2Bdistressed | ETH/DEC21 | buy | 1 | 1 | 960 | STATUS_ACTIVE | lp2_buy | + | lp2Bdistressed | ETH/DEC21 | sell | 1 | 1 | 1040 | STATUS_ACTIVE | lp2_sell | And the parties should have the following margin levels: | party | market id | maintenance | initial | | lp2Bdistressed | ETH/DEC21 | 100 | 100 | @@ -228,11 +229,7 @@ Feature: Test liquidity monitoring | party | market id | side | volume | price | resulting trades | type | tif | | party2 | ETH/DEC21 | buy | 50 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | | party1 | ETH/DEC21 | sell | 50 | 1010 | 1 | TYPE_LIMIT | TIF_FOK | - Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | open interest | target stake | supplied stake | - | 1010 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 10 | 6060 | 6000 | - - When the network moves ahead "5" blocks + And the network moves ahead "5" blocks Then the market data for the market "ETH/DEC21" should be: | mark price | trading mode | auction trigger | open interest | target stake | supplied stake | | 1010 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 10 | 1010 | 5999 | diff --git a/core/integration/features/verified/0038-OLIQ-liquidity_provision_creation.feature b/core/integration/features/verified/0038-OLIQ-liquidity_provision_creation.feature index 21f734c7e2..5349f6606e 100644 --- a/core/integration/features/verified/0038-OLIQ-liquidity_provision_creation.feature +++ b/core/integration/features/verified/0038-OLIQ-liquidity_provision_creation.feature @@ -23,9 +23,9 @@ Feature: Test LP orders | lp1 | party1 | ETH/DEC19 | 50000 | 0.1 | submission | | lp1 | party1 | ETH/DEC19 | 50000 | 0.1 | submission | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party1 | ETH/DEC19 | 2 | 1 | buy | BID | 500 | 10 | - | party1 | ETH/DEC19 | 2 | 1 | sell | ASK | 500 | 10 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | party1 | ETH/DEC19 | 2 | 1 | buy | BID | 500 | 10 | + | party1 | ETH/DEC19 | 2 | 1 | sell | ASK | 500 | 10 | And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | | auxiliary | ETH/DEC19 | buy | 1 | 80 | 0 | TYPE_LIMIT | TIF_GTC | oa-b-1 | @@ -50,11 +50,11 @@ Feature: Test LP orders And the mark price should be "100" for the market "ETH/DEC19" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | auxiliary | ETH/DEC19 | buy | 1 | 80 | STATUS_ACTIVE | - | auxiliary | ETH/DEC19 | sell | 1 | 120 | STATUS_ACTIVE | - | aux2 | ETH/DEC19 | buy | 1 | 100 | STATUS_ACTIVE | - | auxiliary | ETH/DEC19 | sell | 1 | 100 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | auxiliary | ETH/DEC19 | buy | 1 | 1 | 80 | STATUS_ACTIVE | + | auxiliary | ETH/DEC19 | sell | 1 | 1 | 120 | STATUS_ACTIVE | + | aux2 | ETH/DEC19 | buy | 1 | 1 | 100 | STATUS_ACTIVE | + | auxiliary | ETH/DEC19 | sell | 1 | 1 | 100 | STATUS_ACTIVE | When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | @@ -63,17 +63,17 @@ Feature: Test LP orders | party1 | ETH/DEC19 | buy | 1 | 110 | 0 | TYPE_LIMIT | TIF_GTC | lp-ref-1 | | party1 | ETH/DEC19 | sell | 1 | 120 | 0 | TYPE_LIMIT | TIF_GTC | lp-ref-2 | Then the orders should have the following states: - | party | market id | side | volume | price | status | - | sellSideProvider | ETH/DEC19 | sell | 1000 | 120 | STATUS_ACTIVE | - | buySideProvider | ETH/DEC19 | buy | 1000 | 80 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | sellSideProvider | ETH/DEC19 | sell | 1000 | 1000 | 120 | STATUS_ACTIVE | + | buySideProvider | ETH/DEC19 | buy | 1000 | 1000 | 80 | STATUS_ACTIVE | Then the liquidity provisions should have the following states: | id | party | market | commitment amount | status | | lp1 | party1 | ETH/DEC19 | 50000 | STATUS_ACTIVE | Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | ETH/DEC19 | buy | 500 | 100 | STATUS_ACTIVE | - | party1 | ETH/DEC19 | sell | 500 | 130 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | ETH/DEC19 | buy | 500 | 2 | 100 | STATUS_ACTIVE | + | party1 | ETH/DEC19 | sell | 500 | 2 | 130 | STATUS_ACTIVE | Scenario: 002, create liquidity provisions (0038-OLIQ-additional-tests); test decimal; asset 3; market 1; position:2 AC: 0070-MKTD-004;0070-MKTD-005; 0070-MKTD-006; 0070-MKTD-007;0070-MKTD-008 Given the following assets are registered: @@ -123,10 +123,10 @@ Feature: Test LP orders | aux2 | 1000 | 100 | auxiliary | And the mark price should be "1000" for the market "ETH/DEC19" Then the orders should have the following states: - | party | market id | side | volume | price | status | - | auxiliary | ETH/DEC19 | buy | 100 | 800 | STATUS_ACTIVE | - | auxiliary | ETH/DEC19 | sell | 100 | 1200 | STATUS_ACTIVE | - | aux2 | ETH/DEC19 | buy | 100 | 1000 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | auxiliary | ETH/DEC19 | buy | 100 | 100 | 800 | STATUS_ACTIVE | + | auxiliary | ETH/DEC19 | sell | 100 | 100 | 1200 | STATUS_ACTIVE | + | aux2 | ETH/DEC19 | buy | 100 | 100 | 1000 | STATUS_ACTIVE | And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | @@ -135,14 +135,15 @@ Feature: Test LP orders | party1 | ETH/DEC19 | buy | 5000 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | lp-ref-1 | | party1 | ETH/DEC19 | sell | 5000 | 1200 | 0 | TYPE_LIMIT | TIF_GTC | lp-ref-2 | Then the orders should have the following states: - | party | market id | side | volume | price | status | - | sellSideProvider | ETH/DEC19 | sell | 100000 | 1200 | STATUS_ACTIVE | - | buySideProvider | ETH/DEC19 | buy | 100000 | 800 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | sellSideProvider | ETH/DEC19 | sell | 100000 | 100000 | 1200 | STATUS_ACTIVE | + | buySideProvider | ETH/DEC19 | buy | 100000 | 100000 | 800 | STATUS_ACTIVE | Then the liquidity provisions should have the following states: | id | party | market | commitment amount | status | | lp1 | party1 | ETH/DEC19 | 50000000 | STATUS_ACTIVE | Then the orders should have the following states: - | party | market id | side | volume | price | status | - | party1 | ETH/DEC19 | buy | 500 | 1000 | STATUS_ACTIVE | - | party1 | ETH/DEC19 | sell | 500 | 1300 | STATUS_ACTIVE | + | party | market id | side | volume | remaining | price | status | + | party1 | ETH/DEC19 | buy | 500 | 2 | 1000 | STATUS_ACTIVE | + | party1 | ETH/DEC19 | sell | 500 | 2 | 1300 | STATUS_ACTIVE | + diff --git a/core/integration/features/verified/0041-TSK-target_stake.feature b/core/integration/features/verified/0041-TSK-target_stake.feature index 7721e691bf..f006799327 100644 --- a/core/integration/features/verified/0041-TSK-target_stake.feature +++ b/core/integration/features/verified/0041-TSK-target_stake.feature @@ -405,24 +405,12 @@ Feature: Target stake | 110 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 1100 | 1000 | 100 | When the network moves ahead "1" blocks - Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | - | 110 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 1100 | 1000 | 100 | - - When the network moves ahead "11" blocks - Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | - | 110 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 1100 | 1000 | 100 | - - When the parties place the following orders: + Then the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | tt_1 | ETH/DEC21 | buy | 50 | 110 | 0 | TYPE_LIMIT | TIF_GTC | - | tt_2 | ETH/DEC21 | sell | 50 | 110 | 0 | TYPE_LIMIT | TIF_GTC | - Then the market data for the market "ETH/DEC21" should be: - | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | - | 110 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 550 | 1000 | 100 | + | tt_2 | ETH/DEC21 | sell | 50 | 110 | 1 | TYPE_LIMIT | TIF_GTC | When the network moves ahead "1" blocks Then the market data for the market "ETH/DEC21" should be: | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | - | 110 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 550 | 1000 | 50 | + | 110 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 1100 | 1000 | 50 | diff --git a/core/integration/features/verified/0042-LIQF-SLA.feature b/core/integration/features/verified/0042-LIQF-SLA.feature index 6a46b4a5f2..673126b01c 100644 --- a/core/integration/features/verified/0042-LIQF-SLA.feature +++ b/core/integration/features/verified/0042-LIQF-SLA.feature @@ -791,4 +791,4 @@ Feature: Calculating SLA Performance | lp3 | lp3 | ACCOUNT_TYPE_LP_LIQUIDITY_FEES | ACCOUNT_TYPE_GENERAL | ETH/DEC23 | 2800 | USD | | | lp1 | ACCOUNT_TYPE_LIQUIDITY_FEES_BONUS_DISTRIBUTION | ACCOUNT_TYPE_GENERAL | ETH/DEC23 | 24673 | USD | | | lp2 | ACCOUNT_TYPE_LIQUIDITY_FEES_BONUS_DISTRIBUTION | ACCOUNT_TYPE_GENERAL | ETH/DEC23 | 2344 | USD | - | | lp3 | ACCOUNT_TYPE_LIQUIDITY_FEES_BONUS_DISTRIBUTION | ACCOUNT_TYPE_GENERAL | ETH/DEC23 | 69087 | USD | \ No newline at end of file + | | lp3 | ACCOUNT_TYPE_LIQUIDITY_FEES_BONUS_DISTRIBUTION | ACCOUNT_TYPE_GENERAL | ETH/DEC23 | 69087 | USD | diff --git a/core/integration/features/verified/0042-LIQF-fees_rewards_VirtualStake.feature b/core/integration/features/verified/0042-LIQF-fees_rewards_VirtualStake.feature index f162bae434..c00360f73c 100644 --- a/core/integration/features/verified/0042-LIQF-fees_rewards_VirtualStake.feature +++ b/core/integration/features/verified/0042-LIQF-fees_rewards_VirtualStake.feature @@ -479,7 +479,7 @@ Feature: Test liquidity provider reward distribution; Should also cover liquidit And the accumulated liquidity fees should be "1" for the market "ETH/MAR22" - @FeeRound + @FeeRound @Liquidation @NoPerp Scenario: 004 2 LPs joining at start, 1 LP forcibly closed out (0042-LIQF-008) Given the average block duration is "601" @@ -571,16 +571,16 @@ Feature: Test liquidity provider reward distribution; Should also cover liquidit # liquidity_fee = ceil(volume * price * liquidity_fee_factor) = ceil(1300 * 30 * 0.002) = ceil(78) = 78 - And the accumulated liquidity fees should be "79" for the market "ETH/MAR22" + And the accumulated liquidity fees should be "85" for the market "ETH/MAR22" Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/MAR22 | 4756 | 0 | 0 | + | lp1 | USD | ETH/MAR22 | 0 | 0 | 0 | When the network moves ahead "1" blocks: And the liquidity provider fee shares for the market "ETH/MAR22" should be: - | party | equity like share | average entry valuation | - | lp2 | 0.9324492333195193 | 10000 | + | party | equity like share | average entry valuation | + | lp2 | 0.9324492333195193 | 10000 | # Trigger liquidity distribution When the network moves ahead "1" blocks: diff --git a/core/integration/features/verified/0042-LIQF-fees_rewards_with_decimal.feature b/core/integration/features/verified/0042-LIQF-fees_rewards_with_decimal.feature index a78c890579..2f5974ee3e 100644 --- a/core/integration/features/verified/0042-LIQF-fees_rewards_with_decimal.feature +++ b/core/integration/features/verified/0042-LIQF-fees_rewards_with_decimal.feature @@ -163,7 +163,7 @@ Feature: Test decimal places in LP order, liquidity provider reward distribution | party2 | USD | | | 10000000000 | | @SLABug - Scenario: 002: 0070-MKTD-007, 0042-LIQF-001, 0038-OLIQ-002; 0038-OLIQ-006; 0019-MCAL-008, check updated version of dpd feature in 0038-OLIQ-liquidity_provision_order_type.md + Scenario: 002: 0070-MKTD-007, 0042-LIQF-001, 0019-MCAL-008, check updated version of dpd feature in 0038-OLIQ-liquidity_provision_order_type.md Given the following network parameters are set: | name | value | | market.value.windowLength | 1h | @@ -443,8 +443,8 @@ Feature: Test decimal places in LP order, liquidity provider reward distribution | lp1 | ETH | USD/DEC19 | 5554318 | 99997426328683 | 10 | And the market data for the market "USD/DEC19" should be: - | mark price | last traded price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 1001000 | 1001000 | TRADING_MODE_MONITORING_AUCTION | 100000 | 863654 | 1154208 | 3562237128 | 1000000010 | 10005 | + | mark price | last traded price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | + | 1001000 | 1001000 | TRADING_MODE_CONTINUOUS | 100000 | 863654 | 1154208 | 3562237128 | 1000000010 | 10005 | Scenario: 003, no decimal, 0042-LIQF-001 diff --git a/core/integration/features/verified/0044-LIME-SLA.feature b/core/integration/features/verified/0044-LIME-SLA.feature index a1ee6e2250..15bf30442f 100644 --- a/core/integration/features/verified/0044-LIME-SLA.feature +++ b/core/integration/features/verified/0044-LIME-SLA.feature @@ -18,7 +18,7 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | 0.0004 | 0.001 | And the price monitoring named "price-monitoring": | horizon | probability | auction extension | - | 3600 | 0.99 | 3 | + | 3600 | 0.99 | 40 | And the liquidity sla params named "SLA": | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | @@ -243,7 +243,6 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | party | market id | side | volume | price | resulting trades | type | tif | | lp1 | ETH/JAN23 | buy | 100 | 4750 | 0 | TYPE_LIMIT | TIF_GTC | | lp1 | ETH/JAN23 | sell | 100 | 5250 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/JAN23 | buy | 10 | 4900 | 0 | TYPE_LIMIT | TIF_GTC | | party1 | ETH/JAN23 | buy | 1 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/JAN23 | sell | 10 | 5100 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/JAN23 | sell | 1 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | @@ -257,15 +256,21 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | | 5000 | TRADING_MODE_CONTINUOUS | 3600 | 4865 | 5139 | 17784 | 180000 | 1 | - Then the parties place the following orders: + When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/JAN23 | buy | 5000 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/JAN23 | sell | 5000 | 5000 | 1 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/JAN23 | buy | 1 | 4850 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/JAN23 | sell | 1 | 4850 | 0 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/JAN23 | buy | 10 | 4900 | 0 | TYPE_LIMIT | TIF_GTC | + + Then the market data for the market "ETH/JAN23" should be: + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 5000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 34679 | 180000 | 1 | 40 | When the network moves ahead "2" blocks + And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" Then the market data for the market "ETH/JAN23" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 5000 | TRADING_MODE_MONITORING_AUCTION | 3600 | 4865 | 5139 | 88940284 | 180000 | 5001 | + | mark price | trading mode | target stake | supplied stake | open interest | + | 5000 | TRADING_MODE_MONITORING_AUCTION | 34679 | 180000 | 1 | And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" Then the parties place the following orders: @@ -276,14 +281,14 @@ Feature: Test LP mechanics when there are multiple liquidity providers; When the network moves ahead "1" epochs And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" Then the parties should have the following account balances: - | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/JAN23 | 2801062 | 17518938 | 180000 | + | party | asset | market id | margin | general | bond | + | lp1 | USD | ETH/JAN23 | 2801062 | 17018938 | 90000 | When the network moves ahead "1" epochs Then the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" Then the parties should have the following account balances: - | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/JAN23 | 2801062 | 17518938 | 180000 | + | party | asset | market id | margin | general | bond | + | lp1 | USD | ETH/JAN23 | 2801062 | 17018938 | 45000 | Scenario: An LP with bid orders outside valid range during auction is penalised (0044-LIME-098) Given the parties deposit on asset's general account the following amount: @@ -302,7 +307,6 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | party | market id | side | volume | price | resulting trades | type | tif | | lp1 | ETH/JAN23 | buy | 100 | 4740 | 0 | TYPE_LIMIT | TIF_GTC | | lp1 | ETH/JAN23 | sell | 100 | 5250 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/JAN23 | buy | 10 | 4900 | 0 | TYPE_LIMIT | TIF_GTC | | party1 | ETH/JAN23 | buy | 1 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/JAN23 | sell | 10 | 5100 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/JAN23 | sell | 1 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | @@ -316,15 +320,17 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | | 5000 | TRADING_MODE_CONTINUOUS | 3600 | 4865 | 5139 | 17784 | 180000 | 1 | - Then the parties place the following orders: + When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/JAN23 | buy | 5000 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/JAN23 | sell | 5000 | 5000 | 1 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/JAN23 | buy | 1 | 4850 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/JAN23 | sell | 1 | 4850 | 0 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/JAN23 | buy | 10 | 4900 | 0 | TYPE_LIMIT | TIF_GTC | - When the network moves ahead "2" blocks Then the market data for the market "ETH/JAN23" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 5000 | TRADING_MODE_MONITORING_AUCTION | 3600 | 4865 | 5139 | 88940284 | 180000 | 5001 | + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 5000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 34679 | 180000 | 1 | 40 | + + When the network moves ahead "2" blocks And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" Then the parties place the following orders: @@ -335,14 +341,14 @@ Feature: Test LP mechanics when there are multiple liquidity providers; When the network moves ahead "1" epochs And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" Then the parties should have the following account balances: - | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/JAN23 | 2801062 | 17018938 | 108000 | + | party | asset | market id | margin | general | bond | + | lp1 | USD | ETH/JAN23 | 2801062 | 17018938 | 90000 | When the network moves ahead "2" epochs Then the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | lp1 | USD | ETH/JAN23 | 2801062 | 17018938 | 27000 | + | lp1 | USD | ETH/JAN23 | 2801062 | 17018938 | 22500 | Scenario: An LP with ask orders outside valid range during auction is penalised (0044-LIME-099) Given the parties deposit on asset's general account the following amount: @@ -361,7 +367,6 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | party | market id | side | volume | price | resulting trades | type | tif | | lp1 | ETH/JAN23 | buy | 100 | 4750 | 0 | TYPE_LIMIT | TIF_GTC | | lp1 | ETH/JAN23 | sell | 100 | 5260 | 0 | TYPE_LIMIT | TIF_GTC | - | party1 | ETH/JAN23 | buy | 10 | 4900 | 0 | TYPE_LIMIT | TIF_GTC | | party1 | ETH/JAN23 | buy | 1 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/JAN23 | sell | 10 | 5100 | 0 | TYPE_LIMIT | TIF_GTC | | party2 | ETH/JAN23 | sell | 1 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | @@ -375,16 +380,15 @@ Feature: Test LP mechanics when there are multiple liquidity providers; | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | | 5000 | TRADING_MODE_CONTINUOUS | 3600 | 4865 | 5139 | 17784 | 180000 | 1 | - Then the parties place the following orders: + When the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | - | party1 | ETH/JAN23 | buy | 5000 | 5000 | 0 | TYPE_LIMIT | TIF_GTC | - | party2 | ETH/JAN23 | sell | 5000 | 5000 | 1 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/JAN23 | buy | 1 | 4850 | 0 | TYPE_LIMIT | TIF_GTC | + | party2 | ETH/JAN23 | sell | 1 | 4850 | 0 | TYPE_LIMIT | TIF_GTC | + | party1 | ETH/JAN23 | buy | 10 | 4900 | 0 | TYPE_LIMIT | TIF_GTC | - When the network moves ahead "2" blocks Then the market data for the market "ETH/JAN23" should be: - | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 5000 | TRADING_MODE_MONITORING_AUCTION | 3600 | 4865 | 5139 | 88940284 | 180000 | 5001 | - And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/JAN23" + | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | auction end | + | 5000 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | 34679 | 180000 | 1 | 40 | Then the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | diff --git a/core/integration/features/verified/0044-LIME_lp_at_termination.feature b/core/integration/features/verified/0044-LIME_lp_at_termination.feature index ffb2fe5fc2..3fef7410b4 100644 --- a/core/integration/features/verified/0044-LIME_lp_at_termination.feature +++ b/core/integration/features/verified/0044-LIME_lp_at_termination.feature @@ -57,7 +57,7 @@ Feature: Test LP bond account when market is terminated | market.liquidity.providersFeeCalculationTimeStep | 2s | Given the average block duration is "2" - @Now @SLABond + @Now @SLABond @Liquidation Scenario: 001: All liquidity providers in the market receive a greater than zero amount of liquidity fee Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -136,12 +136,12 @@ Feature: Test LP bond account when market is terminated | lp1 | -5 | 0 | 0 | | lp2 | 0 | 0 | 0 | | party1 | 16 | 320 | 0 | - | party2 | -11 | -320 | 0 | + | party2 | 0 | 0 | -100044 | And the parties should have the following account balances: | party | asset | market id | margin | general | bond | | lp1 | USD | ETH/MAR22 | 155878 | 145 | 2430 | - | lp2 | USD | ETH/MAR22 | 0 | 99000 | 810 | + | lp2 | USD | ETH/MAR22 | 2691 | 96309 | 810 | When the oracles broadcast data signed with "0xCAFECAFE19": | name | value | @@ -162,12 +162,12 @@ Feature: Test LP bond account when market is terminated | lp1 | -5 | 0 | -2400 | | lp2 | 0 | 0 | 0 | | party1 | 16 | 0 | 8000 | - | party2 | -11 | 0 | -5600 | + | party2 | 0 | 0 | -100044 | And the parties should have the following account balances: | party | asset | market id | margin | general | bond | | lp1 | USD | ETH/MAR22 | 0 | 155592 | 0 | | lp2 | USD | ETH/MAR22 | 0 | 99657 | 0 | - And the insurance pool balance should be "1408" for the market "ETH/MAR22" + And the insurance pool balance should be "95852" for the market "ETH/MAR22" diff --git a/core/integration/features/verified/0070-MKTD-market-decimal-places.feature b/core/integration/features/verified/0070-MKTD-market-decimal-places.feature index a75d12a537..592cbb2a3e 100644 --- a/core/integration/features/verified/0070-MKTD-market-decimal-places.feature +++ b/core/integration/features/verified/0070-MKTD-market-decimal-places.feature @@ -117,6 +117,7 @@ Feature: Allow markets to be specified with a smaller number of decimal places t | party1 | ETH | USD/DEC19 | 1102 | 0 | | | party2 | ETH | USD/DEC19 | 4268 | 0 | | + @Liquidation Scenario: 002: Users engage in a USD market auction, (0070-MKTD-003, 0070-MKTD-008) Given the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | @@ -137,16 +138,17 @@ Feature: Allow markets to be specified with a smaller number of decimal places t When the opening auction period ends for market "ETH/MAR22" Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/MAR22" - And the auction ends with a traded volume of "10" at a price of "10" -#there is not enough vol on the order book to closeout praty1, party1's distressed and waiting to be closeout + And the parties should have the following account balances: - | party | asset | market id | margin | general | bond | - | party0 | USD | ETH/MAR22 | 2134142 | 2830289 | 35569 | - | party1 | USD | ETH/MAR22 | 100000000 | 0 | | - | party2 | USD | ETH/MAR22 | 70539 | 99929461 | | + | party | asset | market id | margin | general | bond | + | party0 | USD | ETH/MAR22 | 2134142 | 2830289 | 35569 | + | party1 | USD | ETH/MAR22 | 0 | 0 | | + | party2 | USD | ETH/MAR22 | 70539 | 99929461 | | + # party1 is closed out And the following trades should be executed: - | buyer | price | size | seller | - | party1 | 10 | 10 | party2 | + | buyer | price | size | seller | + | party1 | 10 | 10 | party2 | + | network | 10 | 10 | party1 | Scenario: 003: Users engage in an ETH market auction, (0070-MKTD-003, 0070-MKTD-008) Given the parties submit the following liquidity provision: @@ -381,7 +383,6 @@ Feature: Allow markets to be specified with a smaller number of decimal places t | party0 | USD/DEC19 | sell | 1 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | sell-ref-2a | When the opening auction period ends for market "USD/DEC20" - And the opening auction period ends for market "USD/DEC19" Then the price monitoring bounds for the market "USD/DEC19" should be: | min bound | max bound | diff --git a/core/integration/features/verified/Funding-insurance_pool.feature b/core/integration/features/verified/Funding-insurance_pool.feature index 777f829853..5de9764c2d 100644 --- a/core/integration/features/verified/Funding-insurance_pool.feature +++ b/core/integration/features/verified/Funding-insurance_pool.feature @@ -33,8 +33,9 @@ Feature: Position resolution case 5 lognormal risk model | network.markPriceUpdateMaximumFrequency | 0s | | market.liquidity.successorLaunchWindowLength | 1s | | limits.markets.maxPeggedOrders | 2 | - - Scenario: 001 using lognormal risk model, setup a scenario where designatedLoser gets closed out; 0012-POSR-002, 0012-POSR-005, 0013-ACCT-001, 0013-ACCT-022 + + @Liquidation + Scenario: 001 using lognormal risk model, setup a scenario where designatedLoser gets closed out; 0012-POSR-002, 0012-POSR-005, 0013-ACCT-001 # setup accounts Given the parties deposit on asset's general account the following amount: @@ -91,22 +92,22 @@ Feature: Position resolution case 5 lognormal risk model # insurance pool generation - trade When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | designatedLoser | ETH/DEC19 | buy | 290 | 150 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | designatedLoser | ETH/DEC19 | buy | 290 | 150 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | Then the parties should have the following account balances: - | party | asset | market id | margin | general | - | designatedLoser | USD | ETH/DEC19 | 17650 | 0 | + | party | asset | market id | margin | general | + | designatedLoser | USD | ETH/DEC19 | 0 | 0 | Then the parties should have the following margin levels: - | party | market id | maintenance | search | initial | release | - | designatedLoser | ETH/DEC19 | 47134 | 56560 | 70701 | 94268 | + | party | market id | maintenance | search | initial | release | + | designatedLoser | ETH/DEC19 | 0 | 0 | 0 | 0 | Then the order book should have the following volumes for market "ETH/DEC19": | side | volume | price | - | buy | 10 | 1 | - | buy | 225 | 40 | - | buy | 1 | 140 | + | buy | 0 | 1 | + | buy | 0 | 40 | + | buy | 0 | 140 | | sell | 0 | 150 | | sell | 36 | 250 | | sell | 10 | 2000 | @@ -116,10 +117,6 @@ Feature: Position resolution case 5 lognormal risk model #what's on the order book to cover the position is shown above, which makes the exit price 38.77118644 =(140*1+40*225+1*10)/236, slippage per unit is 150-38.77118644=111.2288136 #margin level is PositionVol*(markPrice*RiskFactor+SlippagePerUnit) = 290*(150*0.336895684+111.2288136)=46911.3182 - # insurance pool generation - modify order book - Then the parties cancel the following orders: - | party | reference | - | buySideProvider | buy-provider-1 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | buySideProvider | ETH/DEC19 | buy | 290 | 120 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | @@ -130,77 +127,85 @@ Feature: Position resolution case 5 lognormal risk model | party | market id | side | volume | price | resulting trades | type | tif | reference | | sellSideProvider | ETH/DEC19 | sell | 1 | 140 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | | buySideProvider | ETH/DEC19 | buy | 1 | 140 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | - And the network moves ahead "1" blocks + And the network moves ahead "2" blocks Then the following trades should be executed: | buyer | price | size | seller | + | network | 150 | 290 | designatedLoser | + | buySideProvider | 140 | 1 | network | + | lpprov | 40 | 225 | network | + | aux | 1 | 10 | network | + | buySideProvider | 120 | 54 | network | | buySideProvider | 140 | 1 | sellSideProvider | - | buySideProvider | 120 | 290 | network | - | network | 120 | 290 | designatedLoser | - Then the following network trades should be executed: - | party | aggressor side | volume | - | buySideProvider | sell | 290 | + And the following network trades should be executed: + | party | aggressor side | volume | | designatedLoser | buy | 290 | + | buySideProvider | sell | 1 | + | lpprov | sell | 225 | + | aux | sell | 10 | + | buySideProvider | sell | 54 | + | buySideProvider | buy | 1 | # check positions - Then the parties should have the following profit and loss: + And the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | - | designatedLoser | 0 | 0 | -17650 | + | designatedLoser | 0 | 0 | -17650 | | sellSideProvider | -291 | 2900 | 0 | - | buySideProvider | 291 | 5800 | 0 | - | aux | 1 | -10 | 0 | + | buySideProvider | 56 | 1080 | -1622 | + | aux | 11 | 1380 | -541 | | aux2 | -1 | 10 | 0 | - Then the parties should have the following account balances: + And the parties should have the following account balances: | party | asset | market id | margin | general | | designatedLoser | USD | ETH/DEC19 | 0 | 0 | | sellSideProvider | USD | ETH/DEC19 | 83564 | 999999919336 | - | buySideProvider | USD | ETH/DEC19 | 66216 | 999999939570 | - | aux | USD | ETH/DEC19 | 1088 | 999999998902 | - | aux2 | USD | ETH/DEC19 | 271 | 999999999739 | + | buySideProvider | USD | ETH/DEC19 | 24057 | 999999975387 | + | aux | USD | ETH/DEC19 | 1219 | 999999999620 | + | aux2 | USD | ETH/DEC19 | 259 | 999999999751 | # check margin levels Then the parties should have the following margin levels: - | party | market id | maintenance | search | initial | release | + | party | market id | maintenance | search | initial | release | | designatedLoser | ETH/DEC19 | 0 | 0 | 0 | 0 | # checking margins Then the parties should have the following account balances: - | party | asset | market id | margin | general | + | party | asset | market id | margin | general | | designatedLoser | USD | ETH/DEC19 | 0 | 0 | # then we make sure the insurance pool collected the funds (however they get later spent on MTM payment to closeout-facilitating party) Then the following transfers should happen: - | from | to | from account | to account | market id | amount | asset | + | from | to | from account | to account | market id | amount | asset | | designatedLoser | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_MAKER | ETH/DEC19 | 0 | USD | - | designatedLoser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC19 | 3480 | USD | + | designatedLoser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC19 | 4331 | USD | | designatedLoser | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | ETH/DEC19 | 0 | USD | - | market | buySideProvider | ACCOUNT_TYPE_FEES_MAKER | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 0 | USD | - | designatedLoser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/DEC19 | 11270 | USD | - | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 5800 | USD | - | market | buySideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 5800 | USD | + | market | buySideProvider | ACCOUNT_TYPE_FEES_MAKER | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 0 | USD | + | designatedLoser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/DEC19 | 17650 | USD | + | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 16735 | USD | + | market | buySideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 8 | USD | + | market | buySideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 0 | USD | - And the insurance pool balance should be "5470" for the market "ETH/DEC19" + And the insurance pool balance should be "0" for the market "ETH/DEC19" Then the parties should have the following account balances: | party | asset | market id | margin | general | - | buySideProvider | USD | ETH/DEC19 | 66216 | 999999939570 | + | buySideProvider | USD | ETH/DEC19 | 24057 | 999999975387 | | sellSideProvider | USD | ETH/DEC19 | 83564 | 999999919336 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | - | aux | ETH/DEC19 | sell | 1 | 120 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | - | aux2 | ETH/DEC19 | buy | 1 | 120 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | + | aux2 | ETH/DEC19 | buy | 1 | 120 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + | aux | ETH/DEC19 | sell | 1 | 120 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | And the market data for the market "ETH/DEC19" should be: | mark price | trading mode | target stake | supplied stake | open interest | - | 120 | TRADING_MODE_CONTINUOUS | 340728 | 9000 | 291 | + | 120 | TRADING_MODE_CONTINUOUS | 170949 | 9000 | 292 | - And the insurance pool balance should be "5470" for the market "ETH/DEC19" + And the insurance pool balance should be "0" for the market "ETH/DEC19" Then the parties should have the following account balances: | party | asset | market id | margin | general | - | buySideProvider | USD | ETH/DEC19 | 60396 | 999999939570 | + | buySideProvider | USD | ETH/DEC19 | 22937 | 999999975387 | | sellSideProvider | USD | ETH/DEC19 | 64666 | 999999944054 | # Double entry accounting is maintained at all points @@ -210,26 +215,26 @@ Feature: Position resolution case 5 lognormal risk model Then the following transfers should happen: | from | to | from account | to account | market id | amount | asset | - | buySideProvider | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 5820 | USD | + | buySideProvider | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 1120 | USD | | market | sellSideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 5820 | USD | Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | - | designatedLoser | 0 | 0 | -17650 | + | designatedLoser | 0 | 0 | -17650 | | sellSideProvider | -291 | 8720 | 0 | - | buySideProvider | 291 | -20 | 0 | - | aux | 0 | 0 | -30 | - | aux2 | 0 | 0 | 30 | + | buySideProvider | 57 | -40 | -1622 | + | aux | 10 | 1055 | -436 | + | aux2 | -1 | 30 | 0 | Then the parties should have the following account balances: | party | asset | market id | margin | general | | designatedLoser | USD | ETH/DEC19 | 0 | 0 | | sellSideProvider | USD | ETH/DEC19 | 64666 | 999999944054 | - | buySideProvider | USD | ETH/DEC19 | 60396 | 999999939570 | - | aux | USD | ETH/DEC19 | 1108 | 999999998862 | - | aux2 | USD | ETH/DEC19 | 0 | 1000000000018 | + | buySideProvider | USD | ETH/DEC19 | 22937 | 999999975387 | + | aux | USD | ETH/DEC19 | 607 | 1000000000000 | + | aux2 | USD | ETH/DEC19 | 279 | 999999999751 | - And the insurance pool balance should be "5470" for the market "ETH/DEC19" + And the insurance pool balance should be "0" for the market "ETH/DEC19" When the oracles broadcast data signed with "0xCAFECAFE": | name | value | | trading.terminated | true | @@ -241,10 +246,11 @@ Feature: Position resolution case 5 lognormal risk model When the network moves ahead "3" blocks # When a market is closed, the insurance pool account has its outstanding funds transferred to the [network treasury] - Then the global insurance pool balance should be "5470" for the asset "USD" + Then the global insurance pool balance should be "0" for the asset "USD" And the insurance pool balance should be "0" for the market "ETH/DEC19" - Scenario: 002 create a suicidal trade from "designatedLoser" to get closeout immediately after trade + @Liquidation + Scenario: 002 create a suicidal trade from "designatedLoser" to get closeout immediately after trade # setup accounts Given the parties deposit on asset's general account the following amount: @@ -300,23 +306,24 @@ Feature: Position resolution case 5 lognormal risk model | aux2 | -1 | 0 | 0 | When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | reference | + | party | market id | side | volume | price | resulting trades | type | tif | reference | | designatedLoser | ETH/DEC19 | buy | 290 | 150 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | + And the network moves ahead "1" blocks Then the parties should have the following account balances: - | party | asset | market id | margin | general | + | party | asset | market id | margin | general | | designatedLoser | USD | ETH/DEC19 | 0 | 0 | Then the parties should have the following margin levels: - | party | market id | maintenance | search | initial | release | + | party | market id | maintenance | search | initial | release | | designatedLoser | ETH/DEC19 | 0 | 0 | 0 | 0 | Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | - | designatedLoser | 0 | 0 | -17650 | + | designatedLoser | 0 | 0 | -17650 | | sellSideProvider | -290 | 0 | 0 | And the insurance pool balance should be "0" for the market "ETH/DEC19" - - + + diff --git a/core/integration/features/verified/Funding-treasury.feature b/core/integration/features/verified/Funding-treasury.feature index ba609711a5..795cfc99f2 100644 --- a/core/integration/features/verified/Funding-treasury.feature +++ b/core/integration/features/verified/Funding-treasury.feature @@ -17,7 +17,7 @@ Feature: check the insurance pool getting shared equally between all markets wit And the oracle spec for settlement data filtering data from "0xCAFECAFE19" named "ethDec19Oracle": | property | type | binding | decimals | - | prices.ETH.value | TYPE_INTEGER | settlement data | 0 | + | prices.ETH.value | TYPE_INTEGER | settlement data | 0 | And the oracle spec for trading termination filtering data from "0xCAFECAFE19" named "ethDec19Oracle": | property | type | binding | @@ -25,7 +25,7 @@ Feature: check the insurance pool getting shared equally between all markets wit And the oracle spec for settlement data filtering data from "0xCAFECAFE20" named "ethDec20Oracle": | property | type | binding | decimals | - | prices.ETH.value | TYPE_INTEGER | settlement data | 0 | + | prices.ETH.value | TYPE_INTEGER | settlement data | 0 | And the oracle spec for trading termination filtering data from "0xCAFECAFE20" named "ethDec20Oracle": | property | type | binding | @@ -54,14 +54,14 @@ Feature: check the insurance pool getting shared equally between all markets wit | market.liquidity.successorLaunchWindowLength | 1s | | limits.markets.maxPeggedOrders | 4 | - Scenario: using lognormal risk model, set "designatedLooser" closeout while the position of "designatedLooser" is not fully covered by orders on the order book; and check the funding of treasury. 0012-POSR-002, 0012-POSR-005, 0013-ACCT-001, 0013-ACCT-022 + Scenario: using lognormal risk model, set "designatedLooser" closeout while the position of "designatedLooser" is not fully covered by orders on the order book; and check the funding of treasury. 0012-POSR-002, 0012-POSR-005, 0013-ACCT-001 # setup accounts Given the parties deposit on asset's general account the following amount: | party | asset | amount | | sellSideProvider | USD | 1000000000000 | | buySideProvider | USD | 1000000000000 | - | designatedLooser | USD | 21981 | + | designatedLoser | USD | 21981 | | aux | USD | 1000000000000 | | aux2 | USD | 1000000000000 | | lpprov | USD | 1000000000000 | @@ -115,26 +115,22 @@ Feature: check the insurance pool getting shared equally between all markets wit # insurance pool generation - trade When the parties place the following orders with ticks: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | designatedLooser | ETH/DEC19 | buy | 290 | 150 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | designatedLoser | ETH/DEC19 | buy | 290 | 150 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | Then the parties should have the following account balances: - | party | asset | market id | margin | general | - | designatedLooser | USD | ETH/DEC19 | 17631 | 0 | + | party | asset | market id | margin | general | + | designatedLoser | USD | ETH/DEC19 | 0 | 0 | - Then the parties should have the following margin levels: - | party | market id | maintenance | search | initial | release | - | designatedLooser | ETH/DEC19 | 47134 | 56560 | 70701 | 94268 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | designatedLoser | ETH/DEC19 | 0 | 0 | 0 | 0 | - Then the order book should have the following volumes for market "ETH/DEC19": + And the order book should have the following volumes for market "ETH/DEC19": | side | price | volume | - | buy | 1 | 10 | - | buy | 140 | 1 | + | buy | 1 | 0 | + | buy | 140 | 0 | - # insurance pool generation - modify order book - Then the parties cancel the following orders: - | party | reference | - | buySideProvider | buy-provider-1 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | buySideProvider | ETH/DEC19 | buy | 290 | 120 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | @@ -147,66 +143,76 @@ Feature: check the insurance pool getting shared equally between all markets wit | buySideProvider | ETH/DEC19 | buy | 1 | 140 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | And the network moves ahead "1" blocks + Then debug trades Then the following trades should be executed: | buyer | price | size | seller | | buySideProvider | 140 | 1 | sellSideProvider | - | buySideProvider | 120 | 290 | network | - | network | 120 | 290 | designatedLooser | + | network | 150 | 290 | designatedLoser | + | buySideProvider | 140 | 1 | network | + | lpprov | 40 | 225 | network | + | aux | 1 | 10 | network | + | buySideProvider | 120 | 54 | network | Then the following network trades should be executed: - | party | aggressor side | volume | - | buySideProvider | sell | 290 | - | designatedLooser | buy | 290 | + | party | aggressor side | volume | + | buySideProvider | buy | 1 | + | buySideProvider | sell | 1 | + | lpprov | sell | 225 | + | aux | sell | 10 | + | designatedLoser | buy | 290 | # check margin levels Then the parties should have the following margin levels: - | party | market id | maintenance | search | initial | release | - | designatedLooser | ETH/DEC19 | 0 | 0 | 0 | 0 | + | party | market id | maintenance | search | initial | release | + | designatedLoser | ETH/DEC19 | 0 | 0 | 0 | 0 | # checking margins Then the parties should have the following account balances: - | party | asset | market id | margin | general | - | designatedLooser | USD | ETH/DEC19 | 0 | 0 | + | party | asset | market id | margin | general | + | designatedLoser | USD | ETH/DEC19 | 0 | 0 | # then we make sure the insurance pool collected the funds (however they get later spent on MTM payment to closeout-facilitating party) Then the following transfers should happen: - | from | to | from account | to account | market id | amount | asset | - | designatedLooser | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_MAKER | ETH/DEC19 | 0 | USD | - | designatedLooser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC19 | 3480 | USD | - | designatedLooser | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | ETH/DEC19 | 0 | USD | - | market | buySideProvider | ACCOUNT_TYPE_FEES_MAKER | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 0 | USD | - | designatedLooser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/DEC19 | 11251 | USD | - | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 5800 | USD | - | market | buySideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 5800 | USD | + | from | to | from account | to account | market id | amount | asset | + | designatedLoser | market | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_MAKER | ETH/DEC19 | 0 | USD | + | designatedLoser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_FEES_LIQUIDITY | ETH/DEC19 | 4350 | USD | + | designatedLoser | | ACCOUNT_TYPE_GENERAL | ACCOUNT_TYPE_FEES_INFRASTRUCTURE | ETH/DEC19 | 0 | USD | + | market | buySideProvider | ACCOUNT_TYPE_FEES_MAKER | ACCOUNT_TYPE_GENERAL | ETH/DEC19 | 0 | USD | + | designatedLoser | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_INSURANCE | ETH/DEC19 | 17631 | USD | + | market | market | ACCOUNT_TYPE_INSURANCE | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 16716 | USD | + | market | buySideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 8 | USD | + | market | buySideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 0 | USD | + | market | buySideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 8 | USD | + | market | buySideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 0 | USD | - And the insurance pool balance should be "5451" for the market "ETH/DEC19" + And the insurance pool balance should be "0" for the market "ETH/DEC19" Then the parties should have the following account balances: | party | asset | market id | margin | general | - | buySideProvider | USD | ETH/DEC19 | 66216 | 999999939570 | + | buySideProvider | USD | ETH/DEC19 | 24057 | 999999975387 | | sellSideProvider | USD | ETH/DEC19 | 83564 | 999999919336 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | - | aux | ETH/DEC19 | sell | 1 | 120 | 0 | TYPE_LIMIT | TIF_GTC | ref-1 | - | aux2 | ETH/DEC19 | buy | 1 | 120 | 1 | TYPE_LIMIT | TIF_GTC | ref-2 | + | aux2 | ETH/DEC19 | buy | 1 | 120 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + | aux | ETH/DEC19 | sell | 1 | 120 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | - And the market data for the market "ETH/DEC19" should be: + Then the market data for the market "ETH/DEC19" should be: | mark price | trading mode | target stake | supplied stake | open interest | - | 120 | TRADING_MODE_CONTINUOUS | 340728 | 9000 | 291 | + | 120 | TRADING_MODE_CONTINUOUS | 170949 | 9000 | 292 | - And the insurance pool balance should be "5451" for the market "ETH/DEC19" + And the insurance pool balance should be "0" for the market "ETH/DEC19" - Then the parties should have the following account balances: + And the parties should have the following account balances: | party | asset | market id | margin | general | - | buySideProvider | USD | ETH/DEC19 | 60396 | 999999939570 | + | buySideProvider | USD | ETH/DEC19 | 22937 | 999999975387 | | sellSideProvider | USD | ETH/DEC19 | 64666 | 999999944054 | Then the following transfers should happen: | from | to | from account | to account | market id | amount | asset | - | buySideProvider | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 5820 | USD | + | buySideProvider | market | ACCOUNT_TYPE_MARGIN | ACCOUNT_TYPE_SETTLEMENT | ETH/DEC19 | 1120 | USD | | market | sellSideProvider | ACCOUNT_TYPE_SETTLEMENT | ACCOUNT_TYPE_MARGIN | ETH/DEC19 | 5820 | USD | - And the insurance pool balance should be "5451" for the market "ETH/DEC19" + And the insurance pool balance should be "0" for the market "ETH/DEC19" When the oracles broadcast data signed with "0xCAFECAFE19": | name | value | | trading.terminated | true | @@ -216,21 +222,17 @@ Feature: check the insurance pool getting shared equally between all markets wit And the orders should have the following status: | party | reference | status | - | aux | aux-1-19 | STATUS_ACTIVE | + | aux | aux-1-19 | STATUS_FILLED | Then the oracles broadcast data signed with "0xCAFECAFE19": | name | value | | prices.ETH.value | 80 | - # When a market ETH/DEC19 is closed, the insurance pool account has its outstanding funds transferred to the global insurance account + # distribute insurance pool for DEC19 When the network moves ahead "3" blocks - And the orders should have the following status: - | party | reference | status | - | aux | aux-1-19 | STATUS_STOPPED | - - And the global insurance pool balance should be "1817" for the asset "USD" + Then the global insurance pool balance should be "0" for the asset "USD" And the insurance pool balance should be "0" for the market "ETH/DEC19" - And the insurance pool balance should be "1817" for the market "ETH/DEC20" - And the insurance pool balance should be "1817" for the market "ETH/DEC21" + And the insurance pool balance should be "0" for the market "ETH/DEC20" + And the insurance pool balance should be "0" for the market "ETH/DEC21" When the oracles broadcast data signed with "0xCAFECAFE20": | name | value | @@ -243,22 +245,22 @@ Feature: check the insurance pool getting shared equally between all markets wit And the network moves ahead "3" blocks # When a market ETH/DEC20 is closed, the insurance pool account has its outstanding funds transferred to the [network treasury] - And the global insurance pool balance should be "2726" for the asset "USD" + And the global insurance pool balance should be "0" for the asset "USD" And the insurance pool balance should be "0" for the market "ETH/DEC19" And the insurance pool balance should be "0" for the market "ETH/DEC20" - And the insurance pool balance should be "2725" for the market "ETH/DEC21" + And the insurance pool balance should be "0" for the market "ETH/DEC21" Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | | sellSideProvider | -291 | 0 | 20360 | - | buySideProvider | 291 | 0 | -11660 | - | designatedLooser | 0 | 0 | -17631 | + | buySideProvider | 57 | 0 | -3942 | + | designatedLoser | 0 | 0 | -17631 | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | buySideProvider | USD | ETH/DEC19 | 0 | 999999988326 | + | buySideProvider | USD | ETH/DEC19 | 0 | 999999996044 | | sellSideProvider | USD | ETH/DEC19 | 0 | 1000000020360 | - | designatedLooser | USD | ETH/DEC19 | 0 | 0 | - | aux | USD | ETH/DEC19 | 0 | 999999999900 | - | aux2 | USD | ETH/DEC19 | 0 | 1000000000088 | - | lpprov | USD | ETH/DEC19 | 0 | 1000000007856 | + | designatedLoser | USD | ETH/DEC19 | 0 | 0 | + | aux | USD | ETH/DEC19 | 0 | 1000000000136 | + | aux2 | USD | ETH/DEC19 | 0 | 1000000000140 | + | lpprov | USD | ETH/DEC19 | 0 | 1000000005301 | diff --git a/core/integration/features/verified/Issue-6004-ProbOfTrading_Refactoring.feature b/core/integration/features/verified/Issue-6004-ProbOfTrading_Refactoring.feature index 62a4764782..d403e90305 100644 --- a/core/integration/features/verified/Issue-6004-ProbOfTrading_Refactoring.feature +++ b/core/integration/features/verified/Issue-6004-ProbOfTrading_Refactoring.feature @@ -30,115 +30,4 @@ Feature: test probability of trading used in LP vol when best bid/ask is changin | party2 | USD | 10000000000 | | party3 | USD | 10000000000 | - And the average block duration is "1" - - Scenario: 001, LP price at 0, check what's happening with LP volume; 0038-OLIQ-002 - - Given the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/MAR22 | 50000 | 0.001 | submission | - | lp1 | party0 | ETH/MAR22 | 50000 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/MAR22 | 56 | 1 | sell | ASK | 56 | 1 | - | party0 | ETH/MAR22 | 57 | 1 | buy | BID | 57 | 1 | - - And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | party1 | ETH/MAR22 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | buy-ref-1 | - | party1 | ETH/MAR22 | buy | 1 | 890 | 0 | TYPE_LIMIT | TIF_GTC | buy-ref-1 | - | party1 | ETH/MAR22 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | buy-ref-1 | - | party2 | ETH/MAR22 | sell | 3 | 900 | 0 | TYPE_LIMIT | TIF_GTC | sell-ref-1 | - | party2 | ETH/MAR22 | sell | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | sell-ref-2 | - - When the opening auction period ends for market "ETH/MAR22" - Then the auction ends with a traded volume of "1" at a price of "900" - Then the order book should have the following volumes for market "ETH/MAR22": - | side | price | volume | - | sell | 990 | 1 | - | sell | 901 | 56 | - | sell | 900 | 2 | - | buy | 890 | 1 | - | buy | 889 | 57 | - | buy | 1 | 1 | - - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | party3 | ETH/MAR22 | sell | 114 | 889 | 2 | TYPE_LIMIT | TIF_GTC | party3-buy-1 | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | ETH/MAR22 | 50000 | 1 | buy | BID | 50000 | 0 | - Then the order book should have the following volumes for market "ETH/MAR22": - | side | price | volume | - | sell | 990 | 1 | - | sell | 900 | 2 | - | sell | 889 | 56 | - | buy | 1 | 50001 | - - Then the market data for the market "ETH/MAR22" should be: - | trading mode | supplied stake | target stake | - | TRADING_MODE_CONTINUOUS | 50000 | 188871 | - - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | party1 | ETH/MAR22 | buy | 3 | 900 | 1 | TYPE_LIMIT | TIF_GTC | party1-buy-1 | - - Then the market data for the market "ETH/MAR22" should be: - | trading mode | supplied stake | target stake | - | TRADING_MODE_CONTINUOUS | 50000 | 198475 | - - Scenario: 002, market starts with a low best bid price 1 (ProbTrading is large), and then best bid goes to 899; test of the new ProbTrading is reasonable, and LP is not distressed; 0038-OLIQ-002 - - Given the parties submit the following liquidity provision: - | id | party | market id | commitment amount | fee | lp type | - | lp1 | party0 | ETH/MAR22 | 50000 | 0.001 | submission | - | lp1 | party0 | ETH/MAR22 | 50000 | 0.001 | amendment | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | reference | - | party0 | ETH/MAR22 | 56 | 1 | sell | ASK | 56 | 1 | ice-sell | - | party0 | ETH/MAR22 | 50000 | 1 | buy | BID | 50000 | 0 | ice-buy | - - And the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | party1 | ETH/MAR22 | buy | 1 | 1 | 0 | TYPE_LIMIT | TIF_GTC | buy-ref-1 | - | party1 | ETH/MAR22 | buy | 1 | 900 | 0 | TYPE_LIMIT | TIF_GTC | buy-ref-1 | - | party2 | ETH/MAR22 | sell | 3 | 900 | 0 | TYPE_LIMIT | TIF_GTC | sell-ref-1 | - | party2 | ETH/MAR22 | sell | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | sell-ref-2 | - - When the opening auction period ends for market "ETH/MAR22" - Then the auction ends with a traded volume of "1" at a price of "900" - - Then the order book should have the following volumes for market "ETH/MAR22": - | side | price | volume | - | sell | 990 | 1 | - | sell | 901 | 56 | - | sell | 900 | 2 | - | buy | 1 | 50001 | - - And the insurance pool balance should be "0" for the market "ETH/MAR22" - - Then the parties should have the following account balances: - | party | asset | market id | margin | general | bond | - | party0 | USD | ETH/MAR22 | 43239324 | 4956710676 | 50000 | - - When the parties place the following orders: - | party | market id | side | volume | price | resulting trades | type | tif | reference | - | party3 | ETH/MAR22 | buy | 20 | 899 | 0 | TYPE_LIMIT | TIF_GTC | party3-buy-1 | - And the parties amend the following pegged iceberg orders: - | party | reference | size delta | offset | - | party0 | ice-buy | -49944 | 1 | - Then the order book should have the following volumes for market "ETH/MAR22": - | side | price | volume | - | sell | 990 | 1 | - | sell | 901 | 56 | - | sell | 900 | 2 | - | buy | 899 | 20 | - | buy | 898 | 56 | - | buy | 1 | 1 | - - Then the market data for the market "ETH/MAR22" should be: - | trading mode | supplied stake | target stake | - | TRADING_MODE_CONTINUOUS | 50000 | 3201 | - - And the insurance pool balance should be "0" for the market "ETH/MAR22" - + And the average block duration is "1" \ No newline at end of file diff --git a/core/integration/features/verified/Margin-Levels.feature b/core/integration/features/verified/Margin-Levels.feature index 2cfe9cd371..1078e9a427 100644 --- a/core/integration/features/verified/Margin-Levels.feature +++ b/core/integration/features/verified/Margin-Levels.feature @@ -194,6 +194,7 @@ Feature: Check the margin scaling levels (maintenance, search, initial, release) | trader2 | USD | ETH/DEC19 | 7114 | 2886 | | trader20 | USD | ETH/DEC20 | 6835 | 3165 | + @Liquidation Scenario: Assure initial margin requirement must be met Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -252,7 +253,7 @@ Feature: Check the margin scaling levels (maintenance, search, initial, release) When the parties deposit on asset's general account the following amount: | party | asset | amount | - | trader3 | USD | 2 | + | trader3 | USD | 41 | And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | | trader3 | ETH/DEC19 | buy | 20 | 15 | 3 | TYPE_LIMIT | TIF_FOK | @@ -267,9 +268,10 @@ Feature: Check the margin scaling levels (maintenance, search, initial, release) | party | asset | market id | margin | general | | trader1 | USD | ETH/DEC19 | 712 | 0 | | trader2 | USD | ETH/DEC19 | 712 | 0 | - | trader3 | USD | ETH/DEC19 | 322 | 1 | + | trader3 | USD | ETH/DEC19 | 322 | 40 | When the network moves ahead "1" blocks + Then debug trades Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | | trader1 | -10 | 0 | 0 | @@ -281,12 +283,12 @@ Feature: Check the margin scaling levels (maintenance, search, initial, release) | party | market id | maintenance | search | initial | release | | trader1 | ETH/DEC19 | 406 | 609 | 812 | 1218 | | trader2 | ETH/DEC19 | 406 | 609 | 812 | 1218 | - | trader3 | ETH/DEC19 | 361 | 541 | 722 | 1083 | + | trader3 | ETH/DEC19 | 361 | 541 | 722 | 1083 | And the parties should have the following account balances: | party | asset | market id | margin | general | | trader1 | USD | ETH/DEC19 | 712 | 0 | | trader2 | USD | ETH/DEC19 | 712 | 0 | - | trader3 | USD | ETH/DEC19 | 323 | 0 | + | trader3 | USD | ETH/DEC19 | 362 | 0 | # party places a limit order that would reduce its exposure once it fills When the parties place the following orders with ticks: @@ -294,7 +296,7 @@ Feature: Check the margin scaling levels (maintenance, search, initial, release) | trader3 | ETH/DEC19 | sell | 1 | 10 | 0 | TYPE_LIMIT | TIF_GTC | Then the parties should have the following margin levels: | party | market id | maintenance | initial | - | trader3 | ETH/DEC19 | 361 | 722 | + | trader3 | ETH/DEC19 | 361 | 722 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | @@ -304,7 +306,7 @@ Feature: Check the margin scaling levels (maintenance, search, initial, release) | trader3 | 19 | 0 | 0 | And the parties should have the following margin levels: | party | market id | maintenance | initial | - | trader3 | ETH/DEC19 | 343 | 686 | + | trader3 | ETH/DEC19 | 343 | 686 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | @@ -314,7 +316,7 @@ Feature: Check the margin scaling levels (maintenance, search, initial, release) | trader3 | 18 | 0 | 0 | And the parties should have the following margin levels: | party | market id | maintenance | initial | - | trader3 | ETH/DEC19 | 325 | 650 | + | trader3 | ETH/DEC19 | 325 | 650 | # position is long so extra buy order not allowed to skip margin check When the parties place the following orders with ticks: @@ -334,7 +336,7 @@ Feature: Check the margin scaling levels (maintenance, search, initial, release) | trader3 | 17 | -85 | -5 | And the parties should have the following margin levels: | party | market id | maintenance | initial | - | trader3 | ETH/DEC19 | 154 | 308 | + | trader3 | ETH/DEC19 | 154 | 308 | And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | @@ -343,17 +345,17 @@ Feature: Check the margin scaling levels (maintenance, search, initial, release) When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | - | auxiliary2 | ETH/DEC19 | buy | 20 | 10 | 0 | TYPE_LIMIT | TIF_GTC | - | trader3 | ETH/DEC19 | sell | 17 | 0 | 1 | TYPE_MARKET | TIF_FOK | + | trader3 | ETH/DEC19 | sell | 17 | 0 | 0 | TYPE_MARKET | TIF_FOK | + | auxiliary2 | ETH/DEC19 | buy | 20 | 10 | 1 | TYPE_LIMIT | TIF_GTC | Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | - | trader3 | 0 | 0 | -5 | + | trader3 | 0 | 0 | -5 | And the parties should have the following margin levels: | party | market id | maintenance | initial | - | trader3 | ETH/DEC19 | 0 | 0 | + | trader3 | ETH/DEC19 | 0 | 0 | And the parties should have the following account balances: | party | asset | market id | margin | general | - | trader3 | USD | ETH/DEC19 | 0 | 318 | + | trader3 | USD | ETH/DEC19 | 0 | 357 | And the market data for the market "ETH/DEC19" should be: | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | diff --git a/core/integration/features/verified/Negative-Position-Decimal-Places.feature b/core/integration/features/verified/Negative-Position-Decimal-Places.feature index a7ff21994d..7b91cb6c50 100644 --- a/core/integration/features/verified/Negative-Position-Decimal-Places.feature +++ b/core/integration/features/verified/Negative-Position-Decimal-Places.feature @@ -1,14 +1,14 @@ Feature: test negative PDP (position decimal places) Background: Given the following network parameters are set: - | name | value | - | market.liquidity.bondPenaltyParameter | 0.2 | - | network.markPriceUpdateMaximumFrequency | 0s | - | limits.markets.maxPeggedOrders | 4 | + | name | value | + | market.liquidity.bondPenaltyParameter | 0.2 | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 4 | Given the liquidity monitoring parameters: - | name | triggering ratio | time window | scaling factor | - | lqm-params | 0.10 | 24h | 1.0 | - + | name | triggering ratio | time window | scaling factor | + | lqm-params | 0.10 | 24h | 1.0 | + And the following assets are registered: | id | decimal places | | ETH | 5 | @@ -27,11 +27,11 @@ Feature: test negative PDP (position decimal places) | horizon | probability | auction extension | | 360000 | 0.99 | 300 | And the liquidity sla params named "SLA-1": - | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | - | 0.99 | 0.5 | 1 | 1.0 | + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 0.99 | 0.5 | 1 | 1.0 | And the liquidity sla params named "SLA-2": - | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | - | 0.000001 | 0.5 | 1 | 1.0 | + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 0.000001 | 0.5 | 1 | 1.0 | And the markets: | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | decimal places | position decimal places | linear slippage factor | quadratic slippage factor | sla params | | USD/DEC22 | USD | ETH | lqm-params | log-normal-risk-model-1 | default-margin-calculator | 1 | fees-config-1 | price-monitoring-1 | default-eth-for-future | 5 | -1 | 1e6 | 1e6 | SLA-1 | @@ -47,18 +47,18 @@ Feature: test negative PDP (position decimal places) @Now Scenario: 001, test negative PDP when trading mode is auction (0019-MCAL-010) - Given the parties submit the following liquidity provision: + When the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp7 | party0 | USD/DEC22 | 1000 | 0.001 | submission | | lp7 | party0 | USD/DEC22 | 1000 | 0.001 | amendment | | lp6 | lpprov | USD/DEC22 | 4000 | 0.001 | submission | | lp6 | lpprov | USD/DEC22 | 4000 | 0.001 | amendment | And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | USD/DEC22 | 11 | 1 | sell | ASK | 11 | 20 | - | party0 | USD/DEC22 | 11 | 1 | buy | BID | 11 | 20 | - | lpprov | USD/DEC22 | 4 | 1 | sell | ASK | 4 | 20 | - | lpprov | USD/DEC22 | 4 | 1 | buy | BID | 4 | 20 | + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | party0 | USD/DEC22 | 11 | 1 | sell | ASK | 11 | 20 | + | party0 | USD/DEC22 | 11 | 1 | buy | BID | 11 | 20 | + | lpprov | USD/DEC22 | 4 | 1 | sell | ASK | 4 | 20 | + | lpprov | USD/DEC22 | 4 | 1 | buy | BID | 4 | 20 | And the parties place the following orders: | party | market id | side | volume | price | resulting trades | type | tif | reference | @@ -70,33 +70,39 @@ Feature: test negative PDP (position decimal places) Then the market data for the market "USD/DEC22" should be: | target stake | supplied stake | | 35569 | 5000 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | bond | + | party0 | ETH | USD/DEC22 | 46951 | 4952049 | 1000 | + | party1 | ETH | USD/DEC22 | 9609 | 99990391 | | + | party2 | ETH | USD/DEC22 | 42684 | 99957316 | | + # target stake= vol * mark price * rf = 1*10*1000*3.5569036*10 = 35569 - And the opening auction period ends for market "USD/DEC22" - And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "USD/DEC22" - And the mark price should be "0" for the market "USD/DEC22" + When the opening auction period ends for market "USD/DEC22" + And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "USD/DEC22" + And the mark price should be "1000" for the market "USD/DEC22" Then the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | party0 | ETH | USD/DEC22 | 46951 | 4952049 | 1000 | - | party1 | ETH | USD/DEC22 | 9609 | 99990391 | | + | party0 | ETH | USD/DEC22 | 512194 | 4486806 | 1000 | + | party1 | ETH | USD/DEC22 | 10809 | 99989191 | | | party2 | ETH | USD/DEC22 | 42684 | 99957316 | | And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | party0 | USD/DEC22 | 39126 | 43038 | 46951 | 54776 | - | party1 | USD/DEC22 | 8008 | 8808 | 9609 | 11211 | - | party2 | USD/DEC22 | 35570 | 39127 | 42684 | 49798 | + | party0 | USD/DEC22 | 426829 | 469511 | 512194 | 597560 | + | party1 | USD/DEC22 | 9008 | 9908 | 10809 | 12611 | + | party2 | USD/DEC22 | 36570 | 40227 | 43884 | 51198 | @Now - Scenario: 002, test negative PDP when trading mode is continuous (0003-MTMK-014, 0003-MTMK-015, 0019-MCAL-010, 0029-FEES-014) + Scenario: 002, test negative PDP when trading mode is continuous (0003-MTMK-014, 0019-MCAL-010, 0029-FEES-014) Given the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp2 | party0 | USD/DEC22 | 35569 | 0.001 | submission | - And the parties place the following pegged iceberg orders: - | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | - | party0 | USD/DEC22 | 2 | 1 | sell | ASK | 500 | 20 | - | party0 | USD/DEC22 | 2 | 1 | buy | BID | 500 | 20 | + And the parties place the following pegged iceberg orders: + | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | + | party0 | USD/DEC22 | 2 | 1 | sell | ASK | 500 | 20 | + | party0 | USD/DEC22 | 2 | 1 | buy | BID | 500 | 20 | # LP places limit orders which oversupply liquidity And the parties place the following orders: @@ -126,19 +132,19 @@ Feature: test negative PDP (position decimal places) And the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | party0 | ETH | USD/DEC22 | 821773 | 4142658 | 35569 | - | party1 | ETH | USD/DEC22 | 1778 | 99998222 | | - | party2 | ETH | USD/DEC22 | 7042 | 99992958 | | + | party0 | ETH | USD/DEC22 | 821773 | 4142658 | 35569 | + | party1 | ETH | USD/DEC22 | 1778 | 99998222 | | + | party2 | ETH | USD/DEC22 | 7042 | 99992958 | | And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | party0 | USD/DEC22 | 704623 | 775085 | 845547 | 986472 | + | party0 | USD/DEC22 | 704623 | 775085 | 845547 | 986472 | | party1 | USD/DEC22 | 1482 | 1630 | 1778 | 2074 | | party2 | USD/DEC22 | 5792 | 6371 | 6950 | 8108 | -#risk factor short: 3.5569036 -#risk factor long: 0.801225765 -# Margin_maintenance_party0 = max((1481+500)*10*3.5569036*10,1206*10*0.801225765*10)=704623 + #risk factor short: 3.5569036 + #risk factor long: 0.801225765 + # Margin_maintenance_party0 = max((1481+500)*10*3.5569036*10,1206*10*0.801225765*10)=704623 And the following trades should be executed: | buyer | price | size | seller | | party1 | 10 | 10 | party2 | @@ -164,10 +170,10 @@ Feature: test negative PDP (position decimal places) | seller | price | size | buyer | | party3 | 9 | 1 | party1 | -# trade_value_for_fee_purposes for party3: size_of_trade * price_of_trade = 1*10 * 9 = 90 -# infrastructure_fee = fee_factor[infrastructure] * trade_value_for_fee_purposes = 0.001 * 90 = 0.09 =1 (rounded up to nearest whole value) -# maker_fee = fee_factor[maker] * trade_value_for_fee_purposes = 0.004 * 90 = 0.36 =1 (rounded up to nearest whole value) -# liquidity_fee = fee_factor[liquidity] * trade_value_for_fee_purposes = 0.001 * 90= 0.09 =1 (rounded up to nearest whole value) + # trade_value_for_fee_purposes for party3: size_of_trade * price_of_trade = 1*10 * 9 = 90 + # infrastructure_fee = fee_factor[infrastructure] * trade_value_for_fee_purposes = 0.001 * 90 = 0.09 =1 (rounded up to nearest whole value) + # maker_fee = fee_factor[maker] * trade_value_for_fee_purposes = 0.004 * 90 = 0.36 =1 (rounded up to nearest whole value) + # liquidity_fee = fee_factor[liquidity] * trade_value_for_fee_purposes = 0.001 * 90= 0.09 =1 (rounded up to nearest whole value) And the following transfers should happen: | from | to | from account | to account | market id | amount | asset | @@ -185,13 +191,13 @@ Feature: test negative PDP (position decimal places) #MTM with price change from 10 to 9, party1 has long position of volume 10, price 10 ->9, MTM -1*10*10*1=-100; party2 has short position of volume 10, price 10 ->9, MTM 10*10*1=100; And the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | party0 | ETH | USD/DEC22 | 821773 | 4142658 | 35569 | + | party0 | ETH | USD/DEC22 | 821773 | 4142658 | 35569 | | party1 | ETH | USD/DEC22 | 1678 | 99998223 | | | party2 | ETH | USD/DEC22 | 7142 | 99992958 | | # Margin_maintenance_party0 = max(1481*10*3.5569036*9,1206*10*0.801225765*9)=474100 And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | party0 | USD/DEC22 | 634161 | 697577 | 760993 | 887825 | + | party0 | USD/DEC22 | 634161 | 697577 | 760993 | 887825 | | party1 | USD/DEC22 | 1264 | 1390 | 1516 | 1769 | | party2 | USD/DEC22 | 5322 | 5854 | 6386 | 7450 | @@ -218,13 +224,13 @@ Feature: test negative PDP (position decimal places) #MTM with price change from 9 to 8, party1 has long position of volume 11, price 9 ->8, MTM -1*11*10*1=-110; party2 has short position of volume 10, price 10 ->9, MTM 10*10*1=100; And the parties should have the following account balances: | party | asset | market id | margin | general | bond | - | party0 | ETH | USD/DEC22 | 676438 | 4287994 | 35569 | + | party0 | ETH | USD/DEC22 | 676438 | 4287994 | 35569 | | party1 | ETH | USD/DEC22 | 1230 | 99998561 | | | party2 | ETH | USD/DEC22 | 5823 | 99994377 | | -# Margin_maintenance_party0 = max(1981*10*3.5569036*8,1206*10*0.801225765*8)=563699 + # Margin_maintenance_party0 = max(1981*10*3.5569036*8,1206*10*0.801225765*8)=563699 And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | party0 | USD/DEC22 | 563699 | 620068 | 676438 | 789178 | + | party0 | USD/DEC22 | 563699 | 620068 | 676438 | 789178 | | party1 | USD/DEC22 | 1025 | 1127 | 1230 | 1435 | | party2 | USD/DEC22 | 4853 | 5338 | 5823 | 6794 | @@ -232,8 +238,8 @@ Feature: test negative PDP (position decimal places) Given the parties deposit on asset's general account the following amount: | party | asset | amount | | party0 | ETH | 1000000000 | - | party1 | ETH | 1000000000 | - | party2 | ETH | 10000 | + | party1 | ETH | 1000000000 | + | party2 | ETH | 10000 | And the parties submit the following liquidity provision: | id | party | market id | commitment amount | fee | lp type | | lp1 | party0 | USD/DEC23 | 40000000 | 0.001 | submission | @@ -254,35 +260,35 @@ Feature: test negative PDP (position decimal places) When the opening auction period ends for market "USD/DEC23" Then the market data for the market "USD/DEC23" should be: | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 10 | TRADING_MODE_CONTINUOUS | 360000 | 8 | 13 | 35569000 | 40000000 | 10 | + | 10 | TRADING_MODE_CONTINUOUS | 360000 | 8 | 13 | 35569000 | 40000000 | 10 | Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "USD/DEC23" And the order book should have the following volumes for market "USD/DEC23": | side | price | volume | - | sell | 11 | 5 | - | sell | 10 | 40 | - | buy | 9 | 46 | - | buy | 8 | 5 | + | sell | 11 | 5 | + | sell | 10 | 40 | + | buy | 9 | 46 | + | buy | 8 | 5 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | | party3 | USD/DEC23 | sell | 1 | 9 | 1 | TYPE_LIMIT | TIF_GTC | Then the order book should have the following volumes for market "USD/DEC23": | side | price | volume | - | sell | 11 | 5 | - | sell | 10 | 40 | - | buy | 9 | 0 | - | buy | 8 | 50 | + | sell | 11 | 5 | + | sell | 10 | 40 | + | buy | 9 | 0 | + | buy | 8 | 50 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | | party3 | USD/DEC23 | buy | 1 | 10 | 1 | TYPE_LIMIT | TIF_GTC | Then the order book should have the following volumes for market "USD/DEC23": | side | price | volume | - | sell | 11 | 5 | - | sell | 10 | 39 | - | buy | 8 | 5 | + | sell | 11 | 5 | + | sell | 10 | 39 | + | buy | 8 | 5 | And the market data for the market "USD/DEC23" should be: | mark price | trading mode | horizon | min bound | max bound | target stake | supplied stake | open interest | - | 10 | TRADING_MODE_CONTINUOUS | 360000 | 8 | 13 | 39125900 | 40000000 | 11 | + | 10 | TRADING_MODE_CONTINUOUS | 360000 | 8 | 13 | 39125900 | 40000000 | 11 | diff --git a/core/integration/features/verified/closeout-LP_New_Exit_Price.feature b/core/integration/features/verified/closeout-LP_New_Exit_Price.feature index 0138e4d6b8..1335d3f6f2 100644 --- a/core/integration/features/verified/closeout-LP_New_Exit_Price.feature +++ b/core/integration/features/verified/closeout-LP_New_Exit_Price.feature @@ -26,9 +26,11 @@ Feature: Replicate a scenario from Lewis with Elias' implementation on Exit_pric | name | value | | market.auction.minimumDuration | 1 | | network.markPriceUpdateMaximumFrequency | 0s | - | market.liquidity.stakeToCcyVolume | 1 | + | market.liquidity.stakeToCcyVolume | 1 | | limits.markets.maxPeggedOrders | 2 | And the average block duration is "1" + + @Liquidation @NoPerp Scenario: 001 Replicate a scenario from Lewis with Elias' implementation on Exit_price when there is insufficient orders, linear slippage factor = 1e6, quadratic slippage factor = 1e6, 0019-MCAL-001, 0019-MCAL-002 # 1. trader B made LP commitment 150,000 # 2. trader C and A cross at 0.5 with size of 111, and this opens continuous trading (trade B is short) @@ -96,8 +98,8 @@ Feature: Replicate a scenario from Lewis with Elias' implementation on Exit_pric | side | price | volume | | buy | 29 | 5173 | | buy | 49 | 1 | - | sell | 2000 | 2 | - | sell | 2020 | 75 | + | sell | 2000 | 2 | + | sell | 2020 | 75 | | sell | 3000 | 1 | When the parties place the following orders with ticks: @@ -108,7 +110,7 @@ Feature: Replicate a scenario from Lewis with Elias' implementation on Exit_pric Then the order book should have the following volumes for market "ETH/DEC20": | side | price | volume | | buy | 49 | 1 | - | sell | 2000 | 2 | + | sell | 2000 | 0 | # traderB has both LP pegged orders, limit order, and positions # margin for pegged orders long: 5173*0.801225765*50=207237.0441 @@ -118,21 +120,21 @@ Feature: Replicate a scenario from Lewis with Elias' implementation on Exit_pric # margin_short= 632,800,019,918.66 And the parties should have the following account balances: - | party | asset | market id | margin | general | bond | - | traderB | USD | ETH/DEC20 | 3100294 | 0 | 0 | + | party | asset | market id | margin | general | bond | + | traderB | USD | ETH/DEC20 | 0 | 0 | 0 | Then the network moves ahead "1" blocks Then the parties should have the following margin levels: - | party | market id | maintenance | search | initial | release | - | traderB | ETH/DEC20 | 632800019919 | 949200029878 | 1265600039838 | 1898400059757 | + | party | market id | maintenance | search | initial | release | + | traderB | ETH/DEC20 | 0 | 0 | 0 | 0 | And the market data for the market "ETH/DEC20" should be: | mark price | trading mode | auction trigger | target stake | supplied stake | open interest | | 50 | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | 199186 | 150000 | 112 | - And the insurance pool balance should be "0" for the market "ETH/DEC20" + And the insurance pool balance should be "3096390" for the market "ETH/DEC20" - @SLABug + @SLABug @Liquidation Scenario: 002 Replicate a scenario from Lewis, linear slippage factor = 1e0, quadratic slippage factor = 1e2 Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -184,8 +186,8 @@ Feature: Replicate a scenario from Lewis with Elias' implementation on Exit_pric | traderB | ETH/DEC21 | sell | 111 | 50 | 1 | TYPE_LIMIT | TIF_GTC | And the parties should have the following account balances: - | party | asset | market id | margin | general | bond | - | traderB | USD | ETH/DEC21 | 3100294 | 0 | 0 | + | party | asset | market id | margin | general | bond | + | traderB | USD | ETH/DEC21 | 0 | 0 | 0 | And the market data for the market "ETH/DEC21" should be: | mark price | trading mode | target stake | supplied stake | open interest | @@ -202,16 +204,17 @@ Feature: Replicate a scenario from Lewis with Elias' implementation on Exit_pric | traderA | USD | ETH/DEC21 | 125460250 | 9999874539450 | Then the parties should have the following margin levels: - | party | market id | maintenance | search | initial | release | - | traderB | ETH/DEC21 | 62745519 | 94118278 | 125491038 | 188236557 | + | party | market id | maintenance | search | initial | release | + | traderB | ETH/DEC21 | 0 | 0 | 0 | 0 | And the market data for the market "ETH/DEC21" should be: | mark price | trading mode | target stake | supplied stake | open interest | | 50 | TRADING_MODE_CONTINUOUS | 199186 | 150000 | 112 | #supplied stake is only updated with bond account at the end of epoch - And the insurance pool balance should be "0" for the market "ETH/DEC21" + And the insurance pool balance should be "3100294" for the market "ETH/DEC21" + @Liquidation Scenario: 003 Replicate a scenario from Lewis, linear slippage factor = 1e1, quadratic slippage factor = 1e3 Given the parties deposit on asset's general account the following amount: | party | asset | amount | @@ -271,14 +274,14 @@ Feature: Replicate a scenario from Lewis with Elias' implementation on Exit_pric # margin for short position: min(112*9000000000000000, 50*(112*1e1+112^2*1e3))+112*50*3.55690359157934000 =627275918.7 And the parties should have the following account balances: - | party | asset | market id | margin | general | bond | - | traderB | USD | ETH/DEC22 | 3100294 | 0 | 0 | + | party | asset | market id | margin | general | bond | + | traderB | USD | ETH/DEC22 | 0 | 0 | 0 | Then the parties should have the following margin levels: - | party | market id | maintenance | search | initial | release | - | traderB | ETH/DEC22 | 627275919 | 940913878 | 1254551838 | 1881827757 | + | party | market id | maintenance | search | initial | release | + | traderB | ETH/DEC22 | 0 | 0 | 0 | 0 | - And the insurance pool balance should be "0" for the market "ETH/DEC22" + And the insurance pool balance should be "3100294" for the market "ETH/DEC22" Scenario: 004 Replicate a scenario from Lewis, linear slippage factor = 1e2, quadratic slippage factor = 1e0, 0019-MCAL-003 Given the parties deposit on asset's general account the following amount: diff --git a/core/integration/features/verified/closeout-cascade.feature b/core/integration/features/verified/closeout-cascade.feature index feb53d5c8a..f6f0529202 100644 --- a/core/integration/features/verified/closeout-cascade.feature +++ b/core/integration/features/verified/closeout-cascade.feature @@ -19,7 +19,7 @@ Feature: Closeout-cascades | limits.markets.maxPeggedOrders | 2 | @NetworkParty - @CloseOutTrades + @CloseOutTrades @Liquidation @NoPerp Scenario: Distressed position gets taken over by another party whose margin level is insufficient to support it (however mark price doesn't get updated on closeout trade and hence no further closeouts are carried out) (0005-COLL-002) # setup accounts, we are trying to closeout trader3 first and then trader2 @@ -84,33 +84,34 @@ Feature: Closeout-cascades Then the order book should have the following volumes for market "ETH/DEC19": | side | price | volume | - | sell | 1055 | 100 | + | sell | 1055 | 100 | | sell | 1000 | 10 | | buy | 50 | 50 | | buy | 10 | 50 | | buy | 5 | 5 | - And the network moves ahead "1" blocks + When the network moves ahead "3" blocks Then the mark price should be "100" for the market "ETH/DEC19" + And debug trades # trader3 got closed-out, and trader2 got close-out from the trade with network to close-out trader3, auxiliary2 was in the trade to close-out trader2 And the following trades should be executed: | buyer | price | size | seller | | auxiliary2 | 10 | 10 | auxiliary1 | | trader3 | 100 | 50 | auxiliary1 | + | network | 100 | 50 | trader3 | | trader2 | 50 | 50 | network | - | network | 50 | 50 | trader3 | + | network | 100 | 50 | trader2 | | auxiliary2 | 10 | 50 | network | - | network | 10 | 50 | trader2 | And the cumulated balance for all accounts should be worth "3000000002100" Then the order book should have the following volumes for market "ETH/DEC19": | side | price | volume | - | sell | 1055 | 100 | + | sell | 1055 | 100 | | sell | 1000 | 10 | - | buy | 50 | 0 | - | buy | 10 | 0 | - | buy | 5 | 5 | + | buy | 50 | 0 | + | buy | 10 | 0 | + | buy | 5 | 5 | Then the mark price should be "100" for the market "ETH/DEC19" And the parties should have the following margin levels: @@ -124,11 +125,11 @@ Feature: Closeout-cascades | trader3 | 0 | 0 | -100 | Then the parties should have the following account balances: - | party | asset | market id | margin | general | - | trader2 | BTC | ETH/DEC19 | 0 | 0 | - | trader3 | BTC | ETH/DEC19 | 0 | 0 | - | auxiliary1 | BTC | ETH/DEC19 | 114800 | 999999884295 | - | auxiliary2 | BTC | ETH/DEC19 | 732000001300 | 268000001696 | + | party | asset | market id | margin | general | + | trader2 | BTC | ETH/DEC19 | 0 | 0 | + | trader3 | BTC | ETH/DEC19 | 0 | 0 | + | auxiliary1 | BTC | ETH/DEC19 | 114800 | 999999884295 | + | auxiliary2 | BTC | ETH/DEC19 | 732000001300 | 268000001696 | # setup new mark price, which is the same as when trader2 traded with network Then the parties place the following orders: @@ -143,9 +144,9 @@ Feature: Closeout-cascades #trader2 and trader3 are still close-out Then the parties should have the following profit and loss: - | party | volume | unrealised pnl | realised pnl | - | auxiliary1 | -70 | 4500 | 0 | - | auxiliary2 | 70 | 0 | -2404 | - | trader2 | 0 | 0 | -2000 | - | trader3 | 0 | 0 | -100 | + | party | volume | unrealised pnl | realised pnl | + | auxiliary1 | -70 | 4500 | 0 | + | auxiliary2 | 70 | 0 | -2404 | + | trader2 | 0 | 0 | -2000 | + | trader3 | 0 | 0 | -100 | diff --git a/core/integration/features/verified/closeout-lognormal.feature b/core/integration/features/verified/closeout-lognormal.feature index 3ca5fb165c..6409e48aa5 100644 --- a/core/integration/features/verified/closeout-lognormal.feature +++ b/core/integration/features/verified/closeout-lognormal.feature @@ -20,7 +20,8 @@ Feature: Closeout scenarios | market.auction.minimumDuration | 1 | | network.markPriceUpdateMaximumFrequency | 0s | | limits.markets.maxPeggedOrders | 2 | - @EndBlock + + @EndBlock @Liquidation @NoPerp Scenario: 001, 2 parties get close-out at the same time. Distressed position gets taken over by LP, distressed order gets canceled (0005-COLL-002; 0012-POSR-001; 0012-POSR-002; 0012-POSR-004; 0012-POSR-005; 0007-POSN-015) # setup accounts, we are trying to closeout trader3 first and then trader2 @@ -110,9 +111,10 @@ Feature: Closeout scenarios | buyer | price | size | seller | | trader3 | 100 | 10 | auxiliary2 | - And the order book should have the following volumes for market "ETH/DEC19": + When the network moves ahead "1" blocks + Then the order book should have the following volumes for market "ETH/DEC19": | side | price | volume | - | buy | 5 | 5 | + | buy | 5 | 0 | | buy | 45 | 0 | | buy | 50 | 0 | | buy | 100 | 0 | @@ -121,21 +123,21 @@ Feature: Closeout scenarios # #trader3 is closed out, trader2 has no more open orders as they got cancelled after becoming distressed And the parties should have the following margin levels: - | party | market id | maintenance | search | initial | release | - | trader2 | ETH/DEC19 | 0 | 0 | 0 | 0 | - | trader3 | ETH/DEC19 | 11000000801 | 16500001201 | 22000001602 | 33000002403 | + | party | market id | maintenance | search | initial | release | + | trader2 | ETH/DEC19 | 0 | 0 | 0 | 0 | + | trader3 | ETH/DEC19 | 0 | 0 | 0 | 0 | # trader3 can not be closed-out because there is not enough vol on the order book And the parties should have the following account balances: | party | asset | market id | margin | general | | trader2 | USD | ETH/DEC19 | 0 | 2000 | - | trader3 | USD | ETH/DEC19 | 162 | 0 | + | trader3 | USD | ETH/DEC19 | 0 | 0 | Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | status | | trader2 | 0 | 0 | 0 | POSITION_STATUS_ORDERS_CLOSED | - | trader3 | 10 | 0 | 0 | | + | trader3 | 0 | 0 | -162 | POSITION_STATUS_CLOSED_OUT | | auxiliary1 | -10 | -900 | 0 | | - | auxiliary2 | 0 | 0 | 900 | | + | auxiliary2 | 5 | 475 | 586 | | And the insurance pool balance should be "0" for the market "ETH/DEC19" When the parties place the following orders: | party | market id | side | price | volume | resulting trades | type | tif | reference | @@ -149,8 +151,8 @@ Feature: Closeout scenarios Then the network moves ahead "4" blocks And the order book should have the following volumes for market "ETH/DEC19": | side | price | volume | - | buy | 1 | 10 | - | buy | 5 | 5 | + | buy | 1 | 5 | + | buy | 5 | 0 | | buy | 45 | 0 | | buy | 50 | 0 | | buy | 100 | 0 | @@ -160,28 +162,24 @@ Feature: Closeout scenarios And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | | trader2 | ETH/DEC19 | 0 | 0 | 0 | 0 | - | trader3 | ETH/DEC19 | 1771 | 2656 | 3542 | 5313 | + | trader3 | ETH/DEC19 | 0 | 0 | 0 | 0 | And the parties should have the following account balances: | party | asset | market id | margin | general | | trader2 | USD | ETH/DEC19 | 0 | 2000 | - | trader3 | USD | ETH/DEC19 | 162 | 0 | + | trader3 | USD | ETH/DEC19 | 0 | 0 | # 0007-POSN-015 -# And the parties should have the following profit and loss: -# | party | volume | unrealised pnl | realised pnl | status | -# | trader2 | 0 | 0 | 0 | POSITION_STATUS_ORDERS_CLOSED | - -# And the insurance pool balance should be "0" for the market "ETH/DEC19" -# And the parties should have the following profit and loss: -# | party | volume | unrealised pnl | realised pnl | -# | auxiliary1 | -10 | -900 | 0 | -# | auxiliary2 | 5 | 475 | 503 | -# | trader2 | 0 | 0 | 0 | -# | trader3 | 0 | 0 | -162 | -# | lprov | 5 | 495 | -413 | -# Then the market data for the market "ETH/DEC19" should be: -# | mark price | trading mode | auction trigger | -# | 100 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_UNABLE_TO_DEPLOY_LP_ORDERS | + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | status | + | trader2 | 0 | 0 | 0 | POSITION_STATUS_ORDERS_CLOSED | + + And the insurance pool balance should be "3" for the market "ETH/DEC19" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | auxiliary1 | 0 | 0 | -900 | + | auxiliary2 | 0 | 0 | 1061 | + | trader2 | 0 | 0 | 0 | + | trader3 | 0 | 0 | -162 | # Scenario: 002, Position becomes distressed upon exiting an auction (0007-POSN-016, 0012-POSR-008) # Given the insurance pool balance should be "0" for the market "ETH/DEC19" diff --git a/core/integration/features/verified/liquidity-provision-bond-account-dp.feature b/core/integration/features/verified/liquidity-provision-bond-account-dp.feature index 25e5393138..247736e24e 100644 --- a/core/integration/features/verified/liquidity-provision-bond-account-dp.feature +++ b/core/integration/features/verified/liquidity-provision-bond-account-dp.feature @@ -151,8 +151,4 @@ Feature: Check that bond slashing works with non-default asset decimals, market | party2 | ETH/MAR22 | 220809 | 242889 | 264970 | 309132 | # move to the next epoch to perform liquidity check - Then the network moves ahead "7" blocks - And the market data for the market "ETH/MAR22" should be: - | trading mode | auction trigger | target stake | supplied stake | open interest | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 533535 | 56341 | 150 | - + # We used to check for liquidity auctions here, but those are now removed diff --git a/core/integration/features/verified/liquidity-provision-bond-account.feature b/core/integration/features/verified/liquidity-provision-bond-account.feature index c55abbc8cd..97a339d78e 100644 --- a/core/integration/features/verified/liquidity-provision-bond-account.feature +++ b/core/integration/features/verified/liquidity-provision-bond-account.feature @@ -180,12 +180,7 @@ Feature: Replicate LP getting distressed during continuous trading, check if pen # #The upshot is that seemingly, we transferred too much to the margin account, because briefly (between placing the new order and repricing the LP orders), that was the balance required. # move to the next block to perform liquidity check - Then the network moves ahead "1" blocks # open interest updates to include buy order of size 20 - And the market data for the market "ETH/MAR22" should be: - | trading mode | auction trigger | target stake | supplied stake | open interest | - | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET | 462397 | 50000 | 130 | - # @Now # Scenario: 002, LP gets slashed twice during continuous trading, 0044-LIME-002, No DPD setting diff --git a/core/integration/features/verified/network_disposing_position_outside_bounds.feature b/core/integration/features/verified/network_disposing_position_outside_bounds.feature new file mode 100644 index 0000000000..01e72bebfc --- /dev/null +++ b/core/integration/features/verified/network_disposing_position_outside_bounds.feature @@ -0,0 +1,350 @@ +Feature: Disposing position outside bounds + + # A network should be able to dispose it's position against any orders outside price monitoring bounds but not orders outside the liquidity price range. + + Background: + + # Configure the network + Given the average block duration is "1" + And the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + | limits.markets.maxPeggedOrders | 2 | + And the following assets are registered: + | id | decimal places | quantum | + | USD.0.1 | 0 | 1 | + + # Configure the markets + Given the liquidation strategies: + | name | disposal step | disposal fraction | full disposal size | max fraction consumed | + | liquidation-strat-1 | 1 | 0.5 | 0 | 1 | + | liquidation-strat-2 | 1 | 1 | 0 | 0.5 | + And the price monitoring named "price-monitoring": + | horizon | probability | auction extension | + | 6200 | 0.99 | 5 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | liquidation strategy | sla params | + | ETH/MAR22 | ETH | USD.0.10 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | price-monitoring | default-eth-for-future | 0.001 | 0 | liquidation-strat-1 | default-basic | + | ETH/MAR23 | ETH | USD.0.10 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | price-monitoring | default-eth-for-future | 0.001 | 0 | liquidation-strat-2 | default-basic | + + + Scenario: Network considers volume outside price-monitoring bounds as avaliable to dispose against when calculating max consumption (0012-POSR-019)(0012-POSR-020)(0012-POSR-025)(0012-POSR-029) + # Orderbook setup such that LPs post orders outside of price-monitoring bounds using limit ormal orders and iceberg orders. The avaliable volume should include volume outside bounds and the full size of the iceberg orders. + + # Market configuiration + Given the liquidity sla params named "sla-params": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 100 | 0.6 | 1 | 1.0 | + When the markets are updated: + | id | linear slippage factor | quadratic slippage factor | sla params | + | ETH/MAR23 | 1e-3 | 0 | sla-params | + + # Setup the market + Given the initial insurance pool balance is "10000" for all the markets + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | USD.0.10 | 100000000000 | + | aux1 | USD.0.10 | 10000000000 | + | aux2 | USD.0.10 | 10000000000 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR22 | 500000 | 0 | submission | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | lp1 | ETH/MAR23 | buy | 5 | 180 | 0 | TYPE_LIMIT | TIF_GTC | best-bid | + | lp1 | ETH/MAR23 | sell | 5 | 210 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | + And the parties place the following pegged iceberg orders: + | party | market id | side | volume | resulting trades | type | tif | peak size | minimum visible size | pegged reference | offset | + | lp1 | ETH/MAR23 | buy | 15 | 0 | TYPE_LIMIT | TIF_GTC | 1 | 1 | BID | 1 | + | lp1 | ETH/MAR23 | sell | 15 | 0 | TYPE_LIMIT | TIF_GTC | 1 | 1 | ASK | 1 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR23 | buy | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR23 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/MAR23" + + # atRiskPary opens a long position + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | atRiskParty | USD.0.10 | 1700 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR23 | sell | 100 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR23 | buy | 100 | 200 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 100 | 0 | 0 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR23 | 1412 | 1553 | 1694 | 1976 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | USD.0.10 | ETH/MAR23 | 1670 | 30 | + + # Market moves against atRiskParty whom is liquidated + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-bid | 180 | 0 | TIF_GTC | + | lp1 | best-ask | 220 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR23 | buy | 1 | 190 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR23 | sell | 1 | 190 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "190" for the market "ETH/MAR23" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -1700 | + | network | 100 | 0 | 0 | + + # Network disposes its position with trades outside price monitoring bouunds + Given the market data for the market "ETH/MAR23" should be: + | mark price | trading mode | horizon | min bound | max bound | + | 190 | TRADING_MODE_CONTINUOUS | 6200 | 186 | 214 | + When the network moves ahead "1" blocks + Then the following trades should be executed: + | buyer | price | size | seller | + | lp1 | 180 | 5 | network | + | lp1 | 179 | 5 | network | + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | network | 90 | 0 | -105 | + + + Scenario: Network does not consider volume outside liquidity range as avaliable to dispose against when calculating max consumption (0012-POSR-019)(0012-POSR-021)(0012-POSR-025) + # Orderbook setup such that LPs post a mix of limit orders within and outside liquidity range. Only the volume inside the liquidity price range should be considered. + + # Market configuiration + Given the liquidity sla params named "sla-params": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 0.11 | 0.6 | 1 | 1.0 | + When the markets are updated: + | id | linear slippage factor | quadratic slippage factor | sla params | + | ETH/MAR23 | 1e-3 | 0 | sla-params | + + # Setup the market + Given the initial insurance pool balance is "10000" for all the markets + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | USD.0.10 | 100000000000 | + | aux1 | USD.0.10 | 10000000000 | + | aux2 | USD.0.10 | 10000000000 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR23 | 500000 | 0 | submission | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | lp1 | ETH/MAR23 | buy | 10 | 180 | 0 | TYPE_LIMIT | TIF_GTC | best-bid | + | lp1 | ETH/MAR23 | sell | 10 | 210 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | + And the parties place the following pegged iceberg orders: + | party | market id | side | volume | resulting trades | type | tif | peak size | minimum visible size | pegged reference | offset | + | lp1 | ETH/MAR23 | buy | 10 | 0 | TYPE_LIMIT | TIF_GTC | 1 | 1 | BID | 10 | + | lp1 | ETH/MAR23 | sell | 10 | 0 | TYPE_LIMIT | TIF_GTC | 1 | 1 | ASK | 10 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR23 | buy | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR23 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/MAR23" + + # atRiskPary opens a long position + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | atRiskParty | USD.0.10 | 1700 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR23 | sell | 100 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR23 | buy | 100 | 200 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 100 | 0 | 0 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR23 | 1412 | 1553 | 1694 | 1976 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | USD.0.10 | ETH/MAR23 | 1670 | 30 | + + # Market moves against atRiskParty whom is liquidated + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-bid | 180 | 0 | TIF_GTC | + | lp1 | best-ask | 220 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR23 | buy | 1 | 190 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR23 | sell | 1 | 190 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "190" for the market "ETH/MAR23" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -1700 | + | network | 100 | 0 | 0 | + + # Network only able do dispose volume against orders inside liquidity range + Given the market data for the market "ETH/MAR23" should be: + | mark price | trading mode | static mid price | + | 190 | TRADING_MODE_CONTINUOUS | 200 | + When the network moves ahead "1" blocks + Then the following trades should be executed: + | buyer | price | size | seller | + | lp1 | 180 | 5 | network | + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | network | 95 | 0 | -50 | + + + Scenario: Volume on the book within liquidity price range but outside price monitoring bounds, network able to dispose position (0012-POSR-026)(0012-POSR-028) + + # Market configuiration + Given the liquidity sla params named "sla-params": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 100 | 0.6 | 1 | 1.0 | + When the markets are updated: + | id | linear slippage factor | quadratic slippage factor | sla params | + | ETH/MAR22 | 1e-3 | 0 | sla-params | + + # Setup the market + Given the initial insurance pool balance is "10000" for all the markets + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | USD.0.10 | 100000000000 | + | aux1 | USD.0.10 | 10000000000 | + | aux2 | USD.0.10 | 10000000000 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR22 | 500000 | 0 | submission | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | lp1 | ETH/MAR22 | buy | 1000 | 180 | 0 | TYPE_LIMIT | TIF_GTC | best-bid | + | lp1 | ETH/MAR22 | sell | 1000 | 210 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/MAR22" + + + # atRiskPary opens a long position + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | atRiskParty | USD.0.10 | 20 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR22 | buy | 1 | 200 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 1 | 0 | 0 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR22 | 15 | 16 | 18 | 21 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | USD.0.10 | ETH/MAR22 | 16 | 4 | + + # Market moves against atRiskParty whom is liquidated + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-bid | 180 | 0 | TIF_GTC | + | lp1 | best-ask | 220 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 190 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 190 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "190" for the market "ETH/MAR22" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -20 | + | network | 1 | 0 | 0 | + + # Network disposes its position with trades outside price monitoring bouunds + Given the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | horizon | min bound | max bound | + | 190 | TRADING_MODE_CONTINUOUS | 6200 | 186 | 214 | + When the network moves ahead "1" blocks + Then the following trades should be executed: + | buyer | price | size | seller | + | lp1 | 180 | 1 | network | + And the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | horizon | min bound | max bound | + | 190 | TRADING_MODE_CONTINUOUS | 6200 | 186 | 214 | + + + Scenario: Volume on the book outside liquidity price range, network unable to dispose position (0012-POSR-027) + + # Market configuiration + Given the liquidity sla params named "sla-params": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 0.05 | 0.6 | 1 | 1.0 | + When the markets are updated: + | id | linear slippage factor | quadratic slippage factor | sla params | + | ETH/MAR22 | 1e-3 | 0 | sla-params | + + # Setup the market + Given the initial insurance pool balance is "10000" for all the markets + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | USD.0.10 | 100000000000 | + | aux1 | USD.0.10 | 10000000000 | + | aux2 | USD.0.10 | 10000000000 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR22 | 500000 | 0 | submission | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | lp1 | ETH/MAR22 | buy | 1000 | 180 | 0 | TYPE_LIMIT | TIF_GTC | best-bid | + | lp1 | ETH/MAR22 | sell | 1000 | 210 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/MAR22" + + + # atRiskPary opens a long position + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | atRiskParty | USD.0.10 | 20 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR22 | buy | 1 | 200 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 1 | 0 | 0 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR22 | 15 | 16 | 18 | 21 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | USD.0.10 | ETH/MAR22 | 16 | 4 | + + # Market moves against atRiskParty whom is liquidated + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-bid | 180 | 0 | TIF_GTC | + | lp1 | best-ask | 220 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 190 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 190 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "190" for the market "ETH/MAR22" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -20 | + | network | 1 | 0 | 0 | + + # Network cannot disposes its position with trades outside liquidity price range + Given the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | static mid price | + | 190 | TRADING_MODE_CONTINUOUS | 200 | + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | network | 1 | 0 | 0 | \ No newline at end of file diff --git a/core/integration/features/verified/network_pnl.feature b/core/integration/features/verified/network_pnl.feature new file mode 100644 index 0000000000..f83815733c --- /dev/null +++ b/core/integration/features/verified/network_pnl.feature @@ -0,0 +1,338 @@ +Feature: Profit and loss for network a running liquidation strategy + + Background: + + # Configure the network + Given the average block duration is "1" + And the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the following assets are registered: + | id | decimal places | quantum | + | USD.0.1 | 0 | 1 | + + # Configure the markets + Given the liquidation strategies: + | name | disposal step | disposal fraction | full disposal size | max fraction consumed | + | liquidation-strat-1 | 3600 | 0.5 | 0 | 1 | + | liquidation-strat-2 | 5 | 0.5 | 0 | 1 | + + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | liquidation strategy | sla params | + | ETH/MAR22 | ETH | USD.0.10 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.001 | 0 | liquidation-strat-1 | default-basic | + | ETH/MAR23 | ETH | USD.0.10 | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.001 | 0 | liquidation-strat-2 | default-basic | + + + + @NetPNL + Scenario: Network long then liquidates short positions (0003-MTMK-015)(0012-POSR-016) + + # Setup the market + Given the initial insurance pool balance is "10000" for all the markets + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | USD.0.10 | 100000000000 | + | aux1 | USD.0.10 | 10000000000 | + | aux2 | USD.0.10 | 10000000000 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR22 | 500000 | 0 | submission | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | lp1 | ETH/MAR22 | buy | 1000 | 199 | 0 | TYPE_LIMIT | TIF_GTC | best-bid | + | lp1 | ETH/MAR22 | sell | 1000 | 201 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/MAR22" + Then the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | + | 200 | TRADING_MODE_CONTINUOUS | + + # atRiskPary opens a long position + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | atRiskParty | USD.0.10 | 100 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR22 | buy | 1 | 200 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 1 | 0 | 0 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR22 | 15 | 16 | 18 | 21 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | USD.0.10 | ETH/MAR22 | 16 | 84 | + + # Market moves against atRiskParty whom is liquidated + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-bid | 99 | 0 | TIF_GTC | + | lp1 | best-ask | 101 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 100 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "100" for the market "ETH/MAR22" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -100 | + | network | 1 | 0 | 0 | + And the insurance pool balance should be "10000" for the market "ETH/MAR22" + + # atRiskPary opens a short position + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | atRiskParty | USD.0.10 | 20 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 2 | 100 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR22 | sell | 2 | 100 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | -2 | 0 | -100 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR22 | 16 | 17 | 19 | 22 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | USD.0.10 | ETH/MAR22 | 18 | 2 | + + # Market moves against atRiskParty whom is liquidated + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-ask | 121 | 0 | TIF_GTC | + | lp1 | best-bid | 119 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 120 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 120 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "120" for the market "ETH/MAR22" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -140 | + | network | -1 | 0 | 20 | + And the insurance pool balance should be "10000" for the market "ETH/MAR22" + + # Market moves in favour of the network + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-bid | 59 | 0 | TIF_GTC | + | lp1 | best-ask | 61 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 60 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 60 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "60" for the market "ETH/MAR22" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -140 | + | network | -1 | 60 | 20 | + And the insurance pool balance should be "10060" for the market "ETH/MAR22" + + + @NetPNL + Scenario: Network long then liquidates further long positions (0003-MTMK-016)(0012-POSR-017) + + # Setup the market + Given the initial insurance pool balance is "10000" for all the markets + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | USD.0.10 | 100000000000 | + | aux1 | USD.0.10 | 10000000000 | + | aux2 | USD.0.10 | 10000000000 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR22 | 500000 | 0 | submission | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | lp1 | ETH/MAR22 | buy | 1000 | 199 | 0 | TYPE_LIMIT | TIF_GTC | best-bid | + | lp1 | ETH/MAR22 | sell | 1000 | 201 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/MAR22" + Then the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | + | 200 | TRADING_MODE_CONTINUOUS | + + # atRiskPary opens a long position + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | atRiskParty | USD.0.10 | 100 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR22 | buy | 1 | 200 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 1 | 0 | 0 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR22 | 15 | 16 | 18 | 21 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | USD.0.10 | ETH/MAR22 | 16 | 84 | + + # Market moves against atRiskParty whom is liquidated + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-bid | 99 | 0 | TIF_GTC | + | lp1 | best-ask | 101 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 100 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "100" for the market "ETH/MAR22" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -100 | + | network | 1 | 0 | 0 | + And the insurance pool balance should be "10000" for the market "ETH/MAR22" + + # atRiskPary opens a long position + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | atRiskParty | USD.0.10 | 10 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR22 | buy | 1 | 100 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 1 | 0 | -100 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR22 | 8 | 8 | 9 | 11 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | USD.0.10 | ETH/MAR22 | 8 | 2 | + + # Market moves against atRiskParty whom is liquidated + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-bid | 89 | 0 | TIF_GTC | + | lp1 | best-ask | 91 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 90 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 90 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "90" for the market "ETH/MAR22" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -110 | + | network | 2 | -10 | 0 | + And the insurance pool balance should be "9990" for the market "ETH/MAR22" + + # Market moves against the network + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-bid | 59 | 0 | TIF_GTC | + | lp1 | best-ask | 61 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 60 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 60 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "60" for the market "ETH/MAR22" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -110 | + | network | 2 | -70 | 0 | + And the insurance pool balance should be "9930" for the market "ETH/MAR22" + + @NetPNL + Scenario: Network disposes long position at a loss, loss socialisation applied (0003-MTMK-017)(0012-POSR-018) + + # Setup the market + Given the initial insurance pool balance is "0" for all the markets + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | USD.0.10 | 100000000000 | + | aux1 | USD.0.10 | 10000000000 | + | aux2 | USD.0.10 | 10000000000 | + | atRiskParty | USD.0.10 | 100 | + And the cumulated balance for all accounts should be worth "120000000100" + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR23 | 500000 | 0 | submission | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | lp1 | ETH/MAR23 | buy | 1000 | 199 | 0 | TYPE_LIMIT | TIF_GTC | best-bid | + | lp1 | ETH/MAR23 | sell | 1000 | 201 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR23 | buy | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR23 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/MAR23" + Then the market data for the market "ETH/MAR23" should be: + | mark price | trading mode | + | 200 | TRADING_MODE_CONTINUOUS | + + # atRiskPary opens a long position + Given the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR23 | sell | 2 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR23 | buy | 2 | 200 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 2 | 0 | 0 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR23 | 29 | 31 | 34 | 40 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | USD.0.10 | ETH/MAR23 | 33 | 67 | + + # Market moves against atRiskParty whom is liquidated + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-bid | 99 | 0 | TIF_GTC | + | lp1 | best-ask | 101 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR23 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR23 | sell | 1 | 100 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "100" for the market "ETH/MAR23" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -100 | + | network | 2 | 0 | 0 | + And the insurance pool balance should be "0" for the market "ETH/MAR23" + + # Network disposes position at a loss, the mark price is not updated, loss socialisation applied cumulated balances unchanged + Given the insurance pool balance should be "0" for the market "ETH/MAR23" + And the cumulated balance for all accounts should be worth "120000000100" + When the network moves ahead "5" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | network | 1 | 0 | -1 | + And the mark price should be "100" for the market "ETH/MAR23" + And the cumulated balance for all accounts should be worth "120000000100" + + # Network disposes position at a loss, the mark price is not updated, loss socialisation applied cumulated balances unchanged + Given the insurance pool balance should be "0" for the market "ETH/MAR23" + And the cumulated balance for all accounts should be worth "120000000100" + When the network moves ahead "5" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | network | 0 | 0 | -2 | + And the mark price should be "100" for the market "ETH/MAR23" + And the cumulated balance for all accounts should be worth "120000000100" + diff --git a/core/integration/features/verified/network_pnl_funding.feature b/core/integration/features/verified/network_pnl_funding.feature new file mode 100644 index 0000000000..1268913c3c --- /dev/null +++ b/core/integration/features/verified/network_pnl_funding.feature @@ -0,0 +1,289 @@ +Feature: Network profit and loss consideres funding + + Background: + + Given time is updated to "2020-10-16T00:00:00Z" + + # Configure the network + Given the following network parameters are set: + | name | value | + | network.markPriceUpdateMaximumFrequency | 0s | + And the following assets are registered: + | id | decimal places | + | ETH | 0 | + And the perpetual oracles from "0xCAFECAFE1": + | name | asset | settlement property | settlement type | schedule property | schedule type | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals | + | perp-oracle | ETH | perp.ETH.value | TYPE_INTEGER | perp.funding.cue | TYPE_TIMESTAMP | 0.9 | 0.1 | 0 | 0 | ETH | 0 | + Given the liquidation strategies: + | name | disposal step | disposal fraction | full disposal size | max fraction consumed | + | liquidation-strat-1 | 3600 | 0.5 | 0 | 1 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | liquidation strategy | sla params | market type | + | ETH/MAR22 | ETH | ETH | default-log-normal-risk-model | default-margin-calculator | 1 | default-none | default-none | perp-oracle | 0.001 | 0 | liquidation-strat-1 | default-basic | perp | + + + @Perpetual + @NetPNL + Scenario: Network has long position when funding rate negative, gains paid into market insurance pool (0053-PERP-037) + + # Setup the market + Given the initial insurance pool balance is "10000" for all the markets + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | ETH | 100000000000 | + | aux1 | ETH | 10000000000 | + | aux2 | ETH | 10000000000 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR22 | 500000 | 0 | submission | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | lp1 | ETH/MAR22 | buy | 1000 | 199 | 0 | TYPE_LIMIT | TIF_GTC | best-bid | + | lp1 | ETH/MAR22 | sell | 1000 | 201 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/MAR22" + Then the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | + | 200 | TRADING_MODE_CONTINUOUS | + + # atRiskPary opens a long position + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | atRiskParty | ETH | 100 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR22 | buy | 1 | 200 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 1 | 0 | 0 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR22 | 15 | 16 | 18 | 21 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | ETH | ETH/MAR22 | 16 | 84 | + + # Market moves against atRiskParty whom is liquidated + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-bid | 99 | 0 | TIF_GTC | + | lp1 | best-ask | 101 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 100 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "100" for the market "ETH/MAR22" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -100 | + | network | 1 | 0 | 0 | + And the insurance pool balance should be "10000" for the market "ETH/MAR22" + + # Start a new funding period + Given time is updated to "2020-10-16T00:05:00Z" + And the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.funding.cue | 1602806700 | 0s | + | perp.ETH.value | 101 | 1s | + + # Negative funding payment, shorts pay longs, gains paid into insurance pool + Given time is updated to "2020-10-16T00:10:00Z" + And the product data for the market "ETH/MAR22" should be: + | internal twap | external twap | funding payment | funding rate | + | 100 | 101 | -1 | -0.0099009900990099 | + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | network | 1 | 0 | 0 | + And the insurance pool balance should be "10000" for the market "ETH/MAR22" + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.funding.cue | 1602807000 | 0s | + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | network | 1 | 0 | 1 | + And the insurance pool balance should be "10001" for the market "ETH/MAR22" + + + @Perpetual + @NetPNL + Scenario: Network has long position when funding rate positive, losses paid from market insurance pool (0053-PERP-038) + + # Setup the market + Given the initial insurance pool balance is "10000" for all the markets + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | ETH | 100000000000 | + | aux1 | ETH | 10000000000 | + | aux2 | ETH | 10000000000 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR22 | 500000 | 0 | submission | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | lp1 | ETH/MAR22 | buy | 1000 | 199 | 0 | TYPE_LIMIT | TIF_GTC | best-bid | + | lp1 | ETH/MAR22 | sell | 1000 | 201 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/MAR22" + Then the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | + | 200 | TRADING_MODE_CONTINUOUS | + + # atRiskPary opens a long position + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | atRiskParty | ETH | 100 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR22 | buy | 1 | 200 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 1 | 0 | 0 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR22 | 15 | 16 | 18 | 21 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | ETH | ETH/MAR22 | 16 | 84 | + + # Market moves against atRiskParty whom is liquidated + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-bid | 99 | 0 | TIF_GTC | + | lp1 | best-ask | 101 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 100 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "100" for the market "ETH/MAR22" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -100 | + | network | 1 | 0 | 0 | + And the insurance pool balance should be "10000" for the market "ETH/MAR22" + + # Start a new funding period + Given time is updated to "2020-10-16T00:05:00Z" + And the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.funding.cue | 1602806700 | 0s | + | perp.ETH.value | 99 | 1s | + + # Positive funding payment, longs pay shorts, losses paid from insurance pool + Given time is updated to "2020-10-16T00:10:00Z" + And the product data for the market "ETH/MAR22" should be: + | internal twap | external twap | funding payment | funding rate | + | 100 | 99 | 1 | 0.0101010101010101 | + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | network | 1 | 0 | 0 | + And the insurance pool balance should be "10000" for the market "ETH/MAR22" + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.funding.cue | 1602807000 | 0s | + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | network | 1 | 0 | -1 | + And the insurance pool balance should be "9999" for the market "ETH/MAR22" + + + @Perpetual + @NetPNL + Scenario: If a market insurance pool does not have enough funds to cover a funding payment, loss socialisation occurs and the total balances across the network remains constant (0053-PERP-039) + + # Setup the market + And the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | ETH | 100000000000 | + | aux1 | ETH | 10000000000 | + | aux2 | ETH | 10000000000 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR22 | 500000 | 0 | submission | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | lp1 | ETH/MAR22 | buy | 1000 | 199 | 0 | TYPE_LIMIT | TIF_GTC | best-bid | + | lp1 | ETH/MAR22 | sell | 1000 | 201 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/MAR22" + Then the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | + | 200 | TRADING_MODE_CONTINUOUS | + + # atRiskPary opens a long position + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | atRiskParty | ETH | 100 | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | sell | 1 | 200 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR22 | buy | 1 | 200 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 1 | 0 | 0 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR22 | 15 | 16 | 18 | 21 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | ETH | ETH/MAR22 | 16 | 84 | + + # Market moves against atRiskParty whom is liquidated + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-bid | 99 | 0 | TIF_GTC | + | lp1 | best-ask | 101 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 100 | 1 | TYPE_LIMIT | TIF_GTC | + When the network moves ahead "1" blocks + Then the mark price should be "100" for the market "ETH/MAR22" + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | 0 | 0 | -100 | + | network | 1 | 0 | 0 | + And the insurance pool balance should be "0" for the market "ETH/MAR22" + + # Start a new funding period + Given time is updated to "2020-10-16T00:05:00Z" + And the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.funding.cue | 1602806700 | 0s | + | perp.ETH.value | 99 | 1s | + + # Positive funding payment, longs pay shorts, losses covered with loss socialisation + Given time is updated to "2020-10-16T00:10:00Z" + And the product data for the market "ETH/MAR22" should be: + | internal twap | external twap | funding payment | funding rate | + | 100 | 99 | 1 | 0.0101010101010101 | + And the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | network | 1 | 0 | 0 | + And the insurance pool balance should be "0" for the market "ETH/MAR22" + And the cumulated balance for all accounts should be worth "120000000100" + When the oracles broadcast data with block time signed with "0xCAFECAFE1": + | name | value | time offset | + | perp.funding.cue | 1602807000 | 0s | + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | network | 1 | 0 | -1 | + And the insurance pool balance should be "0" for the market "ETH/MAR22" + And the cumulated balance for all accounts should be worth "120000000100" + + diff --git a/core/integration/features/verified/network_position_disposal.feature b/core/integration/features/verified/network_position_disposal.feature new file mode 100644 index 0000000000..e58fca8c41 --- /dev/null +++ b/core/integration/features/verified/network_position_disposal.feature @@ -0,0 +1,248 @@ +Feature: Network disposing position + + Background: + + Given the average block duration is "1" + + Given the following network parameters are set: + | name | value | + | market.value.windowLength | 1h | + | network.markPriceUpdateMaximumFrequency | 0s | + And the following assets are registered: + | id | decimal places | quantum | + | USD.0.10 | 0 | 10 | + + Given the liquidation strategies: + | name | disposal step | disposal fraction | full disposal size | max fraction consumed | + | disposal-strat-1 | 5 | 0.2 | 0 | 0.1 | + | disposal-strat-2 | 5 | 0.2 | 5 | 0.1 | + + And the log normal risk model named "log-normal-risk-model-1": + | risk aversion | tau | mu | r | sigma | + | 0.000001 | 0.00000380258 | 0 | 0 | 1.5 | + And the price monitoring named "price-monitoring-1": + | horizon | probability | auction extension | + | 100000 | 0.99 | 3 | + And the liquidity sla params named "SLA": + | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | + | 1 | 0.85 | 1 | 0.5 | + And the markets: + | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | liquidation strategy | + | ETH/MAR22 | ETH | USD.0.10 | log-normal-risk-model-1 | default-margin-calculator | 1 | default-none | price-monitoring-1 | default-eth-for-future | 0.001 | 0 | SLA | disposal-strat-1 | + | ETH/MAR23 | ETH | USD.0.10 | log-normal-risk-model-1 | default-margin-calculator | 1 | default-none | price-monitoring-1 | default-eth-for-future | 0.001 | 0 | SLA | disposal-strat-2 | + + + Scenario: Network takes over distressed position and disposes position over time (0012-POSR-022)(0012-POSR-023) + + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | USD.0.10 | 100000000000 | + | aux1 | USD.0.10 | 10000000000 | + | aux2 | USD.0.10 | 10000000000 | + | atRiskParty | USD.0.10 | 180 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR22 | 500000 | 0 | submission | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | lp1 | ETH/MAR22 | buy | 1000 | 999 | 0 | TYPE_LIMIT | TIF_GTC | best-bid | + | lp1 | ETH/MAR22 | sell | 1000 | 1001 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/MAR22" + Then the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | + | 1000 | TRADING_MODE_CONTINUOUS | + + Given the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR22 | sell | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + Then the network moves ahead "1" blocks + + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | -10 | 0 | 0 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR22 | 156 | 171 | 187 | 218 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | USD.0.10 | ETH/MAR22 | 175 | 5 | + + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-ask | 1011 | 0 | TIF_GTC | + | lp1 | best-bid | 1009 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR22 | buy | 1 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR22 | sell | 1 | 1010 | 1 | TYPE_LIMIT | TIF_GTC | + Then the network moves ahead "1" blocks + Then the market data for the market "ETH/MAR22" should be: + | mark price | trading mode | + | 1010 | TRADING_MODE_CONTINUOUS | + Then debug trades + + Then the parties should have the following profit and loss: + | party | market id | volume | unrealised pnl | realised pnl | + | atRiskParty | ETH/MAR22 | 0 | 0 | -180 | + And the following network trades should be executed: + | party | aggressor side | volume | + | atRiskParty | sell | 10 | + And clear trade events + + # Position size is 10, next disposal should be ceil(10*0.2)=ceil(2)=2 + Then the network moves ahead "5" blocks + And the following network trades should be executed: + | party | aggressor side | volume | + | lp1 | buy | 2 | + Then debug trades + And clear trade events + + # Position size is 8, next disposal should be ceil(8*0.2)=ceil(1.6)=2 + Then the network moves ahead "5" blocks + Then debug trades + And the following network trades should be executed: + | party | aggressor side | volume | + | lp1 | buy | 2 | + And clear trade events + + # Position size is 6, next disposal should be ceil(6*0.2)=ceil(1.4)=2 + Then the network moves ahead "5" blocks + Then debug trades + And the following network trades should be executed: + | party | aggressor side | volume | + | lp1 | buy | 2 | + And clear trade events + + # Position size is 4, next disposal should be ceil(10*0.2)=ceil(2)=2 + Then the network moves ahead "5" blocks + And the following network trades should be executed: + | party | aggressor side | volume | + | lp1 | buy | 1 | + And clear trade events + + # Position size is 3, next disposal should be ceil(10*0.2)=ceil(2)=2 + Then the network moves ahead "5" blocks + And the following network trades should be executed: + | party | aggressor side | volume | + | lp1 | buy | 1 | + And clear trade events + + # Position size is 2, next disposal should be ceil(10*0.2)=ceil(2)=2 + Then the network moves ahead "5" blocks + And the following network trades should be executed: + | party | aggressor side | volume | + | lp1 | buy | 1 | + And clear trade events + + # Position size is 1, next disposal should be ceil(10*0.2)=ceil(2)=2 + Then the network moves ahead "5" blocks + And the following network trades should be executed: + | party | aggressor side | volume | + | lp1 | buy | 1 | + And clear trade events + + + Scenario: Network takes over distressed position and disposes position full position once position smaller than full disposal size (0012-POSR-022)(0012-POSR-024) + + Given the parties deposit on asset's general account the following amount: + | party | asset | amount | + | lp1 | USD.0.10 | 100000000000 | + | aux1 | USD.0.10 | 10000000000 | + | aux2 | USD.0.10 | 10000000000 | + | atRiskParty | USD.0.10 | 180 | + And the parties submit the following liquidity provision: + | id | party | market id | commitment amount | fee | lp type | + | lp1 | lp1 | ETH/MAR23 | 500000 | 0 | submission | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | reference | + | lp1 | ETH/MAR23 | buy | 1000 | 999 | 0 | TYPE_LIMIT | TIF_GTC | best-bid | + | lp1 | ETH/MAR23 | sell | 1000 | 1001 | 0 | TYPE_LIMIT | TIF_GTC | best-ask | + When the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR23 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR23 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + And the opening auction period ends for market "ETH/MAR23" + Then the market data for the market "ETH/MAR23" should be: + | mark price | trading mode | + | 1000 | TRADING_MODE_CONTINUOUS | + + Given the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR23 | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | + | atRiskParty | ETH/MAR23 | sell | 10 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | + Then the network moves ahead "1" blocks + + Then the parties should have the following profit and loss: + | party | volume | unrealised pnl | realised pnl | + | atRiskParty | -10 | 0 | 0 | + And the parties should have the following margin levels: + | party | market id | maintenance | search | initial | release | + | atRiskParty | ETH/MAR23 | 156 | 171 | 187 | 218 | + And the parties should have the following account balances: + | party | asset | market id | margin | general | + | atRiskParty | USD.0.10 | ETH/MAR23 | 175 | 5 | + + Given the parties amend the following orders: + | party | reference | price | size delta | tif | + | lp1 | best-ask | 1011 | 0 | TIF_GTC | + | lp1 | best-bid | 1009 | 0 | TIF_GTC | + And the parties place the following orders: + | party | market id | side | volume | price | resulting trades | type | tif | + | aux1 | ETH/MAR23 | buy | 1 | 1010 | 0 | TYPE_LIMIT | TIF_GTC | + | aux2 | ETH/MAR23 | sell | 1 | 1010 | 1 | TYPE_LIMIT | TIF_GTC | + Then the network moves ahead "1" blocks + Then the market data for the market "ETH/MAR23" should be: + | mark price | trading mode | + | 1010 | TRADING_MODE_CONTINUOUS | + Then debug trades + + Then the parties should have the following profit and loss: + | party | market id | volume | unrealised pnl | realised pnl | + | atRiskParty | ETH/MAR23 | 0 | 0 | -180 | + And the following network trades should be executed: + | party | aggressor side | volume | + | atRiskParty | sell | 10 | + And clear trade events + + # Position size is 10, next disposal should be ceil(10*0.2)=ceil(2)=2 + Then the network moves ahead "5" blocks + And the following network trades should be executed: + | party | aggressor side | volume | + | lp1 | buy | 2 | + Then debug trades + And clear trade events + + # Position size is 8, next disposal should be ceil(8*0.2)=ceil(1.6)=2 + Then the network moves ahead "5" blocks + Then debug trades + And the following network trades should be executed: + | party | aggressor side | volume | + | lp1 | buy | 2 | + And clear trade events + + # Position size is 6, next disposal should be ceil(6*0.2)=ceil(1.4)=2 + Then the network moves ahead "5" blocks + Then debug trades + And the following network trades should be executed: + | party | aggressor side | volume | + | lp1 | buy | 2 | + And clear trade events + + # Position size is 4, next disposal should be ceil(10*0.2)=ceil(2)=2 + Then the network moves ahead "5" blocks + And the following network trades should be executed: + | party | aggressor side | volume | + | lp1 | buy | 4 | + And clear trade events + + + + + + + diff --git a/core/integration/features/verified/verified-positions-resolution-1.feature b/core/integration/features/verified/verified-positions-resolution-1.feature index 2cc11552b2..26e6eac22b 100644 --- a/core/integration/features/verified/verified-positions-resolution-1.feature +++ b/core/integration/features/verified/verified-positions-resolution-1.feature @@ -2,7 +2,7 @@ Feature: Position resolution case 1 Background: - And the oracle spec for settlement data filtering data from "0xCAFECAFE1" named "ethDec21Oracle": + Given the oracle spec for settlement data filtering data from "0xCAFECAFE1" named "ethDec21Oracle": | property | type | binding | | prices.BTC.value | TYPE_INTEGER | settlement data | And the oracle spec for trading termination filtering data from "0xCAFECAFE1" named "ethDec21Oracle": @@ -16,6 +16,7 @@ Feature: Position resolution case 1 | market.auction.minimumDuration | 1 | | network.markPriceUpdateMaximumFrequency | 0s | + @Liquidation @LiquidationCurrent Scenario: close out when there is not enough orders on the orderbook to cover the position (0007-POSN-009, 0008-TRAD-001, 0008-TRAD-002, 0008-TRAD-005) # setup accounts Given the parties deposit on asset's general account the following amount: @@ -47,29 +48,26 @@ Feature: Position resolution case 1 When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | designatedLooser | ETH/DEC19 | buy | 290 | 150 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | + And the network moves ahead "1" blocks # margin level: vol* slippage = vol * (MarkPrice-ExitPrice) =290 * (150-(1*10+140*1)/11) = 290*137 = 39700 Then the parties should have the following account balances: | party | asset | market id | margin | general | - | designatedLooser | BTC | ETH/DEC19 | 11600 | 0 | + | designatedLooser | BTC | ETH/DEC19 | 0 | 0 | And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | designatedLooser | ETH/DEC19 | 39781 | 127299 | 159124 | 198905 | + | designatedLooser | ETH/DEC19 | 0 | 0 | 0 | 0 | Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | - | designatedLooser | 290 | 0 | 0 | + | designatedLooser | 0 | 0 | -11600 | | sellSideProvider | -290 | 0 | 0 | - | buySideProvider | 0 | 0 | 0 | - | aux | 1 | 0 | 0 | + | buySideProvider | 1 | 10 | 0 | + | aux | 11 | 1490 | 0 | | aux2 | -1 | 0 | 0 | - # insurance pool generation - modify order book - Then the parties cancel the following orders: - | party | reference | - | buySideProvider | buy-provider-1 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | buySideProvider | ETH/DEC19 | buy | 1 | 40 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | @@ -82,33 +80,33 @@ Feature: Position resolution case 1 # MTM (designatedLooser): 11600-(290*(150-120))=11600-8700=2900 Then the parties should have the following account balances: - | party | asset | market id | margin | general | - | designatedLooser | BTC | ETH/DEC19 | 2900 | 0 | - | sellSideProvider | BTC | ETH/DEC19 | 127740 | 999999880960 | - | buySideProvider | BTC | ETH/DEC19 | 320 | 999999999680 | - | aux | BTC | ETH/DEC19 | 320 | 999999999650 | - | aux2 | BTC | ETH/DEC19 | 440 | 999999999590 | + | party | asset | market id | margin | general | + | designatedLooser | BTC | ETH/DEC19 | 0 | 0 | + | sellSideProvider | BTC | ETH/DEC19 | 127740 | 999999880960 | + | buySideProvider | BTC | ETH/DEC19 | 1320 | 999999998740 | + | aux | BTC | ETH/DEC19 | 5706 | 999999995454 | + | aux2 | BTC | ETH/DEC19 | 440 | 999999999590 | # margin level: vol* slippage = vol * (MarkPrice-ExitPrice) =290 * (120-(1*10+40*1)/11) = 290*116 = 33640 And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | designatedLooser | ETH/DEC19 | 31825 | 101840 | 127300 | 159125 | + | designatedLooser | ETH/DEC19 | 0 | 0 | 0 | 0 | # check positions Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | - | designatedLooser | 290 | -8700 | 0 | + | designatedLooser | 0 | 0 | -11600 | | sellSideProvider | -291 | 8700 | 0 | - | buySideProvider | 1 | 0 | 0 | - | aux | 1 | -30 | 0 | + | buySideProvider | 3 | 60 | 0 | + | aux | 11 | 1160 | 0 | | aux2 | -1 | 30 | 0 | # checking margins Then the parties should have the following account balances: | party | asset | market id | margin | general | - | designatedLooser | BTC | ETH/DEC19 | 2900 | 0 | + | designatedLooser | BTC | ETH/DEC19 | 0 | 0 | - And the insurance pool balance should be "0" for the market "ETH/DEC19" + And the insurance pool balance should be "1650" for the market "ETH/DEC19" When the oracles broadcast data signed with "0xCAFECAFE1": | name | value | @@ -123,10 +121,12 @@ Feature: Position resolution case 1 And then the network moves ahead "10" blocks + #Then debug all events as JSON file "all_evts.json" Then the parties should have the following profit and loss: | party | volume | realised pnl | unrealised pnl | - | designatedLooser | 290 | -8700 | 0 | + | designatedLooser | 0 | -11600 | 0 | | sellSideProvider | -291 | 8700 | 0 | - | buySideProvider | 1 | 0 | 0 | - | aux | 1 | -30 | 0 | + | buySideProvider | 3 | 60 | 0 | + | aux | 11 | 1160 | 0 | | aux2 | -1 | 30 | 0 | + | network | 278 | -9950 | 0 | diff --git a/core/integration/features/verified/verified-positions-resolution-2.feature b/core/integration/features/verified/verified-positions-resolution-2.feature index dfe0dcb8cf..4fc0477b35 100644 --- a/core/integration/features/verified/verified-positions-resolution-2.feature +++ b/core/integration/features/verified/verified-positions-resolution-2.feature @@ -9,6 +9,7 @@ Feature: Position resolution case 2 | market.auction.minimumDuration | 1 | | network.markPriceUpdateMaximumFrequency | 0s | + @Liquidation @NoPerp Scenario: close out when there is not enough orders on the orderbook to cover the position (0008-TRAD-003, 0008-TRAD-004) # setup accounts Given the parties deposit on asset's general account the following amount: @@ -45,16 +46,12 @@ Feature: Position resolution case 2 Then the parties should have the following account balances: | party | asset | market id | margin | general | - | designatedLooser | BTC | ETH/DEC19 | 12000 | 0 | + | designatedLooser | BTC | ETH/DEC19 | 0 | 0 | And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | designatedLooser | ETH/DEC19 | 23273 | 74473 | 93092 | 116365 | + | designatedLooser | ETH/DEC19 | 0 | 0 | 0 | 0 | - # insurance pool generation - modify order book - Then the parties cancel the following orders: - | party | reference | - | buySideProvider | buy-provider-1 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | @@ -63,7 +60,7 @@ Feature: Position resolution case 2 # check the party accounts Then the parties should have the following account balances: | party | asset | market id | margin | general | - | designatedLooser | BTC | ETH/DEC19 | 12000 | 0 | + | designatedLooser | BTC | ETH/DEC19 | 0 | 0 | # insurance pool generation - set new mark price (and trigger closeout) When the parties place the following orders with ticks: @@ -76,22 +73,22 @@ Feature: Position resolution case 2 Then the parties should have the following account balances: | party | asset | market id | margin | general | - | designatedLooser | BTC | ETH/DEC19 | 3300 | 0 | + | designatedLooser | BTC | ETH/DEC19 | 0 | 0 | And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | designatedLooser | ETH/DEC19 | 18618 | 59577 | 74472 | 93090 | + | designatedLooser | ETH/DEC19 | 0 | 0 | 0 | 0 | # check positions Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | - | designatedLooser | 290 | -8700 | 0 | + | designatedLooser | 0 | 0 | -12000 | # checking margins Then the parties should have the following account balances: | party | asset | market id | margin | general | - | designatedLooser | BTC | ETH/DEC19 | 3300 | 0 | + | designatedLooser | BTC | ETH/DEC19 | 0 | 0 | # then we make sure the insurance pool collected the funds - And the insurance pool balance should be "0" for the market "ETH/DEC19" + And the insurance pool balance should be "3121" for the market "ETH/DEC19" diff --git a/core/integration/features/verified/verified-positions-resolution-3.feature b/core/integration/features/verified/verified-positions-resolution-3.feature index cfaae1e55c..ab26c4a39b 100644 --- a/core/integration/features/verified/verified-positions-resolution-3.feature +++ b/core/integration/features/verified/verified-positions-resolution-3.feature @@ -9,6 +9,7 @@ Feature: Position resolution case 3 | market.auction.minimumDuration | 1 | | network.markPriceUpdateMaximumFrequency | 0s | + @Liquidation @NoPerp Scenario: close out when there is enough orders on the orderbook to cover the position (0008-TRAD-002,0008-TRAD-003, 0008-TRAD-006) # setup accounts Given the parties deposit on asset's general account the following amount: @@ -38,20 +39,16 @@ Feature: Position resolution case 3 And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | designatedLooser | ETH/DEC19 | 23269 | 74460 | 93076 | 116345 | + | designatedLooser | ETH/DEC19 | 0 | 0 | 0 | 0 | Then the parties should have the following account balances: | party | asset | market id | margin | general | - | designatedLooser | BTC | ETH/DEC19 | 12000 | 0 | + | designatedLooser | BTC | ETH/DEC19 | 0 | 0 | Then the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | - | designatedLooser | ETH/DEC19 | 23269 | 74460 | 93076 | 116345 | + | designatedLooser | ETH/DEC19 | 0 | 0 | 0 | 0 | - # insurance pool generation - modify order book - Then the parties cancel the following orders: - | party | reference | - | buySideProvider | buy-provider-1 | When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | | buySideProvider | ETH/DEC19 | buy | 300 | 40 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-2 | @@ -59,13 +56,13 @@ Feature: Position resolution case 3 # check the party accounts Then the parties should have the following account balances: | party | asset | market id | margin | general | - | designatedLooser | BTC | ETH/DEC19 | 12000 | 0 | + | designatedLooser | BTC | ETH/DEC19 | 0 | 0 | # insurance pool generation - set new mark price (and trigger closeout) When the parties place the following orders with ticks: | party | market id | side | volume | price | resulting trades | type | tif | reference | - | sellSideProvider | ETH/DEC19 | sell | 1 | 120 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | | buySideProvider | ETH/DEC19 | buy | 1 | 120 | 0 | TYPE_LIMIT | TIF_GTC | ref-2 | + | sellSideProvider | ETH/DEC19 | sell | 1 | 120 | 1 | TYPE_LIMIT | TIF_GTC | ref-1 | # check positions Then the parties should have the following profit and loss: @@ -77,7 +74,8 @@ Feature: Position resolution case 3 | party | asset | market id | margin | general | | designatedLooser | BTC | ETH/DEC19 | 0 | 0 | - # then we make sure the insurance pool collected the funds + #And debug transfers + # Insurance pool collected 12000 which was then paid out in MTM settlements And the insurance pool balance should be "0" for the market "ETH/DEC19" diff --git a/core/integration/features/verified/verified-positions-resolution-4.feature b/core/integration/features/verified/verified-positions-resolution-4.feature index d19cea9714..8f9650ae14 100644 --- a/core/integration/features/verified/verified-positions-resolution-4.feature +++ b/core/integration/features/verified/verified-positions-resolution-4.feature @@ -9,6 +9,7 @@ Feature: Position resolution case 4 | market.auction.minimumDuration | 1 | | network.markPriceUpdateMaximumFrequency | 0s | + @Liquidation Scenario: close out when there is enough orders on the orderbook to cover the position (0008-TRAD-006, 0008-TRAD-007)) # setup accounts Given the parties deposit on asset's general account the following amount: diff --git a/core/integration/features/zero-position.feature b/core/integration/features/zero-position.feature index 5f5e734d02..48c676be27 100644 --- a/core/integration/features/zero-position.feature +++ b/core/integration/features/zero-position.feature @@ -21,7 +21,7 @@ Feature: Closeout scenarios | network.markPriceUpdateMaximumFrequency | 0s | | limits.markets.maxPeggedOrders | 2 | - @ZeroPos + @ZeroPos @Liquidation @NoPerp Scenario: 001, 2 parties get close-out at the same time. Distressed position gets taken over by LP, distressed order gets canceled (0005-COLL-002; 0012-POSR-001; 0012-POSR-002; 0012-POSR-004; 0012-POSR-005; 0007-POSN-015) # setup accounts, we are trying to closeout trader3 first and then trader2 @@ -128,7 +128,7 @@ Feature: Closeout scenarios And the order book should have the following volumes for market "ETH/DEC19": | side | price | volume | - | buy | 5 | 5 | + | buy | 5 | 0 | | buy | 45 | 0 | | buy | 50 | 0 | | buy | 100 | 0 | @@ -137,21 +137,21 @@ Feature: Closeout scenarios # #trader3 is closed out, trader2 has no more open orders as they got cancelled after becoming distressed And the parties should have the following margin levels: - | party | market id | maintenance | search | initial | release | - | trader2 | ETH/DEC19 | 0 | 0 | 0 | 0 | - | trader3 | ETH/DEC19 | 11000000801 | 16500001201 | 22000001602 | 33000002403 | + | party | market id | maintenance | search | initial | release | + | trader2 | ETH/DEC19 | 0 | 0 | 0 | 0 | + | trader3 | ETH/DEC19 | 0 | 0 | 0 | 0 | # trader3 can not be closed-out because there is not enough vol on the order book And the parties should have the following account balances: | party | asset | market id | margin | general | | trader2 | USD | ETH/DEC19 | 0 | 2000 | - | trader3 | USD | ETH/DEC19 | 162 | 0 | + | trader3 | USD | ETH/DEC19 | 0 | 0 | Then the parties should have the following profit and loss: | party | volume | unrealised pnl | realised pnl | status | | trader2 | 0 | 0 | 0 | POSITION_STATUS_ORDERS_CLOSED | - | trader3 | 10 | 0 | 0 | | + | trader3 | 0 | 0 | -162 | POSITION_STATUS_CLOSED_OUT | | auxiliary1 | -10 | -900 | 0 | | - | auxiliary2 | 0 | 0 | 900 | | + | auxiliary2 | 5 | 475 | 586 | | And the insurance pool balance should be "0" for the market "ETH/DEC19" When the parties place the following orders: | party | market id | side | price | volume | resulting trades | type | tif | reference | @@ -165,8 +165,8 @@ Feature: Closeout scenarios Then the network moves ahead "4" blocks And the order book should have the following volumes for market "ETH/DEC19": | side | price | volume | - | buy | 1 | 10 | - | buy | 5 | 5 | + | buy | 1 | 5 | + | buy | 5 | 0 | | buy | 45 | 0 | | buy | 50 | 0 | | buy | 100 | 0 | @@ -176,11 +176,11 @@ Feature: Closeout scenarios And the parties should have the following margin levels: | party | market id | maintenance | search | initial | release | | trader2 | ETH/DEC19 | 0 | 0 | 0 | 0 | - | trader3 | ETH/DEC19 | 1771 | 2656 | 3542 | 5313 | + | trader3 | ETH/DEC19 | 0 | 0 | 0 | 0 | And the parties should have the following account balances: | party | asset | market id | margin | general | | trader2 | USD | ETH/DEC19 | 0 | 2000 | - | trader3 | USD | ETH/DEC19 | 162 | 0 | + | trader3 | USD | ETH/DEC19 | 0 | 0 | @ZeroMargin diff --git a/core/integration/main_test.go b/core/integration/main_test.go index db9c198d02..441b68f6b5 100644 --- a/core/integration/main_test.go +++ b/core/integration/main_test.go @@ -155,6 +155,9 @@ func InitializeScenario(s *godog.ScenarioContext) { s.Step(`^the perpetual oracles from "([^"]+)":`, func(signers string, table *godog.Table) error { return steps.ThePerpsOracleSpec(marketConfig, signers, table) }) + s.Step(`^the composite price oracles from "([^"]+)":`, func(signers string, table *godog.Table) error { + return steps.TheCompositePriceOracleSpec(marketConfig, signers, table) + }) s.Step(`the price monitoring named "([^"]*)":$`, func(name string, table *godog.Table) error { return steps.ThePriceMonitoring(marketConfig, name, table) }) @@ -167,6 +170,10 @@ func InitializeScenario(s *godog.ScenarioContext) { s.Step(`the margin calculator named "([^"]*)":$`, func(name string, table *godog.Table) error { return steps.TheMarginCalculator(marketConfig, name, table) }) + s.Step(`^the parties submit update margin mode:$`, func(table *godog.Table) error { + return steps.ThePartiesUpdateMarginMode(execsetup.executionEngine, table) + }) + s.Step(`^the markets:$`, func(table *godog.Table) error { markets, err := steps.TheMarkets(marketConfig, execsetup.executionEngine, execsetup.collateralEngine, execsetup.netParams, execsetup.timeService.GetTimeNow(), table) execsetup.markets = markets @@ -221,6 +228,10 @@ func InitializeScenario(s *godog.ScenarioContext) { return nil }) + s.Step(`^the mark price algo should be "([^"]+)" for the market "([^"]+)"$`, func(mpAlgo, marketID string) error { + return steps.TheMarkPriceAlgoShouldBeForMarket(execsetup.broker, marketID, mpAlgo) + }) + s.Step(`^the last market state should be "([^"]+)" for the market "([^"]+)"$`, func(mState, marketID string) error { return steps.TheLastStateUpdateShouldBeForMarket(execsetup.broker, marketID, mState) }) @@ -312,6 +323,9 @@ func InitializeScenario(s *godog.ScenarioContext) { s.Step(`^the parties submit the following transfer cancellations:$`, func(table *godog.Table) error { return steps.PartiesCancelTransfers(execsetup.banking, table) }) + s.Step(`^the parties have the following transfer fee discounts`, func(table *godog.Table) error { + return steps.PartiesAvailableFeeDiscounts(execsetup.banking, table) + }) s.Step(`^the parties submit the following delegations:$`, func(table *godog.Table) error { return steps.PartiesDelegateTheFollowingStake(execsetup.delegationEngine, table) }) @@ -491,6 +505,9 @@ func InitializeScenario(s *godog.ScenarioContext) { s.Step(`^the market data for the market "([^"]+)" should be:$`, func(marketID string, table *godog.Table) error { return steps.TheMarketDataShouldBe(execsetup.executionEngine, marketID, table) }) + s.Step(`^the product data for the market "([^"]+)" should be:$`, func(marketID string, table *godog.Table) error { + return steps.TheProductDataShouldBe(execsetup.executionEngine, marketID, table) + }) s.Step(`the auction ends with a traded volume of "([^"]+)" at a price of "([^"]+)"`, func(vol, price string) error { now := execsetup.timeService.GetTimeNow() return steps.TheAuctionTradedVolumeAndPriceShouldBe(execsetup.broker, vol, price, now) @@ -565,6 +582,9 @@ func InitializeScenario(s *godog.ScenarioContext) { steps.DebugAllEvents(execsetup.broker, execsetup.log) return nil }) + s.Step(`^debug all events as JSON file "([^"]+)"$`, func(fname string) error { + return steps.DebugAllEventsJSONFile(execsetup.broker, execsetup.log, fname) + }) s.Step(`^debug auction events$`, func() error { steps.DebugAuctionEvents(execsetup.broker, execsetup.log) return nil @@ -617,11 +637,20 @@ func InitializeScenario(s *godog.ScenarioContext) { s.Step(`^a total of "([0-9]+)" events should be emitted$`, func(eventCounter int) error { return steps.TotalOfEventsShouldBeEmitted(execsetup.broker, eventCounter) }) + s.Step(`^the loss socialisation amounts are:$`, func(table *godog.Table) error { + return steps.TheLossSocialisationAmountsAre(execsetup.broker, table) + }) + s.Step(`^debug loss socialisation events$`, func() error { + return steps.DebugLossSocialisationEvents(execsetup.broker, execsetup.log) + }) // Decimal places steps s.Step(`^the following assets are registered:$`, func(table *godog.Table) error { return steps.RegisterAsset(table, execsetup.assetsEngine, execsetup.collateralEngine) }) + s.Step(`^the following assets are updated:$`, func(table *godog.Table) error { + return steps.UpdateAsset(table, execsetup.assetsEngine, execsetup.collateralEngine) + }) s.Step(`^set assets to strict$`, func() error { execsetup.assetsEngine.SetStrict() return nil @@ -658,6 +687,14 @@ func InitializeScenario(s *godog.ScenarioContext) { s.Step(`^create the network treasury account for asset "([^"]*)"$`, func(asset string) error { return steps.CreateNetworkTreasuryAccount(execsetup.collateralEngine, asset) }) + + s.Step(`the liquidation strategies:$`, func(table *godog.Table) error { + return steps.TheLiquidationStrategies(marketConfig, table) + }) + + s.Step(`^clear trade events$`, func() error { + return steps.ClearTradeEvents(execsetup.broker) + }) } func reconcileAccounts() error { diff --git a/core/integration/setup_test.go b/core/integration/setup_test.go index f79b58f935..733096dc2a 100644 --- a/core/integration/setup_test.go +++ b/core/integration/setup_test.go @@ -23,28 +23,28 @@ import ( "code.vegaprotocol.io/vega/core/activitystreak" "code.vegaprotocol.io/vega/core/banking" "code.vegaprotocol.io/vega/core/collateral" + "code.vegaprotocol.io/vega/core/datasource/spec" "code.vegaprotocol.io/vega/core/delegation" "code.vegaprotocol.io/vega/core/epochtime" "code.vegaprotocol.io/vega/core/evtforward" "code.vegaprotocol.io/vega/core/execution" "code.vegaprotocol.io/vega/core/execution/common" + "code.vegaprotocol.io/vega/core/integration/helpers" + "code.vegaprotocol.io/vega/core/integration/steps/market" referralcfg "code.vegaprotocol.io/vega/core/integration/steps/referral" + "code.vegaprotocol.io/vega/core/integration/stubs" + "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/notary" + "code.vegaprotocol.io/vega/core/parties" + "code.vegaprotocol.io/vega/core/plugins" "code.vegaprotocol.io/vega/core/referral" "code.vegaprotocol.io/vega/core/rewards" "code.vegaprotocol.io/vega/core/teams" + "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/core/validators" "code.vegaprotocol.io/vega/core/vesting" "code.vegaprotocol.io/vega/core/volumediscount" "code.vegaprotocol.io/vega/libs/num" - - "code.vegaprotocol.io/vega/core/datasource/spec" - "code.vegaprotocol.io/vega/core/integration/helpers" - "code.vegaprotocol.io/vega/core/integration/steps/market" - "code.vegaprotocol.io/vega/core/integration/stubs" - "code.vegaprotocol.io/vega/core/netparams" - "code.vegaprotocol.io/vega/core/plugins" - "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/logging" protos "code.vegaprotocol.io/vega/protos/vega" @@ -120,6 +120,7 @@ type executionTestSetup struct { stateVarEngine *stubs.StateVarStub witness *validators.Witness teamsEngine *teams.Engine + profilesEngine *parties.Engine referralProgram *referral.Engine activityStreak *activitystreak.Engine vesting *vesting.Engine @@ -173,6 +174,7 @@ func newExecutionTestSetup() *executionTestSetup { execsetup.epochEngine.NotifyOnEpoch(execsetup.stakingAccount.OnEpochEvent, execsetup.stakingAccount.OnEpochRestore) execsetup.teamsEngine = teams.NewEngine(execsetup.broker, execsetup.timeService) + execsetup.profilesEngine = parties.NewEngine(execsetup.broker) execsetup.stateVarEngine = stubs.NewStateVar() marketActivityTracker := common.NewMarketActivityTracker(execsetup.log, execsetup.teamsEngine, execsetup.stakingAccount) @@ -187,6 +189,8 @@ func newExecutionTestSetup() *executionTestSetup { execsetup.volumeDiscountProgram = volumediscount.New(execsetup.broker, marketActivityTracker) execsetup.epochEngine.NotifyOnEpoch(execsetup.volumeDiscountProgram.OnEpoch, execsetup.volumeDiscountProgram.OnEpochRestore) + execsetup.banking = banking.New(execsetup.log, banking.NewDefaultConfig(), execsetup.collateralEngine, execsetup.witness, execsetup.timeService, execsetup.assetsEngine, execsetup.notary, execsetup.broker, execsetup.topology, marketActivityTracker, stubs.NewBridgeViewStub(), eventForwarder) + execsetup.executionEngine = newExEng( execution.NewEngine( execsetup.log, @@ -200,13 +204,13 @@ func newExecutionTestSetup() *executionTestSetup { execsetup.assetsEngine, // assets execsetup.referralProgram, execsetup.volumeDiscountProgram, + execsetup.banking, ), execsetup.broker, ) execsetup.epochEngine.NotifyOnEpoch(execsetup.executionEngine.OnEpochEvent, execsetup.executionEngine.OnEpochRestore) execsetup.epochEngine.NotifyOnEpoch(marketActivityTracker.OnEpochEvent, marketActivityTracker.OnEpochRestore) - - execsetup.banking = banking.New(execsetup.log, banking.NewDefaultConfig(), execsetup.collateralEngine, execsetup.witness, execsetup.timeService, execsetup.assetsEngine, execsetup.notary, execsetup.broker, execsetup.topology, execsetup.epochEngine, marketActivityTracker, stubs.NewBridgeViewStub(), eventForwarder) + execsetup.epochEngine.NotifyOnEpoch(execsetup.banking.OnEpoch, execsetup.banking.OnEpochRestore) execsetup.delegationEngine = delegation.New(execsetup.log, delegation.NewDefaultConfig(), execsetup.broker, execsetup.topology, execsetup.stakingAccount, execsetup.epochEngine, execsetup.timeService) @@ -414,6 +418,18 @@ func (e *executionTestSetup) registerNetParamsCallbacks() error { Param: netparams.TransferMinTransferQuantumMultiple, Watcher: execsetup.banking.OnMinTransferQuantumMultiple, }, + netparams.WatchParam{ + Param: netparams.TransferFeeMaxQuantumAmount, + Watcher: execsetup.banking.OnMaxQuantumAmountUpdate, + }, + netparams.WatchParam{ + Param: netparams.TransferFeeDiscountDecayFraction, + Watcher: execsetup.banking.OnTransferFeeDiscountDecayFractionUpdate, + }, + netparams.WatchParam{ + Param: netparams.TransferFeeDiscountMinimumTrackedAmount, + Watcher: execsetup.banking.OnTransferFeeDiscountMinimumTrackedAmountUpdate, + }, netparams.WatchParam{ Param: netparams.MaxPeggedOrders, Watcher: execsetup.executionEngine.OnMaxPeggedOrderUpdate, @@ -422,6 +438,10 @@ func (e *executionTestSetup) registerNetParamsCallbacks() error { Param: netparams.MarkPriceUpdateMaximumFrequency, Watcher: execsetup.executionEngine.OnMarkPriceUpdateMaximumFrequency, }, + netparams.WatchParam{ + Param: netparams.InternalCompositePriceUpdateFrequency, + Watcher: execsetup.executionEngine.OnInternalCompositePriceUpdateFrequency, + }, netparams.WatchParam{ Param: netparams.SpamProtectionMaxStopOrdersPerMarket, Watcher: execsetup.executionEngine.OnMarketPartiesMaximumStopOrdersUpdate, diff --git a/core/integration/steps/assets.go b/core/integration/steps/assets.go index f13b5f8e78..8b756cce7f 100644 --- a/core/integration/steps/assets.go +++ b/core/integration/steps/assets.go @@ -28,6 +28,33 @@ import ( "github.com/cucumber/godog" ) +func UpdateAsset(tbl *godog.Table, asset *stubs.AssetStub, col *collateral.Engine) error { + rows := parseAssetsTable(tbl) + for _, row := range rows { + aRow := assetRow{row: row} + aid := row.MustStr("id") + asset.Register( + aid, + row.MustU64("decimal places"), + aRow.maybeQuantum(), + ) + err := col.PropagateAssetUpdate(context.Background(), types.Asset{ + ID: aid, + Details: &types.AssetDetails{ + Quantum: aRow.quantum(), + Symbol: aid, + }, + }) + if err != nil { + if err == collateral.ErrAssetHasNotBeenEnabled { + return fmt.Errorf("asset %q has not been enabled", aid) + } + return fmt.Errorf("couldn't enable asset %q: %w", aid, err) + } + } + return nil +} + func RegisterAsset(tbl *godog.Table, asset *stubs.AssetStub, col *collateral.Engine) error { rows := parseAssetsTable(tbl) for _, row := range rows { @@ -49,7 +76,7 @@ func RegisterAsset(tbl *godog.Table, asset *stubs.AssetStub, col *collateral.Eng if err == collateral.ErrAssetAlreadyEnabled { return fmt.Errorf("asset %s was already enabled, perhaps when defining markets, order of steps should be swapped", aid) } - return fmt.Errorf("couldn't enable asset(%s): %v", aid, err) + return fmt.Errorf("couldn't enable asset %q: %w", aid, err) } } return nil diff --git a/core/integration/steps/clear_events.go b/core/integration/steps/clear_events.go index 7c3f088ef6..2665465515 100644 --- a/core/integration/steps/clear_events.go +++ b/core/integration/steps/clear_events.go @@ -24,3 +24,8 @@ func ClearAllEvents(broker *stubs.BrokerStub) { func ClearTransferResponseEvents(broker *stubs.BrokerStub) { broker.ClearTransferResponseEvents() } + +func ClearTradeEvents(broker *stubs.BrokerStub) error { + broker.ClearTradeEvents() + return nil +} diff --git a/core/integration/steps/debug_all_events.go b/core/integration/steps/debug_all_events.go index 2591e336d4..111dda7710 100644 --- a/core/integration/steps/debug_all_events.go +++ b/core/integration/steps/debug_all_events.go @@ -16,8 +16,12 @@ package steps import ( + "os" + "code.vegaprotocol.io/vega/core/integration/stubs" "code.vegaprotocol.io/vega/logging" + + "github.com/golang/protobuf/jsonpb" ) func DebugAllEvents(broker *stubs.BrokerStub, log *logging.Logger) { @@ -35,3 +39,31 @@ func DebugLastNEvents(n int, broker *stubs.BrokerStub, log *logging.Logger) { log.Info(data[i].Type().String()) } } + +func DebugAllEventsJSONFile(broker *stubs.BrokerStub, log *logging.Logger, fname string) error { + of, err := os.Create(fname) + if err != nil { + log.Error("Failed to create file", logging.Error(err)) + return err + } + + defer func() { _ = of.Close() }() + marshaler := jsonpb.Marshaler{ + EnumsAsInts: false, + } + data := broker.GetAllEventsSinceCleared() + for _, a := range data { + evt := a.StreamMessage() + s, err := marshaler.MarshalToString(evt) + if err != nil { + log.Errorf("FAILED TO MARSHAL %#v", evt) + continue + } + if _, err := of.WriteString(s + "\n"); err != nil { + log.Errorf("Failed to write '%s': %v", s, err) + } + } + + log.Infof("EVENTS WRITTEN TO FILE %s", fname) + return nil +} diff --git a/core/integration/steps/errors.go b/core/integration/steps/errors.go index 319b7df0e3..15b749f2b9 100644 --- a/core/integration/steps/errors.go +++ b/core/integration/steps/errors.go @@ -24,6 +24,8 @@ import ( "code.vegaprotocol.io/vega/logging" types "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "golang.org/x/exp/maps" ) type ErroneousRow interface { @@ -51,8 +53,8 @@ func DebugLPSTxErrors(broker *stubs.BrokerStub, log *logging.Logger) { } // checkExpectedError checks if expected error has been returned, -// if no expecteation has been set a regular error check is carried out, -// unexpectedErrDetail is an optional parameter that can be used to return a more detailed error when an unexpected error is encoutered. +// if no expectation has been set a regular error check is carried out, +// unexpectedErrDetail is an optional parameter that can be used to return a more detailed error when an unexpected error is encountered. func checkExpectedError(row ErroneousRow, returnedErr, unexpectedErrDetail error) error { if row.ExpectError() && returnedErr == nil { return fmt.Errorf("action on %q should have fail", row.Reference()) @@ -83,19 +85,32 @@ func checkExpectedError(row ErroneousRow, returnedErr, unexpectedErrDetail error func formatDiff(msg string, expected, got map[string]string) error { var expectedStr strings.Builder var gotStr strings.Builder - formatStr := "\n\t%s\t(%s)" + padding := findLongestKeyLen(expected) + 1 + formatStr := "\n\t\t%-*s(%s)" for name, value := range expected { - _, _ = fmt.Fprintf(&expectedStr, formatStr, name, value) - _, _ = fmt.Fprintf(&gotStr, formatStr, name, got[name]) + _, _ = fmt.Fprintf(&expectedStr, formatStr, padding, name, value) + _, _ = fmt.Fprintf(&gotStr, formatStr, padding, name, got[name]) } - return fmt.Errorf("\n%s\nexpected:%s\ngot:%s", + return fmt.Errorf("%s\n\texpected:%s\n\tgot:%s", msg, expectedStr.String(), gotStr.String(), ) } +func findLongestKeyLen(expected map[string]string) int { + keys := maps.Keys(expected) + maxLen := 0 + for i := range keys { + iLen := len(keys[i]) + if iLen > maxLen { + maxLen = iLen + } + } + return maxLen +} + func u64ToS(n uint64) string { return strconv.FormatUint(n, 10) } diff --git a/core/integration/steps/execution.go b/core/integration/steps/execution.go index 465b37ca52..cf7634d9cc 100644 --- a/core/integration/steps/execution.go +++ b/core/integration/steps/execution.go @@ -20,6 +20,7 @@ import ( "time" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" ) // the interface for execution engine. The execution engine itself will be wrapped @@ -52,4 +53,5 @@ type Execution interface { ProcessBatch(ctx context.Context, party string) error OnEpochEvent(ctx context.Context, epoch types.Epoch) UpdateMarketState(ctx context.Context, changes *types.MarketStateUpdateConfiguration) error + UpdateMarginMode(ctx context.Context, party, marketID string, marginMode types.MarginMode, marginFactor num.Decimal) error } diff --git a/core/integration/steps/market/defaults/fees-config/default-none.json b/core/integration/steps/market/defaults/fees-config/default-none.json index c44f6c9e48..013a8e8741 100644 --- a/core/integration/steps/market/defaults/fees-config/default-none.json +++ b/core/integration/steps/market/defaults/fees-config/default-none.json @@ -3,5 +3,8 @@ "infrastructureFee": "0.0", "makerFee": "0.0", "liquidityFee": "0.0" + }, + "liquidityFeeSettings": { + "method": "METHOD_MARGINAL_COST" } } diff --git a/core/integration/steps/market/defaults/liquidation-config/AC-013-strat.json b/core/integration/steps/market/defaults/liquidation-config/AC-013-strat.json new file mode 100644 index 0000000000..bf1aa2d901 --- /dev/null +++ b/core/integration/steps/market/defaults/liquidation-config/AC-013-strat.json @@ -0,0 +1,6 @@ +{ + "disposal_time_step": 10, + "disposal_fraction": "0.5", + "full_disposal_size": 50, + "max_fraction_consumed": "0.01" +} diff --git a/core/integration/steps/market/defaults/liquidation-config/default-liquidation-strat.json b/core/integration/steps/market/defaults/liquidation-config/default-liquidation-strat.json new file mode 100644 index 0000000000..f3479abb0d --- /dev/null +++ b/core/integration/steps/market/defaults/liquidation-config/default-liquidation-strat.json @@ -0,0 +1,6 @@ +{ + "disposal_time_step": 10, + "disposal_fraction": "0.1", + "full_disposal_size": 20, + "max_fraction_consumed": "0.05" +} diff --git a/core/integration/steps/market/defaults/liquidation-config/legacy-liquidation-strategy.json b/core/integration/steps/market/defaults/liquidation-config/legacy-liquidation-strategy.json new file mode 100644 index 0000000000..d1e1b7ff1a --- /dev/null +++ b/core/integration/steps/market/defaults/liquidation-config/legacy-liquidation-strategy.json @@ -0,0 +1,6 @@ +{ + "disposal_time_step": 0, + "disposal_fraction": "1", + "full_disposal_size": 18446744073709551615, + "max_fraction_consumed": "1" +} diff --git a/core/integration/steps/market/defaults/liquidation-config/slow-liquidation-strat.json b/core/integration/steps/market/defaults/liquidation-config/slow-liquidation-strat.json new file mode 100644 index 0000000000..ca90c3c07e --- /dev/null +++ b/core/integration/steps/market/defaults/liquidation-config/slow-liquidation-strat.json @@ -0,0 +1,7 @@ +{ + "disposal_time_step": 100, + "disposal_fraction": "0.2", + "full_disposal_size": 1, + "max_fraction_consumed": "0.2" +} + diff --git a/core/integration/steps/market/defaults/unmarshaler.go b/core/integration/steps/market/defaults/unmarshaler.go index f3e7a1e4d3..99ffb8b9cd 100644 --- a/core/integration/steps/market/defaults/unmarshaler.go +++ b/core/integration/steps/market/defaults/unmarshaler.go @@ -18,9 +18,9 @@ package defaults import ( "io" - "github.com/golang/protobuf/jsonpb" - vegapb "code.vegaprotocol.io/vega/protos/vega" + + "github.com/golang/protobuf/jsonpb" ) type Unmarshaler struct { @@ -104,3 +104,11 @@ func (u *Unmarshaler) UnmarshalFeesConfig(r io.Reader) (*vegapb.Fees, error) { } return proto, nil } + +func (u *Unmarshaler) UnmarshalLiquidationConfig(r io.Reader) (*vegapb.LiquidationStrategy, error) { + proto := &vegapb.LiquidationStrategy{} + if err := u.unmarshaler.Unmarshal(r, proto); err != nil { + return nil, err + } + return proto, nil +} diff --git a/core/integration/steps/market/liquidation_strats.go b/core/integration/steps/market/liquidation_strats.go new file mode 100644 index 0000000000..ffcb143620 --- /dev/null +++ b/core/integration/steps/market/liquidation_strats.go @@ -0,0 +1,85 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package market + +import ( + "embed" + "fmt" + + "code.vegaprotocol.io/vega/core/integration/steps/helpers" + "code.vegaprotocol.io/vega/core/integration/steps/market/defaults" + types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/jinzhu/copier" +) + +var ( + //go:embed defaults/liquidation-config/*.json + defaultLiquidationConfigs embed.FS + defaultLiquidationConfigFileNames = []string{ + "defaults/liquidation-config/legacy-liquidation-strategy.json", + "defaults/liquidation-config/default-liquidation-strat.json", + "defaults/liquidation-config/slow-liquidation-strat.json", + "defaults/liquidation-config/AC-013-strat.json", + } + + defaultStrat = "legacy-liquidation-strategy" +) + +type liquidationConfig struct { + config map[string]*types.LiquidationStrategy +} + +func newLiquidationConfig(unmarshaler *defaults.Unmarshaler) *liquidationConfig { + config := &liquidationConfig{ + config: map[string]*types.LiquidationStrategy{}, + } + + contentReaders := helpers.ReadAll(defaultLiquidationConfigs, defaultLiquidationConfigFileNames) + for name, contentReader := range contentReaders { + liquidationConfig, err := unmarshaler.UnmarshalLiquidationConfig(contentReader) + if err != nil { + panic(fmt.Errorf("couldn't unmarshal default liquidation config %s: %v", name, err)) + } + if err := config.Add(name, liquidationConfig); err != nil { + panic(fmt.Errorf("failed to add default liquidation config %s: %v", name, err)) + } + } + + return config +} + +func (f *liquidationConfig) Add(name string, strategy *types.LiquidationStrategy) error { + f.config[name] = strategy + return nil +} + +func (f *liquidationConfig) Get(name string) (*types.LiquidationStrategy, error) { + if name == "" { + // for now, default to the legacy strategy + name = defaultStrat + } + strategy, ok := f.config[name] + if !ok { + return strategy, fmt.Errorf("no liquidation configuration \"%s\" registered", name) + } + // Copy to avoid modification between tests. + copyConfig := &types.LiquidationStrategy{} + if err := copier.Copy(copyConfig, strategy); err != nil { + panic(fmt.Errorf("failed to deep copy liquidation config: %v", err)) + } + return copyConfig, nil +} diff --git a/core/integration/steps/market/liquidity_monitoring.go b/core/integration/steps/market/liquidity_monitoring.go index 6fd90502bf..f3e9bd9986 100644 --- a/core/integration/steps/market/liquidity_monitoring.go +++ b/core/integration/steps/market/liquidity_monitoring.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/integration/steps/market/defaults" "code.vegaprotocol.io/vega/core/types" vegapb "code.vegaprotocol.io/vega/protos/vega" + "github.com/jinzhu/copier" ) diff --git a/core/integration/steps/market/margin_calculators.go b/core/integration/steps/market/margin_calculators.go index 9c3ee720ff..e29e49dd11 100644 --- a/core/integration/steps/market/margin_calculators.go +++ b/core/integration/steps/market/margin_calculators.go @@ -20,10 +20,10 @@ import ( "fmt" "code.vegaprotocol.io/vega/core/integration/steps/helpers" - "github.com/jinzhu/copier" - "code.vegaprotocol.io/vega/core/integration/steps/market/defaults" types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/jinzhu/copier" ) var ( diff --git a/core/integration/steps/market/market_config.go b/core/integration/steps/market/market_config.go index 5f39320287..6e8d0bb80f 100644 --- a/core/integration/steps/market/market_config.go +++ b/core/integration/steps/market/market_config.go @@ -28,6 +28,7 @@ type Config struct { MarginCalculators *marginCalculators LiquidityMonitoring *liquidityMonitoring LiquiditySLAParams *slaParams + LiquidationStrat *liquidationConfig } type SuccessorConfig struct { @@ -41,6 +42,7 @@ type SuccessorConfig struct { PriceRange num.Decimal LinSlip num.Decimal QuadSlip num.Decimal + LiquidationStrat *liquidationConfig } func NewMarketConfig() *Config { @@ -53,6 +55,7 @@ func NewMarketConfig() *Config { MarginCalculators: newMarginCalculators(unmarshaler), LiquidityMonitoring: newLiquidityMonitoring(unmarshaler), LiquiditySLAParams: newLiquiditySLAParams(unmarshaler), + LiquidationStrat: newLiquidationConfig(unmarshaler), } } @@ -67,5 +70,6 @@ func NewSuccessorConfig() *SuccessorConfig { PriceRange: zero, LinSlip: zero, QuadSlip: zero, + LiquidationStrat: newLiquidationConfig(u), } } diff --git a/core/integration/steps/market/oracle_configs.go b/core/integration/steps/market/oracle_configs.go index 6987933797..dad1c03a23 100644 --- a/core/integration/steps/market/oracle_configs.go +++ b/core/integration/steps/market/oracle_configs.go @@ -21,10 +21,10 @@ import ( "fmt" "code.vegaprotocol.io/vega/core/integration/steps/helpers" - "github.com/jinzhu/copier" - "code.vegaprotocol.io/vega/core/integration/steps/market/defaults" vegapb "code.vegaprotocol.io/vega/protos/vega" + + "github.com/jinzhu/copier" ) var ( @@ -62,11 +62,12 @@ type BindType interface { } type oracleConfigs struct { - futures *oConfig[*vegapb.DataSourceSpecToFutureBinding] - perps *oConfig[*vegapb.DataSourceSpecToPerpetualBinding] - fullPerps map[string]*vegapb.Perpetual - fullFutures map[string]*vegapb.Future - perpSwap bool + futures *oConfig[*vegapb.DataSourceSpecToFutureBinding] + perps *oConfig[*vegapb.DataSourceSpecToPerpetualBinding] + fullPerps map[string]*vegapb.Perpetual + fullFutures map[string]*vegapb.Future + perpSwap bool + compositePriceOracles map[string]CompositePriceOracleConfig } type oConfig[T BindType] struct { @@ -81,12 +82,18 @@ type OracleConfig[T BindType] struct { Binding T } +type CompositePriceOracleConfig struct { + Spec *vegapb.OracleSpec + Binding *vegapb.SpecBindingForCompositePrice +} + func newOracleSpecs(unmarshaler *defaults.Unmarshaler) *oracleConfigs { configs := &oracleConfigs{ - futures: newOConfig[*vegapb.DataSourceSpecToFutureBinding](), - perps: newOConfig[*vegapb.DataSourceSpecToPerpetualBinding](), - fullPerps: map[string]*vegapb.Perpetual{}, - fullFutures: map[string]*vegapb.Future{}, + futures: newOConfig[*vegapb.DataSourceSpecToFutureBinding](), + perps: newOConfig[*vegapb.DataSourceSpecToPerpetualBinding](), + fullPerps: map[string]*vegapb.Perpetual{}, + fullFutures: map[string]*vegapb.Future{}, + compositePriceOracles: map[string]CompositePriceOracleConfig{}, } configs.futureOracleSpecs(unmarshaler) configs.perpetualOracleSpecs(unmarshaler) @@ -179,6 +186,17 @@ func (c *oracleConfigs) AddFuture(name string, future *vegapb.Future) error { return nil } +func (c *oracleConfigs) AddCompositePriceOracle(name string, spec *vegapb.DataSourceSpec, binding *vegapb.SpecBindingForCompositePrice) { + c.compositePriceOracles[name] = CompositePriceOracleConfig{ + Spec: &vegapb.OracleSpec{ + ExternalDataSourceSpec: &vegapb.ExternalDataSourceSpec{ + Spec: spec, + }, + }, + Binding: binding, + } +} + func (c *oracleConfigs) AddPerp(name string, perp *vegapb.Perpetual) error { if err := c.perps.Add(name, "settlement data", perp.DataSourceSpecForSettlementData, perp.DataSourceSpecBinding); err != nil { return err @@ -265,6 +283,14 @@ func (c *oracleConfigs) GetFullInstrument(name string) (*vegapb.Instrument, erro return nil, fmt.Errorf("no products with name %s found", name) } +func (c *oracleConfigs) GetOracleDefinitionForCompositePrice(name string) (*vegapb.OracleSpec, *vegapb.SpecBindingForCompositePrice, error) { + if oc, found := c.compositePriceOracles[name]; !found { + return nil, nil, fmt.Errorf("oracle config for composite price not found") + } else { + return oc.Spec, oc.Binding, nil + } +} + func (c *oracleConfigs) GetFuture(name, specType string) (*OracleConfig[*vegapb.DataSourceSpecToFutureBinding], error) { return c.futures.Get(name, specType) } diff --git a/core/integration/steps/market/price_monitoring.go b/core/integration/steps/market/price_monitoring.go index bc2de1da46..1b7b73be9e 100644 --- a/core/integration/steps/market/price_monitoring.go +++ b/core/integration/steps/market/price_monitoring.go @@ -20,10 +20,10 @@ import ( "fmt" "code.vegaprotocol.io/vega/core/integration/steps/helpers" - "github.com/jinzhu/copier" - "code.vegaprotocol.io/vega/core/integration/steps/market/defaults" types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/jinzhu/copier" ) var ( diff --git a/core/integration/steps/market/risk_models.go b/core/integration/steps/market/risk_models.go index d50e4efd9a..f0884dcac2 100644 --- a/core/integration/steps/market/risk_models.go +++ b/core/integration/steps/market/risk_models.go @@ -20,10 +20,10 @@ import ( "fmt" "code.vegaprotocol.io/vega/core/integration/steps/helpers" - "github.com/jinzhu/copier" - "code.vegaprotocol.io/vega/core/integration/steps/market/defaults" vegapb "code.vegaprotocol.io/vega/protos/vega" + + "github.com/jinzhu/copier" ) var ( diff --git a/core/integration/steps/market/sla_params.go b/core/integration/steps/market/sla_params.go index 0ee63aac70..c8e8e43fc1 100644 --- a/core/integration/steps/market/sla_params.go +++ b/core/integration/steps/market/sla_params.go @@ -20,10 +20,10 @@ import ( "fmt" "code.vegaprotocol.io/vega/core/integration/steps/helpers" - "github.com/jinzhu/copier" - "code.vegaprotocol.io/vega/core/integration/steps/market/defaults" types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/jinzhu/copier" ) var ( diff --git a/core/integration/steps/network_params.go b/core/integration/steps/network_params.go index 154fa7685f..2385b6c477 100644 --- a/core/integration/steps/network_params.go +++ b/core/integration/steps/network_params.go @@ -19,10 +19,10 @@ import ( "context" "fmt" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/logging" + + "github.com/cucumber/godog" ) var unwatched = map[string]struct{}{} @@ -52,7 +52,7 @@ func TheFollowingNetworkParametersAreSet(netParams *netparams.Store, table *godo return err } case netparams.MarketAuctionMaximumDuration: - d := row.MustDurationSec("value") + d := row.MustDurationStr("value") if err := netParams.Update(ctx, netparams.MarketAuctionMaximumDuration, d.String()); err != nil { return err } @@ -62,6 +62,12 @@ func TheFollowingNetworkParametersAreSet(netParams *netparams.Store, table *godo if err := netParams.Update(ctx, netparams.MarkPriceUpdateMaximumFrequency, str); err != nil { return err } + case netparams.InternalCompositePriceUpdateFrequency: + f := row.MustDurationStr("value") + str := f.String() + if err := netParams.Update(ctx, netparams.InternalCompositePriceUpdateFrequency, str); err != nil { + return err + } default: value := row.MustStr("value") if err := netParams.Update(ctx, name, value); err != nil { diff --git a/core/integration/steps/oracles_broadcast_data_signed_with_keys.go b/core/integration/steps/oracles_broadcast_data_signed_with_keys.go index 4dad67432e..083c040bfb 100644 --- a/core/integration/steps/oracles_broadcast_data_signed_with_keys.go +++ b/core/integration/steps/oracles_broadcast_data_signed_with_keys.go @@ -20,12 +20,12 @@ import ( "fmt" "time" - "github.com/cucumber/godog" - dstypes "code.vegaprotocol.io/vega/core/datasource/common" "code.vegaprotocol.io/vega/core/datasource/spec" "code.vegaprotocol.io/vega/core/integration/stubs" vgcontext "code.vegaprotocol.io/vega/libs/context" + + "github.com/cucumber/godog" ) func OraclesBroadcastDataSignedWithKeys( diff --git a/core/integration/steps/parties_amend_the_following_orders.go b/core/integration/steps/parties_amend_the_following_orders.go index 7590320dc1..f42c0d336b 100644 --- a/core/integration/steps/parties_amend_the_following_orders.go +++ b/core/integration/steps/parties_amend_the_following_orders.go @@ -19,11 +19,11 @@ import ( "context" "fmt" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/stubs" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + + "github.com/cucumber/godog" ) type OrderAmendmentError struct { @@ -50,18 +50,14 @@ func PartiesAmendTheFollowingOrders( } amend := types.OrderAmendment{ - OrderID: o.Id, - MarketID: o.MarketId, - SizeDelta: row.SizeDelta(), - TimeInForce: row.TimeInForce(), - } - - if p := row.Price(); p != nil { - amend.Price = p - } - - if t := row.ExpirationDate(); t != nil { - amend.ExpiresAt = t + OrderID: o.Id, + MarketID: o.MarketId, + Price: row.Price(), + SizeDelta: row.SizeDelta(), + Size: row.Size(), + ExpiresAt: row.ExpirationDate(), + TimeInForce: row.TimeInForce(), + PeggedOffset: row.PeggedOffset(), } _, err = exec.AmendOrder(context.Background(), &amend, o.PartyId) @@ -81,12 +77,14 @@ func parseAmendOrderTable(table *godog.Table) []RowWrapper { return StrictParseTable(table, []string{ "party", "reference", - "price", - "size delta", "tif", }, []string{ + "price", + "size delta", + "size", "error", "expiration date", + "pegged offset", }) } @@ -103,9 +101,16 @@ func (r amendOrderRow) Price() *num.Uint { } func (r amendOrderRow) SizeDelta() int64 { + if !r.row.HasColumn("size delta") { + return 0 + } return r.row.MustI64("size delta") } +func (r amendOrderRow) Size() *uint64 { + return r.row.MaybeU64("size") +} + func (r amendOrderRow) TimeInForce() types.OrderTimeInForce { return r.row.MustTIF("tif") } @@ -130,3 +135,7 @@ func (r amendOrderRow) Error() string { func (r amendOrderRow) ExpectError() bool { return r.row.HasColumn("error") } + +func (r amendOrderRow) PeggedOffset() *num.Uint { + return r.row.MaybeUint("pegged offset") +} diff --git a/core/integration/steps/parties_amend_the_following_pegged_iceberg_orders.go b/core/integration/steps/parties_amend_the_following_pegged_iceberg_orders.go index 8cf5ddf38f..89a80532b5 100644 --- a/core/integration/steps/parties_amend_the_following_pegged_iceberg_orders.go +++ b/core/integration/steps/parties_amend_the_following_pegged_iceberg_orders.go @@ -45,10 +45,7 @@ func PartiesAmendTheFollowingPeggedIcebergOrders( if row.HasTimeInForce() { tif = row.TimeInForce() } - var offset *num.Uint - if row.HasOffset() { - offset = row.Offset() - } + var pegRef types.PeggedReference if row.HasPeggedReference() { pegRef = row.PeggedReference() @@ -58,9 +55,10 @@ func PartiesAmendTheFollowingPeggedIcebergOrders( OrderID: o.Id, MarketID: o.MarketId, SizeDelta: row.SizeDelta(), - TimeInForce: tif, + Size: row.Size(), ExpiresAt: row.ExpirationDate(now), - PeggedOffset: offset, + TimeInForce: tif, + PeggedOffset: row.Offset(), PeggedReference: pegRef, } @@ -76,10 +74,11 @@ func parseAmendPeggedIcebergOrderTable(table *godog.Table) []RowWrapper { return StrictParseTable(table, []string{ "party", "reference", - "size delta", }, []string{ "pegged reference", "offset", + "size delta", + "size", "tif", "error", "expires in", @@ -95,9 +94,16 @@ func (r amendPeggedIcebergOrderRow) Party() string { } func (r amendPeggedIcebergOrderRow) SizeDelta() int64 { + if !r.row.HasColumn("size delta") { + return 0 + } return r.row.MustI64("size delta") } +func (r amendPeggedIcebergOrderRow) Size() *uint64 { + return r.row.MaybeU64("size") +} + func (r amendPeggedIcebergOrderRow) HasTimeInForce() bool { return r.row.HasColumn("tif") } @@ -140,5 +146,5 @@ func (r amendPeggedIcebergOrderRow) HasOffset() bool { } func (r amendPeggedIcebergOrderRow) Offset() *num.Uint { - return r.row.Uint("offset") + return r.row.MaybeUint("offset") } diff --git a/core/integration/steps/parties_apply_the_following_referral_codes.go b/core/integration/steps/parties_apply_the_following_referral_codes.go index 86ec24a516..189e51d55d 100644 --- a/core/integration/steps/parties_apply_the_following_referral_codes.go +++ b/core/integration/steps/parties_apply_the_following_referral_codes.go @@ -21,9 +21,9 @@ import ( "code.vegaprotocol.io/vega/core/referral" "code.vegaprotocol.io/vega/core/teams" "code.vegaprotocol.io/vega/core/types" - "github.com/cucumber/godog" - commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "github.com/cucumber/godog" ) func PartiesApplyTheFollowingReferralCode(referralEngine *referral.Engine, teamsEngine *teams.Engine, table *godog.Table) error { @@ -32,19 +32,24 @@ func PartiesApplyTheFollowingReferralCode(referralEngine *referral.Engine, teams for _, r := range parseApplyReferralCodeTable(table) { row := newApplyReferralCodeRow(r) err := referralEngine.ApplyReferralCode(ctx, row.Party(), row.Code()) - if err := checkExpectedError(row, err, nil); err != nil { - return err + if checkErr := checkExpectedError(row, err, nil); checkErr != nil { + if !row.IsTeam() { + return checkErr + } + err = checkErr } // If we have team details, submit a new team if row.IsTeam() { - team := &commandspb.ApplyReferralCode{ + team := &commandspb.JoinTeam{ Id: row.Team(), } - err = teamsEngine.JoinTeam(ctx, row.Party(), team) - if err != nil { - return err + if joinErr := teamsEngine.JoinTeam(ctx, row.Party(), team); joinErr != nil { + err = checkExpectedError(row, joinErr, nil) } } + if err != nil { + return err + } } return nil } diff --git a/core/integration/steps/parties_create_the_following_referral_codes.go b/core/integration/steps/parties_create_the_following_referral_codes.go index 4d1140a782..b43c41b67b 100644 --- a/core/integration/steps/parties_create_the_following_referral_codes.go +++ b/core/integration/steps/parties_create_the_following_referral_codes.go @@ -21,9 +21,9 @@ import ( "code.vegaprotocol.io/vega/core/referral" "code.vegaprotocol.io/vega/core/teams" "code.vegaprotocol.io/vega/core/types" - "github.com/cucumber/godog" - commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "github.com/cucumber/godog" ) func PartiesCreateTheFollowingReferralCode(referralEngine *referral.Engine, teamsEngine *teams.Engine, table *godog.Table) error { @@ -38,7 +38,9 @@ func PartiesCreateTheFollowingReferralCode(referralEngine *referral.Engine, team if row.IsTeam() { team := &commandspb.CreateReferralSet_Team{ - Name: row.Team(), + Name: row.Team(), + Closed: row.Closed(), + AllowList: row.AllowList(), } err = teamsEngine.CreateTeam(ctx, row.Party(), types.TeamID(row.Team()), team) @@ -59,6 +61,8 @@ func parseCreateReferralCodeTable(table *godog.Table) []RowWrapper { "team", "error", "reference", + "closed", + "allow list", }) } @@ -103,3 +107,17 @@ func (r createReferralCodeRow) IsTeam() bool { func (r createReferralCodeRow) Team() string { return r.row.Str("team") } + +func (r createReferralCodeRow) AllowList() []string { + if !r.row.HasColumn("allow list") { + return nil + } + return r.row.MustStrSlice("allow list", ",") +} + +func (r createReferralCodeRow) Closed() bool { + if !r.row.HasColumn("closed") { + return false + } + return r.row.MustBool("closed") +} diff --git a/core/integration/steps/parties_delegate_the_following_stake.go b/core/integration/steps/parties_delegate_the_following_stake.go index adba5a6918..f9db71cde0 100644 --- a/core/integration/steps/parties_delegate_the_following_stake.go +++ b/core/integration/steps/parties_delegate_the_following_stake.go @@ -18,10 +18,10 @@ package steps import ( "context" + "code.vegaprotocol.io/vega/core/delegation" "code.vegaprotocol.io/vega/libs/num" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/delegation" + "github.com/cucumber/godog" ) func PartiesDelegateTheFollowingStake( diff --git a/core/integration/steps/parties_deposit_assets.go b/core/integration/steps/parties_deposit_assets.go index 27ec4b26ed..0a8c1bc1a5 100644 --- a/core/integration/steps/parties_deposit_assets.go +++ b/core/integration/steps/parties_deposit_assets.go @@ -19,13 +19,13 @@ import ( "context" "fmt" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/collateral" "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/integration/stubs" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + + "github.com/cucumber/godog" ) func PartiesDepositTheFollowingAssets( diff --git a/core/integration/steps/parties_place_the_following_orders.go b/core/integration/steps/parties_place_the_following_orders.go index fb16654bb6..2782f52fd4 100644 --- a/core/integration/steps/parties_place_the_following_orders.go +++ b/core/integration/steps/parties_place_the_following_orders.go @@ -22,13 +22,13 @@ import ( "strconv" "time" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/helpers" "code.vegaprotocol.io/vega/core/integration/stubs" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" + + "github.com/cucumber/godog" ) type Only string @@ -45,6 +45,8 @@ var onlyTypes = map[string]Only{ "reduce": Reduce, } +var refToOrderId = map[string]string{} + func PartiesPlaceTheFollowingOrdersWithTicks(exec Execution, time *stubs.TimeStub, epochService EpochService, table *godog.Table) error { // ensure time is set + idgen is not nil now := time.GetTimeNow() @@ -244,6 +246,12 @@ func PartiesPlaceTheFollowingOrders( if resp == nil { continue } + + // If we have a reference, add a reference -> orderID lookup + if len(resp.Order.Reference) > 0 { + refToOrderId[resp.Order.Reference] = resp.Order.ID + } + actualTradeCount := int64(len(resp.Trades)) if actualTradeCount != row.ResultingTrades() { return formatDiff(fmt.Sprintf("the resulting trades didn't match the expectation for order \"%v\"", row.Reference()), @@ -304,8 +312,8 @@ func buildStopOrder( now time.Time, ) (*types.StopOrdersSubmission, error) { var ( - fbPriced, raPriced = row.FallsBellowPriceTrigger(), row.RisesAbovePriceTrigger() - fbTrailing, raTrailing = row.FallsBellowTrailing(), row.RisesAboveTrailing() + fbPriced, raPriced = row.FallsBelowPriceTrigger(), row.RisesAbovePriceTrigger() + fbTrailing, raTrailing = row.FallsBelowTrailing(), row.RisesAboveTrailing() ) if fbPriced == nil && fbTrailing.IsZero() && raPriced == nil && raTrailing.IsZero() { @@ -322,11 +330,29 @@ func buildStopOrder( sub := &types.StopOrdersSubmission{} + var ( + fbStrategy *types.StopOrderExpiryStrategy + fbStopOrderExpiry *time.Time + raStrategy *types.StopOrderExpiryStrategy + raStopOrderExpiry *time.Time + ) + if stopOrderExp := row.StopOrderFBExpirationDate(now); stopOrderExp != 0 { + fbStrategy = ptr.From(row.ExpiryStrategyFB()) + fbStopOrderExpiry = ptr.From(time.Unix(0, stopOrderExp)) + } + if stopOrderExp := row.StopOrderRAExpirationDate(now); stopOrderExp != 0 { + raStrategy = ptr.From(row.ExpiryStrategyRA()) + raStopOrderExpiry = ptr.From(time.Unix(0, stopOrderExp)) + } + switch { case fbPriced != nil: sub.FallsBelow = &types.StopOrderSetup{ OrderSubmission: submission, - Expiry: &types.StopOrderExpiry{}, + Expiry: &types.StopOrderExpiry{ + ExpiresAt: fbStopOrderExpiry, + ExpiryStrategy: fbStrategy, + }, Trigger: types.NewPriceStopOrderTrigger( types.StopOrderTriggerDirectionFallsBelow, fbPriced.Clone(), @@ -335,7 +361,10 @@ func buildStopOrder( case !fbTrailing.IsZero(): sub.FallsBelow = &types.StopOrderSetup{ OrderSubmission: submission, - Expiry: &types.StopOrderExpiry{}, + Expiry: &types.StopOrderExpiry{ + ExpiresAt: fbStopOrderExpiry, + ExpiryStrategy: fbStrategy, + }, Trigger: types.NewTrailingStopOrderTrigger( types.StopOrderTriggerDirectionFallsBelow, fbTrailing, @@ -343,22 +372,13 @@ func buildStopOrder( } } - var ( - strategy *types.StopOrderExpiryStrategy - stopOrderExpiry *time.Time - ) - if stopOrderExp := row.StopOrderExpirationDate(now); stopOrderExp != 0 { - strategy = ptr.From(row.ExpiryStrategy()) - stopOrderExpiry = ptr.From(time.Unix(0, stopOrderExp)) - } - switch { case raPriced != nil: sub.RisesAbove = &types.StopOrderSetup{ OrderSubmission: ptr.From(*submission), Expiry: &types.StopOrderExpiry{ - ExpiryStrategy: strategy, - ExpiresAt: stopOrderExpiry, + ExpiryStrategy: raStrategy, + ExpiresAt: raStopOrderExpiry, }, Trigger: types.NewPriceStopOrderTrigger( types.StopOrderTriggerDirectionRisesAbove, @@ -369,8 +389,8 @@ func buildStopOrder( sub.RisesAbove = &types.StopOrderSetup{ OrderSubmission: ptr.From(*submission), Expiry: &types.StopOrderExpiry{ - ExpiryStrategy: strategy, - ExpiresAt: stopOrderExpiry, + ExpiryStrategy: raStrategy, + ExpiresAt: raStopOrderExpiry, }, Trigger: types.NewTrailingStopOrderTrigger( types.StopOrderTriggerDirectionRisesAbove, @@ -385,6 +405,28 @@ func buildStopOrder( sub.RisesAbove.OrderSubmission.Reference += "-2" } + if row.row.HasColumn("ra size override setting") { + value := row.RisesAboveSizeOverrideSetting() + sub.RisesAbove.SizeOverrideSetting = value + + if row.row.HasColumn("ra size override percentage") { + percentage := row.RisesAboveSizeOverridePercentage() + percentageValue := num.MustDecimalFromString(percentage) + sub.RisesAbove.SizeOverrideValue = &types.StopOrderSizeOverrideValue{PercentageSize: percentageValue} + } + } + + if row.row.HasColumn("fb size override setting") { + value := row.FallsBelowSizeOverrideSetting() + sub.FallsBelow.SizeOverrideSetting = value + + if row.row.HasColumn("fb size override percentage") { + percentage := row.FallsBelowSizeOverridePercentage() + percentageValue := num.MustDecimalFromString(percentage) + sub.FallsBelow.SizeOverrideValue = &types.StopOrderSizeOverrideValue{PercentageSize: percentageValue} + } + } + return sub, nil } @@ -407,10 +449,16 @@ func parseSubmitOrderTable(table *godog.Table) []RowWrapper { "fb trailing", "ra price trigger", "ra trailing", - "so expires in", - "so expiry strategy", + "ra expires in", + "ra expiry strategy", + "fb expires in", + "fb expiry strategy", "pegged reference", "pegged offset", + "ra size override setting", + "ra size override percentage", + "fb size override setting", + "fb size override percentage", }) } @@ -518,7 +566,7 @@ func (r submitOrderRow) Only() Only { return t } -func (r submitOrderRow) FallsBellowPriceTrigger() *num.Uint { +func (r submitOrderRow) FallsBelowPriceTrigger() *num.Uint { if !r.row.HasColumn("fb price trigger") { return nil } @@ -532,7 +580,7 @@ func (r submitOrderRow) RisesAbovePriceTrigger() *num.Uint { return r.row.MustUint("ra price trigger") } -func (r submitOrderRow) FallsBellowTrailing() num.Decimal { +func (r submitOrderRow) FallsBelowTrailing() num.Decimal { if !r.row.HasColumn("fb trailing") { return num.DecimalZero() } @@ -546,18 +594,32 @@ func (r submitOrderRow) RisesAboveTrailing() num.Decimal { return r.row.MustDecimal("ra trailing") } -func (r submitOrderRow) StopOrderExpirationDate(now time.Time) int64 { - if !r.row.HasColumn("so expires in") { +func (r submitOrderRow) StopOrderRAExpirationDate(now time.Time) int64 { + if !r.row.HasColumn("ra expires in") { + return 0 + } + return now.Add(r.row.MustDurationSec2("ra expires in")).Local().UnixNano() +} + +func (r submitOrderRow) StopOrderFBExpirationDate(now time.Time) int64 { + if !r.row.HasColumn("fb expires in") { return 0 } - return now.Add(r.row.MustDurationSec2("so expires in")).Local().UnixNano() + return now.Add(r.row.MustDurationSec2("fb expires in")).Local().UnixNano() } -func (r submitOrderRow) ExpiryStrategy() types.StopOrderExpiryStrategy { - if !r.row.HasColumn("so expiry strategy") { +func (r submitOrderRow) ExpiryStrategyRA() types.StopOrderExpiryStrategy { + if !r.row.HasColumn("ra expiry strategy") { return types.StopOrderExpiryStrategyCancels } - return r.row.MustExpiryStrategy("so expiry strategy") + return r.row.MustExpiryStrategy("ra expiry strategy") +} + +func (r submitOrderRow) ExpiryStrategyFB() types.StopOrderExpiryStrategy { + if !r.row.HasColumn("fb expiry strategy") { + return types.StopOrderExpiryStrategyCancels + } + return r.row.MustExpiryStrategy("fb expiry strategy") } func (r submitOrderRow) PeggedReference() types.PeggedReference { @@ -573,3 +635,25 @@ func (r submitOrderRow) PeggedOffset() *num.Uint { } return r.row.MustUint("pegged offset") } + +func (r submitOrderRow) RisesAboveSizeOverrideSetting() types.StopOrderSizeOverrideSetting { + if !r.row.HasColumn("ra size override setting") { + return types.StopOrderSizeOverrideSettingUnspecified + } + return r.row.MustSizeOverrideSetting("ra size override setting") +} + +func (r submitOrderRow) RisesAboveSizeOverridePercentage() string { + return r.row.MustStr("ra size override percentage") +} + +func (r submitOrderRow) FallsBelowSizeOverrideSetting() types.StopOrderSizeOverrideSetting { + if !r.row.HasColumn("fb size override setting") { + return types.StopOrderSizeOverrideSettingUnspecified + } + return r.row.MustSizeOverrideSetting("fb size override setting") +} + +func (r submitOrderRow) FallsBelowSizeOverridePercentage() string { + return r.row.MustStr("fb size override percentage") +} diff --git a/core/integration/steps/parties_should_have_the_following_account_balances.go b/core/integration/steps/parties_should_have_the_following_account_balances.go index f413ed3462..dd2de75d25 100644 --- a/core/integration/steps/parties_should_have_the_following_account_balances.go +++ b/core/integration/steps/parties_should_have_the_following_account_balances.go @@ -18,9 +18,9 @@ package steps import ( "fmt" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/stubs" + + "github.com/cucumber/godog" ) func PartiesShouldHaveTheFollowingAccountBalances( @@ -70,6 +70,25 @@ func PartiesShouldHaveTheFollowingAccountBalances( } } + if row.ExpectOrderMarginAccountBalance() && len(row.OrderMarginAccountBalance()) > 0 { + if !row.ExpectMarketID() { + return fmt.Errorf("market id must be specified when expected order margin account balance is supplied") + } + orderMarginAccount, err := broker.GetPartyOrderMarginAccount(row.Party(), row.MarketID()) + if err != nil { + return errCannotGetPartyOrderMarginAccount(row.Party(), row.MarketID(), err) + } + if orderMarginAccount.GetAsset() != expectedAsset { + return errWrongMarketAccountAsset(orderMarginAccount.GetType().String(), row.Party(), row.MarketID(), expectedAsset, orderMarginAccount.GetAsset()) + } + foundBalance := orderMarginAccount.GetBalance() + expectedBalance := row.OrderMarginAccountBalance() + if foundBalance != expectedBalance { + expectedValues["order margin"] = expectedBalance + foundValues["order margin"] = foundBalance + } + } + // check bond if row.ExpectBondAccountBalance() && len(row.BondAccountBalance()) > 0 { if !row.ExpectMarketID() { @@ -141,6 +160,12 @@ func errCannotGetPartyGeneralAccount(party, asset string, err error) error { ) } +func errCannotGetPartyOrderMarginAccount(party, market string, err error) error { + return fmt.Errorf("couldn't get order margin account for party(%s) and market(%s): %w", + party, market, err, + ) +} + func errCannotGetPartyMarginAccount(party, market string, err error) error { return fmt.Errorf("couldn't get margin account for party(%s) and market(%s): %w", party, market, err, @@ -188,6 +213,7 @@ func parseAccountBalancesTable(table *godog.Table) []RowWrapper { "bond", "vesting", "vested", + "order margin", }) } @@ -211,6 +237,10 @@ func (r accountBalancesRow) MarginAccountBalance() string { return r.row.MustStr("margin") } +func (r accountBalancesRow) OrderMarginAccountBalance() string { + return r.row.MustStr("order margin") +} + func (r accountBalancesRow) GeneralAccountBalance() string { return r.row.MustStr("general") } @@ -227,6 +257,10 @@ func (r accountBalancesRow) ExpectMarginAccountBalance() bool { return r.row.HasColumn("margin") } +func (r accountBalancesRow) ExpectOrderMarginAccountBalance() bool { + return r.row.HasColumn("order margin") +} + func (r accountBalancesRow) ExpectAsset() bool { return r.row.HasColumn("asset") } diff --git a/core/integration/steps/parties_should_have_the_following_margin_levels.go b/core/integration/steps/parties_should_have_the_following_margin_levels.go index 5c03bcca51..ff55c4190d 100644 --- a/core/integration/steps/parties_should_have_the_following_margin_levels.go +++ b/core/integration/steps/parties_should_have_the_following_margin_levels.go @@ -18,10 +18,10 @@ package steps import ( "fmt" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/stubs" types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" ) func ThePartiesShouldHaveTheFollowingMarginLevels( @@ -35,6 +35,9 @@ func ThePartiesShouldHaveTheFollowingMarginLevels( search, hasSearch := row.U64B("search") initial, hasInitial := row.U64B("initial") release, hasRelease := row.U64B("release") + order, hasOrder := row.U64B("order") + marginMode := row.Str("margin mode") + marginFactor := row.Str("margin factor") levels, err := broker.GetMarginByPartyAndMarket(partyID, marketID) if err != nil { @@ -54,8 +57,20 @@ func ThePartiesShouldHaveTheFollowingMarginLevels( if hasRelease && stringToU64(levels.CollateralReleaseLevel) != release { hasError = true } + if hasOrder && stringToU64(levels.OrderMargin) != order { + hasError = true + } + if row.HasColumn("margin mode") { + if marginMode == "cross margin" && levels.MarginMode != types.MarginMode_MARGIN_MODE_CROSS_MARGIN { + hasError = true + } else if marginMode == "isolated margin" && levels.MarginMode != types.MarginMode_MARGIN_MODE_ISOLATED_MARGIN { + hasError = true + } else if marginMode != "cross margin" && marginMode != "isolated margin" { + hasError = true + } + } if hasError { - return errInvalidMargins(maintenance, search, initial, release, levels, partyID) + return errInvalidMargins(maintenance, search, initial, release, order, levels, partyID, marginMode, marginFactor) } } return nil @@ -66,22 +81,30 @@ func errCannotGetMarginLevelsForPartyAndMarket(partyID, market string, err error } func errInvalidMargins( - maintenance, search, initial, release uint64, + maintenance, search, initial, release, order uint64, levels types.MarginLevels, partyID string, + marginMode string, + marginFactor string, ) error { return formatDiff(fmt.Sprintf("invalid margins for party \"%s\"", partyID), map[string]string{ - "maintenance": u64ToS(maintenance), - "search": u64ToS(search), - "initial": u64ToS(initial), - "release": u64ToS(release), + "maintenance": u64ToS(maintenance), + "search": u64ToS(search), + "initial": u64ToS(initial), + "release": u64ToS(release), + "order": u64ToS(order), + "margin mode": marginMode, + "margin factor": marginFactor, }, map[string]string{ - "maintenance": levels.MaintenanceMargin, - "search": levels.SearchLevel, - "initial": levels.InitialMargin, - "release": levels.CollateralReleaseLevel, + "maintenance": levels.MaintenanceMargin, + "search": levels.SearchLevel, + "initial": levels.InitialMargin, + "release": levels.CollateralReleaseLevel, + "order": levels.OrderMargin, + "margin mode": levels.MarginMode.String(), + "margin factor": levels.MarginFactor, }, ) } @@ -95,6 +118,9 @@ func parseExpectedMarginsTable(table *godog.Table) []RowWrapper { "search", "initial", "release", + "order", + "margin mode", + "margin factor", }, ) } diff --git a/core/integration/steps/parties_should_have_the_following_position_status.go b/core/integration/steps/parties_should_have_the_following_position_status.go index 5125d59de3..766c5580d3 100644 --- a/core/integration/steps/parties_should_have_the_following_position_status.go +++ b/core/integration/steps/parties_should_have_the_following_position_status.go @@ -18,10 +18,10 @@ package steps import ( "fmt" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/stubs" proto "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" ) func PartiesShouldHaveTheFollowingPositionStatus( diff --git a/core/integration/steps/parties_should_have_the_following_profit_and_loss.go b/core/integration/steps/parties_should_have_the_following_profit_and_loss.go index 9cf10c75ee..42152c8fdd 100644 --- a/core/integration/steps/parties_should_have_the_following_profit_and_loss.go +++ b/core/integration/steps/parties_should_have_the_following_profit_and_loss.go @@ -19,12 +19,12 @@ import ( "fmt" "time" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/plugins" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" ) func PartiesHaveTheFollowingProfitAndLoss( @@ -45,12 +45,20 @@ func positionAPIProduceTheFollowingRow(positionService *plugins.Positions, row p sleepTimeMs := 100 var pos []*types.Position - // check position status if needed ps, checkPS := row.positionState() party := row.party() for retries > 0 { - pos, err = positionService.GetPositionsByParty(party) + if len(row.market()) > 0 { + p, err := positionService.GetPositionsByMarketAndParty(row.market(), party) + pos = []*types.Position{p} + if err != nil { + return errCannotGetPositionForParty(party, err) + } + } else { + pos, err = positionService.GetPositionsByParty(party) + } + if err != nil { return errCannotGetPositionForParty(party, err) } @@ -116,6 +124,7 @@ func parseProfitAndLossTable(table *godog.Table) []RowWrapper { "realised pnl", }, []string{ "status", + "market id", }) } @@ -127,6 +136,13 @@ func (r pnlRow) party() string { return r.row.MustStr("party") } +func (r pnlRow) market() string { + if r.row.HasColumn("market id") { + return r.row.MustStr("market id") + } + return "" +} + func (r pnlRow) volume() int64 { return r.row.MustI64("volume") } diff --git a/core/integration/steps/parties_submit_liquidity_provision.go b/core/integration/steps/parties_submit_liquidity_provision.go index 48a664c79c..39f627f5c4 100644 --- a/core/integration/steps/parties_submit_liquidity_provision.go +++ b/core/integration/steps/parties_submit_liquidity_provision.go @@ -22,10 +22,10 @@ import ( "fmt" "sort" - "code.vegaprotocol.io/vega/libs/crypto" - "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/parties_transfer_to_staging_account.go b/core/integration/steps/parties_transfer_to_staging_account.go index d2bd93e587..4e90587145 100644 --- a/core/integration/steps/parties_transfer_to_staging_account.go +++ b/core/integration/steps/parties_transfer_to_staging_account.go @@ -16,9 +16,9 @@ package steps import ( - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/stubs" + + "github.com/cucumber/godog" ) func PartiesTransferToStakingAccount( diff --git a/core/integration/steps/parties_undelegate_the_following_stake.go b/core/integration/steps/parties_undelegate_the_following_stake.go index 69f0a3810b..ee1fd0402e 100644 --- a/core/integration/steps/parties_undelegate_the_following_stake.go +++ b/core/integration/steps/parties_undelegate_the_following_stake.go @@ -18,10 +18,10 @@ package steps import ( "context" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/delegation" "code.vegaprotocol.io/vega/libs/num" + + "github.com/cucumber/godog" ) func PartiesUndelegateTheFollowingStake( diff --git a/core/integration/steps/parties_withdraw_from_staking_account.go b/core/integration/steps/parties_withdraw_from_staking_account.go index 8e098a860f..54b04e8822 100644 --- a/core/integration/steps/parties_withdraw_from_staking_account.go +++ b/core/integration/steps/parties_withdraw_from_staking_account.go @@ -16,9 +16,9 @@ package steps import ( - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/stubs" + + "github.com/cucumber/godog" ) func PartiesWithdrawFromStakingAccount( diff --git a/core/integration/steps/parties_withdraw_the_following_assets.go b/core/integration/steps/parties_withdraw_the_following_assets.go index 067e3820cb..c89ddd3827 100644 --- a/core/integration/steps/parties_withdraw_the_following_assets.go +++ b/core/integration/steps/parties_withdraw_the_following_assets.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/core/integration/stubs" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/party_should_have_general_account_balance_for_asset.go b/core/integration/steps/party_should_have_general_account_balance_for_asset.go index 4cd2dabdcd..f87e2dfde3 100644 --- a/core/integration/steps/party_should_have_general_account_balance_for_asset.go +++ b/core/integration/steps/party_should_have_general_account_balance_for_asset.go @@ -20,6 +20,7 @@ import ( "strconv" "code.vegaprotocol.io/vega/core/integration/stubs" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/party_should_have_the_following_delegation_balances.go b/core/integration/steps/party_should_have_the_following_delegation_balances.go index 49492345b9..0371a0b31c 100644 --- a/core/integration/steps/party_should_have_the_following_delegation_balances.go +++ b/core/integration/steps/party_should_have_the_following_delegation_balances.go @@ -18,10 +18,10 @@ package steps import ( "fmt" + "code.vegaprotocol.io/vega/core/integration/stubs" "code.vegaprotocol.io/vega/libs/num" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/stubs" + "github.com/cucumber/godog" ) func PartiesShouldHaveTheFollowingDelegationBalances( diff --git a/core/integration/steps/party_should_receive_the_following_rewards.go b/core/integration/steps/party_should_receive_the_following_rewards.go index b26dc66ba2..3d56dbc17b 100644 --- a/core/integration/steps/party_should_receive_the_following_rewards.go +++ b/core/integration/steps/party_should_receive_the_following_rewards.go @@ -18,10 +18,10 @@ package steps import ( "fmt" + "code.vegaprotocol.io/vega/core/integration/stubs" "code.vegaprotocol.io/vega/libs/num" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/stubs" + "github.com/cucumber/godog" ) func PartiesShouldReceiveTheFollowingReward( diff --git a/core/integration/steps/referral/benefit_tiers_configs.go b/core/integration/steps/referral/benefit_tiers_configs.go index d9e65e12b3..dab7d196a3 100644 --- a/core/integration/steps/referral/benefit_tiers_configs.go +++ b/core/integration/steps/referral/benefit_tiers_configs.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/integration/steps/helpers" "code.vegaprotocol.io/vega/core/types" vegapb "code.vegaprotocol.io/vega/protos/vega" + "github.com/golang/protobuf/jsonpb" "github.com/jinzhu/copier" ) diff --git a/core/integration/steps/referral/staking_tiers_configs.go b/core/integration/steps/referral/staking_tiers_configs.go index 373b8ad63d..0aee968149 100644 --- a/core/integration/steps/referral/staking_tiers_configs.go +++ b/core/integration/steps/referral/staking_tiers_configs.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/integration/steps/helpers" "code.vegaprotocol.io/vega/core/types" vegapb "code.vegaprotocol.io/vega/protos/vega" + "github.com/golang/protobuf/jsonpb" "github.com/jinzhu/copier" ) diff --git a/core/integration/steps/table_wrapper.go b/core/integration/steps/table_wrapper.go index 61f89c3344..319885bdac 100644 --- a/core/integration/steps/table_wrapper.go +++ b/core/integration/steps/table_wrapper.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/ptr" proto "code.vegaprotocol.io/vega/protos/vega" datav1 "code.vegaprotocol.io/vega/protos/vega/data/v1" @@ -223,6 +224,14 @@ func (r RowWrapper) MustU64(name string) uint64 { return value } +func (r RowWrapper) MustInt(name string) *num.Int { + val, ok := num.IntFromString(r.MustStr(name), 10) + if ok { + panicW(name, fmt.Errorf("failed to parse int")) + } + return val +} + func (r RowWrapper) MustUint(name string) *num.Uint { value, err := Uint(r.mustColumn(name)) panicW(name, err) @@ -240,6 +249,13 @@ func (r RowWrapper) MaybeUint(name string) *num.Uint { return u } +func (r RowWrapper) MaybeU64(name string) *uint64 { + if !r.HasColumn(name) { + return nil + } + return ptr.From(r.MustU64(name)) +} + func (r RowWrapper) Uint(name string) *num.Uint { value, err := Uint(r.values[name]) panicW(name, err) @@ -601,6 +617,20 @@ func peggedReference(rawValue string) types.PeggedReference { return types.PeggedReferenceUnspecified } +func (r RowWrapper) MustSizeOverrideSetting(name string) types.StopOrderSizeOverrideSetting { + return sizeOverrideSetting(r.MustStr(name)) +} + +func sizeOverrideSetting(rawValue string) types.StopOrderSizeOverrideSetting { + switch rawValue { + case "NONE": + return types.StopOrderSizeOverrideSettingNone + case "POSITION": + return types.StopOrderSizeOverrideSettingPosition + } + return types.StopOrderSizeOverrideSettingUnspecified +} + func (r RowWrapper) MustOracleSpecPropertyType(name string) datav1.PropertyKey_Type { ty, err := OracleSpecPropertyType(r.MustStr(name)) panicW(name, err) @@ -665,6 +695,21 @@ func (r RowWrapper) MustTradingMode(name string) types.MarketTradingMode { return ty } +func (r RowWrapper) MarkPriceType() types.CompositePriceType { + if !r.HasColumn("price type") { + return types.CompositePriceTypeByLastTrade + } + if r.mustColumn("price type") == "last trade" { + return types.CompositePriceTypeByLastTrade + } else if r.mustColumn("price type") == "median" { + return types.CompositePriceTypeByMedian + } else if r.mustColumn("price type") == "weight" { + return types.CompositePriceTypeByWeight + } else { + panic("invalid price type") + } +} + func TradingMode(name string) (types.MarketTradingMode, error) { ty, ok := proto.Market_TradingMode_value[name] diff --git a/core/integration/steps/team_has_the_following_members.go b/core/integration/steps/team_has_the_following_members.go index b42c2e102c..48f424f7b2 100644 --- a/core/integration/steps/team_has_the_following_members.go +++ b/core/integration/steps/team_has_the_following_members.go @@ -28,6 +28,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/cucumber/godog" ) @@ -96,13 +97,15 @@ func TheFollowingTeamsWithRefereesAreCreated( } // 3. Create a team teamPB := &commandspb.CreateReferralSet_Team{ - Name: team, + Name: team, + Closed: row.Closed(), + AllowList: row.AllowList(), } if err := teamsEngine.CreateTeam(ctx, referrer, types.TeamID(team), teamPB); err != nil { return err } // 4. All parties apply the referral code, skip the first in parties slice, they are the referrer - refCode := &commandspb.ApplyReferralCode{ + joinTeam := &commandspb.JoinTeam{ Id: team, } // 5. Join team @@ -110,7 +113,7 @@ func TheFollowingTeamsWithRefereesAreCreated( if err := referralEngine.ApplyReferralCode(ctx, types.PartyID(pid), code); err != nil { return err } - if err := teamsEngine.JoinTeam(ctx, types.PartyID(pid), refCode); err != nil { + if err := teamsEngine.JoinTeam(ctx, types.PartyID(pid), joinTeam); err != nil { return err } } @@ -133,7 +136,10 @@ func parseCreateTeamTable(table *godog.Table) []RowWrapper { "referees", "balance", "asset", - }, []string{}) + }, []string{ + "closed", + "allow list", + }) } type membersRow struct { @@ -183,6 +189,13 @@ func (t teamRow) Balance() *num.Uint { return t.r.MustUint("balance") } +func (t teamRow) Closed() bool { + if !t.r.HasColumn("closed") { + return false + } + return t.r.MustBool("closed") +} + func (t teamRow) Members() []string { cnt := t.MemberCount() ids := make([]string, 0, cnt) @@ -193,3 +206,15 @@ func (t teamRow) Members() []string { } return ids } + +func (t teamRow) AllowList() []string { + if !t.Closed() { + return nil + } + generated := t.Members() + if !t.r.HasColumn("allow list") { + return generated + } + explicit := t.r.MustStrSlice("allow list", ",") + return append(explicit, generated...) +} diff --git a/core/integration/steps/the_activity_streaks_should_be.go b/core/integration/steps/the_activity_streaks_should_be.go index 027944bbe0..76de5acbd2 100644 --- a/core/integration/steps/the_activity_streaks_should_be.go +++ b/core/integration/steps/the_activity_streaks_should_be.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/integration/stubs" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/cucumber/godog" "golang.org/x/exp/maps" "golang.org/x/exp/slices" diff --git a/core/integration/steps/the_fees_configuration.go b/core/integration/steps/the_fees_configuration.go index 83277f6277..5243351d6d 100644 --- a/core/integration/steps/the_fees_configuration.go +++ b/core/integration/steps/the_fees_configuration.go @@ -16,28 +16,54 @@ package steps import ( - "github.com/cucumber/godog" + "fmt" "code.vegaprotocol.io/vega/core/integration/steps/market" + "code.vegaprotocol.io/vega/libs/ptr" types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" ) func TheFeesConfiguration(config *market.Config, name string, table *godog.Table) error { row := feesConfigRow{row: parseFeesConfigTable(table)} + liquidityFeeSettings := &types.LiquidityFeeSettings{ + Method: types.LiquidityFeeSettings_METHOD_MARGINAL_COST, + } + + method, err := row.liquidityFeeMethod() + if err != nil { + return err + } + + if method != types.LiquidityFeeSettings_METHOD_UNSPECIFIED { + liquidityFeeSettings = &types.LiquidityFeeSettings{ + Method: method, + FeeConstant: row.liquidityFeeConstant(), + } + } + return config.FeesConfig.Add(name, &types.Fees{ Factors: &types.FeeFactors{ InfrastructureFee: row.infrastructureFee(), MakerFee: row.makerFee(), }, + LiquidityFeeSettings: liquidityFeeSettings, }) } func parseFeesConfigTable(table *godog.Table) RowWrapper { - return StrictParseFirstRow(table, []string{ - "maker fee", - "infrastructure fee", - }, []string{}) + return StrictParseFirstRow(table, + []string{ + "maker fee", + "infrastructure fee", + }, + []string{ + "liquidity fee method", + "liquidity fee constant", + }, + ) } type feesConfigRow struct { @@ -51,3 +77,25 @@ func (r feesConfigRow) makerFee() string { func (r feesConfigRow) infrastructureFee() string { return r.row.MustStr("infrastructure fee") } + +func (r feesConfigRow) liquidityFeeMethod() (types.LiquidityFeeSettings_Method, error) { + if !r.row.HasColumn("liquidity fee method") { + return types.LiquidityFeeSettings_METHOD_UNSPECIFIED, nil + } + return LiquidityFeeMethodType(r.row.Str("liquidity fee method")) +} + +func (r feesConfigRow) liquidityFeeConstant() *string { + if !r.row.HasColumn("liquidity fee constant") { + return nil + } + return ptr.From(r.row.Str("liquidity fee constant")) +} + +func LiquidityFeeMethodType(rawValue string) (types.LiquidityFeeSettings_Method, error) { + ty, ok := types.LiquidityFeeSettings_Method_value[rawValue] + if !ok { + return types.LiquidityFeeSettings_Method(ty), fmt.Errorf("invalid liquidity fee method: %v", rawValue) + } + return types.LiquidityFeeSettings_Method(ty), nil +} diff --git a/core/integration/steps/the_following_events_should_be_emitted.go b/core/integration/steps/the_following_events_should_be_emitted.go index b493d4935f..8a2b938f38 100644 --- a/core/integration/steps/the_following_events_should_be_emitted.go +++ b/core/integration/steps/the_following_events_should_be_emitted.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/integration/stubs" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/the_following_network_trades_should_be_executed.go b/core/integration/steps/the_following_network_trades_should_be_executed.go index f5c5ba0d37..937ab4fe39 100644 --- a/core/integration/steps/the_following_network_trades_should_be_executed.go +++ b/core/integration/steps/the_following_network_trades_should_be_executed.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/core/integration/stubs" types "code.vegaprotocol.io/vega/protos/vega" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/the_following_orders_should_be_rejected.go b/core/integration/steps/the_following_orders_should_be_rejected.go index 9e31a3a7bd..0053e6a030 100644 --- a/core/integration/steps/the_following_orders_should_be_rejected.go +++ b/core/integration/steps/the_following_orders_should_be_rejected.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/core/integration/stubs" types "code.vegaprotocol.io/vega/protos/vega" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/the_following_orders_should_be_stopped.go b/core/integration/steps/the_following_orders_should_be_stopped.go index 3dafd1408d..f12366238d 100644 --- a/core/integration/steps/the_following_orders_should_be_stopped.go +++ b/core/integration/steps/the_following_orders_should_be_stopped.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/core/integration/stubs" types "code.vegaprotocol.io/vega/protos/vega" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/the_following_trades_happened.go b/core/integration/steps/the_following_trades_happened.go index 2d57d351d7..247b54aea6 100644 --- a/core/integration/steps/the_following_trades_happened.go +++ b/core/integration/steps/the_following_trades_happened.go @@ -19,11 +19,11 @@ import ( "fmt" "time" - "code.vegaprotocol.io/vega/libs/num" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/stubs" + "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" ) func TheFollowingTradesShouldBeExecuted( diff --git a/core/integration/steps/the_following_transfers_should_happen.go b/core/integration/steps/the_following_transfers_should_happen.go index 5eb66a6ebe..d33d1f3dfc 100644 --- a/core/integration/steps/the_following_transfers_should_happen.go +++ b/core/integration/steps/the_following_transfers_should_happen.go @@ -18,11 +18,11 @@ package steps import ( "fmt" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/integration/stubs" vegapb "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" ) func TheFollowingTransfersShouldHappen( diff --git a/core/integration/steps/the_iceberg_orders_should_have_the_following_states.go b/core/integration/steps/the_iceberg_orders_should_have_the_following_states.go index ce71022d41..5729b78b90 100644 --- a/core/integration/steps/the_iceberg_orders_should_have_the_following_states.go +++ b/core/integration/steps/the_iceberg_orders_should_have_the_following_states.go @@ -19,6 +19,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/core/integration/stubs" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/the_liquidation_strategy.go b/core/integration/steps/the_liquidation_strategy.go new file mode 100644 index 0000000000..1f9dce0ef2 --- /dev/null +++ b/core/integration/steps/the_liquidation_strategy.go @@ -0,0 +1,81 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package steps + +import ( + "time" + + "code.vegaprotocol.io/vega/core/integration/steps/market" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" + + "github.com/cucumber/godog" +) + +func TheLiquidationStrategies(config *market.Config, table *godog.Table) error { + rows := parseLiquidationStrategyTable(table) + for _, row := range rows { + lsr := lsRow{ + r: row, + } + config.LiquidationStrat.Add(lsr.name(), lsr.liquidationStrategy().IntoProto()) + } + return nil +} + +func parseLiquidationStrategyTable(table *godog.Table) []RowWrapper { + return StrictParseTable(table, []string{ + "name", + "disposal step", + "disposal fraction", + "full disposal size", + "max fraction consumed", + }, nil) +} + +type lsRow struct { + r RowWrapper +} + +func (l lsRow) liquidationStrategy() *types.LiquidationStrategy { + return &types.LiquidationStrategy{ + DisposalTimeStep: l.disposalStep(), + DisposalFraction: l.disposalFraction(), + FullDisposalSize: l.fullDisposalSize(), + MaxFractionConsumed: l.maxFraction(), + } +} + +func (l lsRow) name() string { + return l.r.MustStr("name") +} + +func (l lsRow) disposalStep() time.Duration { + i := l.r.MustI64("disposal step") + return time.Duration(i) * time.Second +} + +func (l lsRow) disposalFraction() num.Decimal { + return l.r.MustDecimal("disposal fraction") +} + +func (l lsRow) fullDisposalSize() uint64 { + return l.r.MustU64("full disposal size") +} + +func (l lsRow) maxFraction() num.Decimal { + return l.r.MustDecimal("max fraction consumed") +} diff --git a/core/integration/steps/the_liquidity_monitoring.go b/core/integration/steps/the_liquidity_monitoring.go index 52b0e3fb1a..9bcececf2e 100644 --- a/core/integration/steps/the_liquidity_monitoring.go +++ b/core/integration/steps/the_liquidity_monitoring.go @@ -18,6 +18,7 @@ package steps import ( "code.vegaprotocol.io/vega/core/integration/steps/market" types "code.vegaprotocol.io/vega/protos/vega" + "github.com/cucumber/godog" ) @@ -30,8 +31,6 @@ func TheLiquidityMonitoring(config *market.Config, table *godog.Table) error { TimeWindow: r.timeWindow(), ScalingFactor: r.scalingFactor(), }, - TriggeringRatio: r.triggeringRatio(), - AuctionExtension: r.auctionExtension(), } if err := config.LiquidityMonitoring.Add(r.name(), p); err != nil { return err @@ -67,14 +66,3 @@ func (r liquidityMonitoringRow) timeWindow() int64 { func (r liquidityMonitoringRow) scalingFactor() float64 { return r.row.MustF64("scaling factor") } - -func (r liquidityMonitoringRow) triggeringRatio() string { - return r.row.MustStr("triggering ratio") -} - -func (r liquidityMonitoringRow) auctionExtension() int64 { - if !r.row.HasColumn("auction extension") { - return 0 - } - return r.row.MustI64("auction extension") -} diff --git a/core/integration/steps/the_liquidity_provider_fee_shares_for_the_market_should_be.go b/core/integration/steps/the_liquidity_provider_fee_shares_for_the_market_should_be.go index a40da46180..c9b93e6b8c 100644 --- a/core/integration/steps/the_liquidity_provider_fee_shares_for_the_market_should_be.go +++ b/core/integration/steps/the_liquidity_provider_fee_shares_for_the_market_should_be.go @@ -19,6 +19,7 @@ import ( "fmt" types "code.vegaprotocol.io/vega/protos/vega" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/the_liquidity_provisions_should_have_the_following_states.go b/core/integration/steps/the_liquidity_provisions_should_have_the_following_states.go index ff46fa5983..8c0931c643 100644 --- a/core/integration/steps/the_liquidity_provisions_should_have_the_following_states.go +++ b/core/integration/steps/the_liquidity_provisions_should_have_the_following_states.go @@ -18,10 +18,10 @@ package steps import ( "errors" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/stubs" types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" ) func TheLiquidityProvisionsShouldHaveTheFollowingStates(broker *stubs.BrokerStub, table *godog.Table) error { diff --git a/core/integration/steps/the_liquidity_sla_params.go b/core/integration/steps/the_liquidity_sla_params.go index 2c98409bc9..1c1946e35d 100644 --- a/core/integration/steps/the_liquidity_sla_params.go +++ b/core/integration/steps/the_liquidity_sla_params.go @@ -16,10 +16,10 @@ package steps import ( - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/steps/market" types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" ) func TheLiquiditySLAPArams(config *market.Config, name string, table *godog.Table) error { diff --git a/core/integration/steps/the_log_normal_risk_model.go b/core/integration/steps/the_log_normal_risk_model.go index 02967d73e8..4c32065d8a 100644 --- a/core/integration/steps/the_log_normal_risk_model.go +++ b/core/integration/steps/the_log_normal_risk_model.go @@ -16,10 +16,10 @@ package steps import ( - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/steps/market" types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" ) func TheLogNormalRiskModel(config *market.Config, name string, table *godog.Table) error { diff --git a/core/integration/steps/the_loss_socialisation_amount_is.go b/core/integration/steps/the_loss_socialisation_amount_is.go new file mode 100644 index 0000000000..b352cea03e --- /dev/null +++ b/core/integration/steps/the_loss_socialisation_amount_is.go @@ -0,0 +1,121 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package steps + +import ( + "fmt" + + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/integration/stubs" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/logging" + + "github.com/cucumber/godog" +) + +func TheLossSocialisationAmountsAre(broker *stubs.BrokerStub, table *godog.Table) error { + lsMkt := getLossSocPerMarket(broker) + for _, r := range parseLossSocTable(table) { + lsr := lossSocRow{r: r} + mevts, ok := lsMkt[lsr.Market()] + if !ok { + return fmt.Errorf("no loss socialisation events found for market %s", lsr.Market()) + } + parties := map[string]struct{}{} + for _, e := range mevts { + if lsr.Amount().EQ(e.Amount()) { + parties[e.PartyID()] = struct{}{} + } + } + if c := lsr.Count(); c != -1 { + if len(parties) != c { + return fmt.Errorf("expected %d loss socialisation events for market %s and amount %s, instead found %d", c, lsr.Market(), lsr.Amount().String(), len(parties)) + } + } + for _, p := range lsr.Party() { + if _, ok := parties[p]; !ok { + return fmt.Errorf("no loss socialisation found for party %s on market %s for amount %s", p, lsr.Market(), lsr.Amount().String()) + } + } + } + return nil +} + +func DebugLossSocialisationEvents(broker *stubs.BrokerStub, log *logging.Logger) error { + lsEvts := getLossSocPerMarket(broker) + for mkt, evts := range lsEvts { + log.Infof("\nLoss socialisation events for market %s:", mkt) + for _, e := range evts { + log.Infof( + "Party: %s - Amount: %s", + e.PartyID(), + e.Amount().String(), + ) + } + log.Info("----------------------------------------------------------------------------") + } + return nil +} + +func getLossSocPerMarket(broker *stubs.BrokerStub) map[string][]*events.LossSoc { + evts := broker.GetLossSoc() + ret := map[string][]*events.LossSoc{} + for _, e := range evts { + mkt := e.MarketID() + mevts, ok := ret[mkt] + if !ok { + mevts = []*events.LossSoc{} + } + ret[mkt] = append(mevts, e) + } + return ret +} + +func parseLossSocTable(table *godog.Table) []RowWrapper { + return StrictParseTable(table, []string{ + "market", + "amount", + }, []string{ + "party", + "count", + }) +} + +type lossSocRow struct { + r RowWrapper +} + +func (l lossSocRow) Market() string { + return l.r.MustStr("market") +} + +func (l lossSocRow) Amount() *num.Int { + return l.r.MustInt("amount") +} + +func (l lossSocRow) Party() []string { + if l.r.HasColumn("party") { + return l.r.MustStrSlice("party", ",") + } + return nil +} + +func (l lossSocRow) Count() int { + if l.r.HasColumn("count") { + return int(l.r.MustI64("count")) + } + return -1 +} diff --git a/core/integration/steps/the_margin_calculator.go b/core/integration/steps/the_margin_calculator.go index 25d67e7f00..4259b5530b 100644 --- a/core/integration/steps/the_margin_calculator.go +++ b/core/integration/steps/the_margin_calculator.go @@ -16,10 +16,10 @@ package steps import ( - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/steps/market" types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" ) func TheMarginCalculator(config *market.Config, name string, table *godog.Table) error { diff --git a/core/integration/steps/the_mark_price_algo_for_a_market.go b/core/integration/steps/the_mark_price_algo_for_a_market.go new file mode 100644 index 0000000000..323785ae72 --- /dev/null +++ b/core/integration/steps/the_mark_price_algo_for_a_market.go @@ -0,0 +1,46 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package steps + +import ( + "fmt" + + "code.vegaprotocol.io/vega/core/integration/stubs" +) + +func TheMarkPriceAlgoShouldBeForMarket( + broker *stubs.BrokerStub, + market, expectedMarkPriceAlgo string, +) error { + actualMarkPriceAlgo := broker.GetMarkPriceSettings(market).CompositePriceType.String() + + if actualMarkPriceAlgo != expectedMarkPriceAlgo { + return errMismatchedMarkPriceAlgo(market, expectedMarkPriceAlgo, actualMarkPriceAlgo) + } + return nil +} + +func errMismatchedMarkPriceAlgo(market, expectedAlgo, actualAlgo string) error { + return formatDiff( + fmt.Sprintf("unexpected mark price algo for market \"%s\"", market), + map[string]string{ + "mark price algo": expectedAlgo, + }, + map[string]string{ + "mark price algo": actualAlgo, + }, + ) +} diff --git a/core/integration/steps/the_market_state_should_be_for_market.go b/core/integration/steps/the_market_state_should_be_for_market.go index 05ea6d5e1c..037694866b 100644 --- a/core/integration/steps/the_market_state_should_be_for_market.go +++ b/core/integration/steps/the_market_state_should_be_for_market.go @@ -24,6 +24,7 @@ import ( vgcontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/libs/num" types "code.vegaprotocol.io/vega/protos/vega" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/the_markets.go b/core/integration/steps/the_markets.go index 049666d332..7901671bb9 100644 --- a/core/integration/steps/the_markets.go +++ b/core/integration/steps/the_markets.go @@ -18,10 +18,9 @@ package steps import ( "context" "fmt" + "strings" "time" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/collateral" "code.vegaprotocol.io/vega/core/datasource" "code.vegaprotocol.io/vega/core/datasource/external/signedoracle" @@ -30,6 +29,8 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" proto "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" ) func TheMarketsUpdated( @@ -55,7 +56,13 @@ func TheMarketsUpdated( if !ok { return nil, fmt.Errorf("unknown market id %s", upd.id()) } - updates = append(updates, marketUpdate(config, current, upd)) + + mUpdate, err := marketUpdate(config, current, upd) + if err != nil { + return existing, err + } + + updates = append(updates, mUpdate) updated = append(updated, current) } if err := updateMarkets(updated, updates, executionEngine); err != nil { @@ -182,11 +189,24 @@ func enableVoteAsset(collateralEngine *collateral.Engine) error { } // marketUpdate return the UpdateMarket type just for clear error reporting and sanity checks ATM. -func marketUpdate(config *market.Config, existing *types.Market, row marketUpdateRow) types.UpdateMarket { +func marketUpdate(config *market.Config, existing *types.Market, row marketUpdateRow) (types.UpdateMarket, error) { update := types.UpdateMarket{ MarketID: existing.ID, Changes: &types.UpdateMarketConfiguration{}, } + liqStrat := existing.LiquidationStrategy + if ls, ok := row.liquidationStrat(); ok { + lqs, err := config.LiquidationStrat.Get(ls) + if err != nil { + panic(err) + } + if liqStrat, err = types.LiquidationStrategyFromProto(lqs); err != nil { + panic(err) + } + } + update.Changes.LiquidationStrategy = liqStrat + existing.LiquidationStrategy = liqStrat + // product update if oracle, ok := row.oracleConfig(); ok { // update product -> use type switch even though currently only futures exist @@ -257,6 +277,9 @@ func marketUpdate(config *market.Config, existing *types.Market, row marketUpdat MarginFundingFactor: pfp.MarginFundingFactor, ClampLowerBound: pfp.ClampLowerBound, ClampUpperBound: pfp.ClampUpperBound, + FundingRateScalingFactor: pfp.FundingRateScalingFactor, + FundingRateLowerBound: pfp.FundingRateLowerBound, + FundingRateUpperBound: pfp.FundingRateUpperBound, DataSourceSpecForSettlementData: *pfp.DataSourceSpecForSettlementData.Data, DataSourceSpecForSettlementSchedule: *pfp.DataSourceSpecForSettlementSchedule.Data, DataSourceSpecBinding: pfp.DataSourceSpecBinding, @@ -266,6 +289,9 @@ func marketUpdate(config *market.Config, existing *types.Market, row marketUpdat // apply update ti.Perps.ClampLowerBound = pfp.ClampLowerBound ti.Perps.ClampUpperBound = pfp.ClampUpperBound + ti.Perps.FundingRateScalingFactor = pfp.FundingRateScalingFactor + ti.Perps.FundingRateUpperBound = pfp.FundingRateUpperBound + ti.Perps.FundingRateLowerBound = pfp.FundingRateLowerBound ti.Perps.MarginFundingFactor = pfp.MarginFundingFactor ti.Perps.DataSourceSpecBinding = pfp.DataSourceSpecBinding ti.Perps.DataSourceSpecForSettlementData = pfp.DataSourceSpecForSettlementData @@ -336,7 +362,7 @@ func marketUpdate(config *market.Config, existing *types.Market, row marketUpdat if liquiditySla, ok := row.tryLiquiditySLA(); ok { sla, err := config.LiquiditySLAParams.Get(liquiditySla) if err != nil { - panic(err) + return update, err } slaParams := types.LiquiditySLAParamsFromProto(sla) // update existing @@ -344,7 +370,42 @@ func marketUpdate(config *market.Config, existing *types.Market, row marketUpdat update.Changes.LiquiditySLAParameters = slaParams } - return update + update.Changes.LiquidityFeeSettings = existing.Fees.LiquidityFeeSettings + if liquidityFeeSettings, ok := row.tryLiquidityFeeSettings(); ok { + settings, err := config.FeesConfig.Get(liquidityFeeSettings) + if err != nil { + return update, err + } + s := types.LiquidityFeeSettingsFromProto(settings.LiquidityFeeSettings) + existing.Fees.LiquidityFeeSettings = s + update.Changes.LiquidityFeeSettings = s + } + + markPriceConfig := existing.MarkPriceConfiguration.DeepClone() + markPriceConfig.CompositePriceType = row.markPriceType() + + if row.row.HasColumn("decay power") { + markPriceConfig.DecayPower = row.decayPower() + } + if row.row.HasColumn("decay weight") { + markPriceConfig.DecayWeight = row.decayWeight() + } + if row.row.HasColumn("cash amount") { + markPriceConfig.CashAmount = row.cashAmount() + } + if row.row.HasColumn("source weights") { + markPriceConfig.SourceWeights = row.priceSourceWeights() + } + if row.row.HasColumn("source staleness tolerance") { + markPriceConfig.SourceStalenessTolerance = row.priceSourceStalnessTolerance() + } + if row.row.HasColumn("oracle1") { + markPriceConfig.DataSources, markPriceConfig.SpecBindingForCompositePrice = row.oracles(config) + } + + update.Changes.MarkPriceConfiguration = markPriceConfig + existing.MarkPriceConfiguration = markPriceConfig + return update, nil } func newPerpMarket(config *market.Config, row marketRow) types.Market { @@ -381,6 +442,14 @@ func newPerpMarket(config *market.Config, row marketRow) types.Market { if err != nil { panic(err) } + lqs, err := config.LiquidationStrat.Get(row.liquidationStrat()) + if err != nil { + panic(err) + } + liqStrat, err := types.LiquidationStrategyFromProto(lqs) + if err != nil { + panic(err) + } linearSlippageFactor := row.linearSlippageFactor() quadraticSlippageFactor := row.quadraticSlippageFactor() @@ -390,6 +459,18 @@ func newPerpMarket(config *market.Config, row marketRow) types.Market { panic(err) } + specs, binding := row.oracles(config) + markPriceConfig := &types.CompositePriceConfiguration{ + CompositePriceType: row.markPriceType(), + DecayWeight: row.decayWeight(), + DecayPower: row.decayPower(), + CashAmount: row.cashAmount(), + SourceWeights: row.priceSourceWeights(), + SourceStalenessTolerance: row.priceSourceStalnessTolerance(), + DataSources: specs, + SpecBindingForCompositePrice: binding, + } + m := types.Market{ TradingMode: types.MarketTradingModeContinuous, State: types.MarketStateActive, @@ -397,6 +478,7 @@ func newPerpMarket(config *market.Config, row marketRow) types.Market { DecimalPlaces: row.decimalPlaces(), PositionDecimalPlaces: row.positionDecimalPlaces(), Fees: types.FeesFromProto(fees), + LiquidationStrategy: liqStrat, TradableInstrument: &types.TradableInstrument{ Instrument: &types.Instrument{ ID: fmt.Sprintf("Crypto/%s/Perpetual", row.id()), @@ -420,6 +502,7 @@ func newPerpMarket(config *market.Config, row marketRow) types.Market { LinearSlippageFactor: num.DecimalFromFloat(linearSlippageFactor), QuadraticSlippageFactor: num.DecimalFromFloat(quadraticSlippageFactor), LiquiditySLAParams: types.LiquiditySLAParamsFromProto(slaParams), + MarkPriceConfiguration: markPriceConfig, } if row.isSuccessor() { @@ -476,6 +559,15 @@ func newMarket(config *market.Config, row marketRow) types.Market { panic(err) } + lqs, err := config.LiquidationStrat.Get(row.liquidationStrat()) + if err != nil { + panic(err) + } + liqStrat, err := types.LiquidationStrategyFromProto(lqs) + if err != nil { + panic(err) + } + linearSlippageFactor := row.linearSlippageFactor() quadraticSlippageFactor := row.quadraticSlippageFactor() @@ -483,6 +575,19 @@ func newMarket(config *market.Config, row marketRow) types.Market { if err != nil { panic(err) } + + sources, bindings := row.oracles(config) + markPriceConfig := &types.CompositePriceConfiguration{ + CompositePriceType: row.markPriceType(), + DecayWeight: row.decayWeight(), + DecayPower: row.decayPower(), + CashAmount: row.cashAmount(), + SourceWeights: row.priceSourceWeights(), + SourceStalenessTolerance: row.priceSourceStalnessTolerance(), + DataSources: sources, + SpecBindingForCompositePrice: bindings, + } + m := types.Market{ TradingMode: types.MarketTradingModeContinuous, State: types.MarketStateActive, @@ -490,6 +595,7 @@ func newMarket(config *market.Config, row marketRow) types.Market { DecimalPlaces: row.decimalPlaces(), PositionDecimalPlaces: row.positionDecimalPlaces(), Fees: types.FeesFromProto(fees), + LiquidationStrategy: liqStrat, TradableInstrument: &types.TradableInstrument{ Instrument: &types.Instrument{ ID: fmt.Sprintf("Crypto/%s/Futures", row.id()), @@ -519,6 +625,7 @@ func newMarket(config *market.Config, row marketRow) types.Market { LinearSlippageFactor: num.DecimalFromFloat(linearSlippageFactor), QuadraticSlippageFactor: num.DecimalFromFloat(quadraticSlippageFactor), LiquiditySLAParams: types.LiquiditySLAParamsFromProto(slaParams), + MarkPriceConfiguration: markPriceConfig, } if row.isSuccessor() { @@ -572,6 +679,18 @@ func parseMarketsTable(table *godog.Table) []RowWrapper { "successor auction", "is passed", "market type", + "liquidation strategy", + "price type", + "decay weight", + "decay power", + "cash amount", + "source weights", + "source staleness tolerance", + "oracle1", + "oracle2", + "oracle3", + "oracle4", + "oracle5", }) } @@ -586,6 +705,19 @@ func parseMarketsUpdateTable(table *godog.Table) []RowWrapper { "risk model", // risk model update "liquidity monitoring", // liquidity monitoring update "sla params", + "liquidity fee settings", + "liquidation strategy", + "price type", + "decay weight", + "decay power", + "cash amount", + "source weights", + "source staleness tolerance", + "oracle1", + "oracle2", + "oracle3", + "oracle4", + "oracle5", }) } @@ -633,10 +765,129 @@ func (r marketUpdateRow) liquidityMonitoring() (string, bool) { return "", false } +func (r marketUpdateRow) liquidationStrat() (string, bool) { + if r.row.HasColumn("liquidation strategy") { + ls := r.row.MustStr("liquidation strategy") + return ls, true + } + return "", false +} + +func (r marketUpdateRow) priceSourceWeights() []num.Decimal { + if !r.row.HasColumn("source weights") { + return []num.Decimal{num.DecimalZero(), num.DecimalZero(), num.DecimalZero(), num.DecimalZero()} + } + weights := strings.Split(r.row.mustColumn("source weights"), ",") + d := make([]num.Decimal, 0, len(weights)) + for _, v := range weights { + d = append(d, num.MustDecimalFromString(v)) + } + return d +} + +func (r marketUpdateRow) compositePriceOracleFromName(config *market.Config, name string) (*datasource.Spec, *datasource.SpecBindingForCompositePrice) { + if !r.row.HasColumn(name) { + return nil, nil + } + + rawSpec, binding, err := config.OracleConfigs.GetOracleDefinitionForCompositePrice(r.row.Str(name)) + if err != nil { + return nil, nil + } + spec := datasource.FromOracleSpecProto(rawSpec) + filters := spec.Data.GetFilters() + ds := datasource.NewDefinition(datasource.ContentTypeOracle).SetOracleConfig( + &signedoracle.SpecConfiguration{ + Signers: spec.Data.GetSigners(), + Filters: filters, + }, + ) + return datasource.SpecFromDefinition(*ds), &datasource.SpecBindingForCompositePrice{PriceSourceProperty: binding.PriceSourceProperty} +} + +func (r marketUpdateRow) oracles(config *market.Config) ([]*datasource.Spec, []*datasource.SpecBindingForCompositePrice) { + specs := []*datasource.Spec{} + bindings := []*datasource.SpecBindingForCompositePrice{} + names := []string{"oracle1", "oracle2", "oracle3", "oracle4", "oracle5"} + for _, v := range names { + spec, binding := r.compositePriceOracleFromName(config, v) + if spec == nil { + continue + } + specs = append(specs, spec) + bindings = append(bindings, binding) + } + if len(specs) > 0 { + return specs, bindings + } + + return nil, nil +} + +func (r marketUpdateRow) priceSourceStalnessTolerance() []time.Duration { + if !r.row.HasColumn("source staleness tolerance") { + return []time.Duration{1000, 1000, 1000, 1000} + } + durations := strings.Split(r.row.mustColumn("source staleness tolerance"), ",") + d := make([]time.Duration, 0, len(durations)) + for _, v := range durations { + dur, err := time.ParseDuration(v) + if err != nil { + panic(err) + } + d = append(d, dur) + } + return d +} + +func (r marketUpdateRow) cashAmount() *num.Uint { + if !r.row.HasColumn("cash amount") { + return num.UintZero() + } + return num.MustUintFromString(r.row.mustColumn("cash amount"), 10) +} + +func (r marketUpdateRow) decayPower() num.Decimal { + if !r.row.HasColumn("decay power") { + return num.DecimalZero() + } + return num.MustDecimalFromString(r.row.mustColumn("decay power")) +} + +func (r marketUpdateRow) decayWeight() num.Decimal { + if !r.row.HasColumn("decay weight") { + return num.DecimalZero() + } + return num.MustDecimalFromString(r.row.mustColumn("decay weight")) +} + +func (r marketUpdateRow) markPriceType() types.CompositePriceType { + if !r.row.HasColumn("price type") { + return types.CompositePriceTypeByLastTrade + } + if r.row.mustColumn("price type") == "last trade" { + return types.CompositePriceTypeByLastTrade + } else if r.row.mustColumn("price type") == "median" { + return types.CompositePriceTypeByMedian + } else if r.row.mustColumn("price type") == "weight" { + return types.CompositePriceTypeByWeight + } else { + panic("invalid price type") + } +} + func (r marketRow) id() string { return r.row.MustStr("id") } +func (r marketRow) liquidationStrat() string { + if r.row.HasColumn("liquidation strategy") { + ls := r.row.MustStr("liquidation strategy") + return ls + } + return "" +} + func (r marketRow) decimalPlaces() uint64 { if !r.row.HasColumn("decimal places") { return 0 @@ -702,6 +953,14 @@ func (r marketUpdateRow) tryLiquiditySLA() (string, bool) { return "", false } +func (r marketUpdateRow) tryLiquidityFeeSettings() (string, bool) { + if r.row.HasColumn("liquidity fee settings") { + s := r.row.MustStr("liquidity fee settings") + return s, true + } + return "", false +} + func (r marketRow) linearSlippageFactor() float64 { if !r.row.HasColumn("linear slippage factor") { // set to 0.1 by default @@ -710,6 +969,108 @@ func (r marketRow) linearSlippageFactor() float64 { return r.row.MustF64("linear slippage factor") } +func (r marketRow) priceSourceWeights() []num.Decimal { + if !r.row.HasColumn("source weights") { + return []num.Decimal{num.DecimalZero(), num.DecimalZero(), num.DecimalZero(), num.DecimalZero()} + } + weights := strings.Split(r.row.mustColumn("source weights"), ",") + d := make([]num.Decimal, 0, len(weights)) + for _, v := range weights { + d = append(d, num.MustDecimalFromString(v)) + } + return d +} + +func (r marketRow) priceSourceStalnessTolerance() []time.Duration { + if !r.row.HasColumn("source staleness tolerance") { + return []time.Duration{1000, 1000, 1000, 1000} + } + durations := strings.Split(r.row.mustColumn("source staleness tolerance"), ",") + d := make([]time.Duration, 0, len(durations)) + for _, v := range durations { + dur, err := time.ParseDuration(v) + if err != nil { + panic(err) + } + d = append(d, dur) + } + return d +} + +func (r marketRow) cashAmount() *num.Uint { + if !r.row.HasColumn("cash amount") { + return num.UintZero() + } + return num.MustUintFromString(r.row.mustColumn("cash amount"), 10) +} + +func (r marketRow) decayPower() num.Decimal { + if !r.row.HasColumn("decay power") { + return num.DecimalZero() + } + return num.MustDecimalFromString(r.row.mustColumn("decay power")) +} + +func (r marketRow) decayWeight() num.Decimal { + if !r.row.HasColumn("decay weight") { + return num.DecimalZero() + } + return num.MustDecimalFromString(r.row.mustColumn("decay weight")) +} + +func (r marketRow) markPriceType() types.CompositePriceType { + if !r.row.HasColumn("price type") { + return types.CompositePriceTypeByLastTrade + } + if r.row.mustColumn("price type") == "last trade" { + return types.CompositePriceTypeByLastTrade + } else if r.row.mustColumn("price type") == "median" { + return types.CompositePriceTypeByMedian + } else if r.row.mustColumn("price type") == "weight" { + return types.CompositePriceTypeByWeight + } else { + panic("invalid price type") + } +} + +func (r marketRow) compositePriceOracleFromName(config *market.Config, name string) (*datasource.Spec, *datasource.SpecBindingForCompositePrice) { + if !r.row.HasColumn(name) { + return nil, nil + } + rawSpec, binding, err := config.OracleConfigs.GetOracleDefinitionForCompositePrice(r.row.Str(name)) + if err != nil { + return nil, nil + } + spec := datasource.FromOracleSpecProto(rawSpec) + filters := spec.Data.GetFilters() + ds := datasource.NewDefinition(datasource.ContentTypeOracle).SetOracleConfig( + &signedoracle.SpecConfiguration{ + Signers: spec.Data.GetSigners(), + Filters: filters, + }, + ) + return datasource.SpecFromDefinition(*ds), &datasource.SpecBindingForCompositePrice{PriceSourceProperty: binding.PriceSourceProperty} +} + +func (r marketRow) oracles(config *market.Config) ([]*datasource.Spec, []*datasource.SpecBindingForCompositePrice) { + specs := []*datasource.Spec{} + bindings := []*datasource.SpecBindingForCompositePrice{} + names := []string{"oracle1", "oracle2", "oracle3", "oracle4", "oracle5"} + for _, v := range names { + spec, binding := r.compositePriceOracleFromName(config, v) + if spec == nil { + continue + } + specs = append(specs, spec) + bindings = append(bindings, binding) + } + if len(specs) > 0 { + return specs, bindings + } + + return nil, nil +} + func (r marketRow) quadraticSlippageFactor() float64 { if !r.row.HasColumn("quadratic slippage factor") { // set to 0.1 by default diff --git a/core/integration/steps/the_oracle_spec.go b/core/integration/steps/the_oracle_spec.go index d996ec6f2c..6350e27e24 100644 --- a/core/integration/steps/the_oracle_spec.go +++ b/core/integration/steps/the_oracle_spec.go @@ -20,14 +20,14 @@ import ( "fmt" "time" - "github.com/cucumber/godog" - dstypes "code.vegaprotocol.io/vega/core/datasource/common" "code.vegaprotocol.io/vega/core/integration/steps/market" "code.vegaprotocol.io/vega/libs/ptr" vgrand "code.vegaprotocol.io/vega/libs/rand" protoTypes "code.vegaprotocol.io/vega/protos/vega" datav1 "code.vegaprotocol.io/vega/protos/vega/data/v1" + + "github.com/cucumber/godog" ) func TheOracleSpec(config *market.Config, name string, specType string, rawPubKeys string, table *godog.Table) error { diff --git a/core/integration/steps/the_oracle_spec_for_composite_price.go b/core/integration/steps/the_oracle_spec_for_composite_price.go new file mode 100644 index 0000000000..024a8d538c --- /dev/null +++ b/core/integration/steps/the_oracle_spec_for_composite_price.go @@ -0,0 +1,105 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package steps + +import ( + dstypes "code.vegaprotocol.io/vega/core/datasource/common" + "code.vegaprotocol.io/vega/core/integration/steps/market" + vgrand "code.vegaprotocol.io/vega/libs/rand" + protoTypes "code.vegaprotocol.io/vega/protos/vega" + datav1 "code.vegaprotocol.io/vega/protos/vega/data/v1" + + "github.com/cucumber/godog" +) + +func TheCompositePriceOracleSpec(config *market.Config, keys string, table *godog.Table) error { + pubKeys := StrSlice(keys, ",") + pubKeysSigners := make([]*datav1.Signer, len(pubKeys)) + for i, s := range pubKeys { + pks := dstypes.CreateSignerFromString(s, dstypes.SignerTypePubKey) + pubKeysSigners[i] = pks.IntoProto() + } + + rows := parseCompositePriceOracleTable(table) + for _, r := range rows { + row := compositePriceOracleRow{row: r} + name := row.name() + priceP := row.priceProperty() + binding := &protoTypes.SpecBindingForCompositePrice{ + PriceSourceProperty: priceP, + } + filters := []*datav1.Filter{ + { + Key: &datav1.PropertyKey{ + Name: priceP, + Type: row.priceType(), + NumberDecimalPlaces: row.priceDecimals(), + }, + Conditions: []*datav1.Condition{}, + }, + } + + ds := &protoTypes.DataSourceSpec{ + Id: vgrand.RandomStr(10), + Data: protoTypes.NewDataSourceDefinition( + protoTypes.DataSourceContentTypeOracle, + ).SetOracleConfig( + &protoTypes.DataSourceDefinitionExternal_Oracle{ + Oracle: &protoTypes.DataSourceSpecConfiguration{ + Signers: pubKeysSigners, + Filters: filters[:1], + }, + }, + ), + } + config.OracleConfigs.AddCompositePriceOracle(name, ds, binding) + } + return nil +} + +func parseCompositePriceOracleTable(table *godog.Table) []RowWrapper { + return StrictParseTable(table, []string{ + "name", + "price property", + "price type", + }, []string{ + "price decimals", + }) +} + +type compositePriceOracleRow struct { + row RowWrapper +} + +func (p compositePriceOracleRow) name() string { + return p.row.MustStr("name") +} + +func (p compositePriceOracleRow) priceProperty() string { + return p.row.MustStr("price property") +} + +func (p compositePriceOracleRow) priceType() datav1.PropertyKey_Type { + return p.row.MustOracleSpecPropertyType("price type") +} + +func (p compositePriceOracleRow) priceDecimals() *uint64 { + if !p.row.HasColumn("price decimals") { + return nil + } + v := p.row.MustU64("price decimals") + return &v +} diff --git a/core/integration/steps/the_oracle_spec_for_perps.go b/core/integration/steps/the_oracle_spec_for_perps.go index 843f696078..ac836f19b5 100644 --- a/core/integration/steps/the_oracle_spec_for_perps.go +++ b/core/integration/steps/the_oracle_spec_for_perps.go @@ -16,12 +16,17 @@ package steps import ( + "strings" + "time" + dstypes "code.vegaprotocol.io/vega/core/datasource/common" "code.vegaprotocol.io/vega/core/integration/steps/market" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/ptr" vgrand "code.vegaprotocol.io/vega/libs/rand" protoTypes "code.vegaprotocol.io/vega/protos/vega" datav1 "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/cucumber/godog" ) @@ -59,13 +64,36 @@ func ThePerpsOracleSpec(config *market.Config, keys string, table *godog.Table) Conditions: []*datav1.Condition{}, }, } + + internalCompositePriceConfig := &protoTypes.CompositePriceConfiguration{} + internalCompositePriceConfig.CompositePriceType = row.row.MarkPriceType() + + if row.row.HasColumn("decay power") { + internalCompositePriceConfig.DecayPower = row.DecayPower() + } + if row.row.HasColumn("decay weight") { + internalCompositePriceConfig.DecayWeight = row.DecayWeight() + } + if row.row.HasColumn("cash amount") { + internalCompositePriceConfig.CashAmount = row.CashAmount() + } + if row.row.HasColumn("source weights") { + internalCompositePriceConfig.SourceWeights = row.PriceSourceWeights() + } + if row.row.HasColumn("source staleness tolerance") { + internalCompositePriceConfig.SourceStalenessTolerance = row.PriceSourceStalnessTolerance() + } + perp := &protoTypes.Perpetual{ - SettlementAsset: row.Asset(), - QuoteName: row.QuoteName(), - MarginFundingFactor: row.MarginFundingFactor().String(), - InterestRate: row.InterestRate().String(), - ClampLowerBound: row.LowerClamp().String(), - ClampUpperBound: row.UpperClamp().String(), + SettlementAsset: row.Asset(), + QuoteName: row.QuoteName(), + MarginFundingFactor: row.MarginFundingFactor().String(), + InterestRate: row.InterestRate().String(), + ClampLowerBound: row.LowerClamp().String(), + ClampUpperBound: row.UpperClamp().String(), + FundingRateScalingFactor: row.FundingRateScalingFactor(), + FundingRateLowerBound: row.FundingRateLowerBound(), + FundingRateUpperBound: row.FundingRateUpperBound(), DataSourceSpecForSettlementData: &protoTypes.DataSourceSpec{ Id: vgrand.RandomStr(10), Data: protoTypes.NewDataSourceDefinition( @@ -92,7 +120,8 @@ func ThePerpsOracleSpec(config *market.Config, keys string, table *godog.Table) }, ), }, - DataSourceSpecBinding: binding, + DataSourceSpecBinding: binding, + InternalCompositePriceConfig: internalCompositePriceConfig, } if err := config.OracleConfigs.AddPerp(name, perp); err != nil { return err @@ -116,6 +145,15 @@ func parseOraclePerpsTable(table *godog.Table) []RowWrapper { "clamp lower bound", "clamp upper bound", "quote name", + "funding rate scaling factor", + "funding rate lower bound", + "funding rate upper bound", + "price type", + "decay weight", + "decay power", + "cash amount", + "source weights", + "source staleness tolerance", }) } @@ -154,6 +192,27 @@ func (p perpOracleRow) QuoteName() string { return p.row.MustStr("quote name") } +func (p perpOracleRow) FundingRateScalingFactor() *string { + if !p.row.HasColumn("funding rate scaling factor") { + return nil + } + return ptr.From(p.row.MustDecimal("funding rate scaling factor").String()) +} + +func (p perpOracleRow) FundingRateUpperBound() *string { + if !p.row.HasColumn("funding rate upper bound") { + return nil + } + return ptr.From(p.row.MustDecimal("funding rate upper bound").String()) +} + +func (p perpOracleRow) FundingRateLowerBound() *string { + if !p.row.HasColumn("funding rate lower bound") { + return nil + } + return ptr.From(p.row.MustDecimal("funding rate lower bound").String()) +} + func (p perpOracleRow) MarginFundingFactor() num.Decimal { if !p.row.HasColumn("margin funding factor") { return num.DecimalZero() @@ -189,3 +248,48 @@ func (p perpOracleRow) SettlementDecimals() *uint64 { v := p.row.MustU64("settlement decimals") return &v } + +func (r perpOracleRow) CashAmount() string { + if !r.row.HasColumn("cash amount") { + return "" + } + return r.row.MustDecimal("cash amount").String() +} + +func (r perpOracleRow) DecayPower() uint64 { + if !r.row.HasColumn("decay power") { + return 0 + } + return r.row.MustU64("decay power") +} + +func (r perpOracleRow) DecayWeight() string { + if !r.row.HasColumn("decay weight") { + return "0" + } + return r.row.MustDecimal("decay weight").String() +} + +func (r perpOracleRow) PriceSourceWeights() []string { + if !r.row.HasColumn("source weights") { + return []string{"0", "0", "0", "0"} + } + weights := strings.Split(r.row.mustColumn("source weights"), ",") + for _, v := range weights { + num.MustDecimalFromString(v) + } + return weights +} + +func (r perpOracleRow) PriceSourceStalnessTolerance() []string { + if !r.row.HasColumn("source staleness tolerance") { + return []string{"1000s", "1000s", "1000s", "1000s"} + } + durations := strings.Split(r.row.mustColumn("source staleness tolerance"), ",") + for _, v := range durations { + if _, err := time.ParseDuration(v); err != nil { + panic(err) + } + } + return durations +} diff --git a/core/integration/steps/the_orders_should_have_the_following_states.go b/core/integration/steps/the_orders_should_have_the_following_states.go index 35f4cd511b..3e44b55ea9 100644 --- a/core/integration/steps/the_orders_should_have_the_following_states.go +++ b/core/integration/steps/the_orders_should_have_the_following_states.go @@ -19,11 +19,12 @@ import ( "fmt" "code.vegaprotocol.io/vega/core/integration/stubs" + "github.com/cucumber/godog" ) func TheOrdersShouldHaveTheFollowingStates(broker *stubs.BrokerStub, table *godog.Table) error { - data := broker.GetOrderEvents() + orderEvents := broker.GetOrderEvents() for _, row := range parseOrdersStatesTable(table) { party := row.MustStr("party") @@ -31,23 +32,36 @@ func TheOrdersShouldHaveTheFollowingStates(broker *stubs.BrokerStub, table *godo side := row.MustSide("side") size := row.MustU64("volume") price := row.MustU64("price") + remaining := row.MustU64("remaining") status := row.MustOrderStatus("status") ref, hasRef := row.StrB("reference") match := false - for _, e := range data { + for i := len(orderEvents) - 1; i >= 0; i-- { + e := orderEvents[i] o := e.Order() if hasRef { if ref != o.Reference { continue } if o.PartyId == party && o.Status == status && o.MarketId == marketID && o.Side == side { - if o.Size != size || stringToU64(o.Price) != price { - return fmt.Errorf("side: %s, expected price: %v actual: %v, expected volume: %v, actual %v", side.String(), price, o.Price, size, o.Size) + if o.Size != size || stringToU64(o.Price) != price || o.Remaining != remaining { + return formatDiff(fmt.Sprintf("the order didn't match the expectation for reference %q", ref), + map[string]string{ + "size": u64ToS(size), + "price": u64ToS(price), + "remaining": u64ToS(remaining), + }, + map[string]string{ + "size": u64ToS(o.Size), + "price": o.Price, + "remaining": u64ToS(o.Remaining), + }, + ) } } } - if o.PartyId != party || o.Status != status || o.MarketId != marketID || o.Side != side || o.Size != size || stringToU64(o.Price) != price { + if o.PartyId != party || o.Status != status || o.MarketId != marketID || o.Side != side || o.Size != size || stringToU64(o.Price) != price || o.Remaining != remaining { continue } match = true @@ -67,6 +81,9 @@ func parseOrdersStatesTable(table *godog.Table) []RowWrapper { "side", "volume", "price", + "remaining", "status", - }, []string{"reference"}) + }, []string{ + "reference", + }) } diff --git a/core/integration/steps/the_orders_should_have_the_following_status.go b/core/integration/steps/the_orders_should_have_the_following_status.go index ea627e2522..cc48f8d27c 100644 --- a/core/integration/steps/the_orders_should_have_the_following_status.go +++ b/core/integration/steps/the_orders_should_have_the_following_status.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/core/integration/stubs" types "code.vegaprotocol.io/vega/protos/vega" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/the_parties_update_margin_mode.go b/core/integration/steps/the_parties_update_margin_mode.go new file mode 100644 index 0000000000..cc1c595343 --- /dev/null +++ b/core/integration/steps/the_parties_update_margin_mode.go @@ -0,0 +1,69 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package steps + +import ( + "context" + "fmt" + + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" + + "github.com/cucumber/godog" +) + +func ThePartiesUpdateMarginMode( + execution Execution, + table *godog.Table, +) error { + for _, r := range parseUpdateMarginModeTable(table) { + party := r.MustStr("party") + market := r.MustStr("market") + var marginMode types.MarginMode + if r.MustStr("margin_mode") == "cross margin" { + marginMode = types.MarginModeCrossMargin + } else if r.MustStr("margin_mode") == "isolated margin" { + marginMode = types.MarginModeIsolatedMargin + } else { + panic(fmt.Errorf("invalid margin mode")) + } + factor := num.DecimalZero() + if r.HasColumn("margin_factor") && marginMode == types.MarginModeIsolatedMargin { + factor = num.MustDecimalFromString(r.MustStr("margin_factor")) + } + err := execution.UpdateMarginMode(context.Background(), party, market, marginMode, factor) + if r.HasColumn("error") && len(r.Str("error")) > 0 && (err == nil || err != nil && r.Str("error") != err.Error()) { + gotError := "" + if err != nil { + gotError = err.Error() + } + return fmt.Errorf("invalid error expected %v got %v", r.Str("error"), gotError) + } + } + + return nil +} + +func parseUpdateMarginModeTable(table *godog.Table) []RowWrapper { + return StrictParseTable(table, []string{ + "party", + "market", + "margin_mode", + }, []string{ + "margin_factor", + "error", + }) +} diff --git a/core/integration/steps/the_price_monitoring.go b/core/integration/steps/the_price_monitoring.go index aee34e614d..b354e970ee 100644 --- a/core/integration/steps/the_price_monitoring.go +++ b/core/integration/steps/the_price_monitoring.go @@ -18,10 +18,10 @@ package steps import ( "fmt" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/steps/market" types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" ) func ThePriceMonitoring(config *market.Config, name string, table *godog.Table) error { diff --git a/core/integration/steps/the_price_monitoring_bounds_for_the_market_should_be.go b/core/integration/steps/the_price_monitoring_bounds_for_the_market_should_be.go index f620d71acc..cd1a528f44 100644 --- a/core/integration/steps/the_price_monitoring_bounds_for_the_market_should_be.go +++ b/core/integration/steps/the_price_monitoring_bounds_for_the_market_should_be.go @@ -19,6 +19,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/core/types" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/the_product_data_should_be.go b/core/integration/steps/the_product_data_should_be.go new file mode 100644 index 0000000000..6f0ed1ae8b --- /dev/null +++ b/core/integration/steps/the_product_data_should_be.go @@ -0,0 +1,128 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package steps + +import ( + "fmt" + + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" +) + +func TheProductDataShouldBe(engine Execution, mID string, data *godog.Table) error { + actual, err := engine.GetMarketData(mID) + if err != nil { + return err + } + + for _, row := range parseProductDataTable(data) { + expect := ProductDataWrapper{ + row: row, + } + err := checkProductData(*actual.ProductData, expect) + if err != nil { + return err + } + } + return nil +} + +func checkProductData(pd types.ProductData, row ProductDataWrapper) error { + perpData := pd.Data.IntoProto().GetPerpetualData() + + expectedInternalTwap := row.InternalTWAP() + actualInternalTwap := perpData.InternalTwap + if expectedInternalTwap != actualInternalTwap { + return fmt.Errorf("expected '%s' for InternalTWAP, instead got '%s'", expectedInternalTwap, actualInternalTwap) + } + + expectedExternalTwap := row.ExternalTWAP() + actualExternalTwap := perpData.ExternalTwap + if expectedExternalTwap != actualExternalTwap { + return fmt.Errorf("expected '%s' for InternalTWAP, instead got '%s'", expectedExternalTwap, actualExternalTwap) + } + + expectedFundingPayment, b := row.FundingPayment() + actualFundingPayment := perpData.FundingPayment + if b && expectedFundingPayment != actualFundingPayment { + return fmt.Errorf("expected '%s' for funding payment, instead got '%s'", expectedFundingPayment, actualFundingPayment) + } + + expectedFundingRate, b := row.FundingRate() + actualFundingRate := perpData.FundingRate + if b && expectedFundingRate != actualFundingRate { + return fmt.Errorf("expected '%s' for funding rate, instead got '%s'", expectedFundingRate, actualFundingRate) + } + + expectedInternalCompositePrice, b := row.InternalCompositePrice() + actualInternalCompositePrice := perpData.InternalCompositePrice + if b && expectedInternalCompositePrice != actualInternalCompositePrice { + return fmt.Errorf("expected '%s' for funding rate, instead got '%s'", expectedFundingRate, actualFundingRate) + } + + expectedInternalCompositePriceType, b := row.PriceType() + actualInternalCompositePriceType := perpData.InternalCompositePriceType + if b && expectedInternalCompositePriceType != actualInternalCompositePriceType { + return fmt.Errorf("expected '%s' for funding rate, instead got '%s'", expectedFundingRate, actualFundingRate) + } + + return nil +} + +func parseProductDataTable(table *godog.Table) []RowWrapper { + return StrictParseTable(table, []string{ + "internal twap", + "external twap", + }, []string{ + "funding payment", + "funding rate", + "internal composite price", + "price type", + }) +} + +type ProductDataWrapper struct { + row RowWrapper +} + +func (f ProductDataWrapper) InternalTWAP() string { + return f.row.MustStr("internal twap") +} + +func (f ProductDataWrapper) ExternalTWAP() string { + return f.row.MustStr("external twap") +} + +func (f ProductDataWrapper) FundingPayment() (string, bool) { + return f.row.StrB("funding payment") +} + +func (f ProductDataWrapper) FundingRate() (string, bool) { + return f.row.StrB("funding rate") +} + +func (f ProductDataWrapper) InternalCompositePrice() (string, bool) { + return f.row.StrB("internal composite price") +} + +func (f ProductDataWrapper) PriceType() (vega.CompositePriceType, bool) { + if !f.row.HasColumn("price type") { + return types.CompositePriceTypeByLastTrade, false + } + return f.row.MarkPriceType(), true +} diff --git a/core/integration/steps/the_referral_benefit_tiers_configuration.go b/core/integration/steps/the_referral_benefit_tiers_configuration.go index adcb94ddfc..98e46cc734 100644 --- a/core/integration/steps/the_referral_benefit_tiers_configuration.go +++ b/core/integration/steps/the_referral_benefit_tiers_configuration.go @@ -19,6 +19,7 @@ import ( referralcfg "code.vegaprotocol.io/vega/core/integration/steps/referral" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/the_referral_program.go b/core/integration/steps/the_referral_program.go index 6b9b5a56d1..205e823172 100644 --- a/core/integration/steps/the_referral_program.go +++ b/core/integration/steps/the_referral_program.go @@ -21,10 +21,10 @@ import ( referralcfg "code.vegaprotocol.io/vega/core/integration/steps/referral" "code.vegaprotocol.io/vega/core/referral" + "code.vegaprotocol.io/vega/core/types" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/types" + "github.com/cucumber/godog" ) func TheReferralProgram(referralProgramConfig *referralcfg.Config, referralProgramEngine *referral.Engine, table *godog.Table) error { diff --git a/core/integration/steps/the_referral_set_stats_should_be.go b/core/integration/steps/the_referral_set_stats_should_be.go index acd6d16d59..45374b8a60 100644 --- a/core/integration/steps/the_referral_set_stats_should_be.go +++ b/core/integration/steps/the_referral_set_stats_should_be.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/integration/stubs" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/cucumber/godog" "golang.org/x/exp/maps" "golang.org/x/exp/slices" diff --git a/core/integration/steps/the_referral_staking_tiers_configuration.go b/core/integration/steps/the_referral_staking_tiers_configuration.go index cdcbb77311..0d8630e5d2 100644 --- a/core/integration/steps/the_referral_staking_tiers_configuration.go +++ b/core/integration/steps/the_referral_staking_tiers_configuration.go @@ -19,6 +19,7 @@ import ( referralcfg "code.vegaprotocol.io/vega/core/integration/steps/referral" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/the_simple_risk_model.go b/core/integration/steps/the_simple_risk_model.go index 3bfd3c08b0..9cf9b6e534 100644 --- a/core/integration/steps/the_simple_risk_model.go +++ b/core/integration/steps/the_simple_risk_model.go @@ -16,10 +16,10 @@ package steps import ( - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/integration/steps/market" types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/cucumber/godog" ) func TheSimpleRiskModel(config *market.Config, name string, table *godog.Table) error { diff --git a/core/integration/steps/the_spot_markets.go b/core/integration/steps/the_spot_markets.go index c6a05fc999..c320899389 100644 --- a/core/integration/steps/the_spot_markets.go +++ b/core/integration/steps/the_spot_markets.go @@ -20,13 +20,13 @@ import ( "fmt" "time" - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/collateral" "code.vegaprotocol.io/vega/core/integration/steps/market" "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + + "github.com/cucumber/godog" ) func TheSpotMarketsUpdated( diff --git a/core/integration/steps/the_stop_order_should_have_the_following_state.go b/core/integration/steps/the_stop_order_should_have_the_following_state.go index a37fb2aa31..cb26e843fb 100644 --- a/core/integration/steps/the_stop_order_should_have_the_following_state.go +++ b/core/integration/steps/the_stop_order_should_have_the_following_state.go @@ -17,6 +17,7 @@ package steps import ( "code.vegaprotocol.io/vega/core/integration/stubs" + "github.com/cucumber/godog" ) diff --git a/core/integration/steps/the_validators.go b/core/integration/steps/the_validators.go index 13f22baff8..ebf27ffa1c 100644 --- a/core/integration/steps/the_validators.go +++ b/core/integration/steps/the_validators.go @@ -16,12 +16,11 @@ package steps import ( - "github.com/cucumber/godog" - "code.vegaprotocol.io/vega/core/delegation" - "code.vegaprotocol.io/vega/core/integration/stubs" "code.vegaprotocol.io/vega/libs/num" + + "github.com/cucumber/godog" ) func TheValidators( diff --git a/core/integration/steps/the_vesting_stats_should_be.go b/core/integration/steps/the_vesting_stats_should_be.go index 00092185a4..4b3352b7e2 100644 --- a/core/integration/steps/the_vesting_stats_should_be.go +++ b/core/integration/steps/the_vesting_stats_should_be.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/integration/stubs" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/cucumber/godog" "golang.org/x/exp/maps" "golang.org/x/exp/slices" diff --git a/core/integration/steps/the_volume_discount_stats_should_be.go b/core/integration/steps/the_volume_discount_stats_should_be.go index 1f9e5524e1..f60c3a8737 100644 --- a/core/integration/steps/the_volume_discount_stats_should_be.go +++ b/core/integration/steps/the_volume_discount_stats_should_be.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/integration/stubs" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/cucumber/godog" "golang.org/x/exp/maps" "golang.org/x/exp/slices" diff --git a/core/integration/steps/transfers.go b/core/integration/steps/transfers.go index e5689f62aa..40e38978bf 100644 --- a/core/integration/steps/transfers.go +++ b/core/integration/steps/transfers.go @@ -26,9 +26,38 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" proto "code.vegaprotocol.io/vega/protos/vega" + "github.com/cucumber/godog" ) +func PartiesAvailableFeeDiscounts( + engine *banking.Engine, + table *godog.Table, +) error { + errs := []error{} + for _, r := range parseTransferFeeDiscountTable(table) { + asset := r.MustStr("asset") + party := r.MustStr("party") + actual := engine.AvailableFeeDiscount(asset, party) + expected := r.MustStr("available discount") + if expected != actual.String() { + errs = append(errs, errors.New(r.MustStr("party")+" expected "+expected+" but got "+actual.String())) + } + } + if len(errs) > 0 { + return ErrStack(errs) + } + return nil +} + +func parseTransferFeeDiscountTable(table *godog.Table) []RowWrapper { + return StrictParseTable(table, []string{ + "party", + "asset", + "available discount", + }, []string{}) +} + func PartiesSubmitTransfers( engine *banking.Engine, table *godog.Table, diff --git a/core/integration/steps/validators_should_have_the_following_scores.go b/core/integration/steps/validators_should_have_the_following_scores.go index 3de42d2087..33b5d04ba7 100644 --- a/core/integration/steps/validators_should_have_the_following_scores.go +++ b/core/integration/steps/validators_should_have_the_following_scores.go @@ -18,9 +18,9 @@ package steps import ( "fmt" + "code.vegaprotocol.io/vega/core/integration/stubs" "code.vegaprotocol.io/vega/libs/num" - "code.vegaprotocol.io/vega/core/integration/stubs" "github.com/cucumber/godog" ) diff --git a/core/integration/steps/volume_discount_program.go b/core/integration/steps/volume_discount_program.go index d20d7888d0..4862b6f789 100644 --- a/core/integration/steps/volume_discount_program.go +++ b/core/integration/steps/volume_discount_program.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/core/volumediscount" "code.vegaprotocol.io/vega/libs/num" + "github.com/cucumber/godog" ) diff --git a/core/integration/stubs/broker_stub.go b/core/integration/stubs/broker_stub.go index 3cc2849a31..e1c1601f5d 100644 --- a/core/integration/stubs/broker_stub.go +++ b/core/integration/stubs/broker_stub.go @@ -21,10 +21,9 @@ import ( "fmt" "sync" - "code.vegaprotocol.io/vega/libs/broker" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/broker" proto "code.vegaprotocol.io/vega/protos/vega" vegapb "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" @@ -234,6 +233,21 @@ func (b *BrokerStub) GetLossSocializationEvents() []events.LossSocialization { return typed } +func (b *BrokerStub) GetLossSoc() []*events.LossSoc { + evts := b.GetImmBatch(events.LossSocializationEvent) + typed := make([]*events.LossSoc, 0, len(evts)) + for _, e := range evts { + switch le := e.(type) { + case events.LossSoc: + cpy := le + typed = append(typed, &cpy) + case *events.LossSoc: + typed = append(typed, le) + } + } + return typed +} + func (b *BrokerStub) ClearAllEvents() { b.mu.Lock() b.data = map[events.Type][]events.Event{} @@ -247,6 +261,13 @@ func (b *BrokerStub) ClearTransferResponseEvents() { b.mu.Unlock() } +func (b *BrokerStub) ClearTradeEvents() { + b.mu.Lock() + te := make([]events.Event, 0, len(b.data[events.TradeEvent])) + b.data[events.TradeEvent] = te + b.mu.Unlock() +} + // GetTransfers returns ledger entries, mutable argument specifies if these should be all the scenario events or events that can be cleared by the user. func (b *BrokerStub) GetTransfers(mutable bool) []*vegapb.LedgerEntry { transferEvents := b.GetLedgerMovements(mutable) @@ -415,6 +436,29 @@ func (b *BrokerStub) GetLastMarketUpdateState(marketID string) *vegapb.Market { return r } +func (b *BrokerStub) GetMarkPriceSettings(marketID string) *vegapb.CompositePriceConfiguration { + batch := b.GetBatch(events.MarketUpdatedEvent) + if len(batch) == 0 { + return nil + } + var r *vegapb.Market + for _, evt := range batch { + switch me := evt.(type) { + case *events.MarketUpdated: + if me.MarketID() == marketID { + t := me.Proto() + r = &t + } + case events.MarketUpdated: + if me.MarketID() == marketID { + t := me.Proto() + r = &t + } + } + } + return r.MarkPriceConfiguration +} + func (b *BrokerStub) GetOrdersByPartyAndMarket(party, market string) []vegapb.Order { orders := b.GetOrderEvents() ret := []vegapb.Order{} @@ -817,6 +861,17 @@ func (b *BrokerStub) GetMarketInfrastructureFeePoolAccount(asset string) (vegapb return vegapb.Account{}, errors.New("account does not exist") } +func (b *BrokerStub) GetPartyOrderMarginAccount(party, market string) (vegapb.Account, error) { + batch := b.GetAccountEvents() + for _, e := range batch { + v := e.Account() + if v.Owner == party && v.Type == vegapb.AccountType_ACCOUNT_TYPE_ORDER_MARGIN && v.MarketId == market { + return v, nil + } + } + return vegapb.Account{}, errors.New("account does not exist") +} + func (b *BrokerStub) GetPartyMarginAccount(party, market string) (vegapb.Account, error) { batch := b.GetAccountEvents() for _, e := range batch { @@ -840,16 +895,21 @@ func (b *BrokerStub) GetMarketSettlementAccount(market string) (vegapb.Account, } // GetPartyGeneralAccount returns the latest event WRT the party's general account. -func (b *BrokerStub) GetPartyGeneralAccount(party, asset string) (vegapb.Account, error) { +func (b *BrokerStub) GetPartyGeneralAccount(party, asset string) (ga vegapb.Account, err error) { batch := b.GetAccountEvents() + foundOne := false for _, e := range batch { v := e.Account() if v.Owner == party && v.Type == vegapb.AccountType_ACCOUNT_TYPE_GENERAL && v.Asset == asset { - return v, nil + ga = v + foundOne = true } } - - return vegapb.Account{}, errors.New("account does not exist") + if !foundOne { + ga = vegapb.Account{} + err = errors.New("account does not exist") + } + return } // GetPartyVestingAccount returns the latest event WRT the party's general account. diff --git a/core/integration/stubs/commander_stub.go b/core/integration/stubs/commander_stub.go index 1064d03cbc..203c8fb0a1 100644 --- a/core/integration/stubs/commander_stub.go +++ b/core/integration/stubs/commander_stub.go @@ -19,6 +19,7 @@ import ( "context" "code.vegaprotocol.io/vega/core/txn" + "github.com/cenkalti/backoff" "github.com/golang/protobuf/proto" ) diff --git a/core/integration/stubs/topology_stub.go b/core/integration/stubs/topology_stub.go index 27823014a1..4a15e078aa 100644 --- a/core/integration/stubs/topology_stub.go +++ b/core/integration/stubs/topology_stub.go @@ -21,9 +21,8 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/libs/num" - "code.vegaprotocol.io/vega/core/validators" + "code.vegaprotocol.io/vega/libs/num" ) type TopologyStub struct { diff --git a/core/limits/engine_test.go b/core/limits/engine_test.go index 0a12afbf50..231cbd7b10 100644 --- a/core/limits/engine_test.go +++ b/core/limits/engine_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/core/limits" "code.vegaprotocol.io/vega/core/limits/mocks" "code.vegaprotocol.io/vega/logging" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" ) diff --git a/core/limits/snapshot.go b/core/limits/snapshot.go index c164f87056..537fe1f8ae 100644 --- a/core/limits/snapshot.go +++ b/core/limits/snapshot.go @@ -19,7 +19,6 @@ import ( "context" "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/libs/proto" ) diff --git a/core/liquidity/supplied/engine.go b/core/liquidity/supplied/engine.go index 284c653daf..c11dd0f0a6 100644 --- a/core/liquidity/supplied/engine.go +++ b/core/liquidity/supplied/engine.go @@ -125,6 +125,9 @@ func (e *Engine) CalculateLiquidityScore( // if order is outside of price monitoring bounds then probability is set to 0. if o.Price.GTE(minPMPrice.Representation()) && o.Price.LTE(maxPMPrice.Representation()) { prob = getProbabilityOfTrading(bestBid, bestAsk, minPMPrice.Original(), maxPMPrice.Original(), e.pot, o.Price.ToDecimal(), o.Side == types.SideBuy, e.minProbabilityOfTrading, OffsetOneDecimal) + if prob.LessThanOrEqual(e.minProbabilityOfTrading) { + prob = num.DecimalZero() + } } s := num.DecimalFromUint(num.NewUint(o.Remaining)) l := prob.Mul(s) diff --git a/core/liquidity/supplied/statevar_test.go b/core/liquidity/supplied/statevar_test.go index 30b85e9748..2ecac69b6f 100644 --- a/core/liquidity/supplied/statevar_test.go +++ b/core/liquidity/supplied/statevar_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/risk/models" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/require" ) diff --git a/core/liquidity/target/engine_test.go b/core/liquidity/target/engine_test.go index 7119218b7b..a81b45c7dd 100644 --- a/core/liquidity/target/engine_test.go +++ b/core/liquidity/target/engine_test.go @@ -23,9 +23,9 @@ import ( "code.vegaprotocol.io/vega/core/liquidity/target/mocks" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" - "github.com/stretchr/testify/assert" "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/liquidity/target/snapshot_test.go b/core/liquidity/target/snapshot_test.go index 9236f0f818..b02447d522 100644 --- a/core/liquidity/target/snapshot_test.go +++ b/core/liquidity/target/snapshot_test.go @@ -22,12 +22,12 @@ import ( "testing" "time" - snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "code.vegaprotocol.io/vega/core/liquidity/target" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" + snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/stretchr/testify/assert" ) diff --git a/core/liquidity/target/spot/snapshot_test.go b/core/liquidity/target/spot/snapshot_test.go index 339294a5ee..3cda1b7e1c 100644 --- a/core/liquidity/target/spot/snapshot_test.go +++ b/core/liquidity/target/spot/snapshot_test.go @@ -22,12 +22,12 @@ import ( "testing" "time" - snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "code.vegaprotocol.io/vega/core/liquidity/target/spot" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" + snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/stretchr/testify/assert" ) diff --git a/core/liquidity/v2/amendments_test.go b/core/liquidity/v2/amendments_test.go index a089758f24..89054c1fbc 100644 --- a/core/liquidity/v2/amendments_test.go +++ b/core/liquidity/v2/amendments_test.go @@ -22,15 +22,14 @@ import ( "code.vegaprotocol.io/vega/core/idgeneration" "code.vegaprotocol.io/vega/core/liquidity/v2" + "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/crypto" + "code.vegaprotocol.io/vega/libs/num" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/libs/num" - commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" ) const ( diff --git a/core/liquidity/v2/engine_test.go b/core/liquidity/v2/engine_test.go index 4a542de360..fc5924460e 100644 --- a/core/liquidity/v2/engine_test.go +++ b/core/liquidity/v2/engine_test.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/liquidity/v2/scores_test.go b/core/liquidity/v2/scores_test.go index 933377324b..e6fd4ca8f9 100644 --- a/core/liquidity/v2/scores_test.go +++ b/core/liquidity/v2/scores_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) @@ -193,9 +194,9 @@ func (tng *testEngine) submitLiquidityProvisionAndCreateOrders( _, err := tng.engine.SubmitLiquidityProvision(ctx, lps, party, idgeneration.New(crypto.RandomHash())) require.NoError(t, err) - zero := num.UintOne() + price := num.NewUint(100) now := tng.tsvc.GetTimeNow() - tng.engine.ResetSLAEpoch(now, zero, zero, num.DecimalZero()) + tng.engine.ResetSLAEpoch(now, price, price, num.DecimalOne()) tng.engine.ApplyPendingProvisions(ctx, now) for _, o := range orders { diff --git a/core/liquidity/v2/sla_test.go b/core/liquidity/v2/sla_test.go index 6ad13db121..0083862eaa 100644 --- a/core/liquidity/v2/sla_test.go +++ b/core/liquidity/v2/sla_test.go @@ -22,17 +22,17 @@ import ( "testing" "time" + bmocks "code.vegaprotocol.io/vega/core/broker/mocks" + mmocks "code.vegaprotocol.io/vega/core/execution/common/mocks" "code.vegaprotocol.io/vega/core/integration/stubs" "code.vegaprotocol.io/vega/core/liquidity/v2" "code.vegaprotocol.io/vega/core/liquidity/v2/mocks" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" - - bmocks "code.vegaprotocol.io/vega/core/broker/mocks" - mmocks "code.vegaprotocol.io/vega/core/execution/common/mocks" ) const partyID = "lp-party-1" diff --git a/core/liquidity/v2/snapshot.go b/core/liquidity/v2/snapshot.go index 5d49415ebf..3557879b7a 100644 --- a/core/liquidity/v2/snapshot.go +++ b/core/liquidity/v2/snapshot.go @@ -262,6 +262,9 @@ func (e *snapshotV2) serialisePerformances() ([]byte, error) { LastEpochFractionOfTimeOnBook: partyPerformance.lastEpochTimeBookFraction, LastEpochFeePenalty: partyPerformance.lastEpochFeePenalty, LastEpochBondPenalty: partyPerformance.lastEpochBondPenalty, + RequiredLiquidity: partyPerformance.requiredLiquidity, + NotionalVolumeBuys: partyPerformance.notionalVolumeBuys, + NotionalVolumeSells: partyPerformance.notionalVolumeSells, } performancePerPartySnapshot = append(performancePerPartySnapshot, partyPerformanceSnapshot) diff --git a/core/liquidity/v2/snapshot_test.go b/core/liquidity/v2/snapshot_test.go index 5fd74cac47..426b67fa83 100644 --- a/core/liquidity/v2/snapshot_test.go +++ b/core/liquidity/v2/snapshot_test.go @@ -24,13 +24,12 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/proto" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "github.com/golang/mock/gomock" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "code.vegaprotocol.io/vega/libs/proto" ) func TestEngineSnapshotV2(t *testing.T) { @@ -101,6 +100,9 @@ func TestEngineSnapshotV2(t *testing.T) { "party-4": num.UintFromUint64(3), }) + preStats := originalEngine.engine.LiquidityProviderSLAStats(time.Now()) + require.Len(t, preStats, 2) + // Verifying we can salvage the state for each key, and they are a valid // Payload. engine1Keys := originalEngine.engine.V2StateProvider().Keys() @@ -187,6 +189,14 @@ func TestEngineSnapshotV2(t *testing.T) { assert.True(t, ok) assert.Equal(t, s1.String(), s2.String()) } + + postStats := otherEngine.engine.LiquidityProviderSLAStats(time.Now()) + require.Len(t, postStats, 2) + for i := range preStats { + assert.Equal(t, preStats[i].NotionalVolumeBuys, postStats[i].NotionalVolumeBuys) + assert.Equal(t, preStats[i].NotionalVolumeSells, postStats[i].NotionalVolumeSells) + assert.Equal(t, preStats[i].RequiredLiquidity, postStats[i].RequiredLiquidity) + } } func TestStopSnapshotTaking(t *testing.T) { diff --git a/core/liquidity/v2/types.go b/core/liquidity/v2/types.go index 3f442a8d99..f4b95990be 100644 --- a/core/liquidity/v2/types.go +++ b/core/liquidity/v2/types.go @@ -47,12 +47,36 @@ func (l Provisions) feeForTarget(t *num.Uint) num.Decimal { return l[len(l)-1].Fee } +// feeForWeightedAverage calculates the fee based on the weight average of the LP's commitment and their nominated fee factor. +func (l Provisions) feeForWeightedAverage() num.Decimal { + if len(l) == 0 { + return num.DecimalZero() + } + + sum := num.DecimalZero() + totalComittment := num.DecimalZero() + for _, i := range l { + sum = sum.Add(i.CommitmentAmount.ToDecimal().Mul(i.Fee)) + totalComittment = totalComittment.Add(i.CommitmentAmount.ToDecimal()) + } + if totalComittment.IsZero() { + return sum + } + return sum.Div(totalComittment) +} + // sortByFee sorts in-place and returns the LiquidityProvisions for convenience. func (l Provisions) sortByFee() Provisions { sort.Slice(l, func(i, j int) bool { return l[i].Fee.LessThan(l[j].Fee) }) return l } +// sortByCommitment sorts in-place and returns the LiquidityProvisions for convenience. +func (l Provisions) sortByCommitment() Provisions { + sort.Slice(l, func(i, j int) bool { return l[i].CommitmentAmount.LT(l[j].CommitmentAmount) }) + return l +} + func (pp Provisions) Get(key string) (*types.LiquidityProvision, int) { for idx, pp := range pp { if pp.Party == key { @@ -115,6 +139,10 @@ func (l ProvisionsPerParty) FeeForTarget(v *num.Uint) num.Decimal { return l.Slice().sortByFee().feeForTarget(v) } +func (l ProvisionsPerParty) FeeForWeightedAverage() num.Decimal { + return l.Slice().sortByCommitment().feeForWeightedAverage() +} + // TotalStake returns the sum of all CommitmentAmount, which corresponds to the // total stake of a market. func (l ProvisionsPerParty) TotalStake() *num.Uint { diff --git a/core/liquidity/v2/types_test.go b/core/liquidity/v2/types_test.go index 8bb6618e8b..a918b84960 100644 --- a/core/liquidity/v2/types_test.go +++ b/core/liquidity/v2/types_test.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/core/liquidity/v2" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -69,3 +70,24 @@ func TestPartiesTotalStake(t *testing.T) { } assert.Equal(t, num.NewUint(210), parties.TotalStake()) } + +func TestWeightAverageFee(t *testing.T) { + got := liquidity.ProvisionsPerParty{ + "p1": {CommitmentAmount: num.NewUint(20), Fee: num.DecimalFromFloat(2.0)}, + "p2": {CommitmentAmount: num.NewUint(60), Fee: num.DecimalFromFloat(1.0)}, + }.FeeForWeightedAverage() + + // (20 * 2) + (60 * 1) / 80 = 1.25 + assert.Equal(t, num.DecimalFromFloat(1.25).String(), got.String()) + + // no LPs + got = liquidity.ProvisionsPerParty{}.FeeForWeightedAverage() + assert.Equal(t, num.DecimalFromFloat(0).String(), got.String()) + + // LPs but all with 0 commitment for whatever reason + got = liquidity.ProvisionsPerParty{ + "p1": {CommitmentAmount: num.UintZero(), Fee: num.DecimalFromFloat(2.0)}, + "p2": {CommitmentAmount: num.UintZero(), Fee: num.DecimalFromFloat(1.0)}, + }.FeeForWeightedAverage() + assert.Equal(t, num.DecimalFromFloat(0).String(), got.String()) +} diff --git a/core/markets/instrument.go b/core/markets/instrument.go index 1b2a3f3ba6..87b26602ac 100644 --- a/core/markets/instrument.go +++ b/core/markets/instrument.go @@ -96,6 +96,10 @@ func NewInstrument(ctx context.Context, log *logging.Logger, pi *types.Instrumen }, err } +func (i *Instrument) UpdateAuctionState(ctx context.Context, enter bool) { + i.Product.UpdateAuctionState(ctx, enter) +} + func (i *Instrument) UnsubscribeTradingTerminated(ctx context.Context) { i.Product.UnsubscribeTradingTerminated(ctx) } diff --git a/core/markets/instrument_test.go b/core/markets/instrument_test.go index 743c38b95b..07b9ea14ca 100644 --- a/core/markets/instrument_test.go +++ b/core/markets/instrument_test.go @@ -26,11 +26,10 @@ import ( "code.vegaprotocol.io/vega/core/datasource/spec" emock "code.vegaprotocol.io/vega/core/execution/common/mocks" "code.vegaprotocol.io/vega/core/markets" - tmocks "code.vegaprotocol.io/vega/core/vegatime/mocks" - "code.vegaprotocol.io/vega/logging" - "code.vegaprotocol.io/vega/core/products" "code.vegaprotocol.io/vega/core/types" + tmocks "code.vegaprotocol.io/vega/core/vegatime/mocks" + "code.vegaprotocol.io/vega/logging" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" "github.com/golang/mock/gomock" diff --git a/core/matching/2385_panic_in_leave_opening_auction_test.go b/core/matching/2385_panic_in_leave_opening_auction_test.go index 27826abc9a..cf36068af9 100644 --- a/core/matching/2385_panic_in_leave_opening_auction_test.go +++ b/core/matching/2385_panic_in_leave_opening_auction_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" ) diff --git a/core/matching/cache_test.go b/core/matching/cache_test.go index 97d9ce8737..babc076be3 100644 --- a/core/matching/cache_test.go +++ b/core/matching/cache_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/matching" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" ) diff --git a/core/matching/networkorder_test.go b/core/matching/networkorder_test.go index 704418200f..ba786376ed 100644 --- a/core/matching/networkorder_test.go +++ b/core/matching/networkorder_test.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" ) diff --git a/core/matching/order_status_test.go b/core/matching/order_status_test.go index c5a8a53607..a9185185a7 100644 --- a/core/matching/order_status_test.go +++ b/core/matching/order_status_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/types" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" ) @@ -805,12 +806,13 @@ type marketPositionFake struct { party string } -func (m marketPositionFake) Party() string { return m.party } -func (m marketPositionFake) Size() int64 { return 0 } -func (m marketPositionFake) Buy() int64 { return 0 } -func (m marketPositionFake) Sell() int64 { return 0 } -func (m marketPositionFake) Price() *num.Uint { return num.UintZero() } -func (m marketPositionFake) BuySumProduct() *num.Uint { return num.UintZero() } -func (m marketPositionFake) SellSumProduct() *num.Uint { return num.UintZero() } -func (m marketPositionFake) VWBuy() *num.Uint { return num.UintZero() } -func (m marketPositionFake) VWSell() *num.Uint { return num.UintZero() } +func (m marketPositionFake) AverageEntryPrice() *num.Uint { return num.UintZero() } +func (m marketPositionFake) Party() string { return m.party } +func (m marketPositionFake) Size() int64 { return 0 } +func (m marketPositionFake) Buy() int64 { return 0 } +func (m marketPositionFake) Sell() int64 { return 0 } +func (m marketPositionFake) Price() *num.Uint { return num.UintZero() } +func (m marketPositionFake) BuySumProduct() *num.Uint { return num.UintZero() } +func (m marketPositionFake) SellSumProduct() *num.Uint { return num.UintZero() } +func (m marketPositionFake) VWBuy() *num.Uint { return num.UintZero() } +func (m marketPositionFake) VWSell() *num.Uint { return num.UintZero() } diff --git a/core/matching/orderbook.go b/core/matching/orderbook.go index e871064665..bfe7a2c73a 100644 --- a/core/matching/orderbook.go +++ b/core/matching/orderbook.go @@ -16,6 +16,7 @@ package matching import ( + "fmt" "sort" "sync" "time" @@ -258,6 +259,19 @@ func (b *OrderBook) LeaveAuction(at time.Time) ([]*types.OrderConfirmation, []*t return uncrossedOrders, ordersToCancel, nil } +// RollbackConfirmation is only used to restore the book if the margin check fails after a cancel and replace +// amendment of an order. We need to uncross the book to determine the exit price and calculate the margin correctly. +// if the margin check then fails, we should restore the passive orders to their original state on the book. +func (b *OrderBook) RollbackConfirmation(conf *types.OrderConfirmation, orders []*types.Order) error { + for _, o := range orders { + // we don't have to go through the SubmitOrder flow here, because the order was already validated + // and we know this order will not uncross. Replace or add this order wherever needed + b.add(o) // simply adds order to the map, reassigns if the order exists already + b.getSide(o.Side).replaceOrder(o) // replace will replace, or append if the order was removed somehow + } + return nil +} + func (b OrderBook) InAuction() bool { return b.auction } @@ -1113,6 +1127,15 @@ func (b *OrderBook) GetActivePeggedOrderIDs() []string { return pegged } +func (b *OrderBook) GetVolumeAtPrice(price *num.Uint, side types.Side) uint64 { + lvls := b.getSide(side).getLevelsForPrice(price) + vol := uint64(0) + for _, lvl := range lvls { + vol += lvl.volume + } + return vol +} + // icebergRefresh will restore the peaks of an iceberg order if they have drifted below the minimum value // if not the order remains unchanged. func (b *OrderBook) icebergRefresh(o *types.Order) { @@ -1173,3 +1196,42 @@ func (b *OrderBook) cleanup() { b.peggedCountNotify(-int64(b.peggedOrdersCount)) b.peggedOrdersCount = 0 } + +// VWAP returns an error if the total volume for the side of the book is less than the given volume or if there are no levels. +// Otherwise it returns the volume weighted average price for achieving the given volume. +func (b *OrderBook) VWAP(volume uint64, side types.Side) (*num.Uint, error) { + sidePriceLevels := b.buy + if side == types.SideSell { + sidePriceLevels = b.sell + } + dVol := num.DecimalFromInt64(int64(volume)) + remaining := volume + price := num.UintZero() + i := len(sidePriceLevels.levels) - 1 + if i < 0 { + return nil, fmt.Errorf("no orders in book for side") + } + + if volume == 0 && i >= 0 { + return sidePriceLevels.levels[i].price.Clone(), nil + } + + for { + if i < 0 || remaining == 0 { + break + } + size := remaining + if sidePriceLevels.levels[i].volume < remaining { + size = sidePriceLevels.levels[i].volume + } + price.AddSum(num.UintZero().Mul(sidePriceLevels.levels[i].price, num.NewUint(size))) + remaining -= size + i -= 1 + } + + if remaining == 0 { + res, _ := num.UintFromDecimal(price.ToDecimal().Div(dVol)) + return res, nil + } + return nil, fmt.Errorf("insufficient volume in order book") +} diff --git a/core/matching/orderbook_test.go b/core/matching/orderbook_test.go index 8f7704d1c4..0ac59d8fa1 100644 --- a/core/matching/orderbook_test.go +++ b/core/matching/orderbook_test.go @@ -18,6 +18,7 @@ package matching_test import ( "encoding/hex" "fmt" + "math/rand" "testing" "time" @@ -82,6 +83,232 @@ func TestOrderBook_CancelBulk(t *testing.T) { t.Run("Party with no order cancel nothing", partyWithNoOrderCancelNothing) } +func TestOrderBook_Rollback(t *testing.T) { + market := "testMarket" + book := getTestOrderBook(t, market) + defer book.Finish() + buyPrices := []uint64{ + 90, + 85, + 80, + 75, + 70, + 65, + 50, + } + sellPrices := []uint64{ + 100, + 105, + 110, + 120, + 125, + 130, + 150, + } + // populate a book with buy orders ranging between 50 and 90 + // sell orders starting at 100, up to 150. All orders have a size of 2 + orders := getTestOrders(t, market, 2, buyPrices, sellPrices) + clonedOrders := make([]*types.Order, 0, len(orders)) + for i, o := range orders { + o.ID = fmt.Sprintf("%s-%02d", o.Side, i) + o.Party = "fixture" + _, err := book.ob.SubmitOrder(o) + clonedOrders = append(clonedOrders, o.Clone()) + assert.NoError(t, err) + } + book.ob.LeaveAuction(time.Now()) + // get the order that we'll have uncross, and then have it roll back the trade + cross := getTestOrders(t, market, 3, []uint64{105}, []uint64{85}) + // first get the trades that we'd expect to see: + for i, c := range cross { + c.ID = fmt.Sprintf("CROSS-%02d", i) + c.Party = "trader" + c2 := c.Clone() + conf, err := book.ob.SubmitOrder(c) + // trades, err := book.ob.GetTrades(c) + require.NoError(t, err) + require.Equal(t, 2, len(conf.Trades)) + // get the original orders + checkSell := c.Side == types.SideBuy + restore := make([]*types.Order, 0, len(conf.Trades)) + for _, tr := range conf.Trades { + id := tr.BuyOrder + if checkSell { + id = tr.SellOrder + } + for _, co := range clonedOrders { + if co.ID == id { + restore = append(restore, co) + break + } + } + } + book.ob.RollbackConfirmation(conf, restore) + book.ob.RemoveOrder(conf.Order.ID) + // now submitting the order a second time should yield the same confirmation object: + conf2, err := book.ob.SubmitOrder(c2) + require.NoError(t, err) + require.EqualValues(t, conf, conf2) + } +} + +func TestGetVolumeAtPrice(t *testing.T) { + market := "testMarket" + book := getTestOrderBook(t, market) + defer book.Finish() + + buyPrices := []uint64{ + 90, + 85, + 80, + 75, + 70, + 65, + 50, + } + sellPrices := []uint64{ + 100, + 105, + 110, + 120, + 125, + 130, + 150, + } + // populate a book with buy orders ranging between 50 and 90 + // sell orders starting at 100, up to 150. All orders have a size of 2 + orders := getTestOrders(t, market, 2, buyPrices, sellPrices) + for _, o := range orders { + _, err := book.ob.SubmitOrder(o) + assert.NoError(t, err) + } + t.Run("Getting volume at price with a single price level returns the volume for that price level", func(t *testing.T) { + // check the buy side + v := book.ob.GetVolumeAtPrice(num.NewUint(buyPrices[0]), types.SideBuy) + require.Equal(t, uint64(2), v) + // check the sell side + v = book.ob.GetVolumeAtPrice(num.NewUint(sellPrices[0]), types.SideSell) + require.Equal(t, uint64(2), v) + }) + t.Run("Getting volume at price containing all price levels returns the total volume on that side of the book", func(t *testing.T) { + v := book.ob.GetVolumeAtPrice(num.NewUint(buyPrices[len(buyPrices)-1]), types.SideBuy) + exp := uint64(len(buyPrices) * 2) + require.Equal(t, exp, v) + v = book.ob.GetVolumeAtPrice(num.NewUint(sellPrices[len(sellPrices)-1]), types.SideSell) + exp = uint64(len(sellPrices) * 2) + require.Equal(t, exp, v) + }) + t.Run("Getting volume at a price that is out of range returns zero volume", func(t *testing.T) { + v := book.ob.GetVolumeAtPrice(num.NewUint(buyPrices[0]+1), types.SideBuy) + require.Equal(t, uint64(0), v) + // check the sell side + v = book.ob.GetVolumeAtPrice(num.NewUint(sellPrices[0]-1), types.SideSell) + require.Equal(t, uint64(0), v) + }) + t.Run("Getting volume at price allowing for more than all price levels returns the total volume on that side of the book", func(t *testing.T) { + // lowest buy order -1 + v := book.ob.GetVolumeAtPrice(num.NewUint(buyPrices[len(buyPrices)-1]-1), types.SideBuy) + exp := uint64(len(buyPrices) * 2) + require.Equal(t, exp, v) + // highest sell order on the book +1 + v = book.ob.GetVolumeAtPrice(num.NewUint(sellPrices[len(sellPrices)-1]+1), types.SideSell) + exp = uint64(len(sellPrices) * 2) + require.Equal(t, exp, v) + }) + t.Run("Getting volume at a price that is somewhere in the middle returns the correct volume", func(t *testing.T) { + idx := len(buyPrices) / 2 + // remember: includes 0 idx + exp := uint64(idx*2 + 2) + v := book.ob.GetVolumeAtPrice(num.NewUint(buyPrices[idx]), types.SideBuy) + require.Equal(t, exp, v) + idx = len(sellPrices) / 2 + exp = uint64(idx*2 + 2) + v = book.ob.GetVolumeAtPrice(num.NewUint(sellPrices[idx]), types.SideSell) + require.Equal(t, exp, v) + }) +} + +func TestGetVolumeAtPriceIceberg(t *testing.T) { + market := "testMarket" + book := getTestOrderBook(t, market) + defer book.Finish() + + buyPrices := []uint64{ + 90, + 85, + 80, + 75, + 70, + 65, + 50, + } + sellPrices := []uint64{ + 100, + 105, + 110, + 120, + 125, + 130, + 150, + } + // populate a book with buy orders ranging between 50 and 90 + // sell orders starting at 100, up to 150. All orders are iceberg orders with a visible size of 2, hidden size of 2. + orders := getTestOrders(t, market, 4, buyPrices, sellPrices) + for _, o := range orders { + // make this an iceberg order + o.IcebergOrder = &types.IcebergOrder{ + PeakSize: 2, + MinimumVisibleSize: 2, + } + _, err := book.ob.SubmitOrder(o) + assert.NoError(t, err) + } + t.Run("Getting volume at price with a single price level returns the volume for that price level", func(t *testing.T) { + // check the buy side + v := book.ob.GetVolumeAtPrice(num.NewUint(buyPrices[0]), types.SideBuy) + require.Equal(t, uint64(4), v) + // check the sell side + v = book.ob.GetVolumeAtPrice(num.NewUint(sellPrices[0]), types.SideSell) + require.Equal(t, uint64(4), v) + }) + t.Run("Getting volume at price containing all price levels returns the total volume on that side of the book", func(t *testing.T) { + v := book.ob.GetVolumeAtPrice(num.NewUint(buyPrices[len(buyPrices)-1]), types.SideBuy) + exp := uint64(len(buyPrices) * 4) + require.Equal(t, exp, v) + v = book.ob.GetVolumeAtPrice(num.NewUint(sellPrices[len(sellPrices)-1]), types.SideSell) + exp = uint64(len(sellPrices) * 4) + require.Equal(t, exp, v) + }) + t.Run("Getting volume at a price that is out of range returns zero volume", func(t *testing.T) { + v := book.ob.GetVolumeAtPrice(num.NewUint(buyPrices[0]+1), types.SideBuy) + require.Equal(t, uint64(0), v) + // check the sell side + v = book.ob.GetVolumeAtPrice(num.NewUint(sellPrices[0]-1), types.SideSell) + require.Equal(t, uint64(0), v) + }) + t.Run("Getting volume at price allowing for more than all price levels returns the total volume on that side of the book", func(t *testing.T) { + // lowest buy order -1 + v := book.ob.GetVolumeAtPrice(num.NewUint(buyPrices[len(buyPrices)-1]-1), types.SideBuy) + exp := uint64(len(buyPrices) * 4) + require.Equal(t, exp, v) + // highest sell order on the book +1 + v = book.ob.GetVolumeAtPrice(num.NewUint(sellPrices[len(sellPrices)-1]+1), types.SideSell) + exp = uint64(len(sellPrices) * 4) + require.Equal(t, exp, v) + }) + t.Run("Getting volume at a price that is somewhere in the middle returns the correct volume", func(t *testing.T) { + idx := len(buyPrices) / 2 + // remember: includes 0 idx + exp := uint64(idx*4 + 4) + v := book.ob.GetVolumeAtPrice(num.NewUint(buyPrices[idx]), types.SideBuy) + require.Equal(t, exp, v) + idx = len(sellPrices) / 2 + exp = uint64(idx*4 + 4) + v = book.ob.GetVolumeAtPrice(num.NewUint(sellPrices[idx]), types.SideSell) + require.Equal(t, exp, v) + }) +} + func TestHash(t *testing.T) { market := "testMarket" book := getTestOrderBook(t, market) @@ -3594,3 +3821,197 @@ func TestOrderBook_AuctionUncrossWashTrades2(t *testing.T) { require.Equal(t, c.Trades[0].Price, indicativeTrades[i].Price) } } + +// just generates random orders with the given prices. Uses parties provided by accessing +// parties[i%len(parties)], where i is the current index in the buy/sell prices slice. +// if parties is empty, []string{"A", "B"} is used. +func getTestOrders(t *testing.T, market string, fixedSize uint64, buyPrices, sellPrices []uint64) []*types.Order { + t.Helper() + parties := []string{"A", "B"} + orders := make([]*types.Order, 0, len(buyPrices)+len(sellPrices)) + for i, p := range buyPrices { + size := fixedSize + if size == 0 { + size = uint64(rand.Int63n(10-1) + 1) + } + orders = append(orders, &types.Order{ + ID: vgcrypto.RandomHash(), + Status: types.OrderStatusActive, + Type: types.OrderTypeLimit, + MarketID: market, + Party: parties[i%len(parties)], + Side: types.SideBuy, + Price: num.NewUint(p), + OriginalPrice: num.NewUint(p), + Size: size, + Remaining: size, + TimeInForce: types.OrderTimeInForceGTC, + }) + } + for i, p := range sellPrices { + size := fixedSize + if size == 0 { + size = uint64(rand.Int63n(10-1) + 1) + } + orders = append(orders, &types.Order{ + ID: vgcrypto.RandomHash(), + Status: types.OrderStatusActive, + Type: types.OrderTypeLimit, + MarketID: market, + Party: parties[i%len(parties)], + Side: types.SideSell, + Price: num.NewUint(p), + OriginalPrice: num.NewUint(p), + Size: size, + Remaining: size, + TimeInForce: types.OrderTimeInForceGTC, + }) + } + return orders +} + +func TestVwapEmptySide(t *testing.T) { + ob := getTestOrderBook(t, "market1") + _, err := ob.ob.VWAP(0, types.SideBuy) + require.Error(t, err) + _, err = ob.ob.VWAP(0, types.SideSell) + require.Error(t, err) + + _, err = ob.ob.VWAP(10, types.SideBuy) + require.Error(t, err) + _, err = ob.ob.VWAP(10, types.SideSell) + require.Error(t, err) +} + +func TestVwapZeroVolume(t *testing.T) { + ob := getTestOrderBook(t, "market1") + + buyPrices := []uint64{ + 90, + } + sellPrices := []uint64{ + 100, + } + + orders := getTestOrders(t, "market1", 10, buyPrices, sellPrices) + for _, o := range orders { + _, err := ob.ob.SubmitOrder(o) + assert.NoError(t, err) + } + + // when the volume passed is 0 + vwap, err := ob.ob.VWAP(0, types.SideBuy) + require.NoError(t, err) + require.Equal(t, "90", vwap.String()) + vwap, err = ob.ob.VWAP(0, types.SideSell) + require.NoError(t, err) + require.Equal(t, "100", vwap.String()) +} + +func TestVwapNotEnoughVolume(t *testing.T) { + ob := getTestOrderBook(t, "market1") + + buyPrices := []uint64{ + 90, + 95, + 100, + } + sellPrices := []uint64{ + 200, + 210, + 220, + } + + orders := getTestOrders(t, "market1", 10, buyPrices, sellPrices) + for _, o := range orders { + _, err := ob.ob.SubmitOrder(o) + assert.NoError(t, err) + } + + // there's 30 in the order book + _, err := ob.ob.VWAP(40, types.SideBuy) + require.Error(t, err) + _, err = ob.ob.VWAP(40, types.SideSell) + require.Error(t, err) +} + +func TestVWAP(t *testing.T) { + ob := getTestOrderBook(t, "market1") + + buyPrices := []uint64{ + 60, + 70, + 100, + } + sellPrices := []uint64{ + 200, + 210, + 220, + } + + orders := getTestOrders(t, "market1", 10, buyPrices, sellPrices) + for _, o := range orders { + _, err := ob.ob.SubmitOrder(o) + assert.NoError(t, err) + } + + // Bid side + // ========= + vwap, err := ob.ob.VWAP(5, types.SideBuy) + require.NoError(t, err) + require.Equal(t, "100", vwap.String()) + + vwap, err = ob.ob.VWAP(10, types.SideBuy) + require.NoError(t, err) + require.Equal(t, "100", vwap.String()) + + // (100 * 10 + 70 * 5)/15 + vwap, err = ob.ob.VWAP(15, types.SideBuy) + require.NoError(t, err) + require.Equal(t, "90", vwap.String()) + + // (100 + 70)/2 + vwap, err = ob.ob.VWAP(20, types.SideBuy) + require.NoError(t, err) + require.Equal(t, "85", vwap.String()) + + // (100 * 10 + 70 * 10 + 60 * 5)/25 + vwap, err = ob.ob.VWAP(25, types.SideBuy) + require.NoError(t, err) + require.Equal(t, "80", vwap.String()) + + // (100 + 70 + 60)/3 + vwap, err = ob.ob.VWAP(30, types.SideBuy) + require.NoError(t, err) + require.Equal(t, "76", vwap.String()) + + // Ask side + // ========= + vwap, err = ob.ob.VWAP(5, types.SideSell) + require.NoError(t, err) + require.Equal(t, "200", vwap.String()) + + vwap, err = ob.ob.VWAP(10, types.SideSell) + require.NoError(t, err) + require.Equal(t, "200", vwap.String()) + + // (200 * 10 + 210 * 5)/15 + vwap, err = ob.ob.VWAP(15, types.SideSell) + require.NoError(t, err) + require.Equal(t, "203", vwap.String()) + + // (200 + 210)/2 + vwap, err = ob.ob.VWAP(20, types.SideSell) + require.NoError(t, err) + require.Equal(t, "205", vwap.String()) + + // (200 * 10 + 210 * 10 + 220 * 5)/25 + vwap, err = ob.ob.VWAP(25, types.SideSell) + require.NoError(t, err) + require.Equal(t, "208", vwap.String()) + + // (200 + 210 + 220)/3 + vwap, err = ob.ob.VWAP(30, types.SideSell) + require.NoError(t, err) + require.Equal(t, "210", vwap.String()) +} diff --git a/core/matching/pricelevel.go b/core/matching/pricelevel.go index 59ef5203b5..3f4bfe5124 100644 --- a/core/matching/pricelevel.go +++ b/core/matching/pricelevel.go @@ -81,6 +81,28 @@ func (l *PriceLevel) addOrder(o *types.Order) { l.volume += o.TrueRemaining() } +func (l *PriceLevel) replaceOrder(o *types.Order) { + for i, co := range l.orders { + if co.ID == o.ID { + l.volume -= co.TrueRemaining() + l.volume += o.TrueRemaining() + l.orders[i] = o + return + } + } + // the order was already removed, add it back according to its CreatedAt timestamp + i := sort.Search(len(l.orders), func(i int) bool { return l.orders[i].CreatedAt >= o.CreatedAt }) + if i >= len(l.orders) { + l.orders = append(l.orders, o) + l.volume += o.TrueRemaining() + return + } + l.orders = append(l.orders, nil) + copy(l.orders[i+1:], l.orders[i:]) + l.orders[i] = o + l.volume += o.TrueRemaining() +} + func (l *PriceLevel) removeOrder(index int) { // decrease total volume l.volume -= l.orders[index].TrueRemaining() @@ -166,8 +188,7 @@ func (l *PriceLevel) uncrossIcebergs(agg *types.Order, tracked []*trackIceberg, func (l *PriceLevel) fakeUncross(o *types.Order, checkWashTrades bool) (agg *types.Order, trades []*types.Trade, err error) { // work on a copy of the order, so we can submit it a second time // after we've done the price monitoring and fees checks - cpy := *o - agg = &cpy + agg = o.Clone() if len(l.orders) == 0 { return } @@ -198,6 +219,11 @@ func (l *PriceLevel) fakeUncross(o *types.Order, checkWashTrades bool) (agg *typ // New Trade trade := newTrade(agg, order, size) + trade.SellOrder = agg.ID + trade.BuyOrder = order.ID + if agg.Side == types.SideBuy { + trade.SellOrder, trade.BuyOrder = trade.BuyOrder, trade.SellOrder + } // Update Remaining for aggressive only agg.Remaining -= size @@ -266,6 +292,10 @@ func (l *PriceLevel) uncross(agg *types.Order, checkWashTrades bool) (filled boo // New Trade trade := newTrade(agg, order, size) + trade.SellOrder, trade.BuyOrder = agg.ID, order.ID + if agg.Side == types.SideBuy { + trade.SellOrder, trade.BuyOrder = trade.BuyOrder, trade.SellOrder + } // Update Remaining for both aggressive and passive agg.Remaining -= size diff --git a/core/matching/side.go b/core/matching/side.go index 9dfc01fb9e..39b6280f61 100644 --- a/core/matching/side.go +++ b/core/matching/side.go @@ -79,6 +79,10 @@ func (s *OrderBookSide) addOrder(o *types.Order) { s.getPriceLevel(o.Price).addOrder(o) } +func (s *OrderBookSide) replaceOrder(o *types.Order) { + s.getPriceLevel(o.Price).replaceOrder(o) +} + // BestPriceAndVolume returns the top of book price and volume // returns an error if the book is empty. func (s *OrderBookSide) BestPriceAndVolume() (*num.Uint, uint64, error) { @@ -341,10 +345,10 @@ func (s *OrderBookSide) getPriceLevelIfExists(price *num.Uint) *PriceLevel { func (s *OrderBookSide) getPriceLevel(price *num.Uint) *PriceLevel { var i int if s.side == types.SideBuy { - // buy side levels should be ordered in descending + // buy side levels should be ordered in ascending i = sort.Search(len(s.levels), func(i int) bool { return s.levels[i].price.GTE(price) }) } else { - // sell side levels should be ordered in ascending + // sell side levels should be ordered in descending i = sort.Search(len(s.levels), func(i int) bool { return s.levels[i].price.LTE(price) }) } @@ -364,6 +368,25 @@ func (s *OrderBookSide) getPriceLevel(price *num.Uint) *PriceLevel { return level } +func (s *OrderBookSide) getLevelsForPrice(price *num.Uint) []*PriceLevel { + ret := make([]*PriceLevel, 0, len(s.levels)) + // buy is ASCENDING, start at the highest buy price until we find a buy order that will not trade + // at the given price (ie given price is > buy order price). + cmpF := price.GT + if s.side == types.SideSell { + // sell is DESCENDING, start at the lowest sell order price, until we find a sell order that won't trade + // at the given price (ie given price < sell order price). + cmpF = price.LT + } + for i := len(s.levels) - 1; i >= 0; i-- { + if cmpF(s.levels[i].price) { + return ret + } + ret = append(ret, s.levels[i]) + } + return ret +} + // GetVolume returns the volume at the given pricelevel. func (s *OrderBookSide) GetVolume(price *num.Uint) (uint64, error) { priceLevel := s.getPriceLevelIfExists(price) diff --git a/core/matching/side_test.go b/core/matching/side_test.go index 3da95c451e..79bac86c43 100644 --- a/core/matching/side_test.go +++ b/core/matching/side_test.go @@ -498,6 +498,7 @@ func TestFakeUncrossSelfTradeNonFOKLimitOrder_DontCheckWashTrades(t *testing.T) fakeTrades, err := buySide.fakeUncross(&order, checkWashTrades) assert.Len(t, fakeTrades, 1) assert.NoError(t, err) + assert.Equal(t, fakeTrades[0].SellOrder, order.ID) trades, _, _, err := buySide.uncross(&order, checkWashTrades) assert.Len(t, trades, 1) diff --git a/core/matching/simpleorders_test.go b/core/matching/simpleorders_test.go index da90a6f5f8..48844b98ac 100644 --- a/core/matching/simpleorders_test.go +++ b/core/matching/simpleorders_test.go @@ -729,6 +729,10 @@ type MarketPos struct { buySumProduct, sellSumProduct *num.Uint } +func (m MarketPos) AverageEntryPrice() *num.Uint { + return num.UintZero() +} + func (m MarketPos) Party() string { return m.party } diff --git a/core/metrics/prometheus.go b/core/metrics/prometheus.go index fdd795df56..88df6f9c07 100644 --- a/core/metrics/prometheus.go +++ b/core/metrics/prometheus.go @@ -48,12 +48,15 @@ var ( ) var ( - unconfirmedTxGauge prometheus.Gauge - engineTime *prometheus.CounterVec - orderCounter *prometheus.CounterVec - ethCallCounter *prometheus.CounterVec - evtForwardCounter *prometheus.CounterVec - orderGauge *prometheus.GaugeVec + unconfirmedTxGauge prometheus.Gauge + engineTime *prometheus.CounterVec + orderCounter *prometheus.CounterVec + dataSourceEthVerifierOnGoingCallCounter *prometheus.CounterVec + ethereumRPCCallCounter *prometheus.CounterVec + ethCallCounter *prometheus.CounterVec + evtForwardCounter *prometheus.CounterVec + orderGauge *prometheus.GaugeVec + dataSourceEthVerifierOnGoingCallGauge *prometheus.GaugeVec // Call counters for each request type per API. apiRequestCallCounter *prometheus.CounterVec // Total time counters for each request type per API. @@ -377,6 +380,38 @@ func setupMetrics() error { } orderCounter = ot + h, err = addInstrument( + Counter, + "data_source_ethverifier_calls_total", + Namespace("vega"), + Vectors("spec"), + Help("Number of orders processed"), + ) + if err != nil { + return err + } + dataC, err := h.CounterVec() + if err != nil { + return err + } + dataSourceEthVerifierOnGoingCallCounter = dataC + + h, err = addInstrument( + Counter, + "ethereum_rpc_calls_total", + Namespace("vega"), + Vectors("endpoint"), + Help("Number of calls made to the ethereum RPC"), + ) + if err != nil { + return err + } + ethRPCC, err := h.CounterVec() + if err != nil { + return err + } + ethereumRPCCallCounter = ethRPCC + h, err = addInstrument( Counter, "eth_calls_total", @@ -425,6 +460,24 @@ func setupMetrics() error { return err } orderGauge = g + + // now add the orders gauge + h, err = addInstrument( + Gauge, + "data_source_ethverifier_calls_ongoing", + Namespace("vega"), + Vectors("spec"), + Help("Number of event being verified"), + ) + if err != nil { + return err + } + dataD, err := h.GaugeVec() + if err != nil { + return err + } + dataSourceEthVerifierOnGoingCallGauge = dataD + // example usage of this simple gauge: // e.orderGauge.WithLabelValues(mkt.Name).Add(float64(len(orders))) // e.orderGauge.WithLabelValues(mkt.Name).Sub(float64(len(completedOrders))) @@ -547,6 +600,23 @@ func OrderCounterInc(labelValues ...string) { orderCounter.WithLabelValues(labelValues...).Inc() } +// DataSourceEthVerifierCallCounterInc increments the order counter. +func DataSourceEthVerifierCallCounterInc(labelValues ...string) { + if dataSourceEthVerifierOnGoingCallCounter == nil { + return + } + dataSourceEthVerifierOnGoingCallCounter.WithLabelValues(labelValues...).Inc() +} + +// EthereumRPCCallCounterInc increments the order counter. +func EthereumRPCCallCounterInc(labelValues ...string) { + if ethereumRPCCallCounter == nil { + return + } + ethereumRPCCallCounter.WithLabelValues("all").Inc() + ethereumRPCCallCounter.WithLabelValues(labelValues...).Inc() +} + // EthCallInc increments the eth call counter. func EthCallInc(labelValues ...string) { if ethCallCounter == nil { @@ -571,6 +641,21 @@ func OrderGaugeAdd(n int, labelValues ...string) { orderGauge.WithLabelValues(labelValues...).Add(float64(n)) } +// DataSourceEthVerifierCallGaugeAdd increments the eth verified calls. +func DataSourceEthVerifierCallGaugeAdd(n int, labelValues ...string) { + if dataSourceEthVerifierOnGoingCallGauge == nil { + return + } + dataSourceEthVerifierOnGoingCallGauge.WithLabelValues(labelValues...).Add(float64(n)) +} + +func DataSourceEthVerifierCallGaugeReset(labelValues ...string) { + if dataSourceEthVerifierOnGoingCallGauge == nil { + return + } + dataSourceEthVerifierOnGoingCallGauge.WithLabelValues(labelValues...).Set(0) +} + // UnconfirmedTxGaugeSet update the number of unconfirmed transactions. func UnconfirmedTxGaugeSet(n int) { if unconfirmedTxGauge == nil { diff --git a/core/monitor/auction.go b/core/monitor/auction.go index dd4bfabe73..090822d4dc 100644 --- a/core/monitor/auction.go +++ b/core/monitor/auction.go @@ -162,19 +162,6 @@ func (a *AuctionState) ExtendAuctionSuspension(delta types.AuctionDuration) { a.ExtendAuction(delta) } -func (a *AuctionState) ExtendAuctionLiquidityUnmetTarget(delta types.AuctionDuration) { - a.extendAuctionLiquidity(delta, types.AuctionTriggerLiquidityTargetNotMet) -} - -// extendAuctionLiquidity - call from liquidity monitoring to extend the auction -// sets the extension trigger field accordingly. -func (a *AuctionState) extendAuctionLiquidity(delta types.AuctionDuration, trigger types.AuctionTrigger) { - t := trigger - a.extension = &t - a.extensionEventSent = false - a.ExtendAuction(delta) -} - // ExtendAuction extends the current auction. func (a *AuctionState) ExtendAuction(delta types.AuctionDuration) { a.end.Duration += delta.Duration @@ -252,26 +239,10 @@ func (a AuctionState) IsOpeningAuction() bool { return a.trigger == types.AuctionTriggerOpening } -func (a AuctionState) IsLiquidityAuction() bool { - // FIXME(jeremy): the second part of the condition is to support - // the compatibility on 72 > 73 snapshots. - - return a.trigger == types.AuctionTriggerLiquidityTargetNotMet || - a.trigger == types.AuctionTriggerUnableToDeployLPOrders -} - func (a AuctionState) IsPriceAuction() bool { return a.trigger == types.AuctionTriggerPrice } -func (a AuctionState) IsLiquidityExtension() bool { - // FIXME(jeremy): the second part of the condition is to support - // the compatibility on 72 > 73 snapshots. - - return a.extension != nil && (*a.extension == types.AuctionTriggerLiquidityTargetNotMet || - *a.extension == types.AuctionTriggerUnableToDeployLPOrders) -} - func (a AuctionState) IsPriceExtension() bool { return a.extension != nil && *a.extension == types.AuctionTriggerPrice } diff --git a/core/monitor/liquidity/engine.go b/core/monitor/liquidity/engine.go deleted file mode 100644 index 70881a01ce..0000000000 --- a/core/monitor/liquidity/engine.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (C) 2023 Gobalsky Labs Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package liquidity - -import ( - "context" - "sync" - "time" - - "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/libs/num" -) - -//go:generate go run github.com/golang/mock/mockgen -destination mocks/auction_state_mock.go -package mocks code.vegaprotocol.io/vega/core/monitor/liquidity AuctionState -type AuctionState interface { - IsOpeningAuction() bool - IsLiquidityAuction() bool - IsLiquidityExtension() bool - StartLiquidityAuctionUnmetTarget(t time.Time, d *types.AuctionDuration) - StartGovernanceSuspensionAuction(t time.Time) - EndGovernanceSuspensionAuction() - - SetReadyToLeave() - InAuction() bool - ExtendAuctionLiquidityUnmetTarget(delta types.AuctionDuration) - ExpiresAt() *time.Time -} - -// TargetStakeCalculator interface -// -//go:generate go run github.com/golang/mock/mockgen -destination mocks/target_stake_calculator_mock.go -package mocks code.vegaprotocol.io/vega/core/monitor/liquidity TargetStakeCalculator -type TargetStakeCalculator interface { - GetTheoreticalTargetStake(rf types.RiskFactor, now time.Time, markPrice *num.Uint, trades []*types.Trade) *num.Uint -} - -type Engine struct { - mu *sync.Mutex - params *types.LiquidityMonitoringParameters - minDuration time.Duration - tsCalc TargetStakeCalculator -} - -func NewMonitor(tsCalc TargetStakeCalculator, params *types.LiquidityMonitoringParameters) *Engine { - e := &Engine{ - mu: &sync.Mutex{}, - tsCalc: tsCalc, - } - e.UpdateParameters(params) - if e.minDuration < 1 { - e.minDuration = time.Second - } - return e -} - -func (e *Engine) UpdateParameters(params *types.LiquidityMonitoringParameters) { - // temp hard-coded duration of 1 until we can make these parameters required - if params.AuctionExtension == 0 { - params.AuctionExtension = 1 - } - e.params = params -} - -func (e *Engine) SetMinDuration(d time.Duration) { - e.mu.Lock() - e.minDuration = d - e.mu.Unlock() -} - -func (e *Engine) UpdateTargetStakeTriggerRatio(ctx context.Context, ratio num.Decimal) { - e.mu.Lock() - e.params.TriggeringRatio = ratio - // @TODO emit event - e.mu.Unlock() -} - -// CheckLiquidity Starts or Ends a Liquidity auction given the current and target stakes along with best static bid and ask volumes. -// The constant c1 represents the netparam `MarketLiquidityTargetStakeTriggeringRatio`, -// "true" gets returned if non-persistent order should be rejected. -func (e *Engine) CheckLiquidity(as AuctionState, t time.Time, currentStake *num.Uint, trades []*types.Trade, - rf types.RiskFactor, refPrice *num.Uint, _, _ uint64, persistent bool, -) bool { - exp := as.ExpiresAt() - if exp != nil && exp.After(t) { - // we're in auction, and the auction isn't expiring yet, so we don't have to do anything yet - return false - } - e.mu.Lock() - c1 := e.params.TriggeringRatio - md := int64(e.minDuration / time.Second) - e.mu.Unlock() - targetStake := e.tsCalc.GetTheoreticalTargetStake(rf, t, refPrice.Clone(), trades) - ext := types.AuctionDuration{ - Duration: e.params.AuctionExtension, - } - // if we're in liquidity auction already, the auction has expired, and we can end/extend the auction - // @TODO we don't have the ability to support volume limited auctions yet - - isOpening := as.IsOpeningAuction() - if exp != nil && as.IsLiquidityAuction() || as.IsLiquidityExtension() || isOpening { - if currentStake.GTE(targetStake) { - as.SetReadyToLeave() - return false // all done - } - - // we're still in trouble, extend the auction - as.ExtendAuctionLiquidityUnmetTarget(ext) - return false - } - // multiply target stake by triggering ratio - scaledTargetStakeDec := targetStake.ToDecimal().Mul(c1) - scaledTargetStake, _ := num.UintFromDecimal(scaledTargetStakeDec) - stakeUndersupplied := currentStake.LT(scaledTargetStake) - if stakeUndersupplied { - if len(trades) > 0 && !persistent { - // non-persistent order cannot trigger auction by raising target stake - // we're going to stay in continuous trading - return true - } - if exp != nil { - as.ExtendAuctionLiquidityUnmetTarget(ext) - - return false - } - - as.StartLiquidityAuctionUnmetTarget(t, &types.AuctionDuration{ - Duration: md, // we multiply this by a second later on - }) - } - return false -} diff --git a/core/monitor/liquidity/engine_test.go b/core/monitor/liquidity/engine_test.go deleted file mode 100644 index d784f40802..0000000000 --- a/core/monitor/liquidity/engine_test.go +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (C) 2023 Gobalsky Labs Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package liquidity_test - -import ( - "testing" - "time" - - "code.vegaprotocol.io/vega/core/monitor/liquidity" - "code.vegaprotocol.io/vega/core/monitor/liquidity/mocks" - "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/libs/num" - "github.com/golang/mock/gomock" -) - -type testHarness struct { - AuctionState *mocks.MockAuctionState - TargetStakeCalculator *mocks.MockTargetStakeCalculator -} - -func newTestHarness(t *testing.T) *testHarness { - t.Helper() - ctrl := gomock.NewController(t) - return &testHarness{ - AuctionState: mocks.NewMockAuctionState(ctrl), - TargetStakeCalculator: mocks.NewMockTargetStakeCalculator(ctrl), - } -} - -func (h *testHarness) WhenInOpeningAuction() *testHarness { - h.AuctionState.EXPECT().IsLiquidityAuction().AnyTimes().Return(false) - h.AuctionState.EXPECT().IsLiquidityExtension().AnyTimes().Return(false) - h.AuctionState.EXPECT().IsOpeningAuction().AnyTimes().Return(true) - return h -} - -func (h *testHarness) WhenInLiquidityAuction(v bool) *testHarness { - h.AuctionState.EXPECT().IsLiquidityAuction().AnyTimes().Return(v) - h.AuctionState.EXPECT().IsLiquidityExtension().AnyTimes().Return(false) - h.AuctionState.EXPECT().IsOpeningAuction().AnyTimes().Return(false) - return h -} - -func TestEngineWhenInLiquidityAuction(t *testing.T) { - now := time.Now() - - tests := []struct { - desc string - // when - current *num.Uint - target *num.Uint - bestStaticBidVolume uint64 - bestStaticAskVolume uint64 - // expect - auctionShouldEnd bool - }{ - {"Current > Target", num.NewUint(20), num.NewUint(15), 1, 1, true}, - {"Current == Target", num.NewUint(15), num.NewUint(15), 1, 1, true}, - {"Current < Target", num.NewUint(14), num.NewUint(15), 1, 1, false}, - {"Current > Target, no best bid", num.NewUint(20), num.NewUint(15), 0, 1, false}, - {"Current == Target, no best ask", num.NewUint(15), num.NewUint(15), 1, 0, false}, - {"Current == Target, no best bid and ask", num.NewUint(15), num.NewUint(15), 0, 0, false}, - } - - h := newTestHarness(t).WhenInLiquidityAuction(true) - exp := now.Add(-1 * time.Second) - keep := now.Add(time.Second) - mon := liquidity.NewMonitor(h.TargetStakeCalculator, &types.LiquidityMonitoringParameters{ - TriggeringRatio: num.DecimalFromFloat(.7), - }) - for _, test := range tests { - t.Run(test.desc, func(t *testing.T) { - var trades []*types.Trade - rf := types.RiskFactor{} - markPrice := num.NewUint(100) - if test.auctionShouldEnd { - h.AuctionState.EXPECT().SetReadyToLeave().Times(1) - h.AuctionState.EXPECT().ExpiresAt().Times(1).Return(&exp) - h.TargetStakeCalculator.EXPECT().GetTheoreticalTargetStake(rf, now, markPrice.Clone(), trades).Times(1).Return(test.target) - } else { - h.AuctionState.EXPECT().ExpiresAt().Times(1).Return(&keep) - } - - mon.CheckLiquidity(h.AuctionState, now, test.current, trades, rf, markPrice.Clone(), test.bestStaticBidVolume, test.bestStaticAskVolume, true) - }) - } -} - -func TestEngineWhenNotInLiquidityAuction(t *testing.T) { - now := time.Now() - - tests := []struct { - desc string - // when - current *num.Uint - target *num.Uint - bestStaticBidVolume uint64 - bestStaticAskVolume uint64 - // expect - auctionTrigger types.AuctionTrigger - }{ - {"Current < (Target * c1)", num.NewUint(10), num.NewUint(30), 1, 1, types.AuctionTriggerLiquidityTargetNotMet}, - {"Current > (Target * c1)", num.NewUint(15), num.NewUint(15), 1, 1, types.AuctionTriggerUnspecified}, - {"Current == (Target * c1)", num.NewUint(10), num.NewUint(20), 1, 1, types.AuctionTriggerUnspecified}, - } - - h := newTestHarness(t).WhenInLiquidityAuction(false) - mon := liquidity.NewMonitor(h.TargetStakeCalculator, &types.LiquidityMonitoringParameters{ - TriggeringRatio: num.DecimalFromFloat(.5), - }) - h.AuctionState.EXPECT().ExpiresAt().Times(len(tests)).Return(nil) - for _, test := range tests { - t.Run(test.desc, func(t *testing.T) { - if test.auctionTrigger == types.AuctionTriggerLiquidityTargetNotMet { - h.AuctionState.EXPECT().StartLiquidityAuctionUnmetTarget(now, gomock.Any()).Times(1) - } - var trades []*types.Trade - rf := types.RiskFactor{} - markPrice := num.NewUint(100) - h.TargetStakeCalculator.EXPECT().GetTheoreticalTargetStake(rf, now, markPrice.Clone(), trades).Return(test.target) - mon.CheckLiquidity(h.AuctionState, now, test.current, trades, rf, markPrice.Clone(), test.bestStaticBidVolume, test.bestStaticAskVolume, true) - }) - } -} - -func TestEngineInOpeningAuction(t *testing.T) { - // these are the same tests as above (not in liq auction), but instead of start liquidity auction - // we expect the opening auction to be extended - now := time.Now() - - tests := []struct { - desc string - // when - current *num.Uint - target *num.Uint - bestStaticBidVolume uint64 - bestStaticAskVolume uint64 - // expect - auctionTrigger types.AuctionTrigger - }{ - {"Current < (Target)", num.NewUint(10), num.NewUint(30), 1, 1, types.AuctionTriggerLiquidityTargetNotMet}, - {"Current > (Target)", num.NewUint(15), num.NewUint(15), 1, 1, types.AuctionTriggerUnspecified}, - {"Current == (Target * C1)", num.NewUint(10), num.NewUint(20), 1, 1, types.AuctionTriggerLiquidityTargetNotMet}, - {"Current == (Target)", num.NewUint(20), num.NewUint(20), 1, 1, types.AuctionTriggerUnspecified}, - } - - h := newTestHarness(t).WhenInOpeningAuction() - mon := liquidity.NewMonitor(h.TargetStakeCalculator, &types.LiquidityMonitoringParameters{ - TriggeringRatio: num.DecimalFromFloat(.5), - }) - h.AuctionState.EXPECT().ExpiresAt().Times(len(tests)).Return(nil) - for _, test := range tests { - t.Run(test.desc, func(t *testing.T) { - if test.auctionTrigger == types.AuctionTriggerLiquidityTargetNotMet { - h.AuctionState.EXPECT().ExtendAuctionLiquidityUnmetTarget(gomock.Any()).Times(1) - } else { - // opening auciton is flagged as ready to leave - h.AuctionState.EXPECT().SetReadyToLeave().Times(1) - } - var trades []*types.Trade - rf := types.RiskFactor{} - markPrice := num.NewUint(100) - h.TargetStakeCalculator.EXPECT().GetTheoreticalTargetStake(rf, now, markPrice.Clone(), trades).Return(test.target) - mon.CheckLiquidity(h.AuctionState, now, test.current, trades, rf, markPrice.Clone(), test.bestStaticBidVolume, test.bestStaticAskVolume, true) - }) - } -} - -func TestEngineAfterParametersUpdate(t *testing.T) { - h := newTestHarness(t).WhenInLiquidityAuction(false) - - now := time.Now() - target := num.NewUint(100) - bestStaticBidVolume := uint64(1) - bestStaticAskVolume := uint64(1) - var trades []*types.Trade - rf := types.RiskFactor{} - markPrice := num.NewUint(100) - params := &types.LiquidityMonitoringParameters{ - TriggeringRatio: num.DecimalFromFloat(.5), - AuctionExtension: 40, - } - - mon := liquidity.NewMonitor(h.TargetStakeCalculator, params) - - expiresAt := now.Add(-24 * time.Hour) - h.AuctionState.EXPECT().ExpiresAt().Times(1).Return(&expiresAt) - h.AuctionState.EXPECT().ExtendAuctionLiquidityUnmetTarget(types.AuctionDuration{ - Duration: params.AuctionExtension, - }).Times(1) - h.TargetStakeCalculator.EXPECT().GetTheoreticalTargetStake(rf, now, markPrice.Clone(), trades).Return(target) - - mon.CheckLiquidity(h.AuctionState, now, num.NewUint(40), trades, rf, markPrice.Clone(), bestStaticBidVolume, bestStaticAskVolume, true) - - updatedParams := &types.LiquidityMonitoringParameters{ - TriggeringRatio: num.DecimalFromFloat(.8), - AuctionExtension: 80, - } - - mon.UpdateParameters(updatedParams) - - h.AuctionState.EXPECT().ExpiresAt().Times(1).Return(&expiresAt) - // Verify the auction extension is called with update parameters. - h.AuctionState.EXPECT().ExtendAuctionLiquidityUnmetTarget(types.AuctionDuration{ - Duration: updatedParams.AuctionExtension, - }).Times(1) - - h.TargetStakeCalculator.EXPECT().GetTheoreticalTargetStake(rf, now, markPrice.Clone(), trades).Return(target) - // Higher current stake to test the updated Triggering Ratio is reached. - mon.CheckLiquidity(h.AuctionState, now, num.NewUint(70), nil, rf, markPrice.Clone(), bestStaticBidVolume, bestStaticAskVolume, true) -} - -func TestEngineAfterParametersUpdateWithAuctionExtension0(t *testing.T) { - h := newTestHarness(t).WhenInLiquidityAuction(false) - - now := time.Now() - target := num.NewUint(100) - bestStaticBidVolume := uint64(1) - bestStaticAskVolume := uint64(1) - var trades []*types.Trade - rf := types.RiskFactor{} - markPrice := num.NewUint(100) - params := &types.LiquidityMonitoringParameters{ - TriggeringRatio: num.DecimalFromFloat(.5), - AuctionExtension: 0, - } - - mon := liquidity.NewMonitor(h.TargetStakeCalculator, params) - - expiresAt := now.Add(-24 * time.Hour) - h.AuctionState.EXPECT().ExpiresAt().Times(1).Return(&expiresAt) - h.AuctionState.EXPECT().ExtendAuctionLiquidityUnmetTarget(types.AuctionDuration{ - Duration: 1, // to test the patch. - }).Times(1) - h.TargetStakeCalculator.EXPECT().GetTheoreticalTargetStake(rf, now, markPrice.Clone(), trades).Return(target) - - mon.CheckLiquidity(h.AuctionState, now, num.NewUint(40), trades, rf, markPrice.Clone(), bestStaticBidVolume, bestStaticAskVolume, true) - - updatedParams := &types.LiquidityMonitoringParameters{ - TriggeringRatio: num.DecimalFromFloat(.8), - AuctionExtension: 0, - } - - mon.UpdateParameters(updatedParams) - - h.AuctionState.EXPECT().ExpiresAt().Times(1).Return(&expiresAt) - // Verify the auction extension is called with update parameters. - h.AuctionState.EXPECT().ExtendAuctionLiquidityUnmetTarget(types.AuctionDuration{ - Duration: 1, // to test the patch. - }).Times(1) - - h.TargetStakeCalculator.EXPECT().GetTheoreticalTargetStake(rf, now, markPrice.Clone(), trades).Return(target) - // Higher current stake to test the updated Triggering Ratio is reached. - mon.CheckLiquidity(h.AuctionState, now, num.NewUint(70), nil, rf, markPrice.Clone(), bestStaticBidVolume, bestStaticAskVolume, true) -} diff --git a/core/monitor/liquidity/mocks/auction_state_mock.go b/core/monitor/liquidity/mocks/auction_state_mock.go deleted file mode 100644 index cdffa273ea..0000000000 --- a/core/monitor/liquidity/mocks/auction_state_mock.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: code.vegaprotocol.io/vega/core/monitor/liquidity (interfaces: AuctionState) - -// Package mocks is a generated GoMock package. -package mocks - -import ( - reflect "reflect" - time "time" - - types "code.vegaprotocol.io/vega/core/types" - gomock "github.com/golang/mock/gomock" -) - -// MockAuctionState is a mock of AuctionState interface. -type MockAuctionState struct { - ctrl *gomock.Controller - recorder *MockAuctionStateMockRecorder -} - -// MockAuctionStateMockRecorder is the mock recorder for MockAuctionState. -type MockAuctionStateMockRecorder struct { - mock *MockAuctionState -} - -// NewMockAuctionState creates a new mock instance. -func NewMockAuctionState(ctrl *gomock.Controller) *MockAuctionState { - mock := &MockAuctionState{ctrl: ctrl} - mock.recorder = &MockAuctionStateMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockAuctionState) EXPECT() *MockAuctionStateMockRecorder { - return m.recorder -} - -// EndGovernanceSuspensionAuction mocks base method. -func (m *MockAuctionState) EndGovernanceSuspensionAuction() { - m.ctrl.T.Helper() - m.ctrl.Call(m, "EndGovernanceSuspensionAuction") -} - -// EndGovernanceSuspensionAuction indicates an expected call of EndGovernanceSuspensionAuction. -func (mr *MockAuctionStateMockRecorder) EndGovernanceSuspensionAuction() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndGovernanceSuspensionAuction", reflect.TypeOf((*MockAuctionState)(nil).EndGovernanceSuspensionAuction)) -} - -// ExpiresAt mocks base method. -func (m *MockAuctionState) ExpiresAt() *time.Time { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ExpiresAt") - ret0, _ := ret[0].(*time.Time) - return ret0 -} - -// ExpiresAt indicates an expected call of ExpiresAt. -func (mr *MockAuctionStateMockRecorder) ExpiresAt() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExpiresAt", reflect.TypeOf((*MockAuctionState)(nil).ExpiresAt)) -} - -// ExtendAuctionLiquidityUnmetTarget mocks base method. -func (m *MockAuctionState) ExtendAuctionLiquidityUnmetTarget(arg0 types.AuctionDuration) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "ExtendAuctionLiquidityUnmetTarget", arg0) -} - -// ExtendAuctionLiquidityUnmetTarget indicates an expected call of ExtendAuctionLiquidityUnmetTarget. -func (mr *MockAuctionStateMockRecorder) ExtendAuctionLiquidityUnmetTarget(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExtendAuctionLiquidityUnmetTarget", reflect.TypeOf((*MockAuctionState)(nil).ExtendAuctionLiquidityUnmetTarget), arg0) -} - -// InAuction mocks base method. -func (m *MockAuctionState) InAuction() bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InAuction") - ret0, _ := ret[0].(bool) - return ret0 -} - -// InAuction indicates an expected call of InAuction. -func (mr *MockAuctionStateMockRecorder) InAuction() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InAuction", reflect.TypeOf((*MockAuctionState)(nil).InAuction)) -} - -// IsLiquidityAuction mocks base method. -func (m *MockAuctionState) IsLiquidityAuction() bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsLiquidityAuction") - ret0, _ := ret[0].(bool) - return ret0 -} - -// IsLiquidityAuction indicates an expected call of IsLiquidityAuction. -func (mr *MockAuctionStateMockRecorder) IsLiquidityAuction() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLiquidityAuction", reflect.TypeOf((*MockAuctionState)(nil).IsLiquidityAuction)) -} - -// IsLiquidityExtension mocks base method. -func (m *MockAuctionState) IsLiquidityExtension() bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsLiquidityExtension") - ret0, _ := ret[0].(bool) - return ret0 -} - -// IsLiquidityExtension indicates an expected call of IsLiquidityExtension. -func (mr *MockAuctionStateMockRecorder) IsLiquidityExtension() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLiquidityExtension", reflect.TypeOf((*MockAuctionState)(nil).IsLiquidityExtension)) -} - -// IsOpeningAuction mocks base method. -func (m *MockAuctionState) IsOpeningAuction() bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsOpeningAuction") - ret0, _ := ret[0].(bool) - return ret0 -} - -// IsOpeningAuction indicates an expected call of IsOpeningAuction. -func (mr *MockAuctionStateMockRecorder) IsOpeningAuction() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsOpeningAuction", reflect.TypeOf((*MockAuctionState)(nil).IsOpeningAuction)) -} - -// SetReadyToLeave mocks base method. -func (m *MockAuctionState) SetReadyToLeave() { - m.ctrl.T.Helper() - m.ctrl.Call(m, "SetReadyToLeave") -} - -// SetReadyToLeave indicates an expected call of SetReadyToLeave. -func (mr *MockAuctionStateMockRecorder) SetReadyToLeave() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadyToLeave", reflect.TypeOf((*MockAuctionState)(nil).SetReadyToLeave)) -} - -// StartGovernanceSuspensionAuction mocks base method. -func (m *MockAuctionState) StartGovernanceSuspensionAuction(arg0 time.Time) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "StartGovernanceSuspensionAuction", arg0) -} - -// StartGovernanceSuspensionAuction indicates an expected call of StartGovernanceSuspensionAuction. -func (mr *MockAuctionStateMockRecorder) StartGovernanceSuspensionAuction(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartGovernanceSuspensionAuction", reflect.TypeOf((*MockAuctionState)(nil).StartGovernanceSuspensionAuction), arg0) -} - -// StartLiquidityAuctionUnmetTarget mocks base method. -func (m *MockAuctionState) StartLiquidityAuctionUnmetTarget(arg0 time.Time, arg1 *types.AuctionDuration) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "StartLiquidityAuctionUnmetTarget", arg0, arg1) -} - -// StartLiquidityAuctionUnmetTarget indicates an expected call of StartLiquidityAuctionUnmetTarget. -func (mr *MockAuctionStateMockRecorder) StartLiquidityAuctionUnmetTarget(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartLiquidityAuctionUnmetTarget", reflect.TypeOf((*MockAuctionState)(nil).StartLiquidityAuctionUnmetTarget), arg0, arg1) -} diff --git a/core/monitor/liquidity/mocks/target_stake_calculator_mock.go b/core/monitor/liquidity/mocks/target_stake_calculator_mock.go deleted file mode 100644 index 702075023a..0000000000 --- a/core/monitor/liquidity/mocks/target_stake_calculator_mock.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: code.vegaprotocol.io/vega/core/monitor/liquidity (interfaces: TargetStakeCalculator) - -// Package mocks is a generated GoMock package. -package mocks - -import ( - reflect "reflect" - time "time" - - types "code.vegaprotocol.io/vega/core/types" - num "code.vegaprotocol.io/vega/libs/num" - gomock "github.com/golang/mock/gomock" -) - -// MockTargetStakeCalculator is a mock of TargetStakeCalculator interface. -type MockTargetStakeCalculator struct { - ctrl *gomock.Controller - recorder *MockTargetStakeCalculatorMockRecorder -} - -// MockTargetStakeCalculatorMockRecorder is the mock recorder for MockTargetStakeCalculator. -type MockTargetStakeCalculatorMockRecorder struct { - mock *MockTargetStakeCalculator -} - -// NewMockTargetStakeCalculator creates a new mock instance. -func NewMockTargetStakeCalculator(ctrl *gomock.Controller) *MockTargetStakeCalculator { - mock := &MockTargetStakeCalculator{ctrl: ctrl} - mock.recorder = &MockTargetStakeCalculatorMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockTargetStakeCalculator) EXPECT() *MockTargetStakeCalculatorMockRecorder { - return m.recorder -} - -// GetTheoreticalTargetStake mocks base method. -func (m *MockTargetStakeCalculator) GetTheoreticalTargetStake(arg0 types.RiskFactor, arg1 time.Time, arg2 *num.Uint, arg3 []*types.Trade) *num.Uint { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTheoreticalTargetStake", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(*num.Uint) - return ret0 -} - -// GetTheoreticalTargetStake indicates an expected call of GetTheoreticalTargetStake. -func (mr *MockTargetStakeCalculatorMockRecorder) GetTheoreticalTargetStake(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTheoreticalTargetStake", reflect.TypeOf((*MockTargetStakeCalculator)(nil).GetTheoreticalTargetStake), arg0, arg1, arg2, arg3) -} diff --git a/core/monitor/price/mocks/auction_state_mock.go b/core/monitor/price/mocks/auction_state_mock.go index 7a95a352d8..940557f3e6 100644 --- a/core/monitor/price/mocks/auction_state_mock.go +++ b/core/monitor/price/mocks/auction_state_mock.go @@ -132,34 +132,6 @@ func (mr *MockAuctionStateMockRecorder) IsFBA() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsFBA", reflect.TypeOf((*MockAuctionState)(nil).IsFBA)) } -// IsLiquidityAuction mocks base method. -func (m *MockAuctionState) IsLiquidityAuction() bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsLiquidityAuction") - ret0, _ := ret[0].(bool) - return ret0 -} - -// IsLiquidityAuction indicates an expected call of IsLiquidityAuction. -func (mr *MockAuctionStateMockRecorder) IsLiquidityAuction() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLiquidityAuction", reflect.TypeOf((*MockAuctionState)(nil).IsLiquidityAuction)) -} - -// IsLiquidityExtension mocks base method. -func (m *MockAuctionState) IsLiquidityExtension() bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsLiquidityExtension") - ret0, _ := ret[0].(bool) - return ret0 -} - -// IsLiquidityExtension indicates an expected call of IsLiquidityExtension. -func (mr *MockAuctionStateMockRecorder) IsLiquidityExtension() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLiquidityExtension", reflect.TypeOf((*MockAuctionState)(nil).IsLiquidityExtension)) -} - // IsOpeningAuction mocks base method. func (m *MockAuctionState) IsOpeningAuction() bool { m.ctrl.T.Helper() diff --git a/core/monitor/price/pricemonitoring.go b/core/monitor/price/pricemonitoring.go index 722d6b13ba..b2f2672d25 100644 --- a/core/monitor/price/pricemonitoring.go +++ b/core/monitor/price/pricemonitoring.go @@ -55,10 +55,8 @@ type AuctionState interface { InAuction() bool // What type of auction are we dealing with IsOpeningAuction() bool - IsLiquidityAuction() bool IsPriceAuction() bool IsPriceExtension() bool - IsLiquidityExtension() bool IsFBA() bool // is it the start/end of the auction CanLeave() bool @@ -509,7 +507,7 @@ func (e *Engine) getCurrentPriceRanges(force bool) map[*bound]priceRange { } func (e *Engine) monitoringAuction() bool { - return e.auctionState.IsLiquidityAuction() || e.auctionState.IsPriceAuction() + return e.auctionState.IsPriceAuction() } // clearStalePrices updates the pricesPast slice to hold only as many prices as implied by the horizon. diff --git a/core/monitor/price/pricemonitoring_test.go b/core/monitor/price/pricemonitoring_test.go index 5c4e5c1359..1fbc0692d8 100644 --- a/core/monitor/price/pricemonitoring_test.go +++ b/core/monitor/price/pricemonitoring_test.go @@ -137,7 +137,6 @@ func TestRecordPriceChange(t *testing.T) { auctionStateMock.EXPECT().IsFBA().Return(false).Times(4) auctionStateMock.EXPECT().InAuction().Return(false).Times(4) - auctionStateMock.EXPECT().IsLiquidityAuction().Return(false).Times(2) auctionStateMock.EXPECT().IsPriceAuction().Return(false).Times(2) statevar := mocks.NewMockStateVarEngine(ctrl) statevar.EXPECT().RegisterStateVariable(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()) @@ -195,7 +194,6 @@ func TestCheckBoundViolationsWithinCurrentTimeWith2HorizonProbabilityPairs(t *te auctionStateMock.EXPECT().IsFBA().Return(false).Times(19) auctionStateMock.EXPECT().InAuction().Return(false).Times(14) - auctionStateMock.EXPECT().IsLiquidityAuction().Return(false).Times(15) auctionStateMock.EXPECT().IsPriceAuction().Return(false).Times(10) statevar := mocks.NewMockStateVarEngine(ctrl) statevar.EXPECT().RegisterStateVariable(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes() @@ -379,7 +377,6 @@ func TestCheckBoundViolationsAcrossTimeWith1HorizonProbabilityPair(t *testing.T) // auctionStateMock.EXPECT().InAuction().Return(false).Times(25) auctionStateMock.EXPECT().IsFBA().Return(false).AnyTimes() auctionStateMock.EXPECT().InAuction().Return(false).AnyTimes() - auctionStateMock.EXPECT().IsLiquidityAuction().Return(false).AnyTimes() auctionStateMock.EXPECT().IsPriceAuction().Return(true).AnyTimes() pm, err := price.NewMonitor("asset", "market", riskModel, auctionStateMock, settings, statevar, logging.NewTestLogger()) @@ -604,8 +601,7 @@ func TestAuctionStartedAndEndendBy1Trigger(t *testing.T) { auctionStateMock.EXPECT().IsFBA().Return(false).Times(2) auctionStateMock.EXPECT().InAuction().Return(false).Times(2) - auctionStateMock.EXPECT().IsPriceAuction().Return(false).Times(2) - auctionStateMock.EXPECT().IsLiquidityAuction().Return(false).Times(2) + auctionStateMock.EXPECT().IsPriceAuction().Return(false).Times(3) statevar := mocks.NewMockStateVarEngine(ctrl) statevar.EXPECT().RegisterStateVariable(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()) @@ -633,7 +629,6 @@ func TestAuctionStartedAndEndendBy1Trigger(t *testing.T) { auctionStateMock.EXPECT().IsFBA().Return(false).Times(1) auctionStateMock.EXPECT().InAuction().Return(true).Times(1) auctionStateMock.EXPECT().IsPriceAuction().Return(true).Times(1) - auctionStateMock.EXPECT().IsLiquidityAuction().Return(true).Times(1) auctionStateMock.EXPECT().IsOpeningAuction().Return(false).Times(1) // auctionStateMock.EXPECT().IsPriceAuction().Return(true).Times(1) auctionStateMock.EXPECT().ExpiresAt().Return(&initialAuctionEnd).Times(1) @@ -668,7 +663,6 @@ func TestAuctionStartedAndEndendBy2Triggers(t *testing.T) { auctionStateMock.EXPECT().IsFBA().Return(false).Times(2) auctionStateMock.EXPECT().InAuction().Return(false).Times(2) auctionStateMock.EXPECT().IsPriceAuction().Return(false).Times(4) - auctionStateMock.EXPECT().IsLiquidityAuction().Return(false).Times(3) statevar := mocks.NewMockStateVarEngine(ctrl) statevar.EXPECT().RegisterStateVariable(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()) @@ -698,7 +692,6 @@ func TestAuctionStartedAndEndendBy2Triggers(t *testing.T) { auctionStateMock.EXPECT().InAuction().Return(true).Times(1) auctionStateMock.EXPECT().IsOpeningAuction().Return(false).Times(1) auctionStateMock.EXPECT().IsPriceAuction().Return(true).Times(1) - auctionStateMock.EXPECT().IsLiquidityAuction().Return(false).Times(1) auctionStateMock.EXPECT().ExpiresAt().Return(&initialAuctionEnd).Times(1) auctionStateMock.EXPECT().SetReadyToLeave().Times(1) @@ -741,7 +734,6 @@ func TestAuctionStartedAndEndendBy1TriggerAndExtendedBy2nd(t *testing.T) { auctionStateMock.EXPECT().IsFBA().Return(false).Times(2) auctionStateMock.EXPECT().InAuction().Return(false).Times(2) auctionStateMock.EXPECT().IsPriceAuction().Return(false).Times(2) - auctionStateMock.EXPECT().IsLiquidityAuction().Return(false).AnyTimes() statevar := mocks.NewMockStateVarEngine(ctrl) statevar.EXPECT().RegisterStateVariable(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()) @@ -866,7 +858,6 @@ func TestAuctionStartedBy1TriggerAndNotExtendedBy2ndStaleTrigger(t *testing.T) { auctionStateMock.EXPECT().IsFBA().Return(false).Times(2) auctionStateMock.EXPECT().InAuction().Return(false).Times(2) auctionStateMock.EXPECT().IsPriceAuction().Return(false).Times(2) - auctionStateMock.EXPECT().IsLiquidityAuction().Return(false).AnyTimes() statevar := mocks.NewMockStateVarEngine(ctrl) statevar.EXPECT().RegisterStateVariable(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()) @@ -989,7 +980,6 @@ func TestMarketInGenericAuction(t *testing.T) { auctionStateMock.EXPECT().InAuction().Return(true).Times(5) auctionStateMock.EXPECT().IsOpeningAuction().Return(false).Times(5) auctionStateMock.EXPECT().IsPriceAuction().Return(false).AnyTimes() - auctionStateMock.EXPECT().IsLiquidityAuction().Return(false).AnyTimes() auctionStateMock.EXPECT().IsPriceExtension().Return(false).AnyTimes() auctionStateMock.EXPECT().CanLeave().Return(false).AnyTimes() statevar := mocks.NewMockStateVarEngine(ctrl) @@ -1094,7 +1084,6 @@ func TestGetValidPriceRange_2triggers(t *testing.T) { auctionStateMock.EXPECT().IsFBA().Return(false).Times(12) auctionStateMock.EXPECT().InAuction().Return(false).Times(12) auctionStateMock.EXPECT().IsPriceAuction().Return(false).Times(11) - auctionStateMock.EXPECT().IsLiquidityAuction().Return(false).Times(11) statevar := mocks.NewMockStateVarEngine(ctrl) statevar.EXPECT().RegisterStateVariable(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()) diff --git a/core/monitor/price/snapshot_test.go b/core/monitor/price/snapshot_test.go index a9450a0421..0057f54eb7 100644 --- a/core/monitor/price/snapshot_test.go +++ b/core/monitor/price/snapshot_test.go @@ -28,6 +28,7 @@ import ( "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" vegapb "code.vegaprotocol.io/vega/protos/vega" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -180,7 +181,6 @@ func TestRestorePriceBoundRepresentation(t *testing.T) { auctionStateMock.EXPECT().IsFBA().Return(false).AnyTimes() auctionStateMock.EXPECT().InAuction().Return(false).AnyTimes() auctionStateMock.EXPECT().IsPriceAuction().Return(false).AnyTimes() - auctionStateMock.EXPECT().IsLiquidityAuction().Return(false).AnyTimes() statevar := mocks.NewMockStateVarEngine(ctrl) statevar.EXPECT().RegisterStateVariable(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes() diff --git a/core/monitor/snapshot_test.go b/core/monitor/snapshot_test.go index 1caff223d3..e704106f75 100644 --- a/core/monitor/snapshot_test.go +++ b/core/monitor/snapshot_test.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -86,7 +87,6 @@ func getMarket(openingAuctionDuration *types.AuctionDuration) types.Market { TimeWindow: 3600, // seconds = 1h ScalingFactor: num.DecimalFromFloat(10), }, - TriggeringRatio: num.DecimalZero(), }, } return mkt diff --git a/core/netparams/checkpoint.go b/core/netparams/checkpoint.go index cd50cce6c5..c5e60a1c8a 100644 --- a/core/netparams/checkpoint.go +++ b/core/netparams/checkpoint.go @@ -21,10 +21,9 @@ import ( "time" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/protos/vega" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - - "code.vegaprotocol.io/vega/libs/proto" ) func (s *Store) Name() types.CheckpointName { diff --git a/core/netparams/checks/checks.go b/core/netparams/checks/checks.go index 51fe8c4e2c..8443ddb91d 100644 --- a/core/netparams/checks/checks.go +++ b/core/netparams/checks/checks.go @@ -44,8 +44,8 @@ func SpamPoWHashFunction(supportedFunctions []string) func(string) error { } } -func MarginScalingFactor() func(interface{}) error { - return func(v interface{}) error { +func MarginScalingFactor() func(interface{}, interface{}) error { + return func(v interface{}, _ interface{}) error { sf := v.(*types.ScalingFactors) if sf.SearchLevel >= sf.InitialMargin || sf.InitialMargin >= sf.CollateralRelease { return errors.New("invalid scaling factors (searchLevel < initialMargin < collateralRelease)") @@ -54,8 +54,8 @@ func MarginScalingFactor() func(interface{}) error { } } -func MarginScalingFactorRange(min, max num.Decimal) func(interface{}) error { - return func(v interface{}) error { +func MarginScalingFactorRange(min, max num.Decimal) func(interface{}, interface{}) error { + return func(v interface{}, _ interface{}) error { sf := v.(*types.ScalingFactors) if sf.SearchLevel < min.InexactFloat64() || sf.CollateralRelease > max.InexactFloat64() { return errors.New("invalid scaling factors (" + min.String() + "< searchLevel < initialMargin < collateralRelease <=" + max.String() + ")") @@ -64,8 +64,8 @@ func MarginScalingFactorRange(min, max num.Decimal) func(interface{}) error { } } -func PriceMonitoringParametersAuctionExtension(min, max time.Duration) func(interface{}) error { - return func(v interface{}) error { +func PriceMonitoringParametersAuctionExtension(min, max time.Duration) func(interface{}, interface{}) error { + return func(v interface{}, _ interface{}) error { pmp := v.(*types.PriceMonitoringParameters) for _, pmt := range pmp.Triggers { if time.Duration(pmt.AuctionExtension*int64(time.Second)) < min || time.Duration(pmt.AuctionExtension*int64(time.Second)) > max { @@ -76,8 +76,8 @@ func PriceMonitoringParametersAuctionExtension(min, max time.Duration) func(inte } } -func PriceMonitoringParametersHorizon(min, max time.Duration) func(interface{}) error { - return func(v interface{}) error { +func PriceMonitoringParametersHorizon(min, max time.Duration) func(interface{}, interface{}) error { + return func(v interface{}, _ interface{}) error { pmp := v.(*types.PriceMonitoringParameters) for _, pmt := range pmp.Triggers { if time.Duration(pmt.Horizon*int64(time.Second)) < min || time.Duration(pmt.Horizon*int64(time.Second)) > max { @@ -88,8 +88,8 @@ func PriceMonitoringParametersHorizon(min, max time.Duration) func(interface{}) } } -func PriceMonitoringParametersProbability(min, max num.Decimal) func(interface{}) error { - return func(v interface{}) error { +func PriceMonitoringParametersProbability(min, max num.Decimal) func(interface{}, interface{}) error { + return func(v interface{}, _ interface{}) error { pmp := v.(*types.PriceMonitoringParameters) for _, pmt := range pmp.Triggers { p, e := num.DecimalFromString(pmt.Probability) diff --git a/core/netparams/defaults.go b/core/netparams/defaults.go index 09bebf8320..9ae6bd9e22 100644 --- a/core/netparams/defaults.go +++ b/core/netparams/defaults.go @@ -20,11 +20,10 @@ import ( "fmt" "time" + "code.vegaprotocol.io/vega/core/netparams/checks" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" - - "code.vegaprotocol.io/vega/core/netparams/checks" proto "code.vegaprotocol.io/vega/protos/vega" ) @@ -84,7 +83,7 @@ func defaultNetParams() map[string]value { MarketAuctionMinimumDuration: NewDuration(gte1s, lte1d).Mutable(true).MustUpdate("30m0s"), MarketAuctionMaximumDuration: NewDuration(gte1s, lte1mo).Mutable(true).MustUpdate(week), MarketLiquidityTargetStakeTriggeringRatio: NewDecimal(gteD0, lteD1).Mutable(true).MustUpdate("0"), - MarketProbabilityOfTradingTauScaling: NewDecimal(gteD1, lteD1000).Mutable(true).MustUpdate("1"), + MarketProbabilityOfTradingTauScaling: NewDecimal(DecimalGTE(num.MustDecimalFromString("0.0001")), lteD1000).Mutable(true).MustUpdate("1"), MarketMinProbabilityOfTradingForLPOrders: NewDecimal(DecimalGTE(num.MustDecimalFromString("1e-12")), DecimalLTE(num.MustDecimalFromString("0.1"))).Mutable(true).MustUpdate("1e-8"), MarketTargetStakeTimeWindow: NewDuration(gte1s, lte1mo).Mutable(true).MustUpdate("1h0m0s"), MarketTargetStakeScalingFactor: NewDecimal(gtD0, lteD100).Mutable(true).MustUpdate("10"), @@ -100,9 +99,7 @@ func defaultNetParams() map[string]value { MarketLiquiditySLANonPerformanceBondPenaltyMax: NewDecimal(gteD0, lteD1).Mutable(true).MustUpdate("0.05"), MarketLiquiditySLANonPerformanceBondPenaltySlope: NewDecimal(gteD0, lteD1000).Mutable(true).MustUpdate("1"), MarketLiquidityStakeToCCYVolume: NewDecimal(gteD0, lteD100).Mutable(true).MustUpdate("1"), - - // @TODO karel add validation - MarketLiquidityProvidersFeeCalculationTimeStep: NewDuration(gte1s, lte255h).Mutable(true).MustUpdate("1m"), + MarketLiquidityProvidersFeeCalculationTimeStep: NewDuration(gte1s, lte255h).Mutable(true).MustUpdate("1m"), // governance market proposal GovernanceProposalMarketMinClose: NewDuration(gte1s, lte1y).Mutable(true).MustUpdate("48h0m0s"), @@ -228,6 +225,9 @@ func defaultNetParams() map[string]value { SpamProtectionMaxApplyReferralCode: NewInt(gteI0).Mutable(true).MustUpdate("5"), SpamProtectionBalanceSnapshotFrequency: NewDuration(gte0s, lte1h).Mutable(true).MustUpdate("5s"), SpamProtectionApplyReferralMinFunds: NewUint(UintGTE(num.NewUint(0))).Mutable(true).MustUpdate("10"), + SpamProtectionReferralSetMinFunds: NewUint(UintGTE(num.NewUint(0))).Mutable(true).MustUpdate("10"), + SpamProtectionMaxUpdatePartyProfile: NewInt(gteI0).Mutable(true).MustUpdate("10"), + SpamProtectionUpdateProfileMinFunds: NewUint(UintGTE(num.NewUint(0))).Mutable(true).MustUpdate("10"), // no validation for this initially as we configure the // the bootstrapping asset. @@ -237,6 +237,10 @@ func defaultNetParams() map[string]value { BlockchainsEthereumConfig: NewJSON(&proto.EthereumConfig{}, types.CheckUntypedEthereumConfig).Mutable(true). MustUpdate("{\"network_id\": \"XXX\", \"chain_id\": \"XXX\", \"collateral_bridge_contract\": { \"address\": \"0xXXX\" }, \"confirmations\": 3, \"staking_bridge_contract\": { \"address\": \"0xXXX\", \"deployment_block_height\": 0}, \"token_vesting_contract\": { \"address\": \"0xXXX\", \"deployment_block_height\": 0 }, \"multisig_control_contract\": { \"address\": \"0xXXX\", \"deployment_block_height\": 0 }}"), + BlockchainsEthereumL2Configs: NewJSON(&proto.EthereumL2Configs{}, types.CheckUntypedEthereumL2Configs).Mutable(true). + MustUpdate( + `{"configs":[{"network_id":"100","chain_id":"100","confirmations":3,"name":"Gnosis Chain"}, {"network_id":"42161","chain_id":"42161","confirmations":3,"name":"Arbitrum One"}]}`, + ), ValidatorsEpochLength: NewDuration(gte1s, lte255h).Mutable(true).MustUpdate("24h0m0s"), @@ -259,9 +263,12 @@ func defaultNetParams() map[string]value { MinimumEthereumEventsForNewValidator: NewUint(gteU0).Mutable(true).MustUpdate("3"), // transfers - TransferFeeFactor: NewDecimal(gteD0, lteD1).Mutable(true).MustUpdate("0.001"), - TransferMinTransferQuantumMultiple: NewDecimal(gteD0).Mutable(true).MustUpdate("0.1"), - TransferMaxCommandsPerEpoch: NewInt(gteI0).Mutable(true).MustUpdate("20"), + TransferFeeFactor: NewDecimal(gteD0, lteD1).Mutable(true).MustUpdate("0.001"), + TransferMinTransferQuantumMultiple: NewDecimal(gteD0).Mutable(true).MustUpdate("0.1"), + TransferMaxCommandsPerEpoch: NewInt(gteI0).Mutable(true).MustUpdate("20"), + TransferFeeMaxQuantumAmount: NewDecimal(gteD0).Mutable(true).MustUpdate("1"), + TransferFeeDiscountDecayFraction: NewDecimal(gteD0, lteD1).Mutable(true).MustUpdate("0.8"), + TransferFeeDiscountMinimumTrackedAmount: NewDecimal(gteD0).Mutable(true).MustUpdate("0.01"), // pow SpamPoWNumberOfPastBlocks: NewUint(gteU5, UintLTE(num.NewUint(500))).Mutable(true).MustUpdate("100"), @@ -279,10 +286,11 @@ func defaultNetParams() map[string]value { MinBlockCapacity: NewUint(UintGTE(num.NewUint(1)), UintLTE(num.NewUint(10000))).Mutable(true).MustUpdate("32"), MaxPeggedOrders: NewUint(UintGTE(num.NewUint(0)), UintLTE(num.NewUint(10000))).Mutable(true).MustUpdate("1500"), - MarkPriceUpdateMaximumFrequency: NewDuration(gte0s, lte1h).Mutable(true).MustUpdate("5s"), - ValidatorPerformanceScalingFactor: NewDecimal(gteD0, lteD1).Mutable(true).MustUpdate("0"), - MarketSuccessorLaunchWindow: NewDuration(gte1s, lte1mo).Mutable(true).MustUpdate("168h"), // 168h == 7 days - SpamProtectionMaxStopOrdersPerMarket: NewUint(UintGTE(num.UintZero()), UintLTE(num.NewUint(100))).Mutable(true).MustUpdate("4"), + MarkPriceUpdateMaximumFrequency: NewDuration(gte0s, lte1h).Mutable(true).MustUpdate("5s"), + InternalCompositePriceUpdateFrequency: NewDuration(gte0s, lte1h).Mutable(true).MustUpdate("5s"), + ValidatorPerformanceScalingFactor: NewDecimal(gteD0, lteD1).Mutable(true).MustUpdate("0"), + MarketSuccessorLaunchWindow: NewDuration(gte1s, lte1mo).Mutable(true).MustUpdate("168h"), // 168h == 7 days + SpamProtectionMaxStopOrdersPerMarket: NewUint(UintGTE(num.UintZero()), UintLTE(num.NewUint(100))).Mutable(true).MustUpdate("4"), RewardsVestingBaseRate: NewDecimal(gtD0, lteD1).Mutable(true).MustUpdate("0.25"), RewardsVestingMinimumTransfer: NewDecimal(gtD0).Mutable(true).MustUpdate("10"), @@ -315,10 +323,14 @@ func defaultNetParams() map[string]value { // ensure that MinBlockCapacity <= 2* m[MaxGasPerBlock].AddRules(UintDependentGTE(MinBlockCapacity, m[MinBlockCapacity].(*Uint), num.MustDecimalFromString("2"))) m[MinBlockCapacity].AddRules(UintDependentLTE(MaxGasPerBlock, m[MaxGasPerBlock].(*Uint), num.MustDecimalFromString("0.5"))) - m[MarkPriceUpdateMaximumFrequency].AddRules(DurationGTE(time.Duration(0))) + m[MarkPriceUpdateMaximumFrequency].AddRules(DurationGT(time.Duration(0))) // could just do 24 * 3600 * time.Second, but this is easier to read maxFreq, _ := time.ParseDuration("24h") - m[MarkPriceUpdateMaximumFrequency].AddRules(DurationGTE(time.Duration(0)), DurationLTE(maxFreq)) + m[MarkPriceUpdateMaximumFrequency].AddRules(DurationGT(time.Duration(0)), DurationLTE(maxFreq)) + + m[InternalCompositePriceUpdateFrequency].AddRules(DurationGT(time.Duration(0))) + // could just do 24 * 3600 * time.Second, but this is easier to read + m[InternalCompositePriceUpdateFrequency].AddRules(DurationGT(time.Duration(0)), DurationLTE(maxFreq)) m[MarketLiquidityProvidersFeeCalculationTimeStep].AddRules( DurationDependentLTE(ValidatorsEpochLength, m[ValidatorsEpochLength].(*Duration)), @@ -337,7 +349,7 @@ func checkOptionalRFC3339Date(d string) error { return err } -func PriceMonitoringParametersValidation(i interface{}) error { +func PriceMonitoringParametersValidation(i interface{}, _ interface{}) error { pmp, ok := i.(*proto.PriceMonitoringParameters) if !ok { return errors.New("not a price monitoring parameters type") diff --git a/core/netparams/keys.go b/core/netparams/keys.go index cda772e121..240658c56e 100644 --- a/core/netparams/keys.go +++ b/core/netparams/keys.go @@ -173,9 +173,14 @@ const ( SpamProtectionMaxApplyReferralCode = "spam.protection.max.applyReferralCode" SpamProtectionBalanceSnapshotFrequency = "spam.protection.balanceSnapshotFrequency" SpamProtectionApplyReferralMinFunds = "spam.protection.applyReferral.min.funds" + SpamProtectionReferralSetMinFunds = "spam.protection.referralSet.min.funds" + + SpamProtectionMaxUpdatePartyProfile = "spam.protection.max.updatePartyProfile" + SpamProtectionUpdateProfileMinFunds = "spam.protection.updatePartyProfile.min.funds" // blockchain specifics? - BlockchainsEthereumConfig = "blockchains.ethereumConfig" + BlockchainsEthereumConfig = "blockchains.ethereumConfig" + BlockchainsEthereumL2Configs = "blockchains.ethereumRpcAndEvmCompatDataSourcesConfig" // length of epoch in seconds. ValidatorsEpochLength = "validators.epoch.length" @@ -200,9 +205,12 @@ const ( MultipleOfTendermintValidatorsForEtsatzSet = "network.validators.ersatz.multipleOfTendermintValidators" MinimumEthereumEventsForNewValidator = "network.validators.minimumEthereumEventsForNewValidator" - TransferFeeFactor = "transfer.fee.factor" - TransferMinTransferQuantumMultiple = "transfer.minTransferQuantumMultiple" - TransferMaxCommandsPerEpoch = "spam.protection.maxUserTransfersPerEpoch" + TransferFeeFactor = "transfer.fee.factor" + TransferMinTransferQuantumMultiple = "transfer.minTransferQuantumMultiple" + TransferMaxCommandsPerEpoch = "spam.protection.maxUserTransfersPerEpoch" + TransferFeeMaxQuantumAmount = "transfer.fee.maxQuantumAmount" + TransferFeeDiscountDecayFraction = "transfer.feeDiscountDecayFraction" + TransferFeeDiscountMinimumTrackedAmount = "transfer.feeDiscountMinimumTrackedAmount" // proof of work. SpamPoWNumberOfPastBlocks = "spam.pow.numberOfPastBlocks" @@ -223,6 +231,8 @@ const ( MaxPeggedOrders = "limits.markets.maxPeggedOrders" // MTM interval. MarkPriceUpdateMaximumFrequency = "network.markPriceUpdateMaximumFrequency" + // interval for updating internal composite price for funding payment in perps. + InternalCompositePriceUpdateFrequency = "network.internalCompositePriceUpdateFrequency" // how much to scale the number of proposed blocks used for performance calculation. ValidatorPerformanceScalingFactor = "validator.performance.scaling.factor" @@ -259,6 +269,8 @@ var Deprecated = map[string]struct{}{ } var AllKeys = map[string]struct{}{ + SpamProtectionMaxUpdatePartyProfile: {}, + SpamProtectionUpdateProfileMinFunds: {}, GovernanceProposalVolumeDiscountProgramMinClose: {}, GovernanceProposalVolumeDiscountProgramMaxClose: {}, GovernanceProposalVolumeDiscountProgramMinEnact: {}, @@ -395,6 +407,9 @@ var AllKeys = map[string]struct{}{ MultipleOfTendermintValidatorsForEtsatzSet: {}, MinimumEthereumEventsForNewValidator: {}, TransferMinTransferQuantumMultiple: {}, + TransferFeeMaxQuantumAmount: {}, + TransferFeeDiscountDecayFraction: {}, + TransferFeeDiscountMinimumTrackedAmount: {}, TransferMaxCommandsPerEpoch: {}, SpamPoWNumberOfPastBlocks: {}, SpamPoWDifficulty: {}, @@ -413,6 +428,7 @@ var AllKeys = map[string]struct{}{ GovernanceProposalUpdateAssetMinVoterBalance: {}, SpamProtectionMaxBatchSize: {}, MarkPriceUpdateMaximumFrequency: {}, + InternalCompositePriceUpdateFrequency: {}, ValidatorPerformanceScalingFactor: {}, SpamProtectionMinimumWithdrawalQuantumMultiple: {}, SpamProtectionMinMultisigUpdates: {}, @@ -430,4 +446,6 @@ var AllKeys = map[string]struct{}{ SpamProtectionMaxApplyReferralCode: {}, SpamProtectionBalanceSnapshotFrequency: {}, SpamProtectionApplyReferralMinFunds: {}, + SpamProtectionReferralSetMinFunds: {}, + BlockchainsEthereumL2Configs: {}, } diff --git a/core/netparams/netparams.go b/core/netparams/netparams.go index bd1dd9c669..b3c00ac6d1 100644 --- a/core/netparams/netparams.go +++ b/core/netparams/netparams.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "golang.org/x/exp/maps" ) diff --git a/core/netparams/snapshot.go b/core/netparams/snapshot.go index 451d738d2f..56224a1ffa 100644 --- a/core/netparams/snapshot.go +++ b/core/netparams/snapshot.go @@ -21,7 +21,6 @@ import ( "sort" "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/libs/proto" ) diff --git a/core/netparams/snapshot_test.go b/core/netparams/snapshot_test.go index 882ebee5c0..a654ad550b 100644 --- a/core/netparams/snapshot_test.go +++ b/core/netparams/snapshot_test.go @@ -26,6 +26,7 @@ import ( vgtest "code.vegaprotocol.io/vega/libs/test" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/netparams/values.go b/core/netparams/values.go index f9d686ca88..ca5ec81ca1 100644 --- a/core/netparams/values.go +++ b/core/netparams/values.go @@ -703,7 +703,7 @@ func DurationLT(i time.Duration) func(time.Duration) error { } } -type JSONRule func(interface{}) error +type JSONRule func(interface{}, interface{}) error type JSON struct { *baseValue @@ -790,7 +790,7 @@ func (j *JSON) Validate(value string) error { } for _, fn := range j.rules { - if newerr := fn(j.value); newerr != nil { + if newerr := fn(j.value, j.rawval); newerr != nil { if err != nil { err = fmt.Errorf("%v, %w", err, newerr) } else { diff --git a/core/netparams/values_test.go b/core/netparams/values_test.go index 6784b390ad..c22ceadffe 100644 --- a/core/netparams/values_test.go +++ b/core/netparams/values_test.go @@ -16,6 +16,7 @@ package netparams_test import ( + "encoding/json" "errors" "testing" @@ -49,7 +50,7 @@ func TestNegativeUint(t *testing.T) { } func TestJSONValues(t *testing.T) { - validator := func(v interface{}) error { + validator := func(v interface{}, p interface{}) error { a, ok := v.(*A) if !ok { return errors.New("invalid type") @@ -61,6 +62,18 @@ func TestJSONValues(t *testing.T) { if a.I < 0 { return errors.New("I negative") } + + b := &A{} + json.Unmarshal([]byte(p.(string)), b) + + if !ok { + return errors.New("invalid type B") + } + + if a.I < b.I { + return errors.New("cannot amended to lower value") + } + return nil } @@ -97,6 +110,10 @@ func TestJSONValues(t *testing.T) { // valid type, field validation failed err = j.Update(`{"s": "", "i": 84}`) assert.EqualError(t, err, "empty string") + + // flex rule that prevents update to a lower value of i + err = j.Validate(`{"s": "notempty", "i": 1}`) + assert.EqualError(t, err, "cannot amended to lower value") } func TestJSONVPriceMonitoringParameters(t *testing.T) { diff --git a/core/nodewallets/commander.go b/core/nodewallets/commander.go index 495b75e5da..b692713072 100644 --- a/core/nodewallets/commander.go +++ b/core/nodewallets/commander.go @@ -28,8 +28,8 @@ import ( commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" "github.com/cenkalti/backoff" + tmctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/golang/protobuf/proto" - tmctypes "github.com/tendermint/tendermint/rpc/core/types" ) const ( @@ -163,7 +163,7 @@ func (c *Commander) sign(marshalledData []byte) (*commandspb.Signature, error) { func wrapPayloadIntoInputData(data *commandspb.InputData, cmd txn.Command, payload proto.Message) { switch cmd { - case txn.SubmitOrderCommand, txn.CancelOrderCommand, txn.AmendOrderCommand, txn.VoteCommand, txn.WithdrawCommand, txn.LiquidityProvisionCommand, txn.ProposeCommand, txn.SubmitOracleDataCommand, txn.StopOrdersCancellationCommand, txn.StopOrdersSubmissionCommand: + case txn.SubmitOrderCommand, txn.CancelOrderCommand, txn.AmendOrderCommand, txn.VoteCommand, txn.WithdrawCommand, txn.LiquidityProvisionCommand, txn.ProposeCommand, txn.BatchProposeCommand, txn.SubmitOracleDataCommand, txn.StopOrdersCancellationCommand, txn.StopOrdersSubmissionCommand: panic("command is not supported to be sent by a node.") case txn.ProtocolUpgradeCommand: if underlyingCmd, ok := payload.(*commandspb.ProtocolUpgradeProposal); ok { diff --git a/core/nodewallets/commander_test.go b/core/nodewallets/commander_test.go index 0435b1574a..86f589a142 100644 --- a/core/nodewallets/commander_test.go +++ b/core/nodewallets/commander_test.go @@ -27,11 +27,11 @@ import ( vgtesting "code.vegaprotocol.io/vega/libs/testing" "code.vegaprotocol.io/vega/logging" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" - "github.com/stretchr/testify/require" + tmctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - tmctypes "github.com/tendermint/tendermint/rpc/core/types" + "github.com/stretchr/testify/require" ) type testCommander struct { diff --git a/core/nodewallets/eth/clef/wallet.go b/core/nodewallets/eth/clef/wallet.go index 6d92d00a24..0246a4cf62 100644 --- a/core/nodewallets/eth/clef/wallet.go +++ b/core/nodewallets/eth/clef/wallet.go @@ -23,9 +23,9 @@ import ( "code.vegaprotocol.io/vega/core/nodewallets/registry" "code.vegaprotocol.io/vega/libs/crypto" + "github.com/ethereum/go-ethereum/accounts" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" ) diff --git a/core/nodewallets/eth/clef/wallet_test.go b/core/nodewallets/eth/clef/wallet_test.go index 5161a19738..a86800f3b1 100644 --- a/core/nodewallets/eth/clef/wallet_test.go +++ b/core/nodewallets/eth/clef/wallet_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/nodewallets/eth/clef" "code.vegaprotocol.io/vega/core/nodewallets/eth/clef/mocks" "code.vegaprotocol.io/vega/core/nodewallets/registry" + ethCommon "github.com/ethereum/go-ethereum/common" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" diff --git a/core/nodewallets/eth/keystore/loader.go b/core/nodewallets/eth/keystore/loader.go index c0db6cc5d6..9ff5d2cb5e 100644 --- a/core/nodewallets/eth/keystore/loader.go +++ b/core/nodewallets/eth/keystore/loader.go @@ -23,6 +23,7 @@ import ( vgfs "code.vegaprotocol.io/vega/libs/fs" "code.vegaprotocol.io/vega/paths" + "github.com/ethereum/go-ethereum/accounts/keystore" ) diff --git a/core/nodewallets/eth/keystore/wallet.go b/core/nodewallets/eth/keystore/wallet.go index bab874e217..1d7d0b792a 100644 --- a/core/nodewallets/eth/keystore/wallet.go +++ b/core/nodewallets/eth/keystore/wallet.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/core/nodewallets/registry" "code.vegaprotocol.io/vega/libs/crypto" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/keystore" ) diff --git a/core/nodewallets/ethereum_handler.go b/core/nodewallets/ethereum_handler.go index 24554f6de2..c94ea37af3 100644 --- a/core/nodewallets/ethereum_handler.go +++ b/core/nodewallets/ethereum_handler.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/core/nodewallets/eth/keystore" "code.vegaprotocol.io/vega/core/nodewallets/registry" "code.vegaprotocol.io/vega/paths" + ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/rpc" ) diff --git a/core/nodewallets/handler_test.go b/core/nodewallets/handler_test.go index 5c88340676..6c811ca456 100644 --- a/core/nodewallets/handler_test.go +++ b/core/nodewallets/handler_test.go @@ -25,6 +25,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" vgtesting "code.vegaprotocol.io/vega/libs/testing" "code.vegaprotocol.io/vega/paths" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/nodewallets/mocks/chain_mock.go b/core/nodewallets/mocks/chain_mock.go index 73f6e23041..8369da1e97 100644 --- a/core/nodewallets/mocks/chain_mock.go +++ b/core/nodewallets/mocks/chain_mock.go @@ -9,8 +9,8 @@ import ( reflect "reflect" v1 "code.vegaprotocol.io/vega/protos/vega/commands/v1" + coretypes "github.com/cometbft/cometbft/rpc/core/types" gomock "github.com/golang/mock/gomock" - coretypes "github.com/tendermint/tendermint/rpc/core/types" ) // MockChain is a mock of Chain interface. diff --git a/core/nodewallets/nodewallets_test.go b/core/nodewallets/nodewallets_test.go index f126b3984d..d273eed3b9 100644 --- a/core/nodewallets/nodewallets_test.go +++ b/core/nodewallets/nodewallets_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/nodewallets" ethnw "code.vegaprotocol.io/vega/core/nodewallets/eth" vgnw "code.vegaprotocol.io/vega/core/nodewallets/vega" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/notary/notary.go b/core/notary/notary.go index 6760ecfc1b..a68969d987 100644 --- a/core/notary/notary.go +++ b/core/notary/notary.go @@ -27,11 +27,11 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" - "golang.org/x/exp/maps" "github.com/cenkalti/backoff" "github.com/golang/protobuf/proto" "github.com/pkg/errors" + "golang.org/x/exp/maps" ) // by default all validators needs to sign. diff --git a/core/notary/snapshot.go b/core/notary/snapshot.go index 6a7e834c28..9f53d019f2 100644 --- a/core/notary/snapshot.go +++ b/core/notary/snapshot.go @@ -22,10 +22,9 @@ import ( "strings" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" v1 "code.vegaprotocol.io/vega/protos/vega/commands/v1" - - "code.vegaprotocol.io/vega/libs/proto" ) var ( diff --git a/core/notary/snapshot_test.go b/core/notary/snapshot_test.go index 30f7fcfb39..1d55dce4a8 100644 --- a/core/notary/snapshot_test.go +++ b/core/notary/snapshot_test.go @@ -22,10 +22,10 @@ import ( "time" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/proto" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "code.vegaprotocol.io/vega/libs/proto" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/core/parties/dependencies.go b/core/parties/dependencies.go new file mode 100644 index 0000000000..87d84538d3 --- /dev/null +++ b/core/parties/dependencies.go @@ -0,0 +1,25 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package parties + +import ( + "code.vegaprotocol.io/vega/core/events" +) + +// Broker is used to notify administrative actions on parties profiles. +type Broker interface { + Send(event events.Event) +} diff --git a/core/parties/engine.go b/core/parties/engine.go new file mode 100644 index 0000000000..cdd23adefa --- /dev/null +++ b/core/parties/engine.go @@ -0,0 +1,135 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package parties + +import ( + "context" + "errors" + "fmt" + "slices" + + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" +) + +var ( + ErrAliasIsReserved = errors.New("this alias is reserved") + ReservedPartyAliases = []string{"network"} +) + +type Engine struct { + broker Broker + + // profiles tracks all parties profiles by party ID. + profiles map[types.PartyID]*types.PartyProfile + minBalanceToUpdateProfile *num.Uint +} + +func (e *Engine) OnMinBalanceForUpdatePartyProfileUpdated(_ context.Context, min *num.Uint) error { + e.minBalanceToUpdateProfile = min.Clone() + return nil +} + +func (e *Engine) CheckSufficientBalanceToUpdateProfile(party types.PartyID, balance *num.Uint) error { + if balance.LT(e.minBalanceToUpdateProfile) { + return fmt.Errorf("party %q does not have sufficient balance to update profile code, required balance %s available balance %s", party, e.minBalanceToUpdateProfile.String(), balance.String()) + } + return nil +} + +func (e *Engine) UpdateProfile(ctx context.Context, partyID types.PartyID, cmd *commandspb.UpdatePartyProfile) error { + if err := e.validateProfileUpdate(partyID, cmd); err != nil { + return fmt.Errorf("invalid profile update: %w", err) + } + + profile, exists := e.profiles[partyID] + if !exists { + profile = &types.PartyProfile{ + PartyID: partyID, + } + e.profiles[partyID] = profile + } + + profile.Alias = cmd.Alias + + profile.Metadata = map[string]string{} + for _, m := range cmd.Metadata { + profile.Metadata[m.Key] = m.Value + } + + e.notifyProfileUpdate(ctx, profile) + + return nil +} + +func (e *Engine) loadPartiesFromSnapshot(partiesPayload *types.PayloadParties) { + for _, profilePayload := range partiesPayload.Profiles { + profile := &types.PartyProfile{ + PartyID: types.PartyID(profilePayload.PartyId), + Alias: profilePayload.Alias, + } + + profile.Metadata = map[string]string{} + for _, m := range profilePayload.Metadata { + profile.Metadata[m.Key] = m.Value + } + + e.profiles[profile.PartyID] = profile + } +} + +func (e *Engine) validateProfileUpdate(partyID types.PartyID, cmd *commandspb.UpdatePartyProfile) error { + if err := e.ensureAliasUniqueness(partyID, cmd.Alias); err != nil { + return err + } + + return nil +} + +func (e *Engine) ensureAliasUniqueness(partyID types.PartyID, newAlias string) error { + if newAlias == "" { + return nil + } + + if slices.Contains(ReservedPartyAliases, newAlias) { + return ErrAliasIsReserved + } + + for _, profile := range e.profiles { + if partyID != profile.PartyID && profile.Alias == newAlias { + return fmt.Errorf("alias %q is already taken", newAlias) + } + } + + return nil +} + +func (e *Engine) notifyProfileUpdate(ctx context.Context, profile *types.PartyProfile) { + e.broker.Send(events.NewPartyProfileUpdatedEvent(ctx, profile)) +} + +func NewEngine(broker Broker) *Engine { + engine := &Engine{ + broker: broker, + + profiles: map[types.PartyID]*types.PartyProfile{}, + minBalanceToUpdateProfile: num.UintZero(), + } + + return engine +} diff --git a/core/parties/engine_helpers_for_test.go b/core/parties/engine_helpers_for_test.go new file mode 100644 index 0000000000..874ef0d782 --- /dev/null +++ b/core/parties/engine_helpers_for_test.go @@ -0,0 +1,42 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package parties + +import ( + "strings" + + "code.vegaprotocol.io/vega/core/types" + + "golang.org/x/exp/slices" +) + +func (e *Engine) ListProfiles() []types.PartyProfile { + profiles := make([]types.PartyProfile, 0, len(e.profiles)) + + for _, profile := range e.profiles { + profiles = append(profiles, *profile) + } + + SortByPartyID(profiles) + + return profiles +} + +func SortByPartyID(toSort []types.PartyProfile) { + slices.SortStableFunc(toSort, func(a, b types.PartyProfile) int { + return strings.Compare(string(a.PartyID), string(b.PartyID)) + }) +} diff --git a/core/parties/engine_test.go b/core/parties/engine_test.go new file mode 100644 index 0000000000..a772b6232c --- /dev/null +++ b/core/parties/engine_test.go @@ -0,0 +1,102 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package parties_test + +import ( + "testing" + + "code.vegaprotocol.io/vega/core/types" + vgrand "code.vegaprotocol.io/vega/libs/rand" + vgtest "code.vegaprotocol.io/vega/libs/test" + vegapb "code.vegaprotocol.io/vega/protos/vega" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "github.com/stretchr/testify/require" +) + +func TestUpdatingProfiles(t *testing.T) { + ctx := vgtest.VegaContext(vgrand.RandomStr(5), vgtest.RandomI64()) + + te := newEngine(t) + + party1 := newPartyID(t) + + expectPartyProfileUpdatedEvent(t, te) + require.NoError(t, te.engine.UpdateProfile(ctx, party1, &commandspb.UpdatePartyProfile{ + Alias: "test1", + Metadata: []*vegapb.Metadata{ + { + Key: "key1", + Value: "value1", + }, + }, + })) + + party2 := newPartyID(t) + + expectPartyProfileUpdatedEvent(t, te) + require.NoError(t, te.engine.UpdateProfile(ctx, party2, &commandspb.UpdatePartyProfile{ + Alias: "test2", + Metadata: []*vegapb.Metadata{ + { + Key: "key1", + Value: "value1", + }, + }, + })) + + expectPartyProfileUpdatedEvent(t, te) + require.NoError(t, te.engine.UpdateProfile(ctx, party1, &commandspb.UpdatePartyProfile{ + Alias: "test1", + Metadata: []*vegapb.Metadata{ + { + Key: "key2", + Value: "value2", + }, + { + Key: "key3", + Value: "value3", + }, + }, + })) + + // Attempt using alias from party 2. + require.Error(t, te.engine.UpdateProfile(ctx, party1, &commandspb.UpdatePartyProfile{ + Alias: "test2", + })) + + assertEqualProfiles(t, []types.PartyProfile{ + { + PartyID: party1, + Alias: "test1", + Metadata: map[string]string{ + "key2": "value2", + "key3": "value3", + }, + }, + { + PartyID: party2, + Alias: "test2", + Metadata: map[string]string{ + "key1": "value1", + }, + }, + }, te.engine.ListProfiles()) + + require.Error(t, te.engine.UpdateProfile(ctx, party1, &commandspb.UpdatePartyProfile{ + Alias: "network", + })) +} diff --git a/core/parties/helpers_for_test.go b/core/parties/helpers_for_test.go new file mode 100644 index 0000000000..e92d05f571 --- /dev/null +++ b/core/parties/helpers_for_test.go @@ -0,0 +1,97 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package parties_test + +import ( + "testing" + "time" + + bmocks "code.vegaprotocol.io/vega/core/broker/mocks" + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/integration/stubs" + "code.vegaprotocol.io/vega/core/parties" + "code.vegaprotocol.io/vega/core/snapshot" + "code.vegaprotocol.io/vega/core/stats" + "code.vegaprotocol.io/vega/core/types" + vgrand "code.vegaprotocol.io/vega/libs/rand" + "code.vegaprotocol.io/vega/logging" + "code.vegaprotocol.io/vega/paths" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +type testEngine struct { + engine *parties.SnapshottedEngine + broker *bmocks.MockBroker +} + +func assertEqualProfiles(t *testing.T, expected, actual []types.PartyProfile) { + t.Helper() + + parties.SortByPartyID(expected) + parties.SortByPartyID(actual) + + assert.Equal(t, expected, actual) +} + +func expectPartyProfileUpdatedEvent(t *testing.T, engine *testEngine) { + t.Helper() + + engine.broker.EXPECT().Send(gomock.Any()).Do(func(evt events.Event) { + _, ok := evt.(*events.PartyProfileUpdated) + assert.True(t, ok, "Event should be a PartyProfileUpdated, but is %T", evt) + }).Times(1) +} + +func newSnapshotEngine(t *testing.T, vegaPath paths.Paths, now time.Time, engine *parties.SnapshottedEngine) *snapshot.Engine { + t.Helper() + + log := logging.NewTestLogger() + timeService := stubs.NewTimeStub() + timeService.SetTime(now) + statsData := stats.New(log, stats.NewDefaultConfig()) + config := snapshot.DefaultConfig() + + snapshotEngine, err := snapshot.NewEngine(vegaPath, config, log, timeService, statsData.Blockchain) + require.NoError(t, err) + + snapshotEngine.AddProviders(engine) + + return snapshotEngine +} + +func newEngine(t *testing.T) *testEngine { + t.Helper() + + ctrl := gomock.NewController(t) + + broker := bmocks.NewMockBroker(ctrl) + + engine := parties.NewSnapshottedEngine(broker) + + return &testEngine{ + engine: engine, + broker: broker, + } +} + +func newPartyID(t *testing.T) types.PartyID { + t.Helper() + + return types.PartyID(vgrand.RandomStr(5)) +} diff --git a/core/parties/snapshot.go b/core/parties/snapshot.go new file mode 100644 index 0000000000..0551103054 --- /dev/null +++ b/core/parties/snapshot.go @@ -0,0 +1,150 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package parties + +import ( + "context" + "fmt" + "strings" + + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/proto" + vegapb "code.vegaprotocol.io/vega/protos/vega" + snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + + "golang.org/x/exp/slices" +) + +type SnapshottedEngine struct { + *Engine + + pl types.Payload + + stopped bool + + hashKeys []string + partiesKey string +} + +func (e *SnapshottedEngine) Namespace() types.SnapshotNamespace { + return types.PartiesSnapshot +} + +func (e *SnapshottedEngine) Keys() []string { + return e.hashKeys +} + +func (e *SnapshottedEngine) GetState(k string) ([]byte, []types.StateProvider, error) { + state, err := e.serialise(k) + return state, nil, err +} + +func (e *SnapshottedEngine) LoadState(_ context.Context, p *types.Payload) ([]types.StateProvider, error) { + if e.Namespace() != p.Data.Namespace() { + return nil, types.ErrInvalidSnapshotNamespace + } + + switch data := p.Data.(type) { + case *types.PayloadParties: + e.Engine.loadPartiesFromSnapshot(data) + return nil, nil + default: + return nil, types.ErrUnknownSnapshotType + } +} + +func (e *SnapshottedEngine) Stopped() bool { + return e.stopped +} + +func (e *SnapshottedEngine) StopSnapshots() { + e.stopped = true +} + +func (e *SnapshottedEngine) serialise(k string) ([]byte, error) { + if e.stopped { + return nil, nil + } + + switch k { + case e.partiesKey: + return e.serialiseParties() + default: + return nil, types.ErrSnapshotKeyDoesNotExist + } +} + +func (e *SnapshottedEngine) serialiseParties() ([]byte, error) { + profiles := e.Engine.profiles + profilesSnapshot := make([]*snapshotpb.PartyProfile, 0, len(profiles)) + for _, profile := range profiles { + profileSnapshot := &snapshotpb.PartyProfile{ + PartyId: profile.PartyID.String(), + Alias: profile.Alias, + } + for k, v := range profile.Metadata { + profileSnapshot.Metadata = append(profileSnapshot.Metadata, &vegapb.Metadata{ + Key: k, + Value: v, + }) + } + + // Ensure deterministic order among the metadata. + slices.SortStableFunc(profileSnapshot.Metadata, func(a, b *vegapb.Metadata) int { + return strings.Compare(a.Key, b.Key) + }) + + profilesSnapshot = append(profilesSnapshot, profileSnapshot) + } + + // Ensure deterministic order among the parties. + slices.SortStableFunc(profilesSnapshot, func(a, b *snapshotpb.PartyProfile) int { + return strings.Compare(a.PartyId, b.PartyId) + }) + + payload := &snapshotpb.Payload{ + Data: &snapshotpb.Payload_Parties{ + Parties: &snapshotpb.Parties{ + Profiles: profilesSnapshot, + }, + }, + } + + serialisedProfiles, err := proto.Marshal(payload) + if err != nil { + return nil, fmt.Errorf("could not serialize parties payload: %w", err) + } + + return serialisedProfiles, nil +} + +func (e *SnapshottedEngine) buildHashKeys() { + e.partiesKey = (&types.PayloadParties{}).Key() + + e.hashKeys = append([]string{}, e.partiesKey) +} + +func NewSnapshottedEngine(broker Broker) *SnapshottedEngine { + se := &SnapshottedEngine{ + Engine: NewEngine(broker), + pl: types.Payload{}, + stopped: false, + } + + se.buildHashKeys() + + return se +} diff --git a/core/parties/snapshot_test.go b/core/parties/snapshot_test.go new file mode 100644 index 0000000000..0e1b3910b4 --- /dev/null +++ b/core/parties/snapshot_test.go @@ -0,0 +1,154 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package parties_test + +import ( + "testing" + "time" + + "code.vegaprotocol.io/vega/core/types" + vgtest "code.vegaprotocol.io/vega/libs/test" + "code.vegaprotocol.io/vega/paths" + vegapb "code.vegaprotocol.io/vega/protos/vega" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestTakingAndRestoringSnapshotSucceeds(t *testing.T) { + ctx := vgtest.VegaContext("chainid", 100) + + vegaPath := paths.New(t.TempDir()) + now := time.Now() + + te1 := newEngine(t) + snapshotEngine1 := newSnapshotEngine(t, vegaPath, now, te1.engine) + closeSnapshotEngine1 := vgtest.OnlyOnce(snapshotEngine1.Close) + defer closeSnapshotEngine1() + + require.NoError(t, snapshotEngine1.Start(ctx)) + + party1 := newPartyID(t) + + expectPartyProfileUpdatedEvent(t, te1) + require.NoError(t, te1.engine.UpdateProfile(ctx, party1, &commandspb.UpdatePartyProfile{ + Alias: "test1", + Metadata: []*vegapb.Metadata{ + { + Key: "key1", + Value: "value1", + }, + }, + })) + + party2 := newPartyID(t) + + expectPartyProfileUpdatedEvent(t, te1) + require.NoError(t, te1.engine.UpdateProfile(ctx, party2, &commandspb.UpdatePartyProfile{ + Alias: "test2", + Metadata: []*vegapb.Metadata{ + { + Key: "key1", + Value: "value1", + }, + }, + })) + + // Take a snapshot. + hash1, err := snapshotEngine1.SnapshotNow(ctx) + require.NoError(t, err) + + party3 := newPartyID(t) + + postSnapshot := func(te *testEngine) { + expectPartyProfileUpdatedEvent(t, te) + require.NoError(t, te.engine.UpdateProfile(ctx, party3, &commandspb.UpdatePartyProfile{ + Alias: "test3", + Metadata: []*vegapb.Metadata{ + { + Key: "key1", + Value: "value1", + }, + }, + })) + + assertEqualProfiles(t, []types.PartyProfile{ + { + PartyID: party1, + Alias: "test1", + Metadata: map[string]string{ + "key1": "value1", + }, + }, + { + PartyID: party2, + Alias: "test2", + Metadata: map[string]string{ + "key1": "value1", + }, + }, + { + PartyID: party3, + Alias: "test3", + Metadata: map[string]string{ + "key1": "value1", + }, + }, + }, te.engine.ListProfiles()) + } + + postSnapshot(te1) + + state1 := map[string][]byte{} + for _, key := range te1.engine.Keys() { + state, additionalProvider, err := te1.engine.GetState(key) + require.NoError(t, err) + assert.Empty(t, additionalProvider) + state1[key] = state + } + + closeSnapshotEngine1() + + // Reload the engine using the previous snapshot. + + te2 := newEngine(t) + snapshotEngine2 := newSnapshotEngine(t, vegaPath, now, te2.engine) + defer snapshotEngine2.Close() + + // This triggers the state restoration from the local snapshot. + require.NoError(t, snapshotEngine2.Start(ctx)) + + // Comparing the hash after restoration, to ensure it produces the same result. + hash2, _, _ := snapshotEngine2.Info() + require.Equal(t, hash1, hash2) + + // Re-applying exact same steps after the snapshot is taken to see if it leads + // to the same state. + postSnapshot(te2) + + state2 := map[string][]byte{} + for _, key := range te2.engine.Keys() { + state, additionalProvider, err := te2.engine.GetState(key) + require.NoError(t, err) + assert.Empty(t, additionalProvider) + state2[key] = state + } + + for key := range state1 { + assert.Equalf(t, state1[key], state2[key], "Key %q does not have the same data", key) + } +} diff --git a/core/plugins/position_spec_test.go b/core/plugins/position_spec_test.go index f341ca0c41..5fb93ec2b7 100644 --- a/core/plugins/position_spec_test.go +++ b/core/plugins/position_spec_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/plugins" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" ) diff --git a/core/plugins/positions.go b/core/plugins/positions.go index 7a3aaab9fd..79de097e4a 100644 --- a/core/plugins/positions.go +++ b/core/plugins/positions.go @@ -95,18 +95,27 @@ type SME interface { TxHash() string } +// TE TradeEvent. +type TE interface { + MarketID() string + IsParty(id string) bool // we don't use this one, but it's to make sure we identify the event correctly + Trade() vega.Trade +} + // Positions plugin taking settlement data to build positions API data. type Positions struct { *subscribers.Base - mu *sync.RWMutex - data map[string]map[string]Position + mu *sync.RWMutex + data map[string]map[string]Position + factors map[string]num.Decimal } func NewPositions(ctx context.Context) *Positions { return &Positions{ - Base: subscribers.NewBase(ctx, 10, true), - mu: &sync.RWMutex{}, - data: map[string]map[string]Position{}, + Base: subscribers.NewBase(ctx, 10, true), + mu: &sync.RWMutex{}, + data: map[string]map[string]Position{}, + factors: map[string]num.Decimal{}, } } @@ -132,11 +141,64 @@ func (p *Positions) Push(evts ...events.Event) { p.handleSettleMarket(te) case FP: p.handleFundingPayments(te) + case TE: + p.handleTradeEvent(te) } } p.mu.Unlock() } +// handle trade event closing distressed parties. +func (p *Positions) handleTradeEvent(e TE) { + trade := e.Trade() + if trade.Type != types.TradeTypeNetworkCloseOutBad { + return + } + marketID := e.MarketID() + partyPos, ok := p.data[marketID] + if !ok { + return + } + posFactor := num.DecimalOne() + // keep track of position factors + if pf, ok := p.factors[marketID]; ok { + posFactor = pf + } + mPrice, _ := num.UintFromString(trade.Price, 10) + markPriceDec := num.DecimalFromUint(mPrice) + size := int64(trade.Size) + pos, ok := partyPos[types.NetworkParty] + if !ok { + pos = Position{ + Position: types.Position{ + MarketID: marketID, + PartyID: types.NetworkParty, + }, + AverageEntryPriceFP: num.DecimalZero(), + RealisedPnlFP: num.DecimalZero(), + UnrealisedPnlFP: num.DecimalZero(), + } + } + if trade.Seller == types.NetworkParty { + size *= -1 + } + opened, closed := calculateOpenClosedVolume(pos.OpenVolume, size) + realisedPnlDelta := markPriceDec.Sub(pos.AverageEntryPriceFP).Mul(num.DecimalFromInt64(closed)).Div(posFactor) + pos.RealisedPnl = pos.RealisedPnl.Add(realisedPnlDelta) + pos.RealisedPnlFP = pos.RealisedPnlFP.Add(realisedPnlDelta) + // what was realised is no longer unrealised + pos.UnrealisedPnl = pos.UnrealisedPnl.Sub(realisedPnlDelta) + pos.UnrealisedPnlFP = pos.UnrealisedPnlFP.Sub(realisedPnlDelta) + pos.OpenVolume -= closed + + pos.AverageEntryPriceFP = updateVWAP(pos.AverageEntryPriceFP, pos.OpenVolume, opened, mPrice) + pos.AverageEntryPrice, _ = num.UintFromDecimal(pos.AverageEntryPriceFP.Round(0)) + pos.OpenVolume += opened + mtm(&pos, mPrice, posFactor) + partyPos[types.NetworkParty] = pos + p.data[marketID] = partyPos +} + func (p *Positions) handleFundingPayments(e FP) { marketID := e.MarketID() partyPos, ok := p.data[marketID] @@ -256,6 +318,10 @@ func (p *Positions) updateSettleDestressed(e SDE) { func (p *Positions) handleSettleMarket(e SME) { market := e.MarketID() posFactor := e.PositionFactor() + // keep track of position factors + if _, ok := p.factors[market]; !ok { + p.factors[market] = posFactor + } markPriceDec := num.DecimalFromUint(e.SettledPrice()) mp, ok := p.data[market] if !ok { @@ -475,5 +541,6 @@ func (p *Positions) Types() []events.Type { events.DistressedPositionsEvent, events.SettleMarketEvent, events.FundingPaymentsEvent, + events.TradeEvent, } } diff --git a/core/positions/engine.go b/core/positions/engine.go index f938e63bbe..a9c668c301 100644 --- a/core/positions/engine.go +++ b/core/positions/engine.go @@ -27,6 +27,7 @@ import ( "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "golang.org/x/exp/maps" ) @@ -207,6 +208,28 @@ func (e *Engine) ReloadConf(cfg Config) { e.cfgMu.Unlock() } +// ValidateOrder checks that the given order can be registered. +func (e *Engine) ValidateOrder(order *types.Order) error { + pos, found := e.positions[order.Party] + if !found { + pos = NewMarketPosition(order.Party) + } + return pos.ValidateOrderRegistration(order.TrueRemaining(), order.Side) +} + +// ValidateAmendOrder checks that replace the given order with a new order will no cause issues with position tracking. +func (e *Engine) ValidateAmendOrder(order *types.Order, newOrder *types.Order) error { + pos, found := e.positions[order.Party] + if !found { + pos = NewMarketPosition(order.Party) + } + + if order.TrueRemaining() >= newOrder.TrueRemaining() { + return nil + } + return pos.ValidateOrderRegistration(newOrder.TrueRemaining()-order.TrueRemaining(), order.Side) +} + // RegisterOrder updates the potential positions for a submitted order, as though // the order were already accepted. // It returns the updated position. @@ -256,58 +279,6 @@ func (e *Engine) AmendOrder(ctx context.Context, originalOrder, newOrder *types. return pos } -// UpdateNetwork - functionally the same as the Update func, except for ignoring the network -// party in the trade (whether it be buyer or seller). This could be incorporated into the Update -// function, but we know when we're adding network trades, and having this check every time is -// wasteful, and would only serve to add complexity to the Update func, and slow it down. -func (e *Engine) UpdateNetwork(ctx context.Context, trade *types.Trade, passiveOrder *types.Order) []events.MarketPosition { - // there's only 1 position - var ( - ok bool - pos *MarketPosition - ) - size := int64(trade.Size) - if trade.Buyer != "network" { - pos, ok = e.positions[trade.Buyer] - if !ok { - e.log.Panic("could not find buyer position", - logging.Trade(*trade)) - } - - if pos.buy < int64(trade.Size) { - e.log.Panic("network trade with a potential buy position < to the trade size", - logging.PartyID(trade.Buyer), - logging.Int64("potential-buy", pos.buy), - logging.Trade(*trade)) - } - pos.size += size - } else { - pos, ok = e.positions[trade.Seller] - if !ok { - e.log.Panic("could not find seller position", - logging.Trade(*trade)) - } - - if pos.sell < int64(trade.Size) { - e.log.Panic("network trade with a potential sell position < to the trade size", - logging.PartyID(trade.Seller), - logging.Int64("potential-sell", pos.sell), - logging.Trade(*trade)) - } - // size is negative in case of a sale - pos.size -= size - } - - pos.UpdateOnOrderChange(e.log, passiveOrder.Side, passiveOrder.Price, trade.Size, false) - e.partiesHighestVolume[pos.partyID].RecordLatest(pos.size) - e.updatePartiesTradedSize(pos.partyID, trade.Size) - - e.positionUpdated(ctx, pos) - - cpy := pos.Clone() - return []events.MarketPosition{*cpy} -} - func (e *Engine) updatePartiesTradedSize(party string, size uint64) { e.partiesTradedSize[party] = e.partiesTradedSize[party] + size } @@ -344,7 +315,10 @@ func (e *Engine) Update(ctx context.Context, trade *types.Trade, passiveOrder, a // Update long/short actual position for buyer and seller. // The buyer's position increases and the seller's position decreases. + + buyer.averageEntryPrice = CalcVWAP(buyer.averageEntryPrice, buyer.size, int64(trade.Size), trade.Price) buyer.size += int64(trade.Size) + seller.averageEntryPrice = CalcVWAP(seller.averageEntryPrice, -seller.size, int64(trade.Size), trade.Price) seller.size -= int64(trade.Size) aggressive := buyer @@ -357,6 +331,12 @@ func (e *Engine) Update(ctx context.Context, trade *types.Trade, passiveOrder, a // Update potential positions & vwaps. Potential positions decrease for both buyer and seller. aggressive.UpdateOnOrderChange(e.log, aggressiveOrder.Side, aggressiveOrder.Price, trade.Size, false) passive.UpdateOnOrderChange(e.log, passiveOrder.Side, passiveOrder.Price, trade.Size, false) + // if the network opens a position here, the price will not be set, which breaks the snapshot + // we know the network will trade at the current mark price, and therefore it will hold the position at this price. + // so we should just make sure the price is set correctly here. + if aggressive.partyID == types.NetworkParty && (aggressive.price == nil || aggressive.price.IsZero()) { + aggressive.price = trade.Price.Clone() + } ret := []events.MarketPosition{ *buyer.Clone(), @@ -611,3 +591,46 @@ func (e *Engine) remove(p *MarketPosition) { } } } + +// CalcVWAP calculates the volume weighted average entry price. +func CalcVWAP(vwap *num.Uint, pos int64, addVolume int64, addPrice *num.Uint) *num.Uint { + if pos+addVolume == 0 || addPrice == nil { + return num.UintZero() + } + + newPos := pos + addVolume + if newPos*pos < 0 { // switching from short/long or long/short + if newPos < 0 { + newPos = -newPos + } + newAcquiredPositionUint := num.NewUint(uint64(newPos)) + if pos < 0 { + pos = -pos + } + posUint := num.NewUint(uint64(pos)) + // cost of closing the old position + closePositionCost := num.UintZero().Mul(posUint, vwap) + // cost of opening the new position + openNewPositionCost := num.UintZero().Mul(newAcquiredPositionUint, addPrice) + return num.UintZero().Div(num.Sum(closePositionCost, openNewPositionCost), num.Sum(posUint, newAcquiredPositionUint)) + } + // only decreasing position + if (pos > 0 && addVolume < 0) || (pos < 0 && addVolume > 0) { + return vwap + } + // increasing position + if pos < 0 { + pos = -pos + } + posUint := num.NewUint(uint64(pos)) + if addVolume < 0 { + addVolume = -addVolume + } + addVolumeUint := num.NewUint(uint64(addVolume)) + if newPos < 0 { + newPos = -newPos + } + newPosUint := num.NewUint(uint64(newPos)) + numerator := num.UintZero().Mul(vwap, posUint).AddSum(num.UintZero().Mul(addPrice, addVolumeUint)) + return num.UintZero().Div(numerator, newPosUint) +} diff --git a/core/positions/engine_test.go b/core/positions/engine_test.go index 927d4f2e3c..be2bc0deb5 100644 --- a/core/positions/engine_test.go +++ b/core/positions/engine_test.go @@ -18,15 +18,15 @@ package positions_test import ( "context" "encoding/hex" + "math" "testing" "time" "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/integration/stubs" - "code.vegaprotocol.io/vega/libs/num" - "code.vegaprotocol.io/vega/core/positions" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" "github.com/stretchr/testify/assert" @@ -35,8 +35,70 @@ import ( func TestUpdatePosition(t *testing.T) { t.Run("Update position regular", testUpdatePositionRegular) - t.Run("Update position network trade as buyer", testUpdatePositionNetworkBuy) - t.Run("Update position network trade as seller", testUpdatePositionNetworkSell) +} + +func TestRegisterLargeOrder(t *testing.T) { + const ( + buysize int64 = 123 + sellsize int64 = 456 + ) + ctx := context.Background() + e := getTestEngine(t) + orderBuy := types.Order{ + Party: "test_party", + Side: types.SideBuy, + Size: uint64(buysize), + Remaining: uint64(buysize), + Price: num.UintZero(), + } + + assert.NoError(t, e.ValidateOrder(&orderBuy)) + _ = e.RegisterOrder(ctx, &orderBuy) + + // now say we're going to do another MASSIVE one + orderBuy2 := types.Order{ + Party: "test_party", + Side: types.SideBuy, + Size: math.MaxInt64, + Remaining: math.MaxInt64, + Price: num.UintZero(), + } + assert.Error(t, e.ValidateOrder(&orderBuy2)) // should fail because if we registered it'll overflow + require.Panics(t, func() { + e.RegisterOrder(ctx, &orderBuy2) // should panic and not silently overflow + }) +} + +func TestAmendLargeOrder(t *testing.T) { + const ( + buysize int64 = 123 + sellsize int64 = 456 + ) + ctx := context.Background() + e := getTestEngine(t) + orderBuy := types.Order{ + Party: "test_party", + Side: types.SideBuy, + Size: uint64(buysize), + Remaining: uint64(buysize), + Price: num.UintZero(), + } + + assert.NoError(t, e.ValidateOrder(&orderBuy)) + _ = e.RegisterOrder(ctx, &orderBuy) + + // now say we're going to do an amend to a massive one + orderBuy2 := types.Order{ + Party: "test_party", + Side: types.SideBuy, + Size: math.MaxUint64, + Remaining: math.MaxUint64, + Price: num.UintZero(), + } + assert.Error(t, e.ValidateAmendOrder(&orderBuy, &orderBuy2)) // should fail because if we registered it'll overflow + require.Panics(t, func() { + e.RegisterOrder(ctx, &orderBuy2) // should panic and not silently overflow + }) } func TestGetOpenInterest(t *testing.T) { @@ -156,60 +218,6 @@ func testUpdatePositionRegular(t *testing.T) { } } -func testUpdatePositionNetworkBuy(t *testing.T) { - engine := getTestEngine(t) - assert.Empty(t, engine.Positions()) - buyer := "network" - seller := "seller_id" - size := int64(10) - trade := types.Trade{ - Type: types.TradeTypeDefault, - ID: "trade_id", - MarketID: "market_id", - Price: num.NewUint(10000), - Size: uint64(size), - Buyer: buyer, - Seller: seller, - BuyOrder: "buy_order_id", - SellOrder: "sell_order_id", - Timestamp: time.Now().Unix(), - } - passiveOrder := registerOrder(engine, types.SideSell, seller, num.NewUint(10000), uint64(size)) - positions := engine.UpdateNetwork(context.Background(), &trade, passiveOrder) - pos := engine.Positions() - assert.Equal(t, 1, len(pos)) - assert.Equal(t, 1, len(positions)) - assert.Equal(t, seller, pos[0].Party()) - assert.Equal(t, -size, pos[0].Size()) -} - -func testUpdatePositionNetworkSell(t *testing.T) { - engine := getTestEngine(t) - assert.Empty(t, engine.Positions()) - buyer := "buyer_id" - seller := "network" - size := int64(10) - trade := types.Trade{ - Type: types.TradeTypeDefault, - ID: "trade_id", - MarketID: "market_id", - Price: num.NewUint(10000), - Size: uint64(size), - Buyer: buyer, - Seller: seller, - BuyOrder: "buy_order_id", - SellOrder: "sell_order_id", - Timestamp: time.Now().Unix(), - } - passiveOrder := registerOrder(engine, types.SideBuy, buyer, num.NewUint(10000), uint64(size)) - positions := engine.UpdateNetwork(context.Background(), &trade, passiveOrder) - pos := engine.Positions() - assert.Equal(t, 1, len(pos)) - assert.Equal(t, 1, len(positions)) - assert.Equal(t, buyer, pos[0].Party()) - assert.Equal(t, size, pos[0].Size()) -} - func TestRemoveDistressedEmpty(t *testing.T) { data := []events.MarketPosition{ mp{ @@ -597,6 +605,10 @@ type mp struct { price *num.Uint } +func (m mp) AverageEntryPrice() *num.Uint { + return num.UintZero() +} + func (m mp) Party() string { return m.party } @@ -718,3 +730,35 @@ func registerOrder(e *positions.SnapshotEngine, side types.Side, party string, p e.RegisterOrder(context.TODO(), order) return order } + +func TestCalcVWAP(t *testing.T) { + // no previous size, new long position acquired at 100 + require.Equal(t, num.NewUint(100), positions.CalcVWAP(num.UintZero(), 0, 10, num.NewUint(100))) + + // position decreased, not flipping sides + require.Equal(t, num.NewUint(100), positions.CalcVWAP(num.NewUint(100), 10, -5, num.NewUint(25))) + + // position closed + require.Equal(t, num.UintZero(), positions.CalcVWAP(num.NewUint(100), 10, -10, num.NewUint(25))) + + // no previous size, new short position acquired at 100 + require.Equal(t, num.NewUint(100), positions.CalcVWAP(num.UintZero(), 0, -10, num.NewUint(100))) + + // position decreased, not flipping sides + require.Equal(t, num.NewUint(100), positions.CalcVWAP(num.NewUint(100), -10, 5, num.NewUint(25))) + + // position closed + require.Equal(t, num.UintZero(), positions.CalcVWAP(num.NewUint(100), -10, 10, num.NewUint(25))) + + // long position increased => (100 * 10 + 25 * 5) / 15 + require.Equal(t, num.NewUint(75), positions.CalcVWAP(num.NewUint(100), 10, 5, num.NewUint(25))) + + // short position increased => (100 * -10 + 25 * -5) / 15 + require.Equal(t, num.NewUint(75), positions.CalcVWAP(num.NewUint(100), -10, -5, num.NewUint(25))) + + // flipping from long to short => (100 * 10 + 15 * 15)/25 + require.Equal(t, num.NewUint(49), positions.CalcVWAP(num.NewUint(100), -10, 25, num.NewUint(15))) + + // flipping from short to long => (100 * 10 + 15 * 15)/25 + require.Equal(t, num.NewUint(49), positions.CalcVWAP(num.NewUint(100), 10, -25, num.NewUint(15))) +} diff --git a/core/positions/market_position.go b/core/positions/market_position.go index 8ad18d1fc8..b2a5686955 100644 --- a/core/positions/market_position.go +++ b/core/positions/market_position.go @@ -16,7 +16,9 @@ package positions import ( + "errors" "fmt" + "math" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" @@ -40,14 +42,17 @@ type MarketPosition struct { // yes, it's technically state, but the main reason for this field is to cut down on the number // of events we send out. distressed bool + + averageEntryPrice *num.Uint } func NewMarketPosition(party string) *MarketPosition { return &MarketPosition{ - partyID: party, - price: num.UintZero(), - buySumProduct: num.UintZero(), - sellSumProduct: num.UintZero(), + partyID: party, + price: num.UintZero(), + buySumProduct: num.UintZero(), + sellSumProduct: num.UintZero(), + averageEntryPrice: num.UintZero(), } } @@ -56,6 +61,7 @@ func (p MarketPosition) Clone() *MarketPosition { cpy.price = p.price.Clone() cpy.buySumProduct = p.buySumProduct.Clone() cpy.sellSumProduct = p.sellSumProduct.Clone() + cpy.averageEntryPrice = p.averageEntryPrice.Clone() return &cpy } @@ -65,6 +71,23 @@ func (p *MarketPosition) Closed() bool { return p.size == 0 && p.buy+p.sell == 0 } +// UpdateInPlaceOnTrades takes a clone of the receiver position, and updates it with the position from the given trades. +func (p *MarketPosition) UpdateInPlaceOnTrades(log *logging.Logger, traderSide types.Side, trades []*types.Trade, order *types.Order) *MarketPosition { + pos := p.Clone() + for _, t := range trades { + pos.averageEntryPrice = CalcVWAP(pos.averageEntryPrice, pos.size, int64(t.Size), t.Price) + if traderSide == types.SideBuy { + pos.size += int64(t.Size) + } else { + pos.size -= int64(t.Size) + } + // if we bought then we want to decrease the order size for this side so add=false + // and vice versa for sell + pos.UpdateOnOrderChange(log, traderSide, order.Price, t.Size, false) + } + return pos +} + func (p *MarketPosition) SetParty(party string) { p.partyID = party } func (p *MarketPosition) RegisterOrder(log *logging.Logger, order *types.Order) { @@ -86,6 +109,13 @@ func (p *MarketPosition) UpdateOnOrderChange(log *logging.Logger, side types.Sid logging.Int64("potential-buy", p.buy), logging.Uint64("size-change", sizeChange)) } + + if add && p.buy > math.MaxInt64-iSizeChange { + log.Panic("order too large to register, will overflow", + logging.Int64("potential-buy", p.buy), + logging.Uint64("size-change", sizeChange)) + } + // recalculate sumproduct if add { p.buySumProduct.Add(p.buySumProduct, num.UintZero().Mul(price, num.NewUint(sizeChange))) @@ -107,6 +137,13 @@ func (p *MarketPosition) UpdateOnOrderChange(log *logging.Logger, side types.Sid logging.Int64("potential-sell", p.sell), logging.Uint64("size-change", sizeChange)) } + + if add && p.sell > math.MaxInt64-iSizeChange { + log.Panic("order too large to register, will overflow", + logging.Int64("potential-sell", p.sell), + logging.Uint64("size-change", sizeChange)) + } + // recalculate sumproduct if add { p.sellSumProduct.Add(p.sellSumProduct, num.UintZero().Mul(price, num.NewUint(sizeChange))) @@ -150,6 +187,11 @@ func (p MarketPosition) String() string { p.size, p.buy, p.sell, p.price, p.partyID) } +// AverageEntryPrice returns the volume weighted average price. +func (p MarketPosition) AverageEntryPrice() *num.Uint { + return p.averageEntryPrice +} + // Buy will returns the potential buys for a given position. func (p MarketPosition) Buy() int64 { return p.buy @@ -212,6 +254,31 @@ func (p MarketPosition) VWSell() *num.Uint { return num.UintZero() } +// ValidateOrder returns an error is the order is so large that the position engine does not have the precision +// to register it. +func (p MarketPosition) ValidateOrderRegistration(s uint64, side types.Side) error { + size := int64(s) + if size == 0 { + return nil + } + + // check that the cast to int64 hasn't pushed it backwards + if size < 0 { + return errors.New("cannot register position without causing overflow") + } + + amt := p.buy + if side == types.SideSell { + amt = p.sell + } + + if size > math.MaxInt64-amt { + return errors.New("cannot register position without causing overflow") + } + + return nil +} + func (p MarketPosition) OrderReducesExposure(ord *types.Order) bool { if ord == nil || p.Size() == 0 || ord.PeggedOrder != nil { return false diff --git a/core/positions/market_position_test.go b/core/positions/market_position_test.go new file mode 100644 index 0000000000..b0f9e64204 --- /dev/null +++ b/core/positions/market_position_test.go @@ -0,0 +1,78 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package positions_test + +import ( + "testing" + + "code.vegaprotocol.io/vega/core/positions" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" + + "github.com/stretchr/testify/require" +) + +func TestUpdateInPlace(t *testing.T) { + pos := positions.NewMarketPosition("zohar") + buy := &types.Order{ + ID: "1", + MarketID: "2", + Party: "zohar", + Side: types.SideBuy, + Size: 10, + Price: num.NewUint(100), + Remaining: 10, + } + sell := &types.Order{ + ID: "2", + MarketID: "2", + Party: "zohar", + Side: types.SideSell, + Size: 20, + Price: num.NewUint(200), + Remaining: 20, + } + pos.RegisterOrder(nil, buy) + pos.RegisterOrder(nil, sell) + trade1 := &types.Trade{ + ID: "t1", + Size: 3, + Price: num.NewUint(120), + } + updatedPos := pos.UpdateInPlaceOnTrades(nil, types.SideBuy, []*types.Trade{trade1}, buy) + require.Equal(t, int64(3), updatedPos.Size()) + require.Equal(t, int64(7), updatedPos.Buy()) + require.Equal(t, int64(20), updatedPos.Sell()) + + // now trade the whole size of the sell order + trade2 := &types.Trade{ + ID: "t2", + Size: 20, + Price: num.NewUint(150), + } + updatedPos = updatedPos.UpdateInPlaceOnTrades(nil, types.SideSell, []*types.Trade{trade2}, sell) + require.Equal(t, int64(-17), updatedPos.Size()) + require.Equal(t, int64(7), updatedPos.Buy()) + require.Equal(t, int64(0), updatedPos.Sell()) + + // now unregister the remaining buy order + buy.Remaining = 7 + + updatedPos.UnregisterOrder(nil, buy) + require.Equal(t, int64(-17), updatedPos.Size()) + require.Equal(t, int64(0), updatedPos.Buy()) + require.Equal(t, int64(0), updatedPos.Sell()) +} diff --git a/core/positions/positions_acceptance_criteria_test.go b/core/positions/positions_acceptance_criteria_test.go index e937b28677..0250f4ef6f 100644 --- a/core/positions/positions_acceptance_criteria_test.go +++ b/core/positions/positions_acceptance_criteria_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" ) diff --git a/core/positions/snapshot.go b/core/positions/snapshot.go index bd45b4bdc2..3b79893069 100644 --- a/core/positions/snapshot.go +++ b/core/positions/snapshot.go @@ -20,10 +20,12 @@ import ( "sort" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "golang.org/x/exp/maps" ) @@ -94,12 +96,23 @@ func (e *SnapshotEngine) LoadState(_ context.Context, payload *types.Payload) ([ pos.buySumProduct = p.BuySumProduct pos.sellSumProduct = p.SellSumProduct pos.distressed = p.Distressed + pos.averageEntryPrice = p.AverageEntryPrice e.positionsCpy = append(e.positionsCpy, pos) e.positions[p.PartyID] = pos if p.Distressed { e.distressedPos[p.PartyID] = struct{}{} } + // This is for migration, on the first time we load from snapshot there won't be an average entry price + // so take the last price as the current average + if p.AverageEntryPrice == nil { + if pos.size != 0 && !pos.price.IsZero() { + pos.averageEntryPrice = pos.price.Clone() + } else { + pos.averageEntryPrice = num.UintZero() + } + } + // ensure these exists on the first snapshot after the upgrade e.partiesHighestVolume[p.PartyID] = &openVolumeRecord{} } @@ -139,14 +152,15 @@ func (e *SnapshotEngine) serialise() ([]byte, error) { party := evt.Party() _, distressed := e.distressedPos[party] pos := &types.MarketPosition{ - PartyID: party, - Price: evt.Price(), - Buy: evt.Buy(), - Sell: evt.Sell(), - Size: evt.Size(), - BuySumProduct: evt.BuySumProduct(), - SellSumProduct: evt.SellSumProduct(), - Distressed: distressed, + PartyID: party, + Price: evt.Price(), + Buy: evt.Buy(), + Sell: evt.Sell(), + Size: evt.Size(), + BuySumProduct: evt.BuySumProduct(), + SellSumProduct: evt.SellSumProduct(), + Distressed: distressed, + AverageEntryPrice: evt.AverageEntryPrice(), } positions = append(positions, pos) } diff --git a/core/positions/snapshot_test.go b/core/positions/snapshot_test.go index 69b1c67d6a..76c3f9b0ac 100644 --- a/core/positions/snapshot_test.go +++ b/core/positions/snapshot_test.go @@ -24,11 +24,11 @@ import ( "code.vegaprotocol.io/vega/core/positions" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/proto" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "code.vegaprotocol.io/vega/libs/crypto" - "code.vegaprotocol.io/vega/libs/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/pow/engine.go b/core/pow/engine.go index fe10151172..eb28c8cfdc 100644 --- a/core/pow/engine.go +++ b/core/pow/engine.go @@ -19,11 +19,7 @@ import ( "context" "encoding/hex" "errors" - "strconv" "sync" - "time" - - protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" "code.vegaprotocol.io/vega/core/blockchain/abci" "code.vegaprotocol.io/vega/core/types" @@ -31,20 +27,29 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" + protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" ) const ( - ringSize = 500 - minBanDuration = time.Second * 30 // minimum ban duration + ringSize = 500 ) +type ValidationEntry struct { + ValResult ValidationResult + Difficulty *uint + Tx abci.Tx +} + var ErrNonceAlreadyUsedByParty = errors.New("nonce already used by party") -var banDurationAsEpochFraction = num.DecimalOne().Div(num.DecimalFromInt64(48)) // 1/48 of an epoch will be the default 30 minutes ban +type ValidationResult int64 -type EpochEngine interface { - NotifyOnEpoch(f func(context.Context, types.Epoch), r func(context.Context, types.Epoch)) -} +const ( + ValidationResultVerificationPowError ValidationResult = iota + ValidationResultValidatorCommand + ValidationResultTooManyTx + ValidationResultSuccess +) // params defines the modifiable set of parameters to be applied at the from block and valid for transactions generated for the untilBlock. type params struct { @@ -79,17 +84,9 @@ type partyStateForBlock struct { type state struct { blockToPartyState map[uint64]map[string]*partyStateForBlock } - -//go:generate go run github.com/golang/mock/mockgen -destination mocks/time_service_mock.go -package mocks code.vegaprotocol.io/vega/core/pow TimeService -type TimeService interface { - GetTimeNow() time.Time -} - type Engine struct { - timeService TimeService - activeParams []*params // active sets of parameters - activeStates []*state // active states corresponding to the sets of parameters - bannedParties map[string]time.Time // banned party -> release time + activeParams []*params // active sets of parameters + activeStates []*state // active states corresponding to the sets of parameters currentBlock uint64 // the current block height blockHeight [ringSize]uint64 // block heights in scope ring buffer - this has a fixed size which is equal to the maximum value of the network parameter @@ -109,18 +106,16 @@ type Engine struct { noVerify bool // disables verification of PoW in scenario, where we use the null chain and we do not want to send transaction w/o verification // snapshot key - hashKeys []string - log *logging.Logger - lock sync.RWMutex - banDuration time.Duration + hashKeys []string + log *logging.Logger + lock sync.RWMutex } // New instantiates the proof of work engine. -func New(log *logging.Logger, config Config, timeService TimeService) *Engine { +func New(log *logging.Logger, config Config) *Engine { log = log.Named(namedLogger) log.SetLevel(config.Level.Get()) e := &Engine{ - bannedParties: map[string]time.Time{}, log: log, hashKeys: []string{(&types.PayloadProofOfWork{}).Key()}, activeParams: []*params{}, @@ -132,54 +127,61 @@ func New(log *logging.Logger, config Config, timeService TimeService) *Engine { seenNonceRef: map[nonceRef]struct{}{}, mempoolSeenTid: map[string]struct{}{}, heightToTid: map[uint64][]string{}, - timeService: timeService, } e.log.Info("PoW spam protection started") return e } -// OnEpochDurationChanged updates the ban duration as a fraction of the epoch duration. -func (e *Engine) OnEpochDurationChanged(_ context.Context, duration time.Duration) error { - epochImpliedDurationNano, _ := num.UintFromDecimal(num.DecimalFromInt64(duration.Nanoseconds()).Mul(banDurationAsEpochFraction)) - epochImpliedDurationDuration := time.Duration(epochImpliedDurationNano.Uint64()) - if epochImpliedDurationDuration < minBanDuration { - e.banDuration = minBanDuration - } else { - e.banDuration = epochImpliedDurationDuration - } - return nil -} - // OnBeginBlock updates the block height and block hash and clears any out of scope parameters set and states. -func (e *Engine) BeginBlock(blockHeight uint64, blockHash string) { +// It also records all of the block's transactions. +func (e *Engine) BeginBlock(blockHeight uint64, blockHash string, txs []abci.Tx) { e.lock.Lock() defer e.lock.Unlock() - e.currentBlock = blockHeight idx := blockHeight % ringSize e.blockHeight[idx] = blockHeight e.blockHash[idx] = blockHash + e.updatePowState(txs) +} - tm := e.timeService.GetTimeNow() - - // check if there are banned parties who can be released - for k, v := range e.bannedParties { - if !tm.Before(v) { - delete(e.bannedParties, k) - e.log.Info("released proof of work spam ban from", logging.String("party", k)) +// CheckTx is called by checkTx in the abci and verifies the proof of work, it doesn't update any state. +func (e *Engine) CheckTx(tx abci.Tx) error { + if e.log.IsDebug() { + e.lock.RLock() + e.log.Debug("checktx got tx", logging.String("command", tx.Command().String()), logging.Uint64("height", tx.BlockHeight()), logging.String("tid", tx.GetPoWTID()), logging.Uint64("current-block", e.currentBlock)) + e.lock.RUnlock() + } + if !tx.Command().IsValidatorCommand() { + e.lock.Lock() + if _, ok := e.mempoolSeenTid[tx.GetPoWTID()]; ok { + e.log.Error("tid already seen", logging.String("tid", tx.GetPoWTID()), logging.String("party", tx.Party())) + e.lock.Unlock() + return errors.New("proof of work tid already seen by the node") } + e.mempoolSeenTid[tx.GetPoWTID()] = struct{}{} + e.lock.Unlock() + } + + _, err := e.verify(tx) + if err != nil { + e.log.Debug("checktx error", logging.String("command", tx.Command().String()), logging.Uint64("height", tx.BlockHeight()), logging.String("tid", tx.GetPoWTID()), logging.Uint64("current-block", e.currentBlock)) } + return err } -// EndOfBlock clears up block data structures at the end of the block. -func (e *Engine) EndOfBlock() { - e.lock.Lock() - defer e.lock.Unlock() +// EndPrepareProposal is a callback called at the end of prepareBlock to revert to the state +// before prepare block. +func (e *Engine) EndPrepareProposal(txs []ValidationEntry) { + e.log.Debug("EndPrepareBlock called with", logging.Int("txs", len(txs))) + e.rollback(txs) +} +// updatePowState updates the pow state given the block transaction and cleans up out of scope states and param sets. +func (e *Engine) updatePowState(txs []abci.Tx) { // run this once for migration cleanup // this is going to clean up blocks that belong to inactive states which are unreachable by the latter loop. if e.lastPruningBlock == 0 { - if e.activeParams[0].fromBlock > 0 { + if len(e.activeParams) > 0 && e.activeParams[0].fromBlock > 0 { end := e.activeParams[0].fromBlock for block := uint64(0); block <= end; block++ { if b, ok := e.heightToTx[block]; ok { @@ -200,6 +202,43 @@ func (e *Engine) EndOfBlock() { } } + for _, tx := range txs { + d, _ := e.verifyWithLock(tx) + dUint := uint(d) + txHash := hex.EncodeToString(tx.Hash()) + txBlock := tx.BlockHeight() + stateInd := 0 + for i, p := range e.activeParams { + if txBlock >= p.fromBlock && (p.untilBlock == nil || *p.untilBlock >= txBlock) { + stateInd = i + break + } + } + state := e.activeStates[stateInd] + e.seenTx[txHash] = struct{}{} + e.heightToTx[tx.BlockHeight()] = append(e.heightToTx[tx.BlockHeight()], txHash) + if tx.Command().IsValidatorCommand() { + continue + } + + e.heightToTid[tx.BlockHeight()] = append(e.heightToTid[tx.BlockHeight()], tx.GetPoWTID()) + e.heightToNonceRef[tx.BlockHeight()] = append(e.heightToNonceRef[tx.BlockHeight()], nonceRef{tx.Party(), tx.GetNonce()}) + e.seenTid[tx.GetPoWTID()] = struct{}{} + e.seenNonceRef[nonceRef{tx.Party(), tx.GetNonce()}] = struct{}{} + if _, ok := state.blockToPartyState[txBlock]; !ok { + state.blockToPartyState[txBlock] = map[string]*partyStateForBlock{tx.Party(): {observedDifficulty: dUint, seenCount: uint(1)}} + continue + } + if _, ok := state.blockToPartyState[txBlock][tx.Party()]; !ok { + state.blockToPartyState[txBlock][tx.Party()] = &partyStateForBlock{observedDifficulty: dUint, seenCount: uint(1)} + continue + } + partyState := state.blockToPartyState[txBlock][tx.Party()] + partyState.observedDifficulty += dUint + partyState.seenCount++ + } + + // update out of scope states/params toDelete := []int{} // iterate over parameters set and clear them out if they're not relevant anymore. for i, p := range e.activeParams { @@ -249,7 +288,10 @@ func (e *Engine) EndOfBlock() { } } -func (e *Engine) Commit() { +// OnCommit is called when the finalizeBlock is completed to clenup the mempool cache. +func (e *Engine) OnCommit() { + e.log.Debug("OnCommit") + e.log.Debug("mempool seen cleared") e.lock.Lock() e.mempoolSeenTid = map[string]struct{}{} e.lock.Unlock() @@ -260,39 +302,92 @@ func (e *Engine) DisableVerification() { e.noVerify = true } -// CheckTx is called by checkTx in the abci and verifies the proof of work, it doesn't update any state. -func (e *Engine) CheckTx(tx abci.Tx) error { - if e.log.IsDebug() { - e.lock.RLock() - e.log.Debug("checktx got tx", logging.String("command", tx.Command().String()), logging.Uint64("height", tx.BlockHeight()), logging.String("tid", tx.GetPoWTID()), logging.Uint64("current-block", e.currentBlock)) - e.lock.RUnlock() - } - if !tx.Command().IsValidatorCommand() { - e.lock.Lock() - if _, ok := e.mempoolSeenTid[tx.GetPoWTID()]; ok { - e.log.Error("tid already seen", logging.String("tid", tx.GetPoWTID()), logging.String("party", tx.Party())) - e.lock.Unlock() - return errors.New("proof of work tid already seen") +// rollback is called without the lock. For each input validation entry depending on its status it reverts any changes made to the interim block state. +func (e *Engine) rollback(txs []ValidationEntry) { + e.lock.Lock() + defer e.lock.Unlock() + for _, ve := range txs { + e.log.Debug("rollback", logging.String("party", ve.Tx.Party()), logging.String("tx-hash", hex.EncodeToString(ve.Tx.Hash())), logging.Int64("ve-result", int64(ve.ValResult))) + // pow error does not change state, we can skip + if ve.ValResult == ValidationResultVerificationPowError { + continue + } + txHash := hex.EncodeToString(ve.Tx.Hash()) + // remove the transaction from seenTx - need to acquire lock! + + delete(e.seenTx, txHash) + + // if it's a validator command, we're done + if ve.ValResult == ValidationResultValidatorCommand { + continue + } + + // otherwise need to remove the seenTid from the block state - need to acquire lock! + delete(e.seenTid, ve.Tx.GetPoWTID()) + delete(e.seenNonceRef, nonceRef{ve.Tx.Party(), ve.Tx.GetNonce()}) + + // if the validation result is too many transactions or the difficulty is nil, nothing to revert + if ve.ValResult == ValidationResultTooManyTx || ve.Difficulty == nil { + continue + } + stateInd := 0 + txBlock := ve.Tx.BlockHeight() + for i, p := range e.activeParams { + if txBlock >= p.fromBlock && (p.untilBlock == nil || *p.untilBlock >= txBlock) { + stateInd = i + break + } + } + state := e.activeStates[stateInd] + if _, ok := state.blockToPartyState[txBlock]; !ok { + e.log.Error("cannot find state of the block - that should be impossible") + } else if _, ok := state.blockToPartyState[txBlock][ve.Tx.Party()]; !ok { + e.log.Error("cannot find the party in the block state - that should be impossible") + } + + partyState := state.blockToPartyState[txBlock][ve.Tx.Party()] + e.log.Debug("found party state for party", logging.Bool("found", partyState != nil), logging.String("party", ve.Tx.Party())) + partyState.seenCount-- + partyState.observedDifficulty -= *ve.Difficulty + if partyState.seenCount == 0 { + e.log.Debug("seen count for party is zero, removing party from block state", logging.String("party", ve.Tx.Party())) + delete(state.blockToPartyState[txBlock], ve.Tx.Party()) + } + if len(state.blockToPartyState[txBlock]) == 0 { + e.log.Debug("no more transactions for block, removing block height", logging.Uint64("height", txBlock)) + delete(state.blockToPartyState, txBlock) } - e.mempoolSeenTid[tx.GetPoWTID()] = struct{}{} - e.lock.Unlock() } +} - _, err := e.verify(tx) - return err +func (e *Engine) ProcessProposal(txs []abci.Tx) bool { + ves := []ValidationEntry{} + success := true + for _, tx := range txs { + vr, d := e.CheckBlockTx(tx) + ves = append(ves, ValidationEntry{Tx: tx, Difficulty: d, ValResult: vr}) + if vr == ValidationResultVerificationPowError || vr == ValidationResultTooManyTx { + success = false + break + } + } + e.rollback(ves) + return success } -// DeliverTx is called by deliverTx in the abci and verifies the proof of work, takes a not of the transaction id and counts the number of transactions of the party in the block. -func (e *Engine) DeliverTx(tx abci.Tx) error { +// CheckBlockTx verifies if a transaction can be included a prepared/verified block. +func (e *Engine) CheckBlockTx(tx abci.Tx) (ValidationResult, *uint) { if e.log.IsDebug() { e.lock.RLock() - e.log.Debug("delivertx got tx", logging.String("command", tx.Command().String()), logging.Uint64("height", tx.BlockHeight()), logging.String("tid", tx.GetPoWTID()), logging.Uint64("current-block", e.currentBlock)) + e.log.Debug("CheckBlockTx got tx", logging.String("command", tx.Command().String()), logging.Uint64("height", tx.BlockHeight()), logging.String("tid", tx.GetPoWTID()), logging.Uint64("current-block", e.currentBlock)) e.lock.RUnlock() } d, err := e.verify(tx) + dUint := uint(d) if err != nil { - return err + e.log.Error("pow error", logging.Error(err)) + return ValidationResultVerificationPowError, nil } e.lock.Lock() @@ -312,67 +407,63 @@ func (e *Engine) DeliverTx(tx abci.Tx) error { params := e.activeParams[stateInd] e.seenTx[txHash] = struct{}{} - e.heightToTx[tx.BlockHeight()] = append(e.heightToTx[tx.BlockHeight()], txHash) if tx.Command().IsValidatorCommand() { - return nil + return ValidationResultValidatorCommand, nil } // if version supports pow, save the pow result and the tid - e.heightToTid[tx.BlockHeight()] = append(e.heightToTid[tx.BlockHeight()], tx.GetPoWTID()) - e.heightToNonceRef[tx.BlockHeight()] = append(e.heightToNonceRef[tx.BlockHeight()], nonceRef{tx.Party(), tx.GetNonce()}) e.seenTid[tx.GetPoWTID()] = struct{}{} e.seenNonceRef[nonceRef{tx.Party(), tx.GetNonce()}] = struct{}{} // if it's the first transaction we're seeing from any party for this block height, initialise the state if _, ok := state.blockToPartyState[txBlock]; !ok { - state.blockToPartyState[txBlock] = map[string]*partyStateForBlock{tx.Party(): {observedDifficulty: uint(d), seenCount: uint(1)}} + state.blockToPartyState[txBlock] = map[string]*partyStateForBlock{tx.Party(): {observedDifficulty: dUint, seenCount: uint(1)}} if e.log.IsDebug() { e.log.Debug("transaction accepted", logging.String("tid", tx.GetPoWTID())) } - return nil + e.log.Debug("updated party block state", logging.Uint64("height", txBlock), logging.String("party", tx.Party()), logging.String("tx-hash", txHash)) + return ValidationResultSuccess, &dUint } // if it's the first transaction for the party for this block height if _, ok := state.blockToPartyState[txBlock][tx.Party()]; !ok { - state.blockToPartyState[txBlock] = map[string]*partyStateForBlock{tx.Party(): {observedDifficulty: uint(d), seenCount: uint(1)}} - return nil + state.blockToPartyState[txBlock][tx.Party()] = &partyStateForBlock{observedDifficulty: dUint, seenCount: uint(1)} + e.log.Debug("updated party block state", logging.Uint64("height", txBlock), logging.String("party", tx.Party()), logging.String("tx-hash", txHash)) + return ValidationResultSuccess, &dUint } // it's not the first transaction for the party for the given block height // if we've seen less than the allowed number of transactions per block, take a note and let it pass partyState := state.blockToPartyState[txBlock][tx.Party()] if partyState.seenCount < uint(params.spamPoWNumberOfTxPerBlock) { - partyState.observedDifficulty += uint(d) + partyState.observedDifficulty += dUint partyState.seenCount++ if e.log.IsDebug() { e.log.Debug("transaction accepted", logging.String("tid", tx.GetPoWTID())) } - return nil + e.log.Debug("updated party block state", logging.Uint64("height", txBlock), logging.String("party", tx.Party()), logging.String("tx-hash", txHash)) + return ValidationResultSuccess, &dUint } - // if we've seen already enough transactions and `spamPoWIncreasingDifficulty` is not enabled then fail the transaction and ban the party + // if we've seen already enough transactions and `spamPoWIncreasingDifficulty` is not enabled then fail the transaction if !params.spamPoWIncreasingDifficulty { - e.bannedParties[tx.Party()] = e.timeService.GetTimeNow().Add(e.banDuration) - return errors.New("too many transactions per block") + return ValidationResultTooManyTx, nil } // calculate the expected difficulty - allow spamPoWNumberOfTxPerBlock for every level of increased difficulty totalExpectedDifficulty, _ := calculateExpectedDifficulty(params.spamPoWDifficulty, uint(params.spamPoWNumberOfTxPerBlock), partyState.seenCount+1) - // if the observed difficulty sum is less than the expected difficulty, ban the party and reject the tx - if partyState.observedDifficulty+uint(d) < totalExpectedDifficulty { - banTime := e.timeService.GetTimeNow().Add(e.banDuration) - e.bannedParties[tx.Party()] = banTime - e.log.Info("banning party for not respecting required difficulty rules", logging.String("party", tx.Party()), logging.Time("until", banTime)) - return errors.New("too many transactions per block") + // if the observed difficulty sum is less than the expected difficulty, reject the tx + if partyState.observedDifficulty+dUint < totalExpectedDifficulty { + return ValidationResultTooManyTx, nil } - partyState.observedDifficulty += +uint(d) + partyState.observedDifficulty += dUint partyState.seenCount++ - - return nil + e.log.Debug("updated party block state", logging.Uint64("height", txBlock), logging.String("party", tx.Party()), logging.String("tx-hash", txHash)) + return ValidationResultSuccess, &dUint } // calculateExpectedDifficulty calculates the expected total difficulty given the default difficulty, the max batch size and the number of seen transactions @@ -422,30 +513,14 @@ func (e *Engine) findParamsForBlockHeight(height uint64) int { return paramIndex } -// verify the proof of work -// 1. check that the party is not banned -// 2. check that the block height is already known to the engine - this is rejected if it's too old or not yet seen as we need to know the block hash -// 3. check that we've not seen this transaction ID before (in the previous `spamPoWNumberOfPastBlocks` blocks) -// 4. check that the proof of work can be verified with the required difficulty. -func (e *Engine) verify(tx abci.Tx) (byte, error) { - e.lock.RLock() - defer e.lock.RUnlock() +func (e *Engine) verifyWithLock(tx abci.Tx) (byte, error) { var h byte - if e.noVerify { return h, nil } - // check if the party is banned for the epoch - if _, ok := e.bannedParties[tx.Party()]; ok { - e.log.Error("party is banned", logging.String("tid", tx.GetPoWTID()), logging.String("party", tx.Party())) - return h, errors.New("party is banned from sending transactions") - } - // check if the transaction was seen in scope txHash := hex.EncodeToString(tx.Hash()) - - // check for replay attacks if _, ok := e.seenTx[txHash]; ok { e.log.Error("replay attack: txHash already used", logging.String("tx-hash", txHash), logging.String("tid", tx.GetPoWTID()), logging.String("party", tx.Party()), logging.String("command", tx.Command().String())) return h, errors.New("transaction hash already used") @@ -506,6 +581,16 @@ func (e *Engine) verify(tx abci.Tx) (byte, error) { return diff, nil } +// verify the proof of work +// 1. check that the block height is already known to the engine - this is rejected if it's too old or not yet seen as we need to know the block hash +// 2. check that we've not seen this transaction ID before (in the previous `spamPoWNumberOfPastBlocks` blocks) +// 3. check that the proof of work can be verified with the required difficulty. +func (e *Engine) verify(tx abci.Tx) (byte, error) { + e.lock.RLock() + defer e.lock.RUnlock() + return e.verifyWithLock(tx) +} + func (e *Engine) updateParam(netParamName, netParamValue string, p *params) { switch netParamName { case "spamPoWNumberOfPastBlocks": @@ -676,11 +761,10 @@ func (e *Engine) GetSpamStatistics(partyID string) *protoapi.PoWStatistic { for _, state := range e.activeStates { for block, blockToPartyState := range state.blockToPartyState { - if block == e.currentBlock { - currentBlockStatsExists = true - } - if partyState, ok := blockToPartyState[partyID]; ok { + if block == e.currentBlock { + currentBlockStatsExists = true + } blockIndex := block % ringSize params := getParamsForBlock(block, e.activeParams) @@ -719,18 +803,8 @@ func (e *Engine) GetSpamStatistics(partyID string) *protoapi.PoWStatistic { }) } - until := e.bannedParties[partyID].UnixNano() - - var bannedUntil *string - - if until > 0 { - untilStr := strconv.FormatInt(until, 10) - bannedUntil = &untilStr - } - return &protoapi.PoWStatistic{ BlockStates: stats, - BannedUntil: bannedUntil, NumberOfPastBlocks: e.getActiveParams().spamPoWNumberOfPastBlocks, } } diff --git a/core/pow/engine_test.go b/core/pow/engine_test.go index 1437e8fd18..68ba599d41 100644 --- a/core/pow/engine_test.go +++ b/core/pow/engine_test.go @@ -17,70 +17,60 @@ package pow import ( "context" - "encoding/hex" "errors" "math/rand" "testing" - "time" - "github.com/stretchr/testify/assert" - - "code.vegaprotocol.io/vega/core/delegation/mocks" + "code.vegaprotocol.io/vega/core/blockchain/abci" + "code.vegaprotocol.io/vega/core/pow/mocks" "code.vegaprotocol.io/vega/core/txn" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) -func TestUpdateBanDuration(t *testing.T) { - e := New(logging.NewTestLogger(), NewDefaultConfig(), mocks.NewMockTimeService(gomock.NewController(t))) - e.OnEpochDurationChanged(context.Background(), time.Hour*10) - require.Equal(t, float64(750), e.banDuration.Round(time.Second).Seconds()) // 10h/48 = 10 * 60 * 60 / 48 = 750s - - e.OnEpochDurationChanged(context.Background(), time.Second*10) - require.Equal(t, float64(30), e.banDuration.Round(time.Second).Seconds()) // minimum of 30s applies -} - func TestSpamPoWNumberOfPastBlocks(t *testing.T) { - e := New(logging.NewTestLogger(), NewDefaultConfig(), mocks.NewMockTimeService(gomock.NewController(t))) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(200)) require.Equal(t, uint32(200), e.SpamPoWNumberOfPastBlocks()) } func TestSpamPoWDifficulty(t *testing.T) { - e := New(logging.NewTestLogger(), NewDefaultConfig(), mocks.NewMockTimeService(gomock.NewController(t))) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) require.Equal(t, uint32(20), e.SpamPoWDifficulty()) } func TestSpamPoWHashFunction(t *testing.T) { - e := New(logging.NewTestLogger(), NewDefaultConfig(), mocks.NewMockTimeService(gomock.NewController(t))) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWHashFunction(context.Background(), "hash4") require.Equal(t, "hash4", e.SpamPoWHashFunction()) } func TestSpamPoWNumberOfTxPerBlock(t *testing.T) { - e := New(logging.NewTestLogger(), NewDefaultConfig(), mocks.NewMockTimeService(gomock.NewController(t))) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(2)) require.Equal(t, uint32(2), e.SpamPoWNumberOfPastBlocks()) } func TestSpamPoWIncreasingDifficulty(t *testing.T) { - e := New(logging.NewTestLogger(), NewDefaultConfig(), mocks.NewMockTimeService(gomock.NewController(t))) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(1)) require.Equal(t, true, e.SpamPoWIncreasingDifficulty()) } func TestUpdateNumberOfBlocks(t *testing.T) { - e := New(logging.NewTestLogger(), NewDefaultConfig(), mocks.NewMockTimeService(gomock.NewController(t))) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(5)) require.Equal(t, uint32(5), e.SpamPoWNumberOfPastBlocks()) } func TestCheckTx(t *testing.T) { - e := New(logging.NewTestLogger(), NewDefaultConfig(), mocks.NewMockTimeService(gomock.NewController(t))) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(5)) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) e.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) @@ -95,10 +85,6 @@ func TestCheckTx(t *testing.T) { // seen transction require.Equal(t, errors.New("proof of work tid already used"), e.CheckTx(&testTx{blockHeight: 100, powTxID: "49B0DF0954A8C048554B1C65F4F5883C38640D101A11959EB651AE2065A80BBB"})) - // party is banned - e.bannedParties["C692100485479CE9E1815B9E0A66D3596295A04DB42170CB4B61CFAE7332ADD8"] = time.Time{} - require.Equal(t, errors.New("party is banned from sending transactions"), e.CheckTx(&testTx{party: "C692100485479CE9E1815B9E0A66D3596295A04DB42170CB4B61CFAE7332ADD8", blockHeight: 100, powTxID: "A204DF39B63100C76EC831A843BF3C538FF54217DBA4B1409A3773507053EBB5"})) - // incorrect pow require.Equal(t, errors.New("failed to verify proof of work"), e.CheckTx(&testTx{party: crypto.RandomHash(), blockHeight: 100, powTxID: "077723AB0705677EAA704130D403C21352F87A9AF0E9C4C8F85CC13245FEFED7", powNonce: 1})) @@ -106,8 +92,8 @@ func TestCheckTx(t *testing.T) { require.NoError(t, e.CheckTx(&testTx{party: crypto.RandomHash(), blockHeight: 100, powTxID: "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", powNonce: 596})) } -func TestCheckTxValidator(t *testing.T) { - e := New(logging.NewTestLogger(), NewDefaultConfig(), mocks.NewMockTimeService(gomock.NewController(t))) +func TestCheckBlockTx(t *testing.T) { + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(5)) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) e.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) @@ -115,52 +101,60 @@ func TestCheckTxValidator(t *testing.T) { e.currentBlock = 100 e.blockHeight[100] = 100 - e.blockHash[100] = "113EB390CBEB921433BDBA832CCDFD81AC4C77C3748A41B1AF08C96BC6C7BCD9" - e.seenTid["49B0DF0954A8C048554B1C65F4F5883C38640D101A11959EB651AE2065A80BBB"] = struct{}{} - e.heightToTid[96] = []string{"49B0DF0954A8C048554B1C65F4F5883C38640D101A11959EB651AE2065A80BBB"} - - // seen transction - require.Equal(t, errors.New("proof of work tid already used"), e.CheckTx(&testTx{blockHeight: 100, powTxID: "49B0DF0954A8C048554B1C65F4F5883C38640D101A11959EB651AE2065A80BBB"})) + e.blockHash[100] = "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4" - // party is banned - e.bannedParties["C692100485479CE9E1815B9E0A66D3596295A04DB42170CB4B61CFAE7332ADD8"] = time.Time{} + require.Equal(t, 0, len(e.seenTid)) + require.Equal(t, 0, len(e.heightToTid)) + party := crypto.RandomHash() + tx1 := &testTx{party: party, blockHeight: 100, txID: "1", powTxID: "DFE522E234D67E6AE3F017859F898E576B3928EA57310B765398615A0D3FDE2F", powNonce: 424517} // 00000e31f8ac983354f5885d46b7631bc75f69ec82e8f6178bae53db0ab7e054 - 20 + res1, d1 := e.CheckBlockTx(tx1) + require.Equal(t, ValidationResultSuccess, res1) + require.Equal(t, 1, len(e.seenTid)) - // transaction too old: height 10, number of past blocks 5, current block 100 - oldTx := &testTx{ - party: "f8480da06c54a04a363c0563f207c0336a2bf80bf6864d560bf9d90653769f83", - blockHeight: 10, - powTxID: "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", - powNonce: 596, + // same transaction within the same proposal should fail verification + res2, d2 := e.CheckBlockTx(tx1) + require.Equal(t, ValidationResultVerificationPowError, res2) + + // another transaction with invalid nonce should fail verification + tx2 := &testTx{party: party, blockHeight: 100, txID: "2", powTxID: "DFE522E234D67E6AE3F017859F898E576B3928EA57310B765398615A0D3FDE2F", powNonce: 1} + res3, d3 := e.CheckBlockTx(tx2) + require.Equal(t, ValidationResultVerificationPowError, res3) + + // old transaction should fail verification + tx3 := &testTx{party: party, blockHeight: 50, txID: "3", powTxID: "5B0E1EB96CCAC120E6D824A5F4C4007EABC59573B861BD84B1EF09DFB376DC84", powNonce: 4031737} + res4, d4 := e.CheckBlockTx(tx3) + require.Equal(t, ValidationResultVerificationPowError, res4) + + // add another transaction not increasing difficulty + tx4 := &testTx{party: party, blockHeight: 100, txID: "4", powTxID: "2A1319636230740888C968E4E7610D6DE820E644EEC3C08AA5322A0A022014BD", powNonce: 1421231} // 000009c5043c4e1dd7fe190ece8d3fd83d94c4e2a2b7800456ce5f5a653c9f75 - 20 + res5, d5 := e.CheckBlockTx(tx4) + require.Equal(t, ValidationResultTooManyTx, res5) + + entries := []ValidationEntry{ + {ValResult: res1, Difficulty: d1, Tx: tx1}, + {ValResult: res2, Difficulty: d2, Tx: tx1}, + {ValResult: res3, Difficulty: d3, Tx: tx2}, + {ValResult: res4, Difficulty: d4, Tx: tx3}, + {ValResult: res5, Difficulty: d5, Tx: tx4}, } - txHash := hex.EncodeToString(oldTx.Hash()) - expErr := errors.New("unknown block height for tx:" + txHash + ", command:" + oldTx.Command().String() + ", party:" + oldTx.Party()) - require.Equal(t, expErr, e.CheckTx(oldTx)) - // old tx, validator command is no good anymore! - require.Equal(t, "unknown block height for tx:, command:Node Signature, party:f8480da06c54a04a363c0563f207c0336a2bf80bf6864d560bf9d90653769f83", e.CheckTx(&testValidatorTx{testTx: *oldTx}).Error()) -} - -func TestDeliverTx(t *testing.T) { - e := New(logging.NewTestLogger(), NewDefaultConfig(), mocks.NewMockTimeService(gomock.NewController(t))) - e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(5)) - e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) - e.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) - e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1)) - - e.currentBlock = 100 - e.blockHeight[100] = 100 - e.blockHash[100] = "113EB390CBEB921433BDBA832CCDFD81AC4C77C3748A41B1AF08C96BC6C7BCD9" - + e.rollback(entries) require.Equal(t, 0, len(e.seenTid)) require.Equal(t, 0, len(e.heightToTid)) - party := crypto.RandomHash() - require.NoError(t, e.DeliverTx(&testTx{party: party, blockHeight: 100, powTxID: "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", powNonce: 596})) + + res, d := e.CheckBlockTx(tx1) + require.Equal(t, ValidationResultSuccess, res) require.Equal(t, 1, len(e.seenTid)) + + valEntry := ValidationEntry{ValResult: res, Difficulty: d, Tx: tx1} + e.rollback([]ValidationEntry{valEntry}) + e.BeginBlock(101, crypto.RandomHash(), []abci.Tx{tx1}) require.Equal(t, 1, len(e.heightToTid)) - require.Equal(t, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", e.heightToTid[100][0]) + require.Equal(t, 1, len(e.seenTid)) + require.Equal(t, "DFE522E234D67E6AE3F017859F898E576B3928EA57310B765398615A0D3FDE2F", e.heightToTid[100][0]) } func TestMempoolTidRejection(t *testing.T) { - e := New(logging.NewTestLogger(), NewDefaultConfig(), mocks.NewMockTimeService(gomock.NewController(t))) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(5)) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) e.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) @@ -176,21 +170,20 @@ func TestMempoolTidRejection(t *testing.T) { require.Equal(t, 1, len(e.mempoolSeenTid)) require.Error(t, e.CheckTx(tx1)) - e.DeliverTx(tx1) - + res, d := e.CheckBlockTx(tx1) + e.rollback([]ValidationEntry{{Tx: tx1, Difficulty: d, ValResult: res}}) + e.BeginBlock(101, crypto.RandomHash(), []abci.Tx{tx1}) + e.OnCommit() require.Equal(t, 1, len(e.seenTid)) _, ok := e.seenTid["2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4"] require.True(t, ok) - e.Commit() require.Equal(t, 0, len(e.mempoolSeenTid)) - require.Error(t, e.CheckTx(tx1)) } func TestDeliverTxDuplciateNonce(t *testing.T) { - ts := mocks.NewMockTimeService(gomock.NewController(t)) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(5)) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) e.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) @@ -213,7 +206,9 @@ func TestDeliverTxDuplciateNonce(t *testing.T) { nonce: 12, } - require.NoError(t, e.DeliverTx(tx)) + require.Equal(t, true, e.ProcessProposal([]abci.Tx{tx})) + e.BeginBlock(101, crypto.RandomHash(), []abci.Tx{tx}) + require.Equal(t, 1, len(e.seenTid)) require.Equal(t, 1, len(e.heightToTid)) require.Equal(t, 1, len(e.heightToNonceRef)) @@ -223,20 +218,21 @@ func TestDeliverTxDuplciateNonce(t *testing.T) { tx.powNonce = 100 tx.powTxID = "113EB390CBEB921433BDBA832CCDFD81AC4C77C3748A41B1AF08C96BC6C7BCD9" tx.txID = crypto.RandomHash() - require.ErrorIs(t, ErrNonceAlreadyUsedByParty, e.DeliverTx(tx)) + + require.Equal(t, false, e.ProcessProposal([]abci.Tx{tx})) // but a different party can used that nonce at that height tx.powTxID = "DC911C0EA95545441F3E1182DD25D973764395A7E75CBDBC086F1C6F7075AED6" tx.powNonce = 523162 tx.party = crypto.RandomHash() - require.NoError(t, e.DeliverTx(tx)) + + require.Equal(t, true, e.ProcessProposal([]abci.Tx{tx})) + e.BeginBlock(101, crypto.RandomHash(), []abci.Tx{tx}) require.Equal(t, 1, len(e.heightToNonceRef)) require.Equal(t, 2, len(e.heightToNonceRef[100])) // check the maps are purged when we leave scope - ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Unix(1000, 12)) - e.BeginBlock(104, "2D2E4EC3DA3584F3FD4AD1BD1C0700E3C8DFB7BB1C307312AB35F18940836FC4") - e.EndOfBlock() + e.BeginBlock(104, crypto.RandomHash(), []abci.Tx{}) require.Equal(t, 0, len(e.seenTid)) require.Equal(t, 0, len(e.heightToTid)) require.Equal(t, 0, len(e.heightToNonceRef)) @@ -338,89 +334,61 @@ func TestExpectedDifficulty(t *testing.T) { } func TestBeginBlock(t *testing.T) { - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(3)) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) e.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1)) - e.BeginBlock(100, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4") - e.BeginBlock(101, "113EB390CBEB921433BDBA832CCDFD81AC4C77C3748A41B1AF08C96BC6C7BCD9") - e.BeginBlock(102, "C692100485479CE9E1815B9E0A66D3596295A04DB42170CB4B61CFAE7332ADD8") + e.BeginBlock(100, "113EB390CBEB921433BDBA832CCDFD81AC4C77C3748A41B1AF08C96BC6C7BCD9", []abci.Tx{}) + e.BeginBlock(101, "C692100485479CE9E1815B9E0A66D3596295A04DB42170CB4B61CFAE7332ADD8", []abci.Tx{}) + e.BeginBlock(102, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", []abci.Tx{}) require.Equal(t, uint64(102), e.currentBlock) require.Equal(t, uint64(100), e.blockHeight[100]) require.Equal(t, uint64(101), e.blockHeight[101]) require.Equal(t, uint64(102), e.blockHeight[102]) - require.Equal(t, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", e.blockHash[100]) - require.Equal(t, "113EB390CBEB921433BDBA832CCDFD81AC4C77C3748A41B1AF08C96BC6C7BCD9", e.blockHash[101]) - require.Equal(t, "C692100485479CE9E1815B9E0A66D3596295A04DB42170CB4B61CFAE7332ADD8", e.blockHash[102]) - - // now add some transactions for block 100 before it goes off - e.DeliverTx(&testTx{txID: "1", party: crypto.RandomHash(), blockHeight: 100, powTxID: "94A9CB1532011081B013CCD8E6AAA832CAB1CBA603F0C5A093B14C4961E5E7F0", powNonce: 431336}) - e.DeliverTx(&testTx{txID: "2", party: crypto.RandomHash(), blockHeight: 100, powTxID: "DC911C0EA95545441F3E1182DD25D973764395A7E75CBDBC086F1C6F7075AED6", powNonce: 523162}) - - require.Equal(t, 2, len(e.seenTid)) - require.Equal(t, 2, len(e.heightToTid[100])) + require.Equal(t, "113EB390CBEB921433BDBA832CCDFD81AC4C77C3748A41B1AF08C96BC6C7BCD9", e.blockHash[100]) + require.Equal(t, "C692100485479CE9E1815B9E0A66D3596295A04DB42170CB4B61CFAE7332ADD8", e.blockHash[101]) + require.Equal(t, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", e.blockHash[102]) + + // now add some transactions for block 102 before it goes off + tx1 := &testTx{txID: "1", party: crypto.RandomHash(), blockHeight: 102, powTxID: "94A9CB1532011081B013CCD8E6AAA832CAB1CBA603F0C5A093B14C4961E5E7F0", powNonce: 431336} + tx2 := &testTx{txID: "2", party: crypto.RandomHash(), blockHeight: 102, powTxID: "DC911C0EA95545441F3E1182DD25D973764395A7E75CBDBC086F1C6F7075AED6", powNonce: 523162} + + res1, d1 := e.CheckBlockTx(tx1) + res2, d2 := e.CheckBlockTx(tx2) + require.Equal(t, ValidationResultSuccess, res1) + require.Equal(t, ValidationResultSuccess, res2) + e.rollback([]ValidationEntry{{Tx: tx1, ValResult: res1, Difficulty: d1}, {Tx: tx2, ValResult: res2, Difficulty: d2}}) + require.Equal(t, 0, len(e.seenTid)) + require.Equal(t, 0, len(e.heightToTid[100])) - e.BeginBlock(103, "2E289FB9CEF7234E2C08F34CCD66B330229067CE47E22F76EF0595B3ABA9968F") + e.BeginBlock(103, "2E289FB9CEF7234E2C08F34CCD66B330229067CE47E22F76EF0595B3ABA9968F", []abci.Tx{tx1, tx2}) require.Equal(t, uint64(103), e.currentBlock) require.Equal(t, uint64(103), e.blockHeight[103]) require.Equal(t, uint64(101), e.blockHeight[101]) require.Equal(t, uint64(102), e.blockHeight[102]) + require.Equal(t, "C692100485479CE9E1815B9E0A66D3596295A04DB42170CB4B61CFAE7332ADD8", e.blockHash[101]) + require.Equal(t, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", e.blockHash[102]) require.Equal(t, "2E289FB9CEF7234E2C08F34CCD66B330229067CE47E22F76EF0595B3ABA9968F", e.blockHash[103]) - require.Equal(t, "113EB390CBEB921433BDBA832CCDFD81AC4C77C3748A41B1AF08C96BC6C7BCD9", e.blockHash[101]) - require.Equal(t, "C692100485479CE9E1815B9E0A66D3596295A04DB42170CB4B61CFAE7332ADD8", e.blockHash[102]) -} - -func TestBan(t *testing.T) { - now := time.Now() - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().Times(72).Return(now) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) - e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(1)) - e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) - e.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) - e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1)) - e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(1)) - e.OnEpochDurationChanged(context.Background(), 24*time.Hour) - - // test happy days first - 4 transactions with increasing difficulty results in no ban - regardless of the order they come in - party := crypto.RandomHash() - txs := []*testTx{ - {txID: "4", party: party, powTxID: "DFE522E234D67E6AE3F017859F898E576B3928EA57310B765398615A0D3FDE2F", powNonce: 424517}, // 00000e31f8ac983354f5885d46b7631bc75f69ec82e8f6178bae53db0ab7e054 - 20 - {txID: "5", party: party, powTxID: "5B87F9DFA41DABE84A11CA78D9FE11DA8FC2AA926004CA66454A7AF0A206480D", powNonce: 4095356}, // 0000077b7d66117b57e45ccba0c31554e61c9853cc1cd9a2cf09c41b0aa9c22e - 21 - {txID: "6", party: party, powTxID: "B14DD602ED48C9F7B5367105A4A97FFC9199EA0C9E1490B786534768DD1538EF", powNonce: 1751582}, // 000003bbf0cde49e3899ad23282b18defbc12a65f07c95d768464b87024df368 - 22 - {txID: "7", party: party, powTxID: "94A9CB1532011081B013CCD8E6AAA832CAB1CBA603F0C5A093B14C4961E5E7F0", powNonce: 431336}, // 000001c297318619efd60b9197f89e36fea83ca8d7461cf7b7c78af84e0a3b51 - 23 - } - testBanWithTxPermutations(t, e, txs, false, 102, party, now) - - txs = []*testTx{ - {txID: "8", party: party, powTxID: "2A1319636230740888C968E4E7610D6DE820E644EEC3C08AA5322A0A022014BD", powNonce: 1421231}, // 000009c5043c4e1dd7fe190ece8d3fd83d94c4e2a2b7800456ce5f5a653c9f75 - 20 - {txID: "9", party: party, powTxID: "DFE522E234D67E6AE3F017859F898E576B3928EA57310B765398615A0D3FDE2F", powNonce: 424517}, // 00000e31f8ac983354f5885d46b7631bc75f69ec82e8f6178bae53db0ab7e054 - 20 - {txID: "10", party: party, powTxID: "5B0E1EB96CCAC120E6D824A5F4C4007EABC59573B861BD84B1EF09DFB376DC84", powNonce: 4031737}, // 000002a98320df372412d7179ca2645b13ff3ecbe660e4a9a743fb423d8aec1f - 22 - {txID: "11", party: party, powTxID: "94A9CB1532011081B013CCD8E6AAA832CAB1CBA603F0C5A093B14C4961E5E7F0", powNonce: 431336}, // 000001c297318619efd60b9197f89e36fea83ca8d7461cf7b7c78af84e0a3b51 - 23 - } - testBanWithTxPermutations(t, e, txs, true, 126, party, now) - now = now.Add(e.banDuration) - ts.EXPECT().GetTimeNow().Times(1).Return(now) - e.BeginBlock(129, crypto.RandomHash()) - require.Equal(t, 0, len(e.bannedParties)) + require.Equal(t, 2, len(e.seenTid)) + require.Equal(t, 2, len(e.seenTx)) + require.Equal(t, 2, len(e.heightToTid[102])) + require.Equal(t, *d1, e.activeStates[0].blockToPartyState[102][tx1.party].observedDifficulty) + require.Equal(t, *d2, e.activeStates[0].blockToPartyState[102][tx2.party].observedDifficulty) + require.Equal(t, uint(1), e.activeStates[0].blockToPartyState[102][tx1.party].seenCount) + require.Equal(t, uint(1), e.activeStates[0].blockToPartyState[102][tx2.party].seenCount) } func TestAllowTransactionsAcrossMultipleBlocks(t *testing.T) { - now := time.Now() - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().AnyTimes().Return(now) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(10)) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) e.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1)) e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(1)) - e.BeginBlock(100, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4") + e.BeginBlock(100, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", []abci.Tx{}) // test happy days first - 4 transactions with increasing difficulty results in no ban - regardless of the order they come in party := crypto.RandomHash() @@ -432,120 +400,55 @@ func TestAllowTransactionsAcrossMultipleBlocks(t *testing.T) { } // process the first transaction on block 101 - e.BeginBlock(101, crypto.RandomHash()) - require.NoError(t, e.DeliverTx(txs[0])) + e.BeginBlock(101, crypto.RandomHash(), []abci.Tx{}) + res, d := e.CheckBlockTx(txs[0]) + require.Equal(t, ValidationResultSuccess, res) + e.rollback([]ValidationEntry{{ValResult: res, Difficulty: d, Tx: txs[0]}}) // process the second transaction on block 102 - e.BeginBlock(102, crypto.RandomHash()) - require.NoError(t, e.DeliverTx(txs[1])) + e.BeginBlock(102, crypto.RandomHash(), []abci.Tx{txs[0]}) + res, d = e.CheckBlockTx(txs[1]) + require.Equal(t, ValidationResultSuccess, res) + e.rollback([]ValidationEntry{{ValResult: res, Difficulty: d, Tx: txs[1]}}) // process the third transaction on block 103 - e.BeginBlock(103, crypto.RandomHash()) - require.NoError(t, e.DeliverTx(txs[2])) - - // process the last transaction on block 104 - this should get us banned - e.BeginBlock(104, crypto.RandomHash()) - require.Equal(t, "too many transactions per block", e.DeliverTx(txs[3]).Error()) - - require.Equal(t, 1, len(e.bannedParties)) + e.BeginBlock(103, crypto.RandomHash(), []abci.Tx{txs[1]}) + res, d = e.CheckBlockTx(txs[2]) + require.Equal(t, ValidationResultSuccess, res) + e.rollback([]ValidationEntry{{ValResult: res, Difficulty: d, Tx: txs[2]}}) + + // process the last transaction on block 104 + e.BeginBlock(104, crypto.RandomHash(), []abci.Tx{txs[2]}) + res, d = e.CheckBlockTx(txs[3]) + require.Equal(t, ValidationResultTooManyTx, res) + e.rollback([]ValidationEntry{{ValResult: res, Difficulty: d, Tx: txs[3]}}) } func TestEdgeCase1(t *testing.T) { ts := mocks.NewMockTimeService(gomock.NewController(t)) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(100)) e.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) ts.EXPECT().GetTimeNow().AnyTimes() - e.BeginBlock(1, "9DF61AC8AD2178E2E2FD2D94E0F07A4B8AA141213179B03C184F8EAD898A9336") - e.EndOfBlock() - e.BeginBlock(50, "1D5839A6F7BF1CDB681590890E9D50ECFA222C41F57D1F05229ED3DED533F59A") + e.BeginBlock(1, "9DF61AC8AD2178E2E2FD2D94E0F07A4B8AA141213179B03C184F8EAD898A9336", []abci.Tx{}) nonce, _, _ := crypto.PoW("9DF61AC8AD2178E2E2FD2D94E0F07A4B8AA141213179B03C184F8EAD898A9336", "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", 20, "sha3_24_rounds") - // a transaction signed with block 1 is executed in block 50 - require.NoError(t, e.DeliverTx(&testTx{txID: "5CCCE01E56B9666F39F007BF577F10BB46987CFE1B1BE80AAC1DBBF51F9C45FE", party: "zohar", blockHeight: 1, powTxID: "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", powNonce: nonce})) - e.EndOfBlock() + + e.BeginBlock(50, "1D5839A6F7BF1CDB681590890E9D50ECFA222C41F57D1F05229ED3DED533F59A", []abci.Tx{&testTx{txID: "5CCCE01E56B9666F39F007BF577F10BB46987CFE1B1BE80AAC1DBBF51F9C45FE", party: "zohar", blockHeight: 1, powTxID: "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", powNonce: nonce}}) // come block 100 - e.BeginBlock(100, "2D2E4EC3DA3584F3FD4AD1BD1C0700E3C8DFB7BB1C307312AB35F18940836FC4") - e.EndOfBlock() + e.BeginBlock(100, "2D2E4EC3DA3584F3FD4AD1BD1C0700E3C8DFB7BB1C307312AB35F18940836FC4", []abci.Tx{}) // block 100 ended, block 101 is being prepared, at this point transactions from block 1 are not valid anymore. // we've cleared the state of the 100th oldest block seen tx (aka block 1) - now with the modified check for distance in verify - checktx should not allow the transaction in require.Error(t, e.CheckTx(&testTx{txID: "5CCCE01E56B9666F39F007BF577F10BB46987CFE1B1BE80AAC1DBBF51F9C45FE", party: "zohar", blockHeight: 2261296, powTxID: "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", powNonce: nonce})) - e.BeginBlock(101, "2D2E4EC3DA3584F3FD4AD1BD1C0700E3C8DFB7BB1C307312AB35F18940836FC4") - e.EndOfBlock() + e.BeginBlock(101, "2D2E4EC3DA3584F3FD4AD1BD1C0700E3C8DFB7BB1C307312AB35F18940836FC4", []abci.Tx{}) // verify for fun that we can't get the transaction at this point either. require.Error(t, e.CheckTx(&testTx{txID: "5CCCE01E56B9666F39F007BF577F10BB46987CFE1B1BE80AAC1DBBF51F9C45FE", party: "zohar", blockHeight: 2261296, powTxID: "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", powNonce: nonce})) } -func TestEndBlock(t *testing.T) { - e := New(logging.NewTestLogger(), NewDefaultConfig(), mocks.NewMockTimeService(gomock.NewController(t))) - e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(1)) - e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) - e.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) - e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1)) -} - -func testBanWithTxPermutations(t *testing.T, e *Engine, txs []*testTx, expectedBan bool, blockHeight uint64, party string, now time.Time) { - t.Helper() - txsPerm := permutation(txs) - for i, perm := range txsPerm { - // clear any bans - e.bannedParties = map[string]time.Time{} - - // begin a new block - e.BeginBlock(blockHeight+uint64(i), "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4") - - // send the transactions with the given permutation - errors := []error{} - for _, p := range perm { - p.blockHeight = blockHeight + uint64(i) - err := e.DeliverTx(p) - if err != nil { - errors = append(errors, err) - } - } - - if expectedBan { - require.True(t, len(errors) > 0) - require.Equal(t, "too many transactions per block", errors[0].Error()) - } else { - require.Equal(t, 0, len(errors)) - } - - // end the block to check if the party was playing nice - e.EndOfBlock() - - // verify expected ban - if expectedBan { - require.Equal(t, 1, len(e.bannedParties)) - require.Equal(t, now.Add(e.banDuration), e.bannedParties[party]) - } else { - require.Equal(t, 0, len(e.bannedParties)) - } - } -} - -func permutation(xs []*testTx) (permuts [][]*testTx) { - var rc func([]*testTx, int) - rc = func(a []*testTx, k int) { - if k == len(a) { - permuts = append(permuts, append([]*testTx{}, a...)) - } else { - for i := k; i < len(xs); i++ { - a[k], a[i] = a[i], a[k] - rc(a, k+1) - a[k], a[i] = a[i], a[k] - } - } - } - rc(xs, 0) - - return permuts -} - type testTx struct { party string blockHeight uint64 @@ -555,10 +458,8 @@ type testTx struct { nonce uint64 } -type testValidatorTx struct { - testTx -} - +func (tx *testTx) TTL() uint64 { return 100 } +func (tx *testTx) GetLength() int { return 0 } func (tx *testTx) Unmarshal(interface{}) error { return nil } func (tx *testTx) GetPoWTID() string { return tx.powTxID } func (tx *testTx) GetVersion() uint32 { return 2 } @@ -581,10 +482,6 @@ func (tx *testTx) GetNonce() uint64 { return rand.Uint64() } -func (tx *testValidatorTx) Command() txn.Command { - return txn.NodeSignatureCommand -} - func Test_ExpectedSpamDifficulty(t *testing.T) { type args struct { spamPowDifficulty uint @@ -714,36 +611,3 @@ func Test_ExpectedSpamDifficulty(t *testing.T) { }) } } - -func TestPruning(t *testing.T) { - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) - e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(5)) - e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) - e.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) - e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1)) - - e.currentBlock = 100 - e.blockHeight[100] = 100 - e.blockHash[100] = "113EB390CBEB921433BDBA832CCDFD81AC4C77C3748A41B1AF08C96BC6C7BCD9" - - require.Equal(t, 0, len(e.seenTid)) - require.Equal(t, 0, len(e.heightToTid)) - party := crypto.RandomHash() - require.NoError(t, e.DeliverTx(&testTx{party: party, blockHeight: 100, powTxID: "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", powNonce: 596})) - require.Equal(t, 1, len(e.seenTid)) - require.Equal(t, 1, len(e.heightToTid)) - require.Equal(t, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", e.heightToTid[100][0]) - - e.BeginBlock(999, crypto.RandomHash()) - e.EndOfBlock() - require.Equal(t, 1, len(e.seenTid)) - require.Equal(t, 1, len(e.heightToTid)) - require.Equal(t, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", e.heightToTid[100][0]) - - e.BeginBlock(1000, crypto.RandomHash()) - e.EndOfBlock() - require.Equal(t, 0, len(e.heightToTid)) - require.Equal(t, 0, len(e.seenTid)) -} diff --git a/core/pow/multiple_config_test.go b/core/pow/multiple_config_test.go index 934815b57f..aa608fe3da 100644 --- a/core/pow/multiple_config_test.go +++ b/core/pow/multiple_config_test.go @@ -18,22 +18,19 @@ package pow import ( "context" "testing" - "time" - "code.vegaprotocol.io/vega/core/pow/mocks" + "code.vegaprotocol.io/vega/core/blockchain/abci" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" - "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" ) func TestConfigurationHistory(t *testing.T) { - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) + e := New(logging.NewTestLogger(), NewDefaultConfig()) - e.BeginBlock(1, crypto.RandomHash()) + e.BeginBlock(1, crypto.RandomHash(), []abci.Tx{}) require.Equal(t, 0, len(e.activeParams)) require.Equal(t, 0, len(e.activeStates)) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(1)) @@ -42,8 +39,7 @@ func TestConfigurationHistory(t *testing.T) { require.Equal(t, uint64(1), e.activeParams[0].fromBlock) require.Nil(t, e.activeParams[0].untilBlock) - e.EndOfBlock() - e.BeginBlock(2, crypto.RandomHash()) + e.BeginBlock(2, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(5)) require.Equal(t, 2, len(e.activeParams)) require.Equal(t, 2, len(e.activeStates)) @@ -54,151 +50,121 @@ func TestConfigurationHistory(t *testing.T) { // we're in block 2, we expect difficulty to change in block 3 require.Equal(t, uint32(1), e.SpamPoWDifficulty()) - e.EndOfBlock() - e.BeginBlock(3, crypto.RandomHash()) + e.BeginBlock(3, crypto.RandomHash(), []abci.Tx{}) require.Equal(t, uint32(5), e.SpamPoWDifficulty()) } func TestSpamPoWNumberOfPastBlocksChange(t *testing.T) { - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) - e.BeginBlock(1, crypto.RandomHash()) + e := New(logging.NewTestLogger(), NewDefaultConfig()) + e.BeginBlock(1, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(10)) // it's the first configuration so it's starting from this block rather than next require.Equal(t, uint32(10), e.SpamPoWNumberOfPastBlocks()) - e.EndOfBlock() - e.BeginBlock(2, crypto.RandomHash()) + e.BeginBlock(2, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(100)) require.Equal(t, uint32(10), e.SpamPoWNumberOfPastBlocks()) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(110)) require.Equal(t, uint32(10), e.SpamPoWNumberOfPastBlocks()) - e.EndOfBlock() - e.BeginBlock(3, crypto.RandomHash()) + e.BeginBlock(3, crypto.RandomHash(), []abci.Tx{}) require.Equal(t, uint32(110), e.SpamPoWNumberOfPastBlocks()) } func TestSpamPoWDifficultyChange(t *testing.T) { - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) - e.BeginBlock(1, crypto.RandomHash()) + e := New(logging.NewTestLogger(), NewDefaultConfig()) + e.BeginBlock(1, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(10)) // it's the first configuration so it's starting from this block rather than next require.Equal(t, uint32(10), e.SpamPoWDifficulty()) - e.EndOfBlock() - e.BeginBlock(2, crypto.RandomHash()) + e.BeginBlock(2, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(100)) require.Equal(t, uint32(10), e.SpamPoWDifficulty()) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(110)) require.Equal(t, uint32(10), e.SpamPoWDifficulty()) - e.EndOfBlock() - e.BeginBlock(3, crypto.RandomHash()) + e.BeginBlock(3, crypto.RandomHash(), []abci.Tx{}) require.Equal(t, uint32(110), e.SpamPoWDifficulty()) } func TestSpamPoWHashChange(t *testing.T) { - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) - e.BeginBlock(1, crypto.RandomHash()) + e := New(logging.NewTestLogger(), NewDefaultConfig()) + e.BeginBlock(1, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWHashFunction(context.Background(), "f1") // it's the first configuration so it's starting from this block rather than next require.Equal(t, "f1", e.SpamPoWHashFunction()) - e.EndOfBlock() - e.BeginBlock(2, crypto.RandomHash()) + e.BeginBlock(2, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWHashFunction(context.Background(), "f2") require.Equal(t, "f1", e.SpamPoWHashFunction()) e.UpdateSpamPoWHashFunction(context.Background(), "f3") require.Equal(t, "f1", e.SpamPoWHashFunction()) - e.EndOfBlock() - e.BeginBlock(3, crypto.RandomHash()) + e.BeginBlock(3, crypto.RandomHash(), []abci.Tx{}) require.Equal(t, "f3", e.SpamPoWHashFunction()) } func TestSpamPoWNumberOfTxPerBlockChange(t *testing.T) { - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) - e.BeginBlock(1, crypto.RandomHash()) + e := New(logging.NewTestLogger(), NewDefaultConfig()) + e.BeginBlock(1, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(10)) // it's the first configuration so it's starting from this block rather than next require.Equal(t, uint32(10), e.SpamPoWNumberOfTxPerBlock()) - e.EndOfBlock() - e.BeginBlock(2, crypto.RandomHash()) + e.BeginBlock(2, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(100)) require.Equal(t, uint32(10), e.SpamPoWNumberOfTxPerBlock()) e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(110)) require.Equal(t, uint32(10), e.SpamPoWNumberOfTxPerBlock()) - e.EndOfBlock() - e.BeginBlock(3, crypto.RandomHash()) + e.BeginBlock(3, crypto.RandomHash(), []abci.Tx{}) require.Equal(t, uint32(110), e.SpamPoWNumberOfTxPerBlock()) } func TestSpamPoWIncreasingDifficultyChange(t *testing.T) { - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) - e.BeginBlock(1, crypto.RandomHash()) + e := New(logging.NewTestLogger(), NewDefaultConfig()) + e.BeginBlock(1, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(1)) // it's the first configuration so it's starting from this block rather than next require.Equal(t, true, e.SpamPoWIncreasingDifficulty()) - e.EndOfBlock() - e.BeginBlock(2, crypto.RandomHash()) + e.BeginBlock(2, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(1)) require.Equal(t, true, e.SpamPoWIncreasingDifficulty()) e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(0)) require.Equal(t, true, e.SpamPoWIncreasingDifficulty()) - e.EndOfBlock() - e.BeginBlock(3, crypto.RandomHash()) + e.BeginBlock(3, crypto.RandomHash(), []abci.Tx{}) require.Equal(t, false, e.SpamPoWIncreasingDifficulty()) } func TestBlockData(t *testing.T) { - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) + e := New(logging.NewTestLogger(), NewDefaultConfig()) blockHash := crypto.RandomHash() e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(5)) - e.BeginBlock(1, blockHash) + e.BeginBlock(1, blockHash, []abci.Tx{}) height, hash := e.BlockData() require.Equal(t, uint64(1), height) require.Equal(t, blockHash, hash) - e.EndOfBlock() blockHash = crypto.RandomHash() - e.BeginBlock(2, blockHash) + e.BeginBlock(2, blockHash, []abci.Tx{}) height, hash = e.BlockData() require.Equal(t, uint64(2), height) require.Equal(t, blockHash, hash) } func TestFindParamsForBlockHeight(t *testing.T) { - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(100)) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) e.UpdateSpamPoWHashFunction(context.Background(), "sha3") e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1)) e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(1)) - e.BeginBlock(9, crypto.RandomHash()) + e.BeginBlock(9, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(21)) - e.EndOfBlock() - e.BeginBlock(19, crypto.RandomHash()) + e.BeginBlock(19, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(22)) - e.EndOfBlock() - e.BeginBlock(29, crypto.RandomHash()) + e.BeginBlock(29, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(23)) - e.EndOfBlock() require.Equal(t, uint(20), e.activeParams[e.findParamsForBlockHeight(1)].spamPoWDifficulty) require.Equal(t, uint(20), e.activeParams[e.findParamsForBlockHeight(9)].spamPoWDifficulty) @@ -210,88 +176,83 @@ func TestFindParamsForBlockHeight(t *testing.T) { require.Equal(t, uint(23), e.activeParams[e.findParamsForBlockHeight(100)].spamPoWDifficulty) } -func TestVerifyWithMultipleConfigs(t *testing.T) { - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) - e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(100)) - e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) - e.UpdateSpamPoWHashFunction(context.Background(), "sha3_24_rounds") - e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1)) - e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(0)) - e.OnEpochDurationChanged(context.Background(), 24*time.Hour) - - block9Hash := "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4" - e.BeginBlock(9, block9Hash) - e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(21)) - e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(50)) - e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(5)) - e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(1)) - - e.EndOfBlock() - e.BeginBlock(19, crypto.RandomHash()) - e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(22)) - e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(80)) - e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1)) - e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(1)) - - e.EndOfBlock() - block29Hash := "8890702af457ddcda01fba579a126adcecae954781500acb546fef9c8087a239" - e.BeginBlock(29, block29Hash) - e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(1)) - e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(70)) - e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(2)) - e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(0)) - e.EndOfBlock() - - block30Hash := "377EEAC9847D751A4FAFD3F2896E99C1A03363EBDA3036C33940CFE578E196D1" - e.BeginBlock(30, block30Hash) - - // now we're in block 90 - e.BeginBlock(90, "792ca202b84226c739f9923046a0f4e7b5ff9e6f1b5636d8e26a8e2c5dec70ac") - - // transactions sent from block height < 10 have past blocks of 100, difficulty of 20 and allow 1 transaction per block with no increased difficulty - tx9_1 := &testTx{txID: "1", blockHeight: 9, party: "party", powTxID: "DFE522E234D67E6AE3F017859F898E576B3928EA57310B765398615A0D3FDE2F", powNonce: 424517} - err := e.DeliverTx(tx9_1) - require.NoError(t, err) - - // doesn't really matter what the pow data is because in block 19 the parameters allowed only 50 blocks behind meaning in block 90 the transaction should be rejected as too old - tx19 := &testTx{txID: "2", blockHeight: 19, party: "party", powTxID: "5B87F9DFA41DABE84A11CA78D9FE11DA8FC2AA926004CA66454A7AF0A206480D", powNonce: 4095356} - err = e.DeliverTx(tx19) - require.Equal(t, "unknown block height for tx:32, command:Amend Order, party:party", err.Error()) - - // in block 29 we're allowed to submit 1 transactions with difficulty starting at 22 and increased difficulty - tx29_1 := &testTx{txID: "3", blockHeight: 29, party: "party", powTxID: "74030ee7dc931be9d9cc5f2c9d44ac174b4144b377ef07a7bb1781856921dd43", powNonce: 1903233} - tx29_2 := &testTx{txID: "4", blockHeight: 29, party: "party", powTxID: "94A9CB1532011081B013CCD8E6AAA832CAB1CBA603F0C5A093B14C4961E5E7F0", powNonce: 7914217} - err = e.DeliverTx(tx29_1) - require.NoError(t, err) - err = e.DeliverTx(tx29_2) - require.NoError(t, err) - - // finally we have a transaction sent in block 30 which allows for 2 transactions with no increased difficulty - tx30_1 := &testTx{txID: "5", blockHeight: 30, party: "party", powTxID: "2A1319636230740888C968E4E7610D6DE820E644EEC3C08AA5322A0A022014BD", powNonce: 380742} - err = e.DeliverTx(tx30_1) - require.NoError(t, err) - - tx30_2 := &testTx{txID: "6", blockHeight: 30, party: "party", powTxID: "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", powNonce: 1296835} - err = e.DeliverTx(tx30_2) - require.NoError(t, err) - tx30_3 := &testTx{txID: "7", blockHeight: 30, party: "party", powTxID: "5B0E1EB96CCAC120E6D824A5F4C4007EABC59573B861BD84B1EF09DFB376DC84", powNonce: 388948} - err = e.DeliverTx(tx30_3) - // the third transaction would be rejected and ban the party - require.Equal(t, "too many transactions per block", err.Error()) - - // now move on to the next block and the party should be banned - e.BeginBlock(91, crypto.RandomHash()) - tx90 := &testTx{txID: "7", blockHeight: 90, party: "party", powTxID: "3b8399cdffee2686d75d1a96d22cd49cd11f62c93da20e72239895bfdaf4b772", powNonce: 0} - err = e.DeliverTx(tx90) - require.Equal(t, "party is banned from sending transactions", err.Error()) -} +// func TestVerifyWithMultipleConfigs(t *testing.T) { +// e := New(logging.NewTestLogger(), NewDefaultConfig()) +// e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(100)) +// e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) +// e.UpdateSpamPoWHashFunction(context.Background(), "sha3_24_rounds") +// e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1)) +// e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(0)) + +// block9Hash := "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4" +// e.BeginBlock(9, block9Hash) +// e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(21)) +// e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(50)) +// e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(5)) +// e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(1)) + +// e.EndOfBlock() +// e.BeginBlock(19, crypto.RandomHash()) +// e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(22)) +// e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(80)) +// e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1)) +// e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(1)) + +// e.EndOfBlock() +// block29Hash := "8890702af457ddcda01fba579a126adcecae954781500acb546fef9c8087a239" +// e.BeginBlock(29, block29Hash) +// e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(1)) +// e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(70)) +// e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(2)) +// e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(0)) +// e.EndOfBlock() + +// block30Hash := "377EEAC9847D751A4FAFD3F2896E99C1A03363EBDA3036C33940CFE578E196D1" +// e.BeginBlock(30, block30Hash) + +// // now we're in block 90 +// e.BeginBlock(90, "792ca202b84226c739f9923046a0f4e7b5ff9e6f1b5636d8e26a8e2c5dec70ac") + +// // transactions sent from block height < 10 have past blocks of 100, difficulty of 20 and allow 1 transaction per block with no increased difficulty +// tx9_1 := &testTx{txID: "1", blockHeight: 9, party: "party", powTxID: "DFE522E234D67E6AE3F017859F898E576B3928EA57310B765398615A0D3FDE2F", powNonce: 424517} +// err := e.DeliverTx(tx9_1) +// require.NoError(t, err) + +// // doesn't really matter what the pow data is because in block 19 the parameters allowed only 50 blocks behind meaning in block 90 the transaction should be rejected as too old +// tx19 := &testTx{txID: "2", blockHeight: 19, party: "party", powTxID: "5B87F9DFA41DABE84A11CA78D9FE11DA8FC2AA926004CA66454A7AF0A206480D", powNonce: 4095356} +// err = e.DeliverTx(tx19) +// require.Equal(t, "unknown block height for tx:32, command:Amend Order, party:party", err.Error()) + +// // in block 29 we're allowed to submit 1 transactions with difficulty starting at 22 and increased difficulty +// tx29_1 := &testTx{txID: "3", blockHeight: 29, party: "party", powTxID: "74030ee7dc931be9d9cc5f2c9d44ac174b4144b377ef07a7bb1781856921dd43", powNonce: 1903233} +// tx29_2 := &testTx{txID: "4", blockHeight: 29, party: "party", powTxID: "94A9CB1532011081B013CCD8E6AAA832CAB1CBA603F0C5A093B14C4961E5E7F0", powNonce: 7914217} +// err = e.DeliverTx(tx29_1) +// require.NoError(t, err) +// err = e.DeliverTx(tx29_2) +// require.NoError(t, err) + +// // finally we have a transaction sent in block 30 which allows for 2 transactions with no increased difficulty +// tx30_1 := &testTx{txID: "5", blockHeight: 30, party: "party", powTxID: "2A1319636230740888C968E4E7610D6DE820E644EEC3C08AA5322A0A022014BD", powNonce: 380742} +// err = e.DeliverTx(tx30_1) +// require.NoError(t, err) + +// tx30_2 := &testTx{txID: "6", blockHeight: 30, party: "party", powTxID: "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", powNonce: 1296835} +// err = e.DeliverTx(tx30_2) +// require.NoError(t, err) +// tx30_3 := &testTx{txID: "7", blockHeight: 30, party: "party", powTxID: "5B0E1EB96CCAC120E6D824A5F4C4007EABC59573B861BD84B1EF09DFB376DC84", powNonce: 388948} +// err = e.DeliverTx(tx30_3) +// // the third transaction would be rejected and ban the party +// require.Equal(t, "too many transactions per block", err.Error()) + +// // now move on to the next block and the party should be banned +// e.BeginBlock(91, crypto.RandomHash()) +// tx90 := &testTx{txID: "7", blockHeight: 90, party: "party", powTxID: "3b8399cdffee2686d75d1a96d22cd49cd11f62c93da20e72239895bfdaf4b772", powNonce: 0} +// err = e.DeliverTx(tx90) +// require.Equal(t, "party is banned from sending transactions", err.Error()) +// } func TestEndOfBlockCleanup(t *testing.T) { - ts := mocks.NewMockTimeService(gomock.NewController(t)) - ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) + e := New(logging.NewTestLogger(), NewDefaultConfig()) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(100)) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) e.UpdateSpamPoWHashFunction(context.Background(), "sha3_24_rounds") @@ -301,7 +262,7 @@ func TestEndOfBlockCleanup(t *testing.T) { // the setting above is good for transactions from blocks 0 - 9+100 // that means at the end of block 109 it can be removed - e.BeginBlock(9, crypto.RandomHash()) + e.BeginBlock(9, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(21)) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(50)) e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(5)) @@ -310,8 +271,7 @@ func TestEndOfBlockCleanup(t *testing.T) { // the setting above is good for transactions from blocks 10 - 19+50 // that means at the end of block 69 it can be removed - e.EndOfBlock() - e.BeginBlock(19, crypto.RandomHash()) + e.BeginBlock(19, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(22)) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(80)) e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1)) @@ -320,30 +280,25 @@ func TestEndOfBlockCleanup(t *testing.T) { // the setting above is good for transactions from blocks 20 - 29+80 // that means at the end of block 109 it can be removed - e.EndOfBlock() - e.BeginBlock(29, crypto.RandomHash()) + e.BeginBlock(29, crypto.RandomHash(), []abci.Tx{}) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(1)) e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(70)) e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(2)) e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(0)) - e.EndOfBlock() // the setting above is good for transactions from blocks 30 - - e.BeginBlock(30, crypto.RandomHash()) - e.EndOfBlock() + e.BeginBlock(30, crypto.RandomHash(), []abci.Tx{}) require.Equal(t, 4, len(e.activeParams)) require.Equal(t, 4, len(e.activeStates)) - e.BeginBlock(69, crypto.RandomHash()) - e.EndOfBlock() + e.BeginBlock(69, crypto.RandomHash(), []abci.Tx{}) require.Equal(t, 3, len(e.activeParams)) require.Equal(t, 3, len(e.activeStates)) - e.BeginBlock(109, crypto.RandomHash()) - e.EndOfBlock() + e.BeginBlock(109, crypto.RandomHash(), []abci.Tx{}) require.Equal(t, 1, len(e.activeParams)) require.Equal(t, 1, len(e.activeStates)) diff --git a/core/pow/noop_engine.go b/core/pow/noop_engine.go index 43932e6cee..f3383a0fe7 100644 --- a/core/pow/noop_engine.go +++ b/core/pow/noop_engine.go @@ -19,6 +19,7 @@ import ( "code.vegaprotocol.io/vega/core/blockchain/abci" "code.vegaprotocol.io/vega/libs/crypto" protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" + "github.com/ethereum/go-ethereum/common/math" ) @@ -31,27 +32,29 @@ func NewNoop() *NoopEngine { return &NoopEngine{} } -func (e *NoopEngine) BeginBlock(blockHeight uint64, blockHash string) { +func (e *NoopEngine) BeginBlock(blockHeight uint64, blockHash string, txs []abci.Tx) { e.blockHeight = blockHeight e.blockHash = blockHash } +func (e *NoopEngine) OnFinalize() {} func (e *NoopEngine) EndOfBlock() {} func (e *NoopEngine) Commit() {} func (e *NoopEngine) CheckTx(tx abci.Tx) error { return nil } -func (e *NoopEngine) DeliverTx(tx abci.Tx) error { - return nil +func (e *NoopEngine) ProcessProposal([]abci.Tx) bool { return false } +func (e *NoopEngine) CheckBlockTx(tx abci.Tx) (ValidationResult, *uint) { + return ValidationResultSuccess, nil } - -func (e *NoopEngine) IsReady() bool { return true } -func (e *NoopEngine) SpamPoWNumberOfPastBlocks() uint32 { return uint32(0) } -func (e *NoopEngine) SpamPoWDifficulty() uint32 { return uint32(0) } -func (e *NoopEngine) SpamPoWHashFunction() string { return "" } -func (e *NoopEngine) SpamPoWNumberOfTxPerBlock() uint32 { return uint32(0) } -func (e *NoopEngine) SpamPoWIncreasingDifficulty() bool { return false } +func (e *NoopEngine) EndPrepareProposal([]ValidationEntry) {} +func (e *NoopEngine) IsReady() bool { return true } +func (e *NoopEngine) SpamPoWNumberOfPastBlocks() uint32 { return uint32(0) } +func (e *NoopEngine) SpamPoWDifficulty() uint32 { return uint32(0) } +func (e *NoopEngine) SpamPoWHashFunction() string { return "" } +func (e *NoopEngine) SpamPoWNumberOfTxPerBlock() uint32 { return uint32(0) } +func (e *NoopEngine) SpamPoWIncreasingDifficulty() bool { return false } func (e *NoopEngine) BlockData() (uint64, string) { return e.blockHeight, e.blockHash diff --git a/core/pow/snapshot.go b/core/pow/snapshot.go index f1f3a7f9c4..924d38a354 100644 --- a/core/pow/snapshot.go +++ b/core/pow/snapshot.go @@ -18,10 +18,10 @@ package pow import ( "context" "sort" - "time" "code.vegaprotocol.io/vega/core/types" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/protobuf/proto" ) @@ -39,11 +39,6 @@ func (e *Engine) Stopped() bool { // get the serialised form and hash of the given key. func (e *Engine) serialise() ([]byte, error) { - bannedParties := map[string]int64{} - for k, t := range e.bannedParties { - bannedParties[k] = t.UnixNano() - } - nonceHeights := map[uint64][]*snapshot.NonceRef{} for k, v := range e.heightToNonceRef { @@ -60,7 +55,6 @@ func (e *Engine) serialise() ([]byte, error) { HeightToTx: e.heightToTx, HeightToTid: e.heightToTid, HeightToNonceRef: nonceHeights, - BannedParties: bannedParties, ActiveParams: e.paramsToSnapshotParams(), ActiveStates: e.statesToSnapshotStates(), LastPruningBlock: e.lastPruningBlock, @@ -179,10 +173,6 @@ func (e *Engine) LoadState(ctx context.Context, p *types.Payload) ([]types.State return nil, types.ErrInvalidSnapshotNamespace } pl := p.Data.(*types.PayloadProofOfWork) - e.bannedParties = make(map[string]time.Time, len(pl.BannedParties)) - for k, v := range pl.BannedParties { - e.bannedParties[k] = time.Unix(0, v) - } copy(e.blockHash[:], pl.BlockHash[:ringSize]) copy(e.blockHeight[:], pl.BlockHeight[:ringSize]) e.heightToTx = pl.HeightToTx diff --git a/core/pow/snapshot_test.go b/core/pow/snapshot_test.go index 99072978dc..00bbed65f1 100644 --- a/core/pow/snapshot_test.go +++ b/core/pow/snapshot_test.go @@ -21,30 +21,31 @@ import ( "testing" "time" - "code.vegaprotocol.io/vega/core/api/mocks" + "code.vegaprotocol.io/vega/core/blockchain/abci" "code.vegaprotocol.io/vega/core/integration/stubs" + "code.vegaprotocol.io/vega/core/pow/mocks" "code.vegaprotocol.io/vega/core/snapshot" "code.vegaprotocol.io/vega/core/stats" "code.vegaprotocol.io/vega/core/types" + vgcontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/proto" vgtest "code.vegaprotocol.io/vega/libs/test" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/mock/gomock" - "github.com/golang/protobuf/proto" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestConversions(t *testing.T) { p := &types.PayloadProofOfWork{ - BlockHeight: []uint64{100, 101, 102}, - BlockHash: []string{"94A9CB1532011081B013CCD8E6AAA832CAB1CBA603F0C5A093B14C4961E5E7F0", "DC911C0EA95545441F3E1182DD25D973764395A7E75CBDBC086F1C6F7075AED6", "2E4F2967AA904F9A952BB4813EC6BBB3730B9FFFEC44106B89F0A1958547733C"}, - HeightToTx: map[uint64][]string{100: {"1", "2"}, 101: {"3"}}, - HeightToTid: map[uint64][]string{100: {"100", "200"}, 101: {"300"}}, - BannedParties: map[string]int64{"party1": 105, "party2": 104}, + BlockHeight: []uint64{100, 101, 102}, + BlockHash: []string{"94A9CB1532011081B013CCD8E6AAA832CAB1CBA603F0C5A093B14C4961E5E7F0", "DC911C0EA95545441F3E1182DD25D973764395A7E75CBDBC086F1C6F7075AED6", "2E4F2967AA904F9A952BB4813EC6BBB3730B9FFFEC44106B89F0A1958547733C"}, + HeightToTx: map[uint64][]string{100: {"1", "2"}, 101: {"3"}}, + HeightToTid: map[uint64][]string{100: {"100", "200"}, 101: {"300"}}, } pp := p.IntoProto() @@ -70,10 +71,6 @@ func TestConversions(t *testing.T) { require.Equal(t, "100", pp.ProofOfWork.TidAtHeight[0].Transactions[0]) require.Equal(t, "200", pp.ProofOfWork.TidAtHeight[0].Transactions[1]) require.Equal(t, "300", pp.ProofOfWork.TidAtHeight[1].Transactions[0]) - require.Equal(t, "party1", pp.ProofOfWork.Banned[0].Party) - require.Equal(t, int64(105), pp.ProofOfWork.Banned[0].Until) - require.Equal(t, "party2", pp.ProofOfWork.Banned[1].Party) - require.Equal(t, int64(104), pp.ProofOfWork.Banned[1].Until) ppp := types.PayloadProofOfWorkFromProto(pp) @@ -97,24 +94,22 @@ func TestConversions(t *testing.T) { require.Equal(t, 1, len(ppp.HeightToTid[101])) require.Equal(t, "3", ppp.HeightToTx[101][0]) require.Equal(t, "300", ppp.HeightToTid[101][0]) - require.Equal(t, int64(105), ppp.BannedParties["party1"]) - require.Equal(t, int64(104), ppp.BannedParties["party2"]) } func TestSnapshot(t *testing.T) { ts := mocks.NewMockTimeService(gomock.NewController(t)) ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - e := New(logging.NewTestLogger(), NewDefaultConfig(), ts) - e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(1)) + e := New(logging.NewTestLogger(), NewDefaultConfig()) + e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(100)) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) e.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1)) e.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(1)) - e.BeginBlock(100, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4") + e.BeginBlock(100, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", []abci.Tx{}) - // add a new set of configuration which becomes active at block 101 - e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(5)) + // add a new set of configuration which becomes active at block 100 + e.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(200)) e.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(25)) e.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) e.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(2)) @@ -122,18 +117,20 @@ func TestSnapshot(t *testing.T) { party := crypto.RandomHash() - require.NoError(t, e.DeliverTx(&testTx{txID: "1", party: party, blockHeight: 100, powTxID: "DFE522E234D67E6AE3F017859F898E576B3928EA57310B765398615A0D3FDE2F", powNonce: 424517})) - require.NoError(t, e.DeliverTx(&testTx{txID: "2", party: party, blockHeight: 100, powTxID: "5B0E1EB96CCAC120E6D824A5F4C4007EABC59573B861BD84B1EF09DFB376DC84", powNonce: 4031737})) - require.NoError(t, e.DeliverTx(&testTx{txID: "3", party: party, blockHeight: 100, powTxID: "94A9CB1532011081B013CCD8E6AAA832CAB1CBA603F0C5A093B14C4961E5E7F0", powNonce: 431336})) + txs := []abci.Tx{ + &testTx{txID: "1", party: party, blockHeight: 100, powTxID: "DFE522E234D67E6AE3F017859F898E576B3928EA57310B765398615A0D3FDE2F", powNonce: 424517}, + &testTx{txID: "2", party: party, blockHeight: 100, powTxID: "5B0E1EB96CCAC120E6D824A5F4C4007EABC59573B861BD84B1EF09DFB376DC84", powNonce: 4031737}, + &testTx{txID: "3", party: party, blockHeight: 100, powTxID: "94A9CB1532011081B013CCD8E6AAA832CAB1CBA603F0C5A093B14C4961E5E7F0", powNonce: 431336}, + } - e.BeginBlock(101, "2E289FB9CEF7234E2C08F34CCD66B330229067CE47E22F76EF0595B3ABA9968F") - e.BeginBlock(102, "2E289FB9CEF7234E2C08F34CCD66B330229067CE47E22F76EF0595B3ABA9968F") + e.BeginBlock(101, "2E289FB9CEF7234E2C08F34CCD66B330229067CE47E22F76EF0595B3ABA9968F", txs) + e.BeginBlock(102, "2E289FB9CEF7234E2C08F34CCD66B330229067CE47E22F76EF0595B3ABA9968F", []abci.Tx{}) key := (&types.PayloadProofOfWork{}).Key() state1, _, err := e.GetState(key) require.NoError(t, err) - eLoaded := New(logging.NewTestLogger(), NewDefaultConfig(), mocks.NewMockTimeService(gomock.NewController(t))) + eLoaded := New(logging.NewTestLogger(), NewDefaultConfig()) eLoaded.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(1)) eLoaded.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20)) eLoaded.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3) @@ -154,7 +151,7 @@ func TestSnapshotViaEngine(t *testing.T) { ctx := vgtest.VegaContext("chainid", 100) ts := mocks.NewMockTimeService(gomock.NewController(t)) ts.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - powEngine1 := New(logging.NewTestLogger(), NewDefaultConfig(), ts) + powEngine1 := New(logging.NewTestLogger(), NewDefaultConfig()) now := time.Now() log := logging.NewTestLogger() timeService := stubs.NewTimeStub() @@ -170,27 +167,27 @@ func TestSnapshotViaEngine(t *testing.T) { snapshotEngine1.AddProviders(powEngine1) require.NoError(t, snapshotEngine1.Start(ctx)) - require.NoError(t, powEngine1.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(2))) require.NoError(t, powEngine1.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(20))) require.NoError(t, powEngine1.UpdateSpamPoWHashFunction(context.Background(), crypto.Sha3)) require.NoError(t, powEngine1.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(1))) require.NoError(t, powEngine1.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(1))) - powEngine1.BeginBlock(99, "377EEAC9847D751A4FAFD3F2896E99C1A03363EBDA3036C33940CFE578E196D1") - powEngine1.BeginBlock(100, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4") + powEngine1.BeginBlock(99, "377EEAC9847D751A4FAFD3F2896E99C1A03363EBDA3036C33940CFE578E196D1", []abci.Tx{}) + powEngine1.BeginBlock(100, "2E7A16D9EF690F0D2BEED115FBA13BA2AAA16C8F971910AD88C72B9DB010C7D4", []abci.Tx{}) party := crypto.RandomHash() - require.NoError(t, powEngine1.DeliverTx(&testTx{txID: "1", party: party, blockHeight: 100, powTxID: "DFE522E234D67E6AE3F017859F898E576B3928EA57310B765398615A0D3FDE2F", powNonce: 424517})) - require.NoError(t, powEngine1.DeliverTx(&testTx{txID: "2", party: party, blockHeight: 100, powTxID: "5B0E1EB96CCAC120E6D824A5F4C4007EABC59573B861BD84B1EF09DFB376DC84", powNonce: 4031737})) - require.NoError(t, powEngine1.DeliverTx(&testTx{txID: "3", party: party, blockHeight: 100, powTxID: "94A9CB1532011081B013CCD8E6AAA832CAB1CBA603F0C5A093B14C4961E5E7F0", powNonce: 431336})) - - // add another transaction from the same party with reduced difficulty but from another block - require.NoError(t, powEngine1.DeliverTx(&testTx{txID: "4", party: party, blockHeight: 99, powTxID: "4633a4d29f543cdd9afe7555c352179063d1ead0c778d246fabfc4c6f8adf031", powNonce: 2646611})) + txs := []abci.Tx{ + &testTx{txID: "1", party: party, blockHeight: 100, powTxID: "DFE522E234D67E6AE3F017859F898E576B3928EA57310B765398615A0D3FDE2F", powNonce: 424517}, + &testTx{txID: "2", party: party, blockHeight: 100, powTxID: "5B0E1EB96CCAC120E6D824A5F4C4007EABC59573B861BD84B1EF09DFB376DC84", powNonce: 4031737}, + &testTx{txID: "3", party: party, blockHeight: 100, powTxID: "94A9CB1532011081B013CCD8E6AAA832CAB1CBA603F0C5A093B14C4961E5E7F0", powNonce: 431336}, + // add another transaction from the same party with reduced difficulty but from another block + &testTx{txID: "4", party: party, blockHeight: 99, powTxID: "4633a4d29f543cdd9afe7555c352179063d1ead0c778d246fabfc4c6f8adf031", powNonce: 2646611}, + } - powEngine1.BeginBlock(101, "2E289FB9CEF7234E2C08F34CCD66B330229067CE47E22F76EF0595B3ABA9968F") - powEngine1.BeginBlock(102, "2E289FB9CEF7234E2C08F34CCD66B330229067CE47E22F76EF0595B3ABA9968F") + powEngine1.BeginBlock(101, "2E289FB9CEF7234E2C08F34CCD66B330229067CE47E22F76EF0595B3ABA9968F", txs) + powEngine1.BeginBlock(102, "2E289FB9CEF7234E2C08F34CCD66B330229067CE47E22F76EF0595B3ABA9968F", []abci.Tx{}) require.NoError(t, powEngine1.UpdateSpamPoWNumberOfPastBlocks(context.Background(), num.NewUint(2))) require.NoError(t, powEngine1.UpdateSpamPoWDifficulty(context.Background(), num.NewUint(25))) @@ -198,14 +195,15 @@ func TestSnapshotViaEngine(t *testing.T) { require.NoError(t, powEngine1.UpdateSpamPoWNumberOfTxPerBlock(context.Background(), num.NewUint(5))) require.NoError(t, powEngine1.UpdateSpamPoWIncreasingDifficulty(context.Background(), num.NewUint(0))) + ctx = vgcontext.WithTraceID(vgcontext.WithBlockHeight(context.Background(), 102), "0xDEADBEEF") + ctx = vgcontext.WithChainID(ctx, "chainid") hash1, err := snapshotEngine1.SnapshotNow(ctx) require.NoError(t, err) - state1 := map[string][]byte{} for _, key := range powEngine1.Keys() { state, additionalProvider, err := powEngine1.GetState(key) require.NoError(t, err) - assert.Empty(t, additionalProvider) + require.Empty(t, additionalProvider) state1[key] = state } @@ -213,7 +211,7 @@ func TestSnapshotViaEngine(t *testing.T) { tsLoaded := mocks.NewMockTimeService(gomock.NewController(t)) tsLoaded.EXPECT().GetTimeNow().AnyTimes().Return(time.Now()) - powEngine2 := New(logging.NewTestLogger(), NewDefaultConfig(), tsLoaded) + powEngine2 := New(logging.NewTestLogger(), NewDefaultConfig()) timeServiceLoaded := stubs.NewTimeStub() timeServiceLoaded.SetTime(now) snapshotEngine2, err := snapshot.NewEngine(vegaPath, config, log, timeServiceLoaded, statsData.Blockchain) @@ -233,11 +231,11 @@ func TestSnapshotViaEngine(t *testing.T) { for _, key := range powEngine2.Keys() { state, additionalProvider, err := powEngine2.GetState(key) require.NoError(t, err) - assert.Empty(t, additionalProvider) + require.Empty(t, additionalProvider) state2[key] = state } for key := range state1 { - assert.Equalf(t, state1[key], state2[key], "Key %q does not have the same data", key) + require.Equalf(t, state1[key], state2[key], "Key %q does not have the same data", key) } } diff --git a/core/processor/abci.go b/core/processor/abci.go index d68dc9fbdd..acc794172c 100644 --- a/core/processor/abci.go +++ b/core/processor/abci.go @@ -25,17 +25,12 @@ import ( "os" "path/filepath" "reflect" + "sort" "strconv" "strings" "sync/atomic" "time" - "go.uber.org/zap" - - "code.vegaprotocol.io/vega/core/referral" - "code.vegaprotocol.io/vega/core/snapshot" - protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" - "code.vegaprotocol.io/vega/commands" "code.vegaprotocol.io/vega/core/api" "code.vegaprotocol.io/vega/core/blockchain" @@ -44,7 +39,10 @@ import ( "code.vegaprotocol.io/vega/core/genesis" "code.vegaprotocol.io/vega/core/idgeneration" "code.vegaprotocol.io/vega/core/netparams" + "code.vegaprotocol.io/vega/core/pow" "code.vegaprotocol.io/vega/core/processor/ratelimit" + "code.vegaprotocol.io/vega/core/snapshot" + "code.vegaprotocol.io/vega/core/teams" "code.vegaprotocol.io/vega/core/txn" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/core/types/statevar" @@ -52,21 +50,34 @@ import ( vgcontext "code.vegaprotocol.io/vega/libs/context" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" signatures "code.vegaprotocol.io/vega/libs/crypto/signature" + verrors "code.vegaprotocol.io/vega/libs/errors" vgfs "code.vegaprotocol.io/vega/libs/fs" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + proto "code.vegaprotocol.io/vega/protos/vega" + protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - tmtypes "github.com/tendermint/tendermint/abci/types" - tmtypes1 "github.com/tendermint/tendermint/proto/tendermint/types" - tmtypesint "github.com/tendermint/tendermint/types" + tmtypes "github.com/cometbft/cometbft/abci/types" + tmtypes1 "github.com/cometbft/cometbft/proto/tendermint/types" + types1 "github.com/cometbft/cometbft/proto/tendermint/types" + tmtypesint "github.com/cometbft/cometbft/types" + "go.uber.org/zap" ) const AppVersion = 1 +type TxWrapper struct { + tx abci.Tx + timeIndex int // this is an indicator of insertion order + raw []byte + priority uint64 + gasWanted uint64 +} + var ( ErrUnexpectedTxPubKey = errors.New("no one listens to the public keys that signed this oracle data") ErrTradingDisabled = errors.New("trading disabled") @@ -87,19 +98,22 @@ type Checkpoint interface { } type SpamEngine interface { - EndOfBlock(blockHeight uint64, now time.Time) - PreBlockAccept(tx abci.Tx) (bool, error) - PostBlockAccept(tx abci.Tx) (bool, error) + BeginBlock(txs []abci.Tx) + EndPrepareProposal() + PreBlockAccept(tx abci.Tx) error + ProcessProposal(txs []abci.Tx) bool + CheckBlockTx(tx abci.Tx) error } type PoWEngine interface { api.ProofOfWorkParams - BeginBlock(blockHeight uint64, blockHash string) - EndOfBlock() + BeginBlock(blockHeight uint64, blockHash string, txs []abci.Tx) + CheckBlockTx(tx abci.Tx) (pow.ValidationResult, *uint) + ProcessProposal(txs []abci.Tx) bool + EndPrepareProposal([]pow.ValidationEntry) CheckTx(tx abci.Tx) error - DeliverTx(tx abci.Tx) error - Commit() GetSpamStatistics(partyID string) *protoapi.PoWStatistic + OnCommit() } //nolint:interfacebloat @@ -128,7 +142,12 @@ type TeamsEngine interface { TeamExists(team types.TeamID) bool CreateTeam(context.Context, types.PartyID, types.TeamID, *commandspb.CreateReferralSet_Team) error UpdateTeam(context.Context, types.PartyID, types.TeamID, *commandspb.UpdateReferralSet_Team) error - JoinTeam(context.Context, types.PartyID, *commandspb.ApplyReferralCode) error + JoinTeam(context.Context, types.PartyID, *commandspb.JoinTeam) error +} + +type PartiesEngine interface { + UpdateProfile(context.Context, types.PartyID, *commandspb.UpdatePartyProfile) error + CheckSufficientBalanceToUpdateProfile(party types.PartyID, balance *num.Uint) error } type ReferralProgram interface { @@ -137,6 +156,7 @@ type ReferralProgram interface { CreateReferralSet(context.Context, types.PartyID, types.ReferralSetID) error ApplyReferralCode(context.Context, types.PartyID, types.ReferralSetID) error CheckSufficientBalanceForApplyReferralCode(types.PartyID, *num.Uint) error + CheckSufficientBalanceForCreateOrUpdateReferralSet(types.PartyID, *num.Uint) error } type VolumeDiscountProgram interface { @@ -145,6 +165,7 @@ type VolumeDiscountProgram interface { type BlockchainClient interface { Validators(height *int64) ([]*tmtypesint.Validator, error) + MaxMempoolSize() int64 } type ProtocolUpgradeService interface { @@ -214,6 +235,7 @@ type App struct { snapshotEngine SnapshotEngine stateVar StateVarEngine teamsEngine TeamsEngine + partiesEngine PartiesEngine referralProgram ReferralProgram volumeDiscountProgram VolumeDiscountProgram protocolUpgradeService ProtocolUpgradeService @@ -225,7 +247,8 @@ type App struct { nilPow bool nilSpam bool - maxBatchSize atomic.Uint64 + maxBatchSize atomic.Uint64 + defaultChainID uint64 } func NewApp( @@ -269,6 +292,7 @@ func NewApp( gastimator *Gastimator, ethCallEngine EthCallEngine, balanceChecker BalanceChecker, + partiesEngine PartiesEngine, ) *App { log = log.Named(namedLogger) log.SetLevel(config.Level.Get()) @@ -319,18 +343,20 @@ func NewApp( gastimator: gastimator, ethCallEngine: ethCallEngine, balanceChecker: balanceChecker, + partiesEngine: partiesEngine, } // setup handlers + app.abci.OnPrepareProposal = app.prepareProposal + app.abci.OnProcessProposal = app.processProposal app.abci.OnInitChain = app.OnInitChain app.abci.OnBeginBlock = app.OnBeginBlock app.abci.OnEndBlock = app.OnEndBlock app.abci.OnCommit = app.OnCommit app.abci.OnCheckTx = app.OnCheckTx app.abci.OnCheckTxSpam = app.OnCheckTxSpam - app.abci.OnDeliverTx = app.OnDeliverTx - app.abci.OnDeliverTxSpam = app.OnDeliverTXSpam app.abci.OnInfo = app.Info + app.abci.OnFinalize = app.Finalize // snapshot specific handlers. app.abci.OnListSnapshots = app.ListSnapshots app.abci.OnOfferSnapshot = app.OfferSnapshot @@ -349,8 +375,11 @@ func NewApp( HandleCheckTx(txn.ProtocolUpgradeCommand, app.CheckProtocolUpgradeProposal). HandleCheckTx(txn.BatchMarketInstructions, app.CheckBatchMarketInstructions). HandleCheckTx(txn.ProposeCommand, app.CheckPropose). + HandleCheckTx(txn.BatchProposeCommand, addDeterministicID(app.CheckBatchPropose)). HandleCheckTx(txn.TransferFundsCommand, app.CheckTransferCommand). - HandleCheckTx(txn.ApplyReferralCodeCommand, app.CheckApplyReferralCode) + HandleCheckTx(txn.ApplyReferralCodeCommand, app.CheckApplyReferralCode). + HandleCheckTx(txn.CreateReferralSetCommand, app.CheckCreateOrUpdateReferralSet). + HandleCheckTx(txn.UpdateReferralSetCommand, app.CheckCreateOrUpdateReferralSet) app.abci. // node commands @@ -426,6 +455,13 @@ func NewApp( ), ), ). + HandleDeliverTx(txn.BatchProposeCommand, + app.SendTransactionResult( + app.CheckBatchProposeW( + addDeterministicID(app.DeliverBatchPropose), + ), + ), + ). HandleDeliverTx(txn.VoteCommand, app.SendTransactionResult(app.DeliverVote), ). @@ -466,6 +502,15 @@ func NewApp( ). HandleDeliverTx(txn.ApplyReferralCodeCommand, app.SendTransactionResult(app.ApplyReferralCode), + ). + HandleDeliverTx(txn.UpdateMarginModeCommand, + app.SendTransactionResult(app.UpdateMarginMode), + ). + HandleDeliverTx(txn.JoinTeamCommand, + app.SendTransactionResult(app.JoinTeam), + ). + HandleDeliverTx(txn.UpdatePartyProfileCommand, + app.SendTransactionResult(app.UpdatePartyProfile), ) app.time.NotifyOnTick(app.onTick) @@ -481,15 +526,20 @@ func (app *App) OnSpamProtectionMaxBatchSizeUpdate(_ context.Context, u *num.Uin return nil } -// addDeterministicID will build the command ID +// generateDeterministicID will build the command ID // the command ID is built using the signature of the proposer of the command // the signature is then hashed with sha3_256 // the hash is the hex string encoded. +func generateDeterministicID(tx abci.Tx) string { + return hex.EncodeToString(vgcrypto.Hash(tx.Signature())) +} + +// addDeterministicID decorates give function with deterministic ID. func addDeterministicID( f func(context.Context, abci.Tx, string) error, ) func(context.Context, abci.Tx) error { return func(ctx context.Context, tx abci.Tx) error { - return f(ctx, tx, hex.EncodeToString(vgcrypto.Hash(tx.Signature()))) + return f(ctx, tx, generateDeterministicID(tx)) } } @@ -504,6 +554,17 @@ func (app *App) CheckProposeW( } } +func (app *App) CheckBatchProposeW( + f func(context.Context, abci.Tx) error, +) func(context.Context, abci.Tx) error { + return func(ctx context.Context, tx abci.Tx) error { + if err := addDeterministicID(app.CheckBatchPropose)(ctx, tx); err != nil { + return err + } + return f(ctx, tx) + } +} + func (app *App) CheckBatchMarketInstructionsW( f func(context.Context, abci.Tx) error, ) func(context.Context, abci.Tx) error { @@ -566,6 +627,17 @@ func (app *App) ensureConfig() { if app.cfg.KeepCheckpointsMax < 1 { app.cfg.KeepCheckpointsMax = 1 } + v := &proto.EthereumConfig{} + if err := app.netp.GetJSONStruct(netparams.BlockchainsEthereumConfig, v); err != nil { + return + } + cID, err := strconv.ParseUint(v.ChainId, 10, 64) + if err != nil { + return + } + app.defaultChainID = cID + app.gov.OnChainIDUpdate(cID) + app.exec.OnChainIDUpdate(cID) } // ReloadConf updates the internal configuration. @@ -593,20 +665,20 @@ func (app *App) cancel() { } } -func (app *App) Info(_ tmtypes.RequestInfo) tmtypes.ResponseInfo { +func (app *App) Info(_ context.Context, _ *tmtypes.RequestInfo) (*tmtypes.ResponseInfo, error) { if len(app.lastBlockAppHash) != 0 { // we must've lost connection to tendermint for a bit, tell it where we got up to height, _ := vgcontext.BlockHeightFromContext(app.blockCtx) app.log.Info("ABCI service INFO requested after reconnect", - logging.Int64("height", height), + logging.Uint64("height", height), logging.String("hash", hex.EncodeToString(app.lastBlockAppHash)), ) - return tmtypes.ResponseInfo{ + return &tmtypes.ResponseInfo{ AppVersion: AppVersion, Version: app.version, - LastBlockHeight: height, + LastBlockHeight: int64(height), LastBlockAppHash: app.lastBlockAppHash, - } + }, nil } // returns whether or not we have loaded from a snapshot (and may even do the loading) @@ -640,39 +712,36 @@ func (app *App) Info(_ tmtypes.RequestInfo) tmtypes.ResponseInfo { logging.Int64("height", resp.LastBlockHeight), logging.String("hash", hex.EncodeToString(resp.LastBlockAppHash)), ) - return resp + return &resp, nil } -func (app *App) ListSnapshots(_ tmtypes.RequestListSnapshots) tmtypes.ResponseListSnapshots { +func (app *App) ListSnapshots(_ context.Context, _ *tmtypes.RequestListSnapshots) (*tmtypes.ResponseListSnapshots, error) { app.log.Debug("ABCI service ListSnapshots requested") - latestSnapshots, err := app.snapshotEngine.ListLatestSnapshots() if err != nil { app.log.Error("Could not list latest snapshots", logging.Error(err)) - return tmtypes.ResponseListSnapshots{} + return &tmtypes.ResponseListSnapshots{}, err } - - return tmtypes.ResponseListSnapshots{ + return &tmtypes.ResponseListSnapshots{ Snapshots: latestSnapshots, - } + }, nil } -func (app *App) OfferSnapshot(req tmtypes.RequestOfferSnapshot) tmtypes.ResponseOfferSnapshot { +func (app *App) OfferSnapshot(_ context.Context, req *tmtypes.RequestOfferSnapshot) (*tmtypes.ResponseOfferSnapshot, error) { app.log.Debug("ABCI service OfferSnapshot start") - if app.snapshotEngine.HasRestoredStateAlready() { app.log.Warn("The snapshot engine aborted the snapshot offer from state-sync since the state has already been restored") - return tmtypes.ResponseOfferSnapshot{ + return &tmtypes.ResponseOfferSnapshot{ Result: tmtypes.ResponseOfferSnapshot_ABORT, - } + }, nil } deserializedSnapshot, err := types.SnapshotFromTM(req.Snapshot) if err != nil { app.log.Error("Could not deserialize snapshot", logging.Error(err)) - return tmtypes.ResponseOfferSnapshot{ + return &tmtypes.ResponseOfferSnapshot{ Result: tmtypes.ResponseOfferSnapshot_REJECT_SENDER, - } + }, err } // check that our unpacked snapshot's hash matches that which tendermint thinks it sent @@ -680,58 +749,56 @@ func (app *App) OfferSnapshot(req tmtypes.RequestOfferSnapshot) tmtypes.Response app.log.Error("The hashes from the request and the deserialized snapshot mismatch", logging.String("deserialized-hash", hex.EncodeToString(deserializedSnapshot.Hash)), logging.String("request-hash", hex.EncodeToString(req.AppHash))) - return tmtypes.ResponseOfferSnapshot{ + return &tmtypes.ResponseOfferSnapshot{ Result: tmtypes.ResponseOfferSnapshot_REJECT, - } + }, fmt.Errorf("hash mismatch") } - return app.snapshotEngine.ReceiveSnapshot(deserializedSnapshot) + res := app.snapshotEngine.ReceiveSnapshot(deserializedSnapshot) + return &res, nil } -func (app *App) ApplySnapshotChunk(ctx context.Context, req tmtypes.RequestApplySnapshotChunk) tmtypes.ResponseApplySnapshotChunk { +func (app *App) ApplySnapshotChunk(ctx context.Context, req *tmtypes.RequestApplySnapshotChunk) (*tmtypes.ResponseApplySnapshotChunk, error) { app.log.Debug("ABCI service ApplySnapshotChunk start") if app.snapshotEngine.HasRestoredStateAlready() { app.log.Warn("The snapshot engine aborted the snapshot chunk from state-sync since the state has already been restored") - return tmtypes.ResponseApplySnapshotChunk{ + return &tmtypes.ResponseApplySnapshotChunk{ Result: tmtypes.ResponseApplySnapshotChunk_ABORT, - } + }, nil // ??? } - chunk := &types.RawChunk{ Nr: req.Index, Data: req.Chunk, } - return app.snapshotEngine.ReceiveSnapshotChunk(ctx, chunk, req.Sender) + res := app.snapshotEngine.ReceiveSnapshotChunk(ctx, chunk, req.Sender) + return &res, nil } -func (app *App) LoadSnapshotChunk(req tmtypes.RequestLoadSnapshotChunk) tmtypes.ResponseLoadSnapshotChunk { +func (app *App) LoadSnapshotChunk(_ context.Context, req *tmtypes.RequestLoadSnapshotChunk) (*tmtypes.ResponseLoadSnapshotChunk, error) { app.log.Debug("ABCI service LoadSnapshotChunk start") - - rawChunk, err := app.snapshotEngine.RetrieveSnapshotChunk(req.Height, req.Format, req.Chunk) + raw, err := app.snapshotEngine.RetrieveSnapshotChunk(req.Height, req.Format, req.Chunk) if err != nil { - app.log.Error("Could not load a snapshot chunk from snapshot engine", - logging.Uint64("height", req.Height), - logging.Error(err), - ) - return tmtypes.ResponseLoadSnapshotChunk{} - } - - return tmtypes.ResponseLoadSnapshotChunk{ - Chunk: rawChunk.Data, + app.log.Error("failed to load snapshot chunk", logging.Error(err), logging.Uint64("height", req.Height)) + return &tmtypes.ResponseLoadSnapshotChunk{}, err } + return &tmtypes.ResponseLoadSnapshotChunk{ + Chunk: raw.Data, + }, nil } -func (app *App) OnInitChain(req tmtypes.RequestInitChain) tmtypes.ResponseInitChain { +func (app *App) OnInitChain(req *tmtypes.RequestInitChain) (*tmtypes.ResponseInitChain, error) { app.log.Debug("ABCI service InitChain start") hash := hex.EncodeToString(vgcrypto.Hash([]byte(req.ChainId))) app.abci.SetChainID(req.ChainId) app.chainCtx = vgcontext.WithChainID(context.Background(), req.ChainId) - ctx := vgcontext.WithBlockHeight(app.chainCtx, req.InitialHeight) + ctx := vgcontext.WithBlockHeight(app.chainCtx, uint64(req.InitialHeight)) ctx = vgcontext.WithTraceID(ctx, hash) app.blockCtx = ctx + app.log.Debug("OnInitChain-NewBeginBlock", logging.Uint64("height", uint64(req.InitialHeight)), logging.Time("blockTime", req.Time), logging.String("blockHash", hash)) + app.broker.Send( events.NewBeginBlock(ctx, eventspb.BeginBlock{ Height: uint64(req.InitialHeight), @@ -753,12 +820,131 @@ func (app *App) OnInitChain(req tmtypes.RequestInitChain) tmtypes.ResponseInitCh app.ethCallEngine.Start() - return tmtypes.ResponseInitChain{ + return &tmtypes.ResponseInitChain{ Validators: app.top.GetValidatorPowerUpdates(), + }, nil +} + +// prepareProposal takes an ordered slice of transactions and decides which of them go into the next block. +// The logic for selection is as follows: +// 1. mempool transactions are sorted by priority then insertion order (aka time) +// 2. we add *valid* transaction to the block so long as gas and maxBytes limits are not violated +// 3. we never add transactions failing pow checks +// 4. we never add transactions failing spam checks +// therefore a block generated with this method will never contain any transactions that would violate spam/pow constraints that would have previously +// caused the party to get blocked. +func (app *App) prepareProposal(txs []abci.Tx, rawTxs [][]byte) [][]byte { + var totalBytes int64 + + // internally we use this as max bytes, externally to consensus params we return max ints. This is done so that cometbft always returns to us the full mempool + // and we can first sort it by priority and then reap by size. + maxBytes := tmtypesint.DefaultBlockParams().MaxBytes * 4 + app.log.Debug("prepareProposal called with", logging.Int("txs", len(rawTxs)), logging.Int64("max-bytes", maxBytes)) + + // wrap the transaction with information about gas wanted and priority + wrappedTxs := make([]*TxWrapper, 0, len(txs)) + for i, v := range txs { + wtx, error := app.wrapTx(v, rawTxs[i], i) + if error != nil { + continue + } + wrappedTxs = append(wrappedTxs, wtx) + } + + // sort by priority descending. If priority is equal use the order in the mempol ascending + sort.Slice(wrappedTxs, func(i, j int) bool { + if wrappedTxs[i].priority == wrappedTxs[j].priority { + return wrappedTxs[i].timeIndex < wrappedTxs[j].timeIndex + } + return wrappedTxs[i].priority > wrappedTxs[j].priority + }) + + // add transactions to the block as long as we can without breaking size and gas limits in order of priority + validationResults := []pow.ValidationEntry{} + maxGas := app.getMaxGas() + totalGasWanted := uint64(0) + blockTxs := [][]byte{} + + for _, tx := range wrappedTxs { + totalBytes += int64(len(tx.raw)) + if totalBytes > maxBytes { + break + } + totalGasWanted += tx.gasWanted + if totalGasWanted > maxGas { + break + } + + if !app.nilPow { + vr, d := app.pow.CheckBlockTx(tx.tx) + validationResults = append(validationResults, pow.ValidationEntry{Tx: tx.tx, Difficulty: d, ValResult: vr}) + if vr != pow.ValidationResultSuccess && vr != pow.ValidationResultValidatorCommand { + app.log.Debug("pow failure", logging.Int64("validation-result", int64(vr))) + continue + } + } + + if !app.nilSpam { + err := app.spam.CheckBlockTx(tx.tx) + if err != nil { + app.log.Debug("spam error", logging.Error(err)) + continue + } + } + + if err := app.canSubmitTx(tx.tx); err != nil { + continue + } + app.log.Debug("adding tx to blockProposal", logging.String("tx-hash", hex.EncodeToString(tx.tx.Hash())), logging.String("tid", tx.tx.GetPoWTID())) + blockTxs = append(blockTxs, tx.raw) + } + app.log.Debug("prepareProposal returned with", logging.Int("blockTxs", len(blockTxs))) + if !app.nilPow { + app.pow.EndPrepareProposal(validationResults) + } + if !app.nilSpam { + app.spam.EndPrepareProposal() + } + return blockTxs +} + +// processProposal takes a block proposal and verifies that it has no malformed or offending transactions which should never be if the validator is using the prepareProposal +// to generate a block. +// The verifications include: +// 1. no violations of pow and spam +// 2. max gas limit is not exceeded +// 3. (soft) max bytes is not exceeded. +func (app *App) processProposal(txs []abci.Tx) bool { + totalGasWanted := 0 + maxGas := app.gastimator.GetMaxGas() + maxBytes := tmtypesint.DefaultBlockParams().MaxBytes * 4 + size := int64(0) + for _, tx := range txs { + size += int64(tx.GetLength()) + if size > maxBytes { + return false + } + gw, err := app.getGasWanted(tx) + if err != nil { + return false + } + totalGasWanted += int(gw) + if totalGasWanted > int(maxGas) { + return false + } + } + + if !app.nilPow && !app.pow.ProcessProposal(txs) { + return false + } + + if !app.nilSpam && !app.spam.ProcessProposal(txs) { + return false } + return true } -func (app *App) OnEndBlock(req tmtypes.RequestEndBlock) (ctx context.Context, resp tmtypes.ResponseEndBlock) { +func (app *App) OnEndBlock(blockHeight uint64) (tmtypes.ValidatorUpdates, types1.ConsensusParams) { app.log.Debug("entering end block", logging.Time("at", time.Now())) defer func() { app.log.Debug("leaving end block", logging.Time("at", time.Now())) }() @@ -770,91 +956,79 @@ func (app *App) OnEndBlock(req tmtypes.RequestEndBlock) (ctx context.Context, re ) app.epoch.OnBlockEnd(app.blockCtx) - if !app.nilPow { - app.pow.EndOfBlock() - } - - if !app.nilSpam { - app.spam.EndOfBlock(uint64(req.Height), app.time.GetTimeNow()) - } - app.stateVar.OnBlockEnd(app.blockCtx) powerUpdates := app.top.GetValidatorPowerUpdates() - resp = tmtypes.ResponseEndBlock{} - if len(powerUpdates) > 0 { - resp.ValidatorUpdates = powerUpdates + if len(powerUpdates) == 0 { + powerUpdates = tmtypes.ValidatorUpdates{} } // update max gas based on the network parameter - resp.ConsensusParamUpdates = &tmtypes.ConsensusParams{ - Block: &tmtypes.BlockParams{ + consensusParamUpdates := types1.ConsensusParams{ + Block: &types1.BlockParams{ MaxGas: int64(app.gastimator.OnBlockEnd()), - MaxBytes: tmtypesint.DefaultBlockParams().MaxBytes, + MaxBytes: -1, // we tell comet that we always want to get the full mempool }, Version: &tmtypes1.VersionParams{ - AppVersion: AppVersion, + App: AppVersion, }, } app.exec.BlockEnd(app.blockCtx) - return ctx, resp + return powerUpdates, consensusParamUpdates } // OnBeginBlock updates the internal lastBlockTime value with each new block. -func (app *App) OnBeginBlock( - req tmtypes.RequestBeginBlock, -) (ctx context.Context, resp tmtypes.ResponseBeginBlock) { - app.log.Debug("entering begin block", logging.Time("at", time.Now()), logging.Uint64("height", uint64(req.Header.Height))) +func (app *App) OnBeginBlock(blockHeight uint64, blockHash string, blockTime time.Time, proposer string, txs []abci.Tx) context.Context { + app.log.Debug("entering begin block", logging.Time("at", time.Now()), logging.Uint64("height", blockHeight), logging.Time("time", blockTime), logging.String("blockHash", blockHash)) defer func() { app.log.Debug("leaving begin block", logging.Time("at", time.Now())) }() - hash := hex.EncodeToString(req.Hash) - ctx = vgcontext.WithBlockHeight(vgcontext.WithTraceID(app.chainCtx, hash), req.Header.Height) - + ctx := vgcontext.WithBlockHeight(vgcontext.WithTraceID(app.chainCtx, blockHash), blockHeight) if app.protocolUpgradeService.CoreReadyForUpgrade() { app.startProtocolUpgrade(ctx) } - app.broker.Send( - events.NewBeginBlock(ctx, eventspb.BeginBlock{ - Height: uint64(req.Header.Height), - Timestamp: req.Header.Time.UnixNano(), - Hash: hash, - }), - ) + app.broker.Send(events.NewBeginBlock(ctx, eventspb.BeginBlock{ + Height: blockHeight, + Timestamp: blockTime.UnixNano(), + Hash: blockHash, + })) + app.cBlock = blockHash - app.cBlock = hash + for _, tx := range txs { + app.setTxStats(tx.GetLength()) + } // update pow engine on a new block if !app.nilPow { - app.pow.BeginBlock(uint64(req.Header.Height), hash) + app.pow.BeginBlock(blockHeight, blockHash, txs) } - app.stats.SetHash(hash) - app.stats.SetHeight(uint64(req.Header.Height)) - app.blockCtx = ctx - - now := req.Header.Time + if !app.nilSpam { + app.spam.BeginBlock(txs) + } + app.stats.SetHash(blockHash) + app.stats.SetHeight(blockHeight) + app.blockCtx = ctx + now := blockTime app.time.SetTimeNow(ctx, now) app.rates.NextBlock() app.currentTimestamp = app.time.GetTimeNow() app.previousTimestamp = app.time.GetTimeLastBatch() - app.log.Debug("ABCI service BEGIN completed", logging.Int64("current-timestamp", app.currentTimestamp.UnixNano()), logging.Int64("previous-timestamp", app.previousTimestamp.UnixNano()), logging.String("current-datetime", vegatime.Format(app.currentTimestamp)), logging.String("previous-datetime", vegatime.Format(app.previousTimestamp)), - logging.Int64("height", req.Header.GetHeight()), + logging.Uint64("height", blockHeight), ) - app.protocolUpgradeService.BeginBlock(ctx, uint64(req.Header.Height)) - app.top.BeginBlock(ctx, req) + app.protocolUpgradeService.BeginBlock(ctx, blockHeight) + app.top.BeginBlock(ctx, blockHeight, proposer) app.balanceChecker.BeginBlock(ctx) app.exec.BeginBlock(ctx) - - return ctx, resp + return ctx } func (app *App) startProtocolUpgrade(ctx context.Context) { @@ -910,14 +1084,8 @@ func (app *App) startProtocolUpgrade(ctx context.Context) { } } -func (app *App) OnCommit() (resp tmtypes.ResponseCommit) { - app.log.Debug("entering commit", logging.Time("at", time.Now())) - defer func() { app.log.Debug("leaving commit", logging.Time("at", time.Now())) }() - - if !app.nilPow { - app.pow.Commit() - } - +// Finalize calculates the app hash for the block ending. +func (app *App) Finalize() []byte { // call checkpoint _first_ so the snapshot contains the correct checkpoint state. cpt, _ := app.checkpoint.Checkpoint(app.blockCtx, app.currentTimestamp) @@ -945,21 +1113,21 @@ func (app *App) OnCommit() (resp tmtypes.ResponseCommit) { if len(snapHash) > 0 { app.log.Info("State has been snapshotted", logging.Float64("duration", t1.Sub(t0).Seconds())) } - resp.Data = snapHash + appHash := snapHash if len(snapHash) == 0 { - resp.Data = vgcrypto.Hash([]byte(app.version)) - resp.Data = append(resp.Data, app.exec.Hash()...) - resp.Data = append(resp.Data, app.delegation.Hash()...) - resp.Data = append(resp.Data, app.gov.Hash()...) - resp.Data = append(resp.Data, app.stakingAccounts.Hash()...) + appHash = vgcrypto.Hash([]byte(app.version)) + appHash = append(appHash, app.exec.Hash()...) + appHash = append(appHash, app.delegation.Hash()...) + appHash = append(appHash, app.gov.Hash()...) + appHash = append(appHash, app.stakingAccounts.Hash()...) } if cpt != nil { if len(snapHash) == 0 { // only append to commit hash if we aren't using the snapshot hash // otherwise restoring a checkpoint would restore an incomplete/wrong hash - resp.Data = append(resp.Data, cpt.Hash...) + appHash = append(appHash, cpt.Hash...) app.log.Debug("checkpoint hash", logging.String("response-data", hex.EncodeToString(cpt.Hash))) } _ = app.handleCheckpoint(cpt) @@ -971,25 +1139,32 @@ func (app *App) OnCommit() (resp tmtypes.ResponseCommit) { // so we just re-hash to have an output which is actually an // hash and is consistent over all calls to Commit if len(snapHash) <= 0 { - resp.Data = vgcrypto.Hash(resp.Data) + appHash = vgcrypto.Hash(appHash) } else { app.broker.Send(events.NewSnapshotEventEvent(app.blockCtx, app.stats.Height(), app.cBlock, app.protocolUpgradeService.TimeForUpgrade())) } // Update response and save the apphash incase we lose connection with tendermint and need to verify our // current state - app.lastBlockAppHash = resp.Data - app.log.Debug("apphash calculated", logging.String("response-data", hex.EncodeToString(resp.Data))) + app.log.Debug("apphash calculated", logging.String("response-data", hex.EncodeToString(appHash))) + return appHash +} + +func (app *App) OnCommit() (*tmtypes.ResponseCommit, error) { + app.log.Debug("entering commit", logging.Time("at", time.Now()), logging.Uint64("height", app.stats.Height())) + defer func() { app.log.Debug("leaving commit", logging.Time("at", time.Now())) }() app.updateStats() app.setBatchStats() - + if !app.nilPow { + app.pow.OnCommit() + } app.broker.Send( events.NewEndBlock(app.blockCtx, eventspb.EndBlock{ Height: app.stats.Height(), }), ) - return resp + return &tmtypes.ResponseCommit{}, nil } func (app *App) handleCheckpoint(cpt *types.CheckpointState) error { @@ -1087,7 +1262,7 @@ func (app *App) OnCheckTxSpam(tx abci.Tx) tmtypes.ResponseCheckTx { } // additional spam checks if !app.nilSpam { - if _, err := app.spam.PreBlockAccept(tx); err != nil { + if err := app.spam.PreBlockAccept(tx); err != nil { app.log.Error(err.Error()) resp.Code = blockchain.AbciSpamError resp.Data = []byte(err.Error()) @@ -1098,7 +1273,7 @@ func (app *App) OnCheckTxSpam(tx abci.Tx) tmtypes.ResponseCheckTx { } // OnCheckTx performs soft validations. -func (app *App) OnCheckTx(ctx context.Context, _ tmtypes.RequestCheckTx, tx abci.Tx) (context.Context, tmtypes.ResponseCheckTx) { +func (app *App) OnCheckTx(ctx context.Context, _ *tmtypes.RequestCheckTx, tx abci.Tx) (context.Context, *tmtypes.ResponseCheckTx) { resp := tmtypes.ResponseCheckTx{} if app.log.IsDebug() { @@ -1108,7 +1283,7 @@ func (app *App) OnCheckTx(ctx context.Context, _ tmtypes.RequestCheckTx, tx abci if err := app.canSubmitTx(tx); err != nil { resp.Code = blockchain.AbciTxnValidationFailure resp.Data = []byte(err.Error()) - return ctx, resp + return ctx, &resp } // Check ratelimits @@ -1120,20 +1295,19 @@ func (app *App) OnCheckTx(ctx context.Context, _ tmtypes.RequestCheckTx, tx abci app.log.Error("error getting gas estimate", logging.Error(err)) resp.Code = blockchain.AbciTxnValidationFailure resp.Data = []byte(err.Error()) - return ctx, resp + return ctx, &resp } resp.GasWanted = int64(gasWanted) - resp.Priority = int64(app.gastimator.GetPriority(tx)) if app.log.IsDebug() { - app.log.Debug("transaction passed checkTx", logging.String("tid", tx.GetPoWTID()), logging.String("command", tx.Command().String()), logging.Int64("priority", resp.Priority), logging.Int64("gas-wanted", resp.GasWanted), logging.Int64("max-gas", int64(app.gastimator.GetMaxGas()))) + app.log.Debug("transaction passed checkTx", logging.String("tid", tx.GetPoWTID()), logging.String("command", tx.Command().String())) } if isval { - return ctx, resp + return ctx, &resp } - return ctx, resp + return ctx, &resp } // limitPubkey returns whether a request should be rate limited or not. @@ -1185,9 +1359,9 @@ func (app *App) canSubmitTx(tx abci.Tx) (err error) { if p.Terms.GetNewMarket().Changes.ProductType() == types.ProductTypePerps && !app.limits.CanProposePerpsMarket() { return ErrPerpsMarketProposalDisabled } - return validateUseOfEthOracles(p.Terms, app.netp) + return validateUseOfEthOracles(p.Terms.Change, app.netp) case types.ProposalTermsTypeUpdateMarket: - return validateUseOfEthOracles(p.Terms, app.netp) + return validateUseOfEthOracles(p.Terms.Change, app.netp) case types.ProposalTermsTypeNewAsset: if !app.limits.CanProposeAsset() { @@ -1198,19 +1372,57 @@ func (app *App) canSubmitTx(tx abci.Tx) (err error) { return ErrSpotMarketProposalDisabled } } + case txn.BatchProposeCommand: + ps := &commandspb.BatchProposalSubmission{} + if err := tx.Unmarshal(ps); err != nil { + return fmt.Errorf("could not unmarshal batch proposal submission: %w", err) + } + + idgen := idgeneration.New(generateDeterministicID(tx)) + ids := make([]string, 0, len(ps.Terms.Changes)) + + for i := 0; i < len(ps.Terms.Changes); i++ { + ids = append(ids, idgen.NextID()) + } + + p, err := types.NewBatchProposalSubmissionFromProto(ps, ids) + if err != nil { + return fmt.Errorf("invalid batch proposal submission: %w", err) + } + if p.Terms == nil || len(p.Terms.Changes) == 0 { + return errors.New("invalid batch proposal submission") + } + + for _, batchChange := range p.Terms.Changes { + switch c := batchChange.Change.(type) { + case *types.ProposalTermsNewMarket: + if !app.limits.CanProposeMarket() { + return ErrMarketProposalDisabled + } + + if c.NewMarket.Changes.ProductType() == types.ProductTypePerps && !app.limits.CanProposePerpsMarket() { + return ErrPerpsMarketProposalDisabled + } + return validateUseOfEthOracles(c, app.netp) + case *types.ProposalTermsUpdateMarket: + return validateUseOfEthOracles(c, app.netp) + + case *types.ProposalTermsNewSpotMarket: + if !app.limits.CanProposeSpotMarket() { + return ErrSpotMarketProposalDisabled + } + } + } } return nil } -func validateUseOfEthOracles(terms *types.ProposalTerms, netp NetworkParameters) error { +func validateUseOfEthOracles(change types.ProposalTerm, netp NetworkParameters) error { ethOracleEnabled, _ := netp.GetInt(netparams.EthereumOraclesEnabled) - switch terms.Change.GetTermType() { - case types.ProposalTermsTypeNewMarket: - m := terms.GetNewMarket() - if m == nil { - return nil - } + switch c := change.(type) { + case *types.ProposalTermsNewMarket: + m := c.NewMarket if m.Changes == nil { return nil @@ -1237,11 +1449,8 @@ func validateUseOfEthOracles(terms *types.ProposalTerms, netp NetworkParameters) } } - case types.ProposalTermsTypeUpdateMarket: - m := terms.GetUpdateMarket() - if m == nil { - return nil - } + case *types.ProposalTermsUpdateMarket: + m := c.UpdateMarket if m.Changes == nil { return nil @@ -1272,48 +1481,6 @@ func validateUseOfEthOracles(terms *types.ProposalTerms, netp NetworkParameters) return nil } -// OnDeliverTXSpam checks spam and replay. -func (app *App) OnDeliverTXSpam(ctx context.Context, tx abci.Tx) tmtypes.ResponseDeliverTx { - var resp tmtypes.ResponseDeliverTx - ctxWithHash := vgcontext.WithTxHash(ctx, hex.EncodeToString(tx.Hash())) - - // verify proof of work - if !app.nilPow { - if err := app.pow.DeliverTx(tx); err != nil { - app.log.Error(err.Error()) - resp.Code = blockchain.AbciSpamError - resp.Data = []byte(err.Error()) - app.broker.Send(events.NewTxErrEvent(ctxWithHash, err, tx.Party(), tx.GetCmd(), tx.Command().String())) - return resp - } - } - if !app.nilSpam { - if _, err := app.spam.PostBlockAccept(tx); err != nil { - app.log.Error(err.Error()) - resp.Code = blockchain.AbciSpamError - resp.Data = []byte(err.Error()) - evt := events.NewTxErrEvent(ctxWithHash, err, tx.Party(), tx.GetCmd(), tx.Command().String()) - app.broker.Send(evt) - return resp - } - } - return resp -} - -// OnDeliverTx increments the internal tx counter and decorates the context with tracing information. -func (app *App) OnDeliverTx(ctx context.Context, req tmtypes.RequestDeliverTx, tx abci.Tx) (context.Context, tmtypes.ResponseDeliverTx) { - app.setTxStats(len(req.Tx)) - var resp tmtypes.ResponseDeliverTx - if err := app.canSubmitTx(tx); err != nil { - resp.Code = blockchain.AbciTxnValidationFailure - resp.Data = []byte(err.Error()) - } - - // we don't need to set trace ID on context, it's been handled with OnBeginBlock - - return ctx, resp -} - func (app *App) CheckProtocolUpgradeProposal(ctx context.Context, tx abci.Tx) error { if err := app.RequireValidatorPubKey(ctx, tx); err != nil { return err @@ -1339,7 +1506,7 @@ func (app *App) CheckBatchMarketInstructions(_ context.Context, tx abci.Tx) erro } maxBatchSize := app.maxBatchSize.Load() - size := uint64(len(bmi.Cancellations) + len(bmi.Amendments) + len(bmi.Submissions) + len(bmi.StopOrdersSubmission) + len(bmi.StopOrdersCancellation)) + size := uint64(len(bmi.UpdateMarginMode) + len(bmi.Cancellations) + len(bmi.Amendments) + len(bmi.Submissions) + len(bmi.StopOrdersSubmission) + len(bmi.StopOrdersCancellation)) if size > maxBatchSize { return ErrMarketBatchInstructionTooBig(size, maxBatchSize) } @@ -1409,6 +1576,13 @@ func (app *App) CheckApplyReferralCode(_ context.Context, tx abci.Tx) error { return nil } +func (app *App) CheckCreateOrUpdateReferralSet(_ context.Context, tx abci.Tx) error { + if err := app.referralProgram.CheckSufficientBalanceForCreateOrUpdateReferralSet(types.PartyID(tx.Party()), app.balanceChecker.GetPartyBalance(tx.Party())); err != nil { + return err + } + return nil +} + func (app *App) CheckTransferCommand(_ context.Context, tx abci.Tx) error { tfr := &commandspb.Transfer{} if err := tx.Unmarshal(tfr); err != nil { @@ -1648,6 +1822,41 @@ func (app *App) CheckPropose(_ context.Context, tx abci.Tx) error { } } +func (app *App) CheckBatchPropose(_ context.Context, tx abci.Tx, deterministicBatchID string) error { + p := &commandspb.BatchProposalSubmission{} + if err := tx.Unmarshal(p); err != nil { + return err + } + + idgen := idgeneration.New(deterministicBatchID) + ids := make([]string, 0, len(p.Terms.Changes)) + + for i := 0; i < len(p.Terms.Changes); i++ { + ids = append(ids, idgen.NextID()) + } + + propSubmission, err := types.NewBatchProposalSubmissionFromProto(p, ids) + if err != nil { + return err + } + + errs := verrors.NewCumulatedErrors() + for _, change := range propSubmission.Terms.Changes { + switch term := change.Change.(type) { + case *types.ProposalTermsUpdateNetworkParameter: + if err := app.netp.IsUpdateAllowed(term.UpdateNetworkParameter.Changes.Key); err != nil { + errs.Add(errs) + } + } + } + + if errs.HasAny() { + return errs + } + + return nil +} + func (app *App) DeliverPropose(ctx context.Context, tx abci.Tx, deterministicID string) error { prop := &commandspb.ProposalSubmission{} if err := tx.Unmarshal(prop); err != nil { @@ -1718,6 +1927,102 @@ func (app *App) DeliverPropose(ctx context.Context, tx abci.Tx, deterministicID return nil } +func (app *App) DeliverBatchPropose(ctx context.Context, tx abci.Tx, deterministicBatchID string) (err error) { + prop := &commandspb.BatchProposalSubmission{} + if err := tx.Unmarshal(prop); err != nil { + return err + } + + party := tx.Party() + + if app.log.GetLevel() <= logging.DebugLevel { + app.log.Debug("submitting batch proposal", + logging.ProposalID(deterministicBatchID), + logging.String("proposal-reference", prop.Reference), + logging.String("proposal-party", party), + logging.String("proposal-terms", prop.Terms.String())) + } + + idgen := idgeneration.New(deterministicBatchID) + + // Burn one so the first proposal doesn't have the same ID as the batch ID + idgen.NextID() + ids := make([]string, 0, len(prop.Terms.Changes)) + + for i := 0; i < len(prop.Terms.Changes); i++ { + ids = append(ids, idgen.NextID()) + } + + propSubmission, err := types.NewBatchProposalSubmissionFromProto(prop, ids) + if err != nil { + return err + } + toSubmits, err := app.gov.SubmitBatchProposal(ctx, *propSubmission, deterministicBatchID, party) + if err != nil { + app.log.Debug("could not submit batch proposal", + logging.ProposalID(deterministicBatchID), + logging.Error(err)) + return err + } + + var submittedMarketIDs []string + defer func() { + if err == nil { + return + } + + // an error happened when submitting the market + // we should cancel this proposal now + if err := app.gov.RejectBatchProposal(ctx, deterministicBatchID, + types.ProposalErrorCouldNotInstantiateMarket, err); err != nil { + // this should never happen + app.log.Panic("tried to reject a nonexistent batch proposal", + logging.String("proposal-id", deterministicBatchID), + logging.Error(err)) + } + + for _, marketID := range submittedMarketIDs { + if err := app.exec.RejectMarket(ctx, marketID); err != nil { + // this should never happen + app.log.Panic("unable to submit reject submitted market", + logging.ProposalID(marketID), + logging.Error(err)) + } + } + }() + + for _, toSubmit := range toSubmits { + if toSubmit.IsNewMarket() { + // opening auction start + oos := time.Unix(toSubmit.Proposal().Terms.ClosingTimestamp, 0).Round(time.Second) + nm := toSubmit.NewMarket() + + // @TODO pass in parent and insurance pool share if required + if err = app.exec.SubmitMarket(ctx, nm.Market(), party, oos); err != nil { + app.log.Debug("unable to submit new market with liquidity submission", + logging.ProposalID(nm.Market().ID), + logging.Error(err)) + return err + } + + submittedMarketIDs = append(submittedMarketIDs, nm.Market().ID) + } else if toSubmit.IsNewSpotMarket() { + oos := time.Unix(toSubmit.Proposal().Terms.ClosingTimestamp, 0).Round(time.Second) + nm := toSubmit.NewSpotMarket() + if err = app.exec.SubmitSpotMarket(ctx, nm.Market(), party, oos); err != nil { + app.log.Debug("unable to submit new spot market", + logging.ProposalID(nm.Market().ID), + logging.Error(err)) + return err + } + + submittedMarketIDs = append(submittedMarketIDs, nm.Market().ID) + } + } + + return nil +} + func (app *App) DeliverVote(ctx context.Context, tx abci.Tx) error { vote := &commandspb.VoteSubmission{} @@ -1845,7 +2150,6 @@ func (app *App) DeliverChainEvent(ctx context.Context, tx abci.Tx, id string) er if err := tx.Unmarshal(ce); err != nil { return err } - return app.processChainEvent(ctx, ce, tx.PubKeyHex(), id) } @@ -2177,7 +2481,7 @@ func (app *App) DeliverKeyRotateSubmission(ctx context.Context, tx abci.Tx) erro return app.top.AddKeyRotate( ctx, tx.PubKeyHex(), - uint64(currentBlockHeight), + currentBlockHeight, kr, ) } @@ -2236,6 +2540,34 @@ func (app *App) DeliverEthereumKeyRotateSubmission(ctx context.Context, tx abci. ) } +func (app *App) wrapTx(tx abci.Tx, rawTx []byte, insertionOrder int) (*TxWrapper, error) { + priority := app.getPriority(tx) + gasWanted, err := app.getGasWanted(tx) + if err != nil { + return nil, err + } + + return &TxWrapper{ + tx: tx, + timeIndex: insertionOrder, + raw: rawTx, + priority: priority, + gasWanted: gasWanted, + }, nil +} + +func (app *App) getPriority(tx abci.Tx) uint64 { + return app.gastimator.GetPriority(tx) +} + +func (app *App) getGasWanted(tx abci.Tx) (uint64, error) { + return app.gastimator.CalcGasWantedForTx(tx) +} + +func (app *App) getMaxGas() uint64 { + return app.gastimator.maxGas +} + func (app *App) CreateReferralSet(ctx context.Context, tx abci.Tx, deterministicID string) error { params := &commandspb.CreateReferralSet{} if err := tx.Unmarshal(params); err != nil { @@ -2253,6 +2585,22 @@ func (app *App) CreateReferralSet(ctx context.Context, tx abci.Tx, deterministic return nil } +func (app *App) UpdateMarginMode(ctx context.Context, tx abci.Tx) error { + var err error + params := &commandspb.UpdateMarginMode{} + if err = tx.Unmarshal(params); err != nil { + return fmt.Errorf("could not deserialize UpdateMarginMode command: %w", err) + } + marginFactor := num.DecimalZero() + if params.MarginFactor != nil && len(*params.MarginFactor) > 0 { + marginFactor, err = num.DecimalFromString(*params.MarginFactor) + if err != nil { + return err + } + } + return app.exec.UpdateMarginMode(ctx, tx.Party(), params.MarketId, types.MarginMode(params.Mode), marginFactor) +} + // UpdateReferralSet this is effectively Update team, but also served to create // a team for an existing referral set... func (app *App) UpdateReferralSet(ctx context.Context, tx abci.Tx) error { @@ -2290,19 +2638,71 @@ func (app *App) ApplyReferralCode(ctx context.Context, tx abci.Tx) error { partyID := types.PartyID(tx.Party()) err := app.referralProgram.ApplyReferralCode(ctx, partyID, types.ReferralSetID(params.Id)) - - // It's OK to switch team if the party was already a referee. - if err != nil && err.Error() != referral.ErrIsAlreadyAReferee(partyID).Error() { + if err != nil { return fmt.Errorf("could not apply the referral code: %w", err) } - // temporarily disable team support - // teamID := types.TeamID(params.Id) - // err = app.teamsEngine.JoinTeam(ctx, partyID, params) - // // This is ok as well, as not all referral sets are teams as well. - // if err != nil && err.Error() != teams.ErrNoTeamMatchesID(teamID).Error() { - // return fmt.Errorf("couldn't join team: %w", err) - // } + teamID := types.TeamID(params.Id) + joinTeam := &commandspb.JoinTeam{ + Id: params.Id, + } + err = app.teamsEngine.JoinTeam(ctx, partyID, joinTeam) + // This is ok as well, as not all referral sets are teams as well. + if err != nil && err.Error() != teams.ErrNoTeamMatchesID(teamID).Error() { + return fmt.Errorf("couldn't join team: %w", err) + } + + return nil +} + +func (app *App) JoinTeam(ctx context.Context, tx abci.Tx) error { + params := &commandspb.JoinTeam{} + if err := tx.Unmarshal(params); err != nil { + return fmt.Errorf("could not deserialize JoinTeam command: %w", err) + } + + partyID := types.PartyID(tx.Party()) + err := app.teamsEngine.JoinTeam(ctx, partyID, params) + if err != nil { + return fmt.Errorf("couldn't join team: %w", err) + } + + return nil +} + +func (app *App) UpdatePartyProfile(ctx context.Context, tx abci.Tx) error { + params := &commandspb.UpdatePartyProfile{} + if err := tx.Unmarshal(params); err != nil { + return fmt.Errorf("could not deserialize UpdatePartyProfile command: %w", err) + } + + err := app.partiesEngine.CheckSufficientBalanceToUpdateProfile( + types.PartyID(tx.Party()), + app.balanceChecker.GetPartyBalance(tx.Party()), + ) + if err != nil { + return err + } + + partyID := types.PartyID(tx.Party()) + err = app.partiesEngine.UpdateProfile(ctx, partyID, params) + if err != nil { + return fmt.Errorf("couldn't update profile: %w", err) + } return nil } + +func (app *App) OnBlockchainEthereumConfigUpdate(ctx context.Context, conf any) error { + cfg, err := types.EthereumConfigFromUntypedProto(conf) + if err != nil { + return err + } + cID, err := strconv.ParseUint(cfg.ChainID(), 10, 64) + if err != nil { + return err + } + app.defaultChainID = cID + app.exec.OnChainIDUpdate(cID) + return app.gov.OnChainIDUpdate(cID) +} diff --git a/core/processor/batch_market_instructions_processor.go b/core/processor/batch_market_instructions_processor.go index ef26c366ca..d352748c08 100644 --- a/core/processor/batch_market_instructions_processor.go +++ b/core/processor/batch_market_instructions_processor.go @@ -23,8 +23,10 @@ import ( "code.vegaprotocol.io/vega/commands" "code.vegaprotocol.io/vega/core/idgeneration" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" + "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" ) @@ -50,12 +52,17 @@ func (v Validate) CheckStopOrdersSubmission(order *commandspb.StopOrdersSubmissi return commands.CheckStopOrdersSubmission(order) } +func (v Validate) CheckUpdateMarginMode(order *commandspb.UpdateMarginMode) error { + return commands.CheckUpdateMarginMode(order) +} + type Validator interface { CheckOrderCancellation(cancel *commandspb.OrderCancellation) error CheckOrderAmendment(amend *commandspb.OrderAmendment) error CheckOrderSubmission(order *commandspb.OrderSubmission) error CheckStopOrdersCancellation(cancel *commandspb.StopOrdersCancellation) error CheckStopOrdersSubmission(order *commandspb.StopOrdersSubmission) error + CheckUpdateMarginMode(update *commandspb.UpdateMarginMode) error } type BMIProcessor struct { @@ -124,20 +131,30 @@ func (p *BMIProcessor) ProcessBatch( // these need to be determinitistic idgen := idgeneration.New(determinitisticID) - // we will need an ID for every stop orders - // not all StopsOrderSubmission have 2 StopOrder - stopOrderSize := 0 - for _, v := range batch.StopOrdersSubmission { - if v.FallsBelow != nil { - stopOrderSize++ + failedMarkets := map[string]error{} + for _, umm := range batch.UpdateMarginMode { + err := p.validator.CheckUpdateMarginMode(umm) + if err == nil { + var marginFactor num.Decimal + if umm.MarginFactor == nil || len(*umm.MarginFactor) == 0 { + marginFactor = num.DecimalZero() + } else { + marginFactor = num.MustDecimalFromString(*umm.MarginFactor) + } + err = p.exec.UpdateMarginMode(ctx, party, umm.MarketId, vega.MarginMode(umm.Mode), marginFactor) } - if v.RisesAbove != nil { - stopOrderSize++ + if err != nil { + errs.AddForProperty("updateMarginMode", err) + errCnt++ + failedMarkets[umm.MarketId] = fmt.Errorf("Update margin mode transaction failed for market %s. Ignoring all transactions for the market", umm.MarketId) } } - submissionsIDs := make([]string, 0, len(batch.Submissions)+stopOrderSize) - for i := 0; i < len(batch.Submissions)+stopOrderSize; i++ { + // each order will need a new ID, and each stop order can contain up to two orders (rises above, falls below) + // but a stop order could also be invalid and have neither, so we pre-generate the maximum ids we might need + nIDs := len(batch.Submissions) + (2 * len(batch.StopOrdersSubmission)) + submissionsIDs := make([]string, 0, nIDs) + for i := 0; i < nIDs; i++ { submissionsIDs = append(submissionsIDs, idgen.NextID()) } @@ -145,6 +162,12 @@ func (p *BMIProcessor) ProcessBatch( for i, cancel := range batch.Cancellations { err := p.validator.CheckOrderCancellation(cancel) if err == nil { + if err, ok := failedMarkets[cancel.MarketId]; ok { + errs.AddForProperty(fmt.Sprintf("%d", i), err) + errCnt++ + idx++ + continue + } stats.IncTotalCancelOrder() _, err = p.exec.CancelOrder( ctx, types.OrderCancellationFromProto(cancel), party, idgen) @@ -170,6 +193,12 @@ func (p *BMIProcessor) ProcessBatch( } else { err = p.validator.CheckOrderAmendment(protoAmend) if err == nil { + if err, ok := failedMarkets[protoAmend.MarketId]; ok { + errs.AddForProperty(fmt.Sprintf("%d", idx), err) + errCnt++ + idx++ + continue + } stats.IncTotalAmendOrder() var amend *types.OrderAmendment amend, err = types.NewOrderAmendmentFromProto(protoAmend) @@ -196,6 +225,12 @@ func (p *BMIProcessor) ProcessBatch( err := p.validator.CheckOrderSubmission(protoSubmit) if err == nil { var submit *types.OrderSubmission + if err, ok := failedMarkets[protoSubmit.MarketId]; ok { + errs.AddForProperty(fmt.Sprintf("%d", idx), err) + errCnt++ + idx++ + continue + } stats.IncTotalCreateOrder() if submit, err = types.NewOrderSubmissionFromProto(protoSubmit); err == nil { var conf *types.OrderConfirmation @@ -221,6 +256,12 @@ func (p *BMIProcessor) ProcessBatch( for i, cancel := range batch.StopOrdersCancellation { err := p.validator.CheckStopOrdersCancellation(cancel) if err == nil { + if err, ok := failedMarkets[*cancel.MarketId]; ok { + errs.AddForProperty(fmt.Sprintf("%d", i), err) + errCnt++ + idx++ + continue + } stats.IncTotalCancelOrder() err = p.exec.CancelStopOrders( ctx, types.NewStopOrderCancellationFromProto(cancel), party, idgen) @@ -237,6 +278,22 @@ func (p *BMIProcessor) ProcessBatch( err := p.validator.CheckStopOrdersSubmission(protoSubmit) if err == nil { var submit *types.StopOrdersSubmission + if protoSubmit.RisesAbove != nil && protoSubmit.RisesAbove.OrderSubmission != nil { + if err, ok := failedMarkets[protoSubmit.RisesAbove.OrderSubmission.MarketId]; ok { + errs.AddForProperty(fmt.Sprintf("%d", i), err) + errCnt++ + idx++ + continue + } + } + if protoSubmit.FallsBelow != nil && protoSubmit.FallsBelow.OrderSubmission != nil { + if err, ok := failedMarkets[protoSubmit.FallsBelow.OrderSubmission.MarketId]; ok { + errs.AddForProperty(fmt.Sprintf("%d", i), err) + errCnt++ + idx++ + continue + } + } stats.IncTotalCreateOrder() if submit, err = types.NewStopOrderSubmissionFromProto(protoSubmit); err == nil { var id1, id2 *string @@ -269,7 +326,7 @@ func (p *BMIProcessor) ProcessBatch( idx++ } - errs.isPartial = errCnt != len(batch.Submissions)+len(batch.Amendments)+len(batch.Cancellations)+len(batch.StopOrdersCancellation)+len(batch.StopOrdersSubmission) + errs.isPartial = errCnt != len(batch.UpdateMarginMode)+len(batch.Submissions)+len(batch.Amendments)+len(batch.Cancellations)+len(batch.StopOrdersCancellation)+len(batch.StopOrdersSubmission) return errs.ErrorOrNil() } diff --git a/core/processor/batch_market_instructions_processor_test.go b/core/processor/batch_market_instructions_processor_test.go index 6cb21359d5..a526cc1b56 100644 --- a/core/processor/batch_market_instructions_processor_test.go +++ b/core/processor/batch_market_instructions_processor_test.go @@ -29,8 +29,10 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestBatchMarketInstructionsErrors(t *testing.T) { @@ -230,6 +232,163 @@ func TestBatchMarketInstructionsContinueProcessingOnError(t *testing.T) { assert.True(t, perr.IsPartial()) } +func TestBatchMarketInstructionsContinueFailsAllOrdersForMarketOnSwitchFailure(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + exec := mocks.NewMockExecutionEngine(ctrl) + proc := processor.NewBMIProcessor(logging.NewTestLogger(), exec, processor.Validate{}) + stats := stats.New(logging.NewTestLogger(), stats.NewDefaultConfig()) + + batch := commandspb.BatchMarketInstructions{ + UpdateMarginMode: []*commandspb.UpdateMarginMode{ + { + MarketId: "926df3b689a5440fe21cad7069ebcedc46f75b2b23ce11002a1ee2254e339f23", + Mode: commandspb.UpdateMarginMode_MODE_ISOLATED_MARGIN, + }, + }, + Cancellations: []*commandspb.OrderCancellation{ + { + OrderId: "926df3b689a5440fe21cad7069ebcedc46f75b2b23ce11002a1ee2254e339f23", + MarketId: "926df3b689a5440fe21cad7069ebcedc46f75b2b23ce11002a1ee2254e339f23", + }, + { + OrderId: "47076f002ddd9bfeb7f4679fc75b4686f64446d5a5afcb84584e7c7166d13efa", + MarketId: "47076f002ddd9bfeb7f4679fc75b4686f64446d5a5afcb84584e7c7166d13efa", + }, + }, + Amendments: []*commandspb.OrderAmendment{ + { + MarketId: "47076f002ddd9bfeb7f4679fc75b4686f64446d5a5afcb84584e7c7166d13efa", + OrderId: "47076f002ddd9bfeb7f4679fc75b4686f64446d5a5afcb84584e7c7166d13efa", + TimeInForce: vega.Order_TIME_IN_FORCE_GTC, + }, + { + MarketId: "47076f002ddd9bfeb7f4679fc75b4686f64446d5a5afcb84584e7c7166d13efa", + OrderId: "f31f922db56ee0ffee7695e358c5f6c253857b8e0656ddead6dc40474502bc22", + TimeInForce: vega.Order_TIME_IN_FORCE_GTC, + }, + { + MarketId: "926df3b689a5440fe21cad7069ebcedc46f75b2b23ce11002a1ee2254e339f23", + OrderId: "87d4717b42796bda59870f53d6bcb1f57acd53e4236a941077aae8a860fd1bad", + TimeInForce: vega.Order_TIME_IN_FORCE_GTC, + }, + }, + Submissions: []*commandspb.OrderSubmission{ + { + MarketId: "926df3b689a5440fe21cad7069ebcedc46f75b2b23ce11002a1ee2254e339f23", + Side: vega.Side_SIDE_BUY, + Size: 10, + TimeInForce: vega.Order_TIME_IN_FORCE_FOK, + Type: vega.Order_TYPE_MARKET, + }, + { + MarketId: "47076f002ddd9bfeb7f4679fc75b4686f64446d5a5afcb84584e7c7166d13efa", + Side: vega.Side_SIDE_BUY, + Size: 10, + TimeInForce: vega.Order_TIME_IN_FORCE_FOK, + Type: vega.Order_TYPE_MARKET, + }, + { + MarketId: "47076f002ddd9bfeb7f4679fc75b4686f64446d5a5afcb84584e7c7166d13efa", + Side: vega.Side_SIDE_BUY, + Size: 10, + TimeInForce: vega.Order_TIME_IN_FORCE_FOK, + Type: vega.Order_TYPE_MARKET, + }, + }, + } + + cancelCnt := 0 + exec.EXPECT().CancelOrder(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(1).DoAndReturn( + func(ctx context.Context, order *types.OrderCancellation, party string, idgen common.IDGenerator) ([]*types.OrderCancellationConfirmation, error) { + cancelCnt++ + + if order.OrderID == "47076f002ddd9bfeb7f4679fc75b4686f64446d5a5afcb84584e7c7166d13efa" { + return nil, errors.New("cannot cancel order") + } + return nil, nil + }, + ) + amendCnt := 0 + exec.EXPECT().AmendOrder(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(2).DoAndReturn( + func(ctx context.Context, order *types.OrderAmendment, party string, idgen common.IDGenerator) ([]*types.OrderConfirmation, error) { + amendCnt++ + + // if the order is order 2 we return an error + if order.OrderID == "f31f922db56ee0ffee7695e358c5f6c253857b8e0656ddead6dc40474502bc22" { + return nil, errors.New("cannot amend order") + } + return nil, nil + }, + ) + + orderCnt := 0 + exec.EXPECT().SubmitOrder(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(2).DoAndReturn( + func(ctx context.Context, order *types.OrderSubmission, party string, idgen common.IDGenerator, orderID string) (*types.OrderConfirmation, error) { + orderCnt++ + + // if the order is order 2 we return an error + if orderCnt == 2 { + return nil, errors.New("cannot submit order") + } + return &types.OrderConfirmation{Order: nil, Trades: []*types.Trade{{ID: "1"}, {ID: "2"}}, PassiveOrdersAffected: []*types.Order{}}, nil + }, + ) + + err := proc.ProcessBatch( + context.Background(), + &batch, + "43f86066fe13743448442022c099c48abbd7e9c5eac1c2558fdac1fbf549e867", + "62017b6ae543d2e699f41d37598b22dab025c57ed98ef3c237bb91b948c5f8fc", + stats.Blockchain, + ) + errors := err.(*processor.BMIError).Errors + require.Equal(t, 7, len(errors)) + require.Equal(t, 1, len(errors["updateMarginMode"])) + require.Equal(t, "update_margin_mode.margin_factor (margin factor must be defined when margin mode is isolated margin)", errors["updateMarginMode"][0].Error()) + + require.Equal(t, 1, len(errors["0"])) // cancellation for market with failed update margin mode + require.Equal(t, "Update margin mode transaction failed for market 926df3b689a5440fe21cad7069ebcedc46f75b2b23ce11002a1ee2254e339f23. Ignoring all transactions for the market", errors["0"][0].Error()) + + require.Equal(t, 1, len(errors["1"])) // cancellation tx failed + require.Equal(t, "cannot cancel order", errors["1"][0].Error()) + + require.Equal(t, 1, len(errors["3"])) // amend tx failed + require.Equal(t, "cannot amend order", errors["3"][0].Error()) + + require.Equal(t, 1, len(errors["4"])) // amend for market with failed update margin mode + require.Equal(t, "Update margin mode transaction failed for market 926df3b689a5440fe21cad7069ebcedc46f75b2b23ce11002a1ee2254e339f23. Ignoring all transactions for the market", errors["4"][0].Error()) + + require.Equal(t, 1, len(errors["5"])) // submit for market with failed update margin mode + require.Equal(t, "Update margin mode transaction failed for market 926df3b689a5440fe21cad7069ebcedc46f75b2b23ce11002a1ee2254e339f23. Ignoring all transactions for the market", errors["5"][0].Error()) + + require.Equal(t, 1, len(errors["7"])) // submit tx failed + require.Equal(t, "cannot submit order", errors["7"][0].Error()) + + // one cancellation gets through, the other one is for 926df3b689a5440fe21cad7069ebcedc46f75b2b23ce11002a1ee2254e339f23 + // which had a failure in updating margin mode + assert.Equal(t, uint64(1), stats.Blockchain.TotalCancelOrder()) + + // 3 amends: + // 1 is rejected for the market's switch margin mode failing + assert.Equal(t, uint64(2), stats.Blockchain.TotalAmendOrder()) + + // 3 submits: + // 1 is rejected for the market's switch margin mode failing + assert.Equal(t, uint64(2), stats.Blockchain.TotalCreateOrder()) + + stats.Blockchain.NewBatch() + + assert.Equal(t, 2, amendCnt) + assert.Equal(t, 1, cancelCnt) + assert.Equal(t, 2, orderCnt) + + // // ensure the errors is reported as partial + perr, ok := err.(abci.MaybePartialError) + assert.True(t, ok) + assert.True(t, perr.IsPartial()) +} + func TestBatchMarketInstructionsEnsureAllErrorReturnNonPartialError(t *testing.T) { ctrl := gomock.NewController(t) defer ctrl.Finish() @@ -294,3 +453,53 @@ func TestBatchMarketInstructionsEnsureAllErrorReturnNonPartialError(t *testing.T assert.True(t, ok) assert.False(t, perr.IsPartial()) } + +func TestBatchMarketInstructionInvalidStopOrder(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + exec := mocks.NewMockExecutionEngine(ctrl) + proc := processor.NewBMIProcessor(logging.NewTestLogger(), exec, processor.Validate{}) + stats := stats.New(logging.NewTestLogger(), stats.NewDefaultConfig()) + + batch := commandspb.BatchMarketInstructions{ + StopOrdersSubmission: []*commandspb.StopOrdersSubmission{ + {}, // this one is invalid + { + RisesAbove: &commandspb.StopOrderSetup{ + Trigger: &commandspb.StopOrderSetup_Price{Price: "1000"}, + OrderSubmission: &commandspb.OrderSubmission{ + MarketId: "92eea9006eaa51154cb9110b9fe982f37d3bd50f62ee9d0a7709d9c74de329aa", + Size: 1, + Side: vega.Side_SIDE_SELL, + Type: vega.Order_TYPE_MARKET, + TimeInForce: types.OrderTimeInForceFOK, + ReduceOnly: true, + }, + }, + }, + }, + } + stopCnt := 0 + exec.EXPECT().SubmitStopOrders(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(1).DoAndReturn( + func(ctx context.Context, stop *types.StopOrdersSubmission, party string, idgen common.IDGenerator, id1, id2 *string) ([]*types.OrderConfirmation, error) { + stopCnt++ + return nil, nil + }, + ) + + err := proc.ProcessBatch( + context.Background(), + &batch, + "43f86066fe13743448442022c099c48abbd7e9c5eac1c2558fdac1fbf549e867", + "62017b6ae543d2e699f41d37598b22dab025c57ed98ef3c237bb91b948c5f8fc", + stats.Blockchain, + ) + + assert.EqualError(t, err, "0 (* (must have at least one of rises above or falls below))") + + // ensure the errors is reported as partial + perr, ok := err.(abci.MaybePartialError) + assert.True(t, ok) + assert.True(t, perr.IsPartial()) + assert.Equal(t, 1, stopCnt) +} diff --git a/core/processor/gastimator.go b/core/processor/gastimator.go index ad15bcb4ad..88bfa2a8d8 100644 --- a/core/processor/gastimator.go +++ b/core/processor/gastimator.go @@ -87,7 +87,7 @@ func (g *Gastimator) GetMaxGas() uint64 { func (g *Gastimator) GetPriority(tx abci.Tx) uint64 { switch tx.Command() { - case txn.ProposeCommand, txn.VoteCommand: + case txn.ProposeCommand, txn.BatchProposeCommand, txn.VoteCommand: return medium default: if tx.Command().IsValidatorCommand() { @@ -209,9 +209,11 @@ func (g *Gastimator) batchGastimate(batch *commandspb.BatchMarketInstructions) u factor = 1.0 } var marketId string - if os.FallsBelow != nil { + // if both are nil, marketId will be empty string, yielding default gas + // the order is invalid, but validation is applied later. + if os.FallsBelow != nil && os.FallsBelow.OrderSubmission != nil { marketId = os.FallsBelow.OrderSubmission.MarketId - } else { + } else if os.RisesAbove != nil && os.RisesAbove.OrderSubmission != nil { marketId = os.RisesAbove.OrderSubmission.MarketId } orderGas := g.orderGastimate(marketId) diff --git a/core/processor/gastimator_test.go b/core/processor/gastimator_test.go index e3e6a6f787..fc9bf53497 100644 --- a/core/processor/gastimator_test.go +++ b/core/processor/gastimator_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/require" ) @@ -218,6 +219,7 @@ func TestGetPriority(t *testing.T) { txn.AmendOrderCommand, txn.WithdrawCommand, txn.ProposeCommand, + txn.BatchProposeCommand, txn.VoteCommand, txn.AnnounceNodeCommand, txn.NodeVoteCommand, @@ -246,7 +248,7 @@ func TestGetPriority(t *testing.T) { expected := uint64(1) if c.IsValidatorCommand() { expected = uint64(10000) - } else if c == txn.ProposeCommand || c == txn.VoteCommand { + } else if c == txn.ProposeCommand || c == txn.VoteCommand || c == txn.BatchProposeCommand { expected = uint64(100) } require.Equal(t, expected, gastimator.GetPriority(&testTx{command: c}), c) @@ -298,6 +300,7 @@ type testTx struct { unmarshaller func(interface{}) error } +func (tx *testTx) GetLength() int { return 0 } func (tx *testTx) Unmarshal(i interface{}) error { return tx.unmarshaller(i) } func (tx *testTx) GetPoWTID() string { return "" } func (tx *testTx) GetVersion() uint32 { return 2 } diff --git a/core/processor/mocks/mocks.go b/core/processor/mocks/mocks.go index 0490d91fa3..42cd191e0a 100644 --- a/core/processor/mocks/mocks.go +++ b/core/processor/mocks/mocks.go @@ -13,13 +13,15 @@ import ( common "code.vegaprotocol.io/vega/core/datasource/common" common0 "code.vegaprotocol.io/vega/core/execution/common" governance "code.vegaprotocol.io/vega/core/governance" + netparams "code.vegaprotocol.io/vega/core/netparams" types "code.vegaprotocol.io/vega/core/types" crypto "code.vegaprotocol.io/vega/libs/crypto" num "code.vegaprotocol.io/vega/libs/num" vega "code.vegaprotocol.io/vega/protos/vega" v1 "code.vegaprotocol.io/vega/protos/vega/commands/v1" + types0 "github.com/cometbft/cometbft/abci/types" gomock "github.com/golang/mock/gomock" - types0 "github.com/tendermint/tendermint/abci/types" + decimal "github.com/shopspring/decimal" ) // MockTimeService is a mock of TimeService interface. @@ -374,6 +376,20 @@ func (mr *MockExecutionEngineMockRecorder) Hash() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hash", reflect.TypeOf((*MockExecutionEngine)(nil).Hash)) } +// OnChainIDUpdate mocks base method. +func (m *MockExecutionEngine) OnChainIDUpdate(arg0 uint64) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "OnChainIDUpdate", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// OnChainIDUpdate indicates an expected call of OnChainIDUpdate. +func (mr *MockExecutionEngineMockRecorder) OnChainIDUpdate(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnChainIDUpdate", reflect.TypeOf((*MockExecutionEngine)(nil).OnChainIDUpdate), arg0) +} + // RejectMarket mocks base method. func (m *MockExecutionEngine) RejectMarket(arg0 context.Context, arg1 string) error { m.ctrl.T.Helper() @@ -488,6 +504,20 @@ func (mr *MockExecutionEngineMockRecorder) SucceedMarket(arg0, arg1, arg2 interf return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SucceedMarket", reflect.TypeOf((*MockExecutionEngine)(nil).SucceedMarket), arg0, arg1, arg2) } +// UpdateMarginMode mocks base method. +func (m *MockExecutionEngine) UpdateMarginMode(arg0 context.Context, arg1, arg2 string, arg3 vega.MarginMode, arg4 decimal.Decimal) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateMarginMode", arg0, arg1, arg2, arg3, arg4) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateMarginMode indicates an expected call of UpdateMarginMode. +func (mr *MockExecutionEngineMockRecorder) UpdateMarginMode(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateMarginMode", reflect.TypeOf((*MockExecutionEngine)(nil).UpdateMarginMode), arg0, arg1, arg2, arg3, arg4) +} + // UpdateMarket mocks base method. func (m *MockExecutionEngine) UpdateMarket(arg0 context.Context, arg1 *types.Market) error { m.ctrl.T.Helper() @@ -607,6 +637,20 @@ func (mr *MockGovernanceEngineMockRecorder) Hash() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hash", reflect.TypeOf((*MockGovernanceEngine)(nil).Hash)) } +// OnChainIDUpdate mocks base method. +func (m *MockGovernanceEngine) OnChainIDUpdate(arg0 uint64) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "OnChainIDUpdate", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// OnChainIDUpdate indicates an expected call of OnChainIDUpdate. +func (mr *MockGovernanceEngineMockRecorder) OnChainIDUpdate(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnChainIDUpdate", reflect.TypeOf((*MockGovernanceEngine)(nil).OnChainIDUpdate), arg0) +} + // OnTick mocks base method. func (m *MockGovernanceEngine) OnTick(arg0 context.Context, arg1 time.Time) ([]*governance.ToEnact, []*governance.VoteClosed) { m.ctrl.T.Helper() @@ -622,6 +666,20 @@ func (mr *MockGovernanceEngineMockRecorder) OnTick(arg0, arg1 interface{}) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnTick", reflect.TypeOf((*MockGovernanceEngine)(nil).OnTick), arg0, arg1) } +// RejectBatchProposal mocks base method. +func (m *MockGovernanceEngine) RejectBatchProposal(arg0 context.Context, arg1 string, arg2 vega.ProposalError, arg3 error) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RejectBatchProposal", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(error) + return ret0 +} + +// RejectBatchProposal indicates an expected call of RejectBatchProposal. +func (mr *MockGovernanceEngineMockRecorder) RejectBatchProposal(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RejectBatchProposal", reflect.TypeOf((*MockGovernanceEngine)(nil).RejectBatchProposal), arg0, arg1, arg2, arg3) +} + // RejectProposal mocks base method. func (m *MockGovernanceEngine) RejectProposal(arg0 context.Context, arg1 *types.Proposal, arg2 vega.ProposalError, arg3 error) error { m.ctrl.T.Helper() @@ -636,6 +694,21 @@ func (mr *MockGovernanceEngineMockRecorder) RejectProposal(arg0, arg1, arg2, arg return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RejectProposal", reflect.TypeOf((*MockGovernanceEngine)(nil).RejectProposal), arg0, arg1, arg2, arg3) } +// SubmitBatchProposal mocks base method. +func (m *MockGovernanceEngine) SubmitBatchProposal(arg0 context.Context, arg1 types.BatchProposalSubmission, arg2, arg3 string) ([]*governance.ToSubmit, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubmitBatchProposal", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].([]*governance.ToSubmit) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitBatchProposal indicates an expected call of SubmitBatchProposal. +func (mr *MockGovernanceEngineMockRecorder) SubmitBatchProposal(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitBatchProposal", reflect.TypeOf((*MockGovernanceEngine)(nil).SubmitBatchProposal), arg0, arg1, arg2, arg3) +} + // SubmitProposal mocks base method. func (m *MockGovernanceEngine) SubmitProposal(arg0 context.Context, arg1 types.ProposalSubmission, arg2, arg3 string) (*governance.ToSubmit, error) { m.ctrl.T.Helper() @@ -1209,15 +1282,15 @@ func (mr *MockValidatorTopologyMockRecorder) AllVegaPubKeys() *gomock.Call { } // BeginBlock mocks base method. -func (m *MockValidatorTopology) BeginBlock(arg0 context.Context, arg1 types0.RequestBeginBlock) { +func (m *MockValidatorTopology) BeginBlock(arg0 context.Context, arg1 uint64, arg2 string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "BeginBlock", arg0, arg1) + m.ctrl.Call(m, "BeginBlock", arg0, arg1, arg2) } // BeginBlock indicates an expected call of BeginBlock. -func (mr *MockValidatorTopologyMockRecorder) BeginBlock(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockValidatorTopologyMockRecorder) BeginBlock(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeginBlock", reflect.TypeOf((*MockValidatorTopology)(nil).BeginBlock), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeginBlock", reflect.TypeOf((*MockValidatorTopology)(nil).BeginBlock), arg0, arg1, arg2) } // GetValidatorPowerUpdates mocks base method. @@ -1795,6 +1868,20 @@ func (mr *MockNetworkParametersMockRecorder) GetInt(arg0 interface{}) *gomock.Ca return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInt", reflect.TypeOf((*MockNetworkParameters)(nil).GetInt), arg0) } +// GetJSONStruct mocks base method. +func (m *MockNetworkParameters) GetJSONStruct(arg0 string, arg1 netparams.Reset) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetJSONStruct", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// GetJSONStruct indicates an expected call of GetJSONStruct. +func (mr *MockNetworkParametersMockRecorder) GetJSONStruct(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetJSONStruct", reflect.TypeOf((*MockNetworkParameters)(nil).GetJSONStruct), arg0, arg1) +} + // IsUpdateAllowed mocks base method. func (m *MockNetworkParameters) IsUpdateAllowed(arg0 string) error { m.ctrl.T.Helper() diff --git a/core/processor/process_chain_event.go b/core/processor/process_chain_event.go index 9db139dc92..91b6711134 100644 --- a/core/processor/process_chain_event.go +++ b/core/processor/process_chain_event.go @@ -141,7 +141,19 @@ func (app *App) processChainEvent( app.log.Error("received invalid contract call", logging.Error(err), logging.String("call", c.ContractCall.String())) return err } - return app.oracles.EthereumOraclesVerifier.ProcessEthereumContractCallResult(callResult) + + chainID := app.defaultChainID + if callResult.SourceChainID != nil { + chainID = *callResult.SourceChainID + } + + if chainID == app.defaultChainID { + return app.oracles.EthereumOraclesVerifier.ProcessEthereumContractCallResult(callResult) + } + + // use l2 then + return app.oracles.EthereumL2OraclesVerifier.ProcessEthereumContractCallResult(callResult) + default: return ErrUnsupportedChainEvent } diff --git a/core/processor/processor.go b/core/processor/processor.go index 338c549b36..612abda007 100644 --- a/core/processor/processor.go +++ b/core/processor/processor.go @@ -27,13 +27,14 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/execution/common" "code.vegaprotocol.io/vega/core/governance" + "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + abcitypes "github.com/cometbft/cometbft/abci/types" "github.com/pkg/errors" - abcitypes "github.com/tendermint/tendermint/abci/types" ) //go:generate go run github.com/golang/mock/mockgen -destination mocks/mocks.go -package mocks code.vegaprotocol.io/vega/core/processor TimeService,EpochService,DelegationEngine,ExecutionEngine,GovernanceEngine,Stats,Assets,ValidatorTopology,Notary,EvtForwarder,Witness,Banking,NetworkParameters,OraclesEngine,OracleAdaptors,Limits,StakeVerifier,StakingAccounts,ERC20MultiSigTopology,Checkpoint @@ -103,15 +104,23 @@ type ExecutionEngine interface { // End of block BlockEnd(ctx context.Context) BeginBlock(ctx context.Context) + + // Margin mode + UpdateMarginMode(ctx context.Context, party, marketID string, marginMode types.MarginMode, marginFactor num.Decimal) error + // default chain ID, can be removed once we've upgraded to v0.74 + OnChainIDUpdate(uint64) error } type GovernanceEngine interface { SubmitProposal(context.Context, types.ProposalSubmission, string, string) (*governance.ToSubmit, error) + SubmitBatchProposal(context.Context, types.BatchProposalSubmission, string, string) ([]*governance.ToSubmit, error) FinaliseEnactment(ctx context.Context, prop *types.Proposal) AddVote(context.Context, types.VoteSubmission, string) error OnTick(context.Context, time.Time) ([]*governance.ToEnact, []*governance.VoteClosed) RejectProposal(context.Context, *types.Proposal, types.ProposalError, error) error + RejectBatchProposal(context.Context, string, types.ProposalError, error) error Hash() []byte + OnChainIDUpdate(uint64) error } //nolint:interfacebloat @@ -167,7 +176,7 @@ type ValidatorTopology interface { IsValidator() bool AddKeyRotate(ctx context.Context, nodeID string, currentBlockHeight uint64, kr *commandspb.KeyRotateSubmission) error ProcessEthereumKeyRotation(ctx context.Context, nodeID string, kr *commandspb.EthereumKeyRotateSubmission, verify func(message, signature []byte, hexAddress string) error) error - BeginBlock(ctx context.Context, req abcitypes.RequestBeginBlock) + BeginBlock(ctx context.Context, blockHeight uint64, proposer string) GetValidatorPowerUpdates() []abcitypes.ValidatorUpdate ProcessAnnounceNode(ctx context.Context, nr *commandspb.AnnounceNode) error ProcessValidatorHeartbeat(context.Context, *commandspb.ValidatorHeartbeat, func(message, signature, pubkey []byte) error, func(message, signature []byte, hexAddress string) error) error @@ -229,12 +238,14 @@ type NetworkParameters interface { DispatchChanges(ctx context.Context) IsUpdateAllowed(key string) error GetInt(key string) (int64, error) + GetJSONStruct(key string, v netparams.Reset) error } type Oracle struct { - Engine OraclesEngine - Adaptors OracleAdaptors - EthereumOraclesVerifier EthereumOracleVerifier + Engine OraclesEngine + Adaptors OracleAdaptors + EthereumOraclesVerifier EthereumOracleVerifier + EthereumL2OraclesVerifier EthereumOracleVerifier } type OraclesEngine interface { diff --git a/core/processor/ratelimit/ratelimit_test.go b/core/processor/ratelimit/ratelimit_test.go index 21d352c093..072c333427 100644 --- a/core/processor/ratelimit/ratelimit_test.go +++ b/core/processor/ratelimit/ratelimit_test.go @@ -18,10 +18,10 @@ package ratelimit_test import ( "testing" + "code.vegaprotocol.io/vega/core/processor/ratelimit" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "code.vegaprotocol.io/vega/core/processor/ratelimit" ) // runN executes the given `fn` func, `n` times. diff --git a/core/processor/tx.go b/core/processor/tx.go index 730f73f3f7..c3c73404c4 100644 --- a/core/processor/tx.go +++ b/core/processor/tx.go @@ -24,7 +24,8 @@ import ( "code.vegaprotocol.io/vega/core/txn" "code.vegaprotocol.io/vega/libs/proto" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" - "github.com/tendermint/tendermint/crypto/tmhash" + + "github.com/cometbft/cometbft/crypto/tmhash" ) type Tx struct { @@ -137,11 +138,23 @@ func (t Tx) Command() txn.Command { return txn.UpdateReferralSetCommand case *commandspb.InputData_ApplyReferralCode: return txn.ApplyReferralCodeCommand + case *commandspb.InputData_UpdateMarginMode: + return txn.UpdateMarginModeCommand + case *commandspb.InputData_JoinTeam: + return txn.JoinTeamCommand + case *commandspb.InputData_BatchProposalSubmission: + return txn.BatchProposeCommand + case *commandspb.InputData_UpdatePartyProfile: + return txn.UpdatePartyProfileCommand default: panic(fmt.Sprintf("command %T is not supported", cmd)) } } +func (t Tx) GetLength() int { + return len(t.originalTx) +} + func (t Tx) GetNonce() uint64 { return t.inputData.Nonce } @@ -228,6 +241,14 @@ func (t Tx) GetCmd() interface{} { return cmd.UpdateReferralSet case *commandspb.InputData_ApplyReferralCode: return cmd.ApplyReferralCode + case *commandspb.InputData_UpdateMarginMode: + return cmd.UpdateMarginMode + case *commandspb.InputData_JoinTeam: + return cmd.JoinTeam + case *commandspb.InputData_BatchProposalSubmission: + return cmd.BatchProposalSubmission + case *commandspb.InputData_UpdatePartyProfile: + return cmd.UpdatePartyProfile default: return fmt.Errorf("command %T is not supported", cmd) } @@ -412,9 +433,33 @@ func (t Tx) Unmarshal(i interface{}) error { case *commandspb.InputData_ApplyReferralCode: underlyingCmd, ok := i.(*commandspb.ApplyReferralCode) if !ok { - return errors.New("failed to unmarshall to JoinTeam") + return errors.New("failed to unmarshall to ApplyReferralCode") } *underlyingCmd = *cmd.ApplyReferralCode + case *commandspb.InputData_JoinTeam: + underlyingCmd, ok := i.(*commandspb.JoinTeam) + if !ok { + return errors.New("failed to unmarshall to JoinTeam") + } + *underlyingCmd = *cmd.JoinTeam + case *commandspb.InputData_UpdateMarginMode: + underlyingCmd, ok := i.(*commandspb.UpdateMarginMode) + if !ok { + return errors.New("failed to unmarshall to UpdateMarginMode") + } + *underlyingCmd = *cmd.UpdateMarginMode + case *commandspb.InputData_BatchProposalSubmission: + underlyingCmd, ok := i.(*commandspb.BatchProposalSubmission) + if !ok { + return errors.New("failed to unmarshall to BatchProposalSubmission") + } + *underlyingCmd = *cmd.BatchProposalSubmission + case *commandspb.InputData_UpdatePartyProfile: + underlyingCmd, ok := i.(*commandspb.UpdatePartyProfile) + if !ok { + return errors.New("failed to unmarshall to UpdatePartyProfile") + } + *underlyingCmd = *cmd.UpdatePartyProfile default: return fmt.Errorf("command %T is not supported", cmd) } diff --git a/core/products/composite_price_oracles.go b/core/products/composite_price_oracles.go new file mode 100644 index 0000000000..1cb3ec76c4 --- /dev/null +++ b/core/products/composite_price_oracles.go @@ -0,0 +1,122 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package products + +import ( + "context" + "fmt" + "strings" + + "code.vegaprotocol.io/vega/core/datasource" + "code.vegaprotocol.io/vega/core/datasource/common" + "code.vegaprotocol.io/vega/core/datasource/spec" + "code.vegaprotocol.io/vega/libs/num" + datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + + "github.com/pkg/errors" +) + +type CompositePriceOracle struct { + subID spec.SubscriptionID + binding compositePriceOracleBinding + unsub spec.Unsubscriber +} + +type compositePriceOracleBinding struct { + priceProperty string + priceType datapb.PropertyKey_Type + priceDecimals uint64 +} + +func NewCompositePriceOracle(ctx context.Context, oracleEngine OracleEngine, oracleSpec *datasource.Spec, binding *datasource.SpecBindingForCompositePrice, cb spec.OnMatchedData) (*CompositePriceOracle, error) { + bind, err := newCompositePriceBinding(oracleSpec, binding) + if err != nil { + return nil, err + } + + os, err := spec.New(*datasource.SpecFromDefinition(*oracleSpec.Data)) + if err != nil { + return nil, err + } + + cpo := &CompositePriceOracle{ + binding: bind, + } + + err = cpo.bindCompositePriceSource(ctx, oracleEngine, os, cb) + if err != nil { + return nil, err + } + + return cpo, nil +} + +func (cpo *CompositePriceOracle) GetDecimals() int64 { + return int64(cpo.binding.priceDecimals) +} + +func newCompositePriceBinding(spec *datasource.Spec, binding *datasource.SpecBindingForCompositePrice) (compositePriceOracleBinding, error) { + priceProp := strings.TrimSpace(binding.PriceSourceProperty) + if len(priceProp) == 0 { + return compositePriceOracleBinding{}, errors.New("binding for price source data cannot be blank") + } + priceT, dec := getSettleTypeAndDec(spec) + + return compositePriceOracleBinding{ + priceProperty: priceProp, + priceType: priceT, + priceDecimals: dec, + }, nil +} + +func (cpo *CompositePriceOracle) bindCompositePriceSource(ctx context.Context, oe OracleEngine, spec *spec.Spec, cb spec.OnMatchedData) error { + err := spec.EnsureBoundableProperty(cpo.binding.priceProperty, cpo.binding.priceType) + if err != nil { + return fmt.Errorf("invalid oracle spec binding for composite price source data: %w", err) + } + if cpo.subID, cpo.unsub, err = oe.Subscribe(ctx, *spec, cb); err != nil { + return fmt.Errorf("could not subscribe to oracle engine for price source data: %w", err) + } + return nil +} + +func (cpo *CompositePriceOracle) UnsubAll(ctx context.Context) { + if cpo.unsub != nil { + cpo.unsub(ctx, cpo.subID) + cpo.unsub = nil + } +} + +func (cpo *CompositePriceOracle) GetData(data common.Data) (*num.Numeric, error) { + priceData := &num.Numeric{} + switch cpo.binding.priceType { + case datapb.PropertyKey_TYPE_DECIMAL: + priceDataAsDecimal, err := data.GetDecimal(cpo.binding.priceProperty) + if err != nil { + return nil, err + } + + priceData.SetDecimal(&priceDataAsDecimal) + default: + priceDataAsUint, err := data.GetUint(cpo.binding.priceProperty) + if err != nil { + return nil, err + } + + priceData.SetUint(priceDataAsUint) + } + return priceData, nil +} diff --git a/core/products/future.go b/core/products/future.go index 0df362f6be..7c82e6ee4a 100644 --- a/core/products/future.go +++ b/core/products/future.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/logging" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/pkg/errors" ) @@ -74,7 +75,7 @@ func (f *Future) SubmitDataPoint(_ context.Context, _ *num.Uint, _ int64) error return nil } -func (f *Future) OnLeaveOpeningAuction(_ context.Context, _ int64) { +func (f *Future) UpdateAuctionState(_ context.Context, _ bool) { } func (f *Future) GetMarginIncrease(_ int64) num.Decimal { diff --git a/core/products/future_test.go b/core/products/future_test.go index 171cd3ece3..ff92f7a687 100644 --- a/core/products/future_test.go +++ b/core/products/future_test.go @@ -29,6 +29,7 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/products/perpetual.go b/core/products/perpetual.go index 10d2b35577..8866999fcc 100644 --- a/core/products/perpetual.go +++ b/core/products/perpetual.go @@ -28,17 +28,18 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" - "github.com/pkg/errors" - "golang.org/x/exp/slices" - datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" + "golang.org/x/exp/slices" ) var ( year = num.DecimalFromInt64((24 * 365 * time.Hour).Nanoseconds()) ErrDataPointAlreadyExistsAtTime = errors.New("data-point already exists at timestamp") + ErrDataPointIsTooOld = errors.New("data-point is too old") ErrInitialPeriodNotStarted = errors.New("initial settlement period not started") ) @@ -56,6 +57,85 @@ type fundingData struct { externalTWAP *num.Uint } +type auctionIntervals struct { + auctions []int64 // complete auction intervals as pairs of enter/leave time values, always of even length + total int64 // the sum of all the complete auction intervals giving the total time spent in auction + auctionStart int64 // if we are currently in an auction, this is the time we entered it +} + +// restart resets the auction interval tracking, remembering the current "in-auction" state by carrying over `auctionStart`. +func (a *auctionIntervals) restart() { + a.total = 0 + a.auctions = []int64{} +} + +// update adds a new aution enter/leave boundary to the auction intervals being tracked. +func (a *auctionIntervals) update(t int64, enter bool) { + if (a.auctionStart != 0) == enter { + panic("flags out of sync - double entry or double leave auction detected") + } + + if enter { + a.auctionStart = t + return + } + + // we've left an auction period, add the new st/nd to the completed auction periods + a.auctions = append(a.auctions, a.auctionStart, t) + + // update our running total + a.total += t - a.auctionStart + a.auctionStart = 0 +} + +// inAuction returns whether the given t exists in an auction period. +func (a *auctionIntervals) inAuction(t int64) bool { + if a.auctionStart != 0 && t >= a.auctionStart { + return true + } + + for i := len(a.auctions) - 2; i >= 0; i = i - 2 { + if a.auctions[i] <= t && a.auctions[i+1] < t { + return true + } + } + return false +} + +// timeSpent returns how long the time interval [st, nd] was spent in auction in the current funding period. +func (a *auctionIntervals) timeSpent(st, nd int64) int64 { + if nd < st { + panic("cannot process backwards interval") + } + + var sum int64 + if a.auctionStart != 0 && a.auctionStart < nd { + if st > a.auctionStart { + return nd - st + } + // we want to include the in-progress auction period, so add on how much into it we are + sum = nd - a.auctionStart + } + + // if [st, nd] contains all the auction intervals we can just return the running total + if len(a.auctions) != 0 && st <= a.auctions[0] && a.auctions[len(a.auctions)-1] <= nd { + return a.total + sum + } + + // iterare over the completed auction periods in pairs and add regions of the auction intervals + // that overlap with [st, nd] + for i := len(a.auctions) - 2; i >= 0; i = i - 2 { + // [st, nd] is entirely after this auction period, we can stop now + if a.auctions[i+1] < st { + break + } + // calculate + sum += num.MaxV(0, num.MinV(nd, a.auctions[i+1])-num.MaxV(st, a.auctions[i])) + } + + return sum +} + type cachedTWAP struct { log *logging.Logger @@ -64,15 +144,18 @@ type cachedTWAP struct { end int64 // time of the last calculated sub-product that was >= the last added data-point sumProduct *num.Uint // the sum-product of all the intervals between the data-points from `start` -> `end` points []*dataPoint // the data-points used to calculate the twap + + auctions *auctionIntervals } -func NewCachedTWAP(log *logging.Logger, t int64) *cachedTWAP { +func NewCachedTWAP(log *logging.Logger, t int64, auctions *auctionIntervals) *cachedTWAP { return &cachedTWAP{ log: log, start: t, periodStart: t, end: t, sumProduct: num.UintZero(), + auctions: auctions, } } @@ -103,6 +186,9 @@ func (c *cachedTWAP) unwind(t int64) (*num.Uint, int) { // now we need to remove the contribution from this interval delta := point.t - num.MaxV(prev.t, c.start) + + // minus time in auction + delta -= c.auctions.timeSpent(num.MaxV(prev.t, c.start), point.t) sub := num.UintZero().Mul(prev.price, num.NewUint(uint64(delta))) // before we subtract, lets sanity check some things @@ -131,10 +217,18 @@ func (c *cachedTWAP) calculate(t int64) *num.Uint { if t < c.start || len(c.points) == 0 { return num.UintZero() } + if t == c.start { + if c.auctions.inAuction(t) { + return num.UintZero() + } + return c.points[0].price.Clone() + } if t == c.end { // already have the sum product here, just twap-it - return num.UintZero().Div(c.sumProduct, num.NewUint(uint64(c.end-c.start))) + period := c.end - c.start + period -= c.auctions.timeSpent(c.start, c.end) + return num.UintZero().Div(c.sumProduct, num.NewUint(uint64(period))) } // if the time we want the twap from is before the last data-point we need to unwind the intervals @@ -142,22 +236,35 @@ func (c *cachedTWAP) calculate(t int64) *num.Uint { if t < point.t { sumProduct, idx := c.unwind(t) p := c.points[idx] - delta := t - p.t + + // if the point we're winding forward from was a carry over, its time will be before the start-period. + from := num.MaxV(p.t, c.start) + delta := t - from + delta -= c.auctions.timeSpent(from, t) + + period := t - c.start + period -= c.auctions.timeSpent(c.start, t) + sumProduct.Add(sumProduct, num.UintZero().Mul(p.price, num.NewUint(uint64(delta)))) - return num.UintZero().Div(sumProduct, num.NewUint(uint64(t-c.start))) + return num.UintZero().Div(sumProduct, num.NewUint(uint64(period))) } // the twap we want is after the final data-point so we can just extend the calculation (or shortern if we've already extended) delta := t - c.end + period := t - c.start + period -= c.auctions.timeSpent(c.start, t) + sumProduct := c.sumProduct.Clone() - newPeriod := num.NewUint(uint64(t - c.start)) + newPeriod := num.NewUint(uint64(period)) lastPrice := point.price.Clone() // add or subtract from the sum-product based on if we are extending/shortening the interval switch { case delta < 0: + delta += c.auctions.timeSpent(t, c.end) sumProduct.Sub(sumProduct, lastPrice.Mul(lastPrice, num.NewUint(uint64(-delta)))) case delta > 0: + delta -= c.auctions.timeSpent(c.end, t) sumProduct.Add(sumProduct, lastPrice.Mul(lastPrice, num.NewUint(uint64(delta)))) } // store these as the last calculated as its likely to be asked again @@ -199,28 +306,48 @@ func (c *cachedTWAP) insertPoint(point *dataPoint) (*num.Uint, error) { return twap, nil } +// prependPoint handles the case where the given point is either before the first point, or before the start of the period. +func (c *cachedTWAP) prependPoint(point *dataPoint) (*num.Uint, error) { + first := c.points[0] + + if point.t == first.t { + return nil, ErrDataPointAlreadyExistsAtTime + } + + // our first point is on or before the start of the period, and the new point is before both, its too old + if first.t <= c.periodStart && point.t < first.t { + return nil, ErrDataPointIsTooOld + } + + points := c.points[:] + if first.t < c.periodStart && first.t < point.t { + // this is the case where we have first-point < new-point < period start and we only want to keep + // one data point that is before the start of the period, so we throw away first-point + points = c.points[1:] + } + + c.points = []*dataPoint{point} + c.sumProduct = num.UintZero() + c.setPeriod(point.t, point.t) + for _, p := range points { + c.calculate(p.t) + c.points = append(c.points, p) + } + return point.price.Clone(), nil +} + // addPoint takes the given point and works out where it fits against what we already have, updates the // running sum-product and returns the TWAP at point.t. func (c *cachedTWAP) addPoint(point *dataPoint) (*num.Uint, error) { - if len(c.points) == 0 || point.t < c.start { - // first point, or new point is before the start of the funding period + if len(c.points) == 0 { c.points = []*dataPoint{point} c.setPeriod(point.t, point.t) c.sumProduct = num.UintZero() - return num.UintZero(), nil + return point.price.Clone(), nil } - // point to add is before the very first point we added, a little weird but ok - if point.t <= c.points[0].t { - points := c.points[:] - c.points = []*dataPoint{point} - c.setPeriod(point.t, point.t) - c.sumProduct = num.UintZero() - for _, p := range points { - c.calculate(p.t) - c.points = append(c.points, p) - } - return num.UintZero(), nil + if point.t <= c.points[0].t || point.t <= c.periodStart { + return c.prependPoint(point) } // new point is after the last point, just calculate the TWAP at point.t and append @@ -276,6 +403,7 @@ type Perpetual struct { // twap calculators internalTWAP *cachedTWAP externalTWAP *cachedTWAP + auctions *auctionIntervals } func (p Perpetual) GetCurrentPeriod() uint64 { @@ -330,6 +458,7 @@ func NewPerpetual(ctx context.Context, log *logging.Logger, p *types.Perps, mark return nil, err } // check decimal places for settlement data + auctions := &auctionIntervals{} perp := &Perpetual{ p: p, id: marketID, @@ -337,8 +466,9 @@ func NewPerpetual(ctx context.Context, log *logging.Logger, p *types.Perps, mark timeService: ts, broker: broker, assetDP: assetDP, - externalTWAP: NewCachedTWAP(log, 0), - internalTWAP: NewCachedTWAP(log, 0), + auctions: auctions, + externalTWAP: NewCachedTWAP(log, 0, auctions), + internalTWAP: NewCachedTWAP(log, 0, auctions), } // create specs from source osForSettle, err := spec.New(*datasource.SpecFromDefinition(*p.DataSourceSpecForSettlementData.Data)) @@ -431,10 +561,30 @@ func (p *Perpetual) UnsubscribeSettlementData(ctx context.Context) { p.oracle.unsubAll(ctx) } -func (p *Perpetual) OnLeaveOpeningAuction(ctx context.Context, t int64) { +func (p *Perpetual) UpdateAuctionState(ctx context.Context, enter bool) { + t := p.timeService.GetTimeNow().Truncate(time.Second).UnixNano() + if p.log.GetLevel() == logging.DebugLevel { + p.log.Debug( + "perpetual auction period start/end", + logging.String("id", p.id), + logging.Bool("enter", enter), + logging.Int64("t", t), + ) + } + + if p.readyForData() { + p.auctions.update(t, enter) + return + } + + if enter { + return + } + + // left first auction, we can start the first funding-period p.startedAt = t - p.internalTWAP = NewCachedTWAP(p.log, t) - p.externalTWAP = NewCachedTWAP(p.log, t) + p.internalTWAP = NewCachedTWAP(p.log, t, p.auctions) + p.externalTWAP = NewCachedTWAP(p.log, t, p.auctions) p.broker.Send(events.NewFundingPeriodEvent(ctx, p.id, p.seq, p.startedAt, nil, nil, nil, nil, nil)) } @@ -444,6 +594,9 @@ func (p *Perpetual) SubmitDataPoint(ctx context.Context, price *num.Uint, t int6 return ErrInitialPeriodNotStarted } + // since all external data and funding period triggers are to seconds-precision we also want to truncate + // internal times to seconds to avoid sub-second backwards intervals that are dependent on the order data arrives + t = time.Unix(0, t).Truncate(time.Second).UnixNano() twap, err := p.internalTWAP.addPoint(&dataPoint{price: price.Clone(), t: t}) if err != nil { return err @@ -563,7 +716,7 @@ func (p *Perpetual) handleSettlementCue(ctx context.Context, t int64) { return } - if !p.haveData(t) || t == p.startedAt { + if !p.haveDataBeforeGivenTime(t) || t == p.startedAt { // we have no points, or the interval is zero length so we just start a new interval p.broker.Send(events.NewFundingPeriodEvent(ctx, p.id, p.seq, p.startedAt, ptr.From(t), nil, nil, nil, nil)) p.startNewFundingPeriod(ctx, t) @@ -588,17 +741,27 @@ func (p *Perpetual) handleSettlementCue(ctx context.Context, t int64) { } func (p *Perpetual) GetData(t int64) *types.ProductData { - if !p.readyForData() { + if !p.readyForData() || !p.haveData() { return nil } + t = time.Unix(0, t).Truncate(time.Second).UnixNano() r := p.calculateFundingPayment(t) + + var underlyingIndexPrice *num.Uint + if len(p.externalTWAP.points) > 0 { + underlyingIndexPrice = p.externalTWAP.points[len(p.externalTWAP.points)-1].price.Clone() + } + return &types.ProductData{ Data: &types.PerpetualData{ - FundingPayment: r.fundingPayment.String(), - FundingRate: r.fundingRate.String(), - ExternalTWAP: r.externalTWAP.String(), - InternalTWAP: r.internalTWAP.String(), + FundingRate: r.fundingRate.String(), + FundingPayment: r.fundingPayment.String(), + InternalTWAP: r.internalTWAP.String(), + ExternalTWAP: r.externalTWAP.String(), + SeqNum: p.seq, + StartTime: p.startedAt, + UnderlyingIndexPrice: underlyingIndexPrice, }, } } @@ -633,9 +796,12 @@ func (p *Perpetual) startNewFundingPeriod(ctx context.Context, endAt int64) { external := carryOver(p.externalTWAP.points) internal := carryOver(p.internalTWAP.points) + // refresh the auction tracker + p.auctions.restart() + // new period new life - p.externalTWAP = NewCachedTWAP(p.log, endAt) - p.internalTWAP = NewCachedTWAP(p.log, endAt) + p.externalTWAP = NewCachedTWAP(p.log, endAt, p.auctions) + p.internalTWAP = NewCachedTWAP(p.log, endAt, p.auctions) // send events for all the data-points that were carried over evts := make([]events.Event, 0, len(external)+len(internal)) @@ -660,13 +826,13 @@ func (p *Perpetual) readyForData() bool { return p.startedAt > 0 } -// haveData returns whether we have any data points before the given time. -func (p *Perpetual) haveData(endAt int64) bool { +// haveDataBeforeGivenTime returns whether we have at least one data point from each of the internal and external price series before the given time. +func (p *Perpetual) haveDataBeforeGivenTime(endAt int64) bool { if !p.readyForData() { return false } - if len(p.internalTWAP.points) == 0 || len(p.externalTWAP.points) == 0 { + if !p.haveData() { return false } @@ -677,6 +843,11 @@ func (p *Perpetual) haveData(endAt int64) bool { return true } +// haveData returns whether we have at least one data point from each of the internal and external price series. +func (p *Perpetual) haveData() bool { + return len(p.internalTWAP.points) > 0 && len(p.externalTWAP.points) > 0 +} + // calculateFundingPayment returns the funding payment and funding rate for the interval between when the current funding period // started and the given time. Used on settlement-cues and for margin calculations. func (p *Perpetual) calculateFundingPayment(t int64) *fundingData { @@ -692,7 +863,7 @@ func (p *Perpetual) calculateFundingPayment(t int64) *fundingData { } // the funding payment is the difference between the two, the sign representing the direction of cash flow - fundingPayment := num.IntFromUint(internalTWAP, true).Sub(num.IntFromUint(externalTWAP, true)) + fundingPayment := num.DecimalFromUint(internalTWAP).Sub(num.DecimalFromUint(externalTWAP)) // apply interest-rates if necessary if !p.p.InterestRate.IsZero() { @@ -700,13 +871,30 @@ func (p *Perpetual) calculateFundingPayment(t int64) *fundingData { if p.log.GetLevel() == logging.DebugLevel { p.log.Debug("applying interest-rate with clamping", logging.String("funding-payment", fundingPayment.String()), logging.Int64("delta", delta)) } - fundingPayment.Add(p.calculateInterestTerm(externalTWAP, internalTWAP, delta)) + fundingPayment = fundingPayment.Add(p.calculateInterestTerm(externalTWAP, internalTWAP, delta)) + } + + // apply funding scaling factor + if p.p.FundingRateScalingFactor != nil { + fundingPayment = fundingPayment.Mul(*p.p.FundingRateScalingFactor) } fundingRate := num.DecimalZero() if !externalTWAP.IsZero() { - fundingRate = num.DecimalFromInt(fundingPayment).Div(num.DecimalFromUint(externalTWAP)) + fundingRate = fundingPayment.Div(num.DecimalFromUint(externalTWAP)) + } + + // apply upper/lower bound capping + if p.p.FundingRateUpperBound != nil && p.p.FundingRateUpperBound.LessThan(fundingRate) { + fundingRate = p.p.FundingRateUpperBound.Copy() + fundingPayment = fundingRate.Mul(num.DecimalFromUint(externalTWAP)) } + + if p.p.FundingRateLowerBound != nil && p.p.FundingRateLowerBound.GreaterThan(fundingRate) { + fundingRate = p.p.FundingRateLowerBound.Copy() + fundingPayment = fundingRate.Mul(num.DecimalFromUint(externalTWAP)) + } + if p.log.GetLevel() == logging.DebugLevel { p.log.Debug("funding payment calculated", logging.MarketID(p.id), @@ -714,15 +902,16 @@ func (p *Perpetual) calculateFundingPayment(t int64) *fundingData { logging.String("funding-payment", fundingPayment.String()), logging.String("funding-rate", fundingRate.String())) } + fundingPaymentInt, _ := num.IntFromDecimal(fundingPayment) return &fundingData{ - fundingPayment: fundingPayment, + fundingPayment: fundingPaymentInt, fundingRate: fundingRate, externalTWAP: externalTWAP, internalTWAP: internalTWAP, } } -func (p *Perpetual) calculateInterestTerm(externalTWAP, internalTWAP *num.Uint, delta int64) *num.Int { +func (p *Perpetual) calculateInterestTerm(externalTWAP, internalTWAP *num.Uint, delta int64) num.Decimal { // get delta in terms of years td := num.DecimalFromInt64(delta).Div(year) @@ -747,19 +936,14 @@ func (p *Perpetual) calculateInterestTerm(externalTWAP, internalTWAP *num.Uint, logging.String("clamped-interest", clampedInterest.String()), ) } - - result, overflow := num.IntFromDecimal(clampedInterest) - if overflow { - p.log.Panic("overflow converting interest term to Int", logging.String("clampedInterest", clampedInterest.String())) - } - return result + return clampedInterest } // GetMarginIncrease returns the estimated extra margin required to account for the next funding payment // for a party with a position of +1. func (p *Perpetual) GetMarginIncrease(t int64) num.Decimal { // if we have no data, or the funding factor is zero, then the margin increase will always be zero - if !p.haveData(t) || p.p.MarginFundingFactor.IsZero() { + if !p.haveDataBeforeGivenTime(t) || p.p.MarginFundingFactor.IsZero() { return num.DecimalZero() } diff --git a/core/products/perpetual_auctions_test.go b/core/products/perpetual_auctions_test.go new file mode 100644 index 0000000000..6936f4815b --- /dev/null +++ b/core/products/perpetual_auctions_test.go @@ -0,0 +1,268 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package products_test + +import ( + "context" + "testing" + "time" + + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestPerpetualsWithAuctions(t *testing.T) { + t.Run("funding period is all an auction", testFundingPeriodIsAllAnAuction) + t.Run("data point in auction is ignored", testDataPointInAuctionIgnored) + t.Run("data points in auction received out of order", testDataPointsInAuctionOutOfOrder) + t.Run("auction preserved when period resets", testAuctionFundingPeriodReset) + t.Run("funding data in auction period start", testFundingDataAtInAuctionPeriodStart) + t.Run("past funding payment calculation", testPastFundingPayment) + t.Run("past funding payment calculation in auction", testPastFundingPaymentInAuction) +} + +func testFundingPeriodIsAllAnAuction(t *testing.T) { + perp := testPerpetual(t) + defer perp.ctrl.Finish() + + // set of the data points such that difference in averages is 0 + points := getTestDataPoints(t) + + // tell the perpetual that we are ready to accept settlement stuff + whenLeaveOpeningAuction(t, perp, points[0].t) + + // enter auction + whenAuctionStateChanges(t, perp, points[0].t, true) + + // send in some data points with a TWAP difference + submitDataWithDifference(t, perp, points, 10) + + // leave auction + whenAuctionStateChanges(t, perp, points[len(points)-1].t, false) + + fundingPayment := whenTheFundingPeriodEnds(t, perp, points[len(points)-1].t) + assert.Equal(t, "0", fundingPayment.String()) +} + +func testDataPointInAuctionIgnored(t *testing.T) { + perp := testPerpetual(t) + defer perp.ctrl.Finish() + expectedTWAP := 100 + // set of the data points such that difference in averages is 0 + points := getTestDataPoints(t) + require.GreaterOrEqual(t, 4, len(points)) + + // tell the perpetual that we are ready to accept settlement stuff + whenLeaveOpeningAuction(t, perp, points[0].t) + + // submit the first point then enter an auction + submitPointWithDifference(t, perp, points[0], expectedTWAP) + whenAuctionStateChanges(t, perp, points[0].t+int64(time.Second), true) + + // submit a crazy point difference, then a normal point + submitPointWithDifference(t, perp, points[1], -9999999) + submitPointWithDifference(t, perp, points[2], expectedTWAP) + + // now we leave auction and the crazy point difference will not affect the TWAP because it was in an auction period + whenAuctionStateChanges(t, perp, points[2].t+int64(time.Second), false) + + fundingPayment := whenTheFundingPeriodEnds(t, perp, points[len(points)-1].t) + assert.Equal(t, int64(expectedTWAP), fundingPayment.Int64()) +} + +func testDataPointsInAuctionOutOfOrder(t *testing.T) { + perp := testPerpetual(t) + defer perp.ctrl.Finish() + expectedTWAP := 100 + // set of the data points such that difference in averages is 0 + points := getTestDataPoints(t) + + // tell the perpetual that we are ready to accept settlement stuff + st := points[0].t + nd := points[3].t + a1 := between(points[0].t, points[1].t) + a2 := between(points[2].t, points[3].t) + + whenLeaveOpeningAuction(t, perp, st) + + // submit the first point and enter an auction + submitPointWithDifference(t, perp, points[0], expectedTWAP) + whenAuctionStateChanges(t, perp, a1, true) + whenAuctionStateChanges(t, perp, a2, false) + + // funding payment will be the constant diff in the first point + assert.Equal(t, "100", getFundingPayment(t, perp, nd)) + + // now submit a point that is mid the auction period + submitPointWithDifference(t, perp, points[2], 200) + assert.Equal(t, "150", getFundingPayment(t, perp, nd)) + + // now submit a point also in before the previous point, also in an auction period + // and its contribution should be ignored. + crazy := &testDataPoint{t: between(a1, points[1].t), price: num.NewUint(1000)} + submitPointWithDifference(t, perp, crazy, 9999999) + assert.Equal(t, "150", getFundingPayment(t, perp, nd)) +} + +func testAuctionFundingPeriodReset(t *testing.T) { + perp := testPerpetual(t) + defer perp.ctrl.Finish() + expectedTWAP := 100 + // set of the data points such that difference in averages is 0 + points := getTestDataPoints(t) + + // tell the perpetual that we are ready to accept settlement stuff + whenLeaveOpeningAuction(t, perp, points[0].t) + + // submit the first point and enter an auction + submitPointWithDifference(t, perp, points[0], expectedTWAP) + whenAuctionStateChanges(t, perp, points[0].t+int64(time.Second), true) + + fundingPayment := whenTheFundingPeriodEnds(t, perp, points[0].t+int64(2*time.Second)) + assert.Equal(t, int64(expectedTWAP), fundingPayment.Int64()) + + // should still be on an auction to ending another funding period should give 0 + submitPointWithDifference(t, perp, points[1], -999999) + fundingPayment = whenTheFundingPeriodEnds(t, perp, points[2].t) + assert.Equal(t, int64(0), fundingPayment.Int64()) + + // submit a point and leave auction + submitPointWithDifference(t, perp, points[2], expectedTWAP) + whenAuctionStateChanges(t, perp, between(points[2].t, points[3].t), false) + + fundingPayment = whenTheFundingPeriodEnds(t, perp, points[3].t) + assert.Equal(t, int64(100), fundingPayment.Int64()) + + // now we're not in an auction, ending the period again will preserve that + fundingPayment = whenTheFundingPeriodEnds(t, perp, points[3].t+int64(time.Hour)) + assert.Equal(t, int64(100), fundingPayment.Int64()) +} + +func testFundingDataAtInAuctionPeriodStart(t *testing.T) { + perp := testPerpetual(t) + defer perp.ctrl.Finish() + expectedTWAP := 100 + // set of the data points such that difference in averages is 0 + points := getTestDataPoints(t) + + // tell the perpetual that we are ready to accept settlement stuff + whenLeaveOpeningAuction(t, perp, points[0].t) + + // submit the first point and enter an auction + submitPointWithDifference(t, perp, points[0], expectedTWAP) + whenAuctionStateChanges(t, perp, points[0].t+int64(time.Second), true) + + end := points[0].t + int64(2*time.Second) + fundingPayment := whenTheFundingPeriodEnds(t, perp, end) + assert.Equal(t, int64(expectedTWAP), fundingPayment.Int64()) + + // but if we query the funding payment right now it'll be zero because this 0 length, just started + // funding period is all in auction + fp := getFundingPayment(t, perp, end) + assert.Equal(t, "0", fp) +} + +func testPastFundingPaymentInAuction(t *testing.T) { + perp := testPerpetual(t) + defer perp.ctrl.Finish() + expectedTWAP := 100000000000 + // set of the data points such that difference in averages is 0 + points := getTestDataPoints(t) + + // tell the perpetual that we are ready to accept settlement stuff + whenLeaveOpeningAuction(t, perp, points[0].t) + + // submit the first point and enter an auction + submitPointWithDifference(t, perp, points[0], expectedTWAP) + + // funding period ends so we have a carry-over + end := points[0].t + int64(2*time.Second) + fundingPayment := whenTheFundingPeriodEnds(t, perp, end) + assert.Equal(t, int64(expectedTWAP), fundingPayment.Int64()) + + whenAuctionStateChanges(t, perp, points[1].t, true) + + // now add another just an internal point + perp.broker.EXPECT().Send(gomock.Any()).Times(1) + require.NoError(t, perp.perpetual.SubmitDataPoint(context.Background(), points[2].price, points[2].t)) + + end = points[2].t - int64(500*time.Millisecond) + fundingPayment = whenTheFundingPeriodEnds(t, perp, end) + assert.Equal(t, int64(expectedTWAP), fundingPayment.Int64()) +} + +func testPastFundingPayment(t *testing.T) { + perp := testPerpetual(t) + defer perp.ctrl.Finish() + expectedTWAP := 100000000000 + // set of the data points such that difference in averages is 0 + points := getTestDataPoints(t) + + // tell the perpetual that we are ready to accept settlement stuff + whenLeaveOpeningAuction(t, perp, points[0].t) + + // submit the first point and enter an auction + submitPointWithDifference(t, perp, points[0], expectedTWAP) + + // funding period ends so we have a carry-over + end := points[0].t + int64(2*time.Second) + fundingPayment := whenTheFundingPeriodEnds(t, perp, end) + assert.Equal(t, int64(expectedTWAP), fundingPayment.Int64()) + + // now add another just an internal point + perp.broker.EXPECT().Send(gomock.Any()).Times(1) + require.NoError(t, perp.perpetual.SubmitDataPoint(context.Background(), points[2].price, points[2].t)) + + end = points[2].t - int64(500*time.Millisecond) + fundingPayment = whenTheFundingPeriodEnds(t, perp, end) + assert.Equal(t, int64(expectedTWAP), fundingPayment.Int64()) +} + +func whenTheFundingPeriodEnds(t *testing.T, perp *tstPerp, now int64) *num.Int { + t.Helper() + ctx := context.Background() + var fundingPayment *num.Numeric + fn := func(_ context.Context, fp *num.Numeric) { + fundingPayment = fp + } + perp.perpetual.SetSettlementListener(fn) + perp.broker.EXPECT().Send(gomock.Any()).Times(2) + perp.broker.EXPECT().SendBatch(gomock.Any()).Times(1) + perp.perpetual.PromptSettlementCue(ctx, now) + require.NotNil(t, fundingPayment) + require.True(t, fundingPayment.IsInt()) + return fundingPayment.Int() +} + +func getFundingPayment(t *testing.T, perp *tstPerp, now int64) string { + t.Helper() + data := perp.perpetual.GetData(now).Data.(*types.PerpetualData) + return data.FundingPayment +} + +func getFundingRate(t *testing.T, perp *tstPerp, now int64) string { + t.Helper() + data := perp.perpetual.GetData(now).Data.(*types.PerpetualData) + return data.FundingRate +} + +func between(p, q int64) int64 { + return (p + q) / 2 +} diff --git a/core/products/perpetual_snapshot.go b/core/products/perpetual_snapshot.go index 989b653fd3..e4c0f00a97 100644 --- a/core/products/perpetual_snapshot.go +++ b/core/products/perpetual_snapshot.go @@ -21,11 +21,47 @@ import ( "code.vegaprotocol.io/vega/core/execution/common" "code.vegaprotocol.io/vega/core/types" + vgcontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" ) +func NewCachedTWAPFromSnapshot( + log *logging.Logger, + t int64, + auctions *auctionIntervals, + state *snapshotpb.TWAPData, + points []*snapshotpb.DataPoint, +) *cachedTWAP { + sum, _ := num.UintFromString(state.SumProduct, 10) + c := &cachedTWAP{ + log: log, + periodStart: t, + start: state.Start, + end: state.End, + sumProduct: sum, + auctions: auctions, + } + c.points = make([]*dataPoint, 0, len(points)) + for _, v := range points { + price, overflow := num.UintFromString(v.Price, 10) + if overflow { + log.Panic("invalid snapshot state in external data point", logging.String("price", v.Price), logging.Bool("overflow", overflow)) + } + c.points = append(c.points, &dataPoint{price: price, t: v.Timestamp}) + } + return c +} + +func (c *cachedTWAP) serialise() *snapshotpb.TWAPData { + return &snapshotpb.TWAPData{ + Start: c.start, + End: c.end, + SumProduct: c.sumProduct.String(), + } +} + func NewPerpetualFromSnapshot( ctx context.Context, log *logging.Logger, @@ -46,28 +82,40 @@ func NewPerpetualFromSnapshot( return nil, err } - perps.externalTWAP = NewCachedTWAP(log, state.StartedAt) - perps.internalTWAP = NewCachedTWAP(log, state.StartedAt) + perps.startedAt = state.StartedAt + perps.seq = state.Seq - for _, v := range state.ExternalDataPoint { - price, overflow := num.UintFromString(v.Price, 10) - if overflow { - log.Panic("invalid snapshot state in external data point", logging.String("price", v.Price), logging.Bool("overflow", overflow)) + if vgcontext.InProgressUpgradeFrom(ctx, "v0.73.13") { + // do it the old way where we'd regenerate the cached values by adding the points again + perps.externalTWAP = NewCachedTWAP(log, state.StartedAt, perps.auctions) + perps.internalTWAP = NewCachedTWAP(log, state.StartedAt, perps.auctions) + + for _, v := range state.ExternalDataPoint { + price, overflow := num.UintFromString(v.Price, 10) + if overflow { + log.Panic("invalid snapshot state in external data point", logging.String("price", v.Price), logging.Bool("overflow", overflow)) + } + perps.externalTWAP.addPoint(&dataPoint{price: price, t: v.Timestamp}) } - perps.externalTWAP.addPoint(&dataPoint{price: price, t: v.Timestamp}) - } - for _, v := range state.InternalDataPoint { - price, overflow := num.UintFromString(v.Price, 10) - if overflow { - log.Panic("invalid snapshot state in internal data point", logging.String("price", v.Price), logging.Bool("overflow", overflow)) + for _, v := range state.InternalDataPoint { + price, overflow := num.UintFromString(v.Price, 10) + if overflow { + log.Panic("invalid snapshot state in internal data point", logging.String("price", v.Price), logging.Bool("overflow", overflow)) + } + perps.internalTWAP.addPoint(&dataPoint{price: price, t: v.Timestamp}) } - perps.internalTWAP.addPoint(&dataPoint{price: price, t: v.Timestamp}) + return perps, nil } - perps.startedAt = state.StartedAt - perps.seq = state.Seq + perps.auctions = &auctionIntervals{ + auctionStart: state.AuctionIntervals.AuctionStart, + auctions: state.AuctionIntervals.T, + total: state.AuctionIntervals.Total, + } + perps.externalTWAP = NewCachedTWAPFromSnapshot(log, state.StartedAt, perps.auctions, state.ExternalTwapData, state.ExternalDataPoint) + perps.internalTWAP = NewCachedTWAPFromSnapshot(log, state.StartedAt, perps.auctions, state.InternalTwapData, state.InternalDataPoint) return perps, nil } @@ -78,6 +126,13 @@ func (p *Perpetual) Serialize() *snapshotpb.Product { StartedAt: p.startedAt, ExternalDataPoint: make([]*snapshotpb.DataPoint, 0, len(p.internalTWAP.points)), InternalDataPoint: make([]*snapshotpb.DataPoint, 0, len(p.externalTWAP.points)), + AuctionIntervals: &snapshotpb.AuctionIntervals{ + AuctionStart: p.auctions.auctionStart, + T: p.auctions.auctions, + Total: p.auctions.total, + }, + ExternalTwapData: p.externalTWAP.serialise(), + InternalTwapData: p.internalTWAP.serialise(), } for _, v := range p.externalTWAP.points { diff --git a/core/products/perpetual_snapshot_test.go b/core/products/perpetual_snapshot_test.go index 111f20628c..0e819d86f2 100644 --- a/core/products/perpetual_snapshot_test.go +++ b/core/products/perpetual_snapshot_test.go @@ -43,44 +43,53 @@ import ( func TestPerpetualSnapshot(t *testing.T) { perps := testPerpetual(t) - + defer perps.ctrl.Finish() + expectedTWAP := 1234 // set of the data points such that difference in averages is 0 points := getTestDataPoints(t) - ctx := context.Background() + require.GreaterOrEqual(t, 4, len(points)) // tell the perpetual that we are ready to accept settlement stuff - perps.broker.EXPECT().Send(gomock.Any()).Times(1) - perps.perpetual.OnLeaveOpeningAuction(ctx, 1000) - - // send in some data points - perps.broker.EXPECT().Send(gomock.Any()).Times(len(points) * 2) - for _, p := range points { - // send in an external and a matching internal - require.NoError(t, perps.perpetual.SubmitDataPoint(ctx, p.price, p.t)) - perps.perpetual.AddTestExternalPoint(ctx, p.price, p.t) - } + whenLeaveOpeningAuction(t, perps, points[0].t) + + // submit the first point then enter an auction + submitPointWithDifference(t, perps, points[0], expectedTWAP) + whenAuctionStateChanges(t, perps, points[0].t+int64(time.Second), true) + + // submit a crazy point difference, then a normal point + submitPointWithDifference(t, perps, points[1], -9999999) + submitPointWithDifference(t, perps, points[2], expectedTWAP) + + // now we leave auction and the crazy point difference will not affect the TWAP because it was in an auction period + whenAuctionStateChanges(t, perps, points[2].t+int64(time.Second), false) + + fundingPayment := getFundingPayment(t, perps, points[3].t) + assert.Equal(t, "1234", fundingPayment) + fundingPayment = getFundingPayment(t, perps, points[3].t) + assert.Equal(t, "1234", fundingPayment) // now get the serialised state, and try to load it state1 := perps.perpetual.Serialize() - serialized1, err := proto.Marshal(state1) assert.NoError(t, err) - state2 := &snapshotpb.Product{} - err = proto.Unmarshal(serialized1, state2) + payload := &snapshotpb.Product{} + err = proto.Unmarshal(serialized1, payload) assert.NoError(t, err) - restoreTime := time.Unix(1000000, 100) - perps2, scheduleSrc := testPerpetualSnapshot(t, perps.ctrl, state2, restoreTime) + restoreTime := time.Unix(0, points[3].t) // time.Unix(1000000, 100) + perps2, scheduleSrc := testPerpetualSnapshot(t, perps.ctrl, payload, restoreTime) // now we serialize again, and check the payload are same - - state3 := perps2.perpetual.Serialize() - serialized2, err := proto.Marshal(state3) + state2 := perps2.perpetual.Serialize() + serialized2, err := proto.Marshal(state2) assert.NoError(t, err) - assert.Equal(t, serialized1, serialized2) + // check funding payment comes out the same + fundingPayment = getFundingPayment(t, perps2, points[3].t) + assert.Equal(t, "1234", fundingPayment) + // check the the time-trigger has been set properly cfg := scheduleSrc.Data.GetInternalTimeTriggerSpecConfiguration() diff --git a/core/products/perpetual_test.go b/core/products/perpetual_test.go index 57d378c825..a05995d5e7 100644 --- a/core/products/perpetual_test.go +++ b/core/products/perpetual_test.go @@ -38,6 +38,7 @@ import ( "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -47,7 +48,7 @@ func TestPeriodicSettlement(t *testing.T) { t.Run("incoming data ignored before leaving opening auction", testIncomingDataIgnoredBeforeLeavingOpeningAuction) t.Run("period end with no data point", testPeriodEndWithNoDataPoints) t.Run("equal internal and external prices", testEqualInternalAndExternalPrices) - t.Run("constant difference long pays short", TestConstantDifferenceLongPaysShort) + t.Run("constant difference long pays short", testConstantDifferenceLongPaysShort) t.Run("data points outside of period", testDataPointsOutsidePeriod) t.Run("data points not on boundary", testDataPointsNotOnBoundary) t.Run("matching data points outside of period through callbacks", testRegisteredCallbacks) @@ -56,102 +57,74 @@ func TestPeriodicSettlement(t *testing.T) { t.Run("funding payments with interest rate clamped", testFundingPaymentsWithInterestRateClamped) t.Run("terminate perps market test", testTerminateTrading) t.Run("margin increase", testGetMarginIncrease) - t.Run("margin increase, negative payment", TestGetMarginIncreaseNegativePayment) + t.Run("margin increase, negative payment", testGetMarginIncreaseNegativePayment) t.Run("test pathological case with out of order points", testOutOfOrderPointsBeforePeriodStart) t.Run("test update perpetual", testUpdatePerpetual) t.Run("test terminate trading coincides with time trigger", testTerminateTradingCoincidesTimeTrigger) + t.Run("test funding-payment on start boundary", testFundingPaymentOnStartBoundary) + t.Run("test data point is before the first point", TestPrependPoint) } -func TestExternalDataPointTWAPInSequence(t *testing.T) { - perp := testPerpetual(t) - defer perp.ctrl.Finish() - - ctx := context.Background() - tstData, err := getGQLData() - require.NoError(t, err) - data := tstData.GetDataPoints() - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - - // want to start the period from before the point with the smallest time - seq := math.MaxInt - st := data[0].t - for i := 0; i < len(data); i++ { - if data[i].t < st { - st = data[i].t - } - seq = num.MinV(seq, data[i].seq) - } - // leave opening auction - perp.perpetual.OnLeaveOpeningAuction(ctx, st-1) - - // set the first internal data-point - // perp.broker.EXPECT().Send(gomock.Any()).Times(1) - // perp.perpetual.SubmitDataPoint(ctx, data[0].price.Clone(), data[0].t) - for i, dp := range data { - if dp.seq > seq { - perp.broker.EXPECT().Send(gomock.Any()).Times(2) - if dp.seq == 2 { - perp.broker.EXPECT().SendBatch(gomock.Any()).Times(1) - } - perp.perpetual.PromptSettlementCue(ctx, dp.t) - seq = dp.seq - } - check := func(e events.Event) { - de, ok := e.(*events.FundingPeriodDataPoint) - require.True(t, ok) - dep := de.Proto() - if dep.Twap == "0" { - return - } - require.Equal(t, dp.twap.String(), dep.Twap, fmt.Sprintf("IDX: %d\n%#v\n", i, dep)) - } - perp.broker.EXPECT().Send(gomock.Any()).Times(1).Do(check) - perp.perpetual.AddTestExternalPoint(ctx, dp.price, dp.t) +func TestRealData(t *testing.T) { + tcs := []struct { + name string + reverse bool + }{ + { + "in order", + false, + }, + { + "out of order", + false, + }, } -} -func TestExternalDataPointTWAPOutSequence(t *testing.T) { - perp := testPerpetual(t) - defer perp.ctrl.Finish() + for _, tc := range tcs { + t.Run(tc.name, func(tt *testing.T) { + perp := testPerpetual(t) + defer perp.ctrl.Finish() + + ctx := context.Background() + tstData, err := getGQLData() + require.NoError(t, err) + data := tstData.GetDataPoints(false) + + // want to start the period from before the point with the smallest time + seq := math.MaxInt + st := data[0].t + nd := data[0].t + for i := 0; i < len(data); i++ { + if data[i].t < st { + st = data[i].t + } + if data[i].t > nd { + nd = data[i].t + } + seq = num.MinV(seq, data[i].seq) + } - ctx := context.Background() - tstData, err := getGQLData() - require.NoError(t, err) - data := tstData.GetDataPoints() - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - // leave opening auction - perp.perpetual.OnLeaveOpeningAuction(ctx, data[0].t-1) - - seq := data[0].seq - last := 0 - for i := 0; i < len(data); i++ { - if data[i].seq != seq { - break - } - last = i - } - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - // add the first (earliest) data-point first - perp.perpetual.AddTestExternalPoint(ctx, data[0].price, data[0].t) - // submit external data points in non-sequential order - for j := last; j < 0; j-- { - dp := data[j] - if dp.seq > seq { - // break - perp.broker.EXPECT().Send(gomock.Any()).Times(2) - perp.perpetual.PromptSettlementCue(ctx, dp.t) - } - check := func(e events.Event) { - de, ok := e.(*events.FundingPeriodDataPoint) - require.True(t, ok) - dep := de.Proto() - if dep.Twap == "0" { - return + perp.perpetual.SetSettlementListener(func(context.Context, *num.Numeric) {}) + // leave opening auction + whenLeaveOpeningAuction(t, perp, st-1) + + perp.broker.EXPECT().Send(gomock.Any()).AnyTimes() + perp.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() + + // set the first internal data-point + for _, dp := range data { + if dp.seq > seq { + perp.perpetual.PromptSettlementCue(ctx, dp.t) + seq = dp.seq + } + perp.perpetual.AddTestExternalPoint(ctx, dp.price, dp.t) + perp.perpetual.SubmitDataPoint(ctx, num.UintZero().Add(dp.price, num.NewUint(100)), dp.t) } - require.Equal(t, dp.twap.String(), dep.Twap, fmt.Sprintf("IDX: %d\n%#v\n", j, dep)) - } - perp.broker.EXPECT().Send(gomock.Any()).Times(1).Do(check) - perp.perpetual.AddTestExternalPoint(ctx, dp.price, dp.t) + d := perp.perpetual.GetData(nd).Data.(*types.PerpetualData) + assert.Equal(t, "29124220000", d.ExternalTWAP) + assert.Equal(t, "29124220100", d.InternalTWAP) + assert.Equal(t, "100", d.FundingPayment) + }) } } @@ -176,6 +149,7 @@ func testPeriodEndWithNoDataPoints(t *testing.T) { defer perp.ctrl.Finish() ctx := context.Background() + now := time.Unix(1, 0) // funding payment will be zero because there are no data points var called bool @@ -184,16 +158,70 @@ func testPeriodEndWithNoDataPoints(t *testing.T) { } perp.perpetual.SetSettlementListener(fn) - perp.broker.EXPECT().Send(gomock.Any()).Times(2) - perp.perpetual.OnLeaveOpeningAuction(ctx, 1000) + whenLeaveOpeningAuction(t, perp, now.UnixNano()) - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - perp.perpetual.PromptSettlementCue(ctx, 1040) + perp.broker.EXPECT().Send(gomock.Any()).Times(2) + perp.perpetual.PromptSettlementCue(ctx, now.Add(40*time.Second).UnixNano()) // we had no points to check we didn't call into listener assert.False(t, called) } +func TestPrependPoint(t *testing.T) { + perp := testPerpetual(t) + defer perp.ctrl.Finish() + + ctx := context.Background() + now := time.Unix(1000, 0) + whenLeaveOpeningAuction(t, perp, now.UnixNano()) + + perp.broker.EXPECT().Send(gomock.Any()).AnyTimes() + + // we'll use this point to check that we do not lose a later point when we recalc when earlier points come in + err := perp.perpetual.SubmitDataPoint(ctx, num.NewUint(10), time.Unix(5000, 0).UnixNano()) + perp.perpetual.AddTestExternalPoint(ctx, num.NewUint(9), time.Unix(5000, 0).UnixNano()) + require.NoError(t, err) + require.Equal(t, "1", getFundingPayment(t, perp, time.Unix(5000, 0).UnixNano())) + + // first point is after the start of the period + err = perp.perpetual.SubmitDataPoint(ctx, num.NewUint(10), time.Unix(2000, 0).UnixNano()) + require.NoError(t, err) + require.Equal(t, "1", getFundingPayment(t, perp, time.Unix(5000, 0).UnixNano())) + + // now another one comes in before this, but also after the start of the period + err = perp.perpetual.SubmitDataPoint(ctx, num.NewUint(50), time.Unix(1500, 0).UnixNano()) + require.NoError(t, err) + require.Equal(t, "6", getFundingPayment(t, perp, time.Unix(5000, 0).UnixNano())) + + // now one comes in before the start of the period + err = perp.perpetual.SubmitDataPoint(ctx, num.NewUint(50), time.Unix(500, 0).UnixNano()) + require.NoError(t, err) + require.Equal(t, "11", getFundingPayment(t, perp, time.Unix(5000, 0).UnixNano())) + + // now one comes in before this point + err = perp.perpetual.SubmitDataPoint(ctx, num.UintOne(), time.Unix(250, 0).UnixNano()) + require.ErrorIs(t, err, products.ErrDataPointIsTooOld) + require.Equal(t, "11", getFundingPayment(t, perp, time.Unix(5000, 0).UnixNano())) + + // now one comes in after the first point, but before the period start + err = perp.perpetual.SubmitDataPoint(ctx, num.UintOne(), time.Unix(500, 0).UnixNano()) + require.ErrorIs(t, err, products.ErrDataPointAlreadyExistsAtTime) + require.Equal(t, "11", getFundingPayment(t, perp, time.Unix(5000, 0).UnixNano())) + + // now one comes in after the first point, but before the period start + err = perp.perpetual.SubmitDataPoint(ctx, num.NewUint(50), time.Unix(750, 0).UnixNano()) + require.NoError(t, err) + require.Equal(t, "11", getFundingPayment(t, perp, time.Unix(5000, 0).UnixNano())) + + // now one comes that equals period start + err = perp.perpetual.SubmitDataPoint(ctx, num.NewUint(50), time.Unix(1000, 0).UnixNano()) + require.NoError(t, err) + require.Equal(t, "11", getFundingPayment(t, perp, time.Unix(5000, 0).UnixNano())) + + err = perp.perpetual.SubmitDataPoint(ctx, num.NewUint(100000), time.Unix(750, 0).UnixNano()) + require.ErrorIs(t, err, products.ErrDataPointIsTooOld) +} + func testEqualInternalAndExternalPrices(t *testing.T) { perp := testPerpetual(t) defer perp.ctrl.Finish() @@ -203,8 +231,7 @@ func testEqualInternalAndExternalPrices(t *testing.T) { points := getTestDataPoints(t) // tell the perpetual that we are ready to accept settlement stuff - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - perp.perpetual.OnLeaveOpeningAuction(ctx, points[0].t) + whenLeaveOpeningAuction(t, perp, points[0].t) // send in some data points perp.broker.EXPECT().Send(gomock.Any()).Times(len(points) * 2) @@ -229,7 +256,7 @@ func testEqualInternalAndExternalPrices(t *testing.T) { assert.Equal(t, "0", fundingPayment.String()) } -func TestConstantDifferenceLongPaysShort(t *testing.T) { +func testConstantDifferenceLongPaysShort(t *testing.T) { perp := testPerpetual(t) defer perp.ctrl.Finish() ctx := context.Background() @@ -238,8 +265,7 @@ func TestConstantDifferenceLongPaysShort(t *testing.T) { points := getTestDataPoints(t) // when: the funding period starts at 1000 - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - perp.perpetual.OnLeaveOpeningAuction(ctx, 1000) + whenLeaveOpeningAuction(t, perp, points[0].t) // and: the difference in external/internal prices are a constant -10 submitDataWithDifference(t, perp, points, -10) @@ -266,6 +292,8 @@ func TestConstantDifferenceLongPaysShort(t *testing.T) { assert.Equal(t, "116", perpData.ExternalTWAP) assert.Equal(t, "106", perpData.InternalTWAP) assert.Equal(t, "-0.0862068965517241", perpData.FundingRate) + assert.Equal(t, uint64(0), perpData.SeqNum) + assert.Equal(t, int64(3600000000000), perpData.StartTime) } func testDataPointsOutsidePeriod(t *testing.T) { @@ -277,8 +305,7 @@ func testDataPointsOutsidePeriod(t *testing.T) { points := getTestDataPoints(t) // tell the perpetual that we are ready to accept settlement stuff - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - perp.perpetual.OnLeaveOpeningAuction(ctx, points[0].t) + whenLeaveOpeningAuction(t, perp, points[0].t) // add data-points from the past, they will just be ignored perp.broker.EXPECT().Send(gomock.Any()).Times(2) @@ -327,8 +354,7 @@ func testDataPointsNotOnBoundary(t *testing.T) { points := getTestDataPoints(t) // start time is *after* our first data points - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - perp.perpetual.OnLeaveOpeningAuction(ctx, 1005) + whenLeaveOpeningAuction(t, perp, points[0].t+int64(time.Second)) // send in some data points submitDataWithDifference(t, perp, points, 10) @@ -355,9 +381,7 @@ func testOutOfOrderPointsBeforePeriodStart(t *testing.T) { ctx := context.Background() // start time will be after the *second* data point - perp.broker.EXPECT().Send(gomock.Any()).AnyTimes() - perp.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() - perp.perpetual.OnLeaveOpeningAuction(ctx, 1693398617000000000) + whenLeaveOpeningAuction(t, perp, 1693398617000000000) price := num.NewUint(100000000) timestamps := []int64{ @@ -368,6 +392,8 @@ func testOutOfOrderPointsBeforePeriodStart(t *testing.T) { 1693398617000000000, } + perp.broker.EXPECT().Send(gomock.Any()).AnyTimes() + perp.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() for _, tt := range timestamps { perp.perpetual.AddTestExternalPoint(ctx, price, tt) perp.perpetual.SubmitDataPoint(ctx, num.UintZero().Add(price, num.NewUint(100000000)), tt) @@ -423,8 +449,8 @@ func testRegisteredCallbacks(t *testing.T) { require.NotNil(t, period) // register the callback perpetual.NotifyOnSettlementData(marketSettle) - - perpetual.OnLeaveOpeningAuction(ctx, points[0].t) + ts.EXPECT().GetTimeNow().Times(1).Return(time.Unix(0, points[0].t)) + perpetual.UpdateAuctionState(ctx, false) for _, p := range points { // send in an external and a matching internal @@ -504,7 +530,8 @@ func testRegisteredCallbacksWithDifferentData(t *testing.T) { perpetual.NotifyOnSettlementData(marketSettle) // start the funding period - perpetual.OnLeaveOpeningAuction(ctx, points[0].t) + ts.EXPECT().GetTimeNow().Times(1).Return(time.Unix(0, points[0].t)) + perpetual.UpdateAuctionState(ctx, false) // send data in from before the start of the period, it should not affect the result require.NoError(t, perpetual.SubmitDataPoint(ctx, num.UintOne(), points[0].t-int64(time.Hour))) @@ -559,7 +586,11 @@ func testRegisteredCallbacksWithDifferentData(t *testing.T) { } func testFundingPaymentsWithInterestRate(t *testing.T) { - perp := testPerpetualWithOpts(t, "0.01", "-1", "1", "0") + perp := testPerpetual(t) + perp.perp.InterestRate = num.DecimalFromFloat(0.01) + perp.perp.ClampLowerBound = num.DecimalFromInt64(-1) + perp.perp.ClampUpperBound = num.DecimalFromInt64(1) + defer perp.ctrl.Finish() ctx := context.Background() @@ -568,8 +599,7 @@ func testFundingPaymentsWithInterestRate(t *testing.T) { lastPoint := points[len(points)-1] // when: the funding period starts - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - perp.perpetual.OnLeaveOpeningAuction(ctx, points[0].t) + whenLeaveOpeningAuction(t, perp, points[0].t) // scale the price so that we have more precision to work with scale := num.UintFromUint64(100000000000) @@ -607,16 +637,18 @@ func testFundingPaymentsWithInterestRate(t *testing.T) { } func testFundingPaymentsWithInterestRateClamped(t *testing.T) { - perp := testPerpetualWithOpts(t, "0.5", "0.001", "0.002", "0") + perp := testPerpetual(t) defer perp.ctrl.Finish() + perp.perp.InterestRate = num.DecimalFromFloat(0.5) + perp.perp.ClampLowerBound = num.DecimalFromFloat(0.001) + perp.perp.ClampUpperBound = num.DecimalFromFloat(0.002) ctx := context.Background() // test data points := getTestDataPoints(t) // when: the funding period starts - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - perp.perpetual.OnLeaveOpeningAuction(ctx, points[0].t) + whenLeaveOpeningAuction(t, perp, points[0].t) // scale the price so that we have more precision to work with scale := num.UintFromUint64(100000000000) @@ -665,8 +697,7 @@ func testTerminateTrading(t *testing.T) { points := getTestDataPoints(t) // tell the perpetual that we are ready to accept settlement stuff - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - perp.perpetual.OnLeaveOpeningAuction(ctx, points[0].t) + whenLeaveOpeningAuction(t, perp, points[0].t) // send in some data points perp.broker.EXPECT().Send(gomock.Any()).Times(len(points) * 2) @@ -700,8 +731,7 @@ func testTerminateTradingCoincidesTimeTrigger(t *testing.T) { points := getTestDataPoints(t) // tell the perpetual that we are ready to accept settlement stuff - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - perp.perpetual.OnLeaveOpeningAuction(ctx, points[0].t) + whenLeaveOpeningAuction(t, perp, points[0].t) // send in some data points perp.broker.EXPECT().Send(gomock.Any()).Times(len(points) * 2) @@ -737,10 +767,9 @@ func testTerminateTradingCoincidesTimeTrigger(t *testing.T) { } func testGetMarginIncrease(t *testing.T) { - // margin factor is 0.5 - perp := testPerpetualWithOpts(t, "0", "0", "0", "0.5") + perp := testPerpetual(t) defer perp.ctrl.Finish() - ctx := context.Background() + perp.perp.MarginFundingFactor = num.DecimalFromFloat(0.5) // test data points := getTestDataPoints(t) @@ -750,8 +779,7 @@ func testGetMarginIncrease(t *testing.T) { assert.Equal(t, "0", inc.String()) // start funding period - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - perp.perpetual.OnLeaveOpeningAuction(ctx, 1000) + whenLeaveOpeningAuction(t, perp, points[0].t) // started interval, but not points, margin increase is 0 inc = perp.perpetual.GetMarginIncrease(points[0].t) @@ -766,18 +794,16 @@ func testGetMarginIncrease(t *testing.T) { assert.Equal(t, "5", inc.String()) } -func TestGetMarginIncreaseNegativePayment(t *testing.T) { - // margin factor is 0.5 - perp := testPerpetualWithOpts(t, "0", "0", "0", "0.5") +func testGetMarginIncreaseNegativePayment(t *testing.T) { + perp := testPerpetual(t) defer perp.ctrl.Finish() - ctx := context.Background() + perp.perp.MarginFundingFactor = num.DecimalFromFloat(0.5) // test data points := getTestDataPoints(t) // start funding period - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - perp.perpetual.OnLeaveOpeningAuction(ctx, 1000) + whenLeaveOpeningAuction(t, perp, points[0].t) // and: the difference in external/internal prices are is 10 submitDataWithDifference(t, perp, points, -10) @@ -789,15 +815,14 @@ func TestGetMarginIncreaseNegativePayment(t *testing.T) { } func testUpdatePerpetual(t *testing.T) { - // margin factor is 0.5 - perp := testPerpetualWithOpts(t, "0", "0", "0", "0.5") + perp := testPerpetual(t) defer perp.ctrl.Finish() + perp.perp.MarginFundingFactor = num.DecimalFromFloat(0.5) ctx := context.Background() // test data points := getTestDataPoints(t) - perp.broker.EXPECT().Send(gomock.Any()).Times(1) - perp.perpetual.OnLeaveOpeningAuction(ctx, 1000) + whenLeaveOpeningAuction(t, perp, points[0].t) submitDataWithDifference(t, perp, points, 10) // query margin factor before update @@ -823,24 +848,126 @@ func testUpdatePerpetual(t *testing.T) { assert.NoError(t, perp.perpetual.SubmitDataPoint(ctx, num.NewUint(123), lastPoint.t+int64(time.Hour))) } +func testFundingPaymentOnStartBoundary(t *testing.T) { + perp := testPerpetual(t) + defer perp.ctrl.Finish() + // set of the data points such that difference in averages is 0 + points := getTestDataPoints(t) + + // tell the perpetual that we are ready to accept settlement stuff + st := points[0].t + whenLeaveOpeningAuction(t, perp, st) + + expectedTWAP := 100 + // send in data points at this time + submitPointWithDifference(t, perp, points[0], expectedTWAP) + + // now get the funding-payment at this time + fundingPayment := getFundingPayment(t, perp, st) + assert.Equal(t, "100", fundingPayment) +} + +func TestFundingPaymentModifiers(t *testing.T) { + cases := []struct { + twapDifference int + scalingFactor *num.Decimal + upperBound *num.Decimal + lowerBound *num.Decimal + expectedFundingPayment string + expectedFundingRate string + }{ + { + twapDifference: 220, + scalingFactor: ptr.From(num.DecimalFromFloat(0.5)), + expectedFundingPayment: "110", + expectedFundingRate: "1", + }, + { + twapDifference: 1100, + scalingFactor: ptr.From(num.DecimalFromFloat(1.5)), + expectedFundingPayment: "1650", + expectedFundingRate: "15", + }, + { + twapDifference: 100, + upperBound: ptr.From(num.DecimalFromFloat(0.5)), + expectedFundingPayment: "55", // 0.5 * external-twap < diff, so snap to 0.5 + expectedFundingRate: "0.5", + }, + { + twapDifference: 5, + lowerBound: ptr.From(num.DecimalFromFloat(0.5)), + expectedFundingPayment: "55", // 0.5 * external-twap > 5, so snap to 0.5 + expectedFundingRate: "0.5", + }, + { + twapDifference: 1100, + scalingFactor: ptr.From(num.DecimalFromFloat(1.5)), + upperBound: ptr.From(num.DecimalFromFloat(0.5)), + expectedFundingPayment: "55", + expectedFundingRate: "0.5", + }, + } + + for _, c := range cases { + perp := testPerpetual(t) + defer perp.ctrl.Finish() + + // set modifiers + perp.perp.FundingRateScalingFactor = c.scalingFactor + perp.perp.FundingRateLowerBound = c.lowerBound + perp.perp.FundingRateUpperBound = c.upperBound + + // tell the perpetual that we are ready to accept settlement stuff + points := getTestDataPoints(t) + whenLeaveOpeningAuction(t, perp, points[0].t) + submitPointWithDifference(t, perp, points[0], c.twapDifference) + + // check the goods + fundingPayment := getFundingPayment(t, perp, points[0].t) + assert.Equal(t, c.expectedFundingPayment, fundingPayment) + + fundingRate := getFundingRate(t, perp, points[0].t) + assert.Equal(t, c.expectedFundingRate, fundingRate) + } +} + // submits the given data points as both external and interval but with the given different added to the internal price. func submitDataWithDifference(t *testing.T, perp *tstPerp, points []*testDataPoint, diff int) { + t.Helper() + for _, p := range points { + submitPointWithDifference(t, perp, p, diff) + } +} + +// submits the single data point as both external and internal but with a differece in price. +func submitPointWithDifference(t *testing.T, perp *tstPerp, p *testDataPoint, diff int) { t.Helper() ctx := context.Background() var internalPrice *num.Uint - perp.broker.EXPECT().Send(gomock.Any()).Times(len(points) * 2) - for _, p := range points { - perp.perpetual.AddTestExternalPoint(ctx, p.price, p.t) + perp.broker.EXPECT().Send(gomock.Any()).Times(2) + perp.perpetual.AddTestExternalPoint(ctx, p.price, p.t) - if diff > 0 { - internalPrice = num.UintZero().Add(p.price, num.NewUint(uint64(diff))) - } - if diff < 0 { - internalPrice = num.UintZero().Sub(p.price, num.NewUint(uint64(-diff))) - } - require.NoError(t, perp.perpetual.SubmitDataPoint(ctx, internalPrice, p.t)) + if diff > 0 { + internalPrice = num.UintZero().Add(p.price, num.NewUint(uint64(diff))) + } + if diff < 0 { + internalPrice = num.UintZero().Sub(p.price, num.NewUint(uint64(-diff))) } + require.NoError(t, perp.perpetual.SubmitDataPoint(ctx, internalPrice, p.t)) +} + +func whenLeaveOpeningAuction(t *testing.T, perp *tstPerp, now int64) { + t.Helper() + perp.broker.EXPECT().Send(gomock.Any()).Times(1) + whenAuctionStateChanges(t, perp, now, false) +} + +func whenAuctionStateChanges(t *testing.T, perp *tstPerp, now int64, enter bool) { + t.Helper() + perp.ts.EXPECT().GetTimeNow().Times(1).Return(time.Unix(0, now)) + perp.perpetual.UpdateAuctionState(context.Background(), enter) } type testDataPoint struct { @@ -895,11 +1022,6 @@ func (tp *tstPerp) unsubscribe(_ context.Context, _ spec.SubscriptionID) { func testPerpetual(t *testing.T) *tstPerp { t.Helper() - return testPerpetualWithOpts(t, "0", "0", "0", "0") -} - -func testPerpetualWithOpts(t *testing.T, interestRate, clampLowerBound, clampUpperBound, marginFactor string) *tstPerp { - t.Helper() log := logging.NewTestLogger() ctrl := gomock.NewController(t) @@ -918,10 +1040,6 @@ func testPerpetualWithOpts(t *testing.T, interestRate, clampLowerBound, clampUpp tp.oe.EXPECT().Subscribe(gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes().Return(spec.SubscriptionID(1), tp.unsubscribe, nil) perpetual, err := products.NewPerpetual(context.Background(), log, perp, "", ts, oe, broker, 1) - perp.InterestRate = num.MustDecimalFromString(interestRate) - perp.ClampLowerBound = num.MustDecimalFromString(clampLowerBound) - perp.ClampUpperBound = num.MustDecimalFromString(clampUpperBound) - perp.MarginFundingFactor = num.MustDecimalFromString(marginFactor) if err != nil { t.Fatalf("couldn't create a perp for testing: %v", err) } @@ -1553,21 +1671,25 @@ func getGQLData() (*GQL, error) { if err := json.Unmarshal([]byte(testData), &ret); err != nil { return nil, err } - ret.Sort() return &ret, nil } -func (g *GQL) Sort() { +func (g *GQL) Sort(reverse bool) { // group by sequence sort.SliceStable(g.Data.FundingDataPoints.Edges, func(i, j int) bool { + if g.Data.FundingDataPoints.Edges[i].Node.Seq == g.Data.FundingDataPoints.Edges[j].Node.Seq { + if reverse { + return g.Data.FundingDataPoints.Edges[i].Node.Timestamp.UnixNano() > g.Data.FundingDataPoints.Edges[j].Node.Timestamp.UnixNano() + } + return g.Data.FundingDataPoints.Edges[i].Node.Timestamp.UnixNano() < g.Data.FundingDataPoints.Edges[j].Node.Timestamp.UnixNano() + } + return g.Data.FundingDataPoints.Edges[i].Node.Seq < g.Data.FundingDataPoints.Edges[j].Node.Seq }) - for i, j := 0, len(g.Data.FundingDataPoints.Edges)-1; i < j; i, j = i+1, j-1 { - g.Data.FundingDataPoints.Edges[i], g.Data.FundingDataPoints.Edges[j] = g.Data.FundingDataPoints.Edges[j], g.Data.FundingDataPoints.Edges[i] - } } -func (g *GQL) GetDataPoints() []DataPoint { +func (g *GQL) GetDataPoints(reverse bool) []DataPoint { + g.Sort(reverse) ret := make([]DataPoint, 0, len(g.Data.FundingDataPoints.Edges)) for _, n := range g.Data.FundingDataPoints.Edges { p, _ := num.UintFromString(n.Node.Price, 10) diff --git a/core/products/products.go b/core/products/products.go index b083a3f84d..0c8f673af7 100644 --- a/core/products/products.go +++ b/core/products/products.go @@ -64,7 +64,7 @@ type Product interface { UnsubscribeTradingTerminated(ctx context.Context) UnsubscribeSettlementData(ctx context.Context) RestoreSettlementData(*num.Numeric) - OnLeaveOpeningAuction(context.Context, int64) + UpdateAuctionState(context.Context, bool) // tell the product about an internal data-point such as a the current mark-price SubmitDataPoint(context.Context, *num.Uint, int64) error diff --git a/core/products/products_test.go b/core/products/products_test.go index 95825963f7..32c82f962e 100644 --- a/core/products/products_test.go +++ b/core/products/products_test.go @@ -30,6 +30,7 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/protocol/all_services.go b/core/protocol/all_services.go index 6b8067571f..b16da16282 100644 --- a/core/protocol/all_services.go +++ b/core/protocol/all_services.go @@ -50,6 +50,7 @@ import ( "code.vegaprotocol.io/vega/core/netparams/dispatch" "code.vegaprotocol.io/vega/core/nodewallets" "code.vegaprotocol.io/vega/core/notary" + "code.vegaprotocol.io/vega/core/parties" "code.vegaprotocol.io/vega/core/pow" "code.vegaprotocol.io/vega/core/processor" "code.vegaprotocol.io/vega/core/protocolupgrade" @@ -84,6 +85,7 @@ type EthCallEngine interface { GetInitialTriggerTime(id string) (uint64, error) OnSpecActivated(ctx context.Context, spec datasource.Spec) error OnSpecDeactivated(ctx context.Context, spec datasource.Spec) + EnsureChainID(chainID string, confirmWithClient bool) } type allServices struct { @@ -124,6 +126,8 @@ type allServices struct { codec abci.Codec ethereumOraclesVerifier *ethverifier.Verifier + partiesEngine *parties.SnapshottedEngine + assets *assets.Service topology *validators.Topology notary *notary.SnapshotNotary @@ -154,6 +158,12 @@ type allServices struct { activityStreak *activitystreak.SnapshotEngine vesting *vesting.SnapshotEngine volumeDiscount *volumediscount.SnapshottedEngine + + // l2 stuff + // TODO: instantiate + l2Clients *ethclient.L2Clients + l2Verifiers *ethverifier.L2Verifiers + l2CallEngines *L2EthCallEngines } func newServices( @@ -167,6 +177,8 @@ func newServices( blockchainClient *blockchain.Client, vegaPaths paths.Paths, stats *stats.Stats, + + l2Clients *ethclient.L2Clients, ) (_ *allServices, err error) { svcs := &allServices{ ctx: ctx, @@ -174,6 +186,7 @@ func newServices( confWatcher: conf, conf: conf.Get(), ethClient: ethClient, + l2Clients: l2Clients, ethConfirmations: ethConfirmations, blockchainClient: blockchainClient, stats: stats, @@ -239,9 +252,14 @@ func newServices( svcs.ethCallEngine = ethcall.NewEngine(svcs.log, svcs.conf.EvtForward.EthCall, svcs.conf.IsValidator(), svcs.ethClient, svcs.eventForwarder) + svcs.l2CallEngines = NewL2EthCallEngines(svcs.log, svcs.conf.EvtForward.EthCall, svcs.conf.IsValidator(), svcs.l2Clients, svcs.eventForwarder, svcs.oracle.AddSpecActivationListener) + svcs.ethereumOraclesVerifier = ethverifier.New(svcs.log, svcs.witness, svcs.timeService, svcs.broker, svcs.oracle, svcs.ethCallEngine, svcs.ethConfirmations) + svcs.l2Verifiers = ethverifier.NewL2Verifiers(svcs.log, svcs.witness, svcs.timeService, svcs.broker, + svcs.oracle, svcs.l2Clients, svcs.l2CallEngines, svcs.conf.IsValidator()) + // Not using the activation event bus event here as on recovery the ethCallEngine needs to have all specs - is this necessary? svcs.oracle.AddSpecActivationListener(svcs.ethCallEngine) @@ -259,6 +277,8 @@ func newServices( svcs.teamsEngine = teams.NewSnapshottedEngine(svcs.broker, svcs.timeService) + svcs.partiesEngine = parties.NewSnapshottedEngine(svcs.broker) + svcs.statevar = statevar.New(svcs.log, svcs.conf.StateVar, svcs.broker, svcs.topology, svcs.commander) svcs.marketActivityTracker = common.NewMarketActivityTracker(svcs.log, svcs.teamsEngine, svcs.stakingAccounts) @@ -289,15 +309,19 @@ func newServices( svcs.volumeDiscount.OnEpochRestore, ) + svcs.banking = banking.New(svcs.log, svcs.conf.Banking, svcs.collateral, svcs.witness, svcs.timeService, svcs.assets, svcs.notary, svcs.broker, svcs.topology, svcs.marketActivityTracker, svcs.erc20BridgeView, svcs.eventForwarderEngine) + // instantiate the execution engine svcs.executionEngine = execution.NewEngine( - svcs.log, svcs.conf.Execution, svcs.timeService, svcs.collateral, svcs.oracle, svcs.broker, svcs.statevar, svcs.marketActivityTracker, svcs.assets, svcs.referralProgram, svcs.volumeDiscount, + svcs.log, svcs.conf.Execution, svcs.timeService, svcs.collateral, svcs.oracle, svcs.broker, svcs.statevar, + svcs.marketActivityTracker, svcs.assets, svcs.referralProgram, svcs.volumeDiscount, svcs.banking, ) svcs.epochService.NotifyOnEpoch(svcs.executionEngine.OnEpochEvent, svcs.executionEngine.OnEpochRestore) svcs.epochService.NotifyOnEpoch(svcs.marketActivityTracker.OnEpochEvent, svcs.marketActivityTracker.OnEpochRestore) + svcs.epochService.NotifyOnEpoch(svcs.banking.OnEpoch, svcs.banking.OnEpochRestore) + svcs.gastimator = processor.NewGastimator(svcs.executionEngine) - svcs.banking = banking.New(svcs.log, svcs.conf.Banking, svcs.collateral, svcs.witness, svcs.timeService, svcs.assets, svcs.notary, svcs.broker, svcs.topology, svcs.epochService, svcs.marketActivityTracker, svcs.erc20BridgeView, svcs.eventForwarderEngine) svcs.spam = spam.New(svcs.log, svcs.conf.Spam, svcs.epochService, svcs.stakingAccounts) if svcs.conf.Blockchain.ChainProvider == blockchain.ProviderNullChain { @@ -309,6 +333,12 @@ func newServices( svcs.delegation = delegation.New(svcs.log, svcs.conf.Delegation, svcs.broker, svcs.topology, svcs.stakingAccounts, svcs.epochService, svcs.timeService) } else { stakingLoop := nullchain.NewStakingLoop(svcs.collateral, svcs.assets) + svcs.netParams.Watch([]netparams.WatchParam{ + { + Param: netparams.RewardAsset, + Watcher: stakingLoop.OnStakingAsstUpdate, + }, + }...) svcs.governance = governance.NewEngine(svcs.log, svcs.conf.Governance, stakingLoop, svcs.timeService, svcs.broker, svcs.assets, svcs.witness, svcs.executionEngine, svcs.netParams, svcs.banking) svcs.delegation = delegation.New(svcs.log, svcs.conf.Delegation, svcs.broker, svcs.topology, stakingLoop, svcs.epochService, svcs.timeService) } @@ -330,6 +360,7 @@ func newServices( ) svcs.vesting = vesting.NewSnapshotEngine(svcs.log, svcs.collateral, svcs.activityStreak, svcs.broker, svcs.assets) + svcs.timeService.NotifyOnTick(svcs.vesting.OnTick) svcs.rewards = rewards.New(svcs.log, svcs.conf.Rewards, svcs.broker, svcs.delegation, svcs.epochService, svcs.collateral, svcs.timeService, svcs.marketActivityTracker, svcs.topology, svcs.vesting, svcs.banking, svcs.activityStreak) // register this after the rewards engine is created to make sure the on epoch is called in the right order. @@ -378,11 +409,10 @@ func newServices( svcs.snapshotEngine.AddProviders(svcs.checkpoint, svcs.collateral, svcs.governance, svcs.delegation, svcs.netParams, svcs.epochService, svcs.assets, svcs.banking, svcs.witness, svcs.notary, svcs.stakingAccounts, svcs.stakeVerifier, svcs.limits, svcs.topology, svcs.eventForwarder, svcs.executionEngine, svcs.marketActivityTracker, svcs.statevar, svcs.erc20MultiSigTopology, svcs.protocolUpgradeEngine, svcs.ethereumOraclesVerifier, svcs.vesting, svcs.activityStreak, svcs.referralProgram, svcs.volumeDiscount, - svcs.teamsEngine) + svcs.teamsEngine, svcs.spam, svcs.l2Verifiers) - svcs.snapshotEngine.AddProviders(svcs.spam) + pow := pow.New(svcs.log, svcs.conf.PoW) - pow := pow.New(svcs.log, svcs.conf.PoW, svcs.timeService) if svcs.conf.Blockchain.ChainProvider == blockchain.ProviderNullChain { pow.DisableVerification() } @@ -409,10 +439,6 @@ func newServices( Param: netparams.SpamPoWNumberOfTxPerBlock, Watcher: pow.UpdateSpamPoWNumberOfTxPerBlock, }, - { - Param: netparams.ValidatorsEpochLength, - Watcher: pow.OnEpochDurationChanged, - }, } // The team engine is used to know the team a party belongs to. The computation @@ -454,6 +480,7 @@ func (svcs *allServices) registerTimeServiceCallbacks() { svcs.limits.OnTick, svcs.ethereumOraclesVerifier.OnTick, + svcs.l2Verifiers.OnTick, ) } @@ -477,6 +504,13 @@ func (svcs *allServices) registerConfigWatchers() { func(cfg config.Config) { svcs.governance.ReloadConf(cfg.Governance) }, func(cfg config.Config) { svcs.stats.ReloadConf(cfg.Stats) }, ) + + if svcs.conf.HaveEthClient() { + svcs.confListenerIDs = svcs.confWatcher.OnConfigUpdateWithID( + func(cfg config.Config) { svcs.l2Clients.ReloadConf(cfg.Ethereum) }, + ) + } + svcs.timeService.NotifyOnTick(svcs.confWatcher.OnTimeUpdate) } @@ -497,10 +531,6 @@ func (svcs *allServices) setupNetParameters(powWatchers []netparams.WatchParam) spamWatchers := []netparams.WatchParam{} if svcs.spam != nil { spamWatchers = []netparams.WatchParam{ - { - Param: netparams.ValidatorsEpochLength, - Watcher: svcs.spam.OnEpochDurationChanged, - }, { Param: netparams.SpamProtectionMaxVotes, Watcher: svcs.spam.OnMaxVotesChanged, @@ -545,6 +575,10 @@ func (svcs *allServices) setupNetParameters(powWatchers []netparams.WatchParam) Param: netparams.SpamProtectionMaxCreateReferralSet, Watcher: svcs.spam.OnMaxCreateReferralSet, }, + { + Param: netparams.SpamProtectionMaxUpdatePartyProfile, + Watcher: svcs.spam.OnMaxPartyProfile, + }, { Param: netparams.SpamProtectionMaxUpdateReferralSet, Watcher: svcs.spam.OnMaxUpdateReferralSet, @@ -778,6 +812,18 @@ func (svcs *allServices) setupNetParameters(powWatchers []netparams.WatchParam) Param: netparams.TransferFeeFactor, Watcher: svcs.banking.OnTransferFeeFactorUpdate, }, + { + Param: netparams.TransferFeeMaxQuantumAmount, + Watcher: svcs.banking.OnMaxQuantumAmountUpdate, + }, + { + Param: netparams.TransferFeeDiscountDecayFraction, + Watcher: svcs.banking.OnTransferFeeDiscountDecayFractionUpdate, + }, + { + Param: netparams.TransferFeeDiscountMinimumTrackedAmount, + Watcher: svcs.banking.OnTransferFeeDiscountMinimumTrackedAmountUpdate, + }, { Param: netparams.GovernanceTransferMaxFraction, Watcher: svcs.banking.OnMaxFractionChanged, @@ -810,6 +856,46 @@ func (svcs *allServices) setupNetParameters(powWatchers []netparams.WatchParam) return nil }, }, + { + Param: netparams.BlockchainsEthereumConfig, + Watcher: func(_ context.Context, cfg interface{}) error { + ethCfg, err := types.EthereumConfigFromUntypedProto(cfg) + if err != nil { + return fmt.Errorf("invalid ethereum configuration: %w", err) + } + + svcs.ethCallEngine.EnsureChainID(ethCfg.ChainID(), svcs.conf.HaveEthClient()) + + // nothing to do if not a validator + if !svcs.conf.HaveEthClient() { + return nil + } + + svcs.witness.SetDefaultConfirmations(ethCfg.Confirmations()) + return nil + }, + }, + { + Param: netparams.BlockchainsEthereumL2Configs, + Watcher: func(ctx context.Context, cfg interface{}) error { + ethCfg, err := types.EthereumL2ConfigsFromUntypedProto(cfg) + if err != nil { + return fmt.Errorf("invalid ethereum l2 configuration: %w", err) + } + + if svcs.conf.HaveEthClient() { + svcs.l2Clients.UpdateConfirmations(ethCfg) + } + + // non-validators still need to create these engine's for consensus reasons + svcs.l2CallEngines.OnEthereumL2ConfigsUpdated( + ctx, ethCfg) + svcs.l2Verifiers.OnEthereumL2ConfigsUpdated( + ctx, ethCfg) + + return nil + }, + }, { Param: netparams.LimitsProposeMarketEnabledFrom, Watcher: svcs.limits.OnLimitsProposeMarketEnabledFromUpdate, @@ -830,6 +916,10 @@ func (svcs *allServices) setupNetParameters(powWatchers []netparams.WatchParam) Param: netparams.MarkPriceUpdateMaximumFrequency, Watcher: svcs.executionEngine.OnMarkPriceUpdateMaximumFrequency, }, + { + Param: netparams.InternalCompositePriceUpdateFrequency, + Watcher: svcs.executionEngine.OnInternalCompositePriceUpdateFrequency, + }, { Param: netparams.MarketSuccessorLaunchWindow, Watcher: svcs.executionEngine.OnSuccessorMarketTimeWindowUpdate, @@ -870,6 +960,14 @@ func (svcs *allServices) setupNetParameters(powWatchers []netparams.WatchParam) Param: netparams.SpamProtectionApplyReferralMinFunds, Watcher: svcs.referralProgram.OnMinBalanceForApplyReferralCodeUpdated, }, + { + Param: netparams.SpamProtectionReferralSetMinFunds, + Watcher: svcs.referralProgram.OnMinBalanceForReferralProgramUpdated, + }, + { + Param: netparams.SpamProtectionUpdateProfileMinFunds, + Watcher: svcs.partiesEngine.OnMinBalanceForUpdatePartyProfileUpdated, + }, { Param: netparams.RewardsActivityStreakBenefitTiers, Watcher: svcs.activityStreak.OnBenefitTiersUpdate, diff --git a/core/protocol/l2_eth_call_engines.go b/core/protocol/l2_eth_call_engines.go new file mode 100644 index 0000000000..fed6fb85d7 --- /dev/null +++ b/core/protocol/l2_eth_call_engines.go @@ -0,0 +1,106 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package protocol + +// circling around import cycle here... + +import ( + "context" + + "code.vegaprotocol.io/vega/core/client/eth" + "code.vegaprotocol.io/vega/core/datasource/external/ethcall" + "code.vegaprotocol.io/vega/core/datasource/external/ethverifier" + "code.vegaprotocol.io/vega/core/datasource/spec" + "code.vegaprotocol.io/vega/core/types" + vgcontext "code.vegaprotocol.io/vega/libs/context" + "code.vegaprotocol.io/vega/logging" +) + +type SpecActivationListener func(listener spec.SpecActivationsListener) + +type L2EthCallEngines struct { + log *logging.Logger + cfg ethcall.Config + isValidator bool + clients *eth.L2Clients + forwarder ethcall.Forwarder + + // chain id -> engine + engines map[string]*ethcall.Engine + specActivationListener SpecActivationListener +} + +func NewL2EthCallEngines(log *logging.Logger, cfg ethcall.Config, isValidator bool, clients *eth.L2Clients, forwarder ethcall.Forwarder, specActivationListener SpecActivationListener) *L2EthCallEngines { + return &L2EthCallEngines{ + log: log, + cfg: cfg, + isValidator: isValidator, + clients: clients, + forwarder: forwarder, + engines: map[string]*ethcall.Engine{}, + specActivationListener: specActivationListener, + } +} + +func (v *L2EthCallEngines) GetOrInstantiate(chainID string) (ethverifier.EthCallEngine, error) { + if e, ok := v.engines[chainID]; ok { + return e, nil + } + + v.log.Panic("should be instantiated by now really?") + return nil, nil +} + +func (v *L2EthCallEngines) OnEthereumL2ConfigsUpdated( + ctx context.Context, ethCfg *types.EthereumL2Configs, +) error { + // new L2 configured, instatiate the verifier for it. + for _, c := range ethCfg.Configs { + // if already exists, do nothing + if _, ok := v.engines[c.ChainID]; ok { + continue + } + + var clt *eth.L2Client + if v.isValidator { + var ok bool + clt, _, ok = v.clients.Get(c.ChainID) + if !ok { + v.log.Panic("ethereum client not configured for L2", + logging.String("chain-id", c.ChainID), + logging.String("network-id", c.NetworkID), + ) + } + } + + e := ethcall.NewEngine(v.log, v.cfg, v.isValidator, clt, v.forwarder) + e.EnsureChainID(c.ChainID, v.isValidator) + v.engines[c.ChainID] = e + + // if we are restoring from a snapshot we want to delay starting the engine + // until we know what block height to use. If we aren't restoring from a snapshot + // we are either loading from genesis, or the engine has been added dynamically and + // so we want to kick it off + if !vgcontext.InProgressSnapshotRestore(ctx) { + e.Start() + } + + // setup activation listener + v.specActivationListener(v.engines[c.ChainID]) + } + + return nil +} diff --git a/core/protocol/protocol.go b/core/protocol/protocol.go index ffedc702a8..bd94fd49a6 100644 --- a/core/protocol/protocol.go +++ b/core/protocol/protocol.go @@ -19,12 +19,6 @@ import ( "context" "fmt" - "code.vegaprotocol.io/vega/libs/subscribers" - - "code.vegaprotocol.io/vega/core/spam" - - "github.com/blang/semver" - "code.vegaprotocol.io/vega/core/api" "code.vegaprotocol.io/vega/core/blockchain" "code.vegaprotocol.io/vega/core/broker" @@ -35,10 +29,14 @@ import ( "code.vegaprotocol.io/vega/core/nodewallets" "code.vegaprotocol.io/vega/core/processor" "code.vegaprotocol.io/vega/core/protocolupgrade" + "code.vegaprotocol.io/vega/core/spam" "code.vegaprotocol.io/vega/core/stats" "code.vegaprotocol.io/vega/core/vegatime" + "code.vegaprotocol.io/vega/libs/subscribers" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + + "github.com/blang/semver" ) var Version = semver.MustParse("0.1.0") @@ -68,6 +66,7 @@ func New( blockchainClient *blockchain.Client, vegaPaths paths.Paths, stats *stats.Stats, + l2Clients *ethclient.L2Clients, ) (p *Protocol, err error) { log = log.Named(namedLogger) @@ -84,7 +83,7 @@ func New( }() svcs, err := newServices( - ctx, log, confWatcher, nodewallets, ethClient, ethConfirmation, blockchainClient, vegaPaths, stats, + ctx, log, confWatcher, nodewallets, ethClient, ethConfirmation, blockchainClient, vegaPaths, stats, l2Clients, ) if err != nil { return nil, err @@ -112,9 +111,10 @@ func New( svcs.topology, svcs.netParams, &processor.Oracle{ - Engine: svcs.oracle, - Adaptors: svcs.oracleAdaptors, - EthereumOraclesVerifier: svcs.ethereumOraclesVerifier, + Engine: svcs.oracle, + Adaptors: svcs.oracleAdaptors, + EthereumOraclesVerifier: svcs.ethereumOraclesVerifier, + EthereumL2OraclesVerifier: svcs.l2Verifiers, }, svcs.delegation, svcs.limits, @@ -136,6 +136,7 @@ func New( svcs.gastimator, svcs.ethCallEngine, svcs.collateral, + svcs.partiesEngine, ), log: log, confWatcher: confWatcher, @@ -147,6 +148,10 @@ func New( Param: netparams.SpamProtectionMaxBatchSize, Watcher: proto.App.OnSpamProtectionMaxBatchSizeUpdate, }, + netparams.WatchParam{ + Param: netparams.BlockchainsEthereumConfig, + Watcher: proto.App.OnBlockchainEthereumConfigUpdate, + }, ) return proto, nil diff --git a/core/protocol/upon_genesis.go b/core/protocol/upon_genesis.go index 023aa7bce6..ecaa7a8a9f 100644 --- a/core/protocol/upon_genesis.go +++ b/core/protocol/upon_genesis.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/logging" proto "code.vegaprotocol.io/vega/protos/vega" + "github.com/cenkalti/backoff" "golang.org/x/exp/maps" ) diff --git a/core/protocolupgrade/engine_test.go b/core/protocolupgrade/engine_test.go index 79a8fe2d3a..5fd6999fee 100644 --- a/core/protocolupgrade/engine_test.go +++ b/core/protocolupgrade/engine_test.go @@ -31,6 +31,7 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/protocolupgrade/snapshot.go b/core/protocolupgrade/snapshot.go index e0a2efccc1..021ea7cd25 100644 --- a/core/protocolupgrade/snapshot.go +++ b/core/protocolupgrade/snapshot.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/types" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" snappb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/protobuf/proto" ) diff --git a/core/referral/engine.go b/core/referral/engine.go index 68ab5a0006..168a4a02e3 100644 --- a/core/referral/engine.go +++ b/core/referral/engine.go @@ -83,6 +83,10 @@ type Engine struct { // to apply a referral code. minBalanceToApplyCode *num.Uint + // minBalanceForReferralProgram defines the minimum balance a party should possess + // to create/update referral program. + minBalanceForReferralSet *num.Uint + // latestProgramVersion tracks the latest version of the program. It used to // value any new program that comes in. It starts at 1. // It's incremented every time an update is received. Therefore, if, during @@ -115,6 +119,18 @@ func (e *Engine) CheckSufficientBalanceForApplyReferralCode(party types.PartyID, return nil } +func (e *Engine) CheckSufficientBalanceForCreateOrUpdateReferralSet(party types.PartyID, balance *num.Uint) error { + if balance.LT(e.minBalanceForReferralSet) { + return fmt.Errorf("party %q does not have sufficient balance to create or update a referral set, required balance %s available balance %s", party, e.minBalanceForReferralSet.String(), balance.String()) + } + return nil +} + +func (e *Engine) OnMinBalanceForReferralProgramUpdated(_ context.Context, min *num.Uint) error { + e.minBalanceForReferralSet = min + return nil +} + func (e *Engine) OnMinBalanceForApplyReferralCodeUpdated(_ context.Context, min *num.Uint) error { e.minBalanceToApplyCode = min return nil diff --git a/core/referral/helpers_for_test.go b/core/referral/helpers_for_test.go index b7a738bd48..fcdbcdf1ec 100644 --- a/core/referral/helpers_for_test.go +++ b/core/referral/helpers_for_test.go @@ -32,6 +32,7 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" vegapb "code.vegaprotocol.io/vega/protos/vega" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/referral/snapshot.go b/core/referral/snapshot.go index f9c7c50fb6..25f0ba4efc 100644 --- a/core/referral/snapshot.go +++ b/core/referral/snapshot.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/proto" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "golang.org/x/exp/maps" ) diff --git a/core/referral/snapshot_test.go b/core/referral/snapshot_test.go index d18f62577e..5ff48d3804 100644 --- a/core/referral/snapshot_test.go +++ b/core/referral/snapshot_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/libs/num" vgtest "code.vegaprotocol.io/vega/libs/test" "code.vegaprotocol.io/vega/paths" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/rewards/contribution_reward_calculator_test.go b/core/rewards/contribution_reward_calculator_test.go index 53d2c1002f..e7ffc2431a 100644 --- a/core/rewards/contribution_reward_calculator_test.go +++ b/core/rewards/contribution_reward_calculator_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/require" ) diff --git a/core/rewards/engine.go b/core/rewards/engine.go index a6cb0e876b..8c9eddae68 100644 --- a/core/rewards/engine.go +++ b/core/rewards/engine.go @@ -20,10 +20,9 @@ import ( "sort" "time" - "code.vegaprotocol.io/vega/libs/num" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/protos/vega" proto "code.vegaprotocol.io/vega/protos/vega" @@ -34,13 +33,14 @@ var ( rewardAccountTypes = []types.AccountType{types.AccountTypeGlobalReward, types.AccountTypeFeesInfrastructure, types.AccountTypeMakerReceivedFeeReward, types.AccountTypeMakerPaidFeeReward, types.AccountTypeLPFeeReward, types.AccountTypeMarketProposerReward, types.AccountTypeAveragePositionReward, types.AccountTypeRelativeReturnReward, types.AccountTypeReturnVolatilityReward, types.AccountTypeValidatorRankingReward} ) +//go:generate go run github.com/golang/mock/mockgen -destination mocks/mocks.go -package mocks code.vegaprotocol.io/vega/core/rewards MarketActivityTracker,Delegation,TimeService,Topology,Transfers,Teams,Vesting,ActivityStreak + // Broker for sending events. type Broker interface { Send(event events.Event) SendBatch(events []events.Event) } -//go:generate go run github.com/golang/mock/mockgen -destination mocks/market_tracker_mock.go -package mocks code.vegaprotocol.io/vega/core/rewards MarketActivityTracker type MarketActivityTracker interface { GetAllMarketIDs() []string GetProposer(market string) string @@ -48,14 +48,12 @@ type MarketActivityTracker interface { CalculateMetricForTeams(ds *vega.DispatchStrategy) ([]*types.PartyContributionScore, map[string][]*types.PartyContributionScore) } -// TimeService notifies the reward engine at the end of an epoch. +// EpochEngine notifies the reward engine at the end of an epoch. type EpochEngine interface { NotifyOnEpoch(f func(context.Context, types.Epoch), r func(context.Context, types.Epoch)) } -// Delegation engine for getting validation data -// -//go:generate go run github.com/golang/mock/mockgen -destination mocks/delegation_engine_mock.go -package mocks code.vegaprotocol.io/vega/core/rewards Delegation +// Delegation engine for getting validation data. type Delegation interface { ProcessEpochDelegations(ctx context.Context, epoch types.Epoch) []*types.ValidatorData GetValidatorData() []*types.ValidatorData @@ -64,41 +62,35 @@ type Delegation interface { // Collateral engine provides access to account data and transferring rewards. type Collateral interface { GetAccountByID(id string) (*types.Account, error) - TransferRewards(ctx context.Context, rewardAccountID string, transfers []*types.Transfer) ([]*types.LedgerMovement, error) + TransferRewards(ctx context.Context, rewardAccountID string, transfers []*types.Transfer, rewardType types.AccountType) ([]*types.LedgerMovement, error) GetRewardAccountsByType(rewardAcccountType types.AccountType) []*types.Account + GetAssetQuantum(asset string) (num.Decimal, error) } -// TimeService notifies the reward engine on time updates -// -//go:generate go run github.com/golang/mock/mockgen -destination mocks/time_service_mock.go -package mocks code.vegaprotocol.io/vega/core/rewards TimeService +// TimeService notifies the reward engine on time updates. type TimeService interface { GetTimeNow() time.Time } -//go:generate go run github.com/golang/mock/mockgen -destination mocks/topology_mock.go -package mocks code.vegaprotocol.io/vega/core/rewards Topology type Topology interface { GetRewardsScores(ctx context.Context, epochSeq string, delegationState []*types.ValidatorData, stakeScoreParams types.StakeScoreParams) (*types.ScoreData, *types.ScoreData) RecalcValidatorSet(ctx context.Context, epochSeq string, delegationState []*types.ValidatorData, stakeScoreParams types.StakeScoreParams) []*types.PartyContributionScore } -//go:generate go run github.com/golang/mock/mockgen -destination mocks/transfers_mock.go -package mocks code.vegaprotocol.io/vega/core/rewards Transfers type Transfers interface { GetDispatchStrategy(string) *proto.DispatchStrategy } -//go:generate go run github.com/golang/mock/mockgen -destination mocks/teams_mock.go -package mocks code.vegaprotocol.io/vega/core/rewards Teams type Teams interface { GetTeamMembers([]string) map[string][]string GetAllPartiesInTeams() []string } -//go:generate go run github.com/golang/mock/mockgen -destination mocks/vesting_mock.go -package mocks code.vegaprotocol.io/vega/core/rewards Vesting type Vesting interface { AddReward(party, asset string, amount *num.Uint, lockedForEpochs uint64) GetRewardBonusMultiplier(party string) (*num.Uint, num.Decimal) } -//go:generate go run github.com/golang/mock/mockgen -destination mocks/activity_streak_mock.go -package mocks code.vegaprotocol.io/vega/core/rewards ActivityStreak type ActivityStreak interface { GetRewardsDistributionMultiplier(party string) num.Decimal } @@ -141,7 +133,7 @@ type payout struct { totalReward *num.Uint epochSeq string timestamp int64 - market string + gameID *string lockedForEpochs uint64 lockedUntilEpoch string } @@ -327,7 +319,9 @@ func (e *Engine) calculateRewardPayouts(ctx context.Context, epoch types.Epoch) for _, po := range pos { if po != nil && !po.totalReward.IsZero() && !po.totalReward.IsNegative() { po.rewardType = rewardType - po.market = account.MarketID + if account.MarketID != "!" { + po.gameID = &account.MarketID + } po.timestamp = now.UnixNano() payouts = append(payouts, po) e.distributePayout(ctx, po) @@ -400,15 +394,15 @@ func (e *Engine) calculateRewardTypeForAsset(epochSeq, asset string, rewardType return nil } -// emitEventsForPayout fires events corresponding to the reward payout. func (e *Engine) emitEventsForPayout(ctx context.Context, timeToSend time.Time, po *payout) { payoutEvents := map[string]*events.RewardPayout{} parties := []string{} totalReward := po.totalReward.ToDecimal() + assetQuantum, _ := e.collateral.GetAssetQuantum(po.asset) for party, amount := range po.partyToAmount { proportion := amount.ToDecimal().Div(totalReward) pct := proportion.Mul(num.DecimalFromInt64(100)) - payoutEvents[party] = events.NewRewardPayout(ctx, timeToSend.UnixNano(), party, po.epochSeq, po.asset, amount, pct, po.rewardType, po.market, po.lockedUntilEpoch) + payoutEvents[party] = events.NewRewardPayout(ctx, timeToSend.UnixNano(), party, po.epochSeq, po.asset, amount, assetQuantum, pct, po.rewardType, po.gameID, po.lockedUntilEpoch) parties = append(parties, party) } sort.Strings(parties) @@ -441,15 +435,18 @@ func (e *Engine) distributePayout(ctx context.Context, po *payout) { }) } - responses, err := e.collateral.TransferRewards(ctx, po.fromAccount, transfers) + responses, err := e.collateral.TransferRewards(ctx, po.fromAccount, transfers, po.rewardType) if err != nil { e.log.Error("error in transfer rewards", logging.Error(err)) return } - for _, party := range partyIDs { - amt := po.partyToAmount[party] - e.vesting.AddReward(party, po.asset, amt, po.lockedForEpochs) + // if the reward type is not infra fee, report it to the vesting engine + if po.rewardType != types.AccountTypeFeesInfrastructure { + for _, party := range partyIDs { + amt := po.partyToAmount[party] + e.vesting.AddReward(party, po.asset, amt, po.lockedForEpochs) + } } e.broker.Send(events.NewLedgerMovements(ctx, responses)) } diff --git a/core/rewards/engine_test.go b/core/rewards/engine_test.go index acf1a1b61e..152e0dfce8 100644 --- a/core/rewards/engine_test.go +++ b/core/rewards/engine_test.go @@ -20,13 +20,13 @@ import ( "testing" "time" - "code.vegaprotocol.io/vega/libs/num" - bmocks "code.vegaprotocol.io/vega/core/broker/mocks" "code.vegaprotocol.io/vega/core/collateral" "code.vegaprotocol.io/vega/core/rewards/mocks" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) @@ -68,7 +68,7 @@ func TestRewardFactors(t *testing.T) { func testUpdateMaxPayoutPerParticipantForStakingRewardScheme(t *testing.T) { testEngine := getEngine(t) engine := testEngine.engine - engine.UpdateMaxPayoutPerParticipantForStakingRewardScheme(context.Background(), num.NewDecimalFromFloat(10000)) + require.NoError(t, engine.UpdateMaxPayoutPerParticipantForStakingRewardScheme(context.Background(), num.NewDecimalFromFloat(10000))) require.Equal(t, num.NewUint(10000), engine.global.maxPayoutPerParticipant) } @@ -76,20 +76,19 @@ func testUpdateMaxPayoutPerParticipantForStakingRewardScheme(t *testing.T) { func testCalculateRewards(t *testing.T) { testEngine := getEngine(t) now := time.Now() - testEngine.timeService.EXPECT().GetTimeNow().DoAndReturn( - func() time.Time { - return now - }).AnyTimes() + testEngine.timeService.EXPECT().GetTimeNow().DoAndReturn(func() time.Time { + return now + }).AnyTimes() engine := testEngine.engine - engine.UpdateAssetForStakingAndDelegation(context.Background(), "VEGA") - engine.UpdateDelegatorShareForStakingRewardScheme(context.Background(), num.DecimalFromFloat(0.3)) - engine.UpdateMinimumValidatorStakeForStakingRewardScheme(context.Background(), num.NewDecimalFromFloat(0)) - engine.UpdateCompetitionLevelForStakingRewardScheme(context.Background(), num.DecimalFromFloat(1.1)) - engine.UpdateMinValidatorsStakingRewardScheme(context.Background(), 5) - engine.UpdateOptimalStakeMultiplierStakingRewardScheme(context.Background(), num.DecimalFromFloat(5)) - engine.UpdateMaxPayoutPerParticipantForStakingRewardScheme(context.Background(), num.DecimalZero()) - engine.UpdateErsatzRewardFactor(context.Background(), num.DecimalFromFloat(0.5)) + require.NoError(t, engine.UpdateAssetForStakingAndDelegation(context.Background(), "VEGA")) + require.NoError(t, engine.UpdateDelegatorShareForStakingRewardScheme(context.Background(), num.DecimalFromFloat(0.3))) + require.NoError(t, engine.UpdateMinimumValidatorStakeForStakingRewardScheme(context.Background(), num.NewDecimalFromFloat(0))) + require.NoError(t, engine.UpdateCompetitionLevelForStakingRewardScheme(context.Background(), num.DecimalFromFloat(1.1))) + require.NoError(t, engine.UpdateMinValidatorsStakingRewardScheme(context.Background(), 5)) + require.NoError(t, engine.UpdateOptimalStakeMultiplierStakingRewardScheme(context.Background(), num.DecimalFromFloat(5))) + require.NoError(t, engine.UpdateMaxPayoutPerParticipantForStakingRewardScheme(context.Background(), num.DecimalZero())) + require.NoError(t, engine.UpdateErsatzRewardFactor(context.Background(), num.DecimalFromFloat(0.5))) epoch := types.Epoch{EndTime: now} rewardAccount, err := testEngine.collateral.GetGlobalRewardAccount("VEGA") @@ -114,8 +113,7 @@ func testCalculateRewards(t *testing.T) { } }) - err = testEngine.collateral.IncrementBalance(context.Background(), rewardAccount.ID, num.NewUint(1000000)) - require.Nil(t, err) + require.NoError(t, testEngine.collateral.IncrementBalance(context.Background(), rewardAccount.ID, num.NewUint(1000000))) payouts := engine.calculateRewardPayouts(context.Background(), epoch) primary := payouts[0] @@ -166,14 +164,14 @@ func testCalculateRewardsWithMaxPerParticipant(t *testing.T) { }).AnyTimes() engine := testEngine.engine - engine.UpdateAssetForStakingAndDelegation(context.Background(), "VEGA") - engine.UpdateDelegatorShareForStakingRewardScheme(context.Background(), num.DecimalFromFloat(0.3)) - engine.UpdateMinimumValidatorStakeForStakingRewardScheme(context.Background(), num.NewDecimalFromFloat(0)) - engine.UpdateCompetitionLevelForStakingRewardScheme(context.Background(), num.DecimalFromFloat(1.1)) - engine.UpdateMinValidatorsStakingRewardScheme(context.Background(), 5) - engine.UpdateOptimalStakeMultiplierStakingRewardScheme(context.Background(), num.DecimalFromFloat(5)) - engine.UpdateMaxPayoutPerParticipantForStakingRewardScheme(context.Background(), num.DecimalFromFloat(100000)) - engine.UpdateErsatzRewardFactor(context.Background(), num.DecimalFromFloat(0.5)) + require.NoError(t, engine.UpdateAssetForStakingAndDelegation(context.Background(), "VEGA")) + require.NoError(t, engine.UpdateDelegatorShareForStakingRewardScheme(context.Background(), num.DecimalFromFloat(0.3))) + require.NoError(t, engine.UpdateMinimumValidatorStakeForStakingRewardScheme(context.Background(), num.NewDecimalFromFloat(0))) + require.NoError(t, engine.UpdateCompetitionLevelForStakingRewardScheme(context.Background(), num.DecimalFromFloat(1.1))) + require.NoError(t, engine.UpdateMinValidatorsStakingRewardScheme(context.Background(), 5)) + require.NoError(t, engine.UpdateOptimalStakeMultiplierStakingRewardScheme(context.Background(), num.DecimalFromFloat(5))) + require.NoError(t, engine.UpdateMaxPayoutPerParticipantForStakingRewardScheme(context.Background(), num.DecimalFromFloat(100000))) + require.NoError(t, engine.UpdateErsatzRewardFactor(context.Background(), num.DecimalFromFloat(0.5))) epoch := types.Epoch{EndTime: now} rewardAccount, err := testEngine.collateral.GetGlobalRewardAccount("VEGA") @@ -236,11 +234,11 @@ func testDistributePayout(t *testing.T) { }).AnyTimes() engine := testEngine.engine - engine.UpdateAssetForStakingAndDelegation(context.Background(), "VEGA") - engine.UpdateMinimumValidatorStakeForStakingRewardScheme(context.Background(), num.NewDecimalFromFloat(0)) - engine.UpdateMinValidatorsStakingRewardScheme(context.Background(), 5) - engine.UpdateOptimalStakeMultiplierStakingRewardScheme(context.Background(), num.DecimalFromFloat(5)) - engine.UpdateErsatzRewardFactor(context.Background(), num.DecimalFromFloat(0.5)) + require.NoError(t, engine.UpdateAssetForStakingAndDelegation(context.Background(), "VEGA")) + require.NoError(t, engine.UpdateMinimumValidatorStakeForStakingRewardScheme(context.Background(), num.NewDecimalFromFloat(0))) + require.NoError(t, engine.UpdateMinValidatorsStakingRewardScheme(context.Background(), 5)) + require.NoError(t, engine.UpdateOptimalStakeMultiplierStakingRewardScheme(context.Background(), num.DecimalFromFloat(5))) + require.NoError(t, engine.UpdateErsatzRewardFactor(context.Background(), num.DecimalFromFloat(0.5))) // setup balance of reward account rewardAccount, err := testEngine.collateral.GetGlobalRewardAccount("VEGA") @@ -278,14 +276,14 @@ func testOnEpochEventNoPayoutDelay(t *testing.T) { }).AnyTimes() engine := testEngine.engine - engine.UpdateAssetForStakingAndDelegation(context.Background(), "VEGA") - engine.UpdateDelegatorShareForStakingRewardScheme(context.Background(), num.DecimalFromFloat(0.3)) - engine.UpdateMinimumValidatorStakeForStakingRewardScheme(context.Background(), num.NewDecimalFromFloat(0)) - engine.UpdateCompetitionLevelForStakingRewardScheme(context.Background(), num.DecimalFromFloat(1.1)) - engine.UpdateMinValidatorsStakingRewardScheme(context.Background(), 5) - engine.UpdateOptimalStakeMultiplierStakingRewardScheme(context.Background(), num.DecimalFromFloat(5)) - engine.UpdateMaxPayoutPerParticipantForStakingRewardScheme(context.Background(), num.DecimalZero()) - engine.UpdateErsatzRewardFactor(context.Background(), num.DecimalFromFloat(0.5)) + require.NoError(t, engine.UpdateAssetForStakingAndDelegation(context.Background(), "VEGA")) + require.NoError(t, engine.UpdateDelegatorShareForStakingRewardScheme(context.Background(), num.DecimalFromFloat(0.3))) + require.NoError(t, engine.UpdateMinimumValidatorStakeForStakingRewardScheme(context.Background(), num.NewDecimalFromFloat(0))) + require.NoError(t, engine.UpdateCompetitionLevelForStakingRewardScheme(context.Background(), num.DecimalFromFloat(1.1))) + require.NoError(t, engine.UpdateMinValidatorsStakingRewardScheme(context.Background(), 5)) + require.NoError(t, engine.UpdateOptimalStakeMultiplierStakingRewardScheme(context.Background(), num.DecimalFromFloat(5))) + require.NoError(t, engine.UpdateMaxPayoutPerParticipantForStakingRewardScheme(context.Background(), num.DecimalZero())) + require.NoError(t, engine.UpdateErsatzRewardFactor(context.Background(), num.DecimalFromFloat(0.5))) testEngine.delegation.EXPECT().GetValidatorData().AnyTimes() testEngine.topology.EXPECT().RecalcValidatorSet(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes() @@ -343,14 +341,14 @@ func TestErsatzTendermintRewardSplit(t *testing.T) { }).AnyTimes() engine := testEngine.engine - engine.UpdateAssetForStakingAndDelegation(context.Background(), "VEGA") - engine.UpdateDelegatorShareForStakingRewardScheme(context.Background(), num.DecimalFromFloat(0.3)) - engine.UpdateMinimumValidatorStakeForStakingRewardScheme(context.Background(), num.NewDecimalFromFloat(0)) - engine.UpdateCompetitionLevelForStakingRewardScheme(context.Background(), num.DecimalFromFloat(1.1)) - engine.UpdateMinValidatorsStakingRewardScheme(context.Background(), 5) - engine.UpdateOptimalStakeMultiplierStakingRewardScheme(context.Background(), num.DecimalFromFloat(5)) - engine.UpdateMaxPayoutPerParticipantForStakingRewardScheme(context.Background(), num.DecimalZero()) - engine.UpdateErsatzRewardFactor(context.Background(), num.DecimalFromFloat(0.5)) + require.NoError(t, engine.UpdateAssetForStakingAndDelegation(context.Background(), "VEGA")) + require.NoError(t, engine.UpdateDelegatorShareForStakingRewardScheme(context.Background(), num.DecimalFromFloat(0.3))) + require.NoError(t, engine.UpdateMinimumValidatorStakeForStakingRewardScheme(context.Background(), num.NewDecimalFromFloat(0))) + require.NoError(t, engine.UpdateCompetitionLevelForStakingRewardScheme(context.Background(), num.DecimalFromFloat(1.1))) + require.NoError(t, engine.UpdateMinValidatorsStakingRewardScheme(context.Background(), 5)) + require.NoError(t, engine.UpdateOptimalStakeMultiplierStakingRewardScheme(context.Background(), num.DecimalFromFloat(5))) + require.NoError(t, engine.UpdateMaxPayoutPerParticipantForStakingRewardScheme(context.Background(), num.DecimalZero())) + require.NoError(t, engine.UpdateErsatzRewardFactor(context.Background(), num.DecimalFromFloat(0.5))) testEngine.delegation.EXPECT().GetValidatorData().AnyTimes() testEngine.topology.EXPECT().RecalcValidatorSet(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes() @@ -396,13 +394,12 @@ func TestErsatzTendermintRewardSplit(t *testing.T) { // node 4 gets 25000 // get party account balances - ctx := context.Background() - party1Acc := testEngine.collateral.GetOrCreatePartyVestingRewardAccount(ctx, "party1", "VEGA") - party2Acc := testEngine.collateral.GetOrCreatePartyVestingRewardAccount(ctx, "party2", "VEGA") - node1Acc := testEngine.collateral.GetOrCreatePartyVestingRewardAccount(ctx, "node1", "VEGA") - node2Acc := testEngine.collateral.GetOrCreatePartyVestingRewardAccount(ctx, "node2", "VEGA") - node3Acc := testEngine.collateral.GetOrCreatePartyVestingRewardAccount(ctx, "node3", "VEGA") - node4Acc := testEngine.collateral.GetOrCreatePartyVestingRewardAccount(ctx, "node4", "VEGA") + party1Acc, _ := testEngine.collateral.GetPartyGeneralAccount("party1", "VEGA") + party2Acc, _ := testEngine.collateral.GetPartyGeneralAccount("party2", "VEGA") + node1Acc, _ := testEngine.collateral.GetPartyGeneralAccount("node1", "VEGA") + node2Acc, _ := testEngine.collateral.GetPartyGeneralAccount("node2", "VEGA") + node3Acc, _ := testEngine.collateral.GetPartyGeneralAccount("node3", "VEGA") + node4Acc, _ := testEngine.collateral.GetPartyGeneralAccount("node4", "VEGA") require.Equal(t, num.NewUint(172500), party1Acc.Balance) require.Equal(t, num.NewUint(15000), party2Acc.Balance) @@ -440,22 +437,23 @@ func getEngine(t *testing.T) *testEngine { broker.EXPECT().Send(gomock.Any()).AnyTimes() broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() - collateral := collateral.New(logger, collateral.NewDefaultConfig(), ts, broker) + collateralEng := collateral.New(logger, collateral.NewDefaultConfig(), ts, broker) asset := types.Asset{ ID: "VEGA", Details: &types.AssetDetails{ - Symbol: "VEGA", + Symbol: "VEGA", + Quantum: num.DecimalFromFloat(1), }, } - collateral.EnableAsset(context.Background(), asset) + require.NoError(t, collateralEng.EnableAsset(context.Background(), asset)) topology := mocks.NewMockTopology(ctrl) marketActivityTracker := mocks.NewMockMarketActivityTracker(ctrl) vesting := mocks.NewMockVesting(ctrl) vesting.EXPECT().AddReward(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes() transfers := mocks.NewMockTransfers(ctrl) activityStreak := mocks.NewMockActivityStreak(ctrl) - engine := New(logger, conf, broker, delegation, epochEngine, collateral, ts, marketActivityTracker, topology, vesting, transfers, activityStreak) + engine := New(logger, conf, broker, delegation, epochEngine, collateralEng, ts, marketActivityTracker, topology, vesting, transfers, activityStreak) broker.EXPECT().Send(gomock.Any()).AnyTimes() @@ -504,7 +502,7 @@ func getEngine(t *testing.T) *testEngine { broker: broker, epochEngine: epochEngine, delegation: delegation, - collateral: collateral, + collateral: collateralEng, validatorData: validatorData, topology: topology, } diff --git a/core/rewards/mocks/activity_streak_mock.go b/core/rewards/mocks/activity_streak_mock.go deleted file mode 100644 index 4a191dc96c..0000000000 --- a/core/rewards/mocks/activity_streak_mock.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: code.vegaprotocol.io/vega/core/rewards (interfaces: ActivityStreak) - -// Package mocks is a generated GoMock package. -package mocks - -import ( - reflect "reflect" - - gomock "github.com/golang/mock/gomock" - decimal "github.com/shopspring/decimal" -) - -// MockActivityStreak is a mock of ActivityStreak interface. -type MockActivityStreak struct { - ctrl *gomock.Controller - recorder *MockActivityStreakMockRecorder -} - -// MockActivityStreakMockRecorder is the mock recorder for MockActivityStreak. -type MockActivityStreakMockRecorder struct { - mock *MockActivityStreak -} - -// NewMockActivityStreak creates a new mock instance. -func NewMockActivityStreak(ctrl *gomock.Controller) *MockActivityStreak { - mock := &MockActivityStreak{ctrl: ctrl} - mock.recorder = &MockActivityStreakMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockActivityStreak) EXPECT() *MockActivityStreakMockRecorder { - return m.recorder -} - -// GetRewardsDistributionMultiplier mocks base method. -func (m *MockActivityStreak) GetRewardsDistributionMultiplier(arg0 string) decimal.Decimal { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetRewardsDistributionMultiplier", arg0) - ret0, _ := ret[0].(decimal.Decimal) - return ret0 -} - -// GetRewardsDistributionMultiplier indicates an expected call of GetRewardsDistributionMultiplier. -func (mr *MockActivityStreakMockRecorder) GetRewardsDistributionMultiplier(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRewardsDistributionMultiplier", reflect.TypeOf((*MockActivityStreak)(nil).GetRewardsDistributionMultiplier), arg0) -} diff --git a/core/rewards/mocks/delegation_engine_mock.go b/core/rewards/mocks/delegation_engine_mock.go deleted file mode 100644 index 3685c9e262..0000000000 --- a/core/rewards/mocks/delegation_engine_mock.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: code.vegaprotocol.io/vega/core/rewards (interfaces: Delegation) - -// Package mocks is a generated GoMock package. -package mocks - -import ( - context "context" - reflect "reflect" - - types "code.vegaprotocol.io/vega/core/types" - gomock "github.com/golang/mock/gomock" -) - -// MockDelegation is a mock of Delegation interface. -type MockDelegation struct { - ctrl *gomock.Controller - recorder *MockDelegationMockRecorder -} - -// MockDelegationMockRecorder is the mock recorder for MockDelegation. -type MockDelegationMockRecorder struct { - mock *MockDelegation -} - -// NewMockDelegation creates a new mock instance. -func NewMockDelegation(ctrl *gomock.Controller) *MockDelegation { - mock := &MockDelegation{ctrl: ctrl} - mock.recorder = &MockDelegationMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockDelegation) EXPECT() *MockDelegationMockRecorder { - return m.recorder -} - -// GetValidatorData mocks base method. -func (m *MockDelegation) GetValidatorData() []*types.ValidatorData { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetValidatorData") - ret0, _ := ret[0].([]*types.ValidatorData) - return ret0 -} - -// GetValidatorData indicates an expected call of GetValidatorData. -func (mr *MockDelegationMockRecorder) GetValidatorData() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidatorData", reflect.TypeOf((*MockDelegation)(nil).GetValidatorData)) -} - -// ProcessEpochDelegations mocks base method. -func (m *MockDelegation) ProcessEpochDelegations(arg0 context.Context, arg1 types.Epoch) []*types.ValidatorData { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProcessEpochDelegations", arg0, arg1) - ret0, _ := ret[0].([]*types.ValidatorData) - return ret0 -} - -// ProcessEpochDelegations indicates an expected call of ProcessEpochDelegations. -func (mr *MockDelegationMockRecorder) ProcessEpochDelegations(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessEpochDelegations", reflect.TypeOf((*MockDelegation)(nil).ProcessEpochDelegations), arg0, arg1) -} diff --git a/core/rewards/mocks/market_tracker_mock.go b/core/rewards/mocks/market_tracker_mock.go deleted file mode 100644 index 22fa3f8d1b..0000000000 --- a/core/rewards/mocks/market_tracker_mock.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: code.vegaprotocol.io/vega/core/rewards (interfaces: MarketActivityTracker) - -// Package mocks is a generated GoMock package. -package mocks - -import ( - reflect "reflect" - - types "code.vegaprotocol.io/vega/core/types" - vega "code.vegaprotocol.io/vega/protos/vega" - gomock "github.com/golang/mock/gomock" -) - -// MockMarketActivityTracker is a mock of MarketActivityTracker interface. -type MockMarketActivityTracker struct { - ctrl *gomock.Controller - recorder *MockMarketActivityTrackerMockRecorder -} - -// MockMarketActivityTrackerMockRecorder is the mock recorder for MockMarketActivityTracker. -type MockMarketActivityTrackerMockRecorder struct { - mock *MockMarketActivityTracker -} - -// NewMockMarketActivityTracker creates a new mock instance. -func NewMockMarketActivityTracker(ctrl *gomock.Controller) *MockMarketActivityTracker { - mock := &MockMarketActivityTracker{ctrl: ctrl} - mock.recorder = &MockMarketActivityTrackerMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockMarketActivityTracker) EXPECT() *MockMarketActivityTrackerMockRecorder { - return m.recorder -} - -// CalculateMetricForIndividuals mocks base method. -func (m *MockMarketActivityTracker) CalculateMetricForIndividuals(arg0 *vega.DispatchStrategy) []*types.PartyContributionScore { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CalculateMetricForIndividuals", arg0) - ret0, _ := ret[0].([]*types.PartyContributionScore) - return ret0 -} - -// CalculateMetricForIndividuals indicates an expected call of CalculateMetricForIndividuals. -func (mr *MockMarketActivityTrackerMockRecorder) CalculateMetricForIndividuals(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateMetricForIndividuals", reflect.TypeOf((*MockMarketActivityTracker)(nil).CalculateMetricForIndividuals), arg0) -} - -// CalculateMetricForTeams mocks base method. -func (m *MockMarketActivityTracker) CalculateMetricForTeams(arg0 *vega.DispatchStrategy) ([]*types.PartyContributionScore, map[string][]*types.PartyContributionScore) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CalculateMetricForTeams", arg0) - ret0, _ := ret[0].([]*types.PartyContributionScore) - ret1, _ := ret[1].(map[string][]*types.PartyContributionScore) - return ret0, ret1 -} - -// CalculateMetricForTeams indicates an expected call of CalculateMetricForTeams. -func (mr *MockMarketActivityTrackerMockRecorder) CalculateMetricForTeams(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateMetricForTeams", reflect.TypeOf((*MockMarketActivityTracker)(nil).CalculateMetricForTeams), arg0) -} - -// GetAllMarketIDs mocks base method. -func (m *MockMarketActivityTracker) GetAllMarketIDs() []string { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAllMarketIDs") - ret0, _ := ret[0].([]string) - return ret0 -} - -// GetAllMarketIDs indicates an expected call of GetAllMarketIDs. -func (mr *MockMarketActivityTrackerMockRecorder) GetAllMarketIDs() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllMarketIDs", reflect.TypeOf((*MockMarketActivityTracker)(nil).GetAllMarketIDs)) -} - -// GetProposer mocks base method. -func (m *MockMarketActivityTracker) GetProposer(arg0 string) string { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetProposer", arg0) - ret0, _ := ret[0].(string) - return ret0 -} - -// GetProposer indicates an expected call of GetProposer. -func (mr *MockMarketActivityTrackerMockRecorder) GetProposer(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposer", reflect.TypeOf((*MockMarketActivityTracker)(nil).GetProposer), arg0) -} diff --git a/core/rewards/mocks/mocks.go b/core/rewards/mocks/mocks.go new file mode 100644 index 0000000000..924c24b134 --- /dev/null +++ b/core/rewards/mocks/mocks.go @@ -0,0 +1,412 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: code.vegaprotocol.io/vega/core/rewards (interfaces: MarketActivityTracker,Delegation,TimeService,Topology,Transfers,Teams,Vesting,ActivityStreak) + +// Package mocks is a generated GoMock package. +package mocks + +import ( + context "context" + reflect "reflect" + time "time" + + types "code.vegaprotocol.io/vega/core/types" + num "code.vegaprotocol.io/vega/libs/num" + vega "code.vegaprotocol.io/vega/protos/vega" + gomock "github.com/golang/mock/gomock" + decimal "github.com/shopspring/decimal" +) + +// MockMarketActivityTracker is a mock of MarketActivityTracker interface. +type MockMarketActivityTracker struct { + ctrl *gomock.Controller + recorder *MockMarketActivityTrackerMockRecorder +} + +// MockMarketActivityTrackerMockRecorder is the mock recorder for MockMarketActivityTracker. +type MockMarketActivityTrackerMockRecorder struct { + mock *MockMarketActivityTracker +} + +// NewMockMarketActivityTracker creates a new mock instance. +func NewMockMarketActivityTracker(ctrl *gomock.Controller) *MockMarketActivityTracker { + mock := &MockMarketActivityTracker{ctrl: ctrl} + mock.recorder = &MockMarketActivityTrackerMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockMarketActivityTracker) EXPECT() *MockMarketActivityTrackerMockRecorder { + return m.recorder +} + +// CalculateMetricForIndividuals mocks base method. +func (m *MockMarketActivityTracker) CalculateMetricForIndividuals(arg0 *vega.DispatchStrategy) []*types.PartyContributionScore { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CalculateMetricForIndividuals", arg0) + ret0, _ := ret[0].([]*types.PartyContributionScore) + return ret0 +} + +// CalculateMetricForIndividuals indicates an expected call of CalculateMetricForIndividuals. +func (mr *MockMarketActivityTrackerMockRecorder) CalculateMetricForIndividuals(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateMetricForIndividuals", reflect.TypeOf((*MockMarketActivityTracker)(nil).CalculateMetricForIndividuals), arg0) +} + +// CalculateMetricForTeams mocks base method. +func (m *MockMarketActivityTracker) CalculateMetricForTeams(arg0 *vega.DispatchStrategy) ([]*types.PartyContributionScore, map[string][]*types.PartyContributionScore) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CalculateMetricForTeams", arg0) + ret0, _ := ret[0].([]*types.PartyContributionScore) + ret1, _ := ret[1].(map[string][]*types.PartyContributionScore) + return ret0, ret1 +} + +// CalculateMetricForTeams indicates an expected call of CalculateMetricForTeams. +func (mr *MockMarketActivityTrackerMockRecorder) CalculateMetricForTeams(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateMetricForTeams", reflect.TypeOf((*MockMarketActivityTracker)(nil).CalculateMetricForTeams), arg0) +} + +// GetAllMarketIDs mocks base method. +func (m *MockMarketActivityTracker) GetAllMarketIDs() []string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllMarketIDs") + ret0, _ := ret[0].([]string) + return ret0 +} + +// GetAllMarketIDs indicates an expected call of GetAllMarketIDs. +func (mr *MockMarketActivityTrackerMockRecorder) GetAllMarketIDs() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllMarketIDs", reflect.TypeOf((*MockMarketActivityTracker)(nil).GetAllMarketIDs)) +} + +// GetProposer mocks base method. +func (m *MockMarketActivityTracker) GetProposer(arg0 string) string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetProposer", arg0) + ret0, _ := ret[0].(string) + return ret0 +} + +// GetProposer indicates an expected call of GetProposer. +func (mr *MockMarketActivityTrackerMockRecorder) GetProposer(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposer", reflect.TypeOf((*MockMarketActivityTracker)(nil).GetProposer), arg0) +} + +// MockDelegation is a mock of Delegation interface. +type MockDelegation struct { + ctrl *gomock.Controller + recorder *MockDelegationMockRecorder +} + +// MockDelegationMockRecorder is the mock recorder for MockDelegation. +type MockDelegationMockRecorder struct { + mock *MockDelegation +} + +// NewMockDelegation creates a new mock instance. +func NewMockDelegation(ctrl *gomock.Controller) *MockDelegation { + mock := &MockDelegation{ctrl: ctrl} + mock.recorder = &MockDelegationMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockDelegation) EXPECT() *MockDelegationMockRecorder { + return m.recorder +} + +// GetValidatorData mocks base method. +func (m *MockDelegation) GetValidatorData() []*types.ValidatorData { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetValidatorData") + ret0, _ := ret[0].([]*types.ValidatorData) + return ret0 +} + +// GetValidatorData indicates an expected call of GetValidatorData. +func (mr *MockDelegationMockRecorder) GetValidatorData() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidatorData", reflect.TypeOf((*MockDelegation)(nil).GetValidatorData)) +} + +// ProcessEpochDelegations mocks base method. +func (m *MockDelegation) ProcessEpochDelegations(arg0 context.Context, arg1 types.Epoch) []*types.ValidatorData { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ProcessEpochDelegations", arg0, arg1) + ret0, _ := ret[0].([]*types.ValidatorData) + return ret0 +} + +// ProcessEpochDelegations indicates an expected call of ProcessEpochDelegations. +func (mr *MockDelegationMockRecorder) ProcessEpochDelegations(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessEpochDelegations", reflect.TypeOf((*MockDelegation)(nil).ProcessEpochDelegations), arg0, arg1) +} + +// MockTimeService is a mock of TimeService interface. +type MockTimeService struct { + ctrl *gomock.Controller + recorder *MockTimeServiceMockRecorder +} + +// MockTimeServiceMockRecorder is the mock recorder for MockTimeService. +type MockTimeServiceMockRecorder struct { + mock *MockTimeService +} + +// NewMockTimeService creates a new mock instance. +func NewMockTimeService(ctrl *gomock.Controller) *MockTimeService { + mock := &MockTimeService{ctrl: ctrl} + mock.recorder = &MockTimeServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTimeService) EXPECT() *MockTimeServiceMockRecorder { + return m.recorder +} + +// GetTimeNow mocks base method. +func (m *MockTimeService) GetTimeNow() time.Time { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetTimeNow") + ret0, _ := ret[0].(time.Time) + return ret0 +} + +// GetTimeNow indicates an expected call of GetTimeNow. +func (mr *MockTimeServiceMockRecorder) GetTimeNow() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTimeNow", reflect.TypeOf((*MockTimeService)(nil).GetTimeNow)) +} + +// MockTopology is a mock of Topology interface. +type MockTopology struct { + ctrl *gomock.Controller + recorder *MockTopologyMockRecorder +} + +// MockTopologyMockRecorder is the mock recorder for MockTopology. +type MockTopologyMockRecorder struct { + mock *MockTopology +} + +// NewMockTopology creates a new mock instance. +func NewMockTopology(ctrl *gomock.Controller) *MockTopology { + mock := &MockTopology{ctrl: ctrl} + mock.recorder = &MockTopologyMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTopology) EXPECT() *MockTopologyMockRecorder { + return m.recorder +} + +// GetRewardsScores mocks base method. +func (m *MockTopology) GetRewardsScores(arg0 context.Context, arg1 string, arg2 []*types.ValidatorData, arg3 types.StakeScoreParams) (*types.ScoreData, *types.ScoreData) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetRewardsScores", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(*types.ScoreData) + ret1, _ := ret[1].(*types.ScoreData) + return ret0, ret1 +} + +// GetRewardsScores indicates an expected call of GetRewardsScores. +func (mr *MockTopologyMockRecorder) GetRewardsScores(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRewardsScores", reflect.TypeOf((*MockTopology)(nil).GetRewardsScores), arg0, arg1, arg2, arg3) +} + +// RecalcValidatorSet mocks base method. +func (m *MockTopology) RecalcValidatorSet(arg0 context.Context, arg1 string, arg2 []*types.ValidatorData, arg3 types.StakeScoreParams) []*types.PartyContributionScore { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RecalcValidatorSet", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].([]*types.PartyContributionScore) + return ret0 +} + +// RecalcValidatorSet indicates an expected call of RecalcValidatorSet. +func (mr *MockTopologyMockRecorder) RecalcValidatorSet(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecalcValidatorSet", reflect.TypeOf((*MockTopology)(nil).RecalcValidatorSet), arg0, arg1, arg2, arg3) +} + +// MockTransfers is a mock of Transfers interface. +type MockTransfers struct { + ctrl *gomock.Controller + recorder *MockTransfersMockRecorder +} + +// MockTransfersMockRecorder is the mock recorder for MockTransfers. +type MockTransfersMockRecorder struct { + mock *MockTransfers +} + +// NewMockTransfers creates a new mock instance. +func NewMockTransfers(ctrl *gomock.Controller) *MockTransfers { + mock := &MockTransfers{ctrl: ctrl} + mock.recorder = &MockTransfersMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTransfers) EXPECT() *MockTransfersMockRecorder { + return m.recorder +} + +// GetDispatchStrategy mocks base method. +func (m *MockTransfers) GetDispatchStrategy(arg0 string) *vega.DispatchStrategy { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDispatchStrategy", arg0) + ret0, _ := ret[0].(*vega.DispatchStrategy) + return ret0 +} + +// GetDispatchStrategy indicates an expected call of GetDispatchStrategy. +func (mr *MockTransfersMockRecorder) GetDispatchStrategy(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDispatchStrategy", reflect.TypeOf((*MockTransfers)(nil).GetDispatchStrategy), arg0) +} + +// MockTeams is a mock of Teams interface. +type MockTeams struct { + ctrl *gomock.Controller + recorder *MockTeamsMockRecorder +} + +// MockTeamsMockRecorder is the mock recorder for MockTeams. +type MockTeamsMockRecorder struct { + mock *MockTeams +} + +// NewMockTeams creates a new mock instance. +func NewMockTeams(ctrl *gomock.Controller) *MockTeams { + mock := &MockTeams{ctrl: ctrl} + mock.recorder = &MockTeamsMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTeams) EXPECT() *MockTeamsMockRecorder { + return m.recorder +} + +// GetAllPartiesInTeams mocks base method. +func (m *MockTeams) GetAllPartiesInTeams() []string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllPartiesInTeams") + ret0, _ := ret[0].([]string) + return ret0 +} + +// GetAllPartiesInTeams indicates an expected call of GetAllPartiesInTeams. +func (mr *MockTeamsMockRecorder) GetAllPartiesInTeams() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllPartiesInTeams", reflect.TypeOf((*MockTeams)(nil).GetAllPartiesInTeams)) +} + +// GetTeamMembers mocks base method. +func (m *MockTeams) GetTeamMembers(arg0 []string) map[string][]string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetTeamMembers", arg0) + ret0, _ := ret[0].(map[string][]string) + return ret0 +} + +// GetTeamMembers indicates an expected call of GetTeamMembers. +func (mr *MockTeamsMockRecorder) GetTeamMembers(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTeamMembers", reflect.TypeOf((*MockTeams)(nil).GetTeamMembers), arg0) +} + +// MockVesting is a mock of Vesting interface. +type MockVesting struct { + ctrl *gomock.Controller + recorder *MockVestingMockRecorder +} + +// MockVestingMockRecorder is the mock recorder for MockVesting. +type MockVestingMockRecorder struct { + mock *MockVesting +} + +// NewMockVesting creates a new mock instance. +func NewMockVesting(ctrl *gomock.Controller) *MockVesting { + mock := &MockVesting{ctrl: ctrl} + mock.recorder = &MockVestingMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockVesting) EXPECT() *MockVestingMockRecorder { + return m.recorder +} + +// AddReward mocks base method. +func (m *MockVesting) AddReward(arg0, arg1 string, arg2 *num.Uint, arg3 uint64) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "AddReward", arg0, arg1, arg2, arg3) +} + +// AddReward indicates an expected call of AddReward. +func (mr *MockVestingMockRecorder) AddReward(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddReward", reflect.TypeOf((*MockVesting)(nil).AddReward), arg0, arg1, arg2, arg3) +} + +// GetRewardBonusMultiplier mocks base method. +func (m *MockVesting) GetRewardBonusMultiplier(arg0 string) (*num.Uint, decimal.Decimal) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetRewardBonusMultiplier", arg0) + ret0, _ := ret[0].(*num.Uint) + ret1, _ := ret[1].(decimal.Decimal) + return ret0, ret1 +} + +// GetRewardBonusMultiplier indicates an expected call of GetRewardBonusMultiplier. +func (mr *MockVestingMockRecorder) GetRewardBonusMultiplier(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRewardBonusMultiplier", reflect.TypeOf((*MockVesting)(nil).GetRewardBonusMultiplier), arg0) +} + +// MockActivityStreak is a mock of ActivityStreak interface. +type MockActivityStreak struct { + ctrl *gomock.Controller + recorder *MockActivityStreakMockRecorder +} + +// MockActivityStreakMockRecorder is the mock recorder for MockActivityStreak. +type MockActivityStreakMockRecorder struct { + mock *MockActivityStreak +} + +// NewMockActivityStreak creates a new mock instance. +func NewMockActivityStreak(ctrl *gomock.Controller) *MockActivityStreak { + mock := &MockActivityStreak{ctrl: ctrl} + mock.recorder = &MockActivityStreakMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockActivityStreak) EXPECT() *MockActivityStreakMockRecorder { + return m.recorder +} + +// GetRewardsDistributionMultiplier mocks base method. +func (m *MockActivityStreak) GetRewardsDistributionMultiplier(arg0 string) decimal.Decimal { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetRewardsDistributionMultiplier", arg0) + ret0, _ := ret[0].(decimal.Decimal) + return ret0 +} + +// GetRewardsDistributionMultiplier indicates an expected call of GetRewardsDistributionMultiplier. +func (mr *MockActivityStreakMockRecorder) GetRewardsDistributionMultiplier(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRewardsDistributionMultiplier", reflect.TypeOf((*MockActivityStreak)(nil).GetRewardsDistributionMultiplier), arg0) +} diff --git a/core/rewards/mocks/teams_mock.go b/core/rewards/mocks/teams_mock.go deleted file mode 100644 index 09a2be1fa2..0000000000 --- a/core/rewards/mocks/teams_mock.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: code.vegaprotocol.io/vega/core/rewards (interfaces: Teams) - -// Package mocks is a generated GoMock package. -package mocks - -import ( - reflect "reflect" - - gomock "github.com/golang/mock/gomock" -) - -// MockTeams is a mock of Teams interface. -type MockTeams struct { - ctrl *gomock.Controller - recorder *MockTeamsMockRecorder -} - -// MockTeamsMockRecorder is the mock recorder for MockTeams. -type MockTeamsMockRecorder struct { - mock *MockTeams -} - -// NewMockTeams creates a new mock instance. -func NewMockTeams(ctrl *gomock.Controller) *MockTeams { - mock := &MockTeams{ctrl: ctrl} - mock.recorder = &MockTeamsMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockTeams) EXPECT() *MockTeamsMockRecorder { - return m.recorder -} - -// GetAllPartiesInTeams mocks base method. -func (m *MockTeams) GetAllPartiesInTeams() []string { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAllPartiesInTeams") - ret0, _ := ret[0].([]string) - return ret0 -} - -// GetAllPartiesInTeams indicates an expected call of GetAllPartiesInTeams. -func (mr *MockTeamsMockRecorder) GetAllPartiesInTeams() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllPartiesInTeams", reflect.TypeOf((*MockTeams)(nil).GetAllPartiesInTeams)) -} - -// GetTeamMembers mocks base method. -func (m *MockTeams) GetTeamMembers(arg0 []string) map[string][]string { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTeamMembers", arg0) - ret0, _ := ret[0].(map[string][]string) - return ret0 -} - -// GetTeamMembers indicates an expected call of GetTeamMembers. -func (mr *MockTeamsMockRecorder) GetTeamMembers(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTeamMembers", reflect.TypeOf((*MockTeams)(nil).GetTeamMembers), arg0) -} diff --git a/core/rewards/mocks/time_service_mock.go b/core/rewards/mocks/time_service_mock.go deleted file mode 100644 index f5f7bfc5ca..0000000000 --- a/core/rewards/mocks/time_service_mock.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: code.vegaprotocol.io/vega/core/rewards (interfaces: TimeService) - -// Package mocks is a generated GoMock package. -package mocks - -import ( - reflect "reflect" - time "time" - - gomock "github.com/golang/mock/gomock" -) - -// MockTimeService is a mock of TimeService interface. -type MockTimeService struct { - ctrl *gomock.Controller - recorder *MockTimeServiceMockRecorder -} - -// MockTimeServiceMockRecorder is the mock recorder for MockTimeService. -type MockTimeServiceMockRecorder struct { - mock *MockTimeService -} - -// NewMockTimeService creates a new mock instance. -func NewMockTimeService(ctrl *gomock.Controller) *MockTimeService { - mock := &MockTimeService{ctrl: ctrl} - mock.recorder = &MockTimeServiceMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockTimeService) EXPECT() *MockTimeServiceMockRecorder { - return m.recorder -} - -// GetTimeNow mocks base method. -func (m *MockTimeService) GetTimeNow() time.Time { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTimeNow") - ret0, _ := ret[0].(time.Time) - return ret0 -} - -// GetTimeNow indicates an expected call of GetTimeNow. -func (mr *MockTimeServiceMockRecorder) GetTimeNow() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTimeNow", reflect.TypeOf((*MockTimeService)(nil).GetTimeNow)) -} diff --git a/core/rewards/mocks/topology_mock.go b/core/rewards/mocks/topology_mock.go deleted file mode 100644 index b08cee9e2c..0000000000 --- a/core/rewards/mocks/topology_mock.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: code.vegaprotocol.io/vega/core/rewards (interfaces: Topology) - -// Package mocks is a generated GoMock package. -package mocks - -import ( - context "context" - reflect "reflect" - - types "code.vegaprotocol.io/vega/core/types" - gomock "github.com/golang/mock/gomock" -) - -// MockTopology is a mock of Topology interface. -type MockTopology struct { - ctrl *gomock.Controller - recorder *MockTopologyMockRecorder -} - -// MockTopologyMockRecorder is the mock recorder for MockTopology. -type MockTopologyMockRecorder struct { - mock *MockTopology -} - -// NewMockTopology creates a new mock instance. -func NewMockTopology(ctrl *gomock.Controller) *MockTopology { - mock := &MockTopology{ctrl: ctrl} - mock.recorder = &MockTopologyMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockTopology) EXPECT() *MockTopologyMockRecorder { - return m.recorder -} - -// GetRewardsScores mocks base method. -func (m *MockTopology) GetRewardsScores(arg0 context.Context, arg1 string, arg2 []*types.ValidatorData, arg3 types.StakeScoreParams) (*types.ScoreData, *types.ScoreData) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetRewardsScores", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(*types.ScoreData) - ret1, _ := ret[1].(*types.ScoreData) - return ret0, ret1 -} - -// GetRewardsScores indicates an expected call of GetRewardsScores. -func (mr *MockTopologyMockRecorder) GetRewardsScores(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRewardsScores", reflect.TypeOf((*MockTopology)(nil).GetRewardsScores), arg0, arg1, arg2, arg3) -} - -// RecalcValidatorSet mocks base method. -func (m *MockTopology) RecalcValidatorSet(arg0 context.Context, arg1 string, arg2 []*types.ValidatorData, arg3 types.StakeScoreParams) []*types.PartyContributionScore { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RecalcValidatorSet", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].([]*types.PartyContributionScore) - return ret0 -} - -// RecalcValidatorSet indicates an expected call of RecalcValidatorSet. -func (mr *MockTopologyMockRecorder) RecalcValidatorSet(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecalcValidatorSet", reflect.TypeOf((*MockTopology)(nil).RecalcValidatorSet), arg0, arg1, arg2, arg3) -} diff --git a/core/rewards/mocks/transfers_mock.go b/core/rewards/mocks/transfers_mock.go deleted file mode 100644 index 67521e49a1..0000000000 --- a/core/rewards/mocks/transfers_mock.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: code.vegaprotocol.io/vega/core/rewards (interfaces: Transfers) - -// Package mocks is a generated GoMock package. -package mocks - -import ( - reflect "reflect" - - vega "code.vegaprotocol.io/vega/protos/vega" - gomock "github.com/golang/mock/gomock" -) - -// MockTransfers is a mock of Transfers interface. -type MockTransfers struct { - ctrl *gomock.Controller - recorder *MockTransfersMockRecorder -} - -// MockTransfersMockRecorder is the mock recorder for MockTransfers. -type MockTransfersMockRecorder struct { - mock *MockTransfers -} - -// NewMockTransfers creates a new mock instance. -func NewMockTransfers(ctrl *gomock.Controller) *MockTransfers { - mock := &MockTransfers{ctrl: ctrl} - mock.recorder = &MockTransfersMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockTransfers) EXPECT() *MockTransfersMockRecorder { - return m.recorder -} - -// GetDispatchStrategy mocks base method. -func (m *MockTransfers) GetDispatchStrategy(arg0 string) *vega.DispatchStrategy { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetDispatchStrategy", arg0) - ret0, _ := ret[0].(*vega.DispatchStrategy) - return ret0 -} - -// GetDispatchStrategy indicates an expected call of GetDispatchStrategy. -func (mr *MockTransfersMockRecorder) GetDispatchStrategy(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDispatchStrategy", reflect.TypeOf((*MockTransfers)(nil).GetDispatchStrategy), arg0) -} diff --git a/core/rewards/mocks/vesting_mock.go b/core/rewards/mocks/vesting_mock.go deleted file mode 100644 index f4a58e4cab..0000000000 --- a/core/rewards/mocks/vesting_mock.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: code.vegaprotocol.io/vega/core/rewards (interfaces: Vesting) - -// Package mocks is a generated GoMock package. -package mocks - -import ( - reflect "reflect" - - num "code.vegaprotocol.io/vega/libs/num" - gomock "github.com/golang/mock/gomock" - decimal "github.com/shopspring/decimal" -) - -// MockVesting is a mock of Vesting interface. -type MockVesting struct { - ctrl *gomock.Controller - recorder *MockVestingMockRecorder -} - -// MockVestingMockRecorder is the mock recorder for MockVesting. -type MockVestingMockRecorder struct { - mock *MockVesting -} - -// NewMockVesting creates a new mock instance. -func NewMockVesting(ctrl *gomock.Controller) *MockVesting { - mock := &MockVesting{ctrl: ctrl} - mock.recorder = &MockVestingMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockVesting) EXPECT() *MockVestingMockRecorder { - return m.recorder -} - -// AddReward mocks base method. -func (m *MockVesting) AddReward(arg0, arg1 string, arg2 *num.Uint, arg3 uint64) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "AddReward", arg0, arg1, arg2, arg3) -} - -// AddReward indicates an expected call of AddReward. -func (mr *MockVestingMockRecorder) AddReward(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddReward", reflect.TypeOf((*MockVesting)(nil).AddReward), arg0, arg1, arg2, arg3) -} - -// GetRewardBonusMultiplier mocks base method. -func (m *MockVesting) GetRewardBonusMultiplier(arg0 string) (*num.Uint, decimal.Decimal) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetRewardBonusMultiplier", arg0) - ret0, _ := ret[0].(*num.Uint) - ret1, _ := ret[1].(decimal.Decimal) - return ret0, ret1 -} - -// GetRewardBonusMultiplier indicates an expected call of GetRewardBonusMultiplier. -func (mr *MockVestingMockRecorder) GetRewardBonusMultiplier(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRewardBonusMultiplier", reflect.TypeOf((*MockVesting)(nil).GetRewardBonusMultiplier), arg0) -} diff --git a/core/rewards/overflow_weight_test.go b/core/rewards/overflow_weight_test.go index 2e185dba65..60ac6ecaad 100644 --- a/core/rewards/overflow_weight_test.go +++ b/core/rewards/overflow_weight_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "github.com/stretchr/testify/require" ) diff --git a/core/rewards/proposer_reward_calcualtor_test.go b/core/rewards/proposer_reward_calcualtor_test.go index 5362ee4e79..70150875cc 100644 --- a/core/rewards/proposer_reward_calcualtor_test.go +++ b/core/rewards/proposer_reward_calcualtor_test.go @@ -20,6 +20,7 @@ import ( "time" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/require" ) diff --git a/core/rewards/reward_distribution_test.go b/core/rewards/reward_distribution_test.go index e35eaa25b7..25fecdf743 100644 --- a/core/rewards/reward_distribution_test.go +++ b/core/rewards/reward_distribution_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/require" ) diff --git a/core/rewards/staking_reward_calculator_test.go b/core/rewards/staking_reward_calculator_test.go index c6d596f95a..2571ebc561 100644 --- a/core/rewards/staking_reward_calculator_test.go +++ b/core/rewards/staking_reward_calculator_test.go @@ -20,12 +20,12 @@ import ( "testing" "time" + bmocks "code.vegaprotocol.io/vega/core/broker/mocks" "code.vegaprotocol.io/vega/core/types" + vmock "code.vegaprotocol.io/vega/core/validators/mocks" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" - bmocks "code.vegaprotocol.io/vega/core/broker/mocks" - vmock "code.vegaprotocol.io/vega/core/validators/mocks" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/core/rewards/validator_ranking_reward_calculator_test.go b/core/rewards/validator_ranking_reward_calculator_test.go index 4a52ffc3fe..e5c6f0b904 100644 --- a/core/rewards/validator_ranking_reward_calculator_test.go +++ b/core/rewards/validator_ranking_reward_calculator_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/require" ) diff --git a/core/risk/engine.go b/core/risk/engine.go index f3019f7c23..6473f3e614 100644 --- a/core/risk/engine.go +++ b/core/risk/engine.go @@ -27,14 +27,18 @@ import ( "code.vegaprotocol.io/vega/core/types/statevar" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "golang.org/x/exp/maps" ) //go:generate go run github.com/golang/mock/mockgen -destination mocks/mocks.go -package mocks code.vegaprotocol.io/vega/core/risk Orderbook,AuctionState,TimeService,StateVarEngine,Model var ( - ErrInsufficientFundsForInitialMargin = errors.New("insufficient funds for initial margin") - ErrRiskFactorsNotAvailableForAsset = errors.New("risk factors not available for the specified asset") + ErrInsufficientFundsForInitialMargin = errors.New("insufficient funds for initial margin") + ErrInsufficientFundsForMaintenanceMargin = errors.New("insufficient funds for maintenance margin") + ErrInsufficientFundsForOrderMargin = errors.New("insufficient funds for order margin") + ErrInsufficientFundsForMarginInGeneralAccount = errors.New("insufficient funds to cover margin in general margin") + ErrRiskFactorsNotAvailableForAsset = errors.New("risk factors not available for the specified asset") ) const RiskFactorStateVarName = "risk-factors" @@ -208,10 +212,18 @@ func (e *Engine) OnMarginScalingFactorsUpdate(sf *types.ScalingFactors) error { return nil } -func (e *Engine) UpdateModel(stateVarEngine StateVarEngine, calculator *types.MarginCalculator, model Model) { +func (e *Engine) UpdateModel( + stateVarEngine StateVarEngine, + calculator *types.MarginCalculator, + model Model, + linearSlippageFactor num.Decimal, + quadraticSlippageFactor num.Decimal, +) { e.scalingFactorsUint = scalingFactorsUintFromDecimals(calculator.ScalingFactors) e.factors = model.DefaultRiskFactors() e.model = model + e.linearSlippageFactor = linearSlippageFactor + e.quadraticSlippageFactor = quadraticSlippageFactor stateVarEngine.NewEvent(e.asset, e.mktID, statevar.EventTypeMarketUpdated) } @@ -375,9 +387,7 @@ func (e *Engine) UpdateMarginOnNewOrder(ctx context.Context, evt events.Margin, // In the case where the CurMargin is smaller to the MaintenanceLevel after trying to // move monies later, we'll need to close out the party but that cannot be figured out // now only in later when we try to move monies from the general account. -func (e *Engine) UpdateMarginsOnSettlement( - ctx context.Context, evts []events.Margin, markPrice *num.Uint, increment num.Decimal, -) []events.Risk { +func (e *Engine) UpdateMarginsOnSettlement(ctx context.Context, evts []events.Margin, markPrice *num.Uint, increment num.Decimal) []events.Risk { ret := make([]events.Risk, 0, len(evts)) now := e.timeSvc.GetTimeNow().UnixNano() @@ -403,10 +413,13 @@ func (e *Engine) UpdateMarginsOnSettlement( SearchLevel: num.UintZero(), InitialMargin: num.UintZero(), CollateralReleaseLevel: num.UintZero(), + OrderMargin: num.UintZero(), Party: evt.Party(), MarketID: evt.MarketID(), Asset: evt.Asset(), Timestamp: now, + MarginMode: types.MarginModeCrossMargin, + MarginFactor: num.DecimalZero(), } e.updateMarginLevels(events.NewMarginLevelsEvent(ctx, margins)) ret = append(ret, &marginChange{ @@ -501,9 +514,7 @@ func (e *Engine) UpdateMarginsOnSettlement( // ExpectMargins is used in the case some parties are in a distressed positions // in this situation we will only check if the party margin is > to the maintenance margin. -func (e *Engine) ExpectMargins( - evts []events.Margin, markPrice *num.Uint, increment num.Decimal, -) (okMargins []events.Margin, distressedPositions []events.Margin) { +func (e *Engine) ExpectMargins(evts []events.Margin, markPrice *num.Uint, increment num.Decimal) (okMargins []events.Margin, distressedPositions []events.Margin) { okMargins = make([]events.Margin, 0, len(evts)/2) distressedPositions = make([]events.Margin, 0, len(evts)/2) auction := e.as.InAuction() && !e.as.CanLeave() diff --git a/core/risk/engine_test.go b/core/risk/engine_test.go index c9b83543bd..f86107c555 100644 --- a/core/risk/engine_test.go +++ b/core/risk/engine_test.go @@ -34,10 +34,10 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" proto "code.vegaprotocol.io/vega/protos/vega" - "github.com/stretchr/testify/require" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) var DefaultSlippageFactor = num.DecimalFromFloat(0.1) @@ -69,6 +69,7 @@ type testMargin struct { transfer *types.Transfer asset string margin uint64 + orderMargin uint64 general uint64 market string buySumProduct uint64 @@ -481,24 +482,24 @@ func TestMarginWithNoOrdersOnBook(t *testing.T) { positionSize: 9, buyOrders: []*risk.OrderInfo{ { - Size: 3, + TrueRemaining: 3, Price: num.DecimalFromInt64(markPrice - 3), IsMarketOrder: false, }, { - Size: 5, + TrueRemaining: 5, Price: num.DecimalFromInt64(markPrice - 12), IsMarketOrder: false, }, }, sellOrders: []*risk.OrderInfo{ { - Size: 5, + TrueRemaining: 5, Price: num.DecimalFromInt64(markPrice + 2), IsMarketOrder: false, }, { - Size: 2, + TrueRemaining: 2, Price: num.DecimalFromInt64(markPrice + 7), IsMarketOrder: false, }, @@ -514,24 +515,24 @@ func TestMarginWithNoOrdersOnBook(t *testing.T) { positionSize: 9, buyOrders: []*risk.OrderInfo{ { - Size: 3, + TrueRemaining: 3, Price: num.DecimalFromInt64(markPrice - 3), IsMarketOrder: false, }, { - Size: 5, + TrueRemaining: 5, Price: num.DecimalFromInt64(markPrice - 12), IsMarketOrder: false, }, }, sellOrders: []*risk.OrderInfo{ { - Size: 5, + TrueRemaining: 5, Price: num.DecimalFromInt64(markPrice + 2), IsMarketOrder: false, }, { - Size: 2, + TrueRemaining: 2, Price: num.DecimalFromInt64(markPrice + 7), IsMarketOrder: false, }, @@ -547,24 +548,24 @@ func TestMarginWithNoOrdersOnBook(t *testing.T) { positionSize: -7, buyOrders: []*risk.OrderInfo{ { - Size: 3, + TrueRemaining: 3, Price: num.DecimalFromInt64(markPrice - 3), IsMarketOrder: false, }, { - Size: 5, + TrueRemaining: 5, Price: num.DecimalFromInt64(markPrice - 12), IsMarketOrder: false, }, }, sellOrders: []*risk.OrderInfo{ { - Size: 5, + TrueRemaining: 5, Price: num.DecimalFromInt64(markPrice + 2), IsMarketOrder: false, }, { - Size: 2, + TrueRemaining: 2, Price: num.DecimalFromInt64(markPrice + 7), IsMarketOrder: false, }, @@ -580,24 +581,24 @@ func TestMarginWithNoOrdersOnBook(t *testing.T) { positionSize: -7, buyOrders: []*risk.OrderInfo{ { - Size: 3, + TrueRemaining: 3, Price: num.DecimalFromInt64(markPrice - 3), IsMarketOrder: false, }, { - Size: 5, + TrueRemaining: 5, Price: num.DecimalFromInt64(markPrice - 12), IsMarketOrder: false, }, }, sellOrders: []*risk.OrderInfo{ { - Size: 5, + TrueRemaining: 5, Price: num.DecimalFromInt64(markPrice + 2), IsMarketOrder: false, }, { - Size: 2, + TrueRemaining: 2, Price: num.DecimalFromInt64(markPrice + 7), IsMarketOrder: false, }, @@ -614,14 +615,14 @@ func TestMarginWithNoOrdersOnBook(t *testing.T) { buy := int64(0) buySumProduct := uint64(0) for _, o := range tc.buyOrders { - buy += int64(o.Size) - buySumProduct += o.Size * o.Price.BigInt().Uint64() + buy += int64(o.TrueRemaining) + buySumProduct += o.TrueRemaining * o.Price.BigInt().Uint64() } sell := int64(0) sellSumProduct := uint64(0) for _, o := range tc.sellOrders { - sell += int64(o.Size) - sellSumProduct += o.Size * o.Price.BigInt().Uint64() + sell += int64(o.TrueRemaining) + sellSumProduct += o.TrueRemaining * o.Price.BigInt().Uint64() } evt := testMargin{ @@ -650,8 +651,8 @@ func TestMarginWithNoOrdersOnBook(t *testing.T) { margins := riskevt.MarginLevels() require.Equal(t, tc.expectedMargin, margins.MaintenanceMargin.String()) - // marginRecalcualted := risk.CalculateMaintenanceMarginWithSlippageFactors(evt.size, tc.buyOrders, tc.sellOrders, num.DecimalFromInt64(markPrice), num.DecimalOne(), tc.linearSlippageFactor, tc.quadraticSlippageFactor, r.Long, r.Short, constantPerUnitPositionSize, tc.auction) - // require.Equal(t, margins.MaintenanceMargin.Float64(), marginRecalcualted.RoundUp(0).InexactFloat64()) + marginRecalcualted := risk.CalculateMaintenanceMarginWithSlippageFactors(evt.size, tc.buyOrders, tc.sellOrders, num.DecimalFromInt64(markPrice), num.DecimalOne(), tc.linearSlippageFactor, tc.quadraticSlippageFactor, r.Long, r.Short, constantPerUnitPositionSize, tc.auction) + require.Equal(t, margins.MaintenanceMargin.Float64(), marginRecalcualted.RoundUp(0).InexactFloat64()) } } @@ -981,9 +982,12 @@ func testMarginWithOrderInBookAfterParamsUpdate(t *testing.T) { CollateralRelease: num.DecimalFromFloat(1.4), }, } + + // updating the slippage should change the margin too + updatedSlippage := num.DecimalFromFloat(0.1).Mul(DefaultSlippageFactor) model.EXPECT().DefaultRiskFactors().Return(updatedRF).Times(1) statevarEngine.EXPECT().NewEvent(asset, marketID, statevar.EventTypeMarketUpdated) - testE.UpdateModel(statevarEngine, updatedMC, model) + testE.UpdateModel(statevarEngine, updatedMC, model, updatedSlippage, updatedSlippage) evt = testMargin{ party: "tx", @@ -1004,10 +1008,10 @@ func testMarginWithOrderInBookAfterParamsUpdate(t *testing.T) { searchLevel, _ = updatedMC.ScalingFactors.SearchLevel.Float64() initialMargin, _ = updatedMC.ScalingFactors.InitialMargin.Float64() colRelease, _ = updatedMC.ScalingFactors.CollateralRelease.Float64() - assert.EqualValues(t, 562, margins.MaintenanceMargin.Uint64()) - assert.Equal(t, uint64(562*searchLevel), margins.SearchLevel.Uint64()) - assert.Equal(t, uint64(562*initialMargin), margins.InitialMargin.Uint64()) - assert.Equal(t, uint64(562*colRelease), margins.CollateralReleaseLevel.Uint64()) + assert.EqualValues(t, 381, margins.MaintenanceMargin.Uint64()) + assert.Equal(t, uint64(381*searchLevel), margins.SearchLevel.Uint64()) + assert.Equal(t, uint64(381*initialMargin), margins.InitialMargin.Uint64()) + assert.Equal(t, uint64(381*colRelease), margins.CollateralReleaseLevel.Uint64()) } func testInitialMarginRequirement(t *testing.T) { @@ -1280,7 +1284,7 @@ func TestMaintenanceMarign(t *testing.T) { positionSize := tc.positionSize for _, o := range tc.buyOrders { - s := int64(o.Size) + s := int64(o.TrueRemaining) if o.IsMarketOrder { positionSize += s } else { @@ -1290,7 +1294,7 @@ func TestMaintenanceMarign(t *testing.T) { } for _, o := range tc.sellOrders { - s := int64(o.Size) + s := int64(o.TrueRemaining) if o.IsMarketOrder { positionSize -= s } else { @@ -1459,7 +1463,7 @@ func TestLiquidationPriceWithNoOrders(t *testing.T) { maintenanceMarginFp := maintenanceMargin.InexactFloat64() require.Greater(t, maintenanceMarginFp, 0.0) - liquidationPrice, _, _, err := risk.CalculateLiquidationPriceWithSlippageFactors(tc.positionSize, nil, nil, markPrice, maintenanceMargin, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constantPerUnitPositionSize) + liquidationPrice, _, _, err := risk.CalculateLiquidationPriceWithSlippageFactors(tc.positionSize, nil, nil, markPrice, maintenanceMargin, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constantPerUnitPositionSize, false, num.DecimalZero()) if tc.expectError { require.Error(t, err) continue @@ -1469,11 +1473,11 @@ func TestLiquidationPriceWithNoOrders(t *testing.T) { liquidationPriceFp := liquidationPrice.InexactFloat64() require.GreaterOrEqual(t, liquidationPriceFp, 0.0) - require.True(t, markPrice.Div(liquidationPrice).Sub(num.DecimalOne()).Abs().LessThan(relativeTolerance)) + require.True(t, markPrice.Div(liquidationPrice).Sub(num.DecimalOne()).Abs().LessThan(relativeTolerance), fmt.Sprintf("Test case %v:", i+1)) collateral := maintenanceMargin.Mul(num.DecimalFromFloat(tc.collateralFactor)) - liquidationPrice, _, _, err = risk.CalculateLiquidationPriceWithSlippageFactors(tc.positionSize, nil, nil, markPrice, collateral, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constantPerUnitPositionSize) + liquidationPrice, _, _, err = risk.CalculateLiquidationPriceWithSlippageFactors(tc.positionSize, nil, nil, markPrice, collateral, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constantPerUnitPositionSize, false, num.DecimalOne()) require.NoError(t, err) require.False(t, liquidationPrice.IsNegative()) @@ -1491,6 +1495,10 @@ func TestLiquidationPriceWithNoOrders(t *testing.T) { require.True(t, liquidationPrice.IsZero(), fmt.Sprintf("Test case %v:", i+1)) require.True(t, collateralAfterLoss.IsNegative(), fmt.Sprintf("Test case %v:", i+1)) } + + liquidationPriceIsolatedMode, _, _, err := risk.CalculateLiquidationPriceWithSlippageFactors(tc.positionSize, nil, nil, markPrice, collateral, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constantPerUnitPositionSize, true, num.DecimalOne()) + require.NoError(t, err) + require.Equal(t, liquidationPrice, liquidationPrice, liquidationPriceIsolatedMode) } } @@ -1763,7 +1771,7 @@ func TestLiquidationPriceWithOrders(t *testing.T) { riskFactorShort := num.DecimalFromFloat(tc.riskFactorShort) constantPerUnitPositionSize := num.DecimalFromFloat(tc.margin_funding_factor * tc.funding_payment_to_date) - positionOnly, withBuy, withSell, err := risk.CalculateLiquidationPriceWithSlippageFactors(tc.positionSize, tc.buyOrders, tc.sellOrders, markPrice, collateral, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constantPerUnitPositionSize) + positionOnly, withBuy, withSell, err := risk.CalculateLiquidationPriceWithSlippageFactors(tc.positionSize, tc.buyOrders, tc.sellOrders, markPrice, collateral, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constantPerUnitPositionSize, false, num.DecimalOne()) require.NoError(t, err, fmt.Sprintf("Test case %v:", i+1)) sPositionOnly := positionOnly.String() @@ -1809,11 +1817,11 @@ func TestLiquidationPriceWithOrders(t *testing.T) { break } mtmDelta = mtmDelta.Add(num.DecimalFromInt64(newPositionSize).Mul(o.Price.Sub(lastMarkPrice))) - newPositionSize += int64(o.Size) + newPositionSize += int64(o.TrueRemaining) lastMarkPrice = o.Price } collateralAfterMtm := collateral.Add(mtmDelta) - liquidationPriceForNewPosition, _, _, err := risk.CalculateLiquidationPriceWithSlippageFactors(newPositionSize, nil, nil, lastMarkPrice, collateralAfterMtm, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constantPerUnitPositionSize) + liquidationPriceForNewPosition, _, _, err := risk.CalculateLiquidationPriceWithSlippageFactors(newPositionSize, nil, nil, lastMarkPrice, collateralAfterMtm, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constantPerUnitPositionSize, false, num.DecimalOne()) require.NoError(t, err, fmt.Sprintf("Test case %v:", i+1)) require.True(t, withBuy.Equal(liquidationPriceForNewPosition), fmt.Sprintf("Test case %v: withBuy=%s, newPositionOnly=%s", i+1, withBuy.String(), liquidationPriceForNewPosition.String())) @@ -1841,11 +1849,11 @@ func TestLiquidationPriceWithOrders(t *testing.T) { break } mtmDelta = mtmDelta.Add(num.DecimalFromInt64(newPositionSize).Div(positionFactor).Mul(o.Price.Sub(lastMarkPrice))) - newPositionSize -= int64(o.Size) + newPositionSize -= int64(o.TrueRemaining) lastMarkPrice = o.Price } collateralAfterMtm = collateral.Add(mtmDelta) - liquidationPriceForNewPosition, _, _, err = risk.CalculateLiquidationPriceWithSlippageFactors(newPositionSize, nil, nil, lastMarkPrice, collateralAfterMtm, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constantPerUnitPositionSize) + liquidationPriceForNewPosition, _, _, err = risk.CalculateLiquidationPriceWithSlippageFactors(newPositionSize, nil, nil, lastMarkPrice, collateralAfterMtm, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constantPerUnitPositionSize, false, num.DecimalOne()) require.NoError(t, err, fmt.Sprintf("Test case %v:", i+1)) require.True(t, withSell.Equal(liquidationPriceForNewPosition), fmt.Sprintf("Test case %v: withSell=%s, newPositionOnly=%s", i+1, withSell.String(), liquidationPriceForNewPosition.String())) @@ -1923,6 +1931,14 @@ func getMarginCalculator() *types.MarginCalculator { } } +func (m testMargin) AverageEntryPrice() *num.Uint { + absSize := m.size + if absSize < 0 { + absSize = -absSize + } + return num.UintZero().Mul(m.Price(), num.NewUint(uint64(absSize))) +} + func (m testMargin) Party() string { return m.party } @@ -1939,10 +1955,18 @@ func (m testMargin) MarginBalance() *num.Uint { return num.NewUint(m.margin) } +func (m testMargin) OrderMarginBalance() *num.Uint { + return num.NewUint(m.orderMargin) +} + func (m testMargin) GeneralBalance() *num.Uint { return num.NewUint(m.general) } +func (m testMargin) GeneralAccountBalance() *num.Uint { + return num.NewUint(m.general) +} + func (m testMargin) BondBalance() *num.Uint { return num.UintZero() } diff --git a/core/risk/isolated_margin.go b/core/risk/isolated_margin.go new file mode 100644 index 0000000000..063161f659 --- /dev/null +++ b/core/risk/isolated_margin.go @@ -0,0 +1,628 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package risk + +import ( + "context" + "fmt" + "sort" + + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" +) + +// calculateIsolatedMargins calculates the required margins for a party in isolated margin mode. +// It is calculating margin the same way as the cross margin mode does and then enriches the result with the order margin requirement. +// For isolated margin search levels and release levels are set to 0. +// auctionPrice is nil if not in an auction, otherwise the max(markPrice, indicativePrice). +// NB: pure calculation, no events emitted, no state changed. +func (e *Engine) calculateIsolatedMargins(m events.Margin, marketObservable *num.Uint, inc num.Decimal, marginFactor num.Decimal, auctionPrice *num.Uint, orders []*types.Order) *types.MarginLevels { + auction := e.as.InAuction() && !e.as.CanLeave() + // NB:we don't include orders when calculating margin for isolated margin as they are margined separately! + margins := e.calculateMargins(m, marketObservable, *e.factors, false, auction, inc) + margins.OrderMargin = calcOrderMargins(m.Size(), orders, e.positionFactor, marginFactor, auctionPrice) + margins.CollateralReleaseLevel = num.UintZero() + margins.SearchLevel = num.UintZero() + margins.MarginMode = types.MarginModeIsolatedMargin + margins.MarginFactor = marginFactor + margins.Party = m.Party() + margins.Asset = m.Asset() + margins.MarketID = m.MarketID() + margins.Timestamp = e.timeSvc.GetTimeNow().UnixNano() + return margins +} + +// ReleaseExcessMarginAfterAuctionUncrossing is called after auction uncrossing to release excess order margin due to orders placed during an auction +// when the price used for order margin is the auction price rather than the order price. +func (e *Engine) ReleaseExcessMarginAfterAuctionUncrossing(ctx context.Context, m events.Margin, marketObservable *num.Uint, increment num.Decimal, marginFactor num.Decimal, orders []*types.Order) events.Risk { + margins := e.calculateIsolatedMargins(m, marketObservable, increment, marginFactor, nil, orders) + e.updateMarginLevels(events.NewMarginLevelsEvent(ctx, *margins)) + if margins.OrderMargin.LT(m.OrderMarginBalance()) { + amt := num.UintZero().Sub(m.OrderMarginBalance(), margins.OrderMargin) + return &marginChange{ + Margin: m, + transfer: &types.Transfer{ + Owner: m.Party(), + Type: types.TransferTypeOrderMarginHigh, + Amount: &types.FinancialAmount{ + Asset: m.Asset(), + Amount: amt, + }, + MinAmount: amt.Clone(), + }, + margins: margins, + } + } + return nil +} + +// UpdateIsolatedMarginOnAggressor is called when a new order comes in and is matched immediately. +// NB: evt has the position after the trades + orders need to include the new order with the updated remaining. +// returns an error if the new margin is invalid or if the margin account cannot be topped up from general account. +// if successful it updates the margin level and returns the transfer that is needed for the topup of the margin account or release from the margin account excess. +func (e *Engine) UpdateIsolatedMarginOnAggressor(ctx context.Context, evt events.Margin, marketObservable *num.Uint, increment num.Decimal, orders []*types.Order, trades []*types.Trade, marginFactor num.Decimal, traderSide types.Side, isAmend bool) ([]events.Risk, error) { + if evt == nil { + return nil, nil + } + margins := e.calculateIsolatedMargins(evt, marketObservable, increment, marginFactor, nil, orders) + tradedSize := int64(0) + side := trades[0].Aggressor + requiredMargin := num.UintZero() + for _, t := range trades { + tradedSize += int64(t.Size) + requiredMargin.AddSum(num.UintZero().Mul(t.Price, num.NewUint(t.Size))) + } + if side == types.SideSell { + tradedSize = -tradedSize + } + oldPosition := evt.Size() - tradedSize + if evt.Size()*oldPosition >= 0 { // position didn't switch sides + if int64Abs(oldPosition) < int64Abs(evt.Size()) { // position increased + requiredMargin, _ = num.UintFromDecimal(requiredMargin.ToDecimal().Div(e.positionFactor).Mul(marginFactor)) + if num.Sum(requiredMargin, evt.MarginBalance()).LT(margins.MaintenanceMargin) { + return nil, ErrInsufficientFundsForMaintenanceMargin + } + if !isAmend && requiredMargin.GT(evt.GeneralAccountBalance()) { + return nil, ErrInsufficientFundsForMarginInGeneralAccount + } + if isAmend && requiredMargin.GT(num.Sum(evt.GeneralAccountBalance(), evt.OrderMarginBalance())) { + return nil, ErrInsufficientFundsForMarginInGeneralAccount + } + } + } else { + // position did switch sides + requiredMargin = num.UintZero() + pos := int64Abs(oldPosition) + totalSize := uint64(0) + for _, t := range trades { + if pos >= t.Size { + pos -= t.Size + totalSize += t.Size + } else if pos == 0 { + requiredMargin.AddSum(num.UintZero().Mul(t.Price, num.NewUint(t.Size))) + } else { + size := t.Size - pos + requiredMargin.AddSum(num.UintZero().Mul(t.Price, num.NewUint(size))) + pos = 0 + } + } + // The new margin required balance is requiredMargin, so we need to check that: + // 1) it's greater than maintenance margin to keep the invariant + // 2) there are sufficient funds in what's currently in the margin account + general account to cover for the new required margin + requiredMargin, _ = num.UintFromDecimal(requiredMargin.ToDecimal().Div(e.positionFactor).Mul(marginFactor)) + if num.Sum(requiredMargin, evt.MarginBalance()).LT(margins.MaintenanceMargin) { + return nil, ErrInsufficientFundsForMaintenanceMargin + } + if requiredMargin.GT(num.Sum(evt.GeneralAccountBalance(), evt.MarginBalance())) { + return nil, ErrInsufficientFundsForMarginInGeneralAccount + } + } + + e.updateMarginLevels(events.NewMarginLevelsEvent(ctx, *margins)) + transfers := getIsolatedMarginTransfersOnPositionChange(evt.Party(), evt.Asset(), trades, traderSide, evt.Size(), e.positionFactor, marginFactor, evt.MarginBalance(), evt.OrderMarginBalance(), marketObservable, true, isAmend) + if transfers == nil { + return nil, nil + } + ret := []events.Risk{} + for _, t := range transfers { + ret = append(ret, &marginChange{ + Margin: evt, + transfer: t, + margins: margins, + }) + } + return ret, nil +} + +// UpdateIsolatedMarginOnOrder checks that the party has sufficient cover for the given orders including the new one. It returns an error if the party doesn't have sufficient cover and the necessary transfers otherwise. +// NB: auctionPrice should be nil in continuous mode. +func (e *Engine) UpdateIsolatedMarginOnOrder(ctx context.Context, evt events.Margin, orders []*types.Order, marketObservable *num.Uint, auctionPrice *num.Uint, increment num.Decimal, marginFactor num.Decimal) (events.Risk, error) { + auction := e.as.InAuction() && !e.as.CanLeave() + var ap *num.Uint + if auction { + ap = auctionPrice + } + margins := e.calculateIsolatedMargins(evt, marketObservable, increment, marginFactor, ap, orders) + + // if the margin account balance + the required order margin is less than the maintenance margin, return error + if margins.OrderMargin.GT(evt.OrderMarginBalance()) && num.UintZero().Sub(margins.OrderMargin, evt.OrderMarginBalance()).GT(evt.GeneralAccountBalance()) { + return nil, ErrInsufficientFundsForMarginInGeneralAccount + } + + e.updateMarginLevels(events.NewMarginLevelsEvent(ctx, *margins)) + var amt *num.Uint + tp := types.TransferTypeOrderMarginLow + if margins.OrderMargin.GT(evt.OrderMarginBalance()) { + amt = num.UintZero().Sub(margins.OrderMargin, evt.OrderMarginBalance()) + } else { + amt = num.UintZero().Sub(evt.OrderMarginBalance(), margins.OrderMargin) + tp = types.TransferTypeOrderMarginHigh + } + + var trnsfr *types.Transfer + if amt.IsZero() { + return nil, nil + } + + trnsfr = &types.Transfer{ + Owner: evt.Party(), + Type: tp, + Amount: &types.FinancialAmount{ + Asset: evt.Asset(), + Amount: amt, + }, + MinAmount: amt.Clone(), + } + + change := &marginChange{ + Margin: evt, + transfer: trnsfr, + margins: margins, + } + return change, nil +} + +// UpdateIsolatedMarginOnPositionChanged is called upon changes to the position of a party in isolated margin mode. +// Depending on the nature of the change it checks if it needs to move funds into our out of the margin account from the +// order margin account or to the general account. +// At this point we don't enforce any invariants just calculate transfers. +func (e *Engine) UpdateIsolatedMarginsOnPositionChange(ctx context.Context, evt events.Margin, marketObservable *num.Uint, increment num.Decimal, orders []*types.Order, trades []*types.Trade, traderSide types.Side, marginFactor num.Decimal) ([]events.Risk, error) { + if evt == nil { + return nil, nil + } + margins := e.calculateIsolatedMargins(evt, marketObservable, increment, marginFactor, nil, orders) + transfer := getIsolatedMarginTransfersOnPositionChange(evt.Party(), evt.Asset(), trades, traderSide, evt.Size(), e.positionFactor, marginFactor, evt.MarginBalance(), evt.OrderMarginBalance(), marketObservable, false, false) + e.updateMarginLevels(events.NewMarginLevelsEvent(ctx, *margins)) + ret := []events.Risk{ + &marginChange{ + Margin: evt, + transfer: transfer[0], + margins: margins, + }, + } + + var amtForRelease *num.Uint + if !evt.OrderMarginBalance().IsZero() && margins.OrderMargin.IsZero() && transfer != nil && evt.OrderMarginBalance().GT(transfer[0].Amount.Amount) { + amtForRelease = num.UintZero().Sub(evt.OrderMarginBalance(), transfer[0].Amount.Amount) + } + + // if there's no more order margin requirement, release remaining order margin + if amtForRelease != nil && !amtForRelease.IsZero() { + ret = append(ret, + &marginChange{ + Margin: evt, + transfer: &types.Transfer{ + Owner: evt.Party(), + Type: types.TransferTypeOrderMarginHigh, + Amount: &types.FinancialAmount{ + Asset: evt.Asset(), + Amount: amtForRelease, + }, + MinAmount: amtForRelease.Clone(), + }, + margins: margins, + }, + ) + } + return ret, nil +} + +func (e *Engine) CheckMarginInvariants(ctx context.Context, evt events.Margin, marketObservable *num.Uint, increment num.Decimal, orders []*types.Order, marginFactor num.Decimal) (events.Risk, error) { + margins := e.calculateIsolatedMargins(evt, marketObservable, increment, marginFactor, nil, orders) + e.updateMarginLevels(events.NewMarginLevelsEvent(ctx, *margins)) + return e.checkMarginInvariants(evt, margins) +} + +// CheckMarginInvariants returns an error if the margin invariants are invalidated, i.e. if margin balance < margin level or order margin balance < order margin level. +func (e *Engine) checkMarginInvariants(evt events.Margin, margins *types.MarginLevels) (events.Risk, error) { + ret := &marginChange{ + Margin: evt, + transfer: nil, + margins: margins, + } + if evt.MarginBalance().LT(margins.MaintenanceMargin) { + return ret, ErrInsufficientFundsForMaintenanceMargin + } + if evt.OrderMarginBalance().LT(margins.OrderMargin) { + return ret, ErrInsufficientFundsForOrderMargin + } + return ret, nil +} + +// SwitchToIsolatedMargin attempts to switch the party from cross margin mode to isolated mode. +// Error can be returned if it is not possible for the party to switch at this moment. +// If successful the new margin levels are buffered and the required margin level, margin balances, and transfers (aka events.risk) is returned. +func (e *Engine) SwitchToIsolatedMargin(ctx context.Context, evt events.Margin, marketObservable *num.Uint, inc num.Decimal, orders []*types.Order, marginFactor num.Decimal, auctionPrice *num.Uint) ([]events.Risk, error) { + margins := e.calculateIsolatedMargins(evt, marketObservable, inc, marginFactor, auctionPrice, orders) + risk, err := switchToIsolatedMargin(evt, margins, orders, marginFactor, e.positionFactor) + if err != nil { + return nil, err + } + + e.updateMarginLevels(events.NewMarginLevelsEvent(ctx, *margins)) + return risk, nil +} + +// SwitchFromIsolatedMargin switches the party from isolated margin mode to cross margin mode. +// This includes: +// 1. recalcualtion of the required margin in cross margin mode + margin levels are buffered +// 2. return a transfer of all the balance from order margin account to margin account +// NB: cannot fail. +func (e *Engine) SwitchFromIsolatedMargin(ctx context.Context, evt events.Margin, marketObservable *num.Uint, inc num.Decimal) events.Risk { + amt := evt.OrderMarginBalance().Clone() + auction := e.as.InAuction() && !e.as.CanLeave() + margins := e.calculateMargins(evt, marketObservable, *e.factors, true, auction, inc) + margins.Party = evt.Party() + margins.Asset = evt.Asset() + margins.MarketID = evt.MarketID() + margins.Timestamp = e.timeSvc.GetTimeNow().UnixNano() + e.updateMarginLevels(events.NewMarginLevelsEvent(ctx, *margins)) + + return &marginChange{ + Margin: evt, + transfer: &types.Transfer{ + Owner: evt.Party(), + Type: types.TransferTypeIsolatedMarginLow, + MinAmount: amt, + Amount: &types.FinancialAmount{ + Asset: evt.Asset(), + Amount: amt.Clone(), + }, + }, + margins: margins, + } +} + +// getIsolatedMarginTransfersOnPositionChange returns the transfers that need to be made to/from the margin account in isolated margin mode +// when the position changes. This handles the 3 different cases of position change (increase, decrease, switch sides). +// NB: positionSize is *after* the trades. +func getIsolatedMarginTransfersOnPositionChange(party, asset string, trades []*types.Trade, traderSide types.Side, positionSize int64, positionFactor, marginFactor num.Decimal, curMarginBalance, orderMarginBalance, markPrice *num.Uint, aggressiveSide bool, isAmend bool) []*types.Transfer { + positionDelta := int64(0) + marginToAdd := num.UintZero() + vwap := num.UintZero() + for _, t := range trades { + positionDelta += int64(t.Size) + marginToAdd.AddSum(num.UintZero().Mul(t.Price, num.NewUint(t.Size))) + vwap.AddSum(num.UintZero().Mul(t.Price, num.NewUint(t.Size))) + } + vwap = num.UintZero().Div(vwap, num.NewUint(uint64(positionDelta))) + if traderSide == types.SideSell { + positionDelta = -positionDelta + } + oldPosition := positionSize - positionDelta + + if positionSize*oldPosition >= 0 { // position didn't switch sides + if int64Abs(oldPosition) < int64Abs(positionSize) { // position increased + marginToAdd, _ = num.UintFromDecimal(marginToAdd.ToDecimal().Div(positionFactor).Mul(marginFactor)) + if !isAmend { + // need to top up the margin account from the order margin account + var tp types.TransferType + if aggressiveSide { + tp = types.TransferTypeMarginLow + } else { + tp = types.TransferTypeIsolatedMarginLow + } + return []*types.Transfer{{ + Owner: party, + Type: tp, + Amount: &types.FinancialAmount{ + Asset: asset, + Amount: marginToAdd, + }, + MinAmount: marginToAdd, + }} + } + if marginToAdd.LTE(orderMarginBalance) { + return []*types.Transfer{{ + Owner: party, + Type: types.TransferTypeIsolatedMarginLow, + Amount: &types.FinancialAmount{ + Asset: asset, + Amount: marginToAdd, + }, + MinAmount: marginToAdd, + }} + } + generalTopUp := num.UintZero().Sub(marginToAdd, orderMarginBalance) + return []*types.Transfer{ + { + Owner: party, + Type: types.TransferTypeIsolatedMarginLow, + Amount: &types.FinancialAmount{ + Asset: asset, + Amount: orderMarginBalance, + }, + MinAmount: orderMarginBalance, + }, { + Owner: party, + Type: types.TransferTypeMarginLow, + Amount: &types.FinancialAmount{ + Asset: asset, + Amount: generalTopUp, + }, + MinAmount: generalTopUp, + }, + } + } + // position decreased + // marginToRelease = balanceBefore + positionBefore x (newTradeVWAP - markPrice) x |totalTradeSize|/|positionBefore| + theoreticalAccountBalance, _ := num.UintFromDecimal(vwap.ToDecimal().Sub(markPrice.ToDecimal()).Mul(num.DecimalFromInt64(int64(int64Abs(oldPosition)))).Div(positionFactor).Add(curMarginBalance.ToDecimal())) + marginToRelease := num.UintZero().Div(num.UintZero().Mul(theoreticalAccountBalance, num.NewUint(int64Abs(positionDelta))), num.NewUint(int64Abs(oldPosition))) + // need to top up the margin account + return []*types.Transfer{{ + Owner: party, + Type: types.TransferTypeMarginHigh, + Amount: &types.FinancialAmount{ + Asset: asset, + Amount: marginToRelease, + }, + MinAmount: marginToRelease, + }} + } + + // position switched sides, we need to handles the two sides separately + // first calculate the amount that would be released + marginToRelease := curMarginBalance.Clone() + marginToAdd = num.UintZero() + pos := int64Abs(oldPosition) + totalSize := uint64(0) + for _, t := range trades { + if pos >= t.Size { + pos -= t.Size + totalSize += t.Size + } else if pos == 0 { + marginToAdd.AddSum(num.UintZero().Mul(t.Price, num.NewUint(t.Size))) + } else { + size := t.Size - pos + marginToAdd.AddSum(num.UintZero().Mul(t.Price, num.NewUint(size))) + pos = 0 + } + } + marginToAdd, _ = num.UintFromDecimal(marginToAdd.ToDecimal().Div(positionFactor).Mul(marginFactor)) + topup := num.UintZero() + release := num.UintZero() + if marginToAdd.GT(marginToRelease) { + topup = num.UintZero().Sub(marginToAdd, marginToRelease) + } else { + release = num.UintZero().Sub(marginToRelease, marginToAdd) + } + + amt := topup + tp := types.TransferTypeMarginLow + if aggressiveSide { + tp = types.TransferTypeMarginLow + } + if !release.IsZero() { + amt = release + tp = types.TransferTypeMarginHigh + } + + if amt.IsZero() { + return nil + } + + return []*types.Transfer{{ + Owner: party, + Type: tp, + Amount: &types.FinancialAmount{ + Asset: asset, + Amount: amt, + }, + MinAmount: amt, + }} +} + +func (e *Engine) CalcOrderMarginsForClosedOutParty(orders []*types.Order, marginFactor num.Decimal) *num.Uint { + return calcOrderMargins(0, orders, e.positionFactor, marginFactor, nil) +} + +// calcOrderMargins calculates the the order margin required for the party given their current orders and margin factor. +func calcOrderMargins(positionSize int64, orders []*types.Order, positionFactor, marginFactor num.Decimal, auctionPrice *num.Uint) *num.Uint { + if len(orders) == 0 { + return num.UintZero() + } + buyOrders := []*types.Order{} + sellOrders := []*types.Order{} + // split orders by side + for _, o := range orders { + if o.Side == types.SideBuy { + buyOrders = append(buyOrders, o) + } else { + sellOrders = append(sellOrders, o) + } + } + // sort orders from best to worst + sort.Slice(buyOrders, func(i, j int) bool { return buyOrders[i].Price.GT(buyOrders[j].Price) }) + sort.Slice(sellOrders, func(i, j int) bool { return sellOrders[i].Price.LT(sellOrders[j].Price) }) + + // calc the side margin + marginByBuy := calcOrderSideMargin(positionSize, buyOrders, positionFactor, marginFactor, auctionPrice) + marginBySell := calcOrderSideMargin(positionSize, sellOrders, positionFactor, marginFactor, auctionPrice) + orderMargin := marginByBuy + if marginBySell.GT(orderMargin) { + orderMargin = marginBySell + } + return orderMargin +} + +// calcOrderSideMargin returns the amount of order margin needed given the current position and party orders. +// Given the sorted orders of the side for the party (sorted from best to worst) +// If the party currently has a position x, assign 0 margin requirement the first-to-trade x of volume on the opposite side as this +// would reduce their position (for example, if a party had a long position 10 and sell orders of 15 at a price of $100 and 10 +// at a price of $150, the first 10 of the sell order at $100 would not require any order margin). +// For any remaining volume, sum side margin = limit price * size * margin factor for each price level, as this is +// the worst-case trade price of the remaining component. +func calcOrderSideMargin(currentPosition int64, orders []*types.Order, positionFactor, marginFactor num.Decimal, auctionPrice *num.Uint) *num.Uint { + margin := num.UintZero() + remainingCovered := int64Abs(currentPosition) + for _, o := range orders { + if o.Status != types.OrderStatusActive || o.PeggedOrder != nil { + continue + } + size := o.TrueRemaining() + // for long position we don't need to count margin for the top size for sell orders + // for short position we don't need to count margin for the top size for buy orders + if remainingCovered != 0 && (o.Side == types.SideBuy && currentPosition < 0) || (o.Side == types.SideSell && currentPosition > 0) { + if size >= remainingCovered { // part of the order doesn't require margin + size = size - remainingCovered + remainingCovered = 0 + } else { // the entire order doesn't require margin + remainingCovered -= size + size = 0 + } + } + if size > 0 { + // if we're in auction we need to use the larger between auction price (which is the max(indicativePrice, markPrice)) and the order price + p := o.Price + if auctionPrice != nil && auctionPrice.GT(p) { + p = auctionPrice + } + // add the margin for the given order + margin.AddSum(num.UintZero().Mul(num.NewUint(size), p)) + } + } + // factor the margin by margin factor and divide by position factor to get to the right decimals + margin, _ = num.UintFromDecimal(margin.ToDecimal().Mul(marginFactor).Div(positionFactor)) + return margin +} + +// switching from cross margin to isolated margin or changing margin factor +// 1. For any active position, calculate average entry price * abs(position) * margin factor. +// Calculate the amount of funds which will be added to, or subtracted from, the general account in order to do this. +// If additional funds must be added which are not available, reject the transaction immediately. +// 2. For any active orders, calculate the quantity limit price * remaining size * margin factor which needs to be placed +// in the order margin account. Add this amount to the difference calculated in step 1. +// If this amount is less than or equal to the amount in the general account, +// perform the transfers (first move funds into/out of margin account, then move funds into the order margin account). +// If there are insufficient funds, reject the transaction. +// 3. Move account to isolated margin mode on this market +// +// If a party has no position nore orders and switches to isolated margin the function returns an empty slice. +func switchToIsolatedMargin(evt events.Margin, margin *types.MarginLevels, orders []*types.Order, marginFactor, positionFactor num.Decimal) ([]events.Risk, error) { + marginAccountBalance := evt.MarginBalance() + generalAccountBalance := evt.GeneralAccountBalance() + orderMarginAccountBalance := evt.OrderMarginBalance() + if orderMarginAccountBalance == nil { + orderMarginAccountBalance = num.UintZero() + } + totalOrderNotional := num.UintZero() + for _, o := range orders { + if o.Status == types.OrderStatusActive && o.PeggedOrder == nil { + totalOrderNotional = totalOrderNotional.AddSum(num.UintZero().Mul(o.Price, num.NewUint(o.TrueRemaining()))) + } + } + + positionSize := int64Abs(evt.Size()) + requiredPositionMargin := num.UintZero().Mul(evt.AverageEntryPrice(), num.NewUint(positionSize)).ToDecimal().Mul(marginFactor).Div(positionFactor) + requireOrderMargin := totalOrderNotional.ToDecimal().Mul(marginFactor).Div(positionFactor) + + // check that we have enough in the general account for any top up needed, i.e. + // topupNeeded = requiredPositionMargin + requireOrderMargin - marginAccountBalance + // if topupNeeded > generalAccountBalance => fail + if requiredPositionMargin.Add(requireOrderMargin).Sub(marginAccountBalance.ToDecimal()).Sub(orderMarginAccountBalance.ToDecimal()).GreaterThan(generalAccountBalance.ToDecimal()) { + return nil, fmt.Errorf("insufficient balance in general account to cover for required order margin") + } + + // average entry price * current position * new margin factor (aka requiredPositionMargin) must be above the initial margin for the current position or the transaction will be rejected + if !requiredPositionMargin.IsZero() && !requiredPositionMargin.GreaterThan(margin.InitialMargin.ToDecimal()) { + return nil, fmt.Errorf("required position margin must be greater than initial margin") + } + + // we're all good, just need to setup the transfers for collateral topup/release + uRequiredPositionMargin, _ := num.UintFromDecimal(requiredPositionMargin) + riskEvents := []events.Risk{} + if !uRequiredPositionMargin.EQ(marginAccountBalance) { + // need to topup or release margin <-> general + var amt *num.Uint + var tp types.TransferType + if uRequiredPositionMargin.GT(marginAccountBalance) { + amt = num.UintZero().Sub(uRequiredPositionMargin, marginAccountBalance) + tp = types.TransferTypeMarginLow + } else { + amt = num.UintZero().Sub(marginAccountBalance, uRequiredPositionMargin) + tp = types.TransferTypeMarginHigh + } + riskEvents = append(riskEvents, &marginChange{ + Margin: evt, + transfer: &types.Transfer{ + Owner: evt.Party(), + Type: tp, + MinAmount: amt, + Amount: &types.FinancialAmount{ + Asset: evt.Asset(), + Amount: amt.Clone(), + }, + }, + margins: margin, + }) + } + uRequireOrderMargin, _ := num.UintFromDecimal(requireOrderMargin) + if !uRequireOrderMargin.EQ(orderMarginAccountBalance) { + // need to topup or release orderMargin <-> general + var amt *num.Uint + var tp types.TransferType + if requireOrderMargin.GreaterThan(orderMarginAccountBalance.ToDecimal()) { + amt = num.UintZero().Sub(uRequireOrderMargin, orderMarginAccountBalance) + tp = types.TransferTypeOrderMarginLow + } else { + amt = num.UintZero().Sub(orderMarginAccountBalance, uRequireOrderMargin) + tp = types.TransferTypeOrderMarginLow + } + riskEvents = append(riskEvents, &marginChange{ + Margin: evt, + transfer: &types.Transfer{ + Owner: evt.Party(), + Type: tp, + MinAmount: amt, + Amount: &types.FinancialAmount{ + Asset: evt.Asset(), + Amount: amt.Clone(), + }, + }, + margins: margin, + }) + } + return riskEvents, nil +} + +// int64Abs returns the absolute uint64 value of the given int64 n. +func int64Abs(n int64) uint64 { + if n < 0 { + return uint64(-n) + } + return uint64(n) +} diff --git a/core/risk/isolated_margin_ex_test.go b/core/risk/isolated_margin_ex_test.go new file mode 100644 index 0000000000..27544e6cd0 --- /dev/null +++ b/core/risk/isolated_margin_ex_test.go @@ -0,0 +1,156 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package risk_test + +import ( + "context" + "testing" + + "code.vegaprotocol.io/vega/core/risk" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" +) + +func TestSwitchFromIsolatedMargin(t *testing.T) { + e := getTestEngine(t, num.DecimalOne()) + evt := testMargin{ + party: "party1", + size: 1, + price: 1000, + asset: "ETH", + margin: 10, + orderMargin: 20, + general: 100000, + market: "ETH/DEC19", + } + // we're switching from margin to isolated, we expect to release all of the order margin + e.as.EXPECT().InAuction().Return(false).AnyTimes() + e.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() + e.tsvc.EXPECT().GetTimeNow().AnyTimes() + e.orderbook.EXPECT().GetCloseoutPrice(gomock.Any(), gomock.Any()).Return(num.NewUint(999), nil) + risk := e.SwitchFromIsolatedMargin(context.Background(), evt, num.NewUint(100), num.DecimalOne()) + require.Equal(t, num.NewUint(20), risk.Transfer().Amount.Amount) + require.Equal(t, num.NewUint(20), risk.Transfer().MinAmount) + require.Equal(t, types.TransferTypeIsolatedMarginLow, risk.Transfer().Type) + require.Equal(t, "party1", risk.Transfer().Owner) + require.Equal(t, num.UintZero(), risk.MarginLevels().OrderMargin) +} + +func TestSwithToIsolatedMarginContinuous(t *testing.T) { + positionFactor := num.DecimalOne() + e := getTestEngine(t, positionFactor) + evt := testMargin{ + party: "party1", + size: 1, + price: 1000, + asset: "ETH", + margin: 10, + orderMargin: 0, + general: 500, + market: "ETH/DEC19", + } + // we're switching from margin to isolated, we expect to release all of the order margin + e.as.EXPECT().InAuction().Return(false).AnyTimes() + e.tsvc.EXPECT().GetTimeNow().AnyTimes() + e.broker.EXPECT().SendBatch(gomock.Any()).AnyTimes() + e.orderbook.EXPECT().GetCloseoutPrice(gomock.Any(), gomock.Any()).Return(num.NewUint(999), nil).AnyTimes() + + // margin factor too low - 0.01 * 1000 * 1 = 10 < 31 initial margin + _, err := e.SwitchToIsolatedMargin(context.Background(), evt, num.NewUint(100), num.DecimalOne(), []*types.Order{}, num.DecimalFromFloat(0.01), nil) + require.Equal(t, "required position margin must be greater than initial margin", err.Error()) + + // not enough in general account to cover + // required position margin (600) + require order margin (0) - margin balance (10) > general account balance (500) + _, err = e.SwitchToIsolatedMargin(context.Background(), evt, num.NewUint(100), num.DecimalOne(), []*types.Order{}, num.DecimalFromFloat(0.6), nil) + require.Equal(t, "insufficient balance in general account to cover for required order margin", err.Error()) + + // case1 - need to topup margin account only + marginFactor := num.DecimalFromFloat(0.5) + orders := []*types.Order{} + riskEvent, err := e.SwitchToIsolatedMargin(context.Background(), evt, num.NewUint(100), num.DecimalOne(), orders, marginFactor, num.UintZero()) + require.NoError(t, err) + require.Equal(t, 1, len(riskEvent)) + require.Equal(t, num.NewUint(490), riskEvent[0].Transfer().Amount.Amount) + require.Equal(t, num.NewUint(490), riskEvent[0].Transfer().MinAmount) + require.Equal(t, types.TransferTypeMarginLow, riskEvent[0].Transfer().Type) + require.Equal(t, "party1", riskEvent[0].Transfer().Owner) + require.Equal(t, num.NewUint(0), riskEvent[0].MarginLevels().OrderMargin) + + buyOrderInfo, sellOrderInfo := extractOrderInfo(orders) + requiredPositionMarginStatic, requiredOrderMarginStatic := risk.CalculateRequiredMarginInIsolatedMode(evt.size, evt.AverageEntryPrice().ToDecimal(), evt.Price().ToDecimal(), buyOrderInfo, sellOrderInfo, positionFactor, marginFactor) + require.True(t, !requiredPositionMarginStatic.IsZero()) + require.True(t, requiredOrderMarginStatic.IsZero()) + transferRecalc := requiredPositionMarginStatic.Sub(evt.MarginBalance().ToDecimal()) + require.True(t, riskEvent[0].Transfer().Amount.Amount.ToDecimal().Sub(transferRecalc).IsZero()) + + // case2 we have also some orders + orders = []*types.Order{ + {Side: types.SideBuy, Remaining: 1, Price: num.NewUint(1000), Status: types.OrderStatusActive}, + } + + // not enough in general account to cover + // required position margin (300) + require order margin (300) - margin balance (10) > general account balance (500) + _, err = e.SwitchToIsolatedMargin(context.Background(), evt, num.NewUint(100), num.DecimalOne(), orders, num.DecimalFromFloat(0.3), nil) + require.Equal(t, "insufficient balance in general account to cover for required order margin", err.Error()) + + evt.general = 10000 + marginFactor = num.DecimalFromFloat(0.3) + riskEvent, err = e.SwitchToIsolatedMargin(context.Background(), evt, num.NewUint(100), num.DecimalOne(), orders, marginFactor, nil) + require.NoError(t, err) + require.Equal(t, 2, len(riskEvent)) + require.Equal(t, num.NewUint(290), riskEvent[0].Transfer().Amount.Amount) + require.Equal(t, num.NewUint(290), riskEvent[0].Transfer().MinAmount) + require.Equal(t, types.TransferTypeMarginLow, riskEvent[0].Transfer().Type) + require.Equal(t, "party1", riskEvent[0].Transfer().Owner) + require.Equal(t, num.NewUint(300), riskEvent[0].MarginLevels().OrderMargin) + + buyOrderInfo, sellOrderInfo = extractOrderInfo(orders) + requiredPositionMarginStatic, requiredOrderMarginStatic = risk.CalculateRequiredMarginInIsolatedMode(evt.size, evt.AverageEntryPrice().ToDecimal(), evt.Price().ToDecimal(), buyOrderInfo, sellOrderInfo, positionFactor, marginFactor) + require.True(t, !requiredPositionMarginStatic.IsZero()) + require.True(t, !requiredOrderMarginStatic.IsZero()) + transferRecalc = requiredPositionMarginStatic.Sub(evt.MarginBalance().ToDecimal()) + require.True(t, riskEvent[0].Transfer().Amount.Amount.ToDecimal().Sub(transferRecalc).IsZero()) + + require.Equal(t, num.NewUint(300), riskEvent[1].Transfer().Amount.Amount) + require.Equal(t, num.NewUint(300), riskEvent[1].Transfer().MinAmount) + require.Equal(t, types.TransferTypeOrderMarginLow, riskEvent[1].Transfer().Type) + require.Equal(t, "party1", riskEvent[1].Transfer().Owner) + require.Equal(t, num.NewUint(300), riskEvent[0].MarginLevels().OrderMargin) + + transferRecalc = requiredOrderMarginStatic.Sub(evt.OrderMarginBalance().ToDecimal()) + require.True(t, riskEvent[1].Transfer().Amount.Amount.ToDecimal().Sub(transferRecalc).IsZero()) +} + +func extractOrderInfo(orders []*types.Order) (buyOrders, sellOrders []*risk.OrderInfo) { + buyOrders, sellOrders = []*risk.OrderInfo{}, []*risk.OrderInfo{} + for _, o := range orders { + if o.Status == types.OrderStatusActive { + remaining := o.TrueRemaining() + price := o.Price.ToDecimal() + isMarketOrder := o.Type == types.OrderTypeMarket + if o.Side == types.SideBuy { + buyOrders = append(buyOrders, &risk.OrderInfo{TrueRemaining: remaining, Price: price, IsMarketOrder: isMarketOrder}) + } + if o.Side == types.SideSell { + sellOrders = append(sellOrders, &risk.OrderInfo{TrueRemaining: remaining, Price: price, IsMarketOrder: isMarketOrder}) + } + } + } + return buyOrders, sellOrders +} diff --git a/core/risk/isolated_margin_test.go b/core/risk/isolated_margin_test.go new file mode 100644 index 0000000000..7f07bb6355 --- /dev/null +++ b/core/risk/isolated_margin_test.go @@ -0,0 +1,444 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package risk + +import ( + "testing" + + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" + + "github.com/stretchr/testify/require" +) + +func TestCalcMarginForOrdersBySideBuyContinous(t *testing.T) { + orders := []*types.Order{ + {Side: types.SideBuy, Remaining: 10, Price: num.NewUint(50), Status: types.OrderStatusActive}, + {Side: types.SideBuy, Remaining: 20, Price: num.NewUint(40), Status: types.OrderStatusActive}, + {Side: types.SideBuy, Remaining: 30, Price: num.NewUint(20), Status: types.OrderStatusActive}, + } + currentPos := int64(0) + marginFactor := num.DecimalFromFloat(0.5) + positionFactor := num.DecimalFromInt64(10) + + buyOrderInfo, sellOrderInfo := extractOrderInfo(orders) + + // no position + // orderMargin = 0.5*(10 * 50 + 20 * 40 + 30 * 20)/10 = 95 + orderSideMargin := calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.NewUint(95), orderSideMargin) + + staticResult := CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // long position - similar to no position, nothing is covered + // orderMargin = 0.5*(10 * 50 + 20 * 40 + 30 * 20)/10 = 95 + currentPos = 20 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.NewUint(95), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // short position + // part of the top order is covered, i.e. only 6 count: + // orderMargin = 0.5*(6 * 50 + 20 * 40 + 30 * 20)/10 = 85 + currentPos = -4 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.NewUint(85), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // short position + // all of the top order is covered, a some of the second one too + // orderMargin = 0.5*(0 * 50 + 10 * 40 + 30 * 20)/10 = 50 + currentPos = -20 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.NewUint(50), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // short position + // all of the orders are covered by position on the other side + currentPos = -60 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.UintZero(), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) +} + +func TestCalcMarginForOrdersBySideSellContinous(t *testing.T) { + orders := []*types.Order{ + {Side: types.SideSell, Remaining: 10, Price: num.NewUint(20), Status: types.OrderStatusActive}, + {Side: types.SideSell, Remaining: 20, Price: num.NewUint(40), Status: types.OrderStatusActive}, + {Side: types.SideSell, Remaining: 30, Price: num.NewUint(50), Status: types.OrderStatusActive}, + } + currentPos := int64(0) + marginFactor := num.DecimalFromFloat(0.5) + positionFactor := num.DecimalFromInt64(10) + + buyOrderInfo, sellOrderInfo := extractOrderInfo(orders) + + // no position + // orderMargin = 0.5*(10 * 20 + 20 * 40 + 30 * 50)/10 = 125 + orderSideMargin := calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.NewUint(125), orderSideMargin) + staticResult := CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // short position - similar to no position, nothing is covered + // orderMargin = 0.5*(10 * 20 + 20 * 40 + 30 * 50)/10 = 125 + currentPos = -20 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.NewUint(125), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // long position + // part of the top order is covered, i.e. only 6 count: + // orderMargin = 0.5*(6 * 20 + 20 * 40 + 30 * 50)/10 = 121 + currentPos = 4 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.NewUint(121), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // long position + // all of the top order is covered, a some of the second one too + // orderMargin = 0.5*(0 * 20 + 10 * 40 + 30 * 50)/10 = 95 + currentPos = 20 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.NewUint(95), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // long position + // all of the orders are covered by position on the other side + currentPos = 60 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.UintZero(), calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, nil)) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) +} + +func TestCalcMarginForOrdersBySideBuyAuction(t *testing.T) { + orders := []*types.Order{ + {Side: types.SideBuy, Remaining: 10, Price: num.NewUint(50), Status: types.OrderStatusActive}, + {Side: types.SideBuy, Remaining: 20, Price: num.NewUint(40), Status: types.OrderStatusActive}, + {Side: types.SideBuy, Remaining: 30, Price: num.NewUint(20), Status: types.OrderStatusActive}, + } + currentPos := int64(0) + marginFactor := num.DecimalFromFloat(0.5) + positionFactor := num.DecimalFromInt64(10) + auctionPrice := num.NewUint(42) + + buyOrderInfo, sellOrderInfo := extractOrderInfo(orders) + + // no position + // orderMargin = 0.5*(10 * 50 + 20 * 42 + 30 * 42)/10 = 130 (using the max between the order and auction price) + orderSideMargin := calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, auctionPrice) + require.Equal(t, num.NewUint(130), orderSideMargin) + staticResult := CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalFromUint(auctionPrice)) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // long position - similar to no position, nothing is covered (using the max between the order and auction price) + // orderMargin = 0.5*(10 * 50 + 20 * 42 + 30 * 42)/10 = 130 + currentPos = 20 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, auctionPrice) + require.Equal(t, num.NewUint(130), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalFromUint(auctionPrice)) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // short position + // part of the top order is covered, i.e. only 6 count: + // orderMargin = 0.5*(6 * 50 + 20 * 42 + 30 * 42)/10 = 120 + currentPos = -4 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, auctionPrice) + require.Equal(t, num.NewUint(120), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalFromUint(auctionPrice)) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // short position + // all of the top order is covered, a some of the second one too + // orderMargin = 0.5*(0 * 50 + 10 * 42 + 30 * 42)/10 = 84 + currentPos = -20 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, auctionPrice) + require.Equal(t, num.NewUint(84), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalFromUint(auctionPrice)) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // short position + // all of the orders are covered by position on the other side + currentPos = -60 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, auctionPrice) + require.Equal(t, num.UintZero(), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalFromUint(auctionPrice)) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) +} + +func TestCalcMarginForOrdersBySideSellAuction(t *testing.T) { + orders := []*types.Order{ + {Side: types.SideSell, Remaining: 10, Price: num.NewUint(20), Status: types.OrderStatusActive}, + {Side: types.SideSell, Remaining: 20, Price: num.NewUint(40), Status: types.OrderStatusActive}, + {Side: types.SideSell, Remaining: 30, Price: num.NewUint(50), Status: types.OrderStatusActive}, + } + currentPos := int64(0) + marginFactor := num.DecimalFromFloat(0.5) + positionFactor := num.DecimalFromInt64(10) + auctionPrice := num.NewUint(42) + + buyOrderInfo, sellOrderInfo := extractOrderInfo(orders) + + // no position + // orderMargin = 0.5*(10 * 42 + 20 * 42 + 30 * 50)/10 = 138 + orderSideMargin := calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, auctionPrice) + require.Equal(t, num.NewUint(138), orderSideMargin) + staticResult := CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalFromUint(auctionPrice)) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // short position - similar to no position, nothing is covered + // orderMargin = 0.5*(10 * 42 + 20 * 42 + 30 * 50)/10 = 138 + currentPos = -20 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, auctionPrice) + require.Equal(t, num.NewUint(138), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalFromUint(auctionPrice)) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // long position + // part of the top order is covered, i.e. only 6 count: + // orderMargin = 0.5*(6 * 42 + 20 * 42 + 30 * 50)/10 = 129 + currentPos = 4 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, auctionPrice) + require.Equal(t, num.NewUint(129), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalFromUint(auctionPrice)) + require.Equal(t, staticResult.RoundDown(0).String(), orderSideMargin.String()) // equal within rounding + + // long position + // all of the top order is covered, a some of the second one too + // orderMargin = 0.5*(0 * 42 + 10 * 42 + 30 * 50)/10 = 96 + currentPos = 20 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, auctionPrice) + require.Equal(t, num.NewUint(96), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalFromUint(auctionPrice)) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // long position + // all of the orders are covered by position on the other side + currentPos = 60 + orderSideMargin = calcOrderSideMargin(currentPos, orders, positionFactor, marginFactor, auctionPrice) + require.Equal(t, num.UintZero(), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalFromUint(auctionPrice)) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) +} + +func TestCalcOrderMarginContinous(t *testing.T) { + orders := []*types.Order{ + {Side: types.SideSell, Remaining: 10, Price: num.NewUint(20), Status: types.OrderStatusActive}, + {Side: types.SideBuy, Remaining: 10, Price: num.NewUint(50), Status: types.OrderStatusActive}, + {Side: types.SideSell, Remaining: 20, Price: num.NewUint(40), Status: types.OrderStatusActive}, + {Side: types.SideBuy, Remaining: 20, Price: num.NewUint(40), Status: types.OrderStatusActive}, + {Side: types.SideSell, Remaining: 30, Price: num.NewUint(50), Status: types.OrderStatusActive}, + {Side: types.SideBuy, Remaining: 30, Price: num.NewUint(20), Status: types.OrderStatusActive}, + } + currentPos := int64(0) + marginFactor := num.DecimalFromFloat(0.5) + positionFactor := num.DecimalFromInt64(10) + + buyOrderInfo, sellOrderInfo := extractOrderInfo(orders) + + // no position + // buy orderMargin = 0.5*(10 * 50 + 20 * 40 + 30 * 20)/10 = 95 + // sell orderMargin = 0.5*(10 * 20 + 20 * 40 + 30 * 50)/10 = 125 + // order margin = max(95,125) = 125 + orderSideMargin := calcOrderMargins(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.NewUint(125), orderSideMargin) + staticResult := CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // long position + // buy orderMargin = 0.5*(10 * 50 + 20 * 40 + 30 * 20)/10 = 95 + // sell orderMargin = 0.5*(6 * 20 + 20 * 40 + 30 * 50)/10 = 121 + currentPos = 4 + orderSideMargin = calcOrderMargins(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.NewUint(121), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // longer position + // buy orderMargin = 0.5*(10 * 50 + 20 * 40 + 30 * 20)/10 = 95 + // sell orderMargin = 0.5*(0 * 20 + 5 * 40 + 30 * 50)/10 = 85 + currentPos = 25 + orderSideMargin = calcOrderMargins(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.NewUint(95), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // short position + // buy orderMargin = 0.5*(6 * 50 + 20 * 40 + 30 * 20)/10 = 85 + // sell orderMargin = 0.5*(10 * 20 + 20 * 40 + 30 * 50)/10 = 125 + currentPos = -4 + orderSideMargin = calcOrderMargins(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.NewUint(125), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) + + // shorter position + // buy orderMargin = 0.5*(0 * 50 + 10 * 40 + 30 * 20)/10 = 50 + // sell orderMargin = 0.5*(10 * 20 + 20 * 40 + 30 * 50)/10 = 125 + currentPos = -20 + orderSideMargin = calcOrderMargins(currentPos, orders, positionFactor, marginFactor, nil) + require.Equal(t, num.NewUint(125), orderSideMargin) + staticResult = CalcOrderMarginIsolatedMode(currentPos, buyOrderInfo, sellOrderInfo, positionFactor, marginFactor, num.DecimalZero()) + require.Equal(t, staticResult.Round(0).String(), orderSideMargin.String()) +} + +func TestGetIsolatedMarginTransfersOnPositionChangeIncrease(t *testing.T) { + party := "Zohar" + asset := "BTC" + + marginFactor := num.NewDecimalFromFloat(0.5) + curMarginBalance := num.NewUint(1000) + positionFactor := num.DecimalFromInt64(10) + + // go long trades + trades := []*types.Trade{ + {Size: 5, Price: num.NewUint(12)}, + {Size: 10, Price: num.NewUint(10)}, + } + + // position going up from 0 to 15 (increasing) + // required margin topup is equal to: 0.5 * (5*12+10*10)/10 = 8 + transfer := getIsolatedMarginTransfersOnPositionChange(party, asset, trades, types.SideBuy, 15, positionFactor, marginFactor, curMarginBalance, num.UintZero(), nil, false, false) + // i.e. take from order margin account to the margin account + require.Equal(t, types.TransferTypeIsolatedMarginLow, transfer[0].Type) + require.Equal(t, num.NewUint(8), transfer[0].Amount.Amount) + require.Equal(t, num.NewUint(8), transfer[0].MinAmount) + + // position going up from 0 to -15 (increasing) + // go short trades + trades = []*types.Trade{ + {Size: 10, Price: num.NewUint(10)}, + {Size: 5, Price: num.NewUint(12)}, + } + // required margin topup is equal to: 0.5 * (5*12+10*10)/10 = 8 + transfer = getIsolatedMarginTransfersOnPositionChange(party, asset, trades, types.SideSell, -15, positionFactor, marginFactor, curMarginBalance, num.UintZero(), nil, false, false) + // i.e. take from order margin account to the margin account + require.Equal(t, types.TransferTypeIsolatedMarginLow, transfer[0].Type) + require.Equal(t, num.NewUint(8), transfer[0].Amount.Amount) + require.Equal(t, num.NewUint(8), transfer[0].MinAmount) +} + +func TestGetIsolatedMarginTransfersOnPositionChangeDecrease(t *testing.T) { + party := "Zohar" + asset := "BTC" + + marginFactor := num.NewDecimalFromFloat(0.5) + curMarginBalance := num.NewUint(40) + positionFactor := num.DecimalFromInt64(10) + + trades := []*types.Trade{ + {Size: 5, Price: num.NewUint(12)}, + {Size: 10, Price: num.NewUint(10)}, + } + markPrice := num.NewUint(12) + // position going down from 20 to 5 (decreasing) + // required margin topup is equal to: (40+20/10*-2) * 15/20) = 27 + transfer := getIsolatedMarginTransfersOnPositionChange(party, asset, trades, types.SideSell, 5, positionFactor, marginFactor, curMarginBalance, num.UintZero(), markPrice, false, false) + // i.e. release from the margin account to the general account + require.Equal(t, types.TransferTypeMarginHigh, transfer[0].Type) + require.Equal(t, num.NewUint(27), transfer[0].Amount.Amount) + require.Equal(t, num.NewUint(27), transfer[0].MinAmount) + + // position going down from 20 to 5 (decreasing) + trades = []*types.Trade{ + {Size: 5, Price: num.NewUint(10)}, + {Size: 10, Price: num.NewUint(12)}, + } + // required margin release is equal to: (40+20/10*-1) * 15/20) = 28 + transfer = getIsolatedMarginTransfersOnPositionChange(party, asset, trades, types.SideBuy, -5, positionFactor, marginFactor, curMarginBalance, num.UintZero(), markPrice, false, false) + // i.e. release from margin account general account + require.Equal(t, types.TransferTypeMarginHigh, transfer[0].Type) + require.Equal(t, num.NewUint(28), transfer[0].Amount.Amount) + require.Equal(t, num.NewUint(28), transfer[0].MinAmount) +} + +func TestGetIsolatedMarginTransfersOnPositionChangeSwitchSides(t *testing.T) { + party := "Zohar" + asset := "BTC" + + marginFactor := num.NewDecimalFromFloat(0.5) + curMarginBalance := num.NewUint(1000) + positionFactor := num.DecimalFromInt64(10) + + trades := []*types.Trade{ + {Size: 15, Price: num.NewUint(11)}, + {Size: 10, Price: num.NewUint(12)}, + } + // position going from 20 to -5 (switching sides) + // required margin release is equal to: we release all 1000 margin, then require 0.5 * 5 * 12 / 10 + transfer := getIsolatedMarginTransfersOnPositionChange(party, asset, trades, types.SideSell, -5, positionFactor, marginFactor, curMarginBalance, num.UintZero(), nil, false, false) + // i.e. release from the margin account to the general account + require.Equal(t, types.TransferTypeMarginHigh, transfer[0].Type) + require.Equal(t, num.NewUint(997), transfer[0].Amount.Amount) + require.Equal(t, num.NewUint(997), transfer[0].MinAmount) + + curMarginBalance = num.NewUint(1) + transfer = getIsolatedMarginTransfersOnPositionChange(party, asset, trades, types.SideSell, -5, positionFactor, marginFactor, curMarginBalance, num.UintZero(), nil, false, false) + + // now we expect to need 2 more to be added from the order margin account + require.Equal(t, types.TransferTypeMarginLow, transfer[0].Type) + require.Equal(t, num.NewUint(2), transfer[0].Amount.Amount) + require.Equal(t, num.NewUint(2), transfer[0].MinAmount) + + curMarginBalance = num.NewUint(1000) + trades = []*types.Trade{ + {Size: 10, Price: num.NewUint(12)}, + {Size: 15, Price: num.NewUint(11)}, + } + // position going from -20 to 5 (switching sides) + // required margin release is equal to: we release all 1000 margin, then require 0.5 * 5 * 11 / 10 + transfer = getIsolatedMarginTransfersOnPositionChange(party, asset, trades, types.SideBuy, 5, positionFactor, marginFactor, curMarginBalance, num.UintZero(), nil, false, false) + // i.e. release from the margin account to the general account + require.Equal(t, types.TransferTypeMarginHigh, transfer[0].Type) + require.Equal(t, num.NewUint(998), transfer[0].Amount.Amount) + require.Equal(t, num.NewUint(998), transfer[0].MinAmount) + + // try the same as above for switching sides to short + curMarginBalance = num.NewUint(1) + transfer = getIsolatedMarginTransfersOnPositionChange(party, asset, trades, types.SideSell, -5, positionFactor, marginFactor, curMarginBalance, num.UintZero(), nil, false, false) + + // now we expect to need 1 more to be added from the order margin account + require.Equal(t, types.TransferTypeMarginLow, transfer[0].Type) + require.Equal(t, num.NewUint(1), transfer[0].Amount.Amount) + require.Equal(t, num.NewUint(1), transfer[0].MinAmount) +} + +func extractOrderInfo(orders []*types.Order) (buyOrders, sellOrders []*OrderInfo) { + buyOrders, sellOrders = []*OrderInfo{}, []*OrderInfo{} + for _, o := range orders { + if o.Status == types.OrderStatusActive { + remaining := o.TrueRemaining() + price := o.Price.ToDecimal() + isMarketOrder := o.Type == types.OrderTypeMarket + if o.Side == types.SideBuy { + buyOrders = append(buyOrders, &OrderInfo{TrueRemaining: remaining, Price: price, IsMarketOrder: isMarketOrder}) + } + if o.Side == types.SideSell { + sellOrders = append(sellOrders, &OrderInfo{TrueRemaining: remaining, Price: price, IsMarketOrder: isMarketOrder}) + } + } + } + return buyOrders, sellOrders +} diff --git a/core/risk/liquidation_calculation.go b/core/risk/liquidation_calculation.go index 677989738a..3ba6dfcf97 100644 --- a/core/risk/liquidation_calculation.go +++ b/core/risk/liquidation_calculation.go @@ -23,12 +23,12 @@ import ( ) type OrderInfo struct { - Size uint64 + TrueRemaining uint64 Price num.Decimal IsMarketOrder bool } -func CalculateLiquidationPriceWithSlippageFactors(sizePosition int64, buyOrders, sellOrders []*OrderInfo, currentPrice, collateralAvailable num.Decimal, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, fundingPaymentPerUnitPosition num.Decimal) (liquidationPriceForOpenVolume, liquidationPriceWithSellOrders, liquidationPriceWithBuyOrders num.Decimal, err error) { +func CalculateLiquidationPriceWithSlippageFactors(sizePosition int64, buyOrders, sellOrders []*OrderInfo, currentPrice, collateralAvailable num.Decimal, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, fundingPaymentPerUnitPosition num.Decimal, isolatedMarginMode bool, marginFactor num.Decimal) (liquidationPriceForOpenVolume, liquidationPriceWithBuyOrders, liquidationPriceWithSellOrders num.Decimal, err error) { openVolume := num.DecimalFromInt64(sizePosition).Div(positionFactor) if sizePosition != 0 { @@ -60,12 +60,12 @@ func CalculateLiquidationPriceWithSlippageFactors(sizePosition int64, buyOrders, return sellOrders[i].Price.LessThan(sellOrders[j].Price) }) - liquidationPriceWithBuyOrders, err = calculateLiquidationPriceWithOrders(liquidationPriceForOpenVolume, buyOrders, true, openVolume, currentPrice, collateralAvailable, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, fundingPaymentPerUnitPosition) + liquidationPriceWithBuyOrders, err = calculateLiquidationPriceWithOrders(liquidationPriceForOpenVolume, buyOrders, true, openVolume, currentPrice, collateralAvailable, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, fundingPaymentPerUnitPosition, isolatedMarginMode, marginFactor) if err != nil { liquidationPriceWithBuyOrders = num.DecimalZero() return } - liquidationPriceWithSellOrders, err = calculateLiquidationPriceWithOrders(liquidationPriceForOpenVolume, sellOrders, false, openVolume, currentPrice, collateralAvailable, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, fundingPaymentPerUnitPosition) + liquidationPriceWithSellOrders, err = calculateLiquidationPriceWithOrders(liquidationPriceForOpenVolume, sellOrders, false, openVolume, currentPrice, collateralAvailable, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, fundingPaymentPerUnitPosition, isolatedMarginMode, marginFactor) if err != nil { liquidationPriceWithSellOrders = num.DecimalZero() return @@ -89,13 +89,9 @@ func calculateLiquidationPrice(openVolume num.Decimal, currentPrice, collateralA return num.DecimalZero(), fmt.Errorf("liquidation price not defined") } - numerator := collateralAvailable - - if !openVolume.IsZero() { - numerator = numerator.Sub(openVolume.Mul(currentPrice)) - if !fundingPaymentPerUnitPosition.IsZero() { - numerator = numerator.Sub(num.MaxD(num.DecimalZero(), openVolume.Mul(fundingPaymentPerUnitPosition))) - } + numerator := collateralAvailable.Sub(openVolume.Mul(currentPrice)) + if !fundingPaymentPerUnitPosition.IsZero() { + numerator = numerator.Sub(num.MaxD(num.DecimalZero(), openVolume.Mul(fundingPaymentPerUnitPosition))) } ret := numerator.Div(denominator) @@ -105,11 +101,12 @@ func calculateLiquidationPrice(openVolume num.Decimal, currentPrice, collateralA return ret, nil } -func calculateLiquidationPriceWithOrders(liquidationPriceOpenVolumeOnly num.Decimal, orders []*OrderInfo, buySide bool, openVolume num.Decimal, currentPrice, collateralAvailable num.Decimal, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constant num.Decimal) (num.Decimal, error) { +func calculateLiquidationPriceWithOrders(liquidationPriceOpenVolumeOnly num.Decimal, orders []*OrderInfo, buySide bool, openVolume num.Decimal, currentPrice, collateralAvailable num.Decimal, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constant num.Decimal, isolatedMarginMode bool, marginFactor num.Decimal) (num.Decimal, error) { var err error liquidationPrice := liquidationPriceOpenVolumeOnly exposureWithOrders := openVolume collateralWithOrders := collateralAvailable + zero := num.DecimalZero() for _, o := range orders { if !exposureWithOrders.IsZero() && ((buySide && exposureWithOrders.IsPositive() && o.Price.LessThan(liquidationPrice)) || (!buySide && exposureWithOrders.IsNegative() && o.Price.GreaterThan(liquidationPrice))) { // party gets marked for closeout before this order gets a chance to fill @@ -119,10 +116,36 @@ func calculateLiquidationPriceWithOrders(liquidationPriceOpenVolumeOnly num.Deci currentPrice = o.Price collateralWithOrders = collateralWithOrders.Add(mtm) + adjTrueRemaining := num.DecimalFromInt64(int64(o.TrueRemaining)).Div(positionFactor) + + // account for amount that would be moved from order margin account to magin account when exposure-increasing limit order fills + if isolatedMarginMode && !o.IsMarketOrder { + collateralIncreaseVolume := adjTrueRemaining + if buySide { + if isolatedMarginMode && exposureWithOrders.LessThan(zero) { + newExposure := exposureWithOrders.Add(adjTrueRemaining) + if newExposure.GreaterThan(zero) { + collateralIncreaseVolume = newExposure + } else { + collateralIncreaseVolume = zero + } + } + } else { + if isolatedMarginMode && exposureWithOrders.GreaterThan(zero) { + newExposure := exposureWithOrders.Sub(adjTrueRemaining) + if newExposure.LessThan(zero) { + collateralIncreaseVolume = newExposure + } else { + collateralIncreaseVolume = zero + } + } + } + collateralWithOrders = collateralIncreaseVolume.Mul(o.Price).Mul(marginFactor) + } if buySide { - exposureWithOrders = exposureWithOrders.Add(num.DecimalFromInt64(int64(o.Size)).Div(positionFactor)) + exposureWithOrders = exposureWithOrders.Add(adjTrueRemaining) } else { - exposureWithOrders = exposureWithOrders.Sub(num.DecimalFromInt64(int64(o.Size)).Div(positionFactor)) + exposureWithOrders = exposureWithOrders.Sub(adjTrueRemaining) } liquidationPrice, err = calculateLiquidationPrice(exposureWithOrders, o.Price, collateralWithOrders, linearSlippageFactor, quadraticSlippageFactor, riskFactorLong, riskFactorShort, constant) diff --git a/core/risk/margins_calculation.go b/core/risk/margins_calculation.go index cc0e7695ab..07e496095a 100644 --- a/core/risk/margins_calculation.go +++ b/core/risk/margins_calculation.go @@ -16,6 +16,8 @@ package risk import ( + "sort" + "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" @@ -52,6 +54,9 @@ func newMarginLevels(maintenance num.Decimal, scalingFactors *scalingFactorsUint SearchLevel: num.UintZero().Div(num.UintZero().Mul(scalingFactors.search, umaintenance), exp), InitialMargin: num.UintZero().Div(num.UintZero().Mul(scalingFactors.initial, umaintenance), exp), CollateralReleaseLevel: num.UintZero().Div(num.UintZero().Mul(scalingFactors.release, umaintenance), exp), + OrderMargin: num.UintZero(), + MarginMode: types.MarginModeCrossMargin, + MarginFactor: num.DecimalZero(), } } @@ -80,6 +85,9 @@ func (e *Engine) calculateMargins(m events.Margin, markPrice *num.Uint, rf types SearchLevel: num.UintZero(), InitialMargin: num.UintZero(), CollateralReleaseLevel: num.UintZero(), + OrderMargin: num.UintZero(), + MarginMode: types.MarginModeCrossMargin, + MarginFactor: num.DecimalZero(), } } // negative increment == short positions require extra margin, otherwise long requires extra margin @@ -266,6 +274,9 @@ func (e *Engine) calculateMargins(m events.Margin, markPrice *num.Uint, rf types SearchLevel: num.UintZero(), InitialMargin: num.UintZero(), CollateralReleaseLevel: num.UintZero(), + OrderMargin: num.UintZero(), + MarginMode: types.MarginModeCrossMargin, + MarginFactor: num.DecimalZero(), } } @@ -273,7 +284,7 @@ func CalculateMaintenanceMarginWithSlippageFactors(sizePosition int64, buyOrders buySumProduct, sellSumProduct := num.DecimalZero(), num.DecimalZero() sizeSells, sizeBuys := int64(0), int64(0) for _, o := range buyOrders { - size := int64(o.Size) + size := int64(o.TrueRemaining) if o.IsMarketOrder { // assume market order fills sizePosition += size @@ -283,7 +294,7 @@ func CalculateMaintenanceMarginWithSlippageFactors(sizePosition int64, buyOrders } } for _, o := range sellOrders { - size := int64(o.Size) + size := int64(o.TrueRemaining) if o.IsMarketOrder { // assume market order fills sizePosition -= size @@ -383,3 +394,85 @@ func computeMaintenanceMargin(sizePosition, buySize, sellSize int64, buySumProdu } return num.DecimalZero() } + +// CalcOrderMarginIsolatedMode calculates the the order margin required for the party in isolated margin mode given their current orders and margin factor. +func CalcOrderMarginIsolatedMode(positionSize int64, buyOrders, sellOrders []*OrderInfo, positionFactor, marginFactor, auctionPrice num.Decimal) num.Decimal { + // sort orders from best to worst + sort.Slice(buyOrders, func(i, j int) bool { return buyOrders[i].Price.GreaterThan(buyOrders[j].Price) }) + sort.Slice(sellOrders, func(i, j int) bool { return sellOrders[i].Price.LessThan(sellOrders[j].Price) }) + + // calc the side margin + marginByBuy := calcOrderSideMarginIsolatedMode(positionSize, buyOrders, positionFactor, marginFactor, auctionPrice, true) + marginBySell := calcOrderSideMarginIsolatedMode(positionSize, sellOrders, positionFactor, marginFactor, auctionPrice, false) + if marginBySell.GreaterThan(marginByBuy) { + return marginBySell + } + return marginByBuy +} + +func calcOrderSideMarginIsolatedMode(currentPosition int64, orders []*OrderInfo, positionFactor, marginFactor num.Decimal, auctionPrice num.Decimal, buy bool) num.Decimal { + for _, o := range orders { + if o.IsMarketOrder { + // assume market order fills + if buy { + currentPosition += int64(o.TrueRemaining) + } else { + currentPosition -= int64(o.TrueRemaining) + } + } + } + + margin := num.DecimalZero() + remainingCovered := int64Abs(currentPosition) + for _, o := range orders { + size := o.TrueRemaining + // for long position we don't need to count margin for the top size for sell orders + // for short position we don't need to count margin for the top size for buy orders + if remainingCovered != 0 && (buy && currentPosition < 0) || (!buy && currentPosition > 0) { + if size >= remainingCovered { // part of the order doesn't require margin + size = size - remainingCovered + remainingCovered = 0 + } else { // the entire order doesn't require margin + remainingCovered -= size + size = 0 + } + } + if size > 0 { + // if we're in auction we need to use the larger between auction price (which is the max(indicativePrice, markPrice)) and the order price + p := o.Price + if auctionPrice.GreaterThan(p) { + p = auctionPrice + } + // add the margin for the given order + margin = margin.Add(num.DecimalFromInt64(int64(size)).Mul(p)) + } + } + // factor the margin by margin factor and divide by position factor to get to the right decimals + return margin.Mul(marginFactor).Div(positionFactor) +} + +func CalculateRequiredMarginInIsolatedMode(sizePosition int64, averageEntryPrice, marketObservable num.Decimal, buyOrders, sellOrders []*OrderInfo, positionFactor, marginFactor num.Decimal) (num.Decimal, num.Decimal) { + totalOrderNotional := num.DecimalZero() + marketOrderAdjustedPositionNotional := averageEntryPrice.Copy().Mul(num.DecimalFromInt64(sizePosition)) + + // assume market orders fill immediately at marketObservable price + for _, o := range buyOrders { + if o.IsMarketOrder { + marketOrderAdjustedPositionNotional = marketOrderAdjustedPositionNotional.Add(marketObservable.Mul(num.DecimalFromInt64(int64(o.TrueRemaining)))) + } else { + totalOrderNotional = totalOrderNotional.Add(o.Price.Mul(num.DecimalFromInt64(int64(o.TrueRemaining)))) + } + } + for _, o := range sellOrders { + if o.IsMarketOrder { + marketOrderAdjustedPositionNotional = marketOrderAdjustedPositionNotional.Sub(marketObservable.Mul(num.DecimalFromInt64(int64(o.TrueRemaining)))) + } else { + totalOrderNotional = totalOrderNotional.Add(o.Price.Mul(num.DecimalFromInt64(int64(o.TrueRemaining)))) + } + } + + requiredPositionMargin := marketOrderAdjustedPositionNotional.Abs().Mul(marginFactor).Div(positionFactor) + requiredOrderMargin := totalOrderNotional.Mul(marginFactor).Div(positionFactor) + + return requiredPositionMargin, requiredOrderMargin +} diff --git a/core/risk/model.go b/core/risk/model.go index 5ae27de21c..47ba23553e 100644 --- a/core/risk/model.go +++ b/core/risk/model.go @@ -19,9 +19,8 @@ import ( "errors" "code.vegaprotocol.io/vega/core/risk/models" - "code.vegaprotocol.io/vega/libs/num" - "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" ) var ( diff --git a/core/risk/models/lognormal.go b/core/risk/models/lognormal.go index 975d8e726d..1c91bdaaf3 100644 --- a/core/risk/models/lognormal.go +++ b/core/risk/models/lognormal.go @@ -19,11 +19,12 @@ import ( "errors" "math" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/quant/interfaces" pd "code.vegaprotocol.io/quant/pricedistribution" "code.vegaprotocol.io/quant/riskmodelbs" - "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/libs/num" ) var ErrMissingLogNormalParameter = errors.New("missing log normal parameters") @@ -89,6 +90,10 @@ func (f *LogNormal) ProbabilityOfTrading(currentP, orderP num.Decimal, minP, max min := math.Max(minP.InexactFloat64(), 0) // still, quant uses floats prob := pd.ProbabilityOfTrading(dist, orderP.InexactFloat64(), isBid, applyMinMax, min, maxP.InexactFloat64()) + if math.IsNaN(prob) { + return num.DecimalZero() + } + return num.DecimalFromFloat(prob) } diff --git a/core/settlement/engine.go b/core/settlement/engine.go index 0c9ddacad3..0eba081daa 100644 --- a/core/settlement/engine.go +++ b/core/settlement/engine.go @@ -43,6 +43,7 @@ type MarketPosition interface { VWBuy() *num.Uint VWSell() *num.Uint ClearPotentials() + AverageEntryPrice() *num.Uint } // Product ... @@ -151,6 +152,7 @@ func (e *Engine) Settle(t time.Time, settlementData *num.Uint) ([]*types.Transfe // each change in position has to be calculated using the exact price of the trade. func (e *Engine) AddTrade(trade *types.Trade) { e.mu.Lock() + defer e.mu.Unlock() var buyerSize, sellerSize int64 // checking the len of cd shouldn't be required here, but it is needed in the second if // in case the buyer and seller are one and the same... @@ -188,7 +190,6 @@ func (e *Engine) AddTrade(trade *types.Trade) { size: -size, newSize: sellerSize - size, }) - e.mu.Unlock() } func (e *Engine) HasTraded() bool { @@ -269,57 +270,22 @@ func (e *Engine) SettleMTM(ctx context.Context, markPrice *num.Uint, positions [ e.trades = map[string][]*settlementTrade{} // remove here, once we've processed it all here, we're done evts := make([]events.Event, 0, len(positions)) var ( - largestShare *mtmTransfer // pointer to whomever gets the last remaining amount from the loss - zeroShares = []*mtmTransfer{} // all zero shares for equal distribution if possible - zeroAmts = false - mtmDec = num.NewDecimalFromFloat(0) - lossTotal = num.UintZero() - winTotal = num.UintZero() - lossTotalDec = num.NewDecimalFromFloat(0) - winTotalDec = num.NewDecimalFromFloat(0) + largestShare *mtmTransfer // pointer to whomever gets the last remaining amount from the loss + zeroShares = []*mtmTransfer{} // all zero shares for equal distribution if possible + zeroAmts = false + mtmDec = num.NewDecimalFromFloat(0) + lossTotal = num.UintZero() + winTotal = num.UintZero() + lossTotalDec = num.NewDecimalFromFloat(0) + winTotalDec = num.NewDecimalFromFloat(0) + appendLargest = false ) - // Process any network trades first - traded, hasTraded := trades[types.NetworkParty] - if hasTraded { - // don't create an event for the network. Its position is irrelevant - - mtmShare, mtmDShare, neg := calcMTM(markPrice, markPrice, 0, traded, e.positionFactor) - // MarketPosition stub for network - netMPos := &npos{ - price: markPrice.Clone(), - } - - mtmTransfer := e.getMtmTransfer(mtmShare.Clone(), neg, netMPos, types.NetworkParty) - - if !neg { - wins = append(wins, mtmTransfer) - winTotal.AddSum(mtmShare) - winTotalDec = winTotalDec.Add(mtmDShare) - mtmDec = mtmDShare - largestShare = mtmTransfer - // mtmDec is zero at this point, this will always be the largest winning party at this point - if mtmShare.IsZero() { - zeroShares = append(zeroShares, mtmTransfer) - zeroAmts = true - } - } else if mtmShare.IsZero() { - // This would be a zero-value loss, so not sure why this would be at the end of the slice - // shouldn't really matter if this is in the wins or losses part of the slice, but - // this was the previous behaviour, so let's keep it - wins = append(wins, mtmTransfer) - lossTotalDec = lossTotalDec.Add(mtmDShare) - } else { - transfers = append(transfers, mtmTransfer) - lossTotal.AddSum(mtmShare) - lossTotalDec = lossTotalDec.Add(mtmDShare) - } - } - + // network is treated as a regular party for _, evt := range positions { party := evt.Party() current, lastSettledPrice := e.getOrCreateCurrentPosition(party, evt.Size()) - traded, hasTraded = trades[party] + traded, hasTraded := trades[party] tradeset := make([]events.TradeSettlement, 0, len(traded)) // empty position skip := current == 0 && lastSettledPrice.IsZero() && evt.Buy() == 0 && evt.Sell() == 0 @@ -380,9 +346,22 @@ func (e *Engine) SettleMTM(ctx context.Context, markPrice *num.Uint, positions [ // no need for this lock anymore e.mu.Unlock() delta := num.UintZero().Sub(lossTotal, winTotal) + // make sure largests share is never nil + if largestShare == nil { + largestShare = &mtmTransfer{ + MarketPosition: &npos{ + price: markPrice.Clone(), + }, + } + appendLargest = true + } if !delta.IsZero() { if zeroAmts { + if appendLargest { + zeroShares = append(zeroShares, largestShare) + } zRound := num.DecimalFromInt64(int64(len(zeroShares))) + zeroShares = append(zeroShares, largestShare) // there are more transfers from losses than we pay out to wins, but some winning parties have zero transfers // this delta should == combined win decimals, let's sanity check this! if winTotalDec.LessThan(lossTotalDec) && winTotalDec.LessThan(lossTotalDec.Sub(zRound)) { @@ -413,7 +392,12 @@ func (e *Engine) SettleMTM(ctx context.Context, markPrice *num.Uint, positions [ } // append wins after loss transfers transfers = append(transfers, wins...) - e.broker.SendBatch(evts) + if len(transfers) > 0 && appendLargest && largestShare.transfer != nil { + transfers = append(transfers, largestShare) + } + if len(evts) > 0 { + e.broker.SendBatch(evts) + } timer.EngineTimeCounterAdd() return transfers } @@ -423,13 +407,42 @@ func (e *Engine) SettleMTM(ctx context.Context, markPrice *num.Uint, positions [ func (e *Engine) RemoveDistressed(ctx context.Context, evts []events.Margin) { devts := make([]events.Event, 0, len(evts)) e.mu.Lock() + netSize := e.settledPosition[types.NetworkParty] + netTradeSize := netSize + netTrades := e.trades[types.NetworkParty] + if len(netTrades) > 0 { + netTradeSize = netTrades[len(netTrades)-1].newSize + } for _, v := range evts { key := v.Party() margin := num.Sum(v.MarginBalance(), v.GeneralBalance()) devts = append(devts, events.NewSettleDistressed(ctx, key, e.market, v.Price(), margin, e.timeService.GetTimeNow().UnixNano())) + settled := e.settledPosition[key] + // first, set the base size for all trades to include the settled position + for i, t := range netTrades { + t.newSize += settled + netTrades[i] = t + } + // the last trade or settled position should include this value + netTradeSize += settled + // transfer trades from the distressed party over to the network + // update the new sizes accordingly + if trades := e.trades[key]; len(trades) > 0 { + for _, t := range trades { + t.newSize = netTradeSize + t.size + netTradeSize += t.size + netTrades = append(netTrades, t) + } + } + // the network settled size should be updated + netSize += settled delete(e.settledPosition, key) delete(e.trades, key) } + e.settledPosition[types.NetworkParty] = netSize + if len(netTrades) > 0 { + e.trades[types.NetworkParty] = netTrades + } e.mu.Unlock() e.broker.SendBatch(devts) } diff --git a/core/settlement/engine_test.go b/core/settlement/engine_test.go index e3f56fd050..50756694fe 100644 --- a/core/settlement/engine_test.go +++ b/core/settlement/engine_test.go @@ -31,8 +31,8 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" - snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -56,8 +56,8 @@ type posValue struct { type marginVal struct { events.MarketPosition - asset, marketID string - margin, general, marginShortFall uint64 + asset, marketID string + margin, orderMargin, general, marginShortFall uint64 } func TestMarketExpiry(t *testing.T) { @@ -756,6 +756,298 @@ func testAddNewPartySelfTrade(t *testing.T) { assert.Nil(t, noTransfers[0].Transfer()) } +func TestNetworkPartyCloseout(t *testing.T) { + engine := getTestEngine(t) + currentMP := num.NewUint(1000) + // network trade + nTrade := &types.Trade{ + Buyer: types.NetworkParty, + Seller: types.NetworkParty, + Price: currentMP.Clone(), + MarketPrice: currentMP.Clone(), + Size: 10, + } + nPosition := testPos{ + party: types.NetworkParty, + size: 10, + price: currentMP.Clone(), + } + sellPrice := num.NewUint(990) + // now trade with health party, at some different price + // trigger a loss for the network. + cTrade := &types.Trade{ + Buyer: "party1", + Seller: types.NetworkParty, + Size: 2, + Price: sellPrice.Clone(), + } + init := []events.MarketPosition{ + nPosition, + testPos{ + party: "party1", + size: 0, + price: currentMP.Clone(), + }, + } + positions := []events.MarketPosition{ + testPos{ + party: types.NetworkParty, + size: 8, + price: currentMP.Clone(), + }, + testPos{ + party: "party1", + size: 2, + price: currentMP.Clone(), + }, + } + engine.Update(init) + engine.AddTrade(nTrade) + engine.AddTrade(cTrade) + transfers := engine.SettleMTM(context.Background(), currentMP, positions) + assert.NotEmpty(t, transfers) + assert.Len(t, transfers, 2) +} + +func TestNetworkCloseoutZero(t *testing.T) { + engine := getTestEngine(t) + currentMP := num.NewUint(1000) + // network trade + nTrade := &types.Trade{ + Buyer: types.NetworkParty, + Seller: types.NetworkParty, + Price: currentMP.Clone(), + MarketPrice: currentMP.Clone(), + Size: 10, + } + nPosition := testPos{ + party: types.NetworkParty, + size: 10, + price: currentMP.Clone(), + } + sellPrice := num.NewUint(999) + // now trade with health party, at some different price + // trigger a loss for the network. + cTrades := []*types.Trade{ + { + Buyer: "party1", + Seller: types.NetworkParty, + Size: 1, + Price: sellPrice.Clone(), + }, + { + Buyer: "party2", + Seller: types.NetworkParty, + Size: 1, + Price: sellPrice.Clone(), + }, + } + init := []events.MarketPosition{ + nPosition, + testPos{ + party: "party1", + size: 0, + price: currentMP.Clone(), + }, + testPos{ + party: "party2", + size: 0, + price: currentMP.Clone(), + }, + testPos{ + party: "party3", + size: -5, + price: currentMP.Clone(), + }, + testPos{ + party: "party4", + size: -5, + price: currentMP.Clone(), + }, + } + positions := []events.MarketPosition{ + testPos{ + party: types.NetworkParty, + size: 8, + price: currentMP.Clone(), + }, + testPos{ + party: "party1", + size: 1, + price: currentMP.Clone(), + }, + testPos{ + party: "party2", + size: 1, + price: currentMP.Clone(), + }, + testPos{ + party: "party3", + size: -5, + price: currentMP.Clone(), + }, + testPos{ + party: "party4", + size: -5, + price: currentMP.Clone(), + }, + } + engine.Update(init) + engine.AddTrade(nTrade) + for _, cTrade := range cTrades { + engine.AddTrade(cTrade) + } + transfers := engine.SettleMTM(context.Background(), currentMP, positions) + assert.NotEmpty(t, transfers) + // now that the network has an established long position, make short positions close out and mark to market + // party 3 closes their position, lowering the mark price + newMP := num.NewUint(990) + trade := &types.Trade{ + Buyer: "party3", + Seller: "party1", + Price: newMP, + Size: 1, + } + positions = []events.MarketPosition{ + testPos{ + party: types.NetworkParty, + size: 8, + price: newMP.Clone(), + }, + testPos{ + party: "party1", + size: 0, + price: newMP.Clone(), + }, + testPos{ + party: "party2", + size: 1, + price: newMP.Clone(), + }, + testPos{ + party: "party3", + size: -4, + price: newMP.Clone(), + }, + testPos{ + party: "party4", + size: -5, + price: newMP.Clone(), + }, + } + engine.AddTrade(trade) + transfers = engine.SettleMTM(context.Background(), newMP, positions) + assert.NotEmpty(t, transfers) + // now make it look like party2 got distressed because of this MTM settlement + nTrade = &types.Trade{ + Price: newMP.Clone(), + MarketPrice: newMP.Clone(), + Size: 1, + Buyer: types.NetworkParty, + Seller: types.NetworkParty, + } + positions = []events.MarketPosition{ + testPos{ + party: types.NetworkParty, + size: 9, + price: newMP.Clone(), + }, + testPos{ + party: "party3", + size: -4, + price: newMP.Clone(), + }, + testPos{ + party: "party4", + size: -5, + price: newMP.Clone(), + }, + } + engine.AddTrade(nTrade) + transfers = engine.SettleMTM(context.Background(), newMP, positions) + assert.NotEmpty(t, transfers) + newMP = num.NewUint(995) + positions = []events.MarketPosition{ + testPos{ + party: types.NetworkParty, + size: 9, + price: newMP.Clone(), + }, + testPos{ + party: "party3", + size: -4, + price: newMP.Clone(), + }, + testPos{ + party: "party4", + size: -5, + price: newMP.Clone(), + }, + } + transfers = engine.SettleMTM(context.Background(), newMP.Clone(), positions) + assert.NotEmpty(t, transfers) + // now the same, but network loses + newMP = num.NewUint(990) + positions = []events.MarketPosition{ + testPos{ + party: types.NetworkParty, + size: 9, + price: newMP.Clone(), + }, + testPos{ + party: "party3", + size: -4, + price: newMP.Clone(), + }, + testPos{ + party: "party4", + size: -5, + price: newMP.Clone(), + }, + } + transfers = engine.SettleMTM(context.Background(), newMP.Clone(), positions) + assert.NotEmpty(t, transfers) + // assume no trades occurred, but the mark price has changed (shouldn't happen, but this could end up with a situation where network profits without trading) + // network disposes of its position and profits + disposePrice := num.NewUint(1010) + trades := []*types.Trade{ + { + Seller: types.NetworkParty, + Buyer: "party3", + Price: disposePrice.Clone(), + Size: 4, + }, + { + Seller: types.NetworkParty, + Buyer: "party4", + Price: disposePrice.Clone(), + Size: 5, + }, + } + positions = []events.MarketPosition{ + testPos{ + party: types.NetworkParty, + size: 0, + price: newMP.Clone(), + }, + testPos{ + party: "party3", + size: 0, + price: newMP.Clone(), + }, + testPos{ + party: "party4", + size: 0, + price: newMP.Clone(), + }, + } + for _, tr := range trades { + engine.AddTrade(tr) + } + transfers = engine.SettleMTM(context.Background(), num.NewUint(1000), positions) + assert.NotEmpty(t, transfers) +} + func testAddNewParty(t *testing.T) { engine := getTestEngine(t) defer engine.Finish() @@ -1132,6 +1424,40 @@ func (te *testEngine) getMockMarketPositions(data []posValue) ([]settlement.Mark return raw, evts } +func TestRemoveDistressedNoTrades(t *testing.T) { + engine := getTestEngine(t) + defer engine.Finish() + engine.prod.EXPECT().Settle(gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes().DoAndReturn(func(markPrice *num.Uint, settlementData *num.Uint, size num.Decimal) (*types.FinancialAmount, bool, num.Decimal, error) { + return &types.FinancialAmount{Amount: num.UintZero()}, false, num.DecimalZero(), nil + }) + + data := []posValue{ + { + party: "testparty1", + price: num.NewUint(1234), + size: 100, + }, + { + party: "testparty2", + price: num.NewUint(1235), + size: 0, + }, + } + raw, evts := engine.getMockMarketPositions(data) + // margin evt + marginEvts := make([]events.Margin, 0, len(raw)) + for _, pe := range raw { + marginEvts = append(marginEvts, marginVal{ + MarketPosition: pe, + }) + } + + assert.False(t, engine.HasTraded()) + engine.Update(evts) + engine.RemoveDistressed(context.Background(), marginEvts) + assert.False(t, engine.HasTraded()) +} + func TestConcurrent(t *testing.T) { const N = 10 @@ -1208,6 +1534,10 @@ type testPos struct { buySumProduct, sellSumProduct uint64 } +func (t testPos) AverageEntryPrice() *num.Uint { + return num.UintZero() +} + func (t testPos) Party() string { return t.party } @@ -1294,10 +1624,18 @@ func (m marginVal) MarginBalance() *num.Uint { return num.NewUint(m.margin) } +func (m marginVal) OrderMarginBalance() *num.Uint { + return num.NewUint(m.orderMargin) +} + func (m marginVal) GeneralBalance() *num.Uint { return num.NewUint(m.general) } +func (m marginVal) GeneralAccountBalance() *num.Uint { + return num.NewUint(m.general) +} + func (m marginVal) BondBalance() *num.Uint { return num.UintZero() } diff --git a/core/settlement/mocks/market_position_mock.go b/core/settlement/mocks/market_position_mock.go index b2c4ae3686..c8c49b1177 100644 --- a/core/settlement/mocks/market_position_mock.go +++ b/core/settlement/mocks/market_position_mock.go @@ -34,6 +34,20 @@ func (m *MockMarketPosition) EXPECT() *MockMarketPositionMockRecorder { return m.recorder } +// AverageEntryPrice mocks base method. +func (m *MockMarketPosition) AverageEntryPrice() *num.Uint { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AverageEntryPrice") + ret0, _ := ret[0].(*num.Uint) + return ret0 +} + +// AverageEntryPrice indicates an expected call of AverageEntryPrice. +func (mr *MockMarketPositionMockRecorder) AverageEntryPrice() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AverageEntryPrice", reflect.TypeOf((*MockMarketPosition)(nil).AverageEntryPrice)) +} + // Buy mocks base method. func (m *MockMarketPosition) Buy() int64 { m.ctrl.T.Helper() diff --git a/core/settlement/position.go b/core/settlement/position.go index 6693f91538..5c7e2b8151 100644 --- a/core/settlement/position.go +++ b/core/settlement/position.go @@ -114,3 +114,7 @@ func (npos) VWBuy() *num.Uint { func (npos) VWSell() *num.Uint { return num.UintZero() } + +func (npos) AverageEntryPrice() *num.Uint { + return num.UintZero() +} diff --git a/core/snapshot/README.md b/core/snapshot/README.md index 63acf5097d..455b975ab7 100644 --- a/core/snapshot/README.md +++ b/core/snapshot/README.md @@ -27,7 +27,7 @@ type SomeEngine struct { cfg Config log *logging.Logger - + // track orders, id -> order orders map[string]*types.Order @@ -36,11 +36,11 @@ type SomeEngine struct { } ``` -The important field that needs saving into a snapshot is `orders`. The fields `cfg` and `log` are only configuration fields and so are not relevant. For `cbs` the onus is on the subscriber to re-register their callback when they restore from a snapshot, so *this* engine's snapshot need not worry. +The important field that needs saving into a snapshot is `orders`. The fields `cfg` and `log` are only configuration fields and so are not relevant. For `cbs` the onus is on the subscriber to re-register their callback when they restore from a snapshot, so _this_ engine's snapshot need not worry. ### Gotcha 1: Cannot include validator-only state in a snapshot -Given that validator and non-validator nodes take snapshots and the hash of a snapshot is included in the commit-hash, if any state that is only present in *validator* nodes is added to a snapshot, then all non-validator nodes will fall out of consensus. +Given that validator and non-validator nodes take snapshots and the hash of a snapshot is included in the commit-hash, if any state that is only present in _validator_ nodes is added to a snapshot, then all non-validator nodes will fall out of consensus. An example of this is the Ethereum-event-forwarder which is only something validator nodes do. The state it contains is the Ethereum block-height that was last checked for events, but we cannot save this into a snapshot. We instead handle it by saving the Ethereum block-height of the last `ChainEvent` sent into core, which is a transaction all node types will see. This will not be the last Ethereum block-height checked, but it is good enough. @@ -58,7 +58,7 @@ For example, a market subscribes to oracles for both termination and settlement. ### Gotcha 4: Trying to use complex-logic to deduce whether a field needs adding to the snapshot -Its not worth it. Your assessment is probably wrong and will result in a horrible bug that presents itself 5 weeks later at the worst possible moment. Unless it is *plainly obvious* that a field has a lifetime of less than a block, or it can *trivially* be derived from another field, then just add it to the snapshot. +Its not worth it. Your assessment is probably wrong and will result in a horrible bug that presents itself 5 weeks later at the worst possible moment. Unless it is _plainly obvious_ that a field has a lifetime of less than a block, or it can _trivially_ be derived from another field, then just add it to the snapshot. ## Snapshot tests @@ -239,7 +239,7 @@ func TestEngineSnapshot(t *testing.T) { System-tests exist that directly flex snapshots in known troublesome situations, and also check more functional aspects of snapshots (they are produced in line with the network parameter, we only save as many as set in the config file etc etc). These exist in the test file `snapshot_test.py` in the system-test repo. -There are also tests that do not *directly* test snapshot behaviour but where snapshots are used by that feature, for example validators-joining-and-leave and protocol-upgrade tests. These tests exist across almost all of the system-tests marked as `network_infra`. +There are also tests that do not _directly_ test snapshot behaviour but where snapshots are used by that feature, for example validators-joining-and-leave and protocol-upgrade tests. These tests exist across almost all of the system-tests marked as `network_infra`. #### How to debug a failure @@ -271,12 +271,12 @@ The pipeline exists to verify that snapshots work in a more realistic environmen #### How to debug a failure -The snapshot pipeline jobs will store as an artefact the block-data and the snapshot it loaded from. This allows you to replay the partial chain the in same way locally and reproduce any failure. By finding the last *successful* snapshot pipeline job, those artefacts can be used to replay the partial chain from a working snapshot allowing comparison between logs to find where state started to diverge. - +The snapshot pipeline jobs will store as an artefact the block-data and the snapshot it loaded from. This allows you to replay the partial chain the in same way locally and reproduce any failure. By finding the last _successful_ snapshot pipeline job, those artefacts can be used to replay the partial chain from a working snapshot allowing comparison between logs to find where state started to diverge. ### Event-diff soak tests It checks that the events sent out by core are always sent out in the same order. As the system tests are running `node2` writes out all the events it sends to a data node to a file. At the end of the test run the chain is replayed and another file containing all events is produce. These two files are then diffed. If it fails on Jenkins then you will see output that looks like the following: + ``` [2023-10-09T15:24:45.689Z] === Starting event-file diff [2023-10-09T15:24:45.689Z] Differences found between: /jenkins/workspace/common/system-tests-wrapper/networkdata/testnet/vega/node2/eventlog.evt /jenkins/workspace/common/system-tests-wrapper/networkdata/testnet/vega/node2/eventlog-replay.evt @@ -285,6 +285,7 @@ It checks that the events sent out by core are always sent out in the same order #### How to debug a failure The two event files that were diffed will be saved as artefacts in Jenkins, and the first step is to download them locally. From there they are be parsed into human-readable JSON by using the following vega tool,a nd then diffed: + ``` vega tools events --out=original.out --events=eventlog.evt @@ -296,6 +297,7 @@ diff original.out replay.out Note that for events created during a full system-test run, both the parsing and diff can take some time. The diff can then be used to hunt down which block produces different events, and which event type it is. For example if the diff flagged up and event like below: + ``` { "id": "4615-75", diff --git a/core/snapshot/config_test.go b/core/snapshot/config_test.go index a002e3f3b2..bfe9b8f245 100644 --- a/core/snapshot/config_test.go +++ b/core/snapshot/config_test.go @@ -18,10 +18,10 @@ package snapshot_test import ( "testing" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/core/snapshot" vgrand "code.vegaprotocol.io/vega/libs/rand" + + "github.com/stretchr/testify/require" ) func TestEngineConfig(t *testing.T) { diff --git a/core/snapshot/databases/databases.go b/core/snapshot/databases/databases.go new file mode 100644 index 0000000000..35589b8d3d --- /dev/null +++ b/core/snapshot/databases/databases.go @@ -0,0 +1,33 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package databases + +import ( + "fmt" + "os" + + "code.vegaprotocol.io/vega/paths" +) + +func RemoveAll(vegaPaths paths.Paths) error { + dbDirectory := vegaPaths.StatePathFor(paths.SnapshotStateHome) + + if err := os.RemoveAll(dbDirectory); err != nil { + return fmt.Errorf("an error occurred while removing directory %q: %w", dbDirectory, err) + } + + return nil +} diff --git a/core/snapshot/databases/metadata/in_memory.go b/core/snapshot/databases/metadata/in_memory.go index 2ef7b0a92c..10f0a9078c 100644 --- a/core/snapshot/databases/metadata/in_memory.go +++ b/core/snapshot/databases/metadata/in_memory.go @@ -18,7 +18,7 @@ package metadata import ( "sort" - tmtypes "github.com/tendermint/tendermint/abci/types" + tmtypes "github.com/cometbft/cometbft/abci/types" ) type InMemoryDatabase struct { diff --git a/core/snapshot/databases/metadata/in_memory_test.go b/core/snapshot/databases/metadata/in_memory_test.go index cc836de672..c6f44a909c 100644 --- a/core/snapshot/databases/metadata/in_memory_test.go +++ b/core/snapshot/databases/metadata/in_memory_test.go @@ -19,9 +19,10 @@ import ( "testing" "code.vegaprotocol.io/vega/core/snapshot/databases/metadata" + + tmtypes "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - tmtypes "github.com/tendermint/tendermint/abci/types" ) func TestInMemoryDatabase(t *testing.T) { diff --git a/core/snapshot/databases/metadata/level_db.go b/core/snapshot/databases/metadata/level_db.go index 026bf42bf1..8b66a58133 100644 --- a/core/snapshot/databases/metadata/level_db.go +++ b/core/snapshot/databases/metadata/level_db.go @@ -20,12 +20,12 @@ import ( "os" "strconv" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/paths" + cometbftdb "github.com/cometbft/cometbft-db" + tmtypes "github.com/cometbft/cometbft/abci/types" "github.com/syndtr/goleveldb/leveldb/opt" - tmtypes "github.com/tendermint/tendermint/abci/types" - - "code.vegaprotocol.io/vega/libs/proto" ) const metaDBName = "snapshot_meta" diff --git a/core/snapshot/databases/metadata/level_db_test.go b/core/snapshot/databases/metadata/level_db_test.go index 8bf907ad23..39149eb413 100644 --- a/core/snapshot/databases/metadata/level_db_test.go +++ b/core/snapshot/databases/metadata/level_db_test.go @@ -20,9 +20,10 @@ import ( "code.vegaprotocol.io/vega/core/snapshot/databases/metadata" "code.vegaprotocol.io/vega/paths" + + tmtypes "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - tmtypes "github.com/tendermint/tendermint/abci/types" ) func TestLevelDBDatabase(t *testing.T) { diff --git a/core/snapshot/databases/snapshot/in_memory_test.go b/core/snapshot/databases/snapshot/in_memory_test.go index 643c1294d2..f089cb081a 100644 --- a/core/snapshot/databases/snapshot/in_memory_test.go +++ b/core/snapshot/databases/snapshot/in_memory_test.go @@ -19,6 +19,7 @@ import ( "testing" "code.vegaprotocol.io/vega/core/snapshot/databases/snapshot" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/snapshot/databases/snapshot/level_db.go b/core/snapshot/databases/snapshot/level_db.go index 96f472fddc..17ba612004 100644 --- a/core/snapshot/databases/snapshot/level_db.go +++ b/core/snapshot/databases/snapshot/level_db.go @@ -20,6 +20,7 @@ import ( "os" "code.vegaprotocol.io/vega/paths" + cometbftdb "github.com/cometbft/cometbft-db" "github.com/syndtr/goleveldb/leveldb/filter" "github.com/syndtr/goleveldb/leveldb/opt" diff --git a/core/snapshot/databases/snapshot/level_db_test.go b/core/snapshot/databases/snapshot/level_db_test.go index dcafb92ec9..9725f67323 100644 --- a/core/snapshot/databases/snapshot/level_db_test.go +++ b/core/snapshot/databases/snapshot/level_db_test.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/core/snapshot/databases/snapshot" "code.vegaprotocol.io/vega/paths" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/snapshot/engine.go b/core/snapshot/engine.go index c4081adc07..3266ffee97 100644 --- a/core/snapshot/engine.go +++ b/core/snapshot/engine.go @@ -35,7 +35,8 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" "code.vegaprotocol.io/vega/version" - tmtypes "github.com/tendermint/tendermint/abci/types" + + tmtypes "github.com/cometbft/cometbft/abci/types" "go.uber.org/zap" "golang.org/x/exp/slices" ) @@ -549,7 +550,7 @@ func (e *Engine) snapshotNow(ctx context.Context, saveAsync bool) ([]byte, DoneC snapMetricsRecord := newSnapMetricsState() defer func() { blockHeight, _ := vgcontext.BlockHeightFromContext(ctx) - snapMetricsRecord.Report(uint64(blockHeight)) + snapMetricsRecord.Report(blockHeight) }() // Start the gathering of providers state asynchronously. @@ -660,7 +661,7 @@ func (e *Engine) snapshotNow(ctx context.Context, saveAsync bool) ([]byte, DoneC e.snapshotTreeLock.Unlock() return nil, nil, err } - e.appState.Height = uint64(height) + e.appState.Height = height _, block := vegactx.TraceIDFromContext(ctx) e.appState.Block = block @@ -721,7 +722,7 @@ func (e *Engine) snapshotNow(ctx context.Context, saveAsync bool) ([]byte, DoneC } e.log.Info("Snapshot taken", - logging.Int64("height", height), + logging.Uint64("height", height), logging.ByteString("hash", hash), logging.String("protocol-version", e.appState.ProtocolVersion), logging.Bool("protocol-upgrade", e.appState.ProtocolUpdgade), @@ -814,7 +815,7 @@ func (e *Engine) restoreStateFromSnapshot(ctx context.Context, payloads []*types e.appState = payloadsPerNamespace[types.AppSnapshot][0].GetAppState().AppState // These values are needed in the context by providers, to send events. - ctx = vegactx.WithTraceID(vegactx.WithBlockHeight(ctx, int64(e.appState.Height)), e.appState.Block) + ctx = vegactx.WithTraceID(vegactx.WithBlockHeight(ctx, e.appState.Height), e.appState.Block) ctx = vegactx.WithChainID(ctx, e.appState.ChainID) ctx = vegactx.WithSnapshotInfo(ctx, e.appState.ProtocolVersion, e.appState.ProtocolUpdgade) diff --git a/core/snapshot/engine_test.go b/core/snapshot/engine_test.go index 29accb023c..9ec77d910b 100644 --- a/core/snapshot/engine_test.go +++ b/core/snapshot/engine_test.go @@ -33,10 +33,11 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" "code.vegaprotocol.io/vega/version" + + tmtypes "github.com/cometbft/cometbft/abci/types" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - tmtypes "github.com/tendermint/tendermint/abci/types" ) func TestEngine(t *testing.T) { @@ -287,7 +288,7 @@ func TestTakingSnapshotSucceeds(t *testing.T) { vegaPaths := paths.New(t.TempDir()) log := logging.NewTestLogger() ctx := vegactx.WithChainID(vegactx.WithTraceID(vegactx.WithBlockHeight(context.Background(), - int64(testSnapshot.appState.Height)), testSnapshot.appState.Block), testSnapshot.appState.ChainID, + testSnapshot.appState.Height), testSnapshot.appState.Block), testSnapshot.appState.ChainID, ) // Some providers matching the snapshot payloads. diff --git a/core/snapshot/helpers_for_test.go b/core/snapshot/helpers_for_test.go index b32a4597a7..b13c3eea2f 100644 --- a/core/snapshot/helpers_for_test.go +++ b/core/snapshot/helpers_for_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" vgrand "code.vegaprotocol.io/vega/libs/rand" + cometbftdb "github.com/cometbft/cometbft-db" "github.com/cosmos/iavl" "github.com/golang/mock/gomock" diff --git a/core/snapshot/metrics.go b/core/snapshot/metrics.go index b7966f1bb3..5d46d2d907 100644 --- a/core/snapshot/metrics.go +++ b/core/snapshot/metrics.go @@ -21,6 +21,7 @@ import ( "time" "code.vegaprotocol.io/vega/core/metrics" + "golang.org/x/exp/maps" ) diff --git a/core/snapshot/providers.go b/core/snapshot/providers.go index 2b09e160e3..ddacd77234 100644 --- a/core/snapshot/providers.go +++ b/core/snapshot/providers.go @@ -25,12 +25,12 @@ var providersInCallOrder = []types.SnapshotNamespace{ types.EpochSnapshot, types.AssetsSnapshot, // Needs to happen before banking. types.WitnessSnapshot, // Needs to happen before banking and governance. + types.NetParamsSnapshot, types.GovernanceSnapshot, types.BankingSnapshot, types.CollateralSnapshot, types.TopologySnapshot, types.NotarySnapshot, - types.NetParamsSnapshot, types.CheckpointSnapshot, types.DelegationSnapshot, types.FloatingPointConsensusSnapshot, // Shouldn't matter but maybe best before the markets are restored. @@ -38,8 +38,10 @@ var providersInCallOrder = []types.SnapshotNamespace{ types.MatchingSnapshot, // Requires markets. types.PositionsSnapshot, // Requires markets. types.SettlementSnapshot, // Requires markets. + types.LiquidationSnapshot, // Requires markets. types.HoldingAccountTrackerSnapshot, types.EthereumOracleVerifierSnapshot, + types.L2EthereumOraclesSnapshot, types.LiquiditySnapshot, types.LiquidityV2Snapshot, types.LiquidityTargetSnapshot, @@ -58,6 +60,7 @@ var providersInCallOrder = []types.SnapshotNamespace{ types.ReferralProgramSnapshot, types.ActivityStreakSnapshot, types.VolumeDiscountProgramSnapshot, + types.PartiesSnapshot, } func groupPayloadsPerNamespace(payloads []*types.Payload) map[types.SnapshotNamespace][]*types.Payload { diff --git a/core/snapshot/tree/databases.go b/core/snapshot/tree/databases.go index 2385c8f110..8e6898b1a6 100644 --- a/core/snapshot/tree/databases.go +++ b/core/snapshot/tree/databases.go @@ -17,7 +17,7 @@ package tree import ( cometbftdb "github.com/cometbft/cometbft-db" - tmtypes "github.com/tendermint/tendermint/abci/types" + tmtypes "github.com/cometbft/cometbft/abci/types" ) type MetadataDatabase interface { diff --git a/core/snapshot/tree/tree.go b/core/snapshot/tree/tree.go index a7f9404239..697dba06ac 100644 --- a/core/snapshot/tree/tree.go +++ b/core/snapshot/tree/tree.go @@ -25,8 +25,9 @@ import ( "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + + tmtypes "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/iavl" - tmtypes "github.com/tendermint/tendermint/abci/types" ) // Tree is a high-level structure that abstract the management of the AVL away diff --git a/core/spam/engine.go b/core/spam/engine.go index 3a7108431f..b6dc484696 100644 --- a/core/spam/engine.go +++ b/core/spam/engine.go @@ -18,31 +18,15 @@ package spam import ( "context" "encoding/hex" - "strconv" "sync" - "time" - - protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" - - "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/blockchain/abci" + "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/txn" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" -) - -var ( - increaseFactor = num.NewUint(2) - banDurationAsEpochFraction = num.DecimalOne().Div(num.DecimalFromInt64(48)) // 1/48 of an epoch will be the default 30 minutes ban - banFactor = num.DecimalFromFloat(0.5) - rejectRatioForIncrease = num.DecimalFromFloat(0.3) -) - -const ( - numberOfBlocksForIncreaseCheck uint64 = 10 - minBanDuration = time.Second * 30 // minimum ban duration + protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" ) type StakingAccounts interface { @@ -63,16 +47,15 @@ type Engine struct { currentEpoch *types.Epoch policyNameToPolicy map[string]Policy hashKeys []string - banDuration time.Duration - - noSpamProtection bool // flag that disables chesk for the spam policies, that is useful for the nullchain + noSpamProtection bool // flag that disables chesk for the spam policies, that is useful for the nullchain } type Policy interface { Reset(epoch types.Epoch) - EndOfBlock(blockHeight uint64, now time.Time, banDuration time.Duration) - PreBlockAccept(tx abci.Tx) (bool, error) - PostBlockAccept(tx abci.Tx) (bool, error) + UpdateTx(tx abci.Tx) + RollbackProposal() + CheckBlockTx(abci.Tx) error + PreBlockAccept(tx abci.Tx) error UpdateUintParam(name string, value *num.Uint) error UpdateIntParam(name string, value int64) error Serialise() ([]byte, error) @@ -118,21 +101,23 @@ func New(log *logging.Logger, config Config, epochEngine EpochEngine, accounting createReferralSetPolicy := NewSimpleSpamPolicy("createReferralSet", netparams.ReferralProgramMinStakedVegaTokens, netparams.SpamProtectionMaxCreateReferralSet, log, accounting) updateReferralSetPolicy := NewSimpleSpamPolicy("updateReferralSet", netparams.ReferralProgramMinStakedVegaTokens, netparams.SpamProtectionMaxUpdateReferralSet, log, accounting) applyReferralCodePolicy := NewSimpleSpamPolicy("applyReferralCode", "", netparams.SpamProtectionMaxApplyReferralCode, log, accounting) + updatePartyProfilePolicy := NewSimpleSpamPolicy("updatePartyProfile", "", netparams.SpamProtectionMaxUpdatePartyProfile, log, accounting) // complex policies votePolicy := NewVoteSpamPolicy(netparams.SpamProtectionMinTokensForVoting, netparams.SpamProtectionMaxVotes, log, accounting) voteKey := (&types.PayloadVoteSpamPolicy{}).Key() e.policyNameToPolicy = map[string]Policy{ - proposalPolicy.policyName: proposalPolicy, - valJoinPolicy.policyName: valJoinPolicy, - delegationPolicy.policyName: delegationPolicy, - transferPolicy.policyName: transferPolicy, - issuesSignaturesPolicy.policyName: issuesSignaturesPolicy, - createReferralSetPolicy.policyName: createReferralSetPolicy, - updateReferralSetPolicy.policyName: updateReferralSetPolicy, - applyReferralCodePolicy.policyName: applyReferralCodePolicy, - voteKey: votePolicy, + proposalPolicy.policyName: proposalPolicy, + valJoinPolicy.policyName: valJoinPolicy, + delegationPolicy.policyName: delegationPolicy, + transferPolicy.policyName: transferPolicy, + issuesSignaturesPolicy.policyName: issuesSignaturesPolicy, + voteKey: votePolicy, + createReferralSetPolicy.policyName: createReferralSetPolicy, + updateReferralSetPolicy.policyName: updateReferralSetPolicy, + applyReferralCodePolicy.policyName: applyReferralCodePolicy, + updatePartyProfilePolicy.policyName: updatePartyProfilePolicy, } e.hashKeys = []string{ proposalPolicy.policyName, @@ -143,10 +128,12 @@ func New(log *logging.Logger, config Config, epochEngine EpochEngine, accounting createReferralSetPolicy.policyName, updateReferralSetPolicy.policyName, applyReferralCodePolicy.policyName, + updatePartyProfilePolicy.policyName, voteKey, } e.transactionTypeToPolicy[txn.ProposeCommand] = proposalPolicy + e.transactionTypeToPolicy[txn.BatchProposeCommand] = proposalPolicy e.transactionTypeToPolicy[txn.AnnounceNodeCommand] = valJoinPolicy e.transactionTypeToPolicy[txn.DelegateCommand] = delegationPolicy e.transactionTypeToPolicy[txn.UndelegateCommand] = delegationPolicy @@ -157,6 +144,7 @@ func New(log *logging.Logger, config Config, epochEngine EpochEngine, accounting e.transactionTypeToPolicy[txn.CreateReferralSetCommand] = createReferralSetPolicy e.transactionTypeToPolicy[txn.UpdateReferralSetCommand] = updateReferralSetPolicy e.transactionTypeToPolicy[txn.ApplyReferralCodeCommand] = applyReferralCodePolicy + e.transactionTypeToPolicy[txn.UpdatePartyProfileCommand] = updatePartyProfilePolicy // register for epoch end notifications epochEngine.NotifyOnEpoch(e.OnEpochEvent, e.OnEpochRestore) @@ -170,23 +158,16 @@ func (e *Engine) DisableSpamProtection() { e.noSpamProtection = true } -// OnEpochDurationChanged updates the ban duration as a fraction of the epoch duration. -func (e *Engine) OnEpochDurationChanged(_ context.Context, duration time.Duration) error { - epochImpliedDurationNano, _ := num.UintFromDecimal(num.DecimalFromInt64(duration.Nanoseconds()).Mul(banDurationAsEpochFraction)) - epochImpliedDurationDuration := time.Duration(epochImpliedDurationNano.Uint64()) - if epochImpliedDurationDuration < minBanDuration { - e.banDuration = minBanDuration - } else { - e.banDuration = epochImpliedDurationDuration - } - return nil -} - // OnCreateReferralSet is called when the net param for max create referral set per epoch has changed. func (e *Engine) OnMaxCreateReferralSet(ctx context.Context, max int64) error { return e.transactionTypeToPolicy[txn.CreateReferralSetCommand].UpdateIntParam(netparams.SpamProtectionMaxCreateReferralSet, max) } +// OnMaxPartyProfileUpdate is called when the net param for max update party profile per epoch has changed. +func (e *Engine) OnMaxPartyProfile(ctx context.Context, max int64) error { + return e.transactionTypeToPolicy[txn.UpdatePartyProfileCommand].UpdateIntParam(netparams.SpamProtectionMaxUpdatePartyProfile, max) +} + // OnMaxUpdateReferralSet is called when the net param for max update referral set per epoch has changed. func (e *Engine) OnMaxUpdateReferralSet(ctx context.Context, max int64) error { return e.transactionTypeToPolicy[txn.UpdateReferralSetCommand].UpdateIntParam(netparams.SpamProtectionMaxUpdateReferralSet, max) @@ -277,66 +258,76 @@ func (e *Engine) OnEpochEvent(ctx context.Context, epoch types.Epoch) { } } -// EndOfBlock is called when the block is finished. -func (e *Engine) EndOfBlock(blockHeight uint64, now time.Time) { - if e.log.GetLevel() <= logging.DebugLevel { - e.log.Debug("Spam protection EndOfBlock called", logging.Uint64("blockHeight", blockHeight)) - } - - if e.noSpamProtection { - e.log.Info("Spam protection EndOfBlock disabled", logging.Uint64("blockHeight", blockHeight)) - return +func (e *Engine) BeginBlock(txs []abci.Tx) { + for _, tx := range txs { + if _, ok := e.transactionTypeToPolicy[tx.Command()]; !ok { + continue + } + e.transactionTypeToPolicy[tx.Command()].UpdateTx(tx) } +} +func (e *Engine) EndPrepareProposal() { for _, policy := range e.transactionTypeToPolicy { - policy.EndOfBlock(blockHeight, now, e.banDuration) + policy.RollbackProposal() } } // PreBlockAccept is called from onCheckTx before a tx is added to mempool // returns false is rejected by spam engine with a corresponding error. -func (e *Engine) PreBlockAccept(tx abci.Tx) (bool, error) { +func (e *Engine) PreBlockAccept(tx abci.Tx) error { command := tx.Command() if _, ok := e.transactionTypeToPolicy[command]; !ok { - return true, nil + return nil } if e.log.GetLevel() <= logging.DebugLevel { e.log.Debug("Spam protection PreBlockAccept called for policy", logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("command", command.String())) } - if e.noSpamProtection { e.log.Debug("Spam protection PreBlockAccept disabled for policy", logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("command", command.String())) - return true, nil + return nil } - return e.transactionTypeToPolicy[command].PreBlockAccept(tx) } +func (e *Engine) ProcessProposal(txs []abci.Tx) bool { + success := true + for _, tx := range txs { + command := tx.Command() + if _, ok := e.transactionTypeToPolicy[command]; !ok { + continue + } + if e.noSpamProtection { + e.log.Debug("Spam protection PreBlockAccept disabled for policy", logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("command", command.String())) + continue + } + + if err := e.transactionTypeToPolicy[command].CheckBlockTx(tx); err != nil { + success = false + } + } + for _, p := range e.transactionTypeToPolicy { + p.RollbackProposal() + } + return success +} + // PostBlockAccept is called from onDeliverTx before the block is processed // returns false is rejected by spam engine with a corresponding error. -func (e *Engine) PostBlockAccept(tx abci.Tx) (bool, error) { +func (e *Engine) CheckBlockTx(tx abci.Tx) error { command := tx.Command() if _, ok := e.transactionTypeToPolicy[command]; !ok { - return true, nil + return nil } if e.log.GetLevel() <= logging.DebugLevel { e.log.Debug("Spam protection PostBlockAccept called for policy", logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("command", command.String())) } if e.noSpamProtection { - e.log.Debug("Spam protection PostBlockAccept disabled for policy", logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("command", command.String())) - return true, nil - } - - return e.transactionTypeToPolicy[command].PostBlockAccept(tx) -} - -func parseBannedUntil(until int64) *string { - if until == 0 { + e.log.Debug("Spam protection PreBlockAccept disabled for policy", logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("command", command.String())) return nil } - t := strconv.FormatInt(until, 10) - return &t + return e.transactionTypeToPolicy[command].CheckBlockTx(tx) } func (e *Engine) GetSpamStatistics(partyID string) *protoapi.SpamStatistics { @@ -344,7 +335,7 @@ func (e *Engine) GetSpamStatistics(partyID string) *protoapi.SpamStatistics { for txType, policy := range e.transactionTypeToPolicy { switch txType { - case txn.ProposeCommand: + case txn.ProposeCommand, txn.BatchProposeCommand: stats.Proposals = policy.GetSpamStats(partyID) case txn.DelegateCommand: stats.Delegations = policy.GetSpamStats(partyID) diff --git a/core/spam/engine_test.go b/core/spam/engine_test.go index 9c95fa14fc..aaac6c3fad 100644 --- a/core/spam/engine_test.go +++ b/core/spam/engine_test.go @@ -20,8 +20,8 @@ import ( "context" "errors" "testing" - "time" + "code.vegaprotocol.io/vega/core/blockchain/abci" "code.vegaprotocol.io/vega/core/spam" "code.vegaprotocol.io/vega/core/txn" "code.vegaprotocol.io/vega/core/types" @@ -30,6 +30,7 @@ import ( "code.vegaprotocol.io/vega/logging" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/stretchr/testify/require" ) @@ -77,7 +78,7 @@ func (t *testTx) GetCmd() interface{} { func TestEngine(t *testing.T) { t.Run("pre block goes is handled by the appropriate spam policy", testPreBlockAccept) t.Run("post block goes is handled by the appropriate spam policy", testPostBlockAccept) - t.Run("end of block is applied to all policies", testEndOfBlock) + t.Run("end prepare and end process is applied to all policies", testEndOfBlock) t.Run("reset is applied to all policies", testEngineReset) } @@ -91,24 +92,21 @@ func testEngineReset(t *testing.T) { // pre accept for i := 0; i < 3; i++ { - accept, _ := engine.PreBlockAccept(tx1) - require.Equal(t, true, accept) - - accept, _ = engine.PreBlockAccept(tx2) - require.Equal(t, true, accept) + require.NoError(t, engine.PreBlockAccept(tx1)) + require.NoError(t, engine.PreBlockAccept(tx2)) } // post accept for i := 0; i < 3; i++ { - accept, _ := engine.PostBlockAccept(tx1) - require.Equal(t, true, accept) - accept, _ = engine.PostBlockAccept(tx2) - require.Equal(t, true, accept) + err := engine.CheckBlockTx(tx1) + require.NoError(t, err) + err = engine.CheckBlockTx(tx2) + require.NoError(t, err) } - // move to next block, we've voted/proposed everything already so shouldn't be allowed to make more - tm := time.Now() - engine.EndOfBlock(1, tm) + engine.EndPrepareProposal() + engine.ProcessProposal([]abci.Tx{tx1, tx1, tx1, tx2, tx2, tx2}) + engine.BeginBlock([]abci.Tx{tx1, tx1, tx1, tx2, tx2, tx2}) proposalState, _, err := engine.GetState("proposal") require.Nil(t, err) @@ -142,13 +140,8 @@ func testEngineReset(t *testing.T) { require.Nil(t, err) require.True(t, bytes.Equal(voteState, voteState2)) - accept, err := snapEngine.engine.PreBlockAccept(tx1) - require.Equal(t, false, accept) - require.Equal(t, errors.New("party has already submitted the maximum number of proposal requests per epoch"), err) - - accept, err = snapEngine.engine.PreBlockAccept(tx2) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrTooManyVotes, err) + require.Error(t, errors.New("party has already submitted the maximum number of proposal requests per epoch"), snapEngine.engine.PreBlockAccept(tx1)) + require.Equal(t, spam.ErrTooManyVotes, snapEngine.engine.PreBlockAccept(tx2)) // Notify an epoch event for the *same* epoch and a reset should not happen snapEngine.engine.OnEpochEvent(context.Background(), types.Epoch{Seq: 0}) @@ -161,11 +154,8 @@ func testEngineReset(t *testing.T) { // expect to be able to submit 3 more votes/proposals successfully for i := 0; i < 3; i++ { - accept, _ := snapEngine.engine.PreBlockAccept(tx1) - require.Equal(t, true, accept) - - accept, _ = snapEngine.engine.PreBlockAccept(tx2) - require.Equal(t, true, accept) + require.NoError(t, snapEngine.engine.PreBlockAccept(tx1)) + require.NoError(t, snapEngine.engine.PreBlockAccept(tx2)) } proposalState3, _, err := snapEngine.engine.GetState("proposal") @@ -183,20 +173,16 @@ func testPreBlockAccept(t *testing.T) { engine.OnEpochEvent(context.Background(), types.Epoch{Seq: 0}) tx1 := &testTx{party: "party1", proposal: "proposal1", command: txn.ProposeCommand} - accept, _ := engine.PreBlockAccept(tx1) - require.Equal(t, true, accept) + require.NoError(t, engine.PreBlockAccept(tx1)) tx2 := &testTx{party: "party1", proposal: "proposal1", command: txn.VoteCommand} - accept, _ = engine.PreBlockAccept(tx2) - require.Equal(t, true, accept) + require.NoError(t, engine.PreBlockAccept(tx2)) tx1 = &testTx{party: "party2", proposal: "proposal1", command: txn.ProposeCommand} - _, err := engine.PreBlockAccept(tx1) - require.Equal(t, errors.New("party has insufficient associated governance tokens in their staking account to submit proposal request"), err) + require.Equal(t, errors.New("party has insufficient associated governance tokens in their staking account to submit proposal request"), engine.PreBlockAccept(tx1)) tx2 = &testTx{party: "party2", proposal: "proposal1", command: txn.VoteCommand} - _, err = engine.PreBlockAccept(tx2) - require.Equal(t, spam.ErrInsufficientTokensForVoting, err) + require.Equal(t, spam.ErrInsufficientTokensForVoting, engine.PreBlockAccept(tx2)) } func testPostBlockAccept(t *testing.T) { @@ -205,23 +191,24 @@ func testPostBlockAccept(t *testing.T) { engine.OnEpochEvent(context.Background(), types.Epoch{Seq: 0}) + tx1 := &testTx{party: "party1", proposal: "proposal1", command: txn.ProposeCommand} + tx2 := &testTx{party: "party1", proposal: "proposal1", command: txn.VoteCommand} for i := 0; i < 3; i++ { - tx1 := &testTx{party: "party1", proposal: "proposal1", command: txn.ProposeCommand} - accept, _ := engine.PostBlockAccept(tx1) - require.Equal(t, true, accept) + err := engine.CheckBlockTx(tx1) + require.NoError(t, err) - tx2 := &testTx{party: "party1", proposal: "proposal1", command: txn.VoteCommand} - accept, _ = engine.PostBlockAccept(tx2) - require.Equal(t, true, accept) + err = engine.CheckBlockTx(tx2) + require.NoError(t, err) } + engine.EndPrepareProposal() + engine.ProcessProposal([]abci.Tx{tx1, tx1, tx1, tx2, tx2, tx2}) + engine.BeginBlock([]abci.Tx{tx1, tx1, tx1, tx2, tx2, tx2}) - tx1 := &testTx{party: "party1", proposal: "proposal1", command: txn.ProposeCommand} - _, err := engine.PostBlockAccept(tx1) - require.Equal(t, errors.New("party has already submitted the maximum number of proposal requests per epoch"), err) + tx1 = &testTx{party: "party1", proposal: "proposal1", command: txn.ProposeCommand} + require.Error(t, errors.New("party has already submitted the maximum number of proposal requests per epoch"), engine.CheckBlockTx(tx1)) - tx2 := &testTx{party: "party1", proposal: "proposal1", command: txn.VoteCommand} - _, err = engine.PostBlockAccept(tx2) - require.Equal(t, spam.ErrTooManyVotes, err) + tx2 = &testTx{party: "party1", proposal: "proposal1", command: txn.VoteCommand} + require.Error(t, spam.ErrTooManyVotes, engine.CheckBlockTx(tx2)) } func testEndOfBlock(t *testing.T) { @@ -230,23 +217,29 @@ func testEndOfBlock(t *testing.T) { engine.OnEpochEvent(context.Background(), types.Epoch{Seq: 0}) + tx1 := &testTx{party: "party1", proposal: "proposal1", command: txn.ProposeCommand} + tx2 := &testTx{party: "party1", proposal: "proposal1", command: txn.VoteCommand} + + for i := 0; i < 3; i++ { + require.NoError(t, engine.CheckBlockTx(tx1)) + require.NoError(t, engine.CheckBlockTx(tx2)) + } + engine.EndPrepareProposal() + engine.ProcessProposal([]abci.Tx{tx1, tx1, tx1, tx2, tx2, tx2}) + engine.BeginBlock([]abci.Tx{tx1, tx1, tx1, tx2, tx2, tx2}) + for i := 0; i < 3; i++ { tx1 := &testTx{party: "party1", proposal: "proposal1", command: txn.ProposeCommand} - accept, _ := engine.PostBlockAccept(tx1) - require.Equal(t, true, accept) + require.Error(t, engine.CheckBlockTx(tx1)) tx2 := &testTx{party: "party1", proposal: "proposal1", command: txn.VoteCommand} - accept, _ = engine.PostBlockAccept(tx2) - require.Equal(t, true, accept) + require.Error(t, engine.CheckBlockTx(tx2)) } - engine.EndOfBlock(1, time.Now()) - tx1 := &testTx{party: "party1", proposal: "proposal1", command: txn.ProposeCommand} - _, err := engine.PreBlockAccept(tx1) - require.Equal(t, errors.New("party has already submitted the maximum number of proposal requests per epoch"), err) + // proposal is rejected + engine.EndPrepareProposal() - tx2 := &testTx{party: "party1", proposal: "proposal1", command: txn.VoteCommand} - _, err = engine.PreBlockAccept(tx2) - require.Equal(t, spam.ErrTooManyVotes, err) + require.Error(t, errors.New("party has already submitted the maximum number of proposal requests per epoch"), engine.PreBlockAccept(tx1)) + require.Equal(t, spam.ErrTooManyVotes, engine.PreBlockAccept(tx2)) } type testEngine struct { diff --git a/core/spam/simple_spam_policy.go b/core/spam/simple_spam_policy.go index 526cf8c3ff..ab7ac84fc9 100644 --- a/core/spam/simple_spam_policy.go +++ b/core/spam/simple_spam_policy.go @@ -20,15 +20,13 @@ import ( "errors" "sort" "sync" - "time" - - protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" "code.vegaprotocol.io/vega/core/blockchain/abci" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" + protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" ) // Simple spam policy supports encforcing of max allowed commands and min required tokens + banning of parties when their reject rate in the block @@ -43,13 +41,10 @@ type SimpleSpamPolicy struct { minTokensParamName string maxAllowedParamName string - partyToCount map[string]uint64 // commands that are already on blockchain - blockPartyToCount map[string]uint64 // commands in the current block - bannedParties map[string]int64 // parties banned -> ban end time - partyBlockRejects map[string]*blockRejectInfo // total vs rejection in the current block - currentEpochSeq uint64 // current epoch sequence - lock sync.RWMutex // global lock to sync calls from multiple tendermint threads - banErr func(until time.Time) error + partyToCount map[string]uint64 // commands that are already on blockchain + blockPartyToCount map[string]uint64 // commands in the current block + currentEpochSeq uint64 // current epoch sequence + lock sync.RWMutex // global lock to sync calls from multiple tendermint threads insufficientTokensErr error tooManyCommands error } @@ -57,21 +52,16 @@ type SimpleSpamPolicy struct { // NewSimpleSpamPolicy instantiates the simple spam policy. func NewSimpleSpamPolicy(policyName string, minTokensParamName string, maxAllowedParamName string, log *logging.Logger, accounts StakingAccounts) *SimpleSpamPolicy { return &SimpleSpamPolicy{ - log: log, - accounts: accounts, - policyName: policyName, - partyToCount: map[string]uint64{}, - blockPartyToCount: map[string]uint64{}, - bannedParties: map[string]int64{}, - partyBlockRejects: map[string]*blockRejectInfo{}, - lock: sync.RWMutex{}, - minTokensParamName: minTokensParamName, - maxAllowedParamName: maxAllowedParamName, - minTokensRequired: num.UintZero(), - maxAllowedCommands: 1, // default is allow one per epoch - banErr: func(until time.Time) error { - return errors.New("party is banned from submitting " + policyName + " until the earlier between " + until.String() + " and the beginning of the next epoch") - }, + log: log, + accounts: accounts, + policyName: policyName, + partyToCount: map[string]uint64{}, + blockPartyToCount: map[string]uint64{}, + lock: sync.RWMutex{}, + minTokensParamName: minTokensParamName, + maxAllowedParamName: maxAllowedParamName, + minTokensRequired: num.UintZero(), + maxAllowedCommands: 1, // default is allow one per epoch insufficientTokensErr: errors.New("party has insufficient associated governance tokens in their staking account to submit " + policyName + " request"), tooManyCommands: errors.New("party has already submitted the maximum number of " + policyName + " requests per epoch"), } @@ -88,22 +78,11 @@ func (ssp *SimpleSpamPolicy) Serialise() ([]byte, error) { sort.SliceStable(partyToCount, func(i, j int) bool { return partyToCount[i].Party < partyToCount[j].Party }) - bannedParties := make([]*types.BannedParty, 0, len(ssp.bannedParties)) - for party, until := range ssp.bannedParties { - bannedParties = append(bannedParties, &types.BannedParty{ - Party: party, - Until: until, - }) - } - - sort.SliceStable(bannedParties, func(i, j int) bool { return bannedParties[i].Party < bannedParties[j].Party }) - payload := types.Payload{ Data: &types.PayloadSimpleSpamPolicy{ SimpleSpamPolicy: &types.SimpleSpamPolicy{ PolicyName: ssp.policyName, PartyToCount: partyToCount, - BannedParty: bannedParties, CurrentEpochSeq: ssp.currentEpochSeq, }, }, @@ -119,11 +98,6 @@ func (ssp *SimpleSpamPolicy) Deserialise(p *types.Payload) error { for _, ptc := range pl.PartyToCount { ssp.partyToCount[ptc.Party] = ptc.Count } - ssp.bannedParties = make(map[string]int64, len(pl.BannedParty)) - for _, bp := range pl.BannedParty { - ssp.bannedParties[bp.Party] = bp.Until - } - ssp.currentEpochSeq = pl.CurrentEpochSeq return nil @@ -159,49 +133,20 @@ func (ssp *SimpleSpamPolicy) Reset(epoch types.Epoch) { // reset counts ssp.partyToCount = map[string]uint64{} - - // clear banned on new epoch - ssp.bannedParties = map[string]int64{} - ssp.blockPartyToCount = map[string]uint64{} - ssp.partyBlockRejects = map[string]*blockRejectInfo{} } -// EndOfBlock is called at the end of the processing of the block to carry over state and trigger bans if necessary. -func (ssp *SimpleSpamPolicy) EndOfBlock(blockHeight uint64, now time.Time, banDuration time.Duration) { +func (ssp *SimpleSpamPolicy) UpdateTx(tx abci.Tx) { ssp.lock.Lock() defer ssp.lock.Unlock() - // add the block's counters to the epoch's - for party, count := range ssp.blockPartyToCount { - if _, ok := ssp.partyToCount[party]; !ok { - ssp.partyToCount[party] = 0 - } - ssp.partyToCount[party] += count - } - - ssp.blockPartyToCount = map[string]uint64{} - - // release bans - nowNano := now.UnixNano() - for k, v := range ssp.bannedParties { - if nowNano >= v { - delete(ssp.bannedParties, k) - } + if _, ok := ssp.partyToCount[tx.Party()]; !ok { + ssp.partyToCount[tx.Party()] = 0 } - - endBanTime := now.Add(banDuration).UnixNano() - - // ban parties with more than rejection rate in the block - for p, bStats := range ssp.partyBlockRejects { - if num.DecimalFromInt64(int64(bStats.rejected)).Div(num.DecimalFromInt64(int64(bStats.total))).GreaterThanOrEqual(banFactor) { - ssp.bannedParties[p] = endBanTime - } - } - ssp.partyBlockRejects = map[string]*blockRejectInfo{} + ssp.partyToCount[tx.Party()]++ } -// PostBlockAccept is called to verify a transaction from the block before passed to the application layer. -func (ssp *SimpleSpamPolicy) PostBlockAccept(tx abci.Tx) (bool, error) { +// CheckBlockTx is called to verify a transaction from the block before passed to the application layer. +func (ssp *SimpleSpamPolicy) CheckBlockTx(tx abci.Tx) error { party := tx.Party() ssp.lock.Lock() @@ -219,18 +164,9 @@ func (ssp *SimpleSpamPolicy) PostBlockAccept(tx abci.Tx) (bool, error) { blockCommands += count } - // if too many votes in total - reject and update counters + // if too many votes in total - reject if epochCommands+blockCommands >= ssp.maxAllowedCommands { - // update vote stats for the epoch - if partyRejectStats, ok := ssp.partyBlockRejects[party]; ok { - partyRejectStats.add(true) - } else { - ssp.partyBlockRejects[party] = &blockRejectInfo{total: 1, rejected: 1} - } - if ssp.log.GetLevel() <= logging.DebugLevel { - ssp.log.Debug("Spam post: party has already submitted the max amount of commands for "+ssp.policyName, logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("party", party)) - } - return false, ssp.tooManyCommands + return ssp.tooManyCommands } // update block counters @@ -239,38 +175,27 @@ func (ssp *SimpleSpamPolicy) PostBlockAccept(tx abci.Tx) (bool, error) { } ssp.blockPartyToCount[party]++ - // update party and block stats - if partyRejectStats, ok := ssp.partyBlockRejects[party]; ok { - partyRejectStats.add(false) - } else { - ssp.partyBlockRejects[party] = &blockRejectInfo{total: 1, rejected: 0} - } - return true, nil + return nil +} + +func (ssp *SimpleSpamPolicy) RollbackProposal() { + ssp.blockPartyToCount = map[string]uint64{} } // PreBlockAccept checks if the commands violates spam rules based on the information we had about the number of existing commands preceding the current block. -func (ssp *SimpleSpamPolicy) PreBlockAccept(tx abci.Tx) (bool, error) { +func (ssp *SimpleSpamPolicy) PreBlockAccept(tx abci.Tx) error { party := tx.Party() ssp.lock.RLock() defer ssp.lock.RUnlock() - // check if the party is banned - until, ok := ssp.bannedParties[party] - if ok { - if ssp.log.GetLevel() <= logging.DebugLevel { - ssp.log.Debug("Spam pre: party is banned from "+ssp.policyName, logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("party", party)) - } - return false, ssp.banErr(time.Unix(0, until).UTC()) - } - // check if the party has enough balance to submit commands balance, err := ssp.accounts.GetAvailableBalance(party) if !ssp.minTokensRequired.IsZero() && (err != nil || balance.LT(ssp.minTokensRequired)) { if ssp.log.GetLevel() <= logging.DebugLevel { ssp.log.Debug("Spam pre: party has insufficient balance for "+ssp.policyName, logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("party", party), logging.String("balance", num.UintToString(balance))) } - return false, ssp.insufficientTokensErr + return ssp.insufficientTokensErr } // Check we have not exceeded our command limit for this given party in this epoch @@ -278,10 +203,10 @@ func (ssp *SimpleSpamPolicy) PreBlockAccept(tx abci.Tx) (bool, error) { if ssp.log.GetLevel() <= logging.DebugLevel { ssp.log.Debug("Spam pre: party has already submitted the max amount of commands for "+ssp.policyName, logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("party", party), logging.Uint64("count", commandCount), logging.Uint64("maxAllowed", ssp.maxAllowedCommands)) } - return false, ssp.tooManyCommands + return ssp.tooManyCommands } - return true, nil + return nil } func (ssp *SimpleSpamPolicy) GetSpamStats(party string) *protoapi.SpamStatistic { @@ -290,7 +215,6 @@ func (ssp *SimpleSpamPolicy) GetSpamStats(party string) *protoapi.SpamStatistic return &protoapi.SpamStatistic{ CountForEpoch: ssp.partyToCount[party], MaxForEpoch: ssp.maxAllowedCommands, - BannedUntil: parseBannedUntil(ssp.bannedParties[party]), MinTokensRequired: ssp.minTokensRequired.String(), } } diff --git a/core/spam/simple_spam_policy_test.go b/core/spam/simple_spam_policy_test.go index 52af5343b7..b54eb21876 100644 --- a/core/spam/simple_spam_policy_test.go +++ b/core/spam/simple_spam_policy_test.go @@ -16,19 +16,15 @@ package spam_test import ( - "bytes" - "errors" "strconv" "testing" - "time" "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/spam" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" - "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" - snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/stretchr/testify/require" ) @@ -36,18 +32,6 @@ var insufficientPropTokens, _ = num.UintFromString("50000000000000000000000", 10 var sufficientPropTokens, _ = num.UintFromString("100000000000000000000000", 10) -func TestSimpleSpamProtection(t *testing.T) { - t.Run("Pre reject command from party with insufficient balance at the beginning of the epoch", testCommandPreRejectInsufficientBalance) - t.Run("Pre reject command from party that is banned for the epochs", testCommandPreRejectBannedParty) - t.Run("Pre reject command from party that already had more than 3 proposal for the epoch", testCommandPreRejectTooManyProposals) - t.Run("Pre accept command success", testCommandPreAccept) - t.Run("Post accept command success", testCommandPostAccept) - t.Run("Post reject command from party with too many proposals in total all from current block", testCommandPostRejectTooManyProposals) - t.Run("command counts from the block successfully applied on state", testCommandCountersUpdated) - t.Run("Start of epoch resets counters", testCommandReset) - t.Run("On end of block, block proposal counters are reset and take a snapshot roundtrip", testProposalEndBlockReset) -} - func getCommandSpamPolicy(accounts map[string]*num.Uint) *spam.SimpleSpamPolicy { testAccounts := testAccounts{balances: accounts} logger := logging.NewTestLogger() @@ -58,142 +42,16 @@ func getCommandSpamPolicy(accounts map[string]*num.Uint) *spam.SimpleSpamPolicy return policy } -func testProposalEndBlockReset(t *testing.T) { - tokenMap := make(map[string]*num.Uint, 1) - tokenMap["party1"] = sufficientPropTokens - // set state - policy := getCommandSpamPolicy(tokenMap) - - policy.Reset(types.Epoch{Seq: 0}) - - // in each block we vote once - var i uint64 - for ; i < 3; i++ { - tx := &testTx{party: "party1", proposal: "proposal1"} - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - - accept, err = policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - policy.EndOfBlock(i, time.Now(), time.Minute*30) - } - - tx := &testTx{party: "party1", proposal: "proposal1"} - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, errors.New("party has already submitted the maximum number of simple requests per epoch"), err) - - bytes1, err := policy.Serialise() - require.Nil(t, err) - var proposalPayload snapshot.Payload - proto.Unmarshal(bytes1, &proposalPayload) - payload := types.PayloadFromProto(&proposalPayload) - policy.Deserialise(payload) - bytes2, err := policy.Serialise() - require.Nil(t, err) - require.True(t, bytes.Equal(bytes1, bytes2)) - - policy.Reset(types.Epoch{Seq: 1}) - - bytes3, err := policy.Serialise() - require.Nil(t, err) - require.False(t, bytes.Equal(bytes3, bytes2)) -} - -// reject proposal when the proposer doesn't have sufficient balance at the beginning of the epoch. -func testCommandPreRejectInsufficientBalance(t *testing.T) { +func TestInsufficientPropTokens(t *testing.T) { policy := getCommandSpamPolicy(map[string]*num.Uint{"party1": insufficientPropTokens}) - tx := &testTx{party: "party1", proposal: "proposal1"} - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, errors.New("party has insufficient associated governance tokens in their staking account to submit simple request"), err) -} - -// reject proposal requests from banned parties for as long as they are banned. -func testCommandPreRejectBannedParty(t *testing.T) { - policy := getCommandSpamPolicy(map[string]*num.Uint{"party1": sufficientPropTokens}) - - // epoch 0 started party1 has enough balance - policy.Reset(types.Epoch{Seq: 0}) - - // trigger banning of party1 by causing it to post reject 3/6 of the proposal - tx := &testTx{party: "party1", proposal: "proposal1"} - for i := 0; i < 6; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, errors.New("party has already submitted the maximum number of simple requests per epoch"), err) - } - - // end the block for banning to take place - it will be unblocked with the new epoch so it doesn't matter - tm, _ := time.Parse("2006-01-02 15:04", "2022-12-12 04:35") - policy.EndOfBlock(1, tm, time.Minute*30) - - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, errors.New("party is banned from submitting simple until the earlier between 2022-12-12 05:05:00 +0000 UTC and the beginning of the next epoch"), err) - - // advance epochs - verify still banned until epoch 4 (including) - policy.Reset(types.Epoch{Seq: uint64(2)}) - - // should be released from ban on epoch 5 - policy.Reset(types.Epoch{Seq: 5}) - accept, err = policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) -} - -func testCommandPreRejectTooManyProposals(t *testing.T) { - policy := getCommandSpamPolicy(map[string]*num.Uint{"party1": sufficientPropTokens}) // epoch 0 block 0 policy.Reset(types.Epoch{Seq: 0}) - - // propose 4 proposals, all preaccepted 3 post accepted tx := &testTx{party: "party1", proposal: "proposal1"} - // pre accepted - for i := 0; i < 4; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - - // 3 post accepted - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - - // end block 0 - policy.EndOfBlock(1, time.Now(), time.Minute*30) - - // try to submit proposal - pre rejected because it already have 3 proposals - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, errors.New("party has already submitted the maximum number of simple requests per epoch"), err) - - // advance to next epoch to reset limits - policy.Reset(types.Epoch{Seq: 1}) - for i := 0; i < 3; i++ { - tx := &testTx{party: "party1", proposal: "proposal1"} - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } + err := policy.PreBlockAccept(tx) + require.Equal(t, "party has insufficient associated governance tokens in their staking account to submit simple request", err.Error()) } -func testCommandPreAccept(t *testing.T) { +func TestCommandPreAccept(t *testing.T) { policy := getCommandSpamPolicy(map[string]*num.Uint{"party1": sufficientPropTokens}) // epoch 0 block 0 policy.Reset(types.Epoch{Seq: 0}) @@ -203,134 +61,80 @@ func testCommandPreAccept(t *testing.T) { tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} // pre accepted for i := 0; i < 5; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) + err := policy.PreBlockAccept(tx) + require.NoError(t, err) } } } -func testCommandPostAccept(t *testing.T) { +func TestEndPrepareBlock(t *testing.T) { policy := getCommandSpamPolicy(map[string]*num.Uint{"party1": sufficientPropTokens}) policy.Reset(types.Epoch{Seq: 0}) - tx := &testTx{party: "party1", proposal: "proposal1"} - // pre accepted - for i := 0; i < 3; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - // post accepted - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } -} + tx1 := &testTx{party: "party1", proposal: "proposal1"} + tx2 := &testTx{party: "party1", proposal: "proposal2"} + tx3 := &testTx{party: "party1", proposal: "proposal3"} -func testCommandPostRejectTooManyProposals(t *testing.T) { - policy := getCommandSpamPolicy(map[string]*num.Uint{"party1": sufficientPropTokens}) - policy.Reset(types.Epoch{Seq: 0}) - tx := &testTx{party: "party1", proposal: "proposal1"} - // pre accepted - for i := 0; i < 5; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } + // prepare a block + require.NoError(t, policy.CheckBlockTx(tx1)) + require.NoError(t, policy.CheckBlockTx(tx2)) + require.NoError(t, policy.CheckBlockTx(tx3)) - // post accepted - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } + // end the proposal preparation to rollback any block changes + policy.RollbackProposal() - // post rejected - for i := 0; i < 2; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, errors.New("party has already submitted the maximum number of simple requests per epoch"), err) - } -} - -func testCommandCountersUpdated(t *testing.T) { - policy := getCommandSpamPolicy(map[string]*num.Uint{"party1": sufficientPropTokens}) - policy.Reset(types.Epoch{Seq: 0}) - - tx := &testTx{party: "party1", proposal: "proposal"} - // pre accepted - for i := 0; i < 3; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } + s := policy.GetSpamStats(tx1.party) + require.Equal(t, uint64(0), s.CountForEpoch) - // post accepted - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } + // assume block was proposed, now check from process proposal + policy.UpdateTx(tx1) + policy.UpdateTx(tx2) + policy.UpdateTx(tx3) - policy.EndOfBlock(1, time.Now(), time.Minute*30) - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, errors.New("party has already submitted the maximum number of simple requests per epoch"), err) + s = policy.GetSpamStats(tx1.party) + require.Equal(t, uint64(3), s.CountForEpoch) } -func testCommandReset(t *testing.T) { - // set state +func TestCheckBlockTx(t *testing.T) { policy := getCommandSpamPolicy(map[string]*num.Uint{"party1": sufficientPropTokens}) policy.Reset(types.Epoch{Seq: 0}) - tx := &testTx{party: "party1", proposal: "proposal1"} - // pre accepted - for i := 0; i < 6; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - // post accepted - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, errors.New("party has already submitted the maximum number of simple requests per epoch"), err) - } + tx1 := &testTx{party: "party1", proposal: "proposal1"} + tx2 := &testTx{party: "party1", proposal: "proposal2"} + tx3 := &testTx{party: "party1", proposal: "proposal3"} + tx4 := &testTx{party: "party1", proposal: "proposal4"} + + require.NoError(t, policy.CheckBlockTx(tx1)) + require.NoError(t, policy.CheckBlockTx(tx2)) + require.NoError(t, policy.CheckBlockTx(tx3)) + require.Error(t, policy.CheckBlockTx(tx4)) - // trigger ban of party1 for 30 minutes - tm, _ := time.Parse("2006-01-02 15:04", "2022-12-12 04:35") - policy.EndOfBlock(1, tm, time.Minute*30) + // rollback the proposal + policy.RollbackProposal() - policy.EndOfBlock(1, tm.Add(10*time.Minute), time.Minute*30) - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, errors.New("party is banned from submitting simple until the earlier between 2022-12-12 05:05:00 +0000 UTC and the beginning of the next epoch"), err) + // as the state has nothing expect pre block accept of all 4 txs + require.NoError(t, policy.PreBlockAccept(tx1)) + require.NoError(t, policy.PreBlockAccept(tx2)) + require.NoError(t, policy.PreBlockAccept(tx3)) + require.NoError(t, policy.PreBlockAccept(tx4)) - policy.EndOfBlock(1, tm.Add(20*time.Minute), time.Minute*30) - accept, err = policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, errors.New("party is banned from submitting simple until the earlier between 2022-12-12 05:05:00 +0000 UTC and the beginning of the next epoch"), err) + // now a block is made with the first 3 txs + policy.UpdateTx(tx1) + policy.UpdateTx(tx2) + policy.UpdateTx(tx3) - // advance time until the ban is lifted fro party1 - policy.EndOfBlock(1, tm.Add(30*time.Minute), time.Minute*30) + stats := policy.GetSpamStats(tx1.party) + require.Equal(t, uint64(3), stats.CountForEpoch) - // ban is finished, but still not eligible to submit another command - accept, err = policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, errors.New("party has already submitted the maximum number of simple requests per epoch"), err) + // now that there's been 3 proposals already, the 4th should be pre-rejected + require.Error(t, policy.PreBlockAccept(tx4)) + + // start a new epoch to reset counters + policy.Reset(types.Epoch{Seq: 0}) - // end the epoch - policy.Reset(types.Epoch{Seq: 2}) + // check that the new proposal is pre-block accepted + require.NoError(t, policy.PreBlockAccept(tx4)) - // new epoch new allowance - accept, err = policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.NoError(t, err) + stats = policy.GetSpamStats(tx1.party) + require.Equal(t, uint64(0), stats.CountForEpoch) } diff --git a/core/spam/vote_spam_policy.go b/core/spam/vote_spam_policy.go index 260e5af96f..4c0be169f1 100644 --- a/core/spam/vote_spam_policy.go +++ b/core/spam/vote_spam_policy.go @@ -21,31 +21,16 @@ import ( "sort" "strings" "sync" - "time" - - protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" "code.vegaprotocol.io/vega/core/blockchain/abci" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" + protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" ) -type blockRejectInfo struct { - rejected uint64 - total uint64 -} - -func (b *blockRejectInfo) add(rejected bool) { - b.total++ - if rejected { - b.rejected++ - } -} - -var maxMinVotingTokens, _ = num.UintFromString("1600000000000000000000", 10) var ( // ErrInsufficientTokensForVoting is returned when the party has insufficient tokens for voting. ErrInsufficientTokensForVoting = errors.New("party has insufficient associated governance tokens in their staking account to submit votes") @@ -61,36 +46,20 @@ type VoteSpamPolicy struct { minTokensParamName string maxAllowedParamName string - - minVotingTokensFactor *num.Uint // a factor applied on the min voting tokens - effectiveMinTokens *num.Uint // minVotingFactor * minVotingTokens - partyToVote map[string]map[string]uint64 // those are votes that are already on blockchain - blockPartyToVote map[string]map[string]uint64 // votes in the current block - bannedParties map[string]int64 // parties banned -> ban end time - recentBlocksRejectStats [numberOfBlocksForIncreaseCheck]*blockRejectInfo // recent blocks post rejection stats - blockPostRejects *blockRejectInfo // this blocks post reject stats - partyBlockRejects map[string]*blockRejectInfo // total vs rejection in the current block - currentBlockIndex uint64 // the index of the current block in the circular buffer - lastIncreaseBlock uint64 // the last block we've increased the number of - currentEpochSeq uint64 // the sequence id of the current epoch - lock sync.RWMutex // global lock to sync calls from multiple tendermint threads + partyToVote map[string]map[string]uint64 // those are votes that are already on blockchain + blockPartyToVote map[string]map[string]uint64 // votes in the current block + currentEpochSeq uint64 // the sequence id of the current epoch + lock sync.RWMutex // global lock to sync calls from multiple tendermint threads } // NewVoteSpamPolicy instantiates vote spam policy. func NewVoteSpamPolicy(minTokensParamName string, maxAllowedParamName string, log *logging.Logger, accounts StakingAccounts) *VoteSpamPolicy { return &VoteSpamPolicy{ - log: log, - accounts: accounts, - minVotingTokensFactor: num.NewUint(1), - minVotingTokens: num.NewUint(1), - + log: log, + accounts: accounts, + minVotingTokens: num.NewUint(1), partyToVote: map[string]map[string]uint64{}, blockPartyToVote: map[string]map[string]uint64{}, - bannedParties: map[string]int64{}, - blockPostRejects: &blockRejectInfo{total: 0, rejected: 0}, - partyBlockRejects: map[string]*blockRejectInfo{}, - currentBlockIndex: 0, - lastIncreaseBlock: 0, lock: sync.RWMutex{}, minTokensParamName: minTokensParamName, maxAllowedParamName: maxAllowedParamName, @@ -119,36 +88,11 @@ func (vsp *VoteSpamPolicy) Serialise() ([]byte, error) { return partyProposalVoteCount[i].Proposal < partyProposalVoteCount[j].Proposal }) - bannedParties := make([]*types.BannedParty, 0, len(vsp.bannedParties)) - for party, until := range vsp.bannedParties { - bannedParties = append(bannedParties, &types.BannedParty{ - Party: party, - Until: until, - }) - } - - sort.SliceStable(bannedParties, func(i, j int) bool { return bannedParties[i].Party < bannedParties[j].Party }) - - recentRejects := make([]*types.BlockRejectStats, 0, len(vsp.recentBlocksRejectStats)) - for _, brs := range vsp.recentBlocksRejectStats { - if brs != nil { - recentRejects = append(recentRejects, &types.BlockRejectStats{ - Total: brs.total, - Rejected: brs.rejected, - }) - } - } - payload := types.Payload{ Data: &types.PayloadVoteSpamPolicy{ VoteSpamPolicy: &types.VoteSpamPolicy{ - PartyProposalVoteCount: partyProposalVoteCount, - BannedParty: bannedParties, - RecentBlocksRejectStats: recentRejects, - CurrentBlockIndex: vsp.currentBlockIndex, - LastIncreaseBlock: vsp.lastIncreaseBlock, - CurrentEpochSeq: vsp.currentEpochSeq, - MinVotingTokensFactor: vsp.minVotingTokensFactor, + PartyProposalVoteCount: partyProposalVoteCount, + CurrentEpochSeq: vsp.currentEpochSeq, }, }, } @@ -158,18 +102,6 @@ func (vsp *VoteSpamPolicy) Serialise() ([]byte, error) { func (vsp *VoteSpamPolicy) Deserialise(p *types.Payload) error { pl := p.Data.(*types.PayloadVoteSpamPolicy).VoteSpamPolicy - - var i uint64 - for ; i < numberOfBlocksForIncreaseCheck; i++ { - vsp.recentBlocksRejectStats[i] = nil - } - for j, bl := range pl.RecentBlocksRejectStats { - vsp.recentBlocksRejectStats[j] = &blockRejectInfo{ - total: bl.Total, - rejected: bl.Rejected, - } - } - vsp.partyToVote = map[string]map[string]uint64{} for _, ptv := range pl.PartyProposalVoteCount { if _, ok := vsp.partyToVote[ptv.Party]; !ok { @@ -177,17 +109,7 @@ func (vsp *VoteSpamPolicy) Deserialise(p *types.Payload) error { } vsp.partyToVote[ptv.Party][ptv.Proposal] = ptv.Count } - vsp.bannedParties = make(map[string]int64, len(pl.BannedParty)) - for _, bp := range pl.BannedParty { - vsp.bannedParties[bp.Party] = bp.Until - } - vsp.currentEpochSeq = pl.CurrentEpochSeq - vsp.lastIncreaseBlock = pl.LastIncreaseBlock - vsp.currentBlockIndex = pl.CurrentBlockIndex - vsp.minVotingTokensFactor = pl.MinVotingTokensFactor - vsp.effectiveMinTokens = num.UintZero().Mul(vsp.minVotingTokens, vsp.minVotingTokensFactor) - return nil } @@ -196,9 +118,6 @@ func (vsp *VoteSpamPolicy) Deserialise(p *types.Payload) error { func (vsp *VoteSpamPolicy) UpdateUintParam(name string, value *num.Uint) error { if name == vsp.minTokensParamName { vsp.minVotingTokens = value.Clone() - // NB: this means that if during the epoch the min tokens changes externally - // and we already have a factor on it, the factor will be applied on the new value for the duration of the epoch - vsp.effectiveMinTokens = num.UintZero().Mul(vsp.minVotingTokens, vsp.minVotingTokensFactor) } else { return errors.New("unknown parameter for vote spam policy") } @@ -221,119 +140,34 @@ func (vsp *VoteSpamPolicy) Reset(epoch types.Epoch) { vsp.lock.Lock() defer vsp.lock.Unlock() // reset the token count factor to 1 - vsp.minVotingTokensFactor = num.NewUint(1) - vsp.effectiveMinTokens = vsp.minVotingTokens vsp.currentEpochSeq = epoch.Seq - // set last increase to 0 so we'd check right away on the next block - vsp.lastIncreaseBlock = 0 - // reset vote counts vsp.partyToVote = map[string]map[string]uint64{} // reset current block vote counts vsp.blockPartyToVote = map[string]map[string]uint64{} - - // reset block stats - vsp.currentBlockIndex = 0 - var i uint64 - for ; i < numberOfBlocksForIncreaseCheck; i++ { - vsp.recentBlocksRejectStats[i] = nil - } - - // clear banned - vsp.bannedParties = map[string]int64{} - - // reset block rejects - this is not essential here as it's cleared at the end of every block anyways - // but just for consistency - vsp.partyBlockRejects = map[string]*blockRejectInfo{} - vsp.blockPostRejects = &blockRejectInfo{ - total: 0, - rejected: 0, - } } -// EndOfBlock is called at the end of the block to allow updating of the state for the next block. -func (vsp *VoteSpamPolicy) EndOfBlock(blockHeight uint64, now time.Time, banDuration time.Duration) { +func (vsp *VoteSpamPolicy) UpdateTx(tx abci.Tx) { vsp.lock.Lock() defer vsp.lock.Unlock() - // add the block's vote counters to the epoch's - for p, v := range vsp.blockPartyToVote { - if _, ok := vsp.partyToVote[p]; !ok { - vsp.partyToVote[p] = map[string]uint64{} - } - - for proposalID, votes := range v { - if _, ok := vsp.partyToVote[p][proposalID]; !ok { - vsp.partyToVote[p][proposalID] = 0 - } - vsp.partyToVote[p][proposalID] = vsp.partyToVote[p][proposalID] + votes - } + if _, ok := vsp.partyToVote[tx.Party()]; !ok { + vsp.partyToVote[tx.Party()] = map[string]uint64{} } - - vsp.blockPartyToVote = map[string]map[string]uint64{} - - // release bans - nowNano := now.UnixNano() - for k, v := range vsp.bannedParties { - if nowNano >= v { - delete(vsp.bannedParties, k) - } - } - - endBanTime := now.Add(banDuration).UnixNano() - - // ban parties with more than rejection rate in the block - for p, bStats := range vsp.partyBlockRejects { - if num.DecimalFromInt64(int64(bStats.rejected)).Div(num.DecimalFromInt64(int64(bStats.total))).GreaterThanOrEqual(banFactor) { - vsp.bannedParties[p] = endBanTime - } - } - vsp.partyBlockRejects = map[string]*blockRejectInfo{} - - // add the block rejects to the last 10 blocks - vsp.recentBlocksRejectStats[vsp.currentBlockIndex] = &blockRejectInfo{ - rejected: vsp.blockPostRejects.rejected, - total: vsp.blockPostRejects.total, - } - vsp.currentBlockIndex++ - vsp.currentBlockIndex %= numberOfBlocksForIncreaseCheck - vsp.blockPostRejects = &blockRejectInfo{ - rejected: 0, - total: 0, - } - - // check if we need to increase the limits, i.e. if we're below the max and we've not increased in the last n blocks - if (vsp.lastIncreaseBlock == 0 || blockHeight > vsp.lastIncreaseBlock+numberOfBlocksForIncreaseCheck) && num.UintZero().Mul(vsp.minVotingTokens, vsp.minVotingTokensFactor).LT(maxMinVotingTokens) { - average := vsp.calcRejectAverage() - if average.GreaterThan(rejectRatioForIncrease) { - vsp.lastIncreaseBlock = blockHeight - vsp.minVotingTokensFactor = num.UintZero().Mul(vsp.minVotingTokensFactor, increaseFactor) - vsp.effectiveMinTokens = num.UintZero().Mul(vsp.minVotingTokensFactor, vsp.minVotingTokens) - } + vote := &commandspb.VoteSubmission{} + tx.Unmarshal(vote) + if _, ok := vsp.partyToVote[tx.Party()][vote.ProposalId]; !ok { + vsp.partyToVote[tx.Party()][vote.ProposalId] = 0 } + vsp.partyToVote[tx.Party()][vote.ProposalId] = vsp.partyToVote[tx.Party()][vote.ProposalId] + 1 } -// calculate the mean rejection rate in the last . -func (vsp *VoteSpamPolicy) calcRejectAverage() num.Decimal { - var total uint64 - var rejected uint64 - var i uint64 - for ; i < numberOfBlocksForIncreaseCheck; i++ { - if vsp.recentBlocksRejectStats[i] != nil { - total += vsp.recentBlocksRejectStats[i].total - rejected += vsp.recentBlocksRejectStats[i].rejected - } - } - if total == 0 { - return num.DecimalZero() - } - return num.DecimalFromInt64(int64(rejected)).Div(num.DecimalFromInt64(int64((total)))) +func (vsp *VoteSpamPolicy) RollbackProposal() { + vsp.blockPartyToVote = map[string]map[string]uint64{} } -// PostBlockAccept checks if votes that made it to the block should be rejected based on the number of votes preceding the block + votes seen in the block -// NB: this is called as part of the processing of the block. -func (vsp *VoteSpamPolicy) PostBlockAccept(tx abci.Tx) (bool, error) { +func (vsp *VoteSpamPolicy) CheckBlockTx(tx abci.Tx) error { party := tx.Party() vsp.lock.Lock() @@ -341,8 +175,7 @@ func (vsp *VoteSpamPolicy) PostBlockAccept(tx abci.Tx) (bool, error) { vote := &commandspb.VoteSubmission{} if err := tx.Unmarshal(vote); err != nil { - vsp.blockPostRejects.add(true) - return false, err + return err } // get number of votes preceding the block in this epoch @@ -363,19 +196,7 @@ func (vsp *VoteSpamPolicy) PostBlockAccept(tx abci.Tx) (bool, error) { // if too many votes in total - reject and update counters if epochVotes+blockVotes >= vsp.numVotes { - // update party/proposal vote stats for the epoch - vsp.blockPostRejects.add(true) - // update vote stats for the epoch - if partyRejectStats, ok := vsp.partyBlockRejects[party]; ok { - partyRejectStats.add(true) - } else { - vsp.partyBlockRejects[party] = &blockRejectInfo{total: 1, rejected: 1} - } - if vsp.log.GetLevel() <= logging.DebugLevel { - vsp.log.Debug("Spam post: party has already voted for proposal the max amount of votes", logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("party", party), logging.String("proposal", vote.ProposalId), logging.Uint64("voteCount", epochVotes+blockVotes), logging.Uint64("maxAllowed", vsp.numVotes)) - } - - return false, ErrTooManyVotes + return ErrTooManyVotes } // update vote counters for party/proposal votes @@ -387,47 +208,31 @@ func (vsp *VoteSpamPolicy) PostBlockAccept(tx abci.Tx) (bool, error) { } else { vsp.blockPartyToVote[party][vote.ProposalId] = votes + 1 } - - // update party and block stats - if partyRejectStats, ok := vsp.partyBlockRejects[party]; ok { - partyRejectStats.add(false) - } else { - vsp.partyBlockRejects[party] = &blockRejectInfo{total: 1, rejected: 0} - } - vsp.blockPostRejects.add(false) - return true, nil + return nil } // PreBlockAccept checks if the vote should be rejected as spam or not based on the number of votes in current epoch's preceding blocks and the number of tokens // held by the party. // NB: this is done at mempool before adding to block. -func (vsp *VoteSpamPolicy) PreBlockAccept(tx abci.Tx) (bool, error) { +func (vsp *VoteSpamPolicy) PreBlockAccept(tx abci.Tx) error { party := tx.Party() vsp.lock.RLock() defer vsp.lock.RUnlock() - until, ok := vsp.bannedParties[party] - if ok { - if vsp.log.GetLevel() <= logging.DebugLevel { - vsp.log.Debug("Spam pre: party is banned from voting", logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("party", party)) - } - return false, errors.New("party is banned from submitting votes until the earlier between " + time.Unix(0, until).UTC().String() + " and the beginning of the next epoch") - } - // check if the party has enough balance to submit votes balance, err := vsp.accounts.GetAvailableBalance(party) - if err != nil || balance.LT(vsp.effectiveMinTokens) { + if err != nil || balance.LT(vsp.minVotingTokens) { if vsp.log.GetLevel() <= logging.DebugLevel { vsp.log.Debug("Spam pre: party has insufficient balance for voting", logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("party", party), logging.String("balance", num.UintToString(balance))) } - return false, ErrInsufficientTokensForVoting + return ErrInsufficientTokensForVoting } vote := &commandspb.VoteSubmission{} if err := tx.Unmarshal(vote); err != nil { - return false, err + return err } // Check we have not exceeded our vote limit for this given proposal in this epoch @@ -436,11 +241,11 @@ func (vsp *VoteSpamPolicy) PreBlockAccept(tx abci.Tx) (bool, error) { if vsp.log.GetLevel() <= logging.DebugLevel { vsp.log.Debug("Spam pre: party has already voted for proposal the max amount of votes", logging.String("txHash", hex.EncodeToString(tx.Hash())), logging.String("party", party), logging.String("proposal", vote.ProposalId), logging.Uint64("voteCount", voteCount), logging.Uint64("maxAllowed", vsp.numVotes)) } - return false, ErrTooManyVotes + return ErrTooManyVotes } } - return true, nil + return nil } func (vsp *VoteSpamPolicy) GetSpamStats(_ string) *protoapi.SpamStatistic { @@ -454,7 +259,6 @@ func (vsp *VoteSpamPolicy) GetVoteSpamStats(partyID string) *protoapi.VoteSpamSt partyStats := vsp.partyToVote[partyID] stats := make([]*protoapi.VoteSpamStatistic, 0, len(partyStats)) - bannedUntil := vsp.bannedParties[partyID] for proposal, votes := range partyStats { stats = append(stats, &protoapi.VoteSpamStatistic{ @@ -463,10 +267,8 @@ func (vsp *VoteSpamPolicy) GetVoteSpamStats(partyID string) *protoapi.VoteSpamSt MinTokensRequired: vsp.minVotingTokens.String(), }) } - return &protoapi.VoteSpamStatistics{ Statistics: stats, MaxForEpoch: vsp.numVotes, - BannedUntil: parseBannedUntil(bannedUntil), } } diff --git a/core/spam/vote_spam_policy_test.go b/core/spam/vote_spam_policy_test.go index 27351f793c..cc7fc940af 100644 --- a/core/spam/vote_spam_policy_test.go +++ b/core/spam/vote_spam_policy_test.go @@ -19,7 +19,6 @@ import ( "bytes" "strconv" "testing" - "time" "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/spam" @@ -29,6 +28,7 @@ import ( "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/stretchr/testify/require" ) @@ -38,28 +38,19 @@ type testTx struct { command txn.Command } +func (*testTx) GetLength() int { return 0 } func (*testTx) GetPoWNonce() uint64 { return 0 } func (*testTx) GetNonce() uint64 { return 0 } func (*testTx) GetPoWTID() string { return "" } func (*testTx) GetVersion() uint32 { return 2 } -var ( - sufficientTokensForVoting, _ = num.UintFromString("100000000000000000000", 10) - sufficientTokens2ForVoting, _ = num.UintFromString("200000000000000000000", 10) - sufficientTokens4ForVoting, _ = num.UintFromString("400000000000000000000", 10) - sufficientTokens8ForVoting, _ = num.UintFromString("800000000000000000000", 10) - maxSufficientTokensForVoting, _ = num.UintFromString("1600000000000000000000", 10) -) +var sufficientTokensForVoting, _ = num.UintFromString("100000000000000000000", 10) func TestVotingSpamProtection(t *testing.T) { t.Run("Pre reject vote from party with insufficient balance at the beginning of the epoch", testPreRejectInsufficientBalance) - t.Run("Pre reject vote from party with insufficient balance at the beginning of the epoch vs factored min tokens", testPreRejectInsufficientBalanceWithFactor) - t.Run("Double min tokens until the max", testFactoringOfMinTokens) - t.Run("Pre reject vote from party that is banned for the epochs", testPreRejectBannedParty) t.Run("Pre reject vote from party that already had more than 3 votes for the epoch", testPreRejectTooManyVotesPerProposal) t.Run("Pre accept vote success", testPreAccept) t.Run("Post accept vote success", testPostAccept) - t.Run("Post reject vote from party with too many votes in total all from current block", testPostRejectTooManyVotes) t.Run("Vote counts from the block carried over to next block", testCountersUpdated) t.Run("On epoch start voting counters are reset", testReset) t.Run("On end of block, block voting counters are reset and take a snapshot roundtrip", testVoteEndBlockReset) @@ -80,222 +71,7 @@ func testPreRejectInsufficientBalance(t *testing.T) { policy := getVotingSpamPolicy(map[string]*num.Uint{"party1": num.NewUint(50)}) policy.Reset(types.Epoch{Seq: 0}) tx := &testTx{party: "party1", proposal: "proposal1"} - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrInsufficientTokensForVoting, err) -} - -// reject votes requests when the voter doesn't have sufficient balance with a factored min tokens. -func testPreRejectInsufficientBalanceWithFactor(t *testing.T) { - // epoch 0 started party1 has enough balance without doubling, party2 has enough balance with doubling - tokenMap := make(map[string]*num.Uint, 2) - tokenMap["party1"] = sufficientTokensForVoting - tokenMap["party2"] = sufficientTokens2ForVoting - policy := getVotingSpamPolicy(tokenMap) - - policy.Reset(types.Epoch{Seq: 0}) - - // make 30% of transactions post fail - tx1 := &testTx{party: "party1", proposal: "proposal1"} - tx2 := &testTx{party: "party2", proposal: "proposal2"} - - // party1 submits 5 votes for proposal 1 (with nothing earlier in the epoch) - for i := 0; i < 5; i++ { - accept, err := policy.PreBlockAccept(tx1) - require.Equal(t, true, accept) - require.Nil(t, err) - } - - // party2 submits 4 votes for proposal 2 (with nothing earlier in the epoch) - for i := 0; i < 5; i++ { - accept, err := policy.PreBlockAccept(tx2) - require.Equal(t, true, accept) - require.Nil(t, err) - } - - // party1 gets 3 post accepted and 2 post rejected - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx1) - require.Equal(t, true, accept) - require.Nil(t, err) - } - for i := 0; i < 2; i++ { - accept, err := policy.PostBlockAccept(tx1) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrTooManyVotes, err) - } - - // party2 gets 3 post accepted and 1 post rejected - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx2) - require.Equal(t, true, accept) - require.Nil(t, err) - } - - accept, err := policy.PostBlockAccept(tx2) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrTooManyVotes, err) - - // end the block for doubling of min amount to take place - policy.EndOfBlock(1, time.Now(), time.Minute*30) - - // in the next block party1 should not have enough balance to vote while party2 still has, but has no more votes - accept, err = policy.PreBlockAccept(tx1) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrInsufficientTokensForVoting, err) - - accept, err = policy.PreBlockAccept(tx2) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrTooManyVotes, err) -} - -// attack for a number of blocks until the min tokens reach 1600. -func testFactoringOfMinTokens(t *testing.T) { - // epoch 0 started party1 has enough balance without doubling, party2 has enough balance with doubling - tokenMap := make(map[string]*num.Uint, 2) - tokenMap["party1"] = sufficientTokensForVoting - tokenMap["party2"] = sufficientTokens2ForVoting - tokenMap["party3"] = sufficientTokens4ForVoting - tokenMap["party4"] = sufficientTokens8ForVoting - tokenMap["party5"] = maxSufficientTokensForVoting - policy := getVotingSpamPolicy(tokenMap) - - policy.Reset(types.Epoch{Seq: 0}) - - // party x submits 5 votes for proposal 1 (with nothing earlier in the epoch) - for i := 0; i < 4; i++ { - tx := &testTx{party: "party" + strconv.Itoa(i+1), proposal: "proposal" + strconv.Itoa(i+1)} - // pre accepted - for i := 0; i < 5; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - - // post 3 accepted 2 rejected - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - for i := 0; i < 2; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrTooManyVotes, err) - } - - for j := 0; j < 11; j++ { - // the first end of block will double the amount, the following 10 will have no impact on doubling - policy.EndOfBlock(uint64(i*10+j)+1, time.Now(), time.Minute*30) - } - } - - // at this point we expect the min tokens to be the max so all but party5 shall be pre rejected - for i := 1; i < 5; i++ { - tx := &testTx{party: "party" + strconv.Itoa(i), proposal: "proposal" + strconv.Itoa(i)} - // pre rejected - for i := 0; i < 5; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrInsufficientTokensForVoting, err) - } - } - - tx := &testTx{party: "party5", proposal: "proposal5"} - for i := 0; i < 5; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - for i := 0; i < 2; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrTooManyVotes, err) - } - - // advance to the next epoch so we reset the balances and all should be able to succeed with their token balances - policy.Reset(types.Epoch{Seq: 0}) - - for i := 0; i < 4; i++ { - tx := &testTx{party: "party" + strconv.Itoa(i+1), proposal: "proposal" + strconv.Itoa(i+1)} - // pre accepted - for i := 0; i < 5; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - - // post 3 accepted 2 rejected - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - for i := 0; i < 2; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrTooManyVotes, err) - } - - for j := 0; j < 11; j++ { - // the first end of block will double the amount, the following 10 will have no impact on doubling - policy.EndOfBlock(uint64(i*10+j)+1, time.Now(), time.Minute*30) - } - } -} - -// reject vote requests from banned parties for as long as they are banned. -func testPreRejectBannedParty(t *testing.T) { - policy := getVotingSpamPolicy(map[string]*num.Uint{"party1": sufficientTokens2ForVoting}) - - // epoch 0 started party1 has enough balance - policy.Reset(types.Epoch{Seq: 0}) - - // trigger banning of party1 by causing it to post reject 3/6 of the requests to vote - tx := &testTx{party: "party1", proposal: "proposal1"} - for i := 0; i < 6; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrTooManyVotes, err) - } - - // end the block for banning to take place - tm, _ := time.Parse("2006-01-02 15:04", "2022-12-12 04:35") - policy.EndOfBlock(1, tm, time.Minute*30) - - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - print(tm.String()) - require.Equal(t, "party is banned from submitting votes until the earlier between 2022-12-12 05:05:00 +0000 UTC and the beginning of the next epoch", err.Error()) - - // advance 30 minutes - verify still banned until 30 minutes pass - for i := 0; i < 3; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, "party is banned from submitting votes until the earlier between 2022-12-12 05:05:00 +0000 UTC and the beginning of the next epoch", err.Error()) - adjustment := 10 * time.Minute * time.Duration(i+1) - policy.EndOfBlock(1, tm.Add(adjustment), time.Minute*30) - } - // should be released from ban now but should still fail as they have already voted 3 times - accept, err = policy.PreBlockAccept(tx) - require.Equal(t, "party has already voted the maximum number of times per proposal per epoch", err.Error()) - require.Equal(t, false, accept) + require.Equal(t, spam.ErrInsufficientTokensForVoting, policy.PreBlockAccept(tx)) } func testPreRejectTooManyVotesPerProposal(t *testing.T) { @@ -308,45 +84,40 @@ func testPreRejectTooManyVotesPerProposal(t *testing.T) { tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} // pre accepted for i := 0; i < 5; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) + require.NoError(t, policy.PreBlockAccept(tx)) + } + + // prepare block check + for i := 0; i < 5; i++ { + if i < 3 { + require.NoError(t, policy.CheckBlockTx(tx)) + } else { + require.Error(t, policy.CheckBlockTx(tx)) + } } - // post 3 accepted 1 rejected + policy.RollbackProposal() + for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) + policy.UpdateTx(tx) } } - // end block 0 - policy.EndOfBlock(1, time.Now(), time.Minute*30) - // try to submit for i := 0; i < 2; i++ { tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} - // pre rejected - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrTooManyVotes, err) + require.Equal(t, spam.ErrTooManyVotes.Error(), policy.PreBlockAccept(tx).Error()) } tx := &testTx{party: "party1", proposal: "proposal3"} // pre accepted - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) + require.NoError(t, policy.PreBlockAccept(tx)) // advance to next epoch to reset limits policy.Reset(types.Epoch{Seq: 0}) for i := 0; i < 3; i++ { tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} - // pre rejected - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) + require.NoError(t, policy.PreBlockAccept(tx)) } } @@ -360,9 +131,7 @@ func testPreAccept(t *testing.T) { tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} // pre accepted for i := 0; i < 5; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) + require.Nil(t, policy.PreBlockAccept(tx)) } } } @@ -370,102 +139,87 @@ func testPreAccept(t *testing.T) { func testPostAccept(t *testing.T) { policy := getVotingSpamPolicy(map[string]*num.Uint{"party1": sufficientTokensForVoting}) policy.Reset(types.Epoch{Seq: 0}) - for i := 0; i < 2; i++ { - tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} - // pre accepted - for i := 0; i < 3; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - } - for i := 0; i < 2; i++ { - tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} - // post accepted - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - } -} + policy.Reset(types.Epoch{Seq: 0}) -func testPostRejectTooManyVotes(t *testing.T) { - policy := getVotingSpamPolicy(map[string]*num.Uint{"party1": sufficientTokensForVoting}) + tx1 := &testTx{party: "party1", proposal: "proposal1"} + tx2 := &testTx{party: "party1", proposal: "proposal1"} + tx3 := &testTx{party: "party1", proposal: "proposal1"} + tx4 := &testTx{party: "party1", proposal: "proposal1"} + + require.NoError(t, policy.CheckBlockTx(tx1)) + require.NoError(t, policy.CheckBlockTx(tx2)) + require.NoError(t, policy.CheckBlockTx(tx3)) + require.Error(t, policy.CheckBlockTx(tx4)) + + policy.RollbackProposal() + + // as the state has nothing, expect pre block accept of all 4 txs + require.NoError(t, policy.PreBlockAccept(tx1)) + require.NoError(t, policy.PreBlockAccept(tx2)) + require.NoError(t, policy.PreBlockAccept(tx3)) + require.NoError(t, policy.PreBlockAccept(tx4)) + + // now a block is made with the first 3 txs + require.NoError(t, policy.CheckBlockTx(tx1)) + require.NoError(t, policy.CheckBlockTx(tx2)) + require.NoError(t, policy.CheckBlockTx(tx3)) + + // and the block is confirmed + policy.RollbackProposal() + policy.UpdateTx(tx1) + policy.UpdateTx(tx2) + policy.UpdateTx(tx3) + + stats := policy.GetVoteSpamStats(tx1.party).GetStatistics()[0] + require.Equal(t, uint64(3), stats.CountForEpoch) + + // now that there's been 3 proposals already, the 4th should be pre-rejected + require.Error(t, policy.PreBlockAccept(tx4)) + + // start a new epoch to reset counters policy.Reset(types.Epoch{Seq: 0}) - for i := 0; i < 2; i++ { - tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} - // pre accepted - for i := 0; i < 5; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } - } - for i := 0; i < 2; i++ { - tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} - // post accepted - for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - } + // check that the new proposal is pre-block accepted + require.NoError(t, policy.PreBlockAccept(tx4)) - // post rejected - for i := 0; i < 2; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrTooManyVotes, err) - } - } + require.Equal(t, 0, len(policy.GetVoteSpamStats(tx1.party).GetStatistics())) } func testCountersUpdated(t *testing.T) { policy := getVotingSpamPolicy(map[string]*num.Uint{"party1": sufficientTokensForVoting}) policy.Reset(types.Epoch{Seq: 0}) + for i := 0; i < 2; i++ { tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} - // pre accepted + // post accepted for i := 0; i < 2; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) + require.NoError(t, policy.CheckBlockTx(tx)) } } - + policy.RollbackProposal() for i := 0; i < 2; i++ { tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} // post accepted for i := 0; i < 2; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) + policy.UpdateTx(tx) } } - policy.EndOfBlock(1, time.Now(), time.Minute*30) for i := 0; i < 2; i++ { tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} // pre accepted for i := 0; i < 2; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) + require.NoError(t, policy.PreBlockAccept(tx)) } } for i := 0; i < 2; i++ { tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} // post accepted - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) + require.NoError(t, policy.CheckBlockTx(tx)) // post rejected - accept, err = policy.PostBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrTooManyVotes, err) + require.Error(t, spam.ErrTooManyVotes, policy.CheckBlockTx(tx)) } } @@ -477,9 +231,7 @@ func testReset(t *testing.T) { tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} // pre accepted for i := 0; i < 6; i++ { - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) + require.NoError(t, policy.PreBlockAccept(tx)) } } @@ -487,37 +239,27 @@ func testReset(t *testing.T) { tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} // post accepted for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) + require.NoError(t, policy.CheckBlockTx(tx)) } for i := 0; i < 3; i++ { - accept, err := policy.PostBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrTooManyVotes, err) + require.Equal(t, spam.ErrTooManyVotes, policy.CheckBlockTx(tx)) + } + } + policy.RollbackProposal() + for i := 0; i < 2; i++ { + tx := &testTx{party: "party1", proposal: "proposal" + strconv.Itoa(i+1)} + // post accepted + for i := 0; i < 3; i++ { + policy.UpdateTx(tx) } } - // trigger ban of party1 for 30 minutes - tm, _ := time.Parse("2006-01-02 15:04", "2022-12-12 04:35") - policy.EndOfBlock(1, tm, time.Minute*30) - - policy.EndOfBlock(1, tm.Add(10*time.Minute), time.Minute*30) tx := &testTx{party: "party1", proposal: "proposal1"} - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, "party is banned from submitting votes until the earlier between 2022-12-12 05:05:00 +0000 UTC and the beginning of the next epoch", err.Error()) - - policy.EndOfBlock(1, tm.Add(20*time.Minute), time.Minute*30) - accept, err = policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, "party is banned from submitting votes until the earlier between 2022-12-12 05:05:00 +0000 UTC and the beginning of the next epoch", err.Error()) - - policy.EndOfBlock(1, tm.Add(30*time.Minute), time.Minute*30) - accept, err = policy.PostBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, "party has already voted the maximum number of times per proposal per epoch", err.Error()) + require.Error(t, policy.PreBlockAccept(tx)) + + policy.Reset(types.Epoch{Seq: 1}) + require.NoError(t, policy.PreBlockAccept(tx)) } func testVoteEndBlockReset(t *testing.T) { @@ -529,20 +271,14 @@ func testVoteEndBlockReset(t *testing.T) { var i uint64 for ; i < 3; i++ { tx := &testTx{party: "party1", proposal: "proposal1"} - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - - accept, err = policy.PostBlockAccept(tx) - require.Equal(t, true, accept) - require.Nil(t, err) - policy.EndOfBlock(i, time.Now(), time.Minute*30) + require.NoError(t, policy.PreBlockAccept(tx)) + require.NoError(t, policy.CheckBlockTx(tx)) + policy.RollbackProposal() + policy.UpdateTx(tx) } tx := &testTx{party: "party1", proposal: "proposal1"} - accept, err := policy.PreBlockAccept(tx) - require.Equal(t, false, accept) - require.Equal(t, spam.ErrTooManyVotes, err) + require.Error(t, spam.ErrTooManyVotes, policy.PreBlockAccept(tx)) bytes1, err := policy.Serialise() require.Nil(t, err) @@ -553,9 +289,19 @@ func testVoteEndBlockReset(t *testing.T) { bytes2, err := policy.Serialise() require.Nil(t, err) require.True(t, bytes.Equal(bytes1, bytes2)) - policy.EndOfBlock(3, time.Now(), time.Minute*30) + tx2 := &testTx{party: "party1", proposal: "proposal2"} + require.NoError(t, policy.CheckBlockTx(tx2)) + policy.RollbackProposal() + + // verify that changes made during prepare proposal are properly rolled back and not affecting the state bytes3, err := policy.Serialise() - require.Nil(t, err) - require.False(t, bytes.Equal(bytes3, bytes2)) + require.NoError(t, err) + require.True(t, bytes.Equal(bytes3, bytes2)) + + // now the block has been processed, verify that the state has changed + policy.UpdateTx(tx2) + bytes4, err := policy.Serialise() + require.NoError(t, err) + require.False(t, bytes.Equal(bytes4, bytes3)) } diff --git a/core/staking/accounting_snapshot_test.go b/core/staking/accounting_snapshot_test.go index b1135f3c1a..2290131409 100644 --- a/core/staking/accounting_snapshot_test.go +++ b/core/staking/accounting_snapshot_test.go @@ -23,9 +23,9 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/proto" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "code.vegaprotocol.io/vega/libs/proto" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/core/staking/checkpoint.go b/core/staking/checkpoint.go index 95e2232387..c1e68ddb8d 100644 --- a/core/staking/checkpoint.go +++ b/core/staking/checkpoint.go @@ -20,13 +20,11 @@ import ( "sort" "code.vegaprotocol.io/vega/core/events" - checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" - pbevents "code.vegaprotocol.io/vega/protos/vega/events/v1" - "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/logging" - "code.vegaprotocol.io/vega/libs/proto" + "code.vegaprotocol.io/vega/logging" + checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" + pbevents "code.vegaprotocol.io/vega/protos/vega/events/v1" ) type Checkpoint struct { diff --git a/core/staking/checkpoint_test.go b/core/staking/checkpoint_test.go index 08d5d353ee..373909f6c9 100644 --- a/core/staking/checkpoint_test.go +++ b/core/staking/checkpoint_test.go @@ -17,7 +17,6 @@ package staking_test import ( "context" - _ "embed" "testing" "code.vegaprotocol.io/vega/core/staking" @@ -31,6 +30,8 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + _ "embed" ) //go:embed testcp/20220627071230-316971-11a4d958cb7e0448f0cea0b7c617a1e4535e90c0d0f18fd86e961c97147757d7.cp diff --git a/core/staking/stake_verifier_snapshot.go b/core/staking/stake_verifier_snapshot.go index d299f1802e..7db6290ff6 100644 --- a/core/staking/stake_verifier_snapshot.go +++ b/core/staking/stake_verifier_snapshot.go @@ -20,9 +20,8 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/logging" - "code.vegaprotocol.io/vega/libs/proto" + "code.vegaprotocol.io/vega/logging" ) var ( diff --git a/core/staking/stake_verifier_snapshot_test.go b/core/staking/stake_verifier_snapshot_test.go index 5563efd6f0..763eada65d 100644 --- a/core/staking/stake_verifier_snapshot_test.go +++ b/core/staking/stake_verifier_snapshot_test.go @@ -23,9 +23,9 @@ import ( "code.vegaprotocol.io/vega/core/staking" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/proto" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "code.vegaprotocol.io/vega/libs/proto" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/statevar/snapshot.go b/core/statevar/snapshot.go index ee67943858..476636568d 100644 --- a/core/statevar/snapshot.go +++ b/core/statevar/snapshot.go @@ -23,10 +23,9 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/core/types/statevar" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - - "code.vegaprotocol.io/vega/libs/proto" ) var ( diff --git a/core/statevar/snapshot_test.go b/core/statevar/snapshot_test.go index ae16f60458..d1b1dd74dd 100644 --- a/core/statevar/snapshot_test.go +++ b/core/statevar/snapshot_test.go @@ -24,6 +24,7 @@ import ( types "code.vegaprotocol.io/vega/core/types/statevar" "code.vegaprotocol.io/vega/libs/proto" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/stretchr/testify/require" ) diff --git a/core/statevar/state_var_test.go b/core/statevar/state_var_test.go index 301befe189..46b42f0327 100644 --- a/core/statevar/state_var_test.go +++ b/core/statevar/state_var_test.go @@ -29,6 +29,7 @@ import ( types "code.vegaprotocol.io/vega/core/types/statevar" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/core/stats/stats.go b/core/stats/stats.go index e524c507e3..b0bac0045f 100644 --- a/core/stats/stats.go +++ b/core/stats/stats.go @@ -23,7 +23,8 @@ import ( "code.vegaprotocol.io/vega/logging" proto "code.vegaprotocol.io/vega/protos/vega" "code.vegaprotocol.io/vega/version" - tmversion "github.com/tendermint/tendermint/version" + + tmversion "github.com/cometbft/cometbft/version" ) // Stats ties together all other package level application stats types. diff --git a/core/subscribers/market_depth_test.go b/core/subscribers/market_depth_test.go index e5335e9082..0521843af9 100644 --- a/core/subscribers/market_depth_test.go +++ b/core/subscribers/market_depth_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/subscribers" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" ) diff --git a/core/teams/engine.go b/core/teams/engine.go index 9be12f9daa..53d4ee34d6 100644 --- a/core/teams/engine.go +++ b/core/teams/engine.go @@ -19,6 +19,7 @@ import ( "context" "errors" "sort" + "strings" "time" "code.vegaprotocol.io/vega/core/events" @@ -28,6 +29,7 @@ import ( vegapb "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "golang.org/x/exp/slices" ) @@ -95,6 +97,13 @@ func (e *Engine) CreateTeam(ctx context.Context, referrer types.PartyID, determi Closed: params.Closed, } + if len(params.AllowList) > 0 { + teamToAdd.AllowList = make([]types.PartyID, 0, len(params.AllowList)) + for _, key := range params.AllowList { + teamToAdd.AllowList = append(teamToAdd.AllowList, types.PartyID(key)) + } + } + e.teams[deterministicTeamID] = teamToAdd e.allTeamMembers[referrer] = deterministicTeamID @@ -133,12 +142,19 @@ func (e *Engine) UpdateTeam(ctx context.Context, referrer types.PartyID, teamID teamsToUpdate.Closed = ptr.UnBox(params.Closed) } + if len(params.AllowList) > 0 { + teamsToUpdate.AllowList = make([]types.PartyID, 0, len(params.AllowList)) + for _, key := range params.AllowList { + teamsToUpdate.AllowList = append(teamsToUpdate.AllowList, types.PartyID(key)) + } + } + e.notifyTeamUpdated(ctx, teamsToUpdate) return nil } -func (e *Engine) JoinTeam(ctx context.Context, referee types.PartyID, params *commandspb.ApplyReferralCode) error { +func (e *Engine) JoinTeam(ctx context.Context, referee types.PartyID, params *commandspb.JoinTeam) error { for _, team := range e.teams { if team.Referrer.PartyID == referee { return ErrReferrerCannotJoinAnotherTeam @@ -152,8 +168,8 @@ func (e *Engine) JoinTeam(ctx context.Context, referee types.PartyID, params *co return ErrNoTeamMatchesID(teamID) } - if teamToJoin.Closed { - return ErrTeamIsClosed(teamID) + if err := teamToJoin.EnsureCanJoin(referee); err != nil { + return err } teamJoined, alreadyMember := e.allTeamMembers[referee] @@ -248,8 +264,8 @@ func (e *Engine) moveMembers(ctx context.Context, startEpochTime time.Time, epoc for partyID := range e.teamSwitches { sortedPartyID = append(sortedPartyID, partyID) } - slices.SortStableFunc(sortedPartyID, func(a, b types.PartyID) bool { - return a < b + slices.SortStableFunc(sortedPartyID, func(a, b types.PartyID) int { + return strings.Compare(string(a), string(b)) }) for _, partyID := range sortedPartyID { @@ -321,7 +337,7 @@ func (e *Engine) loadTeamsFromSnapshot(teamsSnapshot []*snapshotpb.Team) { }) } - e.teams[teamID] = &types.Team{ + t := &types.Team{ ID: teamID, Referrer: &types.Membership{ PartyID: referrerID, @@ -335,6 +351,15 @@ func (e *Engine) loadTeamsFromSnapshot(teamsSnapshot []*snapshotpb.Team) { CreatedAt: time.Unix(0, teamSnapshot.CreatedAt), Closed: teamSnapshot.Closed, } + + if len(teamSnapshot.AllowList) > 0 { + t.AllowList = make([]types.PartyID, 0, len(teamSnapshot.AllowList)) + for _, partyIDStr := range teamSnapshot.AllowList { + t.AllowList = append(t.AllowList, types.PartyID(partyIDStr)) + } + } + + e.teams[teamID] = t } } @@ -356,6 +381,8 @@ func NewEngine(broker Broker, timeSvc TimeService) *Engine { teams: map[types.TeamID]*types.Team{}, allTeamMembers: map[types.PartyID]types.TeamID{}, teamSwitches: map[types.PartyID]teamSwitch{}, + + minStakedVegaTokens: num.UintZero(), } return engine diff --git a/core/teams/engine_helpers_for_test.go b/core/teams/engine_helpers_for_test.go index 2bb11361fd..b0df688ccf 100644 --- a/core/teams/engine_helpers_for_test.go +++ b/core/teams/engine_helpers_for_test.go @@ -16,7 +16,10 @@ package teams import ( + "strings" + "code.vegaprotocol.io/vega/core/types" + "golang.org/x/exp/slices" ) @@ -33,7 +36,7 @@ func (e *Engine) ListTeams() []types.Team { } func SortByTeamID(teamsToSort []types.Team) { - slices.SortStableFunc(teamsToSort, func(a, b types.Team) bool { - return a.ID < b.ID + slices.SortStableFunc(teamsToSort, func(a, b types.Team) int { + return strings.Compare(string(a.ID), string(b.ID)) }) } diff --git a/core/teams/engine_test.go b/core/teams/engine_test.go index 52879165fd..90f9aedf4b 100644 --- a/core/teams/engine_test.go +++ b/core/teams/engine_test.go @@ -23,6 +23,8 @@ import ( "code.vegaprotocol.io/vega/core/types" vgrand "code.vegaprotocol.io/vega/libs/rand" vgtest "code.vegaprotocol.io/vega/libs/test" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -92,10 +94,13 @@ func testAdministrateTeamSucceeds(t *testing.T) { JoinedAt: team1CreationDate, StartedAtEpoch: te.currentEpoch, }, + Referees: nil, Name: name, TeamURL: teamURL, AvatarURL: avatarURL, CreatedAt: team1CreationDate, + Closed: false, + AllowList: nil, }, }, te.engine.ListTeams()) @@ -232,7 +237,7 @@ func testAdministrateTeamSucceeds(t *testing.T) { expectTeamUpdatedEvent(t, te) - require.NoError(t, te.engine.UpdateTeam(ctx, referrer1, teamID1, updateTeamCmd(t, updatedName, updatedTeamURL, updatedAvatarURL, false))) + require.NoError(t, te.engine.UpdateTeam(ctx, referrer1, teamID1, updateTeamCmd(t, updatedName, updatedTeamURL, updatedAvatarURL, false, nil))) assertEqualTeams(t, []types.Team{ { @@ -273,13 +278,13 @@ func testAdministrateTeamSucceeds(t *testing.T) { unknownTeamID := types.NewTeamID() require.EqualError(t, - te.engine.UpdateTeam(ctx, referrer1, unknownTeamID, updateTeamCmd(t, updatedName, updatedTeamURL, updatedAvatarURL, false)), + te.engine.UpdateTeam(ctx, referrer1, unknownTeamID, updateTeamCmd(t, updatedName, updatedTeamURL, updatedAvatarURL, false, nil)), teams.ErrNoTeamMatchesID(unknownTeamID).Error(), ) require.ErrorIs(t, teams.ErrOnlyReferrerCanUpdateTeam, - te.engine.UpdateTeam(ctx, referrer2, teamID1, updateTeamCmd(t, updatedName, updatedTeamURL, updatedAvatarURL, false)), + te.engine.UpdateTeam(ctx, referrer2, teamID1, updateTeamCmd(t, updatedName, updatedTeamURL, updatedAvatarURL, false, nil)), ) } @@ -450,30 +455,33 @@ func testJoiningTeamSucceeds(t *testing.T) { expectTeamUpdatedEvent(t, te) - require.NoError(t, te.engine.UpdateTeam(ctx, referrer2, teamID2, updateTeamCmd(t, "", "", "", true))) + // Closing the team. + require.NoError(t, te.engine.UpdateTeam(ctx, referrer2, teamID2, updateTeamCmd(t, "", "", "", true, nil))) - // referee2 just re-joins team 2. + // referee2 try to re-join team 2, but joining a closed team without allow-list is disallow. require.Error(t, te.engine.JoinTeam(ctx, referee2, joinTeamCmd(t, teamID2))) - require.True(t, te.engine.IsTeamMember(referee2)) - // This shows the referee2 moved from team 1 to team 2. + // Simulating moving to next epoch. + nextEpoch(t, ctx, te, referee2JoiningDate3) + + // This shows the referee2 stayed in team 1. assertEqualTeams(t, []types.Team{ { ID: teamID1, Referrer: &types.Membership{ PartyID: referrer1, JoinedAt: team1CreationDate, - StartedAtEpoch: te.currentEpoch - 2, + StartedAtEpoch: te.currentEpoch - 3, }, Referees: []*types.Membership{ { PartyID: referee1, JoinedAt: referee1JoiningDate, - StartedAtEpoch: te.currentEpoch - 2, + StartedAtEpoch: te.currentEpoch - 3, }, { PartyID: referee2, JoinedAt: referee2JoiningDate3, - StartedAtEpoch: te.currentEpoch, + StartedAtEpoch: te.currentEpoch - 1, }, }, Name: team1Name, @@ -483,7 +491,7 @@ func testJoiningTeamSucceeds(t *testing.T) { Referrer: &types.Membership{ PartyID: referrer2, JoinedAt: team2CreationDate, - StartedAtEpoch: te.currentEpoch - 2, + StartedAtEpoch: te.currentEpoch - 3, }, Referees: []*types.Membership{}, Name: team2Name, @@ -491,4 +499,173 @@ func testJoiningTeamSucceeds(t *testing.T) { Closed: true, }, }, te.engine.ListTeams()) + + // Allow referee2 to join the closed team. + expectTeamUpdatedEvent(t, te) + require.NoError(t, te.engine.UpdateTeam(ctx, referrer2, teamID2, updateTeamCmd(t, "", "", "", true, []string{referee2.String()}))) + + // referee2 can re-join team 2, because that party is specified in allow-list. + require.NoError(t, te.engine.JoinTeam(ctx, referee2, joinTeamCmd(t, teamID2))) + + // Simulating moving to next epoch. + expectRefereeSwitchedTeamEvent(t, te) + nextEpoch(t, ctx, te, referee2JoiningDate3) + + // This shows the referee2 moved to team 2. + assertEqualTeams(t, []types.Team{ + { + ID: teamID1, + Referrer: &types.Membership{ + PartyID: referrer1, + JoinedAt: team1CreationDate, + StartedAtEpoch: te.currentEpoch - 4, + }, + Referees: []*types.Membership{ + { + PartyID: referee1, + JoinedAt: referee1JoiningDate, + StartedAtEpoch: te.currentEpoch - 4, + }, + }, + Name: team1Name, + CreatedAt: team1CreationDate, + }, { + ID: teamID2, + Referrer: &types.Membership{ + PartyID: referrer2, + JoinedAt: team2CreationDate, + StartedAtEpoch: te.currentEpoch - 4, + }, + Referees: []*types.Membership{ + { + PartyID: referee2, + JoinedAt: referee2JoiningDate3, + StartedAtEpoch: te.currentEpoch, + }, + }, + Name: team2Name, + CreatedAt: team2CreationDate, + Closed: true, + AllowList: []types.PartyID{referee2}, + }, + }, te.engine.ListTeams()) + + // referee1 cannot join team 2, because that party is not specified in allow-list. + require.Error(t, te.engine.JoinTeam(ctx, referee1, joinTeamCmd(t, teamID2))) + + // Simulating moving to next epoch. + nextEpoch(t, ctx, te, referee2JoiningDate3) + + // This shows the referee1 did not moved to team 2. + assertEqualTeams(t, []types.Team{ + { + ID: teamID1, + Referrer: &types.Membership{ + PartyID: referrer1, + JoinedAt: team1CreationDate, + StartedAtEpoch: te.currentEpoch - 5, + }, + Referees: []*types.Membership{ + { + PartyID: referee1, + JoinedAt: referee1JoiningDate, + StartedAtEpoch: te.currentEpoch - 5, + }, + }, + Name: team1Name, + CreatedAt: team1CreationDate, + }, { + ID: teamID2, + Referrer: &types.Membership{ + PartyID: referrer2, + JoinedAt: team2CreationDate, + StartedAtEpoch: te.currentEpoch - 5, + }, + Referees: []*types.Membership{ + { + PartyID: referee2, + JoinedAt: referee2JoiningDate3, + StartedAtEpoch: te.currentEpoch - 1, + }, + }, + Name: team2Name, + CreatedAt: team2CreationDate, + Closed: true, + AllowList: []types.PartyID{referee2}, + }, + }, te.engine.ListTeams()) + + referee4 := newPartyID(t) + + team3CreationDate := time.Now() + te.timeService.EXPECT().GetTimeNow().Return(team3CreationDate).Times(1) + team3Name := vgrand.RandomStr(5) + teamID3, referrer3 := newTeamWithCmd(t, ctx, te, &commandspb.CreateReferralSet_Team{ + Name: team3Name, + Closed: true, + AllowList: []string{referee4.String()}, + }) + + expectRefereeJoinedTeamEvent(t, te) + referee4JoiningDate := time.Now() + te.timeService.EXPECT().GetTimeNow().Return(referee4JoiningDate).Times(1) + require.NoError(t, te.engine.JoinTeam(ctx, referee4, joinTeamCmd(t, teamID3))) + require.True(t, te.engine.IsTeamMember(referee4)) + + // This shows the referee1 did not moved to team 2. + assertEqualTeams(t, []types.Team{ + { + ID: teamID1, + Referrer: &types.Membership{ + PartyID: referrer1, + JoinedAt: team1CreationDate, + StartedAtEpoch: te.currentEpoch - 5, + }, + Referees: []*types.Membership{ + { + PartyID: referee1, + JoinedAt: referee1JoiningDate, + StartedAtEpoch: te.currentEpoch - 5, + }, + }, + Name: team1Name, + CreatedAt: team1CreationDate, + }, { + ID: teamID2, + Referrer: &types.Membership{ + PartyID: referrer2, + JoinedAt: team2CreationDate, + StartedAtEpoch: te.currentEpoch - 5, + }, + Referees: []*types.Membership{ + { + PartyID: referee2, + JoinedAt: referee2JoiningDate3, + StartedAtEpoch: te.currentEpoch - 1, + }, + }, + Name: team2Name, + CreatedAt: team2CreationDate, + Closed: true, + AllowList: []types.PartyID{referee2}, + }, { + ID: teamID3, + Referrer: &types.Membership{ + PartyID: referrer3, + JoinedAt: team3CreationDate, + StartedAtEpoch: te.currentEpoch, + }, + Referees: []*types.Membership{ + { + PartyID: referee4, + JoinedAt: referee4JoiningDate, + StartedAtEpoch: te.currentEpoch, + }, + }, + Name: team3Name, + CreatedAt: team3CreationDate, + Closed: true, + AllowList: []types.PartyID{referee4}, + }, + }, te.engine.ListTeams()) } diff --git a/core/teams/errors.go b/core/teams/errors.go index a561221d0e..abbdb5ea3d 100644 --- a/core/teams/errors.go +++ b/core/teams/errors.go @@ -33,10 +33,6 @@ func ErrNoTeamMatchesID(id types.TeamID) error { return fmt.Errorf("no team matches ID %q", id) } -func ErrTeamIsClosed(id types.TeamID) error { - return fmt.Errorf("team ID %q is closed", id) -} - func ErrPartyAlreadyBelongsToTeam(referrer types.PartyID) error { return fmt.Errorf("the party %q already belongs to a team", referrer) } diff --git a/core/teams/helpers_for_test.go b/core/teams/helpers_for_test.go index 236338a1f5..b148fab0cb 100644 --- a/core/teams/helpers_for_test.go +++ b/core/teams/helpers_for_test.go @@ -35,6 +35,7 @@ import ( "code.vegaprotocol.io/vega/paths" vegapb "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -58,7 +59,7 @@ func assertEqualTeams(t *testing.T, expected, actual []types.Team) { } for i := 0; i < len(expected); i++ { - t.Run(fmt.Sprintf("team %d", i), func(tt *testing.T) { + t.Run(fmt.Sprintf("team #%d", i), func(tt *testing.T) { expectedTeam := expected[i] actualTeam := actual[i] assert.Equal(tt, expectedTeam.ID, actualTeam.ID) @@ -66,10 +67,17 @@ func assertEqualTeams(t *testing.T, expected, actual []types.Team) { assert.Equal(tt, expectedTeam.TeamURL, actualTeam.TeamURL) assert.Equal(tt, expectedTeam.AvatarURL, actualTeam.AvatarURL) assert.Equal(tt, expectedTeam.CreatedAt.UnixNano(), actualTeam.CreatedAt.UnixNano()) + assert.Equal(tt, expectedTeam.Closed, actualTeam.Closed) + assert.Equal(tt, expectedTeam.AllowList, actualTeam.AllowList) assertEqualMembership(tt, expectedTeam.Referrer, actualTeam.Referrer) + if len(expectedTeam.Referees) != len(actualTeam.Referees) { + assert.Fail(tt, fmt.Sprintf("number of referees in expected and actual results mismatch, expecting %d but got %d", len(expectedTeam.Referees), len(actualTeam.Referees))) + return + } + for j := 0; j < len(expectedTeam.Referees); j++ { - tt.Run(fmt.Sprintf("referee %d", j), func(ttt *testing.T) { + tt.Run(fmt.Sprintf("referee #%d", j), func(ttt *testing.T) { assertEqualMembership(ttt, expectedTeam.Referees[j], actualTeam.Referees[j]) }) } @@ -207,6 +215,22 @@ func newTeam(t *testing.T, ctx context.Context, te *testEngine) (types.TeamID, t return teamID, referrer, teamName } +func newTeamWithCmd(t *testing.T, ctx context.Context, te *testEngine, cmd *commandspb.CreateReferralSet_Team) (types.TeamID, types.PartyID) { + t.Helper() + + teamID := newTeamID(t) + referrer := newPartyID(t) + + expectTeamCreatedEvent(t, te) + + err := te.engine.CreateTeam(ctx, referrer, teamID, cmd) + require.NoError(t, err) + require.NotEmpty(t, teamID) + require.True(t, te.engine.IsTeamMember(referrer)) + + return teamID, referrer +} + func createTeamCmd(t *testing.T, name, teamURL, avatarURL string) *commandspb.CreateReferralSet_Team { t.Helper() @@ -217,7 +241,7 @@ func createTeamCmd(t *testing.T, name, teamURL, avatarURL string) *commandspb.Cr } } -func updateTeamCmd(t *testing.T, name, teamURL, avatarURL string, closed bool) *commandspb.UpdateReferralSet_Team { +func updateTeamCmd(t *testing.T, name, teamURL, avatarURL string, closed bool, allowList []string) *commandspb.UpdateReferralSet_Team { t.Helper() return &commandspb.UpdateReferralSet_Team{ @@ -225,13 +249,14 @@ func updateTeamCmd(t *testing.T, name, teamURL, avatarURL string, closed bool) * TeamUrl: ptr.From(teamURL), AvatarUrl: ptr.From(avatarURL), Closed: ptr.From(closed), + AllowList: allowList, } } -func joinTeamCmd(t *testing.T, teamID types.TeamID) *commandspb.ApplyReferralCode { +func joinTeamCmd(t *testing.T, teamID types.TeamID) *commandspb.JoinTeam { t.Helper() - return &commandspb.ApplyReferralCode{ + return &commandspb.JoinTeam{ Id: string(teamID), } } diff --git a/core/teams/snapshot.go b/core/teams/snapshot.go index 4ef3ecf56b..847161678b 100644 --- a/core/teams/snapshot.go +++ b/core/teams/snapshot.go @@ -18,10 +18,12 @@ package teams import ( "context" "fmt" + "strings" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/proto" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "golang.org/x/exp/slices" ) @@ -118,11 +120,19 @@ func (e *SnapshottedEngine) serialiseTeams() ([]byte, error) { CreatedAt: team.CreatedAt.UnixNano(), Closed: team.Closed, } + + if len(team.AllowList) > 0 { + teamSnapshot.AllowList = make([]string, 0, len(team.AllowList)) + for _, partyID := range team.AllowList { + teamSnapshot.AllowList = append(teamSnapshot.AllowList, partyID.String()) + } + } + teamsSnapshot = append(teamsSnapshot, teamSnapshot) } - slices.SortStableFunc(teamsSnapshot, func(a, b *snapshotpb.Team) bool { - return a.Id < b.Id + slices.SortStableFunc(teamsSnapshot, func(a, b *snapshotpb.Team) int { + return strings.Compare(a.Id, b.Id) }) payload := &snapshotpb.Payload{ @@ -154,8 +164,8 @@ func (e *SnapshottedEngine) serialiseTeamSwitches() ([]byte, error) { teamSwitchesSnapshot = append(teamSwitchesSnapshot, teamSwitchSnapshot) } - slices.SortStableFunc(teamSwitchesSnapshot, func(a, b *snapshotpb.TeamSwitch) bool { - return a.PartyId < b.PartyId + slices.SortStableFunc(teamSwitchesSnapshot, func(a, b *snapshotpb.TeamSwitch) int { + return strings.Compare(a.PartyId, b.PartyId) }) payload := &snapshotpb.Payload{ diff --git a/core/teams/snapshot_test.go b/core/teams/snapshot_test.go index 0a229a426e..1d30a4e740 100644 --- a/core/teams/snapshot_test.go +++ b/core/teams/snapshot_test.go @@ -23,6 +23,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" vgtest "code.vegaprotocol.io/vega/libs/test" "code.vegaprotocol.io/vega/paths" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -81,6 +82,12 @@ func TestTakingAndRestoringSnapshotSucceeds(t *testing.T) { require.NoError(t, te1.engine.JoinTeam(ctx, referee2, joinTeamCmd(t, teamID2))) require.True(t, te1.engine.IsTeamMember(referee2)) + referee3 := newPartyID(t) + + // Closing the team2 to check the allow list is properly snapshot. + expectTeamUpdatedEvent(t, te1) + require.NoError(t, te1.engine.UpdateTeam(ctx, referrer2, teamID2, updateTeamCmd(t, name2, teamURL2, avatarURL2, true, []string{referee3.String()}))) + // Take a snapshot. hash1, err := snapshotEngine1.SnapshotNow(ctx) require.NoError(t, err) @@ -89,6 +96,11 @@ func TestTakingAndRestoringSnapshotSucceeds(t *testing.T) { referee2JoiningDate2 := time.Now() nextEpoch(t, ctx, te1, referee2JoiningDate2) + expectRefereeJoinedTeamEvent(t, te1) + referee3JoiningDate := time.Now() + te1.timeService.EXPECT().GetTimeNow().Return(referee3JoiningDate).Times(1) + require.NoError(t, te1.engine.JoinTeam(ctx, referee3, joinTeamCmd(t, teamID2))) + assertEqualTeams(t, []types.Team{ { ID: teamID1, @@ -115,17 +127,24 @@ func TestTakingAndRestoringSnapshotSucceeds(t *testing.T) { JoinedAt: team2CreationDate, StartedAtEpoch: te1.currentEpoch - 1, }, - Name: name2, - TeamURL: teamURL2, - AvatarURL: avatarURL2, Referees: []*types.Membership{ { PartyID: referee2, JoinedAt: referee2JoiningDate2, - StartedAtEpoch: te1.currentEpoch - 0, + StartedAtEpoch: te1.currentEpoch, + }, + { + PartyID: referee3, + JoinedAt: referee3JoiningDate, + StartedAtEpoch: te1.currentEpoch, }, }, + Name: name2, + TeamURL: teamURL2, + AvatarURL: avatarURL2, CreatedAt: team2CreationDate, + Closed: true, + AllowList: []types.PartyID{referee3}, }, }, te1.engine.ListTeams()) @@ -155,6 +174,10 @@ func TestTakingAndRestoringSnapshotSucceeds(t *testing.T) { expectRefereeSwitchedTeamEvent(t, te2) nextEpoch(t, ctx, te2, referee2JoiningDate2) + expectRefereeJoinedTeamEvent(t, te2) + te2.timeService.EXPECT().GetTimeNow().Return(referee3JoiningDate).Times(1) + require.NoError(t, te2.engine.JoinTeam(ctx, referee3, joinTeamCmd(t, teamID2))) + assertEqualTeams(t, []types.Team{ { ID: teamID1, @@ -188,10 +211,17 @@ func TestTakingAndRestoringSnapshotSucceeds(t *testing.T) { { PartyID: referee2, JoinedAt: referee2JoiningDate2, - StartedAtEpoch: te2.currentEpoch - 0, + StartedAtEpoch: te2.currentEpoch, + }, + { + PartyID: referee3, + JoinedAt: referee3JoiningDate, + StartedAtEpoch: te2.currentEpoch, }, }, CreatedAt: team2CreationDate, + Closed: true, + AllowList: []types.PartyID{referee3}, }, }, te2.engine.ListTeams()) diff --git a/core/tendermint/config.go b/core/tendermint/config.go index decbe9cfd4..308e4b1482 100644 --- a/core/tendermint/config.go +++ b/core/tendermint/config.go @@ -22,12 +22,13 @@ import ( "code.vegaprotocol.io/vega/core/genesis" vgfs "code.vegaprotocol.io/vega/libs/fs" - tmconfig "github.com/tendermint/tendermint/config" - tmcrypto "github.com/tendermint/tendermint/crypto" - tmjson "github.com/tendermint/tendermint/libs/json" - tmos "github.com/tendermint/tendermint/libs/os" - "github.com/tendermint/tendermint/privval" - tmtypes "github.com/tendermint/tendermint/types" + + tmconfig "github.com/cometbft/cometbft/config" + tmcrypto "github.com/cometbft/cometbft/crypto" + tmjson "github.com/cometbft/cometbft/libs/json" + tmos "github.com/cometbft/cometbft/libs/os" + "github.com/cometbft/cometbft/privval" + tmtypes "github.com/cometbft/cometbft/types" ) type Config struct { diff --git a/core/tendermint/print.go b/core/tendermint/print.go index 67dee7e094..99d6d66d4f 100644 --- a/core/tendermint/print.go +++ b/core/tendermint/print.go @@ -18,7 +18,7 @@ package tendermint import ( "fmt" - tmjson "github.com/tendermint/tendermint/libs/json" + tmjson "github.com/cometbft/cometbft/libs/json" ) func Prettify(v interface{}) (string, error) { diff --git a/core/txn/command.go b/core/txn/command.go index 6a54d69ef7..94f20e1a6c 100644 --- a/core/txn/command.go +++ b/core/txn/command.go @@ -80,6 +80,14 @@ const ( UpdateReferralSetCommand Command = 0x5E // ApplyReferralCodeCommand ... ApplyReferralCodeCommand Command = 0x5F + // UpdateMarginModeCommand ... + UpdateMarginModeCommand Command = 0x60 + // JoinTeamCommand ... + JoinTeamCommand Command = 0x61 + // BatchProposeCommand ... + BatchProposeCommand Command = 0x62 + // UpdatePartyProfileCommand ... + UpdatePartyProfileCommand Command = 0x63 ) var commandName = map[Command]string{ @@ -113,6 +121,10 @@ var commandName = map[Command]string{ CreateReferralSetCommand: "Create Referral Set", UpdateReferralSetCommand: "Update Referral Set", ApplyReferralCodeCommand: "Apply Referral Code", + UpdateMarginModeCommand: "Update Margin Mode", + JoinTeamCommand: "Join Team", + BatchProposeCommand: "Batch Proposal", + UpdatePartyProfileCommand: "Update Party Profile", } func (cmd Command) IsValidatorCommand() bool { diff --git a/core/types/activity_streak_benefit_tiers.go b/core/types/activity_streak_benefit_tiers.go index 90b116f0b4..b27f7bb85b 100644 --- a/core/types/activity_streak_benefit_tiers.go +++ b/core/types/activity_streak_benefit_tiers.go @@ -82,7 +82,7 @@ func ActivityStreakBenefitTiersFromProto(ptiers *proto.ActivityStreakBenefitTier return tiers, nil } -func CheckUntypedActivityStreakBenefitTier(v interface{}) error { +func CheckUntypedActivityStreakBenefitTier(v interface{}, _ interface{}) error { tiers, err := toActivityStreakBenefitTier(v) if err != nil { return err diff --git a/core/types/activity_streak_benefit_tiers_test.go b/core/types/activity_streak_benefit_tiers_test.go index d0f3c595e5..35f1ff0e87 100644 --- a/core/types/activity_streak_benefit_tiers_test.go +++ b/core/types/activity_streak_benefit_tiers_test.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/core/types" proto "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/require" ) diff --git a/core/types/asset.go b/core/types/asset.go index f44079e9e4..dd97a71916 100644 --- a/core/types/asset.go +++ b/core/types/asset.go @@ -127,7 +127,7 @@ func (a AssetDetails) String() string { a.Symbol, a.Quantum.String(), a.Decimals, - stringer.ReflectPointerToString(a.Source), + stringer.ObjToString(a.Source), ) } @@ -229,7 +229,7 @@ type AssetDetailsBuiltinAsset struct { func (a AssetDetailsBuiltinAsset) String() string { return fmt.Sprintf( "builtinAsset(%s)", - stringer.ReflectPointerToString(a.BuiltinAsset), + stringer.PtrToString(a.BuiltinAsset), ) } @@ -287,7 +287,7 @@ type BuiltinAsset struct { func (a BuiltinAsset) String() string { return fmt.Sprintf( "maxFaucetAmountMint(%s)", - stringer.UintPointerToString(a.MaxFaucetAmountMint), + stringer.PtrToString(a.MaxFaucetAmountMint), ) } @@ -298,7 +298,7 @@ type AssetDetailsErc20 struct { func (a AssetDetailsErc20) String() string { return fmt.Sprintf( "erc20(%s)", - stringer.ReflectPointerToString(a.ERC20), + stringer.PtrToString(a.ERC20), ) } @@ -403,7 +403,7 @@ func (e ERC20) String() string { return fmt.Sprintf( "contractAddress(%s) lifetimeLimit(%s) withdrawThreshold(%s)", e.ContractAddress, - stringer.UintPointerToString(e.LifetimeLimit), - stringer.UintPointerToString(e.WithdrawThreshold), + stringer.PtrToString(e.LifetimeLimit), + stringer.PtrToString(e.WithdrawThreshold), ) } diff --git a/core/types/banking.go b/core/types/banking.go index 5a056b2129..c94f55c948 100644 --- a/core/types/banking.go +++ b/core/types/banking.go @@ -142,7 +142,7 @@ func GovernanceTransferFromProto(g *checkpointpb.GovernanceTransfer) *Governance } } -func (g *GovernanceTransfer) IntoEvent(amount *num.Uint, reason *string) *eventspb.Transfer { +func (g *GovernanceTransfer) IntoEvent(amount *num.Uint, reason, gameID *string) *eventspb.Transfer { // Not sure if this symbology gonna work for datanode from := "0000000000000000000000000000000000000000000000000000000000000000" if len(g.Config.Source) > 0 { @@ -165,6 +165,7 @@ func (g *GovernanceTransfer) IntoEvent(amount *num.Uint, reason *string) *events Status: g.Status, Timestamp: g.Timestamp.UnixNano(), Reason: reason, + GameId: gameID, } if g.Config.OneOffTransferConfig != nil { @@ -291,7 +292,7 @@ func (r *RecurringTransfer) IsValid() error { return nil } -func (r *RecurringTransfer) IntoEvent(reason *string) *eventspb.Transfer { +func (r *RecurringTransfer) IntoEvent(reason *string, gameID *string) *eventspb.Transfer { var endEpoch *uint64 if r.EndEpoch != nil { endEpoch = toPtr(*r.EndEpoch) @@ -309,6 +310,7 @@ func (r *RecurringTransfer) IntoEvent(reason *string) *eventspb.Transfer { Status: r.Status, Timestamp: r.Timestamp.UnixNano(), Reason: reason, + GameId: gameID, Kind: &eventspb.Transfer_Recurring{ Recurring: &eventspb.RecurringTransfer{ StartEpoch: r.StartEpoch, @@ -343,12 +345,12 @@ func NewTransferFromProto(id, from string, tf *commandspb.Transfer) (*TransferFu } } -func (t *TransferFunds) IntoEvent(reason *string) *eventspb.Transfer { +func (t *TransferFunds) IntoEvent(reason, gameID *string) *eventspb.Transfer { switch t.Kind { case TransferCommandKindOneOff: return t.OneOff.IntoEvent(reason) case TransferCommandKindRecurring: - return t.Recurring.IntoEvent(reason) + return t.Recurring.IntoEvent(reason, gameID) default: panic("invalid transfer kind") } diff --git a/core/types/chain_events.go b/core/types/chain_events.go index c8060a4deb..cd5be030e6 100644 --- a/core/types/chain_events.go +++ b/core/types/chain_events.go @@ -35,7 +35,7 @@ type WithdrawExt struct { func (x *WithdrawExt) String() string { return fmt.Sprintf( "ext(%s)", - stringer.ReflectPointerToString(x.Ext), + stringer.ObjToString(x.Ext), ) } @@ -90,7 +90,7 @@ func (x *WithdrawExtErc20) isWithdrawExtExt() {} func (x *WithdrawExtErc20) String() string { return fmt.Sprintf( "erc20(%s)", - stringer.ReflectPointerToString(x.Erc20), + stringer.PtrToString(x.Erc20), ) } @@ -252,7 +252,7 @@ func (d *Deposit) String() string { d.Status.String(), d.PartyID, d.Asset, - stringer.UintPointerToString(d.Amount), + stringer.PtrToString(d.Amount), d.TxHash, d.CreditDate, d.CreationDate, @@ -297,7 +297,7 @@ func (c ChainEventERC20) IntoProto() *commandspb.ChainEvent_Erc20 { func (c ChainEventERC20) String() string { return fmt.Sprintf( "erc20(%s)", - stringer.ReflectPointerToString(c.ERC20), + stringer.PtrToString(c.ERC20), ) } @@ -339,7 +339,7 @@ func (b BuiltinAssetDeposit) String() string { "party(%s) vegaAssetID(%s) amount(%s)", b.PartyID, b.VegaAssetID, - stringer.UintPointerToString(b.Amount), + stringer.PtrToString(b.Amount), ) } @@ -385,7 +385,7 @@ func (b BuiltinAssetWithdrawal) String() string { "partyID(%s) vegaAssetID(%s) amount(%s)", b.PartyID, b.VegaAssetID, - stringer.UintPointerToString(b.Amount), + stringer.PtrToString(b.Amount), ) } @@ -417,7 +417,7 @@ func (c ChainEventBuiltin) IntoProto() *commandspb.ChainEvent_Builtin { func (c ChainEventBuiltin) String() string { return fmt.Sprintf( "builtin(%s)", - stringer.ReflectPointerToString(c.Builtin), + stringer.PtrToString(c.Builtin), ) } @@ -466,7 +466,7 @@ func (c BuiltinAssetEvent) IntoProto() *vegapb.BuiltinAssetEvent { func (c BuiltinAssetEvent) String() string { return fmt.Sprintf( "action(%s)", - stringer.ReflectPointerToString(c.Action), + stringer.ObjToString(c.Action), ) } @@ -477,7 +477,7 @@ type BuiltinAssetEventDeposit struct { func (b BuiltinAssetEventDeposit) String() string { return fmt.Sprintf( "deposit(%s)", - stringer.ReflectPointerToString(b.Deposit), + stringer.PtrToString(b.Deposit), ) } @@ -511,7 +511,7 @@ type BuiltinAssetEventWithdrawal struct { func (b BuiltinAssetEventWithdrawal) String() string { return fmt.Sprintf( "withdrawal(%s)", - stringer.ReflectPointerToString(b.Withdrawal), + stringer.PtrToString(b.Withdrawal), ) } @@ -626,7 +626,7 @@ func (e ERC20Event) String() string { "index(%v) block(%v) action(%s)", e.Index, e.Block, - stringer.ReflectPointerToString(e.Action), + stringer.ObjToString(e.Action), ) } @@ -637,7 +637,7 @@ type ERC20EventAssetDelist struct { func (e ERC20EventAssetDelist) String() string { return fmt.Sprintf( "assetDelist(%s)", - stringer.ReflectPointerToString(e.AssetDelist), + stringer.PtrToString(e.AssetDelist), ) } @@ -693,7 +693,7 @@ func (e ERC20EventAssetList) oneOfProto() interface{} { func (e ERC20EventAssetList) String() string { return fmt.Sprintf( "assetList(%s)", - stringer.ReflectPointerToString(e.AssetList), + stringer.PtrToString(e.AssetList), ) } @@ -753,7 +753,7 @@ func (e ERC20EventWithdrawal) oneOfProto() interface{} { func (e ERC20EventWithdrawal) String() string { return fmt.Sprintf( "withdrawal(%s)", - stringer.ReflectPointerToString(e.Withdrawal), + stringer.PtrToString(e.Withdrawal), ) } @@ -814,7 +814,7 @@ type ERC20EventDeposit struct { func (e ERC20EventDeposit) String() string { return fmt.Sprintf( "deposit(%s)", - stringer.ReflectPointerToString(e.Deposit), + stringer.PtrToString(e.Deposit), ) } @@ -882,7 +882,7 @@ func (e ERC20Deposit) String() string { "vegaAssetID(%s) targetPartyID(%s) amount(%s) sourceEthereumAddress(%s)", e.VegaAssetID, e.TargetPartyID, - stringer.UintPointerToString(e.Amount), + stringer.PtrToString(e.Amount), e.SourceEthereumAddress, ) } @@ -904,7 +904,7 @@ func (e ERC20EventAssetLimitsUpdated) oneOfProto() interface{} { func (e ERC20EventAssetLimitsUpdated) String() string { return fmt.Sprintf( "assetLimitsUpdated(%s)", - stringer.ReflectPointerToString(e.AssetLimitsUpdated), + stringer.PtrToString(e.AssetLimitsUpdated), ) } @@ -952,8 +952,8 @@ func (e ERC20AssetLimitsUpdated) String() string { "vegaAssetID(%s) sourceEthereumAddress(%s) lifetimeLimits(%s) withdrawThreshold(%s)", e.VegaAssetID, e.SourceEthereumAddress, - stringer.UintPointerToString(e.LifetimeLimits), - stringer.UintPointerToString(e.WithdrawThreshold), + stringer.PtrToString(e.LifetimeLimits), + stringer.PtrToString(e.WithdrawThreshold), ) } diff --git a/core/types/checkpoint.go b/core/types/checkpoint.go index 98e5d21216..2d61bb2062 100644 --- a/core/types/checkpoint.go +++ b/core/types/checkpoint.go @@ -22,10 +22,9 @@ import ( "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/protos/vega" checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" - - "code.vegaprotocol.io/vega/libs/proto" ) var ( diff --git a/core/types/collateral.go b/core/types/collateral.go index 15f34bbc67..19de832839 100644 --- a/core/types/collateral.go +++ b/core/types/collateral.go @@ -98,7 +98,7 @@ func (a Account) String() string { "ID(%s) owner(%s) balance(%s) asset(%s) marketID(%s) type(%s)", a.ID, a.Owner, - stringer.UintPointerToString(a.Balance), + stringer.PtrToString(a.Balance), a.Asset, a.MarketID, a.Type.String(), @@ -151,7 +151,8 @@ type TransferRequest struct { MinAmount *num.Uint Asset string // Reference string - Type TransferType + Type TransferType + TransferID *string } func (t *TransferRequest) IntoProto() *proto.TransferRequest { @@ -221,6 +222,7 @@ type LedgerEntry struct { Timestamp int64 FromAccountBalance *num.Uint ToAccountBalance *num.Uint + TransferID *string } func (l *LedgerEntry) IntoProto() *proto.LedgerEntry { @@ -232,6 +234,7 @@ func (l *LedgerEntry) IntoProto() *proto.LedgerEntry { Timestamp: l.Timestamp, FromAccountBalance: num.UintToString(l.FromAccountBalance), ToAccountBalance: num.UintToString(l.ToAccountBalance), + TransferId: l.TransferID, } } @@ -264,6 +267,10 @@ const ( // // Margin account funds will alter as margin requirements on positions change. AccountTypeMargin AccountType = proto.AccountType_ACCOUNT_TYPE_MARGIN + + // Margin account for isolated margin mode. + AccountTypeOrderMargin AccountType = proto.AccountType_ACCOUNT_TYPE_ORDER_MARGIN + // General accounts contains general funds for a party. A party will // have multiple general accounts, one for each asset they want // to trade with diff --git a/core/types/delegation.go b/core/types/delegation.go index 6af8398555..090d9cb941 100644 --- a/core/types/delegation.go +++ b/core/types/delegation.go @@ -66,7 +66,7 @@ func (d Delegate) String() string { return fmt.Sprintf( "nodeID(%s) amount(%s)", d.NodeID, - stringer.UintPointerToString(d.Amount), + stringer.PtrToString(d.Amount), ) } @@ -88,7 +88,7 @@ func (u Undelegate) String() string { return fmt.Sprintf( "nodeID(%s) amount(%s) method(%s)", u.NodeID, - stringer.UintPointerToString(u.Amount), + stringer.PtrToString(u.Amount), u.Method, ) } diff --git a/core/types/ethereum.go b/core/types/ethereum.go index cebcf3bdf7..8cf7b0cf31 100644 --- a/core/types/ethereum.go +++ b/core/types/ethereum.go @@ -16,12 +16,13 @@ package types import ( + "encoding/json" "errors" "fmt" vgreflect "code.vegaprotocol.io/vega/libs/reflect" - proto "code.vegaprotocol.io/vega/protos/vega" + ethcmn "github.com/ethereum/go-ethereum/common" ) @@ -33,6 +34,12 @@ var ( ErrUnsupportedCollateralBridgeDeploymentBlockHeight = errors.New("setting collateral bridge contract deployment block height in Ethereum config is not supported") ErrAtLeastOneOfStakingOrVestingBridgeAddressMustBeSet = errors.New("at least one of the stacking bridge or token vesting contract addresses must be specified") ErrConfirmationsMustBeHigherThan0 = errors.New("confirmation must be > 0 in Ethereum config") + ErrMissingNetworkName = errors.New("missing network name") + ErrDuplicateNetworkName = errors.New("duplicate network name") + ErrDuplicateNetworkID = errors.New("duplicate network ID name") + ErrDuplicateChainID = errors.New("duplicate chain ID name") + ErrCannotRemoveL2Config = errors.New("L2 config cannot be removed") + ErrCanOnlyAmendedConfirmations = errors.New("can only amended L2 config confirmations") ) type EthereumConfig struct { @@ -162,7 +169,7 @@ func (c EthereumContract) HexAddress() string { // CheckUntypedEthereumConfig verifies the `v` parameter is a proto.EthereumConfig // struct and check if it's valid. -func CheckUntypedEthereumConfig(v interface{}) error { +func CheckUntypedEthereumConfig(v interface{}, _ interface{}) error { cfg, err := toEthereumConfigProto(v) if err != nil { return err @@ -171,6 +178,17 @@ func CheckUntypedEthereumConfig(v interface{}) error { return CheckEthereumConfig(cfg) } +func CheckUntypedEthereumL2Configs(v interface{}, o interface{}) error { + cfg, err := toEthereumL2ConfigsProto(v) + if err != nil { + return err + } + + ocfg := &proto.EthereumL2Configs{} + json.Unmarshal([]byte(o.(string)), ocfg) + return CheckEthereumL2Configs(cfg, ocfg) +} + // CheckEthereumConfig verifies the proto.EthereumConfig is valid. func CheckEthereumConfig(cfgProto *proto.EthereumConfig) error { if len(cfgProto.NetworkId) == 0 { @@ -214,3 +232,130 @@ func toEthereumConfigProto(v interface{}) (*proto.EthereumConfig, error) { } return cfg, nil } + +type EthereumL2Configs struct { + Configs []EthereumL2Config +} + +type EthereumL2Config struct { + ChainID string + NetworkID string + Confirmations uint64 + Name string +} + +func toEthereumL2ConfigsProto(v interface{}) (*proto.EthereumL2Configs, error) { + cfg, ok := v.(*proto.EthereumL2Configs) + if !ok { + return nil, fmt.Errorf("type \"%s\" is not a EthereumL2Configs proto", vgreflect.TypeName(v)) + } + return cfg, nil +} + +func EthereumL2ConfigsFromUntypedProto(v interface{}) (*EthereumL2Configs, error) { + cfg, err := toEthereumL2ConfigsProto(v) + if err != nil { + return nil, fmt.Errorf("couldn't convert untyped proto to EthereumL2Configs proto: %w", err) + } + + ethConfig, err := EthereumL2ConfigsFromProto(cfg) + if err != nil { + return nil, fmt.Errorf("couldn't build EthereumL2Configs: %w", err) + } + + return ethConfig, nil +} + +func EthereumL2ConfigsFromProto(cfgProto *proto.EthereumL2Configs) (*EthereumL2Configs, error) { + if err := CheckEthereumL2Configs(cfgProto, nil); err != nil { + return nil, fmt.Errorf("invalid Ethereum configuration: %w", err) + } + + cfg := &EthereumL2Configs{} + for _, v := range cfgProto.Configs { + cfg.Configs = append(cfg.Configs, EthereumL2Config{ + NetworkID: v.NetworkId, + ChainID: v.ChainId, + Name: v.Name, + Confirmations: uint64(v.Confirmations), + }) + } + + return cfg, nil +} + +// CheckEthereumConfig verifies the proto.EthereumConfig is valid. +func CheckEthereumL2Configs(cfgProto *proto.EthereumL2Configs, prev *proto.EthereumL2Configs) error { + names := map[string]*proto.EthereumL2Config{} + cids := map[string]*proto.EthereumL2Config{} + nids := map[string]*proto.EthereumL2Config{} + + for _, v := range cfgProto.Configs { + // check network id and ensure no duplicates + if len(v.NetworkId) == 0 { + return ErrMissingNetworkID + } + if _, ok := nids[v.NetworkId]; ok { + return ErrDuplicateNetworkID + } + nids[v.NetworkId] = v + + // check chain id and ensure no duplicates + if len(v.ChainId) == 0 { + return ErrMissingChainID + } + if _, ok := cids[v.ChainId]; ok { + return ErrDuplicateChainID + } + cids[v.ChainId] = v + + // check network name and ensure no duplicates + if len(v.Name) == 0 { + return ErrMissingNetworkName + } + if _, ok := names[v.Name]; ok { + return ErrDuplicateNetworkName + } + names[v.Name] = v + + if v.Confirmations == 0 { + return ErrConfirmationsMustBeHigherThan0 + } + } + + // it wasn't previously set to anything (from genesis) so nothing to check + if prev == nil { + return nil + } + + // compare against currently set configs - we make sure they only amend confirmations, or are new additions + // but for now nothing can bre removed. + for _, c := range prev.Configs { + v, ok := nids[c.NetworkId] + if !ok { + return ErrCannotRemoveL2Config + } + + if !isUpdate(v, c) { + return ErrCanOnlyAmendedConfirmations + } + } + + return nil +} + +func isUpdate(v, c *proto.EthereumL2Config) bool { + if v.ChainId != c.ChainId { + return false + } + + if v.NetworkId != c.NetworkId { + return false + } + + if v.Name != c.Name { + return false + } + + return true +} diff --git a/core/types/ethereum_test.go b/core/types/ethereum_test.go index 00549b5915..b54a4689cf 100644 --- a/core/types/ethereum_test.go +++ b/core/types/ethereum_test.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/core/types" proto "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/require" ) @@ -31,6 +32,9 @@ func TestEthereumConfig(t *testing.T) { t.Run("Missing both staking and vesting contract addresses fails", testMissingBothStakingAndVestingContractAddressesFails) t.Run("At least one of staking of vesting contract addresses succeeds", testAtLeastOneOfStackingOrVestingContractAddressesSucceeds) t.Run("Confirmations set to 0 fails", testConfirmationsSetTo0Fails) + t.Run("Basic checks on fields of the EVM config", testEVMConfigBasic) + t.Run("Check that a network cannot appear twice in the config", testEVMConfigRejectDuplicateFields) + t.Run("Check that an EVM config can not be removed", testEVMAmendOrAppendOnly) } func testValidEthereumConfigSucceeds(t *testing.T) { @@ -209,6 +213,144 @@ func testConfirmationsSetTo0Fails(t *testing.T) { require.ErrorIs(t, err, types.ErrConfirmationsMustBeHigherThan0) } +func testEVMConfigBasic(t *testing.T) { + tcs := []struct { + name string + chainID string + networkID string + confirmations uint32 + expect error + }{ + { + name: "hello", + chainID: "11", + networkID: "12", + confirmations: 1, + }, + { + chainID: "11", + networkID: "12", + confirmations: 1, + expect: types.ErrMissingNetworkName, + }, + { + name: "hello", + networkID: "12", + confirmations: 1, + expect: types.ErrMissingChainID, + }, + { + name: "hello", + chainID: "11", + confirmations: 1, + expect: types.ErrMissingNetworkID, + }, + { + name: "hello", + chainID: "11", + networkID: "12", + confirmations: 0, + expect: types.ErrConfirmationsMustBeHigherThan0, + }, + } + + for _, tc := range tcs { + t.Run(tc.name, func(tt *testing.T) { + // given + cfgs := &proto.EthereumL2Configs{ + Configs: []*proto.EthereumL2Config{ + { + NetworkId: tc.networkID, + ChainId: tc.chainID, + Name: tc.name, + Confirmations: tc.confirmations, + }, + }, + } + + // when + err := types.CheckEthereumL2Configs(cfgs, nil) + + // then + require.ErrorIs(t, tc.expect, err) + }) + } +} + +func testEVMConfigRejectDuplicateFields(t *testing.T) { + cfgs := validEVMConfigs() + + original := proto.EthereumL2Config{ + NetworkId: "999", + ChainId: "9999", + Name: "999999", + Confirmations: 100, + } + + c := original + cfgs.Configs = append(cfgs.Configs, &c) + err := types.CheckEthereumL2Configs(cfgs, nil) + require.ErrorIs(t, nil, err) + + c.Name = cfgs.Configs[0].Name + err = types.CheckEthereumL2Configs(cfgs, nil) + require.ErrorIs(t, types.ErrDuplicateNetworkName, err) + c.Name = original.Name + + c.ChainId = cfgs.Configs[0].ChainId + err = types.CheckEthereumL2Configs(cfgs, nil) + require.ErrorIs(t, types.ErrDuplicateChainID, err) + c.ChainId = original.ChainId + + c.NetworkId = cfgs.Configs[0].NetworkId + err = types.CheckEthereumL2Configs(cfgs, nil) + require.ErrorIs(t, types.ErrDuplicateNetworkID, err) +} + +func testEVMAmendOrAppendOnly(t *testing.T) { + cfgs1 := validEVMConfigs() + cfgs2 := validEVMConfigs() + + // update to itself + err := types.CheckEthereumL2Configs(cfgs1, cfgs2) + require.ErrorIs(t, nil, err) + + // change only confirmations + cfgs2.Configs[0].Confirmations += 1 + err = types.CheckEthereumL2Configs(cfgs1, cfgs2) + require.ErrorIs(t, nil, err) + + // try to change the name + cfgs2 = validEVMConfigs() + cfgs2.Configs[0].Name += "hello" + err = types.CheckEthereumL2Configs(cfgs1, cfgs2) + require.ErrorIs(t, types.ErrCanOnlyAmendedConfirmations, err) + + // try to change the chainID + cfgs2 = validEVMConfigs() + cfgs2.Configs[0].ChainId += "1" + err = types.CheckEthereumL2Configs(cfgs1, cfgs2) + require.ErrorIs(t, types.ErrCanOnlyAmendedConfirmations, err) + + // try to change the networkID (counts as a remove) + cfgs2 = validEVMConfigs() + cfgs2.Configs[0].NetworkId += "1" + err = types.CheckEthereumL2Configs(cfgs1, cfgs2) + require.ErrorIs(t, types.ErrCannotRemoveL2Config, err) + + // add a new config that clashes with existing + cfgs2 = validEVMConfigs() + new_cfg := proto.EthereumL2Config{ + NetworkId: cfgs2.Configs[0].NetworkId, + ChainId: "9999", + Name: "999999", + Confirmations: 100, + } + cfgs2.Configs = append(cfgs2.Configs, &new_cfg) + err = types.CheckEthereumL2Configs(cfgs1, cfgs2) + require.ErrorIs(t, types.ErrCanOnlyAmendedConfirmations, err) +} + func validEthereumConfig() *proto.EthereumConfig { return &proto.EthereumConfig{ NetworkId: "1", @@ -231,3 +373,22 @@ func validEthereumConfig() *proto.EthereumConfig { }, } } + +func validEVMConfigs() *proto.EthereumL2Configs { + return &proto.EthereumL2Configs{ + Configs: []*proto.EthereumL2Config{ + { + NetworkId: "1", + ChainId: "2", + Name: "hello", + Confirmations: 12, + }, + { + NetworkId: "2", + ChainId: "3", + Name: "helloagain", + Confirmations: 13, + }, + }, + } +} diff --git a/core/types/fees.go b/core/types/fees.go index e7f31d6c8d..1f1bfab565 100644 --- a/core/types/fees.go +++ b/core/types/fees.go @@ -75,7 +75,8 @@ func (f FeeFactors) String() string { } type Fees struct { - Factors *FeeFactors + Factors *FeeFactors + LiquidityFeeSettings *LiquidityFeeSettings } func FeesFromProto(f *proto.Fees) *Fees { @@ -83,26 +84,29 @@ func FeesFromProto(f *proto.Fees) *Fees { return nil } return &Fees{ - Factors: FeeFactorsFromProto(f.Factors), + Factors: FeeFactorsFromProto(f.Factors), + LiquidityFeeSettings: LiquidityFeeSettingsFromProto(f.LiquidityFeeSettings), } } func (f Fees) IntoProto() *proto.Fees { return &proto.Fees{ - Factors: f.Factors.IntoProto(), + Factors: f.Factors.IntoProto(), + LiquidityFeeSettings: f.LiquidityFeeSettings.IntoProto(), } } func (f Fees) DeepClone() *Fees { return &Fees{ - Factors: f.Factors.DeepClone(), + Factors: f.Factors.DeepClone(), + LiquidityFeeSettings: f.LiquidityFeeSettings.DeepClone(), } } func (f Fees) String() string { return fmt.Sprintf( "factors(%s)", - stringer.ReflectPointerToString(f.Factors), + stringer.PtrToString(f.Factors), ) } @@ -136,6 +140,20 @@ func (f Fee) IntoProto() *proto.Fee { return fee } +func FeeFromProto(f *proto.Fee) *Fee { + return &Fee{ + MakerFee: num.MustUintFromString(f.MakerFee, 10), + InfrastructureFee: num.MustUintFromString(f.InfrastructureFee, 10), + LiquidityFee: num.MustUintFromString(f.LiquidityFee, 10), + MakerFeeVolumeDiscount: num.MustUintFromString(f.MakerFeeVolumeDiscount, 10), + InfrastructureFeeVolumeDiscount: num.MustUintFromString(f.InfrastructureFeeVolumeDiscount, 10), + LiquidityFeeVolumeDiscount: num.MustUintFromString(f.LiquidityFeeVolumeDiscount, 10), + MakerFeeReferrerDiscount: num.MustUintFromString(f.MakerFeeReferrerDiscount, 10), + InfrastructureFeeReferrerDiscount: num.MustUintFromString(f.InfrastructureFeeReferrerDiscount, 10), + LiquidityFeeReferrerDiscount: num.MustUintFromString(f.LiquidityFeeReferrerDiscount, 10), + } +} + func (f Fee) Clone() *Fee { fee := &Fee{ MakerFee: f.MakerFee.Clone(), @@ -166,15 +184,15 @@ func (f Fee) Clone() *Fee { func (f *Fee) String() string { return fmt.Sprintf( "makerFee(%s) liquidityFee(%s) infrastructureFee(%s) makerFeeReferrerDiscount(%s) liquidityFeeReferrerDiscount(%s) infrastructureFeeReferrerDiscount(%s) makerFeeVolumeDiscount(%s) liquidityFeeVolumeDiscount(%s) infrastructureFeeVolumeDiscount(%s)", - stringer.UintPointerToString(f.MakerFee), - stringer.UintPointerToString(f.LiquidityFee), - stringer.UintPointerToString(f.InfrastructureFee), - stringer.UintPointerToString(f.MakerFeeReferrerDiscount), - stringer.UintPointerToString(f.LiquidityFeeReferrerDiscount), - stringer.UintPointerToString(f.InfrastructureFeeReferrerDiscount), - stringer.UintPointerToString(f.MakerFeeVolumeDiscount), - stringer.UintPointerToString(f.LiquidityFeeVolumeDiscount), - stringer.UintPointerToString(f.InfrastructureFeeVolumeDiscount), + stringer.PtrToString(f.MakerFee), + stringer.PtrToString(f.LiquidityFee), + stringer.PtrToString(f.InfrastructureFee), + stringer.PtrToString(f.MakerFeeReferrerDiscount), + stringer.PtrToString(f.LiquidityFeeReferrerDiscount), + stringer.PtrToString(f.InfrastructureFeeReferrerDiscount), + stringer.PtrToString(f.MakerFeeVolumeDiscount), + stringer.PtrToString(f.LiquidityFeeVolumeDiscount), + stringer.PtrToString(f.InfrastructureFeeVolumeDiscount), ) } @@ -204,9 +222,9 @@ func (rf ReferrerReward) Clone() *ReferrerReward { func (rf *ReferrerReward) String() string { return fmt.Sprintf( "makerFeeReferrerReward(%s) liquidityFeeReferrerReward(%s) infrastructureFeeReferrerReward(%s)", - stringer.UintPointerToString(rf.MakerFeeReferrerReward), - stringer.UintPointerToString(rf.LiquidityFeeReferrerReward), - stringer.UintPointerToString(rf.InfrastructureFeeReferrerReward), + stringer.PtrToString(rf.MakerFeeReferrerReward), + stringer.PtrToString(rf.LiquidityFeeReferrerReward), + stringer.PtrToString(rf.InfrastructureFeeReferrerReward), ) } diff --git a/core/types/governance_batch_proposal.go b/core/types/governance_batch_proposal.go new file mode 100644 index 0000000000..e0856dcf9a --- /dev/null +++ b/core/types/governance_batch_proposal.go @@ -0,0 +1,64 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package types + +import ( + vegapb "code.vegaprotocol.io/vega/protos/vega" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" +) + +type BatchProposalSubmission struct { + // Proposal reference + Reference string + // Proposal configuration and the actual change that is meant to be executed when proposal is enacted + Terms *BatchProposalTerms + // Rationale behind the proposal change. + Rationale *ProposalRationale +} + +func (p BatchProposalSubmission) IntoProto() *commandspb.BatchProposalSubmission { + var terms *commandspb.BatchProposalSubmissionTerms + if p.Terms != nil { + terms = p.Terms.IntoSubmissionProto() + } + return &commandspb.BatchProposalSubmission{ + Reference: p.Reference, + Terms: terms, + Rationale: &vegapb.ProposalRationale{ + Description: p.Rationale.Description, + Title: p.Rationale.Title, + }, + } +} + +func NewBatchProposalSubmissionFromProto(p *commandspb.BatchProposalSubmission, ids []string) (*BatchProposalSubmission, error) { + var pterms *BatchProposalTerms + if p.Terms != nil { + var err error + pterms, err = BatchProposalTermsSubmissionFromProto(p.Terms, ids) + if err != nil { + return nil, err + } + } + return &BatchProposalSubmission{ + Reference: p.Reference, + Terms: pterms, + Rationale: &ProposalRationale{ + Description: p.Rationale.Description, + Title: p.Rationale.Title, + }, + }, nil +} diff --git a/core/types/governance_cancel_transfer.go b/core/types/governance_cancel_transfer.go index f0662e85a6..cb6eb7a31c 100644 --- a/core/types/governance_cancel_transfer.go +++ b/core/types/governance_cancel_transfer.go @@ -29,27 +29,29 @@ type ProposalTermsCancelTransfer struct { func (a ProposalTermsCancelTransfer) String() string { return fmt.Sprintf( "cancelTransfer(%s)", - stringer.ReflectPointerToString(a.CancelTransfer), + stringer.PtrToString(a.CancelTransfer), ) } -func (a ProposalTermsCancelTransfer) IntoProto() *vegapb.ProposalTerms_CancelTransfer { +func (a ProposalTermsCancelTransfer) isPTerm() {} + +func (a ProposalTermsCancelTransfer) oneOfSingleProto() vegapb.ProposalOneOffTermChangeType { return &vegapb.ProposalTerms_CancelTransfer{ CancelTransfer: a.CancelTransfer.IntoProto(), } } -func (a ProposalTermsCancelTransfer) isPTerm() {} - -func (a ProposalTermsCancelTransfer) oneOfProto() interface{} { - return a.IntoProto() +func (a ProposalTermsCancelTransfer) oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType { + return &vegapb.BatchProposalTermsChange_CancelTransfer{ + CancelTransfer: a.CancelTransfer.IntoProto(), + } } func (a ProposalTermsCancelTransfer) GetTermType() ProposalTermsType { return ProposalTermsTypeCancelTransfer } -func (a ProposalTermsCancelTransfer) DeepClone() proposalTerm { +func (a ProposalTermsCancelTransfer) DeepClone() ProposalTerm { if a.CancelTransfer == nil { return &ProposalTermsCancelTransfer{} } @@ -58,14 +60,14 @@ func (a ProposalTermsCancelTransfer) DeepClone() proposalTerm { } } -func NewCancelGovernanceTransferFromProto(p *vegapb.ProposalTerms_CancelTransfer) (*ProposalTermsCancelTransfer, error) { +func NewCancelGovernanceTransferFromProto(cancelTransferProto *vegapb.CancelTransfer) (*ProposalTermsCancelTransfer, error) { var cancelTransfer *CancelTransfer - if p.CancelTransfer != nil { + if cancelTransferProto != nil { cancelTransfer = &CancelTransfer{} - if p.CancelTransfer.Changes != nil { + if cancelTransferProto.Changes != nil { cancelTransfer.Changes = &CancelTransferConfiguration{ - TransferID: p.CancelTransfer.Changes.TransferId, + TransferID: cancelTransferProto.Changes.TransferId, } } } @@ -90,7 +92,7 @@ func (c CancelTransfer) IntoProto() *vegapb.CancelTransfer { func (c CancelTransfer) String() string { return fmt.Sprintf( "changes(%s)", - stringer.ReflectPointerToString(c.Changes), + stringer.PtrToString(c.Changes), ) } diff --git a/core/types/governance_new_asset.go b/core/types/governance_new_asset.go index cc0c5dc81d..8bf13a98fa 100644 --- a/core/types/governance_new_asset.go +++ b/core/types/governance_new_asset.go @@ -29,31 +29,35 @@ type ProposalTermsNewAsset struct { func (a ProposalTermsNewAsset) String() string { return fmt.Sprintf( "newAsset(%v)", - stringer.ReflectPointerToString(a.NewAsset), + stringer.PtrToString(a.NewAsset), ) } -func (a ProposalTermsNewAsset) IntoProto() *vegapb.ProposalTerms_NewAsset { +func (a ProposalTermsNewAsset) IntoProto() *vegapb.NewAsset { var newAsset *vegapb.NewAsset if a.NewAsset != nil { newAsset = a.NewAsset.IntoProto() } - return &vegapb.ProposalTerms_NewAsset{ - NewAsset: newAsset, - } + return newAsset } func (a ProposalTermsNewAsset) isPTerm() {} -func (a ProposalTermsNewAsset) oneOfProto() interface{} { - return a.IntoProto() +func (a ProposalTermsNewAsset) oneOfSingleProto() vegapb.ProposalOneOffTermChangeType { + return &vegapb.ProposalTerms_NewAsset{ + NewAsset: a.IntoProto(), + } +} + +func (a ProposalTermsNewAsset) oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType { + return nil } func (a ProposalTermsNewAsset) GetTermType() ProposalTermsType { return ProposalTermsTypeNewAsset } -func (a ProposalTermsNewAsset) DeepClone() proposalTerm { +func (a ProposalTermsNewAsset) DeepClone() ProposalTerm { if a.NewAsset == nil { return &ProposalTermsNewAsset{} } @@ -118,7 +122,7 @@ func (n NewAsset) IntoProto() *vegapb.NewAsset { func (n NewAsset) String() string { return fmt.Sprintf( "changes(%s)", - stringer.ReflectPointerToString(n.Changes), + stringer.PtrToString(n.Changes), ) } diff --git a/core/types/governance_new_freeform.go b/core/types/governance_new_freeform.go index ba63a28906..8816019b27 100644 --- a/core/types/governance_new_freeform.go +++ b/core/types/governance_new_freeform.go @@ -29,31 +29,37 @@ type ProposalTermsNewFreeform struct { func (f ProposalTermsNewFreeform) String() string { return fmt.Sprintf( "newFreeForm(%s)", - stringer.ReflectPointerToString(f.NewFreeform), + stringer.PtrToString(f.NewFreeform), ) } -func (f ProposalTermsNewFreeform) IntoProto() *vegapb.ProposalTerms_NewFreeform { +func (f ProposalTermsNewFreeform) IntoProto() *vegapb.NewFreeform { var newFreeform *vegapb.NewFreeform if f.NewFreeform != nil { newFreeform = f.NewFreeform.IntoProto() } - return &vegapb.ProposalTerms_NewFreeform{ - NewFreeform: newFreeform, - } + return newFreeform } func (f ProposalTermsNewFreeform) isPTerm() {} -func (f ProposalTermsNewFreeform) oneOfProto() interface{} { - return f.IntoProto() +func (a ProposalTermsNewFreeform) oneOfSingleProto() vegapb.ProposalOneOffTermChangeType { + return &vegapb.ProposalTerms_NewFreeform{ + NewFreeform: a.IntoProto(), + } +} + +func (a ProposalTermsNewFreeform) oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType { + return &vegapb.BatchProposalTermsChange_NewFreeform{ + NewFreeform: a.IntoProto(), + } } func (f ProposalTermsNewFreeform) GetTermType() ProposalTermsType { return ProposalTermsTypeNewFreeform } -func (f ProposalTermsNewFreeform) DeepClone() proposalTerm { +func (f ProposalTermsNewFreeform) DeepClone() ProposalTerm { if f.NewFreeform == nil { return &ProposalTermsNewFreeform{} } @@ -62,7 +68,7 @@ func (f ProposalTermsNewFreeform) DeepClone() proposalTerm { } } -func NewNewFreeformFromProto(_ *vegapb.ProposalTerms_NewFreeform) *ProposalTermsNewFreeform { +func NewNewFreeformFromProto(_ *vegapb.NewFreeform) *ProposalTermsNewFreeform { return &ProposalTermsNewFreeform{ NewFreeform: &NewFreeform{}, } diff --git a/core/types/governance_new_market.go b/core/types/governance_new_market.go index 93d1719804..2d67c5d8f4 100644 --- a/core/types/governance_new_market.go +++ b/core/types/governance_new_market.go @@ -19,11 +19,15 @@ import ( "errors" "fmt" "strings" + "time" "code.vegaprotocol.io/vega/core/datasource" + "code.vegaprotocol.io/vega/core/datasource/definition" dsdefinition "code.vegaprotocol.io/vega/core/datasource/definition" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/libs/stringer" + "code.vegaprotocol.io/vega/protos/vega" vegapb "code.vegaprotocol.io/vega/protos/vega" ) @@ -38,6 +42,7 @@ const ( ProductTypeFuture ProductType = iota ProductTypeSpot ProductTypePerps + ProductTypeUnspecified // used on updates, if the product is not set ) type ProposalTermsNewMarket struct { @@ -47,7 +52,7 @@ type ProposalTermsNewMarket struct { func (a ProposalTermsNewMarket) String() string { return fmt.Sprintf( "newMarket(%s)", - stringer.ReflectPointerToString(a.NewMarket), + stringer.PtrToString(a.NewMarket), ) } @@ -59,15 +64,23 @@ func (a ProposalTermsNewMarket) IntoProto() *vegapb.ProposalTerms_NewMarket { func (a ProposalTermsNewMarket) isPTerm() {} -func (a ProposalTermsNewMarket) oneOfProto() interface{} { - return a.IntoProto() +func (a ProposalTermsNewMarket) oneOfSingleProto() vegapb.ProposalOneOffTermChangeType { + return &vegapb.ProposalTerms_NewMarket{ + NewMarket: a.NewMarket.IntoProto(), + } +} + +func (a ProposalTermsNewMarket) oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType { + return &vegapb.BatchProposalTermsChange_NewMarket{ + NewMarket: a.NewMarket.IntoProto(), + } } func (a ProposalTermsNewMarket) GetTermType() ProposalTermsType { return ProposalTermsTypeNewMarket } -func (a ProposalTermsNewMarket) DeepClone() proposalTerm { +func (a ProposalTermsNewMarket) DeepClone() ProposalTerm { if a.NewMarket == nil { return &ProposalTermsNewMarket{} } @@ -76,14 +89,14 @@ func (a ProposalTermsNewMarket) DeepClone() proposalTerm { } } -func NewNewMarketFromProto(p *vegapb.ProposalTerms_NewMarket) (*ProposalTermsNewMarket, error) { +func NewNewMarketFromProto(newMarketProto *vegapb.NewMarket) (*ProposalTermsNewMarket, error) { var newMarket *NewMarket - if p.NewMarket != nil { + if newMarketProto != nil { newMarket = &NewMarket{} - if p.NewMarket.Changes != nil { + if newMarketProto.Changes != nil { var err error - newMarket.Changes, err = NewMarketConfigurationFromProto(p.NewMarket.Changes) + newMarket.Changes, err = NewMarketConfigurationFromProto(newMarketProto.Changes) if err != nil { return nil, err } @@ -139,7 +152,7 @@ func (n NewMarket) DeepClone() *NewMarket { func (n NewMarket) String() string { return fmt.Sprintf( "changes(%s)", - stringer.ReflectPointerToString(n.Changes), + stringer.PtrToString(n.Changes), ) } @@ -148,6 +161,228 @@ type SuccessorConfig struct { InsurancePoolFraction num.Decimal } +type CompositePriceSource struct { + PriceSource string + Price *num.Uint + LastUpdated int64 +} + +func (cps *CompositePriceSource) DeepClone() *CompositePriceSource { + if cps == nil { + return nil + } + var price *num.Uint + if cps.Price != nil { + price = cps.Price.Clone() + } + return &CompositePriceSource{ + PriceSource: cps.PriceSource, + LastUpdated: cps.LastUpdated, + Price: price, + } +} + +type CompositePriceState struct { + PriceSources []*CompositePriceSource +} + +func (cps *CompositePriceState) DeepClone() *CompositePriceState { + priceSources := make([]*CompositePriceSource, 0, len(cps.PriceSources)) + for _, c := range cps.PriceSources { + priceSources = append(priceSources, c.DeepClone()) + } + return &CompositePriceState{PriceSources: priceSources} +} + +func CompositePriceStateFromProto(cps *vega.CompositePriceState) *CompositePriceState { + priceSources := make([]*CompositePriceSource, 0, len(cps.PriceSources)) + for _, c := range cps.PriceSources { + var price *num.Uint + if len(c.Price) > 0 { + p, _ := num.UintFromString(c.Price, 10) + if p != nil { + price = p + } + } + priceSources = append(priceSources, &CompositePriceSource{ + Price: price, + LastUpdated: c.LastUpdated, + PriceSource: c.PriceSource, + }) + } + return &CompositePriceState{PriceSources: priceSources} +} + +func (cps *CompositePriceState) IntoProto() *vega.CompositePriceState { + priceSources := make([]*vega.CompositePriceSource, 0, len(cps.PriceSources)) + for _, c := range cps.PriceSources { + priceSources = append(priceSources, &vega.CompositePriceSource{ + Price: num.UintToString(c.Price), + LastUpdated: c.LastUpdated, + PriceSource: c.PriceSource, + }) + } + return &vega.CompositePriceState{ + PriceSources: priceSources, + } +} + +type CompositePriceConfiguration struct { + DecayWeight num.Decimal + DecayPower num.Decimal + CashAmount *num.Uint + SourceWeights []num.Decimal + SourceStalenessTolerance []time.Duration + CompositePriceType CompositePriceType + DataSources []*datasource.Spec + SpecBindingForCompositePrice []*datasource.SpecBindingForCompositePrice +} + +func (mpc *CompositePriceConfiguration) String() string { + weights := "[" + for _, d := range mpc.SourceWeights { + weights += d.String() + "," + } + weights += "]" + stalenessTolerance := "[" + for _, d := range mpc.SourceStalenessTolerance { + stalenessTolerance += d.String() + "," + } + stalenessTolerance += "]" + + return fmt.Sprintf( + "decayWeight(%s), decayPower(%s), cashAmount(%s), CompositePriceType(%s), weights(%s), stalenessTolerance(%s)", + mpc.DecayWeight.String(), + mpc.DecayPower.String(), + mpc.CashAmount.String(), + mpc.CompositePriceType.String(), + weights, + stalenessTolerance, + ) +} + +func (mpc *CompositePriceConfiguration) DeepClone() *CompositePriceConfiguration { + weights := make([]num.Decimal, 0, len(mpc.SourceWeights)) + weights = append(weights, mpc.SourceWeights...) + stalenessTolerance := make([]time.Duration, 0, len(mpc.SourceStalenessTolerance)) + stalenessTolerance = append(stalenessTolerance, mpc.SourceStalenessTolerance...) + sources := make([]*datasource.Spec, 0, len(mpc.DataSources)) + for _, s := range mpc.DataSources { + definition := s.GetDefinition() + definition = *definition.DeepClone().(*dsdefinition.Definition) + spec := &datasource.Spec{} + sources = append(sources, spec.FromDefinition(&definition)) + } + bindings := make([]*datasource.SpecBindingForCompositePrice, 0, len(mpc.SpecBindingForCompositePrice)) + bindings = append(bindings, mpc.SpecBindingForCompositePrice...) + + return &CompositePriceConfiguration{ + DecayWeight: mpc.DecayWeight, + DecayPower: mpc.DecayPower, + CashAmount: mpc.CashAmount.Clone(), + CompositePriceType: mpc.CompositePriceType, + SourceWeights: weights, + SourceStalenessTolerance: stalenessTolerance, + DataSources: sources, + SpecBindingForCompositePrice: bindings, + } +} + +func (mpc *CompositePriceConfiguration) IntoProto() *vegapb.CompositePriceConfiguration { + if mpc == nil { + return nil + } + var weights []string + if len(mpc.SourceWeights) > 0 { + weights = make([]string, 0, len(mpc.SourceWeights)) + for _, d := range mpc.SourceWeights { + weights = append(weights, d.String()) + } + } + var stalenessTolerance []string + if len(mpc.SourceStalenessTolerance) > 0 { + stalenessTolerance = make([]string, 0, len(mpc.SourceStalenessTolerance)) + for _, d := range mpc.SourceStalenessTolerance { + stalenessTolerance = append(stalenessTolerance, d.String()) + } + } + var specs []*vegapb.DataSourceDefinition + if len(mpc.DataSources) > 0 { + specs = make([]*vegapb.DataSourceDefinition, 0, len(mpc.DataSources)) + for _, source := range mpc.DataSources { + specs = append(specs, source.Data.IntoProto()) + } + } + var bindings []*vegapb.SpecBindingForCompositePrice + if len(mpc.SpecBindingForCompositePrice) > 0 { + bindings = make([]*vegapb.SpecBindingForCompositePrice, 0, len(mpc.SpecBindingForCompositePrice)) + for _, binding := range mpc.SpecBindingForCompositePrice { + bindings = append(bindings, binding.IntoProto()) + } + } + config := &vegapb.CompositePriceConfiguration{ + DecayWeight: mpc.DecayWeight.String(), + DecayPower: uint64(mpc.DecayPower.IntPart()), + CashAmount: mpc.CashAmount.String(), + CompositePriceType: mpc.CompositePriceType, + SourceWeights: weights, + SourceStalenessTolerance: stalenessTolerance, + DataSourcesSpec: specs, + DataSourcesSpecBinding: bindings, + } + + return config +} + +func CompositePriceConfigurationFromProto(mpc *vegapb.CompositePriceConfiguration) *CompositePriceConfiguration { + if mpc == nil { + return nil + } + weights := make([]num.Decimal, 0, len(mpc.SourceWeights)) + stalenessTolerance := make([]time.Duration, 0, len(mpc.SourceStalenessTolerance)) + decayWeight, _ := num.DecimalFromString(mpc.DecayWeight) + decayPower := num.DecimalFromInt64(int64(mpc.DecayPower)) + cashAmount, _ := num.UintFromString(mpc.CashAmount, 10) + for _, v := range mpc.SourceWeights { + weights = append(weights, num.MustDecimalFromString(v)) + } + if len(weights) == 0 { + weights = nil + } + for _, v := range mpc.SourceStalenessTolerance { + dur, _ := time.ParseDuration(v) + stalenessTolerance = append(stalenessTolerance, dur) + } + if len(stalenessTolerance) == 0 { + stalenessTolerance = nil + } + + dataSources := make([]*datasource.Spec, 0, len(mpc.DataSourcesSpec)) + for _, spec := range mpc.DataSourcesSpec { + specDef, err := definition.FromProto(spec, nil) + if err != nil { + return nil + } + dataSources = append(dataSources, datasource.SpecFromDefinition(*definition.NewWith(specDef))) + } + + binding := make([]*datasource.SpecBindingForCompositePrice, 0, len(mpc.DataSourcesSpecBinding)) + for _, spec := range mpc.DataSourcesSpecBinding { + binding = append(binding, datasource.SpecBindingForCompositePriceFromProto(spec)) + } + + return &CompositePriceConfiguration{ + DecayWeight: decayWeight, + DecayPower: decayPower, + CashAmount: cashAmount, + CompositePriceType: mpc.CompositePriceType, + SourceWeights: weights, + SourceStalenessTolerance: stalenessTolerance, + DataSources: dataSources, + SpecBindingForCompositePrice: binding, + } +} + type NewMarketConfiguration struct { Instrument *InstrumentConfiguration DecimalPlaces uint64 @@ -156,6 +391,7 @@ type NewMarketConfiguration struct { PriceMonitoringParameters *PriceMonitoringParameters LiquidityMonitoringParameters *LiquidityMonitoringParameters LiquiditySLAParameters *LiquiditySLAParams + LiquidityFeeSettings *LiquidityFeeSettings RiskParameters newRiskParams LinearSlippageFactor num.Decimal @@ -173,6 +409,8 @@ type NewMarketConfiguration struct { // *NewMarketConfiguration_Continuous // *NewMarketConfiguration_Discrete // TradingMode isNewMarketConfiguration_TradingMode `protobuf_oneof:"trading_mode"` + LiquidationStrategy *LiquidationStrategy + MarkPriceConfiguration *CompositePriceConfiguration } func (n NewMarketConfiguration) IntoProto() *vegapb.NewMarketConfiguration { @@ -198,6 +436,15 @@ func (n NewMarketConfiguration) IntoProto() *vegapb.NewMarketConfiguration { liquiditySLAParameters = n.LiquiditySLAParameters.IntoProto() } + var liquidityFeeSettings *vegapb.LiquidityFeeSettings + if n.LiquidityFeeSettings != nil { + liquidityFeeSettings = n.LiquidityFeeSettings.IntoProto() + } + var liqStrat *vegapb.LiquidationStrategy + if n.LiquidationStrategy != nil { + liqStrat = n.LiquidationStrategy.IntoProto() + } + r := &vegapb.NewMarketConfiguration{ Instrument: instrument, DecimalPlaces: n.DecimalPlaces, @@ -207,7 +454,9 @@ func (n NewMarketConfiguration) IntoProto() *vegapb.NewMarketConfiguration { LiquidityMonitoringParameters: liquidityMonitoring, LiquiditySlaParameters: liquiditySLAParameters, LinearSlippageFactor: n.LinearSlippageFactor.String(), - QuadraticSlippageFactor: n.QuadraticSlippageFactor.String(), + LiquidityFeeSettings: liquidityFeeSettings, + LiquidationStrategy: liqStrat, + MarkPriceConfiguration: n.MarkPriceConfiguration.IntoProto(), } if n.Successor != nil { r.Successor = n.Successor.IntoProto() @@ -249,21 +498,28 @@ func (n NewMarketConfiguration) DeepClone() *NewMarketConfiguration { cs := *n.Successor cpy.Successor = &cs } + if n.LiquidationStrategy != nil { + cpy.LiquidationStrategy = n.LiquidationStrategy.DeepClone() + } + if n.MarkPriceConfiguration != nil { + cpy.MarkPriceConfiguration = n.MarkPriceConfiguration.DeepClone() + } return cpy } func (n NewMarketConfiguration) String() string { return fmt.Sprintf( - "decimalPlaces(%v) positionDecimalPlaces(%v) metadata(%v) instrument(%s) priceMonitoring(%s) liquidityMonitoring(%s) risk(%s) linearSlippageFactor(%s) quadraticSlippageFactor(%s)", + "decimalPlaces(%v) positionDecimalPlaces(%v) metadata(%v) instrument(%s) priceMonitoring(%s) liquidityMonitoring(%s) risk(%s) linearSlippageFactor(%s) quadraticSlippageFactor(%s), CompositePriceConfiguration(%s)", n.Metadata, n.DecimalPlaces, n.PositionDecimalPlaces, - stringer.ReflectPointerToString(n.Instrument), - stringer.ReflectPointerToString(n.PriceMonitoringParameters), - stringer.ReflectPointerToString(n.LiquidityMonitoringParameters), - stringer.ReflectPointerToString(n.RiskParameters), + stringer.PtrToString(n.Instrument), + stringer.PtrToString(n.PriceMonitoringParameters), + stringer.PtrToString(n.LiquidityMonitoringParameters), + stringer.ObjToString(n.RiskParameters), n.LinearSlippageFactor.String(), n.QuadraticSlippageFactor.String(), + stringer.PtrToString(n.MarkPriceConfiguration), ) } @@ -326,16 +582,23 @@ func NewMarketConfigurationFromProto(p *vegapb.NewMarketConfiguration) (*NewMark liquiditySLAParameters = LiquiditySLAParamsFromProto(p.LiquiditySlaParameters) } - if len(p.LinearSlippageFactor) == 0 || len(p.QuadraticSlippageFactor) == 0 { + if len(p.LinearSlippageFactor) == 0 { return nil, ErrMissingSlippageFactor } linearSlippageFactor, err := num.DecimalFromString(p.LinearSlippageFactor) if err != nil { return nil, fmt.Errorf("error getting new market configuration from proto: %w", err) } - quadraticSlippageFactor, err := num.DecimalFromString(p.QuadraticSlippageFactor) - if err != nil { - return nil, fmt.Errorf("error getting new market configuration from proto: %w", err) + var liqStrat *LiquidationStrategy + if p.LiquidationStrategy != nil { + if liqStrat, err = LiquidationStrategyFromProto(p.LiquidationStrategy); err != nil { + return nil, fmt.Errorf("error getting the liquidation strategy from proto: %w", err) + } + } + + var markPriceConfig *CompositePriceConfiguration + if p.MarkPriceConfiguration != nil { + markPriceConfig = CompositePriceConfigurationFromProto(p.MarkPriceConfiguration) } r := &NewMarketConfiguration{ @@ -347,7 +610,10 @@ func NewMarketConfigurationFromProto(p *vegapb.NewMarketConfiguration) (*NewMark LiquidityMonitoringParameters: liquidityMonitoring, LiquiditySLAParameters: liquiditySLAParameters, LinearSlippageFactor: linearSlippageFactor, - QuadraticSlippageFactor: quadraticSlippageFactor, + LiquidityFeeSettings: LiquidityFeeSettingsFromProto(p.LiquidityFeeSettings), + QuadraticSlippageFactor: num.DecimalZero(), + LiquidationStrategy: liqStrat, + MarkPriceConfiguration: markPriceConfig, } if p.RiskParameters != nil { switch rp := p.RiskParameters.(type) { @@ -402,7 +668,7 @@ type NewMarketConfigurationSimple struct { func (n NewMarketConfigurationSimple) String() string { return fmt.Sprintf( "simple(%s)", - stringer.ReflectPointerToString(n.Simple), + stringer.PtrToString(n.Simple), ) } @@ -457,7 +723,7 @@ func (n NewMarketConfigurationLogNormal) newRiskParamsIntoProto() interface{} { func (n NewMarketConfigurationLogNormal) String() string { return fmt.Sprintf( "logNormal(%s)", - stringer.ReflectPointerToString(n.LogNormal), + stringer.PtrToString(n.LogNormal), ) } @@ -487,7 +753,7 @@ type InstrumentConfigurationFuture struct { func (i InstrumentConfigurationFuture) String() string { return fmt.Sprintf( "future(%s)", - stringer.ReflectPointerToString(i.Future), + stringer.PtrToString(i.Future), ) } @@ -527,7 +793,7 @@ type InstrumentConfigurationPerps struct { func (i InstrumentConfigurationPerps) String() string { return fmt.Sprintf( "perps(%s)", - stringer.ReflectPointerToString(i.Perps), + stringer.PtrToString(i.Perps), ) } @@ -602,7 +868,7 @@ func (i InstrumentConfiguration) String() string { "name(%s) code(%s) product(%s)", i.Name, i.Code, - stringer.ReflectPointerToString(i.Product), + stringer.ObjToString(i.Product), ) } @@ -659,6 +925,36 @@ func InstrumentConfigurationFromProto( return nil, fmt.Errorf("failed to parse clamp upper bound: %w", err) } + var scalingFactor, lowerBound, upperBound *num.Decimal + if pr.Perpetual.FundingRateScalingFactor != nil { + d, err := num.DecimalFromString(*pr.Perpetual.FundingRateScalingFactor) + if err != nil { + return nil, fmt.Errorf("failed to parse funding rate scaling factor: %w", err) + } + scalingFactor = &d + } + + if pr.Perpetual.FundingRateLowerBound != nil { + d, err := num.DecimalFromString(*pr.Perpetual.FundingRateLowerBound) + if err != nil { + return nil, fmt.Errorf("failed to parse funding rate lower bound: %w", err) + } + lowerBound = &d + } + + if pr.Perpetual.FundingRateUpperBound != nil { + d, err := num.DecimalFromString(*pr.Perpetual.FundingRateUpperBound) + if err != nil { + return nil, fmt.Errorf("failed to parse funding rate lower bound: %w", err) + } + upperBound = &d + } + + var ipc *CompositePriceConfiguration + if pr.Perpetual.InternalCompositePriceConfiguration != nil { + ipc = CompositePriceConfigurationFromProto(pr.Perpetual.InternalCompositePriceConfiguration) + } + r.Product = &InstrumentConfigurationPerps{ Perps: &PerpsProduct{ SettlementAsset: pr.Perpetual.SettlementAsset, @@ -667,9 +963,13 @@ func InstrumentConfigurationFromProto( InterestRate: interestRate, ClampLowerBound: clampLowerBound, ClampUpperBound: clampUpperBound, + FundingRateScalingFactor: scalingFactor, + FundingRateLowerBound: lowerBound, + FundingRateUpperBound: upperBound, DataSourceSpecForSettlementData: *datasource.NewDefinitionWith(settlement), DataSourceSpecForSettlementSchedule: *datasource.NewDefinitionWith(settlementSchedule), DataSourceSpecBinding: datasource.SpecBindingForPerpsFromProto(pr.Perpetual.DataSourceSpecBinding), + InternalCompositePriceConfig: ipc, }, } case *vegapb.InstrumentConfiguration_Spot: @@ -717,9 +1017,9 @@ func (f FutureProduct) String() string { "quote(%s) settlementAsset(%s) settlementData(%s) tradingTermination(%s) binding(%s)", f.QuoteName, f.SettlementAsset, - stringer.ReflectPointerToString(f.DataSourceSpecForSettlementData), - stringer.ReflectPointerToString(f.DataSourceSpecForTradingTermination), - stringer.ReflectPointerToString(f.DataSourceSpecBinding), + stringer.ObjToString(f.DataSourceSpecForSettlementData), + stringer.ObjToString(f.DataSourceSpecForTradingTermination), + stringer.PtrToString(f.DataSourceSpecBinding), ) } @@ -736,12 +1036,38 @@ type PerpsProduct struct { ClampLowerBound num.Decimal ClampUpperBound num.Decimal + FundingRateScalingFactor *num.Decimal + FundingRateLowerBound *num.Decimal + FundingRateUpperBound *num.Decimal + DataSourceSpecForSettlementData dsdefinition.Definition DataSourceSpecForSettlementSchedule dsdefinition.Definition DataSourceSpecBinding *datasource.SpecBindingForPerps + + InternalCompositePriceConfig *CompositePriceConfiguration } func (p PerpsProduct) IntoProto() *vegapb.PerpetualProduct { + var scalingFactor *string + if p.FundingRateScalingFactor != nil { + scalingFactor = ptr.From(p.FundingRateScalingFactor.String()) + } + + var upperBound *string + if p.FundingRateUpperBound != nil { + upperBound = ptr.From(p.FundingRateUpperBound.String()) + } + + var lowerBound *string + if p.FundingRateLowerBound != nil { + lowerBound = ptr.From(p.FundingRateLowerBound.String()) + } + + var ipc *vegapb.CompositePriceConfiguration + if p.InternalCompositePriceConfig != nil { + ipc = p.InternalCompositePriceConfig.IntoProto() + } + return &vegapb.PerpetualProduct{ SettlementAsset: p.SettlementAsset, QuoteName: p.QuoteName, @@ -749,13 +1075,21 @@ func (p PerpsProduct) IntoProto() *vegapb.PerpetualProduct { InterestRate: p.InterestRate.String(), ClampLowerBound: p.ClampLowerBound.String(), ClampUpperBound: p.ClampUpperBound.String(), + FundingRateScalingFactor: scalingFactor, + FundingRateLowerBound: lowerBound, + FundingRateUpperBound: upperBound, DataSourceSpecForSettlementData: p.DataSourceSpecForSettlementData.IntoProto(), DataSourceSpecForSettlementSchedule: p.DataSourceSpecForSettlementSchedule.IntoProto(), DataSourceSpecBinding: p.DataSourceSpecBinding.IntoProto(), + InternalCompositePriceConfiguration: ipc, } } func (p PerpsProduct) DeepClone() *PerpsProduct { + var ipc *CompositePriceConfiguration + if p.InternalCompositePriceConfig != nil { + ipc = p.InternalCompositePriceConfig.DeepClone() + } return &PerpsProduct{ SettlementAsset: p.SettlementAsset, QuoteName: p.QuoteName, @@ -763,24 +1097,29 @@ func (p PerpsProduct) DeepClone() *PerpsProduct { InterestRate: p.InterestRate, ClampLowerBound: p.ClampLowerBound, ClampUpperBound: p.ClampUpperBound, + FundingRateScalingFactor: p.FundingRateScalingFactor, + FundingRateLowerBound: p.FundingRateLowerBound, + FundingRateUpperBound: p.FundingRateUpperBound, DataSourceSpecForSettlementData: *p.DataSourceSpecForSettlementData.DeepClone().(*dsdefinition.Definition), DataSourceSpecForSettlementSchedule: *p.DataSourceSpecForSettlementSchedule.DeepClone().(*dsdefinition.Definition), DataSourceSpecBinding: p.DataSourceSpecBinding.DeepClone(), + InternalCompositePriceConfig: ipc, } } func (p PerpsProduct) String() string { return fmt.Sprintf( - "quote(%s) settlementAsset(%s) marginFundingFactor(%s) interestRate(%s) clampLowerBound(%s) clampUpperBound(%s) settlementData(%s) settlementSchedule(%s) binding(%s)", + "quote(%s) settlementAsset(%s) marginFundingFactor(%s) interestRate(%s) clampLowerBound(%s) clampUpperBound(%s) settlementData(%s) settlementSchedule(%s) binding(%s) internalCompositePriceConfig(%s)", p.QuoteName, p.SettlementAsset, p.MarginFundingFactor.String(), p.InterestRate.String(), p.ClampLowerBound.String(), p.ClampUpperBound.String(), - stringer.ReflectPointerToString(p.DataSourceSpecForSettlementData), - stringer.ReflectPointerToString(p.DataSourceSpecForSettlementSchedule), - stringer.ReflectPointerToString(p.DataSourceSpecBinding), + stringer.ObjToString(p.DataSourceSpecForSettlementData), + stringer.ObjToString(p.DataSourceSpecForSettlementSchedule), + stringer.PtrToString(p.DataSourceSpecBinding), + stringer.PtrToString(p.InternalCompositePriceConfig), ) } diff --git a/core/types/governance_new_market_test.go b/core/types/governance_new_market_test.go index 56b02b6e75..18d961afbf 100644 --- a/core/types/governance_new_market_test.go +++ b/core/types/governance_new_market_test.go @@ -24,6 +24,7 @@ import ( vegapb "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" v1 "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/require" ) @@ -136,8 +137,6 @@ func TestNewMarketProposalMapping(t *testing.T) { TimeWindow: 10, ScalingFactor: 0.1, }, - TriggeringRatio: "0.01", - AuctionExtension: 1, }, RiskParameters: &vegapb.NewMarketConfiguration_Simple{ Simple: &vegapb.SimpleModelParams{ @@ -148,9 +147,8 @@ func TestNewMarketProposalMapping(t *testing.T) { ProbabilityOfTrading: 0.96, }, }, - PositionDecimalPlaces: 1, - LinearSlippageFactor: "0.1", - QuadraticSlippageFactor: "0.0001", + PositionDecimalPlaces: 1, + LinearSlippageFactor: "0.1", Successor: &vegapb.SuccessorConfiguration{ ParentMarketId: parentID, InsurancePoolFraction: insFraction.String(), @@ -161,6 +159,12 @@ func TestNewMarketProposalMapping(t *testing.T) { PerformanceHysteresisEpochs: 4, SlaCompetitionFactor: "0.5", }, + LiquidationStrategy: &vegapb.LiquidationStrategy{ + DisposalTimeStep: 300, + DisposalFraction: "0.1", + FullDisposalSize: 20, + MaxFractionConsumed: "0.01", + }, }, }, }, diff --git a/core/types/governance_new_spot_market.go b/core/types/governance_new_spot_market.go index e6451e5585..e69c146157 100644 --- a/core/types/governance_new_spot_market.go +++ b/core/types/governance_new_spot_market.go @@ -30,27 +30,29 @@ type ProposalTermsNewSpotMarket struct { func (a ProposalTermsNewSpotMarket) String() string { return fmt.Sprintf( "newSpotMarket(%s)", - stringer.ReflectPointerToString(a.NewSpotMarket), + stringer.PtrToString(a.NewSpotMarket), ) } -func (a ProposalTermsNewSpotMarket) IntoProto() *vegapb.ProposalTerms_NewSpotMarket { +func (a ProposalTermsNewSpotMarket) isPTerm() {} + +func (a ProposalTermsNewSpotMarket) oneOfSingleProto() vegapb.ProposalOneOffTermChangeType { return &vegapb.ProposalTerms_NewSpotMarket{ NewSpotMarket: a.NewSpotMarket.IntoProto(), } } -func (a ProposalTermsNewSpotMarket) isPTerm() {} - -func (a ProposalTermsNewSpotMarket) oneOfProto() interface{} { - return a.IntoProto() +func (a ProposalTermsNewSpotMarket) oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType { + return &vegapb.BatchProposalTermsChange_NewSpotMarket{ + NewSpotMarket: a.NewSpotMarket.IntoProto(), + } } func (a ProposalTermsNewSpotMarket) GetTermType() ProposalTermsType { return ProposalTermsTypeNewSpotMarket } -func (a ProposalTermsNewSpotMarket) DeepClone() proposalTerm { +func (a ProposalTermsNewSpotMarket) DeepClone() ProposalTerm { if a.NewSpotMarket == nil { return &ProposalTermsNewSpotMarket{} } @@ -59,14 +61,14 @@ func (a ProposalTermsNewSpotMarket) DeepClone() proposalTerm { } } -func NewNewSpotMarketFromProto(p *vegapb.ProposalTerms_NewSpotMarket) (*ProposalTermsNewSpotMarket, error) { +func NewNewSpotMarketFromProto(newSpotMarketProto *vegapb.NewSpotMarket) (*ProposalTermsNewSpotMarket, error) { var newSpotMarket *NewSpotMarket - if p.NewSpotMarket != nil { + if newSpotMarketProto != nil { newSpotMarket = &NewSpotMarket{} - if p.NewSpotMarket.Changes != nil { + if newSpotMarketProto.Changes != nil { var err error - newSpotMarket.Changes, err = NewSpotMarketConfigurationFromProto(p.NewSpotMarket.Changes) + newSpotMarket.Changes, err = NewSpotMarketConfigurationFromProto(newSpotMarketProto.Changes) if err != nil { return nil, err } @@ -103,7 +105,7 @@ func (n NewSpotMarket) DeepClone() *NewSpotMarket { func (n NewSpotMarket) String() string { return fmt.Sprintf( "changes(%s)", - stringer.ReflectPointerToString(n.Changes), + stringer.PtrToString(n.Changes), ) } @@ -116,6 +118,7 @@ type NewSpotMarketConfiguration struct { TargetStakeParameters *TargetStakeParameters RiskParameters newRiskParams SLAParams *LiquiditySLAParams + LiquidityFeeSettings *LiquidityFeeSettings // New market risk model parameters // @@ -157,6 +160,7 @@ func (n NewSpotMarketConfiguration) IntoProto() *vegapb.NewSpotMarketConfigurati PriceMonitoringParameters: priceMonitoring, TargetStakeParameters: targetStakeParameters, SlaParams: n.SLAParams.IntoProto(), + LiquidityFeeSettings: n.LiquidityFeeSettings.IntoProto(), } switch rp := riskParams.(type) { case *vegapb.NewSpotMarketConfiguration_Simple: @@ -187,6 +191,9 @@ func (n NewSpotMarketConfiguration) DeepClone() *NewSpotMarketConfiguration { if n.RiskParameters != nil { cpy.RiskParameters = n.RiskParameters.DeepClone() } + if n.LiquidityFeeSettings != nil { + cpy.LiquidityFeeSettings = n.LiquidityFeeSettings.DeepClone() + } return cpy } @@ -196,11 +203,11 @@ func (n NewSpotMarketConfiguration) String() string { n.Metadata, n.DecimalPlaces, n.PositionDecimalPlaces, - stringer.ReflectPointerToString(n.Instrument), - stringer.ReflectPointerToString(n.PriceMonitoringParameters), - stringer.ReflectPointerToString(n.TargetStakeParameters), - stringer.ReflectPointerToString(n.RiskParameters), - stringer.ReflectPointerToString(n.SLAParams), + stringer.PtrToString(n.Instrument), + stringer.PtrToString(n.PriceMonitoringParameters), + stringer.PtrToString(n.TargetStakeParameters), + stringer.ObjToString(n.RiskParameters), + stringer.PtrToString(n.SLAParams), ) } @@ -228,6 +235,11 @@ func NewSpotMarketConfigurationFromProto(p *vegapb.NewSpotMarketConfiguration) ( slaParams = LiquiditySLAParamsFromProto(p.SlaParams) } + var liquidityFeeSettings *LiquidityFeeSettings + if p.LiquidityFeeSettings != nil { + liquidityFeeSettings = LiquidityFeeSettingsFromProto(p.LiquidityFeeSettings) + } + r := &NewSpotMarketConfiguration{ Instrument: instrument, DecimalPlaces: p.DecimalPlaces, @@ -236,6 +248,7 @@ func NewSpotMarketConfigurationFromProto(p *vegapb.NewSpotMarketConfiguration) ( PriceMonitoringParameters: priceMonitoring, TargetStakeParameters: targetStakeParams, SLAParams: slaParams, + LiquidityFeeSettings: liquidityFeeSettings, } if p.RiskParameters != nil { switch rp := p.RiskParameters.(type) { @@ -255,7 +268,7 @@ type NewSpotMarketConfigurationSimple struct { func (n NewSpotMarketConfigurationSimple) String() string { return fmt.Sprintf( "simple(%s)", - stringer.ReflectPointerToString(n.Simple), + stringer.PtrToString(n.Simple), ) } @@ -310,7 +323,7 @@ func (n NewSpotMarketConfigurationLogNormal) newRiskParamsIntoProto() interface{ func (n NewSpotMarketConfigurationLogNormal) String() string { return fmt.Sprintf( "logNormal(%s)", - stringer.ReflectPointerToString(n.LogNormal), + stringer.PtrToString(n.LogNormal), ) } @@ -331,7 +344,7 @@ type InstrumentConfigurationSpot struct { func (i InstrumentConfigurationSpot) String() string { return fmt.Sprintf( "spot(%s)", - stringer.ReflectPointerToString(i.Spot), + stringer.PtrToString(i.Spot), ) } diff --git a/core/types/governance_new_transfer.go b/core/types/governance_new_transfer.go index cc1fc48be8..5b535dcadd 100644 --- a/core/types/governance_new_transfer.go +++ b/core/types/governance_new_transfer.go @@ -32,27 +32,29 @@ type ProposalTermsNewTransfer struct { func (a ProposalTermsNewTransfer) String() string { return fmt.Sprintf( "newTransfer(%s)", - stringer.ReflectPointerToString(a.NewTransfer), + stringer.PtrToString(a.NewTransfer), ) } -func (a ProposalTermsNewTransfer) IntoProto() *vegapb.ProposalTerms_NewTransfer { +func (a ProposalTermsNewTransfer) isPTerm() {} + +func (a ProposalTermsNewTransfer) oneOfSingleProto() vegapb.ProposalOneOffTermChangeType { return &vegapb.ProposalTerms_NewTransfer{ NewTransfer: a.NewTransfer.IntoProto(), } } -func (a ProposalTermsNewTransfer) isPTerm() {} - -func (a ProposalTermsNewTransfer) oneOfProto() interface{} { - return a.IntoProto() +func (a ProposalTermsNewTransfer) oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType { + return &vegapb.BatchProposalTermsChange_NewTransfer{ + NewTransfer: a.NewTransfer.IntoProto(), + } } func (a ProposalTermsNewTransfer) GetTermType() ProposalTermsType { return ProposalTermsTypeNewTransfer } -func (a ProposalTermsNewTransfer) DeepClone() proposalTerm { +func (a ProposalTermsNewTransfer) DeepClone() ProposalTerm { if a.NewTransfer == nil { return &ProposalTermsNewTransfer{} } @@ -61,14 +63,14 @@ func (a ProposalTermsNewTransfer) DeepClone() proposalTerm { } } -func NewNewTransferFromProto(p *vegapb.ProposalTerms_NewTransfer) (*ProposalTermsNewTransfer, error) { +func NewNewTransferFromProto(newTransferProto *vegapb.NewTransfer) (*ProposalTermsNewTransfer, error) { var newTransfer *NewTransfer - if p.NewTransfer != nil { + if newTransferProto != nil { newTransfer = &NewTransfer{} - if p.NewTransfer.Changes != nil { + if newTransferProto.Changes != nil { var err error - newTransfer.Changes, err = NewTransferConfigurationFromProto(p.NewTransfer.Changes) + newTransfer.Changes, err = NewTransferConfigurationFromProto(newTransferProto.Changes) if err != nil { return nil, err } @@ -105,7 +107,7 @@ func (n NewTransfer) DeepClone() *NewTransfer { func (n NewTransfer) String() string { return fmt.Sprintf( "changes(%s)", - stringer.ReflectPointerToString(n.Changes), + stringer.PtrToString(n.Changes), ) } diff --git a/core/types/governance_proposal.go b/core/types/governance_proposal.go index f1c9e6a62c..0bbd445896 100644 --- a/core/types/governance_proposal.go +++ b/core/types/governance_proposal.go @@ -17,10 +17,10 @@ package types import ( "fmt" + "time" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" - "code.vegaprotocol.io/vega/libs/stringer" vegapb "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" ) @@ -125,6 +125,10 @@ const ( ProposalErrorInvalidReferralProgram ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM // ProposalErrorInvalidVolumeDiscountProgram is returned when the volume discount program proposal is not valid. ProposalErrorInvalidVolumeDiscountProgram ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM + // ProposalErrorProposalInBatchRejected is returned when one or more proposals in the batch are rejected. + ProposalErrorProposalInBatchRejected ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED + // ProposalErrorProposalInBatchDeclined is returned when one or more proposals in the batch are rejected. + ProposalErrorProposalInBatchDeclined ProposalError = vegapb.ProposalError_PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED ) type ProposalState = vegapb.Proposal_State @@ -217,8 +221,188 @@ func NewProposalSubmissionFromProto(p *commandspb.ProposalSubmission) (*Proposal }, nil } +// ProposalParameters stores proposal specific parameters. +type ProposalParameters struct { + MinClose time.Duration + MaxClose time.Duration + MinEnact time.Duration + MaxEnact time.Duration + RequiredParticipation num.Decimal + RequiredMajority num.Decimal + MinProposerBalance *num.Uint + MinVoterBalance *num.Uint + RequiredParticipationLP num.Decimal + RequiredMajorityLP num.Decimal + MinEquityLikeShare num.Decimal +} + +func ProposalParametersFromProto(pp *vegapb.ProposalParameters) *ProposalParameters { + return &ProposalParameters{ + MinClose: time.Duration(pp.MinClose), + MaxClose: time.Duration(pp.MaxClose), + MinEnact: time.Duration(pp.MinEnact), + MaxEnact: time.Duration(pp.MaxEnact), + RequiredParticipation: num.MustDecimalFromString(pp.RequiredParticipation), + RequiredMajority: num.MustDecimalFromString(pp.RequiredMajority), + MinProposerBalance: num.MustUintFromString(pp.MinProposerBalance, 10), + MinVoterBalance: num.MustUintFromString(pp.MinVoterBalance, 10), + RequiredParticipationLP: num.MustDecimalFromString(pp.RequiredParticipationLp), + RequiredMajorityLP: num.MustDecimalFromString(pp.RequiredMajorityLp), + MinEquityLikeShare: num.MustDecimalFromString(pp.MinEquityLikeShare), + } +} + +func (pp *ProposalParameters) Clone() ProposalParameters { + copy := *pp + + copy.MinProposerBalance = pp.MinProposerBalance.Clone() + copy.MinVoterBalance = pp.MinVoterBalance.Clone() + return copy +} + +func (pp *ProposalParameters) ToProto() *vegapb.ProposalParameters { + return &vegapb.ProposalParameters{ + MinClose: int64(pp.MinClose), + MaxClose: int64(pp.MaxClose), + MinEnact: int64(pp.MinEnact), + MaxEnact: int64(pp.MaxEnact), + RequiredParticipation: pp.RequiredParticipation.String(), + RequiredMajority: pp.RequiredMajority.String(), + MinProposerBalance: pp.MinProposerBalance.String(), + MinVoterBalance: pp.MinVoterBalance.String(), + RequiredParticipationLp: pp.RequiredParticipationLP.String(), + RequiredMajorityLp: pp.RequiredMajorityLP.String(), + MinEquityLikeShare: pp.MinEquityLikeShare.String(), + } +} + +type BatchProposal struct { + ID string + Reference string + Party string + State ProposalState + Timestamp int64 + ClosingTimestamp int64 + Proposals []*Proposal + Rationale *ProposalRationale + Reason ProposalError + ErrorDetails string + ProposalParameters *ProposalParameters +} + +func BatchProposalFromSnapshotProto(bp *vegapb.Proposal, pps []*vegapb.Proposal) *BatchProposal { + proposals := make([]*Proposal, 0, len(pps)) + + for _, pp := range pps { + proposal, _ := ProposalFromProto(pp) + proposals = append(proposals, proposal) + } + + return &BatchProposal{ + ID: bp.Id, + Reference: bp.Reference, + Party: bp.PartyId, + State: bp.State, + Timestamp: bp.Timestamp, + ClosingTimestamp: bp.BatchTerms.ClosingTimestamp, + Rationale: ProposalRationaleFromProto(bp.Rationale), + Reason: *bp.Reason, + ProposalParameters: ProposalParametersFromProto(bp.BatchTerms.ProposalParams), + Proposals: proposals, + } +} + +func (bp BatchProposal) ToProto() *vegapb.Proposal { + batchTerms := &vegapb.BatchProposalTerms{ + ClosingTimestamp: bp.ClosingTimestamp, + ProposalParams: bp.ProposalParameters.ToProto(), + } + + for _, proposal := range bp.Proposals { + batchTerms.Changes = append(batchTerms.Changes, &vegapb.BatchProposalTermsChange{ + Change: proposal.Terms.Change.oneOfBatchProto(), + EnactmentTimestamp: proposal.Terms.EnactmentTimestamp, + }) + } + + return &vegapb.Proposal{ + Id: bp.ID, + Reference: bp.Reference, + PartyId: bp.Party, + State: bp.State, + Timestamp: bp.Timestamp, + Reason: &bp.Reason, + ErrorDetails: &bp.ErrorDetails, + Rationale: bp.Rationale.ToProto(), + BatchTerms: batchTerms, + } +} + +// SetProposalParams set specific per proposal parameters and chooses the most aggressive ones. +func (bp *BatchProposal) SetProposalParams(params ProposalParameters) { + if bp.ProposalParameters == nil { + bp.ProposalParameters = ¶ms + bp.ProposalParameters.MaxEnact = 0 + bp.ProposalParameters.MinEnact = 0 + return + } + + if bp.ProposalParameters.MaxClose > params.MaxClose { + bp.ProposalParameters.MaxClose = params.MaxClose + } + + if bp.ProposalParameters.MinClose < params.MinClose { + bp.ProposalParameters.MinClose = params.MinClose + } + + if bp.ProposalParameters.MinEquityLikeShare.LessThan(params.MinEquityLikeShare) { + bp.ProposalParameters.MinEquityLikeShare = params.MinEquityLikeShare + } + + if bp.ProposalParameters.MinProposerBalance.LT(params.MinProposerBalance) { + bp.ProposalParameters.MinProposerBalance = params.MinProposerBalance.Clone() + } + + if bp.ProposalParameters.MinVoterBalance.LT(params.MinVoterBalance) { + bp.ProposalParameters.MinVoterBalance = params.MinVoterBalance.Clone() + } + + if bp.ProposalParameters.RequiredMajority.LessThan(params.RequiredMajority) { + bp.ProposalParameters.RequiredMajority = params.RequiredMajority + } + + if bp.ProposalParameters.RequiredMajorityLP.LessThan(params.RequiredMajorityLP) { + bp.ProposalParameters.RequiredMajorityLP = params.RequiredMajorityLP + } + + if bp.ProposalParameters.RequiredParticipation.LessThan(params.RequiredParticipation) { + bp.ProposalParameters.RequiredParticipation = params.RequiredParticipation + } + + if bp.ProposalParameters.RequiredParticipationLP.LessThan(params.RequiredParticipationLP) { + bp.ProposalParameters.RequiredParticipationLP = params.RequiredParticipationLP + } +} + +func (bp *BatchProposal) RejectWithErr(reason ProposalError, details error) { + bp.ErrorDetails = details.Error() + bp.State = ProposalStateRejected + bp.Reason = reason + + for _, proposal := range bp.Proposals { + proposal.ErrorDetails = bp.ErrorDetails + proposal.State = bp.State + proposal.Reason = bp.Reason + } +} + +func (bp *BatchProposal) IsRejected() bool { + return bp.State == ProposalStateRejected +} + type Proposal struct { ID string + BatchID *string Reference string Party string State ProposalState @@ -233,99 +417,75 @@ type Proposal struct { RequiredLPParticipation num.Decimal } -func (p *Proposal) IsMarketStateUpdate() bool { - switch p.Terms.Change.(type) { - case *ProposalTermsUpdateMarketState: - return true - default: - return false - } +func (p Proposal) IsOpen() bool { + return p.State == ProposalStateOpen } -func (p *Proposal) IsMarketUpdate() bool { - switch p.Terms.Change.(type) { - case *ProposalTermsUpdateMarket: - return true - default: - return false - } +func (p Proposal) IsPassed() bool { + return p.State == ProposalStatePassed } -func (p *Proposal) IsSpotMarketUpdate() bool { - switch p.Terms.Change.(type) { - case *ProposalTermsUpdateSpotMarket: - return true - default: - return false - } +func (p Proposal) IsDeclined() bool { + return p.State == ProposalStateDeclined } -func (p *Proposal) IsReferralProgramUpdate() bool { - switch p.Terms.Change.(type) { - case *ProposalTermsUpdateReferralProgram: - return true - default: - return false - } +func (p Proposal) IsRejected() bool { + return p.State == ProposalStateRejected } -func (p *Proposal) IsVolumeDiscountProgramUpdate() bool { - switch p.Terms.Change.(type) { - case *ProposalTermsUpdateVolumeDiscountProgram: - return true - default: - return false - } +func (p Proposal) IsFailed() bool { + return p.State == ProposalStateFailed } -func (p *Proposal) MarketUpdate() *UpdateMarket { - switch terms := p.Terms.Change.(type) { - case *ProposalTermsUpdateMarket: - return terms.UpdateMarket - default: - return nil - } +func (p Proposal) IsEnacted() bool { + return p.State == ProposalStateEnacted } -func (p *Proposal) UpdateMarketState() *UpdateMarketState { - switch terms := p.Terms.Change.(type) { - case *ProposalTermsUpdateMarketState: - return terms.UpdateMarketState - default: - return nil - } +func (p Proposal) IsMarketUpdate() bool { + return p.Terms.IsMarketUpdate() } -func (p *Proposal) SpotMarketUpdate() *UpdateSpotMarket { - switch terms := p.Terms.Change.(type) { - case *ProposalTermsUpdateSpotMarket: - return terms.UpdateSpotMarket - default: - return nil - } +func (p Proposal) IsMarketStateUpdate() bool { + return p.Terms.IsMarketStateUpdate() } -func (p *Proposal) IsNewMarket() bool { - return p.Terms.Change.GetTermType() == ProposalTermsTypeNewMarket +func (p Proposal) IsSpotMarketUpdate() bool { + return p.Terms.IsSpotMarketUpdate() } -func (p *Proposal) NewMarket() *NewMarket { - switch terms := p.Terms.Change.(type) { - case *ProposalTermsNewMarket: - return terms.NewMarket - default: - return nil - } +func (p Proposal) IsReferralProgramUpdate() bool { + return p.Terms.IsReferralProgramUpdate() +} + +func (p Proposal) IsVolumeDiscountProgramUpdate() bool { + return p.Terms.IsVolumeDiscountProgramUpdate() +} + +func (p Proposal) MarketUpdate() *UpdateMarket { + return p.Terms.MarketUpdate() +} + +func (p Proposal) UpdateMarketState() *UpdateMarketState { + return p.Terms.UpdateMarketState() +} + +func (p Proposal) SpotMarketUpdate() *UpdateSpotMarket { + return p.Terms.SpotMarketUpdate() +} + +func (p Proposal) IsNewMarket() bool { + return p.Terms.IsNewMarket() +} + +func (p Proposal) NewMarket() *NewMarket { + return p.Terms.NewMarket() } func (p *Proposal) IsSuccessorMarket() bool { - if p.Terms == nil || p.Terms.Change == nil { + if p.Terms == nil { return false } - if nm := p.NewMarket(); nm != nil { - return nm.Changes.Successor != nil - } - return false + return p.Terms.IsSuccessorMarket() } func (p *Proposal) WaitForNodeVote() { @@ -337,6 +497,11 @@ func (p *Proposal) Reject(reason ProposalError) { p.Reason = reason } +func (p *Proposal) Decline(reason ProposalError) { + p.State = ProposalStateDeclined + p.Reason = reason +} + func (p *Proposal) RejectWithErr(reason ProposalError, details error) { p.ErrorDetails = details.Error() p.State = ProposalStateRejected @@ -366,14 +531,19 @@ func (p Proposal) DeepClone() *Proposal { } func (p Proposal) String() string { + var batchID string + if p.BatchID != nil { + batchID = *p.BatchID + } return fmt.Sprintf( - "id(%s) reference(%s) party(%s) state(%s) timestamp(%v) terms(%s) reason(%s) errorDetails(%s) requireMajority(%s) requiredParticiption(%s) requireLPMajority(%s) requiredLPParticiption(%s)", + "id(%s) batchId(%s) reference(%s) party(%s) state(%s) timestamp(%v) terms(%s) reason(%s) errorDetails(%s) requireMajority(%s) requiredParticiption(%s) requireLPMajority(%s) requiredLPParticiption(%s)", p.ID, + batchID, p.Reference, p.Party, p.State.String(), p.Timestamp, - stringer.ReflectPointerToString(p.Terms), + p.Terms, p.Reason.String(), p.ErrorDetails, p.RequiredMajority.String(), @@ -400,6 +570,7 @@ func (p Proposal) IntoProto() *vegapb.Proposal { proposal := &vegapb.Proposal{ Id: p.ID, + BatchId: p.BatchID, Reference: p.Reference, PartyId: p.Party, State: p.State, @@ -473,6 +644,7 @@ func ProposalFromProto(pp *vegapb.Proposal) (*Proposal, error) { return &Proposal{ ID: pp.Id, + BatchID: pp.BatchId, Reference: pp.Reference, Party: pp.PartyId, State: pp.State, @@ -493,6 +665,13 @@ type ProposalRationale struct { Title string } +func (pr ProposalRationale) ToProto() *vegapb.ProposalRationale { + return &vegapb.ProposalRationale{ + Description: pr.Description, + Title: pr.Title, + } +} + func ProposalRationaleFromProto(p *vegapb.ProposalRationale) *ProposalRationale { if p == nil { return nil @@ -502,237 +681,3 @@ func ProposalRationaleFromProto(p *vegapb.ProposalRationale) *ProposalRationale Title: p.Title, } } - -type ProposalTerms struct { - ClosingTimestamp int64 - EnactmentTimestamp int64 - ValidationTimestamp int64 - Change proposalTerm -} - -func (p ProposalTerms) IntoProto() *vegapb.ProposalTerms { - change := p.Change.oneOfProto() - r := &vegapb.ProposalTerms{ - ClosingTimestamp: p.ClosingTimestamp, - EnactmentTimestamp: p.EnactmentTimestamp, - ValidationTimestamp: p.ValidationTimestamp, - } - - switch ch := change.(type) { - case *vegapb.ProposalTerms_NewMarket: - r.Change = ch - case *vegapb.ProposalTerms_UpdateMarket: - r.Change = ch - case *vegapb.ProposalTerms_UpdateNetworkParameter: - r.Change = ch - case *vegapb.ProposalTerms_NewAsset: - r.Change = ch - case *vegapb.ProposalTerms_UpdateAsset: - r.Change = ch - case *vegapb.ProposalTerms_NewFreeform: - r.Change = ch - case *vegapb.ProposalTerms_NewTransfer: - r.Change = ch - case *vegapb.ProposalTerms_CancelTransfer: - r.Change = ch - case *vegapb.ProposalTerms_NewSpotMarket: - r.Change = ch - case *vegapb.ProposalTerms_UpdateSpotMarket: - r.Change = ch - case *vegapb.ProposalTerms_UpdateMarketState: - r.Change = ch - case *vegapb.ProposalTerms_UpdateReferralProgram: - r.Change = ch - case *vegapb.ProposalTerms_UpdateVolumeDiscountProgram: - r.Change = ch - } - return r -} - -func (p ProposalTerms) DeepClone() *ProposalTerms { - cpy := p - cpy.Change = p.Change.DeepClone() - return &cpy -} - -func (p ProposalTerms) String() string { - return fmt.Sprintf( - "validationTs(%v) closingTs(%v) enactmentTs(%v) change(%s)", - p.ValidationTimestamp, - p.ClosingTimestamp, - p.EnactmentTimestamp, - stringer.ReflectPointerToString(p.Change), - ) -} - -func (p *ProposalTerms) GetNewTransfer() *NewTransfer { - switch c := p.Change.(type) { - case *ProposalTermsNewTransfer: - return c.NewTransfer - default: - return nil - } -} - -func (p *ProposalTerms) GetCancelTransfer() *CancelTransfer { - switch c := p.Change.(type) { - case *ProposalTermsCancelTransfer: - return c.CancelTransfer - default: - return nil - } -} - -func (p *ProposalTerms) GetMarketStateUpdate() *UpdateMarketState { - switch c := p.Change.(type) { - case *ProposalTermsUpdateMarketState: - return c.UpdateMarketState - default: - return nil - } -} - -func (p *ProposalTerms) GetNewAsset() *NewAsset { - switch c := p.Change.(type) { - case *ProposalTermsNewAsset: - return c.NewAsset - default: - return nil - } -} - -func (p *ProposalTerms) GetUpdateAsset() *UpdateAsset { - switch c := p.Change.(type) { - case *ProposalTermsUpdateAsset: - return c.UpdateAsset - default: - return nil - } -} - -func (p *ProposalTerms) GetNewMarket() *NewMarket { - switch c := p.Change.(type) { - case *ProposalTermsNewMarket: - return c.NewMarket - default: - return nil - } -} - -func (p *ProposalTerms) GetUpdateMarket() *UpdateMarket { - switch c := p.Change.(type) { - case *ProposalTermsUpdateMarket: - return c.UpdateMarket - default: - return nil - } -} - -func (p *ProposalTerms) GetNewSpotMarket() *NewSpotMarket { - switch c := p.Change.(type) { - case *ProposalTermsNewSpotMarket: - return c.NewSpotMarket - default: - return nil - } -} - -func (p *ProposalTerms) GetUpdateSpotMarket() *UpdateSpotMarket { - switch c := p.Change.(type) { - case *ProposalTermsUpdateSpotMarket: - return c.UpdateSpotMarket - default: - return nil - } -} - -func (p *ProposalTerms) GetUpdateVolumeDiscountProgram() *UpdateVolumeDiscountProgram { - switch c := p.Change.(type) { - case *ProposalTermsUpdateVolumeDiscountProgram: - return c.UpdateVolumeDiscountProgram - default: - return nil - } -} - -func (p *ProposalTerms) GetUpdateReferralProgram() *UpdateReferralProgram { - switch c := p.Change.(type) { - case *ProposalTermsUpdateReferralProgram: - return c.UpdateReferralProgram - default: - return nil - } -} - -func (p *ProposalTerms) GetUpdateNetworkParameter() *UpdateNetworkParameter { - switch c := p.Change.(type) { - case *ProposalTermsUpdateNetworkParameter: - return c.UpdateNetworkParameter - default: - return nil - } -} - -func (p *ProposalTerms) GetNewFreeform() *NewFreeform { - switch c := p.Change.(type) { - case *ProposalTermsNewFreeform: - return c.NewFreeform - default: - return nil - } -} - -func ProposalTermsFromProto(p *vegapb.ProposalTerms) (*ProposalTerms, error) { - var ( - change proposalTerm - err error - ) - if p.Change != nil { - switch ch := p.Change.(type) { - case *vegapb.ProposalTerms_NewMarket: - change, err = NewNewMarketFromProto(ch) - case *vegapb.ProposalTerms_UpdateMarket: - change, err = UpdateMarketFromProto(ch) - case *vegapb.ProposalTerms_UpdateNetworkParameter: - change = NewUpdateNetworkParameterFromProto(ch) - case *vegapb.ProposalTerms_NewAsset: - change, err = NewNewAssetFromProto(ch) - case *vegapb.ProposalTerms_UpdateAsset: - change, err = NewUpdateAssetFromProto(ch) - case *vegapb.ProposalTerms_NewFreeform: - change = NewNewFreeformFromProto(ch) - case *vegapb.ProposalTerms_NewSpotMarket: - change, err = NewNewSpotMarketFromProto(ch) - case *vegapb.ProposalTerms_UpdateSpotMarket: - change, err = UpdateSpotMarketFromProto(ch) - case *vegapb.ProposalTerms_NewTransfer: - change, err = NewNewTransferFromProto(ch) - case *vegapb.ProposalTerms_CancelTransfer: - change, err = NewCancelGovernanceTransferFromProto(ch) - case *vegapb.ProposalTerms_UpdateMarketState: - change, err = NewTerminateMarketFromProto(ch) - case *vegapb.ProposalTerms_UpdateReferralProgram: - change, err = NewUpdateReferralProgramProposalFromProto(ch) - case *vegapb.ProposalTerms_UpdateVolumeDiscountProgram: - change, err = NewUpdateVolumeDiscountProgramProposalFromProto(ch) - } - } - if err != nil { - return nil, err - } - - return &ProposalTerms{ - ClosingTimestamp: p.ClosingTimestamp, - EnactmentTimestamp: p.EnactmentTimestamp, - ValidationTimestamp: p.ValidationTimestamp, - Change: change, - }, nil -} - -type proposalTerm interface { - isPTerm() - oneOfProto() interface{} // calls IntoProto - DeepClone() proposalTerm - GetTermType() ProposalTermsType - String() string -} diff --git a/core/types/governance_proposal_terms.go b/core/types/governance_proposal_terms.go new file mode 100644 index 0000000000..dd92840f89 --- /dev/null +++ b/core/types/governance_proposal_terms.go @@ -0,0 +1,510 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package types + +import ( + "errors" + "fmt" + + "code.vegaprotocol.io/vega/libs/stringer" + vegapb "code.vegaprotocol.io/vega/protos/vega" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" +) + +type ProposalTerm interface { + isPTerm() + oneOfSingleProto() vegapb.ProposalOneOffTermChangeType + oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType + + DeepClone() ProposalTerm + GetTermType() ProposalTermsType + String() string +} + +type ProposalTerms struct { + ClosingTimestamp int64 + EnactmentTimestamp int64 + ValidationTimestamp int64 + Change ProposalTerm +} + +func (p *ProposalTerms) IsMarketStateUpdate() bool { + switch p.Change.(type) { + case *ProposalTermsUpdateMarketState: + return true + default: + return false + } +} + +func (p *ProposalTerms) IsMarketUpdate() bool { + switch p.Change.(type) { + case *ProposalTermsUpdateMarket: + return true + default: + return false + } +} + +func (p *ProposalTerms) IsSpotMarketUpdate() bool { + switch p.Change.(type) { + case *ProposalTermsUpdateSpotMarket: + return true + default: + return false + } +} + +func (p *ProposalTerms) IsReferralProgramUpdate() bool { + switch p.Change.(type) { + case *ProposalTermsUpdateReferralProgram: + return true + default: + return false + } +} + +func (p *ProposalTerms) IsVolumeDiscountProgramUpdate() bool { + switch p.Change.(type) { + case *ProposalTermsUpdateVolumeDiscountProgram: + return true + default: + return false + } +} + +func (p *ProposalTerms) MarketUpdate() *UpdateMarket { + switch terms := p.Change.(type) { + case *ProposalTermsUpdateMarket: + return terms.UpdateMarket + default: + return nil + } +} + +func (p *ProposalTerms) UpdateMarketState() *UpdateMarketState { + switch terms := p.Change.(type) { + case *ProposalTermsUpdateMarketState: + return terms.UpdateMarketState + default: + return nil + } +} + +func (p *ProposalTerms) SpotMarketUpdate() *UpdateSpotMarket { + switch terms := p.Change.(type) { + case *ProposalTermsUpdateSpotMarket: + return terms.UpdateSpotMarket + default: + return nil + } +} + +func (p *ProposalTerms) IsNewMarket() bool { + return p.Change.GetTermType() == ProposalTermsTypeNewMarket +} + +func (p *ProposalTerms) NewMarket() *NewMarket { + switch terms := p.Change.(type) { + case *ProposalTermsNewMarket: + return terms.NewMarket + default: + return nil + } +} + +func (p *ProposalTerms) IsSuccessorMarket() bool { + if p.Change == nil { + return false + } + if nm := p.NewMarket(); nm != nil { + return nm.Changes.Successor != nil + } + return false +} + +func (p ProposalTerms) IntoProto() *vegapb.ProposalTerms { + change := p.Change.oneOfSingleProto() + terms := &vegapb.ProposalTerms{ + ClosingTimestamp: p.ClosingTimestamp, + EnactmentTimestamp: p.EnactmentTimestamp, + ValidationTimestamp: p.ValidationTimestamp, + } + + switch ch := change.(type) { + case *vegapb.ProposalTerms_NewMarket: + terms.Change = ch + case *vegapb.ProposalTerms_UpdateMarket: + terms.Change = ch + case *vegapb.ProposalTerms_UpdateNetworkParameter: + terms.Change = ch + case *vegapb.ProposalTerms_NewAsset: + terms.Change = ch + case *vegapb.ProposalTerms_UpdateAsset: + terms.Change = ch + case *vegapb.ProposalTerms_NewFreeform: + terms.Change = ch + case *vegapb.ProposalTerms_NewTransfer: + terms.Change = ch + case *vegapb.ProposalTerms_CancelTransfer: + terms.Change = ch + case *vegapb.ProposalTerms_NewSpotMarket: + terms.Change = ch + case *vegapb.ProposalTerms_UpdateSpotMarket: + terms.Change = ch + case *vegapb.ProposalTerms_UpdateMarketState: + terms.Change = ch + case *vegapb.ProposalTerms_UpdateReferralProgram: + terms.Change = ch + case *vegapb.ProposalTerms_UpdateVolumeDiscountProgram: + terms.Change = ch + } + + return terms +} + +func (p ProposalTerms) DeepClone() *ProposalTerms { + cpy := p + cpy.Change = p.Change.DeepClone() + return &cpy +} + +func (p ProposalTerms) String() string { + return fmt.Sprintf( + "single term: validationTs(%v) closingTs(%v) enactmentTs(%v) change(%s)", + p.ValidationTimestamp, + p.ClosingTimestamp, + p.EnactmentTimestamp, + stringer.ObjToString(p.Change), + ) +} + +func (p *ProposalTerms) GetNewTransfer() *NewTransfer { + switch c := p.Change.(type) { + case *ProposalTermsNewTransfer: + return c.NewTransfer + default: + return nil + } +} + +func (p *ProposalTerms) GetCancelTransfer() *CancelTransfer { + switch c := p.Change.(type) { + case *ProposalTermsCancelTransfer: + return c.CancelTransfer + default: + return nil + } +} + +func (p *ProposalTerms) GetMarketStateUpdate() *UpdateMarketState { + switch c := p.Change.(type) { + case *ProposalTermsUpdateMarketState: + return c.UpdateMarketState + default: + return nil + } +} + +func (p *ProposalTerms) GetNewAsset() *NewAsset { + switch c := p.Change.(type) { + case *ProposalTermsNewAsset: + return c.NewAsset + default: + return nil + } +} + +func (p *ProposalTerms) GetUpdateAsset() *UpdateAsset { + switch c := p.Change.(type) { + case *ProposalTermsUpdateAsset: + return c.UpdateAsset + default: + return nil + } +} + +func (p *ProposalTerms) GetNewMarket() *NewMarket { + switch c := p.Change.(type) { + case *ProposalTermsNewMarket: + return c.NewMarket + default: + return nil + } +} + +func (p *ProposalTerms) GetUpdateMarket() *UpdateMarket { + switch c := p.Change.(type) { + case *ProposalTermsUpdateMarket: + return c.UpdateMarket + default: + return nil + } +} + +func (p *ProposalTerms) GetNewSpotMarket() *NewSpotMarket { + switch c := p.Change.(type) { + case *ProposalTermsNewSpotMarket: + return c.NewSpotMarket + default: + return nil + } +} + +func (p *ProposalTerms) GetUpdateSpotMarket() *UpdateSpotMarket { + switch c := p.Change.(type) { + case *ProposalTermsUpdateSpotMarket: + return c.UpdateSpotMarket + default: + return nil + } +} + +func (p *ProposalTerms) GetUpdateVolumeDiscountProgram() *UpdateVolumeDiscountProgram { + switch c := p.Change.(type) { + case *ProposalTermsUpdateVolumeDiscountProgram: + return c.UpdateVolumeDiscountProgram + default: + return nil + } +} + +func (p *ProposalTerms) GetUpdateReferralProgram() *UpdateReferralProgram { + switch c := p.Change.(type) { + case *ProposalTermsUpdateReferralProgram: + return c.UpdateReferralProgram + default: + return nil + } +} + +func (p *ProposalTerms) GetUpdateNetworkParameter() *UpdateNetworkParameter { + switch c := p.Change.(type) { + case *ProposalTermsUpdateNetworkParameter: + return c.UpdateNetworkParameter + default: + return nil + } +} + +func (p *ProposalTerms) GetNewFreeform() *NewFreeform { + switch c := p.Change.(type) { + case *ProposalTermsNewFreeform: + return c.NewFreeform + default: + return nil + } +} + +func ProposalTermsFromProto(p *vegapb.ProposalTerms) (*ProposalTerms, error) { + var ( + err error + change ProposalTerm + ) + switch ch := p.Change.(type) { + case *vegapb.ProposalTerms_NewMarket: + change, err = NewNewMarketFromProto(ch.NewMarket) + case *vegapb.ProposalTerms_UpdateMarket: + change, err = UpdateMarketFromProto(ch.UpdateMarket) + case *vegapb.ProposalTerms_UpdateNetworkParameter: + change = NewUpdateNetworkParameterFromProto(ch.UpdateNetworkParameter) + case *vegapb.ProposalTerms_NewAsset: + change, err = NewNewAssetFromProto(ch) + case *vegapb.ProposalTerms_UpdateAsset: + change, err = NewUpdateAssetFromProto(ch.UpdateAsset) + case *vegapb.ProposalTerms_NewFreeform: + change = NewNewFreeformFromProto(ch.NewFreeform) + case *vegapb.ProposalTerms_NewSpotMarket: + change, err = NewNewSpotMarketFromProto(ch.NewSpotMarket) + case *vegapb.ProposalTerms_UpdateSpotMarket: + change, err = UpdateSpotMarketFromProto(ch.UpdateSpotMarket) + case *vegapb.ProposalTerms_NewTransfer: + change, err = NewNewTransferFromProto(ch.NewTransfer) + case *vegapb.ProposalTerms_CancelTransfer: + change, err = NewCancelGovernanceTransferFromProto(ch.CancelTransfer) + case *vegapb.ProposalTerms_UpdateMarketState: + change, err = NewTerminateMarketFromProto(ch.UpdateMarketState) + case *vegapb.ProposalTerms_UpdateReferralProgram: + change, err = NewUpdateReferralProgramProposalFromProto(ch.UpdateReferralProgram) + case *vegapb.ProposalTerms_UpdateVolumeDiscountProgram: + change, err = NewUpdateVolumeDiscountProgramProposalFromProto(ch.UpdateVolumeDiscountProgram) + } + if err != nil { + return nil, err + } + + return &ProposalTerms{ + ClosingTimestamp: p.ClosingTimestamp, + EnactmentTimestamp: p.EnactmentTimestamp, + ValidationTimestamp: p.ValidationTimestamp, + Change: change, + }, nil +} + +type BatchProposalChange struct { + ID string + Change ProposalTerm + EnactmentTime int64 +} + +type BatchProposalTerms struct { + ClosingTimestamp int64 + Changes []BatchProposalChange +} + +func (p BatchProposalTerms) String() string { + return fmt.Sprintf( + "batch term: closingTs(%v) changes(%v)", + p.ClosingTimestamp, + p.Changes, + ) +} + +func (p BatchProposalTerms) IntoProto() *vegapb.BatchProposalTerms { + terms := &vegapb.BatchProposalTerms{ + ClosingTimestamp: p.ClosingTimestamp, + Changes: p.changesToProto(), + } + + return terms +} + +func (p BatchProposalTerms) IntoSubmissionProto() *commandspb.BatchProposalSubmissionTerms { + return &commandspb.BatchProposalSubmissionTerms{ + ClosingTimestamp: p.ClosingTimestamp, + Changes: p.changesToProto(), + } +} + +func (p BatchProposalTerms) changesToProto() []*vegapb.BatchProposalTermsChange { + out := make([]*vegapb.BatchProposalTermsChange, 0, len(p.Changes)) + + for _, c := range p.Changes { + change := c.Change.oneOfBatchProto() + + termsChange := &vegapb.BatchProposalTermsChange{ + EnactmentTimestamp: c.EnactmentTime, + } + + switch ch := change.(type) { + case *vegapb.BatchProposalTermsChange_NewMarket: + termsChange.Change = ch + case *vegapb.BatchProposalTermsChange_UpdateMarket: + termsChange.Change = ch + case *vegapb.BatchProposalTermsChange_UpdateNetworkParameter: + termsChange.Change = ch + case *vegapb.BatchProposalTermsChange_UpdateAsset: + termsChange.Change = ch + case *vegapb.BatchProposalTermsChange_NewFreeform: + termsChange.Change = ch + case *vegapb.BatchProposalTermsChange_NewTransfer: + termsChange.Change = ch + case *vegapb.BatchProposalTermsChange_CancelTransfer: + termsChange.Change = ch + case *vegapb.BatchProposalTermsChange_NewSpotMarket: + termsChange.Change = ch + case *vegapb.BatchProposalTermsChange_UpdateSpotMarket: + termsChange.Change = ch + case *vegapb.BatchProposalTermsChange_UpdateMarketState: + termsChange.Change = ch + case *vegapb.BatchProposalTermsChange_UpdateReferralProgram: + termsChange.Change = ch + case *vegapb.BatchProposalTermsChange_UpdateVolumeDiscountProgram: + termsChange.Change = ch + } + + out = append(out, termsChange) + } + + return out +} + +func (p BatchProposalTerms) DeepClone() *BatchProposalTerms { + cpy := p + + changes := make([]BatchProposalChange, 0, len(p.Changes)) + for _, v := range cpy.Changes { + changes = append(changes, BatchProposalChange{ + EnactmentTime: v.EnactmentTime, + Change: v.Change.DeepClone(), + }) + } + + cpy.Changes = changes + return &cpy +} + +func BatchProposalTermsSubmissionFromProto(p *commandspb.BatchProposalSubmissionTerms, ids []string) (*BatchProposalTerms, error) { + changesLen := len(p.Changes) + + if changesLen != len(ids) { + return nil, errors.New("failed to convert BatchProposalTerms to proto due missing IDs") + } + + changes := make([]BatchProposalChange, 0, changesLen) + + var ( + err error + change ProposalTerm + ) + + for i, term := range p.Changes { + if term == nil { + continue + } + + switch ch := term.Change.(type) { + case *vegapb.BatchProposalTermsChange_NewMarket: + change, err = NewNewMarketFromProto(ch.NewMarket) + case *vegapb.BatchProposalTermsChange_UpdateMarket: + change, err = UpdateMarketFromProto(ch.UpdateMarket) + case *vegapb.BatchProposalTermsChange_UpdateNetworkParameter: + change = NewUpdateNetworkParameterFromProto(ch.UpdateNetworkParameter) + case *vegapb.BatchProposalTermsChange_UpdateAsset: + change, err = NewUpdateAssetFromProto(ch.UpdateAsset) + case *vegapb.BatchProposalTermsChange_NewFreeform: + change = NewNewFreeformFromProto(ch.NewFreeform) + case *vegapb.BatchProposalTermsChange_NewSpotMarket: + change, err = NewNewSpotMarketFromProto(ch.NewSpotMarket) + case *vegapb.BatchProposalTermsChange_UpdateSpotMarket: + change, err = UpdateSpotMarketFromProto(ch.UpdateSpotMarket) + case *vegapb.BatchProposalTermsChange_NewTransfer: + change, err = NewNewTransferFromProto(ch.NewTransfer) + case *vegapb.BatchProposalTermsChange_CancelTransfer: + change, err = NewCancelGovernanceTransferFromProto(ch.CancelTransfer) + case *vegapb.BatchProposalTermsChange_UpdateMarketState: + change, err = NewTerminateMarketFromProto(ch.UpdateMarketState) + case *vegapb.BatchProposalTermsChange_UpdateReferralProgram: + change, err = NewUpdateReferralProgramProposalFromProto(ch.UpdateReferralProgram) + case *vegapb.BatchProposalTermsChange_UpdateVolumeDiscountProgram: + change, err = NewUpdateVolumeDiscountProgramProposalFromProto(ch.UpdateVolumeDiscountProgram) + } + if err != nil { + return nil, err + } + + changes = append(changes, BatchProposalChange{ + ID: ids[i], + EnactmentTime: term.EnactmentTimestamp, + Change: change, + }) + } + + return &BatchProposalTerms{ + ClosingTimestamp: p.ClosingTimestamp, + Changes: changes, + }, nil +} diff --git a/core/types/governance_update_asset.go b/core/types/governance_update_asset.go index 9e227669f0..e89f1b0b9b 100644 --- a/core/types/governance_update_asset.go +++ b/core/types/governance_update_asset.go @@ -39,31 +39,37 @@ type ProposalTermsUpdateAsset struct { func (a ProposalTermsUpdateAsset) String() string { return fmt.Sprintf( "updateAsset(%v)", - stringer.ReflectPointerToString(a.UpdateAsset), + stringer.PtrToString(a.UpdateAsset), ) } -func (a ProposalTermsUpdateAsset) IntoProto() *vegapb.ProposalTerms_UpdateAsset { +func (a ProposalTermsUpdateAsset) IntoProto() *vegapb.UpdateAsset { var updateAsset *vegapb.UpdateAsset if a.UpdateAsset != nil { updateAsset = a.UpdateAsset.IntoProto() } - return &vegapb.ProposalTerms_UpdateAsset{ - UpdateAsset: updateAsset, - } + return updateAsset } func (a ProposalTermsUpdateAsset) isPTerm() {} -func (a ProposalTermsUpdateAsset) oneOfProto() interface{} { - return a.IntoProto() +func (a ProposalTermsUpdateAsset) oneOfSingleProto() vegapb.ProposalOneOffTermChangeType { + return &vegapb.ProposalTerms_UpdateAsset{ + UpdateAsset: a.UpdateAsset.IntoProto(), + } +} + +func (a ProposalTermsUpdateAsset) oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType { + return &vegapb.BatchProposalTermsChange_UpdateAsset{ + UpdateAsset: a.UpdateAsset.IntoProto(), + } } func (a ProposalTermsUpdateAsset) GetTermType() ProposalTermsType { return ProposalTermsTypeUpdateAsset } -func (a ProposalTermsUpdateAsset) DeepClone() proposalTerm { +func (a ProposalTermsUpdateAsset) DeepClone() ProposalTerm { if a.UpdateAsset == nil { return &ProposalTermsUpdateAsset{} } @@ -72,16 +78,16 @@ func (a ProposalTermsUpdateAsset) DeepClone() proposalTerm { } } -func NewUpdateAssetFromProto(p *vegapb.ProposalTerms_UpdateAsset) (*ProposalTermsUpdateAsset, error) { +func NewUpdateAssetFromProto(updateAssetProto *vegapb.UpdateAsset) (*ProposalTermsUpdateAsset, error) { var updateAsset *UpdateAsset - if p.UpdateAsset != nil { + if updateAssetProto != nil { updateAsset = &UpdateAsset{ - AssetID: p.UpdateAsset.GetAssetId(), + AssetID: updateAssetProto.GetAssetId(), } - if p.UpdateAsset.Changes != nil { + if updateAssetProto.Changes != nil { var err error - updateAsset.Changes, err = AssetDetailsUpdateFromProto(p.UpdateAsset.Changes) + updateAsset.Changes, err = AssetDetailsUpdateFromProto(updateAssetProto.Changes) if err != nil { return nil, err } @@ -120,7 +126,7 @@ func (a UpdateAsset) String() string { return fmt.Sprintf( "assetID(%s) changes(%s)", a.AssetID, - stringer.ReflectPointerToString(a.Changes), + stringer.PtrToString(a.Changes), ) } @@ -158,7 +164,7 @@ func (a AssetDetailsUpdate) String() string { return fmt.Sprintf( "quantum(%s) (%s)", a.Quantum.String(), - stringer.ReflectPointerToString(a.Source), + stringer.ObjToString(a.Source), ) } @@ -244,7 +250,7 @@ type AssetDetailsUpdateERC20 struct { func (a AssetDetailsUpdateERC20) String() string { return fmt.Sprintf( "erc20Update(%s)", - stringer.ReflectPointerToString(a.ERC20Update), + stringer.PtrToString(a.ERC20Update), ) } @@ -350,7 +356,7 @@ func (e ERC20Update) DeepClone() *ERC20Update { func (e ERC20Update) String() string { return fmt.Sprintf( "lifetimeLimit(%s) withdrawThreshold(%s)", - stringer.UintPointerToString(e.LifetimeLimit), - stringer.UintPointerToString(e.WithdrawThreshold), + stringer.PtrToString(e.LifetimeLimit), + stringer.PtrToString(e.WithdrawThreshold), ) } diff --git a/core/types/governance_update_market.go b/core/types/governance_update_market.go index 95308c8a9e..5c0ec3d538 100644 --- a/core/types/governance_update_market.go +++ b/core/types/governance_update_market.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/datasource" dsdefinition "code.vegaprotocol.io/vega/core/datasource/definition" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/libs/stringer" vegapb "code.vegaprotocol.io/vega/protos/vega" ) @@ -32,27 +33,29 @@ type ProposalTermsUpdateMarket struct { func (a ProposalTermsUpdateMarket) String() string { return fmt.Sprintf( "updateMarket(%s)", - stringer.ReflectPointerToString(a.UpdateMarket), + stringer.PtrToString(a.UpdateMarket), ) } -func (a ProposalTermsUpdateMarket) IntoProto() *vegapb.ProposalTerms_UpdateMarket { +func (a ProposalTermsUpdateMarket) isPTerm() {} + +func (a ProposalTermsUpdateMarket) oneOfSingleProto() vegapb.ProposalOneOffTermChangeType { return &vegapb.ProposalTerms_UpdateMarket{ UpdateMarket: a.UpdateMarket.IntoProto(), } } -func (a ProposalTermsUpdateMarket) isPTerm() {} - -func (a ProposalTermsUpdateMarket) oneOfProto() interface{} { - return a.IntoProto() +func (a ProposalTermsUpdateMarket) oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType { + return &vegapb.BatchProposalTermsChange_UpdateMarket{ + UpdateMarket: a.UpdateMarket.IntoProto(), + } } func (a ProposalTermsUpdateMarket) GetTermType() ProposalTermsType { return ProposalTermsTypeUpdateMarket } -func (a ProposalTermsUpdateMarket) DeepClone() proposalTerm { +func (a ProposalTermsUpdateMarket) DeepClone() ProposalTerm { if a.UpdateMarket == nil { return &ProposalTermsUpdateMarket{} } @@ -61,16 +64,16 @@ func (a ProposalTermsUpdateMarket) DeepClone() proposalTerm { } } -func UpdateMarketFromProto(p *vegapb.ProposalTerms_UpdateMarket) (*ProposalTermsUpdateMarket, error) { +func UpdateMarketFromProto(updateMarketProto *vegapb.UpdateMarket) (*ProposalTermsUpdateMarket, error) { var updateMarket *UpdateMarket - if p.UpdateMarket != nil { + if updateMarketProto != nil { updateMarket = &UpdateMarket{} - updateMarket.MarketID = p.UpdateMarket.MarketId + updateMarket.MarketID = updateMarketProto.MarketId - if p.UpdateMarket.Changes != nil { + if updateMarketProto.Changes != nil { var err error - updateMarket.Changes, err = UpdateMarketConfigurationFromProto(p.UpdateMarket.Changes) + updateMarket.Changes, err = UpdateMarketConfigurationFromProto(updateMarketProto.Changes) if err != nil { return nil, err } @@ -91,7 +94,7 @@ func (n UpdateMarket) String() string { return fmt.Sprintf( "marketID(%s) changes(%s)", n.MarketID, - stringer.ReflectPointerToString(n.Changes), + stringer.PtrToString(n.Changes), ) } @@ -131,18 +134,22 @@ type UpdateMarketConfiguration struct { RiskParameters updateRiskParams LinearSlippageFactor num.Decimal QuadraticSlippageFactor num.Decimal + LiquidityFeeSettings *LiquidityFeeSettings + LiquidationStrategy *LiquidationStrategy + MarkPriceConfiguration *CompositePriceConfiguration } func (n UpdateMarketConfiguration) String() string { return fmt.Sprintf( - "instrument(%s) metadata(%v) priceMonitoring(%s) liquidityMonitoring(%s) risk(%s) linearSlippageFactor(%s) quadraticSlippageFactor(%s)", - stringer.ReflectPointerToString(n.Instrument), + "instrument(%s) metadata(%v) priceMonitoring(%s) liquidityMonitoring(%s) risk(%s) linearSlippageFactor(%s) quadraticSlippageFactor(%s), markPriceConfiguration(%s)", + stringer.PtrToString(n.Instrument), MetadataList(n.Metadata).String(), - stringer.ReflectPointerToString(n.PriceMonitoringParameters), - stringer.ReflectPointerToString(n.LiquidityMonitoringParameters), - stringer.ReflectPointerToString(n.RiskParameters), + stringer.PtrToString(n.PriceMonitoringParameters), + stringer.PtrToString(n.LiquidityMonitoringParameters), + stringer.ObjToString(n.RiskParameters), n.LinearSlippageFactor.String(), n.QuadraticSlippageFactor.String(), + stringer.PtrToString(n.MarkPriceConfiguration), ) } @@ -168,6 +175,15 @@ func (n UpdateMarketConfiguration) DeepClone() *UpdateMarketConfiguration { if n.LiquiditySLAParameters != nil { cpy.LiquiditySLAParameters = n.LiquiditySLAParameters.DeepClone() } + if n.LiquidityFeeSettings != nil { + cpy.LiquidityFeeSettings = n.LiquidityFeeSettings.DeepClone() + } + if n.LiquidationStrategy != nil { + cpy.LiquidationStrategy = n.LiquidationStrategy.DeepClone() + } + if n.MarkPriceConfiguration != nil { + cpy.MarkPriceConfiguration = n.MarkPriceConfiguration.DeepClone() + } return cpy } @@ -193,6 +209,15 @@ func (n UpdateMarketConfiguration) IntoProto() *vegapb.UpdateMarketConfiguration liquiditySLAParameters = n.LiquiditySLAParameters.IntoProto() } + var liquidityFeeSettings *vegapb.LiquidityFeeSettings + if n.LiquidityFeeSettings != nil { + liquidityFeeSettings = n.LiquidityFeeSettings.IntoProto() + } + var liqStrat *vegapb.LiquidationStrategy + if n.LiquidationStrategy != nil { + liqStrat = n.LiquidationStrategy.IntoProto() + } + r := &vegapb.UpdateMarketConfiguration{ Instrument: instrument, Metadata: md, @@ -200,7 +225,9 @@ func (n UpdateMarketConfiguration) IntoProto() *vegapb.UpdateMarketConfiguration LiquidityMonitoringParameters: liquidityMonitoring, LiquiditySlaParameters: liquiditySLAParameters, LinearSlippageFactor: n.LinearSlippageFactor.String(), - QuadraticSlippageFactor: n.QuadraticSlippageFactor.String(), + LiquidityFeeSettings: liquidityFeeSettings, + LiquidationStrategy: liqStrat, + MarkPriceConfiguration: n.MarkPriceConfiguration.IntoProto(), } switch rp := riskParams.(type) { case *vegapb.UpdateMarketConfiguration_Simple: @@ -211,6 +238,35 @@ func (n UpdateMarketConfiguration) IntoProto() *vegapb.UpdateMarketConfiguration return r } +func (n UpdateMarketConfiguration) GetPerps() *UpdateInstrumentConfigurationPerps { + if n.GetProductType() == ProductTypePerps { + ret, _ := n.Instrument.Product.(*UpdateInstrumentConfigurationPerps) + return ret + } + return nil +} + +func (n UpdateMarketConfiguration) GetFuture() *UpdateInstrumentConfigurationFuture { + if n.GetProductType() == ProductTypeFuture { + ret, _ := n.Instrument.Product.(*UpdateInstrumentConfigurationFuture) + return ret + } + return nil +} + +func (n UpdateMarketConfiguration) GetProductType() ProductType { + if n.Instrument == nil || n.Instrument.Product == nil { + return ProductTypeUnspecified + } + switch n.Instrument.Product.(type) { + case *UpdateInstrumentConfigurationFuture: + return ProductTypeFuture + case *UpdateInstrumentConfigurationPerps: + return ProductTypePerps + } + return ProductTypeUnspecified // maybe spot? +} + func UpdateMarketConfigurationFromProto(p *vegapb.UpdateMarketConfiguration) (*UpdateMarketConfiguration, error) { md := make([]string, 0, len(p.Metadata)) md = append(md, p.Metadata...) @@ -246,9 +302,11 @@ func UpdateMarketConfigurationFromProto(p *vegapb.UpdateMarketConfiguration) (*U if err != nil { return nil, fmt.Errorf("error getting new market configuration from proto: %w", err) } - quadraticSlippageFactor, err := num.DecimalFromString(p.QuadraticSlippageFactor) - if err != nil { - return nil, fmt.Errorf("error getting new market configuration from proto: %w", err) + var liqStrat *LiquidationStrategy + if p.LiquidationStrategy != nil { + if liqStrat, err = LiquidationStrategyFromProto(p.LiquidationStrategy); err != nil { + return nil, fmt.Errorf("error getting new market configuration from proto: %w", err) + } } r := &UpdateMarketConfiguration{ @@ -258,7 +316,10 @@ func UpdateMarketConfigurationFromProto(p *vegapb.UpdateMarketConfiguration) (*U LiquidityMonitoringParameters: liquidityMonitoring, LiquiditySLAParameters: liquiditySLAParameters, LinearSlippageFactor: linearSlippageFactor, - QuadraticSlippageFactor: quadraticSlippageFactor, + LiquidityFeeSettings: LiquidityFeeSettingsFromProto(p.LiquidityFeeSettings), + QuadraticSlippageFactor: num.DecimalZero(), + LiquidationStrategy: liqStrat, + MarkPriceConfiguration: CompositePriceConfigurationFromProto(p.MarkPriceConfiguration), } if p.RiskParameters != nil { switch rp := p.RiskParameters.(type) { @@ -273,13 +334,16 @@ func UpdateMarketConfigurationFromProto(p *vegapb.UpdateMarketConfiguration) (*U type UpdateInstrumentConfiguration struct { Code string + Name string // *UpdateInstrumentConfigurationFuture + // *UpdateInstrumentConfigurationPerps Product updateInstrumentConfigurationProduct } func (i UpdateInstrumentConfiguration) DeepClone() *UpdateInstrumentConfiguration { cpy := UpdateInstrumentConfiguration{ Code: i.Code, + Name: i.Name, } if i.Product != nil { cpy.Product = i.Product.DeepClone() @@ -291,6 +355,7 @@ func (i UpdateInstrumentConfiguration) IntoProto() *vegapb.UpdateInstrumentConfi p := i.Product.icpIntoProto() r := &vegapb.UpdateInstrumentConfiguration{ Code: i.Code, + Name: i.Name, } switch pr := p.(type) { case *vegapb.UpdateInstrumentConfiguration_Future: @@ -303,9 +368,10 @@ func (i UpdateInstrumentConfiguration) IntoProto() *vegapb.UpdateInstrumentConfi func (i UpdateInstrumentConfiguration) String() string { return fmt.Sprintf( - "code(%s) product(%s)", + "code(%s) name(%s) product(%s)", i.Code, - stringer.ReflectPointerToString(i.Product), + i.Name, + stringer.ObjToString(i.Product), ) } @@ -338,7 +404,7 @@ func (i UpdateInstrumentConfigurationFuture) DeepClone() updateInstrumentConfigu func (i UpdateInstrumentConfigurationFuture) String() string { return fmt.Sprintf( "future(%s)", - stringer.ReflectPointerToString(i.Future), + stringer.PtrToString(i.Future), ) } @@ -370,7 +436,7 @@ func (i UpdateInstrumentConfigurationPerps) DeepClone() updateInstrumentConfigur func (i UpdateInstrumentConfigurationPerps) String() string { return fmt.Sprintf( "perps(%s)", - stringer.ReflectPointerToString(i.Perps), + stringer.PtrToString(i.Perps), ) } @@ -383,6 +449,7 @@ func (i UpdateInstrumentConfigurationPerps) IntoProto() *vegapb.UpdateInstrument func UpdateInstrumentConfigurationFromProto(p *vegapb.UpdateInstrumentConfiguration) (*UpdateInstrumentConfiguration, error) { r := &UpdateInstrumentConfiguration{ Code: p.Code, + Name: p.Name, } switch pr := p.Product.(type) { @@ -428,6 +495,31 @@ func UpdateInstrumentConfigurationFromProto(p *vegapb.UpdateInstrumentConfigurat return nil, fmt.Errorf("failed to parse clamp upper bound: %w", err) } + var scalingFactor, lowerBound, upperBound *num.Decimal + if pr.Perpetual.FundingRateScalingFactor != nil { + d, err := num.DecimalFromString(*pr.Perpetual.FundingRateScalingFactor) + if err != nil { + return nil, fmt.Errorf("failed to parse funding rate scaling factor: %w", err) + } + scalingFactor = &d + } + + if pr.Perpetual.FundingRateLowerBound != nil { + d, err := num.DecimalFromString(*pr.Perpetual.FundingRateLowerBound) + if err != nil { + return nil, fmt.Errorf("failed to parse funding rate lower bound: %w", err) + } + lowerBound = &d + } + + if pr.Perpetual.FundingRateUpperBound != nil { + d, err := num.DecimalFromString(*pr.Perpetual.FundingRateUpperBound) + if err != nil { + return nil, fmt.Errorf("failed to parse funding rate lower bound: %w", err) + } + upperBound = &d + } + r.Product = &UpdateInstrumentConfigurationPerps{ Perps: &UpdatePerpsProduct{ QuoteName: pr.Perpetual.QuoteName, @@ -435,6 +527,9 @@ func UpdateInstrumentConfigurationFromProto(p *vegapb.UpdateInstrumentConfigurat InterestRate: interestRate, ClampLowerBound: clampLowerBound, ClampUpperBound: clampUpperBound, + FundingRateScalingFactor: scalingFactor, + FundingRateLowerBound: lowerBound, + FundingRateUpperBound: upperBound, DataSourceSpecForSettlementData: *datasource.NewDefinitionWith(settlement), DataSourceSpecForSettlementSchedule: *datasource.NewDefinitionWith(settlementSchedule), DataSourceSpecBinding: datasource.SpecBindingForPerpsFromProto(pr.Perpetual.DataSourceSpecBinding), @@ -473,9 +568,9 @@ func (f UpdateFutureProduct) String() string { return fmt.Sprintf( "quoteName(%s) settlementData(%s) tradingTermination(%s) binding(%s)", f.QuoteName, - stringer.ReflectPointerToString(f.DataSourceSpecForSettlementData), - stringer.ReflectPointerToString(f.DataSourceSpecForTradingTermination), - stringer.ReflectPointerToString(f.DataSourceSpecBinding), + stringer.ObjToString(f.DataSourceSpecForSettlementData), + stringer.ObjToString(f.DataSourceSpecForTradingTermination), + stringer.PtrToString(f.DataSourceSpecBinding), ) } @@ -487,18 +582,36 @@ type UpdatePerpsProduct struct { ClampLowerBound num.Decimal ClampUpperBound num.Decimal + FundingRateScalingFactor *num.Decimal + FundingRateLowerBound *num.Decimal + FundingRateUpperBound *num.Decimal + DataSourceSpecForSettlementData dsdefinition.Definition DataSourceSpecForSettlementSchedule dsdefinition.Definition DataSourceSpecBinding *datasource.SpecBindingForPerps } func (p UpdatePerpsProduct) IntoProto() *vegapb.UpdatePerpetualProduct { + var scalingFactor, upperBound, lowerBound *string + if p.FundingRateScalingFactor != nil { + scalingFactor = ptr.From(p.FundingRateScalingFactor.String()) + } + if p.FundingRateLowerBound != nil { + lowerBound = ptr.From(p.FundingRateLowerBound.String()) + } + if p.FundingRateUpperBound != nil { + upperBound = ptr.From(p.FundingRateUpperBound.String()) + } + return &vegapb.UpdatePerpetualProduct{ QuoteName: p.QuoteName, MarginFundingFactor: p.MarginFundingFactor.String(), InterestRate: p.InterestRate.String(), ClampLowerBound: p.ClampLowerBound.String(), ClampUpperBound: p.ClampUpperBound.String(), + FundingRateScalingFactor: scalingFactor, + FundingRateLowerBound: lowerBound, + FundingRateUpperBound: upperBound, DataSourceSpecForSettlementData: p.DataSourceSpecForSettlementData.IntoProto(), DataSourceSpecForSettlementSchedule: p.DataSourceSpecForSettlementSchedule.IntoProto(), DataSourceSpecBinding: p.DataSourceSpecBinding.IntoProto(), @@ -526,9 +639,9 @@ func (p UpdatePerpsProduct) String() string { p.InterestRate.String(), p.ClampLowerBound.String(), p.ClampUpperBound.String(), - stringer.ReflectPointerToString(p.DataSourceSpecForSettlementData), - stringer.ReflectPointerToString(p.DataSourceSpecForSettlementSchedule), - stringer.ReflectPointerToString(p.DataSourceSpecBinding), + stringer.ObjToString(p.DataSourceSpecForSettlementData), + stringer.ObjToString(p.DataSourceSpecForSettlementSchedule), + stringer.PtrToString(p.DataSourceSpecBinding), ) } @@ -539,7 +652,7 @@ type UpdateMarketConfigurationSimple struct { func (n UpdateMarketConfigurationSimple) String() string { return fmt.Sprintf( "simple(%s)", - stringer.ReflectPointerToString(n.Simple), + stringer.PtrToString(n.Simple), ) } @@ -575,7 +688,7 @@ type UpdateMarketConfigurationLogNormal struct { func (n UpdateMarketConfigurationLogNormal) String() string { return fmt.Sprintf( "logNormal(%s)", - stringer.ReflectPointerToString(n.LogNormal), + stringer.PtrToString(n.LogNormal), ) } diff --git a/core/types/governance_update_market_state.go b/core/types/governance_update_market_state.go index 40d5b1a6a9..1b9e8f156f 100644 --- a/core/types/governance_update_market_state.go +++ b/core/types/governance_update_market_state.go @@ -34,27 +34,29 @@ type UpdateMarketState struct { func (a ProposalTermsUpdateMarketState) String() string { return fmt.Sprintf( "updateMarketState(%s)", - stringer.ReflectPointerToString(a.UpdateMarketState), + stringer.PtrToString(a.UpdateMarketState), ) } -func (a ProposalTermsUpdateMarketState) IntoProto() *vegapb.ProposalTerms_UpdateMarketState { +func (a ProposalTermsUpdateMarketState) isPTerm() {} + +func (a ProposalTermsUpdateMarketState) oneOfSingleProto() vegapb.ProposalOneOffTermChangeType { return &vegapb.ProposalTerms_UpdateMarketState{ UpdateMarketState: a.UpdateMarketState.IntoProto(), } } -func (a ProposalTermsUpdateMarketState) isPTerm() {} - -func (a ProposalTermsUpdateMarketState) oneOfProto() interface{} { - return a.IntoProto() +func (a ProposalTermsUpdateMarketState) oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType { + return &vegapb.BatchProposalTermsChange_UpdateMarketState{ + UpdateMarketState: a.UpdateMarketState.IntoProto(), + } } func (a ProposalTermsUpdateMarketState) GetTermType() ProposalTermsType { return ProposalTermsTypeUpdateMarketState } -func (a ProposalTermsUpdateMarketState) DeepClone() proposalTerm { +func (a ProposalTermsUpdateMarketState) DeepClone() ProposalTerm { if a.UpdateMarketState == nil { return &ProposalTermsUpdateMarketState{} } @@ -63,20 +65,20 @@ func (a ProposalTermsUpdateMarketState) DeepClone() proposalTerm { } } -func NewTerminateMarketFromProto(p *vegapb.ProposalTerms_UpdateMarketState) (*ProposalTermsUpdateMarketState, error) { +func NewTerminateMarketFromProto(updateMarketStateProto *vegapb.UpdateMarketState) (*ProposalTermsUpdateMarketState, error) { var terminateMarket *UpdateMarketState - if p.UpdateMarketState != nil { + if updateMarketStateProto != nil { terminateMarket = &UpdateMarketState{} var price *num.Uint - if p.UpdateMarketState.Changes.Price != nil { - price, _ = num.UintFromString(*p.UpdateMarketState.Changes.Price, 10) + if updateMarketStateProto.Changes.Price != nil { + price, _ = num.UintFromString(*updateMarketStateProto.Changes.Price, 10) } - if p.UpdateMarketState.Changes != nil { + if updateMarketStateProto.Changes != nil { terminateMarket.Changes = &MarketStateUpdateConfiguration{ - MarketID: p.UpdateMarketState.Changes.MarketId, - UpdateType: p.UpdateMarketState.Changes.UpdateType, + MarketID: updateMarketStateProto.Changes.MarketId, + UpdateType: updateMarketStateProto.Changes.UpdateType, SettlementPrice: price, } } @@ -105,7 +107,7 @@ func (c UpdateMarketState) IntoProto() *vegapb.UpdateMarketState { func (c UpdateMarketState) String() string { return fmt.Sprintf( "changes(%s)", - stringer.ReflectPointerToString(c.Changes), + stringer.PtrToString(c.Changes), ) } @@ -139,5 +141,5 @@ type MarketStateUpdateConfiguration struct { } func (c MarketStateUpdateConfiguration) String() string { - return fmt.Sprintf("marketID(%s), updateType(%d), settlementPrice(%s)", c.MarketID, c.UpdateType, stringer.ReflectPointerToString(c.SettlementPrice)) + return fmt.Sprintf("marketID(%s), updateType(%d), settlementPrice(%s)", c.MarketID, c.UpdateType, stringer.PtrToString(c.SettlementPrice)) } diff --git a/core/types/governance_update_network_parameter.go b/core/types/governance_update_network_parameter.go index 8377f0049e..b2620c0fbb 100644 --- a/core/types/governance_update_network_parameter.go +++ b/core/types/governance_update_network_parameter.go @@ -29,7 +29,7 @@ type ProposalTermsUpdateNetworkParameter struct { func (a ProposalTermsUpdateNetworkParameter) String() string { return fmt.Sprintf( "updateNetworkParameter(%s)", - stringer.ReflectPointerToString(a.UpdateNetworkParameter), + stringer.PtrToString(a.UpdateNetworkParameter), ) } @@ -41,15 +41,23 @@ func (a ProposalTermsUpdateNetworkParameter) IntoProto() *vegapb.ProposalTerms_U func (a ProposalTermsUpdateNetworkParameter) isPTerm() {} -func (a ProposalTermsUpdateNetworkParameter) oneOfProto() interface{} { - return a.IntoProto() +func (a ProposalTermsUpdateNetworkParameter) oneOfSingleProto() vegapb.ProposalOneOffTermChangeType { + return &vegapb.ProposalTerms_UpdateNetworkParameter{ + UpdateNetworkParameter: a.UpdateNetworkParameter.IntoProto(), + } +} + +func (a ProposalTermsUpdateNetworkParameter) oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType { + return &vegapb.BatchProposalTermsChange_UpdateNetworkParameter{ + UpdateNetworkParameter: a.UpdateNetworkParameter.IntoProto(), + } } func (a ProposalTermsUpdateNetworkParameter) GetTermType() ProposalTermsType { return ProposalTermsTypeUpdateNetworkParameter } -func (a ProposalTermsUpdateNetworkParameter) DeepClone() proposalTerm { +func (a ProposalTermsUpdateNetworkParameter) DeepClone() ProposalTerm { if a.UpdateNetworkParameter == nil { return &ProposalTermsUpdateNetworkParameter{} } @@ -59,14 +67,14 @@ func (a ProposalTermsUpdateNetworkParameter) DeepClone() proposalTerm { } func NewUpdateNetworkParameterFromProto( - p *vegapb.ProposalTerms_UpdateNetworkParameter, + updateNetworkParamProto *vegapb.UpdateNetworkParameter, ) *ProposalTermsUpdateNetworkParameter { var updateNP *UpdateNetworkParameter - if p.UpdateNetworkParameter != nil { + if updateNetworkParamProto != nil { updateNP = &UpdateNetworkParameter{} - if p.UpdateNetworkParameter.Changes != nil { - updateNP.Changes = NetworkParameterFromProto(p.UpdateNetworkParameter.Changes) + if updateNetworkParamProto.Changes != nil { + updateNP.Changes = NetworkParameterFromProto(updateNetworkParamProto.Changes) } } @@ -88,7 +96,7 @@ func (n UpdateNetworkParameter) IntoProto() *vegapb.UpdateNetworkParameter { func (n UpdateNetworkParameter) String() string { return fmt.Sprintf( "changes(%s)", - stringer.ReflectPointerToString(n.Changes), + stringer.PtrToString(n.Changes), ) } diff --git a/core/types/governance_update_referral_program.go b/core/types/governance_update_referral_program.go index 44576ec8bb..a0c03213b9 100644 --- a/core/types/governance_update_referral_program.go +++ b/core/types/governance_update_referral_program.go @@ -31,27 +31,29 @@ type ProposalTermsUpdateReferralProgram struct { func (a ProposalTermsUpdateReferralProgram) String() string { return fmt.Sprintf( "updateReferralProgram(%s)", - stringer.ReflectPointerToString(a.UpdateReferralProgram), + stringer.PtrToString(a.UpdateReferralProgram), ) } -func (a ProposalTermsUpdateReferralProgram) IntoProto() *vegapb.ProposalTerms_UpdateReferralProgram { +func (a ProposalTermsUpdateReferralProgram) isPTerm() {} + +func (a ProposalTermsUpdateReferralProgram) oneOfSingleProto() vegapb.ProposalOneOffTermChangeType { return &vegapb.ProposalTerms_UpdateReferralProgram{ UpdateReferralProgram: a.UpdateReferralProgram.IntoProto(), } } -func (a ProposalTermsUpdateReferralProgram) isPTerm() {} - -func (a ProposalTermsUpdateReferralProgram) oneOfProto() interface{} { - return a.IntoProto() +func (a ProposalTermsUpdateReferralProgram) oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType { + return &vegapb.BatchProposalTermsChange_UpdateReferralProgram{ + UpdateReferralProgram: a.UpdateReferralProgram.IntoProto(), + } } func (a ProposalTermsUpdateReferralProgram) GetTermType() ProposalTermsType { return ProposalTermsTypeUpdateReferralProgram } -func (a ProposalTermsUpdateReferralProgram) DeepClone() proposalTerm { +func (a ProposalTermsUpdateReferralProgram) DeepClone() ProposalTerm { if a.UpdateReferralProgram == nil { return &ProposalTermsUpdateReferralProgram{} } @@ -60,9 +62,11 @@ func (a ProposalTermsUpdateReferralProgram) DeepClone() proposalTerm { } } -func NewUpdateReferralProgramProposalFromProto(p *vegapb.ProposalTerms_UpdateReferralProgram) (*ProposalTermsUpdateReferralProgram, error) { +func NewUpdateReferralProgramProposalFromProto( + updateReferralProgramProto *vegapb.UpdateReferralProgram, +) (*ProposalTermsUpdateReferralProgram, error) { return &ProposalTermsUpdateReferralProgram{ - UpdateReferralProgram: NewUpdateReferralProgramFromProto(p.UpdateReferralProgram), + UpdateReferralProgram: NewUpdateReferralProgramFromProto(updateReferralProgramProto), }, nil } @@ -79,7 +83,7 @@ func (p UpdateReferralProgram) IntoProto() *vegapb.UpdateReferralProgram { func (p UpdateReferralProgram) String() string { return fmt.Sprintf( "changes(%s)", - stringer.ReflectPointerToString(p.Changes), + stringer.PtrToString(p.Changes), ) } diff --git a/core/types/governance_update_spot_market.go b/core/types/governance_update_spot_market.go index b6f8bf4b94..24790ad673 100644 --- a/core/types/governance_update_spot_market.go +++ b/core/types/governance_update_spot_market.go @@ -24,13 +24,15 @@ import ( ) type ProposalTermsUpdateSpotMarket struct { - UpdateSpotMarket *UpdateSpotMarket + BatchProposalID string + EnactmentTimestamp int64 + UpdateSpotMarket *UpdateSpotMarket } func (a ProposalTermsUpdateSpotMarket) String() string { return fmt.Sprintf( "updateSpotMarket(%s)", - stringer.ReflectPointerToString(a.UpdateSpotMarket), + stringer.PtrToString(a.UpdateSpotMarket), ) } @@ -42,15 +44,23 @@ func (a ProposalTermsUpdateSpotMarket) IntoProto() *vegapb.ProposalTerms_UpdateS func (a ProposalTermsUpdateSpotMarket) isPTerm() {} -func (a ProposalTermsUpdateSpotMarket) oneOfProto() interface{} { - return a.IntoProto() +func (a ProposalTermsUpdateSpotMarket) oneOfSingleProto() vegapb.ProposalOneOffTermChangeType { + return &vegapb.ProposalTerms_UpdateSpotMarket{ + UpdateSpotMarket: a.UpdateSpotMarket.IntoProto(), + } +} + +func (a ProposalTermsUpdateSpotMarket) oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType { + return &vegapb.BatchProposalTermsChange_UpdateSpotMarket{ + UpdateSpotMarket: a.UpdateSpotMarket.IntoProto(), + } } func (a ProposalTermsUpdateSpotMarket) GetTermType() ProposalTermsType { return ProposalTermsTypeUpdateSpotMarket } -func (a ProposalTermsUpdateSpotMarket) DeepClone() proposalTerm { +func (a ProposalTermsUpdateSpotMarket) DeepClone() ProposalTerm { if a.UpdateSpotMarket == nil { return &ProposalTermsUpdateSpotMarket{} } @@ -59,14 +69,14 @@ func (a ProposalTermsUpdateSpotMarket) DeepClone() proposalTerm { } } -func UpdateSpotMarketFromProto(p *vegapb.ProposalTerms_UpdateSpotMarket) (*ProposalTermsUpdateSpotMarket, error) { +func UpdateSpotMarketFromProto(updateSpotMarketProto *vegapb.UpdateSpotMarket) (*ProposalTermsUpdateSpotMarket, error) { var updateSpotMarket *UpdateSpotMarket - if p.UpdateSpotMarket != nil { + if updateSpotMarketProto != nil { updateSpotMarket = &UpdateSpotMarket{} - updateSpotMarket.MarketID = p.UpdateSpotMarket.MarketId - if p.UpdateSpotMarket.Changes != nil { + updateSpotMarket.MarketID = updateSpotMarketProto.MarketId + if updateSpotMarketProto.Changes != nil { var err error - updateSpotMarket.Changes, err = UpdateSpotMarketConfigurationFromProto(p.UpdateSpotMarket.Changes) + updateSpotMarket.Changes, err = UpdateSpotMarketConfigurationFromProto(updateSpotMarketProto.Changes) if err != nil { return nil, err } @@ -86,7 +96,7 @@ func (n UpdateSpotMarket) String() string { return fmt.Sprintf( "marketID(%s) changes(%s)", n.MarketID, - stringer.ReflectPointerToString(n.Changes), + stringer.PtrToString(n.Changes), ) } @@ -123,12 +133,12 @@ type UpdateSpotMarketConfiguration struct { func (n UpdateSpotMarketConfiguration) String() string { return fmt.Sprintf( "instrument(%s) metadata(%v) priceMonitoring(%s) targetStakeParameters(%s) risk(%s) slaParams(%s)", - stringer.ReflectPointerToString(n.Instrument), + stringer.PtrToString(n.Instrument), MetadataList(n.Metadata).String(), - stringer.ReflectPointerToString(n.PriceMonitoringParameters), - stringer.ReflectPointerToString(n.TargetStakeParameters), - stringer.ReflectPointerToString(n.RiskParameters), - stringer.ReflectPointerToString(n.SLAParams), + stringer.PtrToString(n.PriceMonitoringParameters), + stringer.PtrToString(n.TargetStakeParameters), + stringer.ObjToString(n.RiskParameters), + stringer.PtrToString(n.SLAParams), ) } @@ -217,7 +227,7 @@ type UpdateSpotMarketConfigurationSimple struct { func (n UpdateSpotMarketConfigurationSimple) String() string { return fmt.Sprintf( "simple(%s)", - stringer.ReflectPointerToString(n.Simple), + stringer.PtrToString(n.Simple), ) } @@ -253,7 +263,7 @@ type UpdateSpotMarketConfigurationLogNormal struct { func (n UpdateSpotMarketConfigurationLogNormal) String() string { return fmt.Sprintf( "logNormal(%s)", - stringer.ReflectPointerToString(n.LogNormal), + stringer.PtrToString(n.LogNormal), ) } diff --git a/core/types/governance_update_volume_discount_program.go b/core/types/governance_update_volume_discount_program.go index fbaffcba0d..24054d940c 100644 --- a/core/types/governance_update_volume_discount_program.go +++ b/core/types/governance_update_volume_discount_program.go @@ -31,27 +31,29 @@ type ProposalTermsUpdateVolumeDiscountProgram struct { func (a ProposalTermsUpdateVolumeDiscountProgram) String() string { return fmt.Sprintf( "updateVolumeDiscountProgram(%s)", - stringer.ReflectPointerToString(a.UpdateVolumeDiscountProgram), + stringer.PtrToString(a.UpdateVolumeDiscountProgram), ) } -func (a ProposalTermsUpdateVolumeDiscountProgram) IntoProto() *vegapb.ProposalTerms_UpdateVolumeDiscountProgram { +func (a ProposalTermsUpdateVolumeDiscountProgram) isPTerm() {} + +func (a ProposalTermsUpdateVolumeDiscountProgram) oneOfSingleProto() vegapb.ProposalOneOffTermChangeType { return &vegapb.ProposalTerms_UpdateVolumeDiscountProgram{ UpdateVolumeDiscountProgram: a.UpdateVolumeDiscountProgram.IntoProto(), } } -func (a ProposalTermsUpdateVolumeDiscountProgram) isPTerm() {} - -func (a ProposalTermsUpdateVolumeDiscountProgram) oneOfProto() interface{} { - return a.IntoProto() +func (a ProposalTermsUpdateVolumeDiscountProgram) oneOfBatchProto() vegapb.ProposalOneOffTermBatchChangeType { + return &vegapb.BatchProposalTermsChange_UpdateVolumeDiscountProgram{ + UpdateVolumeDiscountProgram: a.UpdateVolumeDiscountProgram.IntoProto(), + } } func (a ProposalTermsUpdateVolumeDiscountProgram) GetTermType() ProposalTermsType { return ProposalTermsTypeUpdateVolumeDiscountProgram } -func (a ProposalTermsUpdateVolumeDiscountProgram) DeepClone() proposalTerm { +func (a ProposalTermsUpdateVolumeDiscountProgram) DeepClone() ProposalTerm { if a.UpdateVolumeDiscountProgram == nil { return &ProposalTermsUpdateVolumeDiscountProgram{} } @@ -60,9 +62,11 @@ func (a ProposalTermsUpdateVolumeDiscountProgram) DeepClone() proposalTerm { } } -func NewUpdateVolumeDiscountProgramProposalFromProto(p *vegapb.ProposalTerms_UpdateVolumeDiscountProgram) (*ProposalTermsUpdateVolumeDiscountProgram, error) { +func NewUpdateVolumeDiscountProgramProposalFromProto( + updateVolumeDiscountProgramProto *vegapb.UpdateVolumeDiscountProgram, +) (*ProposalTermsUpdateVolumeDiscountProgram, error) { return &ProposalTermsUpdateVolumeDiscountProgram{ - UpdateVolumeDiscountProgram: NewUpdateVolumeDiscountProgramFromProto(p.UpdateVolumeDiscountProgram), + UpdateVolumeDiscountProgram: NewUpdateVolumeDiscountProgramFromProto(updateVolumeDiscountProgramProto), }, nil } @@ -79,7 +83,7 @@ func (p UpdateVolumeDiscountProgram) IntoProto() *vegapb.UpdateVolumeDiscountPro func (p UpdateVolumeDiscountProgram) String() string { return fmt.Sprintf( "changes(%s)", - stringer.ReflectPointerToString(p.Changes), + stringer.PtrToString(p.Changes), ) } diff --git a/core/types/governance_vote.go b/core/types/governance_vote.go index 76b3f1cd09..7f89b40e50 100644 --- a/core/types/governance_vote.go +++ b/core/types/governance_vote.go @@ -82,7 +82,8 @@ type Vote struct { TotalGovernanceTokenWeight num.Decimal // TotalEquityLikeShareWeight is the weight of the vote compared to the // total number of equity-like share on the market. - TotalEquityLikeShareWeight num.Decimal + TotalEquityLikeShareWeight num.Decimal + PerMarketEquityLikeShareWeight map[string]num.Decimal } func (v Vote) IntoProto() *vegapb.Vote { diff --git a/core/types/liquidation.go b/core/types/liquidation.go new file mode 100644 index 0000000000..8a57cb4abb --- /dev/null +++ b/core/types/liquidation.go @@ -0,0 +1,147 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package types + +import ( + "time" + + "code.vegaprotocol.io/vega/libs/num" + vegapb "code.vegaprotocol.io/vega/protos/vega" + snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" +) + +type LiquidationStrategy struct { + DisposalTimeStep time.Duration + DisposalFraction num.Decimal + FullDisposalSize uint64 + MaxFractionConsumed num.Decimal +} + +type LiquidationNode struct { + MarketID string + NetworkPos int64 + NextStep time.Time + Config *LiquidationStrategy +} + +func (l *LiquidationNode) isPayload() {} + +func (l *LiquidationNode) plToProto() interface{} { + return &snapshot.Payload_Liquidation{ + Liquidation: l.IntoProto(), + } +} + +func (l *LiquidationNode) Namespace() SnapshotNamespace { + return LiquidationSnapshot +} + +func (l *LiquidationNode) Key() string { + return l.MarketID +} + +func (l *LiquidationNode) IntoProto() *snapshot.Liquidation { + var cfg *vegapb.LiquidationStrategy + if l.Config != nil { + cfg = l.Config.IntoProto() + } + var ns int64 + if !l.NextStep.IsZero() { + ns = l.NextStep.UnixNano() + } + return &snapshot.Liquidation{ + MarketId: l.MarketID, + NetworkPos: l.NetworkPos, + NextStep: ns, + Config: cfg, + } +} + +func PayloadLiquidationNodeFromProto(p *snapshot.Payload_Liquidation) *LiquidationNode { + node, err := LiquidationSnapshotFromProto(p.Liquidation) + if err != nil { + // @TODO figure out what to do with this error + panic("invalid liquidation snapshot payload: " + err.Error()) + } + return node +} + +func LiquidationSnapshotFromProto(p *snapshot.Liquidation) (*LiquidationNode, error) { + var s *LiquidationStrategy + if p.Config != nil { + st, err := LiquidationStrategyFromProto(p.Config) + if err != nil { + return nil, err + } + s = st + } + var ns time.Time + if p.NextStep > 0 { + ns = time.Unix(0, p.NextStep) + } + return &LiquidationNode{ + MarketID: p.MarketId, + NetworkPos: p.NetworkPos, + NextStep: ns, + Config: s, + }, nil +} + +func LiquidationStrategyFromProto(p *vegapb.LiquidationStrategy) (*LiquidationStrategy, error) { + df, err := num.DecimalFromString(p.DisposalFraction) + if err != nil { + return nil, err + } + mfc, err := num.DecimalFromString(p.MaxFractionConsumed) + if err != nil { + return nil, err + } + return &LiquidationStrategy{ + DisposalTimeStep: time.Second * time.Duration(p.DisposalTimeStep), + DisposalFraction: df, + FullDisposalSize: p.FullDisposalSize, + MaxFractionConsumed: mfc, + }, nil +} + +func (l *LiquidationStrategy) IntoProto() *vegapb.LiquidationStrategy { + return &vegapb.LiquidationStrategy{ + DisposalTimeStep: int64(l.DisposalTimeStep / time.Second), + DisposalFraction: l.DisposalFraction.String(), + FullDisposalSize: l.FullDisposalSize, + MaxFractionConsumed: l.MaxFractionConsumed.String(), + } +} + +func (l *LiquidationStrategy) DeepClone() *LiquidationStrategy { + cpy := *l + return &cpy +} + +func (l *LiquidationStrategy) EQ(l2 *LiquidationStrategy) bool { + // if the memory address is the same, then they are obviously the same + if l == l2 { + return true + } + if l2 == nil { + return false + } + // this should be fine, there's no pointer fields to think about + // but just in case we end up switching the decimal types out + // return *l == *l2 + return l.DisposalTimeStep == l2.DisposalTimeStep && l.FullDisposalSize == l2.FullDisposalSize && + l.DisposalFraction.Equals(l2.DisposalFraction) && l.MaxFractionConsumed.Equals(l2.MaxFractionConsumed) +} diff --git a/core/types/liquidity.go b/core/types/liquidity.go index 07f196299e..529b32942a 100644 --- a/core/types/liquidity.go +++ b/core/types/liquidity.go @@ -20,11 +20,21 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/libs/stringer" proto "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" ) +type LiquidityFeeMethod = proto.LiquidityFeeSettings_Method + +const ( + LiquidityFeeMethodUnspecified LiquidityFeeMethod = proto.LiquidityFeeSettings_METHOD_UNSPECIFIED + LiquidityFeeMethodMarginalCost LiquidityFeeMethod = proto.LiquidityFeeSettings_METHOD_MARGINAL_COST + LiquidityFeeMethodWeightedAverage LiquidityFeeMethod = proto.LiquidityFeeSettings_METHOD_WEIGHTED_AVERAGE + LiquidityFeeMethodConstant LiquidityFeeMethod = proto.LiquidityFeeSettings_METHOD_CONSTANT +) + type LiquidityProvisionStatus = proto.LiquidityProvision_Status const ( @@ -178,7 +188,7 @@ func (l LiquidityProvisionSubmission) String() string { "marketID(%s) reference(%s) commitmentAmount(%s) fee(%s)", l.MarketID, l.Reference, - stringer.UintPointerToString(l.CommitmentAmount), + stringer.PtrToString(l.CommitmentAmount), l.Fee.String(), ) } @@ -216,7 +226,7 @@ func (l LiquidityProvision) String() string { l.Party, l.Status.String(), l.Reference, - stringer.UintPointerToString(l.CommitmentAmount), + stringer.PtrToString(l.CommitmentAmount), l.Fee.String(), l.Version, l.CreatedAt, @@ -270,10 +280,6 @@ func LiquidityProvisionFromProto(p *proto.LiquidityProvision) (*LiquidityProvisi type LiquidityMonitoringParameters struct { // Specifies parameters related to target stake calculation TargetStakeParameters *TargetStakeParameters - // Specifies the triggering ratio for entering liquidity auction - TriggeringRatio num.Decimal - // Specifies by how many seconds an auction should be extended if leaving the auction were to trigger a liquidity auction - AuctionExtension int64 } func (l LiquidityMonitoringParameters) IntoProto() *proto.LiquidityMonitoringParameters { @@ -283,8 +289,6 @@ func (l LiquidityMonitoringParameters) IntoProto() *proto.LiquidityMonitoringPar } return &proto.LiquidityMonitoringParameters{ TargetStakeParameters: params, - TriggeringRatio: l.TriggeringRatio.String(), - AuctionExtension: l.AuctionExtension, } } @@ -294,18 +298,14 @@ func (l LiquidityMonitoringParameters) DeepClone() *LiquidityMonitoringParameter params = l.TargetStakeParameters.DeepClone() } return &LiquidityMonitoringParameters{ - TriggeringRatio: l.TriggeringRatio, - AuctionExtension: l.AuctionExtension, TargetStakeParameters: params, } } func (l LiquidityMonitoringParameters) String() string { return fmt.Sprintf( - "auctionExtension(%v) trigerringRatio(%s) targetStake(%s)", - l.AuctionExtension, - l.TriggeringRatio.String(), - stringer.ReflectPointerToString(l.TargetStakeParameters), + "auctionExtension(%v)", + stringer.PtrToString(l.TargetStakeParameters), ) } @@ -318,15 +318,8 @@ func LiquidityMonitoringParametersFromProto(p *proto.LiquidityMonitoringParamete params = TargetStakeParametersFromProto(p.TargetStakeParameters) } - tr, err := num.DecimalFromString(p.TriggeringRatio) - if err != nil { - return nil, fmt.Errorf("error getting trigerring ratio value from proto: %s", err) - } - return &LiquidityMonitoringParameters{ TargetStakeParameters: params, - AuctionExtension: p.AuctionExtension, - TriggeringRatio: tr, }, nil } @@ -378,7 +371,7 @@ func (a LiquidityProvisionAmendment) String() string { "marketID(%s) reference(%s) commitmentAmount(%s) fee(%s)", a.MarketID, a.Reference, - stringer.UintPointerToString(a.CommitmentAmount), + stringer.PtrToString(a.CommitmentAmount), a.Fee.String(), ) } @@ -413,3 +406,58 @@ func (l LiquidityProvisionCancellation) String() string { func (l LiquidityProvisionCancellation) GetMarketID() string { return l.MarketID } + +type LiquidityFeeSettings struct { + Method LiquidityFeeMethod + FeeConstant num.Decimal +} + +func (l *LiquidityFeeSettings) IntoProto() *proto.LiquidityFeeSettings { + if l == nil { + return nil + } + + r := &proto.LiquidityFeeSettings{ + Method: l.Method, + } + + if l.Method == LiquidityFeeMethodConstant { + r.FeeConstant = ptr.From(l.FeeConstant.String()) + } + + return r +} + +func LiquidityFeeSettingsFromProto(l *proto.LiquidityFeeSettings) *LiquidityFeeSettings { + if l == nil { + return nil + } + + fc := num.DecimalZero() + if l.Method == LiquidityFeeMethodConstant { + fc, _ = num.DecimalFromString(*l.FeeConstant) + } + + return &LiquidityFeeSettings{ + Method: l.Method, + FeeConstant: fc, + } +} + +func (l *LiquidityFeeSettings) DeepClone() *LiquidityFeeSettings { + if l == nil { + return nil + } + return &LiquidityFeeSettings{ + Method: l.Method, + FeeConstant: l.FeeConstant, + } +} + +func (l LiquidityFeeSettings) String() string { + return fmt.Sprintf( + "method(%s) feeConstant(%s)", + l.Method.String(), + l.FeeConstant.String(), + ) +} diff --git a/core/types/liquidity_fee_stats_test.go b/core/types/liquidity_fee_stats_test.go index b68daaf8e0..94080bf852 100644 --- a/core/types/liquidity_fee_stats_test.go +++ b/core/types/liquidity_fee_stats_test.go @@ -18,11 +18,11 @@ package types_test import ( "testing" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" v1 "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/stretchr/testify/require" ) func TestLiquidityFeeStats(t *testing.T) { diff --git a/core/types/market.go b/core/types/market.go index 6b1e3ec18e..95ee44d746 100644 --- a/core/types/market.go +++ b/core/types/market.go @@ -21,11 +21,15 @@ import ( "errors" "fmt" "strings" + "time" "code.vegaprotocol.io/vega/core/datasource" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/libs/stringer" + "code.vegaprotocol.io/vega/protos/vega" vegapb "code.vegaprotocol.io/vega/protos/vega" + "google.golang.org/protobuf/proto" ) @@ -344,9 +348,9 @@ func (t TradableInstrument) GetLogNormalRiskModel() *LogNormalRiskModel { func (t TradableInstrument) String() string { return fmt.Sprintf( "instrument(%s) marginCalculator(%s) riskModel(%s)", - stringer.ReflectPointerToString(t.Instrument), - stringer.ReflectPointerToString(t.MarginCalculator), - stringer.ReflectPointerToString(t.RiskModel), + stringer.PtrToString(t.Instrument), + stringer.PtrToString(t.MarginCalculator), + stringer.ObjToString(t.RiskModel), ) } @@ -373,7 +377,7 @@ func (InstrumentSpot) Type() ProductType { func (i InstrumentSpot) String() string { return fmt.Sprintf( "spot(%s)", - stringer.ReflectPointerToString(i.Spot), + stringer.PtrToString(i.Spot), ) } @@ -418,7 +422,7 @@ func (InstrumentFuture) Type() ProductType { func (i InstrumentFuture) String() string { return fmt.Sprintf( "future(%s)", - stringer.ReflectPointerToString(i.Future), + stringer.PtrToString(i.Future), ) } @@ -455,9 +459,9 @@ func (f Future) String() string { "quoteName(%s) settlementAsset(%s) dataSourceSpec(settlementData(%s) tradingTermination(%s) binding(%s))", f.QuoteName, f.SettlementAsset, - stringer.ReflectPointerToString(f.DataSourceSpecForSettlementData), - stringer.ReflectPointerToString(f.DataSourceSpecForTradingTermination), - stringer.ReflectPointerToString(f.DataSourceSpecBinding), + stringer.PtrToString(f.DataSourceSpecForSettlementData), + stringer.PtrToString(f.DataSourceSpecForTradingTermination), + stringer.PtrToString(f.DataSourceSpecBinding), ) } @@ -472,7 +476,7 @@ func (InstrumentPerps) Type() ProductType { func (i InstrumentPerps) String() string { return fmt.Sprintf( "perps(%s)", - stringer.ReflectPointerToString(i.Perps), + stringer.PtrToString(i.Perps), ) } @@ -485,12 +489,39 @@ type Perps struct { ClampLowerBound num.Decimal ClampUpperBound num.Decimal + // funding payment modifiers + FundingRateScalingFactor *num.Decimal + FundingRateLowerBound *num.Decimal + FundingRateUpperBound *num.Decimal + DataSourceSpecForSettlementData *datasource.Spec DataSourceSpecForSettlementSchedule *datasource.Spec DataSourceSpecBinding *datasource.SpecBindingForPerps + + InternalCompositePriceConfig *CompositePriceConfiguration } func PerpsFromProto(p *vegapb.Perpetual) *Perps { + var scalingFactor *num.Decimal + if p.FundingRateScalingFactor != nil { + scalingFactor = ptr.From(num.MustDecimalFromString(*p.FundingRateScalingFactor)) + } + + var upperBound *num.Decimal + if p.FundingRateUpperBound != nil { + upperBound = ptr.From(num.MustDecimalFromString(*p.FundingRateUpperBound)) + } + + var lowerBound *num.Decimal + if p.FundingRateLowerBound != nil { + lowerBound = ptr.From(num.MustDecimalFromString(*p.FundingRateLowerBound)) + } + + var internalCompositePriceConfig *CompositePriceConfiguration + if p.InternalCompositePriceConfig != nil { + internalCompositePriceConfig = CompositePriceConfigurationFromProto(p.InternalCompositePriceConfig) + } + return &Perps{ SettlementAsset: p.SettlementAsset, QuoteName: p.QuoteName, @@ -498,13 +529,37 @@ func PerpsFromProto(p *vegapb.Perpetual) *Perps { InterestRate: num.MustDecimalFromString(p.InterestRate), ClampLowerBound: num.MustDecimalFromString(p.ClampLowerBound), ClampUpperBound: num.MustDecimalFromString(p.ClampUpperBound), + FundingRateScalingFactor: scalingFactor, + FundingRateUpperBound: upperBound, + FundingRateLowerBound: lowerBound, DataSourceSpecForSettlementData: datasource.SpecFromProto(p.DataSourceSpecForSettlementData), DataSourceSpecForSettlementSchedule: datasource.SpecFromProto(p.DataSourceSpecForSettlementSchedule), DataSourceSpecBinding: datasource.SpecBindingForPerpsFromProto(p.DataSourceSpecBinding), + InternalCompositePriceConfig: internalCompositePriceConfig, } } func (p Perps) IntoProto() *vegapb.Perpetual { + var scalingFactor *string + if p.FundingRateScalingFactor != nil { + scalingFactor = ptr.From(p.FundingRateScalingFactor.String()) + } + + var upperBound *string + if p.FundingRateUpperBound != nil { + upperBound = ptr.From(p.FundingRateUpperBound.String()) + } + + var lowerBound *string + if p.FundingRateLowerBound != nil { + lowerBound = ptr.From(p.FundingRateLowerBound.String()) + } + + var internalCompositePriceConfig *vega.CompositePriceConfiguration + if p.InternalCompositePriceConfig != nil { + internalCompositePriceConfig = p.InternalCompositePriceConfig.IntoProto() + } + return &vegapb.Perpetual{ SettlementAsset: p.SettlementAsset, QuoteName: p.QuoteName, @@ -512,24 +567,29 @@ func (p Perps) IntoProto() *vegapb.Perpetual { InterestRate: p.InterestRate.String(), ClampLowerBound: p.ClampLowerBound.String(), ClampUpperBound: p.ClampUpperBound.String(), + FundingRateScalingFactor: scalingFactor, + FundingRateUpperBound: upperBound, + FundingRateLowerBound: lowerBound, DataSourceSpecForSettlementData: p.DataSourceSpecForSettlementData.IntoProto(), DataSourceSpecForSettlementSchedule: p.DataSourceSpecForSettlementSchedule.IntoProto(), DataSourceSpecBinding: p.DataSourceSpecBinding.IntoProto(), + InternalCompositePriceConfig: internalCompositePriceConfig, } } func (p Perps) String() string { return fmt.Sprintf( - "quoteName(%s) settlementAsset(%s) marginFundingFactore(%s) interestRate(%s) clampLowerBound(%s) clampUpperBound(%s) settlementData(%s) tradingTermination(%s) binding(%s)", + "quoteName(%s) settlementAsset(%s) marginFundingFactore(%s) interestRate(%s) clampLowerBound(%s) clampUpperBound(%s) settlementData(%s) tradingTermination(%s) binding(%s), internalCompositePriceConfig(%s)", p.QuoteName, p.SettlementAsset, p.MarginFundingFactor.String(), p.InterestRate.String(), p.ClampLowerBound.String(), p.ClampUpperBound.String(), - stringer.ReflectPointerToString(p.DataSourceSpecForSettlementData), - stringer.ReflectPointerToString(p.DataSourceSpecForSettlementSchedule), - stringer.ReflectPointerToString(p.DataSourceSpecBinding), + stringer.PtrToString(p.DataSourceSpecForSettlementData), + stringer.PtrToString(p.DataSourceSpecForSettlementSchedule), + stringer.PtrToString(p.DataSourceSpecBinding), + stringer.PtrToString(p.InternalCompositePriceConfig), ) } @@ -760,8 +820,8 @@ func (i Instrument) String() string { i.ID, i.Name, i.Code, - stringer.ReflectPointerToString(i.Product), - stringer.ReflectPointerToString(i.Metadata), + stringer.ObjToString(i.Product), + stringer.PtrToString(i.Metadata), ) } @@ -774,20 +834,38 @@ type ProductData struct { } type PerpetualData struct { - FundingRate string - FundingPayment string - InternalTWAP string - ExternalTWAP string + FundingRate string + FundingPayment string + InternalTWAP string + ExternalTWAP string + SeqNum uint64 + StartTime int64 + InternalCompositePrice *num.Uint + NextInternalCompositePriceCalc int64 + InternalCompositePriceType CompositePriceType + UnderlyingIndexPrice *num.Uint + InternalCompositePriceState *CompositePriceState } func (p PerpetualData) IntoProto() *vegapb.ProductData { + var internalCompositePriceState *vegapb.CompositePriceState + if p.InternalCompositePriceState != nil { + internalCompositePriceState = p.InternalCompositePriceState.IntoProto() + } return &vegapb.ProductData{ Data: &vegapb.ProductData_PerpetualData{ PerpetualData: &vegapb.PerpetualData{ - FundingRate: p.FundingRate, - FundingPayment: p.FundingPayment, - InternalTwap: p.InternalTWAP, - ExternalTwap: p.ExternalTWAP, + FundingRate: p.FundingRate, + FundingPayment: p.FundingPayment, + InternalTwap: p.InternalTWAP, + ExternalTwap: p.ExternalTWAP, + SeqNum: p.SeqNum, + StartTime: p.StartTime, + InternalCompositePrice: num.UintToString(p.InternalCompositePrice), + NextInternalCompositePriceCalc: p.NextInternalCompositePriceCalc, + InternalCompositePriceType: p.InternalCompositePriceType, + InternalCompositePriceState: internalCompositePriceState, + UnderlyingIndexPrice: num.UintToString(p.UnderlyingIndexPrice), }, }, } @@ -824,9 +902,12 @@ type MarketData struct { LiquidityProviderFeeShare []*LiquidityProviderFeeShare LiquidityProviderSLA []*LiquidityProviderSLA - NextMTM int64 - MarketGrowth num.Decimal - ProductData *ProductData + NextMTM int64 + MarketGrowth num.Decimal + ProductData *ProductData + NextNetClose int64 + MarkPriceType CompositePriceType + MarkPriceState *CompositePriceState } func (m MarketData) DeepClone() *MarketData { @@ -857,11 +938,16 @@ func (m MarketData) DeepClone() *MarketData { lpsla = append(lpsla, proto.Clone(sla).(*LiquidityProviderSLA)) } cpy.LiquidityProviderSLA = lpsla - + cpy.MarkPriceState = m.MarkPriceState.DeepClone() return &cpy } func (m MarketData) IntoProto() *vegapb.MarketData { + var markPriceState *vegapb.CompositePriceState + if m.MarkPriceState != nil { + markPriceState = m.MarkPriceState.IntoProto() + } + r := &vegapb.MarketData{ MarkPrice: num.UintToString(m.MarkPrice), LastTradedPrice: num.UintToString(m.LastTradedPrice), @@ -894,6 +980,9 @@ func (m MarketData) IntoProto() *vegapb.MarketData { LiquidityProviderSla: make([]*vegapb.LiquidityProviderSLA, 0, len(m.LiquidityProviderSLA)), NextMarkToMarket: m.NextMTM, MarketGrowth: m.MarketGrowth.String(), + NextNetworkCloseout: m.NextNetClose, + MarkPriceType: m.MarkPriceType, + MarkPriceState: markPriceState, } for _, pmb := range m.PriceMonitoringBounds { @@ -915,25 +1004,25 @@ func (m MarketData) IntoProto() *vegapb.MarketData { func (m MarketData) String() string { return fmt.Sprintf( - "markPrice(%s) lastTradedPrice(%s) bestBidPrice(%s) bestBidVolume(%v) bestOfferPrice(%s) bestOfferVolume(%v) bestStaticBidPrice(%s) bestStaticBidVolume(%v) bestStaticOfferPrice(%s) bestStaticOfferVolume(%v) midPrice(%s) staticMidPrice(%s) market(%s) timestamp(%v) openInterest(%v) auctionEnd(%v) auctionStart(%v) indicativePrice(%s) indicativeVolume(%v) marketTradingMode(%s) marketState(%s) trigger(%s) extensionTrigger(%s) targetStake(%s) suppliedStake(%s) priceMonitoringBounds(%s) marketValueProxy(%s) liquidityProviderFeeShare(%v) liquidityProviderSLA(%v) nextMTM(%v) marketGrowth(%v)", - stringer.UintPointerToString(m.MarkPrice), - stringer.UintPointerToString(m.LastTradedPrice), + "markPrice(%s) lastTradedPrice(%s) bestBidPrice(%s) bestBidVolume(%v) bestOfferPrice(%s) bestOfferVolume(%v) bestStaticBidPrice(%s) bestStaticBidVolume(%v) bestStaticOfferPrice(%s) bestStaticOfferVolume(%v) midPrice(%s) staticMidPrice(%s) market(%s) timestamp(%v) openInterest(%v) auctionEnd(%v) auctionStart(%v) indicativePrice(%s) indicativeVolume(%v) marketTradingMode(%s) marketState(%s) trigger(%s) extensionTrigger(%s) targetStake(%s) suppliedStake(%s) priceMonitoringBounds(%s) marketValueProxy(%s) liquidityProviderFeeShare(%v) liquidityProviderSLA(%v) nextMTM(%v) marketGrowth(%v) NextNetworkCloseout(%v)", + stringer.PtrToString(m.MarkPrice), + stringer.PtrToString(m.LastTradedPrice), m.BestBidPrice.String(), m.BestBidVolume, - stringer.UintPointerToString(m.BestOfferPrice), + stringer.PtrToString(m.BestOfferPrice), m.BestOfferVolume, - stringer.UintPointerToString(m.BestStaticBidPrice), + stringer.PtrToString(m.BestStaticBidPrice), m.BestStaticBidVolume, - stringer.UintPointerToString(m.BestStaticOfferPrice), + stringer.PtrToString(m.BestStaticOfferPrice), m.BestStaticOfferVolume, - stringer.UintPointerToString(m.MidPrice), - stringer.UintPointerToString(m.StaticMidPrice), + stringer.PtrToString(m.MidPrice), + stringer.PtrToString(m.StaticMidPrice), m.Market, m.Timestamp, m.OpenInterest, m.AuctionEnd, m.AuctionStart, - stringer.UintPointerToString(m.IndicativePrice), + stringer.PtrToString(m.IndicativePrice), m.IndicativeVolume, m.MarketTradingMode.String(), m.MarketState.String(), @@ -947,6 +1036,7 @@ func (m MarketData) String() string { LiquidityProviderSLAs(m.LiquidityProviderSLA).String(), m.NextMTM, m.MarketGrowth, + m.NextNetClose, ) } @@ -975,11 +1065,13 @@ type Market struct { // since they are only applied at the end of the epoch LiquiditySLAParams *LiquiditySLAParams - TradingMode MarketTradingMode - State MarketState - MarketTimestamps *MarketTimestamps - ParentMarketID string - InsurancePoolFraction num.Decimal + TradingMode MarketTradingMode + State MarketState + MarketTimestamps *MarketTimestamps + ParentMarketID string + InsurancePoolFraction num.Decimal + LiquidationStrategy *LiquidationStrategy + MarkPriceConfiguration *CompositePriceConfiguration } func MarketFromProto(mkt *vegapb.Market) (*Market, error) { @@ -998,6 +1090,27 @@ func MarketFromProto(mkt *vegapb.Market) (*Market, error) { if mkt.ParentMarketId != nil { parent = *mkt.ParentMarketId } + var ls *LiquidationStrategy + if mkt.LiquidationStrategy != nil { + if ls, err = LiquidationStrategyFromProto(mkt.LiquidationStrategy); err != nil { + return nil, err + } + } + + var markPriceConfiguration *CompositePriceConfiguration + if mkt.MarkPriceConfiguration != nil { + markPriceConfiguration = CompositePriceConfigurationFromProto(mkt.MarkPriceConfiguration) + } else { + // for existing markets set the mark price method to last trade so that there is no change from current methodology + markPriceConfiguration = &CompositePriceConfiguration{ + DecayWeight: num.DecimalZero(), + DecayPower: num.DecimalZero(), + CashAmount: num.UintZero(), + CompositePriceType: CompositePriceTypeByLastTrade, + SourceWeights: []num.Decimal{}, + SourceStalenessTolerance: []time.Duration{}, + } + } m := &Market{ ID: mkt.Id, @@ -1016,6 +1129,8 @@ func MarketFromProto(mkt *vegapb.Market) (*Market, error) { QuadraticSlippageFactor: quadraticSlippageFactor, ParentMarketID: parent, InsurancePoolFraction: insFraction, + LiquidationStrategy: ls, + MarkPriceConfiguration: markPriceConfiguration, } if mkt.LiquiditySlaParams != nil { @@ -1063,6 +1178,10 @@ func (m Market) IntoProto() *vegapb.Market { if m.LiquiditySLAParams != nil { lpSLA = m.LiquiditySLAParams.IntoProto() } + var lstrat *vegapb.LiquidationStrategy + if m.LiquidationStrategy != nil { + lstrat = m.LiquidationStrategy.IntoProto() + } r := &vegapb.Market{ Id: m.ID, @@ -1081,6 +1200,8 @@ func (m Market) IntoProto() *vegapb.Market { QuadraticSlippageFactor: m.QuadraticSlippageFactor.String(), InsurancePoolFraction: insPoolFrac, ParentMarketId: parent, + LiquidationStrategy: lstrat, + MarkPriceConfiguration: m.MarkPriceConfiguration.IntoProto(), } return r } @@ -1093,16 +1214,16 @@ func (m Market) String() string { return fmt.Sprintf( "ID(%s) tradableInstrument(%s) decimalPlaces(%v) positionDecimalPlaces(%v) fees(%s) openingAuction(%s) priceMonitoringSettings(%s) liquidityMonitoringParameters(%s) tradingMode(%s) state(%s) marketTimestamps(%s)", m.ID, - stringer.ReflectPointerToString(m.TradableInstrument), + stringer.PtrToString(m.TradableInstrument), m.DecimalPlaces, m.PositionDecimalPlaces, - stringer.ReflectPointerToString(m.Fees), - stringer.ReflectPointerToString(m.OpeningAuction), - stringer.ReflectPointerToString(m.PriceMonitoringSettings), - stringer.ReflectPointerToString(m.LiquidityMonitoringParameters), + stringer.PtrToString(m.Fees), + stringer.PtrToString(m.OpeningAuction), + stringer.PtrToString(m.PriceMonitoringSettings), + stringer.PtrToString(m.LiquidityMonitoringParameters), m.TradingMode.String(), m.State.String(), - stringer.ReflectPointerToString(m.MarketTimestamps), + stringer.PtrToString(m.MarketTimestamps), ) } @@ -1164,6 +1285,12 @@ func (m Market) DeepClone() *Market { if m.MarketTimestamps != nil { cpy.MarketTimestamps = m.MarketTimestamps.DeepClone() } + if m.LiquidationStrategy != nil { + cpy.LiquidationStrategy = m.LiquidationStrategy.DeepClone() + } + if m.MarkPriceConfiguration != nil { + cpy.MarkPriceConfiguration = m.MarkPriceConfiguration.DeepClone() + } return cpy } @@ -1181,3 +1308,16 @@ type MarketCounters struct { PositionCount uint64 OrderbookLevelCount uint64 } + +type CompositePriceType = vegapb.CompositePriceType + +const ( + // Default value, this is invalid. + CompositePriceTypeUnspecified CompositePriceType = vegapb.CompositePriceType_COMPOSITE_PRICE_TYPE_UNSPECIFIED + // Mark price calculated as the weighted average of underlying mark prices. + CompositePriceTypeByWeight CompositePriceType = vegapb.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED + // Mark price calculated as the median of underlying mark prices. + CompositePriceTypeByMedian CompositePriceType = vegapb.CompositePriceType_COMPOSITE_PRICE_TYPE_MEDIAN + // Mark price calculated as the last trade price. + CompositePriceTypeByLastTrade CompositePriceType = vegapb.CompositePriceType_COMPOSITE_PRICE_TYPE_LAST_TRADE +) diff --git a/core/types/market_test.go b/core/types/market_test.go index 2a7ec6ea51..cb9b182605 100644 --- a/core/types/market_test.go +++ b/core/types/market_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/types" vegapb "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/require" ) @@ -119,6 +120,166 @@ func TestMarketFromIntoProto(t *testing.T) { InfrastructureFee: "0.001", LiquidityFee: "0.003", }, + LiquidityFeeSettings: &vegapb.LiquidityFeeSettings{ + Method: vegapb.LiquidityFeeSettings_METHOD_WEIGHTED_AVERAGE, + }, + }, + OpeningAuction: &vegapb.AuctionDuration{ + Duration: 1, + Volume: 0, + }, + PriceMonitoringSettings: &vegapb.PriceMonitoringSettings{ + Parameters: &vegapb.PriceMonitoringParameters{ + Triggers: []*vegapb.PriceMonitoringTrigger{ + { + Horizon: 5, + Probability: "0.99", + AuctionExtension: 4, + }, + { + Horizon: 10, + Probability: "0.95", + AuctionExtension: 6, + }, + }, + }, + }, + LiquidityMonitoringParameters: &vegapb.LiquidityMonitoringParameters{ + TargetStakeParameters: &vegapb.TargetStakeParameters{ + TimeWindow: 20, + ScalingFactor: 0.7, + }, + }, + TradingMode: vegapb.Market_TRADING_MODE_CONTINUOUS, + State: vegapb.Market_STATE_ACTIVE, + MarketTimestamps: &vegapb.MarketTimestamps{ + Proposed: 0, + Pending: 1, + Open: 2, + Close: 360, + }, + LiquiditySlaParams: &vegapb.LiquiditySLAParameters{ + PriceRange: "0.95", + CommitmentMinTimeFraction: "0.5", + PerformanceHysteresisEpochs: 4, + SlaCompetitionFactor: "0.5", + }, + LinearSlippageFactor: "0.1", + QuadraticSlippageFactor: "0.1", + MarkPriceConfiguration: &vegapb.CompositePriceConfiguration{ + DecayWeight: "0.5", + DecayPower: 1, + CashAmount: "0", + CompositePriceType: 2, + SourceWeights: []string{"0.2", "0.3", "0.4", "0.5"}, + SourceStalenessTolerance: []string{"3h0m0s", "2s", "24h0m0s", "1h25m0s"}, + }, + } + + domain, err := types.MarketFromProto(pMarket) + require.NoError(t, err) + + // we can check equality of individual fields, but perhaps this is the easiest way: + got := domain.IntoProto() + require.EqualValues(t, pMarket, got) +} + +func TestPerpMarketFromIntoProto(t *testing.T) { + pk := dstypes.CreateSignerFromString("pubkey", dstypes.SignerTypePubKey) + + pMarket := &vegapb.Market{ + Id: "foo", + TradableInstrument: &vegapb.TradableInstrument{ + Instrument: &vegapb.Instrument{ + Id: "bar", + Code: "FB", + Name: "FooBar", + Metadata: &vegapb.InstrumentMetadata{ + Tags: []string{"test", "foo", "bar", "foobar"}, + }, + Product: &vegapb.Instrument_Perpetual{ + Perpetual: &vegapb.Perpetual{ + SettlementAsset: "GBP", + QuoteName: "USD", + MarginFundingFactor: "0.5", + InterestRate: "0.2", + ClampLowerBound: "0.1", + ClampUpperBound: "0.6", + InternalCompositePriceConfig: &vegapb.CompositePriceConfiguration{ + DecayWeight: "0.5", + DecayPower: 1, + CashAmount: "0", + CompositePriceType: 2, + SourceWeights: []string{"0.2", "0.3", "0.4", "0.5"}, + SourceStalenessTolerance: []string{"3h0m0s", "2s", "24h0m0s", "1h25m0s"}, + }, + DataSourceSpecForSettlementData: &vegapb.DataSourceSpec{ + Id: "os1", + CreatedAt: 0, + UpdatedAt: 1, + Data: vegapb.NewDataSourceDefinition( + vegapb.DataSourceContentTypeOracle, + ).SetOracleConfig( + &vegapb.DataSourceDefinitionExternal_Oracle{ + Oracle: &vegapb.DataSourceSpecConfiguration{ + Signers: []*datapb.Signer{pk.IntoProto()}, + Filters: []*datapb.Filter{testFilter1}, + }, + }, + ), + Status: vegapb.DataSourceSpec_STATUS_ACTIVE, + }, + DataSourceSpecForSettlementSchedule: &vegapb.DataSourceSpec{ + Id: "os1", + CreatedAt: 0, + UpdatedAt: 1, + Data: vegapb.NewDataSourceDefinition( + vegapb.DataSourceContentTypeOracle, + ).SetOracleConfig( + &vegapb.DataSourceDefinitionExternal_Oracle{ + Oracle: &vegapb.DataSourceSpecConfiguration{ + Signers: []*datapb.Signer{pk.IntoProto()}, + Filters: []*datapb.Filter{testFilter1}, + }, + }, + ), + Status: vegapb.DataSourceSpec_STATUS_ACTIVE, + }, + DataSourceSpecBinding: &vegapb.DataSourceSpecToPerpetualBinding{ + SettlementDataProperty: "something", + }, + }, + }, + }, + MarginCalculator: &vegapb.MarginCalculator{ + ScalingFactors: &vegapb.ScalingFactors{ + SearchLevel: 0.02, + InitialMargin: 0.05, + CollateralRelease: 0.1, + }, + }, + RiskModel: &vegapb.TradableInstrument_LogNormalRiskModel{ + LogNormalRiskModel: &vegapb.LogNormalRiskModel{ + RiskAversionParameter: 0.01, + Tau: 0.2, + Params: &vegapb.LogNormalModelParams{ + Mu: 0.12323, + R: 0.125, + Sigma: 0.3, + }, + }, + }, + }, + DecimalPlaces: 3, + Fees: &vegapb.Fees{ + Factors: &vegapb.FeeFactors{ + MakerFee: "0.002", + InfrastructureFee: "0.001", + LiquidityFee: "0.003", + }, + LiquidityFeeSettings: &vegapb.LiquidityFeeSettings{ + Method: vegapb.LiquidityFeeSettings_METHOD_WEIGHTED_AVERAGE, + }, }, OpeningAuction: &vegapb.AuctionDuration{ Duration: 1, @@ -145,8 +306,6 @@ func TestMarketFromIntoProto(t *testing.T) { TimeWindow: 20, ScalingFactor: 0.7, }, - TriggeringRatio: "0.8", - AuctionExtension: 5, }, TradingMode: vegapb.Market_TRADING_MODE_CONTINUOUS, State: vegapb.Market_STATE_ACTIVE, @@ -164,6 +323,14 @@ func TestMarketFromIntoProto(t *testing.T) { }, LinearSlippageFactor: "0.1", QuadraticSlippageFactor: "0.1", + MarkPriceConfiguration: &vegapb.CompositePriceConfiguration{ + DecayWeight: "0.7", + DecayPower: 2, + CashAmount: "100", + CompositePriceType: 3, + SourceWeights: []string{"0.5", "0.2", "0.3", "0.1"}, + SourceStalenessTolerance: []string{"3h0m1s", "3s", "25h0m0s", "2h25m0s"}, + }, } domain, err := types.MarketFromProto(pMarket) @@ -171,5 +338,7 @@ func TestMarketFromIntoProto(t *testing.T) { // we can check equality of individual fields, but perhaps this is the easiest way: got := domain.IntoProto() + + require.EqualValues(t, pMarket.MarkPriceConfiguration, got.MarkPriceConfiguration) require.EqualValues(t, pMarket, got) } diff --git a/core/types/matching.go b/core/types/matching.go index 275d654197..caa7e22da0 100644 --- a/core/types/matching.go +++ b/core/types/matching.go @@ -195,11 +195,11 @@ func (o Order) String() string { o.CreatedAt, o.UpdatedAt, o.ExpiresAt, - stringer.UintPointerToString(o.OriginalPrice), - stringer.ReflectPointerToString(o.PeggedOrder), + stringer.PtrToString(o.OriginalPrice), + stringer.PtrToString(o.PeggedOrder), o.PostOnly, o.ReduceOnly, - stringer.ReflectPointerToString(o.IcebergOrder), + stringer.PtrToString(o.IcebergOrder), ) } @@ -378,8 +378,13 @@ func (o *Order) applyOrderAmendmentSizeIceberg(delta int64) { o.IcebergOrder.ReservedRemaining = 0 } -// applyOrderAmendmentSizeDelta update the orders size/remaining fields based on the size an direction of the given delta. -func (o *Order) applyOrderAmendmentSizeDelta(delta int64) { +func (o *Order) amendSize(size uint64) { + o.amendSizeWithDelta(int64(size) - int64(o.Size)) +} + +// amendSizeWithDelta update the orders size/remaining fields based on the size +// an direction of the given delta. +func (o *Order) amendSizeWithDelta(delta int64) { if o.IcebergOrder != nil { o.applyOrderAmendmentSizeIceberg(delta) return @@ -426,9 +431,12 @@ func (o *Order) ApplyOrderAmendment(amendment *OrderAmendment, updatedAtNano int order.OriginalPrice = amendment.Price.Clone() } - // apply size changes + if amendment.Size != nil { + order.amendSize(*amendment.Size) + } + if delta := amendment.SizeDelta; delta != 0 { - order.applyOrderAmendmentSizeDelta(delta) + order.amendSizeWithDelta(delta) } // apply tif @@ -534,7 +542,7 @@ func (p PeggedOrder) String() string { return fmt.Sprintf( "reference(%s) offset(%s)", p.Reference.String(), - stringer.UintPointerToString(p.Offset), + stringer.PtrToString(p.Offset), ) } @@ -667,13 +675,37 @@ func (t *Trade) IntoProto() *proto.Trade { } } +func TradeFromProto(t *proto.Trade) *Trade { + if t == nil { + return nil + } + + return &Trade{ + ID: t.Id, + MarketID: t.MarketId, + Price: num.MustUintFromString(t.Price, 10), + Size: t.Size, + Buyer: t.Buyer, + Seller: t.Seller, + Aggressor: t.Aggressor, + BuyOrder: t.BuyOrder, + SellOrder: t.SellOrder, + Timestamp: t.Timestamp, + Type: t.Type, + BuyerFee: FeeFromProto(t.BuyerFee), + SellerFee: FeeFromProto(t.SellerFee), + BuyerAuctionBatch: t.BuyerAuctionBatch, + SellerAuctionBatch: t.SellerAuctionBatch, + } +} + func (t Trade) String() string { return fmt.Sprintf( "ID(%s) marketID(%s) price(%s) marketPrice(%s) size(%v) buyer(%s) seller(%s) aggressor(%s) buyOrder(%s) sellOrder(%s) timestamp(%v) type(%s) buyerAuctionBatch(%v) sellerAuctionBatch(%v) buyerFee(%s) sellerFee(%s)", t.ID, t.MarketID, - stringer.UintPointerToString(t.Price), - stringer.UintPointerToString(t.MarketPrice), + stringer.PtrToString(t.Price), + stringer.PtrToString(t.MarketPrice), t.Size, t.Buyer, t.Seller, @@ -684,8 +716,8 @@ func (t Trade) String() string { t.Type.String(), t.BuyerAuctionBatch, t.SellerAuctionBatch, - stringer.ReflectPointerToString(t.SellerFee), - stringer.ReflectPointerToString(t.BuyerFee), + stringer.PtrToString(t.SellerFee), + stringer.PtrToString(t.BuyerFee), ) } @@ -892,9 +924,11 @@ const ( // An FOK, IOC, or GFN order was rejected because it resulted in trades outside the price bounds. OrderErrorNonPersistentOrderOutOfPriceBounds OrderError = proto.OrderError_ORDER_ERROR_NON_PERSISTENT_ORDER_OUT_OF_PRICE_BOUNDS // Unable to submit pegged order, temporarily too many pegged orders across all markets. - OrderErrorTooManyPeggedOrders OrderError = proto.OrderError_ORDER_ERROR_TOO_MANY_PEGGED_ORDERS - OrderErrorPostOnlyOrderWouldTrade OrderError = proto.OrderError_ORDER_ERROR_POST_ONLY_ORDER_WOULD_TRADE - OrderErrorReduceOnlyOrderWouldNotReducePosition OrderError = proto.OrderError_ORDER_ERROR_REDUCE_ONLY_ORDER_WOULD_NOT_REDUCE_POSITION + OrderErrorTooManyPeggedOrders OrderError = proto.OrderError_ORDER_ERROR_TOO_MANY_PEGGED_ORDERS + OrderErrorPostOnlyOrderWouldTrade OrderError = proto.OrderError_ORDER_ERROR_POST_ONLY_ORDER_WOULD_TRADE + OrderErrorReduceOnlyOrderWouldNotReducePosition OrderError = proto.OrderError_ORDER_ERROR_REDUCE_ONLY_ORDER_WOULD_NOT_REDUCE_POSITION + OrderErrorIsolatedMarginCheckFailed OrderError = proto.OrderError_ORDER_ERROR_ISOLATED_MARGIN_CHECK_FAILED + OrderErrorPeggedOrdersNotAllowedInIsolatedMargin OrderError = proto.OrderError_ORDER_ERROR_PEGGED_ORDERS_NOT_ALLOWED_IN_ISOLATED_MARGIN_MODE ) var ( @@ -922,6 +956,7 @@ var ( ErrTooManyPeggedOrders = OrderErrorTooManyPeggedOrders ErrPostOnlyOrderWouldTrade = OrderErrorPostOnlyOrderWouldTrade ErrReduceOnlyOrderWouldNotReducePosition = OrderErrorReduceOnlyOrderWouldNotReducePosition + ErrPeggedOrdersNotAllowedInIsolatedMargin = OrderErrorPeggedOrdersNotAllowedInIsolatedMargin ) func IsOrderError(err error) (OrderError, bool) { @@ -932,5 +967,7 @@ func IsOrderError(err error) (OrderError, bool) { func IsStoppingOrder(o OrderError) bool { return o == OrderErrorNonPersistentOrderOutOfPriceBounds || o == ErrPostOnlyOrderWouldTrade || - o == ErrReduceOnlyOrderWouldNotReducePosition + o == ErrReduceOnlyOrderWouldNotReducePosition || + o == OrderErrorIsolatedMarginCheckFailed || + o == OrderErrorPeggedOrdersNotAllowedInIsolatedMargin } diff --git a/core/types/matching_test.go b/core/types/matching_test.go new file mode 100644 index 0000000000..9be51f978e --- /dev/null +++ b/core/types/matching_test.go @@ -0,0 +1,70 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package types_test + +import ( + "testing" + + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/num" + + "github.com/stretchr/testify/require" +) + +func TestTradeSerialisation(t *testing.T) { + trade := &types.Trade{ + ID: "1", + MarketID: "m1", + Price: num.NewUint(100), + Size: 10, + Buyer: "z1", + Seller: "z2", + Aggressor: types.SideBuy, + BuyOrder: "buy", + SellOrder: "sell", + Timestamp: 100, + Type: types.TradeTypeDefault, + BuyerFee: &types.Fee{ + MakerFee: num.NewUint(1), + InfrastructureFee: num.NewUint(2), + LiquidityFee: num.NewUint(3), + MakerFeeVolumeDiscount: num.NewUint(4), + InfrastructureFeeVolumeDiscount: num.NewUint(5), + LiquidityFeeVolumeDiscount: num.NewUint(6), + MakerFeeReferrerDiscount: num.NewUint(7), + InfrastructureFeeReferrerDiscount: num.NewUint(8), + LiquidityFeeReferrerDiscount: num.NewUint(9), + }, + SellerFee: &types.Fee{ + MakerFee: num.NewUint(11), + InfrastructureFee: num.NewUint(12), + LiquidityFee: num.NewUint(13), + MakerFeeVolumeDiscount: num.NewUint(14), + InfrastructureFeeVolumeDiscount: num.NewUint(15), + LiquidityFeeVolumeDiscount: num.NewUint(16), + MakerFeeReferrerDiscount: num.NewUint(17), + InfrastructureFeeReferrerDiscount: num.NewUint(18), + LiquidityFeeReferrerDiscount: num.NewUint(19), + }, + BuyerAuctionBatch: 1, + SellerAuctionBatch: 2, + } + p := trade.IntoProto() + tradePrime := types.TradeFromProto(p) + require.Equal(t, trade, tradePrime) + pPrime := tradePrime.IntoProto() + require.Equal(t, p.String(), pPrime.String()) +} diff --git a/core/types/orders.go b/core/types/orders.go index 9166cc5bcf..6904823866 100644 --- a/core/types/orders.go +++ b/core/types/orders.go @@ -56,6 +56,7 @@ type OrderAmendment struct { MarketID string Price *num.Uint SizeDelta int64 + Size *uint64 ExpiresAt *int64 // timestamp TimeInForce OrderTimeInForce PeggedOffset *num.Uint @@ -90,6 +91,7 @@ func NewOrderAmendmentFromProto(p *commandspb.OrderAmendment) (*OrderAmendment, MarketID: p.MarketId, Price: price, SizeDelta: p.SizeDelta, + Size: p.Size, ExpiresAt: exp, TimeInForce: p.TimeInForce, PeggedOffset: peggedOffset, @@ -102,6 +104,7 @@ func (o OrderAmendment) IntoProto() *commandspb.OrderAmendment { OrderId: o.OrderID, MarketId: o.MarketID, SizeDelta: o.SizeDelta, + Size: o.Size, TimeInForce: o.TimeInForce, PeggedReference: o.PeggedReference, } @@ -140,15 +143,16 @@ func (o OrderAmendment) Validate() error { func (o OrderAmendment) String() string { return fmt.Sprintf( - "orderID(%s) marketID(%s) sizeDelta(%v) timeInForce(%s) peggedReference(%s) price(%s) expiresAt(%v) peggedOffset(%s)", + "orderID(%s) marketID(%s) sizeDelta(%v) size(%v) timeInForce(%s) peggedReference(%s) price(%s) expiresAt(%v) peggedOffset(%s)", o.OrderID, o.MarketID, o.SizeDelta, + stringer.PtrToString(o.Size), o.TimeInForce.String(), o.PeggedReference.String(), - stringer.UintPointerToString(o.Price), - stringer.Int64PointerToString(o.ExpiresAt), - stringer.UintPointerToString(o.PeggedOffset), + stringer.PtrToString(o.Price), + stringer.PtrToString(o.ExpiresAt), + stringer.PtrToString(o.PeggedOffset), ) } diff --git a/core/types/party.go b/core/types/party.go index 15b9033fea..e57bf015c7 100644 --- a/core/types/party.go +++ b/core/types/party.go @@ -32,3 +32,9 @@ func (p Party) IntoProto() *vegapb.Party { Id: p.Id, } } + +type PartyProfile struct { + PartyID PartyID + Alias string + Metadata map[string]string +} diff --git a/core/types/party_snapshot.go b/core/types/party_snapshot.go new file mode 100644 index 0000000000..d46a737243 --- /dev/null +++ b/core/types/party_snapshot.go @@ -0,0 +1,50 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package types + +import snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + +type PayloadParties struct { + Profiles []*snapshotpb.PartyProfile +} + +func (p *PayloadParties) Key() string { + return "parties" +} + +func (*PayloadParties) Namespace() SnapshotNamespace { + return PartiesSnapshot +} + +func (p *PayloadParties) IntoProto() *snapshotpb.Payload_Parties { + return &snapshotpb.Payload_Parties{ + Parties: &snapshotpb.Parties{ + Profiles: p.Profiles, + }, + } +} + +func (*PayloadParties) isPayload() {} + +func (p *PayloadParties) plToProto() interface{} { + return p.IntoProto() +} + +func PayloadPartiesFromProto(payload *snapshotpb.Payload_Parties) *PayloadParties { + return &PayloadParties{ + Profiles: payload.Parties.GetProfiles(), + } +} diff --git a/core/types/pricemonitoring.go b/core/types/pricemonitoring.go index 402719a80c..561d304b30 100644 --- a/core/types/pricemonitoring.go +++ b/core/types/pricemonitoring.go @@ -56,9 +56,9 @@ type PriceMonitoringBounds struct { func (p PriceMonitoringBounds) String() string { return fmt.Sprintf( "minValidPrice(%s) maxValidPrice(%s) trigger(%s) referencePrice(%s)", - stringer.UintPointerToString(p.MinValidPrice), - stringer.UintPointerToString(p.MaxValidPrice), - stringer.ReflectPointerToString(p.Trigger), + stringer.PtrToString(p.MinValidPrice), + stringer.PtrToString(p.MaxValidPrice), + stringer.PtrToString(p.Trigger), p.ReferencePrice.String(), ) } @@ -80,7 +80,7 @@ func (p PriceMonitoringSettings) DeepClone() *PriceMonitoringSettings { } func (p PriceMonitoringSettings) String() string { - return fmt.Sprintf("parameters(%s)", stringer.ReflectPointerToString(p.Parameters)) + return fmt.Sprintf("parameters(%s)", stringer.PtrToString(p.Parameters)) } func PriceMonitoringSettingsFromProto(pr *proto.PriceMonitoringSettings) *PriceMonitoringSettings { diff --git a/core/types/pricemonitoring_test.go b/core/types/pricemonitoring_test.go index 51cf341cc9..c2acc514e9 100644 --- a/core/types/pricemonitoring_test.go +++ b/core/types/pricemonitoring_test.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/core/types" proto "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/require" ) diff --git a/core/types/processor.go b/core/types/processor.go index 20ef439638..17ac1019d1 100644 --- a/core/types/processor.go +++ b/core/types/processor.go @@ -162,14 +162,14 @@ func (o OrderSubmission) String() string { return fmt.Sprintf( "marketID(%s) price(%s) size(%v) side(%s) timeInForce(%s) expiresAt(%v) type(%s) reference(%s) peggedOrder(%s) postOnly(%v) reduceOnly(%v)", o.MarketID, - stringer.UintPointerToString(o.Price), + stringer.PtrToString(o.Price), o.Size, o.Side.String(), o.TimeInForce.String(), o.ExpiresAt, o.Type.String(), o.Reference, - stringer.ReflectPointerToString(o.PeggedOrder), + stringer.PtrToString(o.PeggedOrder), o.PostOnly, o.ReduceOnly, ) @@ -242,7 +242,7 @@ func (w WithdrawSubmission) String() string { return fmt.Sprintf( "asset(%s) amount(%s) ext(%s)", w.Asset, - stringer.UintPointerToString(w.Amount), - stringer.ReflectPointerToString(w.Ext), + stringer.PtrToString(w.Amount), + stringer.PtrToString(w.Ext), ) } diff --git a/core/types/risk.go b/core/types/risk.go index 478f63d2c9..f8475c3186 100644 --- a/core/types/risk.go +++ b/core/types/risk.go @@ -93,7 +93,7 @@ func (l LogNormalRiskModel) String() string { "tau(%s) riskAversionParameter(%s) params(%s)", l.Tau.String(), l.RiskAversionParameter.String(), - stringer.ReflectPointerToString(l.Params), + stringer.PtrToString(l.Params), ) } @@ -104,7 +104,7 @@ type TradableInstrumentLogNormalRiskModel struct { func (t TradableInstrumentLogNormalRiskModel) String() string { return fmt.Sprintf( "logNormalRiskModel(%s)", - stringer.ReflectPointerToString(t.LogNormalRiskModel), + stringer.PtrToString(t.LogNormalRiskModel), ) } @@ -190,10 +190,13 @@ type MarginLevels struct { SearchLevel *num.Uint InitialMargin *num.Uint CollateralReleaseLevel *num.Uint + OrderMargin *num.Uint Party string MarketID string Asset string Timestamp int64 + MarginMode MarginMode + MarginFactor num.Decimal } type RiskFactor struct { @@ -208,24 +211,30 @@ func (m MarginLevels) IntoProto() *proto.MarginLevels { SearchLevel: num.UintToString(m.SearchLevel), InitialMargin: num.UintToString(m.InitialMargin), CollateralReleaseLevel: num.UintToString(m.CollateralReleaseLevel), + OrderMargin: num.UintToString(m.OrderMargin), PartyId: m.Party, MarketId: m.MarketID, Asset: m.Asset, Timestamp: m.Timestamp, + MarginMode: m.MarginMode, + MarginFactor: m.MarginFactor.String(), } } func (m MarginLevels) String() string { return fmt.Sprintf( - "marketID(%s) asset(%s) party(%s) intialMargin(%s) maintenanceMargin(%s) collateralReleaseLevel(%s) searchLevel(%s) timestamp(%v)", + "marketID(%s) asset(%s) party(%s) intialMargin(%s) maintenanceMargin(%s) collateralReleaseLevel(%s) searchLevel(%s) orderMargin(%s) timestamp(%v) marginMode(%d) marginFactor(%s)", m.MarketID, m.Asset, m.Party, - stringer.UintPointerToString(m.InitialMargin), - stringer.UintPointerToString(m.MaintenanceMargin), - stringer.UintPointerToString(m.CollateralReleaseLevel), - stringer.UintPointerToString(m.SearchLevel), + stringer.PtrToString(m.InitialMargin), + stringer.PtrToString(m.MaintenanceMargin), + stringer.PtrToString(m.CollateralReleaseLevel), + stringer.PtrToString(m.SearchLevel), + stringer.PtrToString(m.OrderMargin), m.Timestamp, + m.MarginMode, + m.MarginFactor.String(), ) } @@ -255,7 +264,7 @@ func (m MarginCalculator) IntoProto() *proto.MarginCalculator { func (m MarginCalculator) String() string { return fmt.Sprintf( "scalingFactors(%s)", - stringer.ReflectPointerToString(m.ScalingFactors), + stringer.PtrToString(m.ScalingFactors), ) } @@ -343,7 +352,7 @@ type TradableInstrumentSimpleRiskModel struct { func (t TradableInstrumentSimpleRiskModel) String() string { return fmt.Sprintf( "simpleRiskModel(%s)", - stringer.ReflectPointerToString(t.SimpleRiskModel), + stringer.PtrToString(t.SimpleRiskModel), ) } @@ -414,7 +423,7 @@ func (s SimpleRiskModel) IntoProto() *proto.SimpleRiskModel { func (s SimpleRiskModel) String() string { return fmt.Sprintf( "params(%s)", - stringer.ReflectPointerToString(s.Params), + stringer.PtrToString(s.Params), ) } @@ -453,3 +462,11 @@ func (s SimpleModelParams) DeepClone() *SimpleModelParams { ProbabilityOfTrading: s.ProbabilityOfTrading, } } + +type MarginMode = proto.MarginMode + +const ( + MarginModeUnspecified MarginMode = proto.MarginMode_MARGIN_MODE_UNSPECIFIED + MarginModeCrossMargin MarginMode = proto.MarginMode_MARGIN_MODE_CROSS_MARGIN + MarginModeIsolatedMargin MarginMode = proto.MarginMode_MARGIN_MODE_ISOLATED_MARGIN +) diff --git a/core/types/snapshot.go b/core/types/snapshot.go index 8aca8a9d6f..c96aaaee80 100644 --- a/core/types/snapshot.go +++ b/core/types/snapshot.go @@ -22,11 +22,11 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/crypto" + "code.vegaprotocol.io/vega/libs/proto" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "code.vegaprotocol.io/vega/libs/proto" + tmtypes "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/iavl" - tmtypes "github.com/tendermint/tendermint/abci/types" ) // StateProvider - not a huge fan of this interface being here, but it ensures that the state providers @@ -93,11 +93,14 @@ const ( SettlementSnapshot SnapshotNamespace = "settlement" HoldingAccountTrackerSnapshot SnapshotNamespace = "holdingAccountTracker" EthereumOracleVerifierSnapshot SnapshotNamespace = "ethereumoracleverifier" + L2EthereumOraclesSnapshot SnapshotNamespace = "l2EthereumOracles" TeamsSnapshot SnapshotNamespace = "teams" + PartiesSnapshot SnapshotNamespace = "parties" VestingSnapshot SnapshotNamespace = "vesting" ReferralProgramSnapshot SnapshotNamespace = "referralProgram" ActivityStreakSnapshot SnapshotNamespace = "activitystreak" VolumeDiscountProgramSnapshot SnapshotNamespace = "volumeDiscountProgram" + LiquidationSnapshot SnapshotNamespace = "liquidation" MaxChunkSize = 16 * 1000 * 1000 // technically 16 * 1024 * 1024, but you know IdealChunkSize = 10 * 1000 * 1000 // aim for 10MB diff --git a/core/types/snapshot_nodes.go b/core/types/snapshot_nodes.go index 0ee7383f64..7ccb4338b4 100644 --- a/core/types/snapshot_nodes.go +++ b/core/types/snapshot_nodes.go @@ -88,7 +88,6 @@ type PayloadProofOfWork struct { HeightToTx map[uint64][]string HeightToTid map[uint64][]string HeightToNonceRef map[uint64][]*snapshot.NonceRef - BannedParties map[string]int64 ActiveParams []*snapshot.ProofOfWorkParams ActiveStates []*snapshot.ProofOfWorkState LastPruningBlock uint64 @@ -142,6 +141,10 @@ type PayloadBankingScheduledGovernanceTransfers struct { BankingScheduledGovernanceTransfers []*checkpointpb.ScheduledGovernanceTransferAtTime } +type PayloadBankingTransferFeeDiscounts struct { + BankingTransferFeeDiscounts *snapshot.BankingTransferFeeDiscounts +} + type PayloadCheckpoint struct { Checkpoint *CPState } @@ -178,6 +181,10 @@ type PayloadDelegationLastReconTime struct { LastReconcilicationTime time.Time } +type PayloadGovernanceBatchActive struct { + GovernanceBatchActive *GovernanceBatchActive +} + type PayloadGovernanceActive struct { GovernanceActive *GovernanceActive } @@ -265,6 +272,10 @@ type PayloadEthContractCallEvent struct { EthContractCallEvent []*ethcall.ContractCallEvent } +type PayloadL2EthOracles struct { + L2EthOracles *snapshot.L2EthOracles +} + type PayloadEpoch struct { EpochState *EpochState } @@ -319,7 +330,10 @@ type Resource struct { } type PayloadEventForwarder struct { + // keys are deprecated, to be removed after 74 Keys []string + // Buckets are used with the new upgrade + Buckets []*snapshot.EventForwarderBucket } type PayloadERC20MultiSigTopologyVerified struct { @@ -416,33 +430,37 @@ type ExecutionMarkets struct { } type ExecMarket struct { - Market *Market - PriceMonitor *PriceMonitor - AuctionState *AuctionState - PeggedOrders *PeggedOrdersState - ExpiringOrders []*Order - LastBestBid *num.Uint - LastBestAsk *num.Uint - LastMidBid *num.Uint - LastMidAsk *num.Uint - LastMarketValueProxy num.Decimal - LastEquityShareDistributed int64 - EquityShare *EquityShare - CurrentMarkPrice *num.Uint - LastTradedPrice *num.Uint - ShortRiskFactor num.Decimal - LongRiskFactor num.Decimal - RiskFactorConsensusReached bool - FeeSplitter *FeeSplitter - SettlementData *num.Numeric - NextMTM int64 - Parties []string - Closed bool - IsSucceeded bool - StopOrders *snapshot.StopOrders - ExpiringStopOrders []*Order - Product *snapshot.Product - FeesStats *eventspb.FeesStats + Market *Market + PriceMonitor *PriceMonitor + AuctionState *AuctionState + PeggedOrders *PeggedOrdersState + ExpiringOrders []*Order + LastBestBid *num.Uint + LastBestAsk *num.Uint + LastMidBid *num.Uint + LastMidAsk *num.Uint + LastMarketValueProxy num.Decimal + LastEquityShareDistributed int64 + EquityShare *EquityShare + CurrentMarkPrice *num.Uint + LastTradedPrice *num.Uint + ShortRiskFactor num.Decimal + LongRiskFactor num.Decimal + RiskFactorConsensusReached bool + FeeSplitter *FeeSplitter + SettlementData *num.Numeric + NextMTM int64 + NextInternalCompositePriceCalc int64 + Parties []string + Closed bool + IsSucceeded bool + StopOrders *snapshot.StopOrders + ExpiringStopOrders []*Order + Product *snapshot.Product + FeesStats *eventspb.FeesStats + PartyMarginFactors []*snapshot.PartyMarginFactor + MarkPriceCalculator *snapshot.CompositePriceCalculator + InternalCompositePriceCalculator *snapshot.CompositePriceCalculator } type ExecSpotMarket struct { @@ -677,6 +695,10 @@ type DelegationAuto struct { Parties []string } +type GovernanceBatchActive struct { + BatchProposals []*snapshot.BatchProposalData +} + type GovernanceActive struct { Proposals []*ProposalData } @@ -686,7 +708,8 @@ type GovernanceEnacted struct { } type GovernanceNode struct { - Proposals []*Proposal + Proposals []*Proposal + ProposalData []*ProposalData } type ProposalData struct { @@ -708,6 +731,7 @@ type MarketPosition struct { Price *num.Uint BuySumProduct, SellSumProduct *num.Uint Distressed bool + AverageEntryPrice *num.Uint } type StakingAccounts struct { @@ -928,6 +952,8 @@ func PayloadFromProto(p *snapshot.Payload) *Payload { ret.Data = PayloadBankingRecurringGovernanceTransfersFromProto(dt) case *snapshot.Payload_BankingScheduledGovernanceTransfers: ret.Data = PayloadBankingScheduledGovernanceTransfersFromProto(dt) + case *snapshot.Payload_BankingTransferFeeDiscounts: + ret.Data = PayloadBankingTransferFeeDiscountsFromProto(dt) case *snapshot.Payload_Erc20MultisigTopologyPending: ret.Data = PayloadERC20MultiSigTopologyPendingFromProto(dt) case *snapshot.Payload_Erc20MultisigTopologyVerified: @@ -958,6 +984,14 @@ func PayloadFromProto(p *snapshot.Payload) *Payload { ret.Data = PayloadLiquidityV2ParamsFromProto(dt) case *snapshot.Payload_LiquidityV2PaidFeesStats: ret.Data = PayloadLiquidityV2PaidFeesStatsFromProto(dt) + case *snapshot.Payload_Liquidation: + ret.Data = PayloadLiquidationNodeFromProto(dt) + case *snapshot.Payload_GovernanceBatchActive: + ret.Data = PayloadGovernanceBatchActiveFromProto(dt) + case *snapshot.Payload_Parties: + ret.Data = PayloadPartiesFromProto(dt) + case *snapshot.Payload_L2EthOracles: + ret.Data = PayloadL2EthOraclesFromProto(dt) default: panic(fmt.Errorf("missing support for payload %T", dt)) } @@ -1101,6 +1135,8 @@ func (p Payload) IntoProto() *snapshot.Payload { ret.Data = dt case *snapshot.Payload_BankingScheduledGovernanceTransfers: ret.Data = dt + case *snapshot.Payload_BankingTransferFeeDiscounts: + ret.Data = dt case *snapshot.Payload_Erc20MultisigTopologyPending: ret.Data = dt case *snapshot.Payload_Erc20MultisigTopologyVerified: @@ -1135,6 +1171,14 @@ func (p Payload) IntoProto() *snapshot.Payload { ret.Data = dt case *snapshot.Payload_LiquidityV2PaidFeesStats: ret.Data = dt + case *snapshot.Payload_Liquidation: + ret.Data = dt + case *snapshot.Payload_GovernanceBatchActive: + ret.Data = dt + case *snapshot.Payload_Parties: + ret.Data = dt + case *snapshot.Payload_L2EthOracles: + ret.Data = dt default: panic(fmt.Errorf("missing support for payload %T", dt)) } @@ -1763,6 +1807,34 @@ func (*PayloadBankingScheduledGovernanceTransfers) Namespace() SnapshotNamespace return BankingSnapshot } +func PayloadBankingTransferFeeDiscountsFromProto(pbd *snapshot.Payload_BankingTransferFeeDiscounts) *PayloadBankingTransferFeeDiscounts { + return &PayloadBankingTransferFeeDiscounts{ + BankingTransferFeeDiscounts: pbd.BankingTransferFeeDiscounts, + } +} + +func (p PayloadBankingTransferFeeDiscounts) IntoProto() *snapshot.Payload_BankingTransferFeeDiscounts { + return &snapshot.Payload_BankingTransferFeeDiscounts{ + BankingTransferFeeDiscounts: &snapshot.BankingTransferFeeDiscounts{ + PartyAssetDiscount: p.BankingTransferFeeDiscounts.PartyAssetDiscount, + }, + } +} + +func (*PayloadBankingTransferFeeDiscounts) isPayload() {} + +func (p *PayloadBankingTransferFeeDiscounts) plToProto() interface{} { + return p.IntoProto() +} + +func (*PayloadBankingTransferFeeDiscounts) Key() string { + return "transferFeeDiscounts" +} + +func (*PayloadBankingTransferFeeDiscounts) Namespace() SnapshotNamespace { + return BankingSnapshot +} + func PayloadBankingSeenFromProto(pbs *snapshot.Payload_BankingSeen) *PayloadBankingSeen { return &PayloadBankingSeen{ BankingSeen: BankingSeenFromProto(pbs.BankingSeen), @@ -2051,6 +2123,34 @@ func (*PayloadDelegationPending) Namespace() SnapshotNamespace { return DelegationSnapshot } +func PayloadGovernanceBatchActiveFromProto(ga *snapshot.Payload_GovernanceBatchActive) *PayloadGovernanceBatchActive { + return &PayloadGovernanceBatchActive{ + GovernanceBatchActive: GovernanceBatchActiveFromProto(ga.GovernanceBatchActive), + } +} + +func (p PayloadGovernanceBatchActive) IntoProto() *snapshot.Payload_GovernanceBatchActive { + return &snapshot.Payload_GovernanceBatchActive{ + GovernanceBatchActive: &snapshot.GovernanceBatchActive{ + BatchProposals: p.GovernanceBatchActive.BatchProposals, + }, + } +} + +func (*PayloadGovernanceBatchActive) Key() string { + return "batch_active" +} + +func (*PayloadGovernanceBatchActive) Namespace() SnapshotNamespace { + return GovernanceSnapshot +} + +func (*PayloadGovernanceBatchActive) isPayload() {} + +func (p *PayloadGovernanceBatchActive) plToProto() interface{} { + return p.IntoProto() +} + func PayloadGovernanceActiveFromProto(ga *snapshot.Payload_GovernanceActive) *PayloadGovernanceActive { return &PayloadGovernanceActive{ GovernanceActive: GovernanceActiveFromProto(ga.GovernanceActive), @@ -2881,22 +2981,33 @@ func (g GovernanceEnacted) IntoProto() *snapshot.GovernanceEnacted { func GovernanceNodeFromProto(ge *snapshot.GovernanceNode) *GovernanceNode { ret := GovernanceNode{ - Proposals: make([]*Proposal, 0, len(ge.Proposals)), + Proposals: make([]*Proposal, 0, len(ge.Proposals)), + ProposalData: make([]*ProposalData, 0, len(ge.ProposalData)), } for _, p := range ge.Proposals { gn, _ := ProposalFromProto(p) ret.Proposals = append(ret.Proposals, gn) } + + for _, p := range ge.ProposalData { + gn := ProposalDataFromProto(p) + ret.ProposalData = append(ret.ProposalData, gn) + } + return &ret } func (g GovernanceNode) IntoProto() *snapshot.GovernanceNode { ret := snapshot.GovernanceNode{ - Proposals: make([]*vega.Proposal, 0, len(g.Proposals)), + Proposals: make([]*vega.Proposal, 0, len(g.Proposals)), + ProposalData: make([]*snapshot.ProposalData, 0, len(g.ProposalData)), } for _, p := range g.Proposals { ret.Proposals = append(ret.Proposals, p.IntoProto()) } + for _, p := range g.ProposalData { + ret.ProposalData = append(ret.ProposalData, p.IntoProto()) + } return &ret } @@ -2944,6 +3055,12 @@ func (p ProposalData) IntoProto() *snapshot.ProposalData { return &ret } +func GovernanceBatchActiveFromProto(ga *snapshot.GovernanceBatchActive) *GovernanceBatchActive { + return &GovernanceBatchActive{ + BatchProposals: ga.BatchProposals, + } +} + func GovernanceActiveFromProto(ga *snapshot.GovernanceActive) *GovernanceActive { ret := GovernanceActive{ Proposals: make([]*ProposalData, 0, len(ga.Proposals)), @@ -2968,28 +3085,39 @@ func MarketPositionFromProto(p *snapshot.Position) *MarketPosition { price, _ := num.UintFromString(p.Price, 10) buySumProduct, _ := num.UintFromString(p.BuySumProduct, 10) sellSumProduct, _ := num.UintFromString(p.SellSumProduct, 10) + var averageEntryPrice *num.Uint + if p.AverageEntryPrice != nil { + averageEntryPrice = num.UintFromBytes(p.AverageEntryPrice) + } return &MarketPosition{ - PartyID: p.PartyId, - Size: p.Size, - Buy: p.Buy, - Sell: p.Sell, - Price: price, - BuySumProduct: buySumProduct, - SellSumProduct: sellSumProduct, - Distressed: p.Distressed, + PartyID: p.PartyId, + Size: p.Size, + Buy: p.Buy, + Sell: p.Sell, + Price: price, + BuySumProduct: buySumProduct, + SellSumProduct: sellSumProduct, + Distressed: p.Distressed, + AverageEntryPrice: averageEntryPrice, } } func (p MarketPosition) IntoProto() *snapshot.Position { + var aep []byte + if p.AverageEntryPrice != nil { + b := p.AverageEntryPrice.Bytes() + aep = b[:] + } return &snapshot.Position{ - PartyId: p.PartyID, - Size: p.Size, - Buy: p.Buy, - Sell: p.Sell, - Price: p.Price.String(), - BuySumProduct: p.BuySumProduct.String(), - SellSumProduct: p.SellSumProduct.String(), - Distressed: p.Distressed, + PartyId: p.PartyID, + Size: p.Size, + Buy: p.Buy, + Sell: p.Sell, + Price: p.Price.String(), + BuySumProduct: p.BuySumProduct.String(), + SellSumProduct: p.SellSumProduct.String(), + Distressed: p.Distressed, + AverageEntryPrice: aep, } } @@ -3559,32 +3687,36 @@ func ExecMarketFromProto(em *snapshot.Market) *ExecMarket { m, _ := MarketFromProto(em.Market) ret := ExecMarket{ - Market: m, - PriceMonitor: PriceMonitorFromProto(em.PriceMonitor), - AuctionState: AuctionStateFromProto(em.AuctionState), - PeggedOrders: PeggedOrdersStateFromProto(em.PeggedOrders), - ExpiringOrders: make([]*Order, 0, len(em.ExpiringOrders)), - LastEquityShareDistributed: em.LastEquityShareDistributed, - EquityShare: EquityShareFromProto(em.EquityShare), - LastBestAsk: lastBA, - LastBestBid: lastBB, - LastMidAsk: lastMA, - LastMidBid: lastMB, - LastMarketValueProxy: lastMVP, - CurrentMarkPrice: markPrice, - ShortRiskFactor: shortRF, - LongRiskFactor: longRF, - RiskFactorConsensusReached: em.RiskFactorConsensusReached, - FeeSplitter: FeeSplitterFromProto(em.FeeSplitter), - SettlementData: sp, - NextMTM: em.NextMarkToMarket, - LastTradedPrice: lastTradedPrice, - Parties: em.Parties, - Closed: em.Closed, - IsSucceeded: em.Succeeded, - StopOrders: em.StopOrders, - Product: em.Product, - FeesStats: em.FeesStats, + Market: m, + PriceMonitor: PriceMonitorFromProto(em.PriceMonitor), + AuctionState: AuctionStateFromProto(em.AuctionState), + PeggedOrders: PeggedOrdersStateFromProto(em.PeggedOrders), + ExpiringOrders: make([]*Order, 0, len(em.ExpiringOrders)), + LastEquityShareDistributed: em.LastEquityShareDistributed, + EquityShare: EquityShareFromProto(em.EquityShare), + LastBestAsk: lastBA, + LastBestBid: lastBB, + LastMidAsk: lastMA, + LastMidBid: lastMB, + LastMarketValueProxy: lastMVP, + CurrentMarkPrice: markPrice, + ShortRiskFactor: shortRF, + LongRiskFactor: longRF, + RiskFactorConsensusReached: em.RiskFactorConsensusReached, + FeeSplitter: FeeSplitterFromProto(em.FeeSplitter), + SettlementData: sp, + NextMTM: em.NextMarkToMarket, + NextInternalCompositePriceCalc: em.NextInternalCompositePriceCalc, + LastTradedPrice: lastTradedPrice, + Parties: em.Parties, + Closed: em.Closed, + IsSucceeded: em.Succeeded, + StopOrders: em.StopOrders, + Product: em.Product, + FeesStats: em.FeesStats, + PartyMarginFactors: em.PartyMarginFactor, + MarkPriceCalculator: em.MarkPriceCalculator, + InternalCompositePriceCalculator: em.InternalCompositePriceCalculator, } for _, o := range em.ExpiringOrders { @@ -3600,30 +3732,34 @@ func ExecMarketFromProto(em *snapshot.Market) *ExecMarket { func (e ExecMarket) IntoProto() *snapshot.Market { ret := snapshot.Market{ - Market: e.Market.IntoProto(), - PriceMonitor: e.PriceMonitor.IntoProto(), - AuctionState: e.AuctionState.IntoProto(), - PeggedOrders: e.PeggedOrders.IntoProto(), - ExpiringOrders: make([]*vega.Order, 0, len(e.ExpiringOrders)), - LastEquityShareDistributed: e.LastEquityShareDistributed, - EquityShare: e.EquityShare.IntoProto(), - LastBestAsk: e.LastBestAsk.String(), - LastBestBid: e.LastBestBid.String(), - LastMidAsk: e.LastMidAsk.String(), - LastMidBid: e.LastMidBid.String(), - LastMarketValueProxy: e.LastMarketValueProxy.String(), - RiskFactorShort: e.ShortRiskFactor.String(), - RiskFactorLong: e.LongRiskFactor.String(), - RiskFactorConsensusReached: e.RiskFactorConsensusReached, - FeeSplitter: e.FeeSplitter.IntoProto(), - SettlementData: num.NumericToString(e.SettlementData), - NextMarkToMarket: e.NextMTM, - Parties: e.Parties, - Closed: e.Closed, - Succeeded: e.IsSucceeded, - StopOrders: e.StopOrders, - Product: e.Product, - FeesStats: e.FeesStats, + Market: e.Market.IntoProto(), + PriceMonitor: e.PriceMonitor.IntoProto(), + AuctionState: e.AuctionState.IntoProto(), + PeggedOrders: e.PeggedOrders.IntoProto(), + ExpiringOrders: make([]*vega.Order, 0, len(e.ExpiringOrders)), + LastEquityShareDistributed: e.LastEquityShareDistributed, + EquityShare: e.EquityShare.IntoProto(), + LastBestAsk: e.LastBestAsk.String(), + LastBestBid: e.LastBestBid.String(), + LastMidAsk: e.LastMidAsk.String(), + LastMidBid: e.LastMidBid.String(), + LastMarketValueProxy: e.LastMarketValueProxy.String(), + RiskFactorShort: e.ShortRiskFactor.String(), + RiskFactorLong: e.LongRiskFactor.String(), + RiskFactorConsensusReached: e.RiskFactorConsensusReached, + FeeSplitter: e.FeeSplitter.IntoProto(), + SettlementData: num.NumericToString(e.SettlementData), + NextMarkToMarket: e.NextMTM, + NextInternalCompositePriceCalc: e.NextInternalCompositePriceCalc, + Parties: e.Parties, + Closed: e.Closed, + Succeeded: e.IsSucceeded, + StopOrders: e.StopOrders, + Product: e.Product, + FeesStats: e.FeesStats, + PartyMarginFactor: e.PartyMarginFactors, + MarkPriceCalculator: e.MarkPriceCalculator, + InternalCompositePriceCalculator: e.InternalCompositePriceCalculator, } if e.CurrentMarkPrice != nil { @@ -3790,11 +3926,6 @@ type PartyCount struct { Count uint64 } -type BannedParty struct { - Party string - Until int64 -} - type BlockRejectStats struct { Total uint64 Rejected uint64 @@ -3811,18 +3942,15 @@ type PayloadSimpleSpamPolicy struct { type SimpleSpamPolicy struct { PolicyName string PartyToCount []*PartyCount - BannedParty []*BannedParty CurrentEpochSeq uint64 } type VoteSpamPolicy struct { PartyProposalVoteCount []*PartyProposalVoteCount - BannedParty []*BannedParty RecentBlocksRejectStats []*BlockRejectStats CurrentBlockIndex uint64 LastIncreaseBlock uint64 CurrentEpochSeq uint64 - MinVotingTokensFactor *num.Uint } func PayloadSimpleSpamPolicyFromProto(ssp *snapshot.Payload_SimpleSpamPolicy) *PayloadSimpleSpamPolicy { @@ -3843,15 +3971,9 @@ func SimpleSpamPolicyFromProto(ssp *snapshot.SimpleSpamPolicy) *SimpleSpamPolicy partyCount = append(partyCount, PartyCountFromProto(ptv)) } - bannedParties := make([]*BannedParty, 0, len(ssp.BannedParties)) - for _, ban := range ssp.BannedParties { - bannedParties = append(bannedParties, BannedPartyFromProto(ban)) - } - return &SimpleSpamPolicy{ PolicyName: ssp.PolicyName, PartyToCount: partyCount, - BannedParty: bannedParties, CurrentEpochSeq: ssp.CurrentEpochSeq, } } @@ -3862,26 +3984,17 @@ func VoteSpamPolicyFromProto(vsp *snapshot.VoteSpamPolicy) *VoteSpamPolicy { partyProposalVoteCount = append(partyProposalVoteCount, PartyProposalVoteCountFromProto(ptv)) } - bannedParties := make([]*BannedParty, 0, len(vsp.BannedParties)) - for _, ban := range vsp.BannedParties { - bannedParties = append(bannedParties, BannedPartyFromProto(ban)) - } - recentBlocksRejectStats := make([]*BlockRejectStats, 0, len(vsp.RecentBlocksRejectStats)) for _, rejects := range vsp.RecentBlocksRejectStats { recentBlocksRejectStats = append(recentBlocksRejectStats, BlockRejectStatsFromProto(rejects)) } - minTokensFactor, _ := num.UintFromString(vsp.MinVotingTokensFactor, 10) - return &VoteSpamPolicy{ PartyProposalVoteCount: partyProposalVoteCount, - BannedParty: bannedParties, RecentBlocksRejectStats: recentBlocksRejectStats, LastIncreaseBlock: vsp.LastIncreaseBlock, CurrentBlockIndex: vsp.CurrentBlockIndex, CurrentEpochSeq: vsp.CurrentEpochSeq, - MinVotingTokensFactor: minTokensFactor, } } @@ -3907,13 +4020,6 @@ func PartyTokenBalanceFromProto(balance *snapshot.PartyTokenBalance) *PartyToken } } -func BannedPartyFromProto(ban *snapshot.BannedParty) *BannedParty { - return &BannedParty{ - Party: ban.Party, - Until: ban.Until, - } -} - func PartyProposalVoteCountFromProto(ppvc *snapshot.PartyProposalVoteCount) *PartyProposalVoteCount { return &PartyProposalVoteCount{ Party: ppvc.Party, @@ -3937,13 +4043,6 @@ func (p *PartyProposalVoteCount) IntoProto() *snapshot.PartyProposalVoteCount { } } -func (b *BannedParty) IntoProto() *snapshot.BannedParty { - return &snapshot.BannedParty{ - Party: b.Party, - Until: b.Until, - } -} - func (ptc *PartyTokenBalance) IntoProto() *snapshot.PartyTokenBalance { return &snapshot.PartyTokenBalance{ Party: ptc.Party, @@ -3957,15 +4056,9 @@ func (ssp *SimpleSpamPolicy) IntoProto() *snapshot.SimpleSpamPolicy { partyToCount = append(partyToCount, &snapshot.SpamPartyTransactionCount{Party: pc.Party, Count: pc.Count}) } - bannedParties := make([]*snapshot.BannedParty, 0, len(ssp.BannedParty)) - for _, ban := range ssp.BannedParty { - bannedParties = append(bannedParties, ban.IntoProto()) - } - return &snapshot.SimpleSpamPolicy{ PolicyName: ssp.PolicyName, PartyToCount: partyToCount, - BannedParties: bannedParties, CurrentEpochSeq: ssp.CurrentEpochSeq, } } @@ -3976,23 +4069,16 @@ func (vsp *VoteSpamPolicy) IntoProto() *snapshot.VoteSpamPolicy { partyProposalVoteCount = append(partyProposalVoteCount, ptv.IntoProto()) } - bannedParties := make([]*snapshot.BannedParty, 0, len(vsp.BannedParty)) - for _, ban := range vsp.BannedParty { - bannedParties = append(bannedParties, ban.IntoProto()) - } - recentBlocksRejectStats := make([]*snapshot.BlockRejectStats, 0, len(vsp.RecentBlocksRejectStats)) for _, rejects := range vsp.RecentBlocksRejectStats { recentBlocksRejectStats = append(recentBlocksRejectStats, rejects.IntoProto()) } return &snapshot.VoteSpamPolicy{ PartyToVote: partyProposalVoteCount, - BannedParties: bannedParties, RecentBlocksRejectStats: recentBlocksRejectStats, LastIncreaseBlock: vsp.LastIncreaseBlock, CurrentBlockIndex: vsp.CurrentBlockIndex, CurrentEpochSeq: vsp.CurrentEpochSeq, - MinVotingTokensFactor: vsp.MinVotingTokensFactor.String(), } } @@ -4294,6 +4380,32 @@ func (*PayloadEthContractCallEvent) Namespace() SnapshotNamespace { return EthereumOracleVerifierSnapshot } +func PayloadL2EthOraclesFromProto(sp *snapshot.Payload_L2EthOracles) *PayloadL2EthOracles { + return &PayloadL2EthOracles{ + L2EthOracles: sp.L2EthOracles, + } +} + +func (p *PayloadL2EthOracles) IntoProto() *snapshot.Payload_L2EthOracles { + return &snapshot.Payload_L2EthOracles{ + L2EthOracles: p.L2EthOracles, + } +} + +func (*PayloadL2EthOracles) isPayload() {} + +func (p *PayloadL2EthOracles) plToProto() interface{} { + return p.IntoProto() +} + +func (*PayloadL2EthOracles) Key() string { + return "l2EthOracles" +} + +func (*PayloadL2EthOracles) Namespace() SnapshotNamespace { + return L2EthereumOraclesSnapshot +} + func PayloadEthOracleVerifierLastBlockFromProto(svd *snapshot.Payload_EthOracleVerifierLastBlock) *PayloadEthOracleLastBlock { return &PayloadEthOracleLastBlock{ EthOracleLastBlock: &EthBlock{ @@ -4460,13 +4572,17 @@ func (*PayloadStakeVerifierDeposited) Namespace() SnapshotNamespace { func PayloadEventForwarderFromProto(ef *snapshot.Payload_EventForwarder) *PayloadEventForwarder { return &PayloadEventForwarder{ - Keys: ef.EventForwarder.AckedEvents, + Keys: ef.EventForwarder.AckedEvents, + Buckets: ef.EventForwarder.Buckets, } } func (p *PayloadEventForwarder) IntoProto() *snapshot.Payload_EventForwarder { return &snapshot.Payload_EventForwarder{ - EventForwarder: &snapshot.EventForwarder{AckedEvents: p.Keys}, + EventForwarder: &snapshot.EventForwarder{ + AckedEvents: p.Keys, + Buckets: p.Buckets, + }, } } @@ -4694,7 +4810,6 @@ func PayloadProofOfWorkFromProto(s *snapshot.Payload_ProofOfWork) *PayloadProofO pow := &PayloadProofOfWork{ BlockHeight: s.ProofOfWork.BlockHeight, BlockHash: s.ProofOfWork.BlockHash, - BannedParties: make(map[string]int64, len(s.ProofOfWork.Banned)), HeightToTx: make(map[uint64][]string, len(s.ProofOfWork.TxAtHeight)), HeightToTid: make(map[uint64][]string, len(s.ProofOfWork.TidAtHeight)), HeightToNonceRef: make(map[uint64][]*snapshot.NonceRef, len(s.ProofOfWork.NonceRefsAtHeight)), @@ -4703,9 +4818,6 @@ func PayloadProofOfWorkFromProto(s *snapshot.Payload_ProofOfWork) *PayloadProofO LastPruningBlock: s.ProofOfWork.LastPruningBlock, } - for _, bp := range s.ProofOfWork.Banned { - pow.BannedParties[bp.Party] = bp.Until - } for _, tah := range s.ProofOfWork.TxAtHeight { pow.HeightToTx[tah.Height] = tah.Transactions } @@ -4719,12 +4831,6 @@ func PayloadProofOfWorkFromProto(s *snapshot.Payload_ProofOfWork) *PayloadProofO } func (p *PayloadProofOfWork) IntoProto() *snapshot.Payload_ProofOfWork { - banned := make([]*snapshot.BannedParty, 0, len(p.BannedParties)) - for k, v := range p.BannedParties { - banned = append(banned, &snapshot.BannedParty{Party: k, Until: v}) - } - sort.Slice(banned, func(i, j int) bool { return banned[i].Party < banned[j].Party }) - txAtHeight := make([]*snapshot.TransactionsAtHeight, 0, len(p.HeightToTx)) for k, v := range p.HeightToTx { txAtHeight = append(txAtHeight, &snapshot.TransactionsAtHeight{Height: k, Transactions: v}) @@ -4746,7 +4852,6 @@ func (p *PayloadProofOfWork) IntoProto() *snapshot.Payload_ProofOfWork { ProofOfWork: &snapshot.ProofOfWork{ BlockHeight: p.BlockHeight, BlockHash: p.BlockHash, - Banned: banned, TxAtHeight: txAtHeight, TidAtHeight: tidAtHeight, PowParams: p.ActiveParams, diff --git a/core/types/snapshot_nodes_test.go b/core/types/snapshot_nodes_test.go index 8a355d90bd..b202aaae8a 100644 --- a/core/types/snapshot_nodes_test.go +++ b/core/types/snapshot_nodes_test.go @@ -542,9 +542,7 @@ func getDummyData() *types.Chunk { }, }, &types.Payload{ Data: &types.PayloadVoteSpamPolicy{ - VoteSpamPolicy: &types.VoteSpamPolicy{ - MinVotingTokensFactor: num.UintZero(), - }, + VoteSpamPolicy: &types.VoteSpamPolicy{}, }, }, &types.Payload{ Data: &types.PayloadSimpleSpamPolicy{ @@ -717,9 +715,7 @@ func TestPayloadConversion(t *testing.T) { }, }, &types.Payload{ Data: &types.PayloadVoteSpamPolicy{ - VoteSpamPolicy: &types.VoteSpamPolicy{ - MinVotingTokensFactor: num.UintZero(), - }, + VoteSpamPolicy: &types.VoteSpamPolicy{}, }, }, &types.Payload{ Data: &types.PayloadSimpleSpamPolicy{ diff --git a/core/types/snapshot_test.go b/core/types/snapshot_test.go index b5734a579b..28af7b2b18 100644 --- a/core/types/snapshot_test.go +++ b/core/types/snapshot_test.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/proto" + cometbftdb "github.com/cometbft/cometbft-db" "github.com/cosmos/iavl" "github.com/stretchr/testify/assert" diff --git a/core/types/staking.go b/core/types/staking.go index 5248c0116b..21e52a26d7 100644 --- a/core/types/staking.go +++ b/core/types/staking.go @@ -61,7 +61,7 @@ func (s *StakeTotalSupply) String() string { return fmt.Sprintf( "tokenAddress(%s) totalSupply(%s)", s.TokenAddress, - stringer.UintPointerToString(s.TotalSupply), + stringer.PtrToString(s.TotalSupply), ) } @@ -111,7 +111,7 @@ func (s *StakeLinking) String() string { s.Type.String(), s.TS, s.Party, - stringer.UintPointerToString(s.Amount), + stringer.PtrToString(s.Amount), s.Status.String(), s.FinalizedAt, s.TxHash, @@ -218,7 +218,7 @@ func (s StakeDeposited) String() string { s.LogIndex, s.VegaPubKey, s.EthereumAddress, - stringer.UintPointerToString(s.Amount), + stringer.PtrToString(s.Amount), s.BlockTime, ) } @@ -269,7 +269,7 @@ func (s StakeRemoved) String() string { s.LogIndex, s.VegaPubKey, s.EthereumAddress, - stringer.UintPointerToString(s.Amount), + stringer.PtrToString(s.Amount), s.BlockTime, ) } diff --git a/core/types/statevar/key_value_state_var_test.go b/core/types/statevar/key_value_state_var_test.go index f63ea32496..1cad0ae923 100644 --- a/core/types/statevar/key_value_state_var_test.go +++ b/core/types/statevar/key_value_state_var_test.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/core/types/statevar" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/require" ) diff --git a/core/types/statevar/matrix_key_value_test.go b/core/types/statevar/matrix_key_value_test.go index f3d9013311..874f9c77b3 100644 --- a/core/types/statevar/matrix_key_value_test.go +++ b/core/types/statevar/matrix_key_value_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/types/statevar" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/require" ) diff --git a/core/types/statevar/scalar_key_value_test.go b/core/types/statevar/scalar_key_value_test.go index 63c8c3903e..3329c308e6 100644 --- a/core/types/statevar/scalar_key_value_test.go +++ b/core/types/statevar/scalar_key_value_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/types/statevar" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/require" ) diff --git a/core/types/statevar/vector_key_value_test.go b/core/types/statevar/vector_key_value_test.go index 3ac4543850..e02fe4461a 100644 --- a/core/types/statevar/vector_key_value_test.go +++ b/core/types/statevar/vector_key_value_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/types/statevar" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/require" ) diff --git a/core/types/stop_orders.go b/core/types/stop_orders.go index d49b18dd2e..de74e548b5 100644 --- a/core/types/stop_orders.go +++ b/core/types/stop_orders.go @@ -68,17 +68,31 @@ const ( StopOrderStatusRejected = vega.StopOrder_STATUS_REJECTED ) +type StopOrderSizeOverrideSetting = vega.StopOrder_SizeOverrideSetting + +const ( + // Never valid. + StopOrderSizeOverrideSettingUnspecified StopOrderSizeOverrideSetting = vega.StopOrder_SIZE_OVERRIDE_SETTING_UNSPECIFIED + // No size override is used. + StopOrderSizeOverrideSettingNone = vega.StopOrder_SIZE_OVERRIDE_SETTING_NONE + // Use the position size of the trader to override the order size. + StopOrderSizeOverrideSettingPosition = vega.StopOrder_SIZE_OVERRIDE_SETTING_POSITION +) + type StopOrderRejectionReason = vega.StopOrder_RejectionReason const ( // Never valid. - StopOrderRejectionUnspecified StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_UNSPECIFIED - StopOrderRejectionTradingNotAllowed StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_TRADING_NOT_ALLOWED - StopOrderRejectionExpiryInThePast StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_EXPIRY_IN_THE_PAST - StopOrderRejectionMustBeReduceOnly StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_MUST_BE_REDUCE_ONLY - StopOrderRejectionMaxStopOrdersPerPartyReached StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_MAX_STOP_ORDERS_PER_PARTY_REACHED - StopOrderRejectionNotAllowedWithoutAPosition StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_WITHOUT_A_POSITION - StopOrderRejectionNotClosingThePosition StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION + StopOrderRejectionUnspecified StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_UNSPECIFIED + StopOrderRejectionTradingNotAllowed StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_TRADING_NOT_ALLOWED + StopOrderRejectionExpiryInThePast StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_EXPIRY_IN_THE_PAST + StopOrderRejectionMustBeReduceOnly StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_MUST_BE_REDUCE_ONLY + StopOrderRejectionMaxStopOrdersPerPartyReached StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_MAX_STOP_ORDERS_PER_PARTY_REACHED + StopOrderRejectionNotAllowedWithoutAPosition StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_WITHOUT_A_POSITION + StopOrderRejectionNotClosingThePosition StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION + StopOrderRejectionLinkedPercentageInvalid StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID + StopOrderRejectionNotAllowedDuringOpeningAuction StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION + StopOrderRejectionOCONotAllowedSameExpiryTime StopOrderRejectionReason = vega.StopOrder_REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES ) type StopOrderExpiry struct { @@ -98,6 +112,10 @@ func (s *StopOrderExpiry) Expires() bool { return s.ExpiresAt != nil } +type StopOrderSizeOverrideValue struct { + PercentageSize num.Decimal +} + type StopOrderTrigger struct { Direction StopOrderTriggerDirection price *num.Uint @@ -136,7 +154,7 @@ func (s *StopOrderTrigger) IsPrice() bool { return s.price != nil } -func (s *StopOrderTrigger) IsTrailingPercenOffset() bool { +func (s *StopOrderTrigger) IsTrailingPercentOffset() bool { return s.price == nil } @@ -155,9 +173,11 @@ func (s *StopOrderTrigger) TrailingPercentOffset() num.Decimal { } type StopOrderSetup struct { - OrderSubmission *OrderSubmission - Expiry *StopOrderExpiry - Trigger *StopOrderTrigger + OrderSubmission *OrderSubmission + Expiry *StopOrderExpiry + Trigger *StopOrderTrigger + SizeOverrideSetting StopOrderSizeOverrideSetting + SizeOverrideValue *StopOrderSizeOverrideValue } func (s StopOrderSetup) String() string { @@ -203,10 +223,26 @@ func StopOrderSetupFromProto( expiry.ExpiryStrategy = psetup.ExpiryStrategy } + var sizeOverrideValue StopOrderSizeOverrideValue + var sizeOverrideSetting StopOrderSizeOverrideSetting = vega.StopOrder_SIZE_OVERRIDE_SETTING_UNSPECIFIED + + if psetup.SizeOverrideValue != nil { + value, err := num.DecimalFromString(psetup.SizeOverrideValue.Percentage) + if err != nil { + return nil, err + } + sizeOverrideValue = StopOrderSizeOverrideValue{PercentageSize: value} + } + + if psetup.SizeOverrideSetting != nil { + sizeOverrideSetting = *psetup.SizeOverrideSetting + } return &StopOrderSetup{ - OrderSubmission: orderSubmission, - Expiry: expiry, - Trigger: trigger, + OrderSubmission: orderSubmission, + Expiry: expiry, + Trigger: trigger, + SizeOverrideSetting: sizeOverrideSetting, + SizeOverrideValue: &sizeOverrideValue, }, nil } @@ -243,31 +279,35 @@ func (s *StopOrdersSubmission) IntoStopOrders( ) (fallsBelow, risesAbove *StopOrder) { if s.RisesAbove != nil { risesAbove = &StopOrder{ - ID: risesAboveID, - Party: party, - Market: s.RisesAbove.OrderSubmission.MarketID, - OrderSubmission: s.RisesAbove.OrderSubmission, - OCOLinkID: fallsBelowID, - Expiry: s.RisesAbove.Expiry, - Trigger: s.RisesAbove.Trigger, - Status: StopOrderStatusPending, - CreatedAt: now, - UpdatedAt: now, + ID: risesAboveID, + Party: party, + Market: s.RisesAbove.OrderSubmission.MarketID, + OrderSubmission: s.RisesAbove.OrderSubmission, + OCOLinkID: fallsBelowID, + Expiry: s.RisesAbove.Expiry, + Trigger: s.RisesAbove.Trigger, + Status: StopOrderStatusPending, + CreatedAt: now, + UpdatedAt: now, + SizeOverrideSetting: s.RisesAbove.SizeOverrideSetting, + SizeOverrideValue: s.RisesAbove.SizeOverrideValue, } } if s.FallsBelow != nil { fallsBelow = &StopOrder{ - ID: fallsBelowID, - Party: party, - Market: s.FallsBelow.OrderSubmission.MarketID, - OrderSubmission: s.FallsBelow.OrderSubmission, - OCOLinkID: risesAboveID, - Expiry: s.FallsBelow.Expiry, - Trigger: s.FallsBelow.Trigger, - Status: StopOrderStatusPending, - CreatedAt: now, - UpdatedAt: now, + ID: fallsBelowID, + Party: party, + Market: s.FallsBelow.OrderSubmission.MarketID, + OrderSubmission: s.FallsBelow.OrderSubmission, + OCOLinkID: risesAboveID, + Expiry: s.FallsBelow.Expiry, + Trigger: s.FallsBelow.Trigger, + Status: StopOrderStatusPending, + CreatedAt: now, + UpdatedAt: now, + SizeOverrideSetting: s.FallsBelow.SizeOverrideSetting, + SizeOverrideValue: s.FallsBelow.SizeOverrideValue, } } @@ -290,18 +330,20 @@ func (s StopOrdersSubmission) String() string { } type StopOrder struct { - ID string - Party string - Market string - OrderSubmission *OrderSubmission - OrderID string - OCOLinkID string - Expiry *StopOrderExpiry - Trigger *StopOrderTrigger - Status StopOrderStatus - CreatedAt time.Time - UpdatedAt time.Time - RejectionReason *StopOrderRejectionReason + ID string + Party string + Market string + OrderSubmission *OrderSubmission + OrderID string + OCOLinkID string + Expiry *StopOrderExpiry + Trigger *StopOrderTrigger + Status StopOrderStatus + CreatedAt time.Time + UpdatedAt time.Time + RejectionReason *StopOrderRejectionReason + SizeOverrideSetting StopOrderSizeOverrideSetting + SizeOverrideValue *StopOrderSizeOverrideValue } func (s *StopOrder) String() string { @@ -357,19 +399,30 @@ func NewStopOrderFromProto(p *eventspb.StopOrderEvent) *StopOrder { expiry.ExpiryStrategy = p.StopOrder.ExpiryStrategy } + var sizeOverride *StopOrderSizeOverrideValue + if p.StopOrder.SizeOverrideSetting == StopOrderSizeOverrideSettingPosition { + value, err := num.DecimalFromString(p.StopOrder.SizeOverrideValue.GetPercentage()) + if err != nil { + panic(err) + } + sizeOverride = &StopOrderSizeOverrideValue{PercentageSize: value} + } + return &StopOrder{ - ID: p.StopOrder.Id, - Party: p.StopOrder.PartyId, - Market: p.StopOrder.MarketId, - OrderID: p.StopOrder.OrderId, - OCOLinkID: ptr.UnBox(p.StopOrder.OcoLinkId), - Status: p.StopOrder.Status, - CreatedAt: time.Unix(0, p.StopOrder.CreatedAt), - UpdatedAt: time.Unix(0, ptr.UnBox(p.StopOrder.UpdatedAt)), - OrderSubmission: sub, - Trigger: trigger, - Expiry: expiry, - RejectionReason: p.StopOrder.RejectionReason, + ID: p.StopOrder.Id, + Party: p.StopOrder.PartyId, + Market: p.StopOrder.MarketId, + OrderID: p.StopOrder.OrderId, + OCOLinkID: ptr.UnBox(p.StopOrder.OcoLinkId), + Status: p.StopOrder.Status, + CreatedAt: time.Unix(0, p.StopOrder.CreatedAt), + UpdatedAt: time.Unix(0, ptr.UnBox(p.StopOrder.UpdatedAt)), + OrderSubmission: sub, + Trigger: trigger, + Expiry: expiry, + RejectionReason: p.StopOrder.RejectionReason, + SizeOverrideSetting: p.StopOrder.SizeOverrideSetting, + SizeOverrideValue: sizeOverride, } } @@ -410,7 +463,7 @@ func (s *StopOrder) ToProtoEvent() *eventspb.StopOrderEvent { ev.StopOrder.Trigger = &vega.StopOrder_Price{ Price: s.Trigger.Price().String(), } - case s.Trigger.IsTrailingPercenOffset(): + case s.Trigger.IsTrailingPercentOffset(): ev.StopOrder.Trigger = &vega.StopOrder_TrailingPercentOffset{ TrailingPercentOffset: s.Trigger.TrailingPercentOffset().String(), } diff --git a/core/types/team.go b/core/types/team.go index 7220153bc9..2af5dadfde 100644 --- a/core/types/team.go +++ b/core/types/team.go @@ -16,6 +16,7 @@ package types import ( + "fmt" "time" vgrand "code.vegaprotocol.io/vega/libs/rand" @@ -36,7 +37,8 @@ type Team struct { AvatarURL string CreatedAt time.Time - Closed bool + Closed bool + AllowList []PartyID } type Membership struct { @@ -62,6 +64,32 @@ func (t *Team) RemoveReferee(refereeToRemove PartyID) { t.Referees = t.Referees[:lastIndex] } +func (t *Team) EnsureCanJoin(party PartyID) error { + if !t.Closed { + return nil + } + + if len(t.AllowList) == 0 { + return ErrTeamIsClosed(t.ID) + } + + for _, allowedParty := range t.AllowList { + if allowedParty == party { + return nil + } + } + + return ErrRefereeNotAllowedToJoinTeam(t.ID) +} + func NewTeamID() TeamID { return TeamID(vgrand.RandomStr(teamIDLength)) } + +func ErrTeamIsClosed(id TeamID) error { + return fmt.Errorf("team %q is closed", id) +} + +func ErrRefereeNotAllowedToJoinTeam(id TeamID) error { + return fmt.Errorf("party is not allowed to join team %q", id) +} diff --git a/core/types/transfer.go b/core/types/transfer.go index 82ec3cd873..295805659e 100644 --- a/core/types/transfer.go +++ b/core/types/transfer.go @@ -36,11 +36,12 @@ func (f *FinancialAmount) Clone() *FinancialAmount { } type Transfer struct { - Owner string - Amount *FinancialAmount - Type TransferType - MinAmount *num.Uint - Market string + Owner string + Amount *FinancialAmount + Type TransferType + MinAmount *num.Uint + Market string + TransferID *string } func (t *Transfer) Clone() *Transfer { @@ -74,9 +75,10 @@ func (t *Transfer) Merge(oth *Transfer) *Transfer { Asset: t.Amount.Asset, Amount: num.Sum(t.Amount.Amount, oth.Amount.Amount), }, - Type: t.Type, - MinAmount: num.Sum(t.MinAmount, t.MinAmount), - Market: t.Market, + Type: t.Type, + MinAmount: num.Sum(t.MinAmount, t.MinAmount), + Market: t.Market, + TransferID: t.TransferID, } } @@ -84,7 +86,7 @@ func (f FinancialAmount) String() string { return fmt.Sprintf( "asset(%s) amount(%s)", f.Asset, - stringer.UintPointerToString(f.Amount), + stringer.PtrToString(f.Amount), ) } @@ -141,9 +143,9 @@ func (t *Transfer) String() string { return fmt.Sprintf( "owner(%s) amount(%s) type(%s) minAmount(%s)", t.Owner, - stringer.ReflectPointerToString(t.Amount), + stringer.PtrToString(t.Amount), t.Type.String(), - stringer.UintPointerToString(t.MinAmount), + stringer.PtrToString(t.MinAmount), ) } @@ -212,4 +214,8 @@ const ( TransferTypeFeeReferrerRewardPay TransferType = proto.TransferType_TRANSFER_TYPE_FEE_REFERRER_REWARD_PAY TransferTypeFeeReferrerRewardDistribute TransferType = proto.TransferType_TRANSFER_TYPE_FEE_REFERRER_REWARD_DISTRIBUTE + + TransferTypeOrderMarginLow TransferType = proto.TransferType_TRANSFER_TYPE_ORDER_MARGIN_LOW + TransferTypeOrderMarginHigh TransferType = proto.TransferType_TRANSFER_TYPE_ORDER_MARGIN_HIGH + TransferTypeIsolatedMarginLow TransferType = proto.TransferType_TRANSFER_TYPE_ISOLATED_MARGIN_LOW ) diff --git a/core/types/vesting.go b/core/types/vesting.go index bbaa3f3c64..8fa500d4ed 100644 --- a/core/types/vesting.go +++ b/core/types/vesting.go @@ -77,7 +77,7 @@ func VestingBenefitTiersFromProto(ptiers *proto.VestingBenefitTiers) (*VestingBe return tiers, nil } -func CheckUntypedVestingBenefitTier(v interface{}) error { +func CheckUntypedVestingBenefitTier(v interface{}, _ interface{}) error { tiers, err := toVestingBenefitTier(v) if err != nil { return err diff --git a/core/validators/announce_node_test.go b/core/validators/announce_node_test.go index 5bd321eeae..5da3c9e691 100644 --- a/core/validators/announce_node_test.go +++ b/core/validators/announce_node_test.go @@ -26,6 +26,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" vgtesting "code.vegaprotocol.io/vega/libs/testing" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" ) diff --git a/core/validators/config.go b/core/validators/config.go index 57cb76e4b8..5254e0fdad 100644 --- a/core/validators/config.go +++ b/core/validators/config.go @@ -16,6 +16,8 @@ package validators import ( + "time" + "code.vegaprotocol.io/vega/libs/config/encoding" "code.vegaprotocol.io/vega/logging" ) @@ -27,12 +29,14 @@ const ( // Config represents governance specific configuration. type Config struct { // logging level - Level encoding.LogLevel `long:"log-level"` + Level encoding.LogLevel `long:"log-level"` + ApproxEthereumBlockTime encoding.Duration } // NewDefaultConfig creates an instance of the package specific configuration. func NewDefaultConfig() Config { return Config{ - Level: encoding.LogLevel{Level: logging.InfoLevel}, + Level: encoding.LogLevel{Level: logging.InfoLevel}, + ApproxEthereumBlockTime: encoding.Duration{Duration: 15 * time.Second}, } } diff --git a/core/validators/erc20multisig/checkpoint.go b/core/validators/erc20multisig/checkpoint.go index c37fa819e0..be61eaf964 100644 --- a/core/validators/erc20multisig/checkpoint.go +++ b/core/validators/erc20multisig/checkpoint.go @@ -20,11 +20,10 @@ import ( "sort" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" events "code.vegaprotocol.io/vega/protos/vega/events/v1" - - "code.vegaprotocol.io/vega/libs/proto" ) func (t *Topology) Name() types.CheckpointName { diff --git a/core/validators/erc20multisig/checkpoint_test.go b/core/validators/erc20multisig/checkpoint_test.go index a8990ccfb4..35bca92e1c 100644 --- a/core/validators/erc20multisig/checkpoint_test.go +++ b/core/validators/erc20multisig/checkpoint_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/core/validators" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/validators/erc20multisig/topology_snapshot_state.go b/core/validators/erc20multisig/topology_snapshot_state.go index b0a8d58941..dfd2b7a9f6 100644 --- a/core/validators/erc20multisig/topology_snapshot_state.go +++ b/core/validators/erc20multisig/topology_snapshot_state.go @@ -20,11 +20,10 @@ import ( "sort" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - - "code.vegaprotocol.io/vega/libs/proto" ) var ( diff --git a/core/validators/erc20multisig/topology_snapshot_state_test.go b/core/validators/erc20multisig/topology_snapshot_state_test.go index 1a4e0db725..dc5a733145 100644 --- a/core/validators/erc20multisig/topology_snapshot_state_test.go +++ b/core/validators/erc20multisig/topology_snapshot_state_test.go @@ -27,6 +27,7 @@ import ( "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/proto" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/core/validators/heartbeat_test.go b/core/validators/heartbeat_test.go index 6a40f35244..0f80593198 100644 --- a/core/validators/heartbeat_test.go +++ b/core/validators/heartbeat_test.go @@ -23,6 +23,7 @@ import ( "time" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/require" ) diff --git a/core/validators/topology.go b/core/validators/topology.go index 457d71b6ef..6474885fc9 100644 --- a/core/validators/topology.go +++ b/core/validators/topology.go @@ -35,10 +35,10 @@ import ( proto "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" v1 "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "golang.org/x/exp/maps" + abcitypes "github.com/cometbft/cometbft/abci/types" "github.com/ethereum/go-ethereum/common" - abcitypes "github.com/tendermint/tendermint/abci/types" + "golang.org/x/exp/maps" ) var ( @@ -449,7 +449,7 @@ func (t *Topology) NumberOfTendermintValidators() uint { return count } -func (t *Topology) BeginBlock(ctx context.Context, req abcitypes.RequestBeginBlock) { +func (t *Topology) BeginBlock(ctx context.Context, blockHeight uint64, proposer string) { // we're not adding or removing nodes only potentially changing their state so should be safe t.mu.RLock() defer t.mu.RUnlock() @@ -460,8 +460,8 @@ func (t *Topology) BeginBlock(ctx context.Context, req abcitypes.RequestBeginBlo t.rng = rand.New(rand.NewSource(currentTime.Unix())) t.checkHeartbeat(ctx) - t.validatorPerformance.BeginBlock(ctx, hex.EncodeToString(req.Header.ProposerAddress)) - t.currentBlockHeight = uint64(req.Header.Height) + t.validatorPerformance.BeginBlock(ctx, proposer) + t.currentBlockHeight = blockHeight t.signatures.SetNonce(currentTime) t.signatures.ClearStaleSignatures() diff --git a/core/validators/topology_checkpoint.go b/core/validators/topology_checkpoint.go index 4b1a217fce..344546fa20 100644 --- a/core/validators/topology_checkpoint.go +++ b/core/validators/topology_checkpoint.go @@ -22,11 +22,11 @@ import ( "time" "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/proto" checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - "code.vegaprotocol.io/vega/libs/proto" - tmtypes "github.com/tendermint/tendermint/abci/types" + tmtypes "github.com/cometbft/cometbft/abci/types" ) func (t *Topology) Name() types.CheckpointName { diff --git a/core/validators/topology_checkpoint_test.go b/core/validators/topology_checkpoint_test.go index 582ff8dc3e..4b58df9c2a 100644 --- a/core/validators/topology_checkpoint_test.go +++ b/core/validators/topology_checkpoint_test.go @@ -26,10 +26,9 @@ import ( "code.vegaprotocol.io/vega/libs/proto" checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - abcitypes "github.com/tendermint/tendermint/abci/types" - types1 "github.com/tendermint/tendermint/proto/tendermint/types" ) func addTwoNodes(top *testTop) { @@ -182,7 +181,7 @@ func testTopologyCheckpointUsesRelativeBlockHeight(t *testing.T) { var newNetworkBlockHeight uint64 = 100 // set current block height to newNetworkBlockHeight - newTop.BeginBlock(ctx, abcitypes.RequestBeginBlock{Header: types1.Header{Height: int64(newNetworkBlockHeight)}}) + newTop.BeginBlock(ctx, newNetworkBlockHeight, "") newTop.Load(ctx, ckp) diff --git a/core/validators/topology_eth_key_rotate.go b/core/validators/topology_eth_key_rotate.go index f9266c65a6..88c325a936 100644 --- a/core/validators/topology_eth_key_rotate.go +++ b/core/validators/topology_eth_key_rotate.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/core/nodewallets/eth/clef" "code.vegaprotocol.io/vega/logging" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/ethereum/go-ethereum/crypto" ) diff --git a/core/validators/topology_eth_key_rotate_test.go b/core/validators/topology_eth_key_rotate_test.go index d7c69c8f96..2eb35254c9 100644 --- a/core/validators/topology_eth_key_rotate_test.go +++ b/core/validators/topology_eth_key_rotate_test.go @@ -24,11 +24,10 @@ import ( "code.vegaprotocol.io/vega/core/validators" "code.vegaprotocol.io/vega/core/validators/mocks" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - abcitypes "github.com/tendermint/tendermint/abci/types" - types1 "github.com/tendermint/tendermint/proto/tendermint/types" ) func TestTopologyEthereumKeyRotate(t *testing.T) { @@ -245,7 +244,7 @@ func testEthereumKeyRotationBeginBlock(t *testing.T) { require.NoError(t, err) // when - top.BeginBlock(ctx, abcitypes.RequestBeginBlock{Header: types1.Header{Height: 11}}) + top.BeginBlock(ctx, 11, "") // then data1 := top.Get("vega-master-pubkey-1") require.NotNil(t, data1) @@ -261,7 +260,7 @@ func testEthereumKeyRotationBeginBlock(t *testing.T) { assert.Equal(t, "eth-address-4", data4.EthereumAddress) // when - top.BeginBlock(ctx, abcitypes.RequestBeginBlock{Header: types1.Header{Height: 13}}) + top.BeginBlock(ctx, 13, "") // then data3 = top.Get("vega-master-pubkey-3") require.NotNil(t, data3) @@ -308,7 +307,7 @@ func TestEthereumKeyRotationBeginBlockWithSubmitter(t *testing.T) { now := time.Unix(666, 666) top.signatures.EXPECT().SetNonce(now).Times(1) top.timeService.EXPECT().GetTimeNow().Times(5).Return(now) - top.BeginBlock(ctx, abcitypes.RequestBeginBlock{Header: types1.Header{Height: 11}}) + top.BeginBlock(ctx, 11, "") // then data1 := top.Get("vega-master-pubkey-1") @@ -326,7 +325,7 @@ func TestEthereumKeyRotationBeginBlockWithSubmitter(t *testing.T) { now = now.Add(time.Second) top.signatures.EXPECT().SetNonce(now).Times(1) top.timeService.EXPECT().GetTimeNow().Times(5).Return(now) - top.BeginBlock(ctx, abcitypes.RequestBeginBlock{Header: types1.Header{Height: 140}}) + top.BeginBlock(ctx, 140, "") // try to submit again err = top.ProcessEthereumKeyRotation(ctx, "vega-key-1", newEthereumKeyRotationSubmission("new-eth-address-1", "new-eth-address-2", 150, submitter), MockVerify) @@ -390,7 +389,7 @@ func getTestTopWithMockedSignatures(t *testing.T) *testTopWithSignatures { signatures.EXPECT().ClearStaleSignatures().Times(1) signatures.EXPECT().SetNonce(gomock.Any()).Times(1) signatures.EXPECT().OfferSignatures().AnyTimes() - top.BeginBlock(context.Background(), abcitypes.RequestBeginBlock{Header: types1.Header{Height: 10}}) + top.BeginBlock(context.Background(), 10, "") return &testTopWithSignatures{ testTop: top, diff --git a/core/validators/topology_snapshot.go b/core/validators/topology_snapshot.go index 8ebb6587f9..812be593e4 100644 --- a/core/validators/topology_snapshot.go +++ b/core/validators/topology_snapshot.go @@ -26,12 +26,12 @@ import ( "code.vegaprotocol.io/vega/core/types" vegactx "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "code.vegaprotocol.io/vega/libs/proto" - tmtypes "github.com/tendermint/tendermint/abci/types" + tmtypes "github.com/cometbft/cometbft/abci/types" ) var ( @@ -320,7 +320,7 @@ func (t *Topology) restore(ctx context.Context, topology *types.Topology, p *typ t.log.Panic("failed to restore current block-height from context", logging.Error(err)) } - t.currentBlockHeight = uint64(bh) + t.currentBlockHeight = bh t.validatorPowerUpdates = vUpdates t.chainValidators = topology.ChainValidators[:] t.restorePendingKeyRotations(topology.PendingPubKeyRotations) diff --git a/core/validators/topology_snapshot_test.go b/core/validators/topology_snapshot_test.go index 1373fba0fd..52018f141b 100644 --- a/core/validators/topology_snapshot_test.go +++ b/core/validators/topology_snapshot_test.go @@ -18,20 +18,17 @@ package validators_test import ( "bytes" "context" + "encoding/hex" "testing" - "code.vegaprotocol.io/vega/core/validators" - - "github.com/golang/mock/gomock" - abcitypes "github.com/tendermint/tendermint/abci/types" - types1 "github.com/tendermint/tendermint/proto/tendermint/types" - "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/core/validators" vegactx "code.vegaprotocol.io/vega/libs/context" + "code.vegaprotocol.io/vega/libs/proto" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" - "code.vegaprotocol.io/vega/libs/proto" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -166,10 +163,8 @@ func TestTopologySnapshot(t *testing.T) { func updateValidatorPerformanceToNonDefaultState(t *testing.T, top *validators.Topology) { t.Helper() - req1 := abcitypes.RequestBeginBlock{Header: types1.Header{ProposerAddress: address1, Height: int64(1)}} - top.BeginBlock(context.Background(), req1) + top.BeginBlock(context.Background(), 1, hex.EncodeToString(address1)) // expecting address1 to propose but got address3 - req2 := abcitypes.RequestBeginBlock{Header: types1.Header{ProposerAddress: address3, Height: int64(1)}} - top.BeginBlock(context.Background(), req2) + top.BeginBlock(context.Background(), 1, hex.EncodeToString(address3)) } diff --git a/core/validators/topology_test.go b/core/validators/topology_test.go index 4cb87080e8..5d18e1ad89 100644 --- a/core/validators/topology_test.go +++ b/core/validators/topology_test.go @@ -38,8 +38,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - abcitypes "github.com/tendermint/tendermint/abci/types" - types1 "github.com/tendermint/tendermint/proto/tendermint/types" ) var tmPubKey = "tm-pub-key" @@ -700,7 +698,7 @@ func testBeginBlockSuccess(t *testing.T) { assert.NoError(t, err) // when - top.BeginBlock(ctx, abcitypes.RequestBeginBlock{Header: types1.Header{Height: 11}}) + top.BeginBlock(ctx, 11, "") // then data1 := top.Get("vega-master-pubkey-1") assert.NotNil(t, data1) @@ -716,7 +714,7 @@ func testBeginBlockSuccess(t *testing.T) { assert.Equal(t, hex.EncodeToString([]byte("vega-key-4")), data4.VegaPubKey) // when - top.BeginBlock(ctx, abcitypes.RequestBeginBlock{Header: types1.Header{Height: 13}}) + top.BeginBlock(ctx, 13, "") // then data3 = top.Get("vega-master-pubkey-3") assert.NotNil(t, data3) @@ -774,7 +772,7 @@ func testBeginBlockNotifyKeyChange(t *testing.T) { top.NotifyOnKeyChange(c1.Call, c2.Call) // when - top.BeginBlock(ctx, abcitypes.RequestBeginBlock{Header: types1.Header{Height: 11}}) + top.BeginBlock(ctx, 11, "") // then c1.AssertExpectations(t) diff --git a/core/validators/validator_performance.go b/core/validators/validator_performance.go index a9861d837c..cf3cd7ddd8 100644 --- a/core/validators/validator_performance.go +++ b/core/validators/validator_performance.go @@ -24,7 +24,7 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" - "github.com/tendermint/tendermint/crypto/sr25519" + "github.com/cometbft/cometbft/crypto/sr25519" ) var ( diff --git a/core/validators/validator_performance_test.go b/core/validators/validator_performance_test.go index 0bd848dba0..fcb03764e1 100644 --- a/core/validators/validator_performance_test.go +++ b/core/validators/validator_performance_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/validators" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "github.com/stretchr/testify/require" ) diff --git a/core/validators/validator_score_test.go b/core/validators/validator_score_test.go index 6029d32e88..e83eae21cb 100644 --- a/core/validators/validator_score_test.go +++ b/core/validators/validator_score_test.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" v1 "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/core/validators/validator_set.go b/core/validators/validator_set.go index 3e6cc6ba2b..54b885c3cf 100644 --- a/core/validators/validator_set.go +++ b/core/validators/validator_set.go @@ -27,8 +27,9 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" proto "code.vegaprotocol.io/vega/protos/vega" - tmtypes "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/crypto/encoding" + + tmtypes "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/crypto/encoding" ) var ( diff --git a/core/validators/validator_set_test.go b/core/validators/validator_set_test.go index 6604a4a4df..a2c9160683 100644 --- a/core/validators/validator_set_test.go +++ b/core/validators/validator_set_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "github.com/stretchr/testify/require" ) diff --git a/core/validators/validators_checkpoint_test.go b/core/validators/validators_checkpoint_test.go index 2fa2aef078..a455b7a851 100644 --- a/core/validators/validators_checkpoint_test.go +++ b/core/validators/validators_checkpoint_test.go @@ -22,6 +22,7 @@ import ( "time" bmocks "code.vegaprotocol.io/vega/core/broker/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/core/validators/witness.go b/core/validators/witness.go index 81623dd780..68f504d54d 100644 --- a/core/validators/witness.go +++ b/core/validators/witness.go @@ -154,6 +154,7 @@ type Witness struct { validatorVotesRequired num.Decimal wss *witnessSnapshotState + defaultConfirmations int64 } func NewWitness(ctx context.Context, log *logging.Logger, cfg Config, top ValidatorTopology, cmd Commander, tsvc TimeService) (w *Witness) { @@ -176,6 +177,10 @@ func NewWitness(ctx context.Context, log *logging.Logger, cfg Config, top Valida } } +func (w *Witness) SetDefaultConfirmations(c uint64) { + w.defaultConfirmations = int64(c) +} + func (w *Witness) OnDefaultValidatorsVoteRequiredUpdate(ctx context.Context, d num.Decimal) error { w.validatorVotesRequired = d return nil @@ -228,6 +233,24 @@ func (w *Witness) StartCheck( r Resource, cb func(interface{}, bool), checkUntil time.Time, +) error { + return w.startCheck(r, cb, checkUntil, w.defaultConfirmations) +} + +func (w *Witness) StartCheckWithDelay( + r Resource, + cb func(interface{}, bool), + checkUntil time.Time, + initialDelay int64, +) error { + return w.startCheck(r, cb, checkUntil, initialDelay) +} + +func (w *Witness) startCheck( + r Resource, + cb func(interface{}, bool), + checkUntil time.Time, + initialDelay int64, ) error { id := r.GetID() if _, ok := w.resources[id]; ok { @@ -254,7 +277,7 @@ func (w *Witness) StartCheck( // if we are a validator, we just start the routine. // so we can ensure the resources exists if w.top.IsValidator() { - go w.start(ctx, rs) + go w.start(ctx, rs, &initialDelay) } else { // if not a validator, we just jump to the state voteSent // and will wait for all validator to approve basically. @@ -287,7 +310,13 @@ func newBackoff(ctx context.Context, maxElapsedTime time.Duration) backoff.BackO return backoff.WithContext(bo, ctx) } -func (w *Witness) start(ctx context.Context, r *res) { +func (w *Witness) start(ctx context.Context, r *res, initialDelay *int64) { + if initialDelay != nil { + t := time.NewTimer(time.Duration(*initialDelay) * w.cfg.ApproxEthereumBlockTime.Duration) + <-t.C + t.Stop() + } + backff := newBackoff(ctx, r.checkUntil.Sub(w.now)) f := func() error { w.log.Debug("Checking the resource", diff --git a/core/validators/witness_snapshot.go b/core/validators/witness_snapshot.go index 166e696873..f9fa21ef0f 100644 --- a/core/validators/witness_snapshot.go +++ b/core/validators/witness_snapshot.go @@ -21,9 +21,8 @@ import ( "sort" "sync" - "code.vegaprotocol.io/vega/libs/proto" - "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/logging" ) @@ -166,7 +165,8 @@ func (w *Witness) RestoreResource(r Resource, cb func(interface{}, bool)) error ctx, cfunc := context.WithDeadline(context.Background(), res.checkUntil) res.cfunc = cfunc if w.top.IsValidator() && res.state.Load() != voteSent { - go w.start(ctx, res) + // no initial delay + go w.start(ctx, res, nil) } return nil } diff --git a/core/validators/witness_snapshot_test.go b/core/validators/witness_snapshot_test.go index 0e1782a6c7..5791465db4 100644 --- a/core/validators/witness_snapshot_test.go +++ b/core/validators/witness_snapshot_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/libs/proto" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/core/validators/witness_test.go b/core/validators/witness_test.go index 3e415f5b20..e9a3c38a38 100644 --- a/core/validators/witness_test.go +++ b/core/validators/witness_test.go @@ -18,9 +18,11 @@ package validators_test import ( "context" "encoding/hex" + "sync" "testing" "time" + "code.vegaprotocol.io/vega/core/txn" "code.vegaprotocol.io/vega/core/validators" "code.vegaprotocol.io/vega/core/validators/mocks" "code.vegaprotocol.io/vega/libs/crypto" @@ -28,7 +30,9 @@ import ( "code.vegaprotocol.io/vega/logging" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/cenkalti/backoff" "github.com/golang/mock/gomock" + "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -229,6 +233,7 @@ func TestVoteMajorityCalculation(t *testing.T) { erc.top.EXPECT().IsValidator().AnyTimes().Return(true) ch := make(chan struct{}, 1) + defer close(ch) res := testRes{"resource-id-1", func() error { ch <- struct{}{} return nil @@ -245,21 +250,30 @@ func TestVoteMajorityCalculation(t *testing.T) { // first wait once for the asset to be validated <-ch + wg := sync.WaitGroup{} + wg.Add(2) // first on chain time update, we send our own vote - erc.cmd.EXPECT().Command(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(1) + erc.cmd.EXPECT().Command(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(1).Do(func(_ context.Context, _ txn.Command, _ proto.Message, _ func(string, error), _ *backoff.ExponentialBackOff) { + wg.Done() + }) newNow := erc.startTime.Add(1 * time.Second) erc.OnTick(context.Background(), newNow) // then we propagate our own vote pubKey := newPublicKey(selfPubKey) - erc.top.EXPECT().IsValidatorVegaPubKey(pubKey.Hex()).Times(1).Return(true) + erc.top.EXPECT().IsValidatorVegaPubKey(pubKey.Hex()).Times(1).Return(true).Do(func(_ string) { + wg.Done() + }) err = erc.AddNodeCheck(context.Background(), &commandspb.NodeVote{Reference: res.id}, pubKey) assert.NoError(t, err) for i := 0; i < 3; i++ { // second vote from another validator othPubKey := newPublicKey(crypto.RandomHash()) - erc.top.EXPECT().IsValidatorVegaPubKey(othPubKey.Hex()).Times(1).Return(true) + wg.Add(1) + erc.top.EXPECT().IsValidatorVegaPubKey(othPubKey.Hex()).Times(1).Return(true).Do(func(_ string) { + wg.Done() + }) err = erc.AddNodeCheck(context.Background(), &commandspb.NodeVote{Reference: res.id}, othPubKey) assert.NoError(t, err) } @@ -272,6 +286,7 @@ func TestVoteMajorityCalculation(t *testing.T) { // block to wait for the result <-ch + wg.Wait() } func testOnTick(t *testing.T) { @@ -286,7 +301,9 @@ func testOnTick(t *testing.T) { erc.top.EXPECT().GetVotingPower(gomock.Any()).AnyTimes().Return(int64(100)) erc.top.EXPECT().IsValidator().AnyTimes().Return(true) + wg := sync.WaitGroup{} ch := make(chan struct{}, 1) + defer close(ch) res := testRes{"resource-id-1", func() error { ch <- struct{}{} return nil @@ -304,19 +321,28 @@ func testOnTick(t *testing.T) { <-ch // first on chain time update, we send our own vote - erc.cmd.EXPECT().Command(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(1) + wg.Add(1) + erc.cmd.EXPECT().Command(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(1).Do(func(_ context.Context, _ txn.Command, _ proto.Message, _ func(string, error), _ *backoff.ExponentialBackOff) { + wg.Done() + }) newNow := erc.startTime.Add(1 * time.Second) erc.OnTick(context.Background(), newNow) // then we propagate our own vote pubKey := newPublicKey(selfPubKey) - erc.top.EXPECT().IsValidatorVegaPubKey(pubKey.Hex()).Times(1).Return(true) + wg.Add(1) + erc.top.EXPECT().IsValidatorVegaPubKey(pubKey.Hex()).Times(1).Return(true).Do(func(_ string) { + wg.Done() + }) err = erc.AddNodeCheck(context.Background(), &commandspb.NodeVote{Reference: res.id}, pubKey) assert.NoError(t, err) // second vote from another validator othPubKey := newPublicKey("somepubkey") - erc.top.EXPECT().IsValidatorVegaPubKey(othPubKey.Hex()).Times(1).Return(true) + wg.Add(1) + erc.top.EXPECT().IsValidatorVegaPubKey(othPubKey.Hex()).Times(1).Return(true).Do(func(_ string) { + wg.Done() + }) err = erc.AddNodeCheck(context.Background(), &commandspb.NodeVote{Reference: res.id}, othPubKey) assert.NoError(t, err) @@ -327,6 +353,7 @@ func testOnTick(t *testing.T) { // block to wait for the result <-ch + wg.Wait() } func testOnTickNonValidator(t *testing.T) { diff --git a/core/vegatime/service_test.go b/core/vegatime/service_test.go index 82c399376b..2d7e81e709 100644 --- a/core/vegatime/service_test.go +++ b/core/vegatime/service_test.go @@ -21,6 +21,7 @@ import ( "time" "code.vegaprotocol.io/vega/core/broker/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" ) diff --git a/core/vesting/mocks/mocks.go b/core/vesting/mocks/mocks.go index 4a31a98213..e455b24170 100644 --- a/core/vesting/mocks/mocks.go +++ b/core/vesting/mocks/mocks.go @@ -53,6 +53,20 @@ func (mr *MockCollateralMockRecorder) GetAllVestingQuantumBalance(arg0 interface return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllVestingQuantumBalance", reflect.TypeOf((*MockCollateral)(nil).GetAllVestingQuantumBalance), arg0) } +// GetVestingAccounts mocks base method. +func (m *MockCollateral) GetVestingAccounts() []*types.Account { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetVestingAccounts") + ret0, _ := ret[0].([]*types.Account) + return ret0 +} + +// GetVestingAccounts indicates an expected call of GetVestingAccounts. +func (mr *MockCollateralMockRecorder) GetVestingAccounts() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVestingAccounts", reflect.TypeOf((*MockCollateral)(nil).GetVestingAccounts)) +} + // GetVestingRecovery mocks base method. func (m *MockCollateral) GetVestingRecovery() map[string]map[string]*num.Uint { m.ctrl.T.Helper() diff --git a/core/vesting/vesting.go b/core/vesting/vesting.go index 2b1cafd28d..7b61cc5040 100644 --- a/core/vesting/vesting.go +++ b/core/vesting/vesting.go @@ -18,6 +18,7 @@ package vesting import ( "context" "sort" + "time" "code.vegaprotocol.io/vega/core/assets" "code.vegaprotocol.io/vega/core/events" @@ -39,6 +40,7 @@ type Collateral interface { ) ([]*types.LedgerMovement, error) GetVestingRecovery() map[string]map[string]*num.Uint GetAllVestingQuantumBalance(party string) *num.Uint + GetVestingAccounts() []*types.Account } type ActivityStreakVestingMultiplier interface { @@ -76,7 +78,9 @@ type Engine struct { baseRate num.Decimal benefitTiers []*types.VestingBenefitTier - state map[string]*PartyRewards + state map[string]*PartyRewards + epochSeq uint64 + upgradeHackActivated bool } func New( @@ -146,7 +150,9 @@ func (e *Engine) OnEpochEvent(ctx context.Context, epoch types.Epoch) { } } -func (e *Engine) OnEpochRestore(ctx context.Context, epoch types.Epoch) {} +func (e *Engine) OnEpochRestore(ctx context.Context, epoch types.Epoch) { + e.epochSeq = epoch.Seq +} func (e *Engine) AddReward( party, asset string, @@ -295,6 +301,15 @@ func (e *Engine) distributeVested(ctx context.Context) { e.broker.Send(events.NewLedgerMovements(ctx, responses)) } +// OnTick is called on the beginning of the block. In here +// this is a post upgrade. +func (e *Engine) OnTick(ctx context.Context, _ time.Time) { + if e.upgradeHackActivated { + e.broadcastSummary(ctx, e.epochSeq) + e.upgradeHackActivated = false + } +} + func (e *Engine) makeTransfer( party, assetID string, balance *num.Uint, @@ -343,6 +358,12 @@ func (e *Engine) broadcastSummary(ctx context.Context, seq uint64) { PartiesVestingSummary: []*eventspb.PartyVestingSummary{}, } + parties := make([]string, 0, len(e.state)) + for k := range e.state { + parties = append(parties, k) + } + sort.Strings(parties) + for p, pRewards := range e.state { pSummary := &eventspb.PartyVestingSummary{ Party: p, diff --git a/core/vesting/vesting_snapshot.go b/core/vesting/vesting_snapshot.go index bf6cf77b14..0265014c90 100644 --- a/core/vesting/vesting_snapshot.go +++ b/core/vesting/vesting_snapshot.go @@ -64,21 +64,21 @@ func (e *SnapshotEngine) GetState(k string) ([]byte, []types.StateProvider, erro return state, nil, err } -func (e *SnapshotEngine) LoadState(_ context.Context, p *types.Payload) ([]types.StateProvider, error) { +func (e *SnapshotEngine) LoadState(ctx context.Context, p *types.Payload) ([]types.StateProvider, error) { if e.Namespace() != p.Data.Namespace() { return nil, types.ErrInvalidSnapshotNamespace } switch data := p.Data.(type) { case *types.PayloadVesting: - e.loadStateFromSnapshot(data.Vesting) + e.loadStateFromSnapshot(ctx, data.Vesting) return nil, nil default: return nil, types.ErrUnknownSnapshotType } } -func (e *SnapshotEngine) loadStateFromSnapshot(state *snapshotpb.Vesting) { +func (e *SnapshotEngine) loadStateFromSnapshot(_ context.Context, state *snapshotpb.Vesting) { for _, entry := range state.PartiesReward { for _, v := range entry.InVesting { balance, underflow := num.UintFromString(v.Balance, 10) diff --git a/core/volumediscount/engine.go b/core/volumediscount/engine.go index 575d1f62f7..7d0b91350d 100644 --- a/core/volumediscount/engine.go +++ b/core/volumediscount/engine.go @@ -20,14 +20,14 @@ import ( "sort" "time" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" vegapb "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "golang.org/x/exp/maps" + "golang.org/x/exp/slices" ) const MaximumWindowLength uint64 = 100 @@ -191,6 +191,7 @@ func (e *Engine) computeFactorsByParty(ctx context.Context, epoch uint64) { for _, party := range parties { notionalVolume := e.avgVolumePerParty[party] + qualifiedForTier := false for i := tiersLen - 1; i >= 0; i-- { tier := e.currentProgram.VolumeBenefitTiers[i] if notionalVolume.GreaterThanOrEqual(tier.MinimumRunningNotionalTakerVolume.ToDecimal()) { @@ -202,9 +203,18 @@ func (e *Engine) computeFactorsByParty(ctx context.Context, epoch uint64) { DiscountFactor: tier.VolumeDiscountFactor.String(), RunningVolume: notionalVolume.Round(0).String(), }) + qualifiedForTier = true break } } + // if the party hasn't qualified, then still send the stats but with a zero factor + if !qualifiedForTier { + evt.Stats = append(evt.Stats, &eventspb.PartyVolumeDiscountStats{ + PartyId: party.String(), + DiscountFactor: "0", + RunningVolume: notionalVolume.Round(0).String(), + }) + } } e.broker.Send(events.NewVolumeDiscountStatsUpdatedEvent(ctx, evt)) diff --git a/core/volumediscount/engine_test.go b/core/volumediscount/engine_test.go index ff6fe76efb..82494e6ea3 100644 --- a/core/volumediscount/engine_test.go +++ b/core/volumediscount/engine_test.go @@ -29,6 +29,7 @@ import ( "code.vegaprotocol.io/vega/libs/proto" "code.vegaprotocol.io/vega/protos/vega" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) @@ -176,7 +177,7 @@ func TestDiscountFactor(t *testing.T) { }).Times(1) // end the epoch to get the market activity recorded - expectStatsUpdated(t, broker) + expectStatsUpdatedWithUnqualifiedParties(t, broker) currentTime = currentTime.Add(1 * time.Minute) endEpoch(t, engine, currentEpoch, currentTime.Add(1*time.Minute)) @@ -278,7 +279,7 @@ func TestDiscountFactorWithWindow(t *testing.T) { "p7": num.NewUint(5000), }).Times(1) - expectStatsUpdated(t, broker) + expectStatsUpdatedWithUnqualifiedParties(t, broker) currentTime = currentTime.Add(1 * time.Minute) endEpoch(t, engine, currentEpoch, currentTime) // start a new epoch for the discount factors to be in place diff --git a/core/volumediscount/helpers_for_test.go b/core/volumediscount/helpers_for_test.go index d7a10ab973..75cfde13e2 100644 --- a/core/volumediscount/helpers_for_test.go +++ b/core/volumediscount/helpers_for_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/core/volumediscount" "code.vegaprotocol.io/vega/core/volumediscount/mocks" vegapb "code.vegaprotocol.io/vega/protos/vega" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) @@ -67,6 +68,25 @@ func expectStatsUpdated(t *testing.T, broker *mocks.MockBroker) { }).Times(1) } +func expectStatsUpdatedWithUnqualifiedParties(t *testing.T, broker *mocks.MockBroker) { + t.Helper() + + broker.EXPECT().Send(gomock.Any()).Do(func(evt events.Event) { + update, ok := evt.(*events.VolumeDiscountStatsUpdated) + require.Truef(t, ok, "expecting event of type *events.VolumeDiscountStatsUpdated but got %T", evt) + stats := update.VolumeDiscountStatsUpdated() + foundUnqualifiedParty := false + for _, s := range stats.Stats { + if s.PartyId == "p1" { + foundUnqualifiedParty = true + require.Equal(t, "0", s.DiscountFactor) + require.Equal(t, "900", s.RunningVolume) + } + } + require.True(t, foundUnqualifiedParty) + }).Times(1) +} + func expectProgramStarted(t *testing.T, broker *mocks.MockBroker, p1 *types.VolumeDiscountProgram) { t.Helper() diff --git a/core/volumediscount/snapshot.go b/core/volumediscount/snapshot.go index dedf5882bd..5f07588e0b 100644 --- a/core/volumediscount/snapshot.go +++ b/core/volumediscount/snapshot.go @@ -19,12 +19,14 @@ import ( "context" "fmt" "sort" + "strings" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/proto" vegapb "code.vegaprotocol.io/vega/protos/vega" snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + "golang.org/x/exp/slices" ) @@ -182,8 +184,8 @@ func (e *SnapshottedEngine) serialiseDiscountVolumeProgram() ([]byte, error) { DiscountFactor: discountStats.DiscountFactor.String(), }) } - slices.SortStableFunc(stats, func(a, b *snapshotpb.VolumeDiscountStats) bool { - return a.Party < b.Party + slices.SortStableFunc(stats, func(a, b *snapshotpb.VolumeDiscountStats) int { + return strings.Compare(a.Party, b.Party) }) payload := &snapshotpb.Payload{ diff --git a/datanode/admin/client.go b/datanode/admin/client.go index b0aa6a8d99..be78e8b8f6 100644 --- a/datanode/admin/client.go +++ b/datanode/admin/client.go @@ -75,7 +75,7 @@ func (s *Client) call(ctx context.Context, method string, args interface{}, repl resp, err := s.http.Do(httpReq) if err != nil { - return fmt.Errorf("failed to post data %q: %w", string(req), err) + return fmt.Errorf("failed to contact vega socket: %w", err) } defer resp.Body.Close() diff --git a/datanode/admin/server.go b/datanode/admin/server.go index 395fb92d42..df31d9f49f 100644 --- a/datanode/admin/server.go +++ b/datanode/admin/server.go @@ -21,13 +21,12 @@ import ( "net/http" "os" + "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" "github.com/gorilla/mux" "github.com/gorilla/rpc" "github.com/gorilla/rpc/json" - - "code.vegaprotocol.io/vega/logging" ) type Server struct { diff --git a/datanode/api/errors.go b/datanode/api/errors.go index 0f9f50c815..e692c20469 100644 --- a/datanode/api/errors.go +++ b/datanode/api/errors.go @@ -106,6 +106,8 @@ var ( ErrNegativeOrderVersion = newInvalidArgumentError("negative order version") // ErrLastPaginationNotSupported is returned when last pagination is not supported. ErrLastPaginationNotSupported = newInvalidArgumentError("'last' pagination is not supported") + // ErrMissingMarginFactor is returned when isolated margin mode is specified, but margin factor is not supplied. + ErrMissingMarginFactor = newInvalidArgumentError("missing margin factor") // ErrOracleServiceSpecID is returned when there was no data found for the given ID. ErrOracleServiceGetSpec = errors.New("failed to retrieve data for oracle spec") @@ -172,9 +174,10 @@ var ( ErrCandleServiceSubscribeToCandles = errors.New("failed to subscribe to candle data") ErrCandleServiceGetCandlesForMarket = errors.New("failed to get candles for market") // PartyService... - ErrPartyServiceGetAll = errors.New("failed to get parties") - ErrPartyServiceGetByID = errors.New("failed to get party for ID") - ErrPartyServiceGetByTxHash = errors.New("failed to get parties for tx hash") + ErrPartyServiceGetAll = errors.New("failed to get parties") + ErrPartyServiceListProfiles = errors.New("failed to get parties' profiles") + ErrPartyServiceGetByID = errors.New("failed to get party for ID") + ErrPartyServiceGetByTxHash = errors.New("failed to get parties for tx hash") // NotaryService... ErrNotaryServiceGetByResourceID = errors.New("failed to get notary for resource ID") // OracleSpecService... @@ -192,8 +195,9 @@ var ( // DepositService... ErrDepositServiceGet = errors.New("failed to get deposit") // TransferService... - ErrTransferServiceGet = errors.New("failed to get transfer") - ErrMissingTransferID = errors.New("missing transfer id") + ErrTransferServiceGet = errors.New("failed to get transfer") + ErrTransferServiceGetFeeDiscount = errors.New("failed to get current transfer fee discount") + ErrMissingTransferID = errors.New("missing transfer id") // NetworkLimits... ErrGetNetworkLimits = errors.New("failed to get network limits") // ErrGetNetworkParameters is returned when the network parameters cannot be retrieved. @@ -254,8 +258,8 @@ var ( // BlockService... ErrBlockServiceGetLast = errors.New("failed to get last block") // Positions... - ErrPositionsGetByTxHash = errors.New("failed to get positions for tx hash") - ErrPositionsInvalidCollateralAmount = newInvalidArgumentError("invalid collateral amount") + ErrPositionsGetByTxHash = errors.New("failed to get positions for tx hash") + ErrPositionsInvalidAccountBalance = newInvalidArgumentError("invalid account balance") // Ledger entries... ErrLedgerEntriesGetByTxHash = errors.New("failed to get ledger entries for tx hash") // Transfers... @@ -308,14 +312,14 @@ var ( ErrGetReferralSetStats = errors.New("failed to get referral set stats") // Fees stats. - ErrGetFeesStats = errors.New("failed to get current fees stats") - ErrFeesStatsRequest = errors.New("marketID or assetID must be provided") - ErrGetFeesStatsForParty = errors.New("failed to get current fees stats for party") - ErrFeesStatsForPartyRequest = errors.New("fromEpoch must be set when toEpoch is set") + ErrGetFeesStats = errors.New("failed to get current fees stats") + ErrFeesStatsRequest = errors.New("marketID or assetID must be provided") + ErrGetFeesStatsForParty = errors.New("failed to get current fees stats for party") // Teams. ErrListTeams = errors.New("failed to list teams") ErrListTeamReferees = errors.New("failed to list team referees") + ErrListTeamStatistics = errors.New("failed to list team statistics") ErrListTeamRefereeHistory = errors.New("failed to list team referee history") // Volume discount Programs. @@ -324,6 +328,13 @@ var ( // Paid liquidity fees. ErrListPaidLiquidityFees = errors.New("failed to list paid liquidity fees") + // List Games. + ErrListGames = errors.New("failed to list games") + + // Transfer fee estimates. + ErrInvalidTransferAmount = newInvalidArgumentError("invalid transfer amount") + + ErrListPartyMarginModes = errors.New("failed to list parties margin modes") ) // errorMap contains a mapping between errors and Vega numeric error codes. diff --git a/datanode/api/errors_test.go b/datanode/api/errors_test.go index 5be79a2f46..abf1826df1 100644 --- a/datanode/api/errors_test.go +++ b/datanode/api/errors_test.go @@ -19,15 +19,15 @@ import ( "errors" "testing" + "code.vegaprotocol.io/vega/datanode/api" + "code.vegaprotocol.io/vega/datanode/entities" + types "code.vegaprotocol.io/vega/protos/vega" + "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - - "code.vegaprotocol.io/vega/datanode/api" - "code.vegaprotocol.io/vega/datanode/entities" - types "code.vegaprotocol.io/vega/protos/vega" ) func TestErrorMapUniqueCodes(t *testing.T) { diff --git a/datanode/api/event_observer.go b/datanode/api/event_observer.go index d54cef9e10..4048c09046 100644 --- a/datanode/api/event_observer.go +++ b/datanode/api/event_observer.go @@ -19,10 +19,9 @@ import ( "context" "time" - "code.vegaprotocol.io/vega/libs/subscribers" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/metrics" + "code.vegaprotocol.io/vega/libs/subscribers" "code.vegaprotocol.io/vega/logging" protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" diff --git a/datanode/api/event_observer_test.go b/datanode/api/event_observer_test.go index 1ae855159f..c5a92cbc16 100644 --- a/datanode/api/event_observer_test.go +++ b/datanode/api/event_observer_test.go @@ -21,12 +21,12 @@ import ( "testing" "time" + protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/stretchr/testify/assert" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - - protoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" - eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" ) func Test_recvEventRequest(t *testing.T) { diff --git a/datanode/api/mocks/asset_service_mock.go b/datanode/api/mocks/asset_service_mock.go new file mode 100644 index 0000000000..17bd062f7a --- /dev/null +++ b/datanode/api/mocks/asset_service_mock.go @@ -0,0 +1,97 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: code.vegaprotocol.io/vega/datanode/api (interfaces: AssetService) + +// Package mocks is a generated GoMock package. +package mocks + +import ( + context "context" + reflect "reflect" + + entities "code.vegaprotocol.io/vega/datanode/entities" + gomock "github.com/golang/mock/gomock" +) + +// MockAssetService is a mock of AssetService interface. +type MockAssetService struct { + ctrl *gomock.Controller + recorder *MockAssetServiceMockRecorder +} + +// MockAssetServiceMockRecorder is the mock recorder for MockAssetService. +type MockAssetServiceMockRecorder struct { + mock *MockAssetService +} + +// NewMockAssetService creates a new mock instance. +func NewMockAssetService(ctrl *gomock.Controller) *MockAssetService { + mock := &MockAssetService{ctrl: ctrl} + mock.recorder = &MockAssetServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAssetService) EXPECT() *MockAssetServiceMockRecorder { + return m.recorder +} + +// GetAll mocks base method. +func (m *MockAssetService) GetAll(arg0 context.Context) ([]entities.Asset, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAll", arg0) + ret0, _ := ret[0].([]entities.Asset) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAll indicates an expected call of GetAll. +func (mr *MockAssetServiceMockRecorder) GetAll(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAll", reflect.TypeOf((*MockAssetService)(nil).GetAll), arg0) +} + +// GetAllWithCursorPagination mocks base method. +func (m *MockAssetService) GetAllWithCursorPagination(arg0 context.Context, arg1 entities.CursorPagination) ([]entities.Asset, entities.PageInfo, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllWithCursorPagination", arg0, arg1) + ret0, _ := ret[0].([]entities.Asset) + ret1, _ := ret[1].(entities.PageInfo) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// GetAllWithCursorPagination indicates an expected call of GetAllWithCursorPagination. +func (mr *MockAssetServiceMockRecorder) GetAllWithCursorPagination(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllWithCursorPagination", reflect.TypeOf((*MockAssetService)(nil).GetAllWithCursorPagination), arg0, arg1) +} + +// GetByID mocks base method. +func (m *MockAssetService) GetByID(arg0 context.Context, arg1 string) (entities.Asset, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret0, _ := ret[0].(entities.Asset) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByID indicates an expected call of GetByID. +func (mr *MockAssetServiceMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockAssetService)(nil).GetByID), arg0, arg1) +} + +// GetByTxHash mocks base method. +func (m *MockAssetService) GetByTxHash(arg0 context.Context, arg1 entities.TxHash) ([]entities.Asset, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetByTxHash", arg0, arg1) + ret0, _ := ret[0].([]entities.Asset) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByTxHash indicates an expected call of GetByTxHash. +func (mr *MockAssetServiceMockRecorder) GetByTxHash(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByTxHash", reflect.TypeOf((*MockAssetService)(nil).GetByTxHash), arg0, arg1) +} diff --git a/datanode/api/mocks/market_data_service_mock.go b/datanode/api/mocks/market_data_service_mock.go new file mode 100644 index 0000000000..dcfb136377 --- /dev/null +++ b/datanode/api/mocks/market_data_service_mock.go @@ -0,0 +1,98 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: code.vegaprotocol.io/vega/datanode/api (interfaces: MarketDataService) + +// Package mocks is a generated GoMock package. +package mocks + +import ( + context "context" + reflect "reflect" + time "time" + + entities "code.vegaprotocol.io/vega/datanode/entities" + gomock "github.com/golang/mock/gomock" +) + +// MockMarketDataService is a mock of MarketDataService interface. +type MockMarketDataService struct { + ctrl *gomock.Controller + recorder *MockMarketDataServiceMockRecorder +} + +// MockMarketDataServiceMockRecorder is the mock recorder for MockMarketDataService. +type MockMarketDataServiceMockRecorder struct { + mock *MockMarketDataService +} + +// NewMockMarketDataService creates a new mock instance. +func NewMockMarketDataService(ctrl *gomock.Controller) *MockMarketDataService { + mock := &MockMarketDataService{ctrl: ctrl} + mock.recorder = &MockMarketDataServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockMarketDataService) EXPECT() *MockMarketDataServiceMockRecorder { + return m.recorder +} + +// GetHistoricMarketData mocks base method. +func (m *MockMarketDataService) GetHistoricMarketData(arg0 context.Context, arg1 string, arg2, arg3 *time.Time, arg4 entities.Pagination) ([]entities.MarketData, entities.PageInfo, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetHistoricMarketData", arg0, arg1, arg2, arg3, arg4) + ret0, _ := ret[0].([]entities.MarketData) + ret1, _ := ret[1].(entities.PageInfo) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// GetHistoricMarketData indicates an expected call of GetHistoricMarketData. +func (mr *MockMarketDataServiceMockRecorder) GetHistoricMarketData(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHistoricMarketData", reflect.TypeOf((*MockMarketDataService)(nil).GetHistoricMarketData), arg0, arg1, arg2, arg3, arg4) +} + +// GetMarketDataByID mocks base method. +func (m *MockMarketDataService) GetMarketDataByID(arg0 context.Context, arg1 string) (entities.MarketData, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetMarketDataByID", arg0, arg1) + ret0, _ := ret[0].(entities.MarketData) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetMarketDataByID indicates an expected call of GetMarketDataByID. +func (mr *MockMarketDataServiceMockRecorder) GetMarketDataByID(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMarketDataByID", reflect.TypeOf((*MockMarketDataService)(nil).GetMarketDataByID), arg0, arg1) +} + +// GetMarketsData mocks base method. +func (m *MockMarketDataService) GetMarketsData(arg0 context.Context) ([]entities.MarketData, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetMarketsData", arg0) + ret0, _ := ret[0].([]entities.MarketData) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetMarketsData indicates an expected call of GetMarketsData. +func (mr *MockMarketDataServiceMockRecorder) GetMarketsData(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMarketsData", reflect.TypeOf((*MockMarketDataService)(nil).GetMarketsData), arg0) +} + +// ObserveMarketData mocks base method. +func (m *MockMarketDataService) ObserveMarketData(arg0 context.Context, arg1 int, arg2 []string) (<-chan []*entities.MarketData, uint64) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ObserveMarketData", arg0, arg1, arg2) + ret0, _ := ret[0].(<-chan []*entities.MarketData) + ret1, _ := ret[1].(uint64) + return ret0, ret1 +} + +// ObserveMarketData indicates an expected call of ObserveMarketData. +func (mr *MockMarketDataServiceMockRecorder) ObserveMarketData(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObserveMarketData", reflect.TypeOf((*MockMarketDataService)(nil).ObserveMarketData), arg0, arg1, arg2) +} diff --git a/datanode/api/mocks/markets_service_mock.go b/datanode/api/mocks/markets_service_mock.go new file mode 100644 index 0000000000..03eed96fe9 --- /dev/null +++ b/datanode/api/mocks/markets_service_mock.go @@ -0,0 +1,98 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: code.vegaprotocol.io/vega/datanode/api (interfaces: MarketsService) + +// Package mocks is a generated GoMock package. +package mocks + +import ( + context "context" + reflect "reflect" + + entities "code.vegaprotocol.io/vega/datanode/entities" + gomock "github.com/golang/mock/gomock" +) + +// MockMarketsService is a mock of MarketsService interface. +type MockMarketsService struct { + ctrl *gomock.Controller + recorder *MockMarketsServiceMockRecorder +} + +// MockMarketsServiceMockRecorder is the mock recorder for MockMarketsService. +type MockMarketsServiceMockRecorder struct { + mock *MockMarketsService +} + +// NewMockMarketsService creates a new mock instance. +func NewMockMarketsService(ctrl *gomock.Controller) *MockMarketsService { + mock := &MockMarketsService{ctrl: ctrl} + mock.recorder = &MockMarketsServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockMarketsService) EXPECT() *MockMarketsServiceMockRecorder { + return m.recorder +} + +// GetAllPaged mocks base method. +func (m *MockMarketsService) GetAllPaged(arg0 context.Context, arg1 string, arg2 entities.CursorPagination, arg3 bool) ([]entities.Market, entities.PageInfo, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllPaged", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].([]entities.Market) + ret1, _ := ret[1].(entities.PageInfo) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// GetAllPaged indicates an expected call of GetAllPaged. +func (mr *MockMarketsServiceMockRecorder) GetAllPaged(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllPaged", reflect.TypeOf((*MockMarketsService)(nil).GetAllPaged), arg0, arg1, arg2, arg3) +} + +// GetByID mocks base method. +func (m *MockMarketsService) GetByID(arg0 context.Context, arg1 string) (entities.Market, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret0, _ := ret[0].(entities.Market) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByID indicates an expected call of GetByID. +func (mr *MockMarketsServiceMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockMarketsService)(nil).GetByID), arg0, arg1) +} + +// GetByTxHash mocks base method. +func (m *MockMarketsService) GetByTxHash(arg0 context.Context, arg1 entities.TxHash) ([]entities.Market, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetByTxHash", arg0, arg1) + ret0, _ := ret[0].([]entities.Market) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByTxHash indicates an expected call of GetByTxHash. +func (mr *MockMarketsServiceMockRecorder) GetByTxHash(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByTxHash", reflect.TypeOf((*MockMarketsService)(nil).GetByTxHash), arg0, arg1) +} + +// ListSuccessorMarkets mocks base method. +func (m *MockMarketsService) ListSuccessorMarkets(arg0 context.Context, arg1 string, arg2 bool, arg3 entities.CursorPagination) ([]entities.SuccessorMarket, entities.PageInfo, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListSuccessorMarkets", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].([]entities.SuccessorMarket) + ret1, _ := ret[1].(entities.PageInfo) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// ListSuccessorMarkets indicates an expected call of ListSuccessorMarkets. +func (mr *MockMarketsServiceMockRecorder) ListSuccessorMarkets(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSuccessorMarkets", reflect.TypeOf((*MockMarketsService)(nil).ListSuccessorMarkets), arg0, arg1, arg2, arg3) +} diff --git a/datanode/api/mocks/risk_factor_service_mock.go b/datanode/api/mocks/risk_factor_service_mock.go new file mode 100644 index 0000000000..0c30576752 --- /dev/null +++ b/datanode/api/mocks/risk_factor_service_mock.go @@ -0,0 +1,51 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: code.vegaprotocol.io/vega/datanode/api (interfaces: RiskFactorService) + +// Package mocks is a generated GoMock package. +package mocks + +import ( + context "context" + reflect "reflect" + + entities "code.vegaprotocol.io/vega/datanode/entities" + gomock "github.com/golang/mock/gomock" +) + +// MockRiskFactorService is a mock of RiskFactorService interface. +type MockRiskFactorService struct { + ctrl *gomock.Controller + recorder *MockRiskFactorServiceMockRecorder +} + +// MockRiskFactorServiceMockRecorder is the mock recorder for MockRiskFactorService. +type MockRiskFactorServiceMockRecorder struct { + mock *MockRiskFactorService +} + +// NewMockRiskFactorService creates a new mock instance. +func NewMockRiskFactorService(ctrl *gomock.Controller) *MockRiskFactorService { + mock := &MockRiskFactorService{ctrl: ctrl} + mock.recorder = &MockRiskFactorServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockRiskFactorService) EXPECT() *MockRiskFactorServiceMockRecorder { + return m.recorder +} + +// GetMarketRiskFactors mocks base method. +func (m *MockRiskFactorService) GetMarketRiskFactors(arg0 context.Context, arg1 string) (entities.RiskFactor, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetMarketRiskFactors", arg0, arg1) + ret0, _ := ret[0].(entities.RiskFactor) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetMarketRiskFactors indicates an expected call of GetMarketRiskFactors. +func (mr *MockRiskFactorServiceMockRecorder) GetMarketRiskFactors(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMarketRiskFactors", reflect.TypeOf((*MockRiskFactorService)(nil).GetMarketRiskFactors), arg0, arg1) +} diff --git a/datanode/api/server.go b/datanode/api/server.go index 301626c171..c3ce4a73f0 100644 --- a/datanode/api/server.go +++ b/datanode/api/server.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package api import ( @@ -36,18 +24,15 @@ import ( "strconv" "time" - "code.vegaprotocol.io/vega/datanode/gateway" - "code.vegaprotocol.io/vega/datanode/networkhistory/segment" - - "code.vegaprotocol.io/vega/libs/subscribers" - - "code.vegaprotocol.io/vega/datanode/ratelimit" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/candlesv2" "code.vegaprotocol.io/vega/datanode/contextutil" "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/gateway" + "code.vegaprotocol.io/vega/datanode/networkhistory/segment" + "code.vegaprotocol.io/vega/datanode/ratelimit" "code.vegaprotocol.io/vega/datanode/service" + "code.vegaprotocol.io/vega/libs/subscribers" "code.vegaprotocol.io/vega/logging" protoapi "code.vegaprotocol.io/vega/protos/data-node/api/v2" vegaprotoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" @@ -95,6 +80,43 @@ type NetworkHistoryService interface { GetBootstrapPeers() []string } +// MarketsService ... +// +//go:generate go run github.com/golang/mock/mockgen -destination mocks/markets_service_mock.go -package mocks code.vegaprotocol.io/vega/datanode/api MarketsService +type MarketsService interface { + GetByID(ctx context.Context, marketID string) (entities.Market, error) + GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Market, error) + GetAllPaged(ctx context.Context, marketID string, pagination entities.CursorPagination, includeSettled bool) ([]entities.Market, entities.PageInfo, error) + ListSuccessorMarkets(ctx context.Context, marketID string, childrenOnly bool, pagination entities.CursorPagination) ([]entities.SuccessorMarket, entities.PageInfo, error) +} + +// MarketDataService ... +// +//go:generate go run github.com/golang/mock/mockgen -destination mocks/market_data_service_mock.go -package mocks code.vegaprotocol.io/vega/datanode/api MarketDataService +type MarketDataService interface { + GetMarketDataByID(ctx context.Context, marketID string) (entities.MarketData, error) + GetMarketsData(ctx context.Context) ([]entities.MarketData, error) + GetHistoricMarketData(ctx context.Context, marketID string, start, end *time.Time, pagination entities.Pagination) ([]entities.MarketData, entities.PageInfo, error) + ObserveMarketData(ctx context.Context, retries int, marketID []string) (<-chan []*entities.MarketData, uint64) +} + +// RiskFactorService ... +// +//go:generate go run github.com/golang/mock/mockgen -destination mocks/risk_factor_service_mock.go -package mocks code.vegaprotocol.io/vega/datanode/api RiskFactorService +type RiskFactorService interface { + GetMarketRiskFactors(ctx context.Context, marketID string) (entities.RiskFactor, error) +} + +// Asset service ... +// +//go:generate go run github.com/golang/mock/mockgen -destination mocks/asset_service_mock.go -package mocks code.vegaprotocol.io/vega/datanode/api AssetService +type AssetService interface { + GetByID(ctx context.Context, id string) (entities.Asset, error) + GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Asset, error) + GetAll(ctx context.Context) ([]entities.Asset, error) + GetAllWithCursorPagination(ctx context.Context, pagination entities.CursorPagination) ([]entities.Asset, entities.PageInfo, error) +} + // GRPCServer represent the grpc api provided by the vega node. type GRPCServer struct { Config @@ -109,7 +131,7 @@ type GRPCServer struct { networkLimitsService *service.NetworkLimits marketDataService *service.MarketData tradeService *service.Trade - assetService *service.Asset + AssetService AssetService accountService *service.Account rewardService *service.Reward marketsService *service.Markets @@ -154,6 +176,9 @@ type GRPCServer struct { paidLiquidityFeesStatsService *service.PaidLiquidityFeesStats partyLockedBalances *service.PartyLockedBalances partyVestingBalances *service.PartyVestingBalances + transactionResults *service.TransactionResults + gamesService *service.Games + marginModesService *service.MarginModes eventObserver *eventObserver @@ -220,6 +245,9 @@ func NewGRPCServer( paidLiquidityFeesStatsService *service.PaidLiquidityFeesStats, partyLockedBalances *service.PartyLockedBalances, partyVestingBalances *service.PartyVestingBalances, + transactionResults *service.TransactionResults, + gameService *service.Games, + marginModesService *service.MarginModes, ) *GRPCServer { // setup logger log = log.Named(namedLogger) @@ -238,7 +266,7 @@ func NewGRPCServer( orderService: orderService, networkLimitsService: networkLimitsService, tradeService: tradeService, - assetService: assetService, + AssetService: assetService, accountService: accountService, rewardService: rewardService, marketsService: marketsService, @@ -285,6 +313,9 @@ func NewGRPCServer( paidLiquidityFeesStatsService: paidLiquidityFeesStatsService, partyLockedBalances: partyLockedBalances, partyVestingBalances: partyVestingBalances, + transactionResults: transactionResults, + gamesService: gameService, + marginModesService: marginModesService, eventObserver: &eventObserver{ log: log, @@ -466,17 +497,18 @@ func (g *GRPCServer) Start(ctx context.Context, lis net.Listener) error { vegaprotoapi.RegisterCoreServiceServer(g.srv, coreProxySvc) tradingDataSvcV2 := &TradingDataServiceV2{ - config: g.Config, - log: g.log, - orderService: g.orderService, - networkLimitsService: g.networkLimitsService, - marketDataService: g.marketDataService, - tradeService: g.tradeService, - multiSigService: g.multiSigService, - notaryService: g.notaryService, - assetService: g.assetService, - candleService: g.candleService, - marketsService: g.marketsService, + config: g.Config, + log: g.log, + orderService: g.orderService, + networkLimitsService: g.networkLimitsService, + MarketDataService: g.marketDataService, + tradeService: g.tradeService, + multiSigService: g.multiSigService, + notaryService: g.notaryService, + AssetService: g.AssetService, + candleService: g.candleService, + MarketsService: g.marketsService, + partyService: g.partyService, riskService: g.riskService, positionService: g.positionService, @@ -490,11 +522,10 @@ func (g *GRPCServer) Start(ctx context.Context, lis net.Listener) error { governanceService: g.governanceService, transfersService: g.transferService, delegationService: g.delegationService, - marketService: g.marketsService, marketDepthService: g.marketDepthService, nodeService: g.nodeService, epochService: g.epochService, - riskFactorService: g.riskFactorService, + RiskFactorService: g.riskFactorService, networkParameterService: g.networkParameterService, checkpointService: g.checkpointService, stakeLinkingService: g.stakeLinkingService, @@ -520,6 +551,9 @@ func (g *GRPCServer) Start(ctx context.Context, lis net.Listener) error { partyLockedBalances: g.partyLockedBalances, partyVestingBalances: g.partyVestingBalances, vestingStats: g.vestingStatsService, + transactionResults: g.transactionResults, + gamesService: g.gamesService, + marginModesService: g.marginModesService, } protoapi.RegisterTradingDataServiceServer(g.srv, tradingDataSvcV2) diff --git a/datanode/api/trading_data_v2.go b/datanode/api/trading_data_v2.go index 4735e785cc..99af30fcdc 100644 --- a/datanode/api/trading_data_v2.go +++ b/datanode/api/trading_data_v2.go @@ -29,12 +29,9 @@ import ( "strings" "time" - "github.com/georgysavva/scany/pgxscan" - - "code.vegaprotocol.io/vega/datanode/sqlstore" - - "golang.org/x/sync/errgroup" - + "code.vegaprotocol.io/vega/core/banking" + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/netparams" "code.vegaprotocol.io/vega/core/risk" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/candlesv2" @@ -44,6 +41,7 @@ import ( "code.vegaprotocol.io/vega/datanode/networkhistory/segment" "code.vegaprotocol.io/vega/datanode/networkhistory/store" "code.vegaprotocol.io/vega/datanode/service" + "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/datanode/vegatime" "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/num" @@ -56,7 +54,10 @@ import ( v1 "code.vegaprotocol.io/vega/protos/vega/events/v1" "code.vegaprotocol.io/vega/version" + "github.com/georgysavva/scany/pgxscan" "github.com/pkg/errors" + "github.com/shopspring/decimal" + "golang.org/x/sync/errgroup" "google.golang.org/grpc/metadata" "google.golang.org/protobuf/proto" ) @@ -78,13 +79,13 @@ type TradingDataServiceV2 struct { eventService EventService orderService *service.Order networkLimitsService *service.NetworkLimits - marketDataService *service.MarketData + MarketDataService MarketDataService tradeService *service.Trade multiSigService *service.MultiSig notaryService *service.Notary - assetService *service.Asset + AssetService AssetService candleService *candlesv2.Svc - marketsService *service.Markets + MarketsService MarketsService partyService *service.Party riskService *service.Risk positionService *service.Position @@ -98,11 +99,10 @@ type TradingDataServiceV2 struct { governanceService *service.Governance transfersService *service.Transfer delegationService *service.Delegation - marketService *service.Markets marketDepthService *service.MarketDepth nodeService *service.Node epochService *service.Epoch - riskFactorService *service.RiskFactor + RiskFactorService RiskFactorService networkParameterService *service.NetworkParameter checkpointService *service.Checkpoint stakeLinkingService *service.StakeLinking @@ -127,6 +127,9 @@ type TradingDataServiceV2 struct { partyLockedBalances *service.PartyLockedBalances partyVestingBalances *service.PartyVestingBalances vestingStats *service.VestingStats + transactionResults *service.TransactionResults + gamesService *service.Games + marginModesService *service.MarginModes } func (t *TradingDataServiceV2) GetPartyVestingStats( @@ -185,14 +188,19 @@ func (t *TradingDataServiceV2) GetVestingBalancesSummary( outVesting = make([]*eventspb.PartyVestingBalance, 0, len(vestingBalances)) outLocked = make([]*eventspb.PartyLockedBalance, 0, len(lockedBalances)) epoch *uint64 + setEpoch = func(e uint64) { + if epoch == nil { + epoch = ptr.From(e) + return + } + if *epoch < e { + epoch = ptr.From(e) + } + } ) - if len(vestingBalances) > 0 { - epoch = ptr.From(vestingBalances[0].AtEpoch) - } else if len(lockedBalances) > 0 { - epoch = ptr.From(lockedBalances[0].AtEpoch) - } for _, v := range vestingBalances { + setEpoch(v.AtEpoch) outVesting = append( outVesting, &eventspb.PartyVestingBalance{ Asset: v.AssetID.String(), @@ -202,6 +210,7 @@ func (t *TradingDataServiceV2) GetVestingBalancesSummary( } for _, v := range lockedBalances { + setEpoch(v.AtEpoch) outLocked = append( outLocked, &eventspb.PartyLockedBalance{ Asset: v.AssetID.String(), @@ -429,6 +438,9 @@ func (t *TradingDataServiceV2) ListLedgerEntries(ctx context.Context, req *v2.Li entries, pageInfo, err := t.ledgerService.Query(ctx, leFilter, dateRange, pagination) if err != nil { + if errors.Is(err, sqlstore.ErrLedgerEntryFilterForParty) { + return nil, formatE(ErrInvalidFilter, err) + } return nil, formatE(ErrLedgerServiceGet, err) } @@ -598,7 +610,7 @@ func (t *TradingDataServiceV2) ObserveMarketsData(req *v2.ObserveMarketsDataRequ } } - ch, ref := t.marketDataService.ObserveMarketData(ctx, t.config.StreamRetries, req.MarketIds) + ch, ref := t.MarketDataService.ObserveMarketData(ctx, t.config.StreamRetries, req.MarketIds) return observeBatch(ctx, t.log, "MarketsData", ch, ref, func(marketData []*entities.MarketData) error { out := make([]*vega.MarketData, 0, len(marketData)) @@ -613,7 +625,7 @@ func (t *TradingDataServiceV2) ObserveMarketsData(req *v2.ObserveMarketsDataRequ func (t *TradingDataServiceV2) GetLatestMarketData(ctx context.Context, req *v2.GetLatestMarketDataRequest) (*v2.GetLatestMarketDataResponse, error) { defer metrics.StartAPIRequestAndTimeGRPC("GetLatestMarketData")() - md, err := t.marketDataService.GetMarketDataByID(ctx, req.MarketId) + md, err := t.MarketDataService.GetMarketDataByID(ctx, req.MarketId) if err != nil { return nil, formatE(ErrMarketServiceGetMarketData, err) } @@ -627,7 +639,7 @@ func (t *TradingDataServiceV2) GetLatestMarketData(ctx context.Context, req *v2. func (t *TradingDataServiceV2) ListLatestMarketData(ctx context.Context, _ *v2.ListLatestMarketDataRequest) (*v2.ListLatestMarketDataResponse, error) { defer metrics.StartAPIRequestAndTimeGRPC("ListLatestMarketData")() - mds, err := t.marketDataService.GetMarketsData(ctx) + mds, err := t.MarketDataService.GetMarketsData(ctx) if err != nil { return nil, formatE(ErrMarketServiceGetMarketData, err) } @@ -692,7 +704,7 @@ func (t *TradingDataServiceV2) handleGetMarketDataHistoryWithCursorPagination(ct endTime = ptr.From(time.Unix(0, *req.EndTimestamp)) } - history, pageInfo, err := t.marketDataService.GetHistoricMarketData(ctx, req.MarketId, startTime, endTime, pagination) + history, pageInfo, err := t.MarketDataService.GetHistoricMarketData(ctx, req.MarketId, startTime, endTime, pagination) if err != nil { return nil, errors.Wrap(err, "could not retrieve historic market data") } @@ -972,11 +984,15 @@ func (t *TradingDataServiceV2) GetERC20SetAssetLimitsBundle(ctx context.Context, return nil, formatE(ErrInvalidProposalID) } - proposal, err := t.governanceService.GetProposalByID(ctx, req.ProposalId) + proposal, err := t.governanceService.GetProposalByIDWithoutBatch(ctx, req.ProposalId) if err != nil { return nil, formatE(ErrGovernanceServiceGet, err) } + if proposal.IsBatch() { + return nil, formatE(errors.New("can not get bundle for batch proposal")) + } + if proposal.Terms.GetUpdateAsset() == nil { return nil, formatE(errors.New("not an update asset proposal")) } @@ -990,7 +1006,7 @@ func (t *TradingDataServiceV2) GetERC20SetAssetLimitsBundle(ctx context.Context, return nil, formatE(ErrNotaryServiceGetByResourceID, errors.Wrapf(err, "proposalID: %s", req.ProposalId)) } - asset, err := t.assetService.GetByID(ctx, proposal.Terms.GetUpdateAsset().AssetId) + asset, err := t.AssetService.GetByID(ctx, proposal.Terms.GetUpdateAsset().AssetId) if err != nil { return nil, formatE(ErrAssetServiceGetByID, err) } @@ -1025,7 +1041,7 @@ func (t *TradingDataServiceV2) GetERC20ListAssetBundle(ctx context.Context, req return nil, formatE(ErrInvalidAssetID) } - asset, err := t.assetService.GetByID(ctx, req.AssetId) + asset, err := t.AssetService.GetByID(ctx, req.AssetId) if err != nil { return nil, formatE(ErrAssetServiceGetByID, err) } @@ -1074,7 +1090,7 @@ func (t *TradingDataServiceV2) GetERC20WithdrawalApproval(ctx context.Context, r return nil, formatE(ErrNotaryServiceGetByResourceID, errors.Wrapf(err, "withdrawalID: %s", req.WithdrawalId)) } - assets, err := t.assetService.GetAll(ctx) + assets, err := t.AssetService.GetAll(ctx) if err != nil { return nil, formatE(ErrAssetServiceGetAll, err) } @@ -1227,7 +1243,7 @@ func (t *TradingDataServiceV2) GetMarket(ctx context.Context, req *v2.GetMarketR return nil, formatE(ErrInvalidMarketID) } - market, err := t.marketService.GetByID(ctx, req.MarketId) + market, err := t.MarketsService.GetByID(ctx, req.MarketId) if err != nil { return nil, formatE(ErrMarketServiceGetByID, err) } @@ -1251,7 +1267,7 @@ func (t *TradingDataServiceV2) ListMarkets(ctx context.Context, req *v2.ListMark includeSettled = *req.IncludeSettled } - markets, pageInfo, err := t.marketsService.GetAllPaged(ctx, "", pagination, includeSettled) + markets, pageInfo, err := t.MarketsService.GetAllPaged(ctx, "", pagination, includeSettled) if err != nil { return nil, formatE(ErrMarketServiceGetAllPaged, err) } @@ -1288,7 +1304,7 @@ func (t *TradingDataServiceV2) ListSuccessorMarkets(ctx context.Context, req *v2 return nil, formatE(ErrInvalidPagination, err) } - markets, pageInfo, err := t.marketsService.ListSuccessorMarkets(ctx, req.MarketId, req.IncludeFullHistory, pagination) + markets, pageInfo, err := t.MarketsService.ListSuccessorMarkets(ctx, req.MarketId, req.IncludeFullHistory, pagination) if err != nil { return nil, formatE(ErrMarketServiceGetAllPaged, err) } @@ -1554,6 +1570,34 @@ func (t *TradingDataServiceV2) ListParties(ctx context.Context, req *v2.ListPart }, nil } +func (t *TradingDataServiceV2) ListPartiesProfiles(ctx context.Context, req *v2.ListPartiesProfilesRequest) (*v2.ListPartiesProfilesResponse, error) { + defer metrics.StartAPIRequestAndTimeGRPC("ListPartiesProfiles")() + + pagination, err := entities.CursorPaginationFromProto(req.Pagination) + if err != nil { + return nil, formatE(ErrInvalidPagination, err) + } + + parties, pageInfo, err := t.partyService.ListProfiles(ctx, req.Parties, pagination) + if err != nil { + return nil, formatE(ErrPartyServiceListProfiles, err) + } + + edges, err := makeEdges[*v2.PartyProfileEdge](parties) + if err != nil { + return nil, formatE(err) + } + + connection := &v2.PartiesProfilesConnection{ + Edges: edges, + PageInfo: pageInfo.ToProto(), + } + + return &v2.ListPartiesProfilesResponse{ + Profiles: connection, + }, nil +} + // ListMarginLevels lists MarginLevels. func (t *TradingDataServiceV2) ListMarginLevels(ctx context.Context, req *v2.ListMarginLevelsRequest) (*v2.ListMarginLevelsResponse, error) { defer metrics.StartAPIRequestAndTimeGRPC("ListMarginLevelsV2")() @@ -1616,7 +1660,7 @@ func (t *TradingDataServiceV2) ListRewards(ctx context.Context, req *v2.ListRewa return nil, formatE(ErrInvalidPagination, err) } - rewards, pageInfo, err := t.rewardService.GetByCursor(ctx, &req.PartyId, req.AssetId, req.FromEpoch, req.ToEpoch, pagination) + rewards, pageInfo, err := t.rewardService.GetByCursor(ctx, &req.PartyId, req.AssetId, req.FromEpoch, req.ToEpoch, pagination, req.TeamId, req.GameId) if err != nil { return nil, formatE(ErrGetRewards, err) } @@ -1827,7 +1871,7 @@ func (t *TradingDataServiceV2) GetAsset(ctx context.Context, req *v2.GetAssetReq return nil, formatE(ErrInvalidAssetID) } - asset, err := t.assetService.GetByID(ctx, req.AssetId) + asset, err := t.AssetService.GetByID(ctx, req.AssetId) if err != nil { return nil, formatE(ErrAssetServiceGetByID, err) } @@ -1857,7 +1901,7 @@ func (t *TradingDataServiceV2) ListAssets(ctx context.Context, req *v2.ListAsset } func (t *TradingDataServiceV2) getSingleAsset(ctx context.Context, assetID string) (*v2.ListAssetsResponse, error) { - asset, err := t.assetService.GetByID(ctx, assetID) + asset, err := t.AssetService.GetByID(ctx, assetID) if err != nil { return nil, errors.Wrapf(err, "failed to get asset by ID: %s", assetID) } @@ -1888,7 +1932,7 @@ func (t *TradingDataServiceV2) getAllAssets(ctx context.Context, p *v2.Paginatio return nil, errors.Wrap(ErrInvalidPagination, err.Error()) } - assets, pageInfo, err := t.assetService.GetAllWithCursorPagination(ctx, pagination) + assets, pageInfo, err := t.AssetService.GetAllWithCursorPagination(ctx, pagination) if err != nil { return nil, errors.Wrap(ErrAssetServiceGetAll, err.Error()) } @@ -2297,6 +2341,10 @@ func (t *TradingDataServiceV2) ListGovernanceData(ctx context.Context, req *v2.L if err != nil { return nil, formatE(ErrGovernanceServiceGetVotes, errors.Wrapf(err, "proposalID: %s", proposalID)) } + + if len(edges[i].Node.Proposals) > 0 { + edges[i].Node.ProposalType = vega.GovernanceData_TYPE_BATCH + } } proposalsConnection := &v2.GovernanceDataConnection{ @@ -2378,8 +2426,10 @@ func (t *TradingDataServiceV2) GetTransfer(ctx context.Context, req *v2.GetTrans fees = append(fees, f.ToProto()) } return &v2.GetTransferResponse{ - Transfer: tp, - Fees: fees, + TransferNode: &v2.TransferNode{ + Transfer: tp, + Fees: fees, + }, }, nil } @@ -2400,11 +2450,23 @@ func (t *TradingDataServiceV2) ListTransfers(ctx context.Context, req *v2.ListTr if req.IsReward != nil { isReward = *req.IsReward } + + filters := sqlstore.ListTransfersFilters{ + FromEpoch: req.FromEpoch, + ToEpoch: req.ToEpoch, + } + if req.Status != nil { + filters.Status = ptr.From(entities.TransferStatus(*req.Status)) + } + if req.Scope != nil { + filters.Scope = ptr.From(entities.TransferScope(*req.Scope)) + } + if req.Pubkey == nil { if !isReward { - transfers, pageInfo, err = t.transfersService.GetAll(ctx, pagination) + transfers, pageInfo, err = t.transfersService.GetAll(ctx, pagination, filters) } else { - transfers, pageInfo, err = t.transfersService.GetAllRewards(ctx, pagination) + transfers, pageInfo, err = t.transfersService.GetAllRewards(ctx, pagination, filters) } } else { if isReward && req.Direction != v2.TransferDirection_TRANSFER_DIRECTION_TRANSFER_FROM { @@ -2414,14 +2476,14 @@ func (t *TradingDataServiceV2) ListTransfers(ctx context.Context, req *v2.ListTr switch req.Direction { case v2.TransferDirection_TRANSFER_DIRECTION_TRANSFER_FROM: if isReward { - transfers, pageInfo, err = t.transfersService.GetRewardTransfersFromParty(ctx, entities.PartyID(*req.Pubkey), pagination) + transfers, pageInfo, err = t.transfersService.GetRewardTransfersFromParty(ctx, pagination, filters, entities.PartyID(*req.Pubkey)) } else { - transfers, pageInfo, err = t.transfersService.GetTransfersFromParty(ctx, entities.PartyID(*req.Pubkey), pagination) + transfers, pageInfo, err = t.transfersService.GetTransfersFromParty(ctx, pagination, filters, entities.PartyID(*req.Pubkey)) } case v2.TransferDirection_TRANSFER_DIRECTION_TRANSFER_TO: - transfers, pageInfo, err = t.transfersService.GetTransfersToParty(ctx, entities.PartyID(*req.Pubkey), pagination) + transfers, pageInfo, err = t.transfersService.GetTransfersToParty(ctx, pagination, filters, entities.PartyID(*req.Pubkey)) case v2.TransferDirection_TRANSFER_DIRECTION_TRANSFER_TO_OR_FROM: - transfers, pageInfo, err = t.transfersService.GetTransfersToOrFromParty(ctx, entities.PartyID(*req.Pubkey), pagination) + transfers, pageInfo, err = t.transfersService.GetTransfersToOrFromParty(ctx, pagination, filters, entities.PartyID(*req.Pubkey)) default: err = errors.Errorf("unknown transfer direction: %v", req.Direction) } @@ -2692,7 +2754,7 @@ func (t *TradingDataServiceV2) ListDelegations(ctx context.Context, req *v2.List } func (t *TradingDataServiceV2) marketExistsForID(ctx context.Context, marketID string) bool { - _, err := t.marketsService.GetByID(ctx, marketID) + _, err := t.MarketsService.GetByID(ctx, marketID) return err == nil } @@ -2946,7 +3008,7 @@ func (t *TradingDataServiceV2) getMarketPriceFactor( return nil, errors.Wrap(err, "getting asset from market") } - asset, err := t.assetService.GetByID(ctx, assetID) + asset, err := t.AssetService.GetByID(ctx, assetID) if err != nil { return nil, errors.Wrapf(ErrAssetServiceGetByID, "assetID: %s", assetID) } @@ -2965,7 +3027,7 @@ func (t *TradingDataServiceV2) estimateFee( market, priceS string, size uint64, ) (*vega.Fee, error) { - mkt, err := t.marketService.GetByID(ctx, market) + mkt, err := t.MarketsService.GetByID(ctx, market) if err != nil { return nil, err } @@ -3042,17 +3104,17 @@ func (t *TradingDataServiceV2) estimateMargin( } // first get the risk factors and market data (marketdata->markprice) - rf, err := t.riskFactorService.GetMarketRiskFactors(ctx, rMarket) + rf, err := t.RiskFactorService.GetMarketRiskFactors(ctx, rMarket) if err != nil { return nil, err } - mkt, err := t.marketService.GetByID(ctx, rMarket) + mkt, err := t.MarketsService.GetByID(ctx, rMarket) if err != nil { return nil, err } - mktData, err := t.marketDataService.GetMarketDataByID(ctx, rMarket) + mktData, err := t.MarketDataService.GetMarketDataByID(ctx, rMarket) if err != nil { return nil, err } @@ -3110,11 +3172,11 @@ func (t *TradingDataServiceV2) estimateMargin( maintenanceMargin := num.DecimalFromFloat(float64(rSize)). Mul(f).Mul(priceD).Div(mdpd) - return implyMarginLevels(maintenanceMargin, mkt.TradableInstrument.MarginCalculator.ScalingFactors, rParty, rMarket, asset), nil + return implyMarginLevels(maintenanceMargin, num.DecimalZero(), num.DecimalZero(), mkt.TradableInstrument.MarginCalculator.ScalingFactors, rParty, rMarket, asset, false), nil } -func implyMarginLevels(maintenanceMargin num.Decimal, scalingFactors *vega.ScalingFactors, partyId, marketId, asset string) *vega.MarginLevels { - return &vega.MarginLevels{ +func implyMarginLevels(maintenanceMargin, orderMargin, marginFactor num.Decimal, scalingFactors *vega.ScalingFactors, partyId, marketId, asset string, isolatedMarginMode bool) *vega.MarginLevels { + marginLevels := &vega.MarginLevels{ PartyId: partyId, MarketId: marketId, Asset: asset, @@ -3123,7 +3185,16 @@ func implyMarginLevels(maintenanceMargin num.Decimal, scalingFactors *vega.Scali SearchLevel: maintenanceMargin.Mul(num.DecimalFromFloat(scalingFactors.SearchLevel)).Round(0).String(), InitialMargin: maintenanceMargin.Mul(num.DecimalFromFloat(scalingFactors.InitialMargin)).Round(0).String(), CollateralReleaseLevel: maintenanceMargin.Mul(num.DecimalFromFloat(scalingFactors.CollateralRelease)).Round(0).String(), + MarginMode: types.MarginModeCrossMargin, + } + if isolatedMarginMode { + marginLevels.OrderMargin = orderMargin.Round(0).String() + marginLevels.SearchLevel = "0" + marginLevels.CollateralReleaseLevel = "0" + marginLevels.MarginMode = types.MarginModeIsolatedMargin + marginLevels.MarginFactor = marginFactor.String() } + return marginLevels } func (t *TradingDataServiceV2) EstimatePosition(ctx context.Context, req *v2.EstimatePositionRequest) (*v2.EstimatePositionResponse, error) { @@ -3133,18 +3204,38 @@ func (t *TradingDataServiceV2) EstimatePosition(ctx context.Context, req *v2.Est return nil, ErrEmptyMissingMarketID } - var collateralAvailable num.Decimal - if req.CollateralAvailable != nil && len(*req.CollateralAvailable) > 0 { - var err error - collateralAvailable, err = num.DecimalFromString(*req.CollateralAvailable) + marginAccountBalance, err := num.DecimalFromString(req.MarginAccountBalance) + if err != nil { + return nil, formatE(ErrPositionsInvalidAccountBalance, err) + } + orderAccountBalance, err := num.DecimalFromString(req.OrderMarginAccountBalance) + if err != nil { + return nil, formatE(ErrPositionsInvalidAccountBalance, err) + } + mkt, err := t.MarketsService.GetByID(ctx, req.MarketId) + if err != nil { + return nil, formatE(ErrMarketServiceGetByID, err) + } + collateralAvailable := marginAccountBalance + crossMarginMode := req.MarginMode == types.MarginModeCrossMargin + if crossMarginMode { + generalAccountBalance, err := num.DecimalFromString(req.GeneralAccountBalance) if err != nil { - return nil, formatE(ErrPositionsInvalidCollateralAmount, err) + return nil, formatE(ErrPositionsInvalidAccountBalance, err) } + collateralAvailable = collateralAvailable.Add(generalAccountBalance).Add(orderAccountBalance) } - mkt, err := t.marketService.GetByID(ctx, req.MarketId) - if err != nil { - return nil, formatE(ErrMarketServiceGetByID, err) + dMarginFactor := num.DecimalZero() + isolatedMarginMode := req.MarginMode == types.MarginModeIsolatedMargin + if isolatedMarginMode { + if req.MarginFactor == nil { + return nil, formatE(ErrMissingMarginFactor, errors.New("margin factor are required with isolated margin")) + } + dMarginFactor, err = num.DecimalFromString(*req.MarginFactor) + if err != nil { + return nil, formatE(ErrMissingMarginFactor, err) + } } priceFactor, err := t.getMarketPriceFactor(ctx, mkt) @@ -3175,20 +3266,20 @@ func (t *TradingDataServiceV2) EstimatePosition(ctx context.Context, req *v2.Est switch o.Side { case types.SideBuy: - buyOrders = append(buyOrders, &risk.OrderInfo{Size: o.Remaining, Price: price, IsMarketOrder: o.IsMarketOrder}) + buyOrders = append(buyOrders, &risk.OrderInfo{TrueRemaining: o.Remaining, Price: price, IsMarketOrder: o.IsMarketOrder}) case types.SideSell: - sellOrders = append(sellOrders, &risk.OrderInfo{Size: o.Remaining, Price: price, IsMarketOrder: o.IsMarketOrder}) + sellOrders = append(sellOrders, &risk.OrderInfo{TrueRemaining: o.Remaining, Price: price, IsMarketOrder: o.IsMarketOrder}) default: return nil, ErrInvalidOrderSide } } - rf, err := t.riskFactorService.GetMarketRiskFactors(ctx, req.MarketId) + rf, err := t.RiskFactorService.GetMarketRiskFactors(ctx, req.MarketId) if err != nil { return nil, formatE(ErrRiskFactorServiceGet, err) } - mktData, err := t.marketDataService.GetMarketDataByID(ctx, req.MarketId) + mktData, err := t.MarketDataService.GetMarketDataByID(ctx, req.MarketId) if err != nil { return nil, formatE(ErrMarketServiceGetMarketData, err) } @@ -3200,15 +3291,14 @@ func (t *TradingDataServiceV2) EstimatePosition(ctx context.Context, req *v2.Est return nil, formatE(err) } - marketObservable := mktData.MarkPrice + marketObservable := t.scaleDecimalFromMarketToAssetPrice(mktData.MarkPrice, dPriceFactor) + auctionPrice := t.scaleDecimalFromMarketToAssetPrice(mktData.IndicativePrice, dPriceFactor) auction := mktData.AuctionEnd > 0 if auction && mktData.MarketTradingMode == types.MarketTradingModeOpeningAuction.String() { - marketObservable = mktData.IndicativePrice + marketObservable = auctionPrice } - marketObservable = t.scaleDecimalFromMarketToAssetPrice(marketObservable, dPriceFactor) - positionFactor := num.DecimalFromFloat(10). Pow(num.DecimalFromInt64(int64(mkt.PositionDecimalPlaces))) @@ -3221,6 +3311,13 @@ func (t *TradingDataServiceV2) EstimatePosition(ctx context.Context, req *v2.Est return nil, formatE(fmt.Errorf("can't parse quadratic slippage factor: %s", mktProto.QuadraticSlippageFactor), err) } + avgEntryPrice, err := num.DecimalFromString(req.AverageEntryPrice) + if err != nil { + return nil, formatE(fmt.Errorf("can't parse average entry price: %s", req.AverageEntryPrice), err) + } + + avgEntryPrice = t.scaleDecimalFromMarketToAssetPrice(avgEntryPrice, dPriceFactor) + marginFactorScaledFundingPaymentPerUnitPosition := num.DecimalZero() if perp := mktProto.TradableInstrument.Instrument.GetPerpetual(); perp != nil { @@ -3234,17 +3331,18 @@ func (t *TradingDataServiceV2) EstimatePosition(ctx context.Context, req *v2.Est if err != nil { return nil, formatE(fmt.Errorf("can't parse funding payment from perpetual product data: %s", perpData.FundingPayment), err) } - if !fundingPayment.IsZero() { + fundingRate, err := num.DecimalFromString(perpData.FundingRate) + if err != nil { + return nil, formatE(fmt.Errorf("can't parse funding rate from perpetual product data: %s", perpData.FundingRate), err) + } + if !fundingPayment.IsZero() && !fundingRate.IsZero() { marginFactorScaledFundingPaymentPerUnitPosition = factor.Mul(fundingPayment) } } } } - marginFactorScaledFundingPaymentPerUnitPosition = t.scaleDecimalFromMarketToAssetPrice(marginFactorScaledFundingPaymentPerUnitPosition, dPriceFactor) - - marginEstimate := t.computeMarginRange( - req.MarketId, + wMaintenance, bMaintenance, orderMargin := t.computeMarginRange( req.OpenVolume, buyOrders, sellOrders, @@ -3255,69 +3353,122 @@ func (t *TradingDataServiceV2) EstimatePosition(ctx context.Context, req *v2.Est rf, marginFactorScaledFundingPaymentPerUnitPosition, auction, - asset, - mkt.TradableInstrument.MarginCalculator.ScalingFactors, + req.MarginMode, + dMarginFactor, + auctionPrice, ) - var liquidationEstimate *v2.LiquidationEstimate - if req.CollateralAvailable != nil && len(*req.CollateralAvailable) > 0 { - bPositionOnly, bWithBuy, bWithSell, err := risk.CalculateLiquidationPriceWithSlippageFactors(req.OpenVolume, buyOrders, sellOrders, marketObservable, collateralAvailable, positionFactor, num.DecimalZero(), num.DecimalZero(), rf.Long, rf.Short, marginFactorScaledFundingPaymentPerUnitPosition) + marginEstimate := &v2.MarginEstimate{ + WorstCase: implyMarginLevels(wMaintenance, orderMargin, dMarginFactor, mkt.TradableInstrument.MarginCalculator.ScalingFactors, "", req.MarketId, asset, isolatedMarginMode), + BestCase: implyMarginLevels(bMaintenance, orderMargin, dMarginFactor, mkt.TradableInstrument.MarginCalculator.ScalingFactors, "", req.MarketId, asset, isolatedMarginMode), + } + + var wMarginDelta, bMarginDelta, posMarginDelta num.Decimal + combinedMargin := marginAccountBalance.Add(orderAccountBalance) + if isolatedMarginMode { + requiredPositionMargin, requiredOrderMargin := risk.CalculateRequiredMarginInIsolatedMode(req.OpenVolume, avgEntryPrice, marketObservable, buyOrders, sellOrders, positionFactor, dMarginFactor) + posMarginDelta = num.MaxD(num.DecimalZero(), requiredPositionMargin.Sub(marginAccountBalance)) + wMarginDelta = num.MaxD(num.DecimalZero(), requiredPositionMargin.Add(requiredOrderMargin).Sub(combinedMargin)) + bMarginDelta = wMarginDelta + } else { + worstInitial, _ := num.DecimalFromString(marginEstimate.WorstCase.InitialMargin) + bestInitial, _ := num.DecimalFromString(marginEstimate.BestCase.InitialMargin) + wMarginDelta = num.MaxD(num.DecimalZero(), worstInitial.Sub(combinedMargin)) + bMarginDelta = num.MaxD(num.DecimalZero(), bestInitial.Sub(combinedMargin)) + } + + if isolatedMarginMode && ptr.UnBox(req.IncludeRequiredPositionMarginInAvailableCollateral) { + collateralAvailable = collateralAvailable.Add(posMarginDelta) + } + + bPositionOnly, bWithBuy, bWithSell := marketObservable, marketObservable, marketObservable + wPositionOnly, wWithBuy, wWithSell := marketObservable, marketObservable, marketObservable + + // only calculate liquidation price if collateral available is above maintenance margin, otherwise return current market observable to signify that the theoretical position would be liquidated instantenously + if collateralAvailable.GreaterThanOrEqual(bMaintenance) { + bPositionOnly, bWithBuy, bWithSell, err = risk.CalculateLiquidationPriceWithSlippageFactors(req.OpenVolume, buyOrders, sellOrders, marketObservable, collateralAvailable, positionFactor, num.DecimalZero(), num.DecimalZero(), rf.Long, rf.Short, marginFactorScaledFundingPaymentPerUnitPosition, isolatedMarginMode, dMarginFactor) if err != nil { return nil, err } - - wPositionOnly, wWithBuy, wWithSell, err := risk.CalculateLiquidationPriceWithSlippageFactors(req.OpenVolume, buyOrders, sellOrders, marketObservable, collateralAvailable, positionFactor, linearSlippageFactor, quadraticSlippageFactor, rf.Long, rf.Short, marginFactorScaledFundingPaymentPerUnitPosition) + } + if collateralAvailable.GreaterThanOrEqual(wMaintenance) { + wPositionOnly, wWithBuy, wWithSell, err = risk.CalculateLiquidationPriceWithSlippageFactors(req.OpenVolume, buyOrders, sellOrders, marketObservable, collateralAvailable, positionFactor, linearSlippageFactor, quadraticSlippageFactor, rf.Long, rf.Short, marginFactorScaledFundingPaymentPerUnitPosition, isolatedMarginMode, dMarginFactor) if err != nil { return nil, err } + } - if req.ScaleLiquidationPriceToMarketDecimals != nil && *req.ScaleLiquidationPriceToMarketDecimals { - bPositionOnly = t.scaleDecimalFromAssetToMarketPrice(bPositionOnly, dPriceFactor) - bWithBuy = t.scaleDecimalFromAssetToMarketPrice(bWithBuy, dPriceFactor) - bWithSell = t.scaleDecimalFromAssetToMarketPrice(bWithSell, dPriceFactor) - wPositionOnly = t.scaleDecimalFromAssetToMarketPrice(wPositionOnly, dPriceFactor) - wWithBuy = t.scaleDecimalFromAssetToMarketPrice(wWithBuy, dPriceFactor) - wWithSell = t.scaleDecimalFromAssetToMarketPrice(wWithSell, dPriceFactor) - } + if ptr.UnBox(req.ScaleLiquidationPriceToMarketDecimals) { + bPositionOnly = t.scaleDecimalFromAssetToMarketPrice(bPositionOnly, dPriceFactor) + bWithBuy = t.scaleDecimalFromAssetToMarketPrice(bWithBuy, dPriceFactor) + bWithSell = t.scaleDecimalFromAssetToMarketPrice(bWithSell, dPriceFactor) + wPositionOnly = t.scaleDecimalFromAssetToMarketPrice(wPositionOnly, dPriceFactor) + wWithBuy = t.scaleDecimalFromAssetToMarketPrice(wWithBuy, dPriceFactor) + wWithSell = t.scaleDecimalFromAssetToMarketPrice(wWithSell, dPriceFactor) + } - liquidationEstimate = &v2.LiquidationEstimate{ - WorstCase: &v2.LiquidationPrice{ - OpenVolumeOnly: wPositionOnly.Round(0).String(), - IncludingBuyOrders: wWithBuy.Round(0).String(), - IncludingSellOrders: wWithSell.Round(0).String(), - }, - BestCase: &v2.LiquidationPrice{ - OpenVolumeOnly: bPositionOnly.Round(0).String(), - IncludingBuyOrders: bWithBuy.Round(0).String(), - IncludingSellOrders: bWithSell.Round(0).String(), - }, - } + liquidationEstimate := &v2.LiquidationEstimate{ + WorstCase: &v2.LiquidationPrice{ + OpenVolumeOnly: wPositionOnly.Round(0).String(), + IncludingBuyOrders: wWithBuy.Round(0).String(), + IncludingSellOrders: wWithSell.Round(0).String(), + }, + BestCase: &v2.LiquidationPrice{ + OpenVolumeOnly: bPositionOnly.Round(0).String(), + IncludingBuyOrders: bWithBuy.Round(0).String(), + IncludingSellOrders: bWithSell.Round(0).String(), + }, } return &v2.EstimatePositionResponse{ - Margin: marginEstimate, + Margin: marginEstimate, + CollateralIncreaseEstimate: &v2.CollateralIncreaseEstimate{ + WorstCase: wMarginDelta.Round(0).String(), + BestCase: bMarginDelta.Round(0).String(), + }, Liquidation: liquidationEstimate, }, nil } func (t *TradingDataServiceV2) computeMarginRange( - market string, openVolume int64, buyOrders, sellOrders []*risk.OrderInfo, marketObservable, positionFactor, linearSlippageFactor, quadraticSlippageFactor num.Decimal, riskFactors entities.RiskFactor, fundingPaymentPerUnitPosition num.Decimal, auction bool, - asset string, - scalingFactors *vega.ScalingFactors, -) *v2.MarginEstimate { - worst := risk.CalculateMaintenanceMarginWithSlippageFactors(openVolume, buyOrders, sellOrders, marketObservable, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactors.Long, riskFactors.Short, fundingPaymentPerUnitPosition, auction) - best := risk.CalculateMaintenanceMarginWithSlippageFactors(openVolume, buyOrders, sellOrders, marketObservable, positionFactor, num.DecimalZero(), num.DecimalZero(), riskFactors.Long, riskFactors.Short, fundingPaymentPerUnitPosition, auction) - - return &v2.MarginEstimate{ - WorstCase: implyMarginLevels(worst, scalingFactors, "", market, asset), - BestCase: implyMarginLevels(best, scalingFactors, "", market, asset), + marginMode vega.MarginMode, + marginFactor, auctionPrice num.Decimal, +) (num.Decimal, num.Decimal, num.Decimal) { + bOrders, sOrders := buyOrders, sellOrders + orderMargin := num.DecimalZero() + isolatedMarginMode := marginMode == vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN + if isolatedMarginMode { + bOrders = []*risk.OrderInfo{} + bNonMarketOrders := []*risk.OrderInfo{} + for _, o := range buyOrders { + if o.IsMarketOrder { + bOrders = append(bOrders, o) + } else { + bNonMarketOrders = append(bNonMarketOrders, o) + } + } + sOrders = []*risk.OrderInfo{} + sNonMarketOrders := []*risk.OrderInfo{} + for _, o := range sellOrders { + if o.IsMarketOrder { + sOrders = append(sOrders, o) + } else { + sNonMarketOrders = append(sNonMarketOrders, o) + } + } + orderMargin = risk.CalcOrderMarginIsolatedMode(openVolume, bNonMarketOrders, sNonMarketOrders, positionFactor, marginFactor, auctionPrice) } + + worst := risk.CalculateMaintenanceMarginWithSlippageFactors(openVolume, bOrders, sOrders, marketObservable, positionFactor, linearSlippageFactor, quadraticSlippageFactor, riskFactors.Long, riskFactors.Short, fundingPaymentPerUnitPosition, auction) + best := risk.CalculateMaintenanceMarginWithSlippageFactors(openVolume, bOrders, sOrders, marketObservable, positionFactor, num.DecimalZero(), num.DecimalZero(), riskFactors.Long, riskFactors.Short, fundingPaymentPerUnitPosition, auction) + + return worst, best, orderMargin } // ListNetworkParameters returns a list of network parameters. @@ -3446,7 +3597,7 @@ func (t *TradingDataServiceV2) GetRiskFactors(ctx context.Context, req *v2.GetRi return nil, formatE(ErrInvalidMarketID) } - rfs, err := t.riskFactorService.GetMarketRiskFactors(ctx, req.MarketId) + rfs, err := t.RiskFactorService.GetMarketRiskFactors(ctx, req.MarketId) if err != nil { return nil, formatE(ErrRiskFactorServiceGet, errors.Wrapf(err, "marketID: %s", req.MarketId)) } @@ -3488,10 +3639,24 @@ func (t *TradingDataServiceV2) proposalToGovernanceData(ctx context.Context, pro return nil, errors.Wrap(err, "getting no votes for proposal") } + var subProposals []*vega.Proposal + if proposal.IsBatch() { + for _, p := range proposal.Proposals { + subProposals = append(subProposals, p.ToProto()) + } + } + + proposalType := vega.GovernanceData_TYPE_SINGLE_OR_UNSPECIFIED + if proposal.IsBatch() { + proposalType = vega.GovernanceData_TYPE_BATCH + } + return &vega.GovernanceData{ - Proposal: proposal.ToProto(), - Yes: voteListToProto(yesVotes), - No: voteListToProto(noVotes), + Proposal: proposal.ToProto(), + Yes: voteListToProto(yesVotes), + No: voteListToProto(noVotes), + ProposalType: proposalType, + Proposals: subProposals, }, nil } @@ -4029,7 +4194,7 @@ func (t *TradingDataServiceV2) ListEntities(ctx context.Context, req *v2.ListEnt t.oracleDataService.GetByTxHash, ErrOracleDataGetByTxHash) markets := queryProtoEntities[*vega.Market](ctx, eg, txHash, - t.marketService.GetByTxHash, ErrMarketServiceGetByTxHash) + t.MarketsService.GetByTxHash, ErrMarketServiceGetByTxHash) parties := queryProtoEntities[*vega.Party](ctx, eg, txHash, t.partyService.GetByTxHash, ErrPartyServiceGetByTxHash) @@ -4044,7 +4209,7 @@ func (t *TradingDataServiceV2) ListEntities(ctx context.Context, req *v2.ListEnt t.withdrawalService.GetByTxHash, ErrWithdrawalsGetByTxHash) assets := queryProtoEntities[*vega.Asset](ctx, eg, txHash, - t.assetService.GetByTxHash, ErrAssetsGetByTxHash) + t.AssetService.GetByTxHash, ErrAssetsGetByTxHash) lps := queryProtoEntities[*vega.LiquidityProvision](ctx, eg, txHash, t.liquidityProvisionService.GetByTxHash, ErrLiquidityProvisionGetByTxHash) @@ -4541,18 +4706,16 @@ func listTeam(ctx context.Context, teamsService *service.Teams, teamID entities. return nil, formatE(err) } - connection := &v2.TeamConnection{ - Edges: edges, - PageInfo: &v2.PageInfo{ - HasNextPage: false, - HasPreviousPage: false, - StartCursor: team.Cursor().Encode(), - EndCursor: team.Cursor().Encode(), - }, - } - return &v2.ListTeamsResponse{ - Teams: connection, + Teams: &v2.TeamConnection{ + Edges: edges, + PageInfo: &v2.PageInfo{ + HasNextPage: false, + HasPreviousPage: false, + StartCursor: team.Cursor().Encode(), + EndCursor: team.Cursor().Encode(), + }, + }, }, nil } @@ -4575,6 +4738,81 @@ func listTeams(ctx context.Context, teamsService *service.Teams, pagination enti }, nil } +func (t *TradingDataServiceV2) ListTeamsStatistics(ctx context.Context, req *v2.ListTeamsStatisticsRequest) (*v2.ListTeamsStatisticsResponse, error) { + defer metrics.StartAPIRequestAndTimeGRPC("ListTeamsStatistics")() + + pagination, err := entities.CursorPaginationFromProto(req.Pagination) + if err != nil { + return nil, formatE(ErrInvalidPagination, err) + } + + filters := sqlstore.ListTeamsStatisticsFilters{ + AggregationEpochs: 10, + } + if req.TeamId != nil { + filters.TeamID = ptr.From(entities.TeamID(*req.TeamId)) + } + if req.AggregationEpochs != nil { + filters.AggregationEpochs = *req.AggregationEpochs + } + + stats, pageInfo, err := t.teamsService.ListTeamsStatistics(ctx, pagination, filters) + if err != nil { + return nil, formatE(ErrListTeamStatistics, err) + } + + edges, err := makeEdges[*v2.TeamStatisticsEdge](stats) + if err != nil { + return nil, formatE(err) + } + + return &v2.ListTeamsStatisticsResponse{ + Statistics: &v2.TeamsStatisticsConnection{ + Edges: edges, + PageInfo: pageInfo.ToProto(), + }, + }, nil +} + +func (t *TradingDataServiceV2) ListTeamMembersStatistics(ctx context.Context, req *v2.ListTeamMembersStatisticsRequest) (*v2.ListTeamMembersStatisticsResponse, error) { + defer metrics.StartAPIRequestAndTimeGRPC("ListTeamMembersStatistics")() + + pagination, err := entities.CursorPaginationFromProto(req.Pagination) + if err != nil { + return nil, formatE(ErrInvalidPagination, err) + } + + filters := sqlstore.ListTeamMembersStatisticsFilters{ + TeamID: entities.TeamID(req.TeamId), + AggregationEpochs: 10, + } + + if req.PartyId != nil { + filters.PartyID = ptr.From(entities.PartyID(*req.PartyId)) + } + + if req.AggregationEpochs != nil && *req.AggregationEpochs > 0 { + filters.AggregationEpochs = *req.AggregationEpochs + } + + stats, pageInfo, err := t.teamsService.ListTeamMembersStatistics(ctx, pagination, filters) + if err != nil { + return nil, formatE(ErrListTeamReferees, err) + } + + edges, err := makeEdges[*v2.TeamMemberStatisticsEdge](stats) + if err != nil { + return nil, formatE(err) + } + + return &v2.ListTeamMembersStatisticsResponse{ + Statistics: &v2.TeamMembersStatisticsConnection{ + Edges: edges, + PageInfo: pageInfo.ToProto(), + }, + }, nil +} + func (t *TradingDataServiceV2) ListTeamReferees(ctx context.Context, req *v2.ListTeamRefereesRequest) (*v2.ListTeamRefereesResponse, error) { defer metrics.StartAPIRequestAndTimeGRPC("ListTeamReferees")() pagination, err := entities.CursorPaginationFromProto(req.Pagination) @@ -4662,10 +4900,6 @@ func (t *TradingDataServiceV2) GetFeesStats(ctx context.Context, req *v2.GetFees } func (t *TradingDataServiceV2) GetFeesStatsForParty(ctx context.Context, req *v2.GetFeesStatsForPartyRequest) (*v2.GetFeesStatsForPartyResponse, error) { - if req.ToEpoch != nil && req.FromEpoch == nil { - return nil, formatE(ErrFeesStatsForPartyRequest) - } - var assetID *entities.AssetID if req.AssetId != nil { assetID = ptr.From(entities.AssetID(*req.AssetId)) @@ -4732,3 +4966,173 @@ func (t *TradingDataServiceV2) GetVolumeDiscountStats(ctx context.Context, req * }, }, nil } + +// ObserveTransactionResults opens a subscription to the transaction results. +func (t *TradingDataServiceV2) ObserveTransactionResults(req *v2.ObserveTransactionResultsRequest, srv v2.TradingDataService_ObserveTransactionResultsServer) error { + // Wrap context from the request into cancellable. We can close internal chan on error. + ctx, cancel := context.WithCancel(srv.Context()) + defer cancel() + + tradesChan, ref := t.transactionResults.Observe(ctx, t.config.StreamRetries, req.PartyIds, req.Hashes, req.Status) + + if t.log.GetLevel() == logging.DebugLevel { + t.log.Debug("Transaction results subscriber - new rpc stream", logging.Uint64("ref", ref)) + } + + return observeBatch(ctx, t.log, "TransactionResults", tradesChan, ref, func(results []events.TransactionResult) error { + protos := make([]*eventspb.TransactionResult, 0, len(results)) + for _, v := range results { + p := v.Proto() + protos = append(protos, &p) + } + + batches := batch(protos, snapshotPageSize) + + for _, batch := range batches { + response := &v2.ObserveTransactionResultsResponse{TransactionResults: batch} + if err := srv.Send(response); err != nil { + return errors.Wrap(err, "sending transaction results") + } + } + return nil + }) +} + +func (t *TradingDataServiceV2) EstimateTransferFee(ctx context.Context, req *v2.EstimateTransferFeeRequest) ( + *v2.EstimateTransferFeeResponse, error, +) { + defer metrics.StartAPIRequestAndTimeGRPC("EstimateTransferFee")() + + amount, overflow := num.UintFromString(req.Amount, 10) + if overflow || amount.IsNegative() { + return nil, formatE(ErrInvalidTransferAmount) + } + + transferFeeMaxQuantumAmountParam, err := t.networkParameterService.GetByKey(ctx, netparams.TransferFeeMaxQuantumAmount) + if err != nil { + return nil, formatE(ErrGetNetworkParameters, errors.Wrapf(err, "key: %s", netparams.TransferFeeMaxQuantumAmount)) + } + + transferFeeMaxQuantumAmount, _ := num.DecimalFromString(transferFeeMaxQuantumAmountParam.Value) + + transferFeeFactorParam, err := t.networkParameterService.GetByKey(ctx, netparams.TransferFeeFactor) + if err != nil { + return nil, formatE(ErrGetNetworkParameters, errors.Wrapf(err, "key: %s", netparams.TransferFeeFactor)) + } + + transferFeeFactor, _ := num.DecimalFromString(transferFeeFactorParam.Value) + + asset, err := t.AssetService.GetByID(ctx, req.AssetId) + if err != nil { + return nil, formatE(ErrAssetServiceGetByID, err) + } + + // if we can't get a transfer fee discount, the discount should just be 0, i.e. no discount available + transferFeesDiscount, err := t.transfersService.GetCurrentTransferFeeDiscount( + ctx, + entities.PartyID(req.FromAccount), + entities.AssetID(req.AssetId), + ) + if err != nil { + transferFeesDiscount = &entities.TransferFeesDiscount{ + Amount: decimal.Zero, + } + } + + accumulatedDiscount, _ := num.UintFromDecimal(transferFeesDiscount.Amount) + + fee, discount := banking.EstimateFee( + asset.Quantum, + transferFeeMaxQuantumAmount, + transferFeeFactor, + amount, + accumulatedDiscount, + req.FromAccount, + req.FromAccountType, + req.ToAccount, + ) + + return &v2.EstimateTransferFeeResponse{ + Fee: fee.String(), + Discount: discount.String(), + }, nil +} + +func (t *TradingDataServiceV2) GetTotalTransferFeeDiscount(ctx context.Context, req *v2.GetTotalTransferFeeDiscountRequest) ( + *v2.GetTotalTransferFeeDiscountResponse, error, +) { + defer metrics.StartAPIRequestAndTimeGRPC("GetTotalTransferFeeDiscount")() + + transferFeesDiscount, err := t.transfersService.GetCurrentTransferFeeDiscount( + ctx, + entities.PartyID(req.PartyId), + entities.AssetID(req.AssetId), + ) + if err != nil { + return nil, formatE(ErrTransferServiceGetFeeDiscount, err) + } + + accumulatedDiscount, _ := num.UintFromDecimal(transferFeesDiscount.Amount) + return &v2.GetTotalTransferFeeDiscountResponse{ + TotalDiscount: accumulatedDiscount.String(), + }, nil +} + +func (t *TradingDataServiceV2) ListGames(ctx context.Context, req *v2.ListGamesRequest) (*v2.ListGamesResponse, error) { + defer metrics.StartAPIRequestAndTimeGRPC("ListGames")() + + pagination, err := entities.CursorPaginationFromProto(req.Pagination) + if err != nil { + return nil, formatE(ErrInvalidPagination, err) + } + + games, pageInfo, err := t.gamesService.ListGames(ctx, req.GameId, req.EntityScope, req.EpochFrom, req.EpochTo, pagination) + if err != nil { + return nil, formatE(ErrListGames, err) + } + + edges, err := makeEdges[*v2.GameEdge](games) + if err != nil { + return nil, formatE(err) + } + return &v2.ListGamesResponse{ + Games: &v2.GamesConnection{ + Edges: edges, + PageInfo: pageInfo.ToProto(), + }, + }, nil +} + +func (t *TradingDataServiceV2) ListPartyMarginModes(ctx context.Context, req *v2.ListPartyMarginModesRequest) (*v2.ListPartyMarginModesResponse, error) { + defer metrics.StartAPIRequestAndTimeGRPC("ListPartyMarginModes")() + + pagination, err := entities.CursorPaginationFromProto(req.Pagination) + if err != nil { + return nil, formatE(ErrInvalidPagination, err) + } + + filters := sqlstore.ListPartyMarginModesFilters{} + if req.MarketId != nil { + filters.MarketID = ptr.From(entities.MarketID(*req.MarketId)) + } + if req.PartyId != nil { + filters.PartyID = ptr.From(entities.PartyID(*req.PartyId)) + } + + modes, pageInfo, err := t.marginModesService.ListPartyMarginModes(ctx, pagination, filters) + if err != nil { + return nil, formatE(ErrListPartyMarginModes, err) + } + + edges, err := makeEdges[*v2.PartyMarginModeEdge](modes) + if err != nil { + return nil, formatE(err) + } + + return &v2.ListPartyMarginModesResponse{ + PartyMarginModes: &v2.PartyMarginModesConnection{ + Edges: edges, + PageInfo: pageInfo.ToProto(), + }, + }, nil +} diff --git a/datanode/api/trading_data_v2_test.go b/datanode/api/trading_data_v2_test.go index 4bb125cdf1..91de618e5e 100644 --- a/datanode/api/trading_data_v2_test.go +++ b/datanode/api/trading_data_v2_test.go @@ -20,14 +20,21 @@ import ( "bytes" "context" "embed" + "fmt" "io" + "math" + "strconv" "strings" "testing" "code.vegaprotocol.io/vega/datanode/api" "code.vegaprotocol.io/vega/datanode/api/mocks" + "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/networkhistory/segment" + "code.vegaprotocol.io/vega/libs/num" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "code.vegaprotocol.io/vega/protos/vega" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -110,6 +117,663 @@ func TestExportNetworkHistory(t *testing.T) { }) } +func TestEstimatePosition(t *testing.T) { + ctrl := gomock.NewController(t) + ctx := context.TODO() + assetId := "assetID" + marketId := "marketID" + + assetDecimals := 8 + marketDecimals := 3 + positionDecimalPlaces := 2 + marginFundingFactor := 0.95 + initialMarginScalingFactor := 1.5 + linearSlippageFactor := num.DecimalFromFloat(0.005) + quadraticSlippageFactor := num.DecimalZero() + rfLong := num.DecimalFromFloat(0.1) + rfShort := num.DecimalFromFloat(0.2) + + markPrice := 123.456 * math.Pow10(marketDecimals) + auctionEnd := int64(0) + fundingPayment := 1234.56789 + + asset := entities.Asset{ + Decimals: assetDecimals, + } + + mkt := entities.Market{ + DecimalPlaces: marketDecimals, + PositionDecimalPlaces: positionDecimalPlaces, + LinearSlippageFactor: &linearSlippageFactor, + QuadraticSlippageFactor: &quadraticSlippageFactor, + TradableInstrument: entities.TradableInstrument{ + TradableInstrument: &vega.TradableInstrument{ + Instrument: &vega.Instrument{ + Product: &vega.Instrument_Perpetual{ + Perpetual: &vega.Perpetual{ + SettlementAsset: assetId, + MarginFundingFactor: fmt.Sprintf("%f", marginFundingFactor), + }, + }, + }, + MarginCalculator: &vega.MarginCalculator{ + ScalingFactors: &vega.ScalingFactors{ + SearchLevel: initialMarginScalingFactor * 0.9, + InitialMargin: initialMarginScalingFactor, + CollateralRelease: initialMarginScalingFactor * 1.1, + }, + }, + }, + }, + } + + rf := entities.RiskFactor{ + Long: rfLong, + Short: rfShort, + } + + assetService := mocks.NewMockAssetService(ctrl) + marketService := mocks.NewMockMarketsService(ctrl) + riskFactorService := mocks.NewMockRiskFactorService(ctrl) + + assetService.EXPECT().GetByID(ctx, assetId).Return(asset, nil).AnyTimes() + marketService.EXPECT().GetByID(ctx, marketId).Return(mkt, nil).AnyTimes() + riskFactorService.EXPECT().GetMarketRiskFactors(ctx, marketId).Return(rf, nil).AnyTimes() + + testCases := []struct { + markPrice float64 + openVolume int64 + avgEntryPrice float64 + orders []*v2.OrderInfo + marginAccountBalance float64 + generalAccountBalance float64 + orderMarginAccountBalance float64 + marginMode vega.MarginMode + marginFactor float64 + expectedCollIncBest string + expectedLiquidationBestVolumeOnly string + }{ + { + markPrice: markPrice, + openVolume: 0, + avgEntryPrice: 0, + orders: []*v2.OrderInfo{ + { + Side: entities.SideBuy, + Price: floatToStringWithDp(100, marketDecimals), + Remaining: uint64(1 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + }, + marginAccountBalance: 100 * math.Pow10(assetDecimals), + generalAccountBalance: 1000 * math.Pow10(assetDecimals), + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_CROSS_MARGIN, + }, + { + markPrice: markPrice, + openVolume: 0, + avgEntryPrice: 0, + orders: []*v2.OrderInfo{ + { + Side: entities.SideSell, + Price: floatToStringWithDp(100, marketDecimals), + Remaining: uint64(1 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + }, + marginAccountBalance: 100 * math.Pow10(assetDecimals), + generalAccountBalance: 1000 * math.Pow10(assetDecimals), + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + marginFactor: 0.1, + }, + { + markPrice: markPrice, + openVolume: int64(10 * math.Pow10(positionDecimalPlaces)), + avgEntryPrice: 111.1 * math.Pow10(marketDecimals), + orders: []*v2.OrderInfo{ + { + Side: entities.SideSell, + Price: floatToStringWithDp(100, marketDecimals), + Remaining: uint64(1 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + }, + marginAccountBalance: 0, + generalAccountBalance: 1000 * math.Pow10(assetDecimals), + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_CROSS_MARGIN, + }, + { + markPrice: markPrice, + openVolume: int64(-10 * math.Pow10(positionDecimalPlaces)), + avgEntryPrice: 111.1 * math.Pow10(marketDecimals), + orders: []*v2.OrderInfo{ + { + Side: entities.SideBuy, + Price: floatToStringWithDp(100, marketDecimals), + Remaining: uint64(1 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + }, + marginAccountBalance: 0, + generalAccountBalance: 1000 * math.Pow10(assetDecimals), + orderMarginAccountBalance: 10 * math.Pow10(assetDecimals), + marginMode: vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + marginFactor: 0.5, + }, + { + markPrice: markPrice, + openVolume: int64(-10 * math.Pow10(positionDecimalPlaces)), + avgEntryPrice: 111.1 * math.Pow10(marketDecimals), + orders: []*v2.OrderInfo{ + { + Side: entities.SideSell, + Price: floatToStringWithDp(100, marketDecimals), + Remaining: uint64(11 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + { + Side: entities.SideBuy, + Price: floatToStringWithDp(100, marketDecimals), + Remaining: uint64(11 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: true, + }, + }, + marginAccountBalance: 100 * math.Pow10(assetDecimals), + generalAccountBalance: 0, + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_CROSS_MARGIN, + }, + { + markPrice: markPrice, + openVolume: int64(-10 * math.Pow10(positionDecimalPlaces)), + avgEntryPrice: 111.1 * math.Pow10(marketDecimals), + orders: []*v2.OrderInfo{ + { + Side: entities.SideBuy, + Price: floatToStringWithDp(100, marketDecimals), + Remaining: uint64(1 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + { + Side: entities.SideSell, + Price: floatToStringWithDp(100, marketDecimals), + Remaining: uint64(1 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + }, + marginAccountBalance: 100 * math.Pow10(assetDecimals), + generalAccountBalance: 1000 * math.Pow10(assetDecimals), + orderMarginAccountBalance: 10 * math.Pow10(assetDecimals), + marginMode: vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + marginFactor: 0.3, + }, + { + markPrice: markPrice, + openVolume: int64(10 * math.Pow10(positionDecimalPlaces)), + avgEntryPrice: 111.1 * math.Pow10(marketDecimals), + orders: []*v2.OrderInfo{ + { + Side: entities.SideSell, + Price: floatToStringWithDp(100, marketDecimals), + Remaining: uint64(3 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + { + Side: entities.SideSell, + Price: floatToStringWithDp(101, marketDecimals), + Remaining: uint64(4 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + { + Side: entities.SideSell, + Price: floatToStringWithDp(105, marketDecimals), + Remaining: uint64(5 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + { + Side: entities.SideBuy, + Price: floatToStringWithDp(95, marketDecimals), + Remaining: uint64(2 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: true, + }, + { + Side: entities.SideBuy, + Price: floatToStringWithDp(94, marketDecimals), + Remaining: uint64(3 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: true, + }, + { + Side: entities.SideBuy, + Price: floatToStringWithDp(90, marketDecimals), + Remaining: uint64(10 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: true, + }, + }, + marginAccountBalance: 100 * math.Pow10(assetDecimals), + generalAccountBalance: 1000 * math.Pow10(assetDecimals), + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_CROSS_MARGIN, + }, + { + markPrice: markPrice, + openVolume: -int64(10 * math.Pow10(positionDecimalPlaces)), + avgEntryPrice: 111.1 * math.Pow10(marketDecimals), + orders: []*v2.OrderInfo{ + { + Side: entities.SideSell, + Price: floatToStringWithDp(100, marketDecimals), + Remaining: uint64(3 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + { + Side: entities.SideSell, + Price: floatToStringWithDp(101, marketDecimals), + Remaining: uint64(4 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + { + Side: entities.SideSell, + Price: floatToStringWithDp(105, marketDecimals), + Remaining: uint64(5 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + { + Side: entities.SideBuy, + Price: floatToStringWithDp(95, marketDecimals), + Remaining: uint64(2 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: true, + }, + { + Side: entities.SideBuy, + Price: floatToStringWithDp(94, marketDecimals), + Remaining: uint64(3 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: true, + }, + { + Side: entities.SideBuy, + Price: floatToStringWithDp(90, marketDecimals), + Remaining: uint64(10 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: true, + }, + }, + marginAccountBalance: 100 * math.Pow10(assetDecimals), + generalAccountBalance: 1000 * math.Pow10(assetDecimals), + orderMarginAccountBalance: 10 * math.Pow10(assetDecimals), + marginMode: vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + marginFactor: 0.1, + }, + { + markPrice: markPrice, + openVolume: 0, + avgEntryPrice: 0, + orders: []*v2.OrderInfo{ + { + Side: entities.SideBuy, + Price: fmt.Sprintf("%f", markPrice), + Remaining: uint64(1 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + }, + marginAccountBalance: 0, + generalAccountBalance: 0, + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + marginFactor: 0.3, + expectedCollIncBest: "3703680000", + }, + { + markPrice: markPrice, + openVolume: 0, + avgEntryPrice: 0, + orders: []*v2.OrderInfo{ + { + Side: entities.SideBuy, + Price: "0", + Remaining: uint64(1 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: true, + }, + }, + marginAccountBalance: 0, + generalAccountBalance: 0, + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + marginFactor: 0.3, + expectedCollIncBest: "3703680000", + }, + { + markPrice: markPrice, + openVolume: int64(1 * math.Pow10(positionDecimalPlaces)), + avgEntryPrice: markPrice, + orders: []*v2.OrderInfo{}, + marginAccountBalance: 0, + generalAccountBalance: 0, + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + marginFactor: 0.3, + expectedCollIncBest: "3703680000", + }, + { + markPrice: markPrice, + openVolume: 0, + avgEntryPrice: 0, + orders: []*v2.OrderInfo{ + { + Side: entities.SideSell, + Price: fmt.Sprintf("%f", markPrice), + Remaining: uint64(1 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: false, + }, + }, + marginAccountBalance: 0, + generalAccountBalance: 0, + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + marginFactor: 0.3, + expectedCollIncBest: "3703680000", + }, + { + markPrice: markPrice, + openVolume: 0, + avgEntryPrice: 0, + orders: []*v2.OrderInfo{ + { + Side: entities.SideSell, + Price: "0", + Remaining: uint64(1 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: true, + }, + }, + marginAccountBalance: 0, + generalAccountBalance: 0, + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + marginFactor: 0.3, + expectedCollIncBest: "3703680000", + }, + { + markPrice: markPrice, + openVolume: -int64(1 * math.Pow10(positionDecimalPlaces)), + avgEntryPrice: markPrice, + orders: []*v2.OrderInfo{}, + marginAccountBalance: 0, + generalAccountBalance: 0, + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + marginFactor: 0.3, + expectedCollIncBest: "3703680000", + }, + { + markPrice: markPrice, + openVolume: -int64(1 * math.Pow10(positionDecimalPlaces)), + avgEntryPrice: markPrice, + orders: []*v2.OrderInfo{ + { + Side: entities.SideBuy, + Price: "0", + Remaining: uint64(1 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: true, + }, + }, + marginAccountBalance: 0, + generalAccountBalance: 0, + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + marginFactor: 0.1, + expectedCollIncBest: "0", + }, + { + markPrice: markPrice, + openVolume: int64(1 * math.Pow10(positionDecimalPlaces)), + avgEntryPrice: markPrice, + orders: []*v2.OrderInfo{ + { + Side: entities.SideSell, + Price: "0", + Remaining: uint64(1 * math.Pow10(positionDecimalPlaces)), + IsMarketOrder: true, + }, + }, + marginAccountBalance: 0, + generalAccountBalance: 0, + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + marginFactor: 0.1, + expectedCollIncBest: "0", + }, + { + markPrice: 67813, + openVolume: 10000, + avgEntryPrice: 68113, + orders: []*v2.OrderInfo{}, + marginAccountBalance: 68389, + generalAccountBalance: 0, + orderMarginAccountBalance: 0, + marginMode: vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + marginFactor: 0.01277, + expectedLiquidationBestVolumeOnly: "6781300000", + }, + } + for i, tc := range testCases { + mktData := entities.MarketData{ + MarkPrice: num.DecimalFromFloat(tc.markPrice), + AuctionEnd: auctionEnd, + ProductData: &entities.ProductData{ + ProductData: &vega.ProductData{ + Data: &vega.ProductData_PerpetualData{ + PerpetualData: &vega.PerpetualData{ + FundingPayment: fmt.Sprintf("%f", fundingPayment), + FundingRate: "0.05", + }, + }, + }, + }, + } + marketDataService := mocks.NewMockMarketDataService(ctrl) + marketDataService.EXPECT().GetMarketDataByID(ctx, marketId).Return(mktData, nil).AnyTimes() + + apiService := api.TradingDataServiceV2{ + AssetService: assetService, + MarketsService: marketService, + MarketDataService: marketDataService, + RiskFactorService: riskFactorService, + } + + marginFactor := fmt.Sprintf("%f", tc.marginFactor) + exclude := false + dontScale := false + req := &v2.EstimatePositionRequest{ + MarketId: marketId, + OpenVolume: tc.openVolume, + AverageEntryPrice: fmt.Sprintf("%f", tc.avgEntryPrice), + Orders: tc.orders, + MarginAccountBalance: fmt.Sprintf("%f", tc.marginAccountBalance), + GeneralAccountBalance: fmt.Sprintf("%f", tc.generalAccountBalance), + OrderMarginAccountBalance: fmt.Sprintf("%f", tc.orderMarginAccountBalance), + MarginMode: tc.marginMode, + MarginFactor: &marginFactor, + IncludeRequiredPositionMarginInAvailableCollateral: &exclude, + ScaleLiquidationPriceToMarketDecimals: &dontScale, + } + include := true + req2 := &v2.EstimatePositionRequest{ + MarketId: marketId, + OpenVolume: tc.openVolume, + AverageEntryPrice: fmt.Sprintf("%f", tc.avgEntryPrice), + Orders: tc.orders, + MarginAccountBalance: fmt.Sprintf("%f", tc.marginAccountBalance), + GeneralAccountBalance: fmt.Sprintf("%f", tc.generalAccountBalance), + OrderMarginAccountBalance: fmt.Sprintf("%f", tc.orderMarginAccountBalance), + MarginMode: tc.marginMode, + MarginFactor: &marginFactor, + IncludeRequiredPositionMarginInAvailableCollateral: &include, + ScaleLiquidationPriceToMarketDecimals: &dontScale, + } + + isolatedMargin := tc.marginMode == vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN + + res, err := apiService.EstimatePosition(ctx, req) + require.NoError(t, err, fmt.Sprintf("test case #%v", i+1)) + require.NotNil(t, res, fmt.Sprintf("test case #%v", i+1)) + + if res.Margin.WorstCase.MaintenanceMargin != "0" { + require.NotEqual(t, "0", res.Margin.BestCase.InitialMargin, fmt.Sprintf("test case #%v", i+1)) + require.NotEqual(t, "0", res.Margin.WorstCase.InitialMargin, fmt.Sprintf("test case #%v", i+1)) + if isolatedMargin { + require.Equal(t, "0", res.Margin.BestCase.SearchLevel, fmt.Sprintf("test case #%v", i+1)) + require.Equal(t, "0", res.Margin.BestCase.CollateralReleaseLevel, fmt.Sprintf("test case #%v", i+1)) + require.Equal(t, "0", res.Margin.WorstCase.SearchLevel, fmt.Sprintf("test case #%v", i+1)) + require.Equal(t, "0", res.Margin.WorstCase.CollateralReleaseLevel, fmt.Sprintf("test case #%v", i+1)) + } else { + require.NotEqual(t, "0", res.Margin.BestCase.SearchLevel, fmt.Sprintf("test case #%v", i+1)) + require.NotEqual(t, "0", res.Margin.BestCase.CollateralReleaseLevel, fmt.Sprintf("test case #%v", i+1)) + require.NotEqual(t, "0", res.Margin.WorstCase.SearchLevel, fmt.Sprintf("test case #%v", i+1)) + require.NotEqual(t, "0", res.Margin.WorstCase.CollateralReleaseLevel, fmt.Sprintf("test case #%v", i+1)) + } + } + + colIncBest, err := strconv.ParseFloat(res.CollateralIncreaseEstimate.BestCase, 64) + require.NoError(t, err, fmt.Sprintf("test case #%v", i+1)) + colIncWorst, err := strconv.ParseFloat(res.CollateralIncreaseEstimate.WorstCase, 64) + require.NoError(t, err, fmt.Sprintf("test case #%v", i+1)) + if tc.expectedCollIncBest != "" { + require.Equal(t, tc.expectedCollIncBest, res.CollateralIncreaseEstimate.BestCase, fmt.Sprintf("test case #%v", i+1)) + } + if tc.expectedLiquidationBestVolumeOnly != "" { + require.Equal(t, tc.expectedLiquidationBestVolumeOnly, res.Liquidation.BestCase.OpenVolumeOnly, fmt.Sprintf("test case #%v", i+1)) + } + + if tc.openVolume == 0 { + require.Equal(t, colIncBest, colIncWorst, fmt.Sprintf("test case #%v", i+1)) + } else { + if isolatedMargin { + require.Equal(t, colIncWorst, colIncBest, fmt.Sprintf("test case #%v", i+1)) + } else { + require.GreaterOrEqual(t, colIncWorst, colIncBest, fmt.Sprintf("test case #%v", i+1)) + } + } + initialMarginBest, err := strconv.ParseFloat(res.Margin.BestCase.InitialMargin, 64) + require.NoError(t, err, fmt.Sprintf("test case #%v", i+1)) + initialMarginWorst, err := strconv.ParseFloat(res.Margin.WorstCase.InitialMargin, 64) + require.NoError(t, err, fmt.Sprintf("test case #%v", i+1)) + + expectedCollIncBest := max(0, initialMarginBest-tc.marginAccountBalance-tc.orderMarginAccountBalance) + expectedCollIncWorst := max(0, initialMarginWorst-tc.marginAccountBalance-tc.orderMarginAccountBalance) + expectedPosMarginIncrease := 0.0 + if isolatedMargin { + priceFactor := math.Pow10(assetDecimals - marketDecimals) + marketOrderNotional := getMarketOrderNotional(tc.markPrice, tc.orders, priceFactor, positionDecimalPlaces) + adjNotional := (tc.avgEntryPrice*priceFactor*float64(tc.openVolume)/math.Pow10(positionDecimalPlaces) + marketOrderNotional) + + requiredPositionMargin := math.Abs(adjNotional) * tc.marginFactor + requiredOrderMargin := getLimitOrderNotional(t, tc.orders, priceFactor, positionDecimalPlaces) * tc.marginFactor + expectedCollIncBest = max(0, requiredPositionMargin+requiredOrderMargin-tc.marginAccountBalance-tc.orderMarginAccountBalance) + expectedCollIncWorst = expectedCollIncBest + + expectedPosMarginIncrease = max(0, requiredPositionMargin-tc.marginAccountBalance) + } + + actualCollIncBest, err := strconv.ParseFloat(res.CollateralIncreaseEstimate.BestCase, 64) + require.NoError(t, err, fmt.Sprintf("test case #%v", i+1)) + actualCollIncWorst, err := strconv.ParseFloat(res.CollateralIncreaseEstimate.WorstCase, 64) + require.NoError(t, err, fmt.Sprintf("test case #%v", i+1)) + + require.Equal(t, expectedCollIncBest, actualCollIncBest, fmt.Sprintf("test case #%v", i+1)) + require.Equal(t, expectedCollIncWorst, actualCollIncWorst, fmt.Sprintf("test case #%v", i+1)) + + res2, err := apiService.EstimatePosition(ctx, req2) + require.NoError(t, err, fmt.Sprintf("test case #%v", i+1)) + require.NotNil(t, res2, fmt.Sprintf("test case #%v", i+1)) + + if isolatedMargin { + if expectedPosMarginIncrease > 0 { + if countOrders(tc.orders, entities.SideBuy) > 0 && res.Liquidation.WorstCase.IncludingBuyOrders != "0" { + require.NotEqual(t, res.Liquidation.WorstCase.IncludingBuyOrders, res2.Liquidation.WorstCase.IncludingBuyOrders, fmt.Sprintf("test case #%v", i+1)) + } + if countOrders(tc.orders, entities.SideSell) > 0 && res.Liquidation.WorstCase.IncludingSellOrders != "0" { + require.NotEqual(t, res.Liquidation.WorstCase.IncludingSellOrders, res2.Liquidation.WorstCase.IncludingSellOrders, fmt.Sprintf("test case #%v", i+1)) + } + if countOrders(tc.orders, entities.SideBuy) > 0 && res.Liquidation.BestCase.IncludingBuyOrders != "0" { + require.NotEqual(t, res.Liquidation.BestCase.IncludingBuyOrders, res2.Liquidation.BestCase.IncludingBuyOrders, fmt.Sprintf("test case #%v", i+1)) + } + if countOrders(tc.orders, entities.SideSell) > 0 && res.Liquidation.BestCase.IncludingSellOrders != "0" { + require.NotEqual(t, res.Liquidation.BestCase.IncludingSellOrders, res2.Liquidation.BestCase.IncludingSellOrders, fmt.Sprintf("test case #%v", i+1)) + } + } + } + + scale := true + req2.ScaleLiquidationPriceToMarketDecimals = &scale + + res3, err := apiService.EstimatePosition(ctx, req2) + require.NoError(t, err) + require.NotNil(t, res3) + + dp := int64(assetDecimals - marketDecimals) + compareDps(t, res2.Liquidation.BestCase.OpenVolumeOnly, res3.Liquidation.BestCase.OpenVolumeOnly, dp) + compareDps(t, res2.Liquidation.BestCase.IncludingBuyOrders, res3.Liquidation.BestCase.IncludingBuyOrders, dp) + compareDps(t, res2.Liquidation.BestCase.IncludingSellOrders, res3.Liquidation.BestCase.IncludingSellOrders, dp) + compareDps(t, res2.Liquidation.WorstCase.OpenVolumeOnly, res3.Liquidation.WorstCase.OpenVolumeOnly, dp) + compareDps(t, res2.Liquidation.WorstCase.IncludingBuyOrders, res3.Liquidation.WorstCase.IncludingBuyOrders, dp) + compareDps(t, res2.Liquidation.WorstCase.IncludingSellOrders, res3.Liquidation.WorstCase.IncludingSellOrders, dp) + + liqFp, err := strconv.ParseFloat(res3.Liquidation.WorstCase.OpenVolumeOnly, 64) + require.NoError(t, err) + effectiveOpenVolume := tc.openVolume + sumMarketOrderVolume(tc.orders) + if tc.openVolume != 0 && effectiveOpenVolume > 0 { + require.LessOrEqual(t, liqFp, tc.markPrice, fmt.Sprintf("test case #%v", i+1)) + } + if tc.openVolume != 0 && effectiveOpenVolume < 0 { + require.GreaterOrEqual(t, liqFp, tc.markPrice, fmt.Sprintf("test case #%v", i+1)) + } + } +} + +//nolint:unparam +func floatToStringWithDp(value float64, dp int) string { + return fmt.Sprintf("%f", value*math.Pow10(dp)) +} + +func compareDps(t *testing.T, bigger, smaller string, dp int64) { + t.Helper() + b, err := strconv.ParseFloat(bigger, 64) + require.NoError(t, err) + s, err := strconv.ParseFloat(smaller, 64) + require.NoError(t, err) + if s != 0 { + l := int64(math.Round(math.Log10(b / s))) + require.Equal(t, dp, l) + } +} + +func countOrders(orders []*v2.OrderInfo, side vega.Side) int { + c := 0 + for _, o := range orders { + if o.Side == side { + c += 1 + } + } + return c +} + +func sumMarketOrderVolume(orders []*v2.OrderInfo) int64 { + v := int64(0) + for _, o := range orders { + if !o.IsMarketOrder { + continue + } + if o.Side == entities.SideBuy { + v += int64(o.Remaining) + } + if o.Side == entities.SideSell { + v -= int64(o.Remaining) + } + } + return v +} + type mockStream struct { sent []*httpbody.HttpBody } @@ -121,3 +785,32 @@ func (s *mockStream) SetTrailer(metadata.MD) {} func (s *mockStream) Context() context.Context { return context.Background() } func (s *mockStream) SendMsg(m interface{}) error { return nil } func (s *mockStream) RecvMsg(m interface{}) error { return nil } + +func getLimitOrderNotional(t *testing.T, orders []*v2.OrderInfo, priceFactor float64, positionDecimals int) float64 { + t.Helper() + notional := 0.0 + for _, o := range orders { + if o.IsMarketOrder { + continue + } + price, err := strconv.ParseFloat(o.Price, 64) + require.NoError(t, err) + notional += price * priceFactor * float64(o.Remaining) / math.Pow10(positionDecimals) + } + return notional +} + +func getMarketOrderNotional(marketObservable float64, orders []*v2.OrderInfo, priceFactor float64, positionDecimals int) float64 { + notional := 0.0 + for _, o := range orders { + if !o.IsMarketOrder { + continue + } + size := float64(o.Remaining) / math.Pow10(positionDecimals) + if o.Side == vega.Side_SIDE_SELL { + size = -size + } + notional += marketObservable * priceFactor * size + } + return notional +} diff --git a/datanode/api/trading_test.go b/datanode/api/trading_test.go index 002f429aef..2e83f37b63 100644 --- a/datanode/api/trading_test.go +++ b/datanode/api/trading_test.go @@ -23,10 +23,6 @@ import ( "testing" "time" - "github.com/jackc/pgconn" - - "code.vegaprotocol.io/vega/libs/subscribers" - "code.vegaprotocol.io/vega/datanode/api" "code.vegaprotocol.io/vega/datanode/api/mocks" "code.vegaprotocol.io/vega/datanode/broker" @@ -35,6 +31,8 @@ import ( vgtesting "code.vegaprotocol.io/vega/datanode/libs/testing" "code.vegaprotocol.io/vega/datanode/service" "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/datanode/sqlsubscribers" + "code.vegaprotocol.io/vega/libs/subscribers" "code.vegaprotocol.io/vega/logging" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" vegaprotoapi "code.vegaprotocol.io/vega/protos/vega/api/v1" @@ -42,6 +40,7 @@ import ( "github.com/golang/mock/gomock" "github.com/golang/protobuf/proto" + "github.com/jackc/pgconn" "github.com/jackc/pgx/v4" "github.com/pkg/errors" "github.com/stretchr/testify/assert" @@ -121,7 +120,7 @@ func getTestGRPCServer(t *testing.T, ctx context.Context) (tidy func(), conn *gr sqlPositionService := service.NewPosition(sqlstore.NewPositions(sqlConn), logger) sqlAssetService := service.NewAsset(sqlstore.NewAssets(sqlConn)) sqlAccountService := service.NewAccount(sqlstore.NewAccounts(sqlConn), sqlstore.NewBalances(sqlConn), logger) - sqlRewardsService := service.NewReward(sqlstore.NewRewards(sqlConn), logger) + sqlRewardsService := service.NewReward(sqlstore.NewRewards(ctx, sqlConn), logger) sqlMarketsService := service.NewMarkets(sqlstore.NewMarkets(sqlConn)) sqlDelegationService := service.NewDelegation(sqlstore.NewDelegations(sqlConn), logger) sqlEpochService := service.NewEpoch(sqlstore.NewEpochs(sqlConn)) @@ -162,6 +161,9 @@ func getTestGRPCServer(t *testing.T, ctx context.Context) (tidy func(), conn *gr paidLiquidityFeesStatsService := service.NewPaidLiquidityFeesStats(sqlstore.NewPaidLiquidityFeesStats(sqlConn)) partyLockedBalances := service.NewPartyLockedBalances(sqlstore.NewPartyLockedBalances(sqlConn)) partyVestingBalances := service.NewPartyVestingBalances(sqlstore.NewPartyVestingBalances(sqlConn)) + transactionResults := service.NewTransactionResults(sqlsubscribers.NewTransactionResults(logger)) + gameService := service.NewGames(sqlstore.NewGames(sqlConn)) + marginModesService := service.NewMarginModes(sqlstore.NewMarginModes(sqlConn)) g := api.NewGRPCServer( logger, @@ -218,6 +220,9 @@ func getTestGRPCServer(t *testing.T, ctx context.Context) (tidy func(), conn *gr paidLiquidityFeesStatsService, partyLockedBalances, partyVestingBalances, + transactionResults, + gameService, + marginModesService, ) if g == nil { err = fmt.Errorf("failed to create gRPC server") diff --git a/datanode/api/utils.go b/datanode/api/utils.go index ed1739d102..30301b7cba 100644 --- a/datanode/api/utils.go +++ b/datanode/api/utils.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/datanode/entities" + "golang.org/x/sync/errgroup" "google.golang.org/grpc/codes" "google.golang.org/protobuf/proto" diff --git a/datanode/broker/broker.go b/datanode/broker/broker.go index b9ad715156..d0e79d4d43 100644 --- a/datanode/broker/broker.go +++ b/datanode/broker/broker.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package broker import ( @@ -33,10 +21,9 @@ import ( "sync" "time" - "code.vegaprotocol.io/vega/libs/broker" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/libs/broker" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/protos/vega" ) diff --git a/datanode/broker/broker_test.go b/datanode/broker/broker_test.go index 245ba68920..519cf5cad3 100644 --- a/datanode/broker/broker_test.go +++ b/datanode/broker/broker_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package broker_test import ( @@ -47,11 +35,11 @@ import ( vgcontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/logging" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - "go.nanomsg.org/mangos/v3/protocol/pair" "github.com/golang/mock/gomock" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" + "go.nanomsg.org/mangos/v3/protocol/pair" ) type brokerTst struct { diff --git a/datanode/broker/buffer_files_event_source_test.go b/datanode/broker/buffer_files_event_source_test.go index b829190aef..624e6a0cd5 100644 --- a/datanode/broker/buffer_files_event_source_test.go +++ b/datanode/broker/buffer_files_event_source_test.go @@ -23,12 +23,11 @@ import ( "code.vegaprotocol.io/vega/core/broker" "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/types" vgcontext "code.vegaprotocol.io/vega/libs/context" eventsv1 "code.vegaprotocol.io/vega/protos/vega/events/v1" "github.com/stretchr/testify/assert" - - "code.vegaprotocol.io/vega/core/types" ) func TestReceiveEvents(t *testing.T) { diff --git a/datanode/broker/buffered_event_source.go b/datanode/broker/buffered_event_source.go index 6589b1f2d2..775c5f5ed3 100644 --- a/datanode/broker/buffered_event_source.go +++ b/datanode/broker/buffered_event_source.go @@ -28,10 +28,8 @@ import ( "time" "code.vegaprotocol.io/vega/core/broker" - - "code.vegaprotocol.io/vega/datanode/utils" - "code.vegaprotocol.io/vega/datanode/metrics" + "code.vegaprotocol.io/vega/datanode/utils" "code.vegaprotocol.io/vega/logging" ) diff --git a/datanode/broker/buffered_event_source_test.go b/datanode/broker/buffered_event_source_test.go index 71f2f1ad86..b20d491c44 100644 --- a/datanode/broker/buffered_event_source_test.go +++ b/datanode/broker/buffered_event_source_test.go @@ -29,6 +29,7 @@ import ( "time" "code.vegaprotocol.io/vega/logging" + "github.com/stretchr/testify/assert" ) diff --git a/datanode/broker/config.go b/datanode/broker/config.go index 7c2c9b714a..ed0df95376 100644 --- a/datanode/broker/config.go +++ b/datanode/broker/config.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package broker import ( diff --git a/datanode/broker/convert.go b/datanode/broker/convert.go index a70d159349..a40afaf668 100644 --- a/datanode/broker/convert.go +++ b/datanode/broker/convert.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package broker import ( @@ -196,6 +184,14 @@ func toEvent(ctx context.Context, be *eventspb.BusEvent) events.Event { return events.VestingBalancesSummaryEventFromStream(ctx, be) case eventspb.BusEventType_BUS_EVENT_TYPE_TRANSFER_FEES_PAID: return events.TransferFeesEventFromStream(ctx, be) + case eventspb.BusEventType_BUS_EVENT_TYPE_TRANSFER_FEES_DISCOUNT_UPDATED: + return events.TransferFeesDiscountUpdatedFromStream(ctx, be) + case eventspb.BusEventType_BUS_EVENT_TYPE_PARTY_MARGIN_MODE_UPDATED: + return events.PartyMarginModeUpdatedEventFromStream(ctx, be) + case eventspb.BusEventType_BUS_EVENT_TYPE_PARTY_PROFILE_UPDATED: + return events.PartyProfileUpdatedEventFromStream(ctx, be) + case eventspb.BusEventType_BUS_EVENT_TYPE_TEAMS_STATS_UPDATED: + return events.TeamsStatsUpdatedEventFromStream(ctx, be) } return nil diff --git a/datanode/broker/event_receiver_sender.go b/datanode/broker/event_receiver_sender.go index ed9e2c9cbb..cc72d74a3a 100644 --- a/datanode/broker/event_receiver_sender.go +++ b/datanode/broker/event_receiver_sender.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package broker import ( diff --git a/datanode/broker/fan_out_event_source.go b/datanode/broker/fan_out_event_source.go index 363b10f821..4761a43a74 100644 --- a/datanode/broker/fan_out_event_source.go +++ b/datanode/broker/fan_out_event_source.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package broker import ( diff --git a/datanode/broker/fan_out_event_source_test.go b/datanode/broker/fan_out_event_source_test.go index 7e08439a52..5b5af224b9 100644 --- a/datanode/broker/fan_out_event_source_test.go +++ b/datanode/broker/fan_out_event_source_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package broker_test import ( diff --git a/datanode/broker/mocks/broker_drop_in_mock.go b/datanode/broker/mocks/broker_drop_in_mock.go index 15d3ca6831..74a55cca43 100644 --- a/datanode/broker/mocks/broker_drop_in_mock.go +++ b/datanode/broker/mocks/broker_drop_in_mock.go @@ -19,6 +19,7 @@ import ( "sync" "code.vegaprotocol.io/vega/core/events" + "github.com/golang/mock/gomock" ) diff --git a/datanode/broker/socket_server.go b/datanode/broker/socket_server.go index 9727b2f880..e736fa8e10 100644 --- a/datanode/broker/socket_server.go +++ b/datanode/broker/socket_server.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package broker import ( @@ -33,8 +21,6 @@ import ( "net" "strings" - "golang.org/x/sync/errgroup" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/logging" @@ -43,6 +29,8 @@ import ( mangosErr "go.nanomsg.org/mangos/v3/errors" "go.nanomsg.org/mangos/v3/protocol" "go.nanomsg.org/mangos/v3/protocol/pair" + "golang.org/x/sync/errgroup" + _ "go.nanomsg.org/mangos/v3/transport/inproc" // changes behavior of nanomsg _ "go.nanomsg.org/mangos/v3/transport/tcp" // changes behavior of nanomsg ) diff --git a/datanode/broker/sqlstore_broker.go b/datanode/broker/sqlstore_broker.go index 6670586923..9e199914c8 100644 --- a/datanode/broker/sqlstore_broker.go +++ b/datanode/broker/sqlstore_broker.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package broker import ( @@ -33,12 +21,12 @@ import ( "reflect" "time" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" "code.vegaprotocol.io/vega/logging" + + "github.com/pkg/errors" ) type SQLBrokerSubscriber interface { diff --git a/datanode/broker/sqlstore_broker_test.go b/datanode/broker/sqlstore_broker_test.go index 6d044738fc..a08844d5ad 100644 --- a/datanode/broker/sqlstore_broker_test.go +++ b/datanode/broker/sqlstore_broker_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package broker_test import ( @@ -43,10 +31,10 @@ import ( vgcontext "code.vegaprotocol.io/vega/libs/context" "code.vegaprotocol.io/vega/logging" eventsv1 "code.vegaprotocol.io/vega/protos/vega/events/v1" - "github.com/pkg/errors" - "github.com/stretchr/testify/require" + "github.com/pkg/errors" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) var logger = logging.NewTestLogger() @@ -594,7 +582,7 @@ func (t *testSQLBrokerSubscriber) Types() []events.Type { type blockEventSource struct { vegaTime time.Time - blockHeight int64 + blockHeight uint64 } func newBlockEventSource() *blockEventSource { @@ -609,7 +597,7 @@ func (s *blockEventSource) NextBeginBlockEvent() *events.BeginBlock { ctx = vgcontext.WithBlockHeight(ctx, s.blockHeight) event := events.NewBeginBlock(ctx, eventsv1.BeginBlock{ - Height: uint64(s.blockHeight), + Height: s.blockHeight, Timestamp: s.vegaTime.UnixNano(), }) @@ -621,7 +609,7 @@ func (s *blockEventSource) NextEndBlockEvent() *events.EndBlock { ctx = vgcontext.WithBlockHeight(ctx, s.blockHeight) event := events.NewEndBlock(ctx, eventsv1.EndBlock{ - Height: uint64(s.blockHeight), + Height: s.blockHeight, }) s.vegaTime = s.vegaTime.Add(1 * time.Second) diff --git a/datanode/candlesv2/candle_updates.go b/datanode/candlesv2/candle_updates.go index 8637b3d29b..bc3758e03f 100644 --- a/datanode/candlesv2/candle_updates.go +++ b/datanode/candlesv2/candle_updates.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package candlesv2 import ( diff --git a/datanode/candlesv2/candle_updates_test.go b/datanode/candlesv2/candle_updates_test.go index 2ab06af1cc..840c385907 100644 --- a/datanode/candlesv2/candle_updates_test.go +++ b/datanode/candlesv2/candle_updates_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package candlesv2_test import ( diff --git a/datanode/candlesv2/config.go b/datanode/candlesv2/config.go index e0c2674c85..f2260fb2c8 100644 --- a/datanode/candlesv2/config.go +++ b/datanode/candlesv2/config.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package candlesv2 import ( diff --git a/datanode/candlesv2/service.go b/datanode/candlesv2/service.go index afef34d6c8..6b7235ada5 100644 --- a/datanode/candlesv2/service.go +++ b/datanode/candlesv2/service.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package candlesv2 import ( diff --git a/datanode/candlesv2/service_test.go b/datanode/candlesv2/service_test.go index 8ac7ec6286..dc46404e32 100644 --- a/datanode/candlesv2/service_test.go +++ b/datanode/candlesv2/service_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package candlesv2_test import ( @@ -38,7 +26,6 @@ import ( "code.vegaprotocol.io/vega/logging" "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" ) diff --git a/datanode/config/config.go b/datanode/config/config.go index 3f4af20ab8..636aff306f 100644 --- a/datanode/config/config.go +++ b/datanode/config/config.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - //lint:file-ignore SA5008 duplicated struct tags are ok for config package config @@ -35,15 +23,13 @@ import ( "os" "code.vegaprotocol.io/vega/datanode/admin" - - "code.vegaprotocol.io/vega/datanode/networkhistory" - "code.vegaprotocol.io/vega/datanode/api" "code.vegaprotocol.io/vega/datanode/broker" "code.vegaprotocol.io/vega/datanode/candlesv2" "code.vegaprotocol.io/vega/datanode/config/encoding" "code.vegaprotocol.io/vega/datanode/gateway" "code.vegaprotocol.io/vega/datanode/metrics" + "code.vegaprotocol.io/vega/datanode/networkhistory" "code.vegaprotocol.io/vega/datanode/service" "code.vegaprotocol.io/vega/datanode/sqlstore" vgfs "code.vegaprotocol.io/vega/libs/fs" diff --git a/datanode/config/encoding/encoding.go b/datanode/config/encoding/encoding.go index 67d7119e15..335d05dfed 100644 --- a/datanode/config/encoding/encoding.go +++ b/datanode/config/encoding/encoding.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package encoding import ( diff --git a/datanode/config/encoding/fileloadingmode.go b/datanode/config/encoding/fileloadingmode.go index 14bf106856..a5217d91b5 100644 --- a/datanode/config/encoding/fileloadingmode.go +++ b/datanode/config/encoding/fileloadingmode.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package encoding import ( diff --git a/datanode/config/encoding/fileloadingmode_test.go b/datanode/config/encoding/fileloadingmode_test.go index acee3beafd..90da0b394e 100644 --- a/datanode/config/encoding/fileloadingmode_test.go +++ b/datanode/config/encoding/fileloadingmode_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package encoding_test import ( diff --git a/datanode/config/flags.go b/datanode/config/flags.go index f29c60b596..65cd4ea782 100644 --- a/datanode/config/flags.go +++ b/datanode/config/flags.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package config // Empty is used when a command or sub-command receives no argument and has no execution. diff --git a/datanode/config/watcher.go b/datanode/config/watcher.go index 0ca3bc36e7..e115777434 100644 --- a/datanode/config/watcher.go +++ b/datanode/config/watcher.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package config import ( @@ -36,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + "github.com/fsnotify/fsnotify" ) diff --git a/datanode/contextutil/contextutil.go b/datanode/contextutil/contextutil.go index 6590a425d2..5bc6c8cee3 100644 --- a/datanode/contextutil/contextutil.go +++ b/datanode/contextutil/contextutil.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package contextutil import ( diff --git a/datanode/entities/account.go b/datanode/entities/account.go index 501c11c091..09743d306e 100644 --- a/datanode/entities/account.go +++ b/datanode/entities/account.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/account_balance.go b/datanode/entities/account_balance.go index 5711031df9..e562dbca5e 100644 --- a/datanode/entities/account_balance.go +++ b/datanode/entities/account_balance.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -33,6 +21,7 @@ import ( "time" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/shopspring/decimal" ) diff --git a/datanode/entities/account_field.go b/datanode/entities/account_field.go index f4e5ded095..284f6b5be5 100644 --- a/datanode/entities/account_field.go +++ b/datanode/entities/account_field.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/account_filter.go b/datanode/entities/account_filter.go index 20f78d3dc3..0be16e19e6 100644 --- a/datanode/entities/account_filter.go +++ b/datanode/entities/account_filter.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/aggregated_balance.go b/datanode/entities/aggregated_balance.go index d15c1c55e2..b4a891aa51 100644 --- a/datanode/entities/aggregated_balance.go +++ b/datanode/entities/aggregated_balance.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/types" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/shopspring/decimal" ) diff --git a/datanode/entities/aggregated_ledgerentries.go b/datanode/entities/aggregated_ledgerentries.go index b3fc931e1f..14742a3cdb 100644 --- a/datanode/entities/aggregated_ledgerentries.go +++ b/datanode/entities/aggregated_ledgerentries.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/core/types" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" ) @@ -32,17 +33,18 @@ import ( type AggregatedLedgerEntry struct { VegaTime time.Time Quantity decimal.Decimal - TransferType *LedgerMovementType - AssetID *AssetID - - FromAccountPartyID *PartyID - ToAccountPartyID *PartyID - FromAccountMarketID *MarketID - ToAccountMarketID *MarketID - FromAccountType *types.AccountType - ToAccountType *types.AccountType + TransferType LedgerMovementType + AssetID AssetID + + FromAccountPartyID PartyID + ToAccountPartyID PartyID + FromAccountMarketID MarketID + ToAccountMarketID MarketID + FromAccountType types.AccountType + ToAccountType types.AccountType FromAccountBalance decimal.Decimal ToAccountBalance decimal.Decimal + TransferID TransferID } func (ledgerEntries *AggregatedLedgerEntry) ToProto() *v2.AggregatedLedgerEntry { @@ -51,53 +53,35 @@ func (ledgerEntries *AggregatedLedgerEntry) ToProto() *v2.AggregatedLedgerEntry lep.Quantity = ledgerEntries.Quantity.String() lep.Timestamp = ledgerEntries.VegaTime.UnixNano() - if ledgerEntries.TransferType != nil { - lep.TransferType = vega.TransferType(*ledgerEntries.TransferType) - } - - if ledgerEntries.AssetID != nil { - assetIDString := ledgerEntries.AssetID.String() - if assetIDString != "" { - lep.AssetId = &assetIDString - } - } - - if ledgerEntries.FromAccountPartyID != nil { - partyIDString := ledgerEntries.FromAccountPartyID.String() - if partyIDString != "" { - lep.FromAccountPartyId = &partyIDString - } - } + lep.TransferType = vega.TransferType(ledgerEntries.TransferType) - if ledgerEntries.ToAccountPartyID != nil { - partyIDString := ledgerEntries.ToAccountPartyID.String() - if partyIDString != "" { - lep.ToAccountPartyId = &partyIDString - } + assetIDString := ledgerEntries.AssetID.String() + if assetIDString != "" { + lep.AssetId = &assetIDString } - if ledgerEntries.FromAccountMarketID != nil { - marketIDString := ledgerEntries.FromAccountMarketID.String() - if marketIDString != "" { - lep.FromAccountMarketId = &marketIDString - } + fromPartyIDString := ledgerEntries.FromAccountPartyID.String() + if fromPartyIDString != "" { + lep.FromAccountPartyId = &fromPartyIDString } - if ledgerEntries.ToAccountMarketID != nil { - marketIDString := ledgerEntries.ToAccountMarketID.String() - if marketIDString != "" { - lep.ToAccountMarketId = &marketIDString - } + toPartyIDString := ledgerEntries.ToAccountPartyID.String() + if toPartyIDString != "" { + lep.ToAccountPartyId = &toPartyIDString } - if ledgerEntries.FromAccountType != nil { - lep.FromAccountType = *ledgerEntries.FromAccountType + fromMarketIDString := ledgerEntries.FromAccountMarketID.String() + if fromMarketIDString != "" { + lep.FromAccountMarketId = &fromMarketIDString } - if ledgerEntries.ToAccountType != nil { - lep.ToAccountType = *ledgerEntries.ToAccountType + toMarketIDString := ledgerEntries.ToAccountMarketID.String() + if toMarketIDString != "" { + lep.ToAccountMarketId = &toMarketIDString } + lep.FromAccountType = ledgerEntries.FromAccountType + lep.ToAccountType = ledgerEntries.ToAccountType lep.FromAccountBalance = ledgerEntries.FromAccountBalance.String() lep.ToAccountBalance = ledgerEntries.ToAccountBalance.String() diff --git a/datanode/entities/asset.go b/datanode/entities/asset.go index 2915332c19..b7ed0e6d81 100644 --- a/datanode/entities/asset.go +++ b/datanode/entities/asset.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -34,6 +22,7 @@ import ( v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" pb "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" ) diff --git a/datanode/entities/balance.go b/datanode/entities/balance.go index 9d017d7121..21fe36b073 100644 --- a/datanode/entities/balance.go +++ b/datanode/entities/balance.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/begin_block.go b/datanode/entities/begin_block.go index 1b8d247775..5be9a5ab13 100644 --- a/datanode/entities/begin_block.go +++ b/datanode/entities/begin_block.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/events" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/pkg/errors" ) diff --git a/datanode/entities/block.go b/datanode/entities/block.go index 0ee43303f0..46842139ba 100644 --- a/datanode/entities/block.go +++ b/datanode/entities/block.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/candle.go b/datanode/entities/candle.go index b3b4999260..38061c7eb8 100644 --- a/datanode/entities/candle.go +++ b/datanode/entities/candle.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -33,7 +21,6 @@ import ( "time" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "code.vegaprotocol.io/vega/protos/vega" "github.com/shopspring/decimal" @@ -65,13 +52,31 @@ func (c *Candle) ToV1CandleProto(interval vega.Interval) (*vega.Candle, error) { } func (c *Candle) ToV2CandleProto() *v2.Candle { + var openPx, highPx, lowPx, closePx string + + if c.Open.GreaterThan(decimal.Zero) { + openPx = c.Open.String() + } + + if c.High.GreaterThan(decimal.Zero) { + highPx = c.High.String() + } + + if c.Low.GreaterThan(decimal.Zero) { + lowPx = c.Low.String() + } + + if c.Close.GreaterThan(decimal.Zero) { + closePx = c.Close.String() + } + return &v2.Candle{ Start: c.PeriodStart.UnixNano(), LastUpdate: c.LastUpdateInPeriod.UnixNano(), - High: c.High.String(), - Low: c.Low.String(), - Open: c.Open.String(), - Close: c.Close.String(), + High: highPx, + Low: lowPx, + Open: openPx, + Close: closePx, Volume: c.Volume, Notional: c.Notional, } diff --git a/datanode/entities/candle_test.go b/datanode/entities/candle_test.go index 6c689f3721..e94aa13fc9 100644 --- a/datanode/entities/candle_test.go +++ b/datanode/entities/candle_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities_test import ( diff --git a/datanode/entities/chain.go b/datanode/entities/chain.go index 6beeddbac2..60f153b7bf 100644 --- a/datanode/entities/chain.go +++ b/datanode/entities/chain.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/checkpoint.go b/datanode/entities/checkpoint.go index 658abc20d0..866e841cbf 100644 --- a/datanode/entities/checkpoint.go +++ b/datanode/entities/checkpoint.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/composite_price_state.go b/datanode/entities/composite_price_state.go new file mode 100644 index 0000000000..9fd25e8966 --- /dev/null +++ b/datanode/entities/composite_price_state.go @@ -0,0 +1,39 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package entities + +import ( + "code.vegaprotocol.io/vega/protos/vega" + + "google.golang.org/protobuf/encoding/protojson" +) + +type CompositePriceState struct { + *vega.CompositePriceState +} + +func (cps CompositePriceState) MarshalJSON() ([]byte, error) { + return protojson.Marshal(cps) +} + +func (cps *CompositePriceState) UnmarshalJSON(data []byte) error { + cps.CompositePriceState = &vega.CompositePriceState{} + return protojson.Unmarshal(data, cps) +} + +func (p CompositePriceState) ToProto() *vega.CompositePriceState { + return p.CompositePriceState +} diff --git a/datanode/entities/data.go b/datanode/entities/data.go index 17248cd191..b7e837c5da 100644 --- a/datanode/entities/data.go +++ b/datanode/entities/data.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/data_source_definition_test.go b/datanode/entities/data_source_definition_test.go index 8099273500..6314254819 100644 --- a/datanode/entities/data_source_definition_test.go +++ b/datanode/entities/data_source_definition_test.go @@ -25,6 +25,7 @@ import ( vegapb "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" v1 "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" "google.golang.org/protobuf/types/known/structpb" ) diff --git a/datanode/entities/data_source_spec.go b/datanode/entities/data_source_spec.go index ab604e87ac..b36df25ea0 100644 --- a/datanode/entities/data_source_spec.go +++ b/datanode/entities/data_source_spec.go @@ -13,17 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2023 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by vers - package entities import ( @@ -32,9 +21,7 @@ import ( "time" "code.vegaprotocol.io/vega/libs/ptr" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - vegapb "code.vegaprotocol.io/vega/protos/vega" ) diff --git a/datanode/entities/data_source_spec_test.go b/datanode/entities/data_source_spec_test.go index 3d972caa7e..7d495736a5 100644 --- a/datanode/entities/data_source_spec_test.go +++ b/datanode/entities/data_source_spec_test.go @@ -13,17 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2023 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by vers - package entities_test import ( @@ -35,8 +24,9 @@ import ( "code.vegaprotocol.io/vega/protos/vega" vegapb "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" - structpb "google.golang.org/protobuf/types/known/structpb" + "google.golang.org/protobuf/types/known/structpb" ) func TestExternalDataSourceSpecFromProto(t *testing.T) { diff --git a/datanode/entities/delegation.go b/datanode/entities/delegation.go index 85cb410f79..ba35bbdcc1 100644 --- a/datanode/entities/delegation.go +++ b/datanode/entities/delegation.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -36,6 +24,7 @@ import ( v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/shopspring/decimal" ) diff --git a/datanode/entities/deposit.go b/datanode/entities/deposit.go index 26f549aff7..dd9b71ef00 100644 --- a/datanode/entities/deposit.go +++ b/datanode/entities/deposit.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -34,6 +22,7 @@ import ( v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" ) diff --git a/datanode/entities/entities.go b/datanode/entities/entities.go index fa8b07feba..801b49f361 100644 --- a/datanode/entities/entities.go +++ b/datanode/entities/entities.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import "google.golang.org/protobuf/proto" @@ -38,7 +26,8 @@ type Entities interface { ProtocolUpgradeProposal | CoreSnapshotData | EpochRewardSummary | SuccessorMarket | StopOrder | LiquidityProvider | FundingPeriod | FundingPeriodDataPoint | ReferralSet | ReferralSetRefereeStats | FlattenReferralSetStats | Team | TeamMember | TeamMemberHistory | FundingPayment | FlattenVolumeDiscountStats | - PaidLiquidityFeesStats | CurrentAndPreviousLiquidityProvisions | TransferDetails + PaidLiquidityFeesStats | CurrentAndPreviousLiquidityProvisions | TransferDetails | Game | TeamsStatistics | TeamMembersStatistics | + PartyMarginMode | PartyProfile } type PagedEntity[T proto.Message] interface { diff --git a/datanode/entities/entities_test.go b/datanode/entities/entities_test.go index fd3892edfe..a94498c636 100644 --- a/datanode/entities/entities_test.go +++ b/datanode/entities/entities_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities_test import ( @@ -37,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/datanode/entities/enums.go b/datanode/entities/enums.go index 58a0d3742a..665a52a5d1 100644 --- a/datanode/entities/enums.go +++ b/datanode/entities/enums.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -34,9 +22,42 @@ import ( vegapb "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/jackc/pgtype" ) +type DispatchMetric vega.DispatchMetric + +const ( + DispatchMetricUnspecified DispatchMetric = DispatchMetric(vega.DispatchMetric_DISPATCH_METRIC_UNSPECIFIED) + DispatchMetricMakerFeePaid = DispatchMetric(vega.DispatchMetric_DISPATCH_METRIC_MAKER_FEES_PAID) + DispatchMetricMakerFeesReceived = DispatchMetric(vega.DispatchMetric_DISPATCH_METRIC_MAKER_FEES_RECEIVED) + DispatchMetricLPFeesReceived = DispatchMetric(vega.DispatchMetric_DISPATCH_METRIC_LP_FEES_RECEIVED) + DispatchMetricMarketValue = DispatchMetric(vega.DispatchMetric_DISPATCH_METRIC_MARKET_VALUE) + DispatchMetricAveragePosition = DispatchMetric(vega.DispatchMetric_DISPATCH_METRIC_AVERAGE_POSITION) + DispatchMetricRelativeReturn = DispatchMetric(vega.DispatchMetric_DISPATCH_METRIC_RELATIVE_RETURN) + DispatchMetricReturnVolatility = DispatchMetric(vega.DispatchMetric_DISPATCH_METRIC_RETURN_VOLATILITY) + DispatchMetricValidatorRanking = DispatchMetric(vega.DispatchMetric_DISPATCH_METRIC_VALIDATOR_RANKING) +) + +func (m DispatchMetric) EncodeText(_ *pgtype.ConnInfo, buf []byte) ([]byte, error) { + mode, ok := vega.DispatchMetric_name[int32(m)] + if !ok { + return buf, fmt.Errorf("unknown dispatch metric: %s", mode) + } + return append(buf, []byte(mode)...), nil +} + +func (m *DispatchMetric) DecodeText(_ *pgtype.ConnInfo, src []byte) error { + val, ok := vega.DispatchMetric_value[string(src)] + if !ok { + return fmt.Errorf("unknown dispatch metric: %s", src) + } + + *m = DispatchMetric(val) + return nil +} + type Side = vega.Side const ( @@ -291,6 +312,14 @@ func (m *TransferType) DecodeText(_ *pgtype.ConnInfo, src []byte) error { return nil } +type TransferScope int32 + +const ( + TransferScopeUnspecified TransferScope = 1 + TransferScopeIndividual TransferScope = 1 + TransferScopeTeam TransferScope = 2 +) + type TransferStatus eventspb.Transfer_Status const ( @@ -934,6 +963,8 @@ const ( StopOrderRejectionReasonMaxStopOrdersPerPartyReached = StopOrderRejectionReason(vega.StopOrder_REJECTION_REASON_MAX_STOP_ORDERS_PER_PARTY_REACHED) StopOrderRejectionReasonNotAllowedWithoutAPosition = StopOrderRejectionReason(vega.StopOrder_REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_WITHOUT_A_POSITION) StopOrderRejectionReasonNotClosingThePosition = StopOrderRejectionReason(vega.StopOrder_REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION) + StopOrderRejectionReasonNotAllowedDuringAuction = StopOrderRejectionReason(vega.StopOrder_REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION) + StopOrderRejectionReasonOCONotAllowedSameExpiryTime = StopOrderRejectionReason(vega.StopOrder_REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES) ) func (s StopOrderRejectionReason) EncodeText(_ *pgtype.ConnInfo, buf []byte) ([]byte, error) { @@ -977,3 +1008,54 @@ func (s *FundingPeriodDataPointSource) DecodeText(_ *pgtype.ConnInfo, src []byte *s = FundingPeriodDataPointSource(val) return nil } + +type LiquidityFeeSettingsMethod vega.LiquidityFeeSettings_Method + +const ( + LiquidityFeeMethodUnspecified = LiquidityFeeSettingsMethod(vega.LiquidityFeeSettings_METHOD_UNSPECIFIED) + LiquidityFeeMethodMarginalCost = LiquidityFeeSettingsMethod(vega.LiquidityFeeSettings_METHOD_MARGINAL_COST) + LiquidityFeeMethodWeightedAverage = LiquidityFeeSettingsMethod(vega.LiquidityFeeSettings_METHOD_WEIGHTED_AVERAGE) + LiquidityFeeMethodConstant = LiquidityFeeSettingsMethod(vega.LiquidityFeeSettings_METHOD_CONSTANT) +) + +func (s LiquidityFeeSettingsMethod) EncodeText(_ *pgtype.ConnInfo, buf []byte) ([]byte, error) { + status, ok := vega.LiquidityFeeSettings_Method_name[int32(s)] + if !ok { + return buf, fmt.Errorf("unknown liquidity provision status: %v", s) + } + return append(buf, []byte(status)...), nil +} + +func (s *LiquidityFeeSettingsMethod) DecodeText(_ *pgtype.ConnInfo, src []byte) error { + val, ok := vega.LiquidityFeeSettings_Method_value[string(src)] + if !ok { + return fmt.Errorf("unknown liquidity provision status: %s", src) + } + *s = LiquidityFeeSettingsMethod(val) + return nil +} + +type MarginMode vega.MarginMode + +const ( + MarginModeUnspecified = MarginMode(vega.MarginMode_MARGIN_MODE_UNSPECIFIED) + MarginModeCrossMargin = MarginMode(vega.MarginMode_MARGIN_MODE_CROSS_MARGIN) + MarginModeIsolatedMargin = MarginMode(vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN) +) + +func (m MarginMode) EncodeText(_ *pgtype.ConnInfo, buf []byte) ([]byte, error) { + str, ok := vega.MarginMode_name[int32(m)] + if !ok { + return buf, fmt.Errorf("unknown margin mode: %v", m) + } + return append(buf, []byte(str)...), nil +} + +func (m *MarginMode) DecodeText(_ *pgtype.ConnInfo, src []byte) error { + val, ok := vega.MarginMode_value[string(src)] + if !ok { + return fmt.Errorf("unknown margin mode: %s", src) + } + *m = MarginMode(val) + return nil +} diff --git a/datanode/entities/epoch.go b/datanode/entities/epoch.go index 254ea6a1e4..c2d7f69980 100644 --- a/datanode/entities/epoch.go +++ b/datanode/entities/epoch.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/erc20_multisig_event.go b/datanode/entities/erc20_multisig_event.go index 6ebf8dd415..33ebffa1aa 100644 --- a/datanode/entities/erc20_multisig_event.go +++ b/datanode/entities/erc20_multisig_event.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/ethereum_key_rotation.go b/datanode/entities/ethereum_key_rotation.go index 33f117b9e9..52ff67722c 100644 --- a/datanode/entities/ethereum_key_rotation.go +++ b/datanode/entities/ethereum_key_rotation.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/fees_stats.go b/datanode/entities/fees_stats.go index 98a0e8d093..0f977b69a4 100644 --- a/datanode/entities/fees_stats.go +++ b/datanode/entities/fees_stats.go @@ -1,3 +1,18 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + package entities import ( diff --git a/datanode/entities/funding_period.go b/datanode/entities/funding_period.go index ebf7c01279..f0db78ae14 100644 --- a/datanode/entities/funding_period.go +++ b/datanode/entities/funding_period.go @@ -20,13 +20,10 @@ import ( "fmt" "time" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - + "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" - + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" events "code.vegaprotocol.io/vega/protos/vega/events/v1" - - "code.vegaprotocol.io/vega/libs/num" ) type FundingPeriod struct { diff --git a/datanode/entities/game.go b/datanode/entities/game.go new file mode 100644 index 0000000000..e801be124b --- /dev/null +++ b/datanode/entities/game.go @@ -0,0 +1,177 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package entities + +import ( + "encoding/json" + "fmt" + + "code.vegaprotocol.io/vega/libs/num" + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "code.vegaprotocol.io/vega/protos/vega" +) + +type _Game struct{} + +type GameID = ID[_Game] + +type Game struct { + ID GameID + Epoch uint64 + Participants uint64 + Entities []GameEntity + RewardAssetID AssetID +} + +func (g Game) Cursor() *Cursor { + gc := GameCursor{ + EpochID: g.Epoch, + GameID: g.ID, + } + return NewCursor(gc.String()) +} + +func (g Game) ToProtoEdge(_ ...any) (*v2.GameEdge, error) { + return &v2.GameEdge{ + Node: g.ToProto(), + Cursor: g.Cursor().Encode(), + }, nil +} + +type GameCursor struct { + EpochID uint64 + GameID GameID +} + +func (gc GameCursor) String() string { + bs, err := json.Marshal(gc) + if err != nil { + panic(fmt.Errorf("could not marshal game cursor %v", err)) + } + return string(bs) +} + +func (gc *GameCursor) Parse(cursorString string) error { + if cursorString == "" { + return nil + } + return json.Unmarshal([]byte(cursorString), gc) +} + +type GameEntity interface { + IsGameEntity() +} + +type TeamGameParticipation struct { + TeamID TeamID + MembersParticipating []*IndividualGameEntity +} + +func (t TeamGameParticipation) ToProto() *v2.TeamGameParticipation { + members := make([]*v2.IndividualGameEntity, len(t.MembersParticipating)) + for i, member := range t.MembersParticipating { + members[i] = member.ToProto() + } + return &v2.TeamGameParticipation{ + TeamId: t.TeamID.String(), + MembersParticipating: members, + } +} + +type TeamGameEntity struct { + Team TeamGameParticipation + Rank uint64 + Volume num.Decimal + RewardMetric vega.DispatchMetric + RewardEarned *num.Uint + RewardEarnedQuantum *num.Uint + TotalRewardsEarned *num.Uint + TotalRewardsEarnedQuantum *num.Uint +} + +func (*TeamGameEntity) IsGameEntity() {} +func (t *TeamGameEntity) ToProto() *v2.TeamGameEntity { + return &v2.TeamGameEntity{ + Team: t.Team.ToProto(), + Rank: t.Rank, + Volume: t.Volume.String(), + RewardMetric: t.RewardMetric, + RewardEarned: t.RewardEarned.String(), + TotalRewardsEarned: t.TotalRewardsEarned.String(), + RewardEarnedQuantum: t.RewardEarnedQuantum.String(), + TotalRewardsEarnedQuantum: t.TotalRewardsEarnedQuantum.String(), + } +} + +type IndividualGameEntity struct { + Individual string + Rank uint64 + Volume num.Decimal + RewardMetric vega.DispatchMetric + RewardEarned *num.Uint + RewardEarnedQuantum *num.Uint + TotalRewardsEarned *num.Uint + TotalRewardsEarnedQuantum *num.Uint +} + +func (*IndividualGameEntity) IsGameEntity() {} + +func (i *IndividualGameEntity) ToProto() *v2.IndividualGameEntity { + return &v2.IndividualGameEntity{ + Individual: i.Individual, + Rank: i.Rank, + Volume: i.Volume.String(), + RewardMetric: i.RewardMetric, + RewardEarned: i.RewardEarned.String(), + TotalRewardsEarned: i.TotalRewardsEarned.String(), + RewardEarnedQuantum: i.RewardEarnedQuantum.String(), + TotalRewardsEarnedQuantum: i.TotalRewardsEarnedQuantum.String(), + } +} + +func (g Game) ToProto() *v2.Game { + gg := &v2.Game{ + Id: g.ID.String(), + RewardAssetId: g.RewardAssetID.String(), + Epoch: g.Epoch, + Participants: g.Participants, + Entities: nil, + } + teamEntities := make([]*v2.TeamGameEntity, 0) + individualEntities := make([]*v2.IndividualGameEntity, 0) + for _, e := range g.Entities { + switch entity := e.(type) { + case *TeamGameEntity: + teamEntities = append(teamEntities, entity.ToProto()) + case *IndividualGameEntity: + individualEntities = append(individualEntities, entity.ToProto()) + } + } + if len(teamEntities) > 0 { + gg.Entities = &v2.Game_Team{ + Team: &v2.TeamGameEntities{ + Team: teamEntities, + }, + } + return gg + } + gg.Entities = &v2.Game_Individual{ + Individual: &v2.IndividualGameEntities{ + Individual: individualEntities, + }, + } + return gg +} diff --git a/datanode/entities/id.go b/datanode/entities/id.go index dae100b146..fcf8184949 100644 --- a/datanode/entities/id.go +++ b/datanode/entities/id.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/key_rotation.go b/datanode/entities/key_rotation.go index 129b267e53..f43cc02e9b 100644 --- a/datanode/entities/key_rotation.go +++ b/datanode/entities/key_rotation.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/ledgerentry.go b/datanode/entities/ledgerentry.go index d069a6a257..0c3db8ec0f 100644 --- a/datanode/entities/ledgerentry.go +++ b/datanode/entities/ledgerentry.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -32,7 +20,9 @@ import ( "fmt" "time" + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/protos/vega" + "github.com/jackc/pgtype" "github.com/shopspring/decimal" ) @@ -48,6 +38,7 @@ type LedgerEntry struct { Type LedgerMovementType FromAccountBalance decimal.Decimal `db:"account_from_balance"` ToAccountBalance decimal.Decimal `db:"account_to_balance"` + TransferID TransferID } var LedgerEntryColumns = []string{ @@ -56,6 +47,7 @@ var LedgerEntryColumns = []string{ "tx_hash", "vega_time", "transfer_time", "type", "account_from_balance", "account_to_balance", + "transfer_id", } func (le LedgerEntry) ToProto(ctx context.Context, accountSource AccountSource) (*vega.LedgerEntry, error) { @@ -69,6 +61,11 @@ func (le LedgerEntry) ToProto(ctx context.Context, accountSource AccountSource) return nil, fmt.Errorf("getting to account for transfer proto:%w", err) } + var transferID *string + if le.TransferID != "" { + transferID = ptr.From(le.TransferID.String()) + } + return &vega.LedgerEntry{ FromAccount: fromAcc.ToAccountDetailsProto(), ToAccount: toAcc.ToAccountDetailsProto(), @@ -76,6 +73,7 @@ func (le LedgerEntry) ToProto(ctx context.Context, accountSource AccountSource) Type: vega.TransferType(le.Type), FromAccountBalance: le.FromAccountBalance.String(), ToAccountBalance: le.ToAccountBalance.String(), + TransferId: transferID, }, nil } @@ -91,6 +89,7 @@ func (le LedgerEntry) ToRow() []any { le.Type, le.FromAccountBalance, le.ToAccountBalance, + le.TransferID, } } @@ -101,58 +100,38 @@ func CreateLedgerEntryTime(vegaTime time.Time, seqNum int) time.Time { type LedgerMovementType vega.TransferType const ( - // Default value, always invalid. - LedgerMovementTypeUnspecified = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_UNSPECIFIED) - // Loss. - LedgerMovementTypeLoss = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_LOSS) - // Win. - LedgerMovementTypeWin = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_WIN) - // Mark to market loss. - LedgerMovementTypeMTMLoss = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MTM_LOSS) - // Mark to market win. - LedgerMovementTypeMTMWin = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MTM_WIN) - // Margin too low. - LedgerMovementTypeMarginLow = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MARGIN_LOW) - // Margin too high. - LedgerMovementTypeMarginHigh = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MARGIN_HIGH) - // Margin was confiscated. - LedgerMovementTypeMarginConfiscated = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MARGIN_CONFISCATED) - // Pay maker fee. - LedgerMovementTypeMakerFeePay = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MAKER_FEE_PAY) - // Receive maker fee. - LedgerMovementTypeMakerFeeReceive = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MAKER_FEE_RECEIVE) - // Pay infrastructure fee. - LedgerMovementTypeInfrastructureFeePay = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_INFRASTRUCTURE_FEE_PAY) - // Receive infrastructure fee. + LedgerMovementTypeUnspecified = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_UNSPECIFIED) + LedgerMovementTypeLoss = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_LOSS) + LedgerMovementTypeWin = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_WIN) + LedgerMovementTypeMTMLoss = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MTM_LOSS) + LedgerMovementTypeMTMWin = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MTM_WIN) + LedgerMovementTypeMarginLow = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MARGIN_LOW) + LedgerMovementTypeMarginHigh = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MARGIN_HIGH) + LedgerMovementTypeMarginConfiscated = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MARGIN_CONFISCATED) + LedgerMovementTypeMakerFeePay = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MAKER_FEE_PAY) + LedgerMovementTypeMakerFeeReceive = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_MAKER_FEE_RECEIVE) + LedgerMovementTypeInfrastructureFeePay = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_INFRASTRUCTURE_FEE_PAY) LedgerMovementTypeInfrastructureFeeDistribute = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_INFRASTRUCTURE_FEE_DISTRIBUTE) - // Pay liquidity fee. - LedgerMovementTypeLiquidityFeePay = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_LIQUIDITY_FEE_PAY) - // Receive liquidity fee. - LedgerMovementTypeLiquidityFeeDistribute = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_LIQUIDITY_FEE_DISTRIBUTE) - // Bond too low. - LedgerMovementTypeBondLow = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_BOND_LOW) - // Bond too high. - LedgerMovementTypeBondHigh = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_BOND_HIGH) - // Actual withdraw from system. - LedgerMovementTypeWithdraw = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_WITHDRAW) - // Deposit funds. - LedgerMovementTypeDeposit = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_DEPOSIT) - // Bond slashing. - LedgerMovementTypeBondSlashing = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_BOND_SLASHING) - // Reward payout. - LedgerMovementTypeRewardPayout = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_REWARD_PAYOUT) - LedgerMovementTypeTransferFundsSend = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_TRANSFER_FUNDS_SEND) - LedgerMovementTypeTransferFundsDistribute = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_TRANSFER_FUNDS_DISTRIBUTE) - LedgerMovementTypeClearAccount = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_CLEAR_ACCOUNT) - LedgerMovementTypePerpFundingWin = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_PERPETUALS_FUNDING_WIN) - LedgerMovementTypePerpFundingLoss = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_PERPETUALS_FUNDING_LOSS) - LedgerMovementTypeRewardsVested = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_REWARDS_VESTED) + LedgerMovementTypeLiquidityFeePay = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_LIQUIDITY_FEE_PAY) + LedgerMovementTypeLiquidityFeeDistribute = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_LIQUIDITY_FEE_DISTRIBUTE) + LedgerMovementTypeBondLow = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_BOND_LOW) + LedgerMovementTypeBondHigh = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_BOND_HIGH) + LedgerMovementTypeWithdraw = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_WITHDRAW) + LedgerMovementTypeDeposit = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_DEPOSIT) + LedgerMovementTypeBondSlashing = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_BOND_SLASHING) + LedgerMovementTypeRewardPayout = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_REWARD_PAYOUT) + LedgerMovementTypeTransferFundsSend = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_TRANSFER_FUNDS_SEND) + LedgerMovementTypeTransferFundsDistribute = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_TRANSFER_FUNDS_DISTRIBUTE) + LedgerMovementTypeClearAccount = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_CLEAR_ACCOUNT) + LedgerMovementTypePerpFundingWin = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_PERPETUALS_FUNDING_WIN) + LedgerMovementTypePerpFundingLoss = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_PERPETUALS_FUNDING_LOSS) + LedgerMovementTypeRewardsVested = LedgerMovementType(vega.TransferType_TRANSFER_TYPE_REWARDS_VESTED) ) func (l LedgerMovementType) EncodeText(_ *pgtype.ConnInfo, buf []byte) ([]byte, error) { ty, ok := vega.TransferType_name[int32(l)] if !ok { - return buf, fmt.Errorf("unknown transfer status: %s", ty) + return buf, fmt.Errorf("unknown ledger movement type: %s", ty) } return append(buf, []byte(ty)...), nil } @@ -160,7 +139,7 @@ func (l LedgerMovementType) EncodeText(_ *pgtype.ConnInfo, buf []byte) ([]byte, func (l *LedgerMovementType) DecodeText(_ *pgtype.ConnInfo, src []byte) error { val, ok := vega.TransferType_value[string(src)] if !ok { - return fmt.Errorf("unknown transfer status: %s", src) + return fmt.Errorf("unknown ledger movement type: %s", src) } *l = LedgerMovementType(val) diff --git a/datanode/entities/ledgerentry_filter.go b/datanode/entities/ledgerentry_filter.go index 05c0978122..c64779c959 100644 --- a/datanode/entities/ledgerentry_filter.go +++ b/datanode/entities/ledgerentry_filter.go @@ -24,7 +24,7 @@ import ( // Intended for generic use. type CloseOnLimitOperation bool -// Settings for receiving closed/open sets on different parts of the outputs of LedgerEntries. +// LedgerEntryFilter settings for receiving closed/open sets on different parts of the outputs of LedgerEntries. // Any kind of relation between the data types on logical and practical level in the set is the `limit operation`. // We close or not the set of output items on the limit operation via the `CloseOnOperation` set values. type LedgerEntryFilter struct { @@ -40,6 +40,9 @@ type LedgerEntryFilter struct { // Filter on LedgerMovementType TransferTypes []LedgerMovementType + + // Transfer ID to filter by + TransferID TransferID } func LedgerEntryFilterFromProto(pbFilter *v2.LedgerEntryFilter) (*LedgerEntryFilter, error) { @@ -66,6 +69,10 @@ func LedgerEntryFilterFromProto(pbFilter *v2.LedgerEntryFilter) (*LedgerEntryFil } } } + + if pbFilter.TransferId != nil { + filter.TransferID = TransferID(*pbFilter.TransferId) + } } return &filter, nil diff --git a/datanode/entities/liquidity_provider.go b/datanode/entities/liquidity_provider.go index 3184249372..be369bcf29 100644 --- a/datanode/entities/liquidity_provider.go +++ b/datanode/entities/liquidity_provider.go @@ -19,9 +19,8 @@ import ( "encoding/json" "fmt" - "code.vegaprotocol.io/vega/protos/vega" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "code.vegaprotocol.io/vega/protos/vega" ) type LiquidityProvider struct { diff --git a/datanode/entities/liquidity_provision.go b/datanode/entities/liquidity_provision.go index 2cee45fdd3..699f08b049 100644 --- a/datanode/entities/liquidity_provision.go +++ b/datanode/entities/liquidity_provision.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -34,6 +22,7 @@ import ( v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" + "github.com/jackc/pgtype" "github.com/shopspring/decimal" "google.golang.org/protobuf/encoding/protojson" diff --git a/datanode/entities/liquidity_provision_test.go b/datanode/entities/liquidity_provision_test.go index 5fc6107921..927a48878c 100644 --- a/datanode/entities/liquidity_provision_test.go +++ b/datanode/entities/liquidity_provision_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities_test import ( diff --git a/datanode/entities/margin_levels.go b/datanode/entities/margin_levels.go index 7ff6f6d08a..7620964a11 100644 --- a/datanode/entities/margin_levels.go +++ b/datanode/entities/margin_levels.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -35,31 +23,55 @@ import ( v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" ) type MarginLevels struct { AccountID AccountID + OrderMarginAccountID AccountID MaintenanceMargin decimal.Decimal SearchLevel decimal.Decimal InitialMargin decimal.Decimal CollateralReleaseLevel decimal.Decimal + OrderMargin decimal.Decimal Timestamp time.Time TxHash TxHash VegaTime time.Time + MarginMode MarginMode + MarginFactor decimal.Decimal } func MarginLevelsFromProto(ctx context.Context, margin *vega.MarginLevels, accountSource AccountSource, txHash TxHash, vegaTime time.Time) (MarginLevels, error) { var ( - maintenanceMargin, searchLevel, initialMargin, collateralReleaseLevel decimal.Decimal - err error + maintenanceMargin, searchLevel, initialMargin, collateralReleaseLevel, orderMargin decimal.Decimal + err error ) + marginFactor := decimal.NewFromInt32(0) + if len(margin.MarginFactor) > 0 { + marginFactor, err = decimal.NewFromString(margin.MarginFactor) + if err != nil { + return MarginLevels{}, fmt.Errorf("failed to obtain margin factor for margin level: %w", err) + } + } + marginMode := MarginModeCrossMargin + if margin.MarginMode == vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN { + marginMode = MarginMode(margin.MarginMode) + } marginAccount, err := GetAccountFromMarginLevel(ctx, margin, accountSource, txHash, vegaTime) if err != nil { return MarginLevels{}, fmt.Errorf("failed to obtain account for margin level: %w", err) } + orderMarginAccount, err := GetAccountFromOrderMarginLevel(ctx, margin, accountSource, txHash, vegaTime) + var orderMarginAccountID AccountID + if margin.MarginMode == vega.MarginMode_MARGIN_MODE_ISOLATED_MARGIN && err != nil { + return MarginLevels{}, fmt.Errorf("failed to obtain account for order margin level: %w", err) + } else { + orderMarginAccountID = orderMarginAccount.ID + } + if maintenanceMargin, err = decimal.NewFromString(margin.MaintenanceMargin); err != nil { return MarginLevels{}, fmt.Errorf("invalid maintenance margin: %w", err) } @@ -76,15 +88,25 @@ func MarginLevelsFromProto(ctx context.Context, margin *vega.MarginLevels, accou return MarginLevels{}, fmt.Errorf("invalid collateralReleaseLevel: %w", err) } + if len(margin.OrderMargin) == 0 { + orderMargin = decimal.NewFromInt32(0) + } else if orderMargin, err = decimal.NewFromString(margin.OrderMargin); err != nil { + return MarginLevels{}, fmt.Errorf("invalid orderMarginLevel: %w", err) + } + return MarginLevels{ AccountID: marginAccount.ID, + OrderMarginAccountID: orderMarginAccountID, MaintenanceMargin: maintenanceMargin, SearchLevel: searchLevel, InitialMargin: initialMargin, CollateralReleaseLevel: collateralReleaseLevel, + OrderMargin: orderMargin, Timestamp: time.Unix(0, vegaTime.UnixNano()), TxHash: txHash, VegaTime: vegaTime, + MarginMode: marginMode, + MarginFactor: marginFactor, }, nil } @@ -103,6 +125,21 @@ func GetAccountFromMarginLevel(ctx context.Context, margin *vega.MarginLevels, a return marginAccount, err } +func GetAccountFromOrderMarginLevel(ctx context.Context, margin *vega.MarginLevels, accountSource AccountSource, txHash TxHash, vegaTime time.Time) (Account, error) { + orderMarginAccount := Account{ + ID: "", + PartyID: PartyID(margin.PartyId), + AssetID: AssetID(margin.Asset), + MarketID: MarketID(margin.MarketId), + Type: vega.AccountType_ACCOUNT_TYPE_ORDER_MARGIN, + TxHash: txHash, + VegaTime: vegaTime, + } + + err := accountSource.Obtain(ctx, &orderMarginAccount) + return orderMarginAccount, err +} + func (ml *MarginLevels) ToProto(ctx context.Context, accountSource AccountSource) (*vega.MarginLevels, error) { marginAccount, err := accountSource.GetByID(ctx, ml.AccountID) if err != nil { @@ -114,10 +151,13 @@ func (ml *MarginLevels) ToProto(ctx context.Context, accountSource AccountSource SearchLevel: ml.SearchLevel.String(), InitialMargin: ml.InitialMargin.String(), CollateralReleaseLevel: ml.CollateralReleaseLevel.String(), + OrderMargin: ml.OrderMargin.String(), PartyId: marginAccount.PartyID.String(), MarketId: marginAccount.MarketID.String(), Asset: marginAccount.AssetID.String(), Timestamp: ml.Timestamp.UnixNano(), + MarginMode: vega.MarginMode(ml.MarginMode), + MarginFactor: ml.MarginFactor.String(), }, nil } @@ -166,14 +206,16 @@ func (ml MarginLevels) Key() MarginLevelsKey { func (ml MarginLevels) ToRow() []interface{} { return []interface{}{ - ml.AccountID, ml.Timestamp, ml.MaintenanceMargin, - ml.SearchLevel, ml.InitialMargin, ml.CollateralReleaseLevel, ml.TxHash, ml.VegaTime, + ml.AccountID, ml.OrderMarginAccountID, ml.Timestamp, ml.MaintenanceMargin, + ml.SearchLevel, ml.InitialMargin, ml.CollateralReleaseLevel, ml.OrderMargin, ml.TxHash, ml.VegaTime, + ml.MarginMode, ml.MarginFactor, } } var MarginLevelsColumns = []string{ - "account_id", "timestamp", "maintenance_margin", - "search_level", "initial_margin", "collateral_release_level", "tx_hash", "vega_time", + "account_id", "order_margin_account_id", "timestamp", "maintenance_margin", + "search_level", "initial_margin", "collateral_release_level", "order_margin", "tx_hash", + "vega_time", "margin_mode", "margin_factor", } type MarginCursor struct { diff --git a/datanode/entities/margin_mode.go b/datanode/entities/margin_mode.go new file mode 100644 index 0000000000..1f776bd553 --- /dev/null +++ b/datanode/entities/margin_mode.go @@ -0,0 +1,129 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package entities + +import ( + "encoding/json" + "fmt" + + "code.vegaprotocol.io/vega/libs/num" + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "code.vegaprotocol.io/vega/protos/vega" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" +) + +type PartyMarginMode struct { + MarketID MarketID + PartyID PartyID + MarginMode vega.MarginMode + MarginFactor *num.Decimal + MinTheoreticalMarginFactor *num.Decimal + MaxTheoreticalLeverage *num.Decimal + AtEpoch uint64 +} + +func (t PartyMarginMode) Cursor() *Cursor { + tc := PartyMarginModeCursor{ + MarketID: t.MarketID, + PartyID: t.PartyID, + } + return NewCursor(tc.String()) +} + +func (t PartyMarginMode) ToProto() *v2.PartyMarginMode { + var marginFactor, minTheoreticalMarginFactor, maxTheoreticalLeverage *string + + if t.MarginFactor != nil { + factor := t.MarginFactor.String() + marginFactor = &factor + } + + if t.MinTheoreticalMarginFactor != nil { + factor := t.MinTheoreticalMarginFactor.String() + minTheoreticalMarginFactor = &factor + } + + if t.MaxTheoreticalLeverage != nil { + leverage := t.MaxTheoreticalLeverage.String() + maxTheoreticalLeverage = &leverage + } + + return &v2.PartyMarginMode{ + MarketId: string(t.MarketID), + PartyId: string(t.PartyID), + MarginMode: t.MarginMode, + MarginFactor: marginFactor, + MinTheoreticalMarginFactor: minTheoreticalMarginFactor, + MaxTheoreticalLeverage: maxTheoreticalLeverage, + AtEpoch: t.AtEpoch, + } +} + +func (t PartyMarginMode) ToProtoEdge(_ ...any) (*v2.PartyMarginModeEdge, error) { + return &v2.PartyMarginModeEdge{ + Node: t.ToProto(), + Cursor: t.Cursor().Encode(), + }, nil +} + +func PartyMarginModeFromProto(update *eventspb.PartyMarginModeUpdated) PartyMarginMode { + var marginFactor, minTheoreticalMarginFactor, maxTheoreticalLeverage *num.Decimal + + if update.MarginFactor != nil { + factor, _ := num.DecimalFromString(*update.MarginFactor) + marginFactor = &factor + } + + if update.MinTheoreticalMarginFactor != nil { + factor, _ := num.DecimalFromString(*update.MinTheoreticalMarginFactor) + minTheoreticalMarginFactor = &factor + } + + if update.MaxTheoreticalLeverage != nil { + factor, _ := num.DecimalFromString(*update.MaxTheoreticalLeverage) + maxTheoreticalLeverage = &factor + } + + return PartyMarginMode{ + MarketID: MarketID(update.MarketId), + PartyID: PartyID(update.PartyId), + MarginMode: update.MarginMode, + MarginFactor: marginFactor, + MinTheoreticalMarginFactor: minTheoreticalMarginFactor, + MaxTheoreticalLeverage: maxTheoreticalLeverage, + AtEpoch: update.AtEpoch, + } +} + +type PartyMarginModeCursor struct { + MarketID MarketID + PartyID PartyID +} + +func (tc PartyMarginModeCursor) String() string { + bs, err := json.Marshal(tc) + if err != nil { + panic(fmt.Errorf("could not marshal party margin mode cursor: %v", err)) + } + return string(bs) +} + +func (tc *PartyMarginModeCursor) Parse(cursorString string) error { + if cursorString == "" { + return nil + } + return json.Unmarshal([]byte(cursorString), tc) +} diff --git a/datanode/entities/market.go b/datanode/entities/market.go index 916c21df15..2083e024cf 100644 --- a/datanode/entities/market.go +++ b/datanode/entities/market.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -34,12 +22,13 @@ import ( "math" "time" - "code.vegaprotocol.io/vega/libs/ptr" - "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/ptr" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" + "google.golang.org/protobuf/encoding/protojson" ) type _Market struct{} @@ -69,7 +58,9 @@ type Market struct { LiquiditySLAParameters LiquiditySLAParameters // Not saved in the market table, but used when retrieving data from the database. // This will be populated when a market has a successor - SuccessorMarketID MarketID + SuccessorMarketID MarketID + LiquidationStrategy LiquidationStrategy + MarkPriceConfiguration *CompositePriceConfiguration } type MarketCursor struct { @@ -94,12 +85,15 @@ func (mc *MarketCursor) Parse(cursorString string) error { } func NewMarketFromProto(market *vega.Market, txHash TxHash, vegaTime time.Time) (*Market, error) { - var err error - var liquidityMonitoringParameters LiquidityMonitoringParameters - var marketTimestamps MarketTimestamps - var priceMonitoringSettings PriceMonitoringSettings - var openingAuction AuctionDuration - var fees Fees + var ( + err error + liquidityMonitoringParameters LiquidityMonitoringParameters + marketTimestamps MarketTimestamps + priceMonitoringSettings PriceMonitoringSettings + openingAuction AuctionDuration + fees Fees + liqStrat LiquidationStrategy + ) if fees, err = feesFromProto(market.Fees); err != nil { return nil, err @@ -173,6 +167,11 @@ func NewMarketFromProto(market *vega.Market, txHash TxHash, vegaTime time.Time) return nil, err } } + if market.LiquidationStrategy != nil { + liqStrat = LiquidationStrategyFromProto(market.LiquidationStrategy) + } + + mpc := &CompositePriceConfiguration{market.MarkPriceConfiguration} return &Market{ ID: MarketID(market.Id), @@ -195,6 +194,8 @@ func NewMarketFromProto(market *vega.Market, txHash TxHash, vegaTime time.Time) ParentMarketID: parentMarketID, InsurancePoolFraction: insurancePoolFraction, LiquiditySLAParameters: sla, + LiquidationStrategy: liqStrat, + MarkPriceConfiguration: mpc, }, nil } @@ -223,6 +224,18 @@ func (m Market) ToProto() *vega.Market { if m.SuccessorMarketID != "" { successorMarketID = ptr.From(m.SuccessorMarketID.String()) } + if m.MarkPriceConfiguration == nil { + m.MarkPriceConfiguration = &CompositePriceConfiguration{ + CompositePriceConfiguration: &vega.CompositePriceConfiguration{ + CompositePriceType: vega.CompositePriceType_COMPOSITE_PRICE_TYPE_LAST_TRADE, + }, + } + } else if m.MarkPriceConfiguration.CompositePriceConfiguration == nil { + // got to love wrapped types like this + m.MarkPriceConfiguration.CompositePriceConfiguration = &vega.CompositePriceConfiguration{ + CompositePriceType: vega.CompositePriceType_COMPOSITE_PRICE_TYPE_LAST_TRADE, + } + } return &vega.Market{ Id: m.ID.String(), @@ -246,6 +259,8 @@ func (m Market) ToProto() *vega.Market { InsurancePoolFraction: insurancePoolFraction, SuccessorMarketId: successorMarketID, LiquiditySlaParams: m.LiquiditySLAParameters.IntoProto(), + LiquidationStrategy: m.LiquidationStrategy.IntoProto(), + MarkPriceConfiguration: m.MarkPriceConfiguration.CompositePriceConfiguration, } } @@ -307,8 +322,6 @@ func (tsp TargetStakeParameters) ToProto() *vega.TargetStakeParameters { type LiquidityMonitoringParameters struct { TargetStakeParameters *TargetStakeParameters `json:"targetStakeParameters,omitempty"` - TriggeringRatio string `json:"triggeringRatio,omitempty"` - AuctionExtension int64 `json:"auctionExtension,omitempty"` } type LiquiditySLAParameters struct { @@ -318,6 +331,53 @@ type LiquiditySLAParameters struct { SlaCompetitionFactor num.Decimal `json:"slaCompetitionFactor,omitempty"` } +type CompositePriceConfiguration struct { + *vega.CompositePriceConfiguration +} + +func (cpc CompositePriceConfiguration) MarshalJSON() ([]byte, error) { + return protojson.Marshal(cpc) +} + +func (cpc *CompositePriceConfiguration) UnmarshalJSON(data []byte) error { + cpc.CompositePriceConfiguration = &vega.CompositePriceConfiguration{} + return protojson.Unmarshal(data, cpc) +} + +func (cpc CompositePriceConfiguration) ToProto() *vega.CompositePriceConfiguration { + return cpc.CompositePriceConfiguration +} + +type LiquidationStrategy struct { + DisposalTimeStep time.Duration `json:"disposalTimeStep"` + DisposalFraction num.Decimal `json:"disposalFraction"` + FullDisposalSize uint64 `json:"fullDisposalSize"` + MaxFractionConsumed num.Decimal `json:"maxFractionConsumed"` +} + +func LiquidationStrategyFromProto(ls *vega.LiquidationStrategy) LiquidationStrategy { + if ls == nil { + return LiquidationStrategy{} + } + df, _ := num.DecimalFromString(ls.DisposalFraction) + mfc, _ := num.DecimalFromString(ls.MaxFractionConsumed) + return LiquidationStrategy{ + DisposalTimeStep: time.Duration(ls.DisposalTimeStep) * time.Second, + FullDisposalSize: ls.FullDisposalSize, + DisposalFraction: df, + MaxFractionConsumed: mfc, + } +} + +func (l LiquidationStrategy) IntoProto() *vega.LiquidationStrategy { + return &vega.LiquidationStrategy{ + DisposalTimeStep: int64(l.DisposalTimeStep / time.Second), + DisposalFraction: l.DisposalFraction.String(), + FullDisposalSize: l.FullDisposalSize, + MaxFractionConsumed: l.MaxFractionConsumed.String(), + } +} + func (lsp LiquiditySLAParameters) IntoProto() *vega.LiquiditySLAParameters { return &vega.LiquiditySLAParameters{ PriceRange: lsp.PriceRange.String(), @@ -358,8 +418,6 @@ func (lmp LiquidityMonitoringParameters) ToProto() *vega.LiquidityMonitoringPara } return &vega.LiquidityMonitoringParameters{ TargetStakeParameters: lmp.TargetStakeParameters.ToProto(), - TriggeringRatio: lmp.TriggeringRatio, - AuctionExtension: lmp.AuctionExtension, } } @@ -379,8 +437,6 @@ func liquidityMonitoringParametersFromProto(lmp *vega.LiquidityMonitoringParamet return LiquidityMonitoringParameters{ TargetStakeParameters: tsp, - TriggeringRatio: lmp.TriggeringRatio, - AuctionExtension: lmp.AuctionExtension, }, nil } @@ -454,8 +510,14 @@ type FeeFactors struct { LiquidityFee string `json:"liquidityFee,omitempty"` } +type LiquidityFeeSettings struct { + Method LiquidityFeeSettingsMethod `json:"makerFee,omitempty"` + FeeConstant *string `json:"feeConstant,omitempty"` +} + type Fees struct { - Factors *FeeFactors `json:"factors,omitempty"` + Factors *FeeFactors `json:"factors,omitempty"` + LiquidityFeeSettings *LiquidityFeeSettings `json:"liquidityFeeSettings,omitempty"` } func (f Fees) ToProto() *vega.Fees { @@ -463,12 +525,21 @@ func (f Fees) ToProto() *vega.Fees { return nil } + var liquidityFeeSettings *vega.LiquidityFeeSettings + if f.LiquidityFeeSettings != nil { + liquidityFeeSettings = &vega.LiquidityFeeSettings{ + Method: vega.LiquidityFeeSettings_Method(f.LiquidityFeeSettings.Method), + FeeConstant: f.LiquidityFeeSettings.FeeConstant, + } + } + return &vega.Fees{ Factors: &vega.FeeFactors{ MakerFee: f.Factors.MakerFee, InfrastructureFee: f.Factors.InfrastructureFee, LiquidityFee: f.Factors.LiquidityFee, }, + LiquidityFeeSettings: liquidityFeeSettings, } } @@ -477,11 +548,20 @@ func feesFromProto(fees *vega.Fees) (Fees, error) { return Fees{}, errors.New("fees cannot be Nil") } + var liquidityFeeSettings *LiquidityFeeSettings + if fees.LiquidityFeeSettings != nil { + liquidityFeeSettings = &LiquidityFeeSettings{ + Method: LiquidityFeeSettingsMethod(fees.LiquidityFeeSettings.Method), + FeeConstant: fees.LiquidityFeeSettings.FeeConstant, + } + } + return Fees{ Factors: &FeeFactors{ MakerFee: fees.Factors.MakerFee, InfrastructureFee: fees.Factors.InfrastructureFee, LiquidityFee: fees.Factors.LiquidityFee, }, + LiquidityFeeSettings: liquidityFeeSettings, }, nil } diff --git a/datanode/entities/market_depth.go b/datanode/entities/market_depth.go index ec0dacb433..96b6d32cbd 100644 --- a/datanode/entities/market_depth.go +++ b/datanode/entities/market_depth.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/marketdata.go b/datanode/entities/marketdata.go index 20b95a0745..4cf657e573 100644 --- a/datanode/entities/marketdata.go +++ b/datanode/entities/marketdata.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -37,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/libs/num" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" types "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" ) @@ -110,7 +99,7 @@ type MarketData struct { VegaTime time.Time // SeqNum is the order in which the market data was received in the block SeqNum uint64 - // NextMarkToMarket is the next timestamp when the market wil be marked to market + // NextMarkToMarket is the next timestamp when the market will be marked to market NextMarkToMarket time.Time // market growth for the last market window MarketGrowth num.Decimal @@ -119,6 +108,12 @@ type MarketData struct { LastTradedPrice num.Decimal // Data specific to the product type ProductData *ProductData + // NextNetworkCloseout is the time at which the network will attempt its next closeout order. + NextNetworkCloseout time.Time + // The methodology used for the calculation of the mark price. + MarkPriceType string + // The internal state of the mark price composite price. + MarkPriceState *CompositePriceState } type PriceMonitoringTrigger struct { @@ -182,6 +177,7 @@ func MarketDataFromProto(data *types.MarketData, txHash TxHash) (*MarketData, er return nil, err } nextMTM := time.Unix(0, data.NextMarkToMarket) + nextNC := time.Unix(0, data.NextNetworkCloseout) marketData := &MarketData{ LastTradedPrice: lastTradedPrice, @@ -215,6 +211,12 @@ func MarketDataFromProto(data *types.MarketData, txHash TxHash) (*MarketData, er TxHash: txHash, NextMarkToMarket: nextMTM, MarketGrowth: growth, + NextNetworkCloseout: nextNC, + MarkPriceType: data.MarkPriceType.String(), + } + + if data.MarkPriceState != nil { + marketData.MarkPriceState = &CompositePriceState{data.MarkPriceState} } if data.ProductData != nil { @@ -246,6 +248,16 @@ func (md MarketData) Equal(other MarketData) bool { if other.ProductData != nil { productData2, _ = other.ProductData.MarshalJSON() } + + markPriceState1 := []byte{} + markPriceState2 := []byte{} + if md.MarkPriceState != nil { + markPriceState1, _ = md.MarkPriceState.MarshalJSON() + } + if other.MarkPriceState != nil { + markPriceState2, _ = other.MarkPriceState.MarshalJSON() + } + return md.LastTradedPrice.Equals(other.LastTradedPrice) && md.MarkPrice.Equals(other.MarkPrice) && md.BestBidPrice.Equals(other.BestBidPrice) && @@ -277,7 +289,10 @@ func (md MarketData) Equal(other MarketData) bool { md.MarketState == other.MarketState && md.NextMarkToMarket.Equal(other.NextMarkToMarket) && md.MarketGrowth.Equal(other.MarketGrowth) && - bytes.Equal(productData1, productData2) + bytes.Equal(productData1, productData2) && + md.NextNetworkCloseout.Equal(other.NextNetworkCloseout) && + md.MarkPriceType == other.MarkPriceType && + bytes.Equal(markPriceState1, markPriceState2) } func priceMonitoringBoundsMatches(bounds, other []*types.PriceMonitoringBounds) bool { @@ -375,12 +390,18 @@ func (md MarketData) ToProto() *types.MarketData { LiquidityProviderSla: md.LiquidityProviderSLA, NextMarkToMarket: md.NextMarkToMarket.UnixNano(), MarketGrowth: md.MarketGrowth.String(), + NextNetworkCloseout: md.NextNetworkCloseout.UnixNano(), + MarkPriceType: types.CompositePriceType(types.CompositePriceType_value[md.MarkPriceType]), } if md.ProductData != nil { result.ProductData = md.ProductData.ProductData } + if md.MarkPriceState != nil { + result.MarkPriceState = md.MarkPriceState.CompositePriceState + } + return &result } diff --git a/datanode/entities/marketdata_test.go b/datanode/entities/marketdata_test.go index 6b5a98556e..84c47bede2 100644 --- a/datanode/entities/marketdata_test.go +++ b/datanode/entities/marketdata_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities_test import ( @@ -33,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" types "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" ) @@ -205,6 +194,7 @@ func testParseMarketDataSuccessfully(t *testing.T) { } nextMTM := time.Now() + nextNC := time.Now() zeroTime := time.Unix(0, 0) testCases := []struct { @@ -218,70 +208,81 @@ func testParseMarketDataSuccessfully(t *testing.T) { marketdata: types.MarketData{}, }, want: &entities.MarketData{ - AuctionTrigger: "AUCTION_TRIGGER_UNSPECIFIED", - MarketState: "STATE_UNSPECIFIED", - MarketTradingMode: "TRADING_MODE_UNSPECIFIED", - ExtensionTrigger: "AUCTION_TRIGGER_UNSPECIFIED", - TxHash: generateTxHash(), - NextMarkToMarket: zeroTime, + AuctionTrigger: "AUCTION_TRIGGER_UNSPECIFIED", + MarketState: "STATE_UNSPECIFIED", + MarketTradingMode: "TRADING_MODE_UNSPECIFIED", + ExtensionTrigger: "AUCTION_TRIGGER_UNSPECIFIED", + TxHash: generateTxHash(), + NextMarkToMarket: zeroTime, + NextNetworkCloseout: zeroTime, + MarkPriceType: "COMPOSITE_PRICE_TYPE_UNSPECIFIED", }, }, { name: "Market data with auction trigger specified", args: args{ marketdata: types.MarketData{ - Trigger: types.AuctionTrigger_AUCTION_TRIGGER_PRICE, - NextMarkToMarket: nextMTM.UnixNano(), + Trigger: types.AuctionTrigger_AUCTION_TRIGGER_PRICE, + NextMarkToMarket: nextMTM.UnixNano(), + NextNetworkCloseout: nextNC.UnixNano(), }, }, want: &entities.MarketData{ - AuctionTrigger: "AUCTION_TRIGGER_PRICE", - MarketState: "STATE_UNSPECIFIED", - MarketTradingMode: "TRADING_MODE_UNSPECIFIED", - ExtensionTrigger: "AUCTION_TRIGGER_UNSPECIFIED", - NextMarkToMarket: nextMTM, - TxHash: generateTxHash(), + AuctionTrigger: "AUCTION_TRIGGER_PRICE", + MarketState: "STATE_UNSPECIFIED", + MarketTradingMode: "TRADING_MODE_UNSPECIFIED", + ExtensionTrigger: "AUCTION_TRIGGER_UNSPECIFIED", + MarkPriceType: "COMPOSITE_PRICE_TYPE_UNSPECIFIED", + NextMarkToMarket: nextMTM, + NextNetworkCloseout: nextNC, + TxHash: generateTxHash(), }, }, { name: "Market data with auction trigger and market trading mode specified", args: args{ marketdata: types.MarketData{ - Trigger: types.AuctionTrigger_AUCTION_TRIGGER_PRICE, - MarketTradingMode: types.Market_TRADING_MODE_CONTINUOUS, - NextMarkToMarket: nextMTM.UnixNano(), + Trigger: types.AuctionTrigger_AUCTION_TRIGGER_PRICE, + MarketTradingMode: types.Market_TRADING_MODE_CONTINUOUS, + NextMarkToMarket: nextMTM.UnixNano(), + NextNetworkCloseout: nextNC.UnixNano(), }, }, want: &entities.MarketData{ - AuctionTrigger: "AUCTION_TRIGGER_PRICE", - MarketTradingMode: "TRADING_MODE_CONTINUOUS", - MarketState: "STATE_UNSPECIFIED", - ExtensionTrigger: "AUCTION_TRIGGER_UNSPECIFIED", - NextMarkToMarket: nextMTM, - TxHash: generateTxHash(), + AuctionTrigger: "AUCTION_TRIGGER_PRICE", + MarketTradingMode: "TRADING_MODE_CONTINUOUS", + MarketState: "STATE_UNSPECIFIED", + ExtensionTrigger: "AUCTION_TRIGGER_UNSPECIFIED", + MarkPriceType: "COMPOSITE_PRICE_TYPE_UNSPECIFIED", + NextMarkToMarket: nextMTM, + NextNetworkCloseout: nextNC, + TxHash: generateTxHash(), }, }, { name: "Market data with best bid and best offer specified", args: args{ marketdata: types.MarketData{ - BestBidPrice: "100.0", - BestOfferPrice: "110.0", - Trigger: types.AuctionTrigger_AUCTION_TRIGGER_PRICE, - MarketTradingMode: types.Market_TRADING_MODE_CONTINUOUS, - MarketState: types.Market_STATE_ACTIVE, - NextMarkToMarket: nextMTM.UnixNano(), + BestBidPrice: "100.0", + BestOfferPrice: "110.0", + Trigger: types.AuctionTrigger_AUCTION_TRIGGER_PRICE, + MarketTradingMode: types.Market_TRADING_MODE_CONTINUOUS, + MarketState: types.Market_STATE_ACTIVE, + NextMarkToMarket: nextMTM.UnixNano(), + NextNetworkCloseout: nextNC.UnixNano(), }, }, want: &entities.MarketData{ - BestBidPrice: decimal.NewFromFloat(100.0), - BestOfferPrice: decimal.NewFromFloat(110.0), - AuctionTrigger: "AUCTION_TRIGGER_PRICE", - MarketState: "STATE_ACTIVE", - MarketTradingMode: "TRADING_MODE_CONTINUOUS", - ExtensionTrigger: "AUCTION_TRIGGER_UNSPECIFIED", - TxHash: generateTxHash(), - NextMarkToMarket: nextMTM, + BestBidPrice: decimal.NewFromFloat(100.0), + BestOfferPrice: decimal.NewFromFloat(110.0), + AuctionTrigger: "AUCTION_TRIGGER_PRICE", + MarketState: "STATE_ACTIVE", + MarketTradingMode: "TRADING_MODE_CONTINUOUS", + ExtensionTrigger: "AUCTION_TRIGGER_UNSPECIFIED", + MarkPriceType: "COMPOSITE_PRICE_TYPE_UNSPECIFIED", + TxHash: generateTxHash(), + NextMarkToMarket: nextMTM, + NextNetworkCloseout: nextNC, }, }, { @@ -298,7 +299,8 @@ func testParseMarketDataSuccessfully(t *testing.T) { MaxValidPrice: "200", }, }, - NextMarkToMarket: nextMTM.UnixNano(), + NextMarkToMarket: nextMTM.UnixNano(), + NextNetworkCloseout: nextNC.UnixNano(), }, }, want: &entities.MarketData{ @@ -308,6 +310,7 @@ func testParseMarketDataSuccessfully(t *testing.T) { MarketTradingMode: "TRADING_MODE_CONTINUOUS", MarketState: "STATE_UNSPECIFIED", ExtensionTrigger: "AUCTION_TRIGGER_UNSPECIFIED", + MarkPriceType: "COMPOSITE_PRICE_TYPE_UNSPECIFIED", PriceMonitoringBounds: []*types.PriceMonitoringBounds{ { MinValidPrice: "100", @@ -315,8 +318,9 @@ func testParseMarketDataSuccessfully(t *testing.T) { ReferencePrice: "", }, }, - TxHash: generateTxHash(), - NextMarkToMarket: nextMTM, + TxHash: generateTxHash(), + NextMarkToMarket: nextMTM, + NextNetworkCloseout: nextNC, }, }, } diff --git a/datanode/entities/network_limits.go b/datanode/entities/network_limits.go index 23dd39da5b..6a5eaf614a 100644 --- a/datanode/entities/network_limits.go +++ b/datanode/entities/network_limits.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/network_parameter.go b/datanode/entities/network_parameter.go index e9ce39c215..5fbb8adb09 100644 --- a/datanode/entities/network_parameter.go +++ b/datanode/entities/network_parameter.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/node.go b/datanode/entities/node.go index e36414c4f4..7e7d00468f 100644 --- a/datanode/entities/node.go +++ b/datanode/entities/node.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -36,6 +24,7 @@ import ( v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/shopspring/decimal" "google.golang.org/protobuf/encoding/protojson" ) diff --git a/datanode/entities/node_signature.go b/datanode/entities/node_signature.go index 7065246c1b..67859183e2 100644 --- a/datanode/entities/node_signature.go +++ b/datanode/entities/node_signature.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/oracle_data.go b/datanode/entities/oracle_data.go index 631bdd277f..dbc63b490a 100644 --- a/datanode/entities/oracle_data.go +++ b/datanode/entities/oracle_data.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/oracle_spec.go b/datanode/entities/oracle_spec.go index 9e676b72c3..b52e225525 100644 --- a/datanode/entities/oracle_spec.go +++ b/datanode/entities/oracle_spec.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/order.go b/datanode/entities/order.go index b80c4d73b4..8ae7e649ed 100644 --- a/datanode/entities/order.go +++ b/datanode/entities/order.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -38,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/libs/ptr" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" ) diff --git a/datanode/entities/pagination.go b/datanode/entities/pagination.go index defb20a269..dbbbc51e44 100644 --- a/datanode/entities/pagination.go +++ b/datanode/entities/pagination.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -32,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/libs/ptr" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/pkg/errors" ) diff --git a/datanode/entities/pagination_test.go b/datanode/entities/pagination_test.go index f296584a83..4f6d6c2fac 100644 --- a/datanode/entities/pagination_test.go +++ b/datanode/entities/pagination_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities_test import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/libs/ptr" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/stretchr/testify/assert" ) diff --git a/datanode/entities/party.go b/datanode/entities/party.go index 6ddfd0a7e3..442a4ecc0a 100644 --- a/datanode/entities/party.go +++ b/datanode/entities/party.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -54,7 +42,9 @@ func PartyFromProto(pp *vegapb.Party, txHash TxHash) Party { } func (p Party) ToProto() *vegapb.Party { - return &vegapb.Party{Id: p.ID.String()} + return &vegapb.Party{ + Id: p.ID.String(), + } } func (p Party) Cursor() *Cursor { @@ -83,3 +73,71 @@ func (p Party) String() string { } return string(bs) } + +type PartyProfile struct { + PartyID PartyID + Alias string + Metadata []*vegapb.Metadata +} + +func (p PartyProfile) ToProto() *vegapb.PartyProfile { + return &vegapb.PartyProfile{ + PartyId: p.PartyID.String(), + Alias: p.Alias, + Metadata: p.Metadata, + } +} + +func (p PartyProfile) Cursor() *Cursor { + return NewCursor(p.String()) +} + +func (p PartyProfile) ToProtoEdge(_ ...any) (*v2.PartyProfileEdge, error) { + return &v2.PartyProfileEdge{ + Node: p.ToProto(), + Cursor: p.Cursor().Encode(), + }, nil +} + +func (p *PartyProfile) Parse(cursorString string) error { + if cursorString == "" { + return nil + } + + return json.Unmarshal([]byte(cursorString), p) +} + +func (p PartyProfile) String() string { + bs, err := json.Marshal(p) + if err != nil { + panic(fmt.Errorf("failed to marshal party profile: %w", err)) + } + return string(bs) +} + +func PartyProfileFromProto(t *vegapb.PartyProfile) *PartyProfile { + return &PartyProfile{ + PartyID: PartyID(t.PartyId), + Alias: t.Alias, + Metadata: t.Metadata, + } +} + +type PartyProfileCursor struct { + ID PartyID +} + +func (tc PartyProfileCursor) String() string { + bs, err := json.Marshal(tc) + if err != nil { + panic(fmt.Errorf("could not marshal party profile cursor: %v", err)) + } + return string(bs) +} + +func (tc *PartyProfileCursor) Parse(cursorString string) error { + if cursorString == "" { + return nil + } + return json.Unmarshal([]byte(cursorString), tc) +} diff --git a/datanode/entities/party_vesting_balances.go b/datanode/entities/party_vesting_balances.go index e5a2de0268..24ec8a8c6a 100644 --- a/datanode/entities/party_vesting_balances.go +++ b/datanode/entities/party_vesting_balances.go @@ -1,3 +1,18 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + package entities import ( diff --git a/datanode/entities/position.go b/datanode/entities/position.go index a4b4462541..532aa705fa 100644 --- a/datanode/entities/position.go +++ b/datanode/entities/position.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -32,11 +20,12 @@ import ( "fmt" "time" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/libs/num" + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" ) @@ -107,24 +96,55 @@ func NewEmptyPosition(marketID MarketID, partyID PartyID) Position { } } +func (p *Position) updateWithBadTrade(trade vega.Trade, seller bool, pf num.Decimal) { + size := int64(trade.Size) + if seller { + size *= -1 + } + // update the open volume (not pending) directly, otherwise the settle position event resets the network position. + price, _ := num.UintFromString(trade.AssetPrice, 10) + mPrice, _ := num.UintFromString(trade.Price, 10) + + openedVolume, closedVolume := CalculateOpenClosedVolume(p.OpenVolume, size) + realisedPnlDelta := num.DecimalFromUint(price).Sub(p.AverageEntryPrice).Mul(num.DecimalFromInt64(closedVolume)).Div(pf) + p.RealisedPnl = p.RealisedPnl.Add(realisedPnlDelta) + p.OpenVolume -= closedVolume + + p.AverageEntryPrice = updateVWAP(p.AverageEntryPrice, p.OpenVolume, openedVolume, price) + p.AverageEntryMarketPrice = updateVWAP(p.AverageEntryMarketPrice, p.OpenVolume, openedVolume, mPrice) + p.OpenVolume += openedVolume + // no MTM - this isn't a settlement event, we're just adding the trade adding distressed volume to network + // for the same reason, no syncPending call. +} + func (p *Position) UpdateWithTrade(trade vega.Trade, seller bool, pf num.Decimal) { // we have to ensure that we know the price/position factor size := int64(trade.Size) if seller { size *= -1 } - marketPrice, _ := num.DecimalFromString(trade.Price) // this is market price + // close out trade doesn't require the MTM calculation to be performed + // the distressed trader will be handled through a settle distressed event, the network + // open volume should just be updated, the average entry price is unchanged. + assetPrice, _ := num.DecimalFromString(trade.AssetPrice) + marketPrice, _ := num.DecimalFromString(trade.Price) + // Scale the trade to the correct size opened, closed := CalculateOpenClosedVolume(p.PendingOpenVolume, size) - realisedPnlDelta := marketPrice.Sub(p.PendingAverageEntryPrice).Mul(num.DecimalFromInt64(closed)).Div(pf) + realisedPnlDelta := assetPrice.Sub(p.PendingAverageEntryPrice).Mul(num.DecimalFromInt64(closed)).Div(pf) p.PendingRealisedPnl = p.PendingRealisedPnl.Add(realisedPnlDelta) p.PendingOpenVolume -= closed marketPriceUint, _ := num.UintFromDecimal(marketPrice) - p.PendingAverageEntryPrice = updateVWAP(p.PendingAverageEntryPrice, p.PendingOpenVolume, opened, marketPriceUint) + assetPriceUint, _ := num.UintFromDecimal(assetPrice) + + p.PendingAverageEntryPrice = updateVWAP(p.PendingAverageEntryPrice, p.PendingOpenVolume, opened, assetPriceUint) p.PendingAverageEntryMarketPrice = updateVWAP(p.PendingAverageEntryMarketPrice, p.PendingOpenVolume, opened, marketPriceUint) p.PendingOpenVolume += opened - p.pendingMTM(marketPrice, pf) + p.pendingMTM(assetPrice, pf) + if trade.Type == types.TradeTypeNetworkCloseOutBad { + p.updateWithBadTrade(trade, seller, pf) + } } func (p *Position) ApplyFundingPayment(amount *num.Int) { diff --git a/datanode/entities/position_test.go b/datanode/entities/position_test.go index cb73a67148..ffa65479f2 100644 --- a/datanode/entities/position_test.go +++ b/datanode/entities/position_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities_test // No race condition checks on these tests, the channels are buffered to avoid actual issues @@ -166,17 +154,19 @@ func TestPnLWithPositionDecimals(t *testing.T) { // first update with trades trade := vega.Trade{ - Id: "t1", - MarketId: market, - Price: "1000", - Size: 2, - Buyer: party, - Seller: "seller", + Id: "t1", + MarketId: market, + Price: "1000", + Size: 2, + Buyer: party, + Seller: "seller", + AssetPrice: "1000", } position.UpdateWithTrade(trade, false, dp) trade.Id = "t2" trade.Size = 3 trade.Price = "1200" + trade.AssetPrice = "1200" position.UpdateWithTrade(trade, false, dp) pp := position.ToProto() assert.Equal(t, "0", pp.RealisedPnl) @@ -200,12 +190,13 @@ func TestPnLWithPositionDecimals(t *testing.T) { // let's make it look like this party is trading, buyer in this case trade = vega.Trade{ - Id: "t3", - MarketId: market, - Price: "1150", - Size: 1, - Buyer: party, - Seller: "seller", + Id: "t3", + MarketId: market, + Price: "1150", + Size: 1, + Buyer: party, + Seller: "seller", + AssetPrice: "1150", } // position.UpdateWithTrade(trade, false, num.DecimalFromFloat(1)) position.UpdateWithTrade(trade, false, dp) @@ -227,12 +218,13 @@ func TestPnLWithPositionDecimals(t *testing.T) { assert.EqualValues(t, 6, pp.OpenVolume) // now close a position to see some realised PnL trade = vega.Trade{ - Id: "t4", - MarketId: market, - Price: "1250", - Size: 1, - Buyer: "buyer", - Seller: party, + Id: "t4", + MarketId: market, + Price: "1250", + Size: 1, + Buyer: "buyer", + Seller: party, + AssetPrice: "1250", } position.UpdateWithTrade(trade, true, dp) pp = position.ToProto() @@ -252,12 +244,13 @@ func TestPnLWithPositionDecimals(t *testing.T) { assert.EqualValues(t, 5, pp.OpenVolume) // now close the position trade = vega.Trade{ - Id: "t5", - MarketId: market, - Price: "1300", - Size: 5, - Buyer: "buyer", - Seller: party, + Id: "t5", + MarketId: market, + Price: "1300", + Size: 5, + Buyer: "buyer", + Seller: party, + AssetPrice: "1300", } position.UpdateWithTrade(trade, true, dp) pp = position.ToProto() @@ -307,12 +300,13 @@ func TestPnLWithTradeDecimals(t *testing.T) { assert.Equal(t, "-200", pp.UnrealisedPnl) // let's make it look like this party is trading, buyer in this case trade := vega.Trade{ - Id: "t1", - MarketId: market, - Price: "1150", - Size: 1, - Buyer: party, - Seller: "seller", + Id: "t1", + MarketId: market, + Price: "1150", + Size: 1, + Buyer: party, + Seller: "seller", + AssetPrice: "1150", } // position.UpdateWithTrade(trade, false, num.DecimalFromFloat(1)) position.UpdateWithTrade(trade, false, dp) @@ -362,8 +356,9 @@ func TestUpdateWithTradesAndFundingPayment(t *testing.T) { } type tradeStub struct { - size int64 - price *num.Uint + size int64 + price *num.Uint + marketPrice *num.Uint } func (t tradeStub) Size() int64 { @@ -375,6 +370,9 @@ func (t tradeStub) Price() *num.Uint { } func (t tradeStub) MarketPrice() *num.Uint { + if t.marketPrice != nil { + return t.marketPrice.Clone() + } return t.price.Clone() } @@ -386,8 +384,9 @@ func (t tradeStub) ToVega(dp num.Decimal) vega.Trade { size = uint64(-t.size) } return vega.Trade{ - Size: size, - Price: t.price.String(), + Size: size, + Price: t.price.String(), + AssetPrice: t.price.String(), } } @@ -434,3 +433,52 @@ func TestCalculateOpenClosedVolume(t *testing.T) { require.Equal(t, int64(50), open) require.Equal(t, int64(-100), closed) } + +func TestWithDifferingMarketAssetPrecision(t *testing.T) { + ctx := context.Background() + market := "market-id" + party := "party1" + position := entities.NewEmptyPosition(entities.MarketID(market), entities.PartyID(party)) + ps := events.NewSettlePositionEvent(ctx, party, market, num.NewUint(1000), []events.TradeSettlement{ + tradeStub{ + size: -5, + price: num.NewUint(10000000), + marketPrice: num.NewUint(1000), + }, + tradeStub{ + size: -5, + price: num.NewUint(10000000), + marketPrice: num.NewUint(1000), + }, + }, 1, num.DecimalFromFloat(1)) + position.UpdateWithPositionSettlement(ps) + pp := position.ToProto() + + // average entry price should be 1k in market precision + assert.Equal(t, ps.Price().String(), pp.AverageEntryPrice) + assert.Equal(t, "1000", position.AverageEntryMarketPrice.String()) + assert.Equal(t, "10000000", position.AverageEntryPrice.String()) + + // now update with a trade + trade := vega.Trade{ + Price: "2000", + AssetPrice: "20000000", + Size: 10, + } + position.UpdateWithTrade(trade, true, num.DecimalOne()) + assert.Equal(t, "1500", position.PendingAverageEntryMarketPrice.String()) + assert.Equal(t, "15000000", position.PendingAverageEntryPrice.String()) + assert.Equal(t, int64(-20), position.PendingOpenVolume) + + trade = vega.Trade{ + Price: "1000", + AssetPrice: "10000000", + Size: 5, + } + position.UpdateWithTrade(trade, false, num.DecimalOne()) + assert.Equal(t, "1500", position.PendingAverageEntryMarketPrice.String()) + assert.Equal(t, "15000000", position.PendingAverageEntryPrice.String()) + assert.Equal(t, int64(-15), position.PendingOpenVolume) + assert.Equal(t, "25000000", position.PendingRealisedPnl.String()) + assert.Equal(t, "75000000", position.PendingUnrealisedPnl.String()) +} diff --git a/datanode/entities/product_data.go b/datanode/entities/product_data.go index d0dd96ab65..e0637ea760 100644 --- a/datanode/entities/product_data.go +++ b/datanode/entities/product_data.go @@ -13,22 +13,11 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( "code.vegaprotocol.io/vega/protos/vega" + "google.golang.org/protobuf/encoding/protojson" ) diff --git a/datanode/entities/proposal.go b/datanode/entities/proposal.go index a668528724..a939b39f66 100644 --- a/datanode/entities/proposal.go +++ b/datanode/entities/proposal.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -32,12 +20,12 @@ import ( "fmt" "time" - "google.golang.org/protobuf/encoding/protojson" - "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" + + "google.golang.org/protobuf/encoding/protojson" ) type ProposalType v2.ListGovernanceDataRequest_Type @@ -103,11 +91,13 @@ type ProposalID = ID[_Proposal] type Proposal struct { ID ProposalID + BatchID ProposalID Reference string PartyID PartyID State ProposalState Rationale ProposalRationale Terms ProposalTerms + BatchTerms BatchProposalTerms Reason ProposalError ErrorDetails string ProposalTime time.Time @@ -117,6 +107,15 @@ type Proposal struct { RequiredLPMajority *num.Decimal RequiredLPParticipation *num.Decimal TxHash TxHash + Proposals []Proposal +} + +func (p Proposal) IsBatch() bool { + return p.BatchTerms.BatchProposalTerms != nil +} + +func (p Proposal) BelongsToBatch() bool { + return len(p.BatchID) > 0 } func (p Proposal) ToProto() *vega.Proposal { @@ -139,14 +138,21 @@ func (p Proposal) ToProto() *vega.Proposal { errDetails = ptr.From(p.ErrorDetails) } + var batchID *string + if len(p.BatchID) > 0 { + batchID = ptr.From(p.BatchID.String()) + } + pp := vega.Proposal{ Id: p.ID.String(), + BatchId: batchID, Reference: p.Reference, PartyId: p.PartyID.String(), State: vega.Proposal_State(p.State), Rationale: p.Rationale.ProposalRationale, Timestamp: p.ProposalTime.UnixNano(), Terms: p.Terms.ProposalTerms, + BatchTerms: p.BatchTerms.BatchProposalTerms, Reason: reason, ErrorDetails: errDetails, RequiredMajority: p.RequiredMajority.String(), @@ -167,9 +173,16 @@ func (p Proposal) Cursor() *Cursor { } func (p Proposal) ToProtoEdge(_ ...any) (*v2.GovernanceDataEdge, error) { + proposalsProto := make([]*vega.Proposal, len(p.Proposals)) + + for i, proposal := range p.Proposals { + proposalsProto[i] = proposal.ToProto() + } + return &v2.GovernanceDataEdge{ Node: &vega.GovernanceData{ - Proposal: p.ToProto(), + Proposal: p.ToProto(), + Proposals: proposalsProto, }, Cursor: p.Cursor().Encode(), }, nil @@ -214,13 +227,20 @@ func ProposalFromProto(pp *vega.Proposal, txHash TxHash) (Proposal, error) { errDetails = *pp.ErrorDetails } + var batchID ProposalID + if pp.BatchId != nil { + batchID = ProposalID(*pp.BatchId) + } + p := Proposal{ ID: ProposalID(pp.Id), + BatchID: batchID, Reference: pp.Reference, PartyID: PartyID(pp.PartyId), State: ProposalState(pp.State), Rationale: ProposalRationale{pp.Rationale}, - Terms: ProposalTerms{pp.Terms}, + Terms: ProposalTerms{pp.GetTerms()}, + BatchTerms: BatchProposalTerms{pp.GetBatchTerms()}, Reason: reason, ErrorDetails: errDetails, ProposalTime: time.Unix(0, pp.Timestamp), @@ -256,7 +276,36 @@ func (pt ProposalTerms) MarshalJSON() ([]byte, error) { func (pt *ProposalTerms) UnmarshalJSON(b []byte) error { pt.ProposalTerms = &vega.ProposalTerms{} - return protojson.Unmarshal(b, pt) + if err := protojson.Unmarshal(b, pt); err != nil { + return err + } + + if pt.ProposalTerms.Change == nil { + pt.ProposalTerms = nil + } + + return nil +} + +type BatchProposalTerms struct { + *vega.BatchProposalTerms +} + +func (pt BatchProposalTerms) MarshalJSON() ([]byte, error) { + return protojson.Marshal(pt) +} + +func (pt *BatchProposalTerms) UnmarshalJSON(b []byte) error { + pt.BatchProposalTerms = &vega.BatchProposalTerms{} + if err := protojson.Unmarshal(b, pt); err != nil { + return err + } + + if pt.BatchProposalTerms.Changes == nil || len(pt.BatchProposalTerms.Changes) == 0 { + pt.BatchProposalTerms = nil + } + + return nil } type ProposalCursor struct { diff --git a/datanode/entities/proposal_test.go b/datanode/entities/proposal_test.go index 0d5e7103de..26e7166dfe 100644 --- a/datanode/entities/proposal_test.go +++ b/datanode/entities/proposal_test.go @@ -18,9 +18,9 @@ package entities import ( "testing" - "github.com/stretchr/testify/assert" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + + "github.com/stretchr/testify/assert" ) func TestProposalType_String(t *testing.T) { diff --git a/datanode/entities/protocol_upgrade_proposal.go b/datanode/entities/protocol_upgrade_proposal.go index 32389da1b6..bf0730ee40 100644 --- a/datanode/entities/protocol_upgrade_proposal.go +++ b/datanode/entities/protocol_upgrade_proposal.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/referral_program.go b/datanode/entities/referral_program.go index 01172a7a12..444f57b903 100644 --- a/datanode/entities/referral_program.go +++ b/datanode/entities/referral_program.go @@ -19,7 +19,6 @@ import ( "time" "code.vegaprotocol.io/vega/libs/ptr" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" ) diff --git a/datanode/entities/referral_set_stats.go b/datanode/entities/referral_set_stats.go index 2cb90851e0..f651504b91 100644 --- a/datanode/entities/referral_set_stats.go +++ b/datanode/entities/referral_set_stats.go @@ -87,6 +87,7 @@ func (s FlattenReferralSetStats) ToProto() *v2.ReferralSetStats { EpochNotionalTakerVolume: s.EpochNotionalTakerVolume, RewardsMultiplier: s.RewardsMultiplier, RewardsFactorMultiplier: s.RewardsFactorMultiplier, + WasEligible: s.WasEligible, } } diff --git a/datanode/entities/referral_sets.go b/datanode/entities/referral_sets.go index ebd227cadd..dc061f18bb 100644 --- a/datanode/entities/referral_sets.go +++ b/datanode/entities/referral_sets.go @@ -21,9 +21,7 @@ import ( "time" "code.vegaprotocol.io/vega/libs/num" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" ) @@ -32,11 +30,12 @@ type ( ReferralSetID = ID[_ReferralSet] ReferralSet struct { - ID ReferralSetID - Referrer PartyID - CreatedAt time.Time - UpdatedAt time.Time - VegaTime time.Time + ID ReferralSetID + Referrer PartyID + TotalMembers uint64 + CreatedAt time.Time + UpdatedAt time.Time + VegaTime time.Time } ReferralSetReferee struct { @@ -86,10 +85,11 @@ func ReferralSetRefereeFromProto(proto *eventspb.RefereeJoinedReferralSet, vegaT func (rs ReferralSet) ToProto() *v2.ReferralSet { return &v2.ReferralSet{ - Id: rs.ID.String(), - Referrer: rs.Referrer.String(), - CreatedAt: rs.CreatedAt.UnixNano(), - UpdatedAt: rs.UpdatedAt.UnixNano(), + Id: rs.ID.String(), + Referrer: rs.Referrer.String(), + TotalMembers: rs.TotalMembers, + CreatedAt: rs.CreatedAt.UnixNano(), + UpdatedAt: rs.UpdatedAt.UnixNano(), } } diff --git a/datanode/entities/reward.go b/datanode/entities/reward.go index 0c9bc2ebad..b37508618b 100644 --- a/datanode/entities/reward.go +++ b/datanode/entities/reward.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -33,9 +21,11 @@ import ( "strconv" "time" + "code.vegaprotocol.io/vega/libs/ptr" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/shopspring/decimal" ) @@ -45,6 +35,7 @@ type Reward struct { MarketID MarketID EpochID int64 Amount decimal.Decimal + QuantumAmount decimal.Decimal PercentOfTotal float64 RewardType string Timestamp time.Time @@ -52,6 +43,19 @@ type Reward struct { VegaTime time.Time SeqNum uint64 LockedUntilEpochID int64 + GameID *GameID + TeamID *TeamID +} + +type RewardTotals struct { + GameID GameID + PartyID PartyID + AssetID AssetID + MarketID MarketID + EpochID int64 + TeamID TeamID + TotalRewards decimal.Decimal + TotalRewardsQuantum decimal.Decimal } func (r Reward) String() string { @@ -60,16 +64,27 @@ func (r Reward) String() string { } func (r Reward) ToProto() *vega.Reward { + var gameID, teamID *string + if r.GameID != nil && *r.GameID != "" { + gameID = ptr.From(r.GameID.String()) + } + + if r.TeamID != nil && *r.TeamID != "" { + teamID = ptr.From(r.TeamID.String()) + } + protoReward := vega.Reward{ PartyId: r.PartyID.String(), AssetId: r.AssetID.String(), Epoch: uint64(r.EpochID), Amount: r.Amount.String(), + QuantumAmount: r.QuantumAmount.String(), PercentageOfTotal: fmt.Sprintf("%v", r.PercentOfTotal), ReceivedAt: r.Timestamp.UnixNano(), - MarketId: r.MarketID.String(), RewardType: r.RewardType, LockedUntilEpoch: uint64(r.LockedUntilEpochID), + GameId: gameID, + TeamId: teamID, } return &protoReward } @@ -93,47 +108,53 @@ func (r Reward) ToProtoEdge(_ ...any) (*v2.RewardEdge, error) { func RewardFromProto(pr eventspb.RewardPayoutEvent, txHash TxHash, vegaTime time.Time, seqNum uint64) (Reward, error) { epochID, err := strconv.ParseInt(pr.EpochSeq, 10, 64) if err != nil { - return Reward{}, fmt.Errorf("parsing epoch '%v': %w", pr.EpochSeq, err) + return Reward{}, fmt.Errorf("could not parse epoch %q: %w", pr.EpochSeq, err) } percentOfTotal, err := strconv.ParseFloat(pr.PercentOfTotalReward, 64) if err != nil { - return Reward{}, fmt.Errorf("parsing percent of total reward '%v': %w", - pr.PercentOfTotalReward, err) + return Reward{}, fmt.Errorf("could not parse percent of total reward %q: %w", pr.PercentOfTotalReward, err) } amount, err := decimal.NewFromString(pr.Amount) if err != nil { - return Reward{}, fmt.Errorf("parsing amount of reward: '%v': %w", - pr.Amount, err) + return Reward{}, fmt.Errorf("could not parse amount of reward %q: %w", pr.Amount, err) } - marketID := pr.Market - if marketID == "!" { - marketID = "" + quantumAmount, err := decimal.NewFromString(pr.QuantumAmount) + if err != nil { + return Reward{}, fmt.Errorf("could not parse the amount of reward %q: %w", pr.QuantumAmount, err) } lockedUntilEpochID := epochID if len(pr.LockedUntilEpoch) > 0 { lockedUntilEpochID, err = strconv.ParseInt(pr.LockedUntilEpoch, 10, 64) if err != nil { - return Reward{}, fmt.Errorf("parsing locked until epoch '%v': %w", pr.LockedUntilEpoch, err) + return Reward{}, fmt.Errorf("parsing locked until epoch %q: %w", pr.LockedUntilEpoch, err) } } + var gameID *GameID + if pr.GameId != nil { + gameID = ptr.From(GameID(*pr.GameId)) + } + reward := Reward{ PartyID: PartyID(pr.Party), AssetID: AssetID(pr.Asset), EpochID: epochID, Amount: amount, + QuantumAmount: quantumAmount, PercentOfTotal: percentOfTotal, Timestamp: NanosToPostgresTimestamp(pr.Timestamp), - MarketID: MarketID(marketID), RewardType: pr.RewardType, TxHash: txHash, VegaTime: vegaTime, SeqNum: seqNum, LockedUntilEpochID: lockedUntilEpochID, + GameID: gameID, + // We are not expecting TeamID to be set in the proto from core, but the API will populate it + // if the reward is for a team game. } return reward, nil diff --git a/datanode/entities/reward_summary.go b/datanode/entities/reward_summary.go index 73bdde241e..1db3586363 100644 --- a/datanode/entities/reward_summary.go +++ b/datanode/entities/reward_summary.go @@ -13,22 +13,11 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" ) diff --git a/datanode/entities/reward_summary_filter_test.go b/datanode/entities/reward_summary_filter_test.go index 5054541f59..dd809c599d 100644 --- a/datanode/entities/reward_summary_filter_test.go +++ b/datanode/entities/reward_summary_filter_test.go @@ -18,9 +18,9 @@ package entities import ( "testing" - "github.com/stretchr/testify/assert" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + + "github.com/stretchr/testify/assert" ) func TestRewardSummaryFromProto(t *testing.T) { diff --git a/datanode/entities/reward_test.go b/datanode/entities/reward_test.go index 2aee08ab4a..89f32779f6 100644 --- a/datanode/entities/reward_test.go +++ b/datanode/entities/reward_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities_test import ( @@ -33,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -40,15 +29,18 @@ import ( func TestRewardFromProto(t *testing.T) { now := time.Now() timestamp := now.Add(-1 * time.Second) - + gameID := "Test" pbReward := eventspb.RewardPayoutEvent{ Party: "a0b1", - Asset: "c2d3", EpochSeq: "42", + Asset: "c2d3", Amount: "123456789", PercentOfTotalReward: "3.14", Timestamp: timestamp.UnixNano(), + RewardType: "Some Type", + GameId: &gameID, LockedUntilEpoch: "44", + QuantumAmount: "292929", } vegaTime := entities.NanosToPostgresTimestamp(now.UnixNano()) diff --git a/datanode/entities/risk_factors.go b/datanode/entities/risk_factors.go index 5d626e180b..7ebe7678b8 100644 --- a/datanode/entities/risk_factors.go +++ b/datanode/entities/risk_factors.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/snapshot_data.go b/datanode/entities/snapshot_data.go index e0cc47a98e..4532e2ec7b 100644 --- a/datanode/entities/snapshot_data.go +++ b/datanode/entities/snapshot_data.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/stake_linking.go b/datanode/entities/stake_linking.go index 6406ea189d..5d13c15c05 100644 --- a/datanode/entities/stake_linking.go +++ b/datanode/entities/stake_linking.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -35,6 +23,7 @@ import ( v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/shopspring/decimal" ) diff --git a/datanode/entities/stop_orders.go b/datanode/entities/stop_orders.go index 5029c8d9f5..9625c02b5f 100644 --- a/datanode/entities/stop_orders.go +++ b/datanode/entities/stop_orders.go @@ -21,17 +21,12 @@ import ( "fmt" "time" - commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" - - pbevents "code.vegaprotocol.io/vega/protos/vega/events/v1" - "code.vegaprotocol.io/vega/libs/num" - - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "code.vegaprotocol.io/vega/libs/ptr" - + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + pbevents "code.vegaprotocol.io/vega/protos/vega/events/v1" ) type ( @@ -56,6 +51,8 @@ type ( TxHash TxHash Submission *commandspb.OrderSubmission RejectionReason StopOrderRejectionReason + SizeOverrideSetting int32 + SizeOverrideValue *string } ) @@ -84,6 +81,8 @@ var StopOrderColumns = []string{ "tx_hash", "submission", "rejection_reason", + "size_override_setting", + "size_override_value", } func (o StopOrder) ToProto() *pbevents.StopOrderEvent { @@ -125,19 +124,29 @@ func (o StopOrder) ToProto() *pbevents.StopOrderEvent { rejectionReason = ptr.From(vega.StopOrder_RejectionReason(o.RejectionReason)) } + var sizeOVerrideValue *vega.StopOrder_SizeOverrideValue + + if o.SizeOverrideValue != nil { + sizeOVerrideValue = &vega.StopOrder_SizeOverrideValue{ + Percentage: *o.SizeOverrideValue, + } + } + stopOrder := &vega.StopOrder{ - Id: o.ID.String(), - OcoLinkId: ocoLinkID, - ExpiresAt: expiresAt, - ExpiryStrategy: expiryStrategy, - TriggerDirection: vega.StopOrder_TriggerDirection(o.TriggerDirection), - Status: vega.StopOrder_Status(o.Status), - CreatedAt: o.CreatedAt.UnixNano(), - UpdatedAt: updatedAt, - OrderId: o.OrderID.String(), - PartyId: o.PartyID.String(), - MarketId: o.MarketID.String(), - RejectionReason: rejectionReason, + Id: o.ID.String(), + OcoLinkId: ocoLinkID, + ExpiresAt: expiresAt, + ExpiryStrategy: expiryStrategy, + TriggerDirection: vega.StopOrder_TriggerDirection(o.TriggerDirection), + Status: vega.StopOrder_Status(o.Status), + CreatedAt: o.CreatedAt.UnixNano(), + UpdatedAt: updatedAt, + OrderId: o.OrderID.String(), + PartyId: o.PartyID.String(), + MarketId: o.MarketID.String(), + RejectionReason: rejectionReason, + SizeOverrideSetting: vega.StopOrder_SizeOverrideSetting(o.SizeOverrideSetting), + SizeOverrideValue: sizeOVerrideValue, } if triggerPrice != nil { @@ -243,6 +252,12 @@ func StopOrderFromProto(so *pbevents.StopOrderEvent, vegaTime time.Time, seqNum rejectionReason = StopOrderRejectionReason(*so.StopOrder.RejectionReason) } + var sizeOverrideValue *string + + if so.StopOrder.SizeOverrideValue != nil && so.StopOrder.SizeOverrideValue.Percentage != "" { + sizeOverrideValue = ptr.From(so.StopOrder.SizeOverrideValue.Percentage) + } + stopOrder := StopOrder{ ID: StopOrderID(so.StopOrder.Id), OCOLinkID: ocoLinkID, @@ -262,6 +277,8 @@ func StopOrderFromProto(so *pbevents.StopOrderEvent, vegaTime time.Time, seqNum TxHash: txHash, Submission: so.Submission, RejectionReason: rejectionReason, + SizeOverrideSetting: int32(so.StopOrder.SizeOverrideSetting), + SizeOverrideValue: sizeOverrideValue, } return stopOrder, nil @@ -287,6 +304,8 @@ func (so StopOrder) ToRow() []interface{} { so.TxHash, so.Submission, so.RejectionReason, + so.SizeOverrideSetting, + so.SizeOverrideValue, } } diff --git a/datanode/entities/stop_orders_test.go b/datanode/entities/stop_orders_test.go index ef628932c1..14c34911c2 100644 --- a/datanode/entities/stop_orders_test.go +++ b/datanode/entities/stop_orders_test.go @@ -19,12 +19,12 @@ import ( "testing" "time" - "code.vegaprotocol.io/vega/libs/ptr" - "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/protos/vega" commandpb "code.vegaprotocol.io/vega/protos/vega/commands/v1" pbevents "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/datanode/entities/successor_markets.go b/datanode/entities/successor_markets.go index cf65bd93d0..3c2b3c1c4e 100644 --- a/datanode/entities/successor_markets.go +++ b/datanode/entities/successor_markets.go @@ -20,9 +20,8 @@ import ( "fmt" "time" - "code.vegaprotocol.io/vega/protos/vega" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "code.vegaprotocol.io/vega/protos/vega" ) type SuccessorMarket struct { diff --git a/datanode/entities/teams.go b/datanode/entities/teams.go index d5a1f2f9b8..e9c01d5e9d 100644 --- a/datanode/entities/teams.go +++ b/datanode/entities/teams.go @@ -20,72 +20,59 @@ import ( "fmt" "time" + "code.vegaprotocol.io/vega/libs/num" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" ) type ( _Team struct{} TeamID = ID[_Team] +) - Team struct { - ID TeamID - Referrer PartyID - Name string - TeamURL *string - AvatarURL *string - Closed bool - CreatedAt time.Time - CreatedAtEpoch uint64 - VegaTime time.Time - } - - TeamUpdated struct { - ID TeamID - Name string - TeamURL *string - AvatarURL *string - Closed bool - VegaTime time.Time - } - - TeamCursor struct { - CreatedAt time.Time - ID TeamID - } - - TeamMember struct { - TeamID TeamID - PartyID PartyID - JoinedAt time.Time - JoinedAtEpoch uint64 - VegaTime time.Time - } - - TeamMemberHistory struct { - TeamID TeamID - JoinedAt time.Time - JoinedAtEpoch uint64 - } +type Team struct { + ID TeamID + Referrer PartyID + Name string + TeamURL *string + AvatarURL *string + Closed bool + AllowList []string + TotalMembers uint64 + CreatedAt time.Time + CreatedAtEpoch uint64 + VegaTime time.Time +} - RefereeTeamSwitch struct { - FromTeamID TeamID - ToTeamID TeamID - PartyID PartyID - SwitchedAt time.Time - SwitchedAtEpoch uint64 - VegaTime time.Time +func (t Team) Cursor() *Cursor { + tc := TeamCursor{ + CreatedAt: t.CreatedAt, + ID: t.ID, } + return NewCursor(tc.String()) +} - RefereeCursor struct { - PartyID PartyID +func (t Team) ToProto() *v2.Team { + return &v2.Team{ + TeamId: string(t.ID), + Referrer: string(t.Referrer), + Name: t.Name, + TeamUrl: t.TeamURL, + AvatarUrl: t.AvatarURL, + CreatedAt: t.CreatedAt.UnixNano(), + Closed: t.Closed, + AllowList: t.AllowList, + CreatedAtEpoch: t.CreatedAtEpoch, + TotalMembers: t.TotalMembers, } +} - RefereeHistoryCursor struct { - JoinedAtEpoch uint64 - } -) +func (t Team) ToProtoEdge(_ ...any) (*v2.TeamEdge, error) { + return &v2.TeamEdge{ + Node: t.ToProto(), + Cursor: t.Cursor().Encode(), + }, nil +} func TeamCreatedFromProto(created *eventspb.TeamCreated, vegaTime time.Time) *Team { return &Team{ @@ -98,9 +85,20 @@ func TeamCreatedFromProto(created *eventspb.TeamCreated, vegaTime time.Time) *Te CreatedAtEpoch: created.AtEpoch, VegaTime: vegaTime, Closed: created.Closed, + AllowList: created.AllowList, } } +type TeamUpdated struct { + ID TeamID + Name string + TeamURL *string + AvatarURL *string + Closed bool + AllowList []string + VegaTime time.Time +} + func TeamUpdatedFromProto(updated *eventspb.TeamUpdated, vegaTime time.Time) *TeamUpdated { return &TeamUpdated{ ID: TeamID(updated.TeamId), @@ -108,29 +106,14 @@ func TeamUpdatedFromProto(updated *eventspb.TeamUpdated, vegaTime time.Time) *Te TeamURL: updated.TeamUrl, AvatarURL: updated.AvatarUrl, Closed: updated.Closed, + AllowList: updated.AllowList, VegaTime: vegaTime, } } -func TeamRefereeFromProto(joined *eventspb.RefereeJoinedTeam, vegaTime time.Time) *TeamMember { - return &TeamMember{ - TeamID: TeamID(joined.TeamId), - PartyID: PartyID(joined.Referee), - JoinedAt: time.Unix(0, joined.JoinedAt), - JoinedAtEpoch: joined.AtEpoch, - VegaTime: vegaTime, - } -} - -func TeamRefereeHistoryFromProto(switched *eventspb.RefereeSwitchedTeam, vegaTime time.Time) *RefereeTeamSwitch { - return &RefereeTeamSwitch{ - FromTeamID: TeamID(switched.FromTeamId), - ToTeamID: TeamID(switched.ToTeamId), - PartyID: PartyID(switched.Referee), - SwitchedAt: time.Unix(0, switched.SwitchedAt), - SwitchedAtEpoch: switched.AtEpoch, - VegaTime: vegaTime, - } +type TeamCursor struct { + CreatedAt time.Time + ID TeamID } func (tc TeamCursor) String() string { @@ -148,63 +131,176 @@ func (tc *TeamCursor) Parse(cursorString string) error { return json.Unmarshal([]byte(cursorString), tc) } -func (rc RefereeCursor) String() string { - bs, err := json.Marshal(rc) - if err != nil { - panic(fmt.Errorf("could not marshal referee cursor: %v", err)) +type TeamsStatistics struct { + TeamID TeamID + TotalQuantumRewards num.Decimal + QuantumRewards []QuantumRewardsPerEpoch + TotalQuantumVolumes *num.Uint + QuantumVolumes []QuantumVolumesPerEpoch + TotalGamesPlayed uint64 + GamesPlayed []GameID +} + +type QuantumRewardsPerEpoch struct { + Epoch uint64 + Total num.Decimal +} + +type QuantumVolumesPerEpoch struct { + Epoch uint64 + Total *num.Uint +} + +func (t TeamsStatistics) Cursor() *Cursor { + tc := TeamsStatisticsCursor{ + ID: t.TeamID, } - return string(bs) + return NewCursor(tc.String()) } -func (rc *RefereeCursor) Parse(cursorString string) error { - if cursorString == "" { - return nil +func (t TeamsStatistics) ToProto() *v2.TeamStatistics { + gamesPlayed := make([]string, 0, len(t.GamesPlayed)) + for _, id := range t.GamesPlayed { + gamesPlayed = append(gamesPlayed, id.String()) + } + + quantumRewards := make([]*v2.QuantumRewardsPerEpoch, 0, len(t.QuantumRewards)) + for _, r := range t.QuantumRewards { + quantumRewards = append(quantumRewards, &v2.QuantumRewardsPerEpoch{ + Epoch: r.Epoch, + TotalQuantumRewards: r.Total.String(), + }) + } + + quantumVolumes := make([]*v2.QuantumVolumesPerEpoch, 0, len(t.QuantumVolumes)) + for _, r := range t.QuantumVolumes { + quantumVolumes = append(quantumVolumes, &v2.QuantumVolumesPerEpoch{ + Epoch: r.Epoch, + TotalQuantumVolumes: r.Total.String(), + }) + } + + return &v2.TeamStatistics{ + TeamId: string(t.TeamID), + TotalQuantumVolume: t.TotalQuantumVolumes.String(), + TotalQuantumRewards: t.TotalQuantumRewards.String(), + QuantumRewards: quantumRewards, + QuantumVolumes: quantumVolumes, + TotalGamesPlayed: t.TotalGamesPlayed, + GamesPlayed: gamesPlayed, } - return json.Unmarshal([]byte(cursorString), rc) } -func (rh RefereeHistoryCursor) String() string { - bs, err := json.Marshal(rh) +func (t TeamsStatistics) ToProtoEdge(_ ...any) (*v2.TeamStatisticsEdge, error) { + return &v2.TeamStatisticsEdge{ + Node: t.ToProto(), + Cursor: t.Cursor().Encode(), + }, nil +} + +type TeamsStatisticsCursor struct { + ID TeamID +} + +func (c TeamsStatisticsCursor) String() string { + bs, err := json.Marshal(c) if err != nil { - panic(fmt.Errorf("could not marshal referee history cursor: %v", err)) + panic(fmt.Errorf("could not marshal teams stats cursor: %v", err)) } return string(bs) } -func (rh *RefereeHistoryCursor) Parse(cursorString string) error { +func (c *TeamsStatisticsCursor) Parse(cursorString string) error { if cursorString == "" { return nil } - return json.Unmarshal([]byte(cursorString), rh) + return json.Unmarshal([]byte(cursorString), c) } -func (t Team) Cursor() *Cursor { - tc := TeamCursor{ - CreatedAt: t.CreatedAt, - ID: t.ID, +type TeamMembersStatistics struct { + PartyID PartyID + TotalQuantumVolumes *num.Uint + TotalQuantumRewards num.Decimal + QuantumRewards []QuantumRewardsPerEpoch + QuantumVolumes []QuantumVolumesPerEpoch + TotalGamesPlayed uint64 + GamesPlayed []GameID +} + +func (t TeamMembersStatistics) Cursor() *Cursor { + tc := TeamMemberStatisticsCursor{ + ID: t.PartyID, } return NewCursor(tc.String()) } -func (t Team) ToProto() *v2.Team { - return &v2.Team{ - TeamId: string(t.ID), - Referrer: string(t.Referrer), - Name: t.Name, - TeamUrl: t.TeamURL, - AvatarUrl: t.AvatarURL, - CreatedAt: t.CreatedAt.Unix(), - Closed: t.Closed, +func (t TeamMembersStatistics) ToProto() *v2.TeamMemberStatistics { + gamesPlayed := make([]string, 0, len(t.GamesPlayed)) + for _, id := range t.GamesPlayed { + gamesPlayed = append(gamesPlayed, id.String()) + } + + quantumRewards := make([]*v2.QuantumRewardsPerEpoch, 0, len(t.QuantumRewards)) + for _, r := range t.QuantumRewards { + quantumRewards = append(quantumRewards, &v2.QuantumRewardsPerEpoch{ + Epoch: r.Epoch, + TotalQuantumRewards: r.Total.String(), + }) + } + + quantumVolumes := make([]*v2.QuantumVolumesPerEpoch, 0, len(t.QuantumVolumes)) + for _, r := range t.QuantumVolumes { + quantumVolumes = append(quantumVolumes, &v2.QuantumVolumesPerEpoch{ + Epoch: r.Epoch, + TotalQuantumVolumes: r.Total.String(), + }) + } + + return &v2.TeamMemberStatistics{ + PartyId: string(t.PartyID), + TotalQuantumVolume: t.TotalQuantumVolumes.String(), + TotalQuantumRewards: t.TotalQuantumRewards.String(), + QuantumRewards: quantumRewards, + QuantumVolumes: quantumVolumes, + TotalGamesPlayed: t.TotalGamesPlayed, + GamesPlayed: gamesPlayed, } } -func (t Team) ToProtoEdge(_ ...any) (*v2.TeamEdge, error) { - return &v2.TeamEdge{ +func (t TeamMembersStatistics) ToProtoEdge(_ ...any) (*v2.TeamMemberStatisticsEdge, error) { + return &v2.TeamMemberStatisticsEdge{ Node: t.ToProto(), Cursor: t.Cursor().Encode(), }, nil } +type TeamMemberStatisticsCursor struct { + ID PartyID +} + +func (c TeamMemberStatisticsCursor) String() string { + bs, err := json.Marshal(c) + if err != nil { + panic(fmt.Errorf("could not marshal team member stats cursor: %v", err)) + } + return string(bs) +} + +func (c *TeamMemberStatisticsCursor) Parse(cursorString string) error { + if cursorString == "" { + return nil + } + return json.Unmarshal([]byte(cursorString), c) +} + +type TeamMember struct { + TeamID TeamID + PartyID PartyID + JoinedAt time.Time + JoinedAtEpoch uint64 + VegaTime time.Time +} + func (t TeamMember) Cursor() *Cursor { rc := RefereeCursor{ PartyID: t.PartyID, @@ -216,7 +312,7 @@ func (t TeamMember) ToProto() *v2.TeamReferee { return &v2.TeamReferee{ TeamId: string(t.TeamID), Referee: string(t.PartyID), - JoinedAt: t.JoinedAt.Unix(), + JoinedAt: t.JoinedAt.UnixNano(), JoinedAtEpoch: t.JoinedAtEpoch, } } @@ -228,6 +324,41 @@ func (t TeamMember) ToProtoEdge(_ ...any) (*v2.TeamRefereeEdge, error) { }, nil } +func TeamRefereeFromProto(joined *eventspb.RefereeJoinedTeam, vegaTime time.Time) *TeamMember { + return &TeamMember{ + TeamID: TeamID(joined.TeamId), + PartyID: PartyID(joined.Referee), + JoinedAt: time.Unix(0, joined.JoinedAt), + JoinedAtEpoch: joined.AtEpoch, + VegaTime: vegaTime, + } +} + +type RefereeCursor struct { + PartyID PartyID +} + +func (rc RefereeCursor) String() string { + bs, err := json.Marshal(rc) + if err != nil { + panic(fmt.Errorf("could not marshal referee cursor: %v", err)) + } + return string(bs) +} + +func (rc *RefereeCursor) Parse(cursorString string) error { + if cursorString == "" { + return nil + } + return json.Unmarshal([]byte(cursorString), rc) +} + +type TeamMemberHistory struct { + TeamID TeamID + JoinedAt time.Time + JoinedAtEpoch uint64 +} + func (t TeamMemberHistory) Cursor() *Cursor { rc := RefereeHistoryCursor{ JoinedAtEpoch: t.JoinedAtEpoch, @@ -238,7 +369,7 @@ func (t TeamMemberHistory) Cursor() *Cursor { func (t TeamMemberHistory) ToProto() *v2.TeamRefereeHistory { return &v2.TeamRefereeHistory{ TeamId: string(t.TeamID), - JoinedAt: t.JoinedAt.Unix(), + JoinedAt: t.JoinedAt.UnixNano(), JoinedAtEpoch: t.JoinedAtEpoch, } } @@ -247,9 +378,48 @@ func (t TeamMemberHistory) ToProtoEdge(_ ...any) (*v2.TeamRefereeHistoryEdge, er return &v2.TeamRefereeHistoryEdge{ Node: &v2.TeamRefereeHistory{ TeamId: string(t.TeamID), - JoinedAt: t.JoinedAt.Unix(), + JoinedAt: t.JoinedAt.UnixNano(), JoinedAtEpoch: t.JoinedAtEpoch, }, Cursor: t.Cursor().Encode(), }, nil } + +type RefereeHistoryCursor struct { + JoinedAtEpoch uint64 +} + +func (rh RefereeHistoryCursor) String() string { + bs, err := json.Marshal(rh) + if err != nil { + panic(fmt.Errorf("could not marshal referee history cursor: %v", err)) + } + return string(bs) +} + +func (rh *RefereeHistoryCursor) Parse(cursorString string) error { + if cursorString == "" { + return nil + } + return json.Unmarshal([]byte(cursorString), rh) +} + +type RefereeTeamSwitch struct { + FromTeamID TeamID + ToTeamID TeamID + PartyID PartyID + SwitchedAt time.Time + SwitchedAtEpoch uint64 + VegaTime time.Time +} + +func TeamRefereeHistoryFromProto(switched *eventspb.RefereeSwitchedTeam, vegaTime time.Time) *RefereeTeamSwitch { + return &RefereeTeamSwitch{ + FromTeamID: TeamID(switched.FromTeamId), + ToTeamID: TeamID(switched.ToTeamId), + PartyID: PartyID(switched.Referee), + SwitchedAt: time.Unix(0, switched.SwitchedAt), + SwitchedAtEpoch: switched.AtEpoch, + VegaTime: vegaTime, + } +} diff --git a/datanode/entities/tradable_instrument.go b/datanode/entities/tradable_instrument.go index 6218953f4f..b942b0ffa5 100644 --- a/datanode/entities/tradable_instrument.go +++ b/datanode/entities/tradable_instrument.go @@ -13,22 +13,11 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( "code.vegaprotocol.io/vega/protos/vega" + "google.golang.org/protobuf/encoding/protojson" ) diff --git a/datanode/entities/trade.go b/datanode/entities/trade.go index 587e85bb12..fbc8ee90d3 100644 --- a/datanode/entities/trade.go +++ b/datanode/entities/trade.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/trade_test.go b/datanode/entities/trade_test.go index c03f8444c8..bfaa16a24a 100644 --- a/datanode/entities/trade_test.go +++ b/datanode/entities/trade_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities_test import ( diff --git a/datanode/entities/transfer.go b/datanode/entities/transfer.go index 583e9a8d0e..02bc1f32a6 100644 --- a/datanode/entities/transfer.go +++ b/datanode/entities/transfer.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -33,9 +21,11 @@ import ( "fmt" "time" + "code.vegaprotocol.io/vega/libs/ptr" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/shopspring/decimal" ) @@ -70,13 +60,43 @@ type Transfer struct { Factor *decimal.Decimal DispatchStrategy *vega.DispatchStrategy Reason *string + GameID GameID } type TransferFees struct { - TransferID TransferID - EpochSeq uint64 - Amount decimal.Decimal - VegaTime time.Time + TransferID TransferID + EpochSeq uint64 + Amount decimal.Decimal + DiscountApplied decimal.Decimal + VegaTime time.Time +} + +type TransferFeesDiscount struct { + PartyID PartyID + AssetID AssetID + Amount decimal.Decimal + EpochSeq uint64 + VegaTime time.Time +} + +func (f *TransferFeesDiscount) ToProto() *eventspb.TransferFeesDiscount { + return &eventspb.TransferFeesDiscount{ + Party: f.PartyID.String(), + Asset: f.AssetID.String(), + Amount: f.Amount.String(), + Epoch: f.EpochSeq, + } +} + +func TransferFeesDiscountFromProto(f *eventspb.TransferFeesDiscount, vegaTime time.Time) *TransferFeesDiscount { + amt, _ := decimal.NewFromString(f.Amount) + return &TransferFeesDiscount{ + PartyID: PartyID(f.Party), + AssetID: AssetID(f.Asset), + EpochSeq: f.Epoch, + Amount: amt, + VegaTime: vegaTime, + } } func (t *Transfer) ToProto(ctx context.Context, accountSource AccountSource) (*eventspb.Transfer, error) { @@ -90,6 +110,11 @@ func (t *Transfer) ToProto(ctx context.Context, accountSource AccountSource) (*e return nil, fmt.Errorf("getting to account for transfer proto:%w", err) } + var gameID *string + if len(t.GameID) > 0 { + gameID = ptr.From(t.GameID.String()) + } + proto := eventspb.Transfer{ Id: t.ID.String(), From: fromAcc.PartyID.String(), @@ -103,6 +128,7 @@ func (t *Transfer) ToProto(ctx context.Context, accountSource AccountSource) (*e Timestamp: t.VegaTime.UnixNano(), Kind: nil, Reason: t.Reason, + GameId: gameID, } switch t.TransferType { @@ -141,19 +167,22 @@ func (t *Transfer) ToProto(ctx context.Context, accountSource AccountSource) (*e func (f *TransferFees) ToProto() *eventspb.TransferFees { return &eventspb.TransferFees{ - TransferId: f.TransferID.String(), - Amount: f.Amount.String(), - Epoch: f.EpochSeq, + TransferId: f.TransferID.String(), + Amount: f.Amount.String(), + Epoch: f.EpochSeq, + DiscountApplied: f.DiscountApplied.String(), } } func TransferFeesFromProto(f *eventspb.TransferFees, vegaTime time.Time) *TransferFees { amt, _ := decimal.NewFromString(f.Amount) + discount, _ := decimal.NewFromString(f.DiscountApplied) return &TransferFees{ - TransferID: TransferID(f.TransferId), - EpochSeq: f.Epoch, - Amount: amt, - VegaTime: vegaTime, + TransferID: TransferID(f.TransferId), + EpochSeq: f.Epoch, + Amount: amt, + DiscountApplied: discount, + VegaTime: vegaTime, } } @@ -168,12 +197,11 @@ func TransferFromProto(ctx context.Context, t *eventspb.Transfer, txHash TxHash, } if t.From == "0000000000000000000000000000000000000000000000000000000000000000" { - fromAcc.PartyID = PartyID("network") + fromAcc.PartyID = "network" } - err := accountSource.Obtain(ctx, &fromAcc) - if err != nil { - return nil, fmt.Errorf("obtaining from account id for transfer:%w", err) + if err := accountSource.Obtain(ctx, &fromAcc); err != nil { + return nil, fmt.Errorf("could not obtain source account for transfer: %w", err) } toAcc := Account{ @@ -186,18 +214,21 @@ func TransferFromProto(ctx context.Context, t *eventspb.Transfer, txHash TxHash, } if t.To == "0000000000000000000000000000000000000000000000000000000000000000" { - toAcc.PartyID = PartyID("network") + toAcc.PartyID = "network" } - err = accountSource.Obtain(ctx, &toAcc) - - if err != nil { - return nil, fmt.Errorf("obtaining to account id for transfer:%w", err) + if err := accountSource.Obtain(ctx, &toAcc); err != nil { + return nil, fmt.Errorf("could not obtain destination account for transfer: %w", err) } amount, err := decimal.NewFromString(t.Amount) if err != nil { - return nil, fmt.Errorf("getting amount for transfer:%w", err) + return nil, fmt.Errorf("invalid transfer amount: %w", err) + } + + var gameID GameID + if t.GameId != nil { + gameID = GameID(*t.GameId) } transfer := Transfer{ @@ -216,6 +247,7 @@ func TransferFromProto(ctx context.Context, t *eventspb.Transfer, txHash TxHash, EndEpoch: nil, Factor: nil, Reason: t.Reason, + GameID: gameID, } switch v := t.Kind.(type) { @@ -234,26 +266,18 @@ func TransferFromProto(ctx context.Context, t *eventspb.Transfer, txHash TxHash, case *eventspb.Transfer_RecurringGovernance: transfer.TransferType = GovernanceRecurring transfer.StartEpoch = &v.RecurringGovernance.StartEpoch - if v.RecurringGovernance.EndEpoch != nil { - endEpoch := *v.RecurringGovernance.EndEpoch - transfer.EndEpoch = &endEpoch - } + transfer.DispatchStrategy = v.RecurringGovernance.DispatchStrategy + transfer.EndEpoch = v.RecurringGovernance.EndEpoch case *eventspb.Transfer_Recurring: transfer.TransferType = Recurring transfer.StartEpoch = &v.Recurring.StartEpoch - if v.Recurring.DispatchStrategy != nil { - transfer.DispatchStrategy = v.Recurring.DispatchStrategy - } + transfer.DispatchStrategy = v.Recurring.DispatchStrategy + transfer.EndEpoch = v.Recurring.EndEpoch - if v.Recurring.EndEpoch != nil { - endEpoch := *v.Recurring.EndEpoch - transfer.EndEpoch = &endEpoch - } factor, err := decimal.NewFromString(v.Recurring.Factor) if err != nil { - return nil, fmt.Errorf("getting factor for transfer:%w", err) + return nil, fmt.Errorf("invalid factor for recurring transfer:%w", err) } - transfer.Factor = &factor default: transfer.TransferType = Unknown diff --git a/datanode/entities/utils.go b/datanode/entities/utils.go index 527a3e89cb..37a15f6d63 100644 --- a/datanode/entities/utils.go +++ b/datanode/entities/utils.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( diff --git a/datanode/entities/vote.go b/datanode/entities/vote.go index 74e79b9896..1a14771e32 100644 --- a/datanode/entities/vote.go +++ b/datanode/entities/vote.go @@ -13,52 +13,56 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( "encoding/json" "fmt" + "sort" "time" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" ) +type PerMarketELSWeight struct { + Market string `json:"market"` + ELS string `json:"els"` +} + type Vote struct { - PartyID PartyID - ProposalID ProposalID - Value VoteValue - TotalGovernanceTokenBalance decimal.Decimal - TotalGovernanceTokenWeight decimal.Decimal - TotalEquityLikeShareWeight decimal.Decimal - InitialTime time.Time // First vote for this party/proposal - TxHash TxHash - VegaTime time.Time // Time of last vote update + PartyID PartyID + ProposalID ProposalID + Value VoteValue + TotalGovernanceTokenBalance decimal.Decimal + TotalGovernanceTokenWeight decimal.Decimal + TotalEquityLikeShareWeight decimal.Decimal + PerMarketEquityLikeShareWeight []PerMarketELSWeight + InitialTime time.Time // First vote for this party/proposal + TxHash TxHash + VegaTime time.Time // Time of last vote update } func (v Vote) ToProto() *vega.Vote { + perMarketELSWeight := make(map[string]string) + + if len(v.PerMarketEquityLikeShareWeight) > 0 { + for _, w := range v.PerMarketEquityLikeShareWeight { + perMarketELSWeight[w.Market] = w.ELS + } + } + return &vega.Vote{ - PartyId: v.PartyID.String(), - ProposalId: v.ProposalID.String(), - Value: vega.Vote_Value(v.Value), - TotalGovernanceTokenBalance: v.TotalGovernanceTokenBalance.String(), - TotalGovernanceTokenWeight: v.TotalGovernanceTokenWeight.String(), - TotalEquityLikeShareWeight: v.TotalEquityLikeShareWeight.String(), - Timestamp: v.InitialTime.UnixNano(), + PartyId: v.PartyID.String(), + ProposalId: v.ProposalID.String(), + Value: vega.Vote_Value(v.Value), + TotalGovernanceTokenBalance: v.TotalGovernanceTokenBalance.String(), + TotalGovernanceTokenWeight: v.TotalGovernanceTokenWeight.String(), + TotalEquityLikeShareWeight: v.TotalEquityLikeShareWeight.String(), + Timestamp: v.InitialTime.UnixNano(), + PerMarketEquityLikeShareWeight: perMarketELSWeight, } } @@ -78,15 +82,30 @@ func VoteFromProto(pv *vega.Vote, txHash TxHash) (Vote, error) { return Vote{}, err } + // We need deterministic ordering of the share weights to prevent network history segment hashes from diverting + perMarketELSWeight := make([]PerMarketELSWeight, 0) + + for k, v := range pv.PerMarketEquityLikeShareWeight { + perMarketELSWeight = append(perMarketELSWeight, PerMarketELSWeight{ + Market: k, + ELS: v, + }) + } + + sort.Slice(perMarketELSWeight, func(i, j int) bool { + return perMarketELSWeight[i].Market < perMarketELSWeight[j].Market + }) + v := Vote{ - PartyID: PartyID(pv.PartyId), - ProposalID: ProposalID(pv.ProposalId), - Value: VoteValue(pv.Value), - TotalGovernanceTokenBalance: totalGovernanceTokenBalance, - TotalGovernanceTokenWeight: totalGovernanceTokenWeight, - TotalEquityLikeShareWeight: totalEquityLikeShareWeight, - InitialTime: NanosToPostgresTimestamp(pv.Timestamp), - TxHash: txHash, + PartyID: PartyID(pv.PartyId), + ProposalID: ProposalID(pv.ProposalId), + Value: VoteValue(pv.Value), + TotalGovernanceTokenBalance: totalGovernanceTokenBalance, + TotalGovernanceTokenWeight: totalGovernanceTokenWeight, + TotalEquityLikeShareWeight: totalEquityLikeShareWeight, + InitialTime: NanosToPostgresTimestamp(pv.Timestamp), + PerMarketEquityLikeShareWeight: perMarketELSWeight, + TxHash: txHash, } return v, nil diff --git a/datanode/entities/withdrawal.go b/datanode/entities/withdrawal.go index 0f95661274..4aeda7c067 100644 --- a/datanode/entities/withdrawal.go +++ b/datanode/entities/withdrawal.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package entities import ( @@ -34,6 +22,7 @@ import ( v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" "google.golang.org/protobuf/encoding/protojson" ) diff --git a/datanode/gateway/config.go b/datanode/gateway/config.go index aa6e102f33..5c2497e044 100644 --- a/datanode/gateway/config.go +++ b/datanode/gateway/config.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - //lint:file-ignore SA5008 duplicated struct tags are ok for config package gateway diff --git a/datanode/gateway/graphql/all_resolver.go b/datanode/gateway/graphql/all_resolver.go index abd31192a7..6f5962f876 100644 --- a/datanode/gateway/graphql/all_resolver.go +++ b/datanode/gateway/graphql/all_resolver.go @@ -13,26 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( "context" + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - types "code.vegaprotocol.io/vega/protos/vega" + apipb "code.vegaprotocol.io/vega/protos/data-node/api/v2" + vegapb "code.vegaprotocol.io/vega/protos/vega" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" ) type allResolver struct { @@ -40,21 +30,21 @@ type allResolver struct { clt2 TradingDataServiceClientV2 } -func (r *allResolver) getEpochByID(ctx context.Context, id uint64) (*types.Epoch, error) { - req := &v2.GetEpochRequest{ +func (r *allResolver) getEpochByID(ctx context.Context, id uint64) (*vegapb.Epoch, error) { + req := &apipb.GetEpochRequest{ Id: &id, } resp, err := r.clt2.GetEpoch(ctx, req) return resp.Epoch, err } -func (r *allResolver) getOrderByID(ctx context.Context, id string, version *int) (*types.Order, error) { +func (r *allResolver) getOrderByID(ctx context.Context, id string, version *int) (*vegapb.Order, error) { v, err := convertVersion(version) if err != nil { r.log.Error("tradingCore client", logging.Error(err)) return nil, err } - orderReq := &v2.GetOrderRequest{ + orderReq := &apipb.GetOrderRequest{ OrderId: id, Version: v, } @@ -66,11 +56,11 @@ func (r *allResolver) getOrderByID(ctx context.Context, id string, version *int) return order.Order, nil } -func (r *allResolver) getAssetByID(ctx context.Context, id string) (*types.Asset, error) { +func (r *allResolver) getAssetByID(ctx context.Context, id string) (*vegapb.Asset, error) { if len(id) <= 0 { return nil, ErrMissingIDOrReference } - req := &v2.GetAssetRequest{ + req := &apipb.GetAssetRequest{ AssetId: id, } res, err := r.clt2.GetAsset(ctx, req) @@ -80,12 +70,12 @@ func (r *allResolver) getAssetByID(ctx context.Context, id string) (*types.Asset return res.Asset, nil } -func (r *allResolver) getNodeByID(ctx context.Context, id string) (*types.Node, error) { +func (r *allResolver) getNodeByID(ctx context.Context, id string) (*vegapb.Node, error) { if len(id) <= 0 { return nil, ErrMissingNodeID } resp, err := r.clt2.GetNode( - ctx, &v2.GetNodeRequest{Id: id}) + ctx, &apipb.GetNodeRequest{Id: id}) if err != nil { return nil, err } @@ -93,8 +83,8 @@ func (r *allResolver) getNodeByID(ctx context.Context, id string) (*types.Node, return resp.Node, nil } -func (r *allResolver) getMarketByID(ctx context.Context, id string) (*types.Market, error) { - req := v2.GetMarketRequest{MarketId: id} +func (r *allResolver) getMarketByID(ctx context.Context, id string) (*vegapb.Market, error) { + req := apipb.GetMarketRequest{MarketId: id} res, err := r.clt2.GetMarket(ctx, &req) if err != nil { r.log.Error("tradingData client", logging.Error(err)) @@ -107,34 +97,43 @@ func (r *allResolver) getMarketByID(ctx context.Context, id string) (*types.Mark return res.Market, nil } -func (r *allResolver) transfersConnection( - ctx context.Context, - partyID *string, - direction *TransferDirection, - pagination *v2.Pagination, - isReward *bool, -) (*v2.TransferConnection, error) { - // if direction is nil just default to ToOrFrom - if direction == nil { +func (r *allResolver) transfersConnection(ctx context.Context, partyID *string, direction *TransferDirection, pagination *apipb.Pagination, isReward *bool, fromEpoch *int, toEpoch *int, status *eventspb.Transfer_Status, scope *apipb.ListTransfersRequest_Scope) (*apipb.TransferConnection, error) { + // if direction is nil just default to ToOrFrom, except when isReward is not nil and true, and partyID is not nil, in which case the API requires the direction to be FROM + if direction == nil && (isReward != nil && *isReward && partyID != nil) { + d := TransferDirectionFrom + direction = &d + } else if direction == nil { d := TransferDirectionToOrFrom direction = &d } - var transferDirection v2.TransferDirection + var transferDirection apipb.TransferDirection switch *direction { case TransferDirectionFrom: - transferDirection = v2.TransferDirection_TRANSFER_DIRECTION_TRANSFER_FROM + transferDirection = apipb.TransferDirection_TRANSFER_DIRECTION_TRANSFER_FROM case TransferDirectionTo: - transferDirection = v2.TransferDirection_TRANSFER_DIRECTION_TRANSFER_TO + transferDirection = apipb.TransferDirection_TRANSFER_DIRECTION_TRANSFER_TO case TransferDirectionToOrFrom: - transferDirection = v2.TransferDirection_TRANSFER_DIRECTION_TRANSFER_TO_OR_FROM + transferDirection = apipb.TransferDirection_TRANSFER_DIRECTION_TRANSFER_TO_OR_FROM + } + + var fromEpochU, toEpochU *uint64 + if fromEpoch != nil { + fromEpochU = ptr.From(uint64(*fromEpoch)) + } + if toEpoch != nil { + toEpochU = ptr.From(uint64(*toEpoch)) } - res, err := r.clt2.ListTransfers(ctx, &v2.ListTransfersRequest{ + res, err := r.clt2.ListTransfers(ctx, &apipb.ListTransfersRequest{ Pubkey: partyID, Direction: transferDirection, Pagination: pagination, IsReward: isReward, + FromEpoch: fromEpochU, + ToEpoch: toEpochU, + Status: status, + Scope: scope, }) if err != nil { return nil, err diff --git a/datanode/gateway/graphql/auction_event_resolver.go b/datanode/gateway/graphql/auction_event_resolver.go index ab136b7756..1decad351c 100644 --- a/datanode/gateway/graphql/auction_event_resolver.go +++ b/datanode/gateway/graphql/auction_event_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/connection_handlers.go b/datanode/gateway/graphql/connection_handlers.go index 213b6692d7..f2c9969f7e 100644 --- a/datanode/gateway/graphql/connection_handlers.go +++ b/datanode/gateway/graphql/connection_handlers.go @@ -101,12 +101,22 @@ func toV2IntervalString(interval vega.Interval) (string, error) { return "5 minutes", nil case vega.Interval_INTERVAL_I15M: return "15 minutes", nil + case vega.Interval_INTERVAL_I30M: + return "30 minutes", nil case vega.Interval_INTERVAL_I1H: return "1 hour", nil + case vega.Interval_INTERVAL_I4H: + return "4 hours", nil case vega.Interval_INTERVAL_I6H: return "6 hours", nil + case vega.Interval_INTERVAL_I8H: + return "8 hours", nil + case vega.Interval_INTERVAL_I12H: + return "12 hours", nil case vega.Interval_INTERVAL_I1D: return "1 day", nil + case vega.Interval_INTERVAL_I7D: + return "7 days", nil default: return "", fmt.Errorf("interval not support:%s", interval) } diff --git a/datanode/gateway/graphql/delegation_resolver.go b/datanode/gateway/graphql/delegation_resolver.go index c5ced7788c..1b833d80ec 100644 --- a/datanode/gateway/graphql/delegation_resolver.go +++ b/datanode/gateway/graphql/delegation_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/doc.go b/datanode/gateway/graphql/doc.go index 42c9cccaa9..48a66b6cf0 100644 --- a/datanode/gateway/graphql/doc.go +++ b/datanode/gateway/graphql/doc.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - // Package gql contains code for running the GraphQL-to-gRPC gateway. // // In order to add a new GraphQL endpoint, add an entry to either the diff --git a/datanode/gateway/graphql/epoch_resolver.go b/datanode/gateway/graphql/epoch_resolver.go index 1c26d464c9..2a622d2a0b 100644 --- a/datanode/gateway/graphql/epoch_resolver.go +++ b/datanode/gateway/graphql/epoch_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/epoch_timestamps_resolver.go b/datanode/gateway/graphql/epoch_timestamps_resolver.go index e0c188c625..7ca6cc31c2 100644 --- a/datanode/gateway/graphql/epoch_timestamps_resolver.go +++ b/datanode/gateway/graphql/epoch_timestamps_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/ethereum_key_rotation_resolver.go b/datanode/gateway/graphql/ethereum_key_rotation_resolver.go index 971ebbf703..c7d2c587fe 100644 --- a/datanode/gateway/graphql/ethereum_key_rotation_resolver.go +++ b/datanode/gateway/graphql/ethereum_key_rotation_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/future_product_resolver.go b/datanode/gateway/graphql/future_product_resolver.go index 3acbd22605..15ab702729 100644 --- a/datanode/gateway/graphql/future_product_resolver.go +++ b/datanode/gateway/graphql/future_product_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/future_resolver.go b/datanode/gateway/graphql/future_resolver.go index ebb8c4db8b..682fc1e09a 100644 --- a/datanode/gateway/graphql/future_resolver.go +++ b/datanode/gateway/graphql/future_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/game_resolver.go b/datanode/gateway/graphql/game_resolver.go new file mode 100644 index 0000000000..8138faee83 --- /dev/null +++ b/datanode/gateway/graphql/game_resolver.go @@ -0,0 +1,87 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package gql + +import ( + "context" + "fmt" + + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" +) + +type gameResolver VegaResolverRoot + +func (g *gameResolver) Epoch(_ context.Context, obj *v2.Game) (int, error) { + return int(obj.Epoch), nil +} + +func (g *gameResolver) NumberOfParticipants(_ context.Context, obj *v2.Game) (int, error) { + return int(obj.Participants), nil +} + +func (g *gameResolver) Entities(_ context.Context, obj *v2.Game) ([]GameEntity, error) { + switch e := obj.Entities.(type) { + case *v2.Game_Team: + return resolveTeamEntities(obj.GetTeam()) + case *v2.Game_Individual: + return resolveIndividualEntities(obj.GetIndividual()) + default: + return nil, fmt.Errorf("unsupported entity type: %T", e) + } +} + +func resolveTeamEntities(team *v2.TeamGameEntities) ([]GameEntity, error) { + entities := make([]GameEntity, 0) + for _, e := range team.Team { + entity := TeamGameEntity{ + Team: &TeamParticipation{ + TeamID: e.Team.TeamId, + MembersParticipating: resolveIndividuals(e.Team.MembersParticipating), + }, + Rank: int(e.Rank), + Volume: e.Volume, + RewardMetric: e.RewardMetric, + RewardEarned: e.RewardEarned, + TotalRewardsEarned: e.TotalRewardsEarned, + } + entities = append(entities, entity) + } + return entities, nil +} + +func resolveIndividualEntities(individual *v2.IndividualGameEntities) ([]GameEntity, error) { + entities := make([]GameEntity, 0) + for _, e := range resolveIndividuals(individual.Individual) { + entities = append(entities, e) + } + return entities, nil +} + +func resolveIndividuals(individuals []*v2.IndividualGameEntity) []*IndividualGameEntity { + entities := make([]*IndividualGameEntity, 0) + for _, e := range individuals { + entity := IndividualGameEntity{ + Individual: e.Individual, + Rank: int(e.Rank), + Volume: e.Volume, + RewardMetric: e.RewardMetric, + RewardEarned: e.RewardEarned, + TotalRewardsEarned: e.TotalRewardsEarned, + } + entities = append(entities, &entity) + } + return entities +} diff --git a/datanode/gateway/graphql/generated.go b/datanode/gateway/graphql/generated.go index 8c45ce9bfc..08a7178e4d 100644 --- a/datanode/gateway/graphql/generated.go +++ b/datanode/gateway/graphql/generated.go @@ -51,9 +51,12 @@ type ResolverRoot interface { AggregatedLedgerEntry() AggregatedLedgerEntryResolver Asset() AssetResolver AuctionEvent() AuctionEventResolver + BatchProposalTerms() BatchProposalTermsResolver + BatchProposalTermsChange() BatchProposalTermsChangeResolver BenefitTier() BenefitTierResolver CancelTransfer() CancelTransferResolver Candle() CandleResolver + CompositePriceConfiguration() CompositePriceConfigurationResolver CoreSnapshotData() CoreSnapshotDataResolver CurrentReferralProgram() CurrentReferralProgramResolver DataSourceDefinition() DataSourceDefinitionResolver @@ -78,16 +81,19 @@ type ResolverRoot interface { FundingPeriodDataPoint() FundingPeriodDataPointResolver Future() FutureResolver FutureProduct() FutureProductResolver + Game() GameResolver IcebergOrder() IcebergOrderResolver Instrument() InstrumentResolver InstrumentConfiguration() InstrumentConfigurationResolver KeyRotation() KeyRotationResolver LedgerEntry() LedgerEntryResolver + LiquidationStrategy() LiquidationStrategyResolver LiquidityOrderReference() LiquidityOrderReferenceResolver LiquidityProvider() LiquidityProviderResolver LiquidityProvision() LiquidityProvisionResolver LiquidityProvisionUpdate() LiquidityProvisionUpdateResolver LiquiditySLAParameters() LiquiditySLAParametersResolver + MarginEstimate() MarginEstimateResolver MarginLevels() MarginLevelsResolver MarginLevelsUpdate() MarginLevelsUpdateResolver Market() MarketResolver @@ -115,24 +121,30 @@ type ResolverRoot interface { PartyActivityStreak() PartyActivityStreakResolver PartyAmount() PartyAmountResolver PartyLockedBalance() PartyLockedBalanceResolver + PartyMarginMode() PartyMarginModeResolver PartyStake() PartyStakeResolver PartyVestingBalance() PartyVestingBalanceResolver PartyVestingBalancesSummary() PartyVestingBalancesSummaryResolver PartyVestingStats() PartyVestingStatsResolver Perpetual() PerpetualResolver + PerpetualData() PerpetualDataResolver PerpetualProduct() PerpetualProductResolver Position() PositionResolver PositionUpdate() PositionUpdateResolver PriceLevel() PriceLevelResolver Proposal() ProposalResolver ProposalDetail() ProposalDetailResolver + ProposalEdge() ProposalEdgeResolver ProposalTerms() ProposalTermsResolver ProtocolUpgradeProposal() ProtocolUpgradeProposalResolver + QuantumRewardsPerEpoch() QuantumRewardsPerEpochResolver + QuantumVolumesPerEpoch() QuantumVolumesPerEpochResolver Query() QueryResolver RankingScore() RankingScoreResolver RecurringGovernanceTransfer() RecurringGovernanceTransferResolver RecurringTransfer() RecurringTransferResolver ReferralProgram() ReferralProgramResolver + ReferralSet() ReferralSetResolver ReferralSetReferee() ReferralSetRefereeResolver ReferralSetStats() ReferralSetStatsResolver ReferrerRewardsGenerated() ReferrerRewardsGeneratedResolver @@ -145,8 +157,10 @@ type ResolverRoot interface { StopOrder() StopOrderResolver Subscription() SubscriptionResolver Team() TeamResolver + TeamMemberStatistics() TeamMemberStatisticsResolver TeamReferee() TeamRefereeResolver TeamRefereeHistory() TeamRefereeHistoryResolver + TeamStatistics() TeamStatisticsResolver TradableInstrument() TradableInstrumentResolver Trade() TradeResolver TradeUpdate() TradeUpdateResolver @@ -168,6 +182,7 @@ type ResolverRoot interface { Withdrawal() WithdrawalResolver DateRange() DateRangeResolver OrderFilter() OrderFilterResolver + OrderInfo() OrderInfoResolver RewardSummaryFilter() RewardSummaryFilterResolver StopOrderFilter() StopOrderFilterResolver } @@ -176,6 +191,18 @@ type DirectiveRoot struct { } type ComplexityRoot struct { + AbstractMarginLevels struct { + Asset func(childComplexity int) int + CollateralReleaseLevel func(childComplexity int) int + InitialLevel func(childComplexity int) int + MaintenanceLevel func(childComplexity int) int + MarginFactor func(childComplexity int) int + MarginMode func(childComplexity int) int + Market func(childComplexity int) int + OrderMarginLevel func(childComplexity int) int + SearchLevel func(childComplexity int) int + } + AccountBalance struct { Asset func(childComplexity int) int Balance func(childComplexity int) int @@ -304,6 +331,34 @@ type ComplexityRoot struct { Trigger func(childComplexity int) int } + BatchProposal struct { + BatchTerms func(childComplexity int) int + Datetime func(childComplexity int) int + ErrorDetails func(childComplexity int) int + ID func(childComplexity int) int + Party func(childComplexity int) int + Rationale func(childComplexity int) int + Reference func(childComplexity int) int + RejectionReason func(childComplexity int) int + RequiredLpMajority func(childComplexity int) int + RequiredLpParticipation func(childComplexity int) int + RequiredMajority func(childComplexity int) int + RequiredParticipation func(childComplexity int) int + State func(childComplexity int) int + SubProposals func(childComplexity int) int + Votes func(childComplexity int) int + } + + BatchProposalTerms struct { + Changes func(childComplexity int) int + ClosingDatetime func(childComplexity int) int + } + + BatchProposalTermsChange struct { + Change func(childComplexity int) int + EnactmentDatetime func(childComplexity int) int + } + BenefitTier struct { MinimumEpochs func(childComplexity int) int MinimumRunningNotionalTakerVolume func(childComplexity int) int @@ -347,6 +402,32 @@ type ComplexityRoot struct { Node func(childComplexity int) int } + CollateralIncreaseEstimate struct { + BestCase func(childComplexity int) int + WorstCase func(childComplexity int) int + } + + CompositePriceConfiguration struct { + CashAmount func(childComplexity int) int + CompositePriceType func(childComplexity int) int + DataSourcesSpec func(childComplexity int) int + DataSourcesSpecBinding func(childComplexity int) int + DecayPower func(childComplexity int) int + DecayWeight func(childComplexity int) int + SourceStalenessTolerance func(childComplexity int) int + SourceWeights func(childComplexity int) int + } + + CompositePriceSource struct { + LastUpdated func(childComplexity int) int + Price func(childComplexity int) int + PriceSource func(childComplexity int) int + } + + CompositePriceState struct { + PriceSources func(childComplexity int) int + } + Condition struct { Operator func(childComplexity int) int Value func(childComplexity int) int @@ -647,6 +728,11 @@ type ComplexityRoot struct { ReceiverAddress func(childComplexity int) int } + EstimatedTransferFee struct { + Discount func(childComplexity int) int + Fee func(childComplexity int) int + } + EthCallSpec struct { Abi func(childComplexity int) int Address func(childComplexity int) int @@ -655,6 +741,7 @@ type ComplexityRoot struct { Method func(childComplexity int) int Normalisers func(childComplexity int) int RequiredConfirmations func(childComplexity int) int + SourceChainID func(childComplexity int) int Trigger func(childComplexity int) int } @@ -710,7 +797,8 @@ type ComplexityRoot struct { } Fees struct { - Factors func(childComplexity int) int + Factors func(childComplexity int) int + LiquidityFeeSettings func(childComplexity int) int } FeesStats struct { @@ -812,6 +900,24 @@ type ComplexityRoot struct { SettlementAsset func(childComplexity int) int } + Game struct { + Entities func(childComplexity int) int + Epoch func(childComplexity int) int + Id func(childComplexity int) int + NumberOfParticipants func(childComplexity int) int + RewardAssetId func(childComplexity int) int + } + + GameEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + GamesConnection struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + } + HistorySegment struct { FromHeight func(childComplexity int) int HistorySegmentId func(childComplexity int) int @@ -824,6 +930,17 @@ type ComplexityRoot struct { ReservedRemaining func(childComplexity int) int } + IndividualGameEntity struct { + Individual func(childComplexity int) int + Rank func(childComplexity int) int + RewardEarned func(childComplexity int) int + RewardEarnedQuantum func(childComplexity int) int + RewardMetric func(childComplexity int) int + TotalRewardsEarned func(childComplexity int) int + TotalRewardsEarnedQuantum func(childComplexity int) int + Volume func(childComplexity int) int + } + Instrument struct { Code func(childComplexity int) int Id func(childComplexity int) int @@ -886,10 +1003,20 @@ type ComplexityRoot struct { OpenVolumeOnly func(childComplexity int) int } + LiquidationStrategy struct { + DisposalFraction func(childComplexity int) int + DisposalTimeStep func(childComplexity int) int + FullDisposalSize func(childComplexity int) int + MaxFractionConsumed func(childComplexity int) int + } + + LiquidityFeeSettings struct { + FeeConstant func(childComplexity int) int + Method func(childComplexity int) int + } + LiquidityMonitoringParameters struct { - AuctionExtensionSecs func(childComplexity int) int TargetStakeParameters func(childComplexity int) int - TriggeringRatio func(childComplexity int) int } LiquidityOrder struct { @@ -1049,7 +1176,10 @@ type ComplexityRoot struct { CollateralReleaseLevel func(childComplexity int) int InitialLevel func(childComplexity int) int MaintenanceLevel func(childComplexity int) int + MarginFactor func(childComplexity int) int + MarginMode func(childComplexity int) int Market func(childComplexity int) int + OrderMarginLevel func(childComplexity int) int Party func(childComplexity int) int SearchLevel func(childComplexity int) int Timestamp func(childComplexity int) int @@ -1060,7 +1190,10 @@ type ComplexityRoot struct { CollateralReleaseLevel func(childComplexity int) int InitialLevel func(childComplexity int) int MaintenanceLevel func(childComplexity int) int + MarginFactor func(childComplexity int) int + MarginMode func(childComplexity int) int MarketId func(childComplexity int) int + OrderMarginLevel func(childComplexity int) int PartyId func(childComplexity int) int SearchLevel func(childComplexity int) int Timestamp func(childComplexity int) int @@ -1076,10 +1209,13 @@ type ComplexityRoot struct { Id func(childComplexity int) int InsurancePoolFraction func(childComplexity int) int LinearSlippageFactor func(childComplexity int) int + LiquidationStrategy func(childComplexity int) int LiquidityMonitoringParameters func(childComplexity int) int LiquidityProvisions func(childComplexity int, partyID *string, live *bool, pagination *v2.Pagination) int LiquidityProvisionsConnection func(childComplexity int, partyID *string, live *bool, pagination *v2.Pagination) int LiquiditySLAParameters func(childComplexity int) int + MarkPriceConfiguration func(childComplexity int) int + MarketProposal func(childComplexity int) int MarketTimestamps func(childComplexity int) int OpeningAuction func(childComplexity int) int OrdersConnection func(childComplexity int, pagination *v2.Pagination, filter *OrderByPartyIdsFilter) int @@ -1120,6 +1256,8 @@ type ComplexityRoot struct { LiquidityProviderFeeShare func(childComplexity int) int LiquidityProviderSLA func(childComplexity int) int MarkPrice func(childComplexity int) int + MarkPriceState func(childComplexity int) int + MarkPriceType func(childComplexity int) int Market func(childComplexity int) int MarketGrowth func(childComplexity int) int MarketState func(childComplexity int) int @@ -1127,6 +1265,7 @@ type ComplexityRoot struct { MarketValueProxy func(childComplexity int) int MidPrice func(childComplexity int) int NextMarkToMarket func(childComplexity int) int + NextNetworkCloseout func(childComplexity int) int OpenInterest func(childComplexity int) int PriceMonitoringBounds func(childComplexity int) int ProductData func(childComplexity int) int @@ -1196,6 +1335,11 @@ type ComplexityRoot struct { Proposed func(childComplexity int) int } + Metadata struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + NetworkLimits struct { CanProposeAsset func(childComplexity int) int CanProposeMarket func(childComplexity int) int @@ -1237,8 +1381,11 @@ type ComplexityRoot struct { DecimalPlaces func(childComplexity int) int Instrument func(childComplexity int) int LinearSlippageFactor func(childComplexity int) int + LiquidationStrategy func(childComplexity int) int + LiquidityFeeSettings func(childComplexity int) int LiquidityMonitoringParameters func(childComplexity int) int LiquiditySLAParameters func(childComplexity int) int + MarkPriceConfiguration func(childComplexity int) int Metadata func(childComplexity int) int PositionDecimalPlaces func(childComplexity int) int PriceMonitoringParameters func(childComplexity int) int @@ -1250,6 +1397,7 @@ type ComplexityRoot struct { NewSpotMarket struct { DecimalPlaces func(childComplexity int) int Instrument func(childComplexity int) int + LiquidityFeeSettings func(childComplexity int) int LiquiditySLAParams func(childComplexity int) int Metadata func(childComplexity int) int PositionDecimalPlaces func(childComplexity int) int @@ -1388,6 +1536,8 @@ type ComplexityRoot struct { LiquidityProviderFeeShare func(childComplexity int) int LiquidityProviderSLA func(childComplexity int) int MarkPrice func(childComplexity int) int + MarkPriceState func(childComplexity int) int + MarkPriceType func(childComplexity int) int MarketGrowth func(childComplexity int) int MarketID func(childComplexity int) int MarketState func(childComplexity int) int @@ -1561,6 +1711,11 @@ type ComplexityRoot struct { Node func(childComplexity int) int } + PartiesProfilesConnection struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + } + Party struct { AccountsConnection func(childComplexity int, marketID *string, assetID *string, typeArg *vega.AccountType, pagination *v2.Pagination) int ActivityStreak func(childComplexity int, epoch *int) int @@ -1574,10 +1729,10 @@ type ComplexityRoot struct { PositionsConnection func(childComplexity int, market *string, pagination *v2.Pagination) int ProposalsConnection func(childComplexity int, proposalType *v2.ListGovernanceDataRequest_Type, inState *vega.Proposal_State, pagination *v2.Pagination) int RewardSummaries func(childComplexity int, assetID *string) int - RewardsConnection func(childComplexity int, assetID *string, pagination *v2.Pagination, fromEpoch *int, toEpoch *int) int + RewardsConnection func(childComplexity int, assetID *string, pagination *v2.Pagination, fromEpoch *int, toEpoch *int, teamID *string, gameID *string) int StakingSummary func(childComplexity int, pagination *v2.Pagination) int TradesConnection func(childComplexity int, marketID *string, dataRange *v2.DateRange, pagination *v2.Pagination) int - TransfersConnection func(childComplexity int, direction *TransferDirection, pagination *v2.Pagination, isReward *bool) int + TransfersConnection func(childComplexity int, direction *TransferDirection, pagination *v2.Pagination, isReward *bool, fromEpoch *int, toEpoch *int, status *v1.Transfer_Status, scope *v2.ListTransfersRequest_Scope) int VestingBalancesSummary func(childComplexity int, assetID *string) int VestingStats func(childComplexity int) int VotesConnection func(childComplexity int, pagination *v2.Pagination) int @@ -1616,6 +1771,37 @@ type ComplexityRoot struct { UntilEpoch func(childComplexity int) int } + PartyMarginMode struct { + AtEpoch func(childComplexity int) int + MarginFactor func(childComplexity int) int + MarginMode func(childComplexity int) int + MarketId func(childComplexity int) int + MaxTheoreticalLeverage func(childComplexity int) int + MinTheoreticalMarginFactor func(childComplexity int) int + PartyId func(childComplexity int) int + } + + PartyMarginModeEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + PartyMarginModesConnection struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + } + + PartyProfile struct { + Alias func(childComplexity int) int + Metadata func(childComplexity int) int + PartyId func(childComplexity int) int + } + + PartyProfileEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + PartyStake struct { CurrentStakeAvailable func(childComplexity int) int Linkings func(childComplexity int) int @@ -1649,17 +1835,28 @@ type ComplexityRoot struct { DataSourceSpecBinding func(childComplexity int) int DataSourceSpecForSettlementData func(childComplexity int) int DataSourceSpecForSettlementSchedule func(childComplexity int) int + FundingRateLowerBound func(childComplexity int) int + FundingRateScalingFactor func(childComplexity int) int + FundingRateUpperBound func(childComplexity int) int InterestRate func(childComplexity int) int + InternalCompositePriceConfig func(childComplexity int) int MarginFundingFactor func(childComplexity int) int QuoteName func(childComplexity int) int SettlementAsset func(childComplexity int) int } PerpetualData struct { - ExternalTwap func(childComplexity int) int - FundingPayment func(childComplexity int) int - FundingRate func(childComplexity int) int - InternalTwap func(childComplexity int) int + ExternalTwap func(childComplexity int) int + FundingPayment func(childComplexity int) int + FundingRate func(childComplexity int) int + InternalCompositePrice func(childComplexity int) int + InternalCompositePriceState func(childComplexity int) int + InternalCompositePriceType func(childComplexity int) int + InternalTwap func(childComplexity int) int + NextInternalCompositePriceCalc func(childComplexity int) int + SeqNum func(childComplexity int) int + StartTime func(childComplexity int) int + UnderlyingIndexPrice func(childComplexity int) int } PerpetualProduct struct { @@ -1668,6 +1865,9 @@ type ComplexityRoot struct { DataSourceSpecBinding func(childComplexity int) int DataSourceSpecForSettlementData func(childComplexity int) int DataSourceSpecForSettlementSchedule func(childComplexity int) int + FundingRateLowerBound func(childComplexity int) int + FundingRateScalingFactor func(childComplexity int) int + FundingRateUpperBound func(childComplexity int) int InterestRate func(childComplexity int) int MarginFundingFactor func(childComplexity int) int QuoteName func(childComplexity int) int @@ -1698,8 +1898,9 @@ type ComplexityRoot struct { } PositionEstimate struct { - Liquidation func(childComplexity int) int - Margin func(childComplexity int) int + CollateralIncreaseEstimate func(childComplexity int) int + Liquidation func(childComplexity int) int + Margin func(childComplexity int) int } PositionResolution struct { @@ -1777,6 +1978,8 @@ type ComplexityRoot struct { } ProposalDetail struct { + BatchId func(childComplexity int) int + BatchTerms func(childComplexity int) int Datetime func(childComplexity int) int ErrorDetails func(childComplexity int) int Id func(childComplexity int) int @@ -1793,8 +1996,9 @@ type ComplexityRoot struct { } ProposalEdge struct { - Cursor func(childComplexity int) int - Node func(childComplexity int) int + Cursor func(childComplexity int) int + Node func(childComplexity int) int + ProposalNode func(childComplexity int) int } ProposalRationale struct { @@ -1867,6 +2071,16 @@ type ComplexityRoot struct { Key func(childComplexity int) int } + QuantumRewardsPerEpoch struct { + Epoch func(childComplexity int) int + TotalQuantumRewards func(childComplexity int) int + } + + QuantumVolumesPerEpoch struct { + Epoch func(childComplexity int) int + TotalQuantumVolumes func(childComplexity int) int + } + Query struct { Asset func(childComplexity int, id string) int AssetsConnection func(childComplexity int, id *string, pagination *v2.Pagination) int @@ -1886,13 +2100,15 @@ type ComplexityRoot struct { Erc20WithdrawalApproval func(childComplexity int, withdrawalID string) int EstimateFees func(childComplexity int, marketID string, partyID string, price *string, size string, side vega.Side, timeInForce vega.Order_TimeInForce, expiration *int64, typeArg vega.Order_Type) int EstimateOrder func(childComplexity int, marketID string, partyID string, price *string, size string, side vega.Side, timeInForce vega.Order_TimeInForce, expiration *int64, typeArg vega.Order_Type) int - EstimatePosition func(childComplexity int, marketID string, openVolume string, orders []*OrderInfo, collateralAvailable *string, scaleLiquidationPriceToMarketDecimals *bool) int + EstimatePosition func(childComplexity int, marketID string, openVolume string, averageEntryPrice string, orders []*v2.OrderInfo, marginAccountBalance string, generalAccountBalance string, orderMarginAccountBalance string, marginMode vega.MarginMode, marginFactor *string, includeRequiredPositionMarginInAvailableCollateral *bool, scaleLiquidationPriceToMarketDecimals *bool) int + EstimateTransferFee func(childComplexity int, fromAccount string, fromAccountType vega.AccountType, toAccount string, amount string, assetID string) int EthereumKeyRotations func(childComplexity int, nodeID *string) int FeesStats func(childComplexity int, marketID *string, assetID *string, epoch *int, partyID *string) int FeesStatsForParty func(childComplexity int, partyID string, assetID *string, fromEpoch *int, toEpoch *int) int FundingPayments func(childComplexity int, partyID string, marketID *string, pagination *v2.Pagination) int FundingPeriodDataPoints func(childComplexity int, marketID string, dateRange *v2.DateRange, source *v1.FundingPeriodDataPoint_Source, pagination *v2.Pagination) int FundingPeriods func(childComplexity int, marketID string, dateRange *v2.DateRange, pagination *v2.Pagination) int + Games func(childComplexity int, gameID *string, epochFrom *int, epochTo *int, entityScope *vega.EntityScope, pagination *v2.Pagination) int GetMarketDataHistoryConnectionByID func(childComplexity int, id string, start *int64, end *int64, pagination *v2.Pagination) int KeyRotationsConnection func(childComplexity int, id *string, pagination *v2.Pagination) int LastBlockHeight func(childComplexity int) int @@ -1917,7 +2133,9 @@ type ComplexityRoot struct { OrderVersionsConnection func(childComplexity int, orderID *string, pagination *v2.Pagination) int PaidLiquidityFees func(childComplexity int, marketID *string, assetID *string, epoch *int, partyIDs []string) int PartiesConnection func(childComplexity int, id *string, pagination *v2.Pagination) int + PartiesProfilesConnection func(childComplexity int, ids []string, pagination *v2.Pagination) int Party func(childComplexity int, id string) int + PartyMarginModes func(childComplexity int, marketID *string, partyID *string, pagination *v2.Pagination) int Positions func(childComplexity int, filter *v2.PositionsFilter, pagination *v2.Pagination) int Proposal func(childComplexity int, id *string, reference *string) int ProposalsConnection func(childComplexity int, proposalType *v2.ListGovernanceDataRequest_Type, inState *vega.Proposal_State, pagination *v2.Pagination) int @@ -1930,12 +2148,15 @@ type ComplexityRoot struct { StopOrder func(childComplexity int, id string) int StopOrders func(childComplexity int, filter *v2.StopOrderFilter, pagination *v2.Pagination) int SuccessorMarkets func(childComplexity int, marketID string, fullHistory *bool, pagination *v2.Pagination) int + TeamMembersStatistics func(childComplexity int, teamID string, partyID *string, aggregationEpochs *int, pagination *v2.Pagination) int TeamRefereeHistory func(childComplexity int, referee string, pagination *v2.Pagination) int TeamReferees func(childComplexity int, teamID string, pagination *v2.Pagination) int Teams func(childComplexity int, teamID *string, partyID *string, pagination *v2.Pagination) int + TeamsStatistics func(childComplexity int, teamID *string, aggregationEpochs *int, pagination *v2.Pagination) int + TotalTransferFeeDiscount func(childComplexity int, partyID string, assetID string) int Trades func(childComplexity int, filter *TradesFilter, pagination *v2.Pagination, dateRange *v2.DateRange) int Transfer func(childComplexity int, id string) int - TransfersConnection func(childComplexity int, partyID *string, direction *TransferDirection, pagination *v2.Pagination, isReward *bool) int + TransfersConnection func(childComplexity int, partyID *string, direction *TransferDirection, pagination *v2.Pagination, isReward *bool, fromEpoch *int, toEpoch *int, status *v1.Transfer_Status, scope *v2.ListTransfersRequest_Scope) int VolumeDiscountStats func(childComplexity int, epoch *int, partyID *string, pagination *v2.Pagination) int Withdrawal func(childComplexity int, id string) int Withdrawals func(childComplexity int, dateRange *v2.DateRange, pagination *v2.Pagination) int @@ -1978,10 +2199,11 @@ type ComplexityRoot struct { } ReferralSet struct { - CreatedAt func(childComplexity int) int - Id func(childComplexity int) int - Referrer func(childComplexity int) int - UpdatedAt func(childComplexity int) int + CreatedAt func(childComplexity int) int + Id func(childComplexity int) int + Referrer func(childComplexity int) int + TotalMembers func(childComplexity int) int + UpdatedAt func(childComplexity int) int } ReferralSetConnection struct { @@ -2045,12 +2267,15 @@ type ComplexityRoot struct { Amount func(childComplexity int) int Asset func(childComplexity int) int Epoch func(childComplexity int) int + GameId func(childComplexity int) int LockedUntilEpoch func(childComplexity int) int MarketId func(childComplexity int) int Party func(childComplexity int) int PercentageOfTotal func(childComplexity int) int + QuantumAmount func(childComplexity int) int ReceivedAt func(childComplexity int) int RewardType func(childComplexity int) int + TeamId func(childComplexity int) int } RewardEdge struct { @@ -2127,6 +2352,10 @@ type ComplexityRoot struct { FactorShort func(childComplexity int) int } + SpecBindingForCompositePrice struct { + PriceSourceProperty func(childComplexity int) int + } + Spot struct { BaseAsset func(childComplexity int) int Name func(childComplexity int) int @@ -2202,20 +2431,22 @@ type ComplexityRoot struct { } StopOrder struct { - CreatedAt func(childComplexity int) int - ExpiresAt func(childComplexity int) int - ExpiryStrategy func(childComplexity int) int - ID func(childComplexity int) int - MarketID func(childComplexity int) int - OcoLinkID func(childComplexity int) int - Order func(childComplexity int) int - PartyID func(childComplexity int) int - RejectionReason func(childComplexity int) int - Status func(childComplexity int) int - Submission func(childComplexity int) int - Trigger func(childComplexity int) int - TriggerDirection func(childComplexity int) int - UpdatedAt func(childComplexity int) int + CreatedAt func(childComplexity int) int + ExpiresAt func(childComplexity int) int + ExpiryStrategy func(childComplexity int) int + ID func(childComplexity int) int + MarketID func(childComplexity int) int + OcoLinkID func(childComplexity int) int + Order func(childComplexity int) int + PartyID func(childComplexity int) int + RejectionReason func(childComplexity int) int + SizeOverrideSetting func(childComplexity int) int + SizeOverrideValue func(childComplexity int) int + Status func(childComplexity int) int + Submission func(childComplexity int) int + Trigger func(childComplexity int) int + TriggerDirection func(childComplexity int) int + UpdatedAt func(childComplexity int) int } StopOrderConnection struct { @@ -2279,6 +2510,7 @@ type ComplexityRoot struct { } Team struct { + AllowList func(childComplexity int) int AvatarUrl func(childComplexity int) int Closed func(childComplexity int) int CreatedAt func(childComplexity int) int @@ -2287,6 +2519,7 @@ type ComplexityRoot struct { Referrer func(childComplexity int) int TeamId func(childComplexity int) int TeamUrl func(childComplexity int) int + TotalMembers func(childComplexity int) int } TeamConnection struct { @@ -2299,6 +2532,42 @@ type ComplexityRoot struct { Node func(childComplexity int) int } + TeamGameEntity struct { + Rank func(childComplexity int) int + RewardEarned func(childComplexity int) int + RewardEarnedQuantum func(childComplexity int) int + RewardMetric func(childComplexity int) int + Team func(childComplexity int) int + TotalRewardsEarned func(childComplexity int) int + TotalRewardsEarnedQuantum func(childComplexity int) int + Volume func(childComplexity int) int + } + + TeamMemberStatistics struct { + GamesPlayed func(childComplexity int) int + PartyId func(childComplexity int) int + QuantumRewards func(childComplexity int) int + QuantumVolumes func(childComplexity int) int + TotalGamesPlayed func(childComplexity int) int + TotalQuantumRewards func(childComplexity int) int + TotalQuantumVolume func(childComplexity int) int + } + + TeamMemberStatisticsEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + TeamMembersStatisticsConnection struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + } + + TeamParticipation struct { + MembersParticipating func(childComplexity int) int + TeamID func(childComplexity int) int + } + TeamReferee struct { JoinedAt func(childComplexity int) int JoinedAtEpoch func(childComplexity int) int @@ -2332,10 +2601,34 @@ type ComplexityRoot struct { Node func(childComplexity int) int } + TeamStatistics struct { + GamesPlayed func(childComplexity int) int + QuantumRewards func(childComplexity int) int + QuantumVolumes func(childComplexity int) int + TeamId func(childComplexity int) int + TotalGamesPlayed func(childComplexity int) int + TotalQuantumRewards func(childComplexity int) int + TotalQuantumVolume func(childComplexity int) int + } + + TeamStatisticsEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + TeamsStatisticsConnection struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + } + TimeUpdate struct { Timestamp func(childComplexity int) int } + TotalTransferFeeDiscount struct { + TotalDiscount func(childComplexity int) int + } + TradableInstrument struct { Instrument func(childComplexity int) int MarginCalculator func(childComplexity int) int @@ -2421,6 +2714,7 @@ type ComplexityRoot struct { Asset func(childComplexity int) int From func(childComplexity int) int FromAccountType func(childComplexity int) int + GameId func(childComplexity int) int Id func(childComplexity int) int Kind func(childComplexity int) int Reason func(childComplexity int) int @@ -2486,6 +2780,7 @@ type ComplexityRoot struct { UpdateInstrumentConfiguration struct { Code func(childComplexity int) int + Name func(childComplexity int) int Product func(childComplexity int) int } @@ -2497,8 +2792,11 @@ type ComplexityRoot struct { UpdateMarketConfiguration struct { Instrument func(childComplexity int) int LinearSlippageFactor func(childComplexity int) int + LiquidationStrategy func(childComplexity int) int + LiquidityFeeSettings func(childComplexity int) int LiquidityMonitoringParameters func(childComplexity int) int LiquiditySlaParameters func(childComplexity int) int + MarkPriceConfiguration func(childComplexity int) int Metadata func(childComplexity int) int PriceMonitoringParameters func(childComplexity int) int QuadraticSlippageFactor func(childComplexity int) int @@ -2529,6 +2827,9 @@ type ComplexityRoot struct { DataSourceSpecBinding func(childComplexity int) int DataSourceSpecForSettlementData func(childComplexity int) int DataSourceSpecForSettlementSchedule func(childComplexity int) int + FundingRateLowerBound func(childComplexity int) int + FundingRateScalingFactor func(childComplexity int) int + FundingRateUpperBound func(childComplexity int) int InterestRate func(childComplexity int) int MarginFundingFactor func(childComplexity int) int QuoteName func(childComplexity int) int @@ -2547,6 +2848,7 @@ type ComplexityRoot struct { } UpdateSpotMarketConfiguration struct { + LiquidityFeeSettings func(childComplexity int) int LiquiditySLAParams func(childComplexity int) int Metadata func(childComplexity int) int PriceMonitoringParameters func(childComplexity int) int @@ -2678,6 +2980,13 @@ type AuctionEventResolver interface { AuctionStart(ctx context.Context, obj *v1.AuctionEvent) (int64, error) AuctionEnd(ctx context.Context, obj *v1.AuctionEvent) (int64, error) } +type BatchProposalTermsResolver interface { + ClosingDatetime(ctx context.Context, obj *vega.BatchProposalTerms) (int64, error) +} +type BatchProposalTermsChangeResolver interface { + EnactmentDatetime(ctx context.Context, obj *vega.BatchProposalTermsChange) (*int64, error) + Change(ctx context.Context, obj *vega.BatchProposalTermsChange) (ProposalChange, error) +} type BenefitTierResolver interface { MinimumEpochs(ctx context.Context, obj *vega.BenefitTier) (int, error) } @@ -2691,6 +3000,13 @@ type CandleResolver interface { Volume(ctx context.Context, obj *v2.Candle) (string, error) Notional(ctx context.Context, obj *v2.Candle) (string, error) } +type CompositePriceConfigurationResolver interface { + DecayPower(ctx context.Context, obj *vega.CompositePriceConfiguration) (int, error) + + CompositePriceType(ctx context.Context, obj *vega.CompositePriceConfiguration) (CompositePriceType, error) + + DataSourcesSpecBinding(ctx context.Context, obj *vega.CompositePriceConfiguration) ([]*SpecBindingForCompositePrice, error) +} type CoreSnapshotDataResolver interface { BlockHeight(ctx context.Context, obj *v1.CoreSnapshotData) (string, error) @@ -2770,6 +3086,7 @@ type EthCallSpecResolver interface { RequiredConfirmations(ctx context.Context, obj *vega.EthCallSpec) (int, error) Normalisers(ctx context.Context, obj *vega.EthCallSpec) ([]*Normaliser, error) Filters(ctx context.Context, obj *vega.EthCallSpec) ([]*Filter, error) + SourceChainID(ctx context.Context, obj *vega.EthCallSpec) (int, error) } type EthereumKeyRotationResolver interface { BlockHeight(ctx context.Context, obj *v1.EthereumKeyRotation) (string, error) @@ -2800,6 +3117,11 @@ type FutureResolver interface { type FutureProductResolver interface { SettlementAsset(ctx context.Context, obj *vega.FutureProduct) (*vega.Asset, error) } +type GameResolver interface { + Epoch(ctx context.Context, obj *v2.Game) (int, error) + NumberOfParticipants(ctx context.Context, obj *v2.Game) (int, error) + Entities(ctx context.Context, obj *v2.Game) ([]GameEntity, error) +} type IcebergOrderResolver interface { PeakSize(ctx context.Context, obj *vega.IcebergOrder) (string, error) MinimumVisibleSize(ctx context.Context, obj *vega.IcebergOrder) (string, error) @@ -2819,6 +3141,9 @@ type LedgerEntryResolver interface { FromAccountID(ctx context.Context, obj *vega.LedgerEntry) (*vega.AccountDetails, error) ToAccountID(ctx context.Context, obj *vega.LedgerEntry) (*vega.AccountDetails, error) } +type LiquidationStrategyResolver interface { + FullDisposalSize(ctx context.Context, obj *vega.LiquidationStrategy) (int, error) +} type LiquidityOrderReferenceResolver interface { Order(ctx context.Context, obj *vega.LiquidityOrderReference) (*vega.Order, error) } @@ -2839,6 +3164,10 @@ type LiquidityProvisionUpdateResolver interface { type LiquiditySLAParametersResolver interface { PerformanceHysteresisEpochs(ctx context.Context, obj *vega.LiquiditySLAParameters) (int, error) } +type MarginEstimateResolver interface { + WorstCase(ctx context.Context, obj *v2.MarginEstimate) (*AbstractMarginLevels, error) + BestCase(ctx context.Context, obj *v2.MarginEstimate) (*AbstractMarginLevels, error) +} type MarginLevelsResolver interface { Market(ctx context.Context, obj *vega.MarginLevels) (*vega.Market, error) Asset(ctx context.Context, obj *vega.MarginLevels) (*vega.Asset, error) @@ -2846,11 +3175,13 @@ type MarginLevelsResolver interface { MaintenanceLevel(ctx context.Context, obj *vega.MarginLevels) (string, error) InitialLevel(ctx context.Context, obj *vega.MarginLevels) (string, error) + OrderMarginLevel(ctx context.Context, obj *vega.MarginLevels) (string, error) } type MarginLevelsUpdateResolver interface { MaintenanceLevel(ctx context.Context, obj *vega.MarginLevels) (string, error) InitialLevel(ctx context.Context, obj *vega.MarginLevels) (string, error) + OrderMarginLevel(ctx context.Context, obj *vega.MarginLevels) (string, error) } type MarketResolver interface { DecimalPlaces(ctx context.Context, obj *vega.Market) (int, error) @@ -2860,6 +3191,7 @@ type MarketResolver interface { LiquidityMonitoringParameters(ctx context.Context, obj *vega.Market) (*LiquidityMonitoringParameters, error) Proposal(ctx context.Context, obj *vega.Market) (*vega.GovernanceData, error) + MarketProposal(ctx context.Context, obj *vega.Market) (ProposalNode, error) OrdersConnection(ctx context.Context, obj *vega.Market, pagination *v2.Pagination, filter *OrderByPartyIdsFilter) (*v2.OrderConnection, error) AccountsConnection(ctx context.Context, obj *vega.Market, partyID *string, pagination *v2.Pagination) (*v2.AccountsConnection, error) TradesConnection(ctx context.Context, obj *vega.Market, dateRange *v2.DateRange, pagination *v2.Pagination) (*v2.TradeConnection, error) @@ -2876,6 +3208,8 @@ type MarketResolver interface { type MarketDataResolver interface { Market(ctx context.Context, obj *vega.MarketData) (*vega.Market, error) + MarkPriceType(ctx context.Context, obj *vega.MarketData) (CompositePriceType, error) + BestBidVolume(ctx context.Context, obj *vega.MarketData) (string, error) BestOfferVolume(ctx context.Context, obj *vega.MarketData) (string, error) @@ -2898,6 +3232,7 @@ type MarketDataResolver interface { NextMarkToMarket(ctx context.Context, obj *vega.MarketData) (string, error) ProductData(ctx context.Context, obj *vega.MarketData) (ProductData, error) + NextNetworkCloseout(ctx context.Context, obj *vega.MarketData) (string, error) } type MarketDepthResolver interface { Market(ctx context.Context, obj *vega.MarketDepth) (*vega.Market, error) @@ -2933,6 +3268,9 @@ type NewMarketResolver interface { QuadraticSlippageFactor(ctx context.Context, obj *vega.NewMarket) (string, error) SuccessorConfiguration(ctx context.Context, obj *vega.NewMarket) (*vega.SuccessorConfiguration, error) LiquiditySLAParameters(ctx context.Context, obj *vega.NewMarket) (*vega.LiquiditySLAParameters, error) + LiquidityFeeSettings(ctx context.Context, obj *vega.NewMarket) (*vega.LiquidityFeeSettings, error) + LiquidationStrategy(ctx context.Context, obj *vega.NewMarket) (*vega.LiquidationStrategy, error) + MarkPriceConfiguration(ctx context.Context, obj *vega.NewMarket) (*vega.CompositePriceConfiguration, error) } type NewSpotMarketResolver interface { Instrument(ctx context.Context, obj *vega.NewSpotMarket) (*vega.InstrumentConfiguration, error) @@ -2943,6 +3281,7 @@ type NewSpotMarketResolver interface { RiskParameters(ctx context.Context, obj *vega.NewSpotMarket) (RiskModel, error) PositionDecimalPlaces(ctx context.Context, obj *vega.NewSpotMarket) (int, error) LiquiditySLAParams(ctx context.Context, obj *vega.NewSpotMarket) (*vega.LiquiditySLAParameters, error) + LiquidityFeeSettings(ctx context.Context, obj *vega.NewSpotMarket) (*vega.LiquidityFeeSettings, error) } type NewTransferResolver interface { Source(ctx context.Context, obj *vega.NewTransfer) (string, error) @@ -2991,6 +3330,7 @@ type ObservableMarketDataResolver interface { NextMarkToMarket(ctx context.Context, obj *vega.MarketData) (string, error) ProductData(ctx context.Context, obj *vega.MarketData) (ProductData, error) + MarkPriceType(ctx context.Context, obj *vega.MarketData) (CompositePriceType, error) } type ObservableMarketDepthResolver interface { LastTrade(ctx context.Context, obj *vega.MarketDepth) (*MarketDepthTrade, error) @@ -3051,9 +3391,9 @@ type PartyResolver interface { LiquidityProvisionsConnection(ctx context.Context, obj *vega.Party, marketID *string, reference *string, live *bool, pagination *v2.Pagination) (*v2.LiquidityProvisionsConnection, error) DelegationsConnection(ctx context.Context, obj *vega.Party, nodeID *string, pagination *v2.Pagination) (*v2.DelegationsConnection, error) StakingSummary(ctx context.Context, obj *vega.Party, pagination *v2.Pagination) (*StakingSummary, error) - RewardsConnection(ctx context.Context, obj *vega.Party, assetID *string, pagination *v2.Pagination, fromEpoch *int, toEpoch *int) (*v2.RewardsConnection, error) + RewardsConnection(ctx context.Context, obj *vega.Party, assetID *string, pagination *v2.Pagination, fromEpoch *int, toEpoch *int, teamID *string, gameID *string) (*v2.RewardsConnection, error) RewardSummaries(ctx context.Context, obj *vega.Party, assetID *string) ([]*vega.RewardSummary, error) - TransfersConnection(ctx context.Context, obj *vega.Party, direction *TransferDirection, pagination *v2.Pagination, isReward *bool) (*v2.TransferConnection, error) + TransfersConnection(ctx context.Context, obj *vega.Party, direction *TransferDirection, pagination *v2.Pagination, isReward *bool, fromEpoch *int, toEpoch *int, status *v1.Transfer_Status, scope *v2.ListTransfersRequest_Scope) (*v2.TransferConnection, error) ActivityStreak(ctx context.Context, obj *vega.Party, epoch *int) (*v1.PartyActivityStreak, error) VestingBalancesSummary(ctx context.Context, obj *vega.Party, assetID *string) (*v2.GetVestingBalancesSummaryResponse, error) VestingStats(ctx context.Context, obj *vega.Party) (*v2.GetPartyVestingStatsResponse, error) @@ -3074,6 +3414,9 @@ type PartyLockedBalanceResolver interface { UntilEpoch(ctx context.Context, obj *v1.PartyLockedBalance) (int, error) } +type PartyMarginModeResolver interface { + AtEpoch(ctx context.Context, obj *v2.PartyMarginMode) (int, error) +} type PartyStakeResolver interface { Linkings(ctx context.Context, obj *v2.GetStakeResponse) ([]*v1.StakeLinking, error) } @@ -3091,12 +3434,15 @@ type PerpetualResolver interface { DataSourceSpecForSettlementSchedule(ctx context.Context, obj *vega.Perpetual) (*DataSourceSpec, error) DataSourceSpecForSettlementData(ctx context.Context, obj *vega.Perpetual) (*DataSourceSpec, error) - DataSourceSpecBinding(ctx context.Context, obj *vega.Perpetual) (*DataSourceSpecPerpetualBinding, error) +} +type PerpetualDataResolver interface { + SeqNum(ctx context.Context, obj *vega.PerpetualData) (int, error) + + InternalCompositePriceType(ctx context.Context, obj *vega.PerpetualData) (CompositePriceType, error) + NextInternalCompositePriceCalc(ctx context.Context, obj *vega.PerpetualData) (string, error) } type PerpetualProductResolver interface { SettlementAsset(ctx context.Context, obj *vega.PerpetualProduct) (*vega.Asset, error) - - DataSourceSpecBinding(ctx context.Context, obj *vega.PerpetualProduct) (*DataSourceSpecPerpetualBinding, error) } type PositionResolver interface { Market(ctx context.Context, obj *vega.Position) (*vega.Market, error) @@ -3142,6 +3488,9 @@ type ProposalDetailResolver interface { RequiredLpMajority(ctx context.Context, obj *vega.Proposal) (*string, error) RequiredLpParticipation(ctx context.Context, obj *vega.Proposal) (*string, error) } +type ProposalEdgeResolver interface { + ProposalNode(ctx context.Context, obj *v2.GovernanceDataEdge) (ProposalNode, error) +} type ProposalTermsResolver interface { ClosingDatetime(ctx context.Context, obj *vega.ProposalTerms) (int64, error) EnactmentDatetime(ctx context.Context, obj *vega.ProposalTerms) (*int64, error) @@ -3151,6 +3500,12 @@ type ProposalTermsResolver interface { type ProtocolUpgradeProposalResolver interface { UpgradeBlockHeight(ctx context.Context, obj *v1.ProtocolUpgradeEvent) (string, error) } +type QuantumRewardsPerEpochResolver interface { + Epoch(ctx context.Context, obj *v2.QuantumRewardsPerEpoch) (int, error) +} +type QuantumVolumesPerEpochResolver interface { + Epoch(ctx context.Context, obj *v2.QuantumVolumesPerEpoch) (int, error) +} type QueryResolver interface { Asset(ctx context.Context, id string) (*vega.Asset, error) AssetsConnection(ctx context.Context, id *string, pagination *v2.Pagination) (*v2.AssetsConnection, error) @@ -3170,15 +3525,19 @@ type QueryResolver interface { Erc20WithdrawalApproval(ctx context.Context, withdrawalID string) (*Erc20WithdrawalApproval, error) EstimateOrder(ctx context.Context, marketID string, partyID string, price *string, size string, side vega.Side, timeInForce vega.Order_TimeInForce, expiration *int64, typeArg vega.Order_Type) (*OrderEstimate, error) EstimateFees(ctx context.Context, marketID string, partyID string, price *string, size string, side vega.Side, timeInForce vega.Order_TimeInForce, expiration *int64, typeArg vega.Order_Type) (*FeeEstimate, error) - EstimatePosition(ctx context.Context, marketID string, openVolume string, orders []*OrderInfo, collateralAvailable *string, scaleLiquidationPriceToMarketDecimals *bool) (*PositionEstimate, error) + EstimatePosition(ctx context.Context, marketID string, openVolume string, averageEntryPrice string, orders []*v2.OrderInfo, marginAccountBalance string, generalAccountBalance string, orderMarginAccountBalance string, marginMode vega.MarginMode, marginFactor *string, includeRequiredPositionMarginInAvailableCollateral *bool, scaleLiquidationPriceToMarketDecimals *bool) (*PositionEstimate, error) EthereumKeyRotations(ctx context.Context, nodeID *string) (*v2.EthereumKeyRotationsConnection, error) + EstimateTransferFee(ctx context.Context, fromAccount string, fromAccountType vega.AccountType, toAccount string, amount string, assetID string) (*v2.EstimateTransferFeeResponse, error) + FeesStats(ctx context.Context, marketID *string, assetID *string, epoch *int, partyID *string) (*v1.FeesStats, error) + FeesStatsForParty(ctx context.Context, partyID string, assetID *string, fromEpoch *int, toEpoch *int) ([]*v2.FeesStatsForParty, error) + FundingPayments(ctx context.Context, partyID string, marketID *string, pagination *v2.Pagination) (*v2.FundingPaymentConnection, error) FundingPeriods(ctx context.Context, marketID string, dateRange *v2.DateRange, pagination *v2.Pagination) (*v2.FundingPeriodConnection, error) FundingPeriodDataPoints(ctx context.Context, marketID string, dateRange *v2.DateRange, source *v1.FundingPeriodDataPoint_Source, pagination *v2.Pagination) (*v2.FundingPeriodDataPointConnection, error) - FundingPayments(ctx context.Context, partyID string, marketID *string, pagination *v2.Pagination) (*v2.FundingPaymentConnection, error) + Games(ctx context.Context, gameID *string, epochFrom *int, epochTo *int, entityScope *vega.EntityScope, pagination *v2.Pagination) (*v2.GamesConnection, error) GetMarketDataHistoryConnectionByID(ctx context.Context, id string, start *int64, end *int64, pagination *v2.Pagination) (*v2.MarketDataConnection, error) + KeyRotationsConnection(ctx context.Context, id *string, pagination *v2.Pagination) (*v2.KeyRotationConnection, error) LedgerEntries(ctx context.Context, filter *v2.LedgerEntryFilter, dateRange *v2.DateRange, pagination *v2.Pagination) (*v2.AggregatedLedgerEntriesConnection, error) LiquidityProviders(ctx context.Context, partyID *string, marketID *string, pagination *v2.Pagination) (*v2.LiquidityProviderConnection, error) - KeyRotationsConnection(ctx context.Context, id *string, pagination *v2.Pagination) (*v2.KeyRotationConnection, error) LastBlockHeight(ctx context.Context) (string, error) Market(ctx context.Context, id string) (*vega.Market, error) MarketsConnection(ctx context.Context, id *string, pagination *v2.Pagination, includeSettled *bool) (*v2.MarketConnection, error) @@ -3197,16 +3556,16 @@ type QueryResolver interface { OrderByID(ctx context.Context, id string, version *int) (*vega.Order, error) OrderByReference(ctx context.Context, reference string) (*vega.Order, error) OrderVersionsConnection(ctx context.Context, orderID *string, pagination *v2.Pagination) (*v2.OrderConnection, error) + PaidLiquidityFees(ctx context.Context, marketID *string, assetID *string, epoch *int, partyIDs []string) (*v2.PaidLiquidityFeesConnection, error) PartiesConnection(ctx context.Context, id *string, pagination *v2.Pagination) (*v2.PartyConnection, error) + PartiesProfilesConnection(ctx context.Context, ids []string, pagination *v2.Pagination) (*v2.PartiesProfilesConnection, error) Party(ctx context.Context, id string) (*vega.Party, error) Positions(ctx context.Context, filter *v2.PositionsFilter, pagination *v2.Pagination) (*v2.PositionConnection, error) - Proposal(ctx context.Context, id *string, reference *string) (*vega.GovernanceData, error) + Proposal(ctx context.Context, id *string, reference *string) (ProposalNode, error) ProposalsConnection(ctx context.Context, proposalType *v2.ListGovernanceDataRequest_Type, inState *vega.Proposal_State, pagination *v2.Pagination) (*v2.GovernanceDataConnection, error) ProtocolUpgradeStatus(ctx context.Context) (*ProtocolUpgradeStatus, error) ProtocolUpgradeProposals(ctx context.Context, inState *v1.ProtocolUpgradeProposalStatus, approvedBy *string, pagination *v2.Pagination) (*v2.ProtocolUpgradeProposalConnection, error) ReferralSets(ctx context.Context, id *string, referrer *string, referee *string, pagination *v2.Pagination) (*v2.ReferralSetConnection, error) - FeesStats(ctx context.Context, marketID *string, assetID *string, epoch *int, partyID *string) (*v1.FeesStats, error) - FeesStatsForParty(ctx context.Context, partyID string, assetID *string, fromEpoch *int, toEpoch *int) ([]*v2.FeesStatsForParty, error) ReferralSetReferees(ctx context.Context, id *string, referrer *string, referee *string, pagination *v2.Pagination, aggregationEpochs *int) (*v2.ReferralSetRefereeConnection, error) ReferralSetStats(ctx context.Context, setID *string, epoch *int, partyID *string, pagination *v2.Pagination) (*v2.ReferralSetStatsConnection, error) Statistics(ctx context.Context) (*v12.Statistics, error) @@ -3214,15 +3573,18 @@ type QueryResolver interface { StopOrders(ctx context.Context, filter *v2.StopOrderFilter, pagination *v2.Pagination) (*v2.StopOrderConnection, error) SuccessorMarkets(ctx context.Context, marketID string, fullHistory *bool, pagination *v2.Pagination) (*v2.SuccessorMarketConnection, error) Teams(ctx context.Context, teamID *string, partyID *string, pagination *v2.Pagination) (*v2.TeamConnection, error) + TeamsStatistics(ctx context.Context, teamID *string, aggregationEpochs *int, pagination *v2.Pagination) (*v2.TeamsStatisticsConnection, error) + TeamMembersStatistics(ctx context.Context, teamID string, partyID *string, aggregationEpochs *int, pagination *v2.Pagination) (*v2.TeamMembersStatisticsConnection, error) TeamReferees(ctx context.Context, teamID string, pagination *v2.Pagination) (*v2.TeamRefereeConnection, error) TeamRefereeHistory(ctx context.Context, referee string, pagination *v2.Pagination) (*v2.TeamRefereeHistoryConnection, error) + TotalTransferFeeDiscount(ctx context.Context, partyID string, assetID string) (*v2.GetTotalTransferFeeDiscountResponse, error) Trades(ctx context.Context, filter *TradesFilter, pagination *v2.Pagination, dateRange *v2.DateRange) (*v2.TradeConnection, error) - TransfersConnection(ctx context.Context, partyID *string, direction *TransferDirection, pagination *v2.Pagination, isReward *bool) (*v2.TransferConnection, error) - Transfer(ctx context.Context, id string) (*v1.Transfer, error) + TransfersConnection(ctx context.Context, partyID *string, direction *TransferDirection, pagination *v2.Pagination, isReward *bool, fromEpoch *int, toEpoch *int, status *v1.Transfer_Status, scope *v2.ListTransfersRequest_Scope) (*v2.TransferConnection, error) + Transfer(ctx context.Context, id string) (*v2.TransferNode, error) VolumeDiscountStats(ctx context.Context, epoch *int, partyID *string, pagination *v2.Pagination) (*v2.VolumeDiscountStatsConnection, error) Withdrawal(ctx context.Context, id string) (*vega.Withdrawal, error) Withdrawals(ctx context.Context, dateRange *v2.DateRange, pagination *v2.Pagination) (*v2.WithdrawalsConnection, error) - PaidLiquidityFees(ctx context.Context, marketID *string, assetID *string, epoch *int, partyIDs []string) (*v2.PaidLiquidityFeesConnection, error) + PartyMarginModes(ctx context.Context, marketID *string, partyID *string, pagination *v2.Pagination) (*v2.PartyMarginModesConnection, error) } type RankingScoreResolver interface { VotingPower(ctx context.Context, obj *vega.RankingScore) (string, error) @@ -3240,6 +3602,9 @@ type ReferralProgramResolver interface { WindowLength(ctx context.Context, obj *vega.ReferralProgram) (int, error) } +type ReferralSetResolver interface { + TotalMembers(ctx context.Context, obj *v2.ReferralSet) (int, error) +} type ReferralSetRefereeResolver interface { RefereeID(ctx context.Context, obj *v2.ReferralSetReferee) (string, error) @@ -3320,6 +3685,8 @@ type StopOrderResolver interface { Order(ctx context.Context, obj *v1.StopOrderEvent) (*vega.Order, error) RejectionReason(ctx context.Context, obj *v1.StopOrderEvent) (*vega.StopOrder_RejectionReason, error) + SizeOverrideSetting(ctx context.Context, obj *v1.StopOrderEvent) (vega.StopOrder_SizeOverrideSetting, error) + SizeOverrideValue(ctx context.Context, obj *v1.StopOrderEvent) (*string, error) } type SubscriptionResolver interface { Accounts(ctx context.Context, marketID *string, partyID *string, assetID *string, typeArg *vega.AccountType) (<-chan []*v2.AccountBalance, error) @@ -3338,14 +3705,22 @@ type SubscriptionResolver interface { Votes(ctx context.Context, proposalID *string, partyID *string) (<-chan *ProposalVote, error) } type TeamResolver interface { + TotalMembers(ctx context.Context, obj *v2.Team) (int, error) + CreatedAtEpoch(ctx context.Context, obj *v2.Team) (int, error) } +type TeamMemberStatisticsResolver interface { + TotalGamesPlayed(ctx context.Context, obj *v2.TeamMemberStatistics) (int, error) +} type TeamRefereeResolver interface { JoinedAtEpoch(ctx context.Context, obj *v2.TeamReferee) (int, error) } type TeamRefereeHistoryResolver interface { JoinedAtEpoch(ctx context.Context, obj *v2.TeamRefereeHistory) (int, error) } +type TeamStatisticsResolver interface { + TotalGamesPlayed(ctx context.Context, obj *v2.TeamStatistics) (int, error) +} type TradableInstrumentResolver interface { RiskModel(ctx context.Context, obj *vega.TradableInstrument) (RiskModel, error) } @@ -3462,6 +3837,9 @@ type OrderFilterResolver interface { TimeInForce(ctx context.Context, obj *v2.OrderFilter, data []vega.Order_TimeInForce) error } +type OrderInfoResolver interface { + Remaining(ctx context.Context, obj *v2.OrderInfo, data string) error +} type RewardSummaryFilterResolver interface { FromEpoch(ctx context.Context, obj *v2.RewardSummaryFilter, data *int) error ToEpoch(ctx context.Context, obj *v2.RewardSummaryFilter, data *int) error @@ -3488,6 +3866,69 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in _ = ec switch typeName + "." + field { + case "AbstractMarginLevels.asset": + if e.complexity.AbstractMarginLevels.Asset == nil { + break + } + + return e.complexity.AbstractMarginLevels.Asset(childComplexity), true + + case "AbstractMarginLevels.collateralReleaseLevel": + if e.complexity.AbstractMarginLevels.CollateralReleaseLevel == nil { + break + } + + return e.complexity.AbstractMarginLevels.CollateralReleaseLevel(childComplexity), true + + case "AbstractMarginLevels.initialLevel": + if e.complexity.AbstractMarginLevels.InitialLevel == nil { + break + } + + return e.complexity.AbstractMarginLevels.InitialLevel(childComplexity), true + + case "AbstractMarginLevels.maintenanceLevel": + if e.complexity.AbstractMarginLevels.MaintenanceLevel == nil { + break + } + + return e.complexity.AbstractMarginLevels.MaintenanceLevel(childComplexity), true + + case "AbstractMarginLevels.marginFactor": + if e.complexity.AbstractMarginLevels.MarginFactor == nil { + break + } + + return e.complexity.AbstractMarginLevels.MarginFactor(childComplexity), true + + case "AbstractMarginLevels.marginMode": + if e.complexity.AbstractMarginLevels.MarginMode == nil { + break + } + + return e.complexity.AbstractMarginLevels.MarginMode(childComplexity), true + + case "AbstractMarginLevels.market": + if e.complexity.AbstractMarginLevels.Market == nil { + break + } + + return e.complexity.AbstractMarginLevels.Market(childComplexity), true + + case "AbstractMarginLevels.orderMarginLevel": + if e.complexity.AbstractMarginLevels.OrderMarginLevel == nil { + break + } + + return e.complexity.AbstractMarginLevels.OrderMarginLevel(childComplexity), true + + case "AbstractMarginLevels.searchLevel": + if e.complexity.AbstractMarginLevels.SearchLevel == nil { + break + } + + return e.complexity.AbstractMarginLevels.SearchLevel(childComplexity), true + case "AccountBalance.asset": if e.complexity.AccountBalance.Asset == nil { break @@ -4027,6 +4468,139 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.AuctionEvent.Trigger(childComplexity), true + case "BatchProposal.batchTerms": + if e.complexity.BatchProposal.BatchTerms == nil { + break + } + + return e.complexity.BatchProposal.BatchTerms(childComplexity), true + + case "BatchProposal.datetime": + if e.complexity.BatchProposal.Datetime == nil { + break + } + + return e.complexity.BatchProposal.Datetime(childComplexity), true + + case "BatchProposal.errorDetails": + if e.complexity.BatchProposal.ErrorDetails == nil { + break + } + + return e.complexity.BatchProposal.ErrorDetails(childComplexity), true + + case "BatchProposal.id": + if e.complexity.BatchProposal.ID == nil { + break + } + + return e.complexity.BatchProposal.ID(childComplexity), true + + case "BatchProposal.party": + if e.complexity.BatchProposal.Party == nil { + break + } + + return e.complexity.BatchProposal.Party(childComplexity), true + + case "BatchProposal.rationale": + if e.complexity.BatchProposal.Rationale == nil { + break + } + + return e.complexity.BatchProposal.Rationale(childComplexity), true + + case "BatchProposal.reference": + if e.complexity.BatchProposal.Reference == nil { + break + } + + return e.complexity.BatchProposal.Reference(childComplexity), true + + case "BatchProposal.rejectionReason": + if e.complexity.BatchProposal.RejectionReason == nil { + break + } + + return e.complexity.BatchProposal.RejectionReason(childComplexity), true + + case "BatchProposal.requiredLpMajority": + if e.complexity.BatchProposal.RequiredLpMajority == nil { + break + } + + return e.complexity.BatchProposal.RequiredLpMajority(childComplexity), true + + case "BatchProposal.requiredLpParticipation": + if e.complexity.BatchProposal.RequiredLpParticipation == nil { + break + } + + return e.complexity.BatchProposal.RequiredLpParticipation(childComplexity), true + + case "BatchProposal.requiredMajority": + if e.complexity.BatchProposal.RequiredMajority == nil { + break + } + + return e.complexity.BatchProposal.RequiredMajority(childComplexity), true + + case "BatchProposal.requiredParticipation": + if e.complexity.BatchProposal.RequiredParticipation == nil { + break + } + + return e.complexity.BatchProposal.RequiredParticipation(childComplexity), true + + case "BatchProposal.state": + if e.complexity.BatchProposal.State == nil { + break + } + + return e.complexity.BatchProposal.State(childComplexity), true + + case "BatchProposal.subProposals": + if e.complexity.BatchProposal.SubProposals == nil { + break + } + + return e.complexity.BatchProposal.SubProposals(childComplexity), true + + case "BatchProposal.votes": + if e.complexity.BatchProposal.Votes == nil { + break + } + + return e.complexity.BatchProposal.Votes(childComplexity), true + + case "BatchProposalTerms.changes": + if e.complexity.BatchProposalTerms.Changes == nil { + break + } + + return e.complexity.BatchProposalTerms.Changes(childComplexity), true + + case "BatchProposalTerms.closingDatetime": + if e.complexity.BatchProposalTerms.ClosingDatetime == nil { + break + } + + return e.complexity.BatchProposalTerms.ClosingDatetime(childComplexity), true + + case "BatchProposalTermsChange.change": + if e.complexity.BatchProposalTermsChange.Change == nil { + break + } + + return e.complexity.BatchProposalTermsChange.Change(childComplexity), true + + case "BatchProposalTermsChange.enactmentDatetime": + if e.complexity.BatchProposalTermsChange.EnactmentDatetime == nil { + break + } + + return e.complexity.BatchProposalTermsChange.EnactmentDatetime(childComplexity), true + case "BenefitTier.minimumEpochs": if e.complexity.BenefitTier.MinimumEpochs == nil { break @@ -4181,6 +4755,104 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.CandleEdge.Node(childComplexity), true + case "CollateralIncreaseEstimate.bestCase": + if e.complexity.CollateralIncreaseEstimate.BestCase == nil { + break + } + + return e.complexity.CollateralIncreaseEstimate.BestCase(childComplexity), true + + case "CollateralIncreaseEstimate.worstCase": + if e.complexity.CollateralIncreaseEstimate.WorstCase == nil { + break + } + + return e.complexity.CollateralIncreaseEstimate.WorstCase(childComplexity), true + + case "CompositePriceConfiguration.cashAmount": + if e.complexity.CompositePriceConfiguration.CashAmount == nil { + break + } + + return e.complexity.CompositePriceConfiguration.CashAmount(childComplexity), true + + case "CompositePriceConfiguration.CompositePriceType": + if e.complexity.CompositePriceConfiguration.CompositePriceType == nil { + break + } + + return e.complexity.CompositePriceConfiguration.CompositePriceType(childComplexity), true + + case "CompositePriceConfiguration.dataSourcesSpec": + if e.complexity.CompositePriceConfiguration.DataSourcesSpec == nil { + break + } + + return e.complexity.CompositePriceConfiguration.DataSourcesSpec(childComplexity), true + + case "CompositePriceConfiguration.dataSourcesSpecBinding": + if e.complexity.CompositePriceConfiguration.DataSourcesSpecBinding == nil { + break + } + + return e.complexity.CompositePriceConfiguration.DataSourcesSpecBinding(childComplexity), true + + case "CompositePriceConfiguration.decayPower": + if e.complexity.CompositePriceConfiguration.DecayPower == nil { + break + } + + return e.complexity.CompositePriceConfiguration.DecayPower(childComplexity), true + + case "CompositePriceConfiguration.decayWeight": + if e.complexity.CompositePriceConfiguration.DecayWeight == nil { + break + } + + return e.complexity.CompositePriceConfiguration.DecayWeight(childComplexity), true + + case "CompositePriceConfiguration.SourceStalenessTolerance": + if e.complexity.CompositePriceConfiguration.SourceStalenessTolerance == nil { + break + } + + return e.complexity.CompositePriceConfiguration.SourceStalenessTolerance(childComplexity), true + + case "CompositePriceConfiguration.SourceWeights": + if e.complexity.CompositePriceConfiguration.SourceWeights == nil { + break + } + + return e.complexity.CompositePriceConfiguration.SourceWeights(childComplexity), true + + case "CompositePriceSource.lastUpdated": + if e.complexity.CompositePriceSource.LastUpdated == nil { + break + } + + return e.complexity.CompositePriceSource.LastUpdated(childComplexity), true + + case "CompositePriceSource.price": + if e.complexity.CompositePriceSource.Price == nil { + break + } + + return e.complexity.CompositePriceSource.Price(childComplexity), true + + case "CompositePriceSource.PriceSource": + if e.complexity.CompositePriceSource.PriceSource == nil { + break + } + + return e.complexity.CompositePriceSource.PriceSource(childComplexity), true + + case "CompositePriceState.priceSources": + if e.complexity.CompositePriceState.PriceSources == nil { + break + } + + return e.complexity.CompositePriceState.PriceSources(childComplexity), true + case "Condition.operator": if e.complexity.Condition.Operator == nil { break @@ -5367,6 +6039,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Erc20WithdrawalDetails.ReceiverAddress(childComplexity), true + case "EstimatedTransferFee.discount": + if e.complexity.EstimatedTransferFee.Discount == nil { + break + } + + return e.complexity.EstimatedTransferFee.Discount(childComplexity), true + + case "EstimatedTransferFee.fee": + if e.complexity.EstimatedTransferFee.Fee == nil { + break + } + + return e.complexity.EstimatedTransferFee.Fee(childComplexity), true + case "EthCallSpec.abi": if e.complexity.EthCallSpec.Abi == nil { break @@ -5416,6 +6102,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.EthCallSpec.RequiredConfirmations(childComplexity), true + case "EthCallSpec.sourceChainId": + if e.complexity.EthCallSpec.SourceChainID == nil { + break + } + + return e.complexity.EthCallSpec.SourceChainID(childComplexity), true + case "EthCallSpec.trigger": if e.complexity.EthCallSpec.Trigger == nil { break @@ -5577,6 +6270,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Fees.Factors(childComplexity), true + case "Fees.liquidityFeeSettings": + if e.complexity.Fees.LiquidityFeeSettings == nil { + break + } + + return e.complexity.Fees.LiquidityFeeSettings(childComplexity), true + case "FeesStats.assetId": if e.complexity.FeesStats.AssetID == nil { break @@ -5976,6 +6676,69 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.FutureProduct.SettlementAsset(childComplexity), true + case "Game.entities": + if e.complexity.Game.Entities == nil { + break + } + + return e.complexity.Game.Entities(childComplexity), true + + case "Game.epoch": + if e.complexity.Game.Epoch == nil { + break + } + + return e.complexity.Game.Epoch(childComplexity), true + + case "Game.id": + if e.complexity.Game.Id == nil { + break + } + + return e.complexity.Game.Id(childComplexity), true + + case "Game.numberOfParticipants": + if e.complexity.Game.NumberOfParticipants == nil { + break + } + + return e.complexity.Game.NumberOfParticipants(childComplexity), true + + case "Game.rewardAssetId": + if e.complexity.Game.RewardAssetId == nil { + break + } + + return e.complexity.Game.RewardAssetId(childComplexity), true + + case "GameEdge.cursor": + if e.complexity.GameEdge.Cursor == nil { + break + } + + return e.complexity.GameEdge.Cursor(childComplexity), true + + case "GameEdge.node": + if e.complexity.GameEdge.Node == nil { + break + } + + return e.complexity.GameEdge.Node(childComplexity), true + + case "GamesConnection.edges": + if e.complexity.GamesConnection.Edges == nil { + break + } + + return e.complexity.GamesConnection.Edges(childComplexity), true + + case "GamesConnection.pageInfo": + if e.complexity.GamesConnection.PageInfo == nil { + break + } + + return e.complexity.GamesConnection.PageInfo(childComplexity), true + case "HistorySegment.fromHeight": if e.complexity.HistorySegment.FromHeight == nil { break @@ -6018,6 +6781,62 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.IcebergOrder.ReservedRemaining(childComplexity), true + case "IndividualGameEntity.individual": + if e.complexity.IndividualGameEntity.Individual == nil { + break + } + + return e.complexity.IndividualGameEntity.Individual(childComplexity), true + + case "IndividualGameEntity.rank": + if e.complexity.IndividualGameEntity.Rank == nil { + break + } + + return e.complexity.IndividualGameEntity.Rank(childComplexity), true + + case "IndividualGameEntity.rewardEarned": + if e.complexity.IndividualGameEntity.RewardEarned == nil { + break + } + + return e.complexity.IndividualGameEntity.RewardEarned(childComplexity), true + + case "IndividualGameEntity.rewardEarnedQuantum": + if e.complexity.IndividualGameEntity.RewardEarnedQuantum == nil { + break + } + + return e.complexity.IndividualGameEntity.RewardEarnedQuantum(childComplexity), true + + case "IndividualGameEntity.rewardMetric": + if e.complexity.IndividualGameEntity.RewardMetric == nil { + break + } + + return e.complexity.IndividualGameEntity.RewardMetric(childComplexity), true + + case "IndividualGameEntity.totalRewardsEarned": + if e.complexity.IndividualGameEntity.TotalRewardsEarned == nil { + break + } + + return e.complexity.IndividualGameEntity.TotalRewardsEarned(childComplexity), true + + case "IndividualGameEntity.totalRewardsEarnedQuantum": + if e.complexity.IndividualGameEntity.TotalRewardsEarnedQuantum == nil { + break + } + + return e.complexity.IndividualGameEntity.TotalRewardsEarnedQuantum(childComplexity), true + + case "IndividualGameEntity.volume": + if e.complexity.IndividualGameEntity.Volume == nil { + break + } + + return e.complexity.IndividualGameEntity.Volume(childComplexity), true + case "Instrument.code": if e.complexity.Instrument.Code == nil { break @@ -6242,26 +7061,54 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.LiquidationPrice.OpenVolumeOnly(childComplexity), true - case "LiquidityMonitoringParameters.auctionExtensionSecs": - if e.complexity.LiquidityMonitoringParameters.AuctionExtensionSecs == nil { + case "LiquidationStrategy.disposalFraction": + if e.complexity.LiquidationStrategy.DisposalFraction == nil { break } - return e.complexity.LiquidityMonitoringParameters.AuctionExtensionSecs(childComplexity), true + return e.complexity.LiquidationStrategy.DisposalFraction(childComplexity), true - case "LiquidityMonitoringParameters.targetStakeParameters": - if e.complexity.LiquidityMonitoringParameters.TargetStakeParameters == nil { + case "LiquidationStrategy.disposalTimeStep": + if e.complexity.LiquidationStrategy.DisposalTimeStep == nil { break } - return e.complexity.LiquidityMonitoringParameters.TargetStakeParameters(childComplexity), true + return e.complexity.LiquidationStrategy.DisposalTimeStep(childComplexity), true + + case "LiquidationStrategy.fullDisposalSize": + if e.complexity.LiquidationStrategy.FullDisposalSize == nil { + break + } + + return e.complexity.LiquidationStrategy.FullDisposalSize(childComplexity), true + + case "LiquidationStrategy.maxFractionConsumed": + if e.complexity.LiquidationStrategy.MaxFractionConsumed == nil { + break + } + + return e.complexity.LiquidationStrategy.MaxFractionConsumed(childComplexity), true + + case "LiquidityFeeSettings.feeConstant": + if e.complexity.LiquidityFeeSettings.FeeConstant == nil { + break + } + + return e.complexity.LiquidityFeeSettings.FeeConstant(childComplexity), true + + case "LiquidityFeeSettings.method": + if e.complexity.LiquidityFeeSettings.Method == nil { + break + } + + return e.complexity.LiquidityFeeSettings.Method(childComplexity), true - case "LiquidityMonitoringParameters.triggeringRatio": - if e.complexity.LiquidityMonitoringParameters.TriggeringRatio == nil { + case "LiquidityMonitoringParameters.targetStakeParameters": + if e.complexity.LiquidityMonitoringParameters.TargetStakeParameters == nil { break } - return e.complexity.LiquidityMonitoringParameters.TriggeringRatio(childComplexity), true + return e.complexity.LiquidityMonitoringParameters.TargetStakeParameters(childComplexity), true case "LiquidityOrder.offset": if e.complexity.LiquidityOrder.Offset == nil { @@ -6872,6 +7719,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.MarginLevels.MaintenanceLevel(childComplexity), true + case "MarginLevels.marginFactor": + if e.complexity.MarginLevels.MarginFactor == nil { + break + } + + return e.complexity.MarginLevels.MarginFactor(childComplexity), true + + case "MarginLevels.marginMode": + if e.complexity.MarginLevels.MarginMode == nil { + break + } + + return e.complexity.MarginLevels.MarginMode(childComplexity), true + case "MarginLevels.market": if e.complexity.MarginLevels.Market == nil { break @@ -6879,6 +7740,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.MarginLevels.Market(childComplexity), true + case "MarginLevels.orderMarginLevel": + if e.complexity.MarginLevels.OrderMarginLevel == nil { + break + } + + return e.complexity.MarginLevels.OrderMarginLevel(childComplexity), true + case "MarginLevels.party": if e.complexity.MarginLevels.Party == nil { break @@ -6928,6 +7796,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.MarginLevelsUpdate.MaintenanceLevel(childComplexity), true + case "MarginLevelsUpdate.marginFactor": + if e.complexity.MarginLevelsUpdate.MarginFactor == nil { + break + } + + return e.complexity.MarginLevelsUpdate.MarginFactor(childComplexity), true + + case "MarginLevelsUpdate.marginMode": + if e.complexity.MarginLevelsUpdate.MarginMode == nil { + break + } + + return e.complexity.MarginLevelsUpdate.MarginMode(childComplexity), true + case "MarginLevelsUpdate.marketId": if e.complexity.MarginLevelsUpdate.MarketId == nil { break @@ -6935,6 +7817,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.MarginLevelsUpdate.MarketId(childComplexity), true + case "MarginLevelsUpdate.orderMarginLevel": + if e.complexity.MarginLevelsUpdate.OrderMarginLevel == nil { + break + } + + return e.complexity.MarginLevelsUpdate.OrderMarginLevel(childComplexity), true + case "MarginLevelsUpdate.partyId": if e.complexity.MarginLevelsUpdate.PartyId == nil { break @@ -7034,6 +7923,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Market.LinearSlippageFactor(childComplexity), true + case "Market.liquidationStrategy": + if e.complexity.Market.LiquidationStrategy == nil { + break + } + + return e.complexity.Market.LiquidationStrategy(childComplexity), true + case "Market.liquidityMonitoringParameters": if e.complexity.Market.LiquidityMonitoringParameters == nil { break @@ -7072,6 +7968,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Market.LiquiditySLAParameters(childComplexity), true + case "Market.markPriceConfiguration": + if e.complexity.Market.MarkPriceConfiguration == nil { + break + } + + return e.complexity.Market.MarkPriceConfiguration(childComplexity), true + + case "Market.marketProposal": + if e.complexity.Market.MarketProposal == nil { + break + } + + return e.complexity.Market.MarketProposal(childComplexity), true + case "Market.marketTimestamps": if e.complexity.Market.MarketTimestamps == nil { break @@ -7320,6 +8230,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.MarketData.MarkPrice(childComplexity), true + case "MarketData.markPriceState": + if e.complexity.MarketData.MarkPriceState == nil { + break + } + + return e.complexity.MarketData.MarkPriceState(childComplexity), true + + case "MarketData.markPriceType": + if e.complexity.MarketData.MarkPriceType == nil { + break + } + + return e.complexity.MarketData.MarkPriceType(childComplexity), true + case "MarketData.market": if e.complexity.MarketData.Market == nil { break @@ -7369,6 +8293,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.MarketData.NextMarkToMarket(childComplexity), true + case "MarketData.nextNetworkCloseout": + if e.complexity.MarketData.NextNetworkCloseout == nil { + break + } + + return e.complexity.MarketData.NextNetworkCloseout(childComplexity), true + case "MarketData.openInterest": if e.complexity.MarketData.OpenInterest == nil { break @@ -7628,6 +8559,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.MarketTimestamps.Proposed(childComplexity), true + case "Metadata.key": + if e.complexity.Metadata.Key == nil { + break + } + + return e.complexity.Metadata.Key(childComplexity), true + + case "Metadata.value": + if e.complexity.Metadata.Value == nil { + break + } + + return e.complexity.Metadata.Value(childComplexity), true + case "NetworkLimits.canProposeAsset": if e.complexity.NetworkLimits.CanProposeAsset == nil { break @@ -7782,6 +8727,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.NewMarket.LinearSlippageFactor(childComplexity), true + case "NewMarket.liquidationStrategy": + if e.complexity.NewMarket.LiquidationStrategy == nil { + break + } + + return e.complexity.NewMarket.LiquidationStrategy(childComplexity), true + + case "NewMarket.liquidityFeeSettings": + if e.complexity.NewMarket.LiquidityFeeSettings == nil { + break + } + + return e.complexity.NewMarket.LiquidityFeeSettings(childComplexity), true + case "NewMarket.liquidityMonitoringParameters": if e.complexity.NewMarket.LiquidityMonitoringParameters == nil { break @@ -7796,6 +8755,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.NewMarket.LiquiditySLAParameters(childComplexity), true + case "NewMarket.markPriceConfiguration": + if e.complexity.NewMarket.MarkPriceConfiguration == nil { + break + } + + return e.complexity.NewMarket.MarkPriceConfiguration(childComplexity), true + case "NewMarket.metadata": if e.complexity.NewMarket.Metadata == nil { break @@ -7852,6 +8818,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.NewSpotMarket.Instrument(childComplexity), true + case "NewSpotMarket.liquidityFeeSettings": + if e.complexity.NewSpotMarket.LiquidityFeeSettings == nil { + break + } + + return e.complexity.NewSpotMarket.LiquidityFeeSettings(childComplexity), true + case "NewSpotMarket.liquiditySLAParams": if e.complexity.NewSpotMarket.LiquiditySLAParams == nil { break @@ -8529,6 +9502,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.ObservableMarketData.MarkPrice(childComplexity), true + case "ObservableMarketData.markPriceState": + if e.complexity.ObservableMarketData.MarkPriceState == nil { + break + } + + return e.complexity.ObservableMarketData.MarkPriceState(childComplexity), true + + case "ObservableMarketData.markPriceType": + if e.complexity.ObservableMarketData.MarkPriceType == nil { + break + } + + return e.complexity.ObservableMarketData.MarkPriceType(childComplexity), true + case "ObservableMarketData.marketGrowth": if e.complexity.ObservableMarketData.MarketGrowth == nil { break @@ -9316,6 +10303,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PaidLiquidityFeesEdge.Node(childComplexity), true + case "PartiesProfilesConnection.edges": + if e.complexity.PartiesProfilesConnection.Edges == nil { + break + } + + return e.complexity.PartiesProfilesConnection.Edges(childComplexity), true + + case "PartiesProfilesConnection.pageInfo": + if e.complexity.PartiesProfilesConnection.PageInfo == nil { + break + } + + return e.complexity.PartiesProfilesConnection.PageInfo(childComplexity), true + case "Party.accountsConnection": if e.complexity.Party.AccountsConnection == nil { break @@ -9465,7 +10466,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return 0, false } - return e.complexity.Party.RewardsConnection(childComplexity, args["assetId"].(*string), args["pagination"].(*v2.Pagination), args["fromEpoch"].(*int), args["toEpoch"].(*int)), true + return e.complexity.Party.RewardsConnection(childComplexity, args["assetId"].(*string), args["pagination"].(*v2.Pagination), args["fromEpoch"].(*int), args["toEpoch"].(*int), args["teamId"].(*string), args["gameId"].(*string)), true case "Party.stakingSummary": if e.complexity.Party.StakingSummary == nil { @@ -9501,7 +10502,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return 0, false } - return e.complexity.Party.TransfersConnection(childComplexity, args["direction"].(*TransferDirection), args["pagination"].(*v2.Pagination), args["isReward"].(*bool)), true + return e.complexity.Party.TransfersConnection(childComplexity, args["direction"].(*TransferDirection), args["pagination"].(*v2.Pagination), args["isReward"].(*bool), args["fromEpoch"].(*int), args["toEpoch"].(*int), args["status"].(*v1.Transfer_Status), args["scope"].(*v2.ListTransfersRequest_Scope)), true case "Party.vestingBalancesSummary": if e.complexity.Party.VestingBalancesSummary == nil { @@ -9665,6 +10666,118 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PartyLockedBalance.UntilEpoch(childComplexity), true + case "PartyMarginMode.atEpoch": + if e.complexity.PartyMarginMode.AtEpoch == nil { + break + } + + return e.complexity.PartyMarginMode.AtEpoch(childComplexity), true + + case "PartyMarginMode.marginFactor": + if e.complexity.PartyMarginMode.MarginFactor == nil { + break + } + + return e.complexity.PartyMarginMode.MarginFactor(childComplexity), true + + case "PartyMarginMode.marginMode": + if e.complexity.PartyMarginMode.MarginMode == nil { + break + } + + return e.complexity.PartyMarginMode.MarginMode(childComplexity), true + + case "PartyMarginMode.marketId": + if e.complexity.PartyMarginMode.MarketId == nil { + break + } + + return e.complexity.PartyMarginMode.MarketId(childComplexity), true + + case "PartyMarginMode.maxTheoreticalLeverage": + if e.complexity.PartyMarginMode.MaxTheoreticalLeverage == nil { + break + } + + return e.complexity.PartyMarginMode.MaxTheoreticalLeverage(childComplexity), true + + case "PartyMarginMode.minTheoreticalMarginFactor": + if e.complexity.PartyMarginMode.MinTheoreticalMarginFactor == nil { + break + } + + return e.complexity.PartyMarginMode.MinTheoreticalMarginFactor(childComplexity), true + + case "PartyMarginMode.partyId": + if e.complexity.PartyMarginMode.PartyId == nil { + break + } + + return e.complexity.PartyMarginMode.PartyId(childComplexity), true + + case "PartyMarginModeEdge.cursor": + if e.complexity.PartyMarginModeEdge.Cursor == nil { + break + } + + return e.complexity.PartyMarginModeEdge.Cursor(childComplexity), true + + case "PartyMarginModeEdge.node": + if e.complexity.PartyMarginModeEdge.Node == nil { + break + } + + return e.complexity.PartyMarginModeEdge.Node(childComplexity), true + + case "PartyMarginModesConnection.edges": + if e.complexity.PartyMarginModesConnection.Edges == nil { + break + } + + return e.complexity.PartyMarginModesConnection.Edges(childComplexity), true + + case "PartyMarginModesConnection.pageInfo": + if e.complexity.PartyMarginModesConnection.PageInfo == nil { + break + } + + return e.complexity.PartyMarginModesConnection.PageInfo(childComplexity), true + + case "PartyProfile.alias": + if e.complexity.PartyProfile.Alias == nil { + break + } + + return e.complexity.PartyProfile.Alias(childComplexity), true + + case "PartyProfile.metadata": + if e.complexity.PartyProfile.Metadata == nil { + break + } + + return e.complexity.PartyProfile.Metadata(childComplexity), true + + case "PartyProfile.partyId": + if e.complexity.PartyProfile.PartyId == nil { + break + } + + return e.complexity.PartyProfile.PartyId(childComplexity), true + + case "PartyProfileEdge.cursor": + if e.complexity.PartyProfileEdge.Cursor == nil { + break + } + + return e.complexity.PartyProfileEdge.Cursor(childComplexity), true + + case "PartyProfileEdge.node": + if e.complexity.PartyProfileEdge.Node == nil { + break + } + + return e.complexity.PartyProfileEdge.Node(childComplexity), true + case "PartyStake.currentStakeAvailable": if e.complexity.PartyStake.CurrentStakeAvailable == nil { break @@ -9784,6 +10897,27 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Perpetual.DataSourceSpecForSettlementSchedule(childComplexity), true + case "Perpetual.fundingRateLowerBound": + if e.complexity.Perpetual.FundingRateLowerBound == nil { + break + } + + return e.complexity.Perpetual.FundingRateLowerBound(childComplexity), true + + case "Perpetual.fundingRateScalingFactor": + if e.complexity.Perpetual.FundingRateScalingFactor == nil { + break + } + + return e.complexity.Perpetual.FundingRateScalingFactor(childComplexity), true + + case "Perpetual.fundingRateUpperBound": + if e.complexity.Perpetual.FundingRateUpperBound == nil { + break + } + + return e.complexity.Perpetual.FundingRateUpperBound(childComplexity), true + case "Perpetual.interestRate": if e.complexity.Perpetual.InterestRate == nil { break @@ -9791,6 +10925,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Perpetual.InterestRate(childComplexity), true + case "Perpetual.internalCompositePriceConfig": + if e.complexity.Perpetual.InternalCompositePriceConfig == nil { + break + } + + return e.complexity.Perpetual.InternalCompositePriceConfig(childComplexity), true + case "Perpetual.marginFundingFactor": if e.complexity.Perpetual.MarginFundingFactor == nil { break @@ -9833,6 +10974,27 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PerpetualData.FundingRate(childComplexity), true + case "PerpetualData.internalCompositePrice": + if e.complexity.PerpetualData.InternalCompositePrice == nil { + break + } + + return e.complexity.PerpetualData.InternalCompositePrice(childComplexity), true + + case "PerpetualData.internalCompositePriceState": + if e.complexity.PerpetualData.InternalCompositePriceState == nil { + break + } + + return e.complexity.PerpetualData.InternalCompositePriceState(childComplexity), true + + case "PerpetualData.internalCompositePriceType": + if e.complexity.PerpetualData.InternalCompositePriceType == nil { + break + } + + return e.complexity.PerpetualData.InternalCompositePriceType(childComplexity), true + case "PerpetualData.internalTwap": if e.complexity.PerpetualData.InternalTwap == nil { break @@ -9840,6 +11002,34 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PerpetualData.InternalTwap(childComplexity), true + case "PerpetualData.nextInternalCompositePriceCalc": + if e.complexity.PerpetualData.NextInternalCompositePriceCalc == nil { + break + } + + return e.complexity.PerpetualData.NextInternalCompositePriceCalc(childComplexity), true + + case "PerpetualData.seqNum": + if e.complexity.PerpetualData.SeqNum == nil { + break + } + + return e.complexity.PerpetualData.SeqNum(childComplexity), true + + case "PerpetualData.startTime": + if e.complexity.PerpetualData.StartTime == nil { + break + } + + return e.complexity.PerpetualData.StartTime(childComplexity), true + + case "PerpetualData.underlyingIndexPrice": + if e.complexity.PerpetualData.UnderlyingIndexPrice == nil { + break + } + + return e.complexity.PerpetualData.UnderlyingIndexPrice(childComplexity), true + case "PerpetualProduct.clampLowerBound": if e.complexity.PerpetualProduct.ClampLowerBound == nil { break @@ -9875,6 +11065,27 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PerpetualProduct.DataSourceSpecForSettlementSchedule(childComplexity), true + case "PerpetualProduct.fundingRateLowerBound": + if e.complexity.PerpetualProduct.FundingRateLowerBound == nil { + break + } + + return e.complexity.PerpetualProduct.FundingRateLowerBound(childComplexity), true + + case "PerpetualProduct.fundingRateScalingFactor": + if e.complexity.PerpetualProduct.FundingRateScalingFactor == nil { + break + } + + return e.complexity.PerpetualProduct.FundingRateScalingFactor(childComplexity), true + + case "PerpetualProduct.fundingRateUpperBound": + if e.complexity.PerpetualProduct.FundingRateUpperBound == nil { + break + } + + return e.complexity.PerpetualProduct.FundingRateUpperBound(childComplexity), true + case "PerpetualProduct.interestRate": if e.complexity.PerpetualProduct.InterestRate == nil { break @@ -10006,6 +11217,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PositionEdge.Node(childComplexity), true + case "PositionEstimate.collateralIncreaseEstimate": + if e.complexity.PositionEstimate.CollateralIncreaseEstimate == nil { + break + } + + return e.complexity.PositionEstimate.CollateralIncreaseEstimate(childComplexity), true + case "PositionEstimate.liquidation": if e.complexity.PositionEstimate.Liquidation == nil { break @@ -10328,6 +11546,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Proposal.Votes(childComplexity), true + case "ProposalDetail.batchId": + if e.complexity.ProposalDetail.BatchId == nil { + break + } + + return e.complexity.ProposalDetail.BatchId(childComplexity), true + + case "ProposalDetail.batchTerms": + if e.complexity.ProposalDetail.BatchTerms == nil { + break + } + + return e.complexity.ProposalDetail.BatchTerms(childComplexity), true + case "ProposalDetail.datetime": if e.complexity.ProposalDetail.Datetime == nil { break @@ -10433,6 +11665,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.ProposalEdge.Node(childComplexity), true + case "ProposalEdge.proposalNode": + if e.complexity.ProposalEdge.ProposalNode == nil { + break + } + + return e.complexity.ProposalEdge.ProposalNode(childComplexity), true + case "ProposalRationale.description": if e.complexity.ProposalRationale.Description == nil { break @@ -10650,6 +11889,34 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PubKey.Key(childComplexity), true + case "QuantumRewardsPerEpoch.epoch": + if e.complexity.QuantumRewardsPerEpoch.Epoch == nil { + break + } + + return e.complexity.QuantumRewardsPerEpoch.Epoch(childComplexity), true + + case "QuantumRewardsPerEpoch.totalQuantumRewards": + if e.complexity.QuantumRewardsPerEpoch.TotalQuantumRewards == nil { + break + } + + return e.complexity.QuantumRewardsPerEpoch.TotalQuantumRewards(childComplexity), true + + case "QuantumVolumesPerEpoch.epoch": + if e.complexity.QuantumVolumesPerEpoch.Epoch == nil { + break + } + + return e.complexity.QuantumVolumesPerEpoch.Epoch(childComplexity), true + + case "QuantumVolumesPerEpoch.totalQuantumVolumes": + if e.complexity.QuantumVolumesPerEpoch.TotalQuantumVolumes == nil { + break + } + + return e.complexity.QuantumVolumesPerEpoch.TotalQuantumVolumes(childComplexity), true + case "Query.asset": if e.complexity.Query.Asset == nil { break @@ -10866,7 +12133,19 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return 0, false } - return e.complexity.Query.EstimatePosition(childComplexity, args["marketId"].(string), args["openVolume"].(string), args["orders"].([]*OrderInfo), args["collateralAvailable"].(*string), args["scaleLiquidationPriceToMarketDecimals"].(*bool)), true + return e.complexity.Query.EstimatePosition(childComplexity, args["marketId"].(string), args["openVolume"].(string), args["averageEntryPrice"].(string), args["orders"].([]*v2.OrderInfo), args["marginAccountBalance"].(string), args["generalAccountBalance"].(string), args["orderMarginAccountBalance"].(string), args["marginMode"].(vega.MarginMode), args["marginFactor"].(*string), args["includeRequiredPositionMarginInAvailableCollateral"].(*bool), args["scaleLiquidationPriceToMarketDecimals"].(*bool)), true + + case "Query.estimateTransferFee": + if e.complexity.Query.EstimateTransferFee == nil { + break + } + + args, err := ec.field_Query_estimateTransferFee_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.EstimateTransferFee(childComplexity, args["fromAccount"].(string), args["fromAccountType"].(vega.AccountType), args["toAccount"].(string), args["amount"].(string), args["assetId"].(string)), true case "Query.ethereumKeyRotations": if e.complexity.Query.EthereumKeyRotations == nil { @@ -10940,6 +12219,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.FundingPeriods(childComplexity, args["marketId"].(string), args["dateRange"].(*v2.DateRange), args["pagination"].(*v2.Pagination)), true + case "Query.games": + if e.complexity.Query.Games == nil { + break + } + + args, err := ec.field_Query_games_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.Games(childComplexity, args["gameId"].(*string), args["epochFrom"].(*int), args["epochTo"].(*int), args["entityScope"].(*vega.EntityScope), args["pagination"].(*v2.Pagination)), true + case "Query.getMarketDataHistoryConnectionByID": if e.complexity.Query.GetMarketDataHistoryConnectionByID == nil { break @@ -11208,6 +12499,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.PartiesConnection(childComplexity, args["id"].(*string), args["pagination"].(*v2.Pagination)), true + case "Query.partiesProfilesConnection": + if e.complexity.Query.PartiesProfilesConnection == nil { + break + } + + args, err := ec.field_Query_partiesProfilesConnection_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.PartiesProfilesConnection(childComplexity, args["ids"].([]string), args["pagination"].(*v2.Pagination)), true + case "Query.party": if e.complexity.Query.Party == nil { break @@ -11220,6 +12523,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Party(childComplexity, args["id"].(string)), true + case "Query.partyMarginModes": + if e.complexity.Query.PartyMarginModes == nil { + break + } + + args, err := ec.field_Query_partyMarginModes_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.PartyMarginModes(childComplexity, args["marketId"].(*string), args["partyId"].(*string), args["pagination"].(*v2.Pagination)), true + case "Query.positions": if e.complexity.Query.Positions == nil { break @@ -11354,6 +12669,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.SuccessorMarkets(childComplexity, args["marketId"].(string), args["fullHistory"].(*bool), args["pagination"].(*v2.Pagination)), true + case "Query.teamMembersStatistics": + if e.complexity.Query.TeamMembersStatistics == nil { + break + } + + args, err := ec.field_Query_teamMembersStatistics_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.TeamMembersStatistics(childComplexity, args["teamId"].(string), args["partyId"].(*string), args["aggregationEpochs"].(*int), args["pagination"].(*v2.Pagination)), true + case "Query.teamRefereeHistory": if e.complexity.Query.TeamRefereeHistory == nil { break @@ -11390,6 +12717,30 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Teams(childComplexity, args["teamId"].(*string), args["partyId"].(*string), args["pagination"].(*v2.Pagination)), true + case "Query.teamsStatistics": + if e.complexity.Query.TeamsStatistics == nil { + break + } + + args, err := ec.field_Query_teamsStatistics_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.TeamsStatistics(childComplexity, args["teamId"].(*string), args["aggregationEpochs"].(*int), args["pagination"].(*v2.Pagination)), true + + case "Query.totalTransferFeeDiscount": + if e.complexity.Query.TotalTransferFeeDiscount == nil { + break + } + + args, err := ec.field_Query_totalTransferFeeDiscount_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.TotalTransferFeeDiscount(childComplexity, args["partyId"].(string), args["assetId"].(string)), true + case "Query.trades": if e.complexity.Query.Trades == nil { break @@ -11424,7 +12775,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return 0, false } - return e.complexity.Query.TransfersConnection(childComplexity, args["partyId"].(*string), args["direction"].(*TransferDirection), args["pagination"].(*v2.Pagination), args["isReward"].(*bool)), true + return e.complexity.Query.TransfersConnection(childComplexity, args["partyId"].(*string), args["direction"].(*TransferDirection), args["pagination"].(*v2.Pagination), args["isReward"].(*bool), args["fromEpoch"].(*int), args["toEpoch"].(*int), args["status"].(*v1.Transfer_Status), args["scope"].(*v2.ListTransfersRequest_Scope)), true case "Query.volumeDiscountStats": if e.complexity.Query.VolumeDiscountStats == nil { @@ -11630,6 +12981,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.ReferralSet.Referrer(childComplexity), true + case "ReferralSet.totalMembers": + if e.complexity.ReferralSet.TotalMembers == nil { + break + } + + return e.complexity.ReferralSet.TotalMembers(childComplexity), true + case "ReferralSet.updatedAt": if e.complexity.ReferralSet.UpdatedAt == nil { break @@ -11868,6 +13226,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Reward.Epoch(childComplexity), true + case "Reward.gameId": + if e.complexity.Reward.GameId == nil { + break + } + + return e.complexity.Reward.GameId(childComplexity), true + case "Reward.lockedUntilEpoch": if e.complexity.Reward.LockedUntilEpoch == nil { break @@ -11896,6 +13261,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Reward.PercentageOfTotal(childComplexity), true + case "Reward.quantumAmount": + if e.complexity.Reward.QuantumAmount == nil { + break + } + + return e.complexity.Reward.QuantumAmount(childComplexity), true + case "Reward.receivedAt": if e.complexity.Reward.ReceivedAt == nil { break @@ -11910,6 +13282,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Reward.RewardType(childComplexity), true + case "Reward.teamId": + if e.complexity.Reward.TeamId == nil { + break + } + + return e.complexity.Reward.TeamId(childComplexity), true + case "RewardEdge.cursor": if e.complexity.RewardEdge.Cursor == nil { break @@ -12160,6 +13539,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.SimpleRiskModelParams.FactorShort(childComplexity), true + case "SpecBindingForCompositePrice.priceSourceProperty": + if e.complexity.SpecBindingForCompositePrice.PriceSourceProperty == nil { + break + } + + return e.complexity.SpecBindingForCompositePrice.PriceSourceProperty(childComplexity), true + case "Spot.baseAsset": if e.complexity.Spot.BaseAsset == nil { break @@ -12578,6 +13964,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.StopOrder.RejectionReason(childComplexity), true + case "StopOrder.sizeOverrideSetting": + if e.complexity.StopOrder.SizeOverrideSetting == nil { + break + } + + return e.complexity.StopOrder.SizeOverrideSetting(childComplexity), true + + case "StopOrder.sizeOverrideValue": + if e.complexity.StopOrder.SizeOverrideValue == nil { + break + } + + return e.complexity.StopOrder.SizeOverrideValue(childComplexity), true + case "StopOrder.status": if e.complexity.StopOrder.Status == nil { break @@ -12893,7 +14293,14 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.TargetStakeParameters.TimeWindow(childComplexity), true - case "Team.avatarURL": + case "Team.allowList": + if e.complexity.Team.AllowList == nil { + break + } + + return e.complexity.Team.AllowList(childComplexity), true + + case "Team.avatarUrl": if e.complexity.Team.AvatarUrl == nil { break } @@ -12942,13 +14349,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Team.TeamId(childComplexity), true - case "Team.teamURL": + case "Team.teamUrl": if e.complexity.Team.TeamUrl == nil { break } return e.complexity.Team.TeamUrl(childComplexity), true + case "Team.totalMembers": + if e.complexity.Team.TotalMembers == nil { + break + } + + return e.complexity.Team.TotalMembers(childComplexity), true + case "TeamConnection.edges": if e.complexity.TeamConnection.Edges == nil { break @@ -12977,6 +14391,153 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.TeamEdge.Node(childComplexity), true + case "TeamGameEntity.rank": + if e.complexity.TeamGameEntity.Rank == nil { + break + } + + return e.complexity.TeamGameEntity.Rank(childComplexity), true + + case "TeamGameEntity.rewardEarned": + if e.complexity.TeamGameEntity.RewardEarned == nil { + break + } + + return e.complexity.TeamGameEntity.RewardEarned(childComplexity), true + + case "TeamGameEntity.rewardEarnedQuantum": + if e.complexity.TeamGameEntity.RewardEarnedQuantum == nil { + break + } + + return e.complexity.TeamGameEntity.RewardEarnedQuantum(childComplexity), true + + case "TeamGameEntity.rewardMetric": + if e.complexity.TeamGameEntity.RewardMetric == nil { + break + } + + return e.complexity.TeamGameEntity.RewardMetric(childComplexity), true + + case "TeamGameEntity.team": + if e.complexity.TeamGameEntity.Team == nil { + break + } + + return e.complexity.TeamGameEntity.Team(childComplexity), true + + case "TeamGameEntity.totalRewardsEarned": + if e.complexity.TeamGameEntity.TotalRewardsEarned == nil { + break + } + + return e.complexity.TeamGameEntity.TotalRewardsEarned(childComplexity), true + + case "TeamGameEntity.totalRewardsEarnedQuantum": + if e.complexity.TeamGameEntity.TotalRewardsEarnedQuantum == nil { + break + } + + return e.complexity.TeamGameEntity.TotalRewardsEarnedQuantum(childComplexity), true + + case "TeamGameEntity.volume": + if e.complexity.TeamGameEntity.Volume == nil { + break + } + + return e.complexity.TeamGameEntity.Volume(childComplexity), true + + case "TeamMemberStatistics.gamesPlayed": + if e.complexity.TeamMemberStatistics.GamesPlayed == nil { + break + } + + return e.complexity.TeamMemberStatistics.GamesPlayed(childComplexity), true + + case "TeamMemberStatistics.partyId": + if e.complexity.TeamMemberStatistics.PartyId == nil { + break + } + + return e.complexity.TeamMemberStatistics.PartyId(childComplexity), true + + case "TeamMemberStatistics.quantumRewards": + if e.complexity.TeamMemberStatistics.QuantumRewards == nil { + break + } + + return e.complexity.TeamMemberStatistics.QuantumRewards(childComplexity), true + + case "TeamMemberStatistics.quantumVolumes": + if e.complexity.TeamMemberStatistics.QuantumVolumes == nil { + break + } + + return e.complexity.TeamMemberStatistics.QuantumVolumes(childComplexity), true + + case "TeamMemberStatistics.totalGamesPlayed": + if e.complexity.TeamMemberStatistics.TotalGamesPlayed == nil { + break + } + + return e.complexity.TeamMemberStatistics.TotalGamesPlayed(childComplexity), true + + case "TeamMemberStatistics.totalQuantumRewards": + if e.complexity.TeamMemberStatistics.TotalQuantumRewards == nil { + break + } + + return e.complexity.TeamMemberStatistics.TotalQuantumRewards(childComplexity), true + + case "TeamMemberStatistics.totalQuantumVolume": + if e.complexity.TeamMemberStatistics.TotalQuantumVolume == nil { + break + } + + return e.complexity.TeamMemberStatistics.TotalQuantumVolume(childComplexity), true + + case "TeamMemberStatisticsEdge.cursor": + if e.complexity.TeamMemberStatisticsEdge.Cursor == nil { + break + } + + return e.complexity.TeamMemberStatisticsEdge.Cursor(childComplexity), true + + case "TeamMemberStatisticsEdge.node": + if e.complexity.TeamMemberStatisticsEdge.Node == nil { + break + } + + return e.complexity.TeamMemberStatisticsEdge.Node(childComplexity), true + + case "TeamMembersStatisticsConnection.edges": + if e.complexity.TeamMembersStatisticsConnection.Edges == nil { + break + } + + return e.complexity.TeamMembersStatisticsConnection.Edges(childComplexity), true + + case "TeamMembersStatisticsConnection.pageInfo": + if e.complexity.TeamMembersStatisticsConnection.PageInfo == nil { + break + } + + return e.complexity.TeamMembersStatisticsConnection.PageInfo(childComplexity), true + + case "TeamParticipation.membersParticipating": + if e.complexity.TeamParticipation.MembersParticipating == nil { + break + } + + return e.complexity.TeamParticipation.MembersParticipating(childComplexity), true + + case "TeamParticipation.teamId": + if e.complexity.TeamParticipation.TeamID == nil { + break + } + + return e.complexity.TeamParticipation.TeamID(childComplexity), true + case "TeamReferee.joinedAt": if e.complexity.TeamReferee.JoinedAt == nil { break @@ -13082,6 +14643,83 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.TeamRefereeHistoryEdge.Node(childComplexity), true + case "TeamStatistics.gamesPlayed": + if e.complexity.TeamStatistics.GamesPlayed == nil { + break + } + + return e.complexity.TeamStatistics.GamesPlayed(childComplexity), true + + case "TeamStatistics.quantumRewards": + if e.complexity.TeamStatistics.QuantumRewards == nil { + break + } + + return e.complexity.TeamStatistics.QuantumRewards(childComplexity), true + + case "TeamStatistics.quantumVolumes": + if e.complexity.TeamStatistics.QuantumVolumes == nil { + break + } + + return e.complexity.TeamStatistics.QuantumVolumes(childComplexity), true + + case "TeamStatistics.teamId": + if e.complexity.TeamStatistics.TeamId == nil { + break + } + + return e.complexity.TeamStatistics.TeamId(childComplexity), true + + case "TeamStatistics.totalGamesPlayed": + if e.complexity.TeamStatistics.TotalGamesPlayed == nil { + break + } + + return e.complexity.TeamStatistics.TotalGamesPlayed(childComplexity), true + + case "TeamStatistics.totalQuantumRewards": + if e.complexity.TeamStatistics.TotalQuantumRewards == nil { + break + } + + return e.complexity.TeamStatistics.TotalQuantumRewards(childComplexity), true + + case "TeamStatistics.totalQuantumVolume": + if e.complexity.TeamStatistics.TotalQuantumVolume == nil { + break + } + + return e.complexity.TeamStatistics.TotalQuantumVolume(childComplexity), true + + case "TeamStatisticsEdge.cursor": + if e.complexity.TeamStatisticsEdge.Cursor == nil { + break + } + + return e.complexity.TeamStatisticsEdge.Cursor(childComplexity), true + + case "TeamStatisticsEdge.node": + if e.complexity.TeamStatisticsEdge.Node == nil { + break + } + + return e.complexity.TeamStatisticsEdge.Node(childComplexity), true + + case "TeamsStatisticsConnection.edges": + if e.complexity.TeamsStatisticsConnection.Edges == nil { + break + } + + return e.complexity.TeamsStatisticsConnection.Edges(childComplexity), true + + case "TeamsStatisticsConnection.pageInfo": + if e.complexity.TeamsStatisticsConnection.PageInfo == nil { + break + } + + return e.complexity.TeamsStatisticsConnection.PageInfo(childComplexity), true + case "TimeUpdate.timestamp": if e.complexity.TimeUpdate.Timestamp == nil { break @@ -13089,6 +14727,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.TimeUpdate.Timestamp(childComplexity), true + case "TotalTransferFeeDiscount.totalDiscount": + if e.complexity.TotalTransferFeeDiscount.TotalDiscount == nil { + break + } + + return e.complexity.TotalTransferFeeDiscount.TotalDiscount(childComplexity), true + case "TradableInstrument.instrument": if e.complexity.TradableInstrument.Instrument == nil { break @@ -13488,6 +15133,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Transfer.FromAccountType(childComplexity), true + case "Transfer.gameId": + if e.complexity.Transfer.GameId == nil { + break + } + + return e.complexity.Transfer.GameId(childComplexity), true + case "Transfer.id": if e.complexity.Transfer.Id == nil { break @@ -13712,6 +15364,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.UpdateInstrumentConfiguration.Code(childComplexity), true + case "UpdateInstrumentConfiguration.name": + if e.complexity.UpdateInstrumentConfiguration.Name == nil { + break + } + + return e.complexity.UpdateInstrumentConfiguration.Name(childComplexity), true + case "UpdateInstrumentConfiguration.product": if e.complexity.UpdateInstrumentConfiguration.Product == nil { break @@ -13747,6 +15406,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.UpdateMarketConfiguration.LinearSlippageFactor(childComplexity), true + case "UpdateMarketConfiguration.liquidationStrategy": + if e.complexity.UpdateMarketConfiguration.LiquidationStrategy == nil { + break + } + + return e.complexity.UpdateMarketConfiguration.LiquidationStrategy(childComplexity), true + + case "UpdateMarketConfiguration.liquidityFeeSettings": + if e.complexity.UpdateMarketConfiguration.LiquidityFeeSettings == nil { + break + } + + return e.complexity.UpdateMarketConfiguration.LiquidityFeeSettings(childComplexity), true + case "UpdateMarketConfiguration.liquidityMonitoringParameters": if e.complexity.UpdateMarketConfiguration.LiquidityMonitoringParameters == nil { break @@ -13761,6 +15434,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.UpdateMarketConfiguration.LiquiditySlaParameters(childComplexity), true + case "UpdateMarketConfiguration.markPriceConfiguration": + if e.complexity.UpdateMarketConfiguration.MarkPriceConfiguration == nil { + break + } + + return e.complexity.UpdateMarketConfiguration.MarkPriceConfiguration(childComplexity), true + case "UpdateMarketConfiguration.metadata": if e.complexity.UpdateMarketConfiguration.Metadata == nil { break @@ -13866,6 +15546,27 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.UpdatePerpetualProduct.DataSourceSpecForSettlementSchedule(childComplexity), true + case "UpdatePerpetualProduct.fundingRateLowerBound": + if e.complexity.UpdatePerpetualProduct.FundingRateLowerBound == nil { + break + } + + return e.complexity.UpdatePerpetualProduct.FundingRateLowerBound(childComplexity), true + + case "UpdatePerpetualProduct.fundingRateScalingFactor": + if e.complexity.UpdatePerpetualProduct.FundingRateScalingFactor == nil { + break + } + + return e.complexity.UpdatePerpetualProduct.FundingRateScalingFactor(childComplexity), true + + case "UpdatePerpetualProduct.fundingRateUpperBound": + if e.complexity.UpdatePerpetualProduct.FundingRateUpperBound == nil { + break + } + + return e.complexity.UpdatePerpetualProduct.FundingRateUpperBound(childComplexity), true + case "UpdatePerpetualProduct.interestRate": if e.complexity.UpdatePerpetualProduct.InterestRate == nil { break @@ -13929,6 +15630,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.UpdateSpotMarket.UpdateSpotMarketConfiguration(childComplexity), true + case "UpdateSpotMarketConfiguration.liquidityFeeSettings": + if e.complexity.UpdateSpotMarketConfiguration.LiquidityFeeSettings == nil { + break + } + + return e.complexity.UpdateSpotMarketConfiguration.LiquidityFeeSettings(childComplexity), true + case "UpdateSpotMarketConfiguration.liquiditySLAParams": if e.complexity.UpdateSpotMarketConfiguration.LiquiditySLAParams == nil { break @@ -15029,6 +16737,24 @@ func (ec *executionContext) field_Party_rewardsConnection_args(ctx context.Conte } } args["toEpoch"] = arg3 + var arg4 *string + if tmp, ok := rawArgs["teamId"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamId")) + arg4, err = ec.unmarshalOID2ᚖstring(ctx, tmp) + if err != nil { + return nil, err + } + } + args["teamId"] = arg4 + var arg5 *string + if tmp, ok := rawArgs["gameId"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gameId")) + arg5, err = ec.unmarshalOID2ᚖstring(ctx, tmp) + if err != nil { + return nil, err + } + } + args["gameId"] = arg5 return args, nil } @@ -15110,6 +16836,42 @@ func (ec *executionContext) field_Party_transfersConnection_args(ctx context.Con } } args["isReward"] = arg2 + var arg3 *int + if tmp, ok := rawArgs["fromEpoch"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fromEpoch")) + arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["fromEpoch"] = arg3 + var arg4 *int + if tmp, ok := rawArgs["toEpoch"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("toEpoch")) + arg4, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["toEpoch"] = arg4 + var arg5 *v1.Transfer_Status + if tmp, ok := rawArgs["status"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("status")) + arg5, err = ec.unmarshalOTransferStatus2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐTransfer_Status(ctx, tmp) + if err != nil { + return nil, err + } + } + args["status"] = arg5 + var arg6 *v2.ListTransfersRequest_Scope + if tmp, ok := rawArgs["scope"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("scope")) + arg6, err = ec.unmarshalOTransferScope2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐListTransfersRequest_Scope(ctx, tmp) + if err != nil { + return nil, err + } + } + args["scope"] = arg6 return args, nil } @@ -15692,33 +17454,138 @@ func (ec *executionContext) field_Query_estimatePosition_args(ctx context.Contex } } args["openVolume"] = arg1 - var arg2 []*OrderInfo + var arg2 string + if tmp, ok := rawArgs["averageEntryPrice"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("averageEntryPrice")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["averageEntryPrice"] = arg2 + var arg3 []*v2.OrderInfo if tmp, ok := rawArgs["orders"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("orders")) - arg2, err = ec.unmarshalOOrderInfo2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐOrderInfoᚄ(ctx, tmp) + arg3, err = ec.unmarshalOOrderInfo2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOrderInfoᚄ(ctx, tmp) if err != nil { return nil, err } } - args["orders"] = arg2 - var arg3 *string - if tmp, ok := rawArgs["collateralAvailable"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("collateralAvailable")) - arg3, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + args["orders"] = arg3 + var arg4 string + if tmp, ok := rawArgs["marginAccountBalance"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("marginAccountBalance")) + arg4, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["marginAccountBalance"] = arg4 + var arg5 string + if tmp, ok := rawArgs["generalAccountBalance"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("generalAccountBalance")) + arg5, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["generalAccountBalance"] = arg5 + var arg6 string + if tmp, ok := rawArgs["orderMarginAccountBalance"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("orderMarginAccountBalance")) + arg6, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { return nil, err } } - args["collateralAvailable"] = arg3 - var arg4 *bool + args["orderMarginAccountBalance"] = arg6 + var arg7 vega.MarginMode + if tmp, ok := rawArgs["marginMode"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("marginMode")) + arg7, err = ec.unmarshalNMarginMode2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginMode(ctx, tmp) + if err != nil { + return nil, err + } + } + args["marginMode"] = arg7 + var arg8 *string + if tmp, ok := rawArgs["marginFactor"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("marginFactor")) + arg8, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err + } + } + args["marginFactor"] = arg8 + var arg9 *bool + if tmp, ok := rawArgs["includeRequiredPositionMarginInAvailableCollateral"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeRequiredPositionMarginInAvailableCollateral")) + arg9, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp) + if err != nil { + return nil, err + } + } + args["includeRequiredPositionMarginInAvailableCollateral"] = arg9 + var arg10 *bool if tmp, ok := rawArgs["scaleLiquidationPriceToMarketDecimals"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("scaleLiquidationPriceToMarketDecimals")) - arg4, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp) + arg10, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp) if err != nil { return nil, err } } - args["scaleLiquidationPriceToMarketDecimals"] = arg4 + args["scaleLiquidationPriceToMarketDecimals"] = arg10 + return args, nil +} + +func (ec *executionContext) field_Query_estimateTransferFee_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["fromAccount"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fromAccount")) + arg0, err = ec.unmarshalNID2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["fromAccount"] = arg0 + var arg1 vega.AccountType + if tmp, ok := rawArgs["fromAccountType"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fromAccountType")) + arg1, err = ec.unmarshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, tmp) + if err != nil { + return nil, err + } + } + args["fromAccountType"] = arg1 + var arg2 string + if tmp, ok := rawArgs["toAccount"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("toAccount")) + arg2, err = ec.unmarshalNID2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["toAccount"] = arg2 + var arg3 string + if tmp, ok := rawArgs["amount"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("amount")) + arg3, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["amount"] = arg3 + var arg4 string + if tmp, ok := rawArgs["assetId"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("assetId")) + arg4, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["assetId"] = arg4 return args, nil } @@ -15929,6 +17796,57 @@ func (ec *executionContext) field_Query_fundingPeriods_args(ctx context.Context, return args, nil } +func (ec *executionContext) field_Query_games_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["gameId"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gameId")) + arg0, err = ec.unmarshalOID2ᚖstring(ctx, tmp) + if err != nil { + return nil, err + } + } + args["gameId"] = arg0 + var arg1 *int + if tmp, ok := rawArgs["epochFrom"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("epochFrom")) + arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["epochFrom"] = arg1 + var arg2 *int + if tmp, ok := rawArgs["epochTo"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("epochTo")) + arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["epochTo"] = arg2 + var arg3 *vega.EntityScope + if tmp, ok := rawArgs["entityScope"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("entityScope")) + arg3, err = ec.unmarshalOEntityScope2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEntityScope(ctx, tmp) + if err != nil { + return nil, err + } + } + args["entityScope"] = arg3 + var arg4 *v2.Pagination + if tmp, ok := rawArgs["pagination"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + arg4, err = ec.unmarshalOPagination2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPagination(ctx, tmp) + if err != nil { + return nil, err + } + } + args["pagination"] = arg4 + return args, nil +} + func (ec *executionContext) field_Query_getMarketDataHistoryConnectionByID_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -16391,6 +18309,63 @@ func (ec *executionContext) field_Query_partiesConnection_args(ctx context.Conte return args, nil } +func (ec *executionContext) field_Query_partiesProfilesConnection_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 []string + if tmp, ok := rawArgs["ids"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ids")) + arg0, err = ec.unmarshalOID2ᚕstringᚄ(ctx, tmp) + if err != nil { + return nil, err + } + } + args["ids"] = arg0 + var arg1 *v2.Pagination + if tmp, ok := rawArgs["pagination"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + arg1, err = ec.unmarshalOPagination2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPagination(ctx, tmp) + if err != nil { + return nil, err + } + } + args["pagination"] = arg1 + return args, nil +} + +func (ec *executionContext) field_Query_partyMarginModes_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["marketId"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("marketId")) + arg0, err = ec.unmarshalOID2ᚖstring(ctx, tmp) + if err != nil { + return nil, err + } + } + args["marketId"] = arg0 + var arg1 *string + if tmp, ok := rawArgs["partyId"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("partyId")) + arg1, err = ec.unmarshalOID2ᚖstring(ctx, tmp) + if err != nil { + return nil, err + } + } + args["partyId"] = arg1 + var arg2 *v2.Pagination + if tmp, ok := rawArgs["pagination"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + arg2, err = ec.unmarshalOPagination2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPagination(ctx, tmp) + if err != nil { + return nil, err + } + } + args["pagination"] = arg2 + return args, nil +} + func (ec *executionContext) field_Query_party_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -16727,6 +18702,48 @@ func (ec *executionContext) field_Query_successorMarkets_args(ctx context.Contex return args, nil } +func (ec *executionContext) field_Query_teamMembersStatistics_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["teamId"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamId")) + arg0, err = ec.unmarshalNID2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["teamId"] = arg0 + var arg1 *string + if tmp, ok := rawArgs["partyId"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("partyId")) + arg1, err = ec.unmarshalOID2ᚖstring(ctx, tmp) + if err != nil { + return nil, err + } + } + args["partyId"] = arg1 + var arg2 *int + if tmp, ok := rawArgs["aggregationEpochs"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("aggregationEpochs")) + arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["aggregationEpochs"] = arg2 + var arg3 *v2.Pagination + if tmp, ok := rawArgs["pagination"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + arg3, err = ec.unmarshalOPagination2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPagination(ctx, tmp) + if err != nil { + return nil, err + } + } + args["pagination"] = arg3 + return args, nil +} + func (ec *executionContext) field_Query_teamRefereeHistory_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -16775,6 +18792,39 @@ func (ec *executionContext) field_Query_teamReferees_args(ctx context.Context, r return args, nil } +func (ec *executionContext) field_Query_teamsStatistics_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["teamId"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamId")) + arg0, err = ec.unmarshalOID2ᚖstring(ctx, tmp) + if err != nil { + return nil, err + } + } + args["teamId"] = arg0 + var arg1 *int + if tmp, ok := rawArgs["aggregationEpochs"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("aggregationEpochs")) + arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["aggregationEpochs"] = arg1 + var arg2 *v2.Pagination + if tmp, ok := rawArgs["pagination"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pagination")) + arg2, err = ec.unmarshalOPagination2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPagination(ctx, tmp) + if err != nil { + return nil, err + } + } + args["pagination"] = arg2 + return args, nil +} + func (ec *executionContext) field_Query_teams_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -16808,6 +18858,30 @@ func (ec *executionContext) field_Query_teams_args(ctx context.Context, rawArgs return args, nil } +func (ec *executionContext) field_Query_totalTransferFeeDiscount_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["partyId"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("partyId")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["partyId"] = arg0 + var arg1 string + if tmp, ok := rawArgs["assetId"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("assetId")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["assetId"] = arg1 + return args, nil +} + func (ec *executionContext) field_Query_trades_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -16895,6 +18969,42 @@ func (ec *executionContext) field_Query_transfersConnection_args(ctx context.Con } } args["isReward"] = arg3 + var arg4 *int + if tmp, ok := rawArgs["fromEpoch"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fromEpoch")) + arg4, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["fromEpoch"] = arg4 + var arg5 *int + if tmp, ok := rawArgs["toEpoch"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("toEpoch")) + arg5, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["toEpoch"] = arg5 + var arg6 *v1.Transfer_Status + if tmp, ok := rawArgs["status"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("status")) + arg6, err = ec.unmarshalOTransferStatus2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐTransfer_Status(ctx, tmp) + if err != nil { + return nil, err + } + } + args["status"] = arg6 + var arg7 *v2.ListTransfersRequest_Scope + if tmp, ok := rawArgs["scope"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("scope")) + arg7, err = ec.unmarshalOTransferScope2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐListTransfersRequest_Scope(ctx, tmp) + if err != nil { + return nil, err + } + } + args["scope"] = arg7 return args, nil } @@ -17365,8 +19475,8 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** -func (ec *executionContext) _AccountBalance_balance(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountBalance_balance(ctx, field) +func (ec *executionContext) _AbstractMarginLevels_market(ctx context.Context, field graphql.CollectedField, obj *AbstractMarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AbstractMarginLevels_market(ctx, field) if err != nil { return graphql.Null } @@ -17379,127 +19489,7 @@ func (ec *executionContext) _AccountBalance_balance(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Balance, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_AccountBalance_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "AccountBalance", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _AccountBalance_asset(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountBalance_asset(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountBalance().Asset(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*vega.Asset) - fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_AccountBalance_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "AccountBalance", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) _AccountBalance_type(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountBalance_type(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.Market, nil }) if err != nil { ec.Error(ctx, err) @@ -17511,58 +19501,17 @@ func (ec *executionContext) _AccountBalance_type(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(vega.AccountType) + res := resTmp.(*vega.Market) fc.Result = res - return ec.marshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, field.Selections, res) + return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountBalance_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AbstractMarginLevels_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountBalance", + Object: "AbstractMarginLevels", Field: field, IsMethod: false, IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type AccountType does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _AccountBalance_market(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountBalance_market(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountBalance().Market(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*vega.Market) - fc.Result = res - return ec.marshalOMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_AccountBalance_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "AccountBalance", - Field: field, - IsMethod: true, - IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": @@ -17587,6 +19536,8 @@ func (ec *executionContext) fieldContext_AccountBalance_market(ctx context.Conte return ec.fieldContext_Market_state(ctx, field) case "proposal": return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) case "ordersConnection": return ec.fieldContext_Market_ordersConnection(ctx, field) case "accountsConnection": @@ -17619,6 +19570,10 @@ func (ec *executionContext) fieldContext_AccountBalance_market(ctx context.Conte return ec.fieldContext_Market_successorMarketID(ctx, field) case "liquiditySLAParameters": return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, @@ -17626,8 +19581,8 @@ func (ec *executionContext) fieldContext_AccountBalance_market(ctx context.Conte return fc, nil } -func (ec *executionContext) _AccountBalance_party(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountBalance_party(ctx, field) +func (ec *executionContext) _AbstractMarginLevels_asset(ctx context.Context, field graphql.CollectedField, obj *AbstractMarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AbstractMarginLevels_asset(ctx, field) if err != nil { return graphql.Null } @@ -17640,77 +19595,70 @@ func (ec *executionContext) _AccountBalance_party(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountBalance().Party(rctx, obj) + return obj.Asset, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.Party) + res := resTmp.(*vega.Asset) fc.Result = res - return ec.marshalOParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountBalance_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AbstractMarginLevels_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountBalance", + Object: "AbstractMarginLevels", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) }, } return fc, nil } -func (ec *executionContext) _AccountDetails_assetId(ctx context.Context, field graphql.CollectedField, obj *vega.AccountDetails) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountDetails_assetId(ctx, field) +func (ec *executionContext) _AbstractMarginLevels_maintenanceLevel(ctx context.Context, field graphql.CollectedField, obj *AbstractMarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AbstractMarginLevels_maintenanceLevel(ctx, field) if err != nil { return graphql.Null } @@ -17723,7 +19671,7 @@ func (ec *executionContext) _AccountDetails_assetId(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AssetId, nil + return obj.MaintenanceLevel, nil }) if err != nil { ec.Error(ctx, err) @@ -17737,24 +19685,24 @@ func (ec *executionContext) _AccountDetails_assetId(ctx context.Context, field g } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountDetails_assetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AbstractMarginLevels_maintenanceLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountDetails", + Object: "AbstractMarginLevels", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _AccountDetails_type(ctx context.Context, field graphql.CollectedField, obj *vega.AccountDetails) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountDetails_type(ctx, field) +func (ec *executionContext) _AbstractMarginLevels_searchLevel(ctx context.Context, field graphql.CollectedField, obj *AbstractMarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AbstractMarginLevels_searchLevel(ctx, field) if err != nil { return graphql.Null } @@ -17767,7 +19715,7 @@ func (ec *executionContext) _AccountDetails_type(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.SearchLevel, nil }) if err != nil { ec.Error(ctx, err) @@ -17779,26 +19727,26 @@ func (ec *executionContext) _AccountDetails_type(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(vega.AccountType) + res := resTmp.(string) fc.Result = res - return ec.marshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountDetails_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AbstractMarginLevels_searchLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountDetails", + Object: "AbstractMarginLevels", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type AccountType does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _AccountDetails_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.AccountDetails) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountDetails_marketId(ctx, field) +func (ec *executionContext) _AbstractMarginLevels_initialLevel(ctx context.Context, field graphql.CollectedField, obj *AbstractMarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AbstractMarginLevels_initialLevel(ctx, field) if err != nil { return graphql.Null } @@ -17811,35 +19759,38 @@ func (ec *executionContext) _AccountDetails_marketId(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return obj.InitialLevel, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOID2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountDetails_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AbstractMarginLevels_initialLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountDetails", + Object: "AbstractMarginLevels", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _AccountDetails_partyId(ctx context.Context, field graphql.CollectedField, obj *vega.AccountDetails) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountDetails_partyId(ctx, field) +func (ec *executionContext) _AbstractMarginLevels_orderMarginLevel(ctx context.Context, field graphql.CollectedField, obj *AbstractMarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AbstractMarginLevels_orderMarginLevel(ctx, field) if err != nil { return graphql.Null } @@ -17852,35 +19803,38 @@ func (ec *executionContext) _AccountDetails_partyId(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountDetails().PartyID(rctx, obj) + return obj.OrderMarginLevel, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOID2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountDetails_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AbstractMarginLevels_orderMarginLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountDetails", + Object: "AbstractMarginLevels", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _AccountEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.AccountEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountEdge_node(ctx, field) +func (ec *executionContext) _AbstractMarginLevels_collateralReleaseLevel(ctx context.Context, field graphql.CollectedField, obj *AbstractMarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AbstractMarginLevels_collateralReleaseLevel(ctx, field) if err != nil { return graphql.Null } @@ -17893,7 +19847,7 @@ func (ec *executionContext) _AccountEdge_node(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.CollateralReleaseLevel, nil }) if err != nil { ec.Error(ctx, err) @@ -17905,38 +19859,26 @@ func (ec *executionContext) _AccountEdge_node(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(*v2.AccountBalance) + res := resTmp.(string) fc.Result = res - return ec.marshalNAccountBalance2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAccountBalance(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AbstractMarginLevels_collateralReleaseLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountEdge", + Object: "AbstractMarginLevels", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "balance": - return ec.fieldContext_AccountBalance_balance(ctx, field) - case "asset": - return ec.fieldContext_AccountBalance_asset(ctx, field) - case "type": - return ec.fieldContext_AccountBalance_type(ctx, field) - case "market": - return ec.fieldContext_AccountBalance_market(ctx, field) - case "party": - return ec.fieldContext_AccountBalance_party(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type AccountBalance", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _AccountEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.AccountEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountEdge_cursor(ctx, field) +func (ec *executionContext) _AbstractMarginLevels_marginMode(ctx context.Context, field graphql.CollectedField, obj *AbstractMarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AbstractMarginLevels_marginMode(ctx, field) if err != nil { return graphql.Null } @@ -17949,7 +19891,51 @@ func (ec *executionContext) _AccountEdge_cursor(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.MarginMode, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(vega.MarginMode) + fc.Result = res + return ec.marshalNMarginMode2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginMode(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AbstractMarginLevels_marginMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AbstractMarginLevels", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type MarginMode does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AbstractMarginLevels_marginFactor(ctx context.Context, field graphql.CollectedField, obj *AbstractMarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AbstractMarginLevels_marginFactor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MarginFactor, nil }) if err != nil { ec.Error(ctx, err) @@ -17966,9 +19952,9 @@ func (ec *executionContext) _AccountEdge_cursor(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AbstractMarginLevels_marginFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountEdge", + Object: "AbstractMarginLevels", Field: field, IsMethod: false, IsResolver: false, @@ -17979,8 +19965,8 @@ func (ec *executionContext) fieldContext_AccountEdge_cursor(ctx context.Context, return fc, nil } -func (ec *executionContext) _AccountEvent_balance(ctx context.Context, field graphql.CollectedField, obj *vega.Account) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountEvent_balance(ctx, field) +func (ec *executionContext) _AccountBalance_balance(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountBalance_balance(ctx, field) if err != nil { return graphql.Null } @@ -18010,9 +19996,9 @@ func (ec *executionContext) _AccountEvent_balance(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountEvent_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AccountBalance_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountEvent", + Object: "AccountBalance", Field: field, IsMethod: false, IsResolver: false, @@ -18023,8 +20009,8 @@ func (ec *executionContext) fieldContext_AccountEvent_balance(ctx context.Contex return fc, nil } -func (ec *executionContext) _AccountEvent_asset(ctx context.Context, field graphql.CollectedField, obj *vega.Account) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountEvent_asset(ctx, field) +func (ec *executionContext) _AccountBalance_asset(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountBalance_asset(ctx, field) if err != nil { return graphql.Null } @@ -18037,7 +20023,7 @@ func (ec *executionContext) _AccountEvent_asset(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountEvent().Asset(rctx, obj) + return ec.resolvers.AccountBalance().Asset(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -18054,9 +20040,9 @@ func (ec *executionContext) _AccountEvent_asset(ctx context.Context, field graph return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountEvent_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AccountBalance_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountEvent", + Object: "AccountBalance", Field: field, IsMethod: true, IsResolver: true, @@ -18099,8 +20085,8 @@ func (ec *executionContext) fieldContext_AccountEvent_asset(ctx context.Context, return fc, nil } -func (ec *executionContext) _AccountEvent_type(ctx context.Context, field graphql.CollectedField, obj *vega.Account) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountEvent_type(ctx, field) +func (ec *executionContext) _AccountBalance_type(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountBalance_type(ctx, field) if err != nil { return graphql.Null } @@ -18130,9 +20116,9 @@ func (ec *executionContext) _AccountEvent_type(ctx context.Context, field graphq return ec.marshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountEvent_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AccountBalance_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountEvent", + Object: "AccountBalance", Field: field, IsMethod: false, IsResolver: false, @@ -18143,8 +20129,8 @@ func (ec *executionContext) fieldContext_AccountEvent_type(ctx context.Context, return fc, nil } -func (ec *executionContext) _AccountEvent_market(ctx context.Context, field graphql.CollectedField, obj *vega.Account) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountEvent_market(ctx, field) +func (ec *executionContext) _AccountBalance_market(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountBalance_market(ctx, field) if err != nil { return graphql.Null } @@ -18157,7 +20143,7 @@ func (ec *executionContext) _AccountEvent_market(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountEvent().Market(rctx, obj) + return ec.resolvers.AccountBalance().Market(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -18171,9 +20157,9 @@ func (ec *executionContext) _AccountEvent_market(ctx context.Context, field grap return ec.marshalOMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountEvent_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AccountBalance_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountEvent", + Object: "AccountBalance", Field: field, IsMethod: true, IsResolver: true, @@ -18201,6 +20187,8 @@ func (ec *executionContext) fieldContext_AccountEvent_market(ctx context.Context return ec.fieldContext_Market_state(ctx, field) case "proposal": return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) case "ordersConnection": return ec.fieldContext_Market_ordersConnection(ctx, field) case "accountsConnection": @@ -18233,6 +20221,10 @@ func (ec *executionContext) fieldContext_AccountEvent_market(ctx context.Context return ec.fieldContext_Market_successorMarketID(ctx, field) case "liquiditySLAParameters": return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, @@ -18240,8 +20232,8 @@ func (ec *executionContext) fieldContext_AccountEvent_market(ctx context.Context return fc, nil } -func (ec *executionContext) _AccountEvent_party(ctx context.Context, field graphql.CollectedField, obj *vega.Account) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountEvent_party(ctx, field) +func (ec *executionContext) _AccountBalance_party(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountBalance_party(ctx, field) if err != nil { return graphql.Null } @@ -18254,7 +20246,7 @@ func (ec *executionContext) _AccountEvent_party(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountEvent().Party(rctx, obj) + return ec.resolvers.AccountBalance().Party(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -18268,9 +20260,9 @@ func (ec *executionContext) _AccountEvent_party(ctx context.Context, field graph return ec.marshalOParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountEvent_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AccountBalance_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountEvent", + Object: "AccountBalance", Field: field, IsMethod: true, IsResolver: true, @@ -18323,8 +20315,8 @@ func (ec *executionContext) fieldContext_AccountEvent_party(ctx context.Context, return fc, nil } -func (ec *executionContext) _AccountUpdate_balance(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountUpdate_balance(ctx, field) +func (ec *executionContext) _AccountDetails_assetId(ctx context.Context, field graphql.CollectedField, obj *vega.AccountDetails) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountDetails_assetId(ctx, field) if err != nil { return graphql.Null } @@ -18337,7 +20329,7 @@ func (ec *executionContext) _AccountUpdate_balance(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Balance, nil + return obj.AssetId, nil }) if err != nil { ec.Error(ctx, err) @@ -18351,59 +20343,15 @@ func (ec *executionContext) _AccountUpdate_balance(ctx context.Context, field gr } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AccountUpdate_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AccountDetails_assetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "AccountUpdate", + Object: "AccountDetails", Field: field, IsMethod: false, IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _AccountUpdate_assetId(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountUpdate_assetId(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.AccountUpdate().AssetID(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_AccountUpdate_assetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "AccountUpdate", - Field: field, - IsMethod: true, - IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type ID does not have child fields") }, @@ -18411,8 +20359,672 @@ func (ec *executionContext) fieldContext_AccountUpdate_assetId(ctx context.Conte return fc, nil } -func (ec *executionContext) _AccountUpdate_type(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_AccountUpdate_type(ctx, field) +func (ec *executionContext) _AccountDetails_type(ctx context.Context, field graphql.CollectedField, obj *vega.AccountDetails) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountDetails_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(vega.AccountType) + fc.Result = res + return ec.marshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AccountDetails_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AccountDetails", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type AccountType does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AccountDetails_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.AccountDetails) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountDetails_marketId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MarketId, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOID2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AccountDetails_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AccountDetails", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AccountDetails_partyId(ctx context.Context, field graphql.CollectedField, obj *vega.AccountDetails) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountDetails_partyId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.AccountDetails().PartyID(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOID2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AccountDetails_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AccountDetails", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AccountEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.AccountEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*v2.AccountBalance) + fc.Result = res + return ec.marshalNAccountBalance2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAccountBalance(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AccountEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AccountEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "balance": + return ec.fieldContext_AccountBalance_balance(ctx, field) + case "asset": + return ec.fieldContext_AccountBalance_asset(ctx, field) + case "type": + return ec.fieldContext_AccountBalance_type(ctx, field) + case "market": + return ec.fieldContext_AccountBalance_market(ctx, field) + case "party": + return ec.fieldContext_AccountBalance_party(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AccountBalance", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _AccountEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.AccountEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AccountEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AccountEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AccountEvent_balance(ctx context.Context, field graphql.CollectedField, obj *vega.Account) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountEvent_balance(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Balance, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AccountEvent_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AccountEvent", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AccountEvent_asset(ctx context.Context, field graphql.CollectedField, obj *vega.Account) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountEvent_asset(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.AccountEvent().Asset(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*vega.Asset) + fc.Result = res + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AccountEvent_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AccountEvent", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _AccountEvent_type(ctx context.Context, field graphql.CollectedField, obj *vega.Account) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountEvent_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(vega.AccountType) + fc.Result = res + return ec.marshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AccountEvent_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AccountEvent", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type AccountType does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AccountEvent_market(ctx context.Context, field graphql.CollectedField, obj *vega.Account) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountEvent_market(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.AccountEvent().Market(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*vega.Market) + fc.Result = res + return ec.marshalOMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AccountEvent_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AccountEvent", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Market_id(ctx, field) + case "fees": + return ec.fieldContext_Market_fees(ctx, field) + case "tradableInstrument": + return ec.fieldContext_Market_tradableInstrument(ctx, field) + case "decimalPlaces": + return ec.fieldContext_Market_decimalPlaces(ctx, field) + case "positionDecimalPlaces": + return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) + case "openingAuction": + return ec.fieldContext_Market_openingAuction(ctx, field) + case "priceMonitoringSettings": + return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) + case "liquidityMonitoringParameters": + return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) + case "tradingMode": + return ec.fieldContext_Market_tradingMode(ctx, field) + case "state": + return ec.fieldContext_Market_state(ctx, field) + case "proposal": + return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) + case "ordersConnection": + return ec.fieldContext_Market_ordersConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Market_accountsConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Market_tradesConnection(ctx, field) + case "depth": + return ec.fieldContext_Market_depth(ctx, field) + case "candlesConnection": + return ec.fieldContext_Market_candlesConnection(ctx, field) + case "data": + return ec.fieldContext_Market_data(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Market_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) + case "marketTimestamps": + return ec.fieldContext_Market_marketTimestamps(ctx, field) + case "riskFactors": + return ec.fieldContext_Market_riskFactors(ctx, field) + case "linearSlippageFactor": + return ec.fieldContext_Market_linearSlippageFactor(ctx, field) + case "quadraticSlippageFactor": + return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) + case "parentMarketID": + return ec.fieldContext_Market_parentMarketID(ctx, field) + case "insurancePoolFraction": + return ec.fieldContext_Market_insurancePoolFraction(ctx, field) + case "successorMarketID": + return ec.fieldContext_Market_successorMarketID(ctx, field) + case "liquiditySLAParameters": + return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _AccountEvent_party(ctx context.Context, field graphql.CollectedField, obj *vega.Account) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountEvent_party(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.AccountEvent().Party(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*vega.Party) + fc.Result = res + return ec.marshalOParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AccountEvent_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AccountEvent", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _AccountUpdate_balance(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountUpdate_balance(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Balance, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AccountUpdate_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AccountUpdate", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AccountUpdate_assetId(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountUpdate_assetId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.AccountUpdate().AssetID(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_AccountUpdate_assetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "AccountUpdate", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _AccountUpdate_type(ctx context.Context, field graphql.CollectedField, obj *v2.AccountBalance) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_AccountUpdate_type(ctx, field) if err != nil { return graphql.Null } @@ -21164,8 +23776,8 @@ func (ec *executionContext) fieldContext_AuctionEvent_extensionTrigger(ctx conte return fc, nil } -func (ec *executionContext) _BenefitTier_minimumEpochs(ctx context.Context, field graphql.CollectedField, obj *vega.BenefitTier) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BenefitTier_minimumEpochs(ctx, field) +func (ec *executionContext) _BatchProposal_id(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_id(ctx, field) if err != nil { return graphql.Null } @@ -21178,38 +23790,35 @@ func (ec *executionContext) _BenefitTier_minimumEpochs(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.BenefitTier().MinimumEpochs(rctx, obj) + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOID2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BenefitTier_minimumEpochs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BenefitTier", + Object: "BatchProposal", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _BenefitTier_minimumRunningNotionalTakerVolume(ctx context.Context, field graphql.CollectedField, obj *vega.BenefitTier) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BenefitTier_minimumRunningNotionalTakerVolume(ctx, field) +func (ec *executionContext) _BatchProposal_reference(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_reference(ctx, field) if err != nil { return graphql.Null } @@ -21222,7 +23831,7 @@ func (ec *executionContext) _BenefitTier_minimumRunningNotionalTakerVolume(ctx c }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MinimumRunningNotionalTakerVolume, nil + return obj.Reference, nil }) if err != nil { ec.Error(ctx, err) @@ -21239,9 +23848,9 @@ func (ec *executionContext) _BenefitTier_minimumRunningNotionalTakerVolume(ctx c return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BenefitTier_minimumRunningNotionalTakerVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BenefitTier", + Object: "BatchProposal", Field: field, IsMethod: false, IsResolver: false, @@ -21252,8 +23861,8 @@ func (ec *executionContext) fieldContext_BenefitTier_minimumRunningNotionalTaker return fc, nil } -func (ec *executionContext) _BenefitTier_referralDiscountFactor(ctx context.Context, field graphql.CollectedField, obj *vega.BenefitTier) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BenefitTier_referralDiscountFactor(ctx, field) +func (ec *executionContext) _BatchProposal_party(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_party(ctx, field) if err != nil { return graphql.Null } @@ -21266,7 +23875,7 @@ func (ec *executionContext) _BenefitTier_referralDiscountFactor(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReferralDiscountFactor, nil + return obj.Party, nil }) if err != nil { ec.Error(ctx, err) @@ -21278,26 +23887,68 @@ func (ec *executionContext) _BenefitTier_referralDiscountFactor(ctx context.Cont } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Party) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BenefitTier_referralDiscountFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BenefitTier", + Object: "BatchProposal", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) }, } return fc, nil } -func (ec *executionContext) _BenefitTier_referralRewardFactor(ctx context.Context, field graphql.CollectedField, obj *vega.BenefitTier) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BenefitTier_referralRewardFactor(ctx, field) +func (ec *executionContext) _BatchProposal_state(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_state(ctx, field) if err != nil { return graphql.Null } @@ -21310,7 +23961,7 @@ func (ec *executionContext) _BenefitTier_referralRewardFactor(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReferralRewardFactor, nil + return obj.State, nil }) if err != nil { ec.Error(ctx, err) @@ -21322,26 +23973,26 @@ func (ec *executionContext) _BenefitTier_referralRewardFactor(ctx context.Contex } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.Proposal_State) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNProposalState2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposal_State(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BenefitTier_referralRewardFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BenefitTier", + Object: "BatchProposal", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ProposalState does not have child fields") }, } return fc, nil } -func (ec *executionContext) _BuiltinAsset_maxFaucetAmountMint(ctx context.Context, field graphql.CollectedField, obj *BuiltinAsset) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BuiltinAsset_maxFaucetAmountMint(ctx, field) +func (ec *executionContext) _BatchProposal_datetime(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_datetime(ctx, field) if err != nil { return graphql.Null } @@ -21354,7 +24005,7 @@ func (ec *executionContext) _BuiltinAsset_maxFaucetAmountMint(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MaxFaucetAmountMint, nil + return obj.Datetime, nil }) if err != nil { ec.Error(ctx, err) @@ -21366,26 +24017,26 @@ func (ec *executionContext) _BuiltinAsset_maxFaucetAmountMint(ctx context.Contex } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BuiltinAsset_maxFaucetAmountMint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_datetime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BuiltinAsset", + Object: "BatchProposal", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _BusEvent_id(ctx context.Context, field graphql.CollectedField, obj *BusEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BusEvent_id(ctx, field) +func (ec *executionContext) _BatchProposal_batchTerms(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_batchTerms(ctx, field) if err != nil { return graphql.Null } @@ -21398,38 +24049,41 @@ func (ec *executionContext) _BusEvent_id(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return obj.BatchTerms, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.BatchProposalTerms) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOBatchProposalTerms2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐBatchProposalTerms(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BusEvent_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_batchTerms(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BusEvent", + Object: "BatchProposal", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "closingDatetime": + return ec.fieldContext_BatchProposalTerms_closingDatetime(ctx, field) + case "changes": + return ec.fieldContext_BatchProposalTerms_changes(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type BatchProposalTerms", field.Name) }, } return fc, nil } -func (ec *executionContext) _BusEvent_block(ctx context.Context, field graphql.CollectedField, obj *BusEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BusEvent_block(ctx, field) +func (ec *executionContext) _BatchProposal_rationale(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_rationale(ctx, field) if err != nil { return graphql.Null } @@ -21442,7 +24096,7 @@ func (ec *executionContext) _BusEvent_block(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Block, nil + return obj.Rationale, nil }) if err != nil { ec.Error(ctx, err) @@ -21454,26 +24108,32 @@ func (ec *executionContext) _BusEvent_block(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.ProposalRationale) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNProposalRationale2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalRationale(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BusEvent_block(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_rationale(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BusEvent", + Object: "BatchProposal", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "description": + return ec.fieldContext_ProposalRationale_description(ctx, field) + case "title": + return ec.fieldContext_ProposalRationale_title(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProposalRationale", field.Name) }, } return fc, nil } -func (ec *executionContext) _BusEvent_type(ctx context.Context, field graphql.CollectedField, obj *BusEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BusEvent_type(ctx, field) +func (ec *executionContext) _BatchProposal_votes(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_votes(ctx, field) if err != nil { return graphql.Null } @@ -21486,7 +24146,7 @@ func (ec *executionContext) _BusEvent_type(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.Votes, nil }) if err != nil { ec.Error(ctx, err) @@ -21498,26 +24158,32 @@ func (ec *executionContext) _BusEvent_type(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(BusEventType) + res := resTmp.(*ProposalVotes) fc.Result = res - return ec.marshalNBusEventType2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐBusEventType(ctx, field.Selections, res) + return ec.marshalNProposalVotes2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVotes(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BusEvent_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_votes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BusEvent", + Object: "BatchProposal", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type BusEventType does not have child fields") + switch field.Name { + case "yes": + return ec.fieldContext_ProposalVotes_yes(ctx, field) + case "no": + return ec.fieldContext_ProposalVotes_no(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProposalVotes", field.Name) }, } return fc, nil } -func (ec *executionContext) _BusEvent_event(ctx context.Context, field graphql.CollectedField, obj *BusEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BusEvent_event(ctx, field) +func (ec *executionContext) _BatchProposal_rejectionReason(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_rejectionReason(ctx, field) if err != nil { return graphql.Null } @@ -21530,38 +24196,35 @@ func (ec *executionContext) _BusEvent_event(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Event, nil + return obj.RejectionReason, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(Event) + res := resTmp.(*vega.ProposalError) fc.Result = res - return ec.marshalNEvent2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐEvent(ctx, field.Selections, res) + return ec.marshalOProposalRejectionReason2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalError(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BusEvent_event(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_rejectionReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BusEvent", + Object: "BatchProposal", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Event does not have child fields") + return nil, errors.New("field of type ProposalRejectionReason does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CancelTransfer_transferId(ctx context.Context, field graphql.CollectedField, obj *vega.CancelTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CancelTransfer_transferId(ctx, field) +func (ec *executionContext) _BatchProposal_errorDetails(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_errorDetails(ctx, field) if err != nil { return graphql.Null } @@ -21574,38 +24237,35 @@ func (ec *executionContext) _CancelTransfer_transferId(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.CancelTransfer().TransferID(rctx, obj) + return obj.ErrorDetails, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CancelTransfer_transferId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_errorDetails(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CancelTransfer", + Object: "BatchProposal", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Candle_periodStart(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Candle_periodStart(ctx, field) +func (ec *executionContext) _BatchProposal_requiredMajority(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_requiredMajority(ctx, field) if err != nil { return graphql.Null } @@ -21618,7 +24278,7 @@ func (ec *executionContext) _Candle_periodStart(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Candle().PeriodStart(rctx, obj) + return obj.RequiredMajority, nil }) if err != nil { ec.Error(ctx, err) @@ -21630,26 +24290,26 @@ func (ec *executionContext) _Candle_periodStart(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Candle_periodStart(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_requiredMajority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Candle", + Object: "BatchProposal", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Candle_lastUpdateInPeriod(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Candle_lastUpdateInPeriod(ctx, field) +func (ec *executionContext) _BatchProposal_requiredParticipation(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_requiredParticipation(ctx, field) if err != nil { return graphql.Null } @@ -21662,7 +24322,7 @@ func (ec *executionContext) _Candle_lastUpdateInPeriod(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Candle().LastUpdateInPeriod(rctx, obj) + return obj.RequiredParticipation, nil }) if err != nil { ec.Error(ctx, err) @@ -21674,26 +24334,26 @@ func (ec *executionContext) _Candle_lastUpdateInPeriod(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Candle_lastUpdateInPeriod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_requiredParticipation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Candle", + Object: "BatchProposal", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Candle_high(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Candle_high(ctx, field) +func (ec *executionContext) _BatchProposal_requiredLpMajority(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_requiredLpMajority(ctx, field) if err != nil { return graphql.Null } @@ -21706,26 +24366,23 @@ func (ec *executionContext) _Candle_high(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.High, nil + return obj.RequiredLpMajority, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Candle_high(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_requiredLpMajority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Candle", + Object: "BatchProposal", Field: field, IsMethod: false, IsResolver: false, @@ -21736,8 +24393,8 @@ func (ec *executionContext) fieldContext_Candle_high(ctx context.Context, field return fc, nil } -func (ec *executionContext) _Candle_low(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Candle_low(ctx, field) +func (ec *executionContext) _BatchProposal_requiredLpParticipation(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_requiredLpParticipation(ctx, field) if err != nil { return graphql.Null } @@ -21750,26 +24407,23 @@ func (ec *executionContext) _Candle_low(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Low, nil + return obj.RequiredLpParticipation, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Candle_low(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_requiredLpParticipation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Candle", + Object: "BatchProposal", Field: field, IsMethod: false, IsResolver: false, @@ -21780,8 +24434,8 @@ func (ec *executionContext) fieldContext_Candle_low(ctx context.Context, field g return fc, nil } -func (ec *executionContext) _Candle_open(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Candle_open(ctx, field) +func (ec *executionContext) _BatchProposal_subProposals(ctx context.Context, field graphql.CollectedField, obj *BatchProposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposal_subProposals(ctx, field) if err != nil { return graphql.Null } @@ -21794,38 +24448,67 @@ func (ec *executionContext) _Candle_open(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Open, nil + return obj.SubProposals, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.Proposal) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOProposalDetail2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposal(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Candle_open(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposal_subProposals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Candle", + Object: "BatchProposal", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_ProposalDetail_id(ctx, field) + case "batchId": + return ec.fieldContext_ProposalDetail_batchId(ctx, field) + case "reference": + return ec.fieldContext_ProposalDetail_reference(ctx, field) + case "party": + return ec.fieldContext_ProposalDetail_party(ctx, field) + case "state": + return ec.fieldContext_ProposalDetail_state(ctx, field) + case "datetime": + return ec.fieldContext_ProposalDetail_datetime(ctx, field) + case "terms": + return ec.fieldContext_ProposalDetail_terms(ctx, field) + case "batchTerms": + return ec.fieldContext_ProposalDetail_batchTerms(ctx, field) + case "rationale": + return ec.fieldContext_ProposalDetail_rationale(ctx, field) + case "rejectionReason": + return ec.fieldContext_ProposalDetail_rejectionReason(ctx, field) + case "errorDetails": + return ec.fieldContext_ProposalDetail_errorDetails(ctx, field) + case "requiredMajority": + return ec.fieldContext_ProposalDetail_requiredMajority(ctx, field) + case "requiredParticipation": + return ec.fieldContext_ProposalDetail_requiredParticipation(ctx, field) + case "requiredLpMajority": + return ec.fieldContext_ProposalDetail_requiredLpMajority(ctx, field) + case "requiredLpParticipation": + return ec.fieldContext_ProposalDetail_requiredLpParticipation(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProposalDetail", field.Name) }, } return fc, nil } -func (ec *executionContext) _Candle_close(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Candle_close(ctx, field) +func (ec *executionContext) _BatchProposalTerms_closingDatetime(ctx context.Context, field graphql.CollectedField, obj *vega.BatchProposalTerms) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposalTerms_closingDatetime(ctx, field) if err != nil { return graphql.Null } @@ -21838,7 +24521,7 @@ func (ec *executionContext) _Candle_close(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Close, nil + return ec.resolvers.BatchProposalTerms().ClosingDatetime(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -21850,26 +24533,26 @@ func (ec *executionContext) _Candle_close(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Candle_close(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposalTerms_closingDatetime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Candle", + Object: "BatchProposalTerms", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Candle_volume(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Candle_volume(ctx, field) +func (ec *executionContext) _BatchProposalTerms_changes(ctx context.Context, field graphql.CollectedField, obj *vega.BatchProposalTerms) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposalTerms_changes(ctx, field) if err != nil { return graphql.Null } @@ -21882,7 +24565,7 @@ func (ec *executionContext) _Candle_volume(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Candle().Volume(rctx, obj) + return obj.Changes, nil }) if err != nil { ec.Error(ctx, err) @@ -21894,26 +24577,32 @@ func (ec *executionContext) _Candle_volume(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.BatchProposalTermsChange) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNBatchProposalTermsChange2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐBatchProposalTermsChange(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Candle_volume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposalTerms_changes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Candle", + Object: "BatchProposalTerms", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "enactmentDatetime": + return ec.fieldContext_BatchProposalTermsChange_enactmentDatetime(ctx, field) + case "change": + return ec.fieldContext_BatchProposalTermsChange_change(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type BatchProposalTermsChange", field.Name) }, } return fc, nil } -func (ec *executionContext) _Candle_notional(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Candle_notional(ctx, field) +func (ec *executionContext) _BatchProposalTermsChange_enactmentDatetime(ctx context.Context, field graphql.CollectedField, obj *vega.BatchProposalTermsChange) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposalTermsChange_enactmentDatetime(ctx, field) if err != nil { return graphql.Null } @@ -21926,38 +24615,35 @@ func (ec *executionContext) _Candle_notional(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Candle().Notional(rctx, obj) + return ec.resolvers.BatchProposalTermsChange().EnactmentDatetime(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Candle_notional(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposalTermsChange_enactmentDatetime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Candle", + Object: "BatchProposalTermsChange", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CandleDataConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.CandleDataConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CandleDataConnection_edges(ctx, field) +func (ec *executionContext) _BatchProposalTermsChange_change(ctx context.Context, field graphql.CollectedField, obj *vega.BatchProposalTermsChange) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BatchProposalTermsChange_change(ctx, field) if err != nil { return graphql.Null } @@ -21970,41 +24656,38 @@ func (ec *executionContext) _CandleDataConnection_edges(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.BatchProposalTermsChange().Change(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.CandleEdge) + res := resTmp.(ProposalChange) fc.Result = res - return ec.marshalOCandleEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCandleEdge(ctx, field.Selections, res) + return ec.marshalNProposalChange2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalChange(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CandleDataConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BatchProposalTermsChange_change(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CandleDataConnection", + Object: "BatchProposalTermsChange", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_CandleEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_CandleEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type CandleEdge", field.Name) + return nil, errors.New("field of type ProposalChange does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CandleDataConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.CandleDataConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CandleDataConnection_pageInfo(ctx, field) +func (ec *executionContext) _BenefitTier_minimumEpochs(ctx context.Context, field graphql.CollectedField, obj *vega.BenefitTier) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BenefitTier_minimumEpochs(ctx, field) if err != nil { return graphql.Null } @@ -22017,45 +24700,38 @@ func (ec *executionContext) _CandleDataConnection_pageInfo(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.BenefitTier().MinimumEpochs(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(int) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CandleDataConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BenefitTier_minimumEpochs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CandleDataConnection", + Object: "BenefitTier", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CandleEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.CandleEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CandleEdge_node(ctx, field) +func (ec *executionContext) _BenefitTier_minimumRunningNotionalTakerVolume(ctx context.Context, field graphql.CollectedField, obj *vega.BenefitTier) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BenefitTier_minimumRunningNotionalTakerVolume(ctx, field) if err != nil { return graphql.Null } @@ -22068,7 +24744,7 @@ func (ec *executionContext) _CandleEdge_node(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.MinimumRunningNotionalTakerVolume, nil }) if err != nil { ec.Error(ctx, err) @@ -22080,44 +24756,26 @@ func (ec *executionContext) _CandleEdge_node(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(*v2.Candle) + res := resTmp.(string) fc.Result = res - return ec.marshalNCandle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCandle(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CandleEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BenefitTier_minimumRunningNotionalTakerVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CandleEdge", + Object: "BenefitTier", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "periodStart": - return ec.fieldContext_Candle_periodStart(ctx, field) - case "lastUpdateInPeriod": - return ec.fieldContext_Candle_lastUpdateInPeriod(ctx, field) - case "high": - return ec.fieldContext_Candle_high(ctx, field) - case "low": - return ec.fieldContext_Candle_low(ctx, field) - case "open": - return ec.fieldContext_Candle_open(ctx, field) - case "close": - return ec.fieldContext_Candle_close(ctx, field) - case "volume": - return ec.fieldContext_Candle_volume(ctx, field) - case "notional": - return ec.fieldContext_Candle_notional(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Candle", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CandleEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.CandleEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CandleEdge_cursor(ctx, field) +func (ec *executionContext) _BenefitTier_referralDiscountFactor(ctx context.Context, field graphql.CollectedField, obj *vega.BenefitTier) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BenefitTier_referralDiscountFactor(ctx, field) if err != nil { return graphql.Null } @@ -22130,7 +24788,7 @@ func (ec *executionContext) _CandleEdge_cursor(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.ReferralDiscountFactor, nil }) if err != nil { ec.Error(ctx, err) @@ -22147,9 +24805,9 @@ func (ec *executionContext) _CandleEdge_cursor(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CandleEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BenefitTier_referralDiscountFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CandleEdge", + Object: "BenefitTier", Field: field, IsMethod: false, IsResolver: false, @@ -22160,8 +24818,8 @@ func (ec *executionContext) fieldContext_CandleEdge_cursor(ctx context.Context, return fc, nil } -func (ec *executionContext) _Condition_operator(ctx context.Context, field graphql.CollectedField, obj *Condition) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Condition_operator(ctx, field) +func (ec *executionContext) _BenefitTier_referralRewardFactor(ctx context.Context, field graphql.CollectedField, obj *vega.BenefitTier) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BenefitTier_referralRewardFactor(ctx, field) if err != nil { return graphql.Null } @@ -22174,7 +24832,7 @@ func (ec *executionContext) _Condition_operator(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Operator, nil + return obj.ReferralRewardFactor, nil }) if err != nil { ec.Error(ctx, err) @@ -22186,26 +24844,26 @@ func (ec *executionContext) _Condition_operator(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(v13.Condition_Operator) + res := resTmp.(string) fc.Result = res - return ec.marshalNConditionOperator2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋdataᚋv1ᚐCondition_Operator(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Condition_operator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BenefitTier_referralRewardFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Condition", + Object: "BenefitTier", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ConditionOperator does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Condition_value(ctx context.Context, field graphql.CollectedField, obj *Condition) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Condition_value(ctx, field) +func (ec *executionContext) _BuiltinAsset_maxFaucetAmountMint(ctx context.Context, field graphql.CollectedField, obj *BuiltinAsset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BuiltinAsset_maxFaucetAmountMint(ctx, field) if err != nil { return graphql.Null } @@ -22218,23 +24876,26 @@ func (ec *executionContext) _Condition_value(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Value, nil + return obj.MaxFaucetAmountMint, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Condition_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BuiltinAsset_maxFaucetAmountMint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Condition", + Object: "BuiltinAsset", Field: field, IsMethod: false, IsResolver: false, @@ -22245,8 +24906,8 @@ func (ec *executionContext) fieldContext_Condition_value(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _ContinuousTrading_tickSize(ctx context.Context, field graphql.CollectedField, obj *ContinuousTrading) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ContinuousTrading_tickSize(ctx, field) +func (ec *executionContext) _BusEvent_id(ctx context.Context, field graphql.CollectedField, obj *BusEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BusEvent_id(ctx, field) if err != nil { return graphql.Null } @@ -22259,7 +24920,7 @@ func (ec *executionContext) _ContinuousTrading_tickSize(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TickSize, nil + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) @@ -22273,24 +24934,24 @@ func (ec *executionContext) _ContinuousTrading_tickSize(ctx context.Context, fie } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ContinuousTrading_tickSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BusEvent_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ContinuousTrading", + Object: "BusEvent", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CoreSnapshotConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.CoreSnapshotConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CoreSnapshotConnection_edges(ctx, field) +func (ec *executionContext) _BusEvent_block(ctx context.Context, field graphql.CollectedField, obj *BusEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BusEvent_block(ctx, field) if err != nil { return graphql.Null } @@ -22303,41 +24964,38 @@ func (ec *executionContext) _CoreSnapshotConnection_edges(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.Block, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.CoreSnapshotEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalOCoreSnapshotEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCoreSnapshotEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CoreSnapshotConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BusEvent_block(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CoreSnapshotConnection", + Object: "BusEvent", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_CoreSnapshotEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_CoreSnapshotEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type CoreSnapshotEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CoreSnapshotConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.CoreSnapshotConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CoreSnapshotConnection_pageInfo(ctx, field) +func (ec *executionContext) _BusEvent_type(ctx context.Context, field graphql.CollectedField, obj *BusEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BusEvent_type(ctx, field) if err != nil { return graphql.Null } @@ -22350,45 +25008,38 @@ func (ec *executionContext) _CoreSnapshotConnection_pageInfo(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Type, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(BusEventType) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNBusEventType2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐBusEventType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CoreSnapshotConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BusEvent_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CoreSnapshotConnection", + Object: "BusEvent", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type BusEventType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CoreSnapshotData_blockHeight(ctx context.Context, field graphql.CollectedField, obj *v1.CoreSnapshotData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CoreSnapshotData_blockHeight(ctx, field) +func (ec *executionContext) _BusEvent_event(ctx context.Context, field graphql.CollectedField, obj *BusEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BusEvent_event(ctx, field) if err != nil { return graphql.Null } @@ -22401,7 +25052,7 @@ func (ec *executionContext) _CoreSnapshotData_blockHeight(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.CoreSnapshotData().BlockHeight(rctx, obj) + return obj.Event, nil }) if err != nil { ec.Error(ctx, err) @@ -22413,26 +25064,26 @@ func (ec *executionContext) _CoreSnapshotData_blockHeight(ctx context.Context, f } return graphql.Null } - res := resTmp.(string) + res := resTmp.(Event) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNEvent2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐEvent(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CoreSnapshotData_blockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BusEvent_event(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CoreSnapshotData", + Object: "BusEvent", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Event does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CoreSnapshotData_blockHash(ctx context.Context, field graphql.CollectedField, obj *v1.CoreSnapshotData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CoreSnapshotData_blockHash(ctx, field) +func (ec *executionContext) _CancelTransfer_transferId(ctx context.Context, field graphql.CollectedField, obj *vega.CancelTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CancelTransfer_transferId(ctx, field) if err != nil { return graphql.Null } @@ -22445,7 +25096,7 @@ func (ec *executionContext) _CoreSnapshotData_blockHash(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BlockHash, nil + return ec.resolvers.CancelTransfer().TransferID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -22459,24 +25110,24 @@ func (ec *executionContext) _CoreSnapshotData_blockHash(ctx context.Context, fie } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CoreSnapshotData_blockHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CancelTransfer_transferId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CoreSnapshotData", + Object: "CancelTransfer", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CoreSnapshotData_vegaCoreVersion(ctx context.Context, field graphql.CollectedField, obj *v1.CoreSnapshotData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CoreSnapshotData_vegaCoreVersion(ctx, field) +func (ec *executionContext) _Candle_periodStart(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Candle_periodStart(ctx, field) if err != nil { return graphql.Null } @@ -22489,7 +25140,7 @@ func (ec *executionContext) _CoreSnapshotData_vegaCoreVersion(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.CoreSnapshotData().VegaCoreVersion(rctx, obj) + return ec.resolvers.Candle().PeriodStart(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -22501,26 +25152,26 @@ func (ec *executionContext) _CoreSnapshotData_vegaCoreVersion(ctx context.Contex } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CoreSnapshotData_vegaCoreVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Candle_periodStart(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CoreSnapshotData", + Object: "Candle", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CoreSnapshotEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.CoreSnapshotEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CoreSnapshotEdge_node(ctx, field) +func (ec *executionContext) _Candle_lastUpdateInPeriod(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Candle_lastUpdateInPeriod(ctx, field) if err != nil { return graphql.Null } @@ -22533,7 +25184,7 @@ func (ec *executionContext) _CoreSnapshotEdge_node(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.Candle().LastUpdateInPeriod(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -22545,34 +25196,26 @@ func (ec *executionContext) _CoreSnapshotEdge_node(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(*v1.CoreSnapshotData) + res := resTmp.(int64) fc.Result = res - return ec.marshalNCoreSnapshotData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐCoreSnapshotData(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CoreSnapshotEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Candle_lastUpdateInPeriod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CoreSnapshotEdge", + Object: "Candle", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "blockHeight": - return ec.fieldContext_CoreSnapshotData_blockHeight(ctx, field) - case "blockHash": - return ec.fieldContext_CoreSnapshotData_blockHash(ctx, field) - case "vegaCoreVersion": - return ec.fieldContext_CoreSnapshotData_vegaCoreVersion(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type CoreSnapshotData", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CoreSnapshotEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.CoreSnapshotEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CoreSnapshotEdge_cursor(ctx, field) +func (ec *executionContext) _Candle_high(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Candle_high(ctx, field) if err != nil { return graphql.Null } @@ -22585,7 +25228,7 @@ func (ec *executionContext) _CoreSnapshotEdge_cursor(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.High, nil }) if err != nil { ec.Error(ctx, err) @@ -22602,9 +25245,9 @@ func (ec *executionContext) _CoreSnapshotEdge_cursor(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CoreSnapshotEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Candle_high(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CoreSnapshotEdge", + Object: "Candle", Field: field, IsMethod: false, IsResolver: false, @@ -22615,8 +25258,8 @@ func (ec *executionContext) fieldContext_CoreSnapshotEdge_cursor(ctx context.Con return fc, nil } -func (ec *executionContext) _CurrentReferralProgram_id(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CurrentReferralProgram_id(ctx, field) +func (ec *executionContext) _Candle_low(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Candle_low(ctx, field) if err != nil { return graphql.Null } @@ -22629,7 +25272,7 @@ func (ec *executionContext) _CurrentReferralProgram_id(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return obj.Low, nil }) if err != nil { ec.Error(ctx, err) @@ -22643,24 +25286,24 @@ func (ec *executionContext) _CurrentReferralProgram_id(ctx context.Context, fiel } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CurrentReferralProgram_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Candle_low(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CurrentReferralProgram", + Object: "Candle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CurrentReferralProgram_version(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CurrentReferralProgram_version(ctx, field) +func (ec *executionContext) _Candle_open(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Candle_open(ctx, field) if err != nil { return graphql.Null } @@ -22673,7 +25316,7 @@ func (ec *executionContext) _CurrentReferralProgram_version(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.CurrentReferralProgram().Version(rctx, obj) + return obj.Open, nil }) if err != nil { ec.Error(ctx, err) @@ -22685,26 +25328,26 @@ func (ec *executionContext) _CurrentReferralProgram_version(ctx context.Context, } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CurrentReferralProgram_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Candle_open(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CurrentReferralProgram", + Object: "Candle", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CurrentReferralProgram_benefitTiers(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CurrentReferralProgram_benefitTiers(ctx, field) +func (ec *executionContext) _Candle_close(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Candle_close(ctx, field) if err != nil { return graphql.Null } @@ -22717,7 +25360,7 @@ func (ec *executionContext) _CurrentReferralProgram_benefitTiers(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BenefitTiers, nil + return obj.Close, nil }) if err != nil { ec.Error(ctx, err) @@ -22729,36 +25372,26 @@ func (ec *executionContext) _CurrentReferralProgram_benefitTiers(ctx context.Con } return graphql.Null } - res := resTmp.([]*vega.BenefitTier) + res := resTmp.(string) fc.Result = res - return ec.marshalNBenefitTier2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐBenefitTierᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CurrentReferralProgram_benefitTiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Candle_close(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CurrentReferralProgram", + Object: "Candle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "minimumEpochs": - return ec.fieldContext_BenefitTier_minimumEpochs(ctx, field) - case "minimumRunningNotionalTakerVolume": - return ec.fieldContext_BenefitTier_minimumRunningNotionalTakerVolume(ctx, field) - case "referralDiscountFactor": - return ec.fieldContext_BenefitTier_referralDiscountFactor(ctx, field) - case "referralRewardFactor": - return ec.fieldContext_BenefitTier_referralRewardFactor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type BenefitTier", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CurrentReferralProgram_endOfProgramTimestamp(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CurrentReferralProgram_endOfProgramTimestamp(ctx, field) +func (ec *executionContext) _Candle_volume(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Candle_volume(ctx, field) if err != nil { return graphql.Null } @@ -22771,7 +25404,7 @@ func (ec *executionContext) _CurrentReferralProgram_endOfProgramTimestamp(ctx co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EndOfProgramTimestamp, nil + return ec.resolvers.Candle().Volume(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -22783,26 +25416,26 @@ func (ec *executionContext) _CurrentReferralProgram_endOfProgramTimestamp(ctx co } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CurrentReferralProgram_endOfProgramTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Candle_volume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CurrentReferralProgram", + Object: "Candle", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CurrentReferralProgram_windowLength(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CurrentReferralProgram_windowLength(ctx, field) +func (ec *executionContext) _Candle_notional(ctx context.Context, field graphql.CollectedField, obj *v2.Candle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Candle_notional(ctx, field) if err != nil { return graphql.Null } @@ -22815,7 +25448,7 @@ func (ec *executionContext) _CurrentReferralProgram_windowLength(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.CurrentReferralProgram().WindowLength(rctx, obj) + return ec.resolvers.Candle().Notional(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -22827,26 +25460,26 @@ func (ec *executionContext) _CurrentReferralProgram_windowLength(ctx context.Con } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CurrentReferralProgram_windowLength(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Candle_notional(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CurrentReferralProgram", + Object: "Candle", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CurrentReferralProgram_stakingTiers(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CurrentReferralProgram_stakingTiers(ctx, field) +func (ec *executionContext) _CandleDataConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.CandleDataConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CandleDataConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -22859,44 +25492,41 @@ func (ec *executionContext) _CurrentReferralProgram_stakingTiers(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.StakingTiers, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]*vega.StakingTier) + res := resTmp.([]*v2.CandleEdge) fc.Result = res - return ec.marshalNStakingTier2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStakingTierᚄ(ctx, field.Selections, res) + return ec.marshalOCandleEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCandleEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CurrentReferralProgram_stakingTiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CandleDataConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CurrentReferralProgram", + Object: "CandleDataConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "minimumStakedTokens": - return ec.fieldContext_StakingTier_minimumStakedTokens(ctx, field) - case "referralRewardMultiplier": - return ec.fieldContext_StakingTier_referralRewardMultiplier(ctx, field) + case "node": + return ec.fieldContext_CandleEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_CandleEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type StakingTier", field.Name) + return nil, fmt.Errorf("no field named %q was found under type CandleEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _CurrentReferralProgram_endedAt(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CurrentReferralProgram_endedAt(ctx, field) +func (ec *executionContext) _CandleDataConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.CandleDataConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CandleDataConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -22909,7 +25539,7 @@ func (ec *executionContext) _CurrentReferralProgram_endedAt(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EndedAt, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -22918,26 +25548,36 @@ func (ec *executionContext) _CurrentReferralProgram_endedAt(ctx context.Context, if resTmp == nil { return graphql.Null } - res := resTmp.(*int64) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CurrentReferralProgram_endedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CandleDataConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CurrentReferralProgram", + Object: "CandleDataConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Data_signers(ctx context.Context, field graphql.CollectedField, obj *Data) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Data_signers(ctx, field) +func (ec *executionContext) _CandleEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.CandleEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CandleEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -22950,39 +25590,56 @@ func (ec *executionContext) _Data_signers(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Signers, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*Signer) + res := resTmp.(*v2.Candle) fc.Result = res - return ec.marshalOSigner2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐSignerᚄ(ctx, field.Selections, res) + return ec.marshalNCandle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCandle(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Data_signers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CandleEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Data", + Object: "CandleEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "signer": - return ec.fieldContext_Signer_signer(ctx, field) + case "periodStart": + return ec.fieldContext_Candle_periodStart(ctx, field) + case "lastUpdateInPeriod": + return ec.fieldContext_Candle_lastUpdateInPeriod(ctx, field) + case "high": + return ec.fieldContext_Candle_high(ctx, field) + case "low": + return ec.fieldContext_Candle_low(ctx, field) + case "open": + return ec.fieldContext_Candle_open(ctx, field) + case "close": + return ec.fieldContext_Candle_close(ctx, field) + case "volume": + return ec.fieldContext_Candle_volume(ctx, field) + case "notional": + return ec.fieldContext_Candle_notional(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Signer", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Candle", field.Name) }, } return fc, nil } -func (ec *executionContext) _Data_data(ctx context.Context, field graphql.CollectedField, obj *Data) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Data_data(ctx, field) +func (ec *executionContext) _CandleEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.CandleEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CandleEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -22995,41 +25652,38 @@ func (ec *executionContext) _Data_data(ctx context.Context, field graphql.Collec }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Data, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v13.Property) + res := resTmp.(string) fc.Result = res - return ec.marshalOProperty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋdataᚋv1ᚐPropertyᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Data_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CandleEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Data", + Object: "CandleEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_Property_name(ctx, field) - case "value": - return ec.fieldContext_Property_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Property", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Data_metaData(ctx context.Context, field graphql.CollectedField, obj *Data) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Data_metaData(ctx, field) +func (ec *executionContext) _CollateralIncreaseEstimate_worstCase(ctx context.Context, field graphql.CollectedField, obj *v2.CollateralIncreaseEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CollateralIncreaseEstimate_worstCase(ctx, field) if err != nil { return graphql.Null } @@ -23042,41 +25696,38 @@ func (ec *executionContext) _Data_metaData(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MetaData, nil + return obj.WorstCase, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v13.Property) + res := resTmp.(string) fc.Result = res - return ec.marshalOProperty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋdataᚋv1ᚐProperty(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Data_metaData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CollateralIncreaseEstimate_worstCase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Data", + Object: "CollateralIncreaseEstimate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_Property_name(ctx, field) - case "value": - return ec.fieldContext_Property_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Property", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Data_matchedSpecIds(ctx context.Context, field graphql.CollectedField, obj *Data) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Data_matchedSpecIds(ctx, field) +func (ec *executionContext) _CollateralIncreaseEstimate_bestCase(ctx context.Context, field graphql.CollectedField, obj *v2.CollateralIncreaseEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CollateralIncreaseEstimate_bestCase(ctx, field) if err != nil { return graphql.Null } @@ -23089,35 +25740,38 @@ func (ec *executionContext) _Data_matchedSpecIds(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MatchedSpecIds, nil + return obj.BestCase, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]string) + res := resTmp.(string) fc.Result = res - return ec.marshalOID2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Data_matchedSpecIds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CollateralIncreaseEstimate_bestCase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Data", + Object: "CollateralIncreaseEstimate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Data_broadcastAt(ctx context.Context, field graphql.CollectedField, obj *Data) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Data_broadcastAt(ctx, field) +func (ec *executionContext) _CompositePriceConfiguration_decayWeight(ctx context.Context, field graphql.CollectedField, obj *vega.CompositePriceConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CompositePriceConfiguration_decayWeight(ctx, field) if err != nil { return graphql.Null } @@ -23130,7 +25784,7 @@ func (ec *executionContext) _Data_broadcastAt(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BroadcastAt, nil + return obj.DecayWeight, nil }) if err != nil { ec.Error(ctx, err) @@ -23142,26 +25796,26 @@ func (ec *executionContext) _Data_broadcastAt(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Data_broadcastAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CompositePriceConfiguration_decayWeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Data", + Object: "CompositePriceConfiguration", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DataSourceDefinition_sourceType(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceDefinition) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceDefinition_sourceType(ctx, field) +func (ec *executionContext) _CompositePriceConfiguration_decayPower(ctx context.Context, field graphql.CollectedField, obj *vega.CompositePriceConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CompositePriceConfiguration_decayPower(ctx, field) if err != nil { return graphql.Null } @@ -23174,7 +25828,7 @@ func (ec *executionContext) _DataSourceDefinition_sourceType(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DataSourceDefinition().SourceType(rctx, obj) + return ec.resolvers.CompositePriceConfiguration().DecayPower(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -23186,26 +25840,26 @@ func (ec *executionContext) _DataSourceDefinition_sourceType(ctx context.Context } return graphql.Null } - res := resTmp.(DataSourceKind) + res := resTmp.(int) fc.Result = res - return ec.marshalNDataSourceKind2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceKind(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceDefinition_sourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CompositePriceConfiguration_decayPower(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceDefinition", + Object: "CompositePriceConfiguration", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type DataSourceKind does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DataSourceDefinitionExternal_sourceType(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceDefinitionExternal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceDefinitionExternal_sourceType(ctx, field) +func (ec *executionContext) _CompositePriceConfiguration_cashAmount(ctx context.Context, field graphql.CollectedField, obj *vega.CompositePriceConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CompositePriceConfiguration_cashAmount(ctx, field) if err != nil { return graphql.Null } @@ -23218,7 +25872,7 @@ func (ec *executionContext) _DataSourceDefinitionExternal_sourceType(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DataSourceDefinitionExternal().SourceType(rctx, obj) + return obj.CashAmount, nil }) if err != nil { ec.Error(ctx, err) @@ -23230,26 +25884,26 @@ func (ec *executionContext) _DataSourceDefinitionExternal_sourceType(ctx context } return graphql.Null } - res := resTmp.(ExternalDataSourceKind) + res := resTmp.(string) fc.Result = res - return ec.marshalNExternalDataSourceKind2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐExternalDataSourceKind(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceDefinitionExternal_sourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CompositePriceConfiguration_cashAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceDefinitionExternal", + Object: "CompositePriceConfiguration", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ExternalDataSourceKind does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DataSourceDefinitionInternal_sourceType(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceDefinitionInternal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceDefinitionInternal_sourceType(ctx, field) +func (ec *executionContext) _CompositePriceConfiguration_SourceWeights(ctx context.Context, field graphql.CollectedField, obj *vega.CompositePriceConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CompositePriceConfiguration_SourceWeights(ctx, field) if err != nil { return graphql.Null } @@ -23262,38 +25916,35 @@ func (ec *executionContext) _DataSourceDefinitionInternal_sourceType(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DataSourceDefinitionInternal().SourceType(rctx, obj) + return obj.SourceWeights, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(InternalDataSourceKind) + res := resTmp.([]string) fc.Result = res - return ec.marshalNInternalDataSourceKind2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐInternalDataSourceKind(ctx, field.Selections, res) + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceDefinitionInternal_sourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CompositePriceConfiguration_SourceWeights(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceDefinitionInternal", + Object: "CompositePriceConfiguration", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type InternalDataSourceKind does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DataSourceSpec_id(ctx context.Context, field graphql.CollectedField, obj *DataSourceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpec_id(ctx, field) +func (ec *executionContext) _CompositePriceConfiguration_SourceStalenessTolerance(ctx context.Context, field graphql.CollectedField, obj *vega.CompositePriceConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CompositePriceConfiguration_SourceStalenessTolerance(ctx, field) if err != nil { return graphql.Null } @@ -23306,7 +25957,7 @@ func (ec *executionContext) _DataSourceSpec_id(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return obj.SourceStalenessTolerance, nil }) if err != nil { ec.Error(ctx, err) @@ -23318,26 +25969,26 @@ func (ec *executionContext) _DataSourceSpec_id(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpec_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CompositePriceConfiguration_SourceStalenessTolerance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpec", + Object: "CompositePriceConfiguration", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DataSourceSpec_createdAt(ctx context.Context, field graphql.CollectedField, obj *DataSourceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpec_createdAt(ctx, field) +func (ec *executionContext) _CompositePriceConfiguration_CompositePriceType(ctx context.Context, field graphql.CollectedField, obj *vega.CompositePriceConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CompositePriceConfiguration_CompositePriceType(ctx, field) if err != nil { return graphql.Null } @@ -23350,7 +26001,7 @@ func (ec *executionContext) _DataSourceSpec_createdAt(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreatedAt, nil + return ec.resolvers.CompositePriceConfiguration().CompositePriceType(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -23362,26 +26013,26 @@ func (ec *executionContext) _DataSourceSpec_createdAt(ctx context.Context, field } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(CompositePriceType) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNCompositePriceType2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐCompositePriceType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpec_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CompositePriceConfiguration_CompositePriceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpec", + Object: "CompositePriceConfiguration", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type CompositePriceType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DataSourceSpec_updatedAt(ctx context.Context, field graphql.CollectedField, obj *DataSourceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpec_updatedAt(ctx, field) +func (ec *executionContext) _CompositePriceConfiguration_dataSourcesSpec(ctx context.Context, field graphql.CollectedField, obj *vega.CompositePriceConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CompositePriceConfiguration_dataSourcesSpec(ctx, field) if err != nil { return graphql.Null } @@ -23394,7 +26045,7 @@ func (ec *executionContext) _DataSourceSpec_updatedAt(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdatedAt, nil + return obj.DataSourcesSpec, nil }) if err != nil { ec.Error(ctx, err) @@ -23403,26 +26054,30 @@ func (ec *executionContext) _DataSourceSpec_updatedAt(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(*int64) + res := resTmp.([]*vega.DataSourceDefinition) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalODataSourceDefinition2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpec_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CompositePriceConfiguration_dataSourcesSpec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpec", + Object: "CompositePriceConfiguration", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "sourceType": + return ec.fieldContext_DataSourceDefinition_sourceType(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceDefinition", field.Name) }, } return fc, nil } -func (ec *executionContext) _DataSourceSpec_data(ctx context.Context, field graphql.CollectedField, obj *DataSourceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpec_data(ctx, field) +func (ec *executionContext) _CompositePriceConfiguration_dataSourcesSpecBinding(ctx context.Context, field graphql.CollectedField, obj *vega.CompositePriceConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CompositePriceConfiguration_dataSourcesSpecBinding(ctx, field) if err != nil { return graphql.Null } @@ -23435,42 +26090,39 @@ func (ec *executionContext) _DataSourceSpec_data(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Data, nil + return ec.resolvers.CompositePriceConfiguration().DataSourcesSpecBinding(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.DataSourceDefinition) + res := resTmp.([]*SpecBindingForCompositePrice) fc.Result = res - return ec.marshalNDataSourceDefinition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx, field.Selections, res) + return ec.marshalOSpecBindingForCompositePrice2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐSpecBindingForCompositePrice(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpec_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CompositePriceConfiguration_dataSourcesSpecBinding(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpec", + Object: "CompositePriceConfiguration", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "sourceType": - return ec.fieldContext_DataSourceDefinition_sourceType(ctx, field) + case "priceSourceProperty": + return ec.fieldContext_SpecBindingForCompositePrice_priceSourceProperty(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type DataSourceDefinition", field.Name) + return nil, fmt.Errorf("no field named %q was found under type SpecBindingForCompositePrice", field.Name) }, } return fc, nil } -func (ec *executionContext) _DataSourceSpec_status(ctx context.Context, field graphql.CollectedField, obj *DataSourceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpec_status(ctx, field) +func (ec *executionContext) _CompositePriceSource_price(ctx context.Context, field graphql.CollectedField, obj *vega.CompositePriceSource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CompositePriceSource_price(ctx, field) if err != nil { return graphql.Null } @@ -23483,7 +26135,7 @@ func (ec *executionContext) _DataSourceSpec_status(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.Price, nil }) if err != nil { ec.Error(ctx, err) @@ -23495,26 +26147,26 @@ func (ec *executionContext) _DataSourceSpec_status(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(DataSourceSpecStatus) + res := resTmp.(string) fc.Result = res - return ec.marshalNDataSourceSpecStatus2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpecStatus(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpec_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CompositePriceSource_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpec", + Object: "CompositePriceSource", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type DataSourceSpecStatus does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DataSourceSpecConfiguration_signers(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecConfiguration) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpecConfiguration_signers(ctx, field) +func (ec *executionContext) _CompositePriceSource_lastUpdated(ctx context.Context, field graphql.CollectedField, obj *vega.CompositePriceSource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CompositePriceSource_lastUpdated(ctx, field) if err != nil { return graphql.Null } @@ -23527,39 +26179,38 @@ func (ec *executionContext) _DataSourceSpecConfiguration_signers(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DataSourceSpecConfiguration().Signers(rctx, obj) + return obj.LastUpdated, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*Signer) + res := resTmp.(int64) fc.Result = res - return ec.marshalOSigner2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐSignerᚄ(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpecConfiguration_signers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CompositePriceSource_lastUpdated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpecConfiguration", + Object: "CompositePriceSource", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "signer": - return ec.fieldContext_Signer_signer(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Signer", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DataSourceSpecConfiguration_filters(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecConfiguration) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpecConfiguration_filters(ctx, field) +func (ec *executionContext) _CompositePriceSource_PriceSource(ctx context.Context, field graphql.CollectedField, obj *vega.CompositePriceSource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CompositePriceSource_PriceSource(ctx, field) if err != nil { return graphql.Null } @@ -23572,41 +26223,38 @@ func (ec *executionContext) _DataSourceSpecConfiguration_filters(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DataSourceSpecConfiguration().Filters(rctx, obj) + return obj.PriceSource, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*Filter) + res := resTmp.(string) fc.Result = res - return ec.marshalOFilter2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐFilterᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpecConfiguration_filters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CompositePriceSource_PriceSource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpecConfiguration", + Object: "CompositePriceSource", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "key": - return ec.fieldContext_Filter_key(ctx, field) - case "conditions": - return ec.fieldContext_Filter_conditions(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Filter", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DataSourceSpecConfigurationTime_conditions(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecConfigurationTime) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpecConfigurationTime_conditions(ctx, field) +func (ec *executionContext) _CompositePriceState_priceSources(ctx context.Context, field graphql.CollectedField, obj *vega.CompositePriceState) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CompositePriceState_priceSources(ctx, field) if err != nil { return graphql.Null } @@ -23619,44 +26267,43 @@ func (ec *executionContext) _DataSourceSpecConfigurationTime_conditions(ctx cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DataSourceSpecConfigurationTime().Conditions(rctx, obj) + return obj.PriceSources, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]*Condition) + res := resTmp.([]*vega.CompositePriceSource) fc.Result = res - return ec.marshalNCondition2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐCondition(ctx, field.Selections, res) + return ec.marshalOCompositePriceSource2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceSourceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpecConfigurationTime_conditions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CompositePriceState_priceSources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpecConfigurationTime", + Object: "CompositePriceState", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "operator": - return ec.fieldContext_Condition_operator(ctx, field) - case "value": - return ec.fieldContext_Condition_value(ctx, field) + case "price": + return ec.fieldContext_CompositePriceSource_price(ctx, field) + case "lastUpdated": + return ec.fieldContext_CompositePriceSource_lastUpdated(ctx, field) + case "PriceSource": + return ec.fieldContext_CompositePriceSource_PriceSource(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Condition", field.Name) + return nil, fmt.Errorf("no field named %q was found under type CompositePriceSource", field.Name) }, } return fc, nil } -func (ec *executionContext) _DataSourceSpecConfigurationTimeTrigger_conditions(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecConfigurationTimeTrigger) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpecConfigurationTimeTrigger_conditions(ctx, field) +func (ec *executionContext) _Condition_operator(ctx context.Context, field graphql.CollectedField, obj *Condition) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Condition_operator(ctx, field) if err != nil { return graphql.Null } @@ -23669,7 +26316,7 @@ func (ec *executionContext) _DataSourceSpecConfigurationTimeTrigger_conditions(c }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DataSourceSpecConfigurationTimeTrigger().Conditions(rctx, obj) + return obj.Operator, nil }) if err != nil { ec.Error(ctx, err) @@ -23681,32 +26328,26 @@ func (ec *executionContext) _DataSourceSpecConfigurationTimeTrigger_conditions(c } return graphql.Null } - res := resTmp.([]*Condition) + res := resTmp.(v13.Condition_Operator) fc.Result = res - return ec.marshalNCondition2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐCondition(ctx, field.Selections, res) + return ec.marshalNConditionOperator2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋdataᚋv1ᚐCondition_Operator(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpecConfigurationTimeTrigger_conditions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Condition_operator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpecConfigurationTimeTrigger", + Object: "Condition", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "operator": - return ec.fieldContext_Condition_operator(ctx, field) - case "value": - return ec.fieldContext_Condition_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Condition", field.Name) + return nil, errors.New("field of type ConditionOperator does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DataSourceSpecConfigurationTimeTrigger_triggers(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecConfigurationTimeTrigger) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpecConfigurationTimeTrigger_triggers(ctx, field) +func (ec *executionContext) _Condition_value(ctx context.Context, field graphql.CollectedField, obj *Condition) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Condition_value(ctx, field) if err != nil { return graphql.Null } @@ -23719,44 +26360,35 @@ func (ec *executionContext) _DataSourceSpecConfigurationTimeTrigger_triggers(ctx }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Triggers, nil + return obj.Value, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]*v13.InternalTimeTrigger) + res := resTmp.(*string) fc.Result = res - return ec.marshalNInternalTimeTrigger2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋdataᚋv1ᚐInternalTimeTrigger(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpecConfigurationTimeTrigger_triggers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Condition_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpecConfigurationTimeTrigger", + Object: "Condition", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "initial": - return ec.fieldContext_InternalTimeTrigger_initial(ctx, field) - case "every": - return ec.fieldContext_InternalTimeTrigger_every(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type InternalTimeTrigger", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DataSourceSpecPerpetualBinding_settlementDataProperty(ctx context.Context, field graphql.CollectedField, obj *DataSourceSpecPerpetualBinding) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpecPerpetualBinding_settlementDataProperty(ctx, field) +func (ec *executionContext) _ContinuousTrading_tickSize(ctx context.Context, field graphql.CollectedField, obj *ContinuousTrading) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ContinuousTrading_tickSize(ctx, field) if err != nil { return graphql.Null } @@ -23769,7 +26401,7 @@ func (ec *executionContext) _DataSourceSpecPerpetualBinding_settlementDataProper }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SettlementDataProperty, nil + return obj.TickSize, nil }) if err != nil { ec.Error(ctx, err) @@ -23786,9 +26418,9 @@ func (ec *executionContext) _DataSourceSpecPerpetualBinding_settlementDataProper return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpecPerpetualBinding_settlementDataProperty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ContinuousTrading_tickSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpecPerpetualBinding", + Object: "ContinuousTrading", Field: field, IsMethod: false, IsResolver: false, @@ -23799,8 +26431,8 @@ func (ec *executionContext) fieldContext_DataSourceSpecPerpetualBinding_settleme return fc, nil } -func (ec *executionContext) _DataSourceSpecPerpetualBinding_settlementScheduleProperty(ctx context.Context, field graphql.CollectedField, obj *DataSourceSpecPerpetualBinding) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpecPerpetualBinding_settlementScheduleProperty(ctx, field) +func (ec *executionContext) _CoreSnapshotConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.CoreSnapshotConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CoreSnapshotConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -23813,38 +26445,41 @@ func (ec *executionContext) _DataSourceSpecPerpetualBinding_settlementSchedulePr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SettlementScheduleProperty, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.CoreSnapshotEdge) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOCoreSnapshotEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCoreSnapshotEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpecPerpetualBinding_settlementScheduleProperty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CoreSnapshotConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpecPerpetualBinding", + Object: "CoreSnapshotConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_CoreSnapshotEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_CoreSnapshotEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CoreSnapshotEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _DataSourceSpecToFutureBinding_settlementDataProperty(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecToFutureBinding) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpecToFutureBinding_settlementDataProperty(ctx, field) +func (ec *executionContext) _CoreSnapshotConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.CoreSnapshotConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CoreSnapshotConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -23857,38 +26492,45 @@ func (ec *executionContext) _DataSourceSpecToFutureBinding_settlementDataPropert }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SettlementDataProperty, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpecToFutureBinding_settlementDataProperty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CoreSnapshotConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpecToFutureBinding", + Object: "CoreSnapshotConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _DataSourceSpecToFutureBinding_tradingTerminationProperty(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecToFutureBinding) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DataSourceSpecToFutureBinding_tradingTerminationProperty(ctx, field) +func (ec *executionContext) _CoreSnapshotData_blockHeight(ctx context.Context, field graphql.CollectedField, obj *v1.CoreSnapshotData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CoreSnapshotData_blockHeight(ctx, field) if err != nil { return graphql.Null } @@ -23901,7 +26543,7 @@ func (ec *executionContext) _DataSourceSpecToFutureBinding_tradingTerminationPro }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TradingTerminationProperty, nil + return ec.resolvers.CoreSnapshotData().BlockHeight(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -23918,12 +26560,12 @@ func (ec *executionContext) _DataSourceSpecToFutureBinding_tradingTerminationPro return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DataSourceSpecToFutureBinding_tradingTerminationProperty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CoreSnapshotData_blockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DataSourceSpecToFutureBinding", + Object: "CoreSnapshotData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -23931,8 +26573,8 @@ func (ec *executionContext) fieldContext_DataSourceSpecToFutureBinding_tradingTe return fc, nil } -func (ec *executionContext) _Delegation_amount(ctx context.Context, field graphql.CollectedField, obj *vega.Delegation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Delegation_amount(ctx, field) +func (ec *executionContext) _CoreSnapshotData_blockHash(ctx context.Context, field graphql.CollectedField, obj *v1.CoreSnapshotData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CoreSnapshotData_blockHash(ctx, field) if err != nil { return graphql.Null } @@ -23945,7 +26587,7 @@ func (ec *executionContext) _Delegation_amount(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Amount, nil + return obj.BlockHash, nil }) if err != nil { ec.Error(ctx, err) @@ -23962,9 +26604,9 @@ func (ec *executionContext) _Delegation_amount(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Delegation_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CoreSnapshotData_blockHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Delegation", + Object: "CoreSnapshotData", Field: field, IsMethod: false, IsResolver: false, @@ -23975,8 +26617,8 @@ func (ec *executionContext) fieldContext_Delegation_amount(ctx context.Context, return fc, nil } -func (ec *executionContext) _Delegation_party(ctx context.Context, field graphql.CollectedField, obj *vega.Delegation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Delegation_party(ctx, field) +func (ec *executionContext) _CoreSnapshotData_vegaCoreVersion(ctx context.Context, field graphql.CollectedField, obj *v1.CoreSnapshotData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CoreSnapshotData_vegaCoreVersion(ctx, field) if err != nil { return graphql.Null } @@ -23989,7 +26631,7 @@ func (ec *executionContext) _Delegation_party(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Delegation().Party(rctx, obj) + return ec.resolvers.CoreSnapshotData().VegaCoreVersion(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -24001,68 +26643,26 @@ func (ec *executionContext) _Delegation_party(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(*vega.Party) + res := resTmp.(string) fc.Result = res - return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Delegation_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CoreSnapshotData_vegaCoreVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Delegation", + Object: "CoreSnapshotData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Delegation_node(ctx context.Context, field graphql.CollectedField, obj *vega.Delegation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Delegation_node(ctx, field) +func (ec *executionContext) _CoreSnapshotEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.CoreSnapshotEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CoreSnapshotEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -24075,7 +26675,7 @@ func (ec *executionContext) _Delegation_node(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Delegation().Node(rctx, obj) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -24087,62 +26687,34 @@ func (ec *executionContext) _Delegation_node(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(*vega.Node) + res := resTmp.(*v1.CoreSnapshotData) fc.Result = res - return ec.marshalNNode2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNode(ctx, field.Selections, res) + return ec.marshalNCoreSnapshotData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐCoreSnapshotData(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Delegation_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CoreSnapshotEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Delegation", + Object: "CoreSnapshotEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Node_id(ctx, field) - case "pubkey": - return ec.fieldContext_Node_pubkey(ctx, field) - case "tmPubkey": - return ec.fieldContext_Node_tmPubkey(ctx, field) - case "ethereumAddress": - return ec.fieldContext_Node_ethereumAddress(ctx, field) - case "infoUrl": - return ec.fieldContext_Node_infoUrl(ctx, field) - case "location": - return ec.fieldContext_Node_location(ctx, field) - case "stakedByOperator": - return ec.fieldContext_Node_stakedByOperator(ctx, field) - case "stakedByDelegates": - return ec.fieldContext_Node_stakedByDelegates(ctx, field) - case "stakedTotal": - return ec.fieldContext_Node_stakedTotal(ctx, field) - case "pendingStake": - return ec.fieldContext_Node_pendingStake(ctx, field) - case "epochData": - return ec.fieldContext_Node_epochData(ctx, field) - case "status": - return ec.fieldContext_Node_status(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Node_delegationsConnection(ctx, field) - case "rewardScore": - return ec.fieldContext_Node_rewardScore(ctx, field) - case "rankingScore": - return ec.fieldContext_Node_rankingScore(ctx, field) - case "name": - return ec.fieldContext_Node_name(ctx, field) - case "avatarUrl": - return ec.fieldContext_Node_avatarUrl(ctx, field) + case "blockHeight": + return ec.fieldContext_CoreSnapshotData_blockHeight(ctx, field) + case "blockHash": + return ec.fieldContext_CoreSnapshotData_blockHash(ctx, field) + case "vegaCoreVersion": + return ec.fieldContext_CoreSnapshotData_vegaCoreVersion(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Node", field.Name) + return nil, fmt.Errorf("no field named %q was found under type CoreSnapshotData", field.Name) }, } return fc, nil } -func (ec *executionContext) _Delegation_epoch(ctx context.Context, field graphql.CollectedField, obj *vega.Delegation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Delegation_epoch(ctx, field) +func (ec *executionContext) _CoreSnapshotEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.CoreSnapshotEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CoreSnapshotEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -24155,7 +26727,7 @@ func (ec *executionContext) _Delegation_epoch(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Delegation().Epoch(rctx, obj) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -24167,26 +26739,26 @@ func (ec *executionContext) _Delegation_epoch(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Delegation_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CoreSnapshotEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Delegation", + Object: "CoreSnapshotEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DelegationEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.DelegationEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DelegationEdge_node(ctx, field) +func (ec *executionContext) _CurrentReferralProgram_id(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CurrentReferralProgram_id(ctx, field) if err != nil { return graphql.Null } @@ -24199,7 +26771,7 @@ func (ec *executionContext) _DelegationEdge_node(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) @@ -24211,36 +26783,26 @@ func (ec *executionContext) _DelegationEdge_node(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(*vega.Delegation) + res := resTmp.(string) fc.Result = res - return ec.marshalNDelegation2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDelegation(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DelegationEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CurrentReferralProgram_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DelegationEdge", + Object: "CurrentReferralProgram", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "amount": - return ec.fieldContext_Delegation_amount(ctx, field) - case "party": - return ec.fieldContext_Delegation_party(ctx, field) - case "node": - return ec.fieldContext_Delegation_node(ctx, field) - case "epoch": - return ec.fieldContext_Delegation_epoch(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Delegation", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DelegationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.DelegationEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DelegationEdge_cursor(ctx, field) +func (ec *executionContext) _CurrentReferralProgram_version(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CurrentReferralProgram_version(ctx, field) if err != nil { return graphql.Null } @@ -24253,7 +26815,7 @@ func (ec *executionContext) _DelegationEdge_cursor(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.CurrentReferralProgram().Version(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -24265,26 +26827,26 @@ func (ec *executionContext) _DelegationEdge_cursor(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DelegationEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CurrentReferralProgram_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DelegationEdge", + Object: "CurrentReferralProgram", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DelegationsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.DelegationsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DelegationsConnection_edges(ctx, field) +func (ec *executionContext) _CurrentReferralProgram_benefitTiers(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CurrentReferralProgram_benefitTiers(ctx, field) if err != nil { return graphql.Null } @@ -24297,41 +26859,48 @@ func (ec *executionContext) _DelegationsConnection_edges(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.BenefitTiers, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.DelegationEdge) + res := resTmp.([]*vega.BenefitTier) fc.Result = res - return ec.marshalODelegationEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDelegationEdge(ctx, field.Selections, res) + return ec.marshalNBenefitTier2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐBenefitTierᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DelegationsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CurrentReferralProgram_benefitTiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DelegationsConnection", + Object: "CurrentReferralProgram", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_DelegationEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_DelegationEdge_cursor(ctx, field) + case "minimumEpochs": + return ec.fieldContext_BenefitTier_minimumEpochs(ctx, field) + case "minimumRunningNotionalTakerVolume": + return ec.fieldContext_BenefitTier_minimumRunningNotionalTakerVolume(ctx, field) + case "referralDiscountFactor": + return ec.fieldContext_BenefitTier_referralDiscountFactor(ctx, field) + case "referralRewardFactor": + return ec.fieldContext_BenefitTier_referralRewardFactor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type DelegationEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type BenefitTier", field.Name) }, } return fc, nil } -func (ec *executionContext) _DelegationsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.DelegationsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DelegationsConnection_pageInfo(ctx, field) +func (ec *executionContext) _CurrentReferralProgram_endOfProgramTimestamp(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CurrentReferralProgram_endOfProgramTimestamp(ctx, field) if err != nil { return graphql.Null } @@ -24344,7 +26913,7 @@ func (ec *executionContext) _DelegationsConnection_pageInfo(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.EndOfProgramTimestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -24356,36 +26925,26 @@ func (ec *executionContext) _DelegationsConnection_pageInfo(ctx context.Context, } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(int64) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DelegationsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CurrentReferralProgram_endOfProgramTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DelegationsConnection", + Object: "CurrentReferralProgram", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Deposit_id(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Deposit_id(ctx, field) +func (ec *executionContext) _CurrentReferralProgram_windowLength(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CurrentReferralProgram_windowLength(ctx, field) if err != nil { return graphql.Null } @@ -24398,7 +26957,7 @@ func (ec *executionContext) _Deposit_id(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return ec.resolvers.CurrentReferralProgram().WindowLength(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -24410,26 +26969,26 @@ func (ec *executionContext) _Deposit_id(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Deposit_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CurrentReferralProgram_windowLength(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Deposit", + Object: "CurrentReferralProgram", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Deposit_party(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Deposit_party(ctx, field) +func (ec *executionContext) _CurrentReferralProgram_stakingTiers(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CurrentReferralProgram_stakingTiers(ctx, field) if err != nil { return graphql.Null } @@ -24442,7 +27001,7 @@ func (ec *executionContext) _Deposit_party(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Deposit().Party(rctx, obj) + return obj.StakingTiers, nil }) if err != nil { ec.Error(ctx, err) @@ -24454,68 +27013,32 @@ func (ec *executionContext) _Deposit_party(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(*vega.Party) + res := resTmp.([]*vega.StakingTier) fc.Result = res - return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalNStakingTier2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStakingTierᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Deposit_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CurrentReferralProgram_stakingTiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Deposit", + Object: "CurrentReferralProgram", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) + case "minimumStakedTokens": + return ec.fieldContext_StakingTier_minimumStakedTokens(ctx, field) + case "referralRewardMultiplier": + return ec.fieldContext_StakingTier_referralRewardMultiplier(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, fmt.Errorf("no field named %q was found under type StakingTier", field.Name) }, } return fc, nil } -func (ec *executionContext) _Deposit_amount(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Deposit_amount(ctx, field) +func (ec *executionContext) _CurrentReferralProgram_endedAt(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralProgram) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CurrentReferralProgram_endedAt(ctx, field) if err != nil { return graphql.Null } @@ -24528,38 +27051,35 @@ func (ec *executionContext) _Deposit_amount(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Amount, nil + return obj.EndedAt, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Deposit_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CurrentReferralProgram_endedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Deposit", + Object: "CurrentReferralProgram", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Deposit_asset(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Deposit_asset(ctx, field) +func (ec *executionContext) _Data_signers(ctx context.Context, field graphql.CollectedField, obj *Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_signers(ctx, field) if err != nil { return graphql.Null } @@ -24572,70 +27092,39 @@ func (ec *executionContext) _Deposit_asset(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Deposit().Asset(rctx, obj) + return obj.Signers, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.([]*Signer) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalOSigner2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐSignerᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Deposit_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Data_signers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Deposit", + Object: "Data", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + case "signer": + return ec.fieldContext_Signer_signer(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Signer", field.Name) }, } return fc, nil } -func (ec *executionContext) _Deposit_status(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Deposit_status(ctx, field) +func (ec *executionContext) _Data_data(ctx context.Context, field graphql.CollectedField, obj *Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_data(ctx, field) if err != nil { return graphql.Null } @@ -24648,38 +27137,41 @@ func (ec *executionContext) _Deposit_status(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.Data, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(vega.Deposit_Status) + res := resTmp.([]*v13.Property) fc.Result = res - return ec.marshalNDepositStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDeposit_Status(ctx, field.Selections, res) + return ec.marshalOProperty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋdataᚋv1ᚐPropertyᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Deposit_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Data_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Deposit", + Object: "Data", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type DepositStatus does not have child fields") + switch field.Name { + case "name": + return ec.fieldContext_Property_name(ctx, field) + case "value": + return ec.fieldContext_Property_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Property", field.Name) }, } return fc, nil } -func (ec *executionContext) _Deposit_createdTimestamp(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Deposit_createdTimestamp(ctx, field) +func (ec *executionContext) _Data_metaData(ctx context.Context, field graphql.CollectedField, obj *Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_metaData(ctx, field) if err != nil { return graphql.Null } @@ -24692,38 +27184,41 @@ func (ec *executionContext) _Deposit_createdTimestamp(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreatedTimestamp, nil + return obj.MetaData, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int64) + res := resTmp.([]*v13.Property) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOProperty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋdataᚋv1ᚐProperty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Deposit_createdTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Data_metaData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Deposit", + Object: "Data", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "name": + return ec.fieldContext_Property_name(ctx, field) + case "value": + return ec.fieldContext_Property_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Property", field.Name) }, } return fc, nil } -func (ec *executionContext) _Deposit_creditedTimestamp(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Deposit_creditedTimestamp(ctx, field) +func (ec *executionContext) _Data_matchedSpecIds(ctx context.Context, field graphql.CollectedField, obj *Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_matchedSpecIds(ctx, field) if err != nil { return graphql.Null } @@ -24736,7 +27231,7 @@ func (ec *executionContext) _Deposit_creditedTimestamp(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreditedTimestamp, nil + return obj.MatchedSpecIds, nil }) if err != nil { ec.Error(ctx, err) @@ -24745,26 +27240,26 @@ func (ec *executionContext) _Deposit_creditedTimestamp(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(int64) + res := resTmp.([]string) fc.Result = res - return ec.marshalOTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOID2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Deposit_creditedTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Data_matchedSpecIds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Deposit", + Object: "Data", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Deposit_txHash(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Deposit_txHash(ctx, field) +func (ec *executionContext) _Data_broadcastAt(ctx context.Context, field graphql.CollectedField, obj *Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_broadcastAt(ctx, field) if err != nil { return graphql.Null } @@ -24777,35 +27272,38 @@ func (ec *executionContext) _Deposit_txHash(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TxHash, nil + return obj.BroadcastAt, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Deposit_txHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Data_broadcastAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Deposit", + Object: "Data", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DepositEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.DepositEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DepositEdge_node(ctx, field) +func (ec *executionContext) _DataSourceDefinition_sourceType(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceDefinition) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceDefinition_sourceType(ctx, field) if err != nil { return graphql.Null } @@ -24818,7 +27316,7 @@ func (ec *executionContext) _DepositEdge_node(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.DataSourceDefinition().SourceType(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -24830,44 +27328,26 @@ func (ec *executionContext) _DepositEdge_node(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(*vega.Deposit) + res := resTmp.(DataSourceKind) fc.Result = res - return ec.marshalNDeposit2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDeposit(ctx, field.Selections, res) + return ec.marshalNDataSourceKind2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceKind(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DepositEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceDefinition_sourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DepositEdge", + Object: "DataSourceDefinition", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Deposit_id(ctx, field) - case "party": - return ec.fieldContext_Deposit_party(ctx, field) - case "amount": - return ec.fieldContext_Deposit_amount(ctx, field) - case "asset": - return ec.fieldContext_Deposit_asset(ctx, field) - case "status": - return ec.fieldContext_Deposit_status(ctx, field) - case "createdTimestamp": - return ec.fieldContext_Deposit_createdTimestamp(ctx, field) - case "creditedTimestamp": - return ec.fieldContext_Deposit_creditedTimestamp(ctx, field) - case "txHash": - return ec.fieldContext_Deposit_txHash(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Deposit", field.Name) + return nil, errors.New("field of type DataSourceKind does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DepositEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.DepositEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DepositEdge_cursor(ctx, field) +func (ec *executionContext) _DataSourceDefinitionExternal_sourceType(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceDefinitionExternal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceDefinitionExternal_sourceType(ctx, field) if err != nil { return graphql.Null } @@ -24880,7 +27360,7 @@ func (ec *executionContext) _DepositEdge_cursor(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.DataSourceDefinitionExternal().SourceType(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -24892,26 +27372,26 @@ func (ec *executionContext) _DepositEdge_cursor(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(string) + res := resTmp.(ExternalDataSourceKind) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNExternalDataSourceKind2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐExternalDataSourceKind(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DepositEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceDefinitionExternal_sourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DepositEdge", + Object: "DataSourceDefinitionExternal", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ExternalDataSourceKind does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DepositsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.DepositsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DepositsConnection_edges(ctx, field) +func (ec *executionContext) _DataSourceDefinitionInternal_sourceType(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceDefinitionInternal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceDefinitionInternal_sourceType(ctx, field) if err != nil { return graphql.Null } @@ -24924,41 +27404,38 @@ func (ec *executionContext) _DepositsConnection_edges(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.DataSourceDefinitionInternal().SourceType(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.DepositEdge) + res := resTmp.(InternalDataSourceKind) fc.Result = res - return ec.marshalODepositEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDepositEdge(ctx, field.Selections, res) + return ec.marshalNInternalDataSourceKind2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐInternalDataSourceKind(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DepositsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceDefinitionInternal_sourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DepositsConnection", + Object: "DataSourceDefinitionInternal", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_DepositEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_DepositEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DepositEdge", field.Name) + return nil, errors.New("field of type InternalDataSourceKind does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DepositsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.DepositsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DepositsConnection_pageInfo(ctx, field) +func (ec *executionContext) _DataSourceSpec_id(ctx context.Context, field graphql.CollectedField, obj *DataSourceSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpec_id(ctx, field) if err != nil { return graphql.Null } @@ -24971,45 +27448,38 @@ func (ec *executionContext) _DepositsConnection_pageInfo(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(string) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DepositsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpec_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DepositsConnection", + Object: "DataSourceSpec", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DiscreteTrading_duration(ctx context.Context, field graphql.CollectedField, obj *DiscreteTrading) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DiscreteTrading_duration(ctx, field) +func (ec *executionContext) _DataSourceSpec_createdAt(ctx context.Context, field graphql.CollectedField, obj *DataSourceSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpec_createdAt(ctx, field) if err != nil { return graphql.Null } @@ -25022,7 +27492,7 @@ func (ec *executionContext) _DiscreteTrading_duration(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Duration, nil + return obj.CreatedAt, nil }) if err != nil { ec.Error(ctx, err) @@ -25034,26 +27504,26 @@ func (ec *executionContext) _DiscreteTrading_duration(ctx context.Context, field } return graphql.Null } - res := resTmp.(int) + res := resTmp.(int64) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DiscreteTrading_duration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpec_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DiscreteTrading", + Object: "DataSourceSpec", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DiscreteTrading_tickSize(ctx context.Context, field graphql.CollectedField, obj *DiscreteTrading) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DiscreteTrading_tickSize(ctx, field) +func (ec *executionContext) _DataSourceSpec_updatedAt(ctx context.Context, field graphql.CollectedField, obj *DataSourceSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpec_updatedAt(ctx, field) if err != nil { return graphql.Null } @@ -25066,38 +27536,35 @@ func (ec *executionContext) _DiscreteTrading_tickSize(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TickSize, nil + return obj.UpdatedAt, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DiscreteTrading_tickSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpec_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DiscreteTrading", + Object: "DataSourceSpec", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DispatchStrategy_dispatchMetric(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DispatchStrategy_dispatchMetric(ctx, field) +func (ec *executionContext) _DataSourceSpec_data(ctx context.Context, field graphql.CollectedField, obj *DataSourceSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpec_data(ctx, field) if err != nil { return graphql.Null } @@ -25110,7 +27577,7 @@ func (ec *executionContext) _DispatchStrategy_dispatchMetric(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DispatchStrategy().DispatchMetric(rctx, obj) + return obj.Data, nil }) if err != nil { ec.Error(ctx, err) @@ -25122,26 +27589,30 @@ func (ec *executionContext) _DispatchStrategy_dispatchMetric(ctx context.Context } return graphql.Null } - res := resTmp.(vega.DispatchMetric) + res := resTmp.(*vega.DataSourceDefinition) fc.Result = res - return ec.marshalNDispatchMetric2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDispatchMetric(ctx, field.Selections, res) + return ec.marshalNDataSourceDefinition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DispatchStrategy_dispatchMetric(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpec_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DispatchStrategy", + Object: "DataSourceSpec", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type DispatchMetric does not have child fields") + switch field.Name { + case "sourceType": + return ec.fieldContext_DataSourceDefinition_sourceType(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceDefinition", field.Name) }, } return fc, nil } -func (ec *executionContext) _DispatchStrategy_dispatchMetricAssetId(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DispatchStrategy_dispatchMetricAssetId(ctx, field) +func (ec *executionContext) _DataSourceSpec_status(ctx context.Context, field graphql.CollectedField, obj *DataSourceSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpec_status(ctx, field) if err != nil { return graphql.Null } @@ -25154,7 +27625,7 @@ func (ec *executionContext) _DispatchStrategy_dispatchMetricAssetId(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DispatchStrategy().DispatchMetricAssetID(rctx, obj) + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) @@ -25166,26 +27637,26 @@ func (ec *executionContext) _DispatchStrategy_dispatchMetricAssetId(ctx context. } return graphql.Null } - res := resTmp.(string) + res := resTmp.(DataSourceSpecStatus) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNDataSourceSpecStatus2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpecStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DispatchStrategy_dispatchMetricAssetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpec_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DispatchStrategy", + Object: "DataSourceSpec", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type DataSourceSpecStatus does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DispatchStrategy_marketIdsInScope(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DispatchStrategy_marketIdsInScope(ctx, field) +func (ec *executionContext) _DataSourceSpecConfiguration_signers(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpecConfiguration_signers(ctx, field) if err != nil { return graphql.Null } @@ -25198,7 +27669,7 @@ func (ec *executionContext) _DispatchStrategy_marketIdsInScope(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DispatchStrategy().MarketIdsInScope(rctx, obj) + return ec.resolvers.DataSourceSpecConfiguration().Signers(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -25207,26 +27678,30 @@ func (ec *executionContext) _DispatchStrategy_marketIdsInScope(ctx context.Conte if resTmp == nil { return graphql.Null } - res := resTmp.([]string) + res := resTmp.([]*Signer) fc.Result = res - return ec.marshalOID2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalOSigner2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐSignerᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DispatchStrategy_marketIdsInScope(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpecConfiguration_signers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DispatchStrategy", + Object: "DataSourceSpecConfiguration", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "signer": + return ec.fieldContext_Signer_signer(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Signer", field.Name) }, } return fc, nil } -func (ec *executionContext) _DispatchStrategy_entityScope(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DispatchStrategy_entityScope(ctx, field) +func (ec *executionContext) _DataSourceSpecConfiguration_filters(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpecConfiguration_filters(ctx, field) if err != nil { return graphql.Null } @@ -25239,38 +27714,41 @@ func (ec *executionContext) _DispatchStrategy_entityScope(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EntityScope, nil + return ec.resolvers.DataSourceSpecConfiguration().Filters(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(vega.EntityScope) + res := resTmp.([]*Filter) fc.Result = res - return ec.marshalNEntityScope2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEntityScope(ctx, field.Selections, res) + return ec.marshalOFilter2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐFilterᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DispatchStrategy_entityScope(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpecConfiguration_filters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DispatchStrategy", + Object: "DataSourceSpecConfiguration", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type EntityScope does not have child fields") + switch field.Name { + case "key": + return ec.fieldContext_Filter_key(ctx, field) + case "conditions": + return ec.fieldContext_Filter_conditions(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Filter", field.Name) }, } return fc, nil } -func (ec *executionContext) _DispatchStrategy_individualScope(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DispatchStrategy_individualScope(ctx, field) +func (ec *executionContext) _DataSourceSpecConfigurationTime_conditions(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecConfigurationTime) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpecConfigurationTime_conditions(ctx, field) if err != nil { return graphql.Null } @@ -25283,35 +27761,44 @@ func (ec *executionContext) _DispatchStrategy_individualScope(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IndividualScope, nil + return ec.resolvers.DataSourceSpecConfigurationTime().Conditions(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(vega.IndividualScope) + res := resTmp.([]*Condition) fc.Result = res - return ec.marshalOIndividualScope2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐIndividualScope(ctx, field.Selections, res) + return ec.marshalNCondition2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐCondition(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DispatchStrategy_individualScope(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpecConfigurationTime_conditions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DispatchStrategy", + Object: "DataSourceSpecConfigurationTime", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type IndividualScope does not have child fields") + switch field.Name { + case "operator": + return ec.fieldContext_Condition_operator(ctx, field) + case "value": + return ec.fieldContext_Condition_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Condition", field.Name) }, } return fc, nil } -func (ec *executionContext) _DispatchStrategy_teamScope(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DispatchStrategy_teamScope(ctx, field) +func (ec *executionContext) _DataSourceSpecConfigurationTimeTrigger_conditions(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecConfigurationTimeTrigger) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpecConfigurationTimeTrigger_conditions(ctx, field) if err != nil { return graphql.Null } @@ -25324,35 +27811,44 @@ func (ec *executionContext) _DispatchStrategy_teamScope(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TeamScope, nil + return ec.resolvers.DataSourceSpecConfigurationTimeTrigger().Conditions(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]string) + res := resTmp.([]*Condition) fc.Result = res - return ec.marshalOID2ᚕstring(ctx, field.Selections, res) + return ec.marshalNCondition2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐCondition(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DispatchStrategy_teamScope(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpecConfigurationTimeTrigger_conditions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DispatchStrategy", + Object: "DataSourceSpecConfigurationTimeTrigger", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "operator": + return ec.fieldContext_Condition_operator(ctx, field) + case "value": + return ec.fieldContext_Condition_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Condition", field.Name) }, } return fc, nil } -func (ec *executionContext) _DispatchStrategy_nTopPerformers(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DispatchStrategy_nTopPerformers(ctx, field) +func (ec *executionContext) _DataSourceSpecConfigurationTimeTrigger_triggers(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecConfigurationTimeTrigger) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpecConfigurationTimeTrigger_triggers(ctx, field) if err != nil { return graphql.Null } @@ -25365,35 +27861,44 @@ func (ec *executionContext) _DispatchStrategy_nTopPerformers(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NTopPerformers, nil + return obj.Triggers, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v13.InternalTimeTrigger) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNInternalTimeTrigger2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋdataᚋv1ᚐInternalTimeTrigger(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DispatchStrategy_nTopPerformers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpecConfigurationTimeTrigger_triggers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DispatchStrategy", + Object: "DataSourceSpecConfigurationTimeTrigger", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "initial": + return ec.fieldContext_InternalTimeTrigger_initial(ctx, field) + case "every": + return ec.fieldContext_InternalTimeTrigger_every(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type InternalTimeTrigger", field.Name) }, } return fc, nil } -func (ec *executionContext) _DispatchStrategy_stakingRequirement(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DispatchStrategy_stakingRequirement(ctx, field) +func (ec *executionContext) _DataSourceSpecPerpetualBinding_settlementDataProperty(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecToPerpetualBinding) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpecPerpetualBinding_settlementDataProperty(ctx, field) if err != nil { return graphql.Null } @@ -25406,7 +27911,7 @@ func (ec *executionContext) _DispatchStrategy_stakingRequirement(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.StakingRequirement, nil + return obj.SettlementDataProperty, nil }) if err != nil { ec.Error(ctx, err) @@ -25423,9 +27928,9 @@ func (ec *executionContext) _DispatchStrategy_stakingRequirement(ctx context.Con return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DispatchStrategy_stakingRequirement(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpecPerpetualBinding_settlementDataProperty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DispatchStrategy", + Object: "DataSourceSpecPerpetualBinding", Field: field, IsMethod: false, IsResolver: false, @@ -25436,8 +27941,8 @@ func (ec *executionContext) fieldContext_DispatchStrategy_stakingRequirement(ctx return fc, nil } -func (ec *executionContext) _DispatchStrategy_notionalTimeWeightedAveragePositionRequirement(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DispatchStrategy_notionalTimeWeightedAveragePositionRequirement(ctx, field) +func (ec *executionContext) _DataSourceSpecPerpetualBinding_settlementScheduleProperty(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecToPerpetualBinding) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpecPerpetualBinding_settlementScheduleProperty(ctx, field) if err != nil { return graphql.Null } @@ -25450,7 +27955,7 @@ func (ec *executionContext) _DispatchStrategy_notionalTimeWeightedAveragePositio }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NotionalTimeWeightedAveragePositionRequirement, nil + return obj.SettlementScheduleProperty, nil }) if err != nil { ec.Error(ctx, err) @@ -25467,9 +27972,9 @@ func (ec *executionContext) _DispatchStrategy_notionalTimeWeightedAveragePositio return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DispatchStrategy_notionalTimeWeightedAveragePositionRequirement(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpecPerpetualBinding_settlementScheduleProperty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DispatchStrategy", + Object: "DataSourceSpecPerpetualBinding", Field: field, IsMethod: false, IsResolver: false, @@ -25480,8 +27985,8 @@ func (ec *executionContext) fieldContext_DispatchStrategy_notionalTimeWeightedAv return fc, nil } -func (ec *executionContext) _DispatchStrategy_windowLength(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DispatchStrategy_windowLength(ctx, field) +func (ec *executionContext) _DataSourceSpecToFutureBinding_settlementDataProperty(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecToFutureBinding) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpecToFutureBinding_settlementDataProperty(ctx, field) if err != nil { return graphql.Null } @@ -25494,7 +27999,7 @@ func (ec *executionContext) _DispatchStrategy_windowLength(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DispatchStrategy().WindowLength(rctx, obj) + return obj.SettlementDataProperty, nil }) if err != nil { ec.Error(ctx, err) @@ -25506,26 +28011,26 @@ func (ec *executionContext) _DispatchStrategy_windowLength(ctx context.Context, } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DispatchStrategy_windowLength(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpecToFutureBinding_settlementDataProperty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DispatchStrategy", + Object: "DataSourceSpecToFutureBinding", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DispatchStrategy_lockPeriod(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DispatchStrategy_lockPeriod(ctx, field) +func (ec *executionContext) _DataSourceSpecToFutureBinding_tradingTerminationProperty(ctx context.Context, field graphql.CollectedField, obj *vega.DataSourceSpecToFutureBinding) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DataSourceSpecToFutureBinding_tradingTerminationProperty(ctx, field) if err != nil { return graphql.Null } @@ -25538,7 +28043,7 @@ func (ec *executionContext) _DispatchStrategy_lockPeriod(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DispatchStrategy().LockPeriod(rctx, obj) + return obj.TradingTerminationProperty, nil }) if err != nil { ec.Error(ctx, err) @@ -25550,26 +28055,26 @@ func (ec *executionContext) _DispatchStrategy_lockPeriod(ctx context.Context, fi } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DispatchStrategy_lockPeriod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DataSourceSpecToFutureBinding_tradingTerminationProperty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DispatchStrategy", + Object: "DataSourceSpecToFutureBinding", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DispatchStrategy_distributionStrategy(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DispatchStrategy_distributionStrategy(ctx, field) +func (ec *executionContext) _Delegation_amount(ctx context.Context, field graphql.CollectedField, obj *vega.Delegation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Delegation_amount(ctx, field) if err != nil { return graphql.Null } @@ -25582,7 +28087,7 @@ func (ec *executionContext) _DispatchStrategy_distributionStrategy(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DistributionStrategy, nil + return obj.Amount, nil }) if err != nil { ec.Error(ctx, err) @@ -25594,26 +28099,26 @@ func (ec *executionContext) _DispatchStrategy_distributionStrategy(ctx context.C } return graphql.Null } - res := resTmp.(vega.DistributionStrategy) + res := resTmp.(string) fc.Result = res - return ec.marshalNDistributionStrategy2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDistributionStrategy(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DispatchStrategy_distributionStrategy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Delegation_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DispatchStrategy", + Object: "Delegation", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type DistributionStrategy does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DispatchStrategy_rankTable(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DispatchStrategy_rankTable(ctx, field) +func (ec *executionContext) _Delegation_party(ctx context.Context, field graphql.CollectedField, obj *vega.Delegation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Delegation_party(ctx, field) if err != nil { return graphql.Null } @@ -25626,41 +28131,80 @@ func (ec *executionContext) _DispatchStrategy_rankTable(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RankTable, nil + return ec.resolvers.Delegation().Party(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.Rank) + res := resTmp.(*vega.Party) fc.Result = res - return ec.marshalORankTable2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐRank(ctx, field.Selections, res) + return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DispatchStrategy_rankTable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Delegation_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DispatchStrategy", + Object: "Delegation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "startRank": - return ec.fieldContext_RankTable_startRank(ctx, field) - case "shareRatio": - return ec.fieldContext_RankTable_shareRatio(ctx, field) + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type RankTable", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) }, } return fc, nil } -func (ec *executionContext) _ERC20_contractAddress(ctx context.Context, field graphql.CollectedField, obj *Erc20) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20_contractAddress(ctx, field) +func (ec *executionContext) _Delegation_node(ctx context.Context, field graphql.CollectedField, obj *vega.Delegation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Delegation_node(ctx, field) if err != nil { return graphql.Null } @@ -25673,7 +28217,7 @@ func (ec *executionContext) _ERC20_contractAddress(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ContractAddress, nil + return ec.resolvers.Delegation().Node(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -25685,26 +28229,62 @@ func (ec *executionContext) _ERC20_contractAddress(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Node) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNNode2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20_contractAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Delegation_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20", + Object: "Delegation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Node_id(ctx, field) + case "pubkey": + return ec.fieldContext_Node_pubkey(ctx, field) + case "tmPubkey": + return ec.fieldContext_Node_tmPubkey(ctx, field) + case "ethereumAddress": + return ec.fieldContext_Node_ethereumAddress(ctx, field) + case "infoUrl": + return ec.fieldContext_Node_infoUrl(ctx, field) + case "location": + return ec.fieldContext_Node_location(ctx, field) + case "stakedByOperator": + return ec.fieldContext_Node_stakedByOperator(ctx, field) + case "stakedByDelegates": + return ec.fieldContext_Node_stakedByDelegates(ctx, field) + case "stakedTotal": + return ec.fieldContext_Node_stakedTotal(ctx, field) + case "pendingStake": + return ec.fieldContext_Node_pendingStake(ctx, field) + case "epochData": + return ec.fieldContext_Node_epochData(ctx, field) + case "status": + return ec.fieldContext_Node_status(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Node_delegationsConnection(ctx, field) + case "rewardScore": + return ec.fieldContext_Node_rewardScore(ctx, field) + case "rankingScore": + return ec.fieldContext_Node_rankingScore(ctx, field) + case "name": + return ec.fieldContext_Node_name(ctx, field) + case "avatarUrl": + return ec.fieldContext_Node_avatarUrl(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Node", field.Name) }, } return fc, nil } -func (ec *executionContext) _ERC20_lifetimeLimit(ctx context.Context, field graphql.CollectedField, obj *Erc20) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20_lifetimeLimit(ctx, field) +func (ec *executionContext) _Delegation_epoch(ctx context.Context, field graphql.CollectedField, obj *vega.Delegation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Delegation_epoch(ctx, field) if err != nil { return graphql.Null } @@ -25717,7 +28297,7 @@ func (ec *executionContext) _ERC20_lifetimeLimit(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LifetimeLimit, nil + return ec.resolvers.Delegation().Epoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -25729,26 +28309,26 @@ func (ec *executionContext) _ERC20_lifetimeLimit(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20_lifetimeLimit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Delegation_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20", + Object: "Delegation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ERC20_withdrawThreshold(ctx context.Context, field graphql.CollectedField, obj *Erc20) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20_withdrawThreshold(ctx, field) +func (ec *executionContext) _DelegationEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.DelegationEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DelegationEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -25761,7 +28341,7 @@ func (ec *executionContext) _ERC20_withdrawThreshold(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.WithdrawThreshold, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -25773,26 +28353,36 @@ func (ec *executionContext) _ERC20_withdrawThreshold(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Delegation) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDelegation2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDelegation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20_withdrawThreshold(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DelegationEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20", + Object: "DelegationEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "amount": + return ec.fieldContext_Delegation_amount(ctx, field) + case "party": + return ec.fieldContext_Delegation_party(ctx, field) + case "node": + return ec.fieldContext_Delegation_node(ctx, field) + case "epoch": + return ec.fieldContext_Delegation_epoch(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Delegation", field.Name) }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_newSigner(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerAddedBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundle_newSigner(ctx, field) +func (ec *executionContext) _DelegationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.DelegationEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DelegationEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -25805,7 +28395,7 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_newSigner(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NewSigner, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -25822,9 +28412,9 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_newSigner(ctx contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_newSigner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DelegationEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerAddedBundle", + Object: "DelegationEdge", Field: field, IsMethod: false, IsResolver: false, @@ -25835,8 +28425,8 @@ func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_newSigne return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_submitter(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerAddedBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundle_submitter(ctx, field) +func (ec *executionContext) _DelegationsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.DelegationsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DelegationsConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -25849,38 +28439,41 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_submitter(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Submitter, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.DelegationEdge) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalODelegationEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDelegationEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_submitter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DelegationsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerAddedBundle", + Object: "DelegationsConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_DelegationEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_DelegationEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DelegationEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_nonce(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerAddedBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundle_nonce(ctx, field) +func (ec *executionContext) _DelegationsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.DelegationsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DelegationsConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -25893,7 +28486,7 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_nonce(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Nonce, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -25905,26 +28498,36 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_nonce(ctx context.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_nonce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DelegationsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerAddedBundle", + Object: "DelegationsConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_timestamp(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerAddedBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundle_timestamp(ctx, field) +func (ec *executionContext) _Deposit_id(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Deposit_id(ctx, field) if err != nil { return graphql.Null } @@ -25937,7 +28540,7 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_timestamp(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ERC20MultiSigSignerAddedBundle().Timestamp(rctx, obj) + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) @@ -25951,24 +28554,24 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_timestamp(ctx contex } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Deposit_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerAddedBundle", + Object: "Deposit", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_signatures(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerAddedBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundle_signatures(ctx, field) +func (ec *executionContext) _Deposit_party(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Deposit_party(ctx, field) if err != nil { return graphql.Null } @@ -25981,7 +28584,7 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_signatures(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Signatures, nil + return ec.resolvers.Deposit().Party(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -25993,26 +28596,68 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_signatures(ctx conte } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Party) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_signatures(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Deposit_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerAddedBundle", + Object: "Deposit", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_epochSeq(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerAddedBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundle_epochSeq(ctx, field) +func (ec *executionContext) _Deposit_amount(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Deposit_amount(ctx, field) if err != nil { return graphql.Null } @@ -26025,7 +28670,7 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_epochSeq(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EpochSeq, nil + return obj.Amount, nil }) if err != nil { ec.Error(ctx, err) @@ -26042,9 +28687,9 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_epochSeq(ctx context return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_epochSeq(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Deposit_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerAddedBundle", + Object: "Deposit", Field: field, IsMethod: false, IsResolver: false, @@ -26055,8 +28700,8 @@ func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_epochSeq return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerAddedBundleEdge_node(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerAddedBundleEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundleEdge_node(ctx, field) +func (ec *executionContext) _Deposit_asset(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Deposit_asset(ctx, field) if err != nil { return graphql.Null } @@ -26069,7 +28714,7 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundleEdge_node(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.Deposit().Asset(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -26081,40 +28726,58 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundleEdge_node(ctx context } return graphql.Null } - res := resTmp.(*v2.ERC20MultiSigSignerAddedBundle) + res := resTmp.(*vega.Asset) fc.Result = res - return ec.marshalNERC20MultiSigSignerAddedBundle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐERC20MultiSigSignerAddedBundle(ctx, field.Selections, res) + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundleEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Deposit_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerAddedBundleEdge", + Object: "Deposit", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "newSigner": - return ec.fieldContext_ERC20MultiSigSignerAddedBundle_newSigner(ctx, field) - case "submitter": - return ec.fieldContext_ERC20MultiSigSignerAddedBundle_submitter(ctx, field) - case "nonce": - return ec.fieldContext_ERC20MultiSigSignerAddedBundle_nonce(ctx, field) - case "timestamp": - return ec.fieldContext_ERC20MultiSigSignerAddedBundle_timestamp(ctx, field) - case "signatures": - return ec.fieldContext_ERC20MultiSigSignerAddedBundle_signatures(ctx, field) - case "epochSeq": - return ec.fieldContext_ERC20MultiSigSignerAddedBundle_epochSeq(ctx, field) + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerAddedBundle", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerAddedBundleEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerAddedBundleEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundleEdge_cursor(ctx, field) +func (ec *executionContext) _Deposit_status(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Deposit_status(ctx, field) if err != nil { return graphql.Null } @@ -26127,7 +28790,7 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundleEdge_cursor(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) @@ -26139,26 +28802,26 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedBundleEdge_cursor(ctx conte } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.Deposit_Status) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDepositStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDeposit_Status(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundleEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Deposit_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerAddedBundleEdge", + Object: "Deposit", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type DepositStatus does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerAddedConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerAddedConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerAddedConnection_edges(ctx, field) +func (ec *executionContext) _Deposit_createdTimestamp(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Deposit_createdTimestamp(ctx, field) if err != nil { return graphql.Null } @@ -26171,41 +28834,38 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedConnection_edges(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.CreatedTimestamp, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*ERC20MultiSigSignerAddedBundleEdge) + res := resTmp.(int64) fc.Result = res - return ec.marshalOERC20MultiSigSignerAddedBundleEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐERC20MultiSigSignerAddedBundleEdge(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Deposit_createdTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerAddedConnection", + Object: "Deposit", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_ERC20MultiSigSignerAddedBundleEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_ERC20MultiSigSignerAddedBundleEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerAddedBundleEdge", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerAddedConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerAddedConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerAddedConnection_pageInfo(ctx, field) +func (ec *executionContext) _Deposit_creditedTimestamp(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Deposit_creditedTimestamp(ctx, field) if err != nil { return graphql.Null } @@ -26218,7 +28878,7 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedConnection_pageInfo(ctx con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.CreditedTimestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -26227,36 +28887,26 @@ func (ec *executionContext) _ERC20MultiSigSignerAddedConnection_pageInfo(ctx con if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(int64) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalOTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Deposit_creditedTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerAddedConnection", + Object: "Deposit", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_oldSigner(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerRemovedBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundle_oldSigner(ctx, field) +func (ec *executionContext) _Deposit_txHash(ctx context.Context, field graphql.CollectedField, obj *vega.Deposit) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Deposit_txHash(ctx, field) if err != nil { return graphql.Null } @@ -26269,26 +28919,23 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_oldSigner(ctx cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.OldSigner, nil + return obj.TxHash, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_oldSigner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Deposit_txHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerRemovedBundle", + Object: "Deposit", Field: field, IsMethod: false, IsResolver: false, @@ -26299,8 +28946,8 @@ func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_oldSig return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_submitter(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerRemovedBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundle_submitter(ctx, field) +func (ec *executionContext) _DepositEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.DepositEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DepositEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -26313,7 +28960,7 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_submitter(ctx cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Submitter, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -26325,26 +28972,44 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_submitter(ctx cont } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Deposit) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDeposit2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDeposit(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_submitter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DepositEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerRemovedBundle", + Object: "DepositEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Deposit_id(ctx, field) + case "party": + return ec.fieldContext_Deposit_party(ctx, field) + case "amount": + return ec.fieldContext_Deposit_amount(ctx, field) + case "asset": + return ec.fieldContext_Deposit_asset(ctx, field) + case "status": + return ec.fieldContext_Deposit_status(ctx, field) + case "createdTimestamp": + return ec.fieldContext_Deposit_createdTimestamp(ctx, field) + case "creditedTimestamp": + return ec.fieldContext_Deposit_creditedTimestamp(ctx, field) + case "txHash": + return ec.fieldContext_Deposit_txHash(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Deposit", field.Name) }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_nonce(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerRemovedBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundle_nonce(ctx, field) +func (ec *executionContext) _DepositEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.DepositEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DepositEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -26357,7 +29022,7 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_nonce(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Nonce, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -26374,9 +29039,9 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_nonce(ctx context. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_nonce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DepositEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerRemovedBundle", + Object: "DepositEdge", Field: field, IsMethod: false, IsResolver: false, @@ -26387,8 +29052,8 @@ func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_nonce( return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_timestamp(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerRemovedBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundle_timestamp(ctx, field) +func (ec *executionContext) _DepositsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.DepositsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DepositsConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -26401,38 +29066,41 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_timestamp(ctx cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ERC20MultiSigSignerRemovedBundle().Timestamp(rctx, obj) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.DepositEdge) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalODepositEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDepositEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DepositsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerRemovedBundle", + Object: "DepositsConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_DepositEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_DepositEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DepositEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_signatures(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerRemovedBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundle_signatures(ctx, field) +func (ec *executionContext) _DepositsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.DepositsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DepositsConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -26445,38 +29113,45 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_signatures(ctx con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Signatures, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_signatures(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DepositsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerRemovedBundle", + Object: "DepositsConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_epochSeq(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerRemovedBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundle_epochSeq(ctx, field) +func (ec *executionContext) _DiscreteTrading_duration(ctx context.Context, field graphql.CollectedField, obj *DiscreteTrading) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DiscreteTrading_duration(ctx, field) if err != nil { return graphql.Null } @@ -26489,7 +29164,7 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_epochSeq(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EpochSeq, nil + return obj.Duration, nil }) if err != nil { ec.Error(ctx, err) @@ -26501,26 +29176,26 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_epochSeq(ctx conte } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_epochSeq(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DiscreteTrading_duration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerRemovedBundle", + Object: "DiscreteTrading", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerRemovedBundleEdge_node(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerRemovedBundleEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundleEdge_node(ctx, field) +func (ec *executionContext) _DiscreteTrading_tickSize(ctx context.Context, field graphql.CollectedField, obj *DiscreteTrading) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DiscreteTrading_tickSize(ctx, field) if err != nil { return graphql.Null } @@ -26533,7 +29208,7 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedBundleEdge_node(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.TickSize, nil }) if err != nil { ec.Error(ctx, err) @@ -26545,40 +29220,26 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedBundleEdge_node(ctx conte } return graphql.Null } - res := resTmp.(*v2.ERC20MultiSigSignerRemovedBundle) + res := resTmp.(string) fc.Result = res - return ec.marshalNERC20MultiSigSignerRemovedBundle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐERC20MultiSigSignerRemovedBundle(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundleEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DiscreteTrading_tickSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerRemovedBundleEdge", + Object: "DiscreteTrading", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "oldSigner": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_oldSigner(ctx, field) - case "submitter": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_submitter(ctx, field) - case "nonce": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_nonce(ctx, field) - case "timestamp": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_timestamp(ctx, field) - case "signatures": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_signatures(ctx, field) - case "epochSeq": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_epochSeq(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerRemovedBundle", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerRemovedBundleEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerRemovedBundleEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundleEdge_cursor(ctx, field) +func (ec *executionContext) _DispatchStrategy_dispatchMetric(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DispatchStrategy_dispatchMetric(ctx, field) if err != nil { return graphql.Null } @@ -26591,7 +29252,7 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedBundleEdge_cursor(ctx con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.DispatchStrategy().DispatchMetric(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -26603,26 +29264,26 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedBundleEdge_cursor(ctx con } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.DispatchMetric) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDispatchMetric2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDispatchMetric(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundleEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DispatchStrategy_dispatchMetric(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerRemovedBundleEdge", + Object: "DispatchStrategy", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type DispatchMetric does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerRemovedConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerRemovedConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedConnection_edges(ctx, field) +func (ec *executionContext) _DispatchStrategy_dispatchMetricAssetId(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DispatchStrategy_dispatchMetricAssetId(ctx, field) if err != nil { return graphql.Null } @@ -26635,41 +29296,38 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedConnection_edges(ctx cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.DispatchStrategy().DispatchMetricAssetID(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*ERC20MultiSigSignerRemovedBundleEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalOERC20MultiSigSignerRemovedBundleEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐERC20MultiSigSignerRemovedBundleEdge(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DispatchStrategy_dispatchMetricAssetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerRemovedConnection", + Object: "DispatchStrategy", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundleEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundleEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerRemovedBundleEdge", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ERC20MultiSigSignerRemovedConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerRemovedConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedConnection_pageInfo(ctx, field) +func (ec *executionContext) _DispatchStrategy_marketIdsInScope(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DispatchStrategy_marketIdsInScope(ctx, field) if err != nil { return graphql.Null } @@ -26682,7 +29340,7 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedConnection_pageInfo(ctx c }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.DispatchStrategy().MarketIdsInScope(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -26691,36 +29349,26 @@ func (ec *executionContext) _ERC20MultiSigSignerRemovedConnection_pageInfo(ctx c if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.([]string) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalOID2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DispatchStrategy_marketIdsInScope(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20MultiSigSignerRemovedConnection", + Object: "DispatchStrategy", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ERC20SetAssetLimitsBundle_assetSource(ctx context.Context, field graphql.CollectedField, obj *ERC20SetAssetLimitsBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20SetAssetLimitsBundle_assetSource(ctx, field) +func (ec *executionContext) _DispatchStrategy_entityScope(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DispatchStrategy_entityScope(ctx, field) if err != nil { return graphql.Null } @@ -26733,7 +29381,7 @@ func (ec *executionContext) _ERC20SetAssetLimitsBundle_assetSource(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AssetSource, nil + return obj.EntityScope, nil }) if err != nil { ec.Error(ctx, err) @@ -26745,26 +29393,26 @@ func (ec *executionContext) _ERC20SetAssetLimitsBundle_assetSource(ctx context.C } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.EntityScope) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNEntityScope2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEntityScope(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_assetSource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DispatchStrategy_entityScope(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20SetAssetLimitsBundle", + Object: "DispatchStrategy", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type EntityScope does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ERC20SetAssetLimitsBundle_vegaAssetId(ctx context.Context, field graphql.CollectedField, obj *ERC20SetAssetLimitsBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20SetAssetLimitsBundle_vegaAssetId(ctx, field) +func (ec *executionContext) _DispatchStrategy_individualScope(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DispatchStrategy_individualScope(ctx, field) if err != nil { return graphql.Null } @@ -26777,38 +29425,35 @@ func (ec *executionContext) _ERC20SetAssetLimitsBundle_vegaAssetId(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.VegaAssetID, nil + return obj.IndividualScope, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.IndividualScope) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOIndividualScope2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐIndividualScope(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_vegaAssetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DispatchStrategy_individualScope(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20SetAssetLimitsBundle", + Object: "DispatchStrategy", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type IndividualScope does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ERC20SetAssetLimitsBundle_nonce(ctx context.Context, field graphql.CollectedField, obj *ERC20SetAssetLimitsBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20SetAssetLimitsBundle_nonce(ctx, field) +func (ec *executionContext) _DispatchStrategy_teamScope(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DispatchStrategy_teamScope(ctx, field) if err != nil { return graphql.Null } @@ -26821,38 +29466,35 @@ func (ec *executionContext) _ERC20SetAssetLimitsBundle_nonce(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Nonce, nil + return obj.TeamScope, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOID2ᚕstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_nonce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DispatchStrategy_teamScope(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20SetAssetLimitsBundle", + Object: "DispatchStrategy", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ERC20SetAssetLimitsBundle_lifetimeLimit(ctx context.Context, field graphql.CollectedField, obj *ERC20SetAssetLimitsBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20SetAssetLimitsBundle_lifetimeLimit(ctx, field) +func (ec *executionContext) _DispatchStrategy_nTopPerformers(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DispatchStrategy_nTopPerformers(ctx, field) if err != nil { return graphql.Null } @@ -26865,26 +29507,23 @@ func (ec *executionContext) _ERC20SetAssetLimitsBundle_lifetimeLimit(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LifetimeLimit, nil + return obj.NTopPerformers, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_lifetimeLimit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DispatchStrategy_nTopPerformers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20SetAssetLimitsBundle", + Object: "DispatchStrategy", Field: field, IsMethod: false, IsResolver: false, @@ -26895,8 +29534,8 @@ func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_lifetimeLimit return fc, nil } -func (ec *executionContext) _ERC20SetAssetLimitsBundle_threshold(ctx context.Context, field graphql.CollectedField, obj *ERC20SetAssetLimitsBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20SetAssetLimitsBundle_threshold(ctx, field) +func (ec *executionContext) _DispatchStrategy_stakingRequirement(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DispatchStrategy_stakingRequirement(ctx, field) if err != nil { return graphql.Null } @@ -26909,7 +29548,7 @@ func (ec *executionContext) _ERC20SetAssetLimitsBundle_threshold(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Threshold, nil + return obj.StakingRequirement, nil }) if err != nil { ec.Error(ctx, err) @@ -26926,9 +29565,9 @@ func (ec *executionContext) _ERC20SetAssetLimitsBundle_threshold(ctx context.Con return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_threshold(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DispatchStrategy_stakingRequirement(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20SetAssetLimitsBundle", + Object: "DispatchStrategy", Field: field, IsMethod: false, IsResolver: false, @@ -26939,8 +29578,8 @@ func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_threshold(ctx return fc, nil } -func (ec *executionContext) _ERC20SetAssetLimitsBundle_signatures(ctx context.Context, field graphql.CollectedField, obj *ERC20SetAssetLimitsBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ERC20SetAssetLimitsBundle_signatures(ctx, field) +func (ec *executionContext) _DispatchStrategy_notionalTimeWeightedAveragePositionRequirement(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DispatchStrategy_notionalTimeWeightedAveragePositionRequirement(ctx, field) if err != nil { return graphql.Null } @@ -26953,7 +29592,7 @@ func (ec *executionContext) _ERC20SetAssetLimitsBundle_signatures(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Signatures, nil + return obj.NotionalTimeWeightedAveragePositionRequirement, nil }) if err != nil { ec.Error(ctx, err) @@ -26970,9 +29609,9 @@ func (ec *executionContext) _ERC20SetAssetLimitsBundle_signatures(ctx context.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_signatures(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DispatchStrategy_notionalTimeWeightedAveragePositionRequirement(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ERC20SetAssetLimitsBundle", + Object: "DispatchStrategy", Field: field, IsMethod: false, IsResolver: false, @@ -26983,8 +29622,8 @@ func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_signatures(ct return fc, nil } -func (ec *executionContext) _ETHAddress_address(ctx context.Context, field graphql.CollectedField, obj *ETHAddress) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ETHAddress_address(ctx, field) +func (ec *executionContext) _DispatchStrategy_windowLength(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DispatchStrategy_windowLength(ctx, field) if err != nil { return graphql.Null } @@ -26997,35 +29636,38 @@ func (ec *executionContext) _ETHAddress_address(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Address, nil + return ec.resolvers.DispatchStrategy().WindowLength(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(int) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ETHAddress_address(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DispatchStrategy_windowLength(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ETHAddress", + Object: "DispatchStrategy", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_accounts(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_accounts(ctx, field) +func (ec *executionContext) _DispatchStrategy_lockPeriod(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DispatchStrategy_lockPeriod(ctx, field) if err != nil { return graphql.Null } @@ -27038,47 +29680,38 @@ func (ec *executionContext) _Entities_accounts(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Accounts, nil + return ec.resolvers.DispatchStrategy().LockPeriod(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.Account) + res := resTmp.(int) fc.Result = res - return ec.marshalOAccountEvent2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccount(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_accounts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DispatchStrategy_lockPeriod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "DispatchStrategy", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "balance": - return ec.fieldContext_AccountEvent_balance(ctx, field) - case "asset": - return ec.fieldContext_AccountEvent_asset(ctx, field) - case "type": - return ec.fieldContext_AccountEvent_type(ctx, field) - case "market": - return ec.fieldContext_AccountEvent_market(ctx, field) - case "party": - return ec.fieldContext_AccountEvent_party(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type AccountEvent", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_orders(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_orders(ctx, field) +func (ec *executionContext) _DispatchStrategy_distributionStrategy(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DispatchStrategy_distributionStrategy(ctx, field) if err != nil { return graphql.Null } @@ -27091,81 +29724,38 @@ func (ec *executionContext) _Entities_orders(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Orders, nil + return obj.DistributionStrategy, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.Order) + res := resTmp.(vega.DistributionStrategy) fc.Result = res - return ec.marshalOOrder2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, field.Selections, res) + return ec.marshalNDistributionStrategy2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDistributionStrategy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_orders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DispatchStrategy_distributionStrategy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "DispatchStrategy", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Order_id(ctx, field) - case "price": - return ec.fieldContext_Order_price(ctx, field) - case "timeInForce": - return ec.fieldContext_Order_timeInForce(ctx, field) - case "side": - return ec.fieldContext_Order_side(ctx, field) - case "market": - return ec.fieldContext_Order_market(ctx, field) - case "size": - return ec.fieldContext_Order_size(ctx, field) - case "remaining": - return ec.fieldContext_Order_remaining(ctx, field) - case "party": - return ec.fieldContext_Order_party(ctx, field) - case "createdAt": - return ec.fieldContext_Order_createdAt(ctx, field) - case "expiresAt": - return ec.fieldContext_Order_expiresAt(ctx, field) - case "status": - return ec.fieldContext_Order_status(ctx, field) - case "reference": - return ec.fieldContext_Order_reference(ctx, field) - case "tradesConnection": - return ec.fieldContext_Order_tradesConnection(ctx, field) - case "type": - return ec.fieldContext_Order_type(ctx, field) - case "rejectionReason": - return ec.fieldContext_Order_rejectionReason(ctx, field) - case "version": - return ec.fieldContext_Order_version(ctx, field) - case "updatedAt": - return ec.fieldContext_Order_updatedAt(ctx, field) - case "peggedOrder": - return ec.fieldContext_Order_peggedOrder(ctx, field) - case "liquidityProvision": - return ec.fieldContext_Order_liquidityProvision(ctx, field) - case "postOnly": - return ec.fieldContext_Order_postOnly(ctx, field) - case "reduceOnly": - return ec.fieldContext_Order_reduceOnly(ctx, field) - case "icebergOrder": - return ec.fieldContext_Order_icebergOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Order", field.Name) + return nil, errors.New("field of type DistributionStrategy does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_positions(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_positions(ctx, field) +func (ec *executionContext) _DispatchStrategy_rankTable(ctx context.Context, field graphql.CollectedField, obj *vega.DispatchStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DispatchStrategy_rankTable(ctx, field) if err != nil { return graphql.Null } @@ -27178,7 +29768,7 @@ func (ec *executionContext) _Entities_positions(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Positions, nil + return obj.RankTable, nil }) if err != nil { ec.Error(ctx, err) @@ -27187,48 +29777,32 @@ func (ec *executionContext) _Entities_positions(ctx context.Context, field graph if resTmp == nil { return graphql.Null } - res := resTmp.([]*vega.Position) + res := resTmp.([]*vega.Rank) fc.Result = res - return ec.marshalOPosition2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPosition(ctx, field.Selections, res) + return ec.marshalORankTable2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐRank(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_positions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DispatchStrategy_rankTable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "DispatchStrategy", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "market": - return ec.fieldContext_Position_market(ctx, field) - case "party": - return ec.fieldContext_Position_party(ctx, field) - case "openVolume": - return ec.fieldContext_Position_openVolume(ctx, field) - case "realisedPNL": - return ec.fieldContext_Position_realisedPNL(ctx, field) - case "unrealisedPNL": - return ec.fieldContext_Position_unrealisedPNL(ctx, field) - case "averageEntryPrice": - return ec.fieldContext_Position_averageEntryPrice(ctx, field) - case "lossSocializationAmount": - return ec.fieldContext_Position_lossSocializationAmount(ctx, field) - case "positionStatus": - return ec.fieldContext_Position_positionStatus(ctx, field) - case "marginsConnection": - return ec.fieldContext_Position_marginsConnection(ctx, field) - case "updatedAt": - return ec.fieldContext_Position_updatedAt(ctx, field) + case "startRank": + return ec.fieldContext_RankTable_startRank(ctx, field) + case "shareRatio": + return ec.fieldContext_RankTable_shareRatio(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Position", field.Name) + return nil, fmt.Errorf("no field named %q was found under type RankTable", field.Name) }, } return fc, nil } -func (ec *executionContext) _Entities_ledgerEntries(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_ledgerEntries(ctx, field) +func (ec *executionContext) _ERC20_contractAddress(ctx context.Context, field graphql.CollectedField, obj *Erc20) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20_contractAddress(ctx, field) if err != nil { return graphql.Null } @@ -27241,51 +29815,38 @@ func (ec *executionContext) _Entities_ledgerEntries(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LedgerEntries, nil + return obj.ContractAddress, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.LedgerEntry) + res := resTmp.(string) fc.Result = res - return ec.marshalOLedgerEntry2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLedgerEntry(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_ledgerEntries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20_contractAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "fromAccountId": - return ec.fieldContext_LedgerEntry_fromAccountId(ctx, field) - case "toAccountId": - return ec.fieldContext_LedgerEntry_toAccountId(ctx, field) - case "amount": - return ec.fieldContext_LedgerEntry_amount(ctx, field) - case "type": - return ec.fieldContext_LedgerEntry_type(ctx, field) - case "timestamp": - return ec.fieldContext_LedgerEntry_timestamp(ctx, field) - case "fromAccountBalance": - return ec.fieldContext_LedgerEntry_fromAccountBalance(ctx, field) - case "toAccountBalance": - return ec.fieldContext_LedgerEntry_toAccountBalance(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LedgerEntry", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_balanceChanges(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_balanceChanges(ctx, field) +func (ec *executionContext) _ERC20_lifetimeLimit(ctx context.Context, field graphql.CollectedField, obj *Erc20) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20_lifetimeLimit(ctx, field) if err != nil { return graphql.Null } @@ -27298,47 +29859,38 @@ func (ec *executionContext) _Entities_balanceChanges(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BalanceChanges, nil + return obj.LifetimeLimit, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.AccountBalance) + res := resTmp.(string) fc.Result = res - return ec.marshalOAccountBalance2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAccountBalance(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_balanceChanges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20_lifetimeLimit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "balance": - return ec.fieldContext_AccountBalance_balance(ctx, field) - case "asset": - return ec.fieldContext_AccountBalance_asset(ctx, field) - case "type": - return ec.fieldContext_AccountBalance_type(ctx, field) - case "market": - return ec.fieldContext_AccountBalance_market(ctx, field) - case "party": - return ec.fieldContext_AccountBalance_party(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type AccountBalance", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_transfers(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_transfers(ctx, field) +func (ec *executionContext) _ERC20_withdrawThreshold(ctx context.Context, field graphql.CollectedField, obj *Erc20) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20_withdrawThreshold(ctx, field) if err != nil { return graphql.Null } @@ -27351,61 +29903,38 @@ func (ec *executionContext) _Entities_transfers(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Transfers, nil + return obj.WithdrawThreshold, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v1.Transfer) + res := resTmp.(string) fc.Result = res - return ec.marshalOTransfer2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐTransfer(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_transfers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20_withdrawThreshold(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Transfer_id(ctx, field) - case "from": - return ec.fieldContext_Transfer_from(ctx, field) - case "fromAccountType": - return ec.fieldContext_Transfer_fromAccountType(ctx, field) - case "to": - return ec.fieldContext_Transfer_to(ctx, field) - case "toAccountType": - return ec.fieldContext_Transfer_toAccountType(ctx, field) - case "asset": - return ec.fieldContext_Transfer_asset(ctx, field) - case "amount": - return ec.fieldContext_Transfer_amount(ctx, field) - case "reference": - return ec.fieldContext_Transfer_reference(ctx, field) - case "status": - return ec.fieldContext_Transfer_status(ctx, field) - case "timestamp": - return ec.fieldContext_Transfer_timestamp(ctx, field) - case "kind": - return ec.fieldContext_Transfer_kind(ctx, field) - case "reason": - return ec.fieldContext_Transfer_reason(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Transfer", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_votes(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_votes(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_newSigner(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerAddedBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundle_newSigner(ctx, field) if err != nil { return graphql.Null } @@ -27418,51 +29947,38 @@ func (ec *executionContext) _Entities_votes(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Votes, nil + return obj.NewSigner, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.Vote) + res := resTmp.(string) fc.Result = res - return ec.marshalOVote2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐVote(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_votes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_newSigner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerAddedBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "value": - return ec.fieldContext_Vote_value(ctx, field) - case "party": - return ec.fieldContext_Vote_party(ctx, field) - case "datetime": - return ec.fieldContext_Vote_datetime(ctx, field) - case "proposalId": - return ec.fieldContext_Vote_proposalId(ctx, field) - case "governanceTokenBalance": - return ec.fieldContext_Vote_governanceTokenBalance(ctx, field) - case "governanceTokenWeight": - return ec.fieldContext_Vote_governanceTokenWeight(ctx, field) - case "equityLikeShareWeight": - return ec.fieldContext_Vote_equityLikeShareWeight(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Vote", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_erc20MultiSigSignerAddedBundles(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_erc20MultiSigSignerAddedBundles(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_submitter(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerAddedBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundle_submitter(ctx, field) if err != nil { return graphql.Null } @@ -27475,49 +29991,38 @@ func (ec *executionContext) _Entities_erc20MultiSigSignerAddedBundles(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Erc20MultiSigSignerAddedBundles, nil + return obj.Submitter, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.ERC20MultiSigSignerAddedBundle) + res := resTmp.(string) fc.Result = res - return ec.marshalOERC20MultiSigSignerAddedBundle2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐERC20MultiSigSignerAddedBundle(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_erc20MultiSigSignerAddedBundles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_submitter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerAddedBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "newSigner": - return ec.fieldContext_ERC20MultiSigSignerAddedBundle_newSigner(ctx, field) - case "submitter": - return ec.fieldContext_ERC20MultiSigSignerAddedBundle_submitter(ctx, field) - case "nonce": - return ec.fieldContext_ERC20MultiSigSignerAddedBundle_nonce(ctx, field) - case "timestamp": - return ec.fieldContext_ERC20MultiSigSignerAddedBundle_timestamp(ctx, field) - case "signatures": - return ec.fieldContext_ERC20MultiSigSignerAddedBundle_signatures(ctx, field) - case "epochSeq": - return ec.fieldContext_ERC20MultiSigSignerAddedBundle_epochSeq(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerAddedBundle", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_erc20MultiSigSignerRemovedBundles(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_erc20MultiSigSignerRemovedBundles(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_nonce(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerAddedBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundle_nonce(ctx, field) if err != nil { return graphql.Null } @@ -27530,49 +30035,38 @@ func (ec *executionContext) _Entities_erc20MultiSigSignerRemovedBundles(ctx cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Erc20MultiSigSignerRemovedBundles, nil + return obj.Nonce, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.ERC20MultiSigSignerRemovedBundle) + res := resTmp.(string) fc.Result = res - return ec.marshalOERC20MultiSigSignerRemovedBundle2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐERC20MultiSigSignerRemovedBundle(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_erc20MultiSigSignerRemovedBundles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_nonce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerAddedBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "oldSigner": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_oldSigner(ctx, field) - case "submitter": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_submitter(ctx, field) - case "nonce": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_nonce(ctx, field) - case "timestamp": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_timestamp(ctx, field) - case "signatures": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_signatures(ctx, field) - case "epochSeq": - return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_epochSeq(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerRemovedBundle", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_trades(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_trades(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_timestamp(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerAddedBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundle_timestamp(ctx, field) if err != nil { return graphql.Null } @@ -27585,67 +30079,38 @@ func (ec *executionContext) _Entities_trades(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Trades, nil + return ec.resolvers.ERC20MultiSigSignerAddedBundle().Timestamp(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.Trade) + res := resTmp.(string) fc.Result = res - return ec.marshalOTrade2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTrade(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_trades(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerAddedBundle", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Trade_id(ctx, field) - case "market": - return ec.fieldContext_Trade_market(ctx, field) - case "buyOrder": - return ec.fieldContext_Trade_buyOrder(ctx, field) - case "sellOrder": - return ec.fieldContext_Trade_sellOrder(ctx, field) - case "buyer": - return ec.fieldContext_Trade_buyer(ctx, field) - case "seller": - return ec.fieldContext_Trade_seller(ctx, field) - case "aggressor": - return ec.fieldContext_Trade_aggressor(ctx, field) - case "price": - return ec.fieldContext_Trade_price(ctx, field) - case "size": - return ec.fieldContext_Trade_size(ctx, field) - case "createdAt": - return ec.fieldContext_Trade_createdAt(ctx, field) - case "type": - return ec.fieldContext_Trade_type(ctx, field) - case "buyerFee": - return ec.fieldContext_Trade_buyerFee(ctx, field) - case "sellerFee": - return ec.fieldContext_Trade_sellerFee(ctx, field) - case "buyerAuctionBatch": - return ec.fieldContext_Trade_buyerAuctionBatch(ctx, field) - case "sellerAuctionBatch": - return ec.fieldContext_Trade_sellerAuctionBatch(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Trade", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_oracleSpecs(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_oracleSpecs(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_signatures(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerAddedBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundle_signatures(ctx, field) if err != nil { return graphql.Null } @@ -27658,41 +30123,38 @@ func (ec *executionContext) _Entities_oracleSpecs(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.OracleSpecs, nil + return obj.Signatures, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.OracleSpec) + res := resTmp.(string) fc.Result = res - return ec.marshalOOracleSpec2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOracleSpec(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_oracleSpecs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_signatures(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerAddedBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "dataSourceSpec": - return ec.fieldContext_OracleSpec_dataSourceSpec(ctx, field) - case "dataConnection": - return ec.fieldContext_OracleSpec_dataConnection(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OracleSpec", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_oracleData(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_oracleData(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerAddedBundle_epochSeq(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerAddedBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundle_epochSeq(ctx, field) if err != nil { return graphql.Null } @@ -27705,39 +30167,38 @@ func (ec *executionContext) _Entities_oracleData(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.OracleData, nil + return obj.EpochSeq, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.OracleData) + res := resTmp.(string) fc.Result = res - return ec.marshalOOracleData2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOracleData(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_oracleData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundle_epochSeq(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerAddedBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "externalData": - return ec.fieldContext_OracleData_externalData(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OracleData", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_markets(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_markets(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerAddedBundleEdge_node(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerAddedBundleEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundleEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -27750,91 +30211,52 @@ func (ec *executionContext) _Entities_markets(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Markets, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.Market) + res := resTmp.(*v2.ERC20MultiSigSignerAddedBundle) fc.Result = res - return ec.marshalOMarket2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) + return ec.marshalNERC20MultiSigSignerAddedBundle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐERC20MultiSigSignerAddedBundle(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_markets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundleEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerAddedBundleEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Market_id(ctx, field) - case "fees": - return ec.fieldContext_Market_fees(ctx, field) - case "tradableInstrument": - return ec.fieldContext_Market_tradableInstrument(ctx, field) - case "decimalPlaces": - return ec.fieldContext_Market_decimalPlaces(ctx, field) - case "positionDecimalPlaces": - return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) - case "openingAuction": - return ec.fieldContext_Market_openingAuction(ctx, field) - case "priceMonitoringSettings": - return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) - case "liquidityMonitoringParameters": - return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) - case "tradingMode": - return ec.fieldContext_Market_tradingMode(ctx, field) - case "state": - return ec.fieldContext_Market_state(ctx, field) - case "proposal": - return ec.fieldContext_Market_proposal(ctx, field) - case "ordersConnection": - return ec.fieldContext_Market_ordersConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Market_accountsConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Market_tradesConnection(ctx, field) - case "depth": - return ec.fieldContext_Market_depth(ctx, field) - case "candlesConnection": - return ec.fieldContext_Market_candlesConnection(ctx, field) - case "data": - return ec.fieldContext_Market_data(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Market_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) - case "marketTimestamps": - return ec.fieldContext_Market_marketTimestamps(ctx, field) - case "riskFactors": - return ec.fieldContext_Market_riskFactors(ctx, field) - case "linearSlippageFactor": - return ec.fieldContext_Market_linearSlippageFactor(ctx, field) - case "quadraticSlippageFactor": - return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) - case "parentMarketID": - return ec.fieldContext_Market_parentMarketID(ctx, field) - case "insurancePoolFraction": - return ec.fieldContext_Market_insurancePoolFraction(ctx, field) - case "successorMarketID": - return ec.fieldContext_Market_successorMarketID(ctx, field) - case "liquiditySLAParameters": - return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "newSigner": + return ec.fieldContext_ERC20MultiSigSignerAddedBundle_newSigner(ctx, field) + case "submitter": + return ec.fieldContext_ERC20MultiSigSignerAddedBundle_submitter(ctx, field) + case "nonce": + return ec.fieldContext_ERC20MultiSigSignerAddedBundle_nonce(ctx, field) + case "timestamp": + return ec.fieldContext_ERC20MultiSigSignerAddedBundle_timestamp(ctx, field) + case "signatures": + return ec.fieldContext_ERC20MultiSigSignerAddedBundle_signatures(ctx, field) + case "epochSeq": + return ec.fieldContext_ERC20MultiSigSignerAddedBundle_epochSeq(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerAddedBundle", field.Name) }, } return fc, nil } -func (ec *executionContext) _Entities_parties(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_parties(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerAddedBundleEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerAddedBundleEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerAddedBundleEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -27847,77 +30269,38 @@ func (ec *executionContext) _Entities_parties(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Parties, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.Party) + res := resTmp.(string) fc.Result = res - return ec.marshalOParty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_parties(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedBundleEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerAddedBundleEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_marginLevels(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_marginLevels(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerAddedConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerAddedConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerAddedConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -27930,7 +30313,7 @@ func (ec *executionContext) _Entities_marginLevels(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarginLevels, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -27939,44 +30322,32 @@ func (ec *executionContext) _Entities_marginLevels(ctx context.Context, field gr if resTmp == nil { return graphql.Null } - res := resTmp.([]*vega.MarginLevels) + res := resTmp.([]*ERC20MultiSigSignerAddedBundleEdge) fc.Result = res - return ec.marshalOMarginLevels2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginLevels(ctx, field.Selections, res) + return ec.marshalOERC20MultiSigSignerAddedBundleEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐERC20MultiSigSignerAddedBundleEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_marginLevels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerAddedConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "market": - return ec.fieldContext_MarginLevels_market(ctx, field) - case "asset": - return ec.fieldContext_MarginLevels_asset(ctx, field) - case "party": - return ec.fieldContext_MarginLevels_party(ctx, field) - case "maintenanceLevel": - return ec.fieldContext_MarginLevels_maintenanceLevel(ctx, field) - case "searchLevel": - return ec.fieldContext_MarginLevels_searchLevel(ctx, field) - case "initialLevel": - return ec.fieldContext_MarginLevels_initialLevel(ctx, field) - case "collateralReleaseLevel": - return ec.fieldContext_MarginLevels_collateralReleaseLevel(ctx, field) - case "timestamp": - return ec.fieldContext_MarginLevels_timestamp(ctx, field) + case "node": + return ec.fieldContext_ERC20MultiSigSignerAddedBundleEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_ERC20MultiSigSignerAddedBundleEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type MarginLevels", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerAddedBundleEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _Entities_rewards(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_rewards(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerAddedConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerAddedConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerAddedConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -27989,7 +30360,7 @@ func (ec *executionContext) _Entities_rewards(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Rewards, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -27998,46 +30369,36 @@ func (ec *executionContext) _Entities_rewards(ctx context.Context, field graphql if resTmp == nil { return graphql.Null } - res := resTmp.([]*vega.Reward) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalOReward2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐReward(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_rewards(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerAddedConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerAddedConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "asset": - return ec.fieldContext_Reward_asset(ctx, field) - case "marketId": - return ec.fieldContext_Reward_marketId(ctx, field) - case "rewardType": - return ec.fieldContext_Reward_rewardType(ctx, field) - case "party": - return ec.fieldContext_Reward_party(ctx, field) - case "epoch": - return ec.fieldContext_Reward_epoch(ctx, field) - case "amount": - return ec.fieldContext_Reward_amount(ctx, field) - case "percentageOfTotal": - return ec.fieldContext_Reward_percentageOfTotal(ctx, field) - case "receivedAt": - return ec.fieldContext_Reward_receivedAt(ctx, field) - case "lockedUntilEpoch": - return ec.fieldContext_Reward_lockedUntilEpoch(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Reward", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Entities_deposits(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_deposits(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_oldSigner(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerRemovedBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundle_oldSigner(ctx, field) if err != nil { return graphql.Null } @@ -28050,53 +30411,38 @@ func (ec *executionContext) _Entities_deposits(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Deposits, nil + return obj.OldSigner, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.Deposit) + res := resTmp.(string) fc.Result = res - return ec.marshalODeposit2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDeposit(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_deposits(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_oldSigner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerRemovedBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Deposit_id(ctx, field) - case "party": - return ec.fieldContext_Deposit_party(ctx, field) - case "amount": - return ec.fieldContext_Deposit_amount(ctx, field) - case "asset": - return ec.fieldContext_Deposit_asset(ctx, field) - case "status": - return ec.fieldContext_Deposit_status(ctx, field) - case "createdTimestamp": - return ec.fieldContext_Deposit_createdTimestamp(ctx, field) - case "creditedTimestamp": - return ec.fieldContext_Deposit_creditedTimestamp(ctx, field) - case "txHash": - return ec.fieldContext_Deposit_txHash(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Deposit", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_withdrawals(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_withdrawals(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_submitter(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerRemovedBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundle_submitter(ctx, field) if err != nil { return graphql.Null } @@ -28109,57 +30455,38 @@ func (ec *executionContext) _Entities_withdrawals(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Withdrawals, nil + return obj.Submitter, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.Withdrawal) + res := resTmp.(string) fc.Result = res - return ec.marshalOWithdrawal2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐWithdrawal(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_withdrawals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_submitter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerRemovedBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Withdrawal_id(ctx, field) - case "party": - return ec.fieldContext_Withdrawal_party(ctx, field) - case "amount": - return ec.fieldContext_Withdrawal_amount(ctx, field) - case "asset": - return ec.fieldContext_Withdrawal_asset(ctx, field) - case "status": - return ec.fieldContext_Withdrawal_status(ctx, field) - case "ref": - return ec.fieldContext_Withdrawal_ref(ctx, field) - case "createdTimestamp": - return ec.fieldContext_Withdrawal_createdTimestamp(ctx, field) - case "withdrawnTimestamp": - return ec.fieldContext_Withdrawal_withdrawnTimestamp(ctx, field) - case "txHash": - return ec.fieldContext_Withdrawal_txHash(ctx, field) - case "details": - return ec.fieldContext_Withdrawal_details(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Withdrawal", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_assets(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_assets(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_nonce(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerRemovedBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundle_nonce(ctx, field) if err != nil { return graphql.Null } @@ -28172,67 +30499,38 @@ func (ec *executionContext) _Entities_assets(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Assets, nil + return obj.Nonce, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.Asset) + res := resTmp.(string) fc.Result = res - return ec.marshalOAsset2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_assets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_nonce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerRemovedBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_liquidityProvisions(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_liquidityProvisions(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_timestamp(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerRemovedBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundle_timestamp(ctx, field) if err != nil { return graphql.Null } @@ -28245,61 +30543,38 @@ func (ec *executionContext) _Entities_liquidityProvisions(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LiquidityProvisions, nil + return ec.resolvers.ERC20MultiSigSignerRemovedBundle().Timestamp(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.LiquidityProvision) + res := resTmp.(string) fc.Result = res - return ec.marshalOLiquidityProvision2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_liquidityProvisions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerRemovedBundle", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_LiquidityProvision_id(ctx, field) - case "party": - return ec.fieldContext_LiquidityProvision_party(ctx, field) - case "createdAt": - return ec.fieldContext_LiquidityProvision_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_LiquidityProvision_updatedAt(ctx, field) - case "market": - return ec.fieldContext_LiquidityProvision_market(ctx, field) - case "commitmentAmount": - return ec.fieldContext_LiquidityProvision_commitmentAmount(ctx, field) - case "fee": - return ec.fieldContext_LiquidityProvision_fee(ctx, field) - case "sells": - return ec.fieldContext_LiquidityProvision_sells(ctx, field) - case "buys": - return ec.fieldContext_LiquidityProvision_buys(ctx, field) - case "version": - return ec.fieldContext_LiquidityProvision_version(ctx, field) - case "status": - return ec.fieldContext_LiquidityProvision_status(ctx, field) - case "reference": - return ec.fieldContext_LiquidityProvision_reference(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvision", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_proposals(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_proposals(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_signatures(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerRemovedBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundle_signatures(ctx, field) if err != nil { return graphql.Null } @@ -28312,63 +30587,38 @@ func (ec *executionContext) _Entities_proposals(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Proposals, nil + return obj.Signatures, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.Proposal) + res := resTmp.(string) fc.Result = res - return ec.marshalOProposalDetail2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposal(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_proposals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_signatures(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerRemovedBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_ProposalDetail_id(ctx, field) - case "reference": - return ec.fieldContext_ProposalDetail_reference(ctx, field) - case "party": - return ec.fieldContext_ProposalDetail_party(ctx, field) - case "state": - return ec.fieldContext_ProposalDetail_state(ctx, field) - case "datetime": - return ec.fieldContext_ProposalDetail_datetime(ctx, field) - case "terms": - return ec.fieldContext_ProposalDetail_terms(ctx, field) - case "rationale": - return ec.fieldContext_ProposalDetail_rationale(ctx, field) - case "rejectionReason": - return ec.fieldContext_ProposalDetail_rejectionReason(ctx, field) - case "errorDetails": - return ec.fieldContext_ProposalDetail_errorDetails(ctx, field) - case "requiredMajority": - return ec.fieldContext_ProposalDetail_requiredMajority(ctx, field) - case "requiredParticipation": - return ec.fieldContext_ProposalDetail_requiredParticipation(ctx, field) - case "requiredLpMajority": - return ec.fieldContext_ProposalDetail_requiredLpMajority(ctx, field) - case "requiredLpParticipation": - return ec.fieldContext_ProposalDetail_requiredLpParticipation(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ProposalDetail", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_delegations(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_delegations(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerRemovedBundle_epochSeq(ctx context.Context, field graphql.CollectedField, obj *v2.ERC20MultiSigSignerRemovedBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundle_epochSeq(ctx, field) if err != nil { return graphql.Null } @@ -28381,45 +30631,38 @@ func (ec *executionContext) _Entities_delegations(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Delegations, nil + return obj.EpochSeq, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.Delegation) + res := resTmp.(string) fc.Result = res - return ec.marshalODelegation2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDelegation(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_delegations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundle_epochSeq(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerRemovedBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "amount": - return ec.fieldContext_Delegation_amount(ctx, field) - case "party": - return ec.fieldContext_Delegation_party(ctx, field) - case "node": - return ec.fieldContext_Delegation_node(ctx, field) - case "epoch": - return ec.fieldContext_Delegation_epoch(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Delegation", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_nodes(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_nodes(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerRemovedBundleEdge_node(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerRemovedBundleEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundleEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -28432,55 +30675,52 @@ func (ec *executionContext) _Entities_nodes(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Nodes, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.NodeBasic) + res := resTmp.(*v2.ERC20MultiSigSignerRemovedBundle) fc.Result = res - return ec.marshalONodeBasic2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNodeBasic(ctx, field.Selections, res) + return ec.marshalNERC20MultiSigSignerRemovedBundle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐERC20MultiSigSignerRemovedBundle(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundleEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerRemovedBundleEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_NodeBasic_id(ctx, field) - case "pubkey": - return ec.fieldContext_NodeBasic_pubkey(ctx, field) - case "tmPubkey": - return ec.fieldContext_NodeBasic_tmPubkey(ctx, field) - case "ethereumAddress": - return ec.fieldContext_NodeBasic_ethereumAddress(ctx, field) - case "infoUrl": - return ec.fieldContext_NodeBasic_infoUrl(ctx, field) - case "location": - return ec.fieldContext_NodeBasic_location(ctx, field) - case "status": - return ec.fieldContext_NodeBasic_status(ctx, field) - case "name": - return ec.fieldContext_NodeBasic_name(ctx, field) - case "avatarUrl": - return ec.fieldContext_NodeBasic_avatarUrl(ctx, field) + case "oldSigner": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_oldSigner(ctx, field) + case "submitter": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_submitter(ctx, field) + case "nonce": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_nonce(ctx, field) + case "timestamp": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_timestamp(ctx, field) + case "signatures": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_signatures(ctx, field) + case "epochSeq": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_epochSeq(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type NodeBasic", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerRemovedBundle", field.Name) }, } return fc, nil } -func (ec *executionContext) _Entities_nodeSignatures(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_nodeSignatures(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerRemovedBundleEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerRemovedBundleEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedBundleEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -28493,43 +30733,38 @@ func (ec *executionContext) _Entities_nodeSignatures(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NodeSignatures, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v11.NodeSignature) + res := resTmp.(string) fc.Result = res - return ec.marshalONodeSignature2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋcommandsᚋv1ᚐNodeSignature(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_nodeSignatures(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedBundleEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerRemovedBundleEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_NodeSignature_id(ctx, field) - case "signature": - return ec.fieldContext_NodeSignature_signature(ctx, field) - case "kind": - return ec.fieldContext_NodeSignature_kind(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type NodeSignature", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_networkParameters(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_networkParameters(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerRemovedConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerRemovedConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -28542,7 +30777,7 @@ func (ec *executionContext) _Entities_networkParameters(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NetworkParameters, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -28551,32 +30786,32 @@ func (ec *executionContext) _Entities_networkParameters(ctx context.Context, fie if resTmp == nil { return graphql.Null } - res := resTmp.([]*vega.NetworkParameter) + res := resTmp.([]*ERC20MultiSigSignerRemovedBundleEdge) fc.Result = res - return ec.marshalONetworkParameter2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNetworkParameter(ctx, field.Selections, res) + return ec.marshalOERC20MultiSigSignerRemovedBundleEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐERC20MultiSigSignerRemovedBundleEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_networkParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerRemovedConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "key": - return ec.fieldContext_NetworkParameter_key(ctx, field) - case "value": - return ec.fieldContext_NetworkParameter_value(ctx, field) + case "node": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundleEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundleEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type NetworkParameter", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerRemovedBundleEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _Entities_keyRotations(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_keyRotations(ctx, field) +func (ec *executionContext) _ERC20MultiSigSignerRemovedConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ERC20MultiSigSignerRemovedConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20MultiSigSignerRemovedConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -28589,7 +30824,7 @@ func (ec *executionContext) _Entities_keyRotations(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.KeyRotations, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -28598,36 +30833,36 @@ func (ec *executionContext) _Entities_keyRotations(ctx context.Context, field gr if resTmp == nil { return graphql.Null } - res := resTmp.([]*v1.KeyRotation) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalOKeyRotation2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐKeyRotation(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_keyRotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20MultiSigSignerRemovedConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20MultiSigSignerRemovedConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "nodeId": - return ec.fieldContext_KeyRotation_nodeId(ctx, field) - case "oldPubKey": - return ec.fieldContext_KeyRotation_oldPubKey(ctx, field) - case "newPubKey": - return ec.fieldContext_KeyRotation_newPubKey(ctx, field) - case "blockHeight": - return ec.fieldContext_KeyRotation_blockHeight(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type KeyRotation", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Entities_ethereumKeyRotations(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_ethereumKeyRotations(ctx, field) +func (ec *executionContext) _ERC20SetAssetLimitsBundle_assetSource(ctx context.Context, field graphql.CollectedField, obj *ERC20SetAssetLimitsBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20SetAssetLimitsBundle_assetSource(ctx, field) if err != nil { return graphql.Null } @@ -28640,45 +30875,38 @@ func (ec *executionContext) _Entities_ethereumKeyRotations(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EthereumKeyRotations, nil + return obj.AssetSource, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v1.EthereumKeyRotation) + res := resTmp.(string) fc.Result = res - return ec.marshalOEthereumKeyRotation2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐEthereumKeyRotation(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_ethereumKeyRotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_assetSource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20SetAssetLimitsBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "nodeId": - return ec.fieldContext_EthereumKeyRotation_nodeId(ctx, field) - case "oldAddress": - return ec.fieldContext_EthereumKeyRotation_oldAddress(ctx, field) - case "newAddress": - return ec.fieldContext_EthereumKeyRotation_newAddress(ctx, field) - case "blockHeight": - return ec.fieldContext_EthereumKeyRotation_blockHeight(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type EthereumKeyRotation", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Entities_protocolUpgradeProposals(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Entities_protocolUpgradeProposals(ctx, field) +func (ec *executionContext) _ERC20SetAssetLimitsBundle_vegaAssetId(ctx context.Context, field graphql.CollectedField, obj *ERC20SetAssetLimitsBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20SetAssetLimitsBundle_vegaAssetId(ctx, field) if err != nil { return graphql.Null } @@ -28691,45 +30919,38 @@ func (ec *executionContext) _Entities_protocolUpgradeProposals(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ProtocolUpgradeProposals, nil + return obj.VegaAssetID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v1.ProtocolUpgradeEvent) + res := resTmp.(string) fc.Result = res - return ec.marshalOProtocolUpgradeProposal2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐProtocolUpgradeEvent(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Entities_protocolUpgradeProposals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_vegaAssetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Entities", + Object: "ERC20SetAssetLimitsBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "upgradeBlockHeight": - return ec.fieldContext_ProtocolUpgradeProposal_upgradeBlockHeight(ctx, field) - case "vegaReleaseTag": - return ec.fieldContext_ProtocolUpgradeProposal_vegaReleaseTag(ctx, field) - case "approvers": - return ec.fieldContext_ProtocolUpgradeProposal_approvers(ctx, field) - case "status": - return ec.fieldContext_ProtocolUpgradeProposal_status(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ProtocolUpgradeProposal", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Epoch_id(ctx context.Context, field graphql.CollectedField, obj *vega.Epoch) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Epoch_id(ctx, field) +func (ec *executionContext) _ERC20SetAssetLimitsBundle_nonce(ctx context.Context, field graphql.CollectedField, obj *ERC20SetAssetLimitsBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20SetAssetLimitsBundle_nonce(ctx, field) if err != nil { return graphql.Null } @@ -28742,7 +30963,7 @@ func (ec *executionContext) _Epoch_id(ctx context.Context, field graphql.Collect }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Epoch().ID(rctx, obj) + return obj.Nonce, nil }) if err != nil { ec.Error(ctx, err) @@ -28756,24 +30977,24 @@ func (ec *executionContext) _Epoch_id(ctx context.Context, field graphql.Collect } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Epoch_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_nonce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Epoch", + Object: "ERC20SetAssetLimitsBundle", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Epoch_timestamps(ctx context.Context, field graphql.CollectedField, obj *vega.Epoch) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Epoch_timestamps(ctx, field) +func (ec *executionContext) _ERC20SetAssetLimitsBundle_lifetimeLimit(ctx context.Context, field graphql.CollectedField, obj *ERC20SetAssetLimitsBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20SetAssetLimitsBundle_lifetimeLimit(ctx, field) if err != nil { return graphql.Null } @@ -28786,7 +31007,7 @@ func (ec *executionContext) _Epoch_timestamps(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Timestamps, nil + return obj.LifetimeLimit, nil }) if err != nil { ec.Error(ctx, err) @@ -28798,38 +31019,26 @@ func (ec *executionContext) _Epoch_timestamps(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(*vega.EpochTimestamps) + res := resTmp.(string) fc.Result = res - return ec.marshalNEpochTimestamps2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpochTimestamps(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Epoch_timestamps(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_lifetimeLimit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Epoch", + Object: "ERC20SetAssetLimitsBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "start": - return ec.fieldContext_EpochTimestamps_start(ctx, field) - case "expiry": - return ec.fieldContext_EpochTimestamps_expiry(ctx, field) - case "end": - return ec.fieldContext_EpochTimestamps_end(ctx, field) - case "firstBlock": - return ec.fieldContext_EpochTimestamps_firstBlock(ctx, field) - case "lastBlock": - return ec.fieldContext_EpochTimestamps_lastBlock(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type EpochTimestamps", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Epoch_validatorsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Epoch) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Epoch_validatorsConnection(ctx, field) +func (ec *executionContext) _ERC20SetAssetLimitsBundle_threshold(ctx context.Context, field graphql.CollectedField, obj *ERC20SetAssetLimitsBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20SetAssetLimitsBundle_threshold(ctx, field) if err != nil { return graphql.Null } @@ -28842,52 +31051,38 @@ func (ec *executionContext) _Epoch_validatorsConnection(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Epoch().ValidatorsConnection(rctx, obj, fc.Args["pagination"].(*v2.Pagination)) + return obj.Threshold, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.NodesConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalONodesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNodesConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Epoch_validatorsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_threshold(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Epoch", + Object: "ERC20SetAssetLimitsBundle", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_NodesConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_NodesConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type NodesConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Epoch_validatorsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Epoch_delegationsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Epoch) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Epoch_delegationsConnection(ctx, field) +func (ec *executionContext) _ERC20SetAssetLimitsBundle_signatures(ctx context.Context, field graphql.CollectedField, obj *ERC20SetAssetLimitsBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ERC20SetAssetLimitsBundle_signatures(ctx, field) if err != nil { return graphql.Null } @@ -28900,52 +31095,38 @@ func (ec *executionContext) _Epoch_delegationsConnection(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Epoch().DelegationsConnection(rctx, obj, fc.Args["partyId"].(*string), fc.Args["nodeId"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return obj.Signatures, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - return graphql.Null + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null } - res := resTmp.(*v2.DelegationsConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalODelegationsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDelegationsConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Epoch_delegationsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ERC20SetAssetLimitsBundle_signatures(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Epoch", + Object: "ERC20SetAssetLimitsBundle", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_DelegationsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_DelegationsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DelegationsConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Epoch_delegationsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _EpochData_total(ctx context.Context, field graphql.CollectedField, obj *vega.EpochData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochData_total(ctx, field) +func (ec *executionContext) _ETHAddress_address(ctx context.Context, field graphql.CollectedField, obj *ETHAddress) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ETHAddress_address(ctx, field) if err != nil { return graphql.Null } @@ -28958,38 +31139,35 @@ func (ec *executionContext) _EpochData_total(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Total, nil + return obj.Address, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int32) + res := resTmp.(*string) fc.Result = res - return ec.marshalNInt2int32(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochData_total(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ETHAddress_address(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochData", + Object: "ETHAddress", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EpochData_offline(ctx context.Context, field graphql.CollectedField, obj *vega.EpochData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochData_offline(ctx, field) +func (ec *executionContext) _Entities_accounts(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_accounts(ctx, field) if err != nil { return graphql.Null } @@ -29002,38 +31180,47 @@ func (ec *executionContext) _EpochData_offline(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Offline, nil + return obj.Accounts, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int32) + res := resTmp.([]*vega.Account) fc.Result = res - return ec.marshalNInt2int32(ctx, field.Selections, res) + return ec.marshalOAccountEvent2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccount(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochData_offline(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_accounts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochData", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "balance": + return ec.fieldContext_AccountEvent_balance(ctx, field) + case "asset": + return ec.fieldContext_AccountEvent_asset(ctx, field) + case "type": + return ec.fieldContext_AccountEvent_type(ctx, field) + case "market": + return ec.fieldContext_AccountEvent_market(ctx, field) + case "party": + return ec.fieldContext_AccountEvent_party(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AccountEvent", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochData_online(ctx context.Context, field graphql.CollectedField, obj *vega.EpochData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochData_online(ctx, field) +func (ec *executionContext) _Entities_orders(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_orders(ctx, field) if err != nil { return graphql.Null } @@ -29046,38 +31233,81 @@ func (ec *executionContext) _EpochData_online(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Online, nil + return obj.Orders, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int32) + res := resTmp.([]*vega.Order) fc.Result = res - return ec.marshalNInt2int32(ctx, field.Selections, res) + return ec.marshalOOrder2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochData_online(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_orders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochData", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Order_id(ctx, field) + case "price": + return ec.fieldContext_Order_price(ctx, field) + case "timeInForce": + return ec.fieldContext_Order_timeInForce(ctx, field) + case "side": + return ec.fieldContext_Order_side(ctx, field) + case "market": + return ec.fieldContext_Order_market(ctx, field) + case "size": + return ec.fieldContext_Order_size(ctx, field) + case "remaining": + return ec.fieldContext_Order_remaining(ctx, field) + case "party": + return ec.fieldContext_Order_party(ctx, field) + case "createdAt": + return ec.fieldContext_Order_createdAt(ctx, field) + case "expiresAt": + return ec.fieldContext_Order_expiresAt(ctx, field) + case "status": + return ec.fieldContext_Order_status(ctx, field) + case "reference": + return ec.fieldContext_Order_reference(ctx, field) + case "tradesConnection": + return ec.fieldContext_Order_tradesConnection(ctx, field) + case "type": + return ec.fieldContext_Order_type(ctx, field) + case "rejectionReason": + return ec.fieldContext_Order_rejectionReason(ctx, field) + case "version": + return ec.fieldContext_Order_version(ctx, field) + case "updatedAt": + return ec.fieldContext_Order_updatedAt(ctx, field) + case "peggedOrder": + return ec.fieldContext_Order_peggedOrder(ctx, field) + case "liquidityProvision": + return ec.fieldContext_Order_liquidityProvision(ctx, field) + case "postOnly": + return ec.fieldContext_Order_postOnly(ctx, field) + case "reduceOnly": + return ec.fieldContext_Order_reduceOnly(ctx, field) + case "icebergOrder": + return ec.fieldContext_Order_icebergOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Order", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochParticipation_epoch(ctx context.Context, field graphql.CollectedField, obj *EpochParticipation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochParticipation_epoch(ctx, field) +func (ec *executionContext) _Entities_positions(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_positions(ctx, field) if err != nil { return graphql.Null } @@ -29090,7 +31320,7 @@ func (ec *executionContext) _EpochParticipation_epoch(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Epoch, nil + return obj.Positions, nil }) if err != nil { ec.Error(ctx, err) @@ -29099,36 +31329,48 @@ func (ec *executionContext) _EpochParticipation_epoch(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(*vega.Epoch) + res := resTmp.([]*vega.Position) fc.Result = res - return ec.marshalOEpoch2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpoch(ctx, field.Selections, res) + return ec.marshalOPosition2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPosition(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochParticipation_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_positions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochParticipation", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Epoch_id(ctx, field) - case "timestamps": - return ec.fieldContext_Epoch_timestamps(ctx, field) - case "validatorsConnection": - return ec.fieldContext_Epoch_validatorsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Epoch_delegationsConnection(ctx, field) + case "market": + return ec.fieldContext_Position_market(ctx, field) + case "party": + return ec.fieldContext_Position_party(ctx, field) + case "openVolume": + return ec.fieldContext_Position_openVolume(ctx, field) + case "realisedPNL": + return ec.fieldContext_Position_realisedPNL(ctx, field) + case "unrealisedPNL": + return ec.fieldContext_Position_unrealisedPNL(ctx, field) + case "averageEntryPrice": + return ec.fieldContext_Position_averageEntryPrice(ctx, field) + case "lossSocializationAmount": + return ec.fieldContext_Position_lossSocializationAmount(ctx, field) + case "positionStatus": + return ec.fieldContext_Position_positionStatus(ctx, field) + case "marginsConnection": + return ec.fieldContext_Position_marginsConnection(ctx, field) + case "updatedAt": + return ec.fieldContext_Position_updatedAt(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Epoch", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Position", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochParticipation_offline(ctx context.Context, field graphql.CollectedField, obj *EpochParticipation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochParticipation_offline(ctx, field) +func (ec *executionContext) _Entities_ledgerEntries(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_ledgerEntries(ctx, field) if err != nil { return graphql.Null } @@ -29141,7 +31383,7 @@ func (ec *executionContext) _EpochParticipation_offline(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Offline, nil + return obj.LedgerEntries, nil }) if err != nil { ec.Error(ctx, err) @@ -29150,26 +31392,42 @@ func (ec *executionContext) _EpochParticipation_offline(ctx context.Context, fie if resTmp == nil { return graphql.Null } - res := resTmp.(*int64) + res := resTmp.([]*vega.LedgerEntry) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalOLedgerEntry2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLedgerEntry(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochParticipation_offline(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_ledgerEntries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochParticipation", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "fromAccountId": + return ec.fieldContext_LedgerEntry_fromAccountId(ctx, field) + case "toAccountId": + return ec.fieldContext_LedgerEntry_toAccountId(ctx, field) + case "amount": + return ec.fieldContext_LedgerEntry_amount(ctx, field) + case "type": + return ec.fieldContext_LedgerEntry_type(ctx, field) + case "timestamp": + return ec.fieldContext_LedgerEntry_timestamp(ctx, field) + case "fromAccountBalance": + return ec.fieldContext_LedgerEntry_fromAccountBalance(ctx, field) + case "toAccountBalance": + return ec.fieldContext_LedgerEntry_toAccountBalance(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LedgerEntry", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochParticipation_online(ctx context.Context, field graphql.CollectedField, obj *EpochParticipation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochParticipation_online(ctx, field) +func (ec *executionContext) _Entities_balanceChanges(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_balanceChanges(ctx, field) if err != nil { return graphql.Null } @@ -29182,7 +31440,7 @@ func (ec *executionContext) _EpochParticipation_online(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Online, nil + return obj.BalanceChanges, nil }) if err != nil { ec.Error(ctx, err) @@ -29191,26 +31449,38 @@ func (ec *executionContext) _EpochParticipation_online(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(*int64) + res := resTmp.([]*v2.AccountBalance) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalOAccountBalance2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAccountBalance(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochParticipation_online(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_balanceChanges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochParticipation", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "balance": + return ec.fieldContext_AccountBalance_balance(ctx, field) + case "asset": + return ec.fieldContext_AccountBalance_asset(ctx, field) + case "type": + return ec.fieldContext_AccountBalance_type(ctx, field) + case "market": + return ec.fieldContext_AccountBalance_market(ctx, field) + case "party": + return ec.fieldContext_AccountBalance_party(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AccountBalance", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochParticipation_totalRewards(ctx context.Context, field graphql.CollectedField, obj *EpochParticipation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochParticipation_totalRewards(ctx, field) +func (ec *executionContext) _Entities_transfers(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_transfers(ctx, field) if err != nil { return graphql.Null } @@ -29223,7 +31493,7 @@ func (ec *executionContext) _EpochParticipation_totalRewards(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalRewards, nil + return obj.Transfers, nil }) if err != nil { ec.Error(ctx, err) @@ -29232,26 +31502,54 @@ func (ec *executionContext) _EpochParticipation_totalRewards(ctx context.Context if resTmp == nil { return graphql.Null } - res := resTmp.(*float64) + res := resTmp.([]*v1.Transfer) fc.Result = res - return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res) + return ec.marshalOTransfer2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐTransfer(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochParticipation_totalRewards(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_transfers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochParticipation", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Transfer_id(ctx, field) + case "from": + return ec.fieldContext_Transfer_from(ctx, field) + case "fromAccountType": + return ec.fieldContext_Transfer_fromAccountType(ctx, field) + case "to": + return ec.fieldContext_Transfer_to(ctx, field) + case "toAccountType": + return ec.fieldContext_Transfer_toAccountType(ctx, field) + case "asset": + return ec.fieldContext_Transfer_asset(ctx, field) + case "amount": + return ec.fieldContext_Transfer_amount(ctx, field) + case "reference": + return ec.fieldContext_Transfer_reference(ctx, field) + case "status": + return ec.fieldContext_Transfer_status(ctx, field) + case "timestamp": + return ec.fieldContext_Transfer_timestamp(ctx, field) + case "kind": + return ec.fieldContext_Transfer_kind(ctx, field) + case "reason": + return ec.fieldContext_Transfer_reason(ctx, field) + case "gameId": + return ec.fieldContext_Transfer_gameId(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Transfer", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochRewardSummary_epoch(ctx context.Context, field graphql.CollectedField, obj *vega.EpochRewardSummary) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochRewardSummary_epoch(ctx, field) +func (ec *executionContext) _Entities_votes(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_votes(ctx, field) if err != nil { return graphql.Null } @@ -29264,38 +31562,51 @@ func (ec *executionContext) _EpochRewardSummary_epoch(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EpochRewardSummary().Epoch(rctx, obj) + return obj.Votes, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.([]*vega.Vote) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOVote2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐVote(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochRewardSummary_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_votes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochRewardSummary", + Object: "Entities", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "value": + return ec.fieldContext_Vote_value(ctx, field) + case "party": + return ec.fieldContext_Vote_party(ctx, field) + case "datetime": + return ec.fieldContext_Vote_datetime(ctx, field) + case "proposalId": + return ec.fieldContext_Vote_proposalId(ctx, field) + case "governanceTokenBalance": + return ec.fieldContext_Vote_governanceTokenBalance(ctx, field) + case "governanceTokenWeight": + return ec.fieldContext_Vote_governanceTokenWeight(ctx, field) + case "equityLikeShareWeight": + return ec.fieldContext_Vote_equityLikeShareWeight(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Vote", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochRewardSummary_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.EpochRewardSummary) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochRewardSummary_marketId(ctx, field) +func (ec *executionContext) _Entities_erc20MultiSigSignerAddedBundles(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_erc20MultiSigSignerAddedBundles(ctx, field) if err != nil { return graphql.Null } @@ -29308,7 +31619,7 @@ func (ec *executionContext) _EpochRewardSummary_marketId(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return obj.Erc20MultiSigSignerAddedBundles, nil }) if err != nil { ec.Error(ctx, err) @@ -29317,26 +31628,40 @@ func (ec *executionContext) _EpochRewardSummary_marketId(ctx context.Context, fi if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.ERC20MultiSigSignerAddedBundle) fc.Result = res - return ec.marshalOID2string(ctx, field.Selections, res) + return ec.marshalOERC20MultiSigSignerAddedBundle2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐERC20MultiSigSignerAddedBundle(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochRewardSummary_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_erc20MultiSigSignerAddedBundles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochRewardSummary", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "newSigner": + return ec.fieldContext_ERC20MultiSigSignerAddedBundle_newSigner(ctx, field) + case "submitter": + return ec.fieldContext_ERC20MultiSigSignerAddedBundle_submitter(ctx, field) + case "nonce": + return ec.fieldContext_ERC20MultiSigSignerAddedBundle_nonce(ctx, field) + case "timestamp": + return ec.fieldContext_ERC20MultiSigSignerAddedBundle_timestamp(ctx, field) + case "signatures": + return ec.fieldContext_ERC20MultiSigSignerAddedBundle_signatures(ctx, field) + case "epochSeq": + return ec.fieldContext_ERC20MultiSigSignerAddedBundle_epochSeq(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerAddedBundle", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochRewardSummary_assetId(ctx context.Context, field graphql.CollectedField, obj *vega.EpochRewardSummary) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochRewardSummary_assetId(ctx, field) +func (ec *executionContext) _Entities_erc20MultiSigSignerRemovedBundles(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_erc20MultiSigSignerRemovedBundles(ctx, field) if err != nil { return graphql.Null } @@ -29349,38 +31674,49 @@ func (ec *executionContext) _EpochRewardSummary_assetId(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AssetId, nil + return obj.Erc20MultiSigSignerRemovedBundles, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.ERC20MultiSigSignerRemovedBundle) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOERC20MultiSigSignerRemovedBundle2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐERC20MultiSigSignerRemovedBundle(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochRewardSummary_assetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_erc20MultiSigSignerRemovedBundles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochRewardSummary", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "oldSigner": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_oldSigner(ctx, field) + case "submitter": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_submitter(ctx, field) + case "nonce": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_nonce(ctx, field) + case "timestamp": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_timestamp(ctx, field) + case "signatures": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_signatures(ctx, field) + case "epochSeq": + return ec.fieldContext_ERC20MultiSigSignerRemovedBundle_epochSeq(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerRemovedBundle", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochRewardSummary_rewardType(ctx context.Context, field graphql.CollectedField, obj *vega.EpochRewardSummary) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochRewardSummary_rewardType(ctx, field) +func (ec *executionContext) _Entities_trades(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_trades(ctx, field) if err != nil { return graphql.Null } @@ -29393,38 +31729,67 @@ func (ec *executionContext) _EpochRewardSummary_rewardType(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EpochRewardSummary().RewardType(rctx, obj) + return obj.Trades, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(vega.AccountType) + res := resTmp.([]*vega.Trade) fc.Result = res - return ec.marshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, field.Selections, res) + return ec.marshalOTrade2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTrade(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochRewardSummary_rewardType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_trades(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochRewardSummary", + Object: "Entities", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type AccountType does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Trade_id(ctx, field) + case "market": + return ec.fieldContext_Trade_market(ctx, field) + case "buyOrder": + return ec.fieldContext_Trade_buyOrder(ctx, field) + case "sellOrder": + return ec.fieldContext_Trade_sellOrder(ctx, field) + case "buyer": + return ec.fieldContext_Trade_buyer(ctx, field) + case "seller": + return ec.fieldContext_Trade_seller(ctx, field) + case "aggressor": + return ec.fieldContext_Trade_aggressor(ctx, field) + case "price": + return ec.fieldContext_Trade_price(ctx, field) + case "size": + return ec.fieldContext_Trade_size(ctx, field) + case "createdAt": + return ec.fieldContext_Trade_createdAt(ctx, field) + case "type": + return ec.fieldContext_Trade_type(ctx, field) + case "buyerFee": + return ec.fieldContext_Trade_buyerFee(ctx, field) + case "sellerFee": + return ec.fieldContext_Trade_sellerFee(ctx, field) + case "buyerAuctionBatch": + return ec.fieldContext_Trade_buyerAuctionBatch(ctx, field) + case "sellerAuctionBatch": + return ec.fieldContext_Trade_sellerAuctionBatch(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Trade", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochRewardSummary_amount(ctx context.Context, field graphql.CollectedField, obj *vega.EpochRewardSummary) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochRewardSummary_amount(ctx, field) +func (ec *executionContext) _Entities_oracleSpecs(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_oracleSpecs(ctx, field) if err != nil { return graphql.Null } @@ -29437,38 +31802,41 @@ func (ec *executionContext) _EpochRewardSummary_amount(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Amount, nil + return obj.OracleSpecs, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.OracleSpec) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOOracleSpec2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOracleSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochRewardSummary_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_oracleSpecs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochRewardSummary", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "dataSourceSpec": + return ec.fieldContext_OracleSpec_dataSourceSpec(ctx, field) + case "dataConnection": + return ec.fieldContext_OracleSpec_dataConnection(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OracleSpec", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochRewardSummaryConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.EpochRewardSummaryConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochRewardSummaryConnection_edges(ctx, field) +func (ec *executionContext) _Entities_oracleData(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_oracleData(ctx, field) if err != nil { return graphql.Null } @@ -29481,7 +31849,7 @@ func (ec *executionContext) _EpochRewardSummaryConnection_edges(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.OracleData, nil }) if err != nil { ec.Error(ctx, err) @@ -29490,32 +31858,30 @@ func (ec *executionContext) _EpochRewardSummaryConnection_edges(ctx context.Cont if resTmp == nil { return graphql.Null } - res := resTmp.([]*v2.EpochRewardSummaryEdge) + res := resTmp.([]*vega.OracleData) fc.Result = res - return ec.marshalOEpochRewardSummaryEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEpochRewardSummaryEdge(ctx, field.Selections, res) + return ec.marshalOOracleData2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOracleData(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochRewardSummaryConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_oracleData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochRewardSummaryConnection", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_EpochRewardSummaryEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_EpochRewardSummaryEdge_cursor(ctx, field) + case "externalData": + return ec.fieldContext_OracleData_externalData(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type EpochRewardSummaryEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type OracleData", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochRewardSummaryConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.EpochRewardSummaryConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochRewardSummaryConnection_pageInfo(ctx, field) +func (ec *executionContext) _Entities_markets(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_markets(ctx, field) if err != nil { return graphql.Null } @@ -29528,7 +31894,7 @@ func (ec *executionContext) _EpochRewardSummaryConnection_pageInfo(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Markets, nil }) if err != nil { ec.Error(ctx, err) @@ -29537,36 +31903,88 @@ func (ec *executionContext) _EpochRewardSummaryConnection_pageInfo(ctx context.C if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.([]*vega.Market) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalOMarket2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochRewardSummaryConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_markets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochRewardSummaryConnection", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "id": + return ec.fieldContext_Market_id(ctx, field) + case "fees": + return ec.fieldContext_Market_fees(ctx, field) + case "tradableInstrument": + return ec.fieldContext_Market_tradableInstrument(ctx, field) + case "decimalPlaces": + return ec.fieldContext_Market_decimalPlaces(ctx, field) + case "positionDecimalPlaces": + return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) + case "openingAuction": + return ec.fieldContext_Market_openingAuction(ctx, field) + case "priceMonitoringSettings": + return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) + case "liquidityMonitoringParameters": + return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) + case "tradingMode": + return ec.fieldContext_Market_tradingMode(ctx, field) + case "state": + return ec.fieldContext_Market_state(ctx, field) + case "proposal": + return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) + case "ordersConnection": + return ec.fieldContext_Market_ordersConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Market_accountsConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Market_tradesConnection(ctx, field) + case "depth": + return ec.fieldContext_Market_depth(ctx, field) + case "candlesConnection": + return ec.fieldContext_Market_candlesConnection(ctx, field) + case "data": + return ec.fieldContext_Market_data(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Market_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) + case "marketTimestamps": + return ec.fieldContext_Market_marketTimestamps(ctx, field) + case "riskFactors": + return ec.fieldContext_Market_riskFactors(ctx, field) + case "linearSlippageFactor": + return ec.fieldContext_Market_linearSlippageFactor(ctx, field) + case "quadraticSlippageFactor": + return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) + case "parentMarketID": + return ec.fieldContext_Market_parentMarketID(ctx, field) + case "insurancePoolFraction": + return ec.fieldContext_Market_insurancePoolFraction(ctx, field) + case "successorMarketID": + return ec.fieldContext_Market_successorMarketID(ctx, field) + case "liquiditySLAParameters": + return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochRewardSummaryEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.EpochRewardSummaryEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochRewardSummaryEdge_node(ctx, field) +func (ec *executionContext) _Entities_parties(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_parties(ctx, field) if err != nil { return graphql.Null } @@ -29579,50 +31997,77 @@ func (ec *executionContext) _EpochRewardSummaryEdge_node(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.Parties, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.EpochRewardSummary) + res := resTmp.([]*vega.Party) fc.Result = res - return ec.marshalNEpochRewardSummary2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpochRewardSummary(ctx, field.Selections, res) + return ec.marshalOParty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochRewardSummaryEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_parties(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochRewardSummaryEdge", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "epoch": - return ec.fieldContext_EpochRewardSummary_epoch(ctx, field) - case "marketId": - return ec.fieldContext_EpochRewardSummary_marketId(ctx, field) - case "assetId": - return ec.fieldContext_EpochRewardSummary_assetId(ctx, field) - case "rewardType": - return ec.fieldContext_EpochRewardSummary_rewardType(ctx, field) - case "amount": - return ec.fieldContext_EpochRewardSummary_amount(ctx, field) + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type EpochRewardSummary", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochRewardSummaryEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.EpochRewardSummaryEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochRewardSummaryEdge_cursor(ctx, field) +func (ec *executionContext) _Entities_marginLevels(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_marginLevels(ctx, field) if err != nil { return graphql.Null } @@ -29635,38 +32080,59 @@ func (ec *executionContext) _EpochRewardSummaryEdge_cursor(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.MarginLevels, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.MarginLevels) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOMarginLevels2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginLevels(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochRewardSummaryEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_marginLevels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochRewardSummaryEdge", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "market": + return ec.fieldContext_MarginLevels_market(ctx, field) + case "asset": + return ec.fieldContext_MarginLevels_asset(ctx, field) + case "party": + return ec.fieldContext_MarginLevels_party(ctx, field) + case "maintenanceLevel": + return ec.fieldContext_MarginLevels_maintenanceLevel(ctx, field) + case "searchLevel": + return ec.fieldContext_MarginLevels_searchLevel(ctx, field) + case "initialLevel": + return ec.fieldContext_MarginLevels_initialLevel(ctx, field) + case "orderMarginLevel": + return ec.fieldContext_MarginLevels_orderMarginLevel(ctx, field) + case "collateralReleaseLevel": + return ec.fieldContext_MarginLevels_collateralReleaseLevel(ctx, field) + case "timestamp": + return ec.fieldContext_MarginLevels_timestamp(ctx, field) + case "marginMode": + return ec.fieldContext_MarginLevels_marginMode(ctx, field) + case "marginFactor": + return ec.fieldContext_MarginLevels_marginFactor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type MarginLevels", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochTimestamps_start(ctx context.Context, field graphql.CollectedField, obj *vega.EpochTimestamps) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochTimestamps_start(ctx, field) +func (ec *executionContext) _Entities_rewards(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_rewards(ctx, field) if err != nil { return graphql.Null } @@ -29679,7 +32145,7 @@ func (ec *executionContext) _EpochTimestamps_start(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EpochTimestamps().Start(rctx, obj) + return obj.Rewards, nil }) if err != nil { ec.Error(ctx, err) @@ -29688,26 +32154,52 @@ func (ec *executionContext) _EpochTimestamps_start(ctx context.Context, field gr if resTmp == nil { return graphql.Null } - res := resTmp.(*int64) + res := resTmp.([]*vega.Reward) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalOReward2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐReward(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochTimestamps_start(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_rewards(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochTimestamps", + Object: "Entities", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "asset": + return ec.fieldContext_Reward_asset(ctx, field) + case "marketId": + return ec.fieldContext_Reward_marketId(ctx, field) + case "rewardType": + return ec.fieldContext_Reward_rewardType(ctx, field) + case "party": + return ec.fieldContext_Reward_party(ctx, field) + case "epoch": + return ec.fieldContext_Reward_epoch(ctx, field) + case "amount": + return ec.fieldContext_Reward_amount(ctx, field) + case "quantumAmount": + return ec.fieldContext_Reward_quantumAmount(ctx, field) + case "percentageOfTotal": + return ec.fieldContext_Reward_percentageOfTotal(ctx, field) + case "receivedAt": + return ec.fieldContext_Reward_receivedAt(ctx, field) + case "lockedUntilEpoch": + return ec.fieldContext_Reward_lockedUntilEpoch(ctx, field) + case "gameId": + return ec.fieldContext_Reward_gameId(ctx, field) + case "teamId": + return ec.fieldContext_Reward_teamId(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Reward", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochTimestamps_expiry(ctx context.Context, field graphql.CollectedField, obj *vega.EpochTimestamps) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochTimestamps_expiry(ctx, field) +func (ec *executionContext) _Entities_deposits(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_deposits(ctx, field) if err != nil { return graphql.Null } @@ -29720,7 +32212,7 @@ func (ec *executionContext) _EpochTimestamps_expiry(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EpochTimestamps().Expiry(rctx, obj) + return obj.Deposits, nil }) if err != nil { ec.Error(ctx, err) @@ -29729,26 +32221,44 @@ func (ec *executionContext) _EpochTimestamps_expiry(ctx context.Context, field g if resTmp == nil { return graphql.Null } - res := resTmp.(*int64) + res := resTmp.([]*vega.Deposit) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalODeposit2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDeposit(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochTimestamps_expiry(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_deposits(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochTimestamps", + Object: "Entities", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Deposit_id(ctx, field) + case "party": + return ec.fieldContext_Deposit_party(ctx, field) + case "amount": + return ec.fieldContext_Deposit_amount(ctx, field) + case "asset": + return ec.fieldContext_Deposit_asset(ctx, field) + case "status": + return ec.fieldContext_Deposit_status(ctx, field) + case "createdTimestamp": + return ec.fieldContext_Deposit_createdTimestamp(ctx, field) + case "creditedTimestamp": + return ec.fieldContext_Deposit_creditedTimestamp(ctx, field) + case "txHash": + return ec.fieldContext_Deposit_txHash(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Deposit", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochTimestamps_end(ctx context.Context, field graphql.CollectedField, obj *vega.EpochTimestamps) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochTimestamps_end(ctx, field) +func (ec *executionContext) _Entities_withdrawals(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_withdrawals(ctx, field) if err != nil { return graphql.Null } @@ -29761,7 +32271,7 @@ func (ec *executionContext) _EpochTimestamps_end(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EpochTimestamps().End(rctx, obj) + return obj.Withdrawals, nil }) if err != nil { ec.Error(ctx, err) @@ -29770,26 +32280,48 @@ func (ec *executionContext) _EpochTimestamps_end(ctx context.Context, field grap if resTmp == nil { return graphql.Null } - res := resTmp.(*int64) + res := resTmp.([]*vega.Withdrawal) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalOWithdrawal2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐWithdrawal(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochTimestamps_end(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_withdrawals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochTimestamps", + Object: "Entities", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Withdrawal_id(ctx, field) + case "party": + return ec.fieldContext_Withdrawal_party(ctx, field) + case "amount": + return ec.fieldContext_Withdrawal_amount(ctx, field) + case "asset": + return ec.fieldContext_Withdrawal_asset(ctx, field) + case "status": + return ec.fieldContext_Withdrawal_status(ctx, field) + case "ref": + return ec.fieldContext_Withdrawal_ref(ctx, field) + case "createdTimestamp": + return ec.fieldContext_Withdrawal_createdTimestamp(ctx, field) + case "withdrawnTimestamp": + return ec.fieldContext_Withdrawal_withdrawnTimestamp(ctx, field) + case "txHash": + return ec.fieldContext_Withdrawal_txHash(ctx, field) + case "details": + return ec.fieldContext_Withdrawal_details(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Withdrawal", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochTimestamps_firstBlock(ctx context.Context, field graphql.CollectedField, obj *vega.EpochTimestamps) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochTimestamps_firstBlock(ctx, field) +func (ec *executionContext) _Entities_assets(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_assets(ctx, field) if err != nil { return graphql.Null } @@ -29802,38 +32334,67 @@ func (ec *executionContext) _EpochTimestamps_firstBlock(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EpochTimestamps().FirstBlock(rctx, obj) + return obj.Assets, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.Asset) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOAsset2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochTimestamps_firstBlock(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_assets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochTimestamps", + Object: "Entities", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) }, } return fc, nil } -func (ec *executionContext) _EpochTimestamps_lastBlock(ctx context.Context, field graphql.CollectedField, obj *vega.EpochTimestamps) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EpochTimestamps_lastBlock(ctx, field) +func (ec *executionContext) _Entities_liquidityProvisions(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_liquidityProvisions(ctx, field) if err != nil { return graphql.Null } @@ -29846,7 +32407,7 @@ func (ec *executionContext) _EpochTimestamps_lastBlock(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EpochTimestamps().LastBlock(rctx, obj) + return obj.LiquidityProvisions, nil }) if err != nil { ec.Error(ctx, err) @@ -29855,26 +32416,52 @@ func (ec *executionContext) _EpochTimestamps_lastBlock(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.([]*vega.LiquidityProvision) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOLiquidityProvision2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EpochTimestamps_lastBlock(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_liquidityProvisions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EpochTimestamps", + Object: "Entities", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_LiquidityProvision_id(ctx, field) + case "party": + return ec.fieldContext_LiquidityProvision_party(ctx, field) + case "createdAt": + return ec.fieldContext_LiquidityProvision_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_LiquidityProvision_updatedAt(ctx, field) + case "market": + return ec.fieldContext_LiquidityProvision_market(ctx, field) + case "commitmentAmount": + return ec.fieldContext_LiquidityProvision_commitmentAmount(ctx, field) + case "fee": + return ec.fieldContext_LiquidityProvision_fee(ctx, field) + case "sells": + return ec.fieldContext_LiquidityProvision_sells(ctx, field) + case "buys": + return ec.fieldContext_LiquidityProvision_buys(ctx, field) + case "version": + return ec.fieldContext_LiquidityProvision_version(ctx, field) + case "status": + return ec.fieldContext_LiquidityProvision_status(ctx, field) + case "reference": + return ec.fieldContext_LiquidityProvision_reference(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvision", field.Name) }, } return fc, nil } -func (ec *executionContext) _Erc20ListAssetBundle_assetSource(ctx context.Context, field graphql.CollectedField, obj *Erc20ListAssetBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Erc20ListAssetBundle_assetSource(ctx, field) +func (ec *executionContext) _Entities_proposals(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_proposals(ctx, field) if err != nil { return graphql.Null } @@ -29887,38 +32474,67 @@ func (ec *executionContext) _Erc20ListAssetBundle_assetSource(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AssetSource, nil + return obj.Proposals, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.Proposal) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOProposalDetail2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposal(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Erc20ListAssetBundle_assetSource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_proposals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Erc20ListAssetBundle", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_ProposalDetail_id(ctx, field) + case "batchId": + return ec.fieldContext_ProposalDetail_batchId(ctx, field) + case "reference": + return ec.fieldContext_ProposalDetail_reference(ctx, field) + case "party": + return ec.fieldContext_ProposalDetail_party(ctx, field) + case "state": + return ec.fieldContext_ProposalDetail_state(ctx, field) + case "datetime": + return ec.fieldContext_ProposalDetail_datetime(ctx, field) + case "terms": + return ec.fieldContext_ProposalDetail_terms(ctx, field) + case "batchTerms": + return ec.fieldContext_ProposalDetail_batchTerms(ctx, field) + case "rationale": + return ec.fieldContext_ProposalDetail_rationale(ctx, field) + case "rejectionReason": + return ec.fieldContext_ProposalDetail_rejectionReason(ctx, field) + case "errorDetails": + return ec.fieldContext_ProposalDetail_errorDetails(ctx, field) + case "requiredMajority": + return ec.fieldContext_ProposalDetail_requiredMajority(ctx, field) + case "requiredParticipation": + return ec.fieldContext_ProposalDetail_requiredParticipation(ctx, field) + case "requiredLpMajority": + return ec.fieldContext_ProposalDetail_requiredLpMajority(ctx, field) + case "requiredLpParticipation": + return ec.fieldContext_ProposalDetail_requiredLpParticipation(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProposalDetail", field.Name) }, } return fc, nil } -func (ec *executionContext) _Erc20ListAssetBundle_vegaAssetId(ctx context.Context, field graphql.CollectedField, obj *Erc20ListAssetBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Erc20ListAssetBundle_vegaAssetId(ctx, field) +func (ec *executionContext) _Entities_delegations(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_delegations(ctx, field) if err != nil { return graphql.Null } @@ -29931,38 +32547,45 @@ func (ec *executionContext) _Erc20ListAssetBundle_vegaAssetId(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.VegaAssetID, nil + return obj.Delegations, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.Delegation) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalODelegation2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDelegation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Erc20ListAssetBundle_vegaAssetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_delegations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Erc20ListAssetBundle", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "amount": + return ec.fieldContext_Delegation_amount(ctx, field) + case "party": + return ec.fieldContext_Delegation_party(ctx, field) + case "node": + return ec.fieldContext_Delegation_node(ctx, field) + case "epoch": + return ec.fieldContext_Delegation_epoch(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Delegation", field.Name) }, } return fc, nil } -func (ec *executionContext) _Erc20ListAssetBundle_nonce(ctx context.Context, field graphql.CollectedField, obj *Erc20ListAssetBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Erc20ListAssetBundle_nonce(ctx, field) +func (ec *executionContext) _Entities_nodes(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_nodes(ctx, field) if err != nil { return graphql.Null } @@ -29975,39 +32598,56 @@ func (ec *executionContext) _Erc20ListAssetBundle_nonce(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Nonce, nil + return obj.Nodes, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.NodeBasic) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalONodeBasic2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNodeBasic(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Erc20ListAssetBundle_nonce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Erc20ListAssetBundle", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_NodeBasic_id(ctx, field) + case "pubkey": + return ec.fieldContext_NodeBasic_pubkey(ctx, field) + case "tmPubkey": + return ec.fieldContext_NodeBasic_tmPubkey(ctx, field) + case "ethereumAddress": + return ec.fieldContext_NodeBasic_ethereumAddress(ctx, field) + case "infoUrl": + return ec.fieldContext_NodeBasic_infoUrl(ctx, field) + case "location": + return ec.fieldContext_NodeBasic_location(ctx, field) + case "status": + return ec.fieldContext_NodeBasic_status(ctx, field) + case "name": + return ec.fieldContext_NodeBasic_name(ctx, field) + case "avatarUrl": + return ec.fieldContext_NodeBasic_avatarUrl(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NodeBasic", field.Name) }, } return fc, nil } -func (ec *executionContext) _Erc20ListAssetBundle_signatures(ctx context.Context, field graphql.CollectedField, obj *Erc20ListAssetBundle) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Erc20ListAssetBundle_signatures(ctx, field) - if err != nil { +func (ec *executionContext) _Entities_nodeSignatures(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_nodeSignatures(ctx, field) + if err != nil { return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) @@ -30019,38 +32659,43 @@ func (ec *executionContext) _Erc20ListAssetBundle_signatures(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Signatures, nil + return obj.NodeSignatures, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v11.NodeSignature) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalONodeSignature2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋcommandsᚋv1ᚐNodeSignature(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Erc20ListAssetBundle_signatures(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_nodeSignatures(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Erc20ListAssetBundle", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_NodeSignature_id(ctx, field) + case "signature": + return ec.fieldContext_NodeSignature_signature(ctx, field) + case "kind": + return ec.fieldContext_NodeSignature_kind(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NodeSignature", field.Name) }, } return fc, nil } -func (ec *executionContext) _Erc20WithdrawalApproval_assetSource(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalApproval) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Erc20WithdrawalApproval_assetSource(ctx, field) +func (ec *executionContext) _Entities_networkParameters(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_networkParameters(ctx, field) if err != nil { return graphql.Null } @@ -30063,38 +32708,41 @@ func (ec *executionContext) _Erc20WithdrawalApproval_assetSource(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AssetSource, nil + return obj.NetworkParameters, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.NetworkParameter) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalONetworkParameter2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNetworkParameter(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Erc20WithdrawalApproval_assetSource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_networkParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Erc20WithdrawalApproval", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "key": + return ec.fieldContext_NetworkParameter_key(ctx, field) + case "value": + return ec.fieldContext_NetworkParameter_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NetworkParameter", field.Name) }, } return fc, nil } -func (ec *executionContext) _Erc20WithdrawalApproval_amount(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalApproval) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Erc20WithdrawalApproval_amount(ctx, field) +func (ec *executionContext) _Entities_keyRotations(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_keyRotations(ctx, field) if err != nil { return graphql.Null } @@ -30107,38 +32755,45 @@ func (ec *executionContext) _Erc20WithdrawalApproval_amount(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Amount, nil + return obj.KeyRotations, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v1.KeyRotation) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOKeyRotation2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐKeyRotation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Erc20WithdrawalApproval_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_keyRotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Erc20WithdrawalApproval", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "nodeId": + return ec.fieldContext_KeyRotation_nodeId(ctx, field) + case "oldPubKey": + return ec.fieldContext_KeyRotation_oldPubKey(ctx, field) + case "newPubKey": + return ec.fieldContext_KeyRotation_newPubKey(ctx, field) + case "blockHeight": + return ec.fieldContext_KeyRotation_blockHeight(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type KeyRotation", field.Name) }, } return fc, nil } -func (ec *executionContext) _Erc20WithdrawalApproval_nonce(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalApproval) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Erc20WithdrawalApproval_nonce(ctx, field) +func (ec *executionContext) _Entities_ethereumKeyRotations(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_ethereumKeyRotations(ctx, field) if err != nil { return graphql.Null } @@ -30151,38 +32806,45 @@ func (ec *executionContext) _Erc20WithdrawalApproval_nonce(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Nonce, nil + return obj.EthereumKeyRotations, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v1.EthereumKeyRotation) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOEthereumKeyRotation2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐEthereumKeyRotation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Erc20WithdrawalApproval_nonce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_ethereumKeyRotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Erc20WithdrawalApproval", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "nodeId": + return ec.fieldContext_EthereumKeyRotation_nodeId(ctx, field) + case "oldAddress": + return ec.fieldContext_EthereumKeyRotation_oldAddress(ctx, field) + case "newAddress": + return ec.fieldContext_EthereumKeyRotation_newAddress(ctx, field) + case "blockHeight": + return ec.fieldContext_EthereumKeyRotation_blockHeight(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type EthereumKeyRotation", field.Name) }, } return fc, nil } -func (ec *executionContext) _Erc20WithdrawalApproval_signatures(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalApproval) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Erc20WithdrawalApproval_signatures(ctx, field) +func (ec *executionContext) _Entities_protocolUpgradeProposals(ctx context.Context, field graphql.CollectedField, obj *v2.ListEntitiesResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Entities_protocolUpgradeProposals(ctx, field) if err != nil { return graphql.Null } @@ -30195,38 +32857,45 @@ func (ec *executionContext) _Erc20WithdrawalApproval_signatures(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Signatures, nil + return obj.ProtocolUpgradeProposals, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v1.ProtocolUpgradeEvent) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOProtocolUpgradeProposal2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐProtocolUpgradeEvent(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Erc20WithdrawalApproval_signatures(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Entities_protocolUpgradeProposals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Erc20WithdrawalApproval", + Object: "Entities", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "upgradeBlockHeight": + return ec.fieldContext_ProtocolUpgradeProposal_upgradeBlockHeight(ctx, field) + case "vegaReleaseTag": + return ec.fieldContext_ProtocolUpgradeProposal_vegaReleaseTag(ctx, field) + case "approvers": + return ec.fieldContext_ProtocolUpgradeProposal_approvers(ctx, field) + case "status": + return ec.fieldContext_ProtocolUpgradeProposal_status(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProtocolUpgradeProposal", field.Name) }, } return fc, nil } -func (ec *executionContext) _Erc20WithdrawalApproval_targetAddress(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalApproval) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Erc20WithdrawalApproval_targetAddress(ctx, field) +func (ec *executionContext) _Epoch_id(ctx context.Context, field graphql.CollectedField, obj *vega.Epoch) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Epoch_id(ctx, field) if err != nil { return graphql.Null } @@ -30239,7 +32908,7 @@ func (ec *executionContext) _Erc20WithdrawalApproval_targetAddress(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TargetAddress, nil + return ec.resolvers.Epoch().ID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -30253,24 +32922,24 @@ func (ec *executionContext) _Erc20WithdrawalApproval_targetAddress(ctx context.C } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Erc20WithdrawalApproval_targetAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Epoch_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Erc20WithdrawalApproval", + Object: "Epoch", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Erc20WithdrawalApproval_creation(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalApproval) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Erc20WithdrawalApproval_creation(ctx, field) +func (ec *executionContext) _Epoch_timestamps(ctx context.Context, field graphql.CollectedField, obj *vega.Epoch) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Epoch_timestamps(ctx, field) if err != nil { return graphql.Null } @@ -30283,7 +32952,7 @@ func (ec *executionContext) _Erc20WithdrawalApproval_creation(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Creation, nil + return obj.Timestamps, nil }) if err != nil { ec.Error(ctx, err) @@ -30295,26 +32964,38 @@ func (ec *executionContext) _Erc20WithdrawalApproval_creation(ctx context.Contex } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.EpochTimestamps) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNEpochTimestamps2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpochTimestamps(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Erc20WithdrawalApproval_creation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Epoch_timestamps(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Erc20WithdrawalApproval", + Object: "Epoch", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "start": + return ec.fieldContext_EpochTimestamps_start(ctx, field) + case "expiry": + return ec.fieldContext_EpochTimestamps_expiry(ctx, field) + case "end": + return ec.fieldContext_EpochTimestamps_end(ctx, field) + case "firstBlock": + return ec.fieldContext_EpochTimestamps_firstBlock(ctx, field) + case "lastBlock": + return ec.fieldContext_EpochTimestamps_lastBlock(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type EpochTimestamps", field.Name) }, } return fc, nil } -func (ec *executionContext) _Erc20WithdrawalDetails_receiverAddress(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalDetails) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Erc20WithdrawalDetails_receiverAddress(ctx, field) +func (ec *executionContext) _Epoch_validatorsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Epoch) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Epoch_validatorsConnection(ctx, field) if err != nil { return graphql.Null } @@ -30327,38 +33008,52 @@ func (ec *executionContext) _Erc20WithdrawalDetails_receiverAddress(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReceiverAddress, nil + return ec.resolvers.Epoch().ValidatorsConnection(rctx, obj, fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.NodesConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalONodesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNodesConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Erc20WithdrawalDetails_receiverAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Epoch_validatorsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Erc20WithdrawalDetails", + Object: "Epoch", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_NodesConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_NodesConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NodesConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Epoch_validatorsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _EthCallSpec_address(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthCallSpec_address(ctx, field) +func (ec *executionContext) _Epoch_delegationsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Epoch) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Epoch_delegationsConnection(ctx, field) if err != nil { return graphql.Null } @@ -30371,38 +33066,52 @@ func (ec *executionContext) _EthCallSpec_address(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Address, nil + return ec.resolvers.Epoch().DelegationsConnection(rctx, obj, fc.Args["partyId"].(*string), fc.Args["nodeId"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.DelegationsConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalODelegationsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDelegationsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthCallSpec_address(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Epoch_delegationsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthCallSpec", + Object: "Epoch", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_DelegationsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_DelegationsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DelegationsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Epoch_delegationsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _EthCallSpec_abi(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthCallSpec_abi(ctx, field) +func (ec *executionContext) _EpochData_total(ctx context.Context, field graphql.CollectedField, obj *vega.EpochData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochData_total(ctx, field) if err != nil { return graphql.Null } @@ -30415,35 +33124,38 @@ func (ec *executionContext) _EthCallSpec_abi(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EthCallSpec().Abi(rctx, obj) + return obj.Total, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]string) + res := resTmp.(int32) fc.Result = res - return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNInt2int32(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthCallSpec_abi(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochData_total(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthCallSpec", + Object: "EpochData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthCallSpec_method(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthCallSpec_method(ctx, field) +func (ec *executionContext) _EpochData_offline(ctx context.Context, field graphql.CollectedField, obj *vega.EpochData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochData_offline(ctx, field) if err != nil { return graphql.Null } @@ -30456,7 +33168,7 @@ func (ec *executionContext) _EthCallSpec_method(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Method, nil + return obj.Offline, nil }) if err != nil { ec.Error(ctx, err) @@ -30468,26 +33180,26 @@ func (ec *executionContext) _EthCallSpec_method(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int32) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int32(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthCallSpec_method(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochData_offline(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthCallSpec", + Object: "EpochData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthCallSpec_args(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthCallSpec_args(ctx, field) +func (ec *executionContext) _EpochData_online(ctx context.Context, field graphql.CollectedField, obj *vega.EpochData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochData_online(ctx, field) if err != nil { return graphql.Null } @@ -30500,35 +33212,38 @@ func (ec *executionContext) _EthCallSpec_args(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EthCallSpec().Args(rctx, obj) + return obj.Online, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]string) + res := resTmp.(int32) fc.Result = res - return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNInt2int32(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthCallSpec_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochData_online(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthCallSpec", + Object: "EpochData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthCallSpec_trigger(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthCallSpec_trigger(ctx, field) +func (ec *executionContext) _EpochParticipation_epoch(ctx context.Context, field graphql.CollectedField, obj *EpochParticipation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochParticipation_epoch(ctx, field) if err != nil { return graphql.Null } @@ -30541,42 +33256,45 @@ func (ec *executionContext) _EthCallSpec_trigger(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EthCallSpec().Trigger(rctx, obj) + return obj.Epoch, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*EthCallTrigger) + res := resTmp.(*vega.Epoch) fc.Result = res - return ec.marshalNEthCallTrigger2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐEthCallTrigger(ctx, field.Selections, res) + return ec.marshalOEpoch2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpoch(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthCallSpec_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochParticipation_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthCallSpec", + Object: "EpochParticipation", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "trigger": - return ec.fieldContext_EthCallTrigger_trigger(ctx, field) + case "id": + return ec.fieldContext_Epoch_id(ctx, field) + case "timestamps": + return ec.fieldContext_Epoch_timestamps(ctx, field) + case "validatorsConnection": + return ec.fieldContext_Epoch_validatorsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Epoch_delegationsConnection(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type EthCallTrigger", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Epoch", field.Name) }, } return fc, nil } -func (ec *executionContext) _EthCallSpec_requiredConfirmations(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthCallSpec_requiredConfirmations(ctx, field) +func (ec *executionContext) _EpochParticipation_offline(ctx context.Context, field graphql.CollectedField, obj *EpochParticipation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochParticipation_offline(ctx, field) if err != nil { return graphql.Null } @@ -30589,38 +33307,35 @@ func (ec *executionContext) _EthCallSpec_requiredConfirmations(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EthCallSpec().RequiredConfirmations(rctx, obj) + return obj.Offline, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*int64) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthCallSpec_requiredConfirmations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochParticipation_offline(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthCallSpec", + Object: "EpochParticipation", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthCallSpec_normalisers(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthCallSpec_normalisers(ctx, field) +func (ec *executionContext) _EpochParticipation_online(ctx context.Context, field graphql.CollectedField, obj *EpochParticipation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochParticipation_online(ctx, field) if err != nil { return graphql.Null } @@ -30633,7 +33348,7 @@ func (ec *executionContext) _EthCallSpec_normalisers(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EthCallSpec().Normalisers(rctx, obj) + return obj.Online, nil }) if err != nil { ec.Error(ctx, err) @@ -30642,32 +33357,26 @@ func (ec *executionContext) _EthCallSpec_normalisers(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.([]*Normaliser) + res := resTmp.(*int64) fc.Result = res - return ec.marshalONormaliser2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐNormaliserᚄ(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthCallSpec_normalisers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochParticipation_online(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthCallSpec", + Object: "EpochParticipation", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_Normaliser_name(ctx, field) - case "expression": - return ec.fieldContext_Normaliser_expression(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Normaliser", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthCallSpec_filters(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthCallSpec_filters(ctx, field) +func (ec *executionContext) _EpochParticipation_totalRewards(ctx context.Context, field graphql.CollectedField, obj *EpochParticipation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochParticipation_totalRewards(ctx, field) if err != nil { return graphql.Null } @@ -30680,7 +33389,7 @@ func (ec *executionContext) _EthCallSpec_filters(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EthCallSpec().Filters(rctx, obj) + return obj.TotalRewards, nil }) if err != nil { ec.Error(ctx, err) @@ -30689,32 +33398,26 @@ func (ec *executionContext) _EthCallSpec_filters(ctx context.Context, field grap if resTmp == nil { return graphql.Null } - res := resTmp.([]*Filter) + res := resTmp.(*float64) fc.Result = res - return ec.marshalOFilter2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐFilterᚄ(ctx, field.Selections, res) + return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthCallSpec_filters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochParticipation_totalRewards(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthCallSpec", + Object: "EpochParticipation", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "key": - return ec.fieldContext_Filter_key(ctx, field) - case "conditions": - return ec.fieldContext_Filter_conditions(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Filter", field.Name) + return nil, errors.New("field of type Float does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthCallTrigger_trigger(ctx context.Context, field graphql.CollectedField, obj *EthCallTrigger) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthCallTrigger_trigger(ctx, field) +func (ec *executionContext) _EpochRewardSummary_epoch(ctx context.Context, field graphql.CollectedField, obj *vega.EpochRewardSummary) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochRewardSummary_epoch(ctx, field) if err != nil { return graphql.Null } @@ -30727,7 +33430,7 @@ func (ec *executionContext) _EthCallTrigger_trigger(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Trigger, nil + return ec.resolvers.EpochRewardSummary().Epoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -30739,26 +33442,26 @@ func (ec *executionContext) _EthCallTrigger_trigger(ctx context.Context, field g } return graphql.Null } - res := resTmp.(TriggerKind) + res := resTmp.(int) fc.Result = res - return ec.marshalNTriggerKind2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTriggerKind(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthCallTrigger_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochRewardSummary_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthCallTrigger", + Object: "EpochRewardSummary", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type TriggerKind does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthTimeTrigger_initial(ctx context.Context, field graphql.CollectedField, obj *EthTimeTrigger) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthTimeTrigger_initial(ctx, field) +func (ec *executionContext) _EpochRewardSummary_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.EpochRewardSummary) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochRewardSummary_marketId(ctx, field) if err != nil { return graphql.Null } @@ -30771,7 +33474,7 @@ func (ec *executionContext) _EthTimeTrigger_initial(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Initial, nil + return obj.MarketId, nil }) if err != nil { ec.Error(ctx, err) @@ -30780,26 +33483,26 @@ func (ec *executionContext) _EthTimeTrigger_initial(ctx context.Context, field g if resTmp == nil { return graphql.Null } - res := resTmp.(*int64) + res := resTmp.(string) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalOID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthTimeTrigger_initial(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochRewardSummary_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthTimeTrigger", + Object: "EpochRewardSummary", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthTimeTrigger_every(ctx context.Context, field graphql.CollectedField, obj *EthTimeTrigger) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthTimeTrigger_every(ctx, field) +func (ec *executionContext) _EpochRewardSummary_assetId(ctx context.Context, field graphql.CollectedField, obj *vega.EpochRewardSummary) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochRewardSummary_assetId(ctx, field) if err != nil { return graphql.Null } @@ -30812,35 +33515,38 @@ func (ec *executionContext) _EthTimeTrigger_every(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Every, nil + return obj.AssetId, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*int) + res := resTmp.(string) fc.Result = res - return ec.marshalOInt2ᚖint(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthTimeTrigger_every(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochRewardSummary_assetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthTimeTrigger", + Object: "EpochRewardSummary", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthTimeTrigger_until(ctx context.Context, field graphql.CollectedField, obj *EthTimeTrigger) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthTimeTrigger_until(ctx, field) +func (ec *executionContext) _EpochRewardSummary_rewardType(ctx context.Context, field graphql.CollectedField, obj *vega.EpochRewardSummary) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochRewardSummary_rewardType(ctx, field) if err != nil { return graphql.Null } @@ -30853,35 +33559,38 @@ func (ec *executionContext) _EthTimeTrigger_until(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Until, nil + return ec.resolvers.EpochRewardSummary().RewardType(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*int64) + res := resTmp.(vega.AccountType) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthTimeTrigger_until(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochRewardSummary_rewardType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthTimeTrigger", + Object: "EpochRewardSummary", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type AccountType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthereumEvent_contractId(ctx context.Context, field graphql.CollectedField, obj *EthereumEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthereumEvent_contractId(ctx, field) +func (ec *executionContext) _EpochRewardSummary_amount(ctx context.Context, field graphql.CollectedField, obj *vega.EpochRewardSummary) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochRewardSummary_amount(ctx, field) if err != nil { return graphql.Null } @@ -30894,7 +33603,7 @@ func (ec *executionContext) _EthereumEvent_contractId(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ContractID, nil + return obj.Amount, nil }) if err != nil { ec.Error(ctx, err) @@ -30908,24 +33617,24 @@ func (ec *executionContext) _EthereumEvent_contractId(ctx context.Context, field } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthereumEvent_contractId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochRewardSummary_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthereumEvent", + Object: "EpochRewardSummary", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthereumEvent_event(ctx context.Context, field graphql.CollectedField, obj *EthereumEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthereumEvent_event(ctx, field) +func (ec *executionContext) _EpochRewardSummaryConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.EpochRewardSummaryConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochRewardSummaryConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -30938,38 +33647,41 @@ func (ec *executionContext) _EthereumEvent_event(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Event, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.EpochRewardSummaryEdge) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOEpochRewardSummaryEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEpochRewardSummaryEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthereumEvent_event(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochRewardSummaryConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthereumEvent", + Object: "EpochRewardSummaryConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_EpochRewardSummaryEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_EpochRewardSummaryEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type EpochRewardSummaryEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _EthereumKeyRotation_nodeId(ctx context.Context, field graphql.CollectedField, obj *v1.EthereumKeyRotation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthereumKeyRotation_nodeId(ctx, field) +func (ec *executionContext) _EpochRewardSummaryConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.EpochRewardSummaryConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochRewardSummaryConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -30982,38 +33694,45 @@ func (ec *executionContext) _EthereumKeyRotation_nodeId(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NodeId, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthereumKeyRotation_nodeId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochRewardSummaryConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthereumKeyRotation", + Object: "EpochRewardSummaryConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _EthereumKeyRotation_oldAddress(ctx context.Context, field graphql.CollectedField, obj *v1.EthereumKeyRotation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthereumKeyRotation_oldAddress(ctx, field) +func (ec *executionContext) _EpochRewardSummaryEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.EpochRewardSummaryEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochRewardSummaryEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -31026,7 +33745,7 @@ func (ec *executionContext) _EthereumKeyRotation_oldAddress(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.OldAddress, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -31038,26 +33757,38 @@ func (ec *executionContext) _EthereumKeyRotation_oldAddress(ctx context.Context, } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.EpochRewardSummary) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNEpochRewardSummary2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpochRewardSummary(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthereumKeyRotation_oldAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochRewardSummaryEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthereumKeyRotation", + Object: "EpochRewardSummaryEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "epoch": + return ec.fieldContext_EpochRewardSummary_epoch(ctx, field) + case "marketId": + return ec.fieldContext_EpochRewardSummary_marketId(ctx, field) + case "assetId": + return ec.fieldContext_EpochRewardSummary_assetId(ctx, field) + case "rewardType": + return ec.fieldContext_EpochRewardSummary_rewardType(ctx, field) + case "amount": + return ec.fieldContext_EpochRewardSummary_amount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type EpochRewardSummary", field.Name) }, } return fc, nil } -func (ec *executionContext) _EthereumKeyRotation_newAddress(ctx context.Context, field graphql.CollectedField, obj *v1.EthereumKeyRotation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthereumKeyRotation_newAddress(ctx, field) +func (ec *executionContext) _EpochRewardSummaryEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.EpochRewardSummaryEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochRewardSummaryEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -31070,7 +33801,7 @@ func (ec *executionContext) _EthereumKeyRotation_newAddress(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NewAddress, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -31087,9 +33818,9 @@ func (ec *executionContext) _EthereumKeyRotation_newAddress(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthereumKeyRotation_newAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochRewardSummaryEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthereumKeyRotation", + Object: "EpochRewardSummaryEdge", Field: field, IsMethod: false, IsResolver: false, @@ -31100,8 +33831,8 @@ func (ec *executionContext) fieldContext_EthereumKeyRotation_newAddress(ctx cont return fc, nil } -func (ec *executionContext) _EthereumKeyRotation_blockHeight(ctx context.Context, field graphql.CollectedField, obj *v1.EthereumKeyRotation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthereumKeyRotation_blockHeight(ctx, field) +func (ec *executionContext) _EpochTimestamps_start(ctx context.Context, field graphql.CollectedField, obj *vega.EpochTimestamps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochTimestamps_start(ctx, field) if err != nil { return graphql.Null } @@ -31114,38 +33845,35 @@ func (ec *executionContext) _EthereumKeyRotation_blockHeight(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EthereumKeyRotation().BlockHeight(rctx, obj) + return ec.resolvers.EpochTimestamps().Start(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthereumKeyRotation_blockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochTimestamps_start(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthereumKeyRotation", + Object: "EpochTimestamps", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthereumKeyRotationEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.EthereumKeyRotationEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthereumKeyRotationEdge_node(ctx, field) +func (ec *executionContext) _EpochTimestamps_expiry(ctx context.Context, field graphql.CollectedField, obj *vega.EpochTimestamps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochTimestamps_expiry(ctx, field) if err != nil { return graphql.Null } @@ -31158,48 +33886,35 @@ func (ec *executionContext) _EthereumKeyRotationEdge_node(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.EpochTimestamps().Expiry(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v1.EthereumKeyRotation) + res := resTmp.(*int64) fc.Result = res - return ec.marshalNEthereumKeyRotation2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐEthereumKeyRotation(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthereumKeyRotationEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochTimestamps_expiry(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthereumKeyRotationEdge", + Object: "EpochTimestamps", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "nodeId": - return ec.fieldContext_EthereumKeyRotation_nodeId(ctx, field) - case "oldAddress": - return ec.fieldContext_EthereumKeyRotation_oldAddress(ctx, field) - case "newAddress": - return ec.fieldContext_EthereumKeyRotation_newAddress(ctx, field) - case "blockHeight": - return ec.fieldContext_EthereumKeyRotation_blockHeight(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type EthereumKeyRotation", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthereumKeyRotationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.EthereumKeyRotationEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthereumKeyRotationEdge_cursor(ctx, field) +func (ec *executionContext) _EpochTimestamps_end(ctx context.Context, field graphql.CollectedField, obj *vega.EpochTimestamps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochTimestamps_end(ctx, field) if err != nil { return graphql.Null } @@ -31212,7 +33927,7 @@ func (ec *executionContext) _EthereumKeyRotationEdge_cursor(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.EpochTimestamps().End(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -31221,26 +33936,26 @@ func (ec *executionContext) _EthereumKeyRotationEdge_cursor(ctx context.Context, if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int64) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthereumKeyRotationEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochTimestamps_end(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthereumKeyRotationEdge", + Object: "EpochTimestamps", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthereumKeyRotationsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.EthereumKeyRotationsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthereumKeyRotationsConnection_edges(ctx, field) +func (ec *executionContext) _EpochTimestamps_firstBlock(ctx context.Context, field graphql.CollectedField, obj *vega.EpochTimestamps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochTimestamps_firstBlock(ctx, field) if err != nil { return graphql.Null } @@ -31253,7 +33968,7 @@ func (ec *executionContext) _EthereumKeyRotationsConnection_edges(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.EpochTimestamps().FirstBlock(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -31265,32 +33980,26 @@ func (ec *executionContext) _EthereumKeyRotationsConnection_edges(ctx context.Co } return graphql.Null } - res := resTmp.([]*v2.EthereumKeyRotationEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalNEthereumKeyRotationEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEthereumKeyRotationEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthereumKeyRotationsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochTimestamps_firstBlock(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthereumKeyRotationsConnection", + Object: "EpochTimestamps", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_EthereumKeyRotationEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_EthereumKeyRotationEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type EthereumKeyRotationEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EthereumKeyRotationsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.EthereumKeyRotationsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EthereumKeyRotationsConnection_pageInfo(ctx, field) +func (ec *executionContext) _EpochTimestamps_lastBlock(ctx context.Context, field graphql.CollectedField, obj *vega.EpochTimestamps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EpochTimestamps_lastBlock(ctx, field) if err != nil { return graphql.Null } @@ -31303,7 +34012,7 @@ func (ec *executionContext) _EthereumKeyRotationsConnection_pageInfo(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.EpochTimestamps().LastBlock(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -31312,36 +34021,26 @@ func (ec *executionContext) _EthereumKeyRotationsConnection_pageInfo(ctx context if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(*string) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EthereumKeyRotationsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EpochTimestamps_lastBlock(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EthereumKeyRotationsConnection", + Object: "EpochTimestamps", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ExternalData_data(ctx context.Context, field graphql.CollectedField, obj *ExternalData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ExternalData_data(ctx, field) +func (ec *executionContext) _Erc20ListAssetBundle_assetSource(ctx context.Context, field graphql.CollectedField, obj *Erc20ListAssetBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Erc20ListAssetBundle_assetSource(ctx, field) if err != nil { return graphql.Null } @@ -31354,7 +34053,7 @@ func (ec *executionContext) _ExternalData_data(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Data, nil + return obj.AssetSource, nil }) if err != nil { ec.Error(ctx, err) @@ -31366,38 +34065,26 @@ func (ec *executionContext) _ExternalData_data(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(*Data) + res := resTmp.(string) fc.Result = res - return ec.marshalNData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐData(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalData_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Erc20ListAssetBundle_assetSource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ExternalData", + Object: "Erc20ListAssetBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "signers": - return ec.fieldContext_Data_signers(ctx, field) - case "data": - return ec.fieldContext_Data_data(ctx, field) - case "metaData": - return ec.fieldContext_Data_metaData(ctx, field) - case "matchedSpecIds": - return ec.fieldContext_Data_matchedSpecIds(ctx, field) - case "broadcastAt": - return ec.fieldContext_Data_broadcastAt(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ExternalDataSourceSpec_spec(ctx context.Context, field graphql.CollectedField, obj *ExternalDataSourceSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ExternalDataSourceSpec_spec(ctx, field) +func (ec *executionContext) _Erc20ListAssetBundle_vegaAssetId(ctx context.Context, field graphql.CollectedField, obj *Erc20ListAssetBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Erc20ListAssetBundle_vegaAssetId(ctx, field) if err != nil { return graphql.Null } @@ -31410,7 +34097,7 @@ func (ec *executionContext) _ExternalDataSourceSpec_spec(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Spec, nil + return obj.VegaAssetID, nil }) if err != nil { ec.Error(ctx, err) @@ -31422,38 +34109,26 @@ func (ec *executionContext) _ExternalDataSourceSpec_spec(ctx context.Context, fi } return graphql.Null } - res := resTmp.(*DataSourceSpec) + res := resTmp.(string) fc.Result = res - return ec.marshalNDataSourceSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpec(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ExternalDataSourceSpec_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Erc20ListAssetBundle_vegaAssetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ExternalDataSourceSpec", + Object: "Erc20ListAssetBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_DataSourceSpec_id(ctx, field) - case "createdAt": - return ec.fieldContext_DataSourceSpec_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_DataSourceSpec_updatedAt(ctx, field) - case "data": - return ec.fieldContext_DataSourceSpec_data(ctx, field) - case "status": - return ec.fieldContext_DataSourceSpec_status(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DataSourceSpec", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FeeEstimate_fees(ctx context.Context, field graphql.CollectedField, obj *FeeEstimate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeeEstimate_fees(ctx, field) +func (ec *executionContext) _Erc20ListAssetBundle_nonce(ctx context.Context, field graphql.CollectedField, obj *Erc20ListAssetBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Erc20ListAssetBundle_nonce(ctx, field) if err != nil { return graphql.Null } @@ -31466,7 +34141,7 @@ func (ec *executionContext) _FeeEstimate_fees(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Fees, nil + return obj.Nonce, nil }) if err != nil { ec.Error(ctx, err) @@ -31478,46 +34153,26 @@ func (ec *executionContext) _FeeEstimate_fees(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(*TradeFee) + res := resTmp.(string) fc.Result = res - return ec.marshalNTradeFee2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTradeFee(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeeEstimate_fees(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Erc20ListAssetBundle_nonce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeeEstimate", + Object: "Erc20ListAssetBundle", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "makerFee": - return ec.fieldContext_TradeFee_makerFee(ctx, field) - case "infrastructureFee": - return ec.fieldContext_TradeFee_infrastructureFee(ctx, field) - case "liquidityFee": - return ec.fieldContext_TradeFee_liquidityFee(ctx, field) - case "makerFeeReferralDiscount": - return ec.fieldContext_TradeFee_makerFeeReferralDiscount(ctx, field) - case "makerFeeVolumeDiscount": - return ec.fieldContext_TradeFee_makerFeeVolumeDiscount(ctx, field) - case "infrastructureFeeReferralDiscount": - return ec.fieldContext_TradeFee_infrastructureFeeReferralDiscount(ctx, field) - case "infrastructureFeeVolumeDiscount": - return ec.fieldContext_TradeFee_infrastructureFeeVolumeDiscount(ctx, field) - case "liquidityFeeReferralDiscount": - return ec.fieldContext_TradeFee_liquidityFeeReferralDiscount(ctx, field) - case "liquidityFeeVolumeDiscount": - return ec.fieldContext_TradeFee_liquidityFeeVolumeDiscount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TradeFee", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FeeEstimate_totalFeeAmount(ctx context.Context, field graphql.CollectedField, obj *FeeEstimate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeeEstimate_totalFeeAmount(ctx, field) +func (ec *executionContext) _Erc20ListAssetBundle_signatures(ctx context.Context, field graphql.CollectedField, obj *Erc20ListAssetBundle) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Erc20ListAssetBundle_signatures(ctx, field) if err != nil { return graphql.Null } @@ -31530,7 +34185,7 @@ func (ec *executionContext) _FeeEstimate_totalFeeAmount(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalFeeAmount, nil + return obj.Signatures, nil }) if err != nil { ec.Error(ctx, err) @@ -31547,9 +34202,9 @@ func (ec *executionContext) _FeeEstimate_totalFeeAmount(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeeEstimate_totalFeeAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Erc20ListAssetBundle_signatures(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeeEstimate", + Object: "Erc20ListAssetBundle", Field: field, IsMethod: false, IsResolver: false, @@ -31560,8 +34215,8 @@ func (ec *executionContext) fieldContext_FeeEstimate_totalFeeAmount(ctx context. return fc, nil } -func (ec *executionContext) _FeeFactors_makerFee(ctx context.Context, field graphql.CollectedField, obj *vega.FeeFactors) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeeFactors_makerFee(ctx, field) +func (ec *executionContext) _Erc20WithdrawalApproval_assetSource(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalApproval) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Erc20WithdrawalApproval_assetSource(ctx, field) if err != nil { return graphql.Null } @@ -31574,7 +34229,7 @@ func (ec *executionContext) _FeeFactors_makerFee(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MakerFee, nil + return obj.AssetSource, nil }) if err != nil { ec.Error(ctx, err) @@ -31591,9 +34246,9 @@ func (ec *executionContext) _FeeFactors_makerFee(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeeFactors_makerFee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Erc20WithdrawalApproval_assetSource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeeFactors", + Object: "Erc20WithdrawalApproval", Field: field, IsMethod: false, IsResolver: false, @@ -31604,8 +34259,8 @@ func (ec *executionContext) fieldContext_FeeFactors_makerFee(ctx context.Context return fc, nil } -func (ec *executionContext) _FeeFactors_infrastructureFee(ctx context.Context, field graphql.CollectedField, obj *vega.FeeFactors) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeeFactors_infrastructureFee(ctx, field) +func (ec *executionContext) _Erc20WithdrawalApproval_amount(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalApproval) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Erc20WithdrawalApproval_amount(ctx, field) if err != nil { return graphql.Null } @@ -31618,7 +34273,7 @@ func (ec *executionContext) _FeeFactors_infrastructureFee(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InfrastructureFee, nil + return obj.Amount, nil }) if err != nil { ec.Error(ctx, err) @@ -31635,9 +34290,9 @@ func (ec *executionContext) _FeeFactors_infrastructureFee(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeeFactors_infrastructureFee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Erc20WithdrawalApproval_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeeFactors", + Object: "Erc20WithdrawalApproval", Field: field, IsMethod: false, IsResolver: false, @@ -31648,8 +34303,8 @@ func (ec *executionContext) fieldContext_FeeFactors_infrastructureFee(ctx contex return fc, nil } -func (ec *executionContext) _FeeFactors_liquidityFee(ctx context.Context, field graphql.CollectedField, obj *vega.FeeFactors) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeeFactors_liquidityFee(ctx, field) +func (ec *executionContext) _Erc20WithdrawalApproval_nonce(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalApproval) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Erc20WithdrawalApproval_nonce(ctx, field) if err != nil { return graphql.Null } @@ -31662,7 +34317,7 @@ func (ec *executionContext) _FeeFactors_liquidityFee(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LiquidityFee, nil + return obj.Nonce, nil }) if err != nil { ec.Error(ctx, err) @@ -31679,9 +34334,9 @@ func (ec *executionContext) _FeeFactors_liquidityFee(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeeFactors_liquidityFee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Erc20WithdrawalApproval_nonce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeeFactors", + Object: "Erc20WithdrawalApproval", Field: field, IsMethod: false, IsResolver: false, @@ -31692,8 +34347,8 @@ func (ec *executionContext) fieldContext_FeeFactors_liquidityFee(ctx context.Con return fc, nil } -func (ec *executionContext) _Fees_factors(ctx context.Context, field graphql.CollectedField, obj *vega.Fees) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Fees_factors(ctx, field) +func (ec *executionContext) _Erc20WithdrawalApproval_signatures(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalApproval) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Erc20WithdrawalApproval_signatures(ctx, field) if err != nil { return graphql.Null } @@ -31706,7 +34361,7 @@ func (ec *executionContext) _Fees_factors(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Factors, nil + return obj.Signatures, nil }) if err != nil { ec.Error(ctx, err) @@ -31718,34 +34373,26 @@ func (ec *executionContext) _Fees_factors(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(*vega.FeeFactors) + res := resTmp.(string) fc.Result = res - return ec.marshalNFeeFactors2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐFeeFactors(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Fees_factors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Erc20WithdrawalApproval_signatures(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Fees", + Object: "Erc20WithdrawalApproval", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "makerFee": - return ec.fieldContext_FeeFactors_makerFee(ctx, field) - case "infrastructureFee": - return ec.fieldContext_FeeFactors_infrastructureFee(ctx, field) - case "liquidityFee": - return ec.fieldContext_FeeFactors_liquidityFee(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type FeeFactors", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FeesStats_marketId(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStats_marketId(ctx, field) +func (ec *executionContext) _Erc20WithdrawalApproval_targetAddress(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalApproval) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Erc20WithdrawalApproval_targetAddress(ctx, field) if err != nil { return graphql.Null } @@ -31758,7 +34405,7 @@ func (ec *executionContext) _FeesStats_marketId(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.FeesStats().MarketID(rctx, obj) + return obj.TargetAddress, nil }) if err != nil { ec.Error(ctx, err) @@ -31775,12 +34422,12 @@ func (ec *executionContext) _FeesStats_marketId(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStats_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Erc20WithdrawalApproval_targetAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStats", + Object: "Erc20WithdrawalApproval", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -31788,8 +34435,8 @@ func (ec *executionContext) fieldContext_FeesStats_marketId(ctx context.Context, return fc, nil } -func (ec *executionContext) _FeesStats_assetId(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStats_assetId(ctx, field) +func (ec *executionContext) _Erc20WithdrawalApproval_creation(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalApproval) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Erc20WithdrawalApproval_creation(ctx, field) if err != nil { return graphql.Null } @@ -31802,7 +34449,7 @@ func (ec *executionContext) _FeesStats_assetId(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.FeesStats().AssetID(rctx, obj) + return obj.Creation, nil }) if err != nil { ec.Error(ctx, err) @@ -31819,12 +34466,12 @@ func (ec *executionContext) _FeesStats_assetId(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStats_assetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Erc20WithdrawalApproval_creation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStats", + Object: "Erc20WithdrawalApproval", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -31832,8 +34479,8 @@ func (ec *executionContext) fieldContext_FeesStats_assetId(ctx context.Context, return fc, nil } -func (ec *executionContext) _FeesStats_epoch(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStats_epoch(ctx, field) +func (ec *executionContext) _Erc20WithdrawalDetails_receiverAddress(ctx context.Context, field graphql.CollectedField, obj *Erc20WithdrawalDetails) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Erc20WithdrawalDetails_receiverAddress(ctx, field) if err != nil { return graphql.Null } @@ -31846,7 +34493,7 @@ func (ec *executionContext) _FeesStats_epoch(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.FeesStats().Epoch(rctx, obj) + return obj.ReceiverAddress, nil }) if err != nil { ec.Error(ctx, err) @@ -31858,26 +34505,26 @@ func (ec *executionContext) _FeesStats_epoch(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStats_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Erc20WithdrawalDetails_receiverAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStats", + Object: "Erc20WithdrawalDetails", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FeesStats_totalRewardsReceived(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStats_totalRewardsReceived(ctx, field) +func (ec *executionContext) _EstimatedTransferFee_fee(ctx context.Context, field graphql.CollectedField, obj *v2.EstimateTransferFeeResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EstimatedTransferFee_fee(ctx, field) if err != nil { return graphql.Null } @@ -31890,7 +34537,7 @@ func (ec *executionContext) _FeesStats_totalRewardsReceived(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalRewardsReceived, nil + return obj.Fee, nil }) if err != nil { ec.Error(ctx, err) @@ -31902,32 +34549,26 @@ func (ec *executionContext) _FeesStats_totalRewardsReceived(ctx context.Context, } return graphql.Null } - res := resTmp.([]*v1.PartyAmount) + res := resTmp.(string) fc.Result = res - return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStats_totalRewardsReceived(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EstimatedTransferFee_fee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStats", + Object: "EstimatedTransferFee", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "partyId": - return ec.fieldContext_PartyAmount_partyId(ctx, field) - case "amount": - return ec.fieldContext_PartyAmount_amount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FeesStats_referrerRewardsGenerated(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStats_referrerRewardsGenerated(ctx, field) +func (ec *executionContext) _EstimatedTransferFee_discount(ctx context.Context, field graphql.CollectedField, obj *v2.EstimateTransferFeeResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EstimatedTransferFee_discount(ctx, field) if err != nil { return graphql.Null } @@ -31940,7 +34581,7 @@ func (ec *executionContext) _FeesStats_referrerRewardsGenerated(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReferrerRewardsGenerated, nil + return obj.Discount, nil }) if err != nil { ec.Error(ctx, err) @@ -31952,32 +34593,26 @@ func (ec *executionContext) _FeesStats_referrerRewardsGenerated(ctx context.Cont } return graphql.Null } - res := resTmp.([]*v1.ReferrerRewardsGenerated) + res := resTmp.(string) fc.Result = res - return ec.marshalNReferrerRewardsGenerated2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐReferrerRewardsGeneratedᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStats_referrerRewardsGenerated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EstimatedTransferFee_discount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStats", + Object: "EstimatedTransferFee", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "referrerId": - return ec.fieldContext_ReferrerRewardsGenerated_referrerId(ctx, field) - case "generatedReward": - return ec.fieldContext_ReferrerRewardsGenerated_generatedReward(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ReferrerRewardsGenerated", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FeesStats_refereesDiscountApplied(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStats_refereesDiscountApplied(ctx, field) +func (ec *executionContext) _EthCallSpec_address(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthCallSpec_address(ctx, field) if err != nil { return graphql.Null } @@ -31990,7 +34625,7 @@ func (ec *executionContext) _FeesStats_refereesDiscountApplied(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RefereesDiscountApplied, nil + return obj.Address, nil }) if err != nil { ec.Error(ctx, err) @@ -32002,32 +34637,26 @@ func (ec *executionContext) _FeesStats_refereesDiscountApplied(ctx context.Conte } return graphql.Null } - res := resTmp.([]*v1.PartyAmount) + res := resTmp.(string) fc.Result = res - return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStats_refereesDiscountApplied(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthCallSpec_address(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStats", + Object: "EthCallSpec", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "partyId": - return ec.fieldContext_PartyAmount_partyId(ctx, field) - case "amount": - return ec.fieldContext_PartyAmount_amount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FeesStats_volumeDiscountApplied(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStats_volumeDiscountApplied(ctx, field) +func (ec *executionContext) _EthCallSpec_abi(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthCallSpec_abi(ctx, field) if err != nil { return graphql.Null } @@ -32040,44 +34669,35 @@ func (ec *executionContext) _FeesStats_volumeDiscountApplied(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.VolumeDiscountApplied, nil + return ec.resolvers.EthCallSpec().Abi(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]*v1.PartyAmount) + res := resTmp.([]string) fc.Result = res - return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStats_volumeDiscountApplied(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthCallSpec_abi(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStats", + Object: "EthCallSpec", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "partyId": - return ec.fieldContext_PartyAmount_partyId(ctx, field) - case "amount": - return ec.fieldContext_PartyAmount_amount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FeesStats_totalMakerFeesReceived(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStats_totalMakerFeesReceived(ctx, field) +func (ec *executionContext) _EthCallSpec_method(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthCallSpec_method(ctx, field) if err != nil { return graphql.Null } @@ -32090,7 +34710,7 @@ func (ec *executionContext) _FeesStats_totalMakerFeesReceived(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalMakerFeesReceived, nil + return obj.Method, nil }) if err != nil { ec.Error(ctx, err) @@ -32102,32 +34722,26 @@ func (ec *executionContext) _FeesStats_totalMakerFeesReceived(ctx context.Contex } return graphql.Null } - res := resTmp.([]*v1.PartyAmount) + res := resTmp.(string) fc.Result = res - return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStats_totalMakerFeesReceived(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthCallSpec_method(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStats", + Object: "EthCallSpec", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "partyId": - return ec.fieldContext_PartyAmount_partyId(ctx, field) - case "amount": - return ec.fieldContext_PartyAmount_amount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FeesStats_makerFeesGenerated(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStats_makerFeesGenerated(ctx, field) +func (ec *executionContext) _EthCallSpec_args(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthCallSpec_args(ctx, field) if err != nil { return graphql.Null } @@ -32140,44 +34754,35 @@ func (ec *executionContext) _FeesStats_makerFeesGenerated(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MakerFeesGenerated, nil + return ec.resolvers.EthCallSpec().Args(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]*v1.MakerFeesGenerated) + res := resTmp.([]string) fc.Result = res - return ec.marshalNMakerFeesGenerated2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐMakerFeesGeneratedᚄ(ctx, field.Selections, res) + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStats_makerFeesGenerated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthCallSpec_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStats", + Object: "EthCallSpec", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "taker": - return ec.fieldContext_MakerFeesGenerated_taker(ctx, field) - case "makerFeesPaid": - return ec.fieldContext_MakerFeesGenerated_makerFeesPaid(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MakerFeesGenerated", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FeesStatsForParty_assetId(ctx context.Context, field graphql.CollectedField, obj *v2.FeesStatsForParty) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStatsForParty_assetId(ctx, field) +func (ec *executionContext) _EthCallSpec_trigger(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthCallSpec_trigger(ctx, field) if err != nil { return graphql.Null } @@ -32190,7 +34795,7 @@ func (ec *executionContext) _FeesStatsForParty_assetId(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AssetId, nil + return ec.resolvers.EthCallSpec().Trigger(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -32202,26 +34807,30 @@ func (ec *executionContext) _FeesStatsForParty_assetId(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*EthCallTrigger) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNEthCallTrigger2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐEthCallTrigger(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStatsForParty_assetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthCallSpec_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStatsForParty", + Object: "EthCallSpec", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "trigger": + return ec.fieldContext_EthCallTrigger_trigger(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type EthCallTrigger", field.Name) }, } return fc, nil } -func (ec *executionContext) _FeesStatsForParty_totalRewardsReceived(ctx context.Context, field graphql.CollectedField, obj *v2.FeesStatsForParty) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStatsForParty_totalRewardsReceived(ctx, field) +func (ec *executionContext) _EthCallSpec_requiredConfirmations(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthCallSpec_requiredConfirmations(ctx, field) if err != nil { return graphql.Null } @@ -32234,7 +34843,7 @@ func (ec *executionContext) _FeesStatsForParty_totalRewardsReceived(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalRewardsReceived, nil + return ec.resolvers.EthCallSpec().RequiredConfirmations(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -32246,26 +34855,26 @@ func (ec *executionContext) _FeesStatsForParty_totalRewardsReceived(ctx context. } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStatsForParty_totalRewardsReceived(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthCallSpec_requiredConfirmations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStatsForParty", + Object: "EthCallSpec", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FeesStatsForParty_refereesDiscountApplied(ctx context.Context, field graphql.CollectedField, obj *v2.FeesStatsForParty) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStatsForParty_refereesDiscountApplied(ctx, field) +func (ec *executionContext) _EthCallSpec_normalisers(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthCallSpec_normalisers(ctx, field) if err != nil { return graphql.Null } @@ -32278,38 +34887,41 @@ func (ec *executionContext) _FeesStatsForParty_refereesDiscountApplied(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RefereesDiscountApplied, nil + return ec.resolvers.EthCallSpec().Normalisers(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*Normaliser) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalONormaliser2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐNormaliserᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStatsForParty_refereesDiscountApplied(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthCallSpec_normalisers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStatsForParty", + Object: "EthCallSpec", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "name": + return ec.fieldContext_Normaliser_name(ctx, field) + case "expression": + return ec.fieldContext_Normaliser_expression(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Normaliser", field.Name) }, } return fc, nil } -func (ec *executionContext) _FeesStatsForParty_volumeDiscountApplied(ctx context.Context, field graphql.CollectedField, obj *v2.FeesStatsForParty) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStatsForParty_volumeDiscountApplied(ctx, field) +func (ec *executionContext) _EthCallSpec_filters(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthCallSpec_filters(ctx, field) if err != nil { return graphql.Null } @@ -32322,38 +34934,41 @@ func (ec *executionContext) _FeesStatsForParty_volumeDiscountApplied(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.VolumeDiscountApplied, nil + return ec.resolvers.EthCallSpec().Filters(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*Filter) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOFilter2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐFilterᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStatsForParty_volumeDiscountApplied(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthCallSpec_filters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStatsForParty", + Object: "EthCallSpec", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "key": + return ec.fieldContext_Filter_key(ctx, field) + case "conditions": + return ec.fieldContext_Filter_conditions(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Filter", field.Name) }, } return fc, nil } -func (ec *executionContext) _FeesStatsForParty_totalMakerFeesReceived(ctx context.Context, field graphql.CollectedField, obj *v2.FeesStatsForParty) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FeesStatsForParty_totalMakerFeesReceived(ctx, field) +func (ec *executionContext) _EthCallSpec_sourceChainId(ctx context.Context, field graphql.CollectedField, obj *vega.EthCallSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthCallSpec_sourceChainId(ctx, field) if err != nil { return graphql.Null } @@ -32366,7 +34981,7 @@ func (ec *executionContext) _FeesStatsForParty_totalMakerFeesReceived(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalMakerFeesReceived, nil + return ec.resolvers.EthCallSpec().SourceChainID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -32378,26 +34993,26 @@ func (ec *executionContext) _FeesStatsForParty_totalMakerFeesReceived(ctx contex } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FeesStatsForParty_totalMakerFeesReceived(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthCallSpec_sourceChainId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FeesStatsForParty", + Object: "EthCallSpec", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Filter_key(ctx context.Context, field graphql.CollectedField, obj *Filter) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Filter_key(ctx, field) +func (ec *executionContext) _EthCallTrigger_trigger(ctx context.Context, field graphql.CollectedField, obj *EthCallTrigger) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthCallTrigger_trigger(ctx, field) if err != nil { return graphql.Null } @@ -32410,7 +35025,7 @@ func (ec *executionContext) _Filter_key(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Key, nil + return obj.Trigger, nil }) if err != nil { ec.Error(ctx, err) @@ -32422,34 +35037,26 @@ func (ec *executionContext) _Filter_key(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.(*PropertyKey) + res := resTmp.(TriggerKind) fc.Result = res - return ec.marshalNPropertyKey2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPropertyKey(ctx, field.Selections, res) + return ec.marshalNTriggerKind2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTriggerKind(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Filter_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthCallTrigger_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Filter", + Object: "EthCallTrigger", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_PropertyKey_name(ctx, field) - case "type": - return ec.fieldContext_PropertyKey_type(ctx, field) - case "numberDecimalPlaces": - return ec.fieldContext_PropertyKey_numberDecimalPlaces(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PropertyKey", field.Name) + return nil, errors.New("field of type TriggerKind does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Filter_conditions(ctx context.Context, field graphql.CollectedField, obj *Filter) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Filter_conditions(ctx, field) +func (ec *executionContext) _EthTimeTrigger_initial(ctx context.Context, field graphql.CollectedField, obj *EthTimeTrigger) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthTimeTrigger_initial(ctx, field) if err != nil { return graphql.Null } @@ -32462,7 +35069,7 @@ func (ec *executionContext) _Filter_conditions(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Conditions, nil + return obj.Initial, nil }) if err != nil { ec.Error(ctx, err) @@ -32471,32 +35078,26 @@ func (ec *executionContext) _Filter_conditions(ctx context.Context, field graphq if resTmp == nil { return graphql.Null } - res := resTmp.([]*Condition) + res := resTmp.(*int64) fc.Result = res - return ec.marshalOCondition2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐConditionᚄ(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Filter_conditions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthTimeTrigger_initial(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Filter", + Object: "EthTimeTrigger", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "operator": - return ec.fieldContext_Condition_operator(ctx, field) - case "value": - return ec.fieldContext_Condition_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Condition", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FundingPayment_marketId(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPayment) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPayment_marketId(ctx, field) +func (ec *executionContext) _EthTimeTrigger_every(ctx context.Context, field graphql.CollectedField, obj *EthTimeTrigger) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthTimeTrigger_every(ctx, field) if err != nil { return graphql.Null } @@ -32509,38 +35110,35 @@ func (ec *executionContext) _FundingPayment_marketId(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return obj.Every, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPayment_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthTimeTrigger_every(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPayment", + Object: "EthTimeTrigger", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FundingPayment_partyId(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPayment) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPayment_partyId(ctx, field) +func (ec *executionContext) _EthTimeTrigger_until(ctx context.Context, field graphql.CollectedField, obj *EthTimeTrigger) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthTimeTrigger_until(ctx, field) if err != nil { return graphql.Null } @@ -32553,38 +35151,35 @@ func (ec *executionContext) _FundingPayment_partyId(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PartyId, nil + return obj.Until, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int64) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPayment_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthTimeTrigger_until(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPayment", + Object: "EthTimeTrigger", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FundingPayment_fundingPeriodSeq(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPayment) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPayment_fundingPeriodSeq(ctx, field) +func (ec *executionContext) _EthereumEvent_contractId(ctx context.Context, field graphql.CollectedField, obj *EthereumEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthereumEvent_contractId(ctx, field) if err != nil { return graphql.Null } @@ -32597,7 +35192,7 @@ func (ec *executionContext) _FundingPayment_fundingPeriodSeq(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.FundingPayment().FundingPeriodSeq(rctx, obj) + return obj.ContractID, nil }) if err != nil { ec.Error(ctx, err) @@ -32609,26 +35204,26 @@ func (ec *executionContext) _FundingPayment_fundingPeriodSeq(ctx context.Context } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPayment_fundingPeriodSeq(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthereumEvent_contractId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPayment", + Object: "EthereumEvent", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FundingPayment_amount(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPayment) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPayment_amount(ctx, field) +func (ec *executionContext) _EthereumEvent_event(ctx context.Context, field graphql.CollectedField, obj *EthereumEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthereumEvent_event(ctx, field) if err != nil { return graphql.Null } @@ -32641,23 +35236,26 @@ func (ec *executionContext) _FundingPayment_amount(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Amount, nil + return obj.Event, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPayment_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthereumEvent_event(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPayment", + Object: "EthereumEvent", Field: field, IsMethod: false, IsResolver: false, @@ -32668,8 +35266,8 @@ func (ec *executionContext) fieldContext_FundingPayment_amount(ctx context.Conte return fc, nil } -func (ec *executionContext) _FundingPayment_timestamp(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPayment) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPayment_timestamp(ctx, field) +func (ec *executionContext) _EthereumKeyRotation_nodeId(ctx context.Context, field graphql.CollectedField, obj *v1.EthereumKeyRotation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthereumKeyRotation_nodeId(ctx, field) if err != nil { return graphql.Null } @@ -32682,7 +35280,7 @@ func (ec *executionContext) _FundingPayment_timestamp(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Timestamp, nil + return obj.NodeId, nil }) if err != nil { ec.Error(ctx, err) @@ -32694,26 +35292,26 @@ func (ec *executionContext) _FundingPayment_timestamp(ctx context.Context, field } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPayment_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthereumKeyRotation_nodeId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPayment", + Object: "EthereumKeyRotation", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FundingPaymentConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPaymentConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPaymentConnection_edges(ctx, field) +func (ec *executionContext) _EthereumKeyRotation_oldAddress(ctx context.Context, field graphql.CollectedField, obj *v1.EthereumKeyRotation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthereumKeyRotation_oldAddress(ctx, field) if err != nil { return graphql.Null } @@ -32726,7 +35324,7 @@ func (ec *executionContext) _FundingPaymentConnection_edges(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.OldAddress, nil }) if err != nil { ec.Error(ctx, err) @@ -32738,32 +35336,26 @@ func (ec *executionContext) _FundingPaymentConnection_edges(ctx context.Context, } return graphql.Null } - res := resTmp.([]*v2.FundingPaymentEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalNFundingPaymentEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPaymentEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPaymentConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthereumKeyRotation_oldAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPaymentConnection", + Object: "EthereumKeyRotation", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_FundingPaymentEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_FundingPaymentEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type FundingPaymentEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FundingPaymentConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPaymentConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPaymentConnection_pageInfo(ctx, field) +func (ec *executionContext) _EthereumKeyRotation_newAddress(ctx context.Context, field graphql.CollectedField, obj *v1.EthereumKeyRotation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthereumKeyRotation_newAddress(ctx, field) if err != nil { return graphql.Null } @@ -32776,7 +35368,7 @@ func (ec *executionContext) _FundingPaymentConnection_pageInfo(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.NewAddress, nil }) if err != nil { ec.Error(ctx, err) @@ -32788,36 +35380,26 @@ func (ec *executionContext) _FundingPaymentConnection_pageInfo(ctx context.Conte } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(string) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPaymentConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthereumKeyRotation_newAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPaymentConnection", + Object: "EthereumKeyRotation", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FundingPaymentEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPaymentEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPaymentEdge_node(ctx, field) +func (ec *executionContext) _EthereumKeyRotation_blockHeight(ctx context.Context, field graphql.CollectedField, obj *v1.EthereumKeyRotation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthereumKeyRotation_blockHeight(ctx, field) if err != nil { return graphql.Null } @@ -32830,7 +35412,7 @@ func (ec *executionContext) _FundingPaymentEdge_node(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.EthereumKeyRotation().BlockHeight(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -32842,38 +35424,26 @@ func (ec *executionContext) _FundingPaymentEdge_node(ctx context.Context, field } return graphql.Null } - res := resTmp.(*v2.FundingPayment) + res := resTmp.(string) fc.Result = res - return ec.marshalNFundingPayment2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPayment(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPaymentEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthereumKeyRotation_blockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPaymentEdge", + Object: "EthereumKeyRotation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "marketId": - return ec.fieldContext_FundingPayment_marketId(ctx, field) - case "partyId": - return ec.fieldContext_FundingPayment_partyId(ctx, field) - case "fundingPeriodSeq": - return ec.fieldContext_FundingPayment_fundingPeriodSeq(ctx, field) - case "amount": - return ec.fieldContext_FundingPayment_amount(ctx, field) - case "timestamp": - return ec.fieldContext_FundingPayment_timestamp(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type FundingPayment", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FundingPaymentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPaymentEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPaymentEdge_cursor(ctx, field) +func (ec *executionContext) _EthereumKeyRotationEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.EthereumKeyRotationEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthereumKeyRotationEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -32886,7 +35456,7 @@ func (ec *executionContext) _FundingPaymentEdge_cursor(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -32898,26 +35468,36 @@ func (ec *executionContext) _FundingPaymentEdge_cursor(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v1.EthereumKeyRotation) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNEthereumKeyRotation2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐEthereumKeyRotation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPaymentEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthereumKeyRotationEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPaymentEdge", + Object: "EthereumKeyRotationEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "nodeId": + return ec.fieldContext_EthereumKeyRotation_nodeId(ctx, field) + case "oldAddress": + return ec.fieldContext_EthereumKeyRotation_oldAddress(ctx, field) + case "newAddress": + return ec.fieldContext_EthereumKeyRotation_newAddress(ctx, field) + case "blockHeight": + return ec.fieldContext_EthereumKeyRotation_blockHeight(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type EthereumKeyRotation", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriod_marketId(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriod_marketId(ctx, field) +func (ec *executionContext) _EthereumKeyRotationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.EthereumKeyRotationEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthereumKeyRotationEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -32930,38 +35510,35 @@ func (ec *executionContext) _FundingPeriod_marketId(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriod_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthereumKeyRotationEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriod", + Object: "EthereumKeyRotationEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FundingPeriod_seq(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriod_seq(ctx, field) +func (ec *executionContext) _EthereumKeyRotationsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.EthereumKeyRotationsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthereumKeyRotationsConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -32974,7 +35551,7 @@ func (ec *executionContext) _FundingPeriod_seq(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.FundingPeriod().Seq(rctx, obj) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -32986,26 +35563,32 @@ func (ec *executionContext) _FundingPeriod_seq(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(int) + res := resTmp.([]*v2.EthereumKeyRotationEdge) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNEthereumKeyRotationEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEthereumKeyRotationEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriod_seq(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthereumKeyRotationsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriod", + Object: "EthereumKeyRotationsConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_EthereumKeyRotationEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_EthereumKeyRotationEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type EthereumKeyRotationEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriod_startTime(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriod_startTime(ctx, field) +func (ec *executionContext) _EthereumKeyRotationsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.EthereumKeyRotationsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EthereumKeyRotationsConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -33018,38 +35601,45 @@ func (ec *executionContext) _FundingPeriod_startTime(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.FundingPeriod().StartTime(rctx, obj) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriod_startTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EthereumKeyRotationsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriod", + Object: "EthereumKeyRotationsConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriod_endTime(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriod_endTime(ctx, field) +func (ec *executionContext) _ExternalData_data(ctx context.Context, field graphql.CollectedField, obj *ExternalData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ExternalData_data(ctx, field) if err != nil { return graphql.Null } @@ -33062,35 +35652,50 @@ func (ec *executionContext) _FundingPeriod_endTime(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.FundingPeriod().EndTime(rctx, obj) + return obj.Data, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*int64) + res := resTmp.(*Data) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalNData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐData(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriod_endTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalData_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriod", + Object: "ExternalData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "signers": + return ec.fieldContext_Data_signers(ctx, field) + case "data": + return ec.fieldContext_Data_data(ctx, field) + case "metaData": + return ec.fieldContext_Data_metaData(ctx, field) + case "matchedSpecIds": + return ec.fieldContext_Data_matchedSpecIds(ctx, field) + case "broadcastAt": + return ec.fieldContext_Data_broadcastAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriod_fundingPayment(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriod_fundingPayment(ctx, field) +func (ec *executionContext) _ExternalDataSourceSpec_spec(ctx context.Context, field graphql.CollectedField, obj *ExternalDataSourceSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ExternalDataSourceSpec_spec(ctx, field) if err != nil { return graphql.Null } @@ -33103,35 +35708,50 @@ func (ec *executionContext) _FundingPeriod_fundingPayment(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.FundingPayment, nil + return obj.Spec, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*DataSourceSpec) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNDataSourceSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriod_fundingPayment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ExternalDataSourceSpec_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriod", + Object: "ExternalDataSourceSpec", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_DataSourceSpec_id(ctx, field) + case "createdAt": + return ec.fieldContext_DataSourceSpec_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_DataSourceSpec_updatedAt(ctx, field) + case "data": + return ec.fieldContext_DataSourceSpec_data(ctx, field) + case "status": + return ec.fieldContext_DataSourceSpec_status(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceSpec", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriod_fundingRate(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriod_fundingRate(ctx, field) +func (ec *executionContext) _FeeEstimate_fees(ctx context.Context, field graphql.CollectedField, obj *FeeEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeeEstimate_fees(ctx, field) if err != nil { return graphql.Null } @@ -33144,35 +35764,58 @@ func (ec *executionContext) _FundingPeriod_fundingRate(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.FundingRate, nil + return obj.Fees, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*TradeFee) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNTradeFee2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTradeFee(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriod_fundingRate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeeEstimate_fees(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriod", + Object: "FeeEstimate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "makerFee": + return ec.fieldContext_TradeFee_makerFee(ctx, field) + case "infrastructureFee": + return ec.fieldContext_TradeFee_infrastructureFee(ctx, field) + case "liquidityFee": + return ec.fieldContext_TradeFee_liquidityFee(ctx, field) + case "makerFeeReferralDiscount": + return ec.fieldContext_TradeFee_makerFeeReferralDiscount(ctx, field) + case "makerFeeVolumeDiscount": + return ec.fieldContext_TradeFee_makerFeeVolumeDiscount(ctx, field) + case "infrastructureFeeReferralDiscount": + return ec.fieldContext_TradeFee_infrastructureFeeReferralDiscount(ctx, field) + case "infrastructureFeeVolumeDiscount": + return ec.fieldContext_TradeFee_infrastructureFeeVolumeDiscount(ctx, field) + case "liquidityFeeReferralDiscount": + return ec.fieldContext_TradeFee_liquidityFeeReferralDiscount(ctx, field) + case "liquidityFeeVolumeDiscount": + return ec.fieldContext_TradeFee_liquidityFeeVolumeDiscount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TradeFee", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriod_externalTwap(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriod_externalTwap(ctx, field) +func (ec *executionContext) _FeeEstimate_totalFeeAmount(ctx context.Context, field graphql.CollectedField, obj *FeeEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeeEstimate_totalFeeAmount(ctx, field) if err != nil { return graphql.Null } @@ -33185,23 +35828,26 @@ func (ec *executionContext) _FundingPeriod_externalTwap(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ExternalTwap, nil + return obj.TotalFeeAmount, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriod_externalTwap(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeeEstimate_totalFeeAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriod", + Object: "FeeEstimate", Field: field, IsMethod: false, IsResolver: false, @@ -33212,8 +35858,8 @@ func (ec *executionContext) fieldContext_FundingPeriod_externalTwap(ctx context. return fc, nil } -func (ec *executionContext) _FundingPeriod_internalTwap(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriod_internalTwap(ctx, field) +func (ec *executionContext) _FeeFactors_makerFee(ctx context.Context, field graphql.CollectedField, obj *vega.FeeFactors) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeeFactors_makerFee(ctx, field) if err != nil { return graphql.Null } @@ -33226,23 +35872,26 @@ func (ec *executionContext) _FundingPeriod_internalTwap(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InternalTwap, nil + return obj.MakerFee, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriod_internalTwap(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeeFactors_makerFee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriod", + Object: "FeeFactors", Field: field, IsMethod: false, IsResolver: false, @@ -33253,8 +35902,8 @@ func (ec *executionContext) fieldContext_FundingPeriod_internalTwap(ctx context. return fc, nil } -func (ec *executionContext) _FundingPeriodConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodConnection_edges(ctx, field) +func (ec *executionContext) _FeeFactors_infrastructureFee(ctx context.Context, field graphql.CollectedField, obj *vega.FeeFactors) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeeFactors_infrastructureFee(ctx, field) if err != nil { return graphql.Null } @@ -33267,7 +35916,7 @@ func (ec *executionContext) _FundingPeriodConnection_edges(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.InfrastructureFee, nil }) if err != nil { ec.Error(ctx, err) @@ -33279,32 +35928,26 @@ func (ec *executionContext) _FundingPeriodConnection_edges(ctx context.Context, } return graphql.Null } - res := resTmp.([]*v2.FundingPeriodEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalNFundingPeriodEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeeFactors_infrastructureFee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodConnection", + Object: "FeeFactors", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_FundingPeriodEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_FundingPeriodEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type FundingPeriodEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FundingPeriodConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodConnection_pageInfo(ctx, field) +func (ec *executionContext) _FeeFactors_liquidityFee(ctx context.Context, field graphql.CollectedField, obj *vega.FeeFactors) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeeFactors_liquidityFee(ctx, field) if err != nil { return graphql.Null } @@ -33317,7 +35960,7 @@ func (ec *executionContext) _FundingPeriodConnection_pageInfo(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.LiquidityFee, nil }) if err != nil { ec.Error(ctx, err) @@ -33329,36 +35972,26 @@ func (ec *executionContext) _FundingPeriodConnection_pageInfo(ctx context.Contex } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(string) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeeFactors_liquidityFee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodConnection", + Object: "FeeFactors", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FundingPeriodDataPoint_marketId(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriodDataPoint) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodDataPoint_marketId(ctx, field) +func (ec *executionContext) _Fees_factors(ctx context.Context, field graphql.CollectedField, obj *vega.Fees) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Fees_factors(ctx, field) if err != nil { return graphql.Null } @@ -33371,7 +36004,7 @@ func (ec *executionContext) _FundingPeriodDataPoint_marketId(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return obj.Factors, nil }) if err != nil { ec.Error(ctx, err) @@ -33383,26 +36016,34 @@ func (ec *executionContext) _FundingPeriodDataPoint_marketId(ctx context.Context } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.FeeFactors) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNFeeFactors2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐFeeFactors(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodDataPoint_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Fees_factors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodDataPoint", + Object: "Fees", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "makerFee": + return ec.fieldContext_FeeFactors_makerFee(ctx, field) + case "infrastructureFee": + return ec.fieldContext_FeeFactors_infrastructureFee(ctx, field) + case "liquidityFee": + return ec.fieldContext_FeeFactors_liquidityFee(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type FeeFactors", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriodDataPoint_seq(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriodDataPoint) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodDataPoint_seq(ctx, field) +func (ec *executionContext) _Fees_liquidityFeeSettings(ctx context.Context, field graphql.CollectedField, obj *vega.Fees) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Fees_liquidityFeeSettings(ctx, field) if err != nil { return graphql.Null } @@ -33415,38 +36056,41 @@ func (ec *executionContext) _FundingPeriodDataPoint_seq(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.FundingPeriodDataPoint().Seq(rctx, obj) + return obj.LiquidityFeeSettings, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*vega.LiquidityFeeSettings) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOLiquidityFeeSettings2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityFeeSettings(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodDataPoint_seq(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Fees_liquidityFeeSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodDataPoint", + Object: "Fees", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "method": + return ec.fieldContext_LiquidityFeeSettings_method(ctx, field) + case "feeConstant": + return ec.fieldContext_LiquidityFeeSettings_feeConstant(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityFeeSettings", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriodDataPoint_dataPointSource(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriodDataPoint) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodDataPoint_dataPointSource(ctx, field) +func (ec *executionContext) _FeesStats_marketId(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStats_marketId(ctx, field) if err != nil { return graphql.Null } @@ -33459,35 +36103,38 @@ func (ec *executionContext) _FundingPeriodDataPoint_dataPointSource(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.FundingPeriodDataPoint().DataPointSource(rctx, obj) + return ec.resolvers.FeesStats().MarketID(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v1.FundingPeriodDataPoint_Source) + res := resTmp.(string) fc.Result = res - return ec.marshalOFundingPeriodDataPointSource2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriodDataPoint_Source(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodDataPoint_dataPointSource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStats_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodDataPoint", + Object: "FeesStats", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type FundingPeriodDataPointSource does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FundingPeriodDataPoint_price(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriodDataPoint) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodDataPoint_price(ctx, field) +func (ec *executionContext) _FeesStats_assetId(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStats_assetId(ctx, field) if err != nil { return graphql.Null } @@ -33500,7 +36147,7 @@ func (ec *executionContext) _FundingPeriodDataPoint_price(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Price, nil + return ec.resolvers.FeesStats().AssetID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -33517,12 +36164,12 @@ func (ec *executionContext) _FundingPeriodDataPoint_price(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodDataPoint_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStats_assetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodDataPoint", + Object: "FeesStats", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -33530,8 +36177,8 @@ func (ec *executionContext) fieldContext_FundingPeriodDataPoint_price(ctx contex return fc, nil } -func (ec *executionContext) _FundingPeriodDataPoint_twap(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriodDataPoint) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodDataPoint_twap(ctx, field) +func (ec *executionContext) _FeesStats_epoch(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStats_epoch(ctx, field) if err != nil { return graphql.Null } @@ -33544,35 +36191,38 @@ func (ec *executionContext) _FundingPeriodDataPoint_twap(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Twap, nil + return ec.resolvers.FeesStats().Epoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodDataPoint_twap(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStats_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodDataPoint", + Object: "FeesStats", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FundingPeriodDataPoint_timestamp(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriodDataPoint) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodDataPoint_timestamp(ctx, field) +func (ec *executionContext) _FeesStats_totalRewardsReceived(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStats_totalRewardsReceived(ctx, field) if err != nil { return graphql.Null } @@ -33585,7 +36235,7 @@ func (ec *executionContext) _FundingPeriodDataPoint_timestamp(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Timestamp, nil + return obj.TotalRewardsReceived, nil }) if err != nil { ec.Error(ctx, err) @@ -33597,26 +36247,32 @@ func (ec *executionContext) _FundingPeriodDataPoint_timestamp(ctx context.Contex } return graphql.Null } - res := resTmp.(int64) + res := resTmp.([]*v1.PartyAmount) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodDataPoint_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStats_totalRewardsReceived(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodDataPoint", + Object: "FeesStats", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "partyId": + return ec.fieldContext_PartyAmount_partyId(ctx, field) + case "amount": + return ec.fieldContext_PartyAmount_amount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriodDataPointConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodDataPointConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodDataPointConnection_edges(ctx, field) +func (ec *executionContext) _FeesStats_referrerRewardsGenerated(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStats_referrerRewardsGenerated(ctx, field) if err != nil { return graphql.Null } @@ -33629,7 +36285,7 @@ func (ec *executionContext) _FundingPeriodDataPointConnection_edges(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.ReferrerRewardsGenerated, nil }) if err != nil { ec.Error(ctx, err) @@ -33641,32 +36297,32 @@ func (ec *executionContext) _FundingPeriodDataPointConnection_edges(ctx context. } return graphql.Null } - res := resTmp.([]*v2.FundingPeriodDataPointEdge) + res := resTmp.([]*v1.ReferrerRewardsGenerated) fc.Result = res - return ec.marshalNFundingPeriodDataPointEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNReferrerRewardsGenerated2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐReferrerRewardsGeneratedᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodDataPointConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStats_referrerRewardsGenerated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodDataPointConnection", + Object: "FeesStats", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_FundingPeriodDataPointEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_FundingPeriodDataPointEdge_cursor(ctx, field) + case "referrerId": + return ec.fieldContext_ReferrerRewardsGenerated_referrerId(ctx, field) + case "generatedReward": + return ec.fieldContext_ReferrerRewardsGenerated_generatedReward(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type FundingPeriodDataPointEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ReferrerRewardsGenerated", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriodDataPointConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodDataPointConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodDataPointConnection_pageInfo(ctx, field) +func (ec *executionContext) _FeesStats_refereesDiscountApplied(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStats_refereesDiscountApplied(ctx, field) if err != nil { return graphql.Null } @@ -33679,7 +36335,7 @@ func (ec *executionContext) _FundingPeriodDataPointConnection_pageInfo(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.RefereesDiscountApplied, nil }) if err != nil { ec.Error(ctx, err) @@ -33691,36 +36347,32 @@ func (ec *executionContext) _FundingPeriodDataPointConnection_pageInfo(ctx conte } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.([]*v1.PartyAmount) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodDataPointConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStats_refereesDiscountApplied(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodDataPointConnection", + Object: "FeesStats", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "partyId": + return ec.fieldContext_PartyAmount_partyId(ctx, field) + case "amount": + return ec.fieldContext_PartyAmount_amount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriodDataPointEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodDataPointEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodDataPointEdge_node(ctx, field) +func (ec *executionContext) _FeesStats_volumeDiscountApplied(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStats_volumeDiscountApplied(ctx, field) if err != nil { return graphql.Null } @@ -33733,7 +36385,7 @@ func (ec *executionContext) _FundingPeriodDataPointEdge_node(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.VolumeDiscountApplied, nil }) if err != nil { ec.Error(ctx, err) @@ -33745,40 +36397,32 @@ func (ec *executionContext) _FundingPeriodDataPointEdge_node(ctx context.Context } return graphql.Null } - res := resTmp.(*v1.FundingPeriodDataPoint) + res := resTmp.([]*v1.PartyAmount) fc.Result = res - return ec.marshalNFundingPeriodDataPoint2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriodDataPoint(ctx, field.Selections, res) + return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodDataPointEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStats_volumeDiscountApplied(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodDataPointEdge", + Object: "FeesStats", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "marketId": - return ec.fieldContext_FundingPeriodDataPoint_marketId(ctx, field) - case "seq": - return ec.fieldContext_FundingPeriodDataPoint_seq(ctx, field) - case "dataPointSource": - return ec.fieldContext_FundingPeriodDataPoint_dataPointSource(ctx, field) - case "price": - return ec.fieldContext_FundingPeriodDataPoint_price(ctx, field) - case "twap": - return ec.fieldContext_FundingPeriodDataPoint_twap(ctx, field) - case "timestamp": - return ec.fieldContext_FundingPeriodDataPoint_timestamp(ctx, field) + case "partyId": + return ec.fieldContext_PartyAmount_partyId(ctx, field) + case "amount": + return ec.fieldContext_PartyAmount_amount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type FundingPeriodDataPoint", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriodDataPointEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodDataPointEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodDataPointEdge_cursor(ctx, field) +func (ec *executionContext) _FeesStats_totalMakerFeesReceived(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStats_totalMakerFeesReceived(ctx, field) if err != nil { return graphql.Null } @@ -33791,7 +36435,7 @@ func (ec *executionContext) _FundingPeriodDataPointEdge_cursor(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.TotalMakerFeesReceived, nil }) if err != nil { ec.Error(ctx, err) @@ -33803,26 +36447,32 @@ func (ec *executionContext) _FundingPeriodDataPointEdge_cursor(ctx context.Conte } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v1.PartyAmount) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodDataPointEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStats_totalMakerFeesReceived(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodDataPointEdge", + Object: "FeesStats", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "partyId": + return ec.fieldContext_PartyAmount_partyId(ctx, field) + case "amount": + return ec.fieldContext_PartyAmount_amount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriodEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodEdge_node(ctx, field) +func (ec *executionContext) _FeesStats_makerFeesGenerated(ctx context.Context, field graphql.CollectedField, obj *v1.FeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStats_makerFeesGenerated(ctx, field) if err != nil { return graphql.Null } @@ -33835,7 +36485,7 @@ func (ec *executionContext) _FundingPeriodEdge_node(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.MakerFeesGenerated, nil }) if err != nil { ec.Error(ctx, err) @@ -33847,44 +36497,32 @@ func (ec *executionContext) _FundingPeriodEdge_node(ctx context.Context, field g } return graphql.Null } - res := resTmp.(*v1.FundingPeriod) + res := resTmp.([]*v1.MakerFeesGenerated) fc.Result = res - return ec.marshalNFundingPeriod2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriod(ctx, field.Selections, res) + return ec.marshalNMakerFeesGenerated2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐMakerFeesGeneratedᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStats_makerFeesGenerated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodEdge", + Object: "FeesStats", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "marketId": - return ec.fieldContext_FundingPeriod_marketId(ctx, field) - case "seq": - return ec.fieldContext_FundingPeriod_seq(ctx, field) - case "startTime": - return ec.fieldContext_FundingPeriod_startTime(ctx, field) - case "endTime": - return ec.fieldContext_FundingPeriod_endTime(ctx, field) - case "fundingPayment": - return ec.fieldContext_FundingPeriod_fundingPayment(ctx, field) - case "fundingRate": - return ec.fieldContext_FundingPeriod_fundingRate(ctx, field) - case "externalTwap": - return ec.fieldContext_FundingPeriod_externalTwap(ctx, field) - case "internalTwap": - return ec.fieldContext_FundingPeriod_internalTwap(ctx, field) + case "taker": + return ec.fieldContext_MakerFeesGenerated_taker(ctx, field) + case "makerFeesPaid": + return ec.fieldContext_MakerFeesGenerated_makerFeesPaid(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type FundingPeriod", field.Name) + return nil, fmt.Errorf("no field named %q was found under type MakerFeesGenerated", field.Name) }, } return fc, nil } -func (ec *executionContext) _FundingPeriodEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FundingPeriodEdge_cursor(ctx, field) +func (ec *executionContext) _FeesStatsForParty_assetId(ctx context.Context, field graphql.CollectedField, obj *v2.FeesStatsForParty) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStatsForParty_assetId(ctx, field) if err != nil { return graphql.Null } @@ -33897,7 +36535,7 @@ func (ec *executionContext) _FundingPeriodEdge_cursor(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.AssetId, nil }) if err != nil { ec.Error(ctx, err) @@ -33914,9 +36552,9 @@ func (ec *executionContext) _FundingPeriodEdge_cursor(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FundingPeriodEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStatsForParty_assetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FundingPeriodEdge", + Object: "FeesStatsForParty", Field: field, IsMethod: false, IsResolver: false, @@ -33927,8 +36565,8 @@ func (ec *executionContext) fieldContext_FundingPeriodEdge_cursor(ctx context.Co return fc, nil } -func (ec *executionContext) _Future_settlementAsset(ctx context.Context, field graphql.CollectedField, obj *vega.Future) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Future_settlementAsset(ctx, field) +func (ec *executionContext) _FeesStatsForParty_totalRewardsReceived(ctx context.Context, field graphql.CollectedField, obj *v2.FeesStatsForParty) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStatsForParty_totalRewardsReceived(ctx, field) if err != nil { return graphql.Null } @@ -33941,7 +36579,7 @@ func (ec *executionContext) _Future_settlementAsset(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Future().SettlementAsset(rctx, obj) + return obj.TotalRewardsReceived, nil }) if err != nil { ec.Error(ctx, err) @@ -33953,58 +36591,26 @@ func (ec *executionContext) _Future_settlementAsset(ctx context.Context, field g } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(string) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Future_settlementAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStatsForParty_totalRewardsReceived(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Future", + Object: "FeesStatsForParty", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Future_quoteName(ctx context.Context, field graphql.CollectedField, obj *vega.Future) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Future_quoteName(ctx, field) +func (ec *executionContext) _FeesStatsForParty_refereesDiscountApplied(ctx context.Context, field graphql.CollectedField, obj *v2.FeesStatsForParty) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStatsForParty_refereesDiscountApplied(ctx, field) if err != nil { return graphql.Null } @@ -34017,7 +36623,7 @@ func (ec *executionContext) _Future_quoteName(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.QuoteName, nil + return obj.RefereesDiscountApplied, nil }) if err != nil { ec.Error(ctx, err) @@ -34034,9 +36640,9 @@ func (ec *executionContext) _Future_quoteName(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Future_quoteName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStatsForParty_refereesDiscountApplied(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Future", + Object: "FeesStatsForParty", Field: field, IsMethod: false, IsResolver: false, @@ -34047,8 +36653,8 @@ func (ec *executionContext) fieldContext_Future_quoteName(ctx context.Context, f return fc, nil } -func (ec *executionContext) _Future_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField, obj *vega.Future) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Future_dataSourceSpecForSettlementData(ctx, field) +func (ec *executionContext) _FeesStatsForParty_volumeDiscountApplied(ctx context.Context, field graphql.CollectedField, obj *v2.FeesStatsForParty) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStatsForParty_volumeDiscountApplied(ctx, field) if err != nil { return graphql.Null } @@ -34061,7 +36667,7 @@ func (ec *executionContext) _Future_dataSourceSpecForSettlementData(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Future().DataSourceSpecForSettlementData(rctx, obj) + return obj.VolumeDiscountApplied, nil }) if err != nil { ec.Error(ctx, err) @@ -34073,38 +36679,26 @@ func (ec *executionContext) _Future_dataSourceSpecForSettlementData(ctx context. } return graphql.Null } - res := resTmp.(*DataSourceSpec) + res := resTmp.(string) fc.Result = res - return ec.marshalNDataSourceSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpec(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Future_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStatsForParty_volumeDiscountApplied(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Future", + Object: "FeesStatsForParty", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_DataSourceSpec_id(ctx, field) - case "createdAt": - return ec.fieldContext_DataSourceSpec_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_DataSourceSpec_updatedAt(ctx, field) - case "data": - return ec.fieldContext_DataSourceSpec_data(ctx, field) - case "status": - return ec.fieldContext_DataSourceSpec_status(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DataSourceSpec", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Future_dataSourceSpecForTradingTermination(ctx context.Context, field graphql.CollectedField, obj *vega.Future) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Future_dataSourceSpecForTradingTermination(ctx, field) +func (ec *executionContext) _FeesStatsForParty_totalMakerFeesReceived(ctx context.Context, field graphql.CollectedField, obj *v2.FeesStatsForParty) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FeesStatsForParty_totalMakerFeesReceived(ctx, field) if err != nil { return graphql.Null } @@ -34117,7 +36711,7 @@ func (ec *executionContext) _Future_dataSourceSpecForTradingTermination(ctx cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Future().DataSourceSpecForTradingTermination(rctx, obj) + return obj.TotalMakerFeesReceived, nil }) if err != nil { ec.Error(ctx, err) @@ -34129,38 +36723,26 @@ func (ec *executionContext) _Future_dataSourceSpecForTradingTermination(ctx cont } return graphql.Null } - res := resTmp.(*DataSourceSpec) + res := resTmp.(string) fc.Result = res - return ec.marshalNDataSourceSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpec(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Future_dataSourceSpecForTradingTermination(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FeesStatsForParty_totalMakerFeesReceived(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Future", + Object: "FeesStatsForParty", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_DataSourceSpec_id(ctx, field) - case "createdAt": - return ec.fieldContext_DataSourceSpec_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_DataSourceSpec_updatedAt(ctx, field) - case "data": - return ec.fieldContext_DataSourceSpec_data(ctx, field) - case "status": - return ec.fieldContext_DataSourceSpec_status(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DataSourceSpec", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Future_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField, obj *vega.Future) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Future_dataSourceSpecBinding(ctx, field) +func (ec *executionContext) _Filter_key(ctx context.Context, field graphql.CollectedField, obj *Filter) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Filter_key(ctx, field) if err != nil { return graphql.Null } @@ -34173,7 +36755,7 @@ func (ec *executionContext) _Future_dataSourceSpecBinding(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DataSourceSpecBinding, nil + return obj.Key, nil }) if err != nil { ec.Error(ctx, err) @@ -34185,32 +36767,34 @@ func (ec *executionContext) _Future_dataSourceSpecBinding(ctx context.Context, f } return graphql.Null } - res := resTmp.(*vega.DataSourceSpecToFutureBinding) + res := resTmp.(*PropertyKey) fc.Result = res - return ec.marshalNDataSourceSpecToFutureBinding2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceSpecToFutureBinding(ctx, field.Selections, res) + return ec.marshalNPropertyKey2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPropertyKey(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Future_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Filter_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Future", + Object: "Filter", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "settlementDataProperty": - return ec.fieldContext_DataSourceSpecToFutureBinding_settlementDataProperty(ctx, field) - case "tradingTerminationProperty": - return ec.fieldContext_DataSourceSpecToFutureBinding_tradingTerminationProperty(ctx, field) + case "name": + return ec.fieldContext_PropertyKey_name(ctx, field) + case "type": + return ec.fieldContext_PropertyKey_type(ctx, field) + case "numberDecimalPlaces": + return ec.fieldContext_PropertyKey_numberDecimalPlaces(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type DataSourceSpecToFutureBinding", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PropertyKey", field.Name) }, } return fc, nil } -func (ec *executionContext) _FutureProduct_settlementAsset(ctx context.Context, field graphql.CollectedField, obj *vega.FutureProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FutureProduct_settlementAsset(ctx, field) +func (ec *executionContext) _Filter_conditions(ctx context.Context, field graphql.CollectedField, obj *Filter) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Filter_conditions(ctx, field) if err != nil { return graphql.Null } @@ -34223,70 +36807,41 @@ func (ec *executionContext) _FutureProduct_settlementAsset(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.FutureProduct().SettlementAsset(rctx, obj) + return obj.Conditions, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.([]*Condition) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalOCondition2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐConditionᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FutureProduct_settlementAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Filter_conditions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FutureProduct", + Object: "Filter", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + case "operator": + return ec.fieldContext_Condition_operator(ctx, field) + case "value": + return ec.fieldContext_Condition_value(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Condition", field.Name) }, } return fc, nil } -func (ec *executionContext) _FutureProduct_quoteName(ctx context.Context, field graphql.CollectedField, obj *vega.FutureProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FutureProduct_quoteName(ctx, field) +func (ec *executionContext) _FundingPayment_marketId(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPayment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPayment_marketId(ctx, field) if err != nil { return graphql.Null } @@ -34299,7 +36854,7 @@ func (ec *executionContext) _FutureProduct_quoteName(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.QuoteName, nil + return obj.MarketId, nil }) if err != nil { ec.Error(ctx, err) @@ -34313,24 +36868,24 @@ func (ec *executionContext) _FutureProduct_quoteName(ctx context.Context, field } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FutureProduct_quoteName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPayment_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FutureProduct", + Object: "FundingPayment", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FutureProduct_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField, obj *vega.FutureProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FutureProduct_dataSourceSpecForSettlementData(ctx, field) +func (ec *executionContext) _FundingPayment_partyId(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPayment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPayment_partyId(ctx, field) if err != nil { return graphql.Null } @@ -34343,7 +36898,7 @@ func (ec *executionContext) _FutureProduct_dataSourceSpecForSettlementData(ctx c }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DataSourceSpecForSettlementData, nil + return obj.PartyId, nil }) if err != nil { ec.Error(ctx, err) @@ -34355,30 +36910,26 @@ func (ec *executionContext) _FutureProduct_dataSourceSpecForSettlementData(ctx c } return graphql.Null } - res := resTmp.(*vega.DataSourceDefinition) + res := resTmp.(string) fc.Result = res - return ec.marshalNDataSourceDefinition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FutureProduct_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPayment_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FutureProduct", + Object: "FundingPayment", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "sourceType": - return ec.fieldContext_DataSourceDefinition_sourceType(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DataSourceDefinition", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FutureProduct_dataSourceSpecForTradingTermination(ctx context.Context, field graphql.CollectedField, obj *vega.FutureProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FutureProduct_dataSourceSpecForTradingTermination(ctx, field) +func (ec *executionContext) _FundingPayment_fundingPeriodSeq(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPayment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPayment_fundingPeriodSeq(ctx, field) if err != nil { return graphql.Null } @@ -34391,7 +36942,7 @@ func (ec *executionContext) _FutureProduct_dataSourceSpecForTradingTermination(c }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DataSourceSpecForTradingTermination, nil + return ec.resolvers.FundingPayment().FundingPeriodSeq(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -34403,30 +36954,26 @@ func (ec *executionContext) _FutureProduct_dataSourceSpecForTradingTermination(c } return graphql.Null } - res := resTmp.(*vega.DataSourceDefinition) + res := resTmp.(int) fc.Result = res - return ec.marshalNDataSourceDefinition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FutureProduct_dataSourceSpecForTradingTermination(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPayment_fundingPeriodSeq(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FutureProduct", + Object: "FundingPayment", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "sourceType": - return ec.fieldContext_DataSourceDefinition_sourceType(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DataSourceDefinition", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _FutureProduct_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField, obj *vega.FutureProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_FutureProduct_dataSourceSpecBinding(ctx, field) +func (ec *executionContext) _FundingPayment_amount(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPayment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPayment_amount(ctx, field) if err != nil { return graphql.Null } @@ -34439,44 +36986,35 @@ func (ec *executionContext) _FutureProduct_dataSourceSpecBinding(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DataSourceSpecBinding, nil + return obj.Amount, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.DataSourceSpecToFutureBinding) + res := resTmp.(string) fc.Result = res - return ec.marshalNDataSourceSpecToFutureBinding2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceSpecToFutureBinding(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FutureProduct_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPayment_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "FutureProduct", + Object: "FundingPayment", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "settlementDataProperty": - return ec.fieldContext_DataSourceSpecToFutureBinding_settlementDataProperty(ctx, field) - case "tradingTerminationProperty": - return ec.fieldContext_DataSourceSpecToFutureBinding_tradingTerminationProperty(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DataSourceSpecToFutureBinding", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _HistorySegment_fromHeight(ctx context.Context, field graphql.CollectedField, obj *v2.HistorySegment) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_HistorySegment_fromHeight(ctx, field) +func (ec *executionContext) _FundingPayment_timestamp(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPayment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPayment_timestamp(ctx, field) if err != nil { return graphql.Null } @@ -34489,7 +37027,7 @@ func (ec *executionContext) _HistorySegment_fromHeight(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.FromHeight, nil + return obj.Timestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -34503,24 +37041,24 @@ func (ec *executionContext) _HistorySegment_fromHeight(ctx context.Context, fiel } res := resTmp.(int64) fc.Result = res - return ec.marshalNInt2int64(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HistorySegment_fromHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPayment_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "HistorySegment", + Object: "FundingPayment", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _HistorySegment_toHeight(ctx context.Context, field graphql.CollectedField, obj *v2.HistorySegment) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_HistorySegment_toHeight(ctx, field) +func (ec *executionContext) _FundingPaymentConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPaymentConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPaymentConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -34533,7 +37071,7 @@ func (ec *executionContext) _HistorySegment_toHeight(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ToHeight, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -34545,26 +37083,32 @@ func (ec *executionContext) _HistorySegment_toHeight(ctx context.Context, field } return graphql.Null } - res := resTmp.(int64) + res := resTmp.([]*v2.FundingPaymentEdge) fc.Result = res - return ec.marshalNInt2int64(ctx, field.Selections, res) + return ec.marshalNFundingPaymentEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPaymentEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HistorySegment_toHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPaymentConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "HistorySegment", + Object: "FundingPaymentConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_FundingPaymentEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_FundingPaymentEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type FundingPaymentEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _HistorySegment_historySegmentId(ctx context.Context, field graphql.CollectedField, obj *v2.HistorySegment) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_HistorySegment_historySegmentId(ctx, field) +func (ec *executionContext) _FundingPaymentConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPaymentConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPaymentConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -34577,7 +37121,7 @@ func (ec *executionContext) _HistorySegment_historySegmentId(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HistorySegmentId, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -34589,26 +37133,36 @@ func (ec *executionContext) _HistorySegment_historySegmentId(ctx context.Context } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HistorySegment_historySegmentId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPaymentConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "HistorySegment", + Object: "FundingPaymentConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _IcebergOrder_peakSize(ctx context.Context, field graphql.CollectedField, obj *vega.IcebergOrder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_IcebergOrder_peakSize(ctx, field) +func (ec *executionContext) _FundingPaymentEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPaymentEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPaymentEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -34621,7 +37175,7 @@ func (ec *executionContext) _IcebergOrder_peakSize(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.IcebergOrder().PeakSize(rctx, obj) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -34633,26 +37187,38 @@ func (ec *executionContext) _IcebergOrder_peakSize(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.FundingPayment) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNFundingPayment2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPayment(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IcebergOrder_peakSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPaymentEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "IcebergOrder", + Object: "FundingPaymentEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "marketId": + return ec.fieldContext_FundingPayment_marketId(ctx, field) + case "partyId": + return ec.fieldContext_FundingPayment_partyId(ctx, field) + case "fundingPeriodSeq": + return ec.fieldContext_FundingPayment_fundingPeriodSeq(ctx, field) + case "amount": + return ec.fieldContext_FundingPayment_amount(ctx, field) + case "timestamp": + return ec.fieldContext_FundingPayment_timestamp(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type FundingPayment", field.Name) }, } return fc, nil } -func (ec *executionContext) _IcebergOrder_minimumVisibleSize(ctx context.Context, field graphql.CollectedField, obj *vega.IcebergOrder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_IcebergOrder_minimumVisibleSize(ctx, field) +func (ec *executionContext) _FundingPaymentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPaymentEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPaymentEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -34665,7 +37231,7 @@ func (ec *executionContext) _IcebergOrder_minimumVisibleSize(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.IcebergOrder().MinimumVisibleSize(rctx, obj) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -34682,12 +37248,12 @@ func (ec *executionContext) _IcebergOrder_minimumVisibleSize(ctx context.Context return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IcebergOrder_minimumVisibleSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPaymentEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "IcebergOrder", + Object: "FundingPaymentEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -34695,8 +37261,8 @@ func (ec *executionContext) fieldContext_IcebergOrder_minimumVisibleSize(ctx con return fc, nil } -func (ec *executionContext) _IcebergOrder_reservedRemaining(ctx context.Context, field graphql.CollectedField, obj *vega.IcebergOrder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_IcebergOrder_reservedRemaining(ctx, field) +func (ec *executionContext) _FundingPeriod_marketId(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriod_marketId(ctx, field) if err != nil { return graphql.Null } @@ -34709,7 +37275,7 @@ func (ec *executionContext) _IcebergOrder_reservedRemaining(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.IcebergOrder().ReservedRemaining(rctx, obj) + return obj.MarketId, nil }) if err != nil { ec.Error(ctx, err) @@ -34723,24 +37289,24 @@ func (ec *executionContext) _IcebergOrder_reservedRemaining(ctx context.Context, } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IcebergOrder_reservedRemaining(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriod_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "IcebergOrder", + Object: "FundingPeriod", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Instrument_id(ctx context.Context, field graphql.CollectedField, obj *vega.Instrument) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Instrument_id(ctx, field) +func (ec *executionContext) _FundingPeriod_seq(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriod_seq(ctx, field) if err != nil { return graphql.Null } @@ -34753,7 +37319,7 @@ func (ec *executionContext) _Instrument_id(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return ec.resolvers.FundingPeriod().Seq(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -34765,26 +37331,26 @@ func (ec *executionContext) _Instrument_id(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Instrument_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriod_seq(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Instrument", + Object: "FundingPeriod", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Instrument_code(ctx context.Context, field graphql.CollectedField, obj *vega.Instrument) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Instrument_code(ctx, field) +func (ec *executionContext) _FundingPeriod_startTime(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriod_startTime(ctx, field) if err != nil { return graphql.Null } @@ -34797,7 +37363,7 @@ func (ec *executionContext) _Instrument_code(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Code, nil + return ec.resolvers.FundingPeriod().StartTime(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -34809,26 +37375,26 @@ func (ec *executionContext) _Instrument_code(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Instrument_code(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriod_startTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Instrument", + Object: "FundingPeriod", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Instrument_name(ctx context.Context, field graphql.CollectedField, obj *vega.Instrument) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Instrument_name(ctx, field) +func (ec *executionContext) _FundingPeriod_endTime(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriod_endTime(ctx, field) if err != nil { return graphql.Null } @@ -34841,38 +37407,35 @@ func (ec *executionContext) _Instrument_name(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return ec.resolvers.FundingPeriod().EndTime(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Instrument_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriod_endTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Instrument", + Object: "FundingPeriod", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Instrument_metadata(ctx context.Context, field graphql.CollectedField, obj *vega.Instrument) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Instrument_metadata(ctx, field) +func (ec *executionContext) _FundingPeriod_fundingPayment(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriod_fundingPayment(ctx, field) if err != nil { return graphql.Null } @@ -34885,42 +37448,35 @@ func (ec *executionContext) _Instrument_metadata(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Metadata, nil + return obj.FundingPayment, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.InstrumentMetadata) + res := resTmp.(*string) fc.Result = res - return ec.marshalNInstrumentMetadata2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐInstrumentMetadata(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Instrument_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriod_fundingPayment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Instrument", + Object: "FundingPeriod", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "tags": - return ec.fieldContext_InstrumentMetadata_tags(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type InstrumentMetadata", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Instrument_product(ctx context.Context, field graphql.CollectedField, obj *vega.Instrument) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Instrument_product(ctx, field) +func (ec *executionContext) _FundingPeriod_fundingRate(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriod_fundingRate(ctx, field) if err != nil { return graphql.Null } @@ -34933,38 +37489,35 @@ func (ec *executionContext) _Instrument_product(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Instrument().Product(rctx, obj) + return obj.FundingRate, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(Product) + res := resTmp.(*string) fc.Result = res - return ec.marshalNProduct2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProduct(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Instrument_product(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriod_fundingRate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Instrument", + Object: "FundingPeriod", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Product does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _InstrumentConfiguration_name(ctx context.Context, field graphql.CollectedField, obj *vega.InstrumentConfiguration) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_InstrumentConfiguration_name(ctx, field) +func (ec *executionContext) _FundingPeriod_externalTwap(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriod_externalTwap(ctx, field) if err != nil { return graphql.Null } @@ -34977,26 +37530,23 @@ func (ec *executionContext) _InstrumentConfiguration_name(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.ExternalTwap, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_InstrumentConfiguration_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriod_externalTwap(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "InstrumentConfiguration", + Object: "FundingPeriod", Field: field, IsMethod: false, IsResolver: false, @@ -35007,8 +37557,8 @@ func (ec *executionContext) fieldContext_InstrumentConfiguration_name(ctx contex return fc, nil } -func (ec *executionContext) _InstrumentConfiguration_code(ctx context.Context, field graphql.CollectedField, obj *vega.InstrumentConfiguration) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_InstrumentConfiguration_code(ctx, field) +func (ec *executionContext) _FundingPeriod_internalTwap(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriod) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriod_internalTwap(ctx, field) if err != nil { return graphql.Null } @@ -35021,26 +37571,23 @@ func (ec *executionContext) _InstrumentConfiguration_code(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Code, nil + return obj.InternalTwap, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_InstrumentConfiguration_code(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriod_internalTwap(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "InstrumentConfiguration", + Object: "FundingPeriod", Field: field, IsMethod: false, IsResolver: false, @@ -35051,8 +37598,8 @@ func (ec *executionContext) fieldContext_InstrumentConfiguration_code(ctx contex return fc, nil } -func (ec *executionContext) _InstrumentConfiguration_futureProduct(ctx context.Context, field graphql.CollectedField, obj *vega.InstrumentConfiguration) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_InstrumentConfiguration_futureProduct(ctx, field) +func (ec *executionContext) _FundingPeriodConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -35065,47 +37612,44 @@ func (ec *executionContext) _InstrumentConfiguration_futureProduct(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.InstrumentConfiguration().FutureProduct(rctx, obj) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.FutureProduct) + res := resTmp.([]*v2.FundingPeriodEdge) fc.Result = res - return ec.marshalOFutureProduct2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐFutureProduct(ctx, field.Selections, res) + return ec.marshalNFundingPeriodEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_InstrumentConfiguration_futureProduct(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "InstrumentConfiguration", + Object: "FundingPeriodConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "settlementAsset": - return ec.fieldContext_FutureProduct_settlementAsset(ctx, field) - case "quoteName": - return ec.fieldContext_FutureProduct_quoteName(ctx, field) - case "dataSourceSpecForSettlementData": - return ec.fieldContext_FutureProduct_dataSourceSpecForSettlementData(ctx, field) - case "dataSourceSpecForTradingTermination": - return ec.fieldContext_FutureProduct_dataSourceSpecForTradingTermination(ctx, field) - case "dataSourceSpecBinding": - return ec.fieldContext_FutureProduct_dataSourceSpecBinding(ctx, field) + case "node": + return ec.fieldContext_FundingPeriodEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_FundingPeriodEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type FutureProduct", field.Name) + return nil, fmt.Errorf("no field named %q was found under type FundingPeriodEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _InstrumentConfiguration_product(ctx context.Context, field graphql.CollectedField, obj *vega.InstrumentConfiguration) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_InstrumentConfiguration_product(ctx, field) +func (ec *executionContext) _FundingPeriodConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -35118,76 +37662,48 @@ func (ec *executionContext) _InstrumentConfiguration_product(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.InstrumentConfiguration().Product(rctx, obj) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - return graphql.Null - } - res := resTmp.(ProductConfiguration) - fc.Result = res - return ec.marshalOProductConfiguration2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProductConfiguration(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_InstrumentConfiguration_product(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "InstrumentConfiguration", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ProductConfiguration does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _InstrumentMetadata_tags(ctx context.Context, field graphql.CollectedField, obj *vega.InstrumentMetadata) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_InstrumentMetadata_tags(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Tags, nil - }) - if err != nil { - ec.Error(ctx, err) return graphql.Null } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_InstrumentMetadata_tags(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "InstrumentMetadata", + Object: "FundingPeriodConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _InternalTimeTrigger_initial(ctx context.Context, field graphql.CollectedField, obj *v13.InternalTimeTrigger) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_InternalTimeTrigger_initial(ctx, field) +func (ec *executionContext) _FundingPeriodDataPoint_marketId(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriodDataPoint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodDataPoint_marketId(ctx, field) if err != nil { return graphql.Null } @@ -35200,35 +37716,38 @@ func (ec *executionContext) _InternalTimeTrigger_initial(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Initial, nil + return obj.MarketId, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*int64) + res := resTmp.(string) fc.Result = res - return ec.marshalOInt2ᚖint64(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_InternalTimeTrigger_initial(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodDataPoint_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "InternalTimeTrigger", + Object: "FundingPeriodDataPoint", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _InternalTimeTrigger_every(ctx context.Context, field graphql.CollectedField, obj *v13.InternalTimeTrigger) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_InternalTimeTrigger_every(ctx, field) +func (ec *executionContext) _FundingPeriodDataPoint_seq(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriodDataPoint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodDataPoint_seq(ctx, field) if err != nil { return graphql.Null } @@ -35241,26 +37760,29 @@ func (ec *executionContext) _InternalTimeTrigger_every(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Every, nil + return ec.resolvers.FundingPeriodDataPoint().Seq(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(int) fc.Result = res - return ec.marshalOInt2int64(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_InternalTimeTrigger_every(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodDataPoint_seq(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "InternalTimeTrigger", + Object: "FundingPeriodDataPoint", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type Int does not have child fields") }, @@ -35268,8 +37790,8 @@ func (ec *executionContext) fieldContext_InternalTimeTrigger_every(ctx context.C return fc, nil } -func (ec *executionContext) _KeyRotation_nodeId(ctx context.Context, field graphql.CollectedField, obj *v1.KeyRotation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KeyRotation_nodeId(ctx, field) +func (ec *executionContext) _FundingPeriodDataPoint_dataPointSource(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriodDataPoint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodDataPoint_dataPointSource(ctx, field) if err != nil { return graphql.Null } @@ -35282,38 +37804,35 @@ func (ec *executionContext) _KeyRotation_nodeId(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NodeId, nil + return ec.resolvers.FundingPeriodDataPoint().DataPointSource(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v1.FundingPeriodDataPoint_Source) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOFundingPeriodDataPointSource2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriodDataPoint_Source(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KeyRotation_nodeId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodDataPoint_dataPointSource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KeyRotation", + Object: "FundingPeriodDataPoint", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type FundingPeriodDataPointSource does not have child fields") }, } return fc, nil } -func (ec *executionContext) _KeyRotation_oldPubKey(ctx context.Context, field graphql.CollectedField, obj *v1.KeyRotation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KeyRotation_oldPubKey(ctx, field) +func (ec *executionContext) _FundingPeriodDataPoint_price(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriodDataPoint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodDataPoint_price(ctx, field) if err != nil { return graphql.Null } @@ -35326,7 +37845,7 @@ func (ec *executionContext) _KeyRotation_oldPubKey(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.OldPubKey, nil + return obj.Price, nil }) if err != nil { ec.Error(ctx, err) @@ -35343,9 +37862,9 @@ func (ec *executionContext) _KeyRotation_oldPubKey(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KeyRotation_oldPubKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodDataPoint_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KeyRotation", + Object: "FundingPeriodDataPoint", Field: field, IsMethod: false, IsResolver: false, @@ -35356,8 +37875,8 @@ func (ec *executionContext) fieldContext_KeyRotation_oldPubKey(ctx context.Conte return fc, nil } -func (ec *executionContext) _KeyRotation_newPubKey(ctx context.Context, field graphql.CollectedField, obj *v1.KeyRotation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KeyRotation_newPubKey(ctx, field) +func (ec *executionContext) _FundingPeriodDataPoint_twap(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriodDataPoint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodDataPoint_twap(ctx, field) if err != nil { return graphql.Null } @@ -35370,26 +37889,23 @@ func (ec *executionContext) _KeyRotation_newPubKey(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NewPubKey, nil + return obj.Twap, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KeyRotation_newPubKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodDataPoint_twap(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KeyRotation", + Object: "FundingPeriodDataPoint", Field: field, IsMethod: false, IsResolver: false, @@ -35400,8 +37916,8 @@ func (ec *executionContext) fieldContext_KeyRotation_newPubKey(ctx context.Conte return fc, nil } -func (ec *executionContext) _KeyRotation_blockHeight(ctx context.Context, field graphql.CollectedField, obj *v1.KeyRotation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KeyRotation_blockHeight(ctx, field) +func (ec *executionContext) _FundingPeriodDataPoint_timestamp(ctx context.Context, field graphql.CollectedField, obj *v1.FundingPeriodDataPoint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodDataPoint_timestamp(ctx, field) if err != nil { return graphql.Null } @@ -35414,7 +37930,7 @@ func (ec *executionContext) _KeyRotation_blockHeight(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.KeyRotation().BlockHeight(rctx, obj) + return obj.Timestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -35426,26 +37942,26 @@ func (ec *executionContext) _KeyRotation_blockHeight(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KeyRotation_blockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodDataPoint_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KeyRotation", + Object: "FundingPeriodDataPoint", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _KeyRotationConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.KeyRotationConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KeyRotationConnection_edges(ctx, field) +func (ec *executionContext) _FundingPeriodDataPointConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodDataPointConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodDataPointConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -35465,34 +37981,37 @@ func (ec *executionContext) _KeyRotationConnection_edges(ctx context.Context, fi return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.KeyRotationEdge) + res := resTmp.([]*v2.FundingPeriodDataPointEdge) fc.Result = res - return ec.marshalOKeyRotationEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐKeyRotationEdge(ctx, field.Selections, res) + return ec.marshalNFundingPeriodDataPointEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KeyRotationConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodDataPointConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KeyRotationConnection", + Object: "FundingPeriodDataPointConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "node": - return ec.fieldContext_KeyRotationEdge_node(ctx, field) + return ec.fieldContext_FundingPeriodDataPointEdge_node(ctx, field) case "cursor": - return ec.fieldContext_KeyRotationEdge_cursor(ctx, field) + return ec.fieldContext_FundingPeriodDataPointEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type KeyRotationEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type FundingPeriodDataPointEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _KeyRotationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.KeyRotationConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KeyRotationConnection_pageInfo(ctx, field) +func (ec *executionContext) _FundingPeriodDataPointConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodDataPointConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodDataPointConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -35522,9 +38041,9 @@ func (ec *executionContext) _KeyRotationConnection_pageInfo(ctx context.Context, return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KeyRotationConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodDataPointConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KeyRotationConnection", + Object: "FundingPeriodDataPointConnection", Field: field, IsMethod: false, IsResolver: false, @@ -35545,8 +38064,8 @@ func (ec *executionContext) fieldContext_KeyRotationConnection_pageInfo(ctx cont return fc, nil } -func (ec *executionContext) _KeyRotationEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.KeyRotationEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KeyRotationEdge_node(ctx, field) +func (ec *executionContext) _FundingPeriodDataPointEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodDataPointEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodDataPointEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -35571,36 +38090,40 @@ func (ec *executionContext) _KeyRotationEdge_node(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(*v1.KeyRotation) + res := resTmp.(*v1.FundingPeriodDataPoint) fc.Result = res - return ec.marshalNKeyRotation2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐKeyRotation(ctx, field.Selections, res) + return ec.marshalNFundingPeriodDataPoint2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriodDataPoint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KeyRotationEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodDataPointEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KeyRotationEdge", + Object: "FundingPeriodDataPointEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "nodeId": - return ec.fieldContext_KeyRotation_nodeId(ctx, field) - case "oldPubKey": - return ec.fieldContext_KeyRotation_oldPubKey(ctx, field) - case "newPubKey": - return ec.fieldContext_KeyRotation_newPubKey(ctx, field) - case "blockHeight": - return ec.fieldContext_KeyRotation_blockHeight(ctx, field) + case "marketId": + return ec.fieldContext_FundingPeriodDataPoint_marketId(ctx, field) + case "seq": + return ec.fieldContext_FundingPeriodDataPoint_seq(ctx, field) + case "dataPointSource": + return ec.fieldContext_FundingPeriodDataPoint_dataPointSource(ctx, field) + case "price": + return ec.fieldContext_FundingPeriodDataPoint_price(ctx, field) + case "twap": + return ec.fieldContext_FundingPeriodDataPoint_twap(ctx, field) + case "timestamp": + return ec.fieldContext_FundingPeriodDataPoint_timestamp(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type KeyRotation", field.Name) + return nil, fmt.Errorf("no field named %q was found under type FundingPeriodDataPoint", field.Name) }, } return fc, nil } -func (ec *executionContext) _KeyRotationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.KeyRotationEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KeyRotationEdge_cursor(ctx, field) +func (ec *executionContext) _FundingPeriodDataPointEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodDataPointEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodDataPointEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -35630,9 +38153,9 @@ func (ec *executionContext) _KeyRotationEdge_cursor(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KeyRotationEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodDataPointEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KeyRotationEdge", + Object: "FundingPeriodDataPointEdge", Field: field, IsMethod: false, IsResolver: false, @@ -35643,8 +38166,8 @@ func (ec *executionContext) fieldContext_KeyRotationEdge_cursor(ctx context.Cont return fc, nil } -func (ec *executionContext) _LedgerEntry_fromAccountId(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LedgerEntry_fromAccountId(ctx, field) +func (ec *executionContext) _FundingPeriodEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -35657,7 +38180,7 @@ func (ec *executionContext) _LedgerEntry_fromAccountId(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.LedgerEntry().FromAccountID(rctx, obj) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -35669,36 +38192,44 @@ func (ec *executionContext) _LedgerEntry_fromAccountId(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(*vega.AccountDetails) + res := resTmp.(*v1.FundingPeriod) fc.Result = res - return ec.marshalNAccountDetails2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountDetails(ctx, field.Selections, res) + return ec.marshalNFundingPeriod2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriod(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LedgerEntry_fromAccountId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LedgerEntry", + Object: "FundingPeriodEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "assetId": - return ec.fieldContext_AccountDetails_assetId(ctx, field) - case "type": - return ec.fieldContext_AccountDetails_type(ctx, field) case "marketId": - return ec.fieldContext_AccountDetails_marketId(ctx, field) - case "partyId": - return ec.fieldContext_AccountDetails_partyId(ctx, field) + return ec.fieldContext_FundingPeriod_marketId(ctx, field) + case "seq": + return ec.fieldContext_FundingPeriod_seq(ctx, field) + case "startTime": + return ec.fieldContext_FundingPeriod_startTime(ctx, field) + case "endTime": + return ec.fieldContext_FundingPeriod_endTime(ctx, field) + case "fundingPayment": + return ec.fieldContext_FundingPeriod_fundingPayment(ctx, field) + case "fundingRate": + return ec.fieldContext_FundingPeriod_fundingRate(ctx, field) + case "externalTwap": + return ec.fieldContext_FundingPeriod_externalTwap(ctx, field) + case "internalTwap": + return ec.fieldContext_FundingPeriod_internalTwap(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type AccountDetails", field.Name) + return nil, fmt.Errorf("no field named %q was found under type FundingPeriod", field.Name) }, } return fc, nil } -func (ec *executionContext) _LedgerEntry_toAccountId(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LedgerEntry_toAccountId(ctx, field) +func (ec *executionContext) _FundingPeriodEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.FundingPeriodEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FundingPeriodEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -35711,7 +38242,7 @@ func (ec *executionContext) _LedgerEntry_toAccountId(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.LedgerEntry().ToAccountID(rctx, obj) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -35723,36 +38254,26 @@ func (ec *executionContext) _LedgerEntry_toAccountId(ctx context.Context, field } return graphql.Null } - res := resTmp.(*vega.AccountDetails) + res := resTmp.(string) fc.Result = res - return ec.marshalNAccountDetails2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountDetails(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LedgerEntry_toAccountId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FundingPeriodEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LedgerEntry", + Object: "FundingPeriodEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "assetId": - return ec.fieldContext_AccountDetails_assetId(ctx, field) - case "type": - return ec.fieldContext_AccountDetails_type(ctx, field) - case "marketId": - return ec.fieldContext_AccountDetails_marketId(ctx, field) - case "partyId": - return ec.fieldContext_AccountDetails_partyId(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type AccountDetails", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LedgerEntry_amount(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LedgerEntry_amount(ctx, field) +func (ec *executionContext) _Future_settlementAsset(ctx context.Context, field graphql.CollectedField, obj *vega.Future) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Future_settlementAsset(ctx, field) if err != nil { return graphql.Null } @@ -35765,7 +38286,7 @@ func (ec *executionContext) _LedgerEntry_amount(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Amount, nil + return ec.resolvers.Future().SettlementAsset(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -35777,26 +38298,58 @@ func (ec *executionContext) _LedgerEntry_amount(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Asset) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LedgerEntry_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Future_settlementAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LedgerEntry", + Object: "Future", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) }, } return fc, nil } -func (ec *executionContext) _LedgerEntry_type(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LedgerEntry_type(ctx, field) +func (ec *executionContext) _Future_quoteName(ctx context.Context, field graphql.CollectedField, obj *vega.Future) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Future_quoteName(ctx, field) if err != nil { return graphql.Null } @@ -35809,7 +38362,7 @@ func (ec *executionContext) _LedgerEntry_type(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.QuoteName, nil }) if err != nil { ec.Error(ctx, err) @@ -35821,26 +38374,26 @@ func (ec *executionContext) _LedgerEntry_type(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(vega.TransferType) + res := resTmp.(string) fc.Result = res - return ec.marshalNTransferType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTransferType(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LedgerEntry_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Future_quoteName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LedgerEntry", + Object: "Future", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type TransferType does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LedgerEntry_timestamp(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LedgerEntry_timestamp(ctx, field) +func (ec *executionContext) _Future_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField, obj *vega.Future) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Future_dataSourceSpecForSettlementData(ctx, field) if err != nil { return graphql.Null } @@ -35853,7 +38406,7 @@ func (ec *executionContext) _LedgerEntry_timestamp(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Timestamp, nil + return ec.resolvers.Future().DataSourceSpecForSettlementData(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -35865,26 +38418,38 @@ func (ec *executionContext) _LedgerEntry_timestamp(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*DataSourceSpec) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNDataSourceSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LedgerEntry_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Future_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LedgerEntry", + Object: "Future", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_DataSourceSpec_id(ctx, field) + case "createdAt": + return ec.fieldContext_DataSourceSpec_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_DataSourceSpec_updatedAt(ctx, field) + case "data": + return ec.fieldContext_DataSourceSpec_data(ctx, field) + case "status": + return ec.fieldContext_DataSourceSpec_status(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceSpec", field.Name) }, } return fc, nil } -func (ec *executionContext) _LedgerEntry_fromAccountBalance(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LedgerEntry_fromAccountBalance(ctx, field) +func (ec *executionContext) _Future_dataSourceSpecForTradingTermination(ctx context.Context, field graphql.CollectedField, obj *vega.Future) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Future_dataSourceSpecForTradingTermination(ctx, field) if err != nil { return graphql.Null } @@ -35897,7 +38462,7 @@ func (ec *executionContext) _LedgerEntry_fromAccountBalance(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.FromAccountBalance, nil + return ec.resolvers.Future().DataSourceSpecForTradingTermination(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -35909,26 +38474,38 @@ func (ec *executionContext) _LedgerEntry_fromAccountBalance(ctx context.Context, } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*DataSourceSpec) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDataSourceSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LedgerEntry_fromAccountBalance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Future_dataSourceSpecForTradingTermination(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LedgerEntry", + Object: "Future", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_DataSourceSpec_id(ctx, field) + case "createdAt": + return ec.fieldContext_DataSourceSpec_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_DataSourceSpec_updatedAt(ctx, field) + case "data": + return ec.fieldContext_DataSourceSpec_data(ctx, field) + case "status": + return ec.fieldContext_DataSourceSpec_status(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceSpec", field.Name) }, } return fc, nil } -func (ec *executionContext) _LedgerEntry_toAccountBalance(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LedgerEntry_toAccountBalance(ctx, field) +func (ec *executionContext) _Future_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField, obj *vega.Future) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Future_dataSourceSpecBinding(ctx, field) if err != nil { return graphql.Null } @@ -35941,7 +38518,7 @@ func (ec *executionContext) _LedgerEntry_toAccountBalance(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ToAccountBalance, nil + return obj.DataSourceSpecBinding, nil }) if err != nil { ec.Error(ctx, err) @@ -35953,26 +38530,32 @@ func (ec *executionContext) _LedgerEntry_toAccountBalance(ctx context.Context, f } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.DataSourceSpecToFutureBinding) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDataSourceSpecToFutureBinding2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceSpecToFutureBinding(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LedgerEntry_toAccountBalance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Future_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LedgerEntry", + Object: "Future", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "settlementDataProperty": + return ec.fieldContext_DataSourceSpecToFutureBinding_settlementDataProperty(ctx, field) + case "tradingTerminationProperty": + return ec.fieldContext_DataSourceSpecToFutureBinding_tradingTerminationProperty(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceSpecToFutureBinding", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidationEstimate_worstCase(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidationEstimate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidationEstimate_worstCase(ctx, field) +func (ec *executionContext) _FutureProduct_settlementAsset(ctx context.Context, field graphql.CollectedField, obj *vega.FutureProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FutureProduct_settlementAsset(ctx, field) if err != nil { return graphql.Null } @@ -35985,7 +38568,7 @@ func (ec *executionContext) _LiquidationEstimate_worstCase(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.WorstCase, nil + return ec.resolvers.FutureProduct().SettlementAsset(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -35997,34 +38580,58 @@ func (ec *executionContext) _LiquidationEstimate_worstCase(ctx context.Context, } return graphql.Null } - res := resTmp.(*v2.LiquidationPrice) + res := resTmp.(*vega.Asset) fc.Result = res - return ec.marshalNLiquidationPrice2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidationPrice(ctx, field.Selections, res) + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidationEstimate_worstCase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FutureProduct_settlementAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidationEstimate", + Object: "FutureProduct", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "open_volume_only": - return ec.fieldContext_LiquidationPrice_open_volume_only(ctx, field) - case "including_buy_orders": - return ec.fieldContext_LiquidationPrice_including_buy_orders(ctx, field) - case "including_sell_orders": - return ec.fieldContext_LiquidationPrice_including_sell_orders(ctx, field) + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type LiquidationPrice", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidationEstimate_bestCase(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidationEstimate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidationEstimate_bestCase(ctx, field) +func (ec *executionContext) _FutureProduct_quoteName(ctx context.Context, field graphql.CollectedField, obj *vega.FutureProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FutureProduct_quoteName(ctx, field) if err != nil { return graphql.Null } @@ -36037,7 +38644,7 @@ func (ec *executionContext) _LiquidationEstimate_bestCase(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BestCase, nil + return obj.QuoteName, nil }) if err != nil { ec.Error(ctx, err) @@ -36049,34 +38656,26 @@ func (ec *executionContext) _LiquidationEstimate_bestCase(ctx context.Context, f } return graphql.Null } - res := resTmp.(*v2.LiquidationPrice) + res := resTmp.(string) fc.Result = res - return ec.marshalNLiquidationPrice2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidationPrice(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidationEstimate_bestCase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FutureProduct_quoteName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidationEstimate", + Object: "FutureProduct", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "open_volume_only": - return ec.fieldContext_LiquidationPrice_open_volume_only(ctx, field) - case "including_buy_orders": - return ec.fieldContext_LiquidationPrice_including_buy_orders(ctx, field) - case "including_sell_orders": - return ec.fieldContext_LiquidationPrice_including_sell_orders(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidationPrice", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidationPrice_open_volume_only(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidationPrice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidationPrice_open_volume_only(ctx, field) +func (ec *executionContext) _FutureProduct_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField, obj *vega.FutureProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FutureProduct_dataSourceSpecForSettlementData(ctx, field) if err != nil { return graphql.Null } @@ -36089,7 +38688,7 @@ func (ec *executionContext) _LiquidationPrice_open_volume_only(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.OpenVolumeOnly, nil + return obj.DataSourceSpecForSettlementData, nil }) if err != nil { ec.Error(ctx, err) @@ -36101,26 +38700,30 @@ func (ec *executionContext) _LiquidationPrice_open_volume_only(ctx context.Conte } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.DataSourceDefinition) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDataSourceDefinition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidationPrice_open_volume_only(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FutureProduct_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidationPrice", + Object: "FutureProduct", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "sourceType": + return ec.fieldContext_DataSourceDefinition_sourceType(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceDefinition", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidationPrice_including_buy_orders(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidationPrice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidationPrice_including_buy_orders(ctx, field) +func (ec *executionContext) _FutureProduct_dataSourceSpecForTradingTermination(ctx context.Context, field graphql.CollectedField, obj *vega.FutureProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FutureProduct_dataSourceSpecForTradingTermination(ctx, field) if err != nil { return graphql.Null } @@ -36133,7 +38736,7 @@ func (ec *executionContext) _LiquidationPrice_including_buy_orders(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IncludingBuyOrders, nil + return obj.DataSourceSpecForTradingTermination, nil }) if err != nil { ec.Error(ctx, err) @@ -36145,26 +38748,30 @@ func (ec *executionContext) _LiquidationPrice_including_buy_orders(ctx context.C } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.DataSourceDefinition) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDataSourceDefinition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidationPrice_including_buy_orders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FutureProduct_dataSourceSpecForTradingTermination(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidationPrice", + Object: "FutureProduct", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "sourceType": + return ec.fieldContext_DataSourceDefinition_sourceType(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceDefinition", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidationPrice_including_sell_orders(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidationPrice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidationPrice_including_sell_orders(ctx, field) +func (ec *executionContext) _FutureProduct_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField, obj *vega.FutureProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_FutureProduct_dataSourceSpecBinding(ctx, field) if err != nil { return graphql.Null } @@ -36177,7 +38784,7 @@ func (ec *executionContext) _LiquidationPrice_including_sell_orders(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IncludingSellOrders, nil + return obj.DataSourceSpecBinding, nil }) if err != nil { ec.Error(ctx, err) @@ -36189,26 +38796,32 @@ func (ec *executionContext) _LiquidationPrice_including_sell_orders(ctx context. } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.DataSourceSpecToFutureBinding) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDataSourceSpecToFutureBinding2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceSpecToFutureBinding(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidationPrice_including_sell_orders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FutureProduct_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidationPrice", + Object: "FutureProduct", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "settlementDataProperty": + return ec.fieldContext_DataSourceSpecToFutureBinding_settlementDataProperty(ctx, field) + case "tradingTerminationProperty": + return ec.fieldContext_DataSourceSpecToFutureBinding_tradingTerminationProperty(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceSpecToFutureBinding", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityMonitoringParameters_targetStakeParameters(ctx context.Context, field graphql.CollectedField, obj *LiquidityMonitoringParameters) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityMonitoringParameters_targetStakeParameters(ctx, field) +func (ec *executionContext) _Game_id(ctx context.Context, field graphql.CollectedField, obj *v2.Game) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Game_id(ctx, field) if err != nil { return graphql.Null } @@ -36221,7 +38834,7 @@ func (ec *executionContext) _LiquidityMonitoringParameters_targetStakeParameters }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TargetStakeParameters, nil + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) @@ -36233,32 +38846,26 @@ func (ec *executionContext) _LiquidityMonitoringParameters_targetStakeParameters } return graphql.Null } - res := resTmp.(*TargetStakeParameters) + res := resTmp.(string) fc.Result = res - return ec.marshalNTargetStakeParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTargetStakeParameters(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityMonitoringParameters_targetStakeParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Game_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityMonitoringParameters", + Object: "Game", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "timeWindow": - return ec.fieldContext_TargetStakeParameters_timeWindow(ctx, field) - case "scalingFactor": - return ec.fieldContext_TargetStakeParameters_scalingFactor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TargetStakeParameters", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityMonitoringParameters_triggeringRatio(ctx context.Context, field graphql.CollectedField, obj *LiquidityMonitoringParameters) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityMonitoringParameters_triggeringRatio(ctx, field) +func (ec *executionContext) _Game_epoch(ctx context.Context, field graphql.CollectedField, obj *v2.Game) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Game_epoch(ctx, field) if err != nil { return graphql.Null } @@ -36271,7 +38878,7 @@ func (ec *executionContext) _LiquidityMonitoringParameters_triggeringRatio(ctx c }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TriggeringRatio, nil + return ec.resolvers.Game().Epoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -36283,26 +38890,26 @@ func (ec *executionContext) _LiquidityMonitoringParameters_triggeringRatio(ctx c } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityMonitoringParameters_triggeringRatio(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Game_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityMonitoringParameters", + Object: "Game", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityMonitoringParameters_auctionExtensionSecs(ctx context.Context, field graphql.CollectedField, obj *LiquidityMonitoringParameters) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityMonitoringParameters_auctionExtensionSecs(ctx, field) +func (ec *executionContext) _Game_numberOfParticipants(ctx context.Context, field graphql.CollectedField, obj *v2.Game) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Game_numberOfParticipants(ctx, field) if err != nil { return graphql.Null } @@ -36315,7 +38922,7 @@ func (ec *executionContext) _LiquidityMonitoringParameters_auctionExtensionSecs( }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AuctionExtensionSecs, nil + return ec.resolvers.Game().NumberOfParticipants(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -36332,12 +38939,12 @@ func (ec *executionContext) _LiquidityMonitoringParameters_auctionExtensionSecs( return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityMonitoringParameters_auctionExtensionSecs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Game_numberOfParticipants(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityMonitoringParameters", + Object: "Game", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type Int does not have child fields") }, @@ -36345,8 +38952,8 @@ func (ec *executionContext) fieldContext_LiquidityMonitoringParameters_auctionEx return fc, nil } -func (ec *executionContext) _LiquidityOrder_reference(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityOrder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityOrder_reference(ctx, field) +func (ec *executionContext) _Game_entities(ctx context.Context, field graphql.CollectedField, obj *v2.Game) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Game_entities(ctx, field) if err != nil { return graphql.Null } @@ -36359,7 +38966,7 @@ func (ec *executionContext) _LiquidityOrder_reference(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Reference, nil + return ec.resolvers.Game().Entities(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -36371,26 +38978,26 @@ func (ec *executionContext) _LiquidityOrder_reference(ctx context.Context, field } return graphql.Null } - res := resTmp.(vega.PeggedReference) + res := resTmp.([]GameEntity) fc.Result = res - return ec.marshalNPeggedReference2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPeggedReference(ctx, field.Selections, res) + return ec.marshalNGameEntity2ᚕcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐGameEntityᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityOrder_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Game_entities(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityOrder", + Object: "Game", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type PeggedReference does not have child fields") + return nil, errors.New("field of type GameEntity does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityOrder_proportion(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityOrder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityOrder_proportion(ctx, field) +func (ec *executionContext) _Game_rewardAssetId(ctx context.Context, field graphql.CollectedField, obj *v2.Game) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Game_rewardAssetId(ctx, field) if err != nil { return graphql.Null } @@ -36403,7 +39010,7 @@ func (ec *executionContext) _LiquidityOrder_proportion(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Proportion, nil + return obj.RewardAssetId, nil }) if err != nil { ec.Error(ctx, err) @@ -36415,26 +39022,26 @@ func (ec *executionContext) _LiquidityOrder_proportion(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(uint32) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2uint32(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityOrder_proportion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Game_rewardAssetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityOrder", + Object: "Game", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityOrder_offset(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityOrder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityOrder_offset(ctx, field) +func (ec *executionContext) _GameEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.GameEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_GameEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -36447,7 +39054,7 @@ func (ec *executionContext) _LiquidityOrder_offset(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Offset, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -36459,26 +39066,38 @@ func (ec *executionContext) _LiquidityOrder_offset(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.Game) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNGame2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGame(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityOrder_offset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GameEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityOrder", + Object: "GameEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Game_id(ctx, field) + case "epoch": + return ec.fieldContext_Game_epoch(ctx, field) + case "numberOfParticipants": + return ec.fieldContext_Game_numberOfParticipants(ctx, field) + case "entities": + return ec.fieldContext_Game_entities(ctx, field) + case "rewardAssetId": + return ec.fieldContext_Game_rewardAssetId(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Game", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityOrderReference_order(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityOrderReference) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityOrderReference_order(ctx, field) +func (ec *executionContext) _GameEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.GameEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_GameEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -36491,81 +39110,38 @@ func (ec *executionContext) _LiquidityOrderReference_order(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.LiquidityOrderReference().Order(rctx, obj) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.Order) + res := resTmp.(string) fc.Result = res - return ec.marshalOOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityOrderReference_order(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GameEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityOrderReference", + Object: "GameEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Order_id(ctx, field) - case "price": - return ec.fieldContext_Order_price(ctx, field) - case "timeInForce": - return ec.fieldContext_Order_timeInForce(ctx, field) - case "side": - return ec.fieldContext_Order_side(ctx, field) - case "market": - return ec.fieldContext_Order_market(ctx, field) - case "size": - return ec.fieldContext_Order_size(ctx, field) - case "remaining": - return ec.fieldContext_Order_remaining(ctx, field) - case "party": - return ec.fieldContext_Order_party(ctx, field) - case "createdAt": - return ec.fieldContext_Order_createdAt(ctx, field) - case "expiresAt": - return ec.fieldContext_Order_expiresAt(ctx, field) - case "status": - return ec.fieldContext_Order_status(ctx, field) - case "reference": - return ec.fieldContext_Order_reference(ctx, field) - case "tradesConnection": - return ec.fieldContext_Order_tradesConnection(ctx, field) - case "type": - return ec.fieldContext_Order_type(ctx, field) - case "rejectionReason": - return ec.fieldContext_Order_rejectionReason(ctx, field) - case "version": - return ec.fieldContext_Order_version(ctx, field) - case "updatedAt": - return ec.fieldContext_Order_updatedAt(ctx, field) - case "peggedOrder": - return ec.fieldContext_Order_peggedOrder(ctx, field) - case "liquidityProvision": - return ec.fieldContext_Order_liquidityProvision(ctx, field) - case "postOnly": - return ec.fieldContext_Order_postOnly(ctx, field) - case "reduceOnly": - return ec.fieldContext_Order_reduceOnly(ctx, field) - case "icebergOrder": - return ec.fieldContext_Order_icebergOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Order", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityOrderReference_liquidityOrder(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityOrderReference) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) +func (ec *executionContext) _GamesConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.GamesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_GamesConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -36578,46 +39154,41 @@ func (ec *executionContext) _LiquidityOrderReference_liquidityOrder(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LiquidityOrder, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.LiquidityOrder) + res := resTmp.([]*v2.GameEdge) fc.Result = res - return ec.marshalNLiquidityOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrder(ctx, field.Selections, res) + return ec.marshalOGameEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGameEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityOrderReference_liquidityOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GamesConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityOrderReference", + Object: "GamesConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "reference": - return ec.fieldContext_LiquidityOrder_reference(ctx, field) - case "proportion": - return ec.fieldContext_LiquidityOrder_proportion(ctx, field) - case "offset": - return ec.fieldContext_LiquidityOrder_offset(ctx, field) + case "node": + return ec.fieldContext_GameEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_GameEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type LiquidityOrder", field.Name) + return nil, fmt.Errorf("no field named %q was found under type GameEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityProvider_partyId(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvider) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvider_partyId(ctx, field) +func (ec *executionContext) _GamesConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.GamesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_GamesConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -36630,38 +39201,45 @@ func (ec *executionContext) _LiquidityProvider_partyId(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PartyId, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvider_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GamesConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvider", + Object: "GamesConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityProvider_marketId(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvider) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvider_marketId(ctx, field) +func (ec *executionContext) _HistorySegment_fromHeight(ctx context.Context, field graphql.CollectedField, obj *v2.HistorySegment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_HistorySegment_fromHeight(ctx, field) if err != nil { return graphql.Null } @@ -36674,7 +39252,7 @@ func (ec *executionContext) _LiquidityProvider_marketId(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return obj.FromHeight, nil }) if err != nil { ec.Error(ctx, err) @@ -36686,26 +39264,26 @@ func (ec *executionContext) _LiquidityProvider_marketId(ctx context.Context, fie } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvider_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HistorySegment_fromHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvider", + Object: "HistorySegment", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvider_feeShare(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvider) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvider_feeShare(ctx, field) +func (ec *executionContext) _HistorySegment_toHeight(ctx context.Context, field graphql.CollectedField, obj *v2.HistorySegment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_HistorySegment_toHeight(ctx, field) if err != nil { return graphql.Null } @@ -36718,47 +39296,38 @@ func (ec *executionContext) _LiquidityProvider_feeShare(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.LiquidityProvider().FeeShare(rctx, obj) + return obj.ToHeight, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*LiquidityProviderFeeShare) + res := resTmp.(int64) fc.Result = res - return ec.marshalOLiquidityProviderFeeShare2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐLiquidityProviderFeeShare(ctx, field.Selections, res) + return ec.marshalNInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvider_feeShare(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HistorySegment_toHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvider", + Object: "HistorySegment", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "party": - return ec.fieldContext_LiquidityProviderFeeShare_party(ctx, field) - case "equityLikeShare": - return ec.fieldContext_LiquidityProviderFeeShare_equityLikeShare(ctx, field) - case "averageEntryValuation": - return ec.fieldContext_LiquidityProviderFeeShare_averageEntryValuation(ctx, field) - case "averageScore": - return ec.fieldContext_LiquidityProviderFeeShare_averageScore(ctx, field) - case "virtualStake": - return ec.fieldContext_LiquidityProviderFeeShare_virtualStake(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProviderFeeShare", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvider_sla(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvider) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvider_sla(ctx, field) +func (ec *executionContext) _HistorySegment_historySegmentId(ctx context.Context, field graphql.CollectedField, obj *v2.HistorySegment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_HistorySegment_historySegmentId(ctx, field) if err != nil { return graphql.Null } @@ -36771,55 +39340,38 @@ func (ec *executionContext) _LiquidityProvider_sla(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.LiquidityProvider().SLA(rctx, obj) + return obj.HistorySegmentId, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*LiquidityProviderSLA) + res := resTmp.(string) fc.Result = res - return ec.marshalOLiquidityProviderSLA2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐLiquidityProviderSLA(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvider_sla(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HistorySegment_historySegmentId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvider", + Object: "HistorySegment", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "party": - return ec.fieldContext_LiquidityProviderSLA_party(ctx, field) - case "currentEpochFractionOfTimeOnBook": - return ec.fieldContext_LiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx, field) - case "lastEpochFractionOfTimeOnBook": - return ec.fieldContext_LiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx, field) - case "lastEpochFeePenalty": - return ec.fieldContext_LiquidityProviderSLA_lastEpochFeePenalty(ctx, field) - case "lastEpochBondPenalty": - return ec.fieldContext_LiquidityProviderSLA_lastEpochBondPenalty(ctx, field) - case "hysteresisPeriodFeePenalties": - return ec.fieldContext_LiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx, field) - case "requiredLiquidity": - return ec.fieldContext_LiquidityProviderSLA_requiredLiquidity(ctx, field) - case "notionalVolumeBuys": - return ec.fieldContext_LiquidityProviderSLA_notionalVolumeBuys(ctx, field) - case "notionalVolumeSells": - return ec.fieldContext_LiquidityProviderSLA_notionalVolumeSells(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProviderSLA", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProviderConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProviderConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderConnection_edges(ctx, field) +func (ec *executionContext) _IcebergOrder_peakSize(ctx context.Context, field graphql.CollectedField, obj *vega.IcebergOrder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IcebergOrder_peakSize(ctx, field) if err != nil { return graphql.Null } @@ -36832,7 +39384,7 @@ func (ec *executionContext) _LiquidityProviderConnection_edges(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.IcebergOrder().PeakSize(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -36844,32 +39396,26 @@ func (ec *executionContext) _LiquidityProviderConnection_edges(ctx context.Conte } return graphql.Null } - res := resTmp.([]*v2.LiquidityProviderEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalNLiquidityProviderEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProviderEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IcebergOrder_peakSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderConnection", + Object: "IcebergOrder", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_LiquidityProviderEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_LiquidityProviderEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProviderEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProviderConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProviderConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderConnection_pageInfo(ctx, field) +func (ec *executionContext) _IcebergOrder_minimumVisibleSize(ctx context.Context, field graphql.CollectedField, obj *vega.IcebergOrder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IcebergOrder_minimumVisibleSize(ctx, field) if err != nil { return graphql.Null } @@ -36882,45 +39428,38 @@ func (ec *executionContext) _LiquidityProviderConnection_pageInfo(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.IcebergOrder().MinimumVisibleSize(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(string) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IcebergOrder_minimumVisibleSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderConnection", + Object: "IcebergOrder", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProviderEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProviderEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderEdge_node(ctx, field) +func (ec *executionContext) _IcebergOrder_reservedRemaining(ctx context.Context, field graphql.CollectedField, obj *vega.IcebergOrder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IcebergOrder_reservedRemaining(ctx, field) if err != nil { return graphql.Null } @@ -36933,7 +39472,7 @@ func (ec *executionContext) _LiquidityProviderEdge_node(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.IcebergOrder().ReservedRemaining(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -36945,36 +39484,26 @@ func (ec *executionContext) _LiquidityProviderEdge_node(ctx context.Context, fie } return graphql.Null } - res := resTmp.(*v2.LiquidityProvider) + res := resTmp.(string) fc.Result = res - return ec.marshalNLiquidityProvider2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvider(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IcebergOrder_reservedRemaining(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderEdge", + Object: "IcebergOrder", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "partyId": - return ec.fieldContext_LiquidityProvider_partyId(ctx, field) - case "marketId": - return ec.fieldContext_LiquidityProvider_marketId(ctx, field) - case "feeShare": - return ec.fieldContext_LiquidityProvider_feeShare(ctx, field) - case "sla": - return ec.fieldContext_LiquidityProvider_sla(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvider", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProviderEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProviderEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderEdge_cursor(ctx, field) +func (ec *executionContext) _IndividualGameEntity_individual(ctx context.Context, field graphql.CollectedField, obj *IndividualGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IndividualGameEntity_individual(ctx, field) if err != nil { return graphql.Null } @@ -36987,7 +39516,7 @@ func (ec *executionContext) _LiquidityProviderEdge_cursor(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.Individual, nil }) if err != nil { ec.Error(ctx, err) @@ -37001,24 +39530,24 @@ func (ec *executionContext) _LiquidityProviderEdge_cursor(ctx context.Context, f } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IndividualGameEntity_individual(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderEdge", + Object: "IndividualGameEntity", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProviderFeeShare_party(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderFeeShare) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderFeeShare_party(ctx, field) +func (ec *executionContext) _IndividualGameEntity_rank(ctx context.Context, field graphql.CollectedField, obj *IndividualGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IndividualGameEntity_rank(ctx, field) if err != nil { return graphql.Null } @@ -37031,7 +39560,7 @@ func (ec *executionContext) _LiquidityProviderFeeShare_party(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Party, nil + return obj.Rank, nil }) if err != nil { ec.Error(ctx, err) @@ -37043,68 +39572,26 @@ func (ec *executionContext) _LiquidityProviderFeeShare_party(ctx context.Context } return graphql.Null } - res := resTmp.(*vega.Party) + res := resTmp.(int) fc.Result = res - return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderFeeShare_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IndividualGameEntity_rank(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderFeeShare", + Object: "IndividualGameEntity", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProviderFeeShare_equityLikeShare(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderFeeShare) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderFeeShare_equityLikeShare(ctx, field) +func (ec *executionContext) _IndividualGameEntity_volume(ctx context.Context, field graphql.CollectedField, obj *IndividualGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IndividualGameEntity_volume(ctx, field) if err != nil { return graphql.Null } @@ -37117,7 +39604,7 @@ func (ec *executionContext) _LiquidityProviderFeeShare_equityLikeShare(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EquityLikeShare, nil + return obj.Volume, nil }) if err != nil { ec.Error(ctx, err) @@ -37134,9 +39621,9 @@ func (ec *executionContext) _LiquidityProviderFeeShare_equityLikeShare(ctx conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderFeeShare_equityLikeShare(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IndividualGameEntity_volume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderFeeShare", + Object: "IndividualGameEntity", Field: field, IsMethod: false, IsResolver: false, @@ -37147,8 +39634,8 @@ func (ec *executionContext) fieldContext_LiquidityProviderFeeShare_equityLikeSha return fc, nil } -func (ec *executionContext) _LiquidityProviderFeeShare_averageEntryValuation(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderFeeShare) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderFeeShare_averageEntryValuation(ctx, field) +func (ec *executionContext) _IndividualGameEntity_rewardMetric(ctx context.Context, field graphql.CollectedField, obj *IndividualGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IndividualGameEntity_rewardMetric(ctx, field) if err != nil { return graphql.Null } @@ -37161,7 +39648,7 @@ func (ec *executionContext) _LiquidityProviderFeeShare_averageEntryValuation(ctx }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AverageEntryValuation, nil + return obj.RewardMetric, nil }) if err != nil { ec.Error(ctx, err) @@ -37173,26 +39660,26 @@ func (ec *executionContext) _LiquidityProviderFeeShare_averageEntryValuation(ctx } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.DispatchMetric) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDispatchMetric2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDispatchMetric(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderFeeShare_averageEntryValuation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IndividualGameEntity_rewardMetric(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderFeeShare", + Object: "IndividualGameEntity", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type DispatchMetric does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProviderFeeShare_averageScore(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderFeeShare) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderFeeShare_averageScore(ctx, field) +func (ec *executionContext) _IndividualGameEntity_rewardEarned(ctx context.Context, field graphql.CollectedField, obj *IndividualGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IndividualGameEntity_rewardEarned(ctx, field) if err != nil { return graphql.Null } @@ -37205,7 +39692,7 @@ func (ec *executionContext) _LiquidityProviderFeeShare_averageScore(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AverageScore, nil + return obj.RewardEarned, nil }) if err != nil { ec.Error(ctx, err) @@ -37222,9 +39709,9 @@ func (ec *executionContext) _LiquidityProviderFeeShare_averageScore(ctx context. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderFeeShare_averageScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IndividualGameEntity_rewardEarned(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderFeeShare", + Object: "IndividualGameEntity", Field: field, IsMethod: false, IsResolver: false, @@ -37235,8 +39722,8 @@ func (ec *executionContext) fieldContext_LiquidityProviderFeeShare_averageScore( return fc, nil } -func (ec *executionContext) _LiquidityProviderFeeShare_virtualStake(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderFeeShare) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderFeeShare_virtualStake(ctx, field) +func (ec *executionContext) _IndividualGameEntity_totalRewardsEarned(ctx context.Context, field graphql.CollectedField, obj *IndividualGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IndividualGameEntity_totalRewardsEarned(ctx, field) if err != nil { return graphql.Null } @@ -37249,7 +39736,7 @@ func (ec *executionContext) _LiquidityProviderFeeShare_virtualStake(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.VirtualStake, nil + return obj.TotalRewardsEarned, nil }) if err != nil { ec.Error(ctx, err) @@ -37266,9 +39753,9 @@ func (ec *executionContext) _LiquidityProviderFeeShare_virtualStake(ctx context. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderFeeShare_virtualStake(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IndividualGameEntity_totalRewardsEarned(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderFeeShare", + Object: "IndividualGameEntity", Field: field, IsMethod: false, IsResolver: false, @@ -37279,8 +39766,8 @@ func (ec *executionContext) fieldContext_LiquidityProviderFeeShare_virtualStake( return fc, nil } -func (ec *executionContext) _LiquidityProviderSLA_party(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderSLA_party(ctx, field) +func (ec *executionContext) _IndividualGameEntity_rewardEarnedQuantum(ctx context.Context, field graphql.CollectedField, obj *IndividualGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IndividualGameEntity_rewardEarnedQuantum(ctx, field) if err != nil { return graphql.Null } @@ -37293,7 +39780,7 @@ func (ec *executionContext) _LiquidityProviderSLA_party(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Party, nil + return obj.RewardEarnedQuantum, nil }) if err != nil { ec.Error(ctx, err) @@ -37305,68 +39792,26 @@ func (ec *executionContext) _LiquidityProviderSLA_party(ctx context.Context, fie } return graphql.Null } - res := resTmp.(*vega.Party) + res := resTmp.(string) fc.Result = res - return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderSLA_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IndividualGameEntity_rewardEarnedQuantum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderSLA", + Object: "IndividualGameEntity", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx, field) +func (ec *executionContext) _IndividualGameEntity_totalRewardsEarnedQuantum(ctx context.Context, field graphql.CollectedField, obj *IndividualGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IndividualGameEntity_totalRewardsEarnedQuantum(ctx, field) if err != nil { return graphql.Null } @@ -37379,7 +39824,7 @@ func (ec *executionContext) _LiquidityProviderSLA_currentEpochFractionOfTimeOnBo }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CurrentEpochFractionOfTimeOnBook, nil + return obj.TotalRewardsEarnedQuantum, nil }) if err != nil { ec.Error(ctx, err) @@ -37396,9 +39841,9 @@ func (ec *executionContext) _LiquidityProviderSLA_currentEpochFractionOfTimeOnBo return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IndividualGameEntity_totalRewardsEarnedQuantum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderSLA", + Object: "IndividualGameEntity", Field: field, IsMethod: false, IsResolver: false, @@ -37409,8 +39854,8 @@ func (ec *executionContext) fieldContext_LiquidityProviderSLA_currentEpochFracti return fc, nil } -func (ec *executionContext) _LiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx, field) +func (ec *executionContext) _Instrument_id(ctx context.Context, field graphql.CollectedField, obj *vega.Instrument) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Instrument_id(ctx, field) if err != nil { return graphql.Null } @@ -37423,7 +39868,7 @@ func (ec *executionContext) _LiquidityProviderSLA_lastEpochFractionOfTimeOnBook( }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LastEpochFractionOfTimeOnBook, nil + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) @@ -37437,24 +39882,24 @@ func (ec *executionContext) _LiquidityProviderSLA_lastEpochFractionOfTimeOnBook( } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Instrument_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderSLA", + Object: "Instrument", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProviderSLA_lastEpochFeePenalty(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderSLA_lastEpochFeePenalty(ctx, field) +func (ec *executionContext) _Instrument_code(ctx context.Context, field graphql.CollectedField, obj *vega.Instrument) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Instrument_code(ctx, field) if err != nil { return graphql.Null } @@ -37467,7 +39912,7 @@ func (ec *executionContext) _LiquidityProviderSLA_lastEpochFeePenalty(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LastEpochFeePenalty, nil + return obj.Code, nil }) if err != nil { ec.Error(ctx, err) @@ -37484,9 +39929,9 @@ func (ec *executionContext) _LiquidityProviderSLA_lastEpochFeePenalty(ctx contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderSLA_lastEpochFeePenalty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Instrument_code(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderSLA", + Object: "Instrument", Field: field, IsMethod: false, IsResolver: false, @@ -37497,8 +39942,8 @@ func (ec *executionContext) fieldContext_LiquidityProviderSLA_lastEpochFeePenalt return fc, nil } -func (ec *executionContext) _LiquidityProviderSLA_lastEpochBondPenalty(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderSLA_lastEpochBondPenalty(ctx, field) +func (ec *executionContext) _Instrument_name(ctx context.Context, field graphql.CollectedField, obj *vega.Instrument) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Instrument_name(ctx, field) if err != nil { return graphql.Null } @@ -37511,7 +39956,7 @@ func (ec *executionContext) _LiquidityProviderSLA_lastEpochBondPenalty(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LastEpochBondPenalty, nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -37528,9 +39973,9 @@ func (ec *executionContext) _LiquidityProviderSLA_lastEpochBondPenalty(ctx conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderSLA_lastEpochBondPenalty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Instrument_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderSLA", + Object: "Instrument", Field: field, IsMethod: false, IsResolver: false, @@ -37541,8 +39986,8 @@ func (ec *executionContext) fieldContext_LiquidityProviderSLA_lastEpochBondPenal return fc, nil } -func (ec *executionContext) _LiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx, field) +func (ec *executionContext) _Instrument_metadata(ctx context.Context, field graphql.CollectedField, obj *vega.Instrument) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Instrument_metadata(ctx, field) if err != nil { return graphql.Null } @@ -37555,35 +40000,42 @@ func (ec *executionContext) _LiquidityProviderSLA_hysteresisPeriodFeePenalties(c }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HysteresisPeriodFeePenalties, nil + return obj.Metadata, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]string) + res := resTmp.(*vega.InstrumentMetadata) fc.Result = res - return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNInstrumentMetadata2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐInstrumentMetadata(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Instrument_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderSLA", + Object: "Instrument", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "tags": + return ec.fieldContext_InstrumentMetadata_tags(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type InstrumentMetadata", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityProviderSLA_requiredLiquidity(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderSLA_requiredLiquidity(ctx, field) +func (ec *executionContext) _Instrument_product(ctx context.Context, field graphql.CollectedField, obj *vega.Instrument) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Instrument_product(ctx, field) if err != nil { return graphql.Null } @@ -37596,7 +40048,7 @@ func (ec *executionContext) _LiquidityProviderSLA_requiredLiquidity(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RequiredLiquidity, nil + return ec.resolvers.Instrument().Product(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -37608,26 +40060,26 @@ func (ec *executionContext) _LiquidityProviderSLA_requiredLiquidity(ctx context. } return graphql.Null } - res := resTmp.(string) + res := resTmp.(Product) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNProduct2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProduct(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderSLA_requiredLiquidity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Instrument_product(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderSLA", + Object: "Instrument", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Product does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProviderSLA_notionalVolumeBuys(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderSLA_notionalVolumeBuys(ctx, field) +func (ec *executionContext) _InstrumentConfiguration_name(ctx context.Context, field graphql.CollectedField, obj *vega.InstrumentConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_InstrumentConfiguration_name(ctx, field) if err != nil { return graphql.Null } @@ -37640,7 +40092,7 @@ func (ec *executionContext) _LiquidityProviderSLA_notionalVolumeBuys(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NotionalVolumeBuys, nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -37657,9 +40109,9 @@ func (ec *executionContext) _LiquidityProviderSLA_notionalVolumeBuys(ctx context return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderSLA_notionalVolumeBuys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_InstrumentConfiguration_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderSLA", + Object: "InstrumentConfiguration", Field: field, IsMethod: false, IsResolver: false, @@ -37670,8 +40122,8 @@ func (ec *executionContext) fieldContext_LiquidityProviderSLA_notionalVolumeBuys return fc, nil } -func (ec *executionContext) _LiquidityProviderSLA_notionalVolumeSells(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProviderSLA_notionalVolumeSells(ctx, field) +func (ec *executionContext) _InstrumentConfiguration_code(ctx context.Context, field graphql.CollectedField, obj *vega.InstrumentConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_InstrumentConfiguration_code(ctx, field) if err != nil { return graphql.Null } @@ -37684,7 +40136,7 @@ func (ec *executionContext) _LiquidityProviderSLA_notionalVolumeSells(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NotionalVolumeSells, nil + return obj.Code, nil }) if err != nil { ec.Error(ctx, err) @@ -37701,9 +40153,9 @@ func (ec *executionContext) _LiquidityProviderSLA_notionalVolumeSells(ctx contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProviderSLA_notionalVolumeSells(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_InstrumentConfiguration_code(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProviderSLA", + Object: "InstrumentConfiguration", Field: field, IsMethod: false, IsResolver: false, @@ -37714,8 +40166,8 @@ func (ec *executionContext) fieldContext_LiquidityProviderSLA_notionalVolumeSell return fc, nil } -func (ec *executionContext) _LiquidityProvision_id(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvision_id(ctx, field) +func (ec *executionContext) _InstrumentConfiguration_futureProduct(ctx context.Context, field graphql.CollectedField, obj *vega.InstrumentConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_InstrumentConfiguration_futureProduct(ctx, field) if err != nil { return graphql.Null } @@ -37728,38 +40180,47 @@ func (ec *executionContext) _LiquidityProvision_id(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return ec.resolvers.InstrumentConfiguration().FutureProduct(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.FutureProduct) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOFutureProduct2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐFutureProduct(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvision_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_InstrumentConfiguration_futureProduct(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvision", + Object: "InstrumentConfiguration", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "settlementAsset": + return ec.fieldContext_FutureProduct_settlementAsset(ctx, field) + case "quoteName": + return ec.fieldContext_FutureProduct_quoteName(ctx, field) + case "dataSourceSpecForSettlementData": + return ec.fieldContext_FutureProduct_dataSourceSpecForSettlementData(ctx, field) + case "dataSourceSpecForTradingTermination": + return ec.fieldContext_FutureProduct_dataSourceSpecForTradingTermination(ctx, field) + case "dataSourceSpecBinding": + return ec.fieldContext_FutureProduct_dataSourceSpecBinding(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type FutureProduct", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityProvision_party(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvision_party(ctx, field) +func (ec *executionContext) _InstrumentConfiguration_product(ctx context.Context, field graphql.CollectedField, obj *vega.InstrumentConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_InstrumentConfiguration_product(ctx, field) if err != nil { return graphql.Null } @@ -37772,80 +40233,35 @@ func (ec *executionContext) _LiquidityProvision_party(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.LiquidityProvision().Party(rctx, obj) + return ec.resolvers.InstrumentConfiguration().Product(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Party) + res := resTmp.(ProductConfiguration) fc.Result = res - return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalOProductConfiguration2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProductConfiguration(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvision_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_InstrumentConfiguration_product(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvision", + Object: "InstrumentConfiguration", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, errors.New("field of type ProductConfiguration does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvision_createdAt(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvision_createdAt(ctx, field) +func (ec *executionContext) _InstrumentMetadata_tags(ctx context.Context, field graphql.CollectedField, obj *vega.InstrumentMetadata) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_InstrumentMetadata_tags(ctx, field) if err != nil { return graphql.Null } @@ -37858,38 +40274,35 @@ func (ec *executionContext) _LiquidityProvision_createdAt(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreatedAt, nil + return obj.Tags, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int64) + res := resTmp.([]string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvision_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_InstrumentMetadata_tags(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvision", + Object: "InstrumentMetadata", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvision_updatedAt(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvision_updatedAt(ctx, field) +func (ec *executionContext) _InternalTimeTrigger_initial(ctx context.Context, field graphql.CollectedField, obj *v13.InternalTimeTrigger) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_InternalTimeTrigger_initial(ctx, field) if err != nil { return graphql.Null } @@ -37902,7 +40315,7 @@ func (ec *executionContext) _LiquidityProvision_updatedAt(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdatedAt, nil + return obj.Initial, nil }) if err != nil { ec.Error(ctx, err) @@ -37911,26 +40324,26 @@ func (ec *executionContext) _LiquidityProvision_updatedAt(ctx context.Context, f if resTmp == nil { return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*int64) fc.Result = res - return ec.marshalOTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOInt2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvision_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_InternalTimeTrigger_initial(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvision", + Object: "InternalTimeTrigger", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvision_market(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvision_market(ctx, field) +func (ec *executionContext) _InternalTimeTrigger_every(ctx context.Context, field graphql.CollectedField, obj *v13.InternalTimeTrigger) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_InternalTimeTrigger_every(ctx, field) if err != nil { return graphql.Null } @@ -37943,94 +40356,35 @@ func (ec *executionContext) _LiquidityProvision_market(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.LiquidityProvision().Market(rctx, obj) + return obj.Every, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Market) + res := resTmp.(int64) fc.Result = res - return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) + return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvision_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_InternalTimeTrigger_every(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvision", + Object: "InternalTimeTrigger", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Market_id(ctx, field) - case "fees": - return ec.fieldContext_Market_fees(ctx, field) - case "tradableInstrument": - return ec.fieldContext_Market_tradableInstrument(ctx, field) - case "decimalPlaces": - return ec.fieldContext_Market_decimalPlaces(ctx, field) - case "positionDecimalPlaces": - return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) - case "openingAuction": - return ec.fieldContext_Market_openingAuction(ctx, field) - case "priceMonitoringSettings": - return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) - case "liquidityMonitoringParameters": - return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) - case "tradingMode": - return ec.fieldContext_Market_tradingMode(ctx, field) - case "state": - return ec.fieldContext_Market_state(ctx, field) - case "proposal": - return ec.fieldContext_Market_proposal(ctx, field) - case "ordersConnection": - return ec.fieldContext_Market_ordersConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Market_accountsConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Market_tradesConnection(ctx, field) - case "depth": - return ec.fieldContext_Market_depth(ctx, field) - case "candlesConnection": - return ec.fieldContext_Market_candlesConnection(ctx, field) - case "data": - return ec.fieldContext_Market_data(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Market_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) - case "marketTimestamps": - return ec.fieldContext_Market_marketTimestamps(ctx, field) - case "riskFactors": - return ec.fieldContext_Market_riskFactors(ctx, field) - case "linearSlippageFactor": - return ec.fieldContext_Market_linearSlippageFactor(ctx, field) - case "quadraticSlippageFactor": - return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) - case "parentMarketID": - return ec.fieldContext_Market_parentMarketID(ctx, field) - case "insurancePoolFraction": - return ec.fieldContext_Market_insurancePoolFraction(ctx, field) - case "successorMarketID": - return ec.fieldContext_Market_successorMarketID(ctx, field) - case "liquiditySLAParameters": - return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvision_commitmentAmount(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvision_commitmentAmount(ctx, field) +func (ec *executionContext) _KeyRotation_nodeId(ctx context.Context, field graphql.CollectedField, obj *v1.KeyRotation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyRotation_nodeId(ctx, field) if err != nil { return graphql.Null } @@ -38043,7 +40397,7 @@ func (ec *executionContext) _LiquidityProvision_commitmentAmount(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CommitmentAmount, nil + return obj.NodeId, nil }) if err != nil { ec.Error(ctx, err) @@ -38057,24 +40411,24 @@ func (ec *executionContext) _LiquidityProvision_commitmentAmount(ctx context.Con } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvision_commitmentAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KeyRotation_nodeId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvision", + Object: "KeyRotation", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvision_fee(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvision_fee(ctx, field) +func (ec *executionContext) _KeyRotation_oldPubKey(ctx context.Context, field graphql.CollectedField, obj *v1.KeyRotation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyRotation_oldPubKey(ctx, field) if err != nil { return graphql.Null } @@ -38087,7 +40441,7 @@ func (ec *executionContext) _LiquidityProvision_fee(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Fee, nil + return obj.OldPubKey, nil }) if err != nil { ec.Error(ctx, err) @@ -38104,9 +40458,9 @@ func (ec *executionContext) _LiquidityProvision_fee(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvision_fee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KeyRotation_oldPubKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvision", + Object: "KeyRotation", Field: field, IsMethod: false, IsResolver: false, @@ -38117,8 +40471,8 @@ func (ec *executionContext) fieldContext_LiquidityProvision_fee(ctx context.Cont return fc, nil } -func (ec *executionContext) _LiquidityProvision_sells(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvision_sells(ctx, field) +func (ec *executionContext) _KeyRotation_newPubKey(ctx context.Context, field graphql.CollectedField, obj *v1.KeyRotation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyRotation_newPubKey(ctx, field) if err != nil { return graphql.Null } @@ -38131,7 +40485,7 @@ func (ec *executionContext) _LiquidityProvision_sells(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Sells, nil + return obj.NewPubKey, nil }) if err != nil { ec.Error(ctx, err) @@ -38143,32 +40497,26 @@ func (ec *executionContext) _LiquidityProvision_sells(ctx context.Context, field } return graphql.Null } - res := resTmp.([]*vega.LiquidityOrderReference) + res := resTmp.(string) fc.Result = res - return ec.marshalNLiquidityOrderReference2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrderReferenceᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvision_sells(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KeyRotation_newPubKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvision", + Object: "KeyRotation", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "order": - return ec.fieldContext_LiquidityOrderReference_order(ctx, field) - case "liquidityOrder": - return ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityOrderReference", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvision_buys(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvision_buys(ctx, field) +func (ec *executionContext) _KeyRotation_blockHeight(ctx context.Context, field graphql.CollectedField, obj *v1.KeyRotation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyRotation_blockHeight(ctx, field) if err != nil { return graphql.Null } @@ -38181,7 +40529,7 @@ func (ec *executionContext) _LiquidityProvision_buys(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Buys, nil + return ec.resolvers.KeyRotation().BlockHeight(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -38193,32 +40541,26 @@ func (ec *executionContext) _LiquidityProvision_buys(ctx context.Context, field } return graphql.Null } - res := resTmp.([]*vega.LiquidityOrderReference) + res := resTmp.(string) fc.Result = res - return ec.marshalNLiquidityOrderReference2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrderReferenceᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvision_buys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KeyRotation_blockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvision", + Object: "KeyRotation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "order": - return ec.fieldContext_LiquidityOrderReference_order(ctx, field) - case "liquidityOrder": - return ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityOrderReference", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvision_version(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvision_version(ctx, field) +func (ec *executionContext) _KeyRotationConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.KeyRotationConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyRotationConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -38231,38 +40573,41 @@ func (ec *executionContext) _LiquidityProvision_version(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.LiquidityProvision().Version(rctx, obj) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.KeyRotationEdge) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOKeyRotationEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐKeyRotationEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvision_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KeyRotationConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvision", + Object: "KeyRotationConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_KeyRotationEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_KeyRotationEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type KeyRotationEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityProvision_status(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvision_status(ctx, field) +func (ec *executionContext) _KeyRotationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.KeyRotationConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyRotationConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -38275,7 +40620,7 @@ func (ec *executionContext) _LiquidityProvision_status(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -38287,26 +40632,36 @@ func (ec *executionContext) _LiquidityProvision_status(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(vega.LiquidityProvision_Status) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNLiquidityProvisionStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision_Status(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvision_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KeyRotationConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvision", + Object: "KeyRotationConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type LiquidityProvisionStatus does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityProvision_reference(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvision_reference(ctx, field) +func (ec *executionContext) _KeyRotationEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.KeyRotationEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyRotationEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -38319,35 +40674,48 @@ func (ec *executionContext) _LiquidityProvision_reference(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Reference, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v1.KeyRotation) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNKeyRotation2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐKeyRotation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvision_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KeyRotationEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvision", + Object: "KeyRotationEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "nodeId": + return ec.fieldContext_KeyRotation_nodeId(ctx, field) + case "oldPubKey": + return ec.fieldContext_KeyRotation_oldPubKey(ctx, field) + case "newPubKey": + return ec.fieldContext_KeyRotation_newPubKey(ctx, field) + case "blockHeight": + return ec.fieldContext_KeyRotation_blockHeight(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type KeyRotation", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionUpdate_id(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionUpdate_id(ctx, field) +func (ec *executionContext) _KeyRotationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.KeyRotationEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyRotationEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -38360,7 +40728,7 @@ func (ec *executionContext) _LiquidityProvisionUpdate_id(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -38374,24 +40742,24 @@ func (ec *executionContext) _LiquidityProvisionUpdate_id(ctx context.Context, fi } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KeyRotationEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionUpdate", + Object: "KeyRotationEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionUpdate_partyID(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionUpdate_partyID(ctx, field) +func (ec *executionContext) _LedgerEntry_fromAccountId(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LedgerEntry_fromAccountId(ctx, field) if err != nil { return graphql.Null } @@ -38404,7 +40772,7 @@ func (ec *executionContext) _LiquidityProvisionUpdate_partyID(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PartyId, nil + return ec.resolvers.LedgerEntry().FromAccountID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -38416,26 +40784,36 @@ func (ec *executionContext) _LiquidityProvisionUpdate_partyID(ctx context.Contex } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.AccountDetails) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNAccountDetails2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountDetails(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_partyID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LedgerEntry_fromAccountId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionUpdate", + Object: "LedgerEntry", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "assetId": + return ec.fieldContext_AccountDetails_assetId(ctx, field) + case "type": + return ec.fieldContext_AccountDetails_type(ctx, field) + case "marketId": + return ec.fieldContext_AccountDetails_marketId(ctx, field) + case "partyId": + return ec.fieldContext_AccountDetails_partyId(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AccountDetails", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionUpdate_createdAt(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionUpdate_createdAt(ctx, field) +func (ec *executionContext) _LedgerEntry_toAccountId(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LedgerEntry_toAccountId(ctx, field) if err != nil { return graphql.Null } @@ -38448,7 +40826,7 @@ func (ec *executionContext) _LiquidityProvisionUpdate_createdAt(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreatedAt, nil + return ec.resolvers.LedgerEntry().ToAccountID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -38460,26 +40838,36 @@ func (ec *executionContext) _LiquidityProvisionUpdate_createdAt(ctx context.Cont } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*vega.AccountDetails) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNAccountDetails2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountDetails(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LedgerEntry_toAccountId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionUpdate", + Object: "LedgerEntry", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "assetId": + return ec.fieldContext_AccountDetails_assetId(ctx, field) + case "type": + return ec.fieldContext_AccountDetails_type(ctx, field) + case "marketId": + return ec.fieldContext_AccountDetails_marketId(ctx, field) + case "partyId": + return ec.fieldContext_AccountDetails_partyId(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AccountDetails", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionUpdate_updatedAt(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionUpdate_updatedAt(ctx, field) +func (ec *executionContext) _LedgerEntry_amount(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LedgerEntry_amount(ctx, field) if err != nil { return graphql.Null } @@ -38492,35 +40880,38 @@ func (ec *executionContext) _LiquidityProvisionUpdate_updatedAt(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdatedAt, nil + return obj.Amount, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalOTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LedgerEntry_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionUpdate", + Object: "LedgerEntry", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionUpdate_marketID(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionUpdate_marketID(ctx, field) +func (ec *executionContext) _LedgerEntry_type(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LedgerEntry_type(ctx, field) if err != nil { return graphql.Null } @@ -38533,7 +40924,7 @@ func (ec *executionContext) _LiquidityProvisionUpdate_marketID(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return obj.Type, nil }) if err != nil { ec.Error(ctx, err) @@ -38545,26 +40936,26 @@ func (ec *executionContext) _LiquidityProvisionUpdate_marketID(ctx context.Conte } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.TransferType) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNTransferType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTransferType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_marketID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LedgerEntry_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionUpdate", + Object: "LedgerEntry", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type TransferType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionUpdate_commitmentAmount(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionUpdate_commitmentAmount(ctx, field) +func (ec *executionContext) _LedgerEntry_timestamp(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LedgerEntry_timestamp(ctx, field) if err != nil { return graphql.Null } @@ -38577,7 +40968,7 @@ func (ec *executionContext) _LiquidityProvisionUpdate_commitmentAmount(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CommitmentAmount, nil + return obj.Timestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -38589,26 +40980,26 @@ func (ec *executionContext) _LiquidityProvisionUpdate_commitmentAmount(ctx conte } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_commitmentAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LedgerEntry_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionUpdate", + Object: "LedgerEntry", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionUpdate_fee(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionUpdate_fee(ctx, field) +func (ec *executionContext) _LedgerEntry_fromAccountBalance(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LedgerEntry_fromAccountBalance(ctx, field) if err != nil { return graphql.Null } @@ -38621,7 +41012,7 @@ func (ec *executionContext) _LiquidityProvisionUpdate_fee(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Fee, nil + return obj.FromAccountBalance, nil }) if err != nil { ec.Error(ctx, err) @@ -38638,9 +41029,9 @@ func (ec *executionContext) _LiquidityProvisionUpdate_fee(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_fee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LedgerEntry_fromAccountBalance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionUpdate", + Object: "LedgerEntry", Field: field, IsMethod: false, IsResolver: false, @@ -38651,8 +41042,8 @@ func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_fee(ctx contex return fc, nil } -func (ec *executionContext) _LiquidityProvisionUpdate_sells(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionUpdate_sells(ctx, field) +func (ec *executionContext) _LedgerEntry_toAccountBalance(ctx context.Context, field graphql.CollectedField, obj *vega.LedgerEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LedgerEntry_toAccountBalance(ctx, field) if err != nil { return graphql.Null } @@ -38665,7 +41056,7 @@ func (ec *executionContext) _LiquidityProvisionUpdate_sells(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Sells, nil + return obj.ToAccountBalance, nil }) if err != nil { ec.Error(ctx, err) @@ -38677,32 +41068,26 @@ func (ec *executionContext) _LiquidityProvisionUpdate_sells(ctx context.Context, } return graphql.Null } - res := resTmp.([]*vega.LiquidityOrderReference) + res := resTmp.(string) fc.Result = res - return ec.marshalNLiquidityOrderReference2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrderReferenceᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_sells(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LedgerEntry_toAccountBalance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionUpdate", + Object: "LedgerEntry", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "order": - return ec.fieldContext_LiquidityOrderReference_order(ctx, field) - case "liquidityOrder": - return ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityOrderReference", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionUpdate_buys(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionUpdate_buys(ctx, field) +func (ec *executionContext) _LiquidationEstimate_worstCase(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidationEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidationEstimate_worstCase(ctx, field) if err != nil { return graphql.Null } @@ -38715,7 +41100,7 @@ func (ec *executionContext) _LiquidityProvisionUpdate_buys(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Buys, nil + return obj.WorstCase, nil }) if err != nil { ec.Error(ctx, err) @@ -38727,32 +41112,34 @@ func (ec *executionContext) _LiquidityProvisionUpdate_buys(ctx context.Context, } return graphql.Null } - res := resTmp.([]*vega.LiquidityOrderReference) + res := resTmp.(*v2.LiquidationPrice) fc.Result = res - return ec.marshalNLiquidityOrderReference2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrderReferenceᚄ(ctx, field.Selections, res) + return ec.marshalNLiquidationPrice2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidationPrice(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_buys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidationEstimate_worstCase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionUpdate", + Object: "LiquidationEstimate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "order": - return ec.fieldContext_LiquidityOrderReference_order(ctx, field) - case "liquidityOrder": - return ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) + case "open_volume_only": + return ec.fieldContext_LiquidationPrice_open_volume_only(ctx, field) + case "including_buy_orders": + return ec.fieldContext_LiquidationPrice_including_buy_orders(ctx, field) + case "including_sell_orders": + return ec.fieldContext_LiquidationPrice_including_sell_orders(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type LiquidityOrderReference", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidationPrice", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionUpdate_version(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionUpdate_version(ctx, field) +func (ec *executionContext) _LiquidationEstimate_bestCase(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidationEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidationEstimate_bestCase(ctx, field) if err != nil { return graphql.Null } @@ -38765,7 +41152,7 @@ func (ec *executionContext) _LiquidityProvisionUpdate_version(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.LiquidityProvisionUpdate().Version(rctx, obj) + return obj.BestCase, nil }) if err != nil { ec.Error(ctx, err) @@ -38777,26 +41164,34 @@ func (ec *executionContext) _LiquidityProvisionUpdate_version(ctx context.Contex } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.LiquidationPrice) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNLiquidationPrice2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidationPrice(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidationEstimate_bestCase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionUpdate", + Object: "LiquidationEstimate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "open_volume_only": + return ec.fieldContext_LiquidationPrice_open_volume_only(ctx, field) + case "including_buy_orders": + return ec.fieldContext_LiquidationPrice_including_buy_orders(ctx, field) + case "including_sell_orders": + return ec.fieldContext_LiquidationPrice_including_sell_orders(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidationPrice", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionUpdate_status(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionUpdate_status(ctx, field) +func (ec *executionContext) _LiquidationPrice_open_volume_only(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidationPrice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidationPrice_open_volume_only(ctx, field) if err != nil { return graphql.Null } @@ -38809,7 +41204,7 @@ func (ec *executionContext) _LiquidityProvisionUpdate_status(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.OpenVolumeOnly, nil }) if err != nil { ec.Error(ctx, err) @@ -38821,26 +41216,26 @@ func (ec *executionContext) _LiquidityProvisionUpdate_status(ctx context.Context } return graphql.Null } - res := resTmp.(vega.LiquidityProvision_Status) + res := resTmp.(string) fc.Result = res - return ec.marshalNLiquidityProvisionStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision_Status(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidationPrice_open_volume_only(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionUpdate", + Object: "LiquidationPrice", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type LiquidityProvisionStatus does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionUpdate_reference(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionUpdate_reference(ctx, field) +func (ec *executionContext) _LiquidationPrice_including_buy_orders(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidationPrice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidationPrice_including_buy_orders(ctx, field) if err != nil { return graphql.Null } @@ -38853,23 +41248,26 @@ func (ec *executionContext) _LiquidityProvisionUpdate_reference(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Reference, nil + return obj.IncludingBuyOrders, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidationPrice_including_buy_orders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionUpdate", + Object: "LiquidationPrice", Field: field, IsMethod: false, IsResolver: false, @@ -38880,8 +41278,8 @@ func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_reference(ctx return fc, nil } -func (ec *executionContext) _LiquidityProvisionWithPending_current(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionWithPending_current(ctx, field) +func (ec *executionContext) _LiquidationPrice_including_sell_orders(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidationPrice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidationPrice_including_sell_orders(ctx, field) if err != nil { return graphql.Null } @@ -38894,7 +41292,7 @@ func (ec *executionContext) _LiquidityProvisionWithPending_current(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Current, nil + return obj.IncludingSellOrders, nil }) if err != nil { ec.Error(ctx, err) @@ -38906,52 +41304,26 @@ func (ec *executionContext) _LiquidityProvisionWithPending_current(ctx context.C } return graphql.Null } - res := resTmp.(*vega.LiquidityProvision) + res := resTmp.(string) fc.Result = res - return ec.marshalNLiquidityProvision2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionWithPending_current(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidationPrice_including_sell_orders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionWithPending", + Object: "LiquidationPrice", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_LiquidityProvision_id(ctx, field) - case "party": - return ec.fieldContext_LiquidityProvision_party(ctx, field) - case "createdAt": - return ec.fieldContext_LiquidityProvision_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_LiquidityProvision_updatedAt(ctx, field) - case "market": - return ec.fieldContext_LiquidityProvision_market(ctx, field) - case "commitmentAmount": - return ec.fieldContext_LiquidityProvision_commitmentAmount(ctx, field) - case "fee": - return ec.fieldContext_LiquidityProvision_fee(ctx, field) - case "sells": - return ec.fieldContext_LiquidityProvision_sells(ctx, field) - case "buys": - return ec.fieldContext_LiquidityProvision_buys(ctx, field) - case "version": - return ec.fieldContext_LiquidityProvision_version(ctx, field) - case "status": - return ec.fieldContext_LiquidityProvision_status(ctx, field) - case "reference": - return ec.fieldContext_LiquidityProvision_reference(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvision", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionWithPending_pending(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvision) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionWithPending_pending(ctx, field) +func (ec *executionContext) _LiquidationStrategy_disposalTimeStep(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidationStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidationStrategy_disposalTimeStep(ctx, field) if err != nil { return graphql.Null } @@ -38964,61 +41336,38 @@ func (ec *executionContext) _LiquidityProvisionWithPending_pending(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Pending, nil + return obj.DisposalTimeStep, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.LiquidityProvision) + res := resTmp.(int64) fc.Result = res - return ec.marshalOLiquidityProvision2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision(ctx, field.Selections, res) + return ec.marshalNInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionWithPending_pending(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidationStrategy_disposalTimeStep(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionWithPending", + Object: "LiquidationStrategy", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_LiquidityProvision_id(ctx, field) - case "party": - return ec.fieldContext_LiquidityProvision_party(ctx, field) - case "createdAt": - return ec.fieldContext_LiquidityProvision_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_LiquidityProvision_updatedAt(ctx, field) - case "market": - return ec.fieldContext_LiquidityProvision_market(ctx, field) - case "commitmentAmount": - return ec.fieldContext_LiquidityProvision_commitmentAmount(ctx, field) - case "fee": - return ec.fieldContext_LiquidityProvision_fee(ctx, field) - case "sells": - return ec.fieldContext_LiquidityProvision_sells(ctx, field) - case "buys": - return ec.fieldContext_LiquidityProvision_buys(ctx, field) - case "version": - return ec.fieldContext_LiquidityProvision_version(ctx, field) - case "status": - return ec.fieldContext_LiquidityProvision_status(ctx, field) - case "reference": - return ec.fieldContext_LiquidityProvision_reference(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvision", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionWithPendingEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionWithPendingEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionWithPendingEdge_node(ctx, field) +func (ec *executionContext) _LiquidationStrategy_disposalFraction(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidationStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidationStrategy_disposalFraction(ctx, field) if err != nil { return graphql.Null } @@ -39031,7 +41380,7 @@ func (ec *executionContext) _LiquidityProvisionWithPendingEdge_node(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.DisposalFraction, nil }) if err != nil { ec.Error(ctx, err) @@ -39043,32 +41392,26 @@ func (ec *executionContext) _LiquidityProvisionWithPendingEdge_node(ctx context. } return graphql.Null } - res := resTmp.(*v2.LiquidityProvision) + res := resTmp.(string) fc.Result = res - return ec.marshalNLiquidityProvisionWithPending2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvision(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionWithPendingEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidationStrategy_disposalFraction(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionWithPendingEdge", + Object: "LiquidationStrategy", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "current": - return ec.fieldContext_LiquidityProvisionWithPending_current(ctx, field) - case "pending": - return ec.fieldContext_LiquidityProvisionWithPending_pending(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionWithPending", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionWithPendingEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionWithPendingEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionWithPendingEdge_cursor(ctx, field) +func (ec *executionContext) _LiquidationStrategy_fullDisposalSize(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidationStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidationStrategy_fullDisposalSize(ctx, field) if err != nil { return graphql.Null } @@ -39081,7 +41424,7 @@ func (ec *executionContext) _LiquidityProvisionWithPendingEdge_cursor(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.LiquidationStrategy().FullDisposalSize(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -39093,26 +41436,26 @@ func (ec *executionContext) _LiquidityProvisionWithPendingEdge_cursor(ctx contex } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionWithPendingEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidationStrategy_fullDisposalSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionWithPendingEdge", + Object: "LiquidationStrategy", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionsConnection_edges(ctx, field) +func (ec *executionContext) _LiquidationStrategy_maxFractionConsumed(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidationStrategy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidationStrategy_maxFractionConsumed(ctx, field) if err != nil { return graphql.Null } @@ -39125,41 +41468,38 @@ func (ec *executionContext) _LiquidityProvisionsConnection_edges(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.MaxFractionConsumed, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.LiquidityProvisionsEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalOLiquidityProvisionsEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvisionsEdge(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidationStrategy_maxFractionConsumed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionsConnection", + Object: "LiquidationStrategy", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_LiquidityProvisionsEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_LiquidityProvisionsEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionsEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionsConnection_pageInfo(ctx, field) +func (ec *executionContext) _LiquidityFeeSettings_method(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityFeeSettings) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityFeeSettings_method(ctx, field) if err != nil { return graphql.Null } @@ -39172,7 +41512,7 @@ func (ec *executionContext) _LiquidityProvisionsConnection_pageInfo(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Method, nil }) if err != nil { ec.Error(ctx, err) @@ -39184,36 +41524,26 @@ func (ec *executionContext) _LiquidityProvisionsConnection_pageInfo(ctx context. } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(vega.LiquidityFeeSettings_Method) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNLiquidityFeeMethod2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityFeeSettings_Method(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityFeeSettings_method(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionsConnection", + Object: "LiquidityFeeSettings", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type LiquidityFeeMethod does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionsEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionsEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionsEdge_node(ctx, field) +func (ec *executionContext) _LiquidityFeeSettings_feeConstant(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityFeeSettings) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityFeeSettings_feeConstant(ctx, field) if err != nil { return graphql.Null } @@ -39226,64 +41556,35 @@ func (ec *executionContext) _LiquidityProvisionsEdge_node(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.FeeConstant, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.LiquidityProvision) + res := resTmp.(*string) fc.Result = res - return ec.marshalNLiquidityProvision2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionsEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityFeeSettings_feeConstant(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionsEdge", + Object: "LiquidityFeeSettings", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_LiquidityProvision_id(ctx, field) - case "party": - return ec.fieldContext_LiquidityProvision_party(ctx, field) - case "createdAt": - return ec.fieldContext_LiquidityProvision_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_LiquidityProvision_updatedAt(ctx, field) - case "market": - return ec.fieldContext_LiquidityProvision_market(ctx, field) - case "commitmentAmount": - return ec.fieldContext_LiquidityProvision_commitmentAmount(ctx, field) - case "fee": - return ec.fieldContext_LiquidityProvision_fee(ctx, field) - case "sells": - return ec.fieldContext_LiquidityProvision_sells(ctx, field) - case "buys": - return ec.fieldContext_LiquidityProvision_buys(ctx, field) - case "version": - return ec.fieldContext_LiquidityProvision_version(ctx, field) - case "status": - return ec.fieldContext_LiquidityProvision_status(ctx, field) - case "reference": - return ec.fieldContext_LiquidityProvision_reference(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvision", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionsEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionsEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionsEdge_cursor(ctx, field) +func (ec *executionContext) _LiquidityMonitoringParameters_targetStakeParameters(ctx context.Context, field graphql.CollectedField, obj *LiquidityMonitoringParameters) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityMonitoringParameters_targetStakeParameters(ctx, field) if err != nil { return graphql.Null } @@ -39296,7 +41597,7 @@ func (ec *executionContext) _LiquidityProvisionsEdge_cursor(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.TargetStakeParameters, nil }) if err != nil { ec.Error(ctx, err) @@ -39308,26 +41609,32 @@ func (ec *executionContext) _LiquidityProvisionsEdge_cursor(ctx context.Context, } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*TargetStakeParameters) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTargetStakeParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTargetStakeParameters(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionsEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityMonitoringParameters_targetStakeParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionsEdge", + Object: "LiquidityMonitoringParameters", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "timeWindow": + return ec.fieldContext_TargetStakeParameters_timeWindow(ctx, field) + case "scalingFactor": + return ec.fieldContext_TargetStakeParameters_scalingFactor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TargetStakeParameters", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionsWithPendingConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionsWithPendingConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionsWithPendingConnection_edges(ctx, field) +func (ec *executionContext) _LiquidityOrder_reference(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityOrder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityOrder_reference(ctx, field) if err != nil { return graphql.Null } @@ -39340,41 +41647,38 @@ func (ec *executionContext) _LiquidityProvisionsWithPendingConnection_edges(ctx }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.Reference, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.LiquidityProvisionWithPendingEdge) + res := resTmp.(vega.PeggedReference) fc.Result = res - return ec.marshalOLiquidityProvisionWithPendingEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvisionWithPendingEdge(ctx, field.Selections, res) + return ec.marshalNPeggedReference2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPeggedReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionsWithPendingConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityOrder_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionsWithPendingConnection", + Object: "LiquidityOrder", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_LiquidityProvisionWithPendingEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_LiquidityProvisionWithPendingEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionWithPendingEdge", field.Name) + return nil, errors.New("field of type PeggedReference does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquidityProvisionsWithPendingConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionsWithPendingConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquidityProvisionsWithPendingConnection_pageInfo(ctx, field) +func (ec *executionContext) _LiquidityOrder_proportion(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityOrder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityOrder_proportion(ctx, field) if err != nil { return graphql.Null } @@ -39387,7 +41691,7 @@ func (ec *executionContext) _LiquidityProvisionsWithPendingConnection_pageInfo(c }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Proportion, nil }) if err != nil { ec.Error(ctx, err) @@ -39399,36 +41703,26 @@ func (ec *executionContext) _LiquidityProvisionsWithPendingConnection_pageInfo(c } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(uint32) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNInt2uint32(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquidityProvisionsWithPendingConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityOrder_proportion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquidityProvisionsWithPendingConnection", + Object: "LiquidityOrder", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LiquiditySLAParameters_priceRange(ctx context.Context, field graphql.CollectedField, obj *vega.LiquiditySLAParameters) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquiditySLAParameters_priceRange(ctx, field) +func (ec *executionContext) _LiquidityOrder_offset(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityOrder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityOrder_offset(ctx, field) if err != nil { return graphql.Null } @@ -39441,7 +41735,7 @@ func (ec *executionContext) _LiquiditySLAParameters_priceRange(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PriceRange, nil + return obj.Offset, nil }) if err != nil { ec.Error(ctx, err) @@ -39458,9 +41752,9 @@ func (ec *executionContext) _LiquiditySLAParameters_priceRange(ctx context.Conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquiditySLAParameters_priceRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityOrder_offset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquiditySLAParameters", + Object: "LiquidityOrder", Field: field, IsMethod: false, IsResolver: false, @@ -39471,8 +41765,8 @@ func (ec *executionContext) fieldContext_LiquiditySLAParameters_priceRange(ctx c return fc, nil } -func (ec *executionContext) _LiquiditySLAParameters_commitmentMinTimeFraction(ctx context.Context, field graphql.CollectedField, obj *vega.LiquiditySLAParameters) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquiditySLAParameters_commitmentMinTimeFraction(ctx, field) +func (ec *executionContext) _LiquidityOrderReference_order(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityOrderReference) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityOrderReference_order(ctx, field) if err != nil { return graphql.Null } @@ -39485,38 +41779,81 @@ func (ec *executionContext) _LiquiditySLAParameters_commitmentMinTimeFraction(ct }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CommitmentMinTimeFraction, nil + return ec.resolvers.LiquidityOrderReference().Order(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Order) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquiditySLAParameters_commitmentMinTimeFraction(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityOrderReference_order(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquiditySLAParameters", + Object: "LiquidityOrderReference", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Order_id(ctx, field) + case "price": + return ec.fieldContext_Order_price(ctx, field) + case "timeInForce": + return ec.fieldContext_Order_timeInForce(ctx, field) + case "side": + return ec.fieldContext_Order_side(ctx, field) + case "market": + return ec.fieldContext_Order_market(ctx, field) + case "size": + return ec.fieldContext_Order_size(ctx, field) + case "remaining": + return ec.fieldContext_Order_remaining(ctx, field) + case "party": + return ec.fieldContext_Order_party(ctx, field) + case "createdAt": + return ec.fieldContext_Order_createdAt(ctx, field) + case "expiresAt": + return ec.fieldContext_Order_expiresAt(ctx, field) + case "status": + return ec.fieldContext_Order_status(ctx, field) + case "reference": + return ec.fieldContext_Order_reference(ctx, field) + case "tradesConnection": + return ec.fieldContext_Order_tradesConnection(ctx, field) + case "type": + return ec.fieldContext_Order_type(ctx, field) + case "rejectionReason": + return ec.fieldContext_Order_rejectionReason(ctx, field) + case "version": + return ec.fieldContext_Order_version(ctx, field) + case "updatedAt": + return ec.fieldContext_Order_updatedAt(ctx, field) + case "peggedOrder": + return ec.fieldContext_Order_peggedOrder(ctx, field) + case "liquidityProvision": + return ec.fieldContext_Order_liquidityProvision(ctx, field) + case "postOnly": + return ec.fieldContext_Order_postOnly(ctx, field) + case "reduceOnly": + return ec.fieldContext_Order_reduceOnly(ctx, field) + case "icebergOrder": + return ec.fieldContext_Order_icebergOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Order", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquiditySLAParameters_performanceHysteresisEpochs(ctx context.Context, field graphql.CollectedField, obj *vega.LiquiditySLAParameters) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquiditySLAParameters_performanceHysteresisEpochs(ctx, field) +func (ec *executionContext) _LiquidityOrderReference_liquidityOrder(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityOrderReference) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) if err != nil { return graphql.Null } @@ -39529,7 +41866,7 @@ func (ec *executionContext) _LiquiditySLAParameters_performanceHysteresisEpochs( }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.LiquiditySLAParameters().PerformanceHysteresisEpochs(rctx, obj) + return obj.LiquidityOrder, nil }) if err != nil { ec.Error(ctx, err) @@ -39541,26 +41878,34 @@ func (ec *executionContext) _LiquiditySLAParameters_performanceHysteresisEpochs( } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*vega.LiquidityOrder) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNLiquidityOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquiditySLAParameters_performanceHysteresisEpochs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityOrderReference_liquidityOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquiditySLAParameters", + Object: "LiquidityOrderReference", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "reference": + return ec.fieldContext_LiquidityOrder_reference(ctx, field) + case "proportion": + return ec.fieldContext_LiquidityOrder_proportion(ctx, field) + case "offset": + return ec.fieldContext_LiquidityOrder_offset(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityOrder", field.Name) }, } return fc, nil } -func (ec *executionContext) _LiquiditySLAParameters_slaCompetitionFactor(ctx context.Context, field graphql.CollectedField, obj *vega.LiquiditySLAParameters) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LiquiditySLAParameters_slaCompetitionFactor(ctx, field) +func (ec *executionContext) _LiquidityProvider_partyId(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvider) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvider_partyId(ctx, field) if err != nil { return graphql.Null } @@ -39573,7 +41918,7 @@ func (ec *executionContext) _LiquiditySLAParameters_slaCompetitionFactor(ctx con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SlaCompetitionFactor, nil + return obj.PartyId, nil }) if err != nil { ec.Error(ctx, err) @@ -39587,24 +41932,24 @@ func (ec *executionContext) _LiquiditySLAParameters_slaCompetitionFactor(ctx con } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LiquiditySLAParameters_slaCompetitionFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvider_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LiquiditySLAParameters", + Object: "LiquidityProvider", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LogNormalModelParams_mu(ctx context.Context, field graphql.CollectedField, obj *vega.LogNormalModelParams) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LogNormalModelParams_mu(ctx, field) +func (ec *executionContext) _LiquidityProvider_marketId(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvider) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvider_marketId(ctx, field) if err != nil { return graphql.Null } @@ -39617,7 +41962,7 @@ func (ec *executionContext) _LogNormalModelParams_mu(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Mu, nil + return obj.MarketId, nil }) if err != nil { ec.Error(ctx, err) @@ -39629,26 +41974,26 @@ func (ec *executionContext) _LogNormalModelParams_mu(ctx context.Context, field } return graphql.Null } - res := resTmp.(float64) + res := resTmp.(string) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LogNormalModelParams_mu(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvider_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LogNormalModelParams", + Object: "LiquidityProvider", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LogNormalModelParams_r(ctx context.Context, field graphql.CollectedField, obj *vega.LogNormalModelParams) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LogNormalModelParams_r(ctx, field) +func (ec *executionContext) _LiquidityProvider_feeShare(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvider) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvider_feeShare(ctx, field) if err != nil { return graphql.Null } @@ -39661,38 +42006,47 @@ func (ec *executionContext) _LogNormalModelParams_r(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.R, nil + return ec.resolvers.LiquidityProvider().FeeShare(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(float64) + res := resTmp.(*LiquidityProviderFeeShare) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalOLiquidityProviderFeeShare2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐLiquidityProviderFeeShare(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LogNormalModelParams_r(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvider_feeShare(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LogNormalModelParams", + Object: "LiquidityProvider", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + switch field.Name { + case "party": + return ec.fieldContext_LiquidityProviderFeeShare_party(ctx, field) + case "equityLikeShare": + return ec.fieldContext_LiquidityProviderFeeShare_equityLikeShare(ctx, field) + case "averageEntryValuation": + return ec.fieldContext_LiquidityProviderFeeShare_averageEntryValuation(ctx, field) + case "averageScore": + return ec.fieldContext_LiquidityProviderFeeShare_averageScore(ctx, field) + case "virtualStake": + return ec.fieldContext_LiquidityProviderFeeShare_virtualStake(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityProviderFeeShare", field.Name) }, } return fc, nil } -func (ec *executionContext) _LogNormalModelParams_sigma(ctx context.Context, field graphql.CollectedField, obj *vega.LogNormalModelParams) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LogNormalModelParams_sigma(ctx, field) +func (ec *executionContext) _LiquidityProvider_sla(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvider) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvider_sla(ctx, field) if err != nil { return graphql.Null } @@ -39705,38 +42059,55 @@ func (ec *executionContext) _LogNormalModelParams_sigma(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Sigma, nil + return ec.resolvers.LiquidityProvider().SLA(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(float64) + res := resTmp.(*LiquidityProviderSLA) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalOLiquidityProviderSLA2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐLiquidityProviderSLA(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LogNormalModelParams_sigma(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvider_sla(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LogNormalModelParams", + Object: "LiquidityProvider", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + switch field.Name { + case "party": + return ec.fieldContext_LiquidityProviderSLA_party(ctx, field) + case "currentEpochFractionOfTimeOnBook": + return ec.fieldContext_LiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx, field) + case "lastEpochFractionOfTimeOnBook": + return ec.fieldContext_LiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx, field) + case "lastEpochFeePenalty": + return ec.fieldContext_LiquidityProviderSLA_lastEpochFeePenalty(ctx, field) + case "lastEpochBondPenalty": + return ec.fieldContext_LiquidityProviderSLA_lastEpochBondPenalty(ctx, field) + case "hysteresisPeriodFeePenalties": + return ec.fieldContext_LiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx, field) + case "requiredLiquidity": + return ec.fieldContext_LiquidityProviderSLA_requiredLiquidity(ctx, field) + case "notionalVolumeBuys": + return ec.fieldContext_LiquidityProviderSLA_notionalVolumeBuys(ctx, field) + case "notionalVolumeSells": + return ec.fieldContext_LiquidityProviderSLA_notionalVolumeSells(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityProviderSLA", field.Name) }, } return fc, nil } -func (ec *executionContext) _LogNormalRiskModel_riskAversionParameter(ctx context.Context, field graphql.CollectedField, obj *vega.LogNormalRiskModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LogNormalRiskModel_riskAversionParameter(ctx, field) +func (ec *executionContext) _LiquidityProviderConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProviderConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -39749,7 +42120,7 @@ func (ec *executionContext) _LogNormalRiskModel_riskAversionParameter(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RiskAversionParameter, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -39761,26 +42132,32 @@ func (ec *executionContext) _LogNormalRiskModel_riskAversionParameter(ctx contex } return graphql.Null } - res := resTmp.(float64) + res := resTmp.([]*v2.LiquidityProviderEdge) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalNLiquidityProviderEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProviderEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LogNormalRiskModel_riskAversionParameter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LogNormalRiskModel", + Object: "LiquidityProviderConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_LiquidityProviderEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_LiquidityProviderEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityProviderEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _LogNormalRiskModel_tau(ctx context.Context, field graphql.CollectedField, obj *vega.LogNormalRiskModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LogNormalRiskModel_tau(ctx, field) +func (ec *executionContext) _LiquidityProviderConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProviderConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -39793,38 +42170,45 @@ func (ec *executionContext) _LogNormalRiskModel_tau(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Tau, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(float64) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LogNormalRiskModel_tau(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LogNormalRiskModel", + Object: "LiquidityProviderConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _LogNormalRiskModel_params(ctx context.Context, field graphql.CollectedField, obj *vega.LogNormalRiskModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LogNormalRiskModel_params(ctx, field) +func (ec *executionContext) _LiquidityProviderEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProviderEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -39837,7 +42221,7 @@ func (ec *executionContext) _LogNormalRiskModel_params(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Params, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -39849,34 +42233,36 @@ func (ec *executionContext) _LogNormalRiskModel_params(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(*vega.LogNormalModelParams) + res := resTmp.(*v2.LiquidityProvider) fc.Result = res - return ec.marshalNLogNormalModelParams2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLogNormalModelParams(ctx, field.Selections, res) + return ec.marshalNLiquidityProvider2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvider(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LogNormalRiskModel_params(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LogNormalRiskModel", + Object: "LiquidityProviderEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "mu": - return ec.fieldContext_LogNormalModelParams_mu(ctx, field) - case "r": - return ec.fieldContext_LogNormalModelParams_r(ctx, field) - case "sigma": - return ec.fieldContext_LogNormalModelParams_sigma(ctx, field) + case "partyId": + return ec.fieldContext_LiquidityProvider_partyId(ctx, field) + case "marketId": + return ec.fieldContext_LiquidityProvider_marketId(ctx, field) + case "feeShare": + return ec.fieldContext_LiquidityProvider_feeShare(ctx, field) + case "sla": + return ec.fieldContext_LiquidityProvider_sla(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type LogNormalModelParams", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvider", field.Name) }, } return fc, nil } -func (ec *executionContext) _LossSocialization_marketId(ctx context.Context, field graphql.CollectedField, obj *LossSocialization) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LossSocialization_marketId(ctx, field) +func (ec *executionContext) _LiquidityProviderEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProviderEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -39889,7 +42275,7 @@ func (ec *executionContext) _LossSocialization_marketId(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketID, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -39903,24 +42289,24 @@ func (ec *executionContext) _LossSocialization_marketId(ctx context.Context, fie } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LossSocialization_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LossSocialization", + Object: "LiquidityProviderEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LossSocialization_partyId(ctx context.Context, field graphql.CollectedField, obj *LossSocialization) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LossSocialization_partyId(ctx, field) +func (ec *executionContext) _LiquidityProviderFeeShare_party(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderFeeShare) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderFeeShare_party(ctx, field) if err != nil { return graphql.Null } @@ -39933,7 +42319,7 @@ func (ec *executionContext) _LossSocialization_partyId(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PartyID, nil + return obj.Party, nil }) if err != nil { ec.Error(ctx, err) @@ -39945,26 +42331,68 @@ func (ec *executionContext) _LossSocialization_partyId(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Party) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LossSocialization_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderFeeShare_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LossSocialization", + Object: "LiquidityProviderFeeShare", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) }, } return fc, nil } -func (ec *executionContext) _LossSocialization_amount(ctx context.Context, field graphql.CollectedField, obj *LossSocialization) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LossSocialization_amount(ctx, field) +func (ec *executionContext) _LiquidityProviderFeeShare_equityLikeShare(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderFeeShare) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderFeeShare_equityLikeShare(ctx, field) if err != nil { return graphql.Null } @@ -39977,7 +42405,7 @@ func (ec *executionContext) _LossSocialization_amount(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Amount, nil + return obj.EquityLikeShare, nil }) if err != nil { ec.Error(ctx, err) @@ -39994,9 +42422,9 @@ func (ec *executionContext) _LossSocialization_amount(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LossSocialization_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderFeeShare_equityLikeShare(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LossSocialization", + Object: "LiquidityProviderFeeShare", Field: field, IsMethod: false, IsResolver: false, @@ -40007,8 +42435,8 @@ func (ec *executionContext) fieldContext_LossSocialization_amount(ctx context.Co return fc, nil } -func (ec *executionContext) _MakerFeesGenerated_taker(ctx context.Context, field graphql.CollectedField, obj *v1.MakerFeesGenerated) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MakerFeesGenerated_taker(ctx, field) +func (ec *executionContext) _LiquidityProviderFeeShare_averageEntryValuation(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderFeeShare) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderFeeShare_averageEntryValuation(ctx, field) if err != nil { return graphql.Null } @@ -40021,7 +42449,7 @@ func (ec *executionContext) _MakerFeesGenerated_taker(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Taker, nil + return obj.AverageEntryValuation, nil }) if err != nil { ec.Error(ctx, err) @@ -40038,9 +42466,9 @@ func (ec *executionContext) _MakerFeesGenerated_taker(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MakerFeesGenerated_taker(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderFeeShare_averageEntryValuation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MakerFeesGenerated", + Object: "LiquidityProviderFeeShare", Field: field, IsMethod: false, IsResolver: false, @@ -40051,8 +42479,8 @@ func (ec *executionContext) fieldContext_MakerFeesGenerated_taker(ctx context.Co return fc, nil } -func (ec *executionContext) _MakerFeesGenerated_makerFeesPaid(ctx context.Context, field graphql.CollectedField, obj *v1.MakerFeesGenerated) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MakerFeesGenerated_makerFeesPaid(ctx, field) +func (ec *executionContext) _LiquidityProviderFeeShare_averageScore(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderFeeShare) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderFeeShare_averageScore(ctx, field) if err != nil { return graphql.Null } @@ -40065,7 +42493,7 @@ func (ec *executionContext) _MakerFeesGenerated_makerFeesPaid(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MakerFeesPaid, nil + return obj.AverageScore, nil }) if err != nil { ec.Error(ctx, err) @@ -40077,32 +42505,26 @@ func (ec *executionContext) _MakerFeesGenerated_makerFeesPaid(ctx context.Contex } return graphql.Null } - res := resTmp.([]*v1.PartyAmount) + res := resTmp.(string) fc.Result = res - return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MakerFeesGenerated_makerFeesPaid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderFeeShare_averageScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MakerFeesGenerated", + Object: "LiquidityProviderFeeShare", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "partyId": - return ec.fieldContext_PartyAmount_partyId(ctx, field) - case "amount": - return ec.fieldContext_PartyAmount_amount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginCalculator_scalingFactors(ctx context.Context, field graphql.CollectedField, obj *vega.MarginCalculator) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginCalculator_scalingFactors(ctx, field) +func (ec *executionContext) _LiquidityProviderFeeShare_virtualStake(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderFeeShare) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderFeeShare_virtualStake(ctx, field) if err != nil { return graphql.Null } @@ -40115,7 +42537,7 @@ func (ec *executionContext) _MarginCalculator_scalingFactors(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ScalingFactors, nil + return obj.VirtualStake, nil }) if err != nil { ec.Error(ctx, err) @@ -40127,34 +42549,26 @@ func (ec *executionContext) _MarginCalculator_scalingFactors(ctx context.Context } return graphql.Null } - res := resTmp.(*vega.ScalingFactors) + res := resTmp.(string) fc.Result = res - return ec.marshalNScalingFactors2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐScalingFactors(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginCalculator_scalingFactors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderFeeShare_virtualStake(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginCalculator", + Object: "LiquidityProviderFeeShare", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "searchLevel": - return ec.fieldContext_ScalingFactors_searchLevel(ctx, field) - case "initialMargin": - return ec.fieldContext_ScalingFactors_initialMargin(ctx, field) - case "collateralRelease": - return ec.fieldContext_ScalingFactors_collateralRelease(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ScalingFactors", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.MarginConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginConnection_edges(ctx, field) +func (ec *executionContext) _LiquidityProviderSLA_party(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderSLA_party(ctx, field) if err != nil { return graphql.Null } @@ -40167,41 +42581,80 @@ func (ec *executionContext) _MarginConnection_edges(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.Party, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.MarginEdge) + res := resTmp.(*vega.Party) fc.Result = res - return ec.marshalOMarginEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarginEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderSLA_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginConnection", + Object: "LiquidityProviderSLA", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_MarginEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_MarginEdge_cursor(ctx, field) + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type MarginEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarginConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.MarginConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginConnection_pageInfo(ctx, field) +func (ec *executionContext) _LiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx, field) if err != nil { return graphql.Null } @@ -40214,45 +42667,38 @@ func (ec *executionContext) _MarginConnection_pageInfo(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.CurrentEpochFractionOfTimeOnBook, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(string) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginConnection", + Object: "LiquidityProviderSLA", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.MarginEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginEdge_node(ctx, field) +func (ec *executionContext) _LiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx, field) if err != nil { return graphql.Null } @@ -40265,7 +42711,7 @@ func (ec *executionContext) _MarginEdge_node(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.LastEpochFractionOfTimeOnBook, nil }) if err != nil { ec.Error(ctx, err) @@ -40277,44 +42723,26 @@ func (ec *executionContext) _MarginEdge_node(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(*vega.MarginLevels) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarginLevels2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginLevels(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginEdge", + Object: "LiquidityProviderSLA", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "market": - return ec.fieldContext_MarginLevels_market(ctx, field) - case "asset": - return ec.fieldContext_MarginLevels_asset(ctx, field) - case "party": - return ec.fieldContext_MarginLevels_party(ctx, field) - case "maintenanceLevel": - return ec.fieldContext_MarginLevels_maintenanceLevel(ctx, field) - case "searchLevel": - return ec.fieldContext_MarginLevels_searchLevel(ctx, field) - case "initialLevel": - return ec.fieldContext_MarginLevels_initialLevel(ctx, field) - case "collateralReleaseLevel": - return ec.fieldContext_MarginLevels_collateralReleaseLevel(ctx, field) - case "timestamp": - return ec.fieldContext_MarginLevels_timestamp(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarginLevels", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.MarginEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginEdge_cursor(ctx, field) +func (ec *executionContext) _LiquidityProviderSLA_lastEpochFeePenalty(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderSLA_lastEpochFeePenalty(ctx, field) if err != nil { return graphql.Null } @@ -40327,23 +42755,26 @@ func (ec *executionContext) _MarginEdge_cursor(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.LastEpochFeePenalty, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderSLA_lastEpochFeePenalty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginEdge", + Object: "LiquidityProviderSLA", Field: field, IsMethod: false, IsResolver: false, @@ -40354,8 +42785,8 @@ func (ec *executionContext) fieldContext_MarginEdge_cursor(ctx context.Context, return fc, nil } -func (ec *executionContext) _MarginEstimate_worstCase(ctx context.Context, field graphql.CollectedField, obj *v2.MarginEstimate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginEstimate_worstCase(ctx, field) +func (ec *executionContext) _LiquidityProviderSLA_lastEpochBondPenalty(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderSLA_lastEpochBondPenalty(ctx, field) if err != nil { return graphql.Null } @@ -40368,7 +42799,7 @@ func (ec *executionContext) _MarginEstimate_worstCase(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.WorstCase, nil + return obj.LastEpochBondPenalty, nil }) if err != nil { ec.Error(ctx, err) @@ -40380,44 +42811,26 @@ func (ec *executionContext) _MarginEstimate_worstCase(ctx context.Context, field } return graphql.Null } - res := resTmp.(*vega.MarginLevels) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarginLevels2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginLevels(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginEstimate_worstCase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderSLA_lastEpochBondPenalty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginEstimate", + Object: "LiquidityProviderSLA", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "market": - return ec.fieldContext_MarginLevels_market(ctx, field) - case "asset": - return ec.fieldContext_MarginLevels_asset(ctx, field) - case "party": - return ec.fieldContext_MarginLevels_party(ctx, field) - case "maintenanceLevel": - return ec.fieldContext_MarginLevels_maintenanceLevel(ctx, field) - case "searchLevel": - return ec.fieldContext_MarginLevels_searchLevel(ctx, field) - case "initialLevel": - return ec.fieldContext_MarginLevels_initialLevel(ctx, field) - case "collateralReleaseLevel": - return ec.fieldContext_MarginLevels_collateralReleaseLevel(ctx, field) - case "timestamp": - return ec.fieldContext_MarginLevels_timestamp(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarginLevels", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginEstimate_bestCase(ctx context.Context, field graphql.CollectedField, obj *v2.MarginEstimate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginEstimate_bestCase(ctx, field) +func (ec *executionContext) _LiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx, field) if err != nil { return graphql.Null } @@ -40430,7 +42843,48 @@ func (ec *executionContext) _MarginEstimate_bestCase(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BestCase, nil + return obj.HysteresisPeriodFeePenalties, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_LiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "LiquidityProviderSLA", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _LiquidityProviderSLA_requiredLiquidity(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderSLA_requiredLiquidity(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RequiredLiquidity, nil }) if err != nil { ec.Error(ctx, err) @@ -40442,44 +42896,26 @@ func (ec *executionContext) _MarginEstimate_bestCase(ctx context.Context, field } return graphql.Null } - res := resTmp.(*vega.MarginLevels) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarginLevels2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginLevels(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginEstimate_bestCase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderSLA_requiredLiquidity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginEstimate", + Object: "LiquidityProviderSLA", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "market": - return ec.fieldContext_MarginLevels_market(ctx, field) - case "asset": - return ec.fieldContext_MarginLevels_asset(ctx, field) - case "party": - return ec.fieldContext_MarginLevels_party(ctx, field) - case "maintenanceLevel": - return ec.fieldContext_MarginLevels_maintenanceLevel(ctx, field) - case "searchLevel": - return ec.fieldContext_MarginLevels_searchLevel(ctx, field) - case "initialLevel": - return ec.fieldContext_MarginLevels_initialLevel(ctx, field) - case "collateralReleaseLevel": - return ec.fieldContext_MarginLevels_collateralReleaseLevel(ctx, field) - case "timestamp": - return ec.fieldContext_MarginLevels_timestamp(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarginLevels", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginLevels_market(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevels_market(ctx, field) +func (ec *executionContext) _LiquidityProviderSLA_notionalVolumeBuys(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderSLA_notionalVolumeBuys(ctx, field) if err != nil { return graphql.Null } @@ -40492,7 +42928,7 @@ func (ec *executionContext) _MarginLevels_market(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarginLevels().Market(rctx, obj) + return obj.NotionalVolumeBuys, nil }) if err != nil { ec.Error(ctx, err) @@ -40504,82 +42940,26 @@ func (ec *executionContext) _MarginLevels_market(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(*vega.Market) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevels_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderSLA_notionalVolumeBuys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevels", + Object: "LiquidityProviderSLA", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Market_id(ctx, field) - case "fees": - return ec.fieldContext_Market_fees(ctx, field) - case "tradableInstrument": - return ec.fieldContext_Market_tradableInstrument(ctx, field) - case "decimalPlaces": - return ec.fieldContext_Market_decimalPlaces(ctx, field) - case "positionDecimalPlaces": - return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) - case "openingAuction": - return ec.fieldContext_Market_openingAuction(ctx, field) - case "priceMonitoringSettings": - return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) - case "liquidityMonitoringParameters": - return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) - case "tradingMode": - return ec.fieldContext_Market_tradingMode(ctx, field) - case "state": - return ec.fieldContext_Market_state(ctx, field) - case "proposal": - return ec.fieldContext_Market_proposal(ctx, field) - case "ordersConnection": - return ec.fieldContext_Market_ordersConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Market_accountsConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Market_tradesConnection(ctx, field) - case "depth": - return ec.fieldContext_Market_depth(ctx, field) - case "candlesConnection": - return ec.fieldContext_Market_candlesConnection(ctx, field) - case "data": - return ec.fieldContext_Market_data(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Market_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) - case "marketTimestamps": - return ec.fieldContext_Market_marketTimestamps(ctx, field) - case "riskFactors": - return ec.fieldContext_Market_riskFactors(ctx, field) - case "linearSlippageFactor": - return ec.fieldContext_Market_linearSlippageFactor(ctx, field) - case "quadraticSlippageFactor": - return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) - case "parentMarketID": - return ec.fieldContext_Market_parentMarketID(ctx, field) - case "insurancePoolFraction": - return ec.fieldContext_Market_insurancePoolFraction(ctx, field) - case "successorMarketID": - return ec.fieldContext_Market_successorMarketID(ctx, field) - case "liquiditySLAParameters": - return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginLevels_asset(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevels_asset(ctx, field) +func (ec *executionContext) _LiquidityProviderSLA_notionalVolumeSells(ctx context.Context, field graphql.CollectedField, obj *LiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProviderSLA_notionalVolumeSells(ctx, field) if err != nil { return graphql.Null } @@ -40592,7 +42972,7 @@ func (ec *executionContext) _MarginLevels_asset(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarginLevels().Asset(rctx, obj) + return obj.NotionalVolumeSells, nil }) if err != nil { ec.Error(ctx, err) @@ -40604,58 +42984,26 @@ func (ec *executionContext) _MarginLevels_asset(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(string) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevels_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProviderSLA_notionalVolumeSells(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevels", + Object: "LiquidityProviderSLA", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginLevels_party(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevels_party(ctx, field) +func (ec *executionContext) _LiquidityProvision_id(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvision_id(ctx, field) if err != nil { return graphql.Null } @@ -40668,7 +43016,51 @@ func (ec *executionContext) _MarginLevels_party(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarginLevels().Party(rctx, obj) + return obj.Id, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_LiquidityProvision_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "LiquidityProvision", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _LiquidityProvision_party(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvision_party(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.LiquidityProvision().Party(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -40685,9 +43077,9 @@ func (ec *executionContext) _MarginLevels_party(ctx context.Context, field graph return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevels_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvision_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevels", + Object: "LiquidityProvision", Field: field, IsMethod: true, IsResolver: true, @@ -40740,8 +43132,8 @@ func (ec *executionContext) fieldContext_MarginLevels_party(ctx context.Context, return fc, nil } -func (ec *executionContext) _MarginLevels_maintenanceLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevels_maintenanceLevel(ctx, field) +func (ec *executionContext) _LiquidityProvision_createdAt(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvision_createdAt(ctx, field) if err != nil { return graphql.Null } @@ -40754,7 +43146,7 @@ func (ec *executionContext) _MarginLevels_maintenanceLevel(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarginLevels().MaintenanceLevel(rctx, obj) + return obj.CreatedAt, nil }) if err != nil { ec.Error(ctx, err) @@ -40766,26 +43158,26 @@ func (ec *executionContext) _MarginLevels_maintenanceLevel(ctx context.Context, } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevels_maintenanceLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvision_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevels", + Object: "LiquidityProvision", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginLevels_searchLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevels_searchLevel(ctx, field) +func (ec *executionContext) _LiquidityProvision_updatedAt(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvision_updatedAt(ctx, field) if err != nil { return graphql.Null } @@ -40798,38 +43190,35 @@ func (ec *executionContext) _MarginLevels_searchLevel(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SearchLevel, nil + return obj.UpdatedAt, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevels_searchLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvision_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevels", + Object: "LiquidityProvision", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginLevels_initialLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevels_initialLevel(ctx, field) +func (ec *executionContext) _LiquidityProvision_market(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvision_market(ctx, field) if err != nil { return graphql.Null } @@ -40842,7 +43231,7 @@ func (ec *executionContext) _MarginLevels_initialLevel(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarginLevels().InitialLevel(rctx, obj) + return ec.resolvers.LiquidityProvision().Market(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -40854,26 +43243,88 @@ func (ec *executionContext) _MarginLevels_initialLevel(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Market) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevels_initialLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvision_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevels", + Object: "LiquidityProvision", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Market_id(ctx, field) + case "fees": + return ec.fieldContext_Market_fees(ctx, field) + case "tradableInstrument": + return ec.fieldContext_Market_tradableInstrument(ctx, field) + case "decimalPlaces": + return ec.fieldContext_Market_decimalPlaces(ctx, field) + case "positionDecimalPlaces": + return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) + case "openingAuction": + return ec.fieldContext_Market_openingAuction(ctx, field) + case "priceMonitoringSettings": + return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) + case "liquidityMonitoringParameters": + return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) + case "tradingMode": + return ec.fieldContext_Market_tradingMode(ctx, field) + case "state": + return ec.fieldContext_Market_state(ctx, field) + case "proposal": + return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) + case "ordersConnection": + return ec.fieldContext_Market_ordersConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Market_accountsConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Market_tradesConnection(ctx, field) + case "depth": + return ec.fieldContext_Market_depth(ctx, field) + case "candlesConnection": + return ec.fieldContext_Market_candlesConnection(ctx, field) + case "data": + return ec.fieldContext_Market_data(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Market_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) + case "marketTimestamps": + return ec.fieldContext_Market_marketTimestamps(ctx, field) + case "riskFactors": + return ec.fieldContext_Market_riskFactors(ctx, field) + case "linearSlippageFactor": + return ec.fieldContext_Market_linearSlippageFactor(ctx, field) + case "quadraticSlippageFactor": + return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) + case "parentMarketID": + return ec.fieldContext_Market_parentMarketID(ctx, field) + case "insurancePoolFraction": + return ec.fieldContext_Market_insurancePoolFraction(ctx, field) + case "successorMarketID": + return ec.fieldContext_Market_successorMarketID(ctx, field) + case "liquiditySLAParameters": + return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarginLevels_collateralReleaseLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevels_collateralReleaseLevel(ctx, field) +func (ec *executionContext) _LiquidityProvision_commitmentAmount(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvision_commitmentAmount(ctx, field) if err != nil { return graphql.Null } @@ -40886,7 +43337,7 @@ func (ec *executionContext) _MarginLevels_collateralReleaseLevel(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CollateralReleaseLevel, nil + return obj.CommitmentAmount, nil }) if err != nil { ec.Error(ctx, err) @@ -40903,9 +43354,9 @@ func (ec *executionContext) _MarginLevels_collateralReleaseLevel(ctx context.Con return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevels_collateralReleaseLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvision_commitmentAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevels", + Object: "LiquidityProvision", Field: field, IsMethod: false, IsResolver: false, @@ -40916,8 +43367,8 @@ func (ec *executionContext) fieldContext_MarginLevels_collateralReleaseLevel(ctx return fc, nil } -func (ec *executionContext) _MarginLevels_timestamp(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevels_timestamp(ctx, field) +func (ec *executionContext) _LiquidityProvision_fee(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvision_fee(ctx, field) if err != nil { return graphql.Null } @@ -40930,7 +43381,7 @@ func (ec *executionContext) _MarginLevels_timestamp(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Timestamp, nil + return obj.Fee, nil }) if err != nil { ec.Error(ctx, err) @@ -40942,26 +43393,26 @@ func (ec *executionContext) _MarginLevels_timestamp(ctx context.Context, field g } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevels_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvision_fee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevels", + Object: "LiquidityProvision", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginLevelsUpdate_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevelsUpdate_marketId(ctx, field) +func (ec *executionContext) _LiquidityProvision_sells(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvision_sells(ctx, field) if err != nil { return graphql.Null } @@ -40974,7 +43425,7 @@ func (ec *executionContext) _MarginLevelsUpdate_marketId(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return obj.Sells, nil }) if err != nil { ec.Error(ctx, err) @@ -40986,26 +43437,32 @@ func (ec *executionContext) _MarginLevelsUpdate_marketId(ctx context.Context, fi } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.LiquidityOrderReference) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNLiquidityOrderReference2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrderReferenceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevelsUpdate_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvision_sells(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevelsUpdate", + Object: "LiquidityProvision", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "order": + return ec.fieldContext_LiquidityOrderReference_order(ctx, field) + case "liquidityOrder": + return ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityOrderReference", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarginLevelsUpdate_asset(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevelsUpdate_asset(ctx, field) +func (ec *executionContext) _LiquidityProvision_buys(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvision_buys(ctx, field) if err != nil { return graphql.Null } @@ -41018,7 +43475,7 @@ func (ec *executionContext) _MarginLevelsUpdate_asset(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Asset, nil + return obj.Buys, nil }) if err != nil { ec.Error(ctx, err) @@ -41030,26 +43487,32 @@ func (ec *executionContext) _MarginLevelsUpdate_asset(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.LiquidityOrderReference) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNLiquidityOrderReference2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrderReferenceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevelsUpdate_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvision_buys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevelsUpdate", + Object: "LiquidityProvision", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "order": + return ec.fieldContext_LiquidityOrderReference_order(ctx, field) + case "liquidityOrder": + return ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityOrderReference", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarginLevelsUpdate_partyId(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevelsUpdate_partyId(ctx, field) +func (ec *executionContext) _LiquidityProvision_version(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvision_version(ctx, field) if err != nil { return graphql.Null } @@ -41062,7 +43525,7 @@ func (ec *executionContext) _MarginLevelsUpdate_partyId(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PartyId, nil + return ec.resolvers.LiquidityProvision().Version(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -41076,24 +43539,24 @@ func (ec *executionContext) _MarginLevelsUpdate_partyId(ctx context.Context, fie } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevelsUpdate_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvision_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevelsUpdate", + Object: "LiquidityProvision", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginLevelsUpdate_maintenanceLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevelsUpdate_maintenanceLevel(ctx, field) +func (ec *executionContext) _LiquidityProvision_status(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvision_status(ctx, field) if err != nil { return graphql.Null } @@ -41106,7 +43569,7 @@ func (ec *executionContext) _MarginLevelsUpdate_maintenanceLevel(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarginLevelsUpdate().MaintenanceLevel(rctx, obj) + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) @@ -41118,26 +43581,26 @@ func (ec *executionContext) _MarginLevelsUpdate_maintenanceLevel(ctx context.Con } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.LiquidityProvision_Status) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNLiquidityProvisionStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision_Status(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevelsUpdate_maintenanceLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvision_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevelsUpdate", + Object: "LiquidityProvision", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type LiquidityProvisionStatus does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginLevelsUpdate_searchLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevelsUpdate_searchLevel(ctx, field) +func (ec *executionContext) _LiquidityProvision_reference(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvision_reference(ctx, field) if err != nil { return graphql.Null } @@ -41150,26 +43613,23 @@ func (ec *executionContext) _MarginLevelsUpdate_searchLevel(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SearchLevel, nil + return obj.Reference, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevelsUpdate_searchLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvision_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevelsUpdate", + Object: "LiquidityProvision", Field: field, IsMethod: false, IsResolver: false, @@ -41180,8 +43640,8 @@ func (ec *executionContext) fieldContext_MarginLevelsUpdate_searchLevel(ctx cont return fc, nil } -func (ec *executionContext) _MarginLevelsUpdate_initialLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevelsUpdate_initialLevel(ctx, field) +func (ec *executionContext) _LiquidityProvisionUpdate_id(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionUpdate_id(ctx, field) if err != nil { return graphql.Null } @@ -41194,7 +43654,7 @@ func (ec *executionContext) _MarginLevelsUpdate_initialLevel(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarginLevelsUpdate().InitialLevel(rctx, obj) + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) @@ -41208,24 +43668,24 @@ func (ec *executionContext) _MarginLevelsUpdate_initialLevel(ctx context.Context } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevelsUpdate_initialLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevelsUpdate", + Object: "LiquidityProvisionUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginLevelsUpdate_collateralReleaseLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevelsUpdate_collateralReleaseLevel(ctx, field) +func (ec *executionContext) _LiquidityProvisionUpdate_partyID(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionUpdate_partyID(ctx, field) if err != nil { return graphql.Null } @@ -41238,7 +43698,7 @@ func (ec *executionContext) _MarginLevelsUpdate_collateralReleaseLevel(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CollateralReleaseLevel, nil + return obj.PartyId, nil }) if err != nil { ec.Error(ctx, err) @@ -41252,24 +43712,24 @@ func (ec *executionContext) _MarginLevelsUpdate_collateralReleaseLevel(ctx conte } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevelsUpdate_collateralReleaseLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_partyID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevelsUpdate", + Object: "LiquidityProvisionUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarginLevelsUpdate_timestamp(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarginLevelsUpdate_timestamp(ctx, field) +func (ec *executionContext) _LiquidityProvisionUpdate_createdAt(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionUpdate_createdAt(ctx, field) if err != nil { return graphql.Null } @@ -41282,7 +43742,7 @@ func (ec *executionContext) _MarginLevelsUpdate_timestamp(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Timestamp, nil + return obj.CreatedAt, nil }) if err != nil { ec.Error(ctx, err) @@ -41299,9 +43759,9 @@ func (ec *executionContext) _MarginLevelsUpdate_timestamp(ctx context.Context, f return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarginLevelsUpdate_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarginLevelsUpdate", + Object: "LiquidityProvisionUpdate", Field: field, IsMethod: false, IsResolver: false, @@ -41312,8 +43772,8 @@ func (ec *executionContext) fieldContext_MarginLevelsUpdate_timestamp(ctx contex return fc, nil } -func (ec *executionContext) _Market_id(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_id(ctx, field) +func (ec *executionContext) _LiquidityProvisionUpdate_updatedAt(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionUpdate_updatedAt(ctx, field) if err != nil { return graphql.Null } @@ -41326,38 +43786,35 @@ func (ec *executionContext) _Market_id(ctx context.Context, field graphql.Collec }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return obj.UpdatedAt, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_fees(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_fees(ctx, field) +func (ec *executionContext) _LiquidityProvisionUpdate_marketID(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionUpdate_marketID(ctx, field) if err != nil { return graphql.Null } @@ -41370,7 +43827,7 @@ func (ec *executionContext) _Market_fees(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Fees, nil + return obj.MarketId, nil }) if err != nil { ec.Error(ctx, err) @@ -41382,30 +43839,26 @@ func (ec *executionContext) _Market_fees(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(*vega.Fees) + res := resTmp.(string) fc.Result = res - return ec.marshalNFees2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐFees(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_fees(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_marketID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "factors": - return ec.fieldContext_Fees_factors(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Fees", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_tradableInstrument(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_tradableInstrument(ctx, field) +func (ec *executionContext) _LiquidityProvisionUpdate_commitmentAmount(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionUpdate_commitmentAmount(ctx, field) if err != nil { return graphql.Null } @@ -41418,7 +43871,7 @@ func (ec *executionContext) _Market_tradableInstrument(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TradableInstrument, nil + return obj.CommitmentAmount, nil }) if err != nil { ec.Error(ctx, err) @@ -41430,34 +43883,26 @@ func (ec *executionContext) _Market_tradableInstrument(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(*vega.TradableInstrument) + res := resTmp.(string) fc.Result = res - return ec.marshalNTradableInstrument2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTradableInstrument(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_tradableInstrument(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_commitmentAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "instrument": - return ec.fieldContext_TradableInstrument_instrument(ctx, field) - case "riskModel": - return ec.fieldContext_TradableInstrument_riskModel(ctx, field) - case "marginCalculator": - return ec.fieldContext_TradableInstrument_marginCalculator(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TradableInstrument", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_decimalPlaces(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_decimalPlaces(ctx, field) +func (ec *executionContext) _LiquidityProvisionUpdate_fee(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionUpdate_fee(ctx, field) if err != nil { return graphql.Null } @@ -41470,7 +43915,7 @@ func (ec *executionContext) _Market_decimalPlaces(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().DecimalPlaces(rctx, obj) + return obj.Fee, nil }) if err != nil { ec.Error(ctx, err) @@ -41482,26 +43927,26 @@ func (ec *executionContext) _Market_decimalPlaces(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_decimalPlaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_fee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_positionDecimalPlaces(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_positionDecimalPlaces(ctx, field) +func (ec *executionContext) _LiquidityProvisionUpdate_sells(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionUpdate_sells(ctx, field) if err != nil { return graphql.Null } @@ -41514,7 +43959,7 @@ func (ec *executionContext) _Market_positionDecimalPlaces(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PositionDecimalPlaces, nil + return obj.Sells, nil }) if err != nil { ec.Error(ctx, err) @@ -41526,26 +43971,32 @@ func (ec *executionContext) _Market_positionDecimalPlaces(ctx context.Context, f } return graphql.Null } - res := resTmp.(int64) + res := resTmp.([]*vega.LiquidityOrderReference) fc.Result = res - return ec.marshalNInt2int64(ctx, field.Selections, res) + return ec.marshalNLiquidityOrderReference2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrderReferenceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_positionDecimalPlaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_sells(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "order": + return ec.fieldContext_LiquidityOrderReference_order(ctx, field) + case "liquidityOrder": + return ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityOrderReference", field.Name) }, } return fc, nil } -func (ec *executionContext) _Market_openingAuction(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_openingAuction(ctx, field) +func (ec *executionContext) _LiquidityProvisionUpdate_buys(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionUpdate_buys(ctx, field) if err != nil { return graphql.Null } @@ -41558,7 +44009,7 @@ func (ec *executionContext) _Market_openingAuction(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().OpeningAuction(rctx, obj) + return obj.Buys, nil }) if err != nil { ec.Error(ctx, err) @@ -41570,32 +44021,32 @@ func (ec *executionContext) _Market_openingAuction(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(*AuctionDuration) + res := resTmp.([]*vega.LiquidityOrderReference) fc.Result = res - return ec.marshalNAuctionDuration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐAuctionDuration(ctx, field.Selections, res) + return ec.marshalNLiquidityOrderReference2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrderReferenceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_openingAuction(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_buys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "durationSecs": - return ec.fieldContext_AuctionDuration_durationSecs(ctx, field) - case "volume": - return ec.fieldContext_AuctionDuration_volume(ctx, field) + case "order": + return ec.fieldContext_LiquidityOrderReference_order(ctx, field) + case "liquidityOrder": + return ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type AuctionDuration", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidityOrderReference", field.Name) }, } return fc, nil } -func (ec *executionContext) _Market_priceMonitoringSettings(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_priceMonitoringSettings(ctx, field) +func (ec *executionContext) _LiquidityProvisionUpdate_version(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionUpdate_version(ctx, field) if err != nil { return graphql.Null } @@ -41608,7 +44059,7 @@ func (ec *executionContext) _Market_priceMonitoringSettings(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().PriceMonitoringSettings(rctx, obj) + return ec.resolvers.LiquidityProvisionUpdate().Version(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -41620,30 +44071,26 @@ func (ec *executionContext) _Market_priceMonitoringSettings(ctx context.Context, } return graphql.Null } - res := resTmp.(*PriceMonitoringSettings) + res := resTmp.(string) fc.Result = res - return ec.marshalNPriceMonitoringSettings2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringSettings(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_priceMonitoringSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionUpdate", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "parameters": - return ec.fieldContext_PriceMonitoringSettings_parameters(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringSettings", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_liquidityMonitoringParameters(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) +func (ec *executionContext) _LiquidityProvisionUpdate_status(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionUpdate_status(ctx, field) if err != nil { return graphql.Null } @@ -41656,7 +44103,7 @@ func (ec *executionContext) _Market_liquidityMonitoringParameters(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().LiquidityMonitoringParameters(rctx, obj) + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) @@ -41668,34 +44115,26 @@ func (ec *executionContext) _Market_liquidityMonitoringParameters(ctx context.Co } return graphql.Null } - res := resTmp.(*LiquidityMonitoringParameters) + res := resTmp.(vega.LiquidityProvision_Status) fc.Result = res - return ec.marshalNLiquidityMonitoringParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐLiquidityMonitoringParameters(ctx, field.Selections, res) + return ec.marshalNLiquidityProvisionStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision_Status(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_liquidityMonitoringParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "targetStakeParameters": - return ec.fieldContext_LiquidityMonitoringParameters_targetStakeParameters(ctx, field) - case "triggeringRatio": - return ec.fieldContext_LiquidityMonitoringParameters_triggeringRatio(ctx, field) - case "auctionExtensionSecs": - return ec.fieldContext_LiquidityMonitoringParameters_auctionExtensionSecs(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityMonitoringParameters", field.Name) + return nil, errors.New("field of type LiquidityProvisionStatus does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_tradingMode(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_tradingMode(ctx, field) +func (ec *executionContext) _LiquidityProvisionUpdate_reference(ctx context.Context, field graphql.CollectedField, obj *vega.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionUpdate_reference(ctx, field) if err != nil { return graphql.Null } @@ -41708,38 +44147,35 @@ func (ec *executionContext) _Market_tradingMode(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TradingMode, nil + return obj.Reference, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(vega.Market_TradingMode) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarketTradingMode2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket_TradingMode(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_tradingMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionUpdate_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type MarketTradingMode does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_state(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_state(ctx, field) +func (ec *executionContext) _LiquidityProvisionWithPending_current(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionWithPending_current(ctx, field) if err != nil { return graphql.Null } @@ -41752,7 +44188,7 @@ func (ec *executionContext) _Market_state(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.State, nil + return obj.Current, nil }) if err != nil { ec.Error(ctx, err) @@ -41764,26 +44200,52 @@ func (ec *executionContext) _Market_state(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(vega.Market_State) + res := resTmp.(*vega.LiquidityProvision) fc.Result = res - return ec.marshalNMarketState2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket_State(ctx, field.Selections, res) + return ec.marshalNLiquidityProvision2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionWithPending_current(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionWithPending", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type MarketState does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_LiquidityProvision_id(ctx, field) + case "party": + return ec.fieldContext_LiquidityProvision_party(ctx, field) + case "createdAt": + return ec.fieldContext_LiquidityProvision_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_LiquidityProvision_updatedAt(ctx, field) + case "market": + return ec.fieldContext_LiquidityProvision_market(ctx, field) + case "commitmentAmount": + return ec.fieldContext_LiquidityProvision_commitmentAmount(ctx, field) + case "fee": + return ec.fieldContext_LiquidityProvision_fee(ctx, field) + case "sells": + return ec.fieldContext_LiquidityProvision_sells(ctx, field) + case "buys": + return ec.fieldContext_LiquidityProvision_buys(ctx, field) + case "version": + return ec.fieldContext_LiquidityProvision_version(ctx, field) + case "status": + return ec.fieldContext_LiquidityProvision_status(ctx, field) + case "reference": + return ec.fieldContext_LiquidityProvision_reference(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvision", field.Name) }, } return fc, nil } -func (ec *executionContext) _Market_proposal(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_proposal(ctx, field) +func (ec *executionContext) _LiquidityProvisionWithPending_pending(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvision) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionWithPending_pending(ctx, field) if err != nil { return graphql.Null } @@ -41796,7 +44258,7 @@ func (ec *executionContext) _Market_proposal(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().Proposal(rctx, obj) + return obj.Pending, nil }) if err != nil { ec.Error(ctx, err) @@ -41805,56 +44267,52 @@ func (ec *executionContext) _Market_proposal(ctx context.Context, field graphql. if resTmp == nil { return graphql.Null } - res := resTmp.(*vega.GovernanceData) + res := resTmp.(*vega.LiquidityProvision) fc.Result = res - return ec.marshalOProposal2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐGovernanceData(ctx, field.Selections, res) + return ec.marshalOLiquidityProvision2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_proposal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionWithPending_pending(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionWithPending", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": - return ec.fieldContext_Proposal_id(ctx, field) - case "reference": - return ec.fieldContext_Proposal_reference(ctx, field) + return ec.fieldContext_LiquidityProvision_id(ctx, field) case "party": - return ec.fieldContext_Proposal_party(ctx, field) - case "state": - return ec.fieldContext_Proposal_state(ctx, field) - case "datetime": - return ec.fieldContext_Proposal_datetime(ctx, field) - case "rationale": - return ec.fieldContext_Proposal_rationale(ctx, field) - case "terms": - return ec.fieldContext_Proposal_terms(ctx, field) - case "votes": - return ec.fieldContext_Proposal_votes(ctx, field) - case "rejectionReason": - return ec.fieldContext_Proposal_rejectionReason(ctx, field) - case "errorDetails": - return ec.fieldContext_Proposal_errorDetails(ctx, field) - case "requiredMajority": - return ec.fieldContext_Proposal_requiredMajority(ctx, field) - case "requiredParticipation": - return ec.fieldContext_Proposal_requiredParticipation(ctx, field) - case "requiredLpMajority": - return ec.fieldContext_Proposal_requiredLpMajority(ctx, field) - case "requiredLpParticipation": - return ec.fieldContext_Proposal_requiredLpParticipation(ctx, field) + return ec.fieldContext_LiquidityProvision_party(ctx, field) + case "createdAt": + return ec.fieldContext_LiquidityProvision_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_LiquidityProvision_updatedAt(ctx, field) + case "market": + return ec.fieldContext_LiquidityProvision_market(ctx, field) + case "commitmentAmount": + return ec.fieldContext_LiquidityProvision_commitmentAmount(ctx, field) + case "fee": + return ec.fieldContext_LiquidityProvision_fee(ctx, field) + case "sells": + return ec.fieldContext_LiquidityProvision_sells(ctx, field) + case "buys": + return ec.fieldContext_LiquidityProvision_buys(ctx, field) + case "version": + return ec.fieldContext_LiquidityProvision_version(ctx, field) + case "status": + return ec.fieldContext_LiquidityProvision_status(ctx, field) + case "reference": + return ec.fieldContext_LiquidityProvision_reference(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Proposal", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvision", field.Name) }, } return fc, nil } -func (ec *executionContext) _Market_ordersConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_ordersConnection(ctx, field) +func (ec *executionContext) _LiquidityProvisionWithPendingEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionWithPendingEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionWithPendingEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -41867,52 +44325,44 @@ func (ec *executionContext) _Market_ordersConnection(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().OrdersConnection(rctx, obj, fc.Args["pagination"].(*v2.Pagination), fc.Args["filter"].(*OrderByPartyIdsFilter)) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.OrderConnection) + res := resTmp.(*v2.LiquidityProvision) fc.Result = res - return ec.marshalOOrderConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOrderConnection(ctx, field.Selections, res) + return ec.marshalNLiquidityProvisionWithPending2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvision(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_ordersConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionWithPendingEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionWithPendingEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_OrderConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_OrderConnection_pageInfo(ctx, field) + case "current": + return ec.fieldContext_LiquidityProvisionWithPending_current(ctx, field) + case "pending": + return ec.fieldContext_LiquidityProvisionWithPending_pending(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type OrderConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionWithPending", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Market_ordersConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Market_accountsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_accountsConnection(ctx, field) +func (ec *executionContext) _LiquidityProvisionWithPendingEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionWithPendingEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionWithPendingEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -41925,52 +44375,38 @@ func (ec *executionContext) _Market_accountsConnection(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().AccountsConnection(rctx, obj, fc.Args["partyId"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.AccountsConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOAccountsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAccountsConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_accountsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionWithPendingEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionWithPendingEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_AccountsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_AccountsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type AccountsConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Market_accountsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Market_tradesConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_tradesConnection(ctx, field) +func (ec *executionContext) _LiquidityProvisionsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionsConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -41983,7 +44419,7 @@ func (ec *executionContext) _Market_tradesConnection(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().TradesConnection(rctx, obj, fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -41992,43 +44428,32 @@ func (ec *executionContext) _Market_tradesConnection(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.TradeConnection) + res := resTmp.([]*v2.LiquidityProvisionsEdge) fc.Result = res - return ec.marshalOTradeConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTradeConnection(ctx, field.Selections, res) + return ec.marshalOLiquidityProvisionsEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvisionsEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_tradesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionsConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_TradeConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_TradeConnection_pageInfo(ctx, field) + case "node": + return ec.fieldContext_LiquidityProvisionsEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_LiquidityProvisionsEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type TradeConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionsEdge", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Market_tradesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Market_depth(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_depth(ctx, field) +func (ec *executionContext) _LiquidityProvisionsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionsConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -42041,7 +44466,7 @@ func (ec *executionContext) _Market_depth(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().Depth(rctx, obj, fc.Args["maxDepth"].(*int)) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -42053,49 +44478,36 @@ func (ec *executionContext) _Market_depth(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(*vega.MarketDepth) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNMarketDepth2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketDepth(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_depth(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionsConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "market": - return ec.fieldContext_MarketDepth_market(ctx, field) - case "buy": - return ec.fieldContext_MarketDepth_buy(ctx, field) - case "sell": - return ec.fieldContext_MarketDepth_sell(ctx, field) - case "lastTrade": - return ec.fieldContext_MarketDepth_lastTrade(ctx, field) - case "sequenceNumber": - return ec.fieldContext_MarketDepth_sequenceNumber(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type MarketDepth", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Market_depth_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Market_candlesConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_candlesConnection(ctx, field) +func (ec *executionContext) _LiquidityProvisionsEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionsEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionsEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -42108,52 +44520,64 @@ func (ec *executionContext) _Market_candlesConnection(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().CandlesConnection(rctx, obj, fc.Args["since"].(string), fc.Args["to"].(*string), fc.Args["interval"].(vega.Interval), fc.Args["pagination"].(*v2.Pagination)) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.CandleDataConnection) + res := resTmp.(*vega.LiquidityProvision) fc.Result = res - return ec.marshalOCandleDataConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCandleDataConnection(ctx, field.Selections, res) + return ec.marshalNLiquidityProvision2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_candlesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionsEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionsEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_CandleDataConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_CandleDataConnection_pageInfo(ctx, field) + case "id": + return ec.fieldContext_LiquidityProvision_id(ctx, field) + case "party": + return ec.fieldContext_LiquidityProvision_party(ctx, field) + case "createdAt": + return ec.fieldContext_LiquidityProvision_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_LiquidityProvision_updatedAt(ctx, field) + case "market": + return ec.fieldContext_LiquidityProvision_market(ctx, field) + case "commitmentAmount": + return ec.fieldContext_LiquidityProvision_commitmentAmount(ctx, field) + case "fee": + return ec.fieldContext_LiquidityProvision_fee(ctx, field) + case "sells": + return ec.fieldContext_LiquidityProvision_sells(ctx, field) + case "buys": + return ec.fieldContext_LiquidityProvision_buys(ctx, field) + case "version": + return ec.fieldContext_LiquidityProvision_version(ctx, field) + case "status": + return ec.fieldContext_LiquidityProvision_status(ctx, field) + case "reference": + return ec.fieldContext_LiquidityProvision_reference(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type CandleDataConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvision", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Market_candlesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Market_data(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_data(ctx, field) +func (ec *executionContext) _LiquidityProvisionsEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionsEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionsEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -42166,103 +44590,38 @@ func (ec *executionContext) _Market_data(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().Data(rctx, obj) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.MarketData) + res := resTmp.(string) fc.Result = res - return ec.marshalOMarketData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketData(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionsEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionsEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "market": - return ec.fieldContext_MarketData_market(ctx, field) - case "markPrice": - return ec.fieldContext_MarketData_markPrice(ctx, field) - case "bestBidPrice": - return ec.fieldContext_MarketData_bestBidPrice(ctx, field) - case "bestBidVolume": - return ec.fieldContext_MarketData_bestBidVolume(ctx, field) - case "bestOfferPrice": - return ec.fieldContext_MarketData_bestOfferPrice(ctx, field) - case "bestOfferVolume": - return ec.fieldContext_MarketData_bestOfferVolume(ctx, field) - case "bestStaticBidPrice": - return ec.fieldContext_MarketData_bestStaticBidPrice(ctx, field) - case "bestStaticBidVolume": - return ec.fieldContext_MarketData_bestStaticBidVolume(ctx, field) - case "bestStaticOfferPrice": - return ec.fieldContext_MarketData_bestStaticOfferPrice(ctx, field) - case "bestStaticOfferVolume": - return ec.fieldContext_MarketData_bestStaticOfferVolume(ctx, field) - case "midPrice": - return ec.fieldContext_MarketData_midPrice(ctx, field) - case "staticMidPrice": - return ec.fieldContext_MarketData_staticMidPrice(ctx, field) - case "timestamp": - return ec.fieldContext_MarketData_timestamp(ctx, field) - case "openInterest": - return ec.fieldContext_MarketData_openInterest(ctx, field) - case "auctionEnd": - return ec.fieldContext_MarketData_auctionEnd(ctx, field) - case "auctionStart": - return ec.fieldContext_MarketData_auctionStart(ctx, field) - case "indicativePrice": - return ec.fieldContext_MarketData_indicativePrice(ctx, field) - case "indicativeVolume": - return ec.fieldContext_MarketData_indicativeVolume(ctx, field) - case "marketTradingMode": - return ec.fieldContext_MarketData_marketTradingMode(ctx, field) - case "marketState": - return ec.fieldContext_MarketData_marketState(ctx, field) - case "trigger": - return ec.fieldContext_MarketData_trigger(ctx, field) - case "extensionTrigger": - return ec.fieldContext_MarketData_extensionTrigger(ctx, field) - case "targetStake": - return ec.fieldContext_MarketData_targetStake(ctx, field) - case "suppliedStake": - return ec.fieldContext_MarketData_suppliedStake(ctx, field) - case "commitments": - return ec.fieldContext_MarketData_commitments(ctx, field) - case "priceMonitoringBounds": - return ec.fieldContext_MarketData_priceMonitoringBounds(ctx, field) - case "marketValueProxy": - return ec.fieldContext_MarketData_marketValueProxy(ctx, field) - case "liquidityProviderFeeShare": - return ec.fieldContext_MarketData_liquidityProviderFeeShare(ctx, field) - case "liquidityProviderSla": - return ec.fieldContext_MarketData_liquidityProviderSla(ctx, field) - case "nextMarkToMarket": - return ec.fieldContext_MarketData_nextMarkToMarket(ctx, field) - case "marketGrowth": - return ec.fieldContext_MarketData_marketGrowth(ctx, field) - case "lastTradedPrice": - return ec.fieldContext_MarketData_lastTradedPrice(ctx, field) - case "productData": - return ec.fieldContext_MarketData_productData(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarketData", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_liquidityProvisions(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_liquidityProvisions(ctx, field) +func (ec *executionContext) _LiquidityProvisionsWithPendingConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionsWithPendingConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionsWithPendingConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -42275,7 +44634,7 @@ func (ec *executionContext) _Market_liquidityProvisions(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().LiquidityProvisions(rctx, obj, fc.Args["partyId"].(*string), fc.Args["live"].(*bool), fc.Args["pagination"].(*v2.Pagination)) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -42284,43 +44643,32 @@ func (ec *executionContext) _Market_liquidityProvisions(ctx context.Context, fie if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.LiquidityProvisionsWithPendingConnection) + res := resTmp.([]*v2.LiquidityProvisionWithPendingEdge) fc.Result = res - return ec.marshalOLiquidityProvisionsWithPendingConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvisionsWithPendingConnection(ctx, field.Selections, res) + return ec.marshalOLiquidityProvisionWithPendingEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvisionWithPendingEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_liquidityProvisions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionsWithPendingConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionsWithPendingConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_LiquidityProvisionsWithPendingConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_LiquidityProvisionsWithPendingConnection_pageInfo(ctx, field) + case "node": + return ec.fieldContext_LiquidityProvisionWithPendingEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_LiquidityProvisionWithPendingEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionsWithPendingConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionWithPendingEdge", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Market_liquidityProvisions_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Market_liquidityProvisionsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) +func (ec *executionContext) _LiquidityProvisionsWithPendingConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.LiquidityProvisionsWithPendingConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquidityProvisionsWithPendingConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -42333,52 +44681,48 @@ func (ec *executionContext) _Market_liquidityProvisionsConnection(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().LiquidityProvisionsConnection(rctx, obj, fc.Args["partyId"].(*string), fc.Args["live"].(*bool), fc.Args["pagination"].(*v2.Pagination)) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.LiquidityProvisionsConnection) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalOLiquidityProvisionsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvisionsConnection(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_liquidityProvisionsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquidityProvisionsWithPendingConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquidityProvisionsWithPendingConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_LiquidityProvisionsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_LiquidityProvisionsConnection_pageInfo(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionsConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Market_liquidityProvisionsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Market_marketTimestamps(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_marketTimestamps(ctx, field) +func (ec *executionContext) _LiquiditySLAParameters_priceRange(ctx context.Context, field graphql.CollectedField, obj *vega.LiquiditySLAParameters) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquiditySLAParameters_priceRange(ctx, field) if err != nil { return graphql.Null } @@ -42391,7 +44735,7 @@ func (ec *executionContext) _Market_marketTimestamps(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketTimestamps, nil + return obj.PriceRange, nil }) if err != nil { ec.Error(ctx, err) @@ -42403,36 +44747,26 @@ func (ec *executionContext) _Market_marketTimestamps(ctx context.Context, field } return graphql.Null } - res := resTmp.(*vega.MarketTimestamps) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarketTimestamps2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketTimestamps(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_marketTimestamps(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquiditySLAParameters_priceRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquiditySLAParameters", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "proposed": - return ec.fieldContext_MarketTimestamps_proposed(ctx, field) - case "pending": - return ec.fieldContext_MarketTimestamps_pending(ctx, field) - case "open": - return ec.fieldContext_MarketTimestamps_open(ctx, field) - case "close": - return ec.fieldContext_MarketTimestamps_close(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarketTimestamps", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_riskFactors(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_riskFactors(ctx, field) +func (ec *executionContext) _LiquiditySLAParameters_commitmentMinTimeFraction(ctx context.Context, field graphql.CollectedField, obj *vega.LiquiditySLAParameters) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquiditySLAParameters_commitmentMinTimeFraction(ctx, field) if err != nil { return graphql.Null } @@ -42445,43 +44779,38 @@ func (ec *executionContext) _Market_riskFactors(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().RiskFactors(rctx, obj) + return obj.CommitmentMinTimeFraction, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.RiskFactor) + res := resTmp.(string) fc.Result = res - return ec.marshalORiskFactor2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐRiskFactor(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_riskFactors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquiditySLAParameters_commitmentMinTimeFraction(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquiditySLAParameters", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "market": - return ec.fieldContext_RiskFactor_market(ctx, field) - case "short": - return ec.fieldContext_RiskFactor_short(ctx, field) - case "long": - return ec.fieldContext_RiskFactor_long(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type RiskFactor", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_linearSlippageFactor(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_linearSlippageFactor(ctx, field) +func (ec *executionContext) _LiquiditySLAParameters_performanceHysteresisEpochs(ctx context.Context, field graphql.CollectedField, obj *vega.LiquiditySLAParameters) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquiditySLAParameters_performanceHysteresisEpochs(ctx, field) if err != nil { return graphql.Null } @@ -42494,7 +44823,7 @@ func (ec *executionContext) _Market_linearSlippageFactor(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LinearSlippageFactor, nil + return ec.resolvers.LiquiditySLAParameters().PerformanceHysteresisEpochs(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -42506,26 +44835,26 @@ func (ec *executionContext) _Market_linearSlippageFactor(ctx context.Context, fi } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_linearSlippageFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquiditySLAParameters_performanceHysteresisEpochs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquiditySLAParameters", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_quadraticSlippageFactor(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) +func (ec *executionContext) _LiquiditySLAParameters_slaCompetitionFactor(ctx context.Context, field graphql.CollectedField, obj *vega.LiquiditySLAParameters) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LiquiditySLAParameters_slaCompetitionFactor(ctx, field) if err != nil { return graphql.Null } @@ -42538,7 +44867,7 @@ func (ec *executionContext) _Market_quadraticSlippageFactor(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.QuadraticSlippageFactor, nil + return obj.SlaCompetitionFactor, nil }) if err != nil { ec.Error(ctx, err) @@ -42555,9 +44884,9 @@ func (ec *executionContext) _Market_quadraticSlippageFactor(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_quadraticSlippageFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LiquiditySLAParameters_slaCompetitionFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LiquiditySLAParameters", Field: field, IsMethod: false, IsResolver: false, @@ -42568,8 +44897,8 @@ func (ec *executionContext) fieldContext_Market_quadraticSlippageFactor(ctx cont return fc, nil } -func (ec *executionContext) _Market_parentMarketID(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_parentMarketID(ctx, field) +func (ec *executionContext) _LogNormalModelParams_mu(ctx context.Context, field graphql.CollectedField, obj *vega.LogNormalModelParams) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LogNormalModelParams_mu(ctx, field) if err != nil { return graphql.Null } @@ -42582,35 +44911,38 @@ func (ec *executionContext) _Market_parentMarketID(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ParentMarketId, nil + return obj.Mu, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(float64) fc.Result = res - return ec.marshalOID2ᚖstring(ctx, field.Selections, res) + return ec.marshalNFloat2float64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_parentMarketID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LogNormalModelParams_mu(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LogNormalModelParams", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Float does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_insurancePoolFraction(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_insurancePoolFraction(ctx, field) +func (ec *executionContext) _LogNormalModelParams_r(ctx context.Context, field graphql.CollectedField, obj *vega.LogNormalModelParams) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LogNormalModelParams_r(ctx, field) if err != nil { return graphql.Null } @@ -42623,35 +44955,38 @@ func (ec *executionContext) _Market_insurancePoolFraction(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InsurancePoolFraction, nil + return obj.R, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(float64) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNFloat2float64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_insurancePoolFraction(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LogNormalModelParams_r(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LogNormalModelParams", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Float does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_successorMarketID(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_successorMarketID(ctx, field) +func (ec *executionContext) _LogNormalModelParams_sigma(ctx context.Context, field graphql.CollectedField, obj *vega.LogNormalModelParams) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LogNormalModelParams_sigma(ctx, field) if err != nil { return graphql.Null } @@ -42664,35 +44999,38 @@ func (ec *executionContext) _Market_successorMarketID(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SuccessorMarketId, nil + return obj.Sigma, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(float64) fc.Result = res - return ec.marshalOID2ᚖstring(ctx, field.Selections, res) + return ec.marshalNFloat2float64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_successorMarketID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LogNormalModelParams_sigma(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LogNormalModelParams", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Float does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Market_liquiditySLAParameters(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Market_liquiditySLAParameters(ctx, field) +func (ec *executionContext) _LogNormalRiskModel_riskAversionParameter(ctx context.Context, field graphql.CollectedField, obj *vega.LogNormalRiskModel) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LogNormalRiskModel_riskAversionParameter(ctx, field) if err != nil { return graphql.Null } @@ -42705,45 +45043,38 @@ func (ec *executionContext) _Market_liquiditySLAParameters(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Market().LiquiditySLAParameters(rctx, obj) + return obj.RiskAversionParameter, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.LiquiditySLAParameters) + res := resTmp.(float64) fc.Result = res - return ec.marshalOLiquiditySLAParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquiditySLAParameters(ctx, field.Selections, res) + return ec.marshalNFloat2float64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Market_liquiditySLAParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LogNormalRiskModel_riskAversionParameter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Market", + Object: "LogNormalRiskModel", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "priceRange": - return ec.fieldContext_LiquiditySLAParameters_priceRange(ctx, field) - case "commitmentMinTimeFraction": - return ec.fieldContext_LiquiditySLAParameters_commitmentMinTimeFraction(ctx, field) - case "performanceHysteresisEpochs": - return ec.fieldContext_LiquiditySLAParameters_performanceHysteresisEpochs(ctx, field) - case "slaCompetitionFactor": - return ec.fieldContext_LiquiditySLAParameters_slaCompetitionFactor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquiditySLAParameters", field.Name) + return nil, errors.New("field of type Float does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.MarketConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketConnection_edges(ctx, field) +func (ec *executionContext) _LogNormalRiskModel_tau(ctx context.Context, field graphql.CollectedField, obj *vega.LogNormalRiskModel) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LogNormalRiskModel_tau(ctx, field) if err != nil { return graphql.Null } @@ -42756,7 +45087,7 @@ func (ec *executionContext) _MarketConnection_edges(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.Tau, nil }) if err != nil { ec.Error(ctx, err) @@ -42768,32 +45099,26 @@ func (ec *executionContext) _MarketConnection_edges(ctx context.Context, field g } return graphql.Null } - res := resTmp.([]*v2.MarketEdge) + res := resTmp.(float64) fc.Result = res - return ec.marshalNMarketEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarketEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNFloat2float64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LogNormalRiskModel_tau(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketConnection", + Object: "LogNormalRiskModel", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_MarketEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_MarketEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarketEdge", field.Name) + return nil, errors.New("field of type Float does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.MarketConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketConnection_pageInfo(ctx, field) +func (ec *executionContext) _LogNormalRiskModel_params(ctx context.Context, field graphql.CollectedField, obj *vega.LogNormalRiskModel) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LogNormalRiskModel_params(ctx, field) if err != nil { return graphql.Null } @@ -42806,7 +45131,7 @@ func (ec *executionContext) _MarketConnection_pageInfo(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Params, nil }) if err != nil { ec.Error(ctx, err) @@ -42818,36 +45143,34 @@ func (ec *executionContext) _MarketConnection_pageInfo(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(*vega.LogNormalModelParams) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNLogNormalModelParams2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLogNormalModelParams(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LogNormalRiskModel_params(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketConnection", + Object: "LogNormalRiskModel", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "mu": + return ec.fieldContext_LogNormalModelParams_mu(ctx, field) + case "r": + return ec.fieldContext_LogNormalModelParams_r(ctx, field) + case "sigma": + return ec.fieldContext_LogNormalModelParams_sigma(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LogNormalModelParams", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketData_market(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_market(ctx, field) +func (ec *executionContext) _LossSocialization_marketId(ctx context.Context, field graphql.CollectedField, obj *LossSocialization) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LossSocialization_marketId(ctx, field) if err != nil { return graphql.Null } @@ -42860,7 +45183,7 @@ func (ec *executionContext) _MarketData_market(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().Market(rctx, obj) + return obj.MarketID, nil }) if err != nil { ec.Error(ctx, err) @@ -42872,82 +45195,26 @@ func (ec *executionContext) _MarketData_market(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(*vega.Market) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LossSocialization_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "LossSocialization", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Market_id(ctx, field) - case "fees": - return ec.fieldContext_Market_fees(ctx, field) - case "tradableInstrument": - return ec.fieldContext_Market_tradableInstrument(ctx, field) - case "decimalPlaces": - return ec.fieldContext_Market_decimalPlaces(ctx, field) - case "positionDecimalPlaces": - return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) - case "openingAuction": - return ec.fieldContext_Market_openingAuction(ctx, field) - case "priceMonitoringSettings": - return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) - case "liquidityMonitoringParameters": - return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) - case "tradingMode": - return ec.fieldContext_Market_tradingMode(ctx, field) - case "state": - return ec.fieldContext_Market_state(ctx, field) - case "proposal": - return ec.fieldContext_Market_proposal(ctx, field) - case "ordersConnection": - return ec.fieldContext_Market_ordersConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Market_accountsConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Market_tradesConnection(ctx, field) - case "depth": - return ec.fieldContext_Market_depth(ctx, field) - case "candlesConnection": - return ec.fieldContext_Market_candlesConnection(ctx, field) - case "data": - return ec.fieldContext_Market_data(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Market_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) - case "marketTimestamps": - return ec.fieldContext_Market_marketTimestamps(ctx, field) - case "riskFactors": - return ec.fieldContext_Market_riskFactors(ctx, field) - case "linearSlippageFactor": - return ec.fieldContext_Market_linearSlippageFactor(ctx, field) - case "quadraticSlippageFactor": - return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) - case "parentMarketID": - return ec.fieldContext_Market_parentMarketID(ctx, field) - case "insurancePoolFraction": - return ec.fieldContext_Market_insurancePoolFraction(ctx, field) - case "successorMarketID": - return ec.fieldContext_Market_successorMarketID(ctx, field) - case "liquiditySLAParameters": - return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketData_markPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_markPrice(ctx, field) +func (ec *executionContext) _LossSocialization_partyId(ctx context.Context, field graphql.CollectedField, obj *LossSocialization) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LossSocialization_partyId(ctx, field) if err != nil { return graphql.Null } @@ -42960,7 +45227,7 @@ func (ec *executionContext) _MarketData_markPrice(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarkPrice, nil + return obj.PartyID, nil }) if err != nil { ec.Error(ctx, err) @@ -42974,24 +45241,24 @@ func (ec *executionContext) _MarketData_markPrice(ctx context.Context, field gra } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_markPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LossSocialization_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "LossSocialization", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketData_bestBidPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_bestBidPrice(ctx, field) +func (ec *executionContext) _LossSocialization_amount(ctx context.Context, field graphql.CollectedField, obj *LossSocialization) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LossSocialization_amount(ctx, field) if err != nil { return graphql.Null } @@ -43004,7 +45271,7 @@ func (ec *executionContext) _MarketData_bestBidPrice(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BestBidPrice, nil + return obj.Amount, nil }) if err != nil { ec.Error(ctx, err) @@ -43021,9 +45288,9 @@ func (ec *executionContext) _MarketData_bestBidPrice(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_bestBidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LossSocialization_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "LossSocialization", Field: field, IsMethod: false, IsResolver: false, @@ -43034,8 +45301,8 @@ func (ec *executionContext) fieldContext_MarketData_bestBidPrice(ctx context.Con return fc, nil } -func (ec *executionContext) _MarketData_bestBidVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_bestBidVolume(ctx, field) +func (ec *executionContext) _MakerFeesGenerated_taker(ctx context.Context, field graphql.CollectedField, obj *v1.MakerFeesGenerated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MakerFeesGenerated_taker(ctx, field) if err != nil { return graphql.Null } @@ -43048,7 +45315,7 @@ func (ec *executionContext) _MarketData_bestBidVolume(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().BestBidVolume(rctx, obj) + return obj.Taker, nil }) if err != nil { ec.Error(ctx, err) @@ -43065,12 +45332,12 @@ func (ec *executionContext) _MarketData_bestBidVolume(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_bestBidVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MakerFeesGenerated_taker(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MakerFeesGenerated", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -43078,8 +45345,8 @@ func (ec *executionContext) fieldContext_MarketData_bestBidVolume(ctx context.Co return fc, nil } -func (ec *executionContext) _MarketData_bestOfferPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_bestOfferPrice(ctx, field) +func (ec *executionContext) _MakerFeesGenerated_makerFeesPaid(ctx context.Context, field graphql.CollectedField, obj *v1.MakerFeesGenerated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MakerFeesGenerated_makerFeesPaid(ctx, field) if err != nil { return graphql.Null } @@ -43092,7 +45359,7 @@ func (ec *executionContext) _MarketData_bestOfferPrice(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BestOfferPrice, nil + return obj.MakerFeesPaid, nil }) if err != nil { ec.Error(ctx, err) @@ -43104,26 +45371,32 @@ func (ec *executionContext) _MarketData_bestOfferPrice(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v1.PartyAmount) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_bestOfferPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MakerFeesGenerated_makerFeesPaid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MakerFeesGenerated", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "partyId": + return ec.fieldContext_PartyAmount_partyId(ctx, field) + case "amount": + return ec.fieldContext_PartyAmount_amount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketData_bestOfferVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_bestOfferVolume(ctx, field) +func (ec *executionContext) _MarginCalculator_scalingFactors(ctx context.Context, field graphql.CollectedField, obj *vega.MarginCalculator) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginCalculator_scalingFactors(ctx, field) if err != nil { return graphql.Null } @@ -43136,7 +45409,7 @@ func (ec *executionContext) _MarketData_bestOfferVolume(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().BestOfferVolume(rctx, obj) + return obj.ScalingFactors, nil }) if err != nil { ec.Error(ctx, err) @@ -43148,26 +45421,34 @@ func (ec *executionContext) _MarketData_bestOfferVolume(ctx context.Context, fie } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.ScalingFactors) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNScalingFactors2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐScalingFactors(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_bestOfferVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginCalculator_scalingFactors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginCalculator", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "searchLevel": + return ec.fieldContext_ScalingFactors_searchLevel(ctx, field) + case "initialMargin": + return ec.fieldContext_ScalingFactors_initialMargin(ctx, field) + case "collateralRelease": + return ec.fieldContext_ScalingFactors_collateralRelease(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ScalingFactors", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketData_bestStaticBidPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_bestStaticBidPrice(ctx, field) +func (ec *executionContext) _MarginConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.MarginConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -43180,38 +45461,41 @@ func (ec *executionContext) _MarketData_bestStaticBidPrice(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BestStaticBidPrice, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.MarginEdge) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOMarginEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarginEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_bestStaticBidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_MarginEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_MarginEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type MarginEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketData_bestStaticBidVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_bestStaticBidVolume(ctx, field) +func (ec *executionContext) _MarginConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.MarginConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -43224,38 +45508,45 @@ func (ec *executionContext) _MarketData_bestStaticBidVolume(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().BestStaticBidVolume(rctx, obj) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_bestStaticBidVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketData_bestStaticOfferPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_bestStaticOfferPrice(ctx, field) +func (ec *executionContext) _MarginEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.MarginEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -43268,7 +45559,7 @@ func (ec *executionContext) _MarketData_bestStaticOfferPrice(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BestStaticOfferPrice, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -43280,26 +45571,50 @@ func (ec *executionContext) _MarketData_bestStaticOfferPrice(ctx context.Context } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.MarginLevels) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNMarginLevels2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginLevels(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_bestStaticOfferPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "market": + return ec.fieldContext_MarginLevels_market(ctx, field) + case "asset": + return ec.fieldContext_MarginLevels_asset(ctx, field) + case "party": + return ec.fieldContext_MarginLevels_party(ctx, field) + case "maintenanceLevel": + return ec.fieldContext_MarginLevels_maintenanceLevel(ctx, field) + case "searchLevel": + return ec.fieldContext_MarginLevels_searchLevel(ctx, field) + case "initialLevel": + return ec.fieldContext_MarginLevels_initialLevel(ctx, field) + case "orderMarginLevel": + return ec.fieldContext_MarginLevels_orderMarginLevel(ctx, field) + case "collateralReleaseLevel": + return ec.fieldContext_MarginLevels_collateralReleaseLevel(ctx, field) + case "timestamp": + return ec.fieldContext_MarginLevels_timestamp(ctx, field) + case "marginMode": + return ec.fieldContext_MarginLevels_marginMode(ctx, field) + case "marginFactor": + return ec.fieldContext_MarginLevels_marginFactor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type MarginLevels", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketData_bestStaticOfferVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_bestStaticOfferVolume(ctx, field) +func (ec *executionContext) _MarginEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.MarginEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -43312,29 +45627,26 @@ func (ec *executionContext) _MarketData_bestStaticOfferVolume(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().BestStaticOfferVolume(rctx, obj) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_bestStaticOfferVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -43342,8 +45654,8 @@ func (ec *executionContext) fieldContext_MarketData_bestStaticOfferVolume(ctx co return fc, nil } -func (ec *executionContext) _MarketData_midPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_midPrice(ctx, field) +func (ec *executionContext) _MarginEstimate_worstCase(ctx context.Context, field graphql.CollectedField, obj *v2.MarginEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginEstimate_worstCase(ctx, field) if err != nil { return graphql.Null } @@ -43356,7 +45668,7 @@ func (ec *executionContext) _MarketData_midPrice(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MidPrice, nil + return ec.resolvers.MarginEstimate().WorstCase(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -43368,26 +45680,46 @@ func (ec *executionContext) _MarketData_midPrice(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*AbstractMarginLevels) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNAbstractMarginLevels2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐAbstractMarginLevels(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_midPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginEstimate_worstCase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginEstimate", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "market": + return ec.fieldContext_AbstractMarginLevels_market(ctx, field) + case "asset": + return ec.fieldContext_AbstractMarginLevels_asset(ctx, field) + case "maintenanceLevel": + return ec.fieldContext_AbstractMarginLevels_maintenanceLevel(ctx, field) + case "searchLevel": + return ec.fieldContext_AbstractMarginLevels_searchLevel(ctx, field) + case "initialLevel": + return ec.fieldContext_AbstractMarginLevels_initialLevel(ctx, field) + case "orderMarginLevel": + return ec.fieldContext_AbstractMarginLevels_orderMarginLevel(ctx, field) + case "collateralReleaseLevel": + return ec.fieldContext_AbstractMarginLevels_collateralReleaseLevel(ctx, field) + case "marginMode": + return ec.fieldContext_AbstractMarginLevels_marginMode(ctx, field) + case "marginFactor": + return ec.fieldContext_AbstractMarginLevels_marginFactor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AbstractMarginLevels", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketData_staticMidPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_staticMidPrice(ctx, field) +func (ec *executionContext) _MarginEstimate_bestCase(ctx context.Context, field graphql.CollectedField, obj *v2.MarginEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginEstimate_bestCase(ctx, field) if err != nil { return graphql.Null } @@ -43400,7 +45732,7 @@ func (ec *executionContext) _MarketData_staticMidPrice(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.StaticMidPrice, nil + return ec.resolvers.MarginEstimate().BestCase(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -43412,26 +45744,46 @@ func (ec *executionContext) _MarketData_staticMidPrice(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*AbstractMarginLevels) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNAbstractMarginLevels2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐAbstractMarginLevels(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_staticMidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginEstimate_bestCase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginEstimate", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "market": + return ec.fieldContext_AbstractMarginLevels_market(ctx, field) + case "asset": + return ec.fieldContext_AbstractMarginLevels_asset(ctx, field) + case "maintenanceLevel": + return ec.fieldContext_AbstractMarginLevels_maintenanceLevel(ctx, field) + case "searchLevel": + return ec.fieldContext_AbstractMarginLevels_searchLevel(ctx, field) + case "initialLevel": + return ec.fieldContext_AbstractMarginLevels_initialLevel(ctx, field) + case "orderMarginLevel": + return ec.fieldContext_AbstractMarginLevels_orderMarginLevel(ctx, field) + case "collateralReleaseLevel": + return ec.fieldContext_AbstractMarginLevels_collateralReleaseLevel(ctx, field) + case "marginMode": + return ec.fieldContext_AbstractMarginLevels_marginMode(ctx, field) + case "marginFactor": + return ec.fieldContext_AbstractMarginLevels_marginFactor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AbstractMarginLevels", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketData_timestamp(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_timestamp(ctx, field) +func (ec *executionContext) _MarginLevels_market(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevels_market(ctx, field) if err != nil { return graphql.Null } @@ -43444,7 +45796,7 @@ func (ec *executionContext) _MarketData_timestamp(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Timestamp, nil + return ec.resolvers.MarginLevels().Market(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -43456,26 +45808,88 @@ func (ec *executionContext) _MarketData_timestamp(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*vega.Market) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevels_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevels", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Market_id(ctx, field) + case "fees": + return ec.fieldContext_Market_fees(ctx, field) + case "tradableInstrument": + return ec.fieldContext_Market_tradableInstrument(ctx, field) + case "decimalPlaces": + return ec.fieldContext_Market_decimalPlaces(ctx, field) + case "positionDecimalPlaces": + return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) + case "openingAuction": + return ec.fieldContext_Market_openingAuction(ctx, field) + case "priceMonitoringSettings": + return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) + case "liquidityMonitoringParameters": + return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) + case "tradingMode": + return ec.fieldContext_Market_tradingMode(ctx, field) + case "state": + return ec.fieldContext_Market_state(ctx, field) + case "proposal": + return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) + case "ordersConnection": + return ec.fieldContext_Market_ordersConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Market_accountsConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Market_tradesConnection(ctx, field) + case "depth": + return ec.fieldContext_Market_depth(ctx, field) + case "candlesConnection": + return ec.fieldContext_Market_candlesConnection(ctx, field) + case "data": + return ec.fieldContext_Market_data(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Market_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) + case "marketTimestamps": + return ec.fieldContext_Market_marketTimestamps(ctx, field) + case "riskFactors": + return ec.fieldContext_Market_riskFactors(ctx, field) + case "linearSlippageFactor": + return ec.fieldContext_Market_linearSlippageFactor(ctx, field) + case "quadraticSlippageFactor": + return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) + case "parentMarketID": + return ec.fieldContext_Market_parentMarketID(ctx, field) + case "insurancePoolFraction": + return ec.fieldContext_Market_insurancePoolFraction(ctx, field) + case "successorMarketID": + return ec.fieldContext_Market_successorMarketID(ctx, field) + case "liquiditySLAParameters": + return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketData_openInterest(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_openInterest(ctx, field) +func (ec *executionContext) _MarginLevels_asset(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevels_asset(ctx, field) if err != nil { return graphql.Null } @@ -43488,7 +45902,7 @@ func (ec *executionContext) _MarketData_openInterest(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().OpenInterest(rctx, obj) + return ec.resolvers.MarginLevels().Asset(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -43500,26 +45914,58 @@ func (ec *executionContext) _MarketData_openInterest(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Asset) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_openInterest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevels_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevels", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketData_auctionEnd(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_auctionEnd(ctx, field) +func (ec *executionContext) _MarginLevels_party(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevels_party(ctx, field) if err != nil { return graphql.Null } @@ -43532,35 +45978,80 @@ func (ec *executionContext) _MarketData_auctionEnd(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().AuctionEnd(rctx, obj) + return ec.resolvers.MarginLevels().Party(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*vega.Party) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_auctionEnd(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevels_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevels", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketData_auctionStart(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_auctionStart(ctx, field) +func (ec *executionContext) _MarginLevels_maintenanceLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevels_maintenanceLevel(ctx, field) if err != nil { return graphql.Null } @@ -43573,23 +46064,26 @@ func (ec *executionContext) _MarketData_auctionStart(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().AuctionStart(rctx, obj) + return ec.resolvers.MarginLevels().MaintenanceLevel(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_auctionStart(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevels_maintenanceLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevels", Field: field, IsMethod: true, IsResolver: true, @@ -43600,8 +46094,8 @@ func (ec *executionContext) fieldContext_MarketData_auctionStart(ctx context.Con return fc, nil } -func (ec *executionContext) _MarketData_indicativePrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_indicativePrice(ctx, field) +func (ec *executionContext) _MarginLevels_searchLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevels_searchLevel(ctx, field) if err != nil { return graphql.Null } @@ -43614,7 +46108,7 @@ func (ec *executionContext) _MarketData_indicativePrice(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IndicativePrice, nil + return obj.SearchLevel, nil }) if err != nil { ec.Error(ctx, err) @@ -43631,9 +46125,9 @@ func (ec *executionContext) _MarketData_indicativePrice(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_indicativePrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevels_searchLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevels", Field: field, IsMethod: false, IsResolver: false, @@ -43644,8 +46138,8 @@ func (ec *executionContext) fieldContext_MarketData_indicativePrice(ctx context. return fc, nil } -func (ec *executionContext) _MarketData_indicativeVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_indicativeVolume(ctx, field) +func (ec *executionContext) _MarginLevels_initialLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevels_initialLevel(ctx, field) if err != nil { return graphql.Null } @@ -43658,7 +46152,7 @@ func (ec *executionContext) _MarketData_indicativeVolume(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().IndicativeVolume(rctx, obj) + return ec.resolvers.MarginLevels().InitialLevel(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -43675,9 +46169,9 @@ func (ec *executionContext) _MarketData_indicativeVolume(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_indicativeVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevels_initialLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevels", Field: field, IsMethod: true, IsResolver: true, @@ -43688,8 +46182,8 @@ func (ec *executionContext) fieldContext_MarketData_indicativeVolume(ctx context return fc, nil } -func (ec *executionContext) _MarketData_marketTradingMode(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_marketTradingMode(ctx, field) +func (ec *executionContext) _MarginLevels_orderMarginLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevels_orderMarginLevel(ctx, field) if err != nil { return graphql.Null } @@ -43702,7 +46196,7 @@ func (ec *executionContext) _MarketData_marketTradingMode(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketTradingMode, nil + return ec.resolvers.MarginLevels().OrderMarginLevel(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -43714,26 +46208,26 @@ func (ec *executionContext) _MarketData_marketTradingMode(ctx context.Context, f } return graphql.Null } - res := resTmp.(vega.Market_TradingMode) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarketTradingMode2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket_TradingMode(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_marketTradingMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevels_orderMarginLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevels", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type MarketTradingMode does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketData_marketState(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_marketState(ctx, field) +func (ec *executionContext) _MarginLevels_collateralReleaseLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevels_collateralReleaseLevel(ctx, field) if err != nil { return graphql.Null } @@ -43746,7 +46240,7 @@ func (ec *executionContext) _MarketData_marketState(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketState, nil + return obj.CollateralReleaseLevel, nil }) if err != nil { ec.Error(ctx, err) @@ -43758,26 +46252,26 @@ func (ec *executionContext) _MarketData_marketState(ctx context.Context, field g } return graphql.Null } - res := resTmp.(vega.Market_State) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarketState2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket_State(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_marketState(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevels_collateralReleaseLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevels", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type MarketState does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketData_trigger(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_trigger(ctx, field) +func (ec *executionContext) _MarginLevels_timestamp(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevels_timestamp(ctx, field) if err != nil { return graphql.Null } @@ -43790,7 +46284,7 @@ func (ec *executionContext) _MarketData_trigger(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Trigger, nil + return obj.Timestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -43802,26 +46296,26 @@ func (ec *executionContext) _MarketData_trigger(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(vega.AuctionTrigger) + res := resTmp.(int64) fc.Result = res - return ec.marshalNAuctionTrigger2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAuctionTrigger(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevels_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevels", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type AuctionTrigger does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketData_extensionTrigger(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_extensionTrigger(ctx, field) +func (ec *executionContext) _MarginLevels_marginMode(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevels_marginMode(ctx, field) if err != nil { return graphql.Null } @@ -43834,7 +46328,7 @@ func (ec *executionContext) _MarketData_extensionTrigger(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ExtensionTrigger, nil + return obj.MarginMode, nil }) if err != nil { ec.Error(ctx, err) @@ -43846,26 +46340,26 @@ func (ec *executionContext) _MarketData_extensionTrigger(ctx context.Context, fi } return graphql.Null } - res := resTmp.(vega.AuctionTrigger) + res := resTmp.(vega.MarginMode) fc.Result = res - return ec.marshalNAuctionTrigger2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAuctionTrigger(ctx, field.Selections, res) + return ec.marshalNMarginMode2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginMode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_extensionTrigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevels_marginMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevels", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type AuctionTrigger does not have child fields") + return nil, errors.New("field of type MarginMode does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketData_targetStake(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_targetStake(ctx, field) +func (ec *executionContext) _MarginLevels_marginFactor(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevels_marginFactor(ctx, field) if err != nil { return graphql.Null } @@ -43878,23 +46372,26 @@ func (ec *executionContext) _MarketData_targetStake(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TargetStake, nil + return obj.MarginFactor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_targetStake(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevels_marginFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevels", Field: field, IsMethod: false, IsResolver: false, @@ -43905,8 +46402,8 @@ func (ec *executionContext) fieldContext_MarketData_targetStake(ctx context.Cont return fc, nil } -func (ec *executionContext) _MarketData_suppliedStake(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_suppliedStake(ctx, field) +func (ec *executionContext) _MarginLevelsUpdate_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevelsUpdate_marketId(ctx, field) if err != nil { return graphql.Null } @@ -43919,35 +46416,38 @@ func (ec *executionContext) _MarketData_suppliedStake(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SuppliedStake, nil + return obj.MarketId, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_suppliedStake(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevelsUpdate_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevelsUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketData_commitments(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_commitments(ctx, field) +func (ec *executionContext) _MarginLevelsUpdate_asset(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevelsUpdate_asset(ctx, field) if err != nil { return graphql.Null } @@ -43960,7 +46460,7 @@ func (ec *executionContext) _MarketData_commitments(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().Commitments(rctx, obj) + return obj.Asset, nil }) if err != nil { ec.Error(ctx, err) @@ -43972,32 +46472,26 @@ func (ec *executionContext) _MarketData_commitments(ctx context.Context, field g } return graphql.Null } - res := resTmp.(*MarketDataCommitments) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarketDataCommitments2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐMarketDataCommitments(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_commitments(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevelsUpdate_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevelsUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "sells": - return ec.fieldContext_MarketDataCommitments_sells(ctx, field) - case "buys": - return ec.fieldContext_MarketDataCommitments_buys(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarketDataCommitments", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketData_priceMonitoringBounds(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_priceMonitoringBounds(ctx, field) +func (ec *executionContext) _MarginLevelsUpdate_partyId(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevelsUpdate_partyId(ctx, field) if err != nil { return graphql.Null } @@ -44010,45 +46504,38 @@ func (ec *executionContext) _MarketData_priceMonitoringBounds(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().PriceMonitoringBounds(rctx, obj) + return obj.PartyId, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*PriceMonitoringBounds) + res := resTmp.(string) fc.Result = res - return ec.marshalOPriceMonitoringBounds2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringBoundsᚄ(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_priceMonitoringBounds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevelsUpdate_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevelsUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "minValidPrice": - return ec.fieldContext_PriceMonitoringBounds_minValidPrice(ctx, field) - case "maxValidPrice": - return ec.fieldContext_PriceMonitoringBounds_maxValidPrice(ctx, field) - case "trigger": - return ec.fieldContext_PriceMonitoringBounds_trigger(ctx, field) - case "referencePrice": - return ec.fieldContext_PriceMonitoringBounds_referencePrice(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringBounds", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketData_marketValueProxy(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_marketValueProxy(ctx, field) +func (ec *executionContext) _MarginLevelsUpdate_maintenanceLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevelsUpdate_maintenanceLevel(ctx, field) if err != nil { return graphql.Null } @@ -44061,7 +46548,7 @@ func (ec *executionContext) _MarketData_marketValueProxy(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketValueProxy, nil + return ec.resolvers.MarginLevelsUpdate().MaintenanceLevel(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -44078,12 +46565,12 @@ func (ec *executionContext) _MarketData_marketValueProxy(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_marketValueProxy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevelsUpdate_maintenanceLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevelsUpdate", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -44091,8 +46578,8 @@ func (ec *executionContext) fieldContext_MarketData_marketValueProxy(ctx context return fc, nil } -func (ec *executionContext) _MarketData_liquidityProviderFeeShare(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_liquidityProviderFeeShare(ctx, field) +func (ec *executionContext) _MarginLevelsUpdate_searchLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevelsUpdate_searchLevel(ctx, field) if err != nil { return graphql.Null } @@ -44105,47 +46592,38 @@ func (ec *executionContext) _MarketData_liquidityProviderFeeShare(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().LiquidityProviderFeeShare(rctx, obj) + return obj.SearchLevel, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*LiquidityProviderFeeShare) + res := resTmp.(string) fc.Result = res - return ec.marshalOLiquidityProviderFeeShare2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐLiquidityProviderFeeShareᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_liquidityProviderFeeShare(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevelsUpdate_searchLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevelsUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "party": - return ec.fieldContext_LiquidityProviderFeeShare_party(ctx, field) - case "equityLikeShare": - return ec.fieldContext_LiquidityProviderFeeShare_equityLikeShare(ctx, field) - case "averageEntryValuation": - return ec.fieldContext_LiquidityProviderFeeShare_averageEntryValuation(ctx, field) - case "averageScore": - return ec.fieldContext_LiquidityProviderFeeShare_averageScore(ctx, field) - case "virtualStake": - return ec.fieldContext_LiquidityProviderFeeShare_virtualStake(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProviderFeeShare", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketData_liquidityProviderSla(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_liquidityProviderSla(ctx, field) +func (ec *executionContext) _MarginLevelsUpdate_initialLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevelsUpdate_initialLevel(ctx, field) if err != nil { return graphql.Null } @@ -44158,55 +46636,38 @@ func (ec *executionContext) _MarketData_liquidityProviderSla(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().LiquidityProviderSLA(rctx, obj) + return ec.resolvers.MarginLevelsUpdate().InitialLevel(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*LiquidityProviderSLA) + res := resTmp.(string) fc.Result = res - return ec.marshalOLiquidityProviderSLA2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐLiquidityProviderSLAᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_liquidityProviderSla(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevelsUpdate_initialLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevelsUpdate", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "party": - return ec.fieldContext_LiquidityProviderSLA_party(ctx, field) - case "currentEpochFractionOfTimeOnBook": - return ec.fieldContext_LiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx, field) - case "lastEpochFractionOfTimeOnBook": - return ec.fieldContext_LiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx, field) - case "lastEpochFeePenalty": - return ec.fieldContext_LiquidityProviderSLA_lastEpochFeePenalty(ctx, field) - case "lastEpochBondPenalty": - return ec.fieldContext_LiquidityProviderSLA_lastEpochBondPenalty(ctx, field) - case "hysteresisPeriodFeePenalties": - return ec.fieldContext_LiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx, field) - case "requiredLiquidity": - return ec.fieldContext_LiquidityProviderSLA_requiredLiquidity(ctx, field) - case "notionalVolumeBuys": - return ec.fieldContext_LiquidityProviderSLA_notionalVolumeBuys(ctx, field) - case "notionalVolumeSells": - return ec.fieldContext_LiquidityProviderSLA_notionalVolumeSells(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProviderSLA", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketData_nextMarkToMarket(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_nextMarkToMarket(ctx, field) +func (ec *executionContext) _MarginLevelsUpdate_orderMarginLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevelsUpdate_orderMarginLevel(ctx, field) if err != nil { return graphql.Null } @@ -44219,7 +46680,7 @@ func (ec *executionContext) _MarketData_nextMarkToMarket(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().NextMarkToMarket(rctx, obj) + return ec.resolvers.MarginLevelsUpdate().OrderMarginLevel(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -44236,9 +46697,9 @@ func (ec *executionContext) _MarketData_nextMarkToMarket(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_nextMarkToMarket(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevelsUpdate_orderMarginLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevelsUpdate", Field: field, IsMethod: true, IsResolver: true, @@ -44249,8 +46710,8 @@ func (ec *executionContext) fieldContext_MarketData_nextMarkToMarket(ctx context return fc, nil } -func (ec *executionContext) _MarketData_marketGrowth(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_marketGrowth(ctx, field) +func (ec *executionContext) _MarginLevelsUpdate_collateralReleaseLevel(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevelsUpdate_collateralReleaseLevel(ctx, field) if err != nil { return graphql.Null } @@ -44263,7 +46724,7 @@ func (ec *executionContext) _MarketData_marketGrowth(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketGrowth, nil + return obj.CollateralReleaseLevel, nil }) if err != nil { ec.Error(ctx, err) @@ -44280,9 +46741,9 @@ func (ec *executionContext) _MarketData_marketGrowth(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_marketGrowth(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevelsUpdate_collateralReleaseLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevelsUpdate", Field: field, IsMethod: false, IsResolver: false, @@ -44293,8 +46754,8 @@ func (ec *executionContext) fieldContext_MarketData_marketGrowth(ctx context.Con return fc, nil } -func (ec *executionContext) _MarketData_lastTradedPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_lastTradedPrice(ctx, field) +func (ec *executionContext) _MarginLevelsUpdate_timestamp(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevelsUpdate_timestamp(ctx, field) if err != nil { return graphql.Null } @@ -44307,7 +46768,7 @@ func (ec *executionContext) _MarketData_lastTradedPrice(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LastTradedPrice, nil + return obj.Timestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -44319,26 +46780,26 @@ func (ec *executionContext) _MarketData_lastTradedPrice(ctx context.Context, fie } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_lastTradedPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevelsUpdate_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevelsUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketData_productData(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketData_productData(ctx, field) +func (ec *executionContext) _MarginLevelsUpdate_marginMode(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevelsUpdate_marginMode(ctx, field) if err != nil { return graphql.Null } @@ -44351,35 +46812,38 @@ func (ec *executionContext) _MarketData_productData(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketData().ProductData(rctx, obj) + return obj.MarginMode, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(ProductData) + res := resTmp.(vega.MarginMode) fc.Result = res - return ec.marshalOProductData2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProductData(ctx, field.Selections, res) + return ec.marshalNMarginMode2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginMode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketData_productData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevelsUpdate_marginMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketData", + Object: "MarginLevelsUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ProductData does not have child fields") + return nil, errors.New("field of type MarginMode does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketDataCommitments_sells(ctx context.Context, field graphql.CollectedField, obj *MarketDataCommitments) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDataCommitments_sells(ctx, field) +func (ec *executionContext) _MarginLevelsUpdate_marginFactor(ctx context.Context, field graphql.CollectedField, obj *vega.MarginLevels) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarginLevelsUpdate_marginFactor(ctx, field) if err != nil { return graphql.Null } @@ -44392,41 +46856,38 @@ func (ec *executionContext) _MarketDataCommitments_sells(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Sells, nil + return obj.MarginFactor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.LiquidityOrderReference) + res := resTmp.(string) fc.Result = res - return ec.marshalOLiquidityOrderReference2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrderReferenceᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDataCommitments_sells(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarginLevelsUpdate_marginFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDataCommitments", + Object: "MarginLevelsUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "order": - return ec.fieldContext_LiquidityOrderReference_order(ctx, field) - case "liquidityOrder": - return ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityOrderReference", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketDataCommitments_buys(ctx context.Context, field graphql.CollectedField, obj *MarketDataCommitments) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDataCommitments_buys(ctx, field) +func (ec *executionContext) _Market_id(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_id(ctx, field) if err != nil { return graphql.Null } @@ -44439,41 +46900,38 @@ func (ec *executionContext) _MarketDataCommitments_buys(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Buys, nil + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.LiquidityOrderReference) + res := resTmp.(string) fc.Result = res - return ec.marshalOLiquidityOrderReference2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrderReferenceᚄ(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDataCommitments_buys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDataCommitments", + Object: "Market", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "order": - return ec.fieldContext_LiquidityOrderReference_order(ctx, field) - case "liquidityOrder": - return ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityOrderReference", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketDataConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.MarketDataConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDataConnection_edges(ctx, field) +func (ec *executionContext) _Market_fees(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_fees(ctx, field) if err != nil { return graphql.Null } @@ -44486,41 +46944,44 @@ func (ec *executionContext) _MarketDataConnection_edges(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.Fees, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.MarketDataEdge) + res := resTmp.(*vega.Fees) fc.Result = res - return ec.marshalOMarketDataEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarketDataEdge(ctx, field.Selections, res) + return ec.marshalNFees2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐFees(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDataConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_fees(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDataConnection", + Object: "Market", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_MarketDataEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_MarketDataEdge_cursor(ctx, field) + case "factors": + return ec.fieldContext_Fees_factors(ctx, field) + case "liquidityFeeSettings": + return ec.fieldContext_Fees_liquidityFeeSettings(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type MarketDataEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Fees", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketDataConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.MarketDataConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDataConnection_pageInfo(ctx, field) +func (ec *executionContext) _Market_tradableInstrument(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_tradableInstrument(ctx, field) if err != nil { return graphql.Null } @@ -44533,45 +46994,46 @@ func (ec *executionContext) _MarketDataConnection_pageInfo(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.TradableInstrument, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(*vega.TradableInstrument) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNTradableInstrument2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTradableInstrument(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDataConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_tradableInstrument(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDataConnection", + Object: "Market", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "instrument": + return ec.fieldContext_TradableInstrument_instrument(ctx, field) + case "riskModel": + return ec.fieldContext_TradableInstrument_riskModel(ctx, field) + case "marginCalculator": + return ec.fieldContext_TradableInstrument_marginCalculator(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TradableInstrument", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketDataEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.MarketDataEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDataEdge_node(ctx, field) +func (ec *executionContext) _Market_decimalPlaces(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_decimalPlaces(ctx, field) if err != nil { return graphql.Null } @@ -44584,7 +47046,7 @@ func (ec *executionContext) _MarketDataEdge_node(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.Market().DecimalPlaces(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -44596,94 +47058,26 @@ func (ec *executionContext) _MarketDataEdge_node(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(*vega.MarketData) + res := resTmp.(int) fc.Result = res - return ec.marshalNMarketData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketData(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDataEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_decimalPlaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDataEdge", + Object: "Market", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "market": - return ec.fieldContext_MarketData_market(ctx, field) - case "markPrice": - return ec.fieldContext_MarketData_markPrice(ctx, field) - case "bestBidPrice": - return ec.fieldContext_MarketData_bestBidPrice(ctx, field) - case "bestBidVolume": - return ec.fieldContext_MarketData_bestBidVolume(ctx, field) - case "bestOfferPrice": - return ec.fieldContext_MarketData_bestOfferPrice(ctx, field) - case "bestOfferVolume": - return ec.fieldContext_MarketData_bestOfferVolume(ctx, field) - case "bestStaticBidPrice": - return ec.fieldContext_MarketData_bestStaticBidPrice(ctx, field) - case "bestStaticBidVolume": - return ec.fieldContext_MarketData_bestStaticBidVolume(ctx, field) - case "bestStaticOfferPrice": - return ec.fieldContext_MarketData_bestStaticOfferPrice(ctx, field) - case "bestStaticOfferVolume": - return ec.fieldContext_MarketData_bestStaticOfferVolume(ctx, field) - case "midPrice": - return ec.fieldContext_MarketData_midPrice(ctx, field) - case "staticMidPrice": - return ec.fieldContext_MarketData_staticMidPrice(ctx, field) - case "timestamp": - return ec.fieldContext_MarketData_timestamp(ctx, field) - case "openInterest": - return ec.fieldContext_MarketData_openInterest(ctx, field) - case "auctionEnd": - return ec.fieldContext_MarketData_auctionEnd(ctx, field) - case "auctionStart": - return ec.fieldContext_MarketData_auctionStart(ctx, field) - case "indicativePrice": - return ec.fieldContext_MarketData_indicativePrice(ctx, field) - case "indicativeVolume": - return ec.fieldContext_MarketData_indicativeVolume(ctx, field) - case "marketTradingMode": - return ec.fieldContext_MarketData_marketTradingMode(ctx, field) - case "marketState": - return ec.fieldContext_MarketData_marketState(ctx, field) - case "trigger": - return ec.fieldContext_MarketData_trigger(ctx, field) - case "extensionTrigger": - return ec.fieldContext_MarketData_extensionTrigger(ctx, field) - case "targetStake": - return ec.fieldContext_MarketData_targetStake(ctx, field) - case "suppliedStake": - return ec.fieldContext_MarketData_suppliedStake(ctx, field) - case "commitments": - return ec.fieldContext_MarketData_commitments(ctx, field) - case "priceMonitoringBounds": - return ec.fieldContext_MarketData_priceMonitoringBounds(ctx, field) - case "marketValueProxy": - return ec.fieldContext_MarketData_marketValueProxy(ctx, field) - case "liquidityProviderFeeShare": - return ec.fieldContext_MarketData_liquidityProviderFeeShare(ctx, field) - case "liquidityProviderSla": - return ec.fieldContext_MarketData_liquidityProviderSla(ctx, field) - case "nextMarkToMarket": - return ec.fieldContext_MarketData_nextMarkToMarket(ctx, field) - case "marketGrowth": - return ec.fieldContext_MarketData_marketGrowth(ctx, field) - case "lastTradedPrice": - return ec.fieldContext_MarketData_lastTradedPrice(ctx, field) - case "productData": - return ec.fieldContext_MarketData_productData(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarketData", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketDataEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.MarketDataEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDataEdge_cursor(ctx, field) +func (ec *executionContext) _Market_positionDecimalPlaces(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_positionDecimalPlaces(ctx, field) if err != nil { return graphql.Null } @@ -44696,35 +47090,38 @@ func (ec *executionContext) _MarketDataEdge_cursor(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.PositionDecimalPlaces, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDataEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_positionDecimalPlaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDataEdge", + Object: "Market", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketDepth_market(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDepth_market(ctx, field) +func (ec *executionContext) _Market_openingAuction(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_openingAuction(ctx, field) if err != nil { return graphql.Null } @@ -44737,7 +47134,7 @@ func (ec *executionContext) _MarketDepth_market(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketDepth().Market(rctx, obj) + return ec.resolvers.Market().OpeningAuction(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -44749,82 +47146,32 @@ func (ec *executionContext) _MarketDepth_market(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(*vega.Market) + res := resTmp.(*AuctionDuration) fc.Result = res - return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) + return ec.marshalNAuctionDuration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐAuctionDuration(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDepth_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_openingAuction(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDepth", + Object: "Market", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Market_id(ctx, field) - case "fees": - return ec.fieldContext_Market_fees(ctx, field) - case "tradableInstrument": - return ec.fieldContext_Market_tradableInstrument(ctx, field) - case "decimalPlaces": - return ec.fieldContext_Market_decimalPlaces(ctx, field) - case "positionDecimalPlaces": - return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) - case "openingAuction": - return ec.fieldContext_Market_openingAuction(ctx, field) - case "priceMonitoringSettings": - return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) - case "liquidityMonitoringParameters": - return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) - case "tradingMode": - return ec.fieldContext_Market_tradingMode(ctx, field) - case "state": - return ec.fieldContext_Market_state(ctx, field) - case "proposal": - return ec.fieldContext_Market_proposal(ctx, field) - case "ordersConnection": - return ec.fieldContext_Market_ordersConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Market_accountsConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Market_tradesConnection(ctx, field) - case "depth": - return ec.fieldContext_Market_depth(ctx, field) - case "candlesConnection": - return ec.fieldContext_Market_candlesConnection(ctx, field) - case "data": - return ec.fieldContext_Market_data(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Market_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) - case "marketTimestamps": - return ec.fieldContext_Market_marketTimestamps(ctx, field) - case "riskFactors": - return ec.fieldContext_Market_riskFactors(ctx, field) - case "linearSlippageFactor": - return ec.fieldContext_Market_linearSlippageFactor(ctx, field) - case "quadraticSlippageFactor": - return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) - case "parentMarketID": - return ec.fieldContext_Market_parentMarketID(ctx, field) - case "insurancePoolFraction": - return ec.fieldContext_Market_insurancePoolFraction(ctx, field) - case "successorMarketID": - return ec.fieldContext_Market_successorMarketID(ctx, field) - case "liquiditySLAParameters": - return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "durationSecs": + return ec.fieldContext_AuctionDuration_durationSecs(ctx, field) + case "volume": + return ec.fieldContext_AuctionDuration_volume(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) + return nil, fmt.Errorf("no field named %q was found under type AuctionDuration", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketDepth_buy(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDepth_buy(ctx, field) +func (ec *executionContext) _Market_priceMonitoringSettings(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_priceMonitoringSettings(ctx, field) if err != nil { return graphql.Null } @@ -44837,43 +47184,42 @@ func (ec *executionContext) _MarketDepth_buy(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Buy, nil + return ec.resolvers.Market().PriceMonitoringSettings(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.PriceLevel) + res := resTmp.(*PriceMonitoringSettings) fc.Result = res - return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) + return ec.marshalNPriceMonitoringSettings2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringSettings(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDepth_buy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_priceMonitoringSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDepth", + Object: "Market", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "price": - return ec.fieldContext_PriceLevel_price(ctx, field) - case "volume": - return ec.fieldContext_PriceLevel_volume(ctx, field) - case "numberOfOrders": - return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) + case "parameters": + return ec.fieldContext_PriceMonitoringSettings_parameters(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringSettings", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketDepth_sell(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDepth_sell(ctx, field) +func (ec *executionContext) _Market_liquidityMonitoringParameters(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) if err != nil { return graphql.Null } @@ -44886,43 +47232,42 @@ func (ec *executionContext) _MarketDepth_sell(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Sell, nil + return ec.resolvers.Market().LiquidityMonitoringParameters(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.PriceLevel) + res := resTmp.(*LiquidityMonitoringParameters) fc.Result = res - return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) + return ec.marshalNLiquidityMonitoringParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐLiquidityMonitoringParameters(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDepth_sell(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_liquidityMonitoringParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDepth", + Object: "Market", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "price": - return ec.fieldContext_PriceLevel_price(ctx, field) - case "volume": - return ec.fieldContext_PriceLevel_volume(ctx, field) - case "numberOfOrders": - return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) + case "targetStakeParameters": + return ec.fieldContext_LiquidityMonitoringParameters_targetStakeParameters(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidityMonitoringParameters", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketDepth_lastTrade(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDepth_lastTrade(ctx, field) +func (ec *executionContext) _Market_tradingMode(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_tradingMode(ctx, field) if err != nil { return graphql.Null } @@ -44935,67 +47280,38 @@ func (ec *executionContext) _MarketDepth_lastTrade(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketDepth().LastTrade(rctx, obj) + return obj.TradingMode, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.Trade) + res := resTmp.(vega.Market_TradingMode) fc.Result = res - return ec.marshalOTrade2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTrade(ctx, field.Selections, res) + return ec.marshalNMarketTradingMode2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket_TradingMode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDepth_lastTrade(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_tradingMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDepth", + Object: "Market", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Trade_id(ctx, field) - case "market": - return ec.fieldContext_Trade_market(ctx, field) - case "buyOrder": - return ec.fieldContext_Trade_buyOrder(ctx, field) - case "sellOrder": - return ec.fieldContext_Trade_sellOrder(ctx, field) - case "buyer": - return ec.fieldContext_Trade_buyer(ctx, field) - case "seller": - return ec.fieldContext_Trade_seller(ctx, field) - case "aggressor": - return ec.fieldContext_Trade_aggressor(ctx, field) - case "price": - return ec.fieldContext_Trade_price(ctx, field) - case "size": - return ec.fieldContext_Trade_size(ctx, field) - case "createdAt": - return ec.fieldContext_Trade_createdAt(ctx, field) - case "type": - return ec.fieldContext_Trade_type(ctx, field) - case "buyerFee": - return ec.fieldContext_Trade_buyerFee(ctx, field) - case "sellerFee": - return ec.fieldContext_Trade_sellerFee(ctx, field) - case "buyerAuctionBatch": - return ec.fieldContext_Trade_buyerAuctionBatch(ctx, field) - case "sellerAuctionBatch": - return ec.fieldContext_Trade_sellerAuctionBatch(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Trade", field.Name) + return nil, errors.New("field of type MarketTradingMode does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketDepth_sequenceNumber(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDepth_sequenceNumber(ctx, field) +func (ec *executionContext) _Market_state(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_state(ctx, field) if err != nil { return graphql.Null } @@ -45008,7 +47324,7 @@ func (ec *executionContext) _MarketDepth_sequenceNumber(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketDepth().SequenceNumber(rctx, obj) + return obj.State, nil }) if err != nil { ec.Error(ctx, err) @@ -45020,26 +47336,97 @@ func (ec *executionContext) _MarketDepth_sequenceNumber(ctx context.Context, fie } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.Market_State) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNMarketState2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket_State(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDepth_sequenceNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDepth", + Object: "Market", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type MarketState does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Market_proposal(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_proposal(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Market().Proposal(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*vega.GovernanceData) + fc.Result = res + return ec.marshalOProposal2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐGovernanceData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Market_proposal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Market", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Proposal_id(ctx, field) + case "reference": + return ec.fieldContext_Proposal_reference(ctx, field) + case "party": + return ec.fieldContext_Proposal_party(ctx, field) + case "state": + return ec.fieldContext_Proposal_state(ctx, field) + case "datetime": + return ec.fieldContext_Proposal_datetime(ctx, field) + case "rationale": + return ec.fieldContext_Proposal_rationale(ctx, field) + case "terms": + return ec.fieldContext_Proposal_terms(ctx, field) + case "votes": + return ec.fieldContext_Proposal_votes(ctx, field) + case "rejectionReason": + return ec.fieldContext_Proposal_rejectionReason(ctx, field) + case "errorDetails": + return ec.fieldContext_Proposal_errorDetails(ctx, field) + case "requiredMajority": + return ec.fieldContext_Proposal_requiredMajority(ctx, field) + case "requiredParticipation": + return ec.fieldContext_Proposal_requiredParticipation(ctx, field) + case "requiredLpMajority": + return ec.fieldContext_Proposal_requiredLpMajority(ctx, field) + case "requiredLpParticipation": + return ec.fieldContext_Proposal_requiredLpParticipation(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Proposal", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketDepthTrade_id(ctx context.Context, field graphql.CollectedField, obj *MarketDepthTrade) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDepthTrade_id(ctx, field) +func (ec *executionContext) _Market_marketProposal(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_marketProposal(ctx, field) if err != nil { return graphql.Null } @@ -45052,38 +47439,35 @@ func (ec *executionContext) _MarketDepthTrade_id(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return ec.resolvers.Market().MarketProposal(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(ProposalNode) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOProposalNode2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalNode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDepthTrade_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_marketProposal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDepthTrade", + Object: "Market", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type ProposalNode does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketDepthTrade_price(ctx context.Context, field graphql.CollectedField, obj *MarketDepthTrade) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDepthTrade_price(ctx, field) +func (ec *executionContext) _Market_ordersConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_ordersConnection(ctx, field) if err != nil { return graphql.Null } @@ -45096,38 +47480,52 @@ func (ec *executionContext) _MarketDepthTrade_price(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Price, nil + return ec.resolvers.Market().OrdersConnection(rctx, obj, fc.Args["pagination"].(*v2.Pagination), fc.Args["filter"].(*OrderByPartyIdsFilter)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.OrderConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOOrderConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOrderConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDepthTrade_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_ordersConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDepthTrade", + Object: "Market", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_OrderConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_OrderConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OrderConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Market_ordersConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _MarketDepthTrade_size(ctx context.Context, field graphql.CollectedField, obj *MarketDepthTrade) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDepthTrade_size(ctx, field) +func (ec *executionContext) _Market_accountsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_accountsConnection(ctx, field) if err != nil { return graphql.Null } @@ -45140,38 +47538,52 @@ func (ec *executionContext) _MarketDepthTrade_size(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Size, nil + return ec.resolvers.Market().AccountsConnection(rctx, obj, fc.Args["partyId"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.AccountsConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOAccountsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAccountsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDepthTrade_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_accountsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDepthTrade", + Object: "Market", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_AccountsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_AccountsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AccountsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Market_accountsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _MarketDepthUpdate_market(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDepthUpdate_market(ctx, field) +func (ec *executionContext) _Market_tradesConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_tradesConnection(ctx, field) if err != nil { return graphql.Null } @@ -45184,94 +47596,52 @@ func (ec *executionContext) _MarketDepthUpdate_market(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketDepthUpdate().Market(rctx, obj) + return ec.resolvers.Market().TradesConnection(rctx, obj, fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Market) + res := resTmp.(*v2.TradeConnection) fc.Result = res - return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) + return ec.marshalOTradeConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTradeConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDepthUpdate_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_tradesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDepthUpdate", + Object: "Market", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Market_id(ctx, field) - case "fees": - return ec.fieldContext_Market_fees(ctx, field) - case "tradableInstrument": - return ec.fieldContext_Market_tradableInstrument(ctx, field) - case "decimalPlaces": - return ec.fieldContext_Market_decimalPlaces(ctx, field) - case "positionDecimalPlaces": - return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) - case "openingAuction": - return ec.fieldContext_Market_openingAuction(ctx, field) - case "priceMonitoringSettings": - return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) - case "liquidityMonitoringParameters": - return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) - case "tradingMode": - return ec.fieldContext_Market_tradingMode(ctx, field) - case "state": - return ec.fieldContext_Market_state(ctx, field) - case "proposal": - return ec.fieldContext_Market_proposal(ctx, field) - case "ordersConnection": - return ec.fieldContext_Market_ordersConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Market_accountsConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Market_tradesConnection(ctx, field) - case "depth": - return ec.fieldContext_Market_depth(ctx, field) - case "candlesConnection": - return ec.fieldContext_Market_candlesConnection(ctx, field) - case "data": - return ec.fieldContext_Market_data(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Market_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) - case "marketTimestamps": - return ec.fieldContext_Market_marketTimestamps(ctx, field) - case "riskFactors": - return ec.fieldContext_Market_riskFactors(ctx, field) - case "linearSlippageFactor": - return ec.fieldContext_Market_linearSlippageFactor(ctx, field) - case "quadraticSlippageFactor": - return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) - case "parentMarketID": - return ec.fieldContext_Market_parentMarketID(ctx, field) - case "insurancePoolFraction": - return ec.fieldContext_Market_insurancePoolFraction(ctx, field) - case "successorMarketID": - return ec.fieldContext_Market_successorMarketID(ctx, field) - case "liquiditySLAParameters": - return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "edges": + return ec.fieldContext_TradeConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_TradeConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TradeConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Market_tradesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _MarketDepthUpdate_buy(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDepthUpdate_buy(ctx, field) +func (ec *executionContext) _Market_depth(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_depth(ctx, field) if err != nil { return graphql.Null } @@ -45284,43 +47654,61 @@ func (ec *executionContext) _MarketDepthUpdate_buy(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Buy, nil + return ec.resolvers.Market().Depth(rctx, obj, fc.Args["maxDepth"].(*int)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.PriceLevel) + res := resTmp.(*vega.MarketDepth) fc.Result = res - return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) + return ec.marshalNMarketDepth2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketDepth(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDepthUpdate_buy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_depth(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDepthUpdate", + Object: "Market", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "price": - return ec.fieldContext_PriceLevel_price(ctx, field) - case "volume": - return ec.fieldContext_PriceLevel_volume(ctx, field) - case "numberOfOrders": - return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) + case "market": + return ec.fieldContext_MarketDepth_market(ctx, field) + case "buy": + return ec.fieldContext_MarketDepth_buy(ctx, field) + case "sell": + return ec.fieldContext_MarketDepth_sell(ctx, field) + case "lastTrade": + return ec.fieldContext_MarketDepth_lastTrade(ctx, field) + case "sequenceNumber": + return ec.fieldContext_MarketDepth_sequenceNumber(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) + return nil, fmt.Errorf("no field named %q was found under type MarketDepth", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Market_depth_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _MarketDepthUpdate_sell(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDepthUpdate_sell(ctx, field) +func (ec *executionContext) _Market_candlesConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_candlesConnection(ctx, field) if err != nil { return graphql.Null } @@ -45333,7 +47721,7 @@ func (ec *executionContext) _MarketDepthUpdate_sell(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Sell, nil + return ec.resolvers.Market().CandlesConnection(rctx, obj, fc.Args["since"].(string), fc.Args["to"].(*string), fc.Args["interval"].(vega.Interval), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -45342,34 +47730,43 @@ func (ec *executionContext) _MarketDepthUpdate_sell(ctx context.Context, field g if resTmp == nil { return graphql.Null } - res := resTmp.([]*vega.PriceLevel) + res := resTmp.(*v2.CandleDataConnection) fc.Result = res - return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) + return ec.marshalOCandleDataConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCandleDataConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDepthUpdate_sell(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_candlesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDepthUpdate", + Object: "Market", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "price": - return ec.fieldContext_PriceLevel_price(ctx, field) - case "volume": - return ec.fieldContext_PriceLevel_volume(ctx, field) - case "numberOfOrders": - return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) + case "edges": + return ec.fieldContext_CandleDataConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_CandleDataConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) + return nil, fmt.Errorf("no field named %q was found under type CandleDataConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Market_candlesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _MarketDepthUpdate_sequenceNumber(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDepthUpdate_sequenceNumber(ctx, field) +func (ec *executionContext) _Market_data(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_data(ctx, field) if err != nil { return graphql.Null } @@ -45382,38 +47779,109 @@ func (ec *executionContext) _MarketDepthUpdate_sequenceNumber(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketDepthUpdate().SequenceNumber(rctx, obj) + return ec.resolvers.Market().Data(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.MarketData) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOMarketData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketData(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDepthUpdate_sequenceNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_data(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDepthUpdate", + Object: "Market", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "market": + return ec.fieldContext_MarketData_market(ctx, field) + case "markPrice": + return ec.fieldContext_MarketData_markPrice(ctx, field) + case "markPriceType": + return ec.fieldContext_MarketData_markPriceType(ctx, field) + case "bestBidPrice": + return ec.fieldContext_MarketData_bestBidPrice(ctx, field) + case "bestBidVolume": + return ec.fieldContext_MarketData_bestBidVolume(ctx, field) + case "bestOfferPrice": + return ec.fieldContext_MarketData_bestOfferPrice(ctx, field) + case "bestOfferVolume": + return ec.fieldContext_MarketData_bestOfferVolume(ctx, field) + case "bestStaticBidPrice": + return ec.fieldContext_MarketData_bestStaticBidPrice(ctx, field) + case "bestStaticBidVolume": + return ec.fieldContext_MarketData_bestStaticBidVolume(ctx, field) + case "bestStaticOfferPrice": + return ec.fieldContext_MarketData_bestStaticOfferPrice(ctx, field) + case "bestStaticOfferVolume": + return ec.fieldContext_MarketData_bestStaticOfferVolume(ctx, field) + case "midPrice": + return ec.fieldContext_MarketData_midPrice(ctx, field) + case "staticMidPrice": + return ec.fieldContext_MarketData_staticMidPrice(ctx, field) + case "timestamp": + return ec.fieldContext_MarketData_timestamp(ctx, field) + case "openInterest": + return ec.fieldContext_MarketData_openInterest(ctx, field) + case "auctionEnd": + return ec.fieldContext_MarketData_auctionEnd(ctx, field) + case "auctionStart": + return ec.fieldContext_MarketData_auctionStart(ctx, field) + case "indicativePrice": + return ec.fieldContext_MarketData_indicativePrice(ctx, field) + case "indicativeVolume": + return ec.fieldContext_MarketData_indicativeVolume(ctx, field) + case "marketTradingMode": + return ec.fieldContext_MarketData_marketTradingMode(ctx, field) + case "marketState": + return ec.fieldContext_MarketData_marketState(ctx, field) + case "trigger": + return ec.fieldContext_MarketData_trigger(ctx, field) + case "extensionTrigger": + return ec.fieldContext_MarketData_extensionTrigger(ctx, field) + case "targetStake": + return ec.fieldContext_MarketData_targetStake(ctx, field) + case "suppliedStake": + return ec.fieldContext_MarketData_suppliedStake(ctx, field) + case "commitments": + return ec.fieldContext_MarketData_commitments(ctx, field) + case "priceMonitoringBounds": + return ec.fieldContext_MarketData_priceMonitoringBounds(ctx, field) + case "marketValueProxy": + return ec.fieldContext_MarketData_marketValueProxy(ctx, field) + case "liquidityProviderFeeShare": + return ec.fieldContext_MarketData_liquidityProviderFeeShare(ctx, field) + case "liquidityProviderSla": + return ec.fieldContext_MarketData_liquidityProviderSla(ctx, field) + case "nextMarkToMarket": + return ec.fieldContext_MarketData_nextMarkToMarket(ctx, field) + case "marketGrowth": + return ec.fieldContext_MarketData_marketGrowth(ctx, field) + case "lastTradedPrice": + return ec.fieldContext_MarketData_lastTradedPrice(ctx, field) + case "productData": + return ec.fieldContext_MarketData_productData(ctx, field) + case "nextNetworkCloseout": + return ec.fieldContext_MarketData_nextNetworkCloseout(ctx, field) + case "markPriceState": + return ec.fieldContext_MarketData_markPriceState(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type MarketData", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketDepthUpdate_previousSequenceNumber(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketDepthUpdate_previousSequenceNumber(ctx, field) +func (ec *executionContext) _Market_liquidityProvisions(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_liquidityProvisions(ctx, field) if err != nil { return graphql.Null } @@ -45426,38 +47894,52 @@ func (ec *executionContext) _MarketDepthUpdate_previousSequenceNumber(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.MarketDepthUpdate().PreviousSequenceNumber(rctx, obj) + return ec.resolvers.Market().LiquidityProvisions(rctx, obj, fc.Args["partyId"].(*string), fc.Args["live"].(*bool), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.LiquidityProvisionsWithPendingConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOLiquidityProvisionsWithPendingConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvisionsWithPendingConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketDepthUpdate_previousSequenceNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_liquidityProvisions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketDepthUpdate", + Object: "Market", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_LiquidityProvisionsWithPendingConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_LiquidityProvisionsWithPendingConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionsWithPendingConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Market_liquidityProvisions_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _MarketEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.MarketEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketEdge_node(ctx, field) +func (ec *executionContext) _Market_liquidityProvisionsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) if err != nil { return graphql.Null } @@ -45470,94 +47952,52 @@ func (ec *executionContext) _MarketEdge_node(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.Market().LiquidityProvisionsConnection(rctx, obj, fc.Args["partyId"].(*string), fc.Args["live"].(*bool), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Market) + res := resTmp.(*v2.LiquidityProvisionsConnection) fc.Result = res - return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) + return ec.marshalOLiquidityProvisionsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvisionsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_liquidityProvisionsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketEdge", + Object: "Market", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Market_id(ctx, field) - case "fees": - return ec.fieldContext_Market_fees(ctx, field) - case "tradableInstrument": - return ec.fieldContext_Market_tradableInstrument(ctx, field) - case "decimalPlaces": - return ec.fieldContext_Market_decimalPlaces(ctx, field) - case "positionDecimalPlaces": - return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) - case "openingAuction": - return ec.fieldContext_Market_openingAuction(ctx, field) - case "priceMonitoringSettings": - return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) - case "liquidityMonitoringParameters": - return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) - case "tradingMode": - return ec.fieldContext_Market_tradingMode(ctx, field) - case "state": - return ec.fieldContext_Market_state(ctx, field) - case "proposal": - return ec.fieldContext_Market_proposal(ctx, field) - case "ordersConnection": - return ec.fieldContext_Market_ordersConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Market_accountsConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Market_tradesConnection(ctx, field) - case "depth": - return ec.fieldContext_Market_depth(ctx, field) - case "candlesConnection": - return ec.fieldContext_Market_candlesConnection(ctx, field) - case "data": - return ec.fieldContext_Market_data(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Market_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) - case "marketTimestamps": - return ec.fieldContext_Market_marketTimestamps(ctx, field) - case "riskFactors": - return ec.fieldContext_Market_riskFactors(ctx, field) - case "linearSlippageFactor": - return ec.fieldContext_Market_linearSlippageFactor(ctx, field) - case "quadraticSlippageFactor": - return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) - case "parentMarketID": - return ec.fieldContext_Market_parentMarketID(ctx, field) - case "insurancePoolFraction": - return ec.fieldContext_Market_insurancePoolFraction(ctx, field) - case "successorMarketID": - return ec.fieldContext_Market_successorMarketID(ctx, field) - case "liquiditySLAParameters": - return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "edges": + return ec.fieldContext_LiquidityProvisionsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_LiquidityProvisionsConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Market_liquidityProvisionsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _MarketEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.MarketEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketEdge_cursor(ctx, field) +func (ec *executionContext) _Market_marketTimestamps(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_marketTimestamps(ctx, field) if err != nil { return graphql.Null } @@ -45570,7 +48010,7 @@ func (ec *executionContext) _MarketEdge_cursor(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.MarketTimestamps, nil }) if err != nil { ec.Error(ctx, err) @@ -45582,26 +48022,36 @@ func (ec *executionContext) _MarketEdge_cursor(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.MarketTimestamps) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNMarketTimestamps2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketTimestamps(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_marketTimestamps(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketEdge", + Object: "Market", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "proposed": + return ec.fieldContext_MarketTimestamps_proposed(ctx, field) + case "pending": + return ec.fieldContext_MarketTimestamps_pending(ctx, field) + case "open": + return ec.fieldContext_MarketTimestamps_open(ctx, field) + case "close": + return ec.fieldContext_MarketTimestamps_close(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type MarketTimestamps", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketEvent_marketId(ctx context.Context, field graphql.CollectedField, obj *MarketEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketEvent_marketId(ctx, field) +func (ec *executionContext) _Market_riskFactors(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_riskFactors(ctx, field) if err != nil { return graphql.Null } @@ -45614,38 +48064,43 @@ func (ec *executionContext) _MarketEvent_marketId(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketID, nil + return ec.resolvers.Market().RiskFactors(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.RiskFactor) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalORiskFactor2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐRiskFactor(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketEvent_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_riskFactors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketEvent", + Object: "Market", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "market": + return ec.fieldContext_RiskFactor_market(ctx, field) + case "short": + return ec.fieldContext_RiskFactor_short(ctx, field) + case "long": + return ec.fieldContext_RiskFactor_long(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type RiskFactor", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketEvent_payload(ctx context.Context, field graphql.CollectedField, obj *MarketEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketEvent_payload(ctx, field) +func (ec *executionContext) _Market_linearSlippageFactor(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_linearSlippageFactor(ctx, field) if err != nil { return graphql.Null } @@ -45658,7 +48113,7 @@ func (ec *executionContext) _MarketEvent_payload(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Payload, nil + return obj.LinearSlippageFactor, nil }) if err != nil { ec.Error(ctx, err) @@ -45675,9 +48130,9 @@ func (ec *executionContext) _MarketEvent_payload(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketEvent_payload(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_linearSlippageFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketEvent", + Object: "Market", Field: field, IsMethod: false, IsResolver: false, @@ -45688,8 +48143,8 @@ func (ec *executionContext) fieldContext_MarketEvent_payload(ctx context.Context return fc, nil } -func (ec *executionContext) _MarketTick_marketId(ctx context.Context, field graphql.CollectedField, obj *MarketTick) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketTick_marketId(ctx, field) +func (ec *executionContext) _Market_quadraticSlippageFactor(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) if err != nil { return graphql.Null } @@ -45702,7 +48157,7 @@ func (ec *executionContext) _MarketTick_marketId(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketID, nil + return obj.QuadraticSlippageFactor, nil }) if err != nil { ec.Error(ctx, err) @@ -45716,24 +48171,24 @@ func (ec *executionContext) _MarketTick_marketId(ctx context.Context, field grap } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketTick_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_quadraticSlippageFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketTick", + Object: "Market", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketTick_time(ctx context.Context, field graphql.CollectedField, obj *MarketTick) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketTick_time(ctx, field) +func (ec *executionContext) _Market_parentMarketID(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_parentMarketID(ctx, field) if err != nil { return graphql.Null } @@ -45746,38 +48201,35 @@ func (ec *executionContext) _MarketTick_time(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Time, nil + return obj.ParentMarketId, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOID2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketTick_time(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_parentMarketID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketTick", + Object: "Market", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketTimestamps_proposed(ctx context.Context, field graphql.CollectedField, obj *vega.MarketTimestamps) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketTimestamps_proposed(ctx, field) +func (ec *executionContext) _Market_insurancePoolFraction(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_insurancePoolFraction(ctx, field) if err != nil { return graphql.Null } @@ -45790,7 +48242,7 @@ func (ec *executionContext) _MarketTimestamps_proposed(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Proposed, nil + return obj.InsurancePoolFraction, nil }) if err != nil { ec.Error(ctx, err) @@ -45799,26 +48251,26 @@ func (ec *executionContext) _MarketTimestamps_proposed(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*string) fc.Result = res - return ec.marshalOTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketTimestamps_proposed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_insurancePoolFraction(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketTimestamps", + Object: "Market", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketTimestamps_pending(ctx context.Context, field graphql.CollectedField, obj *vega.MarketTimestamps) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketTimestamps_pending(ctx, field) +func (ec *executionContext) _Market_successorMarketID(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_successorMarketID(ctx, field) if err != nil { return graphql.Null } @@ -45831,38 +48283,35 @@ func (ec *executionContext) _MarketTimestamps_pending(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Pending, nil + return obj.SuccessorMarketId, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOID2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketTimestamps_pending(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_successorMarketID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketTimestamps", + Object: "Market", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _MarketTimestamps_open(ctx context.Context, field graphql.CollectedField, obj *vega.MarketTimestamps) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketTimestamps_open(ctx, field) +func (ec *executionContext) _Market_liquiditySLAParameters(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_liquiditySLAParameters(ctx, field) if err != nil { return graphql.Null } @@ -45875,38 +48324,45 @@ func (ec *executionContext) _MarketTimestamps_open(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Open, nil + return ec.resolvers.Market().LiquiditySLAParameters(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*vega.LiquiditySLAParameters) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOLiquiditySLAParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquiditySLAParameters(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketTimestamps_open(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_liquiditySLAParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketTimestamps", + Object: "Market", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "priceRange": + return ec.fieldContext_LiquiditySLAParameters_priceRange(ctx, field) + case "commitmentMinTimeFraction": + return ec.fieldContext_LiquiditySLAParameters_commitmentMinTimeFraction(ctx, field) + case "performanceHysteresisEpochs": + return ec.fieldContext_LiquiditySLAParameters_performanceHysteresisEpochs(ctx, field) + case "slaCompetitionFactor": + return ec.fieldContext_LiquiditySLAParameters_slaCompetitionFactor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquiditySLAParameters", field.Name) }, } return fc, nil } -func (ec *executionContext) _MarketTimestamps_close(ctx context.Context, field graphql.CollectedField, obj *vega.MarketTimestamps) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_MarketTimestamps_close(ctx, field) +func (ec *executionContext) _Market_liquidationStrategy(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_liquidationStrategy(ctx, field) if err != nil { return graphql.Null } @@ -45919,38 +48375,45 @@ func (ec *executionContext) _MarketTimestamps_close(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Close, nil + return obj.LiquidationStrategy, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*vega.LiquidationStrategy) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOLiquidationStrategy2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidationStrategy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MarketTimestamps_close(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_liquidationStrategy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "MarketTimestamps", + Object: "Market", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "disposalTimeStep": + return ec.fieldContext_LiquidationStrategy_disposalTimeStep(ctx, field) + case "disposalFraction": + return ec.fieldContext_LiquidationStrategy_disposalFraction(ctx, field) + case "fullDisposalSize": + return ec.fieldContext_LiquidationStrategy_fullDisposalSize(ctx, field) + case "maxFractionConsumed": + return ec.fieldContext_LiquidationStrategy_maxFractionConsumed(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidationStrategy", field.Name) }, } return fc, nil } -func (ec *executionContext) _NetworkLimits_canProposeMarket(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NetworkLimits_canProposeMarket(ctx, field) +func (ec *executionContext) _Market_markPriceConfiguration(ctx context.Context, field graphql.CollectedField, obj *vega.Market) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Market_markPriceConfiguration(ctx, field) if err != nil { return graphql.Null } @@ -45963,7 +48426,7 @@ func (ec *executionContext) _NetworkLimits_canProposeMarket(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CanProposeMarket, nil + return obj.MarkPriceConfiguration, nil }) if err != nil { ec.Error(ctx, err) @@ -45975,26 +48438,44 @@ func (ec *executionContext) _NetworkLimits_canProposeMarket(ctx context.Context, } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*vega.CompositePriceConfiguration) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNCompositePriceConfiguration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceConfiguration(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NetworkLimits_canProposeMarket(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Market_markPriceConfiguration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NetworkLimits", + Object: "Market", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "decayWeight": + return ec.fieldContext_CompositePriceConfiguration_decayWeight(ctx, field) + case "decayPower": + return ec.fieldContext_CompositePriceConfiguration_decayPower(ctx, field) + case "cashAmount": + return ec.fieldContext_CompositePriceConfiguration_cashAmount(ctx, field) + case "SourceWeights": + return ec.fieldContext_CompositePriceConfiguration_SourceWeights(ctx, field) + case "SourceStalenessTolerance": + return ec.fieldContext_CompositePriceConfiguration_SourceStalenessTolerance(ctx, field) + case "CompositePriceType": + return ec.fieldContext_CompositePriceConfiguration_CompositePriceType(ctx, field) + case "dataSourcesSpec": + return ec.fieldContext_CompositePriceConfiguration_dataSourcesSpec(ctx, field) + case "dataSourcesSpecBinding": + return ec.fieldContext_CompositePriceConfiguration_dataSourcesSpecBinding(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CompositePriceConfiguration", field.Name) }, } return fc, nil } -func (ec *executionContext) _NetworkLimits_canProposeAsset(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NetworkLimits_canProposeAsset(ctx, field) +func (ec *executionContext) _MarketConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.MarketConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -46007,7 +48488,7 @@ func (ec *executionContext) _NetworkLimits_canProposeAsset(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CanProposeAsset, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -46019,26 +48500,32 @@ func (ec *executionContext) _NetworkLimits_canProposeAsset(ctx context.Context, } return graphql.Null } - res := resTmp.(bool) + res := resTmp.([]*v2.MarketEdge) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNMarketEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarketEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NetworkLimits_canProposeAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NetworkLimits", + Object: "MarketConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_MarketEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_MarketEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type MarketEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _NetworkLimits_proposeMarketEnabled(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NetworkLimits_proposeMarketEnabled(ctx, field) +func (ec *executionContext) _MarketConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.MarketConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -46051,7 +48538,7 @@ func (ec *executionContext) _NetworkLimits_proposeMarketEnabled(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ProposeMarketEnabled, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -46063,26 +48550,36 @@ func (ec *executionContext) _NetworkLimits_proposeMarketEnabled(ctx context.Cont } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NetworkLimits_proposeMarketEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NetworkLimits", + Object: "MarketConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _NetworkLimits_proposeAssetEnabled(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NetworkLimits_proposeAssetEnabled(ctx, field) +func (ec *executionContext) _MarketData_market(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_market(ctx, field) if err != nil { return graphql.Null } @@ -46095,7 +48592,7 @@ func (ec *executionContext) _NetworkLimits_proposeAssetEnabled(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ProposeAssetEnabled, nil + return ec.resolvers.MarketData().Market(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -46107,26 +48604,88 @@ func (ec *executionContext) _NetworkLimits_proposeAssetEnabled(ctx context.Conte } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*vega.Market) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NetworkLimits_proposeAssetEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NetworkLimits", + Object: "MarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Market_id(ctx, field) + case "fees": + return ec.fieldContext_Market_fees(ctx, field) + case "tradableInstrument": + return ec.fieldContext_Market_tradableInstrument(ctx, field) + case "decimalPlaces": + return ec.fieldContext_Market_decimalPlaces(ctx, field) + case "positionDecimalPlaces": + return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) + case "openingAuction": + return ec.fieldContext_Market_openingAuction(ctx, field) + case "priceMonitoringSettings": + return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) + case "liquidityMonitoringParameters": + return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) + case "tradingMode": + return ec.fieldContext_Market_tradingMode(ctx, field) + case "state": + return ec.fieldContext_Market_state(ctx, field) + case "proposal": + return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) + case "ordersConnection": + return ec.fieldContext_Market_ordersConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Market_accountsConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Market_tradesConnection(ctx, field) + case "depth": + return ec.fieldContext_Market_depth(ctx, field) + case "candlesConnection": + return ec.fieldContext_Market_candlesConnection(ctx, field) + case "data": + return ec.fieldContext_Market_data(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Market_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) + case "marketTimestamps": + return ec.fieldContext_Market_marketTimestamps(ctx, field) + case "riskFactors": + return ec.fieldContext_Market_riskFactors(ctx, field) + case "linearSlippageFactor": + return ec.fieldContext_Market_linearSlippageFactor(ctx, field) + case "quadraticSlippageFactor": + return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) + case "parentMarketID": + return ec.fieldContext_Market_parentMarketID(ctx, field) + case "insurancePoolFraction": + return ec.fieldContext_Market_insurancePoolFraction(ctx, field) + case "successorMarketID": + return ec.fieldContext_Market_successorMarketID(ctx, field) + case "liquiditySLAParameters": + return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, } return fc, nil } -func (ec *executionContext) _NetworkLimits_genesisLoaded(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NetworkLimits_genesisLoaded(ctx, field) +func (ec *executionContext) _MarketData_markPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_markPrice(ctx, field) if err != nil { return graphql.Null } @@ -46139,7 +48698,7 @@ func (ec *executionContext) _NetworkLimits_genesisLoaded(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.GenesisLoaded, nil + return obj.MarkPrice, nil }) if err != nil { ec.Error(ctx, err) @@ -46151,26 +48710,26 @@ func (ec *executionContext) _NetworkLimits_genesisLoaded(ctx context.Context, fi } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(string) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NetworkLimits_genesisLoaded(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_markPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NetworkLimits", + Object: "MarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NetworkLimits_proposeMarketEnabledFrom(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NetworkLimits_proposeMarketEnabledFrom(ctx, field) +func (ec *executionContext) _MarketData_markPriceType(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_markPriceType(ctx, field) if err != nil { return graphql.Null } @@ -46183,7 +48742,7 @@ func (ec *executionContext) _NetworkLimits_proposeMarketEnabledFrom(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ProposeMarketEnabledFrom, nil + return ec.resolvers.MarketData().MarkPriceType(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -46195,26 +48754,26 @@ func (ec *executionContext) _NetworkLimits_proposeMarketEnabledFrom(ctx context. } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(CompositePriceType) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNCompositePriceType2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐCompositePriceType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NetworkLimits_proposeMarketEnabledFrom(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_markPriceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NetworkLimits", + Object: "MarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type CompositePriceType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NetworkLimits_proposeAssetEnabledFrom(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NetworkLimits_proposeAssetEnabledFrom(ctx, field) +func (ec *executionContext) _MarketData_bestBidPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_bestBidPrice(ctx, field) if err != nil { return graphql.Null } @@ -46227,7 +48786,7 @@ func (ec *executionContext) _NetworkLimits_proposeAssetEnabledFrom(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ProposeAssetEnabledFrom, nil + return obj.BestBidPrice, nil }) if err != nil { ec.Error(ctx, err) @@ -46239,26 +48798,26 @@ func (ec *executionContext) _NetworkLimits_proposeAssetEnabledFrom(ctx context.C } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NetworkLimits_proposeAssetEnabledFrom(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_bestBidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NetworkLimits", + Object: "MarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NetworkParameter_key(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkParameter) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NetworkParameter_key(ctx, field) +func (ec *executionContext) _MarketData_bestBidVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_bestBidVolume(ctx, field) if err != nil { return graphql.Null } @@ -46271,7 +48830,7 @@ func (ec *executionContext) _NetworkParameter_key(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Key, nil + return ec.resolvers.MarketData().BestBidVolume(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -46288,12 +48847,12 @@ func (ec *executionContext) _NetworkParameter_key(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NetworkParameter_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_bestBidVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NetworkParameter", + Object: "MarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -46301,8 +48860,8 @@ func (ec *executionContext) fieldContext_NetworkParameter_key(ctx context.Contex return fc, nil } -func (ec *executionContext) _NetworkParameter_value(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkParameter) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NetworkParameter_value(ctx, field) +func (ec *executionContext) _MarketData_bestOfferPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_bestOfferPrice(ctx, field) if err != nil { return graphql.Null } @@ -46315,7 +48874,7 @@ func (ec *executionContext) _NetworkParameter_value(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Value, nil + return obj.BestOfferPrice, nil }) if err != nil { ec.Error(ctx, err) @@ -46332,9 +48891,9 @@ func (ec *executionContext) _NetworkParameter_value(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NetworkParameter_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_bestOfferPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NetworkParameter", + Object: "MarketData", Field: field, IsMethod: false, IsResolver: false, @@ -46345,8 +48904,8 @@ func (ec *executionContext) fieldContext_NetworkParameter_value(ctx context.Cont return fc, nil } -func (ec *executionContext) _NetworkParameterEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.NetworkParameterEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NetworkParameterEdge_node(ctx, field) +func (ec *executionContext) _MarketData_bestOfferVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_bestOfferVolume(ctx, field) if err != nil { return graphql.Null } @@ -46359,7 +48918,7 @@ func (ec *executionContext) _NetworkParameterEdge_node(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.MarketData().BestOfferVolume(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -46371,32 +48930,26 @@ func (ec *executionContext) _NetworkParameterEdge_node(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(*vega.NetworkParameter) + res := resTmp.(string) fc.Result = res - return ec.marshalNNetworkParameter2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNetworkParameter(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NetworkParameterEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_bestOfferVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NetworkParameterEdge", + Object: "MarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "key": - return ec.fieldContext_NetworkParameter_key(ctx, field) - case "value": - return ec.fieldContext_NetworkParameter_value(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type NetworkParameter", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NetworkParameterEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.NetworkParameterEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NetworkParameterEdge_cursor(ctx, field) +func (ec *executionContext) _MarketData_bestStaticBidPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_bestStaticBidPrice(ctx, field) if err != nil { return graphql.Null } @@ -46409,7 +48962,7 @@ func (ec *executionContext) _NetworkParameterEdge_cursor(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.BestStaticBidPrice, nil }) if err != nil { ec.Error(ctx, err) @@ -46426,9 +48979,9 @@ func (ec *executionContext) _NetworkParameterEdge_cursor(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NetworkParameterEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_bestStaticBidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NetworkParameterEdge", + Object: "MarketData", Field: field, IsMethod: false, IsResolver: false, @@ -46439,8 +48992,8 @@ func (ec *executionContext) fieldContext_NetworkParameterEdge_cursor(ctx context return fc, nil } -func (ec *executionContext) _NetworkParametersConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.NetworkParameterConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NetworkParametersConnection_edges(ctx, field) +func (ec *executionContext) _MarketData_bestStaticBidVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_bestStaticBidVolume(ctx, field) if err != nil { return graphql.Null } @@ -46453,41 +49006,38 @@ func (ec *executionContext) _NetworkParametersConnection_edges(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.MarketData().BestStaticBidVolume(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.NetworkParameterEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalONetworkParameterEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNetworkParameterEdge(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NetworkParametersConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_bestStaticBidVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NetworkParametersConnection", + Object: "MarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_NetworkParameterEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_NetworkParameterEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type NetworkParameterEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NetworkParametersConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.NetworkParameterConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NetworkParametersConnection_pageInfo(ctx, field) +func (ec *executionContext) _MarketData_bestStaticOfferPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_bestStaticOfferPrice(ctx, field) if err != nil { return graphql.Null } @@ -46500,7 +49050,7 @@ func (ec *executionContext) _NetworkParametersConnection_pageInfo(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.BestStaticOfferPrice, nil }) if err != nil { ec.Error(ctx, err) @@ -46512,36 +49062,26 @@ func (ec *executionContext) _NetworkParametersConnection_pageInfo(ctx context.Co } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(string) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NetworkParametersConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_bestStaticOfferPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NetworkParametersConnection", + Object: "MarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewAsset_name(ctx context.Context, field graphql.CollectedField, obj *vega.NewAsset) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewAsset_name(ctx, field) +func (ec *executionContext) _MarketData_bestStaticOfferVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_bestStaticOfferVolume(ctx, field) if err != nil { return graphql.Null } @@ -46554,7 +49094,7 @@ func (ec *executionContext) _NewAsset_name(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewAsset().Name(rctx, obj) + return ec.resolvers.MarketData().BestStaticOfferVolume(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -46571,9 +49111,9 @@ func (ec *executionContext) _NewAsset_name(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewAsset_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_bestStaticOfferVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewAsset", + Object: "MarketData", Field: field, IsMethod: true, IsResolver: true, @@ -46584,8 +49124,8 @@ func (ec *executionContext) fieldContext_NewAsset_name(ctx context.Context, fiel return fc, nil } -func (ec *executionContext) _NewAsset_symbol(ctx context.Context, field graphql.CollectedField, obj *vega.NewAsset) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewAsset_symbol(ctx, field) +func (ec *executionContext) _MarketData_midPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_midPrice(ctx, field) if err != nil { return graphql.Null } @@ -46598,7 +49138,7 @@ func (ec *executionContext) _NewAsset_symbol(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewAsset().Symbol(rctx, obj) + return obj.MidPrice, nil }) if err != nil { ec.Error(ctx, err) @@ -46615,12 +49155,12 @@ func (ec *executionContext) _NewAsset_symbol(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewAsset_symbol(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_midPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewAsset", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -46628,8 +49168,8 @@ func (ec *executionContext) fieldContext_NewAsset_symbol(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _NewAsset_decimals(ctx context.Context, field graphql.CollectedField, obj *vega.NewAsset) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewAsset_decimals(ctx, field) +func (ec *executionContext) _MarketData_staticMidPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_staticMidPrice(ctx, field) if err != nil { return graphql.Null } @@ -46642,7 +49182,7 @@ func (ec *executionContext) _NewAsset_decimals(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewAsset().Decimals(rctx, obj) + return obj.StaticMidPrice, nil }) if err != nil { ec.Error(ctx, err) @@ -46654,26 +49194,26 @@ func (ec *executionContext) _NewAsset_decimals(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewAsset_decimals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_staticMidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewAsset", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewAsset_quantum(ctx context.Context, field graphql.CollectedField, obj *vega.NewAsset) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewAsset_quantum(ctx, field) +func (ec *executionContext) _MarketData_timestamp(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_timestamp(ctx, field) if err != nil { return graphql.Null } @@ -46686,7 +49226,7 @@ func (ec *executionContext) _NewAsset_quantum(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewAsset().Quantum(rctx, obj) + return obj.Timestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -46698,26 +49238,26 @@ func (ec *executionContext) _NewAsset_quantum(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewAsset_quantum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewAsset", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewAsset_source(ctx context.Context, field graphql.CollectedField, obj *vega.NewAsset) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewAsset_source(ctx, field) +func (ec *executionContext) _MarketData_openInterest(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_openInterest(ctx, field) if err != nil { return graphql.Null } @@ -46730,7 +49270,7 @@ func (ec *executionContext) _NewAsset_source(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewAsset().Source(rctx, obj) + return ec.resolvers.MarketData().OpenInterest(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -46742,26 +49282,26 @@ func (ec *executionContext) _NewAsset_source(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(AssetSource) + res := resTmp.(string) fc.Result = res - return ec.marshalNAssetSource2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐAssetSource(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewAsset_source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_openInterest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewAsset", + Object: "MarketData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type AssetSource does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewFreeform__doNotUse(ctx context.Context, field graphql.CollectedField, obj *vega.NewFreeform) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewFreeform__doNotUse(ctx, field) +func (ec *executionContext) _MarketData_auctionEnd(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_auctionEnd(ctx, field) if err != nil { return graphql.Null } @@ -46774,7 +49314,7 @@ func (ec *executionContext) _NewFreeform__doNotUse(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewFreeform().DoNotUse(rctx, obj) + return ec.resolvers.MarketData().AuctionEnd(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -46783,26 +49323,26 @@ func (ec *executionContext) _NewFreeform__doNotUse(ctx context.Context, field gr if resTmp == nil { return graphql.Null } - res := resTmp.(*bool) + res := resTmp.(*string) fc.Result = res - return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewFreeform__doNotUse(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_auctionEnd(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewFreeform", + Object: "MarketData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewMarket_instrument(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewMarket_instrument(ctx, field) +func (ec *executionContext) _MarketData_auctionStart(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_auctionStart(ctx, field) if err != nil { return graphql.Null } @@ -46815,48 +49355,35 @@ func (ec *executionContext) _NewMarket_instrument(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewMarket().Instrument(rctx, obj) + return ec.resolvers.MarketData().AuctionStart(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.InstrumentConfiguration) + res := resTmp.(*string) fc.Result = res - return ec.marshalNInstrumentConfiguration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐInstrumentConfiguration(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewMarket_instrument(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_auctionStart(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewMarket", + Object: "MarketData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_InstrumentConfiguration_name(ctx, field) - case "code": - return ec.fieldContext_InstrumentConfiguration_code(ctx, field) - case "futureProduct": - return ec.fieldContext_InstrumentConfiguration_futureProduct(ctx, field) - case "product": - return ec.fieldContext_InstrumentConfiguration_product(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type InstrumentConfiguration", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewMarket_decimalPlaces(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewMarket_decimalPlaces(ctx, field) +func (ec *executionContext) _MarketData_indicativePrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_indicativePrice(ctx, field) if err != nil { return graphql.Null } @@ -46869,7 +49396,7 @@ func (ec *executionContext) _NewMarket_decimalPlaces(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewMarket().DecimalPlaces(rctx, obj) + return obj.IndicativePrice, nil }) if err != nil { ec.Error(ctx, err) @@ -46881,26 +49408,26 @@ func (ec *executionContext) _NewMarket_decimalPlaces(ctx context.Context, field } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewMarket_decimalPlaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_indicativePrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewMarket", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewMarket_riskParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewMarket_riskParameters(ctx, field) +func (ec *executionContext) _MarketData_indicativeVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_indicativeVolume(ctx, field) if err != nil { return graphql.Null } @@ -46913,7 +49440,7 @@ func (ec *executionContext) _NewMarket_riskParameters(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewMarket().RiskParameters(rctx, obj) + return ec.resolvers.MarketData().IndicativeVolume(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -46925,26 +49452,26 @@ func (ec *executionContext) _NewMarket_riskParameters(ctx context.Context, field } return graphql.Null } - res := resTmp.(RiskModel) + res := resTmp.(string) fc.Result = res - return ec.marshalNRiskModel2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐRiskModel(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewMarket_riskParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_indicativeVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewMarket", + Object: "MarketData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type RiskModel does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewMarket_metadata(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewMarket_metadata(ctx, field) +func (ec *executionContext) _MarketData_marketTradingMode(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_marketTradingMode(ctx, field) if err != nil { return graphql.Null } @@ -46957,35 +49484,38 @@ func (ec *executionContext) _NewMarket_metadata(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewMarket().Metadata(rctx, obj) + return obj.MarketTradingMode, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]string) + res := resTmp.(vega.Market_TradingMode) fc.Result = res - return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNMarketTradingMode2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket_TradingMode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewMarket_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_marketTradingMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewMarket", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type MarketTradingMode does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewMarket_priceMonitoringParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewMarket_priceMonitoringParameters(ctx, field) +func (ec *executionContext) _MarketData_marketState(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_marketState(ctx, field) if err != nil { return graphql.Null } @@ -46998,7 +49528,7 @@ func (ec *executionContext) _NewMarket_priceMonitoringParameters(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewMarket().PriceMonitoringParameters(rctx, obj) + return obj.MarketState, nil }) if err != nil { ec.Error(ctx, err) @@ -47010,30 +49540,26 @@ func (ec *executionContext) _NewMarket_priceMonitoringParameters(ctx context.Con } return graphql.Null } - res := resTmp.(*PriceMonitoringParameters) + res := resTmp.(vega.Market_State) fc.Result = res - return ec.marshalNPriceMonitoringParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringParameters(ctx, field.Selections, res) + return ec.marshalNMarketState2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket_State(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewMarket_priceMonitoringParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_marketState(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewMarket", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "triggers": - return ec.fieldContext_PriceMonitoringParameters_triggers(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringParameters", field.Name) + return nil, errors.New("field of type MarketState does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewMarket_liquidityMonitoringParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewMarket_liquidityMonitoringParameters(ctx, field) +func (ec *executionContext) _MarketData_trigger(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_trigger(ctx, field) if err != nil { return graphql.Null } @@ -47046,7 +49572,7 @@ func (ec *executionContext) _NewMarket_liquidityMonitoringParameters(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewMarket().LiquidityMonitoringParameters(rctx, obj) + return obj.Trigger, nil }) if err != nil { ec.Error(ctx, err) @@ -47058,34 +49584,26 @@ func (ec *executionContext) _NewMarket_liquidityMonitoringParameters(ctx context } return graphql.Null } - res := resTmp.(*LiquidityMonitoringParameters) + res := resTmp.(vega.AuctionTrigger) fc.Result = res - return ec.marshalNLiquidityMonitoringParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐLiquidityMonitoringParameters(ctx, field.Selections, res) + return ec.marshalNAuctionTrigger2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAuctionTrigger(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewMarket_liquidityMonitoringParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewMarket", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "targetStakeParameters": - return ec.fieldContext_LiquidityMonitoringParameters_targetStakeParameters(ctx, field) - case "triggeringRatio": - return ec.fieldContext_LiquidityMonitoringParameters_triggeringRatio(ctx, field) - case "auctionExtensionSecs": - return ec.fieldContext_LiquidityMonitoringParameters_auctionExtensionSecs(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityMonitoringParameters", field.Name) + return nil, errors.New("field of type AuctionTrigger does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewMarket_positionDecimalPlaces(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewMarket_positionDecimalPlaces(ctx, field) +func (ec *executionContext) _MarketData_extensionTrigger(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_extensionTrigger(ctx, field) if err != nil { return graphql.Null } @@ -47098,7 +49616,7 @@ func (ec *executionContext) _NewMarket_positionDecimalPlaces(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewMarket().PositionDecimalPlaces(rctx, obj) + return obj.ExtensionTrigger, nil }) if err != nil { ec.Error(ctx, err) @@ -47110,26 +49628,26 @@ func (ec *executionContext) _NewMarket_positionDecimalPlaces(ctx context.Context } return graphql.Null } - res := resTmp.(int) + res := resTmp.(vega.AuctionTrigger) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNAuctionTrigger2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAuctionTrigger(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewMarket_positionDecimalPlaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_extensionTrigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewMarket", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type AuctionTrigger does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewMarket_linearSlippageFactor(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewMarket_linearSlippageFactor(ctx, field) +func (ec *executionContext) _MarketData_targetStake(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_targetStake(ctx, field) if err != nil { return graphql.Null } @@ -47142,29 +49660,26 @@ func (ec *executionContext) _NewMarket_linearSlippageFactor(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewMarket().LinearSlippageFactor(rctx, obj) + return obj.TargetStake, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewMarket_linearSlippageFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_targetStake(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewMarket", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -47172,8 +49687,8 @@ func (ec *executionContext) fieldContext_NewMarket_linearSlippageFactor(ctx cont return fc, nil } -func (ec *executionContext) _NewMarket_quadraticSlippageFactor(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewMarket_quadraticSlippageFactor(ctx, field) +func (ec *executionContext) _MarketData_suppliedStake(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_suppliedStake(ctx, field) if err != nil { return graphql.Null } @@ -47186,29 +49701,26 @@ func (ec *executionContext) _NewMarket_quadraticSlippageFactor(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewMarket().QuadraticSlippageFactor(rctx, obj) + return obj.SuppliedStake, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewMarket_quadraticSlippageFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_suppliedStake(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewMarket", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -47216,8 +49728,8 @@ func (ec *executionContext) fieldContext_NewMarket_quadraticSlippageFactor(ctx c return fc, nil } -func (ec *executionContext) _NewMarket_successorConfiguration(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewMarket_successorConfiguration(ctx, field) +func (ec *executionContext) _MarketData_commitments(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_commitments(ctx, field) if err != nil { return graphql.Null } @@ -47230,41 +49742,44 @@ func (ec *executionContext) _NewMarket_successorConfiguration(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewMarket().SuccessorConfiguration(rctx, obj) + return ec.resolvers.MarketData().Commitments(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.SuccessorConfiguration) + res := resTmp.(*MarketDataCommitments) fc.Result = res - return ec.marshalOSuccessorConfiguration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐSuccessorConfiguration(ctx, field.Selections, res) + return ec.marshalNMarketDataCommitments2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐMarketDataCommitments(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewMarket_successorConfiguration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_commitments(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewMarket", + Object: "MarketData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "parentMarketId": - return ec.fieldContext_SuccessorConfiguration_parentMarketId(ctx, field) - case "insurancePoolFraction": - return ec.fieldContext_SuccessorConfiguration_insurancePoolFraction(ctx, field) + case "sells": + return ec.fieldContext_MarketDataCommitments_sells(ctx, field) + case "buys": + return ec.fieldContext_MarketDataCommitments_buys(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SuccessorConfiguration", field.Name) + return nil, fmt.Errorf("no field named %q was found under type MarketDataCommitments", field.Name) }, } return fc, nil } -func (ec *executionContext) _NewMarket_liquiditySLAParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewMarket_liquiditySLAParameters(ctx, field) +func (ec *executionContext) _MarketData_priceMonitoringBounds(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_priceMonitoringBounds(ctx, field) if err != nil { return graphql.Null } @@ -47277,7 +49792,7 @@ func (ec *executionContext) _NewMarket_liquiditySLAParameters(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewMarket().LiquiditySLAParameters(rctx, obj) + return ec.resolvers.MarketData().PriceMonitoringBounds(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -47286,36 +49801,36 @@ func (ec *executionContext) _NewMarket_liquiditySLAParameters(ctx context.Contex if resTmp == nil { return graphql.Null } - res := resTmp.(*vega.LiquiditySLAParameters) + res := resTmp.([]*PriceMonitoringBounds) fc.Result = res - return ec.marshalOLiquiditySLAParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquiditySLAParameters(ctx, field.Selections, res) + return ec.marshalOPriceMonitoringBounds2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringBoundsᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewMarket_liquiditySLAParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_priceMonitoringBounds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewMarket", + Object: "MarketData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "priceRange": - return ec.fieldContext_LiquiditySLAParameters_priceRange(ctx, field) - case "commitmentMinTimeFraction": - return ec.fieldContext_LiquiditySLAParameters_commitmentMinTimeFraction(ctx, field) - case "performanceHysteresisEpochs": - return ec.fieldContext_LiquiditySLAParameters_performanceHysteresisEpochs(ctx, field) - case "slaCompetitionFactor": - return ec.fieldContext_LiquiditySLAParameters_slaCompetitionFactor(ctx, field) + case "minValidPrice": + return ec.fieldContext_PriceMonitoringBounds_minValidPrice(ctx, field) + case "maxValidPrice": + return ec.fieldContext_PriceMonitoringBounds_maxValidPrice(ctx, field) + case "trigger": + return ec.fieldContext_PriceMonitoringBounds_trigger(ctx, field) + case "referencePrice": + return ec.fieldContext_PriceMonitoringBounds_referencePrice(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type LiquiditySLAParameters", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringBounds", field.Name) }, } return fc, nil } -func (ec *executionContext) _NewSpotMarket_instrument(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewSpotMarket_instrument(ctx, field) +func (ec *executionContext) _MarketData_marketValueProxy(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_marketValueProxy(ctx, field) if err != nil { return graphql.Null } @@ -47328,7 +49843,7 @@ func (ec *executionContext) _NewSpotMarket_instrument(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewSpotMarket().Instrument(rctx, obj) + return obj.MarketValueProxy, nil }) if err != nil { ec.Error(ctx, err) @@ -47340,36 +49855,26 @@ func (ec *executionContext) _NewSpotMarket_instrument(ctx context.Context, field } return graphql.Null } - res := resTmp.(*vega.InstrumentConfiguration) + res := resTmp.(string) fc.Result = res - return ec.marshalNInstrumentConfiguration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐInstrumentConfiguration(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewSpotMarket_instrument(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_marketValueProxy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewSpotMarket", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_InstrumentConfiguration_name(ctx, field) - case "code": - return ec.fieldContext_InstrumentConfiguration_code(ctx, field) - case "futureProduct": - return ec.fieldContext_InstrumentConfiguration_futureProduct(ctx, field) - case "product": - return ec.fieldContext_InstrumentConfiguration_product(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type InstrumentConfiguration", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewSpotMarket_decimal_places(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewSpotMarket_decimal_places(ctx, field) +func (ec *executionContext) _MarketData_liquidityProviderFeeShare(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_liquidityProviderFeeShare(ctx, field) if err != nil { return graphql.Null } @@ -47382,38 +49887,47 @@ func (ec *executionContext) _NewSpotMarket_decimal_places(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewSpotMarket().DecimalPlaces(rctx, obj) + return ec.resolvers.MarketData().LiquidityProviderFeeShare(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.([]*LiquidityProviderFeeShare) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOLiquidityProviderFeeShare2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐLiquidityProviderFeeShareᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewSpotMarket_decimal_places(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_liquidityProviderFeeShare(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewSpotMarket", + Object: "MarketData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "party": + return ec.fieldContext_LiquidityProviderFeeShare_party(ctx, field) + case "equityLikeShare": + return ec.fieldContext_LiquidityProviderFeeShare_equityLikeShare(ctx, field) + case "averageEntryValuation": + return ec.fieldContext_LiquidityProviderFeeShare_averageEntryValuation(ctx, field) + case "averageScore": + return ec.fieldContext_LiquidityProviderFeeShare_averageScore(ctx, field) + case "virtualStake": + return ec.fieldContext_LiquidityProviderFeeShare_virtualStake(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityProviderFeeShare", field.Name) }, } return fc, nil } -func (ec *executionContext) _NewSpotMarket_metadata(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewSpotMarket_metadata(ctx, field) +func (ec *executionContext) _MarketData_liquidityProviderSla(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_liquidityProviderSla(ctx, field) if err != nil { return graphql.Null } @@ -47426,38 +49940,55 @@ func (ec *executionContext) _NewSpotMarket_metadata(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewSpotMarket().Metadata(rctx, obj) + return ec.resolvers.MarketData().LiquidityProviderSLA(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]string) + res := resTmp.([]*LiquidityProviderSLA) fc.Result = res - return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalOLiquidityProviderSLA2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐLiquidityProviderSLAᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewSpotMarket_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_liquidityProviderSla(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewSpotMarket", + Object: "MarketData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "party": + return ec.fieldContext_LiquidityProviderSLA_party(ctx, field) + case "currentEpochFractionOfTimeOnBook": + return ec.fieldContext_LiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx, field) + case "lastEpochFractionOfTimeOnBook": + return ec.fieldContext_LiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx, field) + case "lastEpochFeePenalty": + return ec.fieldContext_LiquidityProviderSLA_lastEpochFeePenalty(ctx, field) + case "lastEpochBondPenalty": + return ec.fieldContext_LiquidityProviderSLA_lastEpochBondPenalty(ctx, field) + case "hysteresisPeriodFeePenalties": + return ec.fieldContext_LiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx, field) + case "requiredLiquidity": + return ec.fieldContext_LiquidityProviderSLA_requiredLiquidity(ctx, field) + case "notionalVolumeBuys": + return ec.fieldContext_LiquidityProviderSLA_notionalVolumeBuys(ctx, field) + case "notionalVolumeSells": + return ec.fieldContext_LiquidityProviderSLA_notionalVolumeSells(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityProviderSLA", field.Name) }, } return fc, nil } -func (ec *executionContext) _NewSpotMarket_priceMonitoringParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewSpotMarket_priceMonitoringParameters(ctx, field) +func (ec *executionContext) _MarketData_nextMarkToMarket(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_nextMarkToMarket(ctx, field) if err != nil { return graphql.Null } @@ -47470,7 +50001,7 @@ func (ec *executionContext) _NewSpotMarket_priceMonitoringParameters(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewSpotMarket().PriceMonitoringParameters(rctx, obj) + return ec.resolvers.MarketData().NextMarkToMarket(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -47482,30 +50013,26 @@ func (ec *executionContext) _NewSpotMarket_priceMonitoringParameters(ctx context } return graphql.Null } - res := resTmp.(*PriceMonitoringParameters) + res := resTmp.(string) fc.Result = res - return ec.marshalNPriceMonitoringParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringParameters(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewSpotMarket_priceMonitoringParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_nextMarkToMarket(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewSpotMarket", + Object: "MarketData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "triggers": - return ec.fieldContext_PriceMonitoringParameters_triggers(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringParameters", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewSpotMarket_targetStakeParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewSpotMarket_targetStakeParameters(ctx, field) +func (ec *executionContext) _MarketData_marketGrowth(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_marketGrowth(ctx, field) if err != nil { return graphql.Null } @@ -47518,7 +50045,7 @@ func (ec *executionContext) _NewSpotMarket_targetStakeParameters(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewSpotMarket().TargetStakeParameters(rctx, obj) + return obj.MarketGrowth, nil }) if err != nil { ec.Error(ctx, err) @@ -47530,32 +50057,26 @@ func (ec *executionContext) _NewSpotMarket_targetStakeParameters(ctx context.Con } return graphql.Null } - res := resTmp.(*TargetStakeParameters) + res := resTmp.(string) fc.Result = res - return ec.marshalNTargetStakeParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTargetStakeParameters(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewSpotMarket_targetStakeParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_marketGrowth(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewSpotMarket", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "timeWindow": - return ec.fieldContext_TargetStakeParameters_timeWindow(ctx, field) - case "scalingFactor": - return ec.fieldContext_TargetStakeParameters_scalingFactor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TargetStakeParameters", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewSpotMarket_riskParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewSpotMarket_riskParameters(ctx, field) +func (ec *executionContext) _MarketData_lastTradedPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_lastTradedPrice(ctx, field) if err != nil { return graphql.Null } @@ -47568,35 +50089,38 @@ func (ec *executionContext) _NewSpotMarket_riskParameters(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewSpotMarket().RiskParameters(rctx, obj) + return obj.LastTradedPrice, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(RiskModel) + res := resTmp.(string) fc.Result = res - return ec.marshalORiskModel2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐRiskModel(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewSpotMarket_riskParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_lastTradedPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewSpotMarket", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type RiskModel does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewSpotMarket_positionDecimalPlaces(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewSpotMarket_positionDecimalPlaces(ctx, field) +func (ec *executionContext) _MarketData_productData(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_productData(ctx, field) if err != nil { return graphql.Null } @@ -47609,38 +50133,35 @@ func (ec *executionContext) _NewSpotMarket_positionDecimalPlaces(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewSpotMarket().PositionDecimalPlaces(rctx, obj) + return ec.resolvers.MarketData().ProductData(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.(ProductData) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOProductData2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProductData(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewSpotMarket_positionDecimalPlaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_productData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewSpotMarket", + Object: "MarketData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type ProductData does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewSpotMarket_liquiditySLAParams(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewSpotMarket_liquiditySLAParams(ctx, field) +func (ec *executionContext) _MarketData_nextNetworkCloseout(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_nextNetworkCloseout(ctx, field) if err != nil { return graphql.Null } @@ -47653,7 +50174,7 @@ func (ec *executionContext) _NewSpotMarket_liquiditySLAParams(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewSpotMarket().LiquiditySLAParams(rctx, obj) + return ec.resolvers.MarketData().NextNetworkCloseout(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -47665,36 +50186,26 @@ func (ec *executionContext) _NewSpotMarket_liquiditySLAParams(ctx context.Contex } return graphql.Null } - res := resTmp.(*vega.LiquiditySLAParameters) + res := resTmp.(string) fc.Result = res - return ec.marshalNLiquiditySLAParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquiditySLAParameters(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewSpotMarket_liquiditySLAParams(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_nextNetworkCloseout(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewSpotMarket", + Object: "MarketData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "priceRange": - return ec.fieldContext_LiquiditySLAParameters_priceRange(ctx, field) - case "commitmentMinTimeFraction": - return ec.fieldContext_LiquiditySLAParameters_commitmentMinTimeFraction(ctx, field) - case "performanceHysteresisEpochs": - return ec.fieldContext_LiquiditySLAParameters_performanceHysteresisEpochs(ctx, field) - case "slaCompetitionFactor": - return ec.fieldContext_LiquiditySLAParameters_slaCompetitionFactor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquiditySLAParameters", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NewTransfer_source(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewTransfer_source(ctx, field) +func (ec *executionContext) _MarketData_markPriceState(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketData_markPriceState(ctx, field) if err != nil { return graphql.Null } @@ -47707,38 +50218,39 @@ func (ec *executionContext) _NewTransfer_source(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewTransfer().Source(rctx, obj) + return obj.MarkPriceState, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.CompositePriceState) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOCompositePriceState2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewTransfer_source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketData_markPriceState(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewTransfer", + Object: "MarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "priceSources": + return ec.fieldContext_CompositePriceState_priceSources(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CompositePriceState", field.Name) }, } return fc, nil } -func (ec *executionContext) _NewTransfer_sourceType(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewTransfer_sourceType(ctx, field) +func (ec *executionContext) _MarketDataCommitments_sells(ctx context.Context, field graphql.CollectedField, obj *MarketDataCommitments) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDataCommitments_sells(ctx, field) if err != nil { return graphql.Null } @@ -47751,38 +50263,41 @@ func (ec *executionContext) _NewTransfer_sourceType(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewTransfer().SourceType(rctx, obj) + return obj.Sells, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(vega.AccountType) + res := resTmp.([]*vega.LiquidityOrderReference) fc.Result = res - return ec.marshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, field.Selections, res) + return ec.marshalOLiquidityOrderReference2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrderReferenceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewTransfer_sourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDataCommitments_sells(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewTransfer", + Object: "MarketDataCommitments", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type AccountType does not have child fields") + switch field.Name { + case "order": + return ec.fieldContext_LiquidityOrderReference_order(ctx, field) + case "liquidityOrder": + return ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityOrderReference", field.Name) }, } return fc, nil } -func (ec *executionContext) _NewTransfer_destination(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewTransfer_destination(ctx, field) +func (ec *executionContext) _MarketDataCommitments_buys(ctx context.Context, field graphql.CollectedField, obj *MarketDataCommitments) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDataCommitments_buys(ctx, field) if err != nil { return graphql.Null } @@ -47795,38 +50310,41 @@ func (ec *executionContext) _NewTransfer_destination(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewTransfer().Destination(rctx, obj) + return obj.Buys, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.LiquidityOrderReference) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOLiquidityOrderReference2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrderReferenceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewTransfer_destination(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDataCommitments_buys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewTransfer", + Object: "MarketDataCommitments", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "order": + return ec.fieldContext_LiquidityOrderReference_order(ctx, field) + case "liquidityOrder": + return ec.fieldContext_LiquidityOrderReference_liquidityOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityOrderReference", field.Name) }, } return fc, nil } -func (ec *executionContext) _NewTransfer_destinationType(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewTransfer_destinationType(ctx, field) +func (ec *executionContext) _MarketDataConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.MarketDataConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDataConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -47839,38 +50357,41 @@ func (ec *executionContext) _NewTransfer_destinationType(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewTransfer().DestinationType(rctx, obj) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(vega.AccountType) + res := resTmp.([]*v2.MarketDataEdge) fc.Result = res - return ec.marshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, field.Selections, res) + return ec.marshalOMarketDataEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarketDataEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewTransfer_destinationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDataConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewTransfer", + Object: "MarketDataConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type AccountType does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_MarketDataEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_MarketDataEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type MarketDataEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _NewTransfer_asset(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewTransfer_asset(ctx, field) +func (ec *executionContext) _MarketDataConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.MarketDataConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDataConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -47883,70 +50404,45 @@ func (ec *executionContext) _NewTransfer_asset(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewTransfer().Asset(rctx, obj) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewTransfer_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDataConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewTransfer", + Object: "MarketDataConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _NewTransfer_fraction_of_balance(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewTransfer_fraction_of_balance(ctx, field) +func (ec *executionContext) _MarketDataEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.MarketDataEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDataEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -47959,7 +50455,7 @@ func (ec *executionContext) _NewTransfer_fraction_of_balance(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewTransfer().FractionOfBalance(rctx, obj) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -47971,26 +50467,100 @@ func (ec *executionContext) _NewTransfer_fraction_of_balance(ctx context.Context } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.MarketData) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNMarketData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketData(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewTransfer_fraction_of_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDataEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewTransfer", + Object: "MarketDataEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "market": + return ec.fieldContext_MarketData_market(ctx, field) + case "markPrice": + return ec.fieldContext_MarketData_markPrice(ctx, field) + case "markPriceType": + return ec.fieldContext_MarketData_markPriceType(ctx, field) + case "bestBidPrice": + return ec.fieldContext_MarketData_bestBidPrice(ctx, field) + case "bestBidVolume": + return ec.fieldContext_MarketData_bestBidVolume(ctx, field) + case "bestOfferPrice": + return ec.fieldContext_MarketData_bestOfferPrice(ctx, field) + case "bestOfferVolume": + return ec.fieldContext_MarketData_bestOfferVolume(ctx, field) + case "bestStaticBidPrice": + return ec.fieldContext_MarketData_bestStaticBidPrice(ctx, field) + case "bestStaticBidVolume": + return ec.fieldContext_MarketData_bestStaticBidVolume(ctx, field) + case "bestStaticOfferPrice": + return ec.fieldContext_MarketData_bestStaticOfferPrice(ctx, field) + case "bestStaticOfferVolume": + return ec.fieldContext_MarketData_bestStaticOfferVolume(ctx, field) + case "midPrice": + return ec.fieldContext_MarketData_midPrice(ctx, field) + case "staticMidPrice": + return ec.fieldContext_MarketData_staticMidPrice(ctx, field) + case "timestamp": + return ec.fieldContext_MarketData_timestamp(ctx, field) + case "openInterest": + return ec.fieldContext_MarketData_openInterest(ctx, field) + case "auctionEnd": + return ec.fieldContext_MarketData_auctionEnd(ctx, field) + case "auctionStart": + return ec.fieldContext_MarketData_auctionStart(ctx, field) + case "indicativePrice": + return ec.fieldContext_MarketData_indicativePrice(ctx, field) + case "indicativeVolume": + return ec.fieldContext_MarketData_indicativeVolume(ctx, field) + case "marketTradingMode": + return ec.fieldContext_MarketData_marketTradingMode(ctx, field) + case "marketState": + return ec.fieldContext_MarketData_marketState(ctx, field) + case "trigger": + return ec.fieldContext_MarketData_trigger(ctx, field) + case "extensionTrigger": + return ec.fieldContext_MarketData_extensionTrigger(ctx, field) + case "targetStake": + return ec.fieldContext_MarketData_targetStake(ctx, field) + case "suppliedStake": + return ec.fieldContext_MarketData_suppliedStake(ctx, field) + case "commitments": + return ec.fieldContext_MarketData_commitments(ctx, field) + case "priceMonitoringBounds": + return ec.fieldContext_MarketData_priceMonitoringBounds(ctx, field) + case "marketValueProxy": + return ec.fieldContext_MarketData_marketValueProxy(ctx, field) + case "liquidityProviderFeeShare": + return ec.fieldContext_MarketData_liquidityProviderFeeShare(ctx, field) + case "liquidityProviderSla": + return ec.fieldContext_MarketData_liquidityProviderSla(ctx, field) + case "nextMarkToMarket": + return ec.fieldContext_MarketData_nextMarkToMarket(ctx, field) + case "marketGrowth": + return ec.fieldContext_MarketData_marketGrowth(ctx, field) + case "lastTradedPrice": + return ec.fieldContext_MarketData_lastTradedPrice(ctx, field) + case "productData": + return ec.fieldContext_MarketData_productData(ctx, field) + case "nextNetworkCloseout": + return ec.fieldContext_MarketData_nextNetworkCloseout(ctx, field) + case "markPriceState": + return ec.fieldContext_MarketData_markPriceState(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type MarketData", field.Name) }, } return fc, nil } -func (ec *executionContext) _NewTransfer_amount(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewTransfer_amount(ctx, field) +func (ec *executionContext) _MarketDataEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.MarketDataEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDataEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -48003,29 +50573,26 @@ func (ec *executionContext) _NewTransfer_amount(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewTransfer().Amount(rctx, obj) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewTransfer_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDataEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewTransfer", + Object: "MarketDataEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -48033,8 +50600,8 @@ func (ec *executionContext) fieldContext_NewTransfer_amount(ctx context.Context, return fc, nil } -func (ec *executionContext) _NewTransfer_transferType(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewTransfer_transferType(ctx, field) +func (ec *executionContext) _MarketDepth_market(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDepth_market(ctx, field) if err != nil { return graphql.Null } @@ -48047,7 +50614,7 @@ func (ec *executionContext) _NewTransfer_transferType(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewTransfer().TransferType(rctx, obj) + return ec.resolvers.MarketDepth().Market(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -48059,26 +50626,88 @@ func (ec *executionContext) _NewTransfer_transferType(ctx context.Context, field } return graphql.Null } - res := resTmp.(GovernanceTransferType) + res := resTmp.(*vega.Market) fc.Result = res - return ec.marshalNGovernanceTransferType2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐGovernanceTransferType(ctx, field.Selections, res) + return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewTransfer_transferType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDepth_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewTransfer", + Object: "MarketDepth", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type GovernanceTransferType does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Market_id(ctx, field) + case "fees": + return ec.fieldContext_Market_fees(ctx, field) + case "tradableInstrument": + return ec.fieldContext_Market_tradableInstrument(ctx, field) + case "decimalPlaces": + return ec.fieldContext_Market_decimalPlaces(ctx, field) + case "positionDecimalPlaces": + return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) + case "openingAuction": + return ec.fieldContext_Market_openingAuction(ctx, field) + case "priceMonitoringSettings": + return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) + case "liquidityMonitoringParameters": + return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) + case "tradingMode": + return ec.fieldContext_Market_tradingMode(ctx, field) + case "state": + return ec.fieldContext_Market_state(ctx, field) + case "proposal": + return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) + case "ordersConnection": + return ec.fieldContext_Market_ordersConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Market_accountsConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Market_tradesConnection(ctx, field) + case "depth": + return ec.fieldContext_Market_depth(ctx, field) + case "candlesConnection": + return ec.fieldContext_Market_candlesConnection(ctx, field) + case "data": + return ec.fieldContext_Market_data(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Market_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) + case "marketTimestamps": + return ec.fieldContext_Market_marketTimestamps(ctx, field) + case "riskFactors": + return ec.fieldContext_Market_riskFactors(ctx, field) + case "linearSlippageFactor": + return ec.fieldContext_Market_linearSlippageFactor(ctx, field) + case "quadraticSlippageFactor": + return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) + case "parentMarketID": + return ec.fieldContext_Market_parentMarketID(ctx, field) + case "insurancePoolFraction": + return ec.fieldContext_Market_insurancePoolFraction(ctx, field) + case "successorMarketID": + return ec.fieldContext_Market_successorMarketID(ctx, field) + case "liquiditySLAParameters": + return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, } return fc, nil } -func (ec *executionContext) _NewTransfer_kind(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NewTransfer_kind(ctx, field) +func (ec *executionContext) _MarketDepth_buy(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDepth_buy(ctx, field) if err != nil { return graphql.Null } @@ -48091,38 +50720,43 @@ func (ec *executionContext) _NewTransfer_kind(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NewTransfer().Kind(rctx, obj) + return obj.Buy, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(GovernanceTransferKind) + res := resTmp.([]*vega.PriceLevel) fc.Result = res - return ec.marshalNGovernanceTransferKind2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐGovernanceTransferKind(ctx, field.Selections, res) + return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewTransfer_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDepth_buy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NewTransfer", + Object: "MarketDepth", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type GovernanceTransferKind does not have child fields") + switch field.Name { + case "price": + return ec.fieldContext_PriceLevel_price(ctx, field) + case "volume": + return ec.fieldContext_PriceLevel_volume(ctx, field) + case "numberOfOrders": + return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) }, } return fc, nil } -func (ec *executionContext) _Node_id(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_id(ctx, field) +func (ec *executionContext) _MarketDepth_sell(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDepth_sell(ctx, field) if err != nil { return graphql.Null } @@ -48135,38 +50769,43 @@ func (ec *executionContext) _Node_id(ctx context.Context, field graphql.Collecte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return obj.Sell, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.PriceLevel) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDepth_sell(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketDepth", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "price": + return ec.fieldContext_PriceLevel_price(ctx, field) + case "volume": + return ec.fieldContext_PriceLevel_volume(ctx, field) + case "numberOfOrders": + return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) }, } return fc, nil } -func (ec *executionContext) _Node_pubkey(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_pubkey(ctx, field) +func (ec *executionContext) _MarketDepth_lastTrade(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDepth_lastTrade(ctx, field) if err != nil { return graphql.Null } @@ -48179,38 +50818,67 @@ func (ec *executionContext) _Node_pubkey(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PubKey, nil + return ec.resolvers.MarketDepth().LastTrade(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Trade) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTrade2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTrade(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_pubkey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDepth_lastTrade(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketDepth", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Trade_id(ctx, field) + case "market": + return ec.fieldContext_Trade_market(ctx, field) + case "buyOrder": + return ec.fieldContext_Trade_buyOrder(ctx, field) + case "sellOrder": + return ec.fieldContext_Trade_sellOrder(ctx, field) + case "buyer": + return ec.fieldContext_Trade_buyer(ctx, field) + case "seller": + return ec.fieldContext_Trade_seller(ctx, field) + case "aggressor": + return ec.fieldContext_Trade_aggressor(ctx, field) + case "price": + return ec.fieldContext_Trade_price(ctx, field) + case "size": + return ec.fieldContext_Trade_size(ctx, field) + case "createdAt": + return ec.fieldContext_Trade_createdAt(ctx, field) + case "type": + return ec.fieldContext_Trade_type(ctx, field) + case "buyerFee": + return ec.fieldContext_Trade_buyerFee(ctx, field) + case "sellerFee": + return ec.fieldContext_Trade_sellerFee(ctx, field) + case "buyerAuctionBatch": + return ec.fieldContext_Trade_buyerAuctionBatch(ctx, field) + case "sellerAuctionBatch": + return ec.fieldContext_Trade_sellerAuctionBatch(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Trade", field.Name) }, } return fc, nil } -func (ec *executionContext) _Node_tmPubkey(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_tmPubkey(ctx, field) +func (ec *executionContext) _MarketDepth_sequenceNumber(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDepth_sequenceNumber(ctx, field) if err != nil { return graphql.Null } @@ -48223,7 +50891,7 @@ func (ec *executionContext) _Node_tmPubkey(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TmPubKey, nil + return ec.resolvers.MarketDepth().SequenceNumber(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -48240,12 +50908,12 @@ func (ec *executionContext) _Node_tmPubkey(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_tmPubkey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDepth_sequenceNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketDepth", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -48253,8 +50921,8 @@ func (ec *executionContext) fieldContext_Node_tmPubkey(ctx context.Context, fiel return fc, nil } -func (ec *executionContext) _Node_ethereumAddress(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_ethereumAddress(ctx, field) +func (ec *executionContext) _MarketDepthTrade_id(ctx context.Context, field graphql.CollectedField, obj *MarketDepthTrade) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDepthTrade_id(ctx, field) if err != nil { return graphql.Null } @@ -48267,7 +50935,7 @@ func (ec *executionContext) _Node_ethereumAddress(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EthereumAddress, nil + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) @@ -48281,24 +50949,24 @@ func (ec *executionContext) _Node_ethereumAddress(ctx context.Context, field gra } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_ethereumAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDepthTrade_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketDepthTrade", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Node_infoUrl(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_infoUrl(ctx, field) +func (ec *executionContext) _MarketDepthTrade_price(ctx context.Context, field graphql.CollectedField, obj *MarketDepthTrade) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDepthTrade_price(ctx, field) if err != nil { return graphql.Null } @@ -48311,7 +50979,7 @@ func (ec *executionContext) _Node_infoUrl(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InfoUrl, nil + return obj.Price, nil }) if err != nil { ec.Error(ctx, err) @@ -48328,9 +50996,9 @@ func (ec *executionContext) _Node_infoUrl(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_infoUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDepthTrade_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketDepthTrade", Field: field, IsMethod: false, IsResolver: false, @@ -48341,8 +51009,8 @@ func (ec *executionContext) fieldContext_Node_infoUrl(ctx context.Context, field return fc, nil } -func (ec *executionContext) _Node_location(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_location(ctx, field) +func (ec *executionContext) _MarketDepthTrade_size(ctx context.Context, field graphql.CollectedField, obj *MarketDepthTrade) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDepthTrade_size(ctx, field) if err != nil { return graphql.Null } @@ -48355,7 +51023,7 @@ func (ec *executionContext) _Node_location(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Location, nil + return obj.Size, nil }) if err != nil { ec.Error(ctx, err) @@ -48372,9 +51040,9 @@ func (ec *executionContext) _Node_location(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_location(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDepthTrade_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketDepthTrade", Field: field, IsMethod: false, IsResolver: false, @@ -48385,8 +51053,8 @@ func (ec *executionContext) fieldContext_Node_location(ctx context.Context, fiel return fc, nil } -func (ec *executionContext) _Node_stakedByOperator(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_stakedByOperator(ctx, field) +func (ec *executionContext) _MarketDepthUpdate_market(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDepthUpdate_market(ctx, field) if err != nil { return graphql.Null } @@ -48399,7 +51067,7 @@ func (ec *executionContext) _Node_stakedByOperator(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.StakedByOperator, nil + return ec.resolvers.MarketDepthUpdate().Market(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -48411,26 +51079,88 @@ func (ec *executionContext) _Node_stakedByOperator(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Market) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_stakedByOperator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDepthUpdate_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketDepthUpdate", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Market_id(ctx, field) + case "fees": + return ec.fieldContext_Market_fees(ctx, field) + case "tradableInstrument": + return ec.fieldContext_Market_tradableInstrument(ctx, field) + case "decimalPlaces": + return ec.fieldContext_Market_decimalPlaces(ctx, field) + case "positionDecimalPlaces": + return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) + case "openingAuction": + return ec.fieldContext_Market_openingAuction(ctx, field) + case "priceMonitoringSettings": + return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) + case "liquidityMonitoringParameters": + return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) + case "tradingMode": + return ec.fieldContext_Market_tradingMode(ctx, field) + case "state": + return ec.fieldContext_Market_state(ctx, field) + case "proposal": + return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) + case "ordersConnection": + return ec.fieldContext_Market_ordersConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Market_accountsConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Market_tradesConnection(ctx, field) + case "depth": + return ec.fieldContext_Market_depth(ctx, field) + case "candlesConnection": + return ec.fieldContext_Market_candlesConnection(ctx, field) + case "data": + return ec.fieldContext_Market_data(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Market_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) + case "marketTimestamps": + return ec.fieldContext_Market_marketTimestamps(ctx, field) + case "riskFactors": + return ec.fieldContext_Market_riskFactors(ctx, field) + case "linearSlippageFactor": + return ec.fieldContext_Market_linearSlippageFactor(ctx, field) + case "quadraticSlippageFactor": + return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) + case "parentMarketID": + return ec.fieldContext_Market_parentMarketID(ctx, field) + case "insurancePoolFraction": + return ec.fieldContext_Market_insurancePoolFraction(ctx, field) + case "successorMarketID": + return ec.fieldContext_Market_successorMarketID(ctx, field) + case "liquiditySLAParameters": + return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, } return fc, nil } -func (ec *executionContext) _Node_stakedByDelegates(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_stakedByDelegates(ctx, field) +func (ec *executionContext) _MarketDepthUpdate_buy(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDepthUpdate_buy(ctx, field) if err != nil { return graphql.Null } @@ -48443,38 +51173,43 @@ func (ec *executionContext) _Node_stakedByDelegates(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.StakedByDelegates, nil + return obj.Buy, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.PriceLevel) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_stakedByDelegates(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDepthUpdate_buy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketDepthUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "price": + return ec.fieldContext_PriceLevel_price(ctx, field) + case "volume": + return ec.fieldContext_PriceLevel_volume(ctx, field) + case "numberOfOrders": + return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) }, } return fc, nil } -func (ec *executionContext) _Node_stakedTotal(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_stakedTotal(ctx, field) +func (ec *executionContext) _MarketDepthUpdate_sell(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDepthUpdate_sell(ctx, field) if err != nil { return graphql.Null } @@ -48487,38 +51222,43 @@ func (ec *executionContext) _Node_stakedTotal(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.StakedTotal, nil + return obj.Sell, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.PriceLevel) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_stakedTotal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDepthUpdate_sell(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketDepthUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "price": + return ec.fieldContext_PriceLevel_price(ctx, field) + case "volume": + return ec.fieldContext_PriceLevel_volume(ctx, field) + case "numberOfOrders": + return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) }, } return fc, nil } -func (ec *executionContext) _Node_pendingStake(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_pendingStake(ctx, field) +func (ec *executionContext) _MarketDepthUpdate_sequenceNumber(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDepthUpdate_sequenceNumber(ctx, field) if err != nil { return graphql.Null } @@ -48531,7 +51271,7 @@ func (ec *executionContext) _Node_pendingStake(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PendingStake, nil + return ec.resolvers.MarketDepthUpdate().SequenceNumber(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -48548,12 +51288,12 @@ func (ec *executionContext) _Node_pendingStake(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_pendingStake(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDepthUpdate_sequenceNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketDepthUpdate", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -48561,8 +51301,8 @@ func (ec *executionContext) fieldContext_Node_pendingStake(ctx context.Context, return fc, nil } -func (ec *executionContext) _Node_epochData(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_epochData(ctx, field) +func (ec *executionContext) _MarketDepthUpdate_previousSequenceNumber(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketDepthUpdate_previousSequenceNumber(ctx, field) if err != nil { return graphql.Null } @@ -48575,43 +51315,38 @@ func (ec *executionContext) _Node_epochData(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EpochData, nil + return ec.resolvers.MarketDepthUpdate().PreviousSequenceNumber(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.EpochData) + res := resTmp.(string) fc.Result = res - return ec.marshalOEpochData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpochData(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_epochData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketDepthUpdate_previousSequenceNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketDepthUpdate", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "total": - return ec.fieldContext_EpochData_total(ctx, field) - case "offline": - return ec.fieldContext_EpochData_offline(ctx, field) - case "online": - return ec.fieldContext_EpochData_online(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type EpochData", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Node_status(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_status(ctx, field) +func (ec *executionContext) _MarketEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.MarketEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -48624,7 +51359,7 @@ func (ec *executionContext) _Node_status(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -48636,84 +51371,88 @@ func (ec *executionContext) _Node_status(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(vega.NodeStatus) + res := resTmp.(*vega.Market) fc.Result = res - return ec.marshalNNodeStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNodeStatus(ctx, field.Selections, res) + return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketEdge", Field: field, IsMethod: false, IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type NodeStatus does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _Node_delegationsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_delegationsConnection(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Node().DelegationsConnection(rctx, obj, fc.Args["partyId"].(*string), fc.Args["pagination"].(*v2.Pagination)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*v2.DelegationsConnection) - fc.Result = res - return ec.marshalODelegationsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDelegationsConnection(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Node_delegationsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Node", - Field: field, - IsMethod: true, - IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_DelegationsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_DelegationsConnection_pageInfo(ctx, field) + case "id": + return ec.fieldContext_Market_id(ctx, field) + case "fees": + return ec.fieldContext_Market_fees(ctx, field) + case "tradableInstrument": + return ec.fieldContext_Market_tradableInstrument(ctx, field) + case "decimalPlaces": + return ec.fieldContext_Market_decimalPlaces(ctx, field) + case "positionDecimalPlaces": + return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) + case "openingAuction": + return ec.fieldContext_Market_openingAuction(ctx, field) + case "priceMonitoringSettings": + return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) + case "liquidityMonitoringParameters": + return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) + case "tradingMode": + return ec.fieldContext_Market_tradingMode(ctx, field) + case "state": + return ec.fieldContext_Market_state(ctx, field) + case "proposal": + return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) + case "ordersConnection": + return ec.fieldContext_Market_ordersConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Market_accountsConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Market_tradesConnection(ctx, field) + case "depth": + return ec.fieldContext_Market_depth(ctx, field) + case "candlesConnection": + return ec.fieldContext_Market_candlesConnection(ctx, field) + case "data": + return ec.fieldContext_Market_data(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Market_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) + case "marketTimestamps": + return ec.fieldContext_Market_marketTimestamps(ctx, field) + case "riskFactors": + return ec.fieldContext_Market_riskFactors(ctx, field) + case "linearSlippageFactor": + return ec.fieldContext_Market_linearSlippageFactor(ctx, field) + case "quadraticSlippageFactor": + return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) + case "parentMarketID": + return ec.fieldContext_Market_parentMarketID(ctx, field) + case "insurancePoolFraction": + return ec.fieldContext_Market_insurancePoolFraction(ctx, field) + case "successorMarketID": + return ec.fieldContext_Market_successorMarketID(ctx, field) + case "liquiditySLAParameters": + return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type DelegationsConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Node_delegationsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Node_rewardScore(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_rewardScore(ctx, field) +func (ec *executionContext) _MarketEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.MarketEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -48726,49 +51465,38 @@ func (ec *executionContext) _Node_rewardScore(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RewardScore, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.RewardScore) + res := resTmp.(string) fc.Result = res - return ec.marshalORewardScore2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐRewardScore(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_rewardScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "rawValidatorScore": - return ec.fieldContext_RewardScore_rawValidatorScore(ctx, field) - case "performanceScore": - return ec.fieldContext_RewardScore_performanceScore(ctx, field) - case "multisigScore": - return ec.fieldContext_RewardScore_multisigScore(ctx, field) - case "validatorScore": - return ec.fieldContext_RewardScore_validatorScore(ctx, field) - case "normalisedScore": - return ec.fieldContext_RewardScore_normalisedScore(ctx, field) - case "validatorStatus": - return ec.fieldContext_RewardScore_validatorStatus(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type RewardScore", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Node_rankingScore(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_rankingScore(ctx, field) +func (ec *executionContext) _MarketEvent_marketId(ctx context.Context, field graphql.CollectedField, obj *MarketEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketEvent_marketId(ctx, field) if err != nil { return graphql.Null } @@ -48781,7 +51509,7 @@ func (ec *executionContext) _Node_rankingScore(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RankingScore, nil + return obj.MarketID, nil }) if err != nil { ec.Error(ctx, err) @@ -48793,40 +51521,26 @@ func (ec *executionContext) _Node_rankingScore(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(*vega.RankingScore) + res := resTmp.(string) fc.Result = res - return ec.marshalNRankingScore2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐRankingScore(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_rankingScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketEvent_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketEvent", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "status": - return ec.fieldContext_RankingScore_status(ctx, field) - case "previousStatus": - return ec.fieldContext_RankingScore_previousStatus(ctx, field) - case "rankingScore": - return ec.fieldContext_RankingScore_rankingScore(ctx, field) - case "stakeScore": - return ec.fieldContext_RankingScore_stakeScore(ctx, field) - case "performanceScore": - return ec.fieldContext_RankingScore_performanceScore(ctx, field) - case "votingPower": - return ec.fieldContext_RankingScore_votingPower(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type RankingScore", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Node_name(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_name(ctx, field) +func (ec *executionContext) _MarketEvent_payload(ctx context.Context, field graphql.CollectedField, obj *MarketEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketEvent_payload(ctx, field) if err != nil { return graphql.Null } @@ -48839,7 +51553,7 @@ func (ec *executionContext) _Node_name(ctx context.Context, field graphql.Collec }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.Payload, nil }) if err != nil { ec.Error(ctx, err) @@ -48856,9 +51570,9 @@ func (ec *executionContext) _Node_name(ctx context.Context, field graphql.Collec return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketEvent_payload(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketEvent", Field: field, IsMethod: false, IsResolver: false, @@ -48869,8 +51583,8 @@ func (ec *executionContext) fieldContext_Node_name(ctx context.Context, field gr return fc, nil } -func (ec *executionContext) _Node_avatarUrl(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Node_avatarUrl(ctx, field) +func (ec *executionContext) _MarketTick_marketId(ctx context.Context, field graphql.CollectedField, obj *MarketTick) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketTick_marketId(ctx, field) if err != nil { return graphql.Null } @@ -48883,35 +51597,38 @@ func (ec *executionContext) _Node_avatarUrl(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AvatarUrl, nil + return obj.MarketID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Node_avatarUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketTick_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Node", + Object: "MarketTick", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeBasic_id(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeBasic_id(ctx, field) +func (ec *executionContext) _MarketTick_time(ctx context.Context, field graphql.CollectedField, obj *MarketTick) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketTick_time(ctx, field) if err != nil { return graphql.Null } @@ -48924,7 +51641,7 @@ func (ec *executionContext) _NodeBasic_id(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return obj.Time, nil }) if err != nil { ec.Error(ctx, err) @@ -48938,24 +51655,24 @@ func (ec *executionContext) _NodeBasic_id(ctx context.Context, field graphql.Col } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeBasic_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketTick_time(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeBasic", + Object: "MarketTick", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeBasic_pubkey(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeBasic_pubkey(ctx, field) +func (ec *executionContext) _MarketTimestamps_proposed(ctx context.Context, field graphql.CollectedField, obj *vega.MarketTimestamps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketTimestamps_proposed(ctx, field) if err != nil { return graphql.Null } @@ -48968,38 +51685,35 @@ func (ec *executionContext) _NodeBasic_pubkey(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PubKey, nil + return obj.Proposed, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeBasic_pubkey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketTimestamps_proposed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeBasic", + Object: "MarketTimestamps", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeBasic_tmPubkey(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeBasic_tmPubkey(ctx, field) +func (ec *executionContext) _MarketTimestamps_pending(ctx context.Context, field graphql.CollectedField, obj *vega.MarketTimestamps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketTimestamps_pending(ctx, field) if err != nil { return graphql.Null } @@ -49012,7 +51726,7 @@ func (ec *executionContext) _NodeBasic_tmPubkey(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TmPubKey, nil + return obj.Pending, nil }) if err != nil { ec.Error(ctx, err) @@ -49024,26 +51738,26 @@ func (ec *executionContext) _NodeBasic_tmPubkey(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeBasic_tmPubkey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketTimestamps_pending(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeBasic", + Object: "MarketTimestamps", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeBasic_ethereumAddress(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeBasic_ethereumAddress(ctx, field) +func (ec *executionContext) _MarketTimestamps_open(ctx context.Context, field graphql.CollectedField, obj *vega.MarketTimestamps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketTimestamps_open(ctx, field) if err != nil { return graphql.Null } @@ -49056,7 +51770,7 @@ func (ec *executionContext) _NodeBasic_ethereumAddress(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EthereumAddress, nil + return obj.Open, nil }) if err != nil { ec.Error(ctx, err) @@ -49068,26 +51782,26 @@ func (ec *executionContext) _NodeBasic_ethereumAddress(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeBasic_ethereumAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketTimestamps_open(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeBasic", + Object: "MarketTimestamps", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeBasic_infoUrl(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeBasic_infoUrl(ctx, field) +func (ec *executionContext) _MarketTimestamps_close(ctx context.Context, field graphql.CollectedField, obj *vega.MarketTimestamps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MarketTimestamps_close(ctx, field) if err != nil { return graphql.Null } @@ -49100,7 +51814,7 @@ func (ec *executionContext) _NodeBasic_infoUrl(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InfoUrl, nil + return obj.Close, nil }) if err != nil { ec.Error(ctx, err) @@ -49112,26 +51826,26 @@ func (ec *executionContext) _NodeBasic_infoUrl(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeBasic_infoUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MarketTimestamps_close(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeBasic", + Object: "MarketTimestamps", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeBasic_location(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeBasic_location(ctx, field) +func (ec *executionContext) _Metadata_key(ctx context.Context, field graphql.CollectedField, obj *vega.Metadata) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Metadata_key(ctx, field) if err != nil { return graphql.Null } @@ -49144,7 +51858,7 @@ func (ec *executionContext) _NodeBasic_location(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Location, nil + return obj.Key, nil }) if err != nil { ec.Error(ctx, err) @@ -49161,9 +51875,9 @@ func (ec *executionContext) _NodeBasic_location(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeBasic_location(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeBasic", + Object: "Metadata", Field: field, IsMethod: false, IsResolver: false, @@ -49174,8 +51888,8 @@ func (ec *executionContext) fieldContext_NodeBasic_location(ctx context.Context, return fc, nil } -func (ec *executionContext) _NodeBasic_status(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeBasic_status(ctx, field) +func (ec *executionContext) _Metadata_value(ctx context.Context, field graphql.CollectedField, obj *vega.Metadata) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Metadata_value(ctx, field) if err != nil { return graphql.Null } @@ -49188,7 +51902,7 @@ func (ec *executionContext) _NodeBasic_status(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.Value, nil }) if err != nil { ec.Error(ctx, err) @@ -49200,26 +51914,26 @@ func (ec *executionContext) _NodeBasic_status(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(vega.NodeStatus) + res := resTmp.(string) fc.Result = res - return ec.marshalNNodeStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNodeStatus(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeBasic_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Metadata_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeBasic", + Object: "Metadata", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type NodeStatus does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeBasic_name(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeBasic_name(ctx, field) +func (ec *executionContext) _NetworkLimits_canProposeMarket(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NetworkLimits_canProposeMarket(ctx, field) if err != nil { return graphql.Null } @@ -49232,7 +51946,7 @@ func (ec *executionContext) _NodeBasic_name(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.CanProposeMarket, nil }) if err != nil { ec.Error(ctx, err) @@ -49244,26 +51958,26 @@ func (ec *executionContext) _NodeBasic_name(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(string) + res := resTmp.(bool) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeBasic_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NetworkLimits_canProposeMarket(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeBasic", + Object: "NetworkLimits", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeBasic_avatarUrl(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeBasic_avatarUrl(ctx, field) +func (ec *executionContext) _NetworkLimits_canProposeAsset(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NetworkLimits_canProposeAsset(ctx, field) if err != nil { return graphql.Null } @@ -49276,35 +51990,38 @@ func (ec *executionContext) _NodeBasic_avatarUrl(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AvatarUrl, nil + return obj.CanProposeAsset, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(string) + res := resTmp.(bool) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeBasic_avatarUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NetworkLimits_canProposeAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeBasic", + Object: "NetworkLimits", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeData_stakedTotal(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeData_stakedTotal(ctx, field) +func (ec *executionContext) _NetworkLimits_proposeMarketEnabled(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NetworkLimits_proposeMarketEnabled(ctx, field) if err != nil { return graphql.Null } @@ -49317,7 +52034,7 @@ func (ec *executionContext) _NodeData_stakedTotal(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.StakedTotal, nil + return obj.ProposeMarketEnabled, nil }) if err != nil { ec.Error(ctx, err) @@ -49329,26 +52046,26 @@ func (ec *executionContext) _NodeData_stakedTotal(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(string) + res := resTmp.(bool) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeData_stakedTotal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NetworkLimits_proposeMarketEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeData", + Object: "NetworkLimits", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeData_totalNodes(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeData_totalNodes(ctx, field) +func (ec *executionContext) _NetworkLimits_proposeAssetEnabled(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NetworkLimits_proposeAssetEnabled(ctx, field) if err != nil { return graphql.Null } @@ -49361,7 +52078,7 @@ func (ec *executionContext) _NodeData_totalNodes(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalNodes, nil + return obj.ProposeAssetEnabled, nil }) if err != nil { ec.Error(ctx, err) @@ -49373,26 +52090,26 @@ func (ec *executionContext) _NodeData_totalNodes(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(uint32) + res := resTmp.(bool) fc.Result = res - return ec.marshalNInt2uint32(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeData_totalNodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NetworkLimits_proposeAssetEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeData", + Object: "NetworkLimits", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeData_inactiveNodes(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeData_inactiveNodes(ctx, field) +func (ec *executionContext) _NetworkLimits_genesisLoaded(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NetworkLimits_genesisLoaded(ctx, field) if err != nil { return graphql.Null } @@ -49405,7 +52122,7 @@ func (ec *executionContext) _NodeData_inactiveNodes(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InactiveNodes, nil + return obj.GenesisLoaded, nil }) if err != nil { ec.Error(ctx, err) @@ -49417,26 +52134,26 @@ func (ec *executionContext) _NodeData_inactiveNodes(ctx context.Context, field g } return graphql.Null } - res := resTmp.(uint32) + res := resTmp.(bool) fc.Result = res - return ec.marshalNInt2uint32(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeData_inactiveNodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NetworkLimits_genesisLoaded(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeData", + Object: "NetworkLimits", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeData_tendermintNodes(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeData_tendermintNodes(ctx, field) +func (ec *executionContext) _NetworkLimits_proposeMarketEnabledFrom(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NetworkLimits_proposeMarketEnabledFrom(ctx, field) if err != nil { return graphql.Null } @@ -49449,7 +52166,7 @@ func (ec *executionContext) _NodeData_tendermintNodes(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NodeData().TendermintNodes(rctx, obj) + return obj.ProposeMarketEnabledFrom, nil }) if err != nil { ec.Error(ctx, err) @@ -49461,38 +52178,26 @@ func (ec *executionContext) _NodeData_tendermintNodes(ctx context.Context, field } return graphql.Null } - res := resTmp.(*NodeSet) + res := resTmp.(int64) fc.Result = res - return ec.marshalNNodeSet2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐNodeSet(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeData_tendermintNodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NetworkLimits_proposeMarketEnabledFrom(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeData", + Object: "NetworkLimits", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "total": - return ec.fieldContext_NodeSet_total(ctx, field) - case "inactive": - return ec.fieldContext_NodeSet_inactive(ctx, field) - case "promoted": - return ec.fieldContext_NodeSet_promoted(ctx, field) - case "demoted": - return ec.fieldContext_NodeSet_demoted(ctx, field) - case "maximum": - return ec.fieldContext_NodeSet_maximum(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type NodeSet", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeData_ersatzNodes(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeData_ersatzNodes(ctx, field) +func (ec *executionContext) _NetworkLimits_proposeAssetEnabledFrom(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkLimits) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NetworkLimits_proposeAssetEnabledFrom(ctx, field) if err != nil { return graphql.Null } @@ -49505,47 +52210,38 @@ func (ec *executionContext) _NodeData_ersatzNodes(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NodeData().ErsatzNodes(rctx, obj) + return obj.ProposeAssetEnabledFrom, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*NodeSet) + res := resTmp.(int64) fc.Result = res - return ec.marshalONodeSet2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐNodeSet(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeData_ersatzNodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NetworkLimits_proposeAssetEnabledFrom(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeData", + Object: "NetworkLimits", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "total": - return ec.fieldContext_NodeSet_total(ctx, field) - case "inactive": - return ec.fieldContext_NodeSet_inactive(ctx, field) - case "promoted": - return ec.fieldContext_NodeSet_promoted(ctx, field) - case "demoted": - return ec.fieldContext_NodeSet_demoted(ctx, field) - case "maximum": - return ec.fieldContext_NodeSet_maximum(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type NodeSet", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeData_pendingNodes(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeData_pendingNodes(ctx, field) +func (ec *executionContext) _NetworkParameter_key(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkParameter) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NetworkParameter_key(ctx, field) if err != nil { return graphql.Null } @@ -49558,47 +52254,38 @@ func (ec *executionContext) _NodeData_pendingNodes(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NodeData().PendingNodes(rctx, obj) + return obj.Key, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*NodeSet) + res := resTmp.(string) fc.Result = res - return ec.marshalONodeSet2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐNodeSet(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeData_pendingNodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NetworkParameter_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeData", + Object: "NetworkParameter", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "total": - return ec.fieldContext_NodeSet_total(ctx, field) - case "inactive": - return ec.fieldContext_NodeSet_inactive(ctx, field) - case "promoted": - return ec.fieldContext_NodeSet_promoted(ctx, field) - case "demoted": - return ec.fieldContext_NodeSet_demoted(ctx, field) - case "maximum": - return ec.fieldContext_NodeSet_maximum(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type NodeSet", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeData_uptime(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeData_uptime(ctx, field) +func (ec *executionContext) _NetworkParameter_value(ctx context.Context, field graphql.CollectedField, obj *vega.NetworkParameter) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NetworkParameter_value(ctx, field) if err != nil { return graphql.Null } @@ -49611,7 +52298,7 @@ func (ec *executionContext) _NodeData_uptime(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NodeData().Uptime(rctx, obj) + return obj.Value, nil }) if err != nil { ec.Error(ctx, err) @@ -49623,26 +52310,26 @@ func (ec *executionContext) _NodeData_uptime(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(float64) + res := resTmp.(string) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeData_uptime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NetworkParameter_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeData", + Object: "NetworkParameter", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.NodeEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeEdge_node(ctx, field) +func (ec *executionContext) _NetworkParameterEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.NetworkParameterEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NetworkParameterEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -49667,62 +52354,32 @@ func (ec *executionContext) _NodeEdge_node(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(*vega.Node) + res := resTmp.(*vega.NetworkParameter) fc.Result = res - return ec.marshalNNode2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNode(ctx, field.Selections, res) + return ec.marshalNNetworkParameter2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNetworkParameter(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NetworkParameterEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeEdge", + Object: "NetworkParameterEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Node_id(ctx, field) - case "pubkey": - return ec.fieldContext_Node_pubkey(ctx, field) - case "tmPubkey": - return ec.fieldContext_Node_tmPubkey(ctx, field) - case "ethereumAddress": - return ec.fieldContext_Node_ethereumAddress(ctx, field) - case "infoUrl": - return ec.fieldContext_Node_infoUrl(ctx, field) - case "location": - return ec.fieldContext_Node_location(ctx, field) - case "stakedByOperator": - return ec.fieldContext_Node_stakedByOperator(ctx, field) - case "stakedByDelegates": - return ec.fieldContext_Node_stakedByDelegates(ctx, field) - case "stakedTotal": - return ec.fieldContext_Node_stakedTotal(ctx, field) - case "pendingStake": - return ec.fieldContext_Node_pendingStake(ctx, field) - case "epochData": - return ec.fieldContext_Node_epochData(ctx, field) - case "status": - return ec.fieldContext_Node_status(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Node_delegationsConnection(ctx, field) - case "rewardScore": - return ec.fieldContext_Node_rewardScore(ctx, field) - case "rankingScore": - return ec.fieldContext_Node_rankingScore(ctx, field) - case "name": - return ec.fieldContext_Node_name(ctx, field) - case "avatarUrl": - return ec.fieldContext_Node_avatarUrl(ctx, field) + case "key": + return ec.fieldContext_NetworkParameter_key(ctx, field) + case "value": + return ec.fieldContext_NetworkParameter_value(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Node", field.Name) + return nil, fmt.Errorf("no field named %q was found under type NetworkParameter", field.Name) }, } return fc, nil } -func (ec *executionContext) _NodeEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.NodeEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeEdge_cursor(ctx, field) +func (ec *executionContext) _NetworkParameterEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.NetworkParameterEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NetworkParameterEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -49752,9 +52409,9 @@ func (ec *executionContext) _NodeEdge_cursor(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NetworkParameterEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeEdge", + Object: "NetworkParameterEdge", Field: field, IsMethod: false, IsResolver: false, @@ -49765,8 +52422,8 @@ func (ec *executionContext) fieldContext_NodeEdge_cursor(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _NodeSet_total(ctx context.Context, field graphql.CollectedField, obj *NodeSet) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeSet_total(ctx, field) +func (ec *executionContext) _NetworkParametersConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.NetworkParameterConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NetworkParametersConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -49779,38 +52436,41 @@ func (ec *executionContext) _NodeSet_total(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Total, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.([]*v2.NetworkParameterEdge) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalONetworkParameterEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNetworkParameterEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeSet_total(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NetworkParametersConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeSet", + Object: "NetworkParametersConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_NetworkParameterEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_NetworkParameterEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NetworkParameterEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _NodeSet_inactive(ctx context.Context, field graphql.CollectedField, obj *NodeSet) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeSet_inactive(ctx, field) +func (ec *executionContext) _NetworkParametersConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.NetworkParameterConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NetworkParametersConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -49823,7 +52483,7 @@ func (ec *executionContext) _NodeSet_inactive(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Inactive, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -49835,26 +52495,36 @@ func (ec *executionContext) _NodeSet_inactive(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeSet_inactive(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NetworkParametersConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeSet", + Object: "NetworkParametersConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _NodeSet_promoted(ctx context.Context, field graphql.CollectedField, obj *NodeSet) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeSet_promoted(ctx, field) +func (ec *executionContext) _NewAsset_name(ctx context.Context, field graphql.CollectedField, obj *vega.NewAsset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewAsset_name(ctx, field) if err != nil { return graphql.Null } @@ -49867,26 +52537,29 @@ func (ec *executionContext) _NodeSet_promoted(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Promoted, nil + return ec.resolvers.NewAsset().Name(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeSet_promoted(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewAsset_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeSet", + Object: "NewAsset", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -49894,8 +52567,8 @@ func (ec *executionContext) fieldContext_NodeSet_promoted(ctx context.Context, f return fc, nil } -func (ec *executionContext) _NodeSet_demoted(ctx context.Context, field graphql.CollectedField, obj *NodeSet) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeSet_demoted(ctx, field) +func (ec *executionContext) _NewAsset_symbol(ctx context.Context, field graphql.CollectedField, obj *vega.NewAsset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewAsset_symbol(ctx, field) if err != nil { return graphql.Null } @@ -49908,26 +52581,29 @@ func (ec *executionContext) _NodeSet_demoted(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Demoted, nil + return ec.resolvers.NewAsset().Symbol(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeSet_demoted(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewAsset_symbol(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeSet", + Object: "NewAsset", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -49935,8 +52611,8 @@ func (ec *executionContext) fieldContext_NodeSet_demoted(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _NodeSet_maximum(ctx context.Context, field graphql.CollectedField, obj *NodeSet) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeSet_maximum(ctx, field) +func (ec *executionContext) _NewAsset_decimals(ctx context.Context, field graphql.CollectedField, obj *vega.NewAsset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewAsset_decimals(ctx, field) if err != nil { return graphql.Null } @@ -49949,26 +52625,29 @@ func (ec *executionContext) _NodeSet_maximum(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Maximum, nil + return ec.resolvers.NewAsset().Decimals(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*int) + res := resTmp.(int) fc.Result = res - return ec.marshalOInt2ᚖint(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeSet_maximum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewAsset_decimals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeSet", + Object: "NewAsset", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type Int does not have child fields") }, @@ -49976,8 +52655,8 @@ func (ec *executionContext) fieldContext_NodeSet_maximum(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _NodeSignature_id(ctx context.Context, field graphql.CollectedField, obj *v11.NodeSignature) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeSignature_id(ctx, field) +func (ec *executionContext) _NewAsset_quantum(ctx context.Context, field graphql.CollectedField, obj *vega.NewAsset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewAsset_quantum(ctx, field) if err != nil { return graphql.Null } @@ -49990,7 +52669,7 @@ func (ec *executionContext) _NodeSignature_id(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return ec.resolvers.NewAsset().Quantum(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50004,24 +52683,24 @@ func (ec *executionContext) _NodeSignature_id(ctx context.Context, field graphql } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeSignature_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewAsset_quantum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeSignature", + Object: "NewAsset", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeSignature_signature(ctx context.Context, field graphql.CollectedField, obj *v11.NodeSignature) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeSignature_signature(ctx, field) +func (ec *executionContext) _NewAsset_source(ctx context.Context, field graphql.CollectedField, obj *vega.NewAsset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewAsset_source(ctx, field) if err != nil { return graphql.Null } @@ -50034,35 +52713,38 @@ func (ec *executionContext) _NodeSignature_signature(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.NodeSignature().Signature(rctx, obj) + return ec.resolvers.NewAsset().Source(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(AssetSource) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNAssetSource2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐAssetSource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeSignature_signature(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewAsset_source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeSignature", + Object: "NewAsset", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type AssetSource does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeSignature_kind(ctx context.Context, field graphql.CollectedField, obj *v11.NodeSignature) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeSignature_kind(ctx, field) +func (ec *executionContext) _NewFreeform__doNotUse(ctx context.Context, field graphql.CollectedField, obj *vega.NewFreeform) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewFreeform__doNotUse(ctx, field) if err != nil { return graphql.Null } @@ -50075,7 +52757,7 @@ func (ec *executionContext) _NodeSignature_kind(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Kind, nil + return ec.resolvers.NewFreeform().DoNotUse(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50084,26 +52766,26 @@ func (ec *executionContext) _NodeSignature_kind(ctx context.Context, field graph if resTmp == nil { return graphql.Null } - res := resTmp.(v11.NodeSignatureKind) + res := resTmp.(*bool) fc.Result = res - return ec.marshalONodeSignatureKind2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋcommandsᚋv1ᚐNodeSignatureKind(ctx, field.Selections, res) + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeSignature_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewFreeform__doNotUse(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeSignature", + Object: "NewFreeform", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type NodeSignatureKind does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeSignatureEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.NodeSignatureEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeSignatureEdge_node(ctx, field) +func (ec *executionContext) _NewMarket_instrument(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_instrument(ctx, field) if err != nil { return graphql.Null } @@ -50116,7 +52798,7 @@ func (ec *executionContext) _NodeSignatureEdge_node(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.NewMarket().Instrument(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50128,34 +52810,36 @@ func (ec *executionContext) _NodeSignatureEdge_node(ctx context.Context, field g } return graphql.Null } - res := resTmp.(*v11.NodeSignature) + res := resTmp.(*vega.InstrumentConfiguration) fc.Result = res - return ec.marshalNNodeSignature2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋcommandsᚋv1ᚐNodeSignature(ctx, field.Selections, res) + return ec.marshalNInstrumentConfiguration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐInstrumentConfiguration(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeSignatureEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewMarket_instrument(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeSignatureEdge", + Object: "NewMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_NodeSignature_id(ctx, field) - case "signature": - return ec.fieldContext_NodeSignature_signature(ctx, field) - case "kind": - return ec.fieldContext_NodeSignature_kind(ctx, field) + case "name": + return ec.fieldContext_InstrumentConfiguration_name(ctx, field) + case "code": + return ec.fieldContext_InstrumentConfiguration_code(ctx, field) + case "futureProduct": + return ec.fieldContext_InstrumentConfiguration_futureProduct(ctx, field) + case "product": + return ec.fieldContext_InstrumentConfiguration_product(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type NodeSignature", field.Name) + return nil, fmt.Errorf("no field named %q was found under type InstrumentConfiguration", field.Name) }, } return fc, nil } -func (ec *executionContext) _NodeSignatureEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.NodeSignatureEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeSignatureEdge_cursor(ctx, field) +func (ec *executionContext) _NewMarket_decimalPlaces(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_decimalPlaces(ctx, field) if err != nil { return graphql.Null } @@ -50168,7 +52852,7 @@ func (ec *executionContext) _NodeSignatureEdge_cursor(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.NewMarket().DecimalPlaces(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50180,26 +52864,26 @@ func (ec *executionContext) _NodeSignatureEdge_cursor(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeSignatureEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewMarket_decimalPlaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeSignatureEdge", + Object: "NewMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeSignaturesConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.NodeSignaturesConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeSignaturesConnection_edges(ctx, field) +func (ec *executionContext) _NewMarket_riskParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_riskParameters(ctx, field) if err != nil { return graphql.Null } @@ -50212,7 +52896,7 @@ func (ec *executionContext) _NodeSignaturesConnection_edges(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.NewMarket().RiskParameters(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50224,32 +52908,26 @@ func (ec *executionContext) _NodeSignaturesConnection_edges(ctx context.Context, } return graphql.Null } - res := resTmp.([]*v2.NodeSignatureEdge) + res := resTmp.(RiskModel) fc.Result = res - return ec.marshalNNodeSignatureEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNodeSignatureEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNRiskModel2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐRiskModel(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeSignaturesConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewMarket_riskParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeSignaturesConnection", + Object: "NewMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_NodeSignatureEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_NodeSignatureEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type NodeSignatureEdge", field.Name) + return nil, errors.New("field of type RiskModel does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodeSignaturesConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.NodeSignaturesConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodeSignaturesConnection_pageInfo(ctx, field) +func (ec *executionContext) _NewMarket_metadata(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_metadata(ctx, field) if err != nil { return graphql.Null } @@ -50262,48 +52940,35 @@ func (ec *executionContext) _NodeSignaturesConnection_pageInfo(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.NewMarket().Metadata(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.([]string) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodeSignaturesConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewMarket_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodeSignaturesConnection", + Object: "NewMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _NodesConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.NodesConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodesConnection_edges(ctx, field) +func (ec *executionContext) _NewMarket_priceMonitoringParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_priceMonitoringParameters(ctx, field) if err != nil { return graphql.Null } @@ -50316,41 +52981,42 @@ func (ec *executionContext) _NodesConnection_edges(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.NewMarket().PriceMonitoringParameters(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.NodeEdge) + res := resTmp.(*PriceMonitoringParameters) fc.Result = res - return ec.marshalONodeEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNodeEdge(ctx, field.Selections, res) + return ec.marshalNPriceMonitoringParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringParameters(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodesConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewMarket_priceMonitoringParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodesConnection", + Object: "NewMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_NodeEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_NodeEdge_cursor(ctx, field) + case "triggers": + return ec.fieldContext_PriceMonitoringParameters_triggers(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type NodeEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringParameters", field.Name) }, } return fc, nil } -func (ec *executionContext) _NodesConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.NodesConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_NodesConnection_pageInfo(ctx, field) +func (ec *executionContext) _NewMarket_liquidityMonitoringParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_liquidityMonitoringParameters(ctx, field) if err != nil { return graphql.Null } @@ -50363,7 +53029,7 @@ func (ec *executionContext) _NodesConnection_pageInfo(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.NewMarket().LiquidityMonitoringParameters(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50375,36 +53041,30 @@ func (ec *executionContext) _NodesConnection_pageInfo(ctx context.Context, field } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(*LiquidityMonitoringParameters) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNLiquidityMonitoringParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐLiquidityMonitoringParameters(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NodesConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewMarket_liquidityMonitoringParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "NodesConnection", + Object: "NewMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "targetStakeParameters": + return ec.fieldContext_LiquidityMonitoringParameters_targetStakeParameters(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidityMonitoringParameters", field.Name) }, } return fc, nil } -func (ec *executionContext) _Normaliser_name(ctx context.Context, field graphql.CollectedField, obj *Normaliser) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Normaliser_name(ctx, field) +func (ec *executionContext) _NewMarket_positionDecimalPlaces(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_positionDecimalPlaces(ctx, field) if err != nil { return graphql.Null } @@ -50417,7 +53077,7 @@ func (ec *executionContext) _Normaliser_name(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return ec.resolvers.NewMarket().PositionDecimalPlaces(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50429,26 +53089,26 @@ func (ec *executionContext) _Normaliser_name(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Normaliser_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewMarket_positionDecimalPlaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Normaliser", + Object: "NewMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Normaliser_expression(ctx context.Context, field graphql.CollectedField, obj *Normaliser) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Normaliser_expression(ctx, field) +func (ec *executionContext) _NewMarket_linearSlippageFactor(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_linearSlippageFactor(ctx, field) if err != nil { return graphql.Null } @@ -50461,7 +53121,7 @@ func (ec *executionContext) _Normaliser_expression(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Expression, nil + return ec.resolvers.NewMarket().LinearSlippageFactor(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50478,12 +53138,12 @@ func (ec *executionContext) _Normaliser_expression(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Normaliser_expression(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewMarket_linearSlippageFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Normaliser", + Object: "NewMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -50491,8 +53151,8 @@ func (ec *executionContext) fieldContext_Normaliser_expression(ctx context.Conte return fc, nil } -func (ec *executionContext) _ObservableLiquidityProviderFeeShare_partyId(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderFeeShare) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableLiquidityProviderFeeShare_partyId(ctx, field) +func (ec *executionContext) _NewMarket_quadraticSlippageFactor(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_quadraticSlippageFactor(ctx, field) if err != nil { return graphql.Null } @@ -50505,7 +53165,7 @@ func (ec *executionContext) _ObservableLiquidityProviderFeeShare_partyId(ctx con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PartyID, nil + return ec.resolvers.NewMarket().QuadraticSlippageFactor(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50519,24 +53179,24 @@ func (ec *executionContext) _ObservableLiquidityProviderFeeShare_partyId(ctx con } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableLiquidityProviderFeeShare_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewMarket_quadraticSlippageFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableLiquidityProviderFeeShare", + Object: "NewMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableLiquidityProviderFeeShare_equityLikeShare(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderFeeShare) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableLiquidityProviderFeeShare_equityLikeShare(ctx, field) +func (ec *executionContext) _NewMarket_successorConfiguration(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_successorConfiguration(ctx, field) if err != nil { return graphql.Null } @@ -50549,38 +53209,41 @@ func (ec *executionContext) _ObservableLiquidityProviderFeeShare_equityLikeShare }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EquityLikeShare, nil + return ec.resolvers.NewMarket().SuccessorConfiguration(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.SuccessorConfiguration) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOSuccessorConfiguration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐSuccessorConfiguration(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableLiquidityProviderFeeShare_equityLikeShare(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewMarket_successorConfiguration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableLiquidityProviderFeeShare", + Object: "NewMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "parentMarketId": + return ec.fieldContext_SuccessorConfiguration_parentMarketId(ctx, field) + case "insurancePoolFraction": + return ec.fieldContext_SuccessorConfiguration_insurancePoolFraction(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SuccessorConfiguration", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableLiquidityProviderFeeShare_averageEntryValuation(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderFeeShare) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableLiquidityProviderFeeShare_averageEntryValuation(ctx, field) +func (ec *executionContext) _NewMarket_liquiditySLAParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_liquiditySLAParameters(ctx, field) if err != nil { return graphql.Null } @@ -50593,38 +53256,45 @@ func (ec *executionContext) _ObservableLiquidityProviderFeeShare_averageEntryVal }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AverageEntryValuation, nil + return ec.resolvers.NewMarket().LiquiditySLAParameters(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.LiquiditySLAParameters) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOLiquiditySLAParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquiditySLAParameters(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableLiquidityProviderFeeShare_averageEntryValuation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewMarket_liquiditySLAParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableLiquidityProviderFeeShare", + Object: "NewMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "priceRange": + return ec.fieldContext_LiquiditySLAParameters_priceRange(ctx, field) + case "commitmentMinTimeFraction": + return ec.fieldContext_LiquiditySLAParameters_commitmentMinTimeFraction(ctx, field) + case "performanceHysteresisEpochs": + return ec.fieldContext_LiquiditySLAParameters_performanceHysteresisEpochs(ctx, field) + case "slaCompetitionFactor": + return ec.fieldContext_LiquiditySLAParameters_slaCompetitionFactor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquiditySLAParameters", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableLiquidityProviderFeeShare_averageScore(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderFeeShare) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableLiquidityProviderFeeShare_averageScore(ctx, field) +func (ec *executionContext) _NewMarket_liquidityFeeSettings(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_liquidityFeeSettings(ctx, field) if err != nil { return graphql.Null } @@ -50637,38 +53307,92 @@ func (ec *executionContext) _ObservableLiquidityProviderFeeShare_averageScore(ct }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AverageScore, nil + return ec.resolvers.NewMarket().LiquidityFeeSettings(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") + return graphql.Null + } + res := resTmp.(*vega.LiquidityFeeSettings) + fc.Result = res + return ec.marshalOLiquidityFeeSettings2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityFeeSettings(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_NewMarket_liquidityFeeSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "NewMarket", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "method": + return ec.fieldContext_LiquidityFeeSettings_method(ctx, field) + case "feeConstant": + return ec.fieldContext_LiquidityFeeSettings_feeConstant(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityFeeSettings", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _NewMarket_liquidationStrategy(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_liquidationStrategy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.NewMarket().LiquidationStrategy(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) return graphql.Null } - res := resTmp.(string) + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*vega.LiquidationStrategy) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOLiquidationStrategy2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidationStrategy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableLiquidityProviderFeeShare_averageScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewMarket_liquidationStrategy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableLiquidityProviderFeeShare", + Object: "NewMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "disposalTimeStep": + return ec.fieldContext_LiquidationStrategy_disposalTimeStep(ctx, field) + case "disposalFraction": + return ec.fieldContext_LiquidationStrategy_disposalFraction(ctx, field) + case "fullDisposalSize": + return ec.fieldContext_LiquidationStrategy_fullDisposalSize(ctx, field) + case "maxFractionConsumed": + return ec.fieldContext_LiquidationStrategy_maxFractionConsumed(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidationStrategy", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableLiquidityProviderSLA_party(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_party(ctx, field) +func (ec *executionContext) _NewMarket_markPriceConfiguration(ctx context.Context, field graphql.CollectedField, obj *vega.NewMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewMarket_markPriceConfiguration(ctx, field) if err != nil { return graphql.Null } @@ -50681,7 +53405,7 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_party(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Party, nil + return ec.resolvers.NewMarket().MarkPriceConfiguration(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50693,26 +53417,44 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_party(ctx context.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.CompositePriceConfiguration) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNCompositePriceConfiguration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceConfiguration(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewMarket_markPriceConfiguration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableLiquidityProviderSLA", + Object: "NewMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "decayWeight": + return ec.fieldContext_CompositePriceConfiguration_decayWeight(ctx, field) + case "decayPower": + return ec.fieldContext_CompositePriceConfiguration_decayPower(ctx, field) + case "cashAmount": + return ec.fieldContext_CompositePriceConfiguration_cashAmount(ctx, field) + case "SourceWeights": + return ec.fieldContext_CompositePriceConfiguration_SourceWeights(ctx, field) + case "SourceStalenessTolerance": + return ec.fieldContext_CompositePriceConfiguration_SourceStalenessTolerance(ctx, field) + case "CompositePriceType": + return ec.fieldContext_CompositePriceConfiguration_CompositePriceType(ctx, field) + case "dataSourcesSpec": + return ec.fieldContext_CompositePriceConfiguration_dataSourcesSpec(ctx, field) + case "dataSourcesSpecBinding": + return ec.fieldContext_CompositePriceConfiguration_dataSourcesSpecBinding(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CompositePriceConfiguration", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableLiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx, field) +func (ec *executionContext) _NewSpotMarket_instrument(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewSpotMarket_instrument(ctx, field) if err != nil { return graphql.Null } @@ -50725,7 +53467,7 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_currentEpochFraction }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CurrentEpochFractionOfTimeOnBook, nil + return ec.resolvers.NewSpotMarket().Instrument(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50737,26 +53479,36 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_currentEpochFraction } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.InstrumentConfiguration) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInstrumentConfiguration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐInstrumentConfiguration(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewSpotMarket_instrument(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableLiquidityProviderSLA", + Object: "NewSpotMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "name": + return ec.fieldContext_InstrumentConfiguration_name(ctx, field) + case "code": + return ec.fieldContext_InstrumentConfiguration_code(ctx, field) + case "futureProduct": + return ec.fieldContext_InstrumentConfiguration_futureProduct(ctx, field) + case "product": + return ec.fieldContext_InstrumentConfiguration_product(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type InstrumentConfiguration", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableLiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx, field) +func (ec *executionContext) _NewSpotMarket_decimal_places(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewSpotMarket_decimal_places(ctx, field) if err != nil { return graphql.Null } @@ -50769,7 +53521,7 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_lastEpochFractionOfT }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LastEpochFractionOfTimeOnBook, nil + return ec.resolvers.NewSpotMarket().DecimalPlaces(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50781,26 +53533,26 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_lastEpochFractionOfT } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewSpotMarket_decimal_places(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableLiquidityProviderSLA", + Object: "NewSpotMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableLiquidityProviderSLA_lastEpochFeePenalty(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_lastEpochFeePenalty(ctx, field) +func (ec *executionContext) _NewSpotMarket_metadata(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewSpotMarket_metadata(ctx, field) if err != nil { return graphql.Null } @@ -50813,7 +53565,7 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_lastEpochFeePenalty( }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LastEpochFeePenalty, nil + return ec.resolvers.NewSpotMarket().Metadata(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50825,17 +53577,17 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_lastEpochFeePenalty( } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_lastEpochFeePenalty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewSpotMarket_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableLiquidityProviderSLA", + Object: "NewSpotMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -50843,8 +53595,8 @@ func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_lastEpoc return fc, nil } -func (ec *executionContext) _ObservableLiquidityProviderSLA_lastEpochBondPenalty(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_lastEpochBondPenalty(ctx, field) +func (ec *executionContext) _NewSpotMarket_priceMonitoringParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewSpotMarket_priceMonitoringParameters(ctx, field) if err != nil { return graphql.Null } @@ -50857,7 +53609,7 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_lastEpochBondPenalty }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LastEpochBondPenalty, nil + return ec.resolvers.NewSpotMarket().PriceMonitoringParameters(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50869,26 +53621,30 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_lastEpochBondPenalty } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*PriceMonitoringParameters) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPriceMonitoringParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringParameters(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_lastEpochBondPenalty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewSpotMarket_priceMonitoringParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableLiquidityProviderSLA", + Object: "NewSpotMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "triggers": + return ec.fieldContext_PriceMonitoringParameters_triggers(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringParameters", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableLiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx, field) +func (ec *executionContext) _NewSpotMarket_targetStakeParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewSpotMarket_targetStakeParameters(ctx, field) if err != nil { return graphql.Null } @@ -50901,35 +53657,44 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_hysteresisPeriodFeeP }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HysteresisPeriodFeePenalties, nil + return ec.resolvers.NewSpotMarket().TargetStakeParameters(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]string) + res := resTmp.(*TargetStakeParameters) fc.Result = res - return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNTargetStakeParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTargetStakeParameters(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewSpotMarket_targetStakeParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableLiquidityProviderSLA", + Object: "NewSpotMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "timeWindow": + return ec.fieldContext_TargetStakeParameters_timeWindow(ctx, field) + case "scalingFactor": + return ec.fieldContext_TargetStakeParameters_scalingFactor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TargetStakeParameters", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableLiquidityProviderSLA_requiredLiquidity(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_requiredLiquidity(ctx, field) +func (ec *executionContext) _NewSpotMarket_riskParameters(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewSpotMarket_riskParameters(ctx, field) if err != nil { return graphql.Null } @@ -50942,38 +53707,35 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_requiredLiquidity(ct }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RequiredLiquidity, nil + return ec.resolvers.NewSpotMarket().RiskParameters(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(RiskModel) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalORiskModel2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐRiskModel(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_requiredLiquidity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewSpotMarket_riskParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableLiquidityProviderSLA", + Object: "NewSpotMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type RiskModel does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableLiquidityProviderSLA_notionalVolumeBuys(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_notionalVolumeBuys(ctx, field) +func (ec *executionContext) _NewSpotMarket_positionDecimalPlaces(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewSpotMarket_positionDecimalPlaces(ctx, field) if err != nil { return graphql.Null } @@ -50986,7 +53748,7 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_notionalVolumeBuys(c }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NotionalVolumeBuys, nil + return ec.resolvers.NewSpotMarket().PositionDecimalPlaces(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -50998,26 +53760,26 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_notionalVolumeBuys(c } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_notionalVolumeBuys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewSpotMarket_positionDecimalPlaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableLiquidityProviderSLA", + Object: "NewSpotMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableLiquidityProviderSLA_notionalVolumeSells(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_notionalVolumeSells(ctx, field) +func (ec *executionContext) _NewSpotMarket_liquiditySLAParams(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewSpotMarket_liquiditySLAParams(ctx, field) if err != nil { return graphql.Null } @@ -51030,7 +53792,7 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_notionalVolumeSells( }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NotionalVolumeSells, nil + return ec.resolvers.NewSpotMarket().LiquiditySLAParams(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -51042,26 +53804,36 @@ func (ec *executionContext) _ObservableLiquidityProviderSLA_notionalVolumeSells( } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.LiquiditySLAParameters) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNLiquiditySLAParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquiditySLAParameters(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_notionalVolumeSells(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewSpotMarket_liquiditySLAParams(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableLiquidityProviderSLA", + Object: "NewSpotMarket", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "priceRange": + return ec.fieldContext_LiquiditySLAParameters_priceRange(ctx, field) + case "commitmentMinTimeFraction": + return ec.fieldContext_LiquiditySLAParameters_commitmentMinTimeFraction(ctx, field) + case "performanceHysteresisEpochs": + return ec.fieldContext_LiquiditySLAParameters_performanceHysteresisEpochs(ctx, field) + case "slaCompetitionFactor": + return ec.fieldContext_LiquiditySLAParameters_slaCompetitionFactor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquiditySLAParameters", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_marketId(ctx, field) +func (ec *executionContext) _NewSpotMarket_liquidityFeeSettings(ctx context.Context, field graphql.CollectedField, obj *vega.NewSpotMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewSpotMarket_liquidityFeeSettings(ctx, field) if err != nil { return graphql.Null } @@ -51074,38 +53846,41 @@ func (ec *executionContext) _ObservableMarketData_marketId(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().MarketID(rctx, obj) + return ec.resolvers.NewSpotMarket().LiquidityFeeSettings(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.LiquidityFeeSettings) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOLiquidityFeeSettings2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityFeeSettings(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewSpotMarket_liquidityFeeSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NewSpotMarket", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "method": + return ec.fieldContext_LiquidityFeeSettings_method(ctx, field) + case "feeConstant": + return ec.fieldContext_LiquidityFeeSettings_feeConstant(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityFeeSettings", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_markPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_markPrice(ctx, field) +func (ec *executionContext) _NewTransfer_source(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewTransfer_source(ctx, field) if err != nil { return graphql.Null } @@ -51118,7 +53893,7 @@ func (ec *executionContext) _ObservableMarketData_markPrice(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarkPrice, nil + return ec.resolvers.NewTransfer().Source(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -51135,12 +53910,12 @@ func (ec *executionContext) _ObservableMarketData_markPrice(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_markPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewTransfer_source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NewTransfer", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -51148,8 +53923,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_markPrice(ctx cont return fc, nil } -func (ec *executionContext) _ObservableMarketData_bestBidPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_bestBidPrice(ctx, field) +func (ec *executionContext) _NewTransfer_sourceType(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewTransfer_sourceType(ctx, field) if err != nil { return graphql.Null } @@ -51162,7 +53937,7 @@ func (ec *executionContext) _ObservableMarketData_bestBidPrice(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BestBidPrice, nil + return ec.resolvers.NewTransfer().SourceType(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -51174,26 +53949,26 @@ func (ec *executionContext) _ObservableMarketData_bestBidPrice(ctx context.Conte } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.AccountType) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_bestBidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewTransfer_sourceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NewTransfer", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type AccountType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_bestBidVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_bestBidVolume(ctx, field) +func (ec *executionContext) _NewTransfer_destination(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewTransfer_destination(ctx, field) if err != nil { return graphql.Null } @@ -51206,7 +53981,7 @@ func (ec *executionContext) _ObservableMarketData_bestBidVolume(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().BestBidVolume(rctx, obj) + return ec.resolvers.NewTransfer().Destination(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -51223,9 +53998,9 @@ func (ec *executionContext) _ObservableMarketData_bestBidVolume(ctx context.Cont return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_bestBidVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewTransfer_destination(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NewTransfer", Field: field, IsMethod: true, IsResolver: true, @@ -51236,8 +54011,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_bestBidVolume(ctx return fc, nil } -func (ec *executionContext) _ObservableMarketData_bestOfferPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_bestOfferPrice(ctx, field) +func (ec *executionContext) _NewTransfer_destinationType(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewTransfer_destinationType(ctx, field) if err != nil { return graphql.Null } @@ -51250,7 +54025,7 @@ func (ec *executionContext) _ObservableMarketData_bestOfferPrice(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BestOfferPrice, nil + return ec.resolvers.NewTransfer().DestinationType(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -51262,26 +54037,26 @@ func (ec *executionContext) _ObservableMarketData_bestOfferPrice(ctx context.Con } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.AccountType) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_bestOfferPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewTransfer_destinationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NewTransfer", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type AccountType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_bestOfferVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_bestOfferVolume(ctx, field) +func (ec *executionContext) _NewTransfer_asset(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewTransfer_asset(ctx, field) if err != nil { return graphql.Null } @@ -51294,7 +54069,7 @@ func (ec *executionContext) _ObservableMarketData_bestOfferVolume(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().BestOfferVolume(rctx, obj) + return ec.resolvers.NewTransfer().Asset(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -51306,26 +54081,58 @@ func (ec *executionContext) _ObservableMarketData_bestOfferVolume(ctx context.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Asset) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_bestOfferVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewTransfer_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NewTransfer", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_bestStaticBidPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_bestStaticBidPrice(ctx, field) +func (ec *executionContext) _NewTransfer_fraction_of_balance(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewTransfer_fraction_of_balance(ctx, field) if err != nil { return graphql.Null } @@ -51338,7 +54145,7 @@ func (ec *executionContext) _ObservableMarketData_bestStaticBidPrice(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BestStaticBidPrice, nil + return ec.resolvers.NewTransfer().FractionOfBalance(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -51355,12 +54162,12 @@ func (ec *executionContext) _ObservableMarketData_bestStaticBidPrice(ctx context return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_bestStaticBidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewTransfer_fraction_of_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NewTransfer", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -51368,8 +54175,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_bestStaticBidPrice return fc, nil } -func (ec *executionContext) _ObservableMarketData_bestStaticBidVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_bestStaticBidVolume(ctx, field) +func (ec *executionContext) _NewTransfer_amount(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewTransfer_amount(ctx, field) if err != nil { return graphql.Null } @@ -51382,7 +54189,7 @@ func (ec *executionContext) _ObservableMarketData_bestStaticBidVolume(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().BestStaticBidVolume(rctx, obj) + return ec.resolvers.NewTransfer().Amount(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -51399,9 +54206,9 @@ func (ec *executionContext) _ObservableMarketData_bestStaticBidVolume(ctx contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_bestStaticBidVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewTransfer_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NewTransfer", Field: field, IsMethod: true, IsResolver: true, @@ -51412,8 +54219,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_bestStaticBidVolum return fc, nil } -func (ec *executionContext) _ObservableMarketData_bestStaticOfferPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_bestStaticOfferPrice(ctx, field) +func (ec *executionContext) _NewTransfer_transferType(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewTransfer_transferType(ctx, field) if err != nil { return graphql.Null } @@ -51426,7 +54233,7 @@ func (ec *executionContext) _ObservableMarketData_bestStaticOfferPrice(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BestStaticOfferPrice, nil + return ec.resolvers.NewTransfer().TransferType(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -51438,26 +54245,26 @@ func (ec *executionContext) _ObservableMarketData_bestStaticOfferPrice(ctx conte } return graphql.Null } - res := resTmp.(string) + res := resTmp.(GovernanceTransferType) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNGovernanceTransferType2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐGovernanceTransferType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_bestStaticOfferPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewTransfer_transferType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NewTransfer", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type GovernanceTransferType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_bestStaticOfferVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_bestStaticOfferVolume(ctx, field) +func (ec *executionContext) _NewTransfer_kind(ctx context.Context, field graphql.CollectedField, obj *vega.NewTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NewTransfer_kind(ctx, field) if err != nil { return graphql.Null } @@ -51470,7 +54277,7 @@ func (ec *executionContext) _ObservableMarketData_bestStaticOfferVolume(ctx cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().BestStaticOfferVolume(rctx, obj) + return ec.resolvers.NewTransfer().Kind(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -51482,26 +54289,26 @@ func (ec *executionContext) _ObservableMarketData_bestStaticOfferVolume(ctx cont } return graphql.Null } - res := resTmp.(string) + res := resTmp.(GovernanceTransferKind) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNGovernanceTransferKind2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐGovernanceTransferKind(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_bestStaticOfferVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewTransfer_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NewTransfer", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type GovernanceTransferKind does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_midPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_midPrice(ctx, field) +func (ec *executionContext) _Node_id(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_id(ctx, field) if err != nil { return graphql.Null } @@ -51514,7 +54321,7 @@ func (ec *executionContext) _ObservableMarketData_midPrice(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MidPrice, nil + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) @@ -51528,24 +54335,24 @@ func (ec *executionContext) _ObservableMarketData_midPrice(ctx context.Context, } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_midPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_staticMidPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_staticMidPrice(ctx, field) +func (ec *executionContext) _Node_pubkey(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_pubkey(ctx, field) if err != nil { return graphql.Null } @@ -51558,7 +54365,7 @@ func (ec *executionContext) _ObservableMarketData_staticMidPrice(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.StaticMidPrice, nil + return obj.PubKey, nil }) if err != nil { ec.Error(ctx, err) @@ -51575,9 +54382,9 @@ func (ec *executionContext) _ObservableMarketData_staticMidPrice(ctx context.Con return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_staticMidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_pubkey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, IsMethod: false, IsResolver: false, @@ -51588,8 +54395,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_staticMidPrice(ctx return fc, nil } -func (ec *executionContext) _ObservableMarketData_timestamp(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_timestamp(ctx, field) +func (ec *executionContext) _Node_tmPubkey(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_tmPubkey(ctx, field) if err != nil { return graphql.Null } @@ -51602,7 +54409,7 @@ func (ec *executionContext) _ObservableMarketData_timestamp(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Timestamp, nil + return obj.TmPubKey, nil }) if err != nil { ec.Error(ctx, err) @@ -51614,26 +54421,26 @@ func (ec *executionContext) _ObservableMarketData_timestamp(ctx context.Context, } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_tmPubkey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_openInterest(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_openInterest(ctx, field) +func (ec *executionContext) _Node_ethereumAddress(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_ethereumAddress(ctx, field) if err != nil { return graphql.Null } @@ -51646,7 +54453,7 @@ func (ec *executionContext) _ObservableMarketData_openInterest(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().OpenInterest(rctx, obj) + return obj.EthereumAddress, nil }) if err != nil { ec.Error(ctx, err) @@ -51663,12 +54470,12 @@ func (ec *executionContext) _ObservableMarketData_openInterest(ctx context.Conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_openInterest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_ethereumAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -51676,8 +54483,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_openInterest(ctx c return fc, nil } -func (ec *executionContext) _ObservableMarketData_auctionEnd(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_auctionEnd(ctx, field) +func (ec *executionContext) _Node_infoUrl(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_infoUrl(ctx, field) if err != nil { return graphql.Null } @@ -51690,26 +54497,29 @@ func (ec *executionContext) _ObservableMarketData_auctionEnd(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().AuctionEnd(rctx, obj) + return obj.InfoUrl, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_auctionEnd(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_infoUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -51717,8 +54527,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_auctionEnd(ctx con return fc, nil } -func (ec *executionContext) _ObservableMarketData_auctionStart(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_auctionStart(ctx, field) +func (ec *executionContext) _Node_location(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_location(ctx, field) if err != nil { return graphql.Null } @@ -51731,26 +54541,29 @@ func (ec *executionContext) _ObservableMarketData_auctionStart(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().AuctionStart(rctx, obj) + return obj.Location, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_auctionStart(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_location(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -51758,8 +54571,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_auctionStart(ctx c return fc, nil } -func (ec *executionContext) _ObservableMarketData_indicativePrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_indicativePrice(ctx, field) +func (ec *executionContext) _Node_stakedByOperator(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_stakedByOperator(ctx, field) if err != nil { return graphql.Null } @@ -51772,7 +54585,7 @@ func (ec *executionContext) _ObservableMarketData_indicativePrice(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IndicativePrice, nil + return obj.StakedByOperator, nil }) if err != nil { ec.Error(ctx, err) @@ -51789,9 +54602,9 @@ func (ec *executionContext) _ObservableMarketData_indicativePrice(ctx context.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_indicativePrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_stakedByOperator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, IsMethod: false, IsResolver: false, @@ -51802,8 +54615,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_indicativePrice(ct return fc, nil } -func (ec *executionContext) _ObservableMarketData_indicativeVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_indicativeVolume(ctx, field) +func (ec *executionContext) _Node_stakedByDelegates(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_stakedByDelegates(ctx, field) if err != nil { return graphql.Null } @@ -51816,7 +54629,7 @@ func (ec *executionContext) _ObservableMarketData_indicativeVolume(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().IndicativeVolume(rctx, obj) + return obj.StakedByDelegates, nil }) if err != nil { ec.Error(ctx, err) @@ -51833,12 +54646,12 @@ func (ec *executionContext) _ObservableMarketData_indicativeVolume(ctx context.C return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_indicativeVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_stakedByDelegates(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -51846,8 +54659,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_indicativeVolume(c return fc, nil } -func (ec *executionContext) _ObservableMarketData_marketTradingMode(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_marketTradingMode(ctx, field) +func (ec *executionContext) _Node_stakedTotal(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_stakedTotal(ctx, field) if err != nil { return graphql.Null } @@ -51860,7 +54673,7 @@ func (ec *executionContext) _ObservableMarketData_marketTradingMode(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketTradingMode, nil + return obj.StakedTotal, nil }) if err != nil { ec.Error(ctx, err) @@ -51872,26 +54685,26 @@ func (ec *executionContext) _ObservableMarketData_marketTradingMode(ctx context. } return graphql.Null } - res := resTmp.(vega.Market_TradingMode) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarketTradingMode2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket_TradingMode(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_marketTradingMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_stakedTotal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type MarketTradingMode does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_marketState(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_marketState(ctx, field) +func (ec *executionContext) _Node_pendingStake(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_pendingStake(ctx, field) if err != nil { return graphql.Null } @@ -51904,7 +54717,7 @@ func (ec *executionContext) _ObservableMarketData_marketState(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketState, nil + return obj.PendingStake, nil }) if err != nil { ec.Error(ctx, err) @@ -51916,26 +54729,26 @@ func (ec *executionContext) _ObservableMarketData_marketState(ctx context.Contex } return graphql.Null } - res := resTmp.(vega.Market_State) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarketState2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket_State(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_marketState(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_pendingStake(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type MarketState does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_trigger(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_trigger(ctx, field) +func (ec *executionContext) _Node_epochData(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_epochData(ctx, field) if err != nil { return graphql.Null } @@ -51948,38 +54761,43 @@ func (ec *executionContext) _ObservableMarketData_trigger(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Trigger, nil + return obj.EpochData, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(vega.AuctionTrigger) + res := resTmp.(*vega.EpochData) fc.Result = res - return ec.marshalNAuctionTrigger2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAuctionTrigger(ctx, field.Selections, res) + return ec.marshalOEpochData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpochData(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_epochData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type AuctionTrigger does not have child fields") + switch field.Name { + case "total": + return ec.fieldContext_EpochData_total(ctx, field) + case "offline": + return ec.fieldContext_EpochData_offline(ctx, field) + case "online": + return ec.fieldContext_EpochData_online(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type EpochData", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_extensionTrigger(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_extensionTrigger(ctx, field) +func (ec *executionContext) _Node_status(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_status(ctx, field) if err != nil { return graphql.Null } @@ -51992,7 +54810,7 @@ func (ec *executionContext) _ObservableMarketData_extensionTrigger(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ExtensionTrigger, nil + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) @@ -52004,26 +54822,26 @@ func (ec *executionContext) _ObservableMarketData_extensionTrigger(ctx context.C } return graphql.Null } - res := resTmp.(vega.AuctionTrigger) + res := resTmp.(vega.NodeStatus) fc.Result = res - return ec.marshalNAuctionTrigger2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAuctionTrigger(ctx, field.Selections, res) + return ec.marshalNNodeStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNodeStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_extensionTrigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type AuctionTrigger does not have child fields") + return nil, errors.New("field of type NodeStatus does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_targetStake(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_targetStake(ctx, field) +func (ec *executionContext) _Node_delegationsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_delegationsConnection(ctx, field) if err != nil { return graphql.Null } @@ -52036,7 +54854,7 @@ func (ec *executionContext) _ObservableMarketData_targetStake(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TargetStake, nil + return ec.resolvers.Node().DelegationsConnection(rctx, obj, fc.Args["partyId"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -52045,26 +54863,43 @@ func (ec *executionContext) _ObservableMarketData_targetStake(ctx context.Contex if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.DelegationsConnection) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalODelegationsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDelegationsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_targetStake(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_delegationsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_DelegationsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_DelegationsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DelegationsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Node_delegationsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ObservableMarketData_suppliedStake(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_suppliedStake(ctx, field) +func (ec *executionContext) _Node_rewardScore(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_rewardScore(ctx, field) if err != nil { return graphql.Null } @@ -52077,7 +54912,7 @@ func (ec *executionContext) _ObservableMarketData_suppliedStake(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SuppliedStake, nil + return obj.RewardScore, nil }) if err != nil { ec.Error(ctx, err) @@ -52086,26 +54921,40 @@ func (ec *executionContext) _ObservableMarketData_suppliedStake(ctx context.Cont if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.RewardScore) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalORewardScore2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐRewardScore(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_suppliedStake(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_rewardScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "rawValidatorScore": + return ec.fieldContext_RewardScore_rawValidatorScore(ctx, field) + case "performanceScore": + return ec.fieldContext_RewardScore_performanceScore(ctx, field) + case "multisigScore": + return ec.fieldContext_RewardScore_multisigScore(ctx, field) + case "validatorScore": + return ec.fieldContext_RewardScore_validatorScore(ctx, field) + case "normalisedScore": + return ec.fieldContext_RewardScore_normalisedScore(ctx, field) + case "validatorStatus": + return ec.fieldContext_RewardScore_validatorStatus(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type RewardScore", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_priceMonitoringBounds(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_priceMonitoringBounds(ctx, field) +func (ec *executionContext) _Node_rankingScore(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_rankingScore(ctx, field) if err != nil { return graphql.Null } @@ -52118,45 +54967,52 @@ func (ec *executionContext) _ObservableMarketData_priceMonitoringBounds(ctx cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().PriceMonitoringBounds(rctx, obj) + return obj.RankingScore, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*PriceMonitoringBounds) + res := resTmp.(*vega.RankingScore) fc.Result = res - return ec.marshalOPriceMonitoringBounds2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringBoundsᚄ(ctx, field.Selections, res) + return ec.marshalNRankingScore2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐRankingScore(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_priceMonitoringBounds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_rankingScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "minValidPrice": - return ec.fieldContext_PriceMonitoringBounds_minValidPrice(ctx, field) - case "maxValidPrice": - return ec.fieldContext_PriceMonitoringBounds_maxValidPrice(ctx, field) - case "trigger": - return ec.fieldContext_PriceMonitoringBounds_trigger(ctx, field) - case "referencePrice": - return ec.fieldContext_PriceMonitoringBounds_referencePrice(ctx, field) + case "status": + return ec.fieldContext_RankingScore_status(ctx, field) + case "previousStatus": + return ec.fieldContext_RankingScore_previousStatus(ctx, field) + case "rankingScore": + return ec.fieldContext_RankingScore_rankingScore(ctx, field) + case "stakeScore": + return ec.fieldContext_RankingScore_stakeScore(ctx, field) + case "performanceScore": + return ec.fieldContext_RankingScore_performanceScore(ctx, field) + case "votingPower": + return ec.fieldContext_RankingScore_votingPower(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringBounds", field.Name) + return nil, fmt.Errorf("no field named %q was found under type RankingScore", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_marketValueProxy(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_marketValueProxy(ctx, field) +func (ec *executionContext) _Node_name(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_name(ctx, field) if err != nil { return graphql.Null } @@ -52169,7 +55025,7 @@ func (ec *executionContext) _ObservableMarketData_marketValueProxy(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketValueProxy, nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -52186,9 +55042,9 @@ func (ec *executionContext) _ObservableMarketData_marketValueProxy(ctx context.C return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_marketValueProxy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, IsMethod: false, IsResolver: false, @@ -52199,8 +55055,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_marketValueProxy(c return fc, nil } -func (ec *executionContext) _ObservableMarketData_liquidityProviderFeeShare(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_liquidityProviderFeeShare(ctx, field) +func (ec *executionContext) _Node_avatarUrl(ctx context.Context, field graphql.CollectedField, obj *vega.Node) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Node_avatarUrl(ctx, field) if err != nil { return graphql.Null } @@ -52213,7 +55069,7 @@ func (ec *executionContext) _ObservableMarketData_liquidityProviderFeeShare(ctx }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().LiquidityProviderFeeShare(rctx, obj) + return obj.AvatarUrl, nil }) if err != nil { ec.Error(ctx, err) @@ -52222,36 +55078,26 @@ func (ec *executionContext) _ObservableMarketData_liquidityProviderFeeShare(ctx if resTmp == nil { return graphql.Null } - res := resTmp.([]*ObservableLiquidityProviderFeeShare) + res := resTmp.(string) fc.Result = res - return ec.marshalOObservableLiquidityProviderFeeShare2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐObservableLiquidityProviderFeeShareᚄ(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_liquidityProviderFeeShare(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Node_avatarUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "Node", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "partyId": - return ec.fieldContext_ObservableLiquidityProviderFeeShare_partyId(ctx, field) - case "equityLikeShare": - return ec.fieldContext_ObservableLiquidityProviderFeeShare_equityLikeShare(ctx, field) - case "averageEntryValuation": - return ec.fieldContext_ObservableLiquidityProviderFeeShare_averageEntryValuation(ctx, field) - case "averageScore": - return ec.fieldContext_ObservableLiquidityProviderFeeShare_averageScore(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ObservableLiquidityProviderFeeShare", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_liquidityProviderSla(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_liquidityProviderSla(ctx, field) +func (ec *executionContext) _NodeBasic_id(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeBasic_id(ctx, field) if err != nil { return graphql.Null } @@ -52264,55 +55110,38 @@ func (ec *executionContext) _ObservableMarketData_liquidityProviderSla(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().LiquidityProviderSLA(rctx, obj) + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*ObservableLiquidityProviderSLA) + res := resTmp.(string) fc.Result = res - return ec.marshalOObservableLiquidityProviderSLA2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐObservableLiquidityProviderSLAᚄ(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_liquidityProviderSla(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeBasic_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NodeBasic", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "party": - return ec.fieldContext_ObservableLiquidityProviderSLA_party(ctx, field) - case "currentEpochFractionOfTimeOnBook": - return ec.fieldContext_ObservableLiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx, field) - case "lastEpochFractionOfTimeOnBook": - return ec.fieldContext_ObservableLiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx, field) - case "lastEpochFeePenalty": - return ec.fieldContext_ObservableLiquidityProviderSLA_lastEpochFeePenalty(ctx, field) - case "lastEpochBondPenalty": - return ec.fieldContext_ObservableLiquidityProviderSLA_lastEpochBondPenalty(ctx, field) - case "hysteresisPeriodFeePenalties": - return ec.fieldContext_ObservableLiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx, field) - case "requiredLiquidity": - return ec.fieldContext_ObservableLiquidityProviderSLA_requiredLiquidity(ctx, field) - case "notionalVolumeBuys": - return ec.fieldContext_ObservableLiquidityProviderSLA_notionalVolumeBuys(ctx, field) - case "notionalVolumeSells": - return ec.fieldContext_ObservableLiquidityProviderSLA_notionalVolumeSells(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ObservableLiquidityProviderSLA", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketData_nextMarkToMarket(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_nextMarkToMarket(ctx, field) +func (ec *executionContext) _NodeBasic_pubkey(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeBasic_pubkey(ctx, field) if err != nil { return graphql.Null } @@ -52325,7 +55154,7 @@ func (ec *executionContext) _ObservableMarketData_nextMarkToMarket(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().NextMarkToMarket(rctx, obj) + return obj.PubKey, nil }) if err != nil { ec.Error(ctx, err) @@ -52342,12 +55171,12 @@ func (ec *executionContext) _ObservableMarketData_nextMarkToMarket(ctx context.C return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_nextMarkToMarket(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeBasic_pubkey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NodeBasic", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -52355,8 +55184,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_nextMarkToMarket(c return fc, nil } -func (ec *executionContext) _ObservableMarketData_marketGrowth(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_marketGrowth(ctx, field) +func (ec *executionContext) _NodeBasic_tmPubkey(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeBasic_tmPubkey(ctx, field) if err != nil { return graphql.Null } @@ -52369,7 +55198,7 @@ func (ec *executionContext) _ObservableMarketData_marketGrowth(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketGrowth, nil + return obj.TmPubKey, nil }) if err != nil { ec.Error(ctx, err) @@ -52386,9 +55215,9 @@ func (ec *executionContext) _ObservableMarketData_marketGrowth(ctx context.Conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_marketGrowth(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeBasic_tmPubkey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NodeBasic", Field: field, IsMethod: false, IsResolver: false, @@ -52399,8 +55228,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_marketGrowth(ctx c return fc, nil } -func (ec *executionContext) _ObservableMarketData_lastTradedPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_lastTradedPrice(ctx, field) +func (ec *executionContext) _NodeBasic_ethereumAddress(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeBasic_ethereumAddress(ctx, field) if err != nil { return graphql.Null } @@ -52413,7 +55242,7 @@ func (ec *executionContext) _ObservableMarketData_lastTradedPrice(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LastTradedPrice, nil + return obj.EthereumAddress, nil }) if err != nil { ec.Error(ctx, err) @@ -52430,9 +55259,9 @@ func (ec *executionContext) _ObservableMarketData_lastTradedPrice(ctx context.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_lastTradedPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeBasic_ethereumAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NodeBasic", Field: field, IsMethod: false, IsResolver: false, @@ -52443,8 +55272,8 @@ func (ec *executionContext) fieldContext_ObservableMarketData_lastTradedPrice(ct return fc, nil } -func (ec *executionContext) _ObservableMarketData_productData(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketData_productData(ctx, field) +func (ec *executionContext) _NodeBasic_infoUrl(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeBasic_infoUrl(ctx, field) if err != nil { return graphql.Null } @@ -52457,35 +55286,38 @@ func (ec *executionContext) _ObservableMarketData_productData(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketData().ProductData(rctx, obj) + return obj.InfoUrl, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(ProductData) + res := resTmp.(string) fc.Result = res - return ec.marshalOProductData2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProductData(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketData_productData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeBasic_infoUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketData", + Object: "NodeBasic", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ProductData does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketDepth_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketDepth_marketId(ctx, field) +func (ec *executionContext) _NodeBasic_location(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeBasic_location(ctx, field) if err != nil { return graphql.Null } @@ -52498,7 +55330,7 @@ func (ec *executionContext) _ObservableMarketDepth_marketId(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return obj.Location, nil }) if err != nil { ec.Error(ctx, err) @@ -52512,24 +55344,24 @@ func (ec *executionContext) _ObservableMarketDepth_marketId(ctx context.Context, } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketDepth_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeBasic_location(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketDepth", + Object: "NodeBasic", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketDepth_buy(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketDepth_buy(ctx, field) +func (ec *executionContext) _NodeBasic_status(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeBasic_status(ctx, field) if err != nil { return graphql.Null } @@ -52542,43 +55374,38 @@ func (ec *executionContext) _ObservableMarketDepth_buy(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Buy, nil + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.PriceLevel) + res := resTmp.(vega.NodeStatus) fc.Result = res - return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) + return ec.marshalNNodeStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNodeStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketDepth_buy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeBasic_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketDepth", + Object: "NodeBasic", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "price": - return ec.fieldContext_PriceLevel_price(ctx, field) - case "volume": - return ec.fieldContext_PriceLevel_volume(ctx, field) - case "numberOfOrders": - return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) + return nil, errors.New("field of type NodeStatus does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketDepth_sell(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketDepth_sell(ctx, field) +func (ec *executionContext) _NodeBasic_name(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeBasic_name(ctx, field) if err != nil { return graphql.Null } @@ -52591,43 +55418,38 @@ func (ec *executionContext) _ObservableMarketDepth_sell(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Sell, nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.PriceLevel) + res := resTmp.(string) fc.Result = res - return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketDepth_sell(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeBasic_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketDepth", + Object: "NodeBasic", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "price": - return ec.fieldContext_PriceLevel_price(ctx, field) - case "volume": - return ec.fieldContext_PriceLevel_volume(ctx, field) - case "numberOfOrders": - return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketDepth_lastTrade(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketDepth_lastTrade(ctx, field) +func (ec *executionContext) _NodeBasic_avatarUrl(ctx context.Context, field graphql.CollectedField, obj *v2.NodeBasic) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeBasic_avatarUrl(ctx, field) if err != nil { return graphql.Null } @@ -52640,46 +55462,35 @@ func (ec *executionContext) _ObservableMarketDepth_lastTrade(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketDepth().LastTrade(rctx, obj) + return obj.AvatarUrl, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*MarketDepthTrade) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarketDepthTrade2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐMarketDepthTrade(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketDepth_lastTrade(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeBasic_avatarUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketDepth", + Object: "NodeBasic", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_MarketDepthTrade_id(ctx, field) - case "price": - return ec.fieldContext_MarketDepthTrade_price(ctx, field) - case "size": - return ec.fieldContext_MarketDepthTrade_size(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarketDepthTrade", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketDepth_sequenceNumber(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketDepth_sequenceNumber(ctx, field) +func (ec *executionContext) _NodeData_stakedTotal(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeData_stakedTotal(ctx, field) if err != nil { return graphql.Null } @@ -52692,7 +55503,7 @@ func (ec *executionContext) _ObservableMarketDepth_sequenceNumber(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketDepth().SequenceNumber(rctx, obj) + return obj.StakedTotal, nil }) if err != nil { ec.Error(ctx, err) @@ -52709,12 +55520,12 @@ func (ec *executionContext) _ObservableMarketDepth_sequenceNumber(ctx context.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketDepth_sequenceNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeData_stakedTotal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketDepth", + Object: "NodeData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -52722,8 +55533,8 @@ func (ec *executionContext) fieldContext_ObservableMarketDepth_sequenceNumber(ct return fc, nil } -func (ec *executionContext) _ObservableMarketDepthUpdate_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketDepthUpdate_marketId(ctx, field) +func (ec *executionContext) _NodeData_totalNodes(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeData_totalNodes(ctx, field) if err != nil { return graphql.Null } @@ -52736,7 +55547,7 @@ func (ec *executionContext) _ObservableMarketDepthUpdate_marketId(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return obj.TotalNodes, nil }) if err != nil { ec.Error(ctx, err) @@ -52748,26 +55559,26 @@ func (ec *executionContext) _ObservableMarketDepthUpdate_marketId(ctx context.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(uint32) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNInt2uint32(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketDepthUpdate_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeData_totalNodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketDepthUpdate", + Object: "NodeData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ObservableMarketDepthUpdate_buy(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketDepthUpdate_buy(ctx, field) +func (ec *executionContext) _NodeData_inactiveNodes(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeData_inactiveNodes(ctx, field) if err != nil { return graphql.Null } @@ -52780,43 +55591,94 @@ func (ec *executionContext) _ObservableMarketDepthUpdate_buy(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Buy, nil + return obj.InactiveNodes, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.PriceLevel) + res := resTmp.(uint32) fc.Result = res - return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) + return ec.marshalNInt2uint32(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketDepthUpdate_buy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeData_inactiveNodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketDepthUpdate", + Object: "NodeData", Field: field, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _NodeData_tendermintNodes(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeData_tendermintNodes(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.NodeData().TendermintNodes(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*NodeSet) + fc.Result = res + return ec.marshalNNodeSet2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐNodeSet(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_NodeData_tendermintNodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "NodeData", + Field: field, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "price": - return ec.fieldContext_PriceLevel_price(ctx, field) - case "volume": - return ec.fieldContext_PriceLevel_volume(ctx, field) - case "numberOfOrders": - return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) + case "total": + return ec.fieldContext_NodeSet_total(ctx, field) + case "inactive": + return ec.fieldContext_NodeSet_inactive(ctx, field) + case "promoted": + return ec.fieldContext_NodeSet_promoted(ctx, field) + case "demoted": + return ec.fieldContext_NodeSet_demoted(ctx, field) + case "maximum": + return ec.fieldContext_NodeSet_maximum(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) + return nil, fmt.Errorf("no field named %q was found under type NodeSet", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableMarketDepthUpdate_sell(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketDepthUpdate_sell(ctx, field) +func (ec *executionContext) _NodeData_ersatzNodes(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeData_ersatzNodes(ctx, field) if err != nil { return graphql.Null } @@ -52829,7 +55691,7 @@ func (ec *executionContext) _ObservableMarketDepthUpdate_sell(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Sell, nil + return ec.resolvers.NodeData().ErsatzNodes(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -52838,34 +55700,38 @@ func (ec *executionContext) _ObservableMarketDepthUpdate_sell(ctx context.Contex if resTmp == nil { return graphql.Null } - res := resTmp.([]*vega.PriceLevel) + res := resTmp.(*NodeSet) fc.Result = res - return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) + return ec.marshalONodeSet2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐNodeSet(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketDepthUpdate_sell(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeData_ersatzNodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketDepthUpdate", + Object: "NodeData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "price": - return ec.fieldContext_PriceLevel_price(ctx, field) - case "volume": - return ec.fieldContext_PriceLevel_volume(ctx, field) - case "numberOfOrders": - return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) + case "total": + return ec.fieldContext_NodeSet_total(ctx, field) + case "inactive": + return ec.fieldContext_NodeSet_inactive(ctx, field) + case "promoted": + return ec.fieldContext_NodeSet_promoted(ctx, field) + case "demoted": + return ec.fieldContext_NodeSet_demoted(ctx, field) + case "maximum": + return ec.fieldContext_NodeSet_maximum(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) + return nil, fmt.Errorf("no field named %q was found under type NodeSet", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableMarketDepthUpdate_sequenceNumber(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketDepthUpdate_sequenceNumber(ctx, field) +func (ec *executionContext) _NodeData_pendingNodes(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeData_pendingNodes(ctx, field) if err != nil { return graphql.Null } @@ -52878,38 +55744,47 @@ func (ec *executionContext) _ObservableMarketDepthUpdate_sequenceNumber(ctx cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketDepthUpdate().SequenceNumber(rctx, obj) + return ec.resolvers.NodeData().PendingNodes(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*NodeSet) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalONodeSet2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐNodeSet(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketDepthUpdate_sequenceNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeData_pendingNodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketDepthUpdate", + Object: "NodeData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "total": + return ec.fieldContext_NodeSet_total(ctx, field) + case "inactive": + return ec.fieldContext_NodeSet_inactive(ctx, field) + case "promoted": + return ec.fieldContext_NodeSet_promoted(ctx, field) + case "demoted": + return ec.fieldContext_NodeSet_demoted(ctx, field) + case "maximum": + return ec.fieldContext_NodeSet_maximum(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NodeSet", field.Name) }, } return fc, nil } -func (ec *executionContext) _ObservableMarketDepthUpdate_previousSequenceNumber(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ObservableMarketDepthUpdate_previousSequenceNumber(ctx, field) +func (ec *executionContext) _NodeData_uptime(ctx context.Context, field graphql.CollectedField, obj *vega.NodeData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeData_uptime(ctx, field) if err != nil { return graphql.Null } @@ -52922,7 +55797,7 @@ func (ec *executionContext) _ObservableMarketDepthUpdate_previousSequenceNumber( }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ObservableMarketDepthUpdate().PreviousSequenceNumber(rctx, obj) + return ec.resolvers.NodeData().Uptime(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -52934,26 +55809,26 @@ func (ec *executionContext) _ObservableMarketDepthUpdate_previousSequenceNumber( } return graphql.Null } - res := resTmp.(string) + res := resTmp.(float64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNFloat2float64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ObservableMarketDepthUpdate_previousSequenceNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeData_uptime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ObservableMarketDepthUpdate", + Object: "NodeData", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Float does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OneOffGovernanceTransfer_deliverOn(ctx context.Context, field graphql.CollectedField, obj *v1.OneOffGovernanceTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OneOffGovernanceTransfer_deliverOn(ctx, field) +func (ec *executionContext) _NodeEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.NodeEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -52966,35 +55841,74 @@ func (ec *executionContext) _OneOffGovernanceTransfer_deliverOn(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DeliverOn, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*vega.Node) fc.Result = res - return ec.marshalOTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNNode2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OneOffGovernanceTransfer_deliverOn(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OneOffGovernanceTransfer", + Object: "NodeEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Node_id(ctx, field) + case "pubkey": + return ec.fieldContext_Node_pubkey(ctx, field) + case "tmPubkey": + return ec.fieldContext_Node_tmPubkey(ctx, field) + case "ethereumAddress": + return ec.fieldContext_Node_ethereumAddress(ctx, field) + case "infoUrl": + return ec.fieldContext_Node_infoUrl(ctx, field) + case "location": + return ec.fieldContext_Node_location(ctx, field) + case "stakedByOperator": + return ec.fieldContext_Node_stakedByOperator(ctx, field) + case "stakedByDelegates": + return ec.fieldContext_Node_stakedByDelegates(ctx, field) + case "stakedTotal": + return ec.fieldContext_Node_stakedTotal(ctx, field) + case "pendingStake": + return ec.fieldContext_Node_pendingStake(ctx, field) + case "epochData": + return ec.fieldContext_Node_epochData(ctx, field) + case "status": + return ec.fieldContext_Node_status(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Node_delegationsConnection(ctx, field) + case "rewardScore": + return ec.fieldContext_Node_rewardScore(ctx, field) + case "rankingScore": + return ec.fieldContext_Node_rankingScore(ctx, field) + case "name": + return ec.fieldContext_Node_name(ctx, field) + case "avatarUrl": + return ec.fieldContext_Node_avatarUrl(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Node", field.Name) }, } return fc, nil } -func (ec *executionContext) _OneOffTransfer_deliverOn(ctx context.Context, field graphql.CollectedField, obj *v1.OneOffTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OneOffTransfer_deliverOn(ctx, field) +func (ec *executionContext) _NodeEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.NodeEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -53007,35 +55921,38 @@ func (ec *executionContext) _OneOffTransfer_deliverOn(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DeliverOn, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalOTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OneOffTransfer_deliverOn(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OneOffTransfer", + Object: "NodeEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OracleData_externalData(ctx context.Context, field graphql.CollectedField, obj *vega.OracleData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OracleData_externalData(ctx, field) +func (ec *executionContext) _NodeSet_total(ctx context.Context, field graphql.CollectedField, obj *NodeSet) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeSet_total(ctx, field) if err != nil { return graphql.Null } @@ -53048,7 +55965,7 @@ func (ec *executionContext) _OracleData_externalData(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.OracleData().ExternalData(rctx, obj) + return obj.Total, nil }) if err != nil { ec.Error(ctx, err) @@ -53060,30 +55977,26 @@ func (ec *executionContext) _OracleData_externalData(ctx context.Context, field } return graphql.Null } - res := resTmp.(*ExternalData) + res := resTmp.(int) fc.Result = res - return ec.marshalNExternalData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐExternalData(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OracleData_externalData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeSet_total(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OracleData", + Object: "NodeSet", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "data": - return ec.fieldContext_ExternalData_data(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ExternalData", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OracleDataConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.OracleDataConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OracleDataConnection_edges(ctx, field) +func (ec *executionContext) _NodeSet_inactive(ctx context.Context, field graphql.CollectedField, obj *NodeSet) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeSet_inactive(ctx, field) if err != nil { return graphql.Null } @@ -53096,41 +56009,38 @@ func (ec *executionContext) _OracleDataConnection_edges(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.Inactive, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.OracleDataEdge) + res := resTmp.(int) fc.Result = res - return ec.marshalOOracleDataEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOracleDataEdge(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OracleDataConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeSet_inactive(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OracleDataConnection", + Object: "NodeSet", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_OracleDataEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_OracleDataEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OracleDataEdge", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OracleDataConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.OracleDataConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OracleDataConnection_pageInfo(ctx, field) +func (ec *executionContext) _NodeSet_promoted(ctx context.Context, field graphql.CollectedField, obj *NodeSet) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeSet_promoted(ctx, field) if err != nil { return graphql.Null } @@ -53143,48 +56053,35 @@ func (ec *executionContext) _OracleDataConnection_pageInfo(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Promoted, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.([]string) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OracleDataConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeSet_promoted(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OracleDataConnection", + Object: "NodeSet", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OracleDataEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.OracleDataEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OracleDataEdge_node(ctx, field) +func (ec *executionContext) _NodeSet_demoted(ctx context.Context, field graphql.CollectedField, obj *NodeSet) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeSet_demoted(ctx, field) if err != nil { return graphql.Null } @@ -53197,42 +56094,35 @@ func (ec *executionContext) _OracleDataEdge_node(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.Demoted, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.OracleData) + res := resTmp.([]string) fc.Result = res - return ec.marshalNOracleData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOracleData(ctx, field.Selections, res) + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OracleDataEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeSet_demoted(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OracleDataEdge", + Object: "NodeSet", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "externalData": - return ec.fieldContext_OracleData_externalData(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OracleData", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OracleDataEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.OracleDataEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OracleDataEdge_cursor(ctx, field) +func (ec *executionContext) _NodeSet_maximum(ctx context.Context, field graphql.CollectedField, obj *NodeSet) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeSet_maximum(ctx, field) if err != nil { return graphql.Null } @@ -53245,38 +56135,35 @@ func (ec *executionContext) _OracleDataEdge_cursor(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.Maximum, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OracleDataEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeSet_maximum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OracleDataEdge", + Object: "NodeSet", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OracleSpec_dataSourceSpec(ctx context.Context, field graphql.CollectedField, obj *vega.OracleSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OracleSpec_dataSourceSpec(ctx, field) +func (ec *executionContext) _NodeSignature_id(ctx context.Context, field graphql.CollectedField, obj *v11.NodeSignature) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeSignature_id(ctx, field) if err != nil { return graphql.Null } @@ -53289,7 +56176,7 @@ func (ec *executionContext) _OracleSpec_dataSourceSpec(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.OracleSpec().DataSourceSpec(rctx, obj) + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) @@ -53301,30 +56188,26 @@ func (ec *executionContext) _OracleSpec_dataSourceSpec(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(*ExternalDataSourceSpec) + res := resTmp.(string) fc.Result = res - return ec.marshalNExternalDataSourceSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐExternalDataSourceSpec(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OracleSpec_dataSourceSpec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeSignature_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OracleSpec", + Object: "NodeSignature", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "spec": - return ec.fieldContext_ExternalDataSourceSpec_spec(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ExternalDataSourceSpec", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OracleSpec_dataConnection(ctx context.Context, field graphql.CollectedField, obj *vega.OracleSpec) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OracleSpec_dataConnection(ctx, field) +func (ec *executionContext) _NodeSignature_signature(ctx context.Context, field graphql.CollectedField, obj *v11.NodeSignature) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeSignature_signature(ctx, field) if err != nil { return graphql.Null } @@ -53337,55 +56220,76 @@ func (ec *executionContext) _OracleSpec_dataConnection(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.OracleSpec().DataConnection(rctx, obj, fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.NodeSignature().Signature(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v2.OracleDataConnection) + res := resTmp.(*string) fc.Result = res - return ec.marshalNOracleDataConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOracleDataConnection(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OracleSpec_dataConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeSignature_signature(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OracleSpec", + Object: "NodeSignature", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_OracleDataConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_OracleDataConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OracleDataConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } + return fc, nil +} + +func (ec *executionContext) _NodeSignature_kind(ctx context.Context, field graphql.CollectedField, obj *v11.NodeSignature) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeSignature_kind(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null } }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_OracleSpec_dataConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Kind, nil + }) + if err != nil { ec.Error(ctx, err) - return + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(v11.NodeSignatureKind) + fc.Result = res + return ec.marshalONodeSignatureKind2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋcommandsᚋv1ᚐNodeSignatureKind(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_NodeSignature_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "NodeSignature", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type NodeSignatureKind does not have child fields") + }, } return fc, nil } -func (ec *executionContext) _OracleSpecEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.OracleSpecEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OracleSpecEdge_node(ctx, field) +func (ec *executionContext) _NodeSignatureEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.NodeSignatureEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeSignatureEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -53410,32 +56314,34 @@ func (ec *executionContext) _OracleSpecEdge_node(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(*vega.OracleSpec) + res := resTmp.(*v11.NodeSignature) fc.Result = res - return ec.marshalNOracleSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOracleSpec(ctx, field.Selections, res) + return ec.marshalNNodeSignature2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋcommandsᚋv1ᚐNodeSignature(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OracleSpecEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeSignatureEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OracleSpecEdge", + Object: "NodeSignatureEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "dataSourceSpec": - return ec.fieldContext_OracleSpec_dataSourceSpec(ctx, field) - case "dataConnection": - return ec.fieldContext_OracleSpec_dataConnection(ctx, field) + case "id": + return ec.fieldContext_NodeSignature_id(ctx, field) + case "signature": + return ec.fieldContext_NodeSignature_signature(ctx, field) + case "kind": + return ec.fieldContext_NodeSignature_kind(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type OracleSpec", field.Name) + return nil, fmt.Errorf("no field named %q was found under type NodeSignature", field.Name) }, } return fc, nil } -func (ec *executionContext) _OracleSpecEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.OracleSpecEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OracleSpecEdge_cursor(ctx, field) +func (ec *executionContext) _NodeSignatureEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.NodeSignatureEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeSignatureEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -53465,9 +56371,9 @@ func (ec *executionContext) _OracleSpecEdge_cursor(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OracleSpecEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeSignatureEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OracleSpecEdge", + Object: "NodeSignatureEdge", Field: field, IsMethod: false, IsResolver: false, @@ -53478,8 +56384,8 @@ func (ec *executionContext) fieldContext_OracleSpecEdge_cursor(ctx context.Conte return fc, nil } -func (ec *executionContext) _OracleSpecsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.OracleSpecsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OracleSpecsConnection_edges(ctx, field) +func (ec *executionContext) _NodeSignaturesConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.NodeSignaturesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeSignaturesConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -53499,34 +56405,37 @@ func (ec *executionContext) _OracleSpecsConnection_edges(ctx context.Context, fi return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.OracleSpecEdge) + res := resTmp.([]*v2.NodeSignatureEdge) fc.Result = res - return ec.marshalOOracleSpecEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOracleSpecEdge(ctx, field.Selections, res) + return ec.marshalNNodeSignatureEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNodeSignatureEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OracleSpecsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeSignaturesConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OracleSpecsConnection", + Object: "NodeSignaturesConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "node": - return ec.fieldContext_OracleSpecEdge_node(ctx, field) + return ec.fieldContext_NodeSignatureEdge_node(ctx, field) case "cursor": - return ec.fieldContext_OracleSpecEdge_cursor(ctx, field) + return ec.fieldContext_NodeSignatureEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type OracleSpecEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type NodeSignatureEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _OracleSpecsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.OracleSpecsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OracleSpecsConnection_pageInfo(ctx, field) +func (ec *executionContext) _NodeSignaturesConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.NodeSignaturesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodeSignaturesConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -53556,9 +56465,9 @@ func (ec *executionContext) _OracleSpecsConnection_pageInfo(ctx context.Context, return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OracleSpecsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodeSignaturesConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OracleSpecsConnection", + Object: "NodeSignaturesConnection", Field: field, IsMethod: false, IsResolver: false, @@ -53579,8 +56488,8 @@ func (ec *executionContext) fieldContext_OracleSpecsConnection_pageInfo(ctx cont return fc, nil } -func (ec *executionContext) _Order_id(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_id(ctx, field) +func (ec *executionContext) _NodesConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.NodesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodesConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -53593,38 +56502,41 @@ func (ec *executionContext) _Order_id(ctx context.Context, field graphql.Collect }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.NodeEdge) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalONodeEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNodeEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodesConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "NodesConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_NodeEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_NodeEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NodeEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _Order_price(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_price(ctx, field) +func (ec *executionContext) _NodesConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.NodesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_NodesConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -53637,7 +56549,7 @@ func (ec *executionContext) _Order_price(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Price, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -53649,26 +56561,36 @@ func (ec *executionContext) _Order_price(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NodesConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "NodesConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Order_timeInForce(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_timeInForce(ctx, field) +func (ec *executionContext) _Normaliser_name(ctx context.Context, field graphql.CollectedField, obj *Normaliser) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Normaliser_name(ctx, field) if err != nil { return graphql.Null } @@ -53681,7 +56603,7 @@ func (ec *executionContext) _Order_timeInForce(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TimeInForce, nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -53693,26 +56615,26 @@ func (ec *executionContext) _Order_timeInForce(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(vega.Order_TimeInForce) + res := resTmp.(string) fc.Result = res - return ec.marshalNOrderTimeInForce2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_TimeInForce(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_timeInForce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Normaliser_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "Normaliser", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type OrderTimeInForce does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_side(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_side(ctx, field) +func (ec *executionContext) _Normaliser_expression(ctx context.Context, field graphql.CollectedField, obj *Normaliser) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Normaliser_expression(ctx, field) if err != nil { return graphql.Null } @@ -53725,7 +56647,7 @@ func (ec *executionContext) _Order_side(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Side, nil + return obj.Expression, nil }) if err != nil { ec.Error(ctx, err) @@ -53737,26 +56659,26 @@ func (ec *executionContext) _Order_side(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.(vega.Side) + res := resTmp.(string) fc.Result = res - return ec.marshalNSide2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐSide(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_side(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Normaliser_expression(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "Normaliser", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Side does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_market(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_market(ctx, field) +func (ec *executionContext) _ObservableLiquidityProviderFeeShare_partyId(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderFeeShare) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableLiquidityProviderFeeShare_partyId(ctx, field) if err != nil { return graphql.Null } @@ -53769,7 +56691,7 @@ func (ec *executionContext) _Order_market(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Order().Market(rctx, obj) + return obj.PartyID, nil }) if err != nil { ec.Error(ctx, err) @@ -53781,82 +56703,26 @@ func (ec *executionContext) _Order_market(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(*vega.Market) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableLiquidityProviderFeeShare_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableLiquidityProviderFeeShare", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Market_id(ctx, field) - case "fees": - return ec.fieldContext_Market_fees(ctx, field) - case "tradableInstrument": - return ec.fieldContext_Market_tradableInstrument(ctx, field) - case "decimalPlaces": - return ec.fieldContext_Market_decimalPlaces(ctx, field) - case "positionDecimalPlaces": - return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) - case "openingAuction": - return ec.fieldContext_Market_openingAuction(ctx, field) - case "priceMonitoringSettings": - return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) - case "liquidityMonitoringParameters": - return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) - case "tradingMode": - return ec.fieldContext_Market_tradingMode(ctx, field) - case "state": - return ec.fieldContext_Market_state(ctx, field) - case "proposal": - return ec.fieldContext_Market_proposal(ctx, field) - case "ordersConnection": - return ec.fieldContext_Market_ordersConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Market_accountsConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Market_tradesConnection(ctx, field) - case "depth": - return ec.fieldContext_Market_depth(ctx, field) - case "candlesConnection": - return ec.fieldContext_Market_candlesConnection(ctx, field) - case "data": - return ec.fieldContext_Market_data(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Market_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) - case "marketTimestamps": - return ec.fieldContext_Market_marketTimestamps(ctx, field) - case "riskFactors": - return ec.fieldContext_Market_riskFactors(ctx, field) - case "linearSlippageFactor": - return ec.fieldContext_Market_linearSlippageFactor(ctx, field) - case "quadraticSlippageFactor": - return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) - case "parentMarketID": - return ec.fieldContext_Market_parentMarketID(ctx, field) - case "insurancePoolFraction": - return ec.fieldContext_Market_insurancePoolFraction(ctx, field) - case "successorMarketID": - return ec.fieldContext_Market_successorMarketID(ctx, field) - case "liquiditySLAParameters": - return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_size(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_size(ctx, field) +func (ec *executionContext) _ObservableLiquidityProviderFeeShare_equityLikeShare(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderFeeShare) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableLiquidityProviderFeeShare_equityLikeShare(ctx, field) if err != nil { return graphql.Null } @@ -53869,7 +56735,7 @@ func (ec *executionContext) _Order_size(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Order().Size(rctx, obj) + return obj.EquityLikeShare, nil }) if err != nil { ec.Error(ctx, err) @@ -53886,12 +56752,12 @@ func (ec *executionContext) _Order_size(ctx context.Context, field graphql.Colle return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableLiquidityProviderFeeShare_equityLikeShare(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableLiquidityProviderFeeShare", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -53899,8 +56765,8 @@ func (ec *executionContext) fieldContext_Order_size(ctx context.Context, field g return fc, nil } -func (ec *executionContext) _Order_remaining(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_remaining(ctx, field) +func (ec *executionContext) _ObservableLiquidityProviderFeeShare_averageEntryValuation(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderFeeShare) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableLiquidityProviderFeeShare_averageEntryValuation(ctx, field) if err != nil { return graphql.Null } @@ -53913,7 +56779,7 @@ func (ec *executionContext) _Order_remaining(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Order().Remaining(rctx, obj) + return obj.AverageEntryValuation, nil }) if err != nil { ec.Error(ctx, err) @@ -53930,12 +56796,12 @@ func (ec *executionContext) _Order_remaining(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_remaining(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableLiquidityProviderFeeShare_averageEntryValuation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableLiquidityProviderFeeShare", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -53943,8 +56809,8 @@ func (ec *executionContext) fieldContext_Order_remaining(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _Order_party(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_party(ctx, field) +func (ec *executionContext) _ObservableLiquidityProviderFeeShare_averageScore(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderFeeShare) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableLiquidityProviderFeeShare_averageScore(ctx, field) if err != nil { return graphql.Null } @@ -53957,7 +56823,7 @@ func (ec *executionContext) _Order_party(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Order().Party(rctx, obj) + return obj.AverageScore, nil }) if err != nil { ec.Error(ctx, err) @@ -53969,68 +56835,26 @@ func (ec *executionContext) _Order_party(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(*vega.Party) + res := resTmp.(string) fc.Result = res - return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableLiquidityProviderFeeShare_averageScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableLiquidityProviderFeeShare", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_createdAt(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_createdAt(ctx, field) +func (ec *executionContext) _ObservableLiquidityProviderSLA_party(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_party(ctx, field) if err != nil { return graphql.Null } @@ -54043,7 +56867,7 @@ func (ec *executionContext) _Order_createdAt(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreatedAt, nil + return obj.Party, nil }) if err != nil { ec.Error(ctx, err) @@ -54055,26 +56879,26 @@ func (ec *executionContext) _Order_createdAt(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableLiquidityProviderSLA", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_expiresAt(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_expiresAt(ctx, field) +func (ec *executionContext) _ObservableLiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx, field) if err != nil { return graphql.Null } @@ -54087,35 +56911,38 @@ func (ec *executionContext) _Order_expiresAt(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ExpiresAt, nil + return obj.CurrentEpochFractionOfTimeOnBook, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalOTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_expiresAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableLiquidityProviderSLA", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_status(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_status(ctx, field) +func (ec *executionContext) _ObservableLiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx, field) if err != nil { return graphql.Null } @@ -54128,7 +56955,7 @@ func (ec *executionContext) _Order_status(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.LastEpochFractionOfTimeOnBook, nil }) if err != nil { ec.Error(ctx, err) @@ -54140,26 +56967,26 @@ func (ec *executionContext) _Order_status(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(vega.Order_Status) + res := resTmp.(string) fc.Result = res - return ec.marshalNOrderStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Status(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableLiquidityProviderSLA", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type OrderStatus does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_reference(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_reference(ctx, field) +func (ec *executionContext) _ObservableLiquidityProviderSLA_lastEpochFeePenalty(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_lastEpochFeePenalty(ctx, field) if err != nil { return graphql.Null } @@ -54172,7 +56999,7 @@ func (ec *executionContext) _Order_reference(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Reference, nil + return obj.LastEpochFeePenalty, nil }) if err != nil { ec.Error(ctx, err) @@ -54189,9 +57016,9 @@ func (ec *executionContext) _Order_reference(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_lastEpochFeePenalty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableLiquidityProviderSLA", Field: field, IsMethod: false, IsResolver: false, @@ -54202,8 +57029,8 @@ func (ec *executionContext) fieldContext_Order_reference(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _Order_tradesConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_tradesConnection(ctx, field) +func (ec *executionContext) _ObservableLiquidityProviderSLA_lastEpochBondPenalty(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_lastEpochBondPenalty(ctx, field) if err != nil { return graphql.Null } @@ -54216,52 +57043,38 @@ func (ec *executionContext) _Order_tradesConnection(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Order().TradesConnection(rctx, obj, fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) + return obj.LastEpochBondPenalty, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.TradeConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOTradeConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTradeConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_tradesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_lastEpochBondPenalty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableLiquidityProviderSLA", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_TradeConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_TradeConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TradeConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Order_tradesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Order_type(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_type(ctx, field) +func (ec *executionContext) _ObservableLiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx, field) if err != nil { return graphql.Null } @@ -54274,7 +57087,7 @@ func (ec *executionContext) _Order_type(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.HysteresisPeriodFeePenalties, nil }) if err != nil { ec.Error(ctx, err) @@ -54283,26 +57096,26 @@ func (ec *executionContext) _Order_type(ctx context.Context, field graphql.Colle if resTmp == nil { return graphql.Null } - res := resTmp.(vega.Order_Type) + res := resTmp.([]string) fc.Result = res - return ec.marshalOOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx, field.Selections, res) + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableLiquidityProviderSLA", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type OrderType does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_rejectionReason(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_rejectionReason(ctx, field) +func (ec *executionContext) _ObservableLiquidityProviderSLA_requiredLiquidity(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_requiredLiquidity(ctx, field) if err != nil { return graphql.Null } @@ -54315,35 +57128,38 @@ func (ec *executionContext) _Order_rejectionReason(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Order().RejectionReason(rctx, obj) + return obj.RequiredLiquidity, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.OrderError) + res := resTmp.(string) fc.Result = res - return ec.marshalOOrderRejectionReason2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrderError(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_rejectionReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_requiredLiquidity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableLiquidityProviderSLA", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type OrderRejectionReason does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_version(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_version(ctx, field) +func (ec *executionContext) _ObservableLiquidityProviderSLA_notionalVolumeBuys(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_notionalVolumeBuys(ctx, field) if err != nil { return graphql.Null } @@ -54356,7 +57172,7 @@ func (ec *executionContext) _Order_version(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Order().Version(rctx, obj) + return obj.NotionalVolumeBuys, nil }) if err != nil { ec.Error(ctx, err) @@ -54373,12 +57189,12 @@ func (ec *executionContext) _Order_version(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_notionalVolumeBuys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableLiquidityProviderSLA", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -54386,8 +57202,8 @@ func (ec *executionContext) fieldContext_Order_version(ctx context.Context, fiel return fc, nil } -func (ec *executionContext) _Order_updatedAt(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_updatedAt(ctx, field) +func (ec *executionContext) _ObservableLiquidityProviderSLA_notionalVolumeSells(ctx context.Context, field graphql.CollectedField, obj *ObservableLiquidityProviderSLA) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableLiquidityProviderSLA_notionalVolumeSells(ctx, field) if err != nil { return graphql.Null } @@ -54400,35 +57216,38 @@ func (ec *executionContext) _Order_updatedAt(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdatedAt, nil + return obj.NotionalVolumeSells, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalOTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableLiquidityProviderSLA_notionalVolumeSells(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableLiquidityProviderSLA", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_peggedOrder(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_peggedOrder(ctx, field) +func (ec *executionContext) _ObservableMarketData_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_marketId(ctx, field) if err != nil { return graphql.Null } @@ -54441,41 +57260,38 @@ func (ec *executionContext) _Order_peggedOrder(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PeggedOrder, nil + return ec.resolvers.ObservableMarketData().MarketID(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.PeggedOrder) + res := resTmp.(string) fc.Result = res - return ec.marshalOPeggedOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPeggedOrder(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_peggedOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "reference": - return ec.fieldContext_PeggedOrder_reference(ctx, field) - case "offset": - return ec.fieldContext_PeggedOrder_offset(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PeggedOrder", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_liquidityProvision(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_liquidityProvision(ctx, field) +func (ec *executionContext) _ObservableMarketData_markPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_markPrice(ctx, field) if err != nil { return graphql.Null } @@ -54488,61 +57304,38 @@ func (ec *executionContext) _Order_liquidityProvision(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Order().LiquidityProvision(rctx, obj) + return obj.MarkPrice, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.LiquidityProvision) + res := resTmp.(string) fc.Result = res - return ec.marshalOLiquidityProvision2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_liquidityProvision(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_markPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableMarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_LiquidityProvision_id(ctx, field) - case "party": - return ec.fieldContext_LiquidityProvision_party(ctx, field) - case "createdAt": - return ec.fieldContext_LiquidityProvision_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_LiquidityProvision_updatedAt(ctx, field) - case "market": - return ec.fieldContext_LiquidityProvision_market(ctx, field) - case "commitmentAmount": - return ec.fieldContext_LiquidityProvision_commitmentAmount(ctx, field) - case "fee": - return ec.fieldContext_LiquidityProvision_fee(ctx, field) - case "sells": - return ec.fieldContext_LiquidityProvision_sells(ctx, field) - case "buys": - return ec.fieldContext_LiquidityProvision_buys(ctx, field) - case "version": - return ec.fieldContext_LiquidityProvision_version(ctx, field) - case "status": - return ec.fieldContext_LiquidityProvision_status(ctx, field) - case "reference": - return ec.fieldContext_LiquidityProvision_reference(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvision", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_postOnly(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_postOnly(ctx, field) +func (ec *executionContext) _ObservableMarketData_bestBidPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_bestBidPrice(ctx, field) if err != nil { return graphql.Null } @@ -54555,35 +57348,38 @@ func (ec *executionContext) _Order_postOnly(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PostOnly, nil + return obj.BestBidPrice, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(string) fc.Result = res - return ec.marshalOBoolean2bool(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_postOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_bestBidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_reduceOnly(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_reduceOnly(ctx, field) +func (ec *executionContext) _ObservableMarketData_bestBidVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_bestBidVolume(ctx, field) if err != nil { return graphql.Null } @@ -54596,35 +57392,38 @@ func (ec *executionContext) _Order_reduceOnly(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReduceOnly, nil + return ec.resolvers.ObservableMarketData().BestBidVolume(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(string) fc.Result = res - return ec.marshalOBoolean2bool(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_reduceOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_bestBidVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Order_icebergOrder(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Order_icebergOrder(ctx, field) +func (ec *executionContext) _ObservableMarketData_bestOfferPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_bestOfferPrice(ctx, field) if err != nil { return graphql.Null } @@ -54637,43 +57436,38 @@ func (ec *executionContext) _Order_icebergOrder(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IcebergOrder, nil + return obj.BestOfferPrice, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.IcebergOrder) + res := resTmp.(string) fc.Result = res - return ec.marshalOIcebergOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐIcebergOrder(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Order_icebergOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_bestOfferPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Order", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "peakSize": - return ec.fieldContext_IcebergOrder_peakSize(ctx, field) - case "minimumVisibleSize": - return ec.fieldContext_IcebergOrder_minimumVisibleSize(ctx, field) - case "reservedRemaining": - return ec.fieldContext_IcebergOrder_reservedRemaining(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type IcebergOrder", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.OrderConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderConnection_edges(ctx, field) +func (ec *executionContext) _ObservableMarketData_bestOfferVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_bestOfferVolume(ctx, field) if err != nil { return graphql.Null } @@ -54686,41 +57480,38 @@ func (ec *executionContext) _OrderConnection_edges(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.ObservableMarketData().BestOfferVolume(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.OrderEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalOOrderEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOrderEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_bestOfferVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderConnection", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_OrderEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_OrderEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OrderEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.OrderConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderConnection_pageInfo(ctx, field) +func (ec *executionContext) _ObservableMarketData_bestStaticBidPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_bestStaticBidPrice(ctx, field) if err != nil { return graphql.Null } @@ -54733,45 +57524,38 @@ func (ec *executionContext) _OrderConnection_pageInfo(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.BestStaticBidPrice, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(string) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_bestStaticBidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderConnection", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.OrderEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderEdge_node(ctx, field) +func (ec *executionContext) _ObservableMarketData_bestStaticBidVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_bestStaticBidVolume(ctx, field) if err != nil { return graphql.Null } @@ -54784,7 +57568,7 @@ func (ec *executionContext) _OrderEdge_node(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.ObservableMarketData().BestStaticBidVolume(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -54796,72 +57580,26 @@ func (ec *executionContext) _OrderEdge_node(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(*vega.Order) + res := resTmp.(string) fc.Result = res - return ec.marshalNOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_bestStaticBidVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderEdge", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Order_id(ctx, field) - case "price": - return ec.fieldContext_Order_price(ctx, field) - case "timeInForce": - return ec.fieldContext_Order_timeInForce(ctx, field) - case "side": - return ec.fieldContext_Order_side(ctx, field) - case "market": - return ec.fieldContext_Order_market(ctx, field) - case "size": - return ec.fieldContext_Order_size(ctx, field) - case "remaining": - return ec.fieldContext_Order_remaining(ctx, field) - case "party": - return ec.fieldContext_Order_party(ctx, field) - case "createdAt": - return ec.fieldContext_Order_createdAt(ctx, field) - case "expiresAt": - return ec.fieldContext_Order_expiresAt(ctx, field) - case "status": - return ec.fieldContext_Order_status(ctx, field) - case "reference": - return ec.fieldContext_Order_reference(ctx, field) - case "tradesConnection": - return ec.fieldContext_Order_tradesConnection(ctx, field) - case "type": - return ec.fieldContext_Order_type(ctx, field) - case "rejectionReason": - return ec.fieldContext_Order_rejectionReason(ctx, field) - case "version": - return ec.fieldContext_Order_version(ctx, field) - case "updatedAt": - return ec.fieldContext_Order_updatedAt(ctx, field) - case "peggedOrder": - return ec.fieldContext_Order_peggedOrder(ctx, field) - case "liquidityProvision": - return ec.fieldContext_Order_liquidityProvision(ctx, field) - case "postOnly": - return ec.fieldContext_Order_postOnly(ctx, field) - case "reduceOnly": - return ec.fieldContext_Order_reduceOnly(ctx, field) - case "icebergOrder": - return ec.fieldContext_Order_icebergOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Order", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.OrderEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderEdge_cursor(ctx, field) +func (ec *executionContext) _ObservableMarketData_bestStaticOfferPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_bestStaticOfferPrice(ctx, field) if err != nil { return graphql.Null } @@ -54874,23 +57612,26 @@ func (ec *executionContext) _OrderEdge_cursor(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.BestStaticOfferPrice, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_bestStaticOfferPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderEdge", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, @@ -54901,8 +57642,8 @@ func (ec *executionContext) fieldContext_OrderEdge_cursor(ctx context.Context, f return fc, nil } -func (ec *executionContext) _OrderEstimate_fee(ctx context.Context, field graphql.CollectedField, obj *OrderEstimate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderEstimate_fee(ctx, field) +func (ec *executionContext) _ObservableMarketData_bestStaticOfferVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_bestStaticOfferVolume(ctx, field) if err != nil { return graphql.Null } @@ -54915,7 +57656,7 @@ func (ec *executionContext) _OrderEstimate_fee(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Fee, nil + return ec.resolvers.ObservableMarketData().BestStaticOfferVolume(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -54927,46 +57668,26 @@ func (ec *executionContext) _OrderEstimate_fee(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(*TradeFee) + res := resTmp.(string) fc.Result = res - return ec.marshalNTradeFee2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTradeFee(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderEstimate_fee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_bestStaticOfferVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderEstimate", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "makerFee": - return ec.fieldContext_TradeFee_makerFee(ctx, field) - case "infrastructureFee": - return ec.fieldContext_TradeFee_infrastructureFee(ctx, field) - case "liquidityFee": - return ec.fieldContext_TradeFee_liquidityFee(ctx, field) - case "makerFeeReferralDiscount": - return ec.fieldContext_TradeFee_makerFeeReferralDiscount(ctx, field) - case "makerFeeVolumeDiscount": - return ec.fieldContext_TradeFee_makerFeeVolumeDiscount(ctx, field) - case "infrastructureFeeReferralDiscount": - return ec.fieldContext_TradeFee_infrastructureFeeReferralDiscount(ctx, field) - case "infrastructureFeeVolumeDiscount": - return ec.fieldContext_TradeFee_infrastructureFeeVolumeDiscount(ctx, field) - case "liquidityFeeReferralDiscount": - return ec.fieldContext_TradeFee_liquidityFeeReferralDiscount(ctx, field) - case "liquidityFeeVolumeDiscount": - return ec.fieldContext_TradeFee_liquidityFeeVolumeDiscount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TradeFee", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderEstimate_totalFeeAmount(ctx context.Context, field graphql.CollectedField, obj *OrderEstimate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderEstimate_totalFeeAmount(ctx, field) +func (ec *executionContext) _ObservableMarketData_midPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_midPrice(ctx, field) if err != nil { return graphql.Null } @@ -54979,7 +57700,7 @@ func (ec *executionContext) _OrderEstimate_totalFeeAmount(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalFeeAmount, nil + return obj.MidPrice, nil }) if err != nil { ec.Error(ctx, err) @@ -54996,9 +57717,9 @@ func (ec *executionContext) _OrderEstimate_totalFeeAmount(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderEstimate_totalFeeAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_midPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderEstimate", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, @@ -55009,8 +57730,8 @@ func (ec *executionContext) fieldContext_OrderEstimate_totalFeeAmount(ctx contex return fc, nil } -func (ec *executionContext) _OrderEstimate_marginLevels(ctx context.Context, field graphql.CollectedField, obj *OrderEstimate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderEstimate_marginLevels(ctx, field) +func (ec *executionContext) _ObservableMarketData_staticMidPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_staticMidPrice(ctx, field) if err != nil { return graphql.Null } @@ -55023,7 +57744,7 @@ func (ec *executionContext) _OrderEstimate_marginLevels(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarginLevels, nil + return obj.StaticMidPrice, nil }) if err != nil { ec.Error(ctx, err) @@ -55035,44 +57756,26 @@ func (ec *executionContext) _OrderEstimate_marginLevels(ctx context.Context, fie } return graphql.Null } - res := resTmp.(*vega.MarginLevels) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarginLevels2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginLevels(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderEstimate_marginLevels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_staticMidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderEstimate", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "market": - return ec.fieldContext_MarginLevels_market(ctx, field) - case "asset": - return ec.fieldContext_MarginLevels_asset(ctx, field) - case "party": - return ec.fieldContext_MarginLevels_party(ctx, field) - case "maintenanceLevel": - return ec.fieldContext_MarginLevels_maintenanceLevel(ctx, field) - case "searchLevel": - return ec.fieldContext_MarginLevels_searchLevel(ctx, field) - case "initialLevel": - return ec.fieldContext_MarginLevels_initialLevel(ctx, field) - case "collateralReleaseLevel": - return ec.fieldContext_MarginLevels_collateralReleaseLevel(ctx, field) - case "timestamp": - return ec.fieldContext_MarginLevels_timestamp(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarginLevels", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderSubmission_marketId(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderSubmission_marketId(ctx, field) +func (ec *executionContext) _ObservableMarketData_timestamp(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_timestamp(ctx, field) if err != nil { return graphql.Null } @@ -55085,7 +57788,7 @@ func (ec *executionContext) _OrderSubmission_marketId(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return obj.Timestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -55097,26 +57800,26 @@ func (ec *executionContext) _OrderSubmission_marketId(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderSubmission_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderSubmission", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderSubmission_price(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderSubmission_price(ctx, field) +func (ec *executionContext) _ObservableMarketData_openInterest(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_openInterest(ctx, field) if err != nil { return graphql.Null } @@ -55129,7 +57832,7 @@ func (ec *executionContext) _OrderSubmission_price(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Price, nil + return ec.resolvers.ObservableMarketData().OpenInterest(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -55146,12 +57849,12 @@ func (ec *executionContext) _OrderSubmission_price(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderSubmission_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_openInterest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderSubmission", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -55159,8 +57862,8 @@ func (ec *executionContext) fieldContext_OrderSubmission_price(ctx context.Conte return fc, nil } -func (ec *executionContext) _OrderSubmission_size(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderSubmission_size(ctx, field) +func (ec *executionContext) _ObservableMarketData_auctionEnd(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_auctionEnd(ctx, field) if err != nil { return graphql.Null } @@ -55173,26 +57876,23 @@ func (ec *executionContext) _OrderSubmission_size(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.OrderSubmission().Size(rctx, obj) + return ec.resolvers.ObservableMarketData().AuctionEnd(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderSubmission_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_auctionEnd(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderSubmission", + Object: "ObservableMarketData", Field: field, IsMethod: true, IsResolver: true, @@ -55203,8 +57903,8 @@ func (ec *executionContext) fieldContext_OrderSubmission_size(ctx context.Contex return fc, nil } -func (ec *executionContext) _OrderSubmission_side(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderSubmission_side(ctx, field) +func (ec *executionContext) _ObservableMarketData_auctionStart(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_auctionStart(ctx, field) if err != nil { return graphql.Null } @@ -55217,38 +57917,35 @@ func (ec *executionContext) _OrderSubmission_side(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Side, nil + return ec.resolvers.ObservableMarketData().AuctionStart(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(vega.Side) + res := resTmp.(*string) fc.Result = res - return ec.marshalNSide2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐSide(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderSubmission_side(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_auctionStart(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderSubmission", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Side does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderSubmission_timeInForce(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderSubmission_timeInForce(ctx, field) +func (ec *executionContext) _ObservableMarketData_indicativePrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_indicativePrice(ctx, field) if err != nil { return graphql.Null } @@ -55261,7 +57958,7 @@ func (ec *executionContext) _OrderSubmission_timeInForce(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TimeInForce, nil + return obj.IndicativePrice, nil }) if err != nil { ec.Error(ctx, err) @@ -55273,26 +57970,26 @@ func (ec *executionContext) _OrderSubmission_timeInForce(ctx context.Context, fi } return graphql.Null } - res := resTmp.(vega.Order_TimeInForce) + res := resTmp.(string) fc.Result = res - return ec.marshalNOrderTimeInForce2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_TimeInForce(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderSubmission_timeInForce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_indicativePrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderSubmission", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type OrderTimeInForce does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderSubmission_expiresAt(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderSubmission_expiresAt(ctx, field) +func (ec *executionContext) _ObservableMarketData_indicativeVolume(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_indicativeVolume(ctx, field) if err != nil { return graphql.Null } @@ -55305,7 +58002,7 @@ func (ec *executionContext) _OrderSubmission_expiresAt(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ExpiresAt, nil + return ec.resolvers.ObservableMarketData().IndicativeVolume(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -55317,26 +58014,26 @@ func (ec *executionContext) _OrderSubmission_expiresAt(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderSubmission_expiresAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_indicativeVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderSubmission", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderSubmission_type(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderSubmission_type(ctx, field) +func (ec *executionContext) _ObservableMarketData_marketTradingMode(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_marketTradingMode(ctx, field) if err != nil { return graphql.Null } @@ -55349,7 +58046,7 @@ func (ec *executionContext) _OrderSubmission_type(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.MarketTradingMode, nil }) if err != nil { ec.Error(ctx, err) @@ -55361,26 +58058,26 @@ func (ec *executionContext) _OrderSubmission_type(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(vega.Order_Type) + res := resTmp.(vega.Market_TradingMode) fc.Result = res - return ec.marshalNOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx, field.Selections, res) + return ec.marshalNMarketTradingMode2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket_TradingMode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderSubmission_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_marketTradingMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderSubmission", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type OrderType does not have child fields") + return nil, errors.New("field of type MarketTradingMode does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderSubmission_reference(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderSubmission_reference(ctx, field) +func (ec *executionContext) _ObservableMarketData_marketState(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_marketState(ctx, field) if err != nil { return graphql.Null } @@ -55393,35 +58090,38 @@ func (ec *executionContext) _OrderSubmission_reference(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Reference, nil + return obj.MarketState, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.Market_State) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNMarketState2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket_State(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderSubmission_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_marketState(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderSubmission", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type MarketState does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderSubmission_peggedOrder(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderSubmission_peggedOrder(ctx, field) +func (ec *executionContext) _ObservableMarketData_trigger(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_trigger(ctx, field) if err != nil { return graphql.Null } @@ -55434,41 +58134,38 @@ func (ec *executionContext) _OrderSubmission_peggedOrder(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PeggedOrder, nil + return obj.Trigger, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.PeggedOrder) + res := resTmp.(vega.AuctionTrigger) fc.Result = res - return ec.marshalOPeggedOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPeggedOrder(ctx, field.Selections, res) + return ec.marshalNAuctionTrigger2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAuctionTrigger(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderSubmission_peggedOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderSubmission", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "reference": - return ec.fieldContext_PeggedOrder_reference(ctx, field) - case "offset": - return ec.fieldContext_PeggedOrder_offset(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PeggedOrder", field.Name) + return nil, errors.New("field of type AuctionTrigger does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderSubmission_postOnly(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderSubmission_postOnly(ctx, field) +func (ec *executionContext) _ObservableMarketData_extensionTrigger(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_extensionTrigger(ctx, field) if err != nil { return graphql.Null } @@ -55481,35 +58178,38 @@ func (ec *executionContext) _OrderSubmission_postOnly(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PostOnly, nil + return obj.ExtensionTrigger, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(vega.AuctionTrigger) fc.Result = res - return ec.marshalOBoolean2bool(ctx, field.Selections, res) + return ec.marshalNAuctionTrigger2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAuctionTrigger(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderSubmission_postOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_extensionTrigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderSubmission", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type AuctionTrigger does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderSubmission_reduceOnly(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderSubmission_reduceOnly(ctx, field) +func (ec *executionContext) _ObservableMarketData_targetStake(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_targetStake(ctx, field) if err != nil { return graphql.Null } @@ -55522,7 +58222,7 @@ func (ec *executionContext) _OrderSubmission_reduceOnly(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReduceOnly, nil + return obj.TargetStake, nil }) if err != nil { ec.Error(ctx, err) @@ -55531,26 +58231,26 @@ func (ec *executionContext) _OrderSubmission_reduceOnly(ctx context.Context, fie if resTmp == nil { return graphql.Null } - res := resTmp.(bool) + res := resTmp.(string) fc.Result = res - return ec.marshalOBoolean2bool(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderSubmission_reduceOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_targetStake(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderSubmission", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderSubmission_icebergOrder(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderSubmission_icebergOrder(ctx, field) +func (ec *executionContext) _ObservableMarketData_suppliedStake(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_suppliedStake(ctx, field) if err != nil { return graphql.Null } @@ -55563,7 +58263,7 @@ func (ec *executionContext) _OrderSubmission_icebergOrder(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.OrderSubmission().IcebergOrder(rctx, obj) + return obj.SuppliedStake, nil }) if err != nil { ec.Error(ctx, err) @@ -55572,34 +58272,26 @@ func (ec *executionContext) _OrderSubmission_icebergOrder(ctx context.Context, f if resTmp == nil { return graphql.Null } - res := resTmp.(*vega.IcebergOrder) + res := resTmp.(string) fc.Result = res - return ec.marshalOIcebergOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐIcebergOrder(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderSubmission_icebergOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_suppliedStake(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderSubmission", + Object: "ObservableMarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "peakSize": - return ec.fieldContext_IcebergOrder_peakSize(ctx, field) - case "minimumVisibleSize": - return ec.fieldContext_IcebergOrder_minimumVisibleSize(ctx, field) - case "reservedRemaining": - return ec.fieldContext_IcebergOrder_reservedRemaining(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type IcebergOrder", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_id(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_id(ctx, field) +func (ec *executionContext) _ObservableMarketData_priceMonitoringBounds(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_priceMonitoringBounds(ctx, field) if err != nil { return graphql.Null } @@ -55612,38 +58304,45 @@ func (ec *executionContext) _OrderUpdate_id(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return ec.resolvers.ObservableMarketData().PriceMonitoringBounds(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*PriceMonitoringBounds) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOPriceMonitoringBounds2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringBoundsᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_priceMonitoringBounds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "minValidPrice": + return ec.fieldContext_PriceMonitoringBounds_minValidPrice(ctx, field) + case "maxValidPrice": + return ec.fieldContext_PriceMonitoringBounds_maxValidPrice(ctx, field) + case "trigger": + return ec.fieldContext_PriceMonitoringBounds_trigger(ctx, field) + case "referencePrice": + return ec.fieldContext_PriceMonitoringBounds_referencePrice(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringBounds", field.Name) }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_price(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_price(ctx, field) +func (ec *executionContext) _ObservableMarketData_marketValueProxy(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_marketValueProxy(ctx, field) if err != nil { return graphql.Null } @@ -55656,7 +58355,7 @@ func (ec *executionContext) _OrderUpdate_price(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Price, nil + return obj.MarketValueProxy, nil }) if err != nil { ec.Error(ctx, err) @@ -55673,9 +58372,9 @@ func (ec *executionContext) _OrderUpdate_price(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_marketValueProxy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, @@ -55686,8 +58385,8 @@ func (ec *executionContext) fieldContext_OrderUpdate_price(ctx context.Context, return fc, nil } -func (ec *executionContext) _OrderUpdate_timeInForce(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_timeInForce(ctx, field) +func (ec *executionContext) _ObservableMarketData_liquidityProviderFeeShare(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_liquidityProviderFeeShare(ctx, field) if err != nil { return graphql.Null } @@ -55700,38 +58399,45 @@ func (ec *executionContext) _OrderUpdate_timeInForce(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TimeInForce, nil + return ec.resolvers.ObservableMarketData().LiquidityProviderFeeShare(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(vega.Order_TimeInForce) + res := resTmp.([]*ObservableLiquidityProviderFeeShare) fc.Result = res - return ec.marshalNOrderTimeInForce2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_TimeInForce(ctx, field.Selections, res) + return ec.marshalOObservableLiquidityProviderFeeShare2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐObservableLiquidityProviderFeeShareᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_timeInForce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_liquidityProviderFeeShare(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type OrderTimeInForce does not have child fields") + switch field.Name { + case "partyId": + return ec.fieldContext_ObservableLiquidityProviderFeeShare_partyId(ctx, field) + case "equityLikeShare": + return ec.fieldContext_ObservableLiquidityProviderFeeShare_equityLikeShare(ctx, field) + case "averageEntryValuation": + return ec.fieldContext_ObservableLiquidityProviderFeeShare_averageEntryValuation(ctx, field) + case "averageScore": + return ec.fieldContext_ObservableLiquidityProviderFeeShare_averageScore(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ObservableLiquidityProviderFeeShare", field.Name) }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_side(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_side(ctx, field) +func (ec *executionContext) _ObservableMarketData_liquidityProviderSla(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_liquidityProviderSla(ctx, field) if err != nil { return graphql.Null } @@ -55744,38 +58450,55 @@ func (ec *executionContext) _OrderUpdate_side(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Side, nil + return ec.resolvers.ObservableMarketData().LiquidityProviderSLA(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(vega.Side) + res := resTmp.([]*ObservableLiquidityProviderSLA) fc.Result = res - return ec.marshalNSide2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐSide(ctx, field.Selections, res) + return ec.marshalOObservableLiquidityProviderSLA2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐObservableLiquidityProviderSLAᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_side(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_liquidityProviderSla(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Side does not have child fields") + switch field.Name { + case "party": + return ec.fieldContext_ObservableLiquidityProviderSLA_party(ctx, field) + case "currentEpochFractionOfTimeOnBook": + return ec.fieldContext_ObservableLiquidityProviderSLA_currentEpochFractionOfTimeOnBook(ctx, field) + case "lastEpochFractionOfTimeOnBook": + return ec.fieldContext_ObservableLiquidityProviderSLA_lastEpochFractionOfTimeOnBook(ctx, field) + case "lastEpochFeePenalty": + return ec.fieldContext_ObservableLiquidityProviderSLA_lastEpochFeePenalty(ctx, field) + case "lastEpochBondPenalty": + return ec.fieldContext_ObservableLiquidityProviderSLA_lastEpochBondPenalty(ctx, field) + case "hysteresisPeriodFeePenalties": + return ec.fieldContext_ObservableLiquidityProviderSLA_hysteresisPeriodFeePenalties(ctx, field) + case "requiredLiquidity": + return ec.fieldContext_ObservableLiquidityProviderSLA_requiredLiquidity(ctx, field) + case "notionalVolumeBuys": + return ec.fieldContext_ObservableLiquidityProviderSLA_notionalVolumeBuys(ctx, field) + case "notionalVolumeSells": + return ec.fieldContext_ObservableLiquidityProviderSLA_notionalVolumeSells(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ObservableLiquidityProviderSLA", field.Name) }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_marketId(ctx, field) +func (ec *executionContext) _ObservableMarketData_nextMarkToMarket(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_nextMarkToMarket(ctx, field) if err != nil { return graphql.Null } @@ -55788,7 +58511,7 @@ func (ec *executionContext) _OrderUpdate_marketId(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return ec.resolvers.ObservableMarketData().NextMarkToMarket(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -55802,24 +58525,24 @@ func (ec *executionContext) _OrderUpdate_marketId(ctx context.Context, field gra } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_nextMarkToMarket(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_size(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_size(ctx, field) +func (ec *executionContext) _ObservableMarketData_marketGrowth(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_marketGrowth(ctx, field) if err != nil { return graphql.Null } @@ -55832,7 +58555,7 @@ func (ec *executionContext) _OrderUpdate_size(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.OrderUpdate().Size(rctx, obj) + return obj.MarketGrowth, nil }) if err != nil { ec.Error(ctx, err) @@ -55849,12 +58572,12 @@ func (ec *executionContext) _OrderUpdate_size(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_marketGrowth(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -55862,8 +58585,8 @@ func (ec *executionContext) fieldContext_OrderUpdate_size(ctx context.Context, f return fc, nil } -func (ec *executionContext) _OrderUpdate_remaining(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_remaining(ctx, field) +func (ec *executionContext) _ObservableMarketData_lastTradedPrice(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_lastTradedPrice(ctx, field) if err != nil { return graphql.Null } @@ -55876,7 +58599,7 @@ func (ec *executionContext) _OrderUpdate_remaining(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.OrderUpdate().Remaining(rctx, obj) + return obj.LastTradedPrice, nil }) if err != nil { ec.Error(ctx, err) @@ -55893,12 +58616,12 @@ func (ec *executionContext) _OrderUpdate_remaining(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_remaining(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_lastTradedPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketData", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -55906,8 +58629,8 @@ func (ec *executionContext) fieldContext_OrderUpdate_remaining(ctx context.Conte return fc, nil } -func (ec *executionContext) _OrderUpdate_partyId(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_partyId(ctx, field) +func (ec *executionContext) _ObservableMarketData_productData(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_productData(ctx, field) if err != nil { return graphql.Null } @@ -55920,38 +58643,35 @@ func (ec *executionContext) _OrderUpdate_partyId(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PartyId, nil + return ec.resolvers.ObservableMarketData().ProductData(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(ProductData) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOProductData2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProductData(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_productData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type ProductData does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_createdAt(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_createdAt(ctx, field) +func (ec *executionContext) _ObservableMarketData_markPriceType(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_markPriceType(ctx, field) if err != nil { return graphql.Null } @@ -55964,7 +58684,7 @@ func (ec *executionContext) _OrderUpdate_createdAt(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreatedAt, nil + return ec.resolvers.ObservableMarketData().MarkPriceType(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -55976,26 +58696,26 @@ func (ec *executionContext) _OrderUpdate_createdAt(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(CompositePriceType) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNCompositePriceType2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐCompositePriceType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_markPriceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type CompositePriceType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_expiresAt(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_expiresAt(ctx, field) +func (ec *executionContext) _ObservableMarketData_markPriceState(ctx context.Context, field graphql.CollectedField, obj *vega.MarketData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketData_markPriceState(ctx, field) if err != nil { return graphql.Null } @@ -56008,7 +58728,7 @@ func (ec *executionContext) _OrderUpdate_expiresAt(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ExpiresAt, nil + return obj.MarkPriceState, nil }) if err != nil { ec.Error(ctx, err) @@ -56017,26 +58737,30 @@ func (ec *executionContext) _OrderUpdate_expiresAt(ctx context.Context, field gr if resTmp == nil { return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*vega.CompositePriceState) fc.Result = res - return ec.marshalOTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOCompositePriceState2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_expiresAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketData_markPriceState(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "priceSources": + return ec.fieldContext_CompositePriceState_priceSources(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CompositePriceState", field.Name) }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_status(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_status(ctx, field) +func (ec *executionContext) _ObservableMarketDepth_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketDepth_marketId(ctx, field) if err != nil { return graphql.Null } @@ -56049,7 +58773,7 @@ func (ec *executionContext) _OrderUpdate_status(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.MarketId, nil }) if err != nil { ec.Error(ctx, err) @@ -56061,26 +58785,26 @@ func (ec *executionContext) _OrderUpdate_status(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(vega.Order_Status) + res := resTmp.(string) fc.Result = res - return ec.marshalNOrderStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Status(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketDepth_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketDepth", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type OrderStatus does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_reference(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_reference(ctx, field) +func (ec *executionContext) _ObservableMarketDepth_buy(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketDepth_buy(ctx, field) if err != nil { return graphql.Null } @@ -56093,38 +58817,43 @@ func (ec *executionContext) _OrderUpdate_reference(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Reference, nil + return obj.Buy, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.PriceLevel) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketDepth_buy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketDepth", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "price": + return ec.fieldContext_PriceLevel_price(ctx, field) + case "volume": + return ec.fieldContext_PriceLevel_volume(ctx, field) + case "numberOfOrders": + return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_type(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_type(ctx, field) +func (ec *executionContext) _ObservableMarketDepth_sell(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketDepth_sell(ctx, field) if err != nil { return graphql.Null } @@ -56137,7 +58866,7 @@ func (ec *executionContext) _OrderUpdate_type(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.Sell, nil }) if err != nil { ec.Error(ctx, err) @@ -56146,26 +58875,34 @@ func (ec *executionContext) _OrderUpdate_type(ctx context.Context, field graphql if resTmp == nil { return graphql.Null } - res := resTmp.(vega.Order_Type) + res := resTmp.([]*vega.PriceLevel) fc.Result = res - return ec.marshalOOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx, field.Selections, res) + return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketDepth_sell(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketDepth", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type OrderType does not have child fields") + switch field.Name { + case "price": + return ec.fieldContext_PriceLevel_price(ctx, field) + case "volume": + return ec.fieldContext_PriceLevel_volume(ctx, field) + case "numberOfOrders": + return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_rejectionReason(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_rejectionReason(ctx, field) +func (ec *executionContext) _ObservableMarketDepth_lastTrade(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketDepth_lastTrade(ctx, field) if err != nil { return graphql.Null } @@ -56178,35 +58915,46 @@ func (ec *executionContext) _OrderUpdate_rejectionReason(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.OrderUpdate().RejectionReason(rctx, obj) + return ec.resolvers.ObservableMarketDepth().LastTrade(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.OrderError) + res := resTmp.(*MarketDepthTrade) fc.Result = res - return ec.marshalOOrderRejectionReason2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrderError(ctx, field.Selections, res) + return ec.marshalNMarketDepthTrade2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐMarketDepthTrade(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_rejectionReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketDepth_lastTrade(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketDepth", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type OrderRejectionReason does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_MarketDepthTrade_id(ctx, field) + case "price": + return ec.fieldContext_MarketDepthTrade_price(ctx, field) + case "size": + return ec.fieldContext_MarketDepthTrade_size(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type MarketDepthTrade", field.Name) }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_version(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_version(ctx, field) +func (ec *executionContext) _ObservableMarketDepth_sequenceNumber(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepth) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketDepth_sequenceNumber(ctx, field) if err != nil { return graphql.Null } @@ -56219,7 +58967,7 @@ func (ec *executionContext) _OrderUpdate_version(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.OrderUpdate().Version(rctx, obj) + return ec.resolvers.ObservableMarketDepth().SequenceNumber(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -56236,9 +58984,9 @@ func (ec *executionContext) _OrderUpdate_version(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketDepth_sequenceNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketDepth", Field: field, IsMethod: true, IsResolver: true, @@ -56249,8 +58997,8 @@ func (ec *executionContext) fieldContext_OrderUpdate_version(ctx context.Context return fc, nil } -func (ec *executionContext) _OrderUpdate_updatedAt(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_updatedAt(ctx, field) +func (ec *executionContext) _ObservableMarketDepthUpdate_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketDepthUpdate_marketId(ctx, field) if err != nil { return graphql.Null } @@ -56263,35 +59011,38 @@ func (ec *executionContext) _OrderUpdate_updatedAt(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdatedAt, nil + return obj.MarketId, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalOTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketDepthUpdate_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketDepthUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_peggedOrder(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_peggedOrder(ctx, field) +func (ec *executionContext) _ObservableMarketDepthUpdate_buy(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketDepthUpdate_buy(ctx, field) if err != nil { return graphql.Null } @@ -56304,7 +59055,7 @@ func (ec *executionContext) _OrderUpdate_peggedOrder(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PeggedOrder, nil + return obj.Buy, nil }) if err != nil { ec.Error(ctx, err) @@ -56313,32 +59064,34 @@ func (ec *executionContext) _OrderUpdate_peggedOrder(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(*vega.PeggedOrder) + res := resTmp.([]*vega.PriceLevel) fc.Result = res - return ec.marshalOPeggedOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPeggedOrder(ctx, field.Selections, res) + return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_peggedOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketDepthUpdate_buy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketDepthUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "reference": - return ec.fieldContext_PeggedOrder_reference(ctx, field) - case "offset": - return ec.fieldContext_PeggedOrder_offset(ctx, field) + case "price": + return ec.fieldContext_PriceLevel_price(ctx, field) + case "volume": + return ec.fieldContext_PriceLevel_volume(ctx, field) + case "numberOfOrders": + return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PeggedOrder", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_liquidityProvisionId(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_liquidityProvisionId(ctx, field) +func (ec *executionContext) _ObservableMarketDepthUpdate_sell(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketDepthUpdate_sell(ctx, field) if err != nil { return graphql.Null } @@ -56351,7 +59104,7 @@ func (ec *executionContext) _OrderUpdate_liquidityProvisionId(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LiquidityProvisionId, nil + return obj.Sell, nil }) if err != nil { ec.Error(ctx, err) @@ -56360,26 +59113,34 @@ func (ec *executionContext) _OrderUpdate_liquidityProvisionId(ctx context.Contex if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.PriceLevel) fc.Result = res - return ec.marshalOID2string(ctx, field.Selections, res) + return ec.marshalOPriceLevel2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPriceLevelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_liquidityProvisionId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketDepthUpdate_sell(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketDepthUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "price": + return ec.fieldContext_PriceLevel_price(ctx, field) + case "volume": + return ec.fieldContext_PriceLevel_volume(ctx, field) + case "numberOfOrders": + return ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PriceLevel", field.Name) }, } return fc, nil } -func (ec *executionContext) _OrderUpdate_icebergOrder(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_OrderUpdate_icebergOrder(ctx, field) +func (ec *executionContext) _ObservableMarketDepthUpdate_sequenceNumber(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketDepthUpdate_sequenceNumber(ctx, field) if err != nil { return graphql.Null } @@ -56392,43 +59153,38 @@ func (ec *executionContext) _OrderUpdate_icebergOrder(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IcebergOrder, nil + return ec.resolvers.ObservableMarketDepthUpdate().SequenceNumber(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.IcebergOrder) + res := resTmp.(string) fc.Result = res - return ec.marshalOIcebergOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐIcebergOrder(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OrderUpdate_icebergOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketDepthUpdate_sequenceNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "OrderUpdate", + Object: "ObservableMarketDepthUpdate", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "peakSize": - return ec.fieldContext_IcebergOrder_peakSize(ctx, field) - case "minimumVisibleSize": - return ec.fieldContext_IcebergOrder_minimumVisibleSize(ctx, field) - case "reservedRemaining": - return ec.fieldContext_IcebergOrder_reservedRemaining(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type IcebergOrder", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *v2.PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_hasNextPage(ctx, field) +func (ec *executionContext) _ObservableMarketDepthUpdate_previousSequenceNumber(ctx context.Context, field graphql.CollectedField, obj *vega.MarketDepthUpdate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ObservableMarketDepthUpdate_previousSequenceNumber(ctx, field) if err != nil { return graphql.Null } @@ -56441,7 +59197,7 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HasNextPage, nil + return ec.resolvers.ObservableMarketDepthUpdate().PreviousSequenceNumber(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -56453,26 +59209,26 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(string) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ObservableMarketDepthUpdate_previousSequenceNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PageInfo", + Object: "ObservableMarketDepthUpdate", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *v2.PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) +func (ec *executionContext) _OneOffGovernanceTransfer_deliverOn(ctx context.Context, field graphql.CollectedField, obj *v1.OneOffGovernanceTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OneOffGovernanceTransfer_deliverOn(ctx, field) if err != nil { return graphql.Null } @@ -56485,38 +59241,35 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HasPreviousPage, nil + return obj.DeliverOn, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(int64) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OneOffGovernanceTransfer_deliverOn(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PageInfo", + Object: "OneOffGovernanceTransfer", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *v2.PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_startCursor(ctx, field) +func (ec *executionContext) _OneOffTransfer_deliverOn(ctx context.Context, field graphql.CollectedField, obj *v1.OneOffTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OneOffTransfer_deliverOn(ctx, field) if err != nil { return graphql.Null } @@ -56529,38 +59282,35 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.StartCursor, nil + return obj.DeliverOn, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_startCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OneOffTransfer_deliverOn(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PageInfo", + Object: "OneOffTransfer", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *v2.PageInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_endCursor(ctx, field) +func (ec *executionContext) _OracleData_externalData(ctx context.Context, field graphql.CollectedField, obj *vega.OracleData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OracleData_externalData(ctx, field) if err != nil { return graphql.Null } @@ -56573,7 +59323,7 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EndCursor, nil + return ec.resolvers.OracleData().ExternalData(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -56585,26 +59335,30 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*ExternalData) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNExternalData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐExternalData(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_endCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OracleData_externalData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PageInfo", + Object: "OracleData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "data": + return ec.fieldContext_ExternalData_data(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ExternalData", field.Name) }, } return fc, nil } -func (ec *executionContext) _PaidLiquidityFees_marketId(ctx context.Context, field graphql.CollectedField, obj *v1.PaidLiquidityFeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaidLiquidityFees_marketId(ctx, field) +func (ec *executionContext) _OracleDataConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.OracleDataConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OracleDataConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -56617,38 +59371,41 @@ func (ec *executionContext) _PaidLiquidityFees_marketId(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PaidLiquidityFees().MarketID(rctx, obj) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.OracleDataEdge) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOOracleDataEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOracleDataEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaidLiquidityFees_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OracleDataConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaidLiquidityFees", + Object: "OracleDataConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_OracleDataEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_OracleDataEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OracleDataEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _PaidLiquidityFees_assetId(ctx context.Context, field graphql.CollectedField, obj *v1.PaidLiquidityFeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaidLiquidityFees_assetId(ctx, field) +func (ec *executionContext) _OracleDataConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.OracleDataConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OracleDataConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -56661,7 +59418,7 @@ func (ec *executionContext) _PaidLiquidityFees_assetId(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PaidLiquidityFees().AssetID(rctx, obj) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -56673,26 +59430,36 @@ func (ec *executionContext) _PaidLiquidityFees_assetId(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaidLiquidityFees_assetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OracleDataConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaidLiquidityFees", + Object: "OracleDataConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _PaidLiquidityFees_epoch(ctx context.Context, field graphql.CollectedField, obj *v1.PaidLiquidityFeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaidLiquidityFees_epoch(ctx, field) +func (ec *executionContext) _OracleDataEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.OracleDataEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OracleDataEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -56705,7 +59472,7 @@ func (ec *executionContext) _PaidLiquidityFees_epoch(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PaidLiquidityFees().Epoch(rctx, obj) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -56717,26 +59484,30 @@ func (ec *executionContext) _PaidLiquidityFees_epoch(ctx context.Context, field } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*vega.OracleData) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNOracleData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOracleData(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaidLiquidityFees_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OracleDataEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaidLiquidityFees", + Object: "OracleDataEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "externalData": + return ec.fieldContext_OracleData_externalData(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OracleData", field.Name) }, } return fc, nil } -func (ec *executionContext) _PaidLiquidityFees_totalFeesPaid(ctx context.Context, field graphql.CollectedField, obj *v1.PaidLiquidityFeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaidLiquidityFees_totalFeesPaid(ctx, field) +func (ec *executionContext) _OracleDataEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.OracleDataEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OracleDataEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -56749,7 +59520,7 @@ func (ec *executionContext) _PaidLiquidityFees_totalFeesPaid(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalFeesPaid, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -56766,9 +59537,9 @@ func (ec *executionContext) _PaidLiquidityFees_totalFeesPaid(ctx context.Context return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaidLiquidityFees_totalFeesPaid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OracleDataEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaidLiquidityFees", + Object: "OracleDataEdge", Field: field, IsMethod: false, IsResolver: false, @@ -56779,8 +59550,8 @@ func (ec *executionContext) fieldContext_PaidLiquidityFees_totalFeesPaid(ctx con return fc, nil } -func (ec *executionContext) _PaidLiquidityFees_feesPaidPerParty(ctx context.Context, field graphql.CollectedField, obj *v1.PaidLiquidityFeesStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaidLiquidityFees_feesPaidPerParty(ctx, field) +func (ec *executionContext) _OracleSpec_dataSourceSpec(ctx context.Context, field graphql.CollectedField, obj *vega.OracleSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OracleSpec_dataSourceSpec(ctx, field) if err != nil { return graphql.Null } @@ -56793,7 +59564,7 @@ func (ec *executionContext) _PaidLiquidityFees_feesPaidPerParty(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.FeesPaidPerParty, nil + return ec.resolvers.OracleSpec().DataSourceSpec(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -56805,32 +59576,30 @@ func (ec *executionContext) _PaidLiquidityFees_feesPaidPerParty(ctx context.Cont } return graphql.Null } - res := resTmp.([]*v1.PartyAmount) + res := resTmp.(*ExternalDataSourceSpec) fc.Result = res - return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) + return ec.marshalNExternalDataSourceSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐExternalDataSourceSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaidLiquidityFees_feesPaidPerParty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OracleSpec_dataSourceSpec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaidLiquidityFees", + Object: "OracleSpec", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "partyId": - return ec.fieldContext_PartyAmount_partyId(ctx, field) - case "amount": - return ec.fieldContext_PartyAmount_amount(ctx, field) + case "spec": + return ec.fieldContext_ExternalDataSourceSpec_spec(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ExternalDataSourceSpec", field.Name) }, } return fc, nil } -func (ec *executionContext) _PaidLiquidityFeesConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.PaidLiquidityFeesConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaidLiquidityFeesConnection_edges(ctx, field) +func (ec *executionContext) _OracleSpec_dataConnection(ctx context.Context, field graphql.CollectedField, obj *vega.OracleSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OracleSpec_dataConnection(ctx, field) if err != nil { return graphql.Null } @@ -56843,7 +59612,7 @@ func (ec *executionContext) _PaidLiquidityFeesConnection_edges(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.OracleSpec().DataConnection(rctx, obj, fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -56855,32 +59624,43 @@ func (ec *executionContext) _PaidLiquidityFeesConnection_edges(ctx context.Conte } return graphql.Null } - res := resTmp.([]*v2.PaidLiquidityFeesEdge) + res := resTmp.(*v2.OracleDataConnection) fc.Result = res - return ec.marshalNPaidLiquidityFeesEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPaidLiquidityFeesEdge(ctx, field.Selections, res) + return ec.marshalNOracleDataConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOracleDataConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaidLiquidityFeesConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OracleSpec_dataConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaidLiquidityFeesConnection", + Object: "OracleSpec", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_PaidLiquidityFeesEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_PaidLiquidityFeesEdge_cursor(ctx, field) + case "edges": + return ec.fieldContext_OracleDataConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_OracleDataConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PaidLiquidityFeesEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type OracleDataConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_OracleSpec_dataConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _PaidLiquidityFeesConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.PaidLiquidityFeesConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaidLiquidityFeesConnection_pageInfo(ctx, field) +func (ec *executionContext) _OracleSpecEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.OracleSpecEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OracleSpecEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -56893,7 +59673,7 @@ func (ec *executionContext) _PaidLiquidityFeesConnection_pageInfo(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -56905,36 +59685,32 @@ func (ec *executionContext) _PaidLiquidityFeesConnection_pageInfo(ctx context.Co } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(*vega.OracleSpec) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNOracleSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOracleSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaidLiquidityFeesConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OracleSpecEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaidLiquidityFeesConnection", + Object: "OracleSpecEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "dataSourceSpec": + return ec.fieldContext_OracleSpec_dataSourceSpec(ctx, field) + case "dataConnection": + return ec.fieldContext_OracleSpec_dataConnection(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, fmt.Errorf("no field named %q was found under type OracleSpec", field.Name) }, } return fc, nil } -func (ec *executionContext) _PaidLiquidityFeesEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.PaidLiquidityFeesEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaidLiquidityFeesEdge_node(ctx, field) +func (ec *executionContext) _OracleSpecEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.OracleSpecEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OracleSpecEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -56947,7 +59723,7 @@ func (ec *executionContext) _PaidLiquidityFeesEdge_node(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -56959,38 +59735,73 @@ func (ec *executionContext) _PaidLiquidityFeesEdge_node(ctx context.Context, fie } return graphql.Null } - res := resTmp.(*v1.PaidLiquidityFeesStats) + res := resTmp.(string) fc.Result = res - return ec.marshalNPaidLiquidityFees2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPaidLiquidityFeesStats(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaidLiquidityFeesEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OracleSpecEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaidLiquidityFeesEdge", + Object: "OracleSpecEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _OracleSpecsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.OracleSpecsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OracleSpecsConnection_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*v2.OracleSpecEdge) + fc.Result = res + return ec.marshalOOracleSpecEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOracleSpecEdge(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_OracleSpecsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "OracleSpecsConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "marketId": - return ec.fieldContext_PaidLiquidityFees_marketId(ctx, field) - case "assetId": - return ec.fieldContext_PaidLiquidityFees_assetId(ctx, field) - case "epoch": - return ec.fieldContext_PaidLiquidityFees_epoch(ctx, field) - case "totalFeesPaid": - return ec.fieldContext_PaidLiquidityFees_totalFeesPaid(ctx, field) - case "feesPaidPerParty": - return ec.fieldContext_PaidLiquidityFees_feesPaidPerParty(ctx, field) + case "node": + return ec.fieldContext_OracleSpecEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_OracleSpecEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PaidLiquidityFees", field.Name) + return nil, fmt.Errorf("no field named %q was found under type OracleSpecEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _PaidLiquidityFeesEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.PaidLiquidityFeesEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaidLiquidityFeesEdge_cursor(ctx, field) +func (ec *executionContext) _OracleSpecsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.OracleSpecsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OracleSpecsConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -57003,7 +59814,7 @@ func (ec *executionContext) _PaidLiquidityFeesEdge_cursor(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -57015,26 +59826,36 @@ func (ec *executionContext) _PaidLiquidityFeesEdge_cursor(ctx context.Context, f } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaidLiquidityFeesEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OracleSpecsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaidLiquidityFeesEdge", + Object: "OracleSpecsConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Party_id(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_id(ctx, field) +func (ec *executionContext) _Order_id(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_id(ctx, field) if err != nil { return graphql.Null } @@ -57064,9 +59885,9 @@ func (ec *executionContext) _Party_id(ctx context.Context, field graphql.Collect return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, IsMethod: false, IsResolver: false, @@ -57077,8 +59898,8 @@ func (ec *executionContext) fieldContext_Party_id(ctx context.Context, field gra return fc, nil } -func (ec *executionContext) _Party_ordersConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_ordersConnection(ctx, field) +func (ec *executionContext) _Order_price(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_price(ctx, field) if err != nil { return graphql.Null } @@ -57091,52 +59912,38 @@ func (ec *executionContext) _Party_ordersConnection(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().OrdersConnection(rctx, obj, fc.Args["pagination"].(*v2.Pagination), fc.Args["filter"].(*OrderByMarketIdsFilter)) + return obj.Price, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.OrderConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOOrderConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOrderConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_ordersConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_OrderConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_OrderConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OrderConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_ordersConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_tradesConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_tradesConnection(ctx, field) +func (ec *executionContext) _Order_timeInForce(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_timeInForce(ctx, field) if err != nil { return graphql.Null } @@ -57149,52 +59956,38 @@ func (ec *executionContext) _Party_tradesConnection(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().TradesConnection(rctx, obj, fc.Args["marketId"].(*string), fc.Args["dataRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) + return obj.TimeInForce, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.TradeConnection) + res := resTmp.(vega.Order_TimeInForce) fc.Result = res - return ec.marshalOTradeConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTradeConnection(ctx, field.Selections, res) + return ec.marshalNOrderTimeInForce2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_TimeInForce(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_tradesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_timeInForce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_TradeConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_TradeConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TradeConnection", field.Name) + return nil, errors.New("field of type OrderTimeInForce does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_tradesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_accountsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_accountsConnection(ctx, field) +func (ec *executionContext) _Order_side(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_side(ctx, field) if err != nil { return graphql.Null } @@ -57207,52 +60000,38 @@ func (ec *executionContext) _Party_accountsConnection(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().AccountsConnection(rctx, obj, fc.Args["marketId"].(*string), fc.Args["assetId"].(*string), fc.Args["type"].(*vega.AccountType), fc.Args["pagination"].(*v2.Pagination)) + return obj.Side, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.AccountsConnection) + res := resTmp.(vega.Side) fc.Result = res - return ec.marshalOAccountsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAccountsConnection(ctx, field.Selections, res) + return ec.marshalNSide2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐSide(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_accountsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_side(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_AccountsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_AccountsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type AccountsConnection", field.Name) + return nil, errors.New("field of type Side does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_accountsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_positionsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_positionsConnection(ctx, field) +func (ec *executionContext) _Order_market(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_market(ctx, field) if err != nil { return graphql.Null } @@ -57265,52 +60044,100 @@ func (ec *executionContext) _Party_positionsConnection(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().PositionsConnection(rctx, obj, fc.Args["market"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Order().Market(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.PositionConnection) + res := resTmp.(*vega.Market) fc.Result = res - return ec.marshalOPositionConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPositionConnection(ctx, field.Selections, res) + return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_positionsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_PositionConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_PositionConnection_pageInfo(ctx, field) + case "id": + return ec.fieldContext_Market_id(ctx, field) + case "fees": + return ec.fieldContext_Market_fees(ctx, field) + case "tradableInstrument": + return ec.fieldContext_Market_tradableInstrument(ctx, field) + case "decimalPlaces": + return ec.fieldContext_Market_decimalPlaces(ctx, field) + case "positionDecimalPlaces": + return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) + case "openingAuction": + return ec.fieldContext_Market_openingAuction(ctx, field) + case "priceMonitoringSettings": + return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) + case "liquidityMonitoringParameters": + return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) + case "tradingMode": + return ec.fieldContext_Market_tradingMode(ctx, field) + case "state": + return ec.fieldContext_Market_state(ctx, field) + case "proposal": + return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) + case "ordersConnection": + return ec.fieldContext_Market_ordersConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Market_accountsConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Market_tradesConnection(ctx, field) + case "depth": + return ec.fieldContext_Market_depth(ctx, field) + case "candlesConnection": + return ec.fieldContext_Market_candlesConnection(ctx, field) + case "data": + return ec.fieldContext_Market_data(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Market_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) + case "marketTimestamps": + return ec.fieldContext_Market_marketTimestamps(ctx, field) + case "riskFactors": + return ec.fieldContext_Market_riskFactors(ctx, field) + case "linearSlippageFactor": + return ec.fieldContext_Market_linearSlippageFactor(ctx, field) + case "quadraticSlippageFactor": + return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) + case "parentMarketID": + return ec.fieldContext_Market_parentMarketID(ctx, field) + case "insurancePoolFraction": + return ec.fieldContext_Market_insurancePoolFraction(ctx, field) + case "successorMarketID": + return ec.fieldContext_Market_successorMarketID(ctx, field) + case "liquiditySLAParameters": + return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PositionConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_positionsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_marginsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_marginsConnection(ctx, field) +func (ec *executionContext) _Order_size(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_size(ctx, field) if err != nil { return graphql.Null } @@ -57323,52 +60150,38 @@ func (ec *executionContext) _Party_marginsConnection(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().MarginsConnection(rctx, obj, fc.Args["marketId"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Order().Size(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.MarginConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOMarginConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarginConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_marginsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_MarginConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_MarginConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarginConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_marginsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_proposalsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_proposalsConnection(ctx, field) +func (ec *executionContext) _Order_remaining(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_remaining(ctx, field) if err != nil { return graphql.Null } @@ -57381,52 +60194,38 @@ func (ec *executionContext) _Party_proposalsConnection(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().ProposalsConnection(rctx, obj, fc.Args["proposalType"].(*v2.ListGovernanceDataRequest_Type), fc.Args["inState"].(*vega.Proposal_State), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Order().Remaining(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.GovernanceDataConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOProposalsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGovernanceDataConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_proposalsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_remaining(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_ProposalsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_ProposalsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ProposalsConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_proposalsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_votesConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_votesConnection(ctx, field) +func (ec *executionContext) _Order_party(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_party(ctx, field) if err != nil { return graphql.Null } @@ -57439,52 +60238,80 @@ func (ec *executionContext) _Party_votesConnection(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().VotesConnection(rctx, obj, fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Order().Party(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ProposalVoteConnection) + res := resTmp.(*vega.Party) fc.Result = res - return ec.marshalOProposalVoteConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVoteConnection(ctx, field.Selections, res) + return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_votesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_ProposalVoteConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_ProposalVoteConnection_pageInfo(ctx, field) + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ProposalVoteConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_votesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_withdrawalsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_withdrawalsConnection(ctx, field) +func (ec *executionContext) _Order_createdAt(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_createdAt(ctx, field) if err != nil { return graphql.Null } @@ -57497,52 +60324,38 @@ func (ec *executionContext) _Party_withdrawalsConnection(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().WithdrawalsConnection(rctx, obj, fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) + return obj.CreatedAt, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.WithdrawalsConnection) + res := resTmp.(int64) fc.Result = res - return ec.marshalOWithdrawalsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐWithdrawalsConnection(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_withdrawalsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_WithdrawalsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_WithdrawalsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type WithdrawalsConnection", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_withdrawalsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_depositsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_depositsConnection(ctx, field) +func (ec *executionContext) _Order_expiresAt(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_expiresAt(ctx, field) if err != nil { return graphql.Null } @@ -57555,7 +60368,7 @@ func (ec *executionContext) _Party_depositsConnection(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().DepositsConnection(rctx, obj, fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) + return obj.ExpiresAt, nil }) if err != nil { ec.Error(ctx, err) @@ -57564,43 +60377,26 @@ func (ec *executionContext) _Party_depositsConnection(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.DepositsConnection) + res := resTmp.(int64) fc.Result = res - return ec.marshalODepositsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDepositsConnection(ctx, field.Selections, res) + return ec.marshalOTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_depositsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_expiresAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_DepositsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_DepositsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DepositsConnection", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_depositsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_liquidityProvisions(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_liquidityProvisions(ctx, field) +func (ec *executionContext) _Order_status(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_status(ctx, field) if err != nil { return graphql.Null } @@ -57613,52 +60409,38 @@ func (ec *executionContext) _Party_liquidityProvisions(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().LiquidityProvisions(rctx, obj, fc.Args["marketId"].(*string), fc.Args["reference"].(*string), fc.Args["live"].(*bool), fc.Args["pagination"].(*v2.Pagination)) + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.LiquidityProvisionsWithPendingConnection) + res := resTmp.(vega.Order_Status) fc.Result = res - return ec.marshalOLiquidityProvisionsWithPendingConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvisionsWithPendingConnection(ctx, field.Selections, res) + return ec.marshalNOrderStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Status(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_liquidityProvisions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_LiquidityProvisionsWithPendingConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_LiquidityProvisionsWithPendingConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionsWithPendingConnection", field.Name) + return nil, errors.New("field of type OrderStatus does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_liquidityProvisions_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_liquidityProvisionsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) +func (ec *executionContext) _Order_reference(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_reference(ctx, field) if err != nil { return graphql.Null } @@ -57671,52 +60453,38 @@ func (ec *executionContext) _Party_liquidityProvisionsConnection(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().LiquidityProvisionsConnection(rctx, obj, fc.Args["marketId"].(*string), fc.Args["reference"].(*string), fc.Args["live"].(*bool), fc.Args["pagination"].(*v2.Pagination)) + return obj.Reference, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.LiquidityProvisionsConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOLiquidityProvisionsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvisionsConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_liquidityProvisionsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_LiquidityProvisionsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_LiquidityProvisionsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionsConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_liquidityProvisionsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_delegationsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_delegationsConnection(ctx, field) +func (ec *executionContext) _Order_tradesConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_tradesConnection(ctx, field) if err != nil { return graphql.Null } @@ -57729,7 +60497,7 @@ func (ec *executionContext) _Party_delegationsConnection(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().DelegationsConnection(rctx, obj, fc.Args["nodeId"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Order().TradesConnection(rctx, obj, fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -57738,25 +60506,25 @@ func (ec *executionContext) _Party_delegationsConnection(ctx context.Context, fi if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.DelegationsConnection) + res := resTmp.(*v2.TradeConnection) fc.Result = res - return ec.marshalODelegationsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDelegationsConnection(ctx, field.Selections, res) + return ec.marshalOTradeConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTradeConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_delegationsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_tradesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "edges": - return ec.fieldContext_DelegationsConnection_edges(ctx, field) + return ec.fieldContext_TradeConnection_edges(ctx, field) case "pageInfo": - return ec.fieldContext_DelegationsConnection_pageInfo(ctx, field) + return ec.fieldContext_TradeConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type DelegationsConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TradeConnection", field.Name) }, } defer func() { @@ -57766,15 +60534,15 @@ func (ec *executionContext) fieldContext_Party_delegationsConnection(ctx context } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_delegationsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Order_tradesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return } return fc, nil } -func (ec *executionContext) _Party_stakingSummary(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_stakingSummary(ctx, field) +func (ec *executionContext) _Order_type(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_type(ctx, field) if err != nil { return graphql.Null } @@ -57787,55 +60555,35 @@ func (ec *executionContext) _Party_stakingSummary(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().StakingSummary(rctx, obj, fc.Args["pagination"].(*v2.Pagination)) + return obj.Type, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*StakingSummary) + res := resTmp.(vega.Order_Type) fc.Result = res - return ec.marshalNStakingSummary2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐStakingSummary(ctx, field.Selections, res) + return ec.marshalOOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_stakingSummary(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "currentStakeAvailable": - return ec.fieldContext_StakingSummary_currentStakeAvailable(ctx, field) - case "linkings": - return ec.fieldContext_StakingSummary_linkings(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type StakingSummary", field.Name) + return nil, errors.New("field of type OrderType does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_stakingSummary_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_rewardsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_rewardsConnection(ctx, field) +func (ec *executionContext) _Order_rejectionReason(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_rejectionReason(ctx, field) if err != nil { return graphql.Null } @@ -57848,7 +60596,7 @@ func (ec *executionContext) _Party_rewardsConnection(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().RewardsConnection(rctx, obj, fc.Args["assetId"].(*string), fc.Args["pagination"].(*v2.Pagination), fc.Args["fromEpoch"].(*int), fc.Args["toEpoch"].(*int)) + return ec.resolvers.Order().RejectionReason(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -57857,43 +60605,26 @@ func (ec *executionContext) _Party_rewardsConnection(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.RewardsConnection) + res := resTmp.(*vega.OrderError) fc.Result = res - return ec.marshalORewardsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐRewardsConnection(ctx, field.Selections, res) + return ec.marshalOOrderRejectionReason2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrderError(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_rewardsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_rejectionReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_RewardsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_RewardsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type RewardsConnection", field.Name) + return nil, errors.New("field of type OrderRejectionReason does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_rewardsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_rewardSummaries(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_rewardSummaries(ctx, field) +func (ec *executionContext) _Order_version(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_version(ctx, field) if err != nil { return graphql.Null } @@ -57906,54 +60637,38 @@ func (ec *executionContext) _Party_rewardSummaries(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().RewardSummaries(rctx, obj, fc.Args["assetId"].(*string)) + return ec.resolvers.Order().Version(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.RewardSummary) + res := resTmp.(string) fc.Result = res - return ec.marshalORewardSummary2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐRewardSummary(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_rewardSummaries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "asset": - return ec.fieldContext_RewardSummary_asset(ctx, field) - case "amount": - return ec.fieldContext_RewardSummary_amount(ctx, field) - case "rewardsConnection": - return ec.fieldContext_RewardSummary_rewardsConnection(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type RewardSummary", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_rewardSummaries_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_transfersConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_transfersConnection(ctx, field) +func (ec *executionContext) _Order_updatedAt(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_updatedAt(ctx, field) if err != nil { return graphql.Null } @@ -57966,7 +60681,7 @@ func (ec *executionContext) _Party_transfersConnection(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().TransfersConnection(rctx, obj, fc.Args["direction"].(*TransferDirection), fc.Args["pagination"].(*v2.Pagination), fc.Args["isReward"].(*bool)) + return obj.UpdatedAt, nil }) if err != nil { ec.Error(ctx, err) @@ -57975,43 +60690,26 @@ func (ec *executionContext) _Party_transfersConnection(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.TransferConnection) + res := resTmp.(int64) fc.Result = res - return ec.marshalOTransferConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTransferConnection(ctx, field.Selections, res) + return ec.marshalOTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_transfersConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_TransferConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_TransferConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TransferConnection", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_transfersConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_activityStreak(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_activityStreak(ctx, field) +func (ec *executionContext) _Order_peggedOrder(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_peggedOrder(ctx, field) if err != nil { return graphql.Null } @@ -58024,7 +60722,7 @@ func (ec *executionContext) _Party_activityStreak(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().ActivityStreak(rctx, obj, fc.Args["epoch"].(*int)) + return obj.PeggedOrder, nil }) if err != nil { ec.Error(ctx, err) @@ -58033,55 +60731,32 @@ func (ec *executionContext) _Party_activityStreak(ctx context.Context, field gra if resTmp == nil { return graphql.Null } - res := resTmp.(*v1.PartyActivityStreak) + res := resTmp.(*vega.PeggedOrder) fc.Result = res - return ec.marshalOPartyActivityStreak2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyActivityStreak(ctx, field.Selections, res) + return ec.marshalOPeggedOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPeggedOrder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_activityStreak(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_peggedOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "activeFor": - return ec.fieldContext_PartyActivityStreak_activeFor(ctx, field) - case "inactiveFor": - return ec.fieldContext_PartyActivityStreak_inactiveFor(ctx, field) - case "isActive": - return ec.fieldContext_PartyActivityStreak_isActive(ctx, field) - case "rewardDistributionMultiplier": - return ec.fieldContext_PartyActivityStreak_rewardDistributionMultiplier(ctx, field) - case "rewardVestingMultiplier": - return ec.fieldContext_PartyActivityStreak_rewardVestingMultiplier(ctx, field) - case "epoch": - return ec.fieldContext_PartyActivityStreak_epoch(ctx, field) - case "tradedVolume": - return ec.fieldContext_PartyActivityStreak_tradedVolume(ctx, field) - case "openVolume": - return ec.fieldContext_PartyActivityStreak_openVolume(ctx, field) + case "reference": + return ec.fieldContext_PeggedOrder_reference(ctx, field) + case "offset": + return ec.fieldContext_PeggedOrder_offset(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PartyActivityStreak", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PeggedOrder", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_activityStreak_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Party_vestingBalancesSummary(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_vestingBalancesSummary(ctx, field) +func (ec *executionContext) _Order_liquidityProvision(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_liquidityProvision(ctx, field) if err != nil { return graphql.Null } @@ -58094,57 +60769,102 @@ func (ec *executionContext) _Party_vestingBalancesSummary(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().VestingBalancesSummary(rctx, obj, fc.Args["assetId"].(*string)) + return ec.resolvers.Order().LiquidityProvision(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v2.GetVestingBalancesSummaryResponse) + res := resTmp.(*vega.LiquidityProvision) fc.Result = res - return ec.marshalNPartyVestingBalancesSummary2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGetVestingBalancesSummaryResponse(ctx, field.Selections, res) + return ec.marshalOLiquidityProvision2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvision(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_vestingBalancesSummary(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_liquidityProvision(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "epoch": - return ec.fieldContext_PartyVestingBalancesSummary_epoch(ctx, field) - case "vestingBalances": - return ec.fieldContext_PartyVestingBalancesSummary_vestingBalances(ctx, field) - case "lockedBalances": - return ec.fieldContext_PartyVestingBalancesSummary_lockedBalances(ctx, field) + case "id": + return ec.fieldContext_LiquidityProvision_id(ctx, field) + case "party": + return ec.fieldContext_LiquidityProvision_party(ctx, field) + case "createdAt": + return ec.fieldContext_LiquidityProvision_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_LiquidityProvision_updatedAt(ctx, field) + case "market": + return ec.fieldContext_LiquidityProvision_market(ctx, field) + case "commitmentAmount": + return ec.fieldContext_LiquidityProvision_commitmentAmount(ctx, field) + case "fee": + return ec.fieldContext_LiquidityProvision_fee(ctx, field) + case "sells": + return ec.fieldContext_LiquidityProvision_sells(ctx, field) + case "buys": + return ec.fieldContext_LiquidityProvision_buys(ctx, field) + case "version": + return ec.fieldContext_LiquidityProvision_version(ctx, field) + case "status": + return ec.fieldContext_LiquidityProvision_status(ctx, field) + case "reference": + return ec.fieldContext_LiquidityProvision_reference(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PartyVestingBalancesSummary", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvision", field.Name) }, } + return fc, nil +} + +func (ec *executionContext) _Order_postOnly(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_postOnly(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null } }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Party_vestingBalancesSummary_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PostOnly, nil + }) + if err != nil { ec.Error(ctx, err) - return + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalOBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Order_postOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Order", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } return fc, nil } -func (ec *executionContext) _Party_vestingStats(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Party_vestingStats(ctx, field) +func (ec *executionContext) _Order_reduceOnly(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_reduceOnly(ctx, field) if err != nil { return graphql.Null } @@ -58157,7 +60877,7 @@ func (ec *executionContext) _Party_vestingStats(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Party().VestingStats(rctx, obj) + return obj.ReduceOnly, nil }) if err != nil { ec.Error(ctx, err) @@ -58166,34 +60886,26 @@ func (ec *executionContext) _Party_vestingStats(ctx context.Context, field graph if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.GetPartyVestingStatsResponse) + res := resTmp.(bool) fc.Result = res - return ec.marshalOPartyVestingStats2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGetPartyVestingStatsResponse(ctx, field.Selections, res) + return ec.marshalOBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Party_vestingStats(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_reduceOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Party", + Object: "Order", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "epochSeq": - return ec.fieldContext_PartyVestingStats_epochSeq(ctx, field) - case "rewardBonusMultiplier": - return ec.fieldContext_PartyVestingStats_rewardBonusMultiplier(ctx, field) - case "quantumBalance": - return ec.fieldContext_PartyVestingStats_quantumBalance(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PartyVestingStats", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyActivityStreak_activeFor(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyActivityStreak_activeFor(ctx, field) +func (ec *executionContext) _Order_icebergOrder(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Order_icebergOrder(ctx, field) if err != nil { return graphql.Null } @@ -58206,38 +60918,43 @@ func (ec *executionContext) _PartyActivityStreak_activeFor(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PartyActivityStreak().ActiveFor(rctx, obj) + return obj.IcebergOrder, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*vega.IcebergOrder) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOIcebergOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐIcebergOrder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyActivityStreak_activeFor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Order_icebergOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyActivityStreak", + Object: "Order", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "peakSize": + return ec.fieldContext_IcebergOrder_peakSize(ctx, field) + case "minimumVisibleSize": + return ec.fieldContext_IcebergOrder_minimumVisibleSize(ctx, field) + case "reservedRemaining": + return ec.fieldContext_IcebergOrder_reservedRemaining(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IcebergOrder", field.Name) }, } return fc, nil } -func (ec *executionContext) _PartyActivityStreak_inactiveFor(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyActivityStreak_inactiveFor(ctx, field) +func (ec *executionContext) _OrderConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.OrderConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -58250,38 +60967,41 @@ func (ec *executionContext) _PartyActivityStreak_inactiveFor(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PartyActivityStreak().InactiveFor(rctx, obj) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.([]*v2.OrderEdge) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOOrderEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOrderEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyActivityStreak_inactiveFor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyActivityStreak", + Object: "OrderConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_OrderEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_OrderEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OrderEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _PartyActivityStreak_isActive(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyActivityStreak_isActive(ctx, field) +func (ec *executionContext) _OrderConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.OrderConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -58294,38 +61014,45 @@ func (ec *executionContext) _PartyActivityStreak_isActive(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IsActive, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyActivityStreak_isActive(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyActivityStreak", + Object: "OrderConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _PartyActivityStreak_rewardDistributionMultiplier(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyActivityStreak_rewardDistributionMultiplier(ctx, field) +func (ec *executionContext) _OrderEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.OrderEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -58338,7 +61065,7 @@ func (ec *executionContext) _PartyActivityStreak_rewardDistributionMultiplier(ct }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PartyActivityStreak().RewardDistributionMultiplier(rctx, obj) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -58350,26 +61077,72 @@ func (ec *executionContext) _PartyActivityStreak_rewardDistributionMultiplier(ct } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Order) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyActivityStreak_rewardDistributionMultiplier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyActivityStreak", + Object: "OrderEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Order_id(ctx, field) + case "price": + return ec.fieldContext_Order_price(ctx, field) + case "timeInForce": + return ec.fieldContext_Order_timeInForce(ctx, field) + case "side": + return ec.fieldContext_Order_side(ctx, field) + case "market": + return ec.fieldContext_Order_market(ctx, field) + case "size": + return ec.fieldContext_Order_size(ctx, field) + case "remaining": + return ec.fieldContext_Order_remaining(ctx, field) + case "party": + return ec.fieldContext_Order_party(ctx, field) + case "createdAt": + return ec.fieldContext_Order_createdAt(ctx, field) + case "expiresAt": + return ec.fieldContext_Order_expiresAt(ctx, field) + case "status": + return ec.fieldContext_Order_status(ctx, field) + case "reference": + return ec.fieldContext_Order_reference(ctx, field) + case "tradesConnection": + return ec.fieldContext_Order_tradesConnection(ctx, field) + case "type": + return ec.fieldContext_Order_type(ctx, field) + case "rejectionReason": + return ec.fieldContext_Order_rejectionReason(ctx, field) + case "version": + return ec.fieldContext_Order_version(ctx, field) + case "updatedAt": + return ec.fieldContext_Order_updatedAt(ctx, field) + case "peggedOrder": + return ec.fieldContext_Order_peggedOrder(ctx, field) + case "liquidityProvision": + return ec.fieldContext_Order_liquidityProvision(ctx, field) + case "postOnly": + return ec.fieldContext_Order_postOnly(ctx, field) + case "reduceOnly": + return ec.fieldContext_Order_reduceOnly(ctx, field) + case "icebergOrder": + return ec.fieldContext_Order_icebergOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Order", field.Name) }, } return fc, nil } -func (ec *executionContext) _PartyActivityStreak_rewardVestingMultiplier(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyActivityStreak_rewardVestingMultiplier(ctx, field) +func (ec *executionContext) _OrderEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.OrderEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -58382,29 +61155,26 @@ func (ec *executionContext) _PartyActivityStreak_rewardVestingMultiplier(ctx con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PartyActivityStreak().RewardVestingMultiplier(rctx, obj) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyActivityStreak_rewardVestingMultiplier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyActivityStreak", + Object: "OrderEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -58412,8 +61182,8 @@ func (ec *executionContext) fieldContext_PartyActivityStreak_rewardVestingMultip return fc, nil } -func (ec *executionContext) _PartyActivityStreak_epoch(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyActivityStreak_epoch(ctx, field) +func (ec *executionContext) _OrderEstimate_fee(ctx context.Context, field graphql.CollectedField, obj *OrderEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderEstimate_fee(ctx, field) if err != nil { return graphql.Null } @@ -58426,7 +61196,7 @@ func (ec *executionContext) _PartyActivityStreak_epoch(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PartyActivityStreak().Epoch(rctx, obj) + return obj.Fee, nil }) if err != nil { ec.Error(ctx, err) @@ -58438,26 +61208,46 @@ func (ec *executionContext) _PartyActivityStreak_epoch(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*TradeFee) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNTradeFee2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTradeFee(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyActivityStreak_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderEstimate_fee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyActivityStreak", + Object: "OrderEstimate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "makerFee": + return ec.fieldContext_TradeFee_makerFee(ctx, field) + case "infrastructureFee": + return ec.fieldContext_TradeFee_infrastructureFee(ctx, field) + case "liquidityFee": + return ec.fieldContext_TradeFee_liquidityFee(ctx, field) + case "makerFeeReferralDiscount": + return ec.fieldContext_TradeFee_makerFeeReferralDiscount(ctx, field) + case "makerFeeVolumeDiscount": + return ec.fieldContext_TradeFee_makerFeeVolumeDiscount(ctx, field) + case "infrastructureFeeReferralDiscount": + return ec.fieldContext_TradeFee_infrastructureFeeReferralDiscount(ctx, field) + case "infrastructureFeeVolumeDiscount": + return ec.fieldContext_TradeFee_infrastructureFeeVolumeDiscount(ctx, field) + case "liquidityFeeReferralDiscount": + return ec.fieldContext_TradeFee_liquidityFeeReferralDiscount(ctx, field) + case "liquidityFeeVolumeDiscount": + return ec.fieldContext_TradeFee_liquidityFeeVolumeDiscount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TradeFee", field.Name) }, } return fc, nil } -func (ec *executionContext) _PartyActivityStreak_tradedVolume(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyActivityStreak_tradedVolume(ctx, field) +func (ec *executionContext) _OrderEstimate_totalFeeAmount(ctx context.Context, field graphql.CollectedField, obj *OrderEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderEstimate_totalFeeAmount(ctx, field) if err != nil { return graphql.Null } @@ -58470,7 +61260,7 @@ func (ec *executionContext) _PartyActivityStreak_tradedVolume(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TradedVolume, nil + return obj.TotalFeeAmount, nil }) if err != nil { ec.Error(ctx, err) @@ -58487,9 +61277,9 @@ func (ec *executionContext) _PartyActivityStreak_tradedVolume(ctx context.Contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyActivityStreak_tradedVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderEstimate_totalFeeAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyActivityStreak", + Object: "OrderEstimate", Field: field, IsMethod: false, IsResolver: false, @@ -58500,8 +61290,8 @@ func (ec *executionContext) fieldContext_PartyActivityStreak_tradedVolume(ctx co return fc, nil } -func (ec *executionContext) _PartyActivityStreak_openVolume(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyActivityStreak_openVolume(ctx, field) +func (ec *executionContext) _OrderEstimate_marginLevels(ctx context.Context, field graphql.CollectedField, obj *OrderEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderEstimate_marginLevels(ctx, field) if err != nil { return graphql.Null } @@ -58514,7 +61304,7 @@ func (ec *executionContext) _PartyActivityStreak_openVolume(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.OpenVolume, nil + return obj.MarginLevels, nil }) if err != nil { ec.Error(ctx, err) @@ -58526,26 +61316,50 @@ func (ec *executionContext) _PartyActivityStreak_openVolume(ctx context.Context, } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.MarginLevels) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNMarginLevels2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginLevels(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyActivityStreak_openVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderEstimate_marginLevels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyActivityStreak", + Object: "OrderEstimate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "market": + return ec.fieldContext_MarginLevels_market(ctx, field) + case "asset": + return ec.fieldContext_MarginLevels_asset(ctx, field) + case "party": + return ec.fieldContext_MarginLevels_party(ctx, field) + case "maintenanceLevel": + return ec.fieldContext_MarginLevels_maintenanceLevel(ctx, field) + case "searchLevel": + return ec.fieldContext_MarginLevels_searchLevel(ctx, field) + case "initialLevel": + return ec.fieldContext_MarginLevels_initialLevel(ctx, field) + case "orderMarginLevel": + return ec.fieldContext_MarginLevels_orderMarginLevel(ctx, field) + case "collateralReleaseLevel": + return ec.fieldContext_MarginLevels_collateralReleaseLevel(ctx, field) + case "timestamp": + return ec.fieldContext_MarginLevels_timestamp(ctx, field) + case "marginMode": + return ec.fieldContext_MarginLevels_marginMode(ctx, field) + case "marginFactor": + return ec.fieldContext_MarginLevels_marginFactor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type MarginLevels", field.Name) }, } return fc, nil } -func (ec *executionContext) _PartyAmount_partyId(ctx context.Context, field graphql.CollectedField, obj *v1.PartyAmount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyAmount_partyId(ctx, field) +func (ec *executionContext) _OrderSubmission_marketId(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderSubmission_marketId(ctx, field) if err != nil { return graphql.Null } @@ -58558,7 +61372,7 @@ func (ec *executionContext) _PartyAmount_partyId(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PartyAmount().PartyID(rctx, obj) + return obj.MarketId, nil }) if err != nil { ec.Error(ctx, err) @@ -58572,24 +61386,24 @@ func (ec *executionContext) _PartyAmount_partyId(ctx context.Context, field grap } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyAmount_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderSubmission_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyAmount", + Object: "OrderSubmission", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyAmount_amount(ctx context.Context, field graphql.CollectedField, obj *v1.PartyAmount) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyAmount_amount(ctx, field) +func (ec *executionContext) _OrderSubmission_price(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderSubmission_price(ctx, field) if err != nil { return graphql.Null } @@ -58602,7 +61416,7 @@ func (ec *executionContext) _PartyAmount_amount(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Amount, nil + return obj.Price, nil }) if err != nil { ec.Error(ctx, err) @@ -58619,9 +61433,9 @@ func (ec *executionContext) _PartyAmount_amount(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyAmount_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderSubmission_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyAmount", + Object: "OrderSubmission", Field: field, IsMethod: false, IsResolver: false, @@ -58632,8 +61446,8 @@ func (ec *executionContext) fieldContext_PartyAmount_amount(ctx context.Context, return fc, nil } -func (ec *executionContext) _PartyConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.PartyConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyConnection_edges(ctx, field) +func (ec *executionContext) _OrderSubmission_size(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderSubmission_size(ctx, field) if err != nil { return graphql.Null } @@ -58646,7 +61460,7 @@ func (ec *executionContext) _PartyConnection_edges(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.OrderSubmission().Size(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -58658,32 +61472,26 @@ func (ec *executionContext) _PartyConnection_edges(ctx context.Context, field gr } return graphql.Null } - res := resTmp.([]*v2.PartyEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalNPartyEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderSubmission_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyConnection", + Object: "OrderSubmission", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_PartyEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_PartyEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PartyEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.PartyConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyConnection_pageInfo(ctx, field) +func (ec *executionContext) _OrderSubmission_side(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderSubmission_side(ctx, field) if err != nil { return graphql.Null } @@ -58696,7 +61504,7 @@ func (ec *executionContext) _PartyConnection_pageInfo(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Side, nil }) if err != nil { ec.Error(ctx, err) @@ -58708,36 +61516,26 @@ func (ec *executionContext) _PartyConnection_pageInfo(ctx context.Context, field } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(vega.Side) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNSide2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐSide(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderSubmission_side(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyConnection", + Object: "OrderSubmission", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type Side does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.PartyEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyEdge_node(ctx, field) +func (ec *executionContext) _OrderSubmission_timeInForce(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderSubmission_timeInForce(ctx, field) if err != nil { return graphql.Null } @@ -58750,7 +61548,7 @@ func (ec *executionContext) _PartyEdge_node(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.TimeInForce, nil }) if err != nil { ec.Error(ctx, err) @@ -58762,68 +61560,26 @@ func (ec *executionContext) _PartyEdge_node(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(*vega.Party) + res := resTmp.(vega.Order_TimeInForce) fc.Result = res - return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalNOrderTimeInForce2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_TimeInForce(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderSubmission_timeInForce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyEdge", + Object: "OrderSubmission", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, errors.New("field of type OrderTimeInForce does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.PartyEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyEdge_cursor(ctx, field) +func (ec *executionContext) _OrderSubmission_expiresAt(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderSubmission_expiresAt(ctx, field) if err != nil { return graphql.Null } @@ -58836,7 +61592,7 @@ func (ec *executionContext) _PartyEdge_cursor(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.ExpiresAt, nil }) if err != nil { ec.Error(ctx, err) @@ -58848,26 +61604,26 @@ func (ec *executionContext) _PartyEdge_cursor(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderSubmission_expiresAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyEdge", + Object: "OrderSubmission", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyLockedBalance_asset(ctx context.Context, field graphql.CollectedField, obj *v1.PartyLockedBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyLockedBalance_asset(ctx, field) +func (ec *executionContext) _OrderSubmission_type(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderSubmission_type(ctx, field) if err != nil { return graphql.Null } @@ -58880,7 +61636,7 @@ func (ec *executionContext) _PartyLockedBalance_asset(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PartyLockedBalance().Asset(rctx, obj) + return obj.Type, nil }) if err != nil { ec.Error(ctx, err) @@ -58892,58 +61648,26 @@ func (ec *executionContext) _PartyLockedBalance_asset(ctx context.Context, field } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(vega.Order_Type) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalNOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyLockedBalance_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderSubmission_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyLockedBalance", + Object: "OrderSubmission", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, errors.New("field of type OrderType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyLockedBalance_balance(ctx context.Context, field graphql.CollectedField, obj *v1.PartyLockedBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyLockedBalance_balance(ctx, field) +func (ec *executionContext) _OrderSubmission_reference(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderSubmission_reference(ctx, field) if err != nil { return graphql.Null } @@ -58956,26 +61680,23 @@ func (ec *executionContext) _PartyLockedBalance_balance(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Balance, nil + return obj.Reference, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyLockedBalance_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderSubmission_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyLockedBalance", + Object: "OrderSubmission", Field: field, IsMethod: false, IsResolver: false, @@ -58986,8 +61707,8 @@ func (ec *executionContext) fieldContext_PartyLockedBalance_balance(ctx context. return fc, nil } -func (ec *executionContext) _PartyLockedBalance_untilEpoch(ctx context.Context, field graphql.CollectedField, obj *v1.PartyLockedBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyLockedBalance_untilEpoch(ctx, field) +func (ec *executionContext) _OrderSubmission_peggedOrder(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderSubmission_peggedOrder(ctx, field) if err != nil { return graphql.Null } @@ -59000,38 +61721,41 @@ func (ec *executionContext) _PartyLockedBalance_untilEpoch(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PartyLockedBalance().UntilEpoch(rctx, obj) + return obj.PeggedOrder, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*vega.PeggedOrder) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOPeggedOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPeggedOrder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyLockedBalance_untilEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderSubmission_peggedOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyLockedBalance", + Object: "OrderSubmission", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "reference": + return ec.fieldContext_PeggedOrder_reference(ctx, field) + case "offset": + return ec.fieldContext_PeggedOrder_offset(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PeggedOrder", field.Name) }, } return fc, nil } -func (ec *executionContext) _PartyStake_currentStakeAvailable(ctx context.Context, field graphql.CollectedField, obj *v2.GetStakeResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyStake_currentStakeAvailable(ctx, field) +func (ec *executionContext) _OrderSubmission_postOnly(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderSubmission_postOnly(ctx, field) if err != nil { return graphql.Null } @@ -59044,38 +61768,35 @@ func (ec *executionContext) _PartyStake_currentStakeAvailable(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CurrentStakeAvailable, nil + return obj.PostOnly, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(bool) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyStake_currentStakeAvailable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderSubmission_postOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyStake", + Object: "OrderSubmission", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyStake_linkings(ctx context.Context, field graphql.CollectedField, obj *v2.GetStakeResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyStake_linkings(ctx, field) +func (ec *executionContext) _OrderSubmission_reduceOnly(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderSubmission_reduceOnly(ctx, field) if err != nil { return graphql.Null } @@ -59088,7 +61809,7 @@ func (ec *executionContext) _PartyStake_linkings(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PartyStake().Linkings(rctx, obj) + return obj.ReduceOnly, nil }) if err != nil { ec.Error(ctx, err) @@ -59097,46 +61818,26 @@ func (ec *executionContext) _PartyStake_linkings(ctx context.Context, field grap if resTmp == nil { return graphql.Null } - res := resTmp.([]*v1.StakeLinking) + res := resTmp.(bool) fc.Result = res - return ec.marshalOStakeLinking2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐStakeLinkingᚄ(ctx, field.Selections, res) + return ec.marshalOBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyStake_linkings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderSubmission_reduceOnly(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyStake", + Object: "OrderSubmission", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_StakeLinking_id(ctx, field) - case "type": - return ec.fieldContext_StakeLinking_type(ctx, field) - case "timestamp": - return ec.fieldContext_StakeLinking_timestamp(ctx, field) - case "party": - return ec.fieldContext_StakeLinking_party(ctx, field) - case "amount": - return ec.fieldContext_StakeLinking_amount(ctx, field) - case "status": - return ec.fieldContext_StakeLinking_status(ctx, field) - case "finalizedAt": - return ec.fieldContext_StakeLinking_finalizedAt(ctx, field) - case "txHash": - return ec.fieldContext_StakeLinking_txHash(ctx, field) - case "blockHeight": - return ec.fieldContext_StakeLinking_blockHeight(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type StakeLinking", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyVestingBalance_asset(ctx context.Context, field graphql.CollectedField, obj *v1.PartyVestingBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyVestingBalance_asset(ctx, field) +func (ec *executionContext) _OrderSubmission_icebergOrder(ctx context.Context, field graphql.CollectedField, obj *v11.OrderSubmission) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderSubmission_icebergOrder(ctx, field) if err != nil { return graphql.Null } @@ -59149,70 +61850,43 @@ func (ec *executionContext) _PartyVestingBalance_asset(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PartyVestingBalance().Asset(rctx, obj) + return ec.resolvers.OrderSubmission().IcebergOrder(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(*vega.IcebergOrder) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalOIcebergOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐIcebergOrder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyVestingBalance_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderSubmission_icebergOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyVestingBalance", + Object: "OrderSubmission", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + case "peakSize": + return ec.fieldContext_IcebergOrder_peakSize(ctx, field) + case "minimumVisibleSize": + return ec.fieldContext_IcebergOrder_minimumVisibleSize(ctx, field) + case "reservedRemaining": + return ec.fieldContext_IcebergOrder_reservedRemaining(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, fmt.Errorf("no field named %q was found under type IcebergOrder", field.Name) }, } return fc, nil } -func (ec *executionContext) _PartyVestingBalance_balance(ctx context.Context, field graphql.CollectedField, obj *v1.PartyVestingBalance) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyVestingBalance_balance(ctx, field) +func (ec *executionContext) _OrderUpdate_id(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_id(ctx, field) if err != nil { return graphql.Null } @@ -59225,7 +61899,7 @@ func (ec *executionContext) _PartyVestingBalance_balance(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Balance, nil + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) @@ -59239,24 +61913,24 @@ func (ec *executionContext) _PartyVestingBalance_balance(ctx context.Context, fi } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyVestingBalance_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyVestingBalance", + Object: "OrderUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyVestingBalancesSummary_epoch(ctx context.Context, field graphql.CollectedField, obj *v2.GetVestingBalancesSummaryResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyVestingBalancesSummary_epoch(ctx, field) +func (ec *executionContext) _OrderUpdate_price(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_price(ctx, field) if err != nil { return graphql.Null } @@ -59269,35 +61943,38 @@ func (ec *executionContext) _PartyVestingBalancesSummary_epoch(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PartyVestingBalancesSummary().Epoch(rctx, obj) + return obj.Price, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*int) + res := resTmp.(string) fc.Result = res - return ec.marshalOInt2ᚖint(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyVestingBalancesSummary_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyVestingBalancesSummary", + Object: "OrderUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyVestingBalancesSummary_vestingBalances(ctx context.Context, field graphql.CollectedField, obj *v2.GetVestingBalancesSummaryResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyVestingBalancesSummary_vestingBalances(ctx, field) +func (ec *executionContext) _OrderUpdate_timeInForce(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_timeInForce(ctx, field) if err != nil { return graphql.Null } @@ -59310,41 +61987,38 @@ func (ec *executionContext) _PartyVestingBalancesSummary_vestingBalances(ctx con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.VestingBalances, nil + return obj.TimeInForce, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v1.PartyVestingBalance) + res := resTmp.(vega.Order_TimeInForce) fc.Result = res - return ec.marshalOPartyVestingBalance2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyVestingBalanceᚄ(ctx, field.Selections, res) + return ec.marshalNOrderTimeInForce2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_TimeInForce(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyVestingBalancesSummary_vestingBalances(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_timeInForce(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyVestingBalancesSummary", + Object: "OrderUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "asset": - return ec.fieldContext_PartyVestingBalance_asset(ctx, field) - case "balance": - return ec.fieldContext_PartyVestingBalance_balance(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PartyVestingBalance", field.Name) + return nil, errors.New("field of type OrderTimeInForce does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyVestingBalancesSummary_lockedBalances(ctx context.Context, field graphql.CollectedField, obj *v2.GetVestingBalancesSummaryResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyVestingBalancesSummary_lockedBalances(ctx, field) +func (ec *executionContext) _OrderUpdate_side(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_side(ctx, field) if err != nil { return graphql.Null } @@ -59357,43 +62031,38 @@ func (ec *executionContext) _PartyVestingBalancesSummary_lockedBalances(ctx cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.LockedBalances, nil + return obj.Side, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v1.PartyLockedBalance) + res := resTmp.(vega.Side) fc.Result = res - return ec.marshalOPartyLockedBalance2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyLockedBalanceᚄ(ctx, field.Selections, res) + return ec.marshalNSide2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐSide(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyVestingBalancesSummary_lockedBalances(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_side(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyVestingBalancesSummary", + Object: "OrderUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "asset": - return ec.fieldContext_PartyLockedBalance_asset(ctx, field) - case "balance": - return ec.fieldContext_PartyLockedBalance_balance(ctx, field) - case "untilEpoch": - return ec.fieldContext_PartyLockedBalance_untilEpoch(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PartyLockedBalance", field.Name) + return nil, errors.New("field of type Side does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyVestingStats_epochSeq(ctx context.Context, field graphql.CollectedField, obj *v2.GetPartyVestingStatsResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyVestingStats_epochSeq(ctx, field) +func (ec *executionContext) _OrderUpdate_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_marketId(ctx, field) if err != nil { return graphql.Null } @@ -59406,7 +62075,7 @@ func (ec *executionContext) _PartyVestingStats_epochSeq(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PartyVestingStats().EpochSeq(rctx, obj) + return obj.MarketId, nil }) if err != nil { ec.Error(ctx, err) @@ -59418,26 +62087,26 @@ func (ec *executionContext) _PartyVestingStats_epochSeq(ctx context.Context, fie } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyVestingStats_epochSeq(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyVestingStats", + Object: "OrderUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PartyVestingStats_rewardBonusMultiplier(ctx context.Context, field graphql.CollectedField, obj *v2.GetPartyVestingStatsResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyVestingStats_rewardBonusMultiplier(ctx, field) +func (ec *executionContext) _OrderUpdate_size(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_size(ctx, field) if err != nil { return graphql.Null } @@ -59450,7 +62119,7 @@ func (ec *executionContext) _PartyVestingStats_rewardBonusMultiplier(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RewardBonusMultiplier, nil + return ec.resolvers.OrderUpdate().Size(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -59467,12 +62136,12 @@ func (ec *executionContext) _PartyVestingStats_rewardBonusMultiplier(ctx context return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyVestingStats_rewardBonusMultiplier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyVestingStats", + Object: "OrderUpdate", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -59480,8 +62149,8 @@ func (ec *executionContext) fieldContext_PartyVestingStats_rewardBonusMultiplier return fc, nil } -func (ec *executionContext) _PartyVestingStats_quantumBalance(ctx context.Context, field graphql.CollectedField, obj *v2.GetPartyVestingStatsResponse) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PartyVestingStats_quantumBalance(ctx, field) +func (ec *executionContext) _OrderUpdate_remaining(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_remaining(ctx, field) if err != nil { return graphql.Null } @@ -59494,7 +62163,7 @@ func (ec *executionContext) _PartyVestingStats_quantumBalance(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.QuantumBalance, nil + return ec.resolvers.OrderUpdate().Remaining(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -59511,12 +62180,12 @@ func (ec *executionContext) _PartyVestingStats_quantumBalance(ctx context.Contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PartyVestingStats_quantumBalance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_remaining(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PartyVestingStats", + Object: "OrderUpdate", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -59524,8 +62193,8 @@ func (ec *executionContext) fieldContext_PartyVestingStats_quantumBalance(ctx co return fc, nil } -func (ec *executionContext) _PeggedOrder_reference(ctx context.Context, field graphql.CollectedField, obj *vega.PeggedOrder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PeggedOrder_reference(ctx, field) +func (ec *executionContext) _OrderUpdate_partyId(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_partyId(ctx, field) if err != nil { return graphql.Null } @@ -59538,7 +62207,7 @@ func (ec *executionContext) _PeggedOrder_reference(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Reference, nil + return obj.PartyId, nil }) if err != nil { ec.Error(ctx, err) @@ -59550,26 +62219,26 @@ func (ec *executionContext) _PeggedOrder_reference(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(vega.PeggedReference) + res := resTmp.(string) fc.Result = res - return ec.marshalNPeggedReference2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPeggedReference(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PeggedOrder_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PeggedOrder", + Object: "OrderUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type PeggedReference does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PeggedOrder_offset(ctx context.Context, field graphql.CollectedField, obj *vega.PeggedOrder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PeggedOrder_offset(ctx, field) +func (ec *executionContext) _OrderUpdate_createdAt(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_createdAt(ctx, field) if err != nil { return graphql.Null } @@ -59582,7 +62251,7 @@ func (ec *executionContext) _PeggedOrder_offset(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Offset, nil + return obj.CreatedAt, nil }) if err != nil { ec.Error(ctx, err) @@ -59594,26 +62263,26 @@ func (ec *executionContext) _PeggedOrder_offset(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PeggedOrder_offset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PeggedOrder", + Object: "OrderUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Perpetual_settlementAsset(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Perpetual_settlementAsset(ctx, field) +func (ec *executionContext) _OrderUpdate_expiresAt(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_expiresAt(ctx, field) if err != nil { return graphql.Null } @@ -59626,70 +62295,35 @@ func (ec *executionContext) _Perpetual_settlementAsset(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Perpetual().SettlementAsset(rctx, obj) + return obj.ExpiresAt, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(int64) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalOTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Perpetual_settlementAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_expiresAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Perpetual", + Object: "OrderUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Perpetual_quoteName(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Perpetual_quoteName(ctx, field) +func (ec *executionContext) _OrderUpdate_status(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_status(ctx, field) if err != nil { return graphql.Null } @@ -59702,7 +62336,7 @@ func (ec *executionContext) _Perpetual_quoteName(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.QuoteName, nil + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) @@ -59714,26 +62348,26 @@ func (ec *executionContext) _Perpetual_quoteName(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.Order_Status) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNOrderStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Status(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Perpetual_quoteName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Perpetual", + Object: "OrderUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type OrderStatus does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Perpetual_marginFundingFactor(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Perpetual_marginFundingFactor(ctx, field) +func (ec *executionContext) _OrderUpdate_reference(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_reference(ctx, field) if err != nil { return graphql.Null } @@ -59746,7 +62380,7 @@ func (ec *executionContext) _Perpetual_marginFundingFactor(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarginFundingFactor, nil + return obj.Reference, nil }) if err != nil { ec.Error(ctx, err) @@ -59763,9 +62397,9 @@ func (ec *executionContext) _Perpetual_marginFundingFactor(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Perpetual_marginFundingFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Perpetual", + Object: "OrderUpdate", Field: field, IsMethod: false, IsResolver: false, @@ -59776,8 +62410,8 @@ func (ec *executionContext) fieldContext_Perpetual_marginFundingFactor(ctx conte return fc, nil } -func (ec *executionContext) _Perpetual_interestRate(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Perpetual_interestRate(ctx, field) +func (ec *executionContext) _OrderUpdate_type(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_type(ctx, field) if err != nil { return graphql.Null } @@ -59790,38 +62424,35 @@ func (ec *executionContext) _Perpetual_interestRate(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InterestRate, nil + return obj.Type, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.Order_Type) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Perpetual_interestRate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Perpetual", + Object: "OrderUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type OrderType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Perpetual_clampLowerBound(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Perpetual_clampLowerBound(ctx, field) +func (ec *executionContext) _OrderUpdate_rejectionReason(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_rejectionReason(ctx, field) if err != nil { return graphql.Null } @@ -59834,38 +62465,35 @@ func (ec *executionContext) _Perpetual_clampLowerBound(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ClampLowerBound, nil + return ec.resolvers.OrderUpdate().RejectionReason(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.OrderError) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOOrderRejectionReason2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrderError(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Perpetual_clampLowerBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_rejectionReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Perpetual", + Object: "OrderUpdate", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type OrderRejectionReason does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Perpetual_clampUpperBound(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Perpetual_clampUpperBound(ctx, field) +func (ec *executionContext) _OrderUpdate_version(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_version(ctx, field) if err != nil { return graphql.Null } @@ -59878,7 +62506,7 @@ func (ec *executionContext) _Perpetual_clampUpperBound(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ClampUpperBound, nil + return ec.resolvers.OrderUpdate().Version(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -59895,12 +62523,12 @@ func (ec *executionContext) _Perpetual_clampUpperBound(ctx context.Context, fiel return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Perpetual_clampUpperBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Perpetual", + Object: "OrderUpdate", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -59908,8 +62536,8 @@ func (ec *executionContext) fieldContext_Perpetual_clampUpperBound(ctx context.C return fc, nil } -func (ec *executionContext) _Perpetual_dataSourceSpecForSettlementSchedule(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Perpetual_dataSourceSpecForSettlementSchedule(ctx, field) +func (ec *executionContext) _OrderUpdate_updatedAt(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_updatedAt(ctx, field) if err != nil { return graphql.Null } @@ -59922,50 +62550,35 @@ func (ec *executionContext) _Perpetual_dataSourceSpecForSettlementSchedule(ctx c }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Perpetual().DataSourceSpecForSettlementSchedule(rctx, obj) + return obj.UpdatedAt, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*DataSourceSpec) + res := resTmp.(int64) fc.Result = res - return ec.marshalNDataSourceSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpec(ctx, field.Selections, res) + return ec.marshalOTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Perpetual_dataSourceSpecForSettlementSchedule(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Perpetual", + Object: "OrderUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_DataSourceSpec_id(ctx, field) - case "createdAt": - return ec.fieldContext_DataSourceSpec_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_DataSourceSpec_updatedAt(ctx, field) - case "data": - return ec.fieldContext_DataSourceSpec_data(ctx, field) - case "status": - return ec.fieldContext_DataSourceSpec_status(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DataSourceSpec", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Perpetual_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Perpetual_dataSourceSpecForSettlementData(ctx, field) +func (ec *executionContext) _OrderUpdate_peggedOrder(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_peggedOrder(ctx, field) if err != nil { return graphql.Null } @@ -59978,50 +62591,41 @@ func (ec *executionContext) _Perpetual_dataSourceSpecForSettlementData(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Perpetual().DataSourceSpecForSettlementData(rctx, obj) + return obj.PeggedOrder, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*DataSourceSpec) + res := resTmp.(*vega.PeggedOrder) fc.Result = res - return ec.marshalNDataSourceSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpec(ctx, field.Selections, res) + return ec.marshalOPeggedOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPeggedOrder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Perpetual_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_peggedOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Perpetual", + Object: "OrderUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_DataSourceSpec_id(ctx, field) - case "createdAt": - return ec.fieldContext_DataSourceSpec_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_DataSourceSpec_updatedAt(ctx, field) - case "data": - return ec.fieldContext_DataSourceSpec_data(ctx, field) - case "status": - return ec.fieldContext_DataSourceSpec_status(ctx, field) + case "reference": + return ec.fieldContext_PeggedOrder_reference(ctx, field) + case "offset": + return ec.fieldContext_PeggedOrder_offset(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type DataSourceSpec", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PeggedOrder", field.Name) }, } return fc, nil } -func (ec *executionContext) _Perpetual_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Perpetual_dataSourceSpecBinding(ctx, field) +func (ec *executionContext) _OrderUpdate_liquidityProvisionId(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_liquidityProvisionId(ctx, field) if err != nil { return graphql.Null } @@ -60034,44 +62638,35 @@ func (ec *executionContext) _Perpetual_dataSourceSpecBinding(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Perpetual().DataSourceSpecBinding(rctx, obj) + return obj.LiquidityProvisionId, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*DataSourceSpecPerpetualBinding) + res := resTmp.(string) fc.Result = res - return ec.marshalNDataSourceSpecPerpetualBinding2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpecPerpetualBinding(ctx, field.Selections, res) + return ec.marshalOID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Perpetual_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_liquidityProvisionId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Perpetual", + Object: "OrderUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "settlementDataProperty": - return ec.fieldContext_DataSourceSpecPerpetualBinding_settlementDataProperty(ctx, field) - case "settlementScheduleProperty": - return ec.fieldContext_DataSourceSpecPerpetualBinding_settlementScheduleProperty(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DataSourceSpecPerpetualBinding", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PerpetualData_fundingPayment(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PerpetualData_fundingPayment(ctx, field) +func (ec *executionContext) _OrderUpdate_icebergOrder(ctx context.Context, field graphql.CollectedField, obj *vega.Order) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_OrderUpdate_icebergOrder(ctx, field) if err != nil { return graphql.Null } @@ -60084,7 +62679,7 @@ func (ec *executionContext) _PerpetualData_fundingPayment(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.FundingPayment, nil + return obj.IcebergOrder, nil }) if err != nil { ec.Error(ctx, err) @@ -60093,26 +62688,34 @@ func (ec *executionContext) _PerpetualData_fundingPayment(ctx context.Context, f if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.IcebergOrder) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOIcebergOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐIcebergOrder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PerpetualData_fundingPayment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OrderUpdate_icebergOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PerpetualData", + Object: "OrderUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "peakSize": + return ec.fieldContext_IcebergOrder_peakSize(ctx, field) + case "minimumVisibleSize": + return ec.fieldContext_IcebergOrder_minimumVisibleSize(ctx, field) + case "reservedRemaining": + return ec.fieldContext_IcebergOrder_reservedRemaining(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IcebergOrder", field.Name) }, } return fc, nil } -func (ec *executionContext) _PerpetualData_fundingRate(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PerpetualData_fundingRate(ctx, field) +func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *v2.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_hasNextPage(ctx, field) if err != nil { return graphql.Null } @@ -60125,35 +62728,38 @@ func (ec *executionContext) _PerpetualData_fundingRate(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.FundingRate, nil + return obj.HasNextPage, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(string) + res := resTmp.(bool) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PerpetualData_fundingRate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PerpetualData", + Object: "PageInfo", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PerpetualData_externalTwap(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PerpetualData_externalTwap(ctx, field) +func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *v2.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) if err != nil { return graphql.Null } @@ -60166,35 +62772,38 @@ func (ec *executionContext) _PerpetualData_externalTwap(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ExternalTwap, nil + return obj.HasPreviousPage, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(string) + res := resTmp.(bool) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PerpetualData_externalTwap(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PerpetualData", + Object: "PageInfo", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PerpetualData_internalTwap(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PerpetualData_internalTwap(ctx, field) +func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *v2.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_startCursor(ctx, field) if err != nil { return graphql.Null } @@ -60207,23 +62816,26 @@ func (ec *executionContext) _PerpetualData_internalTwap(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InternalTwap, nil + return obj.StartCursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PerpetualData_internalTwap(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_startCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PerpetualData", + Object: "PageInfo", Field: field, IsMethod: false, IsResolver: false, @@ -60234,8 +62846,8 @@ func (ec *executionContext) fieldContext_PerpetualData_internalTwap(ctx context. return fc, nil } -func (ec *executionContext) _PerpetualProduct_settlementAsset(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PerpetualProduct_settlementAsset(ctx, field) +func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *v2.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_endCursor(ctx, field) if err != nil { return graphql.Null } @@ -60248,7 +62860,7 @@ func (ec *executionContext) _PerpetualProduct_settlementAsset(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PerpetualProduct().SettlementAsset(rctx, obj) + return obj.EndCursor, nil }) if err != nil { ec.Error(ctx, err) @@ -60260,58 +62872,26 @@ func (ec *executionContext) _PerpetualProduct_settlementAsset(ctx context.Contex } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(string) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PerpetualProduct_settlementAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_endCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PerpetualProduct", + Object: "PageInfo", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PerpetualProduct_quoteName(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PerpetualProduct_quoteName(ctx, field) +func (ec *executionContext) _PaidLiquidityFees_marketId(ctx context.Context, field graphql.CollectedField, obj *v1.PaidLiquidityFeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaidLiquidityFees_marketId(ctx, field) if err != nil { return graphql.Null } @@ -60324,7 +62904,7 @@ func (ec *executionContext) _PerpetualProduct_quoteName(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.QuoteName, nil + return ec.resolvers.PaidLiquidityFees().MarketID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -60341,12 +62921,12 @@ func (ec *executionContext) _PerpetualProduct_quoteName(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PerpetualProduct_quoteName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaidLiquidityFees_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PerpetualProduct", + Object: "PaidLiquidityFees", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -60354,8 +62934,8 @@ func (ec *executionContext) fieldContext_PerpetualProduct_quoteName(ctx context. return fc, nil } -func (ec *executionContext) _PerpetualProduct_marginFundingFactor(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PerpetualProduct_marginFundingFactor(ctx, field) +func (ec *executionContext) _PaidLiquidityFees_assetId(ctx context.Context, field graphql.CollectedField, obj *v1.PaidLiquidityFeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaidLiquidityFees_assetId(ctx, field) if err != nil { return graphql.Null } @@ -60368,7 +62948,7 @@ func (ec *executionContext) _PerpetualProduct_marginFundingFactor(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarginFundingFactor, nil + return ec.resolvers.PaidLiquidityFees().AssetID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -60385,12 +62965,12 @@ func (ec *executionContext) _PerpetualProduct_marginFundingFactor(ctx context.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PerpetualProduct_marginFundingFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaidLiquidityFees_assetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PerpetualProduct", + Object: "PaidLiquidityFees", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -60398,8 +62978,8 @@ func (ec *executionContext) fieldContext_PerpetualProduct_marginFundingFactor(ct return fc, nil } -func (ec *executionContext) _PerpetualProduct_interestRate(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PerpetualProduct_interestRate(ctx, field) +func (ec *executionContext) _PaidLiquidityFees_epoch(ctx context.Context, field graphql.CollectedField, obj *v1.PaidLiquidityFeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaidLiquidityFees_epoch(ctx, field) if err != nil { return graphql.Null } @@ -60412,7 +62992,7 @@ func (ec *executionContext) _PerpetualProduct_interestRate(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InterestRate, nil + return ec.resolvers.PaidLiquidityFees().Epoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -60424,26 +63004,26 @@ func (ec *executionContext) _PerpetualProduct_interestRate(ctx context.Context, } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PerpetualProduct_interestRate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaidLiquidityFees_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PerpetualProduct", + Object: "PaidLiquidityFees", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PerpetualProduct_clampLowerBound(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PerpetualProduct_clampLowerBound(ctx, field) +func (ec *executionContext) _PaidLiquidityFees_totalFeesPaid(ctx context.Context, field graphql.CollectedField, obj *v1.PaidLiquidityFeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaidLiquidityFees_totalFeesPaid(ctx, field) if err != nil { return graphql.Null } @@ -60456,7 +63036,7 @@ func (ec *executionContext) _PerpetualProduct_clampLowerBound(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ClampLowerBound, nil + return obj.TotalFeesPaid, nil }) if err != nil { ec.Error(ctx, err) @@ -60473,9 +63053,9 @@ func (ec *executionContext) _PerpetualProduct_clampLowerBound(ctx context.Contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PerpetualProduct_clampLowerBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaidLiquidityFees_totalFeesPaid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PerpetualProduct", + Object: "PaidLiquidityFees", Field: field, IsMethod: false, IsResolver: false, @@ -60486,8 +63066,8 @@ func (ec *executionContext) fieldContext_PerpetualProduct_clampLowerBound(ctx co return fc, nil } -func (ec *executionContext) _PerpetualProduct_clampUpperBound(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PerpetualProduct_clampUpperBound(ctx, field) +func (ec *executionContext) _PaidLiquidityFees_feesPaidPerParty(ctx context.Context, field graphql.CollectedField, obj *v1.PaidLiquidityFeesStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaidLiquidityFees_feesPaidPerParty(ctx, field) if err != nil { return graphql.Null } @@ -60500,7 +63080,7 @@ func (ec *executionContext) _PerpetualProduct_clampUpperBound(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ClampUpperBound, nil + return obj.FeesPaidPerParty, nil }) if err != nil { ec.Error(ctx, err) @@ -60512,26 +63092,32 @@ func (ec *executionContext) _PerpetualProduct_clampUpperBound(ctx context.Contex } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v1.PartyAmount) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PerpetualProduct_clampUpperBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaidLiquidityFees_feesPaidPerParty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PerpetualProduct", + Object: "PaidLiquidityFees", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "partyId": + return ec.fieldContext_PartyAmount_partyId(ctx, field) + case "amount": + return ec.fieldContext_PartyAmount_amount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) }, } return fc, nil } -func (ec *executionContext) _PerpetualProduct_dataSourceSpecForSettlementSchedule(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PerpetualProduct_dataSourceSpecForSettlementSchedule(ctx, field) +func (ec *executionContext) _PaidLiquidityFeesConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.PaidLiquidityFeesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaidLiquidityFeesConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -60544,7 +63130,7 @@ func (ec *executionContext) _PerpetualProduct_dataSourceSpecForSettlementSchedul }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DataSourceSpecForSettlementSchedule, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -60556,30 +63142,32 @@ func (ec *executionContext) _PerpetualProduct_dataSourceSpecForSettlementSchedul } return graphql.Null } - res := resTmp.(*vega.DataSourceDefinition) + res := resTmp.([]*v2.PaidLiquidityFeesEdge) fc.Result = res - return ec.marshalNDataSourceDefinition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx, field.Selections, res) + return ec.marshalNPaidLiquidityFeesEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPaidLiquidityFeesEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PerpetualProduct_dataSourceSpecForSettlementSchedule(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaidLiquidityFeesConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PerpetualProduct", + Object: "PaidLiquidityFeesConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "sourceType": - return ec.fieldContext_DataSourceDefinition_sourceType(ctx, field) + case "node": + return ec.fieldContext_PaidLiquidityFeesEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_PaidLiquidityFeesEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type DataSourceDefinition", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PaidLiquidityFeesEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _PerpetualProduct_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PerpetualProduct_dataSourceSpecForSettlementData(ctx, field) +func (ec *executionContext) _PaidLiquidityFeesConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.PaidLiquidityFeesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaidLiquidityFeesConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -60592,7 +63180,7 @@ func (ec *executionContext) _PerpetualProduct_dataSourceSpecForSettlementData(ct }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DataSourceSpecForSettlementData, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -60604,30 +63192,36 @@ func (ec *executionContext) _PerpetualProduct_dataSourceSpecForSettlementData(ct } return graphql.Null } - res := resTmp.(*vega.DataSourceDefinition) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNDataSourceDefinition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PerpetualProduct_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaidLiquidityFeesConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PerpetualProduct", + Object: "PaidLiquidityFeesConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "sourceType": - return ec.fieldContext_DataSourceDefinition_sourceType(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type DataSourceDefinition", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _PerpetualProduct_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PerpetualProduct_dataSourceSpecBinding(ctx, field) +func (ec *executionContext) _PaidLiquidityFeesEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.PaidLiquidityFeesEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaidLiquidityFeesEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -60640,7 +63234,7 @@ func (ec *executionContext) _PerpetualProduct_dataSourceSpecBinding(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PerpetualProduct().DataSourceSpecBinding(rctx, obj) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -60652,32 +63246,38 @@ func (ec *executionContext) _PerpetualProduct_dataSourceSpecBinding(ctx context. } return graphql.Null } - res := resTmp.(*DataSourceSpecPerpetualBinding) + res := resTmp.(*v1.PaidLiquidityFeesStats) fc.Result = res - return ec.marshalNDataSourceSpecPerpetualBinding2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpecPerpetualBinding(ctx, field.Selections, res) + return ec.marshalNPaidLiquidityFees2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPaidLiquidityFeesStats(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PerpetualProduct_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaidLiquidityFeesEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PerpetualProduct", + Object: "PaidLiquidityFeesEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "settlementDataProperty": - return ec.fieldContext_DataSourceSpecPerpetualBinding_settlementDataProperty(ctx, field) - case "settlementScheduleProperty": - return ec.fieldContext_DataSourceSpecPerpetualBinding_settlementScheduleProperty(ctx, field) + case "marketId": + return ec.fieldContext_PaidLiquidityFees_marketId(ctx, field) + case "assetId": + return ec.fieldContext_PaidLiquidityFees_assetId(ctx, field) + case "epoch": + return ec.fieldContext_PaidLiquidityFees_epoch(ctx, field) + case "totalFeesPaid": + return ec.fieldContext_PaidLiquidityFees_totalFeesPaid(ctx, field) + case "feesPaidPerParty": + return ec.fieldContext_PaidLiquidityFees_feesPaidPerParty(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type DataSourceSpecPerpetualBinding", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PaidLiquidityFees", field.Name) }, } return fc, nil } -func (ec *executionContext) _Position_market(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Position_market(ctx, field) +func (ec *executionContext) _PaidLiquidityFeesEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.PaidLiquidityFeesEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaidLiquidityFeesEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -60690,7 +63290,7 @@ func (ec *executionContext) _Position_market(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Position().Market(rctx, obj) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -60702,82 +63302,26 @@ func (ec *executionContext) _Position_market(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(*vega.Market) + res := resTmp.(string) fc.Result = res - return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Position_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaidLiquidityFeesEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Position", + Object: "PaidLiquidityFeesEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Market_id(ctx, field) - case "fees": - return ec.fieldContext_Market_fees(ctx, field) - case "tradableInstrument": - return ec.fieldContext_Market_tradableInstrument(ctx, field) - case "decimalPlaces": - return ec.fieldContext_Market_decimalPlaces(ctx, field) - case "positionDecimalPlaces": - return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) - case "openingAuction": - return ec.fieldContext_Market_openingAuction(ctx, field) - case "priceMonitoringSettings": - return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) - case "liquidityMonitoringParameters": - return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) - case "tradingMode": - return ec.fieldContext_Market_tradingMode(ctx, field) - case "state": - return ec.fieldContext_Market_state(ctx, field) - case "proposal": - return ec.fieldContext_Market_proposal(ctx, field) - case "ordersConnection": - return ec.fieldContext_Market_ordersConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Market_accountsConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Market_tradesConnection(ctx, field) - case "depth": - return ec.fieldContext_Market_depth(ctx, field) - case "candlesConnection": - return ec.fieldContext_Market_candlesConnection(ctx, field) - case "data": - return ec.fieldContext_Market_data(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Market_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) - case "marketTimestamps": - return ec.fieldContext_Market_marketTimestamps(ctx, field) - case "riskFactors": - return ec.fieldContext_Market_riskFactors(ctx, field) - case "linearSlippageFactor": - return ec.fieldContext_Market_linearSlippageFactor(ctx, field) - case "quadraticSlippageFactor": - return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) - case "parentMarketID": - return ec.fieldContext_Market_parentMarketID(ctx, field) - case "insurancePoolFraction": - return ec.fieldContext_Market_insurancePoolFraction(ctx, field) - case "successorMarketID": - return ec.fieldContext_Market_successorMarketID(ctx, field) - case "liquiditySLAParameters": - return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Position_party(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Position_party(ctx, field) +func (ec *executionContext) _PartiesProfilesConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.PartiesProfilesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartiesProfilesConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -60790,7 +63334,7 @@ func (ec *executionContext) _Position_party(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Position().Party(rctx, obj) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -60802,68 +63346,32 @@ func (ec *executionContext) _Position_party(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(*vega.Party) + res := resTmp.([]*v2.PartyProfileEdge) fc.Result = res - return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalNPartyProfileEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyProfileEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Position_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartiesProfilesConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Position", + Object: "PartiesProfilesConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) + case "node": + return ec.fieldContext_PartyProfileEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_PartyProfileEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PartyProfileEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _Position_openVolume(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Position_openVolume(ctx, field) +func (ec *executionContext) _PartiesProfilesConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.PartiesProfilesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartiesProfilesConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -60876,7 +63384,7 @@ func (ec *executionContext) _Position_openVolume(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Position().OpenVolume(rctx, obj) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -60888,26 +63396,36 @@ func (ec *executionContext) _Position_openVolume(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Position_openVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartiesProfilesConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Position", + Object: "PartiesProfilesConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Position_realisedPNL(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Position_realisedPNL(ctx, field) +func (ec *executionContext) _Party_id(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_id(ctx, field) if err != nil { return graphql.Null } @@ -60920,7 +63438,7 @@ func (ec *executionContext) _Position_realisedPNL(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RealisedPnl, nil + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) @@ -60934,24 +63452,24 @@ func (ec *executionContext) _Position_realisedPNL(ctx context.Context, field gra } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Position_realisedPNL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Position", + Object: "Party", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Position_unrealisedPNL(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Position_unrealisedPNL(ctx, field) +func (ec *executionContext) _Party_ordersConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_ordersConnection(ctx, field) if err != nil { return graphql.Null } @@ -60964,38 +63482,52 @@ func (ec *executionContext) _Position_unrealisedPNL(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UnrealisedPnl, nil + return ec.resolvers.Party().OrdersConnection(rctx, obj, fc.Args["pagination"].(*v2.Pagination), fc.Args["filter"].(*OrderByMarketIdsFilter)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.OrderConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOOrderConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOrderConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Position_unrealisedPNL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_ordersConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Position", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_OrderConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_OrderConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OrderConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_ordersConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Position_averageEntryPrice(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Position_averageEntryPrice(ctx, field) +func (ec *executionContext) _Party_tradesConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_tradesConnection(ctx, field) if err != nil { return graphql.Null } @@ -61008,38 +63540,52 @@ func (ec *executionContext) _Position_averageEntryPrice(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AverageEntryPrice, nil + return ec.resolvers.Party().TradesConnection(rctx, obj, fc.Args["marketId"].(*string), fc.Args["dataRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.TradeConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTradeConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTradeConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Position_averageEntryPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_tradesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Position", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_TradeConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_TradeConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TradeConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_tradesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Position_lossSocializationAmount(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Position_lossSocializationAmount(ctx, field) +func (ec *executionContext) _Party_accountsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_accountsConnection(ctx, field) if err != nil { return graphql.Null } @@ -61052,38 +63598,52 @@ func (ec *executionContext) _Position_lossSocializationAmount(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Position().LossSocializationAmount(rctx, obj) + return ec.resolvers.Party().AccountsConnection(rctx, obj, fc.Args["marketId"].(*string), fc.Args["assetId"].(*string), fc.Args["type"].(*vega.AccountType), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.AccountsConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOAccountsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAccountsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Position_lossSocializationAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_accountsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Position", + Object: "Party", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_AccountsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_AccountsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AccountsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_accountsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Position_positionStatus(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Position_positionStatus(ctx, field) +func (ec *executionContext) _Party_positionsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_positionsConnection(ctx, field) if err != nil { return graphql.Null } @@ -61096,38 +63656,52 @@ func (ec *executionContext) _Position_positionStatus(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PositionStatus, nil + return ec.resolvers.Party().PositionsConnection(rctx, obj, fc.Args["market"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(vega.PositionStatus) + res := resTmp.(*v2.PositionConnection) fc.Result = res - return ec.marshalNPositionStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPositionStatus(ctx, field.Selections, res) + return ec.marshalOPositionConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPositionConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Position_positionStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_positionsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Position", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type PositionStatus does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_PositionConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_PositionConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PositionConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_positionsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Position_marginsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Position_marginsConnection(ctx, field) +func (ec *executionContext) _Party_marginsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_marginsConnection(ctx, field) if err != nil { return graphql.Null } @@ -61140,7 +63714,7 @@ func (ec *executionContext) _Position_marginsConnection(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Position().MarginsConnection(rctx, obj, fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Party().MarginsConnection(rctx, obj, fc.Args["marketId"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -61154,9 +63728,9 @@ func (ec *executionContext) _Position_marginsConnection(ctx context.Context, fie return ec.marshalOMarginConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarginConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Position_marginsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_marginsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Position", + Object: "Party", Field: field, IsMethod: true, IsResolver: true, @@ -61177,15 +63751,15 @@ func (ec *executionContext) fieldContext_Position_marginsConnection(ctx context. } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Position_marginsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Party_marginsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return } return fc, nil } -func (ec *executionContext) _Position_updatedAt(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Position_updatedAt(ctx, field) +func (ec *executionContext) _Party_proposalsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_proposalsConnection(ctx, field) if err != nil { return graphql.Null } @@ -61198,7 +63772,7 @@ func (ec *executionContext) _Position_updatedAt(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdatedAt, nil + return ec.resolvers.Party().ProposalsConnection(rctx, obj, fc.Args["proposalType"].(*v2.ListGovernanceDataRequest_Type), fc.Args["inState"].(*vega.Proposal_State), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -61207,26 +63781,43 @@ func (ec *executionContext) _Position_updatedAt(ctx context.Context, field graph if resTmp == nil { return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*v2.GovernanceDataConnection) fc.Result = res - return ec.marshalOTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOProposalsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGovernanceDataConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Position_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_proposalsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Position", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_ProposalsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_ProposalsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProposalsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_proposalsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _PositionConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.PositionConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionConnection_edges(ctx, field) +func (ec *executionContext) _Party_votesConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_votesConnection(ctx, field) if err != nil { return graphql.Null } @@ -61239,7 +63830,7 @@ func (ec *executionContext) _PositionConnection_edges(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.Party().VotesConnection(rctx, obj, fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -61248,32 +63839,43 @@ func (ec *executionContext) _PositionConnection_edges(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.([]*v2.PositionEdge) + res := resTmp.(*ProposalVoteConnection) fc.Result = res - return ec.marshalOPositionEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPositionEdgeᚄ(ctx, field.Selections, res) + return ec.marshalOProposalVoteConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVoteConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_votesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionConnection", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_PositionEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_PositionEdge_cursor(ctx, field) + case "edges": + return ec.fieldContext_ProposalVoteConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_ProposalVoteConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PositionEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ProposalVoteConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_votesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _PositionConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.PositionConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionConnection_pageInfo(ctx, field) +func (ec *executionContext) _Party_withdrawalsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_withdrawalsConnection(ctx, field) if err != nil { return graphql.Null } @@ -61286,7 +63888,7 @@ func (ec *executionContext) _PositionConnection_pageInfo(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.Party().WithdrawalsConnection(rctx, obj, fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -61295,36 +63897,43 @@ func (ec *executionContext) _PositionConnection_pageInfo(ctx context.Context, fi if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(*v2.WithdrawalsConnection) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalOWithdrawalsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐWithdrawalsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_withdrawalsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionConnection", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "edges": + return ec.fieldContext_WithdrawalsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_WithdrawalsConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, fmt.Errorf("no field named %q was found under type WithdrawalsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_withdrawalsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _PositionEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.PositionEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionEdge_node(ctx, field) +func (ec *executionContext) _Party_depositsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_depositsConnection(ctx, field) if err != nil { return graphql.Null } @@ -61337,60 +63946,52 @@ func (ec *executionContext) _PositionEdge_node(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.Party().DepositsConnection(rctx, obj, fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Position) + res := resTmp.(*v2.DepositsConnection) fc.Result = res - return ec.marshalNPosition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPosition(ctx, field.Selections, res) + return ec.marshalODepositsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDepositsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_depositsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionEdge", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "market": - return ec.fieldContext_Position_market(ctx, field) - case "party": - return ec.fieldContext_Position_party(ctx, field) - case "openVolume": - return ec.fieldContext_Position_openVolume(ctx, field) - case "realisedPNL": - return ec.fieldContext_Position_realisedPNL(ctx, field) - case "unrealisedPNL": - return ec.fieldContext_Position_unrealisedPNL(ctx, field) - case "averageEntryPrice": - return ec.fieldContext_Position_averageEntryPrice(ctx, field) - case "lossSocializationAmount": - return ec.fieldContext_Position_lossSocializationAmount(ctx, field) - case "positionStatus": - return ec.fieldContext_Position_positionStatus(ctx, field) - case "marginsConnection": - return ec.fieldContext_Position_marginsConnection(ctx, field) - case "updatedAt": - return ec.fieldContext_Position_updatedAt(ctx, field) + case "edges": + return ec.fieldContext_DepositsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_DepositsConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Position", field.Name) + return nil, fmt.Errorf("no field named %q was found under type DepositsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_depositsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _PositionEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.PositionEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionEdge_cursor(ctx, field) +func (ec *executionContext) _Party_liquidityProvisions(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_liquidityProvisions(ctx, field) if err != nil { return graphql.Null } @@ -61403,7 +64004,7 @@ func (ec *executionContext) _PositionEdge_cursor(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.Party().LiquidityProvisions(rctx, obj, fc.Args["marketId"].(*string), fc.Args["reference"].(*string), fc.Args["live"].(*bool), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -61412,26 +64013,43 @@ func (ec *executionContext) _PositionEdge_cursor(ctx context.Context, field grap if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.LiquidityProvisionsWithPendingConnection) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOLiquidityProvisionsWithPendingConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvisionsWithPendingConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_liquidityProvisions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionEdge", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_LiquidityProvisionsWithPendingConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_LiquidityProvisionsWithPendingConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionsWithPendingConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_liquidityProvisions_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _PositionEstimate_margin(ctx context.Context, field graphql.CollectedField, obj *PositionEstimate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionEstimate_margin(ctx, field) +func (ec *executionContext) _Party_liquidityProvisionsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) if err != nil { return graphql.Null } @@ -61444,44 +64062,52 @@ func (ec *executionContext) _PositionEstimate_margin(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Margin, nil + return ec.resolvers.Party().LiquidityProvisionsConnection(rctx, obj, fc.Args["marketId"].(*string), fc.Args["reference"].(*string), fc.Args["live"].(*bool), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v2.MarginEstimate) + res := resTmp.(*v2.LiquidityProvisionsConnection) fc.Result = res - return ec.marshalNMarginEstimate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarginEstimate(ctx, field.Selections, res) + return ec.marshalOLiquidityProvisionsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProvisionsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionEstimate_margin(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_liquidityProvisionsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionEstimate", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "worstCase": - return ec.fieldContext_MarginEstimate_worstCase(ctx, field) - case "bestCase": - return ec.fieldContext_MarginEstimate_bestCase(ctx, field) + case "edges": + return ec.fieldContext_LiquidityProvisionsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_LiquidityProvisionsConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type MarginEstimate", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionsConnection", field.Name) }, } - return fc, nil -} - -func (ec *executionContext) _PositionEstimate_liquidation(ctx context.Context, field graphql.CollectedField, obj *PositionEstimate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionEstimate_liquidation(ctx, field) + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_liquidityProvisionsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Party_delegationsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_delegationsConnection(ctx, field) if err != nil { return graphql.Null } @@ -61494,7 +64120,7 @@ func (ec *executionContext) _PositionEstimate_liquidation(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Liquidation, nil + return ec.resolvers.Party().DelegationsConnection(rctx, obj, fc.Args["nodeId"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -61503,32 +64129,43 @@ func (ec *executionContext) _PositionEstimate_liquidation(ctx context.Context, f if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.LiquidationEstimate) + res := resTmp.(*v2.DelegationsConnection) fc.Result = res - return ec.marshalOLiquidationEstimate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidationEstimate(ctx, field.Selections, res) + return ec.marshalODelegationsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDelegationsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionEstimate_liquidation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_delegationsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionEstimate", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "worstCase": - return ec.fieldContext_LiquidationEstimate_worstCase(ctx, field) - case "bestCase": - return ec.fieldContext_LiquidationEstimate_bestCase(ctx, field) + case "edges": + return ec.fieldContext_DelegationsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_DelegationsConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type LiquidationEstimate", field.Name) + return nil, fmt.Errorf("no field named %q was found under type DelegationsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_delegationsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _PositionResolution_marketId(ctx context.Context, field graphql.CollectedField, obj *PositionResolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionResolution_marketId(ctx, field) +func (ec *executionContext) _Party_stakingSummary(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_stakingSummary(ctx, field) if err != nil { return graphql.Null } @@ -61541,7 +64178,7 @@ func (ec *executionContext) _PositionResolution_marketId(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketID, nil + return ec.resolvers.Party().StakingSummary(rctx, obj, fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -61553,26 +64190,43 @@ func (ec *executionContext) _PositionResolution_marketId(ctx context.Context, fi } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*StakingSummary) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNStakingSummary2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐStakingSummary(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionResolution_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_stakingSummary(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionResolution", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "currentStakeAvailable": + return ec.fieldContext_StakingSummary_currentStakeAvailable(ctx, field) + case "linkings": + return ec.fieldContext_StakingSummary_linkings(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type StakingSummary", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_stakingSummary_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _PositionResolution_distressed(ctx context.Context, field graphql.CollectedField, obj *PositionResolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionResolution_distressed(ctx, field) +func (ec *executionContext) _Party_rewardsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_rewardsConnection(ctx, field) if err != nil { return graphql.Null } @@ -61585,38 +64239,52 @@ func (ec *executionContext) _PositionResolution_distressed(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Distressed, nil + return ec.resolvers.Party().RewardsConnection(rctx, obj, fc.Args["assetId"].(*string), fc.Args["pagination"].(*v2.Pagination), fc.Args["fromEpoch"].(*int), fc.Args["toEpoch"].(*int), fc.Args["teamId"].(*string), fc.Args["gameId"].(*string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*v2.RewardsConnection) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalORewardsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐRewardsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionResolution_distressed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_rewardsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionResolution", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_RewardsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_RewardsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type RewardsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_rewardsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _PositionResolution_closed(ctx context.Context, field graphql.CollectedField, obj *PositionResolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionResolution_closed(ctx, field) +func (ec *executionContext) _Party_rewardSummaries(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_rewardSummaries(ctx, field) if err != nil { return graphql.Null } @@ -61629,38 +64297,54 @@ func (ec *executionContext) _PositionResolution_closed(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Closed, nil + return ec.resolvers.Party().RewardSummaries(rctx, obj, fc.Args["assetId"].(*string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.([]*vega.RewardSummary) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalORewardSummary2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐRewardSummary(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionResolution_closed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_rewardSummaries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionResolution", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "asset": + return ec.fieldContext_RewardSummary_asset(ctx, field) + case "amount": + return ec.fieldContext_RewardSummary_amount(ctx, field) + case "rewardsConnection": + return ec.fieldContext_RewardSummary_rewardsConnection(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type RewardSummary", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_rewardSummaries_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _PositionResolution_markPrice(ctx context.Context, field graphql.CollectedField, obj *PositionResolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionResolution_markPrice(ctx, field) +func (ec *executionContext) _Party_transfersConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_transfersConnection(ctx, field) if err != nil { return graphql.Null } @@ -61673,38 +64357,52 @@ func (ec *executionContext) _PositionResolution_markPrice(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarkPrice, nil + return ec.resolvers.Party().TransfersConnection(rctx, obj, fc.Args["direction"].(*TransferDirection), fc.Args["pagination"].(*v2.Pagination), fc.Args["isReward"].(*bool), fc.Args["fromEpoch"].(*int), fc.Args["toEpoch"].(*int), fc.Args["status"].(*v1.Transfer_Status), fc.Args["scope"].(*v2.ListTransfersRequest_Scope)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.TransferConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTransferConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTransferConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionResolution_markPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_transfersConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionResolution", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_TransferConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_TransferConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TransferConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_transfersConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _PositionUpdate_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionUpdate_marketId(ctx, field) +func (ec *executionContext) _Party_activityStreak(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_activityStreak(ctx, field) if err != nil { return graphql.Null } @@ -61717,38 +64415,64 @@ func (ec *executionContext) _PositionUpdate_marketId(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return ec.resolvers.Party().ActivityStreak(rctx, obj, fc.Args["epoch"].(*int)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v1.PartyActivityStreak) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOPartyActivityStreak2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyActivityStreak(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionUpdate_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_activityStreak(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionUpdate", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "activeFor": + return ec.fieldContext_PartyActivityStreak_activeFor(ctx, field) + case "inactiveFor": + return ec.fieldContext_PartyActivityStreak_inactiveFor(ctx, field) + case "isActive": + return ec.fieldContext_PartyActivityStreak_isActive(ctx, field) + case "rewardDistributionMultiplier": + return ec.fieldContext_PartyActivityStreak_rewardDistributionMultiplier(ctx, field) + case "rewardVestingMultiplier": + return ec.fieldContext_PartyActivityStreak_rewardVestingMultiplier(ctx, field) + case "epoch": + return ec.fieldContext_PartyActivityStreak_epoch(ctx, field) + case "tradedVolume": + return ec.fieldContext_PartyActivityStreak_tradedVolume(ctx, field) + case "openVolume": + return ec.fieldContext_PartyActivityStreak_openVolume(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyActivityStreak", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_activityStreak_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _PositionUpdate_partyId(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionUpdate_partyId(ctx, field) +func (ec *executionContext) _Party_vestingBalancesSummary(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_vestingBalancesSummary(ctx, field) if err != nil { return graphql.Null } @@ -61761,7 +64485,7 @@ func (ec *executionContext) _PositionUpdate_partyId(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PartyId, nil + return ec.resolvers.Party().VestingBalancesSummary(rctx, obj, fc.Args["assetId"].(*string)) }) if err != nil { ec.Error(ctx, err) @@ -61773,26 +64497,45 @@ func (ec *executionContext) _PositionUpdate_partyId(ctx context.Context, field g } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.GetVestingBalancesSummaryResponse) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNPartyVestingBalancesSummary2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGetVestingBalancesSummaryResponse(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionUpdate_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_vestingBalancesSummary(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionUpdate", + Object: "Party", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "epoch": + return ec.fieldContext_PartyVestingBalancesSummary_epoch(ctx, field) + case "vestingBalances": + return ec.fieldContext_PartyVestingBalancesSummary_vestingBalances(ctx, field) + case "lockedBalances": + return ec.fieldContext_PartyVestingBalancesSummary_lockedBalances(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyVestingBalancesSummary", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Party_vestingBalancesSummary_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _PositionUpdate_openVolume(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionUpdate_openVolume(ctx, field) +func (ec *executionContext) _Party_vestingStats(ctx context.Context, field graphql.CollectedField, obj *vega.Party) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Party_vestingStats(ctx, field) if err != nil { return graphql.Null } @@ -61805,38 +64548,43 @@ func (ec *executionContext) _PositionUpdate_openVolume(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PositionUpdate().OpenVolume(rctx, obj) + return ec.resolvers.Party().VestingStats(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.GetPartyVestingStatsResponse) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOPartyVestingStats2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGetPartyVestingStatsResponse(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionUpdate_openVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Party_vestingStats(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionUpdate", + Object: "Party", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "epochSeq": + return ec.fieldContext_PartyVestingStats_epochSeq(ctx, field) + case "rewardBonusMultiplier": + return ec.fieldContext_PartyVestingStats_rewardBonusMultiplier(ctx, field) + case "quantumBalance": + return ec.fieldContext_PartyVestingStats_quantumBalance(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyVestingStats", field.Name) }, } return fc, nil } -func (ec *executionContext) _PositionUpdate_realisedPNL(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionUpdate_realisedPNL(ctx, field) +func (ec *executionContext) _PartyActivityStreak_activeFor(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyActivityStreak_activeFor(ctx, field) if err != nil { return graphql.Null } @@ -61849,7 +64597,7 @@ func (ec *executionContext) _PositionUpdate_realisedPNL(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RealisedPnl, nil + return ec.resolvers.PartyActivityStreak().ActiveFor(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -61861,26 +64609,26 @@ func (ec *executionContext) _PositionUpdate_realisedPNL(ctx context.Context, fie } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionUpdate_realisedPNL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyActivityStreak_activeFor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionUpdate", + Object: "PartyActivityStreak", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PositionUpdate_unrealisedPNL(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionUpdate_unrealisedPNL(ctx, field) +func (ec *executionContext) _PartyActivityStreak_inactiveFor(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyActivityStreak_inactiveFor(ctx, field) if err != nil { return graphql.Null } @@ -61893,7 +64641,7 @@ func (ec *executionContext) _PositionUpdate_unrealisedPNL(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UnrealisedPnl, nil + return ec.resolvers.PartyActivityStreak().InactiveFor(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -61905,26 +64653,26 @@ func (ec *executionContext) _PositionUpdate_unrealisedPNL(ctx context.Context, f } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionUpdate_unrealisedPNL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyActivityStreak_inactiveFor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionUpdate", + Object: "PartyActivityStreak", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PositionUpdate_averageEntryPrice(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionUpdate_averageEntryPrice(ctx, field) +func (ec *executionContext) _PartyActivityStreak_isActive(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyActivityStreak_isActive(ctx, field) if err != nil { return graphql.Null } @@ -61937,7 +64685,7 @@ func (ec *executionContext) _PositionUpdate_averageEntryPrice(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AverageEntryPrice, nil + return obj.IsActive, nil }) if err != nil { ec.Error(ctx, err) @@ -61949,26 +64697,26 @@ func (ec *executionContext) _PositionUpdate_averageEntryPrice(ctx context.Contex } return graphql.Null } - res := resTmp.(string) + res := resTmp.(bool) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionUpdate_averageEntryPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyActivityStreak_isActive(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionUpdate", + Object: "PartyActivityStreak", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PositionUpdate_updatedAt(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionUpdate_updatedAt(ctx, field) +func (ec *executionContext) _PartyActivityStreak_rewardDistributionMultiplier(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyActivityStreak_rewardDistributionMultiplier(ctx, field) if err != nil { return graphql.Null } @@ -61981,35 +64729,38 @@ func (ec *executionContext) _PositionUpdate_updatedAt(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdatedAt, nil + return ec.resolvers.PartyActivityStreak().RewardDistributionMultiplier(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalOTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionUpdate_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyActivityStreak_rewardDistributionMultiplier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionUpdate", + Object: "PartyActivityStreak", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PositionUpdate_lossSocializationAmount(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionUpdate_lossSocializationAmount(ctx, field) +func (ec *executionContext) _PartyActivityStreak_rewardVestingMultiplier(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyActivityStreak_rewardVestingMultiplier(ctx, field) if err != nil { return graphql.Null } @@ -62022,7 +64773,7 @@ func (ec *executionContext) _PositionUpdate_lossSocializationAmount(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PositionUpdate().LossSocializationAmount(rctx, obj) + return ec.resolvers.PartyActivityStreak().RewardVestingMultiplier(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -62039,9 +64790,9 @@ func (ec *executionContext) _PositionUpdate_lossSocializationAmount(ctx context. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionUpdate_lossSocializationAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyActivityStreak_rewardVestingMultiplier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionUpdate", + Object: "PartyActivityStreak", Field: field, IsMethod: true, IsResolver: true, @@ -62052,8 +64803,8 @@ func (ec *executionContext) fieldContext_PositionUpdate_lossSocializationAmount( return fc, nil } -func (ec *executionContext) _PositionUpdate_positionStatus(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PositionUpdate_positionStatus(ctx, field) +func (ec *executionContext) _PartyActivityStreak_epoch(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyActivityStreak_epoch(ctx, field) if err != nil { return graphql.Null } @@ -62066,7 +64817,7 @@ func (ec *executionContext) _PositionUpdate_positionStatus(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PositionStatus, nil + return ec.resolvers.PartyActivityStreak().Epoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -62078,26 +64829,26 @@ func (ec *executionContext) _PositionUpdate_positionStatus(ctx context.Context, } return graphql.Null } - res := resTmp.(vega.PositionStatus) + res := resTmp.(int) fc.Result = res - return ec.marshalNPositionStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPositionStatus(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PositionUpdate_positionStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyActivityStreak_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PositionUpdate", + Object: "PartyActivityStreak", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type PositionStatus does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PriceLevel_price(ctx context.Context, field graphql.CollectedField, obj *vega.PriceLevel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceLevel_price(ctx, field) +func (ec *executionContext) _PartyActivityStreak_tradedVolume(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyActivityStreak_tradedVolume(ctx, field) if err != nil { return graphql.Null } @@ -62110,7 +64861,7 @@ func (ec *executionContext) _PriceLevel_price(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Price, nil + return obj.TradedVolume, nil }) if err != nil { ec.Error(ctx, err) @@ -62127,9 +64878,9 @@ func (ec *executionContext) _PriceLevel_price(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PriceLevel_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyActivityStreak_tradedVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PriceLevel", + Object: "PartyActivityStreak", Field: field, IsMethod: false, IsResolver: false, @@ -62140,8 +64891,8 @@ func (ec *executionContext) fieldContext_PriceLevel_price(ctx context.Context, f return fc, nil } -func (ec *executionContext) _PriceLevel_volume(ctx context.Context, field graphql.CollectedField, obj *vega.PriceLevel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceLevel_volume(ctx, field) +func (ec *executionContext) _PartyActivityStreak_openVolume(ctx context.Context, field graphql.CollectedField, obj *v1.PartyActivityStreak) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyActivityStreak_openVolume(ctx, field) if err != nil { return graphql.Null } @@ -62154,7 +64905,7 @@ func (ec *executionContext) _PriceLevel_volume(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PriceLevel().Volume(rctx, obj) + return obj.OpenVolume, nil }) if err != nil { ec.Error(ctx, err) @@ -62171,12 +64922,12 @@ func (ec *executionContext) _PriceLevel_volume(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PriceLevel_volume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyActivityStreak_openVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PriceLevel", + Object: "PartyActivityStreak", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -62184,8 +64935,8 @@ func (ec *executionContext) fieldContext_PriceLevel_volume(ctx context.Context, return fc, nil } -func (ec *executionContext) _PriceLevel_numberOfOrders(ctx context.Context, field graphql.CollectedField, obj *vega.PriceLevel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) +func (ec *executionContext) _PartyAmount_partyId(ctx context.Context, field graphql.CollectedField, obj *v1.PartyAmount) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyAmount_partyId(ctx, field) if err != nil { return graphql.Null } @@ -62198,7 +64949,7 @@ func (ec *executionContext) _PriceLevel_numberOfOrders(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PriceLevel().NumberOfOrders(rctx, obj) + return ec.resolvers.PartyAmount().PartyID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -62215,9 +64966,9 @@ func (ec *executionContext) _PriceLevel_numberOfOrders(ctx context.Context, fiel return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PriceLevel_numberOfOrders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyAmount_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PriceLevel", + Object: "PartyAmount", Field: field, IsMethod: true, IsResolver: true, @@ -62228,8 +64979,8 @@ func (ec *executionContext) fieldContext_PriceLevel_numberOfOrders(ctx context.C return fc, nil } -func (ec *executionContext) _PriceMonitoringBounds_minValidPrice(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringBounds) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceMonitoringBounds_minValidPrice(ctx, field) +func (ec *executionContext) _PartyAmount_amount(ctx context.Context, field graphql.CollectedField, obj *v1.PartyAmount) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyAmount_amount(ctx, field) if err != nil { return graphql.Null } @@ -62242,7 +64993,7 @@ func (ec *executionContext) _PriceMonitoringBounds_minValidPrice(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MinValidPrice, nil + return obj.Amount, nil }) if err != nil { ec.Error(ctx, err) @@ -62259,9 +65010,9 @@ func (ec *executionContext) _PriceMonitoringBounds_minValidPrice(ctx context.Con return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PriceMonitoringBounds_minValidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyAmount_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PriceMonitoringBounds", + Object: "PartyAmount", Field: field, IsMethod: false, IsResolver: false, @@ -62272,8 +65023,8 @@ func (ec *executionContext) fieldContext_PriceMonitoringBounds_minValidPrice(ctx return fc, nil } -func (ec *executionContext) _PriceMonitoringBounds_maxValidPrice(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringBounds) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceMonitoringBounds_maxValidPrice(ctx, field) +func (ec *executionContext) _PartyConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.PartyConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -62286,7 +65037,7 @@ func (ec *executionContext) _PriceMonitoringBounds_maxValidPrice(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MaxValidPrice, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -62298,26 +65049,32 @@ func (ec *executionContext) _PriceMonitoringBounds_maxValidPrice(ctx context.Con } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.PartyEdge) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPartyEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PriceMonitoringBounds_maxValidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PriceMonitoringBounds", + Object: "PartyConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_PartyEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_PartyEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _PriceMonitoringBounds_trigger(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringBounds) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceMonitoringBounds_trigger(ctx, field) +func (ec *executionContext) _PartyConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.PartyConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -62330,7 +65087,7 @@ func (ec *executionContext) _PriceMonitoringBounds_trigger(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Trigger, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -62342,34 +65099,36 @@ func (ec *executionContext) _PriceMonitoringBounds_trigger(ctx context.Context, } return graphql.Null } - res := resTmp.(*PriceMonitoringTrigger) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNPriceMonitoringTrigger2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringTrigger(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PriceMonitoringBounds_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PriceMonitoringBounds", + Object: "PartyConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "horizonSecs": - return ec.fieldContext_PriceMonitoringTrigger_horizonSecs(ctx, field) - case "probability": - return ec.fieldContext_PriceMonitoringTrigger_probability(ctx, field) - case "auctionExtensionSecs": - return ec.fieldContext_PriceMonitoringTrigger_auctionExtensionSecs(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringTrigger", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _PriceMonitoringBounds_referencePrice(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringBounds) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceMonitoringBounds_referencePrice(ctx, field) +func (ec *executionContext) _PartyEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.PartyEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -62382,7 +65141,7 @@ func (ec *executionContext) _PriceMonitoringBounds_referencePrice(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReferencePrice, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -62394,26 +65153,68 @@ func (ec *executionContext) _PriceMonitoringBounds_referencePrice(ctx context.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Party) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PriceMonitoringBounds_referencePrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PriceMonitoringBounds", + Object: "PartyEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) }, } return fc, nil } -func (ec *executionContext) _PriceMonitoringParameters_triggers(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringParameters) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceMonitoringParameters_triggers(ctx, field) +func (ec *executionContext) _PartyEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.PartyEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -62426,43 +65227,38 @@ func (ec *executionContext) _PriceMonitoringParameters_triggers(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Triggers, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*PriceMonitoringTrigger) + res := resTmp.(string) fc.Result = res - return ec.marshalOPriceMonitoringTrigger2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringTriggerᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PriceMonitoringParameters_triggers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PriceMonitoringParameters", + Object: "PartyEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "horizonSecs": - return ec.fieldContext_PriceMonitoringTrigger_horizonSecs(ctx, field) - case "probability": - return ec.fieldContext_PriceMonitoringTrigger_probability(ctx, field) - case "auctionExtensionSecs": - return ec.fieldContext_PriceMonitoringTrigger_auctionExtensionSecs(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringTrigger", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PriceMonitoringSettings_parameters(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringSettings) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceMonitoringSettings_parameters(ctx, field) +func (ec *executionContext) _PartyLockedBalance_asset(ctx context.Context, field graphql.CollectedField, obj *v1.PartyLockedBalance) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyLockedBalance_asset(ctx, field) if err != nil { return graphql.Null } @@ -62475,39 +65271,70 @@ func (ec *executionContext) _PriceMonitoringSettings_parameters(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Parameters, nil + return ec.resolvers.PartyLockedBalance().Asset(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*PriceMonitoringParameters) + res := resTmp.(*vega.Asset) fc.Result = res - return ec.marshalOPriceMonitoringParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringParameters(ctx, field.Selections, res) + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PriceMonitoringSettings_parameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyLockedBalance_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PriceMonitoringSettings", + Object: "PartyLockedBalance", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "triggers": - return ec.fieldContext_PriceMonitoringParameters_triggers(ctx, field) + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringParameters", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) }, } return fc, nil } -func (ec *executionContext) _PriceMonitoringTrigger_horizonSecs(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringTrigger) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceMonitoringTrigger_horizonSecs(ctx, field) +func (ec *executionContext) _PartyLockedBalance_balance(ctx context.Context, field graphql.CollectedField, obj *v1.PartyLockedBalance) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyLockedBalance_balance(ctx, field) if err != nil { return graphql.Null } @@ -62520,7 +65347,7 @@ func (ec *executionContext) _PriceMonitoringTrigger_horizonSecs(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HorizonSecs, nil + return obj.Balance, nil }) if err != nil { ec.Error(ctx, err) @@ -62532,26 +65359,26 @@ func (ec *executionContext) _PriceMonitoringTrigger_horizonSecs(ctx context.Cont } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PriceMonitoringTrigger_horizonSecs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyLockedBalance_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PriceMonitoringTrigger", + Object: "PartyLockedBalance", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PriceMonitoringTrigger_probability(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringTrigger) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceMonitoringTrigger_probability(ctx, field) +func (ec *executionContext) _PartyLockedBalance_untilEpoch(ctx context.Context, field graphql.CollectedField, obj *v1.PartyLockedBalance) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyLockedBalance_untilEpoch(ctx, field) if err != nil { return graphql.Null } @@ -62564,7 +65391,7 @@ func (ec *executionContext) _PriceMonitoringTrigger_probability(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Probability, nil + return ec.resolvers.PartyLockedBalance().UntilEpoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -62576,26 +65403,26 @@ func (ec *executionContext) _PriceMonitoringTrigger_probability(ctx context.Cont } return graphql.Null } - res := resTmp.(float64) + res := resTmp.(int) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PriceMonitoringTrigger_probability(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyLockedBalance_untilEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PriceMonitoringTrigger", + Object: "PartyLockedBalance", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PriceMonitoringTrigger_auctionExtensionSecs(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringTrigger) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PriceMonitoringTrigger_auctionExtensionSecs(ctx, field) +func (ec *executionContext) _PartyMarginMode_marketId(ctx context.Context, field graphql.CollectedField, obj *v2.PartyMarginMode) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyMarginMode_marketId(ctx, field) if err != nil { return graphql.Null } @@ -62608,7 +65435,7 @@ func (ec *executionContext) _PriceMonitoringTrigger_auctionExtensionSecs(ctx con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AuctionExtensionSecs, nil + return obj.MarketId, nil }) if err != nil { ec.Error(ctx, err) @@ -62620,26 +65447,26 @@ func (ec *executionContext) _PriceMonitoringTrigger_auctionExtensionSecs(ctx con } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PriceMonitoringTrigger_auctionExtensionSecs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyMarginMode_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PriceMonitoringTrigger", + Object: "PartyMarginMode", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Property_name(ctx context.Context, field graphql.CollectedField, obj *v13.Property) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Property_name(ctx, field) +func (ec *executionContext) _PartyMarginMode_partyId(ctx context.Context, field graphql.CollectedField, obj *v2.PartyMarginMode) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyMarginMode_partyId(ctx, field) if err != nil { return graphql.Null } @@ -62652,7 +65479,7 @@ func (ec *executionContext) _Property_name(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.PartyId, nil }) if err != nil { ec.Error(ctx, err) @@ -62666,24 +65493,24 @@ func (ec *executionContext) _Property_name(ctx context.Context, field graphql.Co } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Property_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyMarginMode_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Property", + Object: "PartyMarginMode", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Property_value(ctx context.Context, field graphql.CollectedField, obj *v13.Property) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Property_value(ctx, field) +func (ec *executionContext) _PartyMarginMode_marginMode(ctx context.Context, field graphql.CollectedField, obj *v2.PartyMarginMode) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyMarginMode_marginMode(ctx, field) if err != nil { return graphql.Null } @@ -62696,7 +65523,7 @@ func (ec *executionContext) _Property_value(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Value, nil + return obj.MarginMode, nil }) if err != nil { ec.Error(ctx, err) @@ -62708,26 +65535,26 @@ func (ec *executionContext) _Property_value(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.MarginMode) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNMarginMode2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginMode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Property_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyMarginMode_marginMode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Property", + Object: "PartyMarginMode", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type MarginMode does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PropertyKey_name(ctx context.Context, field graphql.CollectedField, obj *PropertyKey) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PropertyKey_name(ctx, field) +func (ec *executionContext) _PartyMarginMode_marginFactor(ctx context.Context, field graphql.CollectedField, obj *v2.PartyMarginMode) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyMarginMode_marginFactor(ctx, field) if err != nil { return graphql.Null } @@ -62740,7 +65567,7 @@ func (ec *executionContext) _PropertyKey_name(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.MarginFactor, nil }) if err != nil { ec.Error(ctx, err) @@ -62754,9 +65581,9 @@ func (ec *executionContext) _PropertyKey_name(ctx context.Context, field graphql return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PropertyKey_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyMarginMode_marginFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PropertyKey", + Object: "PartyMarginMode", Field: field, IsMethod: false, IsResolver: false, @@ -62767,8 +65594,8 @@ func (ec *executionContext) fieldContext_PropertyKey_name(ctx context.Context, f return fc, nil } -func (ec *executionContext) _PropertyKey_type(ctx context.Context, field graphql.CollectedField, obj *PropertyKey) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PropertyKey_type(ctx, field) +func (ec *executionContext) _PartyMarginMode_minTheoreticalMarginFactor(ctx context.Context, field graphql.CollectedField, obj *v2.PartyMarginMode) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyMarginMode_minTheoreticalMarginFactor(ctx, field) if err != nil { return graphql.Null } @@ -62781,38 +65608,35 @@ func (ec *executionContext) _PropertyKey_type(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.MinTheoreticalMarginFactor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(v13.PropertyKey_Type) + res := resTmp.(*string) fc.Result = res - return ec.marshalNPropertyKeyType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋdataᚋv1ᚐPropertyKey_Type(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PropertyKey_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyMarginMode_minTheoreticalMarginFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PropertyKey", + Object: "PartyMarginMode", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type PropertyKeyType does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PropertyKey_numberDecimalPlaces(ctx context.Context, field graphql.CollectedField, obj *PropertyKey) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PropertyKey_numberDecimalPlaces(ctx, field) +func (ec *executionContext) _PartyMarginMode_maxTheoreticalLeverage(ctx context.Context, field graphql.CollectedField, obj *v2.PartyMarginMode) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyMarginMode_maxTheoreticalLeverage(ctx, field) if err != nil { return graphql.Null } @@ -62825,7 +65649,7 @@ func (ec *executionContext) _PropertyKey_numberDecimalPlaces(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NumberDecimalPlaces, nil + return obj.MaxTheoreticalLeverage, nil }) if err != nil { ec.Error(ctx, err) @@ -62834,26 +65658,26 @@ func (ec *executionContext) _PropertyKey_numberDecimalPlaces(ctx context.Context if resTmp == nil { return graphql.Null } - res := resTmp.(*int) + res := resTmp.(*string) fc.Result = res - return ec.marshalOInt2ᚖint(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PropertyKey_numberDecimalPlaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyMarginMode_maxTheoreticalLeverage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PropertyKey", + Object: "PartyMarginMode", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Proposal_id(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_id(ctx, field) +func (ec *executionContext) _PartyMarginMode_atEpoch(ctx context.Context, field graphql.CollectedField, obj *v2.PartyMarginMode) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyMarginMode_atEpoch(ctx, field) if err != nil { return graphql.Null } @@ -62866,35 +65690,38 @@ func (ec *executionContext) _Proposal_id(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().ID(rctx, obj) + return ec.resolvers.PartyMarginMode().AtEpoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(int) fc.Result = res - return ec.marshalOID2ᚖstring(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyMarginMode_atEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyMarginMode", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Proposal_reference(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_reference(ctx, field) +func (ec *executionContext) _PartyMarginModeEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.PartyMarginModeEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyMarginModeEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -62907,7 +65734,7 @@ func (ec *executionContext) _Proposal_reference(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().Reference(rctx, obj) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -62919,26 +65746,42 @@ func (ec *executionContext) _Proposal_reference(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PartyMarginMode) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPartyMarginMode2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyMarginMode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyMarginModeEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyMarginModeEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "marketId": + return ec.fieldContext_PartyMarginMode_marketId(ctx, field) + case "partyId": + return ec.fieldContext_PartyMarginMode_partyId(ctx, field) + case "marginMode": + return ec.fieldContext_PartyMarginMode_marginMode(ctx, field) + case "marginFactor": + return ec.fieldContext_PartyMarginMode_marginFactor(ctx, field) + case "minTheoreticalMarginFactor": + return ec.fieldContext_PartyMarginMode_minTheoreticalMarginFactor(ctx, field) + case "maxTheoreticalLeverage": + return ec.fieldContext_PartyMarginMode_maxTheoreticalLeverage(ctx, field) + case "atEpoch": + return ec.fieldContext_PartyMarginMode_atEpoch(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyMarginMode", field.Name) }, } return fc, nil } -func (ec *executionContext) _Proposal_party(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_party(ctx, field) +func (ec *executionContext) _PartyMarginModeEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.PartyMarginModeEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyMarginModeEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -62951,7 +65794,7 @@ func (ec *executionContext) _Proposal_party(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().Party(rctx, obj) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -62963,68 +65806,26 @@ func (ec *executionContext) _Proposal_party(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(*vega.Party) + res := resTmp.(string) fc.Result = res - return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyMarginModeEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyMarginModeEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Proposal_state(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_state(ctx, field) +func (ec *executionContext) _PartyMarginModesConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.PartyMarginModesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyMarginModesConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -63037,38 +65838,41 @@ func (ec *executionContext) _Proposal_state(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().State(rctx, obj) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(vega.Proposal_State) + res := resTmp.([]*v2.PartyMarginModeEdge) fc.Result = res - return ec.marshalNProposalState2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposal_State(ctx, field.Selections, res) + return ec.marshalOPartyMarginModeEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyMarginModeEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyMarginModesConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyMarginModesConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ProposalState does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_PartyMarginModeEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_PartyMarginModeEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyMarginModeEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _Proposal_datetime(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_datetime(ctx, field) +func (ec *executionContext) _PartyMarginModesConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.PartyMarginModesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyMarginModesConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -63081,38 +65885,45 @@ func (ec *executionContext) _Proposal_datetime(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().Datetime(rctx, obj) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_datetime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyMarginModesConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyMarginModesConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Proposal_rationale(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_rationale(ctx, field) +func (ec *executionContext) _PartyProfile_partyId(ctx context.Context, field graphql.CollectedField, obj *vega.PartyProfile) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyProfile_partyId(ctx, field) if err != nil { return graphql.Null } @@ -63125,7 +65936,7 @@ func (ec *executionContext) _Proposal_rationale(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().Rationale(rctx, obj) + return obj.PartyId, nil }) if err != nil { ec.Error(ctx, err) @@ -63137,32 +65948,26 @@ func (ec *executionContext) _Proposal_rationale(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(*vega.ProposalRationale) + res := resTmp.(string) fc.Result = res - return ec.marshalNProposalRationale2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalRationale(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_rationale(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyProfile_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyProfile", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "description": - return ec.fieldContext_ProposalRationale_description(ctx, field) - case "title": - return ec.fieldContext_ProposalRationale_title(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ProposalRationale", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Proposal_terms(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_terms(ctx, field) +func (ec *executionContext) _PartyProfile_alias(ctx context.Context, field graphql.CollectedField, obj *vega.PartyProfile) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyProfile_alias(ctx, field) if err != nil { return graphql.Null } @@ -63175,7 +65980,7 @@ func (ec *executionContext) _Proposal_terms(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().Terms(rctx, obj) + return obj.Alias, nil }) if err != nil { ec.Error(ctx, err) @@ -63187,36 +65992,26 @@ func (ec *executionContext) _Proposal_terms(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(*vega.ProposalTerms) + res := resTmp.(string) fc.Result = res - return ec.marshalNProposalTerms2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalTerms(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_terms(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyProfile_alias(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyProfile", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "closingDatetime": - return ec.fieldContext_ProposalTerms_closingDatetime(ctx, field) - case "enactmentDatetime": - return ec.fieldContext_ProposalTerms_enactmentDatetime(ctx, field) - case "validationDatetime": - return ec.fieldContext_ProposalTerms_validationDatetime(ctx, field) - case "change": - return ec.fieldContext_ProposalTerms_change(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ProposalTerms", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Proposal_votes(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_votes(ctx, field) +func (ec *executionContext) _PartyProfile_metadata(ctx context.Context, field graphql.CollectedField, obj *vega.PartyProfile) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyProfile_metadata(ctx, field) if err != nil { return graphql.Null } @@ -63229,7 +66024,7 @@ func (ec *executionContext) _Proposal_votes(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().Votes(rctx, obj) + return obj.Metadata, nil }) if err != nil { ec.Error(ctx, err) @@ -63241,32 +66036,32 @@ func (ec *executionContext) _Proposal_votes(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(*ProposalVotes) + res := resTmp.([]*vega.Metadata) fc.Result = res - return ec.marshalNProposalVotes2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVotes(ctx, field.Selections, res) + return ec.marshalNMetadata2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMetadataᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_votes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyProfile_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyProfile", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "yes": - return ec.fieldContext_ProposalVotes_yes(ctx, field) - case "no": - return ec.fieldContext_ProposalVotes_no(ctx, field) + case "key": + return ec.fieldContext_Metadata_key(ctx, field) + case "value": + return ec.fieldContext_Metadata_value(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ProposalVotes", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Metadata", field.Name) }, } return fc, nil } -func (ec *executionContext) _Proposal_rejectionReason(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_rejectionReason(ctx, field) +func (ec *executionContext) _PartyProfileEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.PartyProfileEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyProfileEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -63279,35 +66074,46 @@ func (ec *executionContext) _Proposal_rejectionReason(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().RejectionReason(rctx, obj) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.ProposalError) + res := resTmp.(*vega.PartyProfile) fc.Result = res - return ec.marshalOProposalRejectionReason2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalError(ctx, field.Selections, res) + return ec.marshalNPartyProfile2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPartyProfile(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_rejectionReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyProfileEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyProfileEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ProposalRejectionReason does not have child fields") + switch field.Name { + case "partyId": + return ec.fieldContext_PartyProfile_partyId(ctx, field) + case "alias": + return ec.fieldContext_PartyProfile_alias(ctx, field) + case "metadata": + return ec.fieldContext_PartyProfile_metadata(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyProfile", field.Name) }, } return fc, nil } -func (ec *executionContext) _Proposal_errorDetails(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_errorDetails(ctx, field) +func (ec *executionContext) _PartyProfileEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.PartyProfileEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyProfileEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -63320,26 +66126,29 @@ func (ec *executionContext) _Proposal_errorDetails(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().ErrorDetails(rctx, obj) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_errorDetails(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyProfileEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyProfileEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -63347,8 +66156,8 @@ func (ec *executionContext) fieldContext_Proposal_errorDetails(ctx context.Conte return fc, nil } -func (ec *executionContext) _Proposal_requiredMajority(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_requiredMajority(ctx, field) +func (ec *executionContext) _PartyStake_currentStakeAvailable(ctx context.Context, field graphql.CollectedField, obj *v2.GetStakeResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyStake_currentStakeAvailable(ctx, field) if err != nil { return graphql.Null } @@ -63361,7 +66170,7 @@ func (ec *executionContext) _Proposal_requiredMajority(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().RequiredMajority(rctx, obj) + return obj.CurrentStakeAvailable, nil }) if err != nil { ec.Error(ctx, err) @@ -63378,12 +66187,12 @@ func (ec *executionContext) _Proposal_requiredMajority(ctx context.Context, fiel return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_requiredMajority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyStake_currentStakeAvailable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyStake", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -63391,8 +66200,8 @@ func (ec *executionContext) fieldContext_Proposal_requiredMajority(ctx context.C return fc, nil } -func (ec *executionContext) _Proposal_requiredParticipation(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_requiredParticipation(ctx, field) +func (ec *executionContext) _PartyStake_linkings(ctx context.Context, field graphql.CollectedField, obj *v2.GetStakeResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyStake_linkings(ctx, field) if err != nil { return graphql.Null } @@ -63405,38 +66214,55 @@ func (ec *executionContext) _Proposal_requiredParticipation(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().RequiredParticipation(rctx, obj) + return ec.resolvers.PartyStake().Linkings(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v1.StakeLinking) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOStakeLinking2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐStakeLinkingᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_requiredParticipation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyStake_linkings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyStake", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_StakeLinking_id(ctx, field) + case "type": + return ec.fieldContext_StakeLinking_type(ctx, field) + case "timestamp": + return ec.fieldContext_StakeLinking_timestamp(ctx, field) + case "party": + return ec.fieldContext_StakeLinking_party(ctx, field) + case "amount": + return ec.fieldContext_StakeLinking_amount(ctx, field) + case "status": + return ec.fieldContext_StakeLinking_status(ctx, field) + case "finalizedAt": + return ec.fieldContext_StakeLinking_finalizedAt(ctx, field) + case "txHash": + return ec.fieldContext_StakeLinking_txHash(ctx, field) + case "blockHeight": + return ec.fieldContext_StakeLinking_blockHeight(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type StakeLinking", field.Name) }, } return fc, nil } -func (ec *executionContext) _Proposal_requiredLpMajority(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_requiredLpMajority(ctx, field) +func (ec *executionContext) _PartyVestingBalance_asset(ctx context.Context, field graphql.CollectedField, obj *v1.PartyVestingBalance) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyVestingBalance_asset(ctx, field) if err != nil { return graphql.Null } @@ -63449,35 +66275,70 @@ func (ec *executionContext) _Proposal_requiredLpMajority(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().RequiredLpMajority(rctx, obj) + return ec.resolvers.PartyVestingBalance().Asset(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*vega.Asset) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_requiredLpMajority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyVestingBalance_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyVestingBalance", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) }, } return fc, nil } -func (ec *executionContext) _Proposal_requiredLpParticipation(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Proposal_requiredLpParticipation(ctx, field) +func (ec *executionContext) _PartyVestingBalance_balance(ctx context.Context, field graphql.CollectedField, obj *v1.PartyVestingBalance) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyVestingBalance_balance(ctx, field) if err != nil { return graphql.Null } @@ -63490,26 +66351,29 @@ func (ec *executionContext) _Proposal_requiredLpParticipation(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Proposal().RequiredLpParticipation(rctx, obj) + return obj.Balance, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Proposal_requiredLpParticipation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyVestingBalance_balance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Proposal", + Object: "PartyVestingBalance", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -63517,8 +66381,8 @@ func (ec *executionContext) fieldContext_Proposal_requiredLpParticipation(ctx co return fc, nil } -func (ec *executionContext) _ProposalDetail_id(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalDetail_id(ctx, field) +func (ec *executionContext) _PartyVestingBalancesSummary_epoch(ctx context.Context, field graphql.CollectedField, obj *v2.GetVestingBalancesSummaryResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyVestingBalancesSummary_epoch(ctx, field) if err != nil { return graphql.Null } @@ -63531,7 +66395,7 @@ func (ec *executionContext) _ProposalDetail_id(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return ec.resolvers.PartyVestingBalancesSummary().Epoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -63540,26 +66404,26 @@ func (ec *executionContext) _ProposalDetail_id(ctx context.Context, field graphq if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int) fc.Result = res - return ec.marshalOID2string(ctx, field.Selections, res) + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalDetail_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyVestingBalancesSummary_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalDetail", + Object: "PartyVestingBalancesSummary", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalDetail_reference(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalDetail_reference(ctx, field) +func (ec *executionContext) _PartyVestingBalancesSummary_vestingBalances(ctx context.Context, field graphql.CollectedField, obj *v2.GetVestingBalancesSummaryResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyVestingBalancesSummary_vestingBalances(ctx, field) if err != nil { return graphql.Null } @@ -63572,38 +66436,41 @@ func (ec *executionContext) _ProposalDetail_reference(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Reference, nil + return obj.VestingBalances, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v1.PartyVestingBalance) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOPartyVestingBalance2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyVestingBalanceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalDetail_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyVestingBalancesSummary_vestingBalances(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalDetail", + Object: "PartyVestingBalancesSummary", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "asset": + return ec.fieldContext_PartyVestingBalance_asset(ctx, field) + case "balance": + return ec.fieldContext_PartyVestingBalance_balance(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyVestingBalance", field.Name) }, } return fc, nil } -func (ec *executionContext) _ProposalDetail_party(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalDetail_party(ctx, field) +func (ec *executionContext) _PartyVestingBalancesSummary_lockedBalances(ctx context.Context, field graphql.CollectedField, obj *v2.GetVestingBalancesSummaryResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyVestingBalancesSummary_lockedBalances(ctx, field) if err != nil { return graphql.Null } @@ -63616,80 +66483,43 @@ func (ec *executionContext) _ProposalDetail_party(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ProposalDetail().Party(rctx, obj) + return obj.LockedBalances, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Party) + res := resTmp.([]*v1.PartyLockedBalance) fc.Result = res - return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalOPartyLockedBalance2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyLockedBalanceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalDetail_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyVestingBalancesSummary_lockedBalances(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalDetail", + Object: "PartyVestingBalancesSummary", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) + case "asset": + return ec.fieldContext_PartyLockedBalance_asset(ctx, field) + case "balance": + return ec.fieldContext_PartyLockedBalance_balance(ctx, field) + case "untilEpoch": + return ec.fieldContext_PartyLockedBalance_untilEpoch(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PartyLockedBalance", field.Name) }, } return fc, nil } -func (ec *executionContext) _ProposalDetail_state(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalDetail_state(ctx, field) +func (ec *executionContext) _PartyVestingStats_epochSeq(ctx context.Context, field graphql.CollectedField, obj *v2.GetPartyVestingStatsResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyVestingStats_epochSeq(ctx, field) if err != nil { return graphql.Null } @@ -63702,7 +66532,7 @@ func (ec *executionContext) _ProposalDetail_state(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.State, nil + return ec.resolvers.PartyVestingStats().EpochSeq(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -63714,26 +66544,26 @@ func (ec *executionContext) _ProposalDetail_state(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(vega.Proposal_State) + res := resTmp.(int) fc.Result = res - return ec.marshalNProposalState2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposal_State(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalDetail_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyVestingStats_epochSeq(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalDetail", + Object: "PartyVestingStats", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ProposalState does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalDetail_datetime(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalDetail_datetime(ctx, field) +func (ec *executionContext) _PartyVestingStats_rewardBonusMultiplier(ctx context.Context, field graphql.CollectedField, obj *v2.GetPartyVestingStatsResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyVestingStats_rewardBonusMultiplier(ctx, field) if err != nil { return graphql.Null } @@ -63746,7 +66576,7 @@ func (ec *executionContext) _ProposalDetail_datetime(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ProposalDetail().Datetime(rctx, obj) + return obj.RewardBonusMultiplier, nil }) if err != nil { ec.Error(ctx, err) @@ -63758,26 +66588,26 @@ func (ec *executionContext) _ProposalDetail_datetime(ctx context.Context, field } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalDetail_datetime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyVestingStats_rewardBonusMultiplier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalDetail", + Object: "PartyVestingStats", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalDetail_terms(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalDetail_terms(ctx, field) +func (ec *executionContext) _PartyVestingStats_quantumBalance(ctx context.Context, field graphql.CollectedField, obj *v2.GetPartyVestingStatsResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PartyVestingStats_quantumBalance(ctx, field) if err != nil { return graphql.Null } @@ -63790,7 +66620,7 @@ func (ec *executionContext) _ProposalDetail_terms(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Terms, nil + return obj.QuantumBalance, nil }) if err != nil { ec.Error(ctx, err) @@ -63802,36 +66632,26 @@ func (ec *executionContext) _ProposalDetail_terms(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(*vega.ProposalTerms) + res := resTmp.(string) fc.Result = res - return ec.marshalNProposalTerms2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalTerms(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalDetail_terms(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PartyVestingStats_quantumBalance(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalDetail", + Object: "PartyVestingStats", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "closingDatetime": - return ec.fieldContext_ProposalTerms_closingDatetime(ctx, field) - case "enactmentDatetime": - return ec.fieldContext_ProposalTerms_enactmentDatetime(ctx, field) - case "validationDatetime": - return ec.fieldContext_ProposalTerms_validationDatetime(ctx, field) - case "change": - return ec.fieldContext_ProposalTerms_change(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ProposalTerms", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalDetail_rationale(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalDetail_rationale(ctx, field) +func (ec *executionContext) _PeggedOrder_reference(ctx context.Context, field graphql.CollectedField, obj *vega.PeggedOrder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PeggedOrder_reference(ctx, field) if err != nil { return graphql.Null } @@ -63844,7 +66664,7 @@ func (ec *executionContext) _ProposalDetail_rationale(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Rationale, nil + return obj.Reference, nil }) if err != nil { ec.Error(ctx, err) @@ -63856,32 +66676,26 @@ func (ec *executionContext) _ProposalDetail_rationale(ctx context.Context, field } return graphql.Null } - res := resTmp.(*vega.ProposalRationale) + res := resTmp.(vega.PeggedReference) fc.Result = res - return ec.marshalNProposalRationale2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalRationale(ctx, field.Selections, res) + return ec.marshalNPeggedReference2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPeggedReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalDetail_rationale(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PeggedOrder_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalDetail", + Object: "PeggedOrder", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "description": - return ec.fieldContext_ProposalRationale_description(ctx, field) - case "title": - return ec.fieldContext_ProposalRationale_title(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ProposalRationale", field.Name) + return nil, errors.New("field of type PeggedReference does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalDetail_rejectionReason(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalDetail_rejectionReason(ctx, field) +func (ec *executionContext) _PeggedOrder_offset(ctx context.Context, field graphql.CollectedField, obj *vega.PeggedOrder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PeggedOrder_offset(ctx, field) if err != nil { return graphql.Null } @@ -63894,35 +66708,38 @@ func (ec *executionContext) _ProposalDetail_rejectionReason(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ProposalDetail().RejectionReason(rctx, obj) + return obj.Offset, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.ProposalError) + res := resTmp.(string) fc.Result = res - return ec.marshalOProposalRejectionReason2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalError(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalDetail_rejectionReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PeggedOrder_offset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalDetail", + Object: "PeggedOrder", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ProposalRejectionReason does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalDetail_errorDetails(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalDetail_errorDetails(ctx, field) +func (ec *executionContext) _Perpetual_settlementAsset(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Perpetual_settlementAsset(ctx, field) if err != nil { return graphql.Null } @@ -63935,35 +66752,70 @@ func (ec *executionContext) _ProposalDetail_errorDetails(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ErrorDetails, nil + return ec.resolvers.Perpetual().SettlementAsset(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*vega.Asset) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalDetail_errorDetails(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Perpetual_settlementAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalDetail", + Object: "Perpetual", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) }, } return fc, nil } -func (ec *executionContext) _ProposalDetail_requiredMajority(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalDetail_requiredMajority(ctx, field) +func (ec *executionContext) _Perpetual_quoteName(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Perpetual_quoteName(ctx, field) if err != nil { return graphql.Null } @@ -63976,7 +66828,7 @@ func (ec *executionContext) _ProposalDetail_requiredMajority(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RequiredMajority, nil + return obj.QuoteName, nil }) if err != nil { ec.Error(ctx, err) @@ -63993,9 +66845,9 @@ func (ec *executionContext) _ProposalDetail_requiredMajority(ctx context.Context return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalDetail_requiredMajority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Perpetual_quoteName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalDetail", + Object: "Perpetual", Field: field, IsMethod: false, IsResolver: false, @@ -64006,8 +66858,8 @@ func (ec *executionContext) fieldContext_ProposalDetail_requiredMajority(ctx con return fc, nil } -func (ec *executionContext) _ProposalDetail_requiredParticipation(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalDetail_requiredParticipation(ctx, field) +func (ec *executionContext) _Perpetual_marginFundingFactor(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Perpetual_marginFundingFactor(ctx, field) if err != nil { return graphql.Null } @@ -64020,7 +66872,7 @@ func (ec *executionContext) _ProposalDetail_requiredParticipation(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RequiredParticipation, nil + return obj.MarginFundingFactor, nil }) if err != nil { ec.Error(ctx, err) @@ -64037,9 +66889,9 @@ func (ec *executionContext) _ProposalDetail_requiredParticipation(ctx context.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalDetail_requiredParticipation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Perpetual_marginFundingFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalDetail", + Object: "Perpetual", Field: field, IsMethod: false, IsResolver: false, @@ -64050,8 +66902,8 @@ func (ec *executionContext) fieldContext_ProposalDetail_requiredParticipation(ct return fc, nil } -func (ec *executionContext) _ProposalDetail_requiredLpMajority(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalDetail_requiredLpMajority(ctx, field) +func (ec *executionContext) _Perpetual_interestRate(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Perpetual_interestRate(ctx, field) if err != nil { return graphql.Null } @@ -64064,26 +66916,29 @@ func (ec *executionContext) _ProposalDetail_requiredLpMajority(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ProposalDetail().RequiredLpMajority(rctx, obj) + return obj.InterestRate, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalDetail_requiredLpMajority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Perpetual_interestRate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalDetail", + Object: "Perpetual", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -64091,8 +66946,8 @@ func (ec *executionContext) fieldContext_ProposalDetail_requiredLpMajority(ctx c return fc, nil } -func (ec *executionContext) _ProposalDetail_requiredLpParticipation(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalDetail_requiredLpParticipation(ctx, field) +func (ec *executionContext) _Perpetual_clampLowerBound(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Perpetual_clampLowerBound(ctx, field) if err != nil { return graphql.Null } @@ -64105,26 +66960,29 @@ func (ec *executionContext) _ProposalDetail_requiredLpParticipation(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ProposalDetail().RequiredLpParticipation(rctx, obj) + return obj.ClampLowerBound, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalDetail_requiredLpParticipation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Perpetual_clampLowerBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalDetail", + Object: "Perpetual", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -64132,8 +66990,8 @@ func (ec *executionContext) fieldContext_ProposalDetail_requiredLpParticipation( return fc, nil } -func (ec *executionContext) _ProposalEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.GovernanceDataEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalEdge_node(ctx, field) +func (ec *executionContext) _Perpetual_clampUpperBound(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Perpetual_clampUpperBound(ctx, field) if err != nil { return graphql.Null } @@ -64146,7 +67004,7 @@ func (ec *executionContext) _ProposalEdge_node(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.ClampUpperBound, nil }) if err != nil { ec.Error(ctx, err) @@ -64158,56 +67016,26 @@ func (ec *executionContext) _ProposalEdge_node(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(*vega.GovernanceData) + res := resTmp.(string) fc.Result = res - return ec.marshalNProposal2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐGovernanceData(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Perpetual_clampUpperBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalEdge", + Object: "Perpetual", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Proposal_id(ctx, field) - case "reference": - return ec.fieldContext_Proposal_reference(ctx, field) - case "party": - return ec.fieldContext_Proposal_party(ctx, field) - case "state": - return ec.fieldContext_Proposal_state(ctx, field) - case "datetime": - return ec.fieldContext_Proposal_datetime(ctx, field) - case "rationale": - return ec.fieldContext_Proposal_rationale(ctx, field) - case "terms": - return ec.fieldContext_Proposal_terms(ctx, field) - case "votes": - return ec.fieldContext_Proposal_votes(ctx, field) - case "rejectionReason": - return ec.fieldContext_Proposal_rejectionReason(ctx, field) - case "errorDetails": - return ec.fieldContext_Proposal_errorDetails(ctx, field) - case "requiredMajority": - return ec.fieldContext_Proposal_requiredMajority(ctx, field) - case "requiredParticipation": - return ec.fieldContext_Proposal_requiredParticipation(ctx, field) - case "requiredLpMajority": - return ec.fieldContext_Proposal_requiredLpMajority(ctx, field) - case "requiredLpParticipation": - return ec.fieldContext_Proposal_requiredLpParticipation(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Proposal", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.GovernanceDataEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalEdge_cursor(ctx, field) +func (ec *executionContext) _Perpetual_dataSourceSpecForSettlementSchedule(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Perpetual_dataSourceSpecForSettlementSchedule(ctx, field) if err != nil { return graphql.Null } @@ -64220,7 +67048,7 @@ func (ec *executionContext) _ProposalEdge_cursor(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.Perpetual().DataSourceSpecForSettlementSchedule(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -64232,26 +67060,38 @@ func (ec *executionContext) _ProposalEdge_cursor(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*DataSourceSpec) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDataSourceSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Perpetual_dataSourceSpecForSettlementSchedule(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalEdge", + Object: "Perpetual", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_DataSourceSpec_id(ctx, field) + case "createdAt": + return ec.fieldContext_DataSourceSpec_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_DataSourceSpec_updatedAt(ctx, field) + case "data": + return ec.fieldContext_DataSourceSpec_data(ctx, field) + case "status": + return ec.fieldContext_DataSourceSpec_status(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceSpec", field.Name) }, } return fc, nil } -func (ec *executionContext) _ProposalRationale_description(ctx context.Context, field graphql.CollectedField, obj *vega.ProposalRationale) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalRationale_description(ctx, field) +func (ec *executionContext) _Perpetual_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Perpetual_dataSourceSpecForSettlementData(ctx, field) if err != nil { return graphql.Null } @@ -64264,7 +67104,7 @@ func (ec *executionContext) _ProposalRationale_description(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return ec.resolvers.Perpetual().DataSourceSpecForSettlementData(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -64276,26 +67116,38 @@ func (ec *executionContext) _ProposalRationale_description(ctx context.Context, } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*DataSourceSpec) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDataSourceSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalRationale_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Perpetual_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalRationale", + Object: "Perpetual", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_DataSourceSpec_id(ctx, field) + case "createdAt": + return ec.fieldContext_DataSourceSpec_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_DataSourceSpec_updatedAt(ctx, field) + case "data": + return ec.fieldContext_DataSourceSpec_data(ctx, field) + case "status": + return ec.fieldContext_DataSourceSpec_status(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceSpec", field.Name) }, } return fc, nil } -func (ec *executionContext) _ProposalRationale_title(ctx context.Context, field graphql.CollectedField, obj *vega.ProposalRationale) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalRationale_title(ctx, field) +func (ec *executionContext) _Perpetual_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Perpetual_dataSourceSpecBinding(ctx, field) if err != nil { return graphql.Null } @@ -64308,7 +67160,7 @@ func (ec *executionContext) _ProposalRationale_title(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Title, nil + return obj.DataSourceSpecBinding, nil }) if err != nil { ec.Error(ctx, err) @@ -64320,26 +67172,32 @@ func (ec *executionContext) _ProposalRationale_title(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.DataSourceSpecToPerpetualBinding) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNDataSourceSpecPerpetualBinding2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceSpecToPerpetualBinding(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalRationale_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Perpetual_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalRationale", + Object: "Perpetual", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "settlementDataProperty": + return ec.fieldContext_DataSourceSpecPerpetualBinding_settlementDataProperty(ctx, field) + case "settlementScheduleProperty": + return ec.fieldContext_DataSourceSpecPerpetualBinding_settlementScheduleProperty(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceSpecPerpetualBinding", field.Name) }, } return fc, nil } -func (ec *executionContext) _ProposalTerms_closingDatetime(ctx context.Context, field graphql.CollectedField, obj *vega.ProposalTerms) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalTerms_closingDatetime(ctx, field) +func (ec *executionContext) _Perpetual_fundingRateScalingFactor(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Perpetual_fundingRateScalingFactor(ctx, field) if err != nil { return graphql.Null } @@ -64352,7 +67210,7 @@ func (ec *executionContext) _ProposalTerms_closingDatetime(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ProposalTerms().ClosingDatetime(rctx, obj) + return obj.FundingRateScalingFactor, nil }) if err != nil { ec.Error(ctx, err) @@ -64364,26 +67222,26 @@ func (ec *executionContext) _ProposalTerms_closingDatetime(ctx context.Context, } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalTerms_closingDatetime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Perpetual_fundingRateScalingFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalTerms", + Object: "Perpetual", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalTerms_enactmentDatetime(ctx context.Context, field graphql.CollectedField, obj *vega.ProposalTerms) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalTerms_enactmentDatetime(ctx, field) +func (ec *executionContext) _Perpetual_fundingRateLowerBound(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Perpetual_fundingRateLowerBound(ctx, field) if err != nil { return graphql.Null } @@ -64396,35 +67254,38 @@ func (ec *executionContext) _ProposalTerms_enactmentDatetime(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ProposalTerms().EnactmentDatetime(rctx, obj) + return obj.FundingRateLowerBound, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*int64) + res := resTmp.(*string) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalNString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalTerms_enactmentDatetime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Perpetual_fundingRateLowerBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalTerms", + Object: "Perpetual", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalTerms_validationDatetime(ctx context.Context, field graphql.CollectedField, obj *vega.ProposalTerms) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalTerms_validationDatetime(ctx, field) +func (ec *executionContext) _Perpetual_fundingRateUpperBound(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Perpetual_fundingRateUpperBound(ctx, field) if err != nil { return graphql.Null } @@ -64437,35 +67298,38 @@ func (ec *executionContext) _ProposalTerms_validationDatetime(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ProposalTerms().ValidationDatetime(rctx, obj) + return obj.FundingRateUpperBound, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*int64) + res := resTmp.(*string) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalNString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalTerms_validationDatetime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Perpetual_fundingRateUpperBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalTerms", + Object: "Perpetual", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalTerms_change(ctx context.Context, field graphql.CollectedField, obj *vega.ProposalTerms) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalTerms_change(ctx, field) +func (ec *executionContext) _Perpetual_internalCompositePriceConfig(ctx context.Context, field graphql.CollectedField, obj *vega.Perpetual) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Perpetual_internalCompositePriceConfig(ctx, field) if err != nil { return graphql.Null } @@ -64478,38 +67342,53 @@ func (ec *executionContext) _ProposalTerms_change(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ProposalTerms().Change(rctx, obj) + return obj.InternalCompositePriceConfig, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(ProposalChange) + res := resTmp.(*vega.CompositePriceConfiguration) fc.Result = res - return ec.marshalNProposalChange2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalChange(ctx, field.Selections, res) + return ec.marshalOCompositePriceConfiguration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceConfiguration(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalTerms_change(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Perpetual_internalCompositePriceConfig(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalTerms", + Object: "Perpetual", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ProposalChange does not have child fields") + switch field.Name { + case "decayWeight": + return ec.fieldContext_CompositePriceConfiguration_decayWeight(ctx, field) + case "decayPower": + return ec.fieldContext_CompositePriceConfiguration_decayPower(ctx, field) + case "cashAmount": + return ec.fieldContext_CompositePriceConfiguration_cashAmount(ctx, field) + case "SourceWeights": + return ec.fieldContext_CompositePriceConfiguration_SourceWeights(ctx, field) + case "SourceStalenessTolerance": + return ec.fieldContext_CompositePriceConfiguration_SourceStalenessTolerance(ctx, field) + case "CompositePriceType": + return ec.fieldContext_CompositePriceConfiguration_CompositePriceType(ctx, field) + case "dataSourcesSpec": + return ec.fieldContext_CompositePriceConfiguration_dataSourcesSpec(ctx, field) + case "dataSourcesSpecBinding": + return ec.fieldContext_CompositePriceConfiguration_dataSourcesSpecBinding(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CompositePriceConfiguration", field.Name) }, } return fc, nil } -func (ec *executionContext) _ProposalVote_vote(ctx context.Context, field graphql.CollectedField, obj *ProposalVote) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalVote_vote(ctx, field) +func (ec *executionContext) _PerpetualData_fundingPayment(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualData_fundingPayment(ctx, field) if err != nil { return graphql.Null } @@ -64522,54 +67401,35 @@ func (ec *executionContext) _ProposalVote_vote(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Vote, nil + return obj.FundingPayment, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Vote) + res := resTmp.(string) fc.Result = res - return ec.marshalNVote2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐVote(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalVote_vote(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualData_fundingPayment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalVote", + Object: "PerpetualData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "value": - return ec.fieldContext_Vote_value(ctx, field) - case "party": - return ec.fieldContext_Vote_party(ctx, field) - case "datetime": - return ec.fieldContext_Vote_datetime(ctx, field) - case "proposalId": - return ec.fieldContext_Vote_proposalId(ctx, field) - case "governanceTokenBalance": - return ec.fieldContext_Vote_governanceTokenBalance(ctx, field) - case "governanceTokenWeight": - return ec.fieldContext_Vote_governanceTokenWeight(ctx, field) - case "equityLikeShareWeight": - return ec.fieldContext_Vote_equityLikeShareWeight(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Vote", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalVote_proposalId(ctx context.Context, field graphql.CollectedField, obj *ProposalVote) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalVote_proposalId(ctx, field) +func (ec *executionContext) _PerpetualData_fundingRate(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualData_fundingRate(ctx, field) if err != nil { return graphql.Null } @@ -64582,38 +67442,35 @@ func (ec *executionContext) _ProposalVote_proposalId(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ProposalID, nil + return obj.FundingRate, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalVote_proposalId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualData_fundingRate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalVote", + Object: "PerpetualData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalVoteConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalVoteConnection_edges(ctx, field) +func (ec *executionContext) _PerpetualData_externalTwap(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualData_externalTwap(ctx, field) if err != nil { return graphql.Null } @@ -64626,7 +67483,7 @@ func (ec *executionContext) _ProposalVoteConnection_edges(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.ExternalTwap, nil }) if err != nil { ec.Error(ctx, err) @@ -64635,32 +67492,26 @@ func (ec *executionContext) _ProposalVoteConnection_edges(ctx context.Context, f if resTmp == nil { return graphql.Null } - res := resTmp.([]*ProposalVoteEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalOProposalVoteEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVoteEdgeᚄ(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalVoteConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualData_externalTwap(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalVoteConnection", + Object: "PerpetualData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_ProposalVoteEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_ProposalVoteEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ProposalVoteEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalVoteConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalVoteConnection_pageInfo(ctx, field) +func (ec *executionContext) _PerpetualData_internalTwap(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualData_internalTwap(ctx, field) if err != nil { return graphql.Null } @@ -64673,7 +67524,7 @@ func (ec *executionContext) _ProposalVoteConnection_pageInfo(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.InternalTwap, nil }) if err != nil { ec.Error(ctx, err) @@ -64682,36 +67533,26 @@ func (ec *executionContext) _ProposalVoteConnection_pageInfo(ctx context.Context if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(string) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalVoteConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualData_internalTwap(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalVoteConnection", + Object: "PerpetualData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalVoteEdge_node(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalVoteEdge_node(ctx, field) +func (ec *executionContext) _PerpetualData_seqNum(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualData_seqNum(ctx, field) if err != nil { return graphql.Null } @@ -64724,7 +67565,7 @@ func (ec *executionContext) _ProposalVoteEdge_node(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.PerpetualData().SeqNum(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -64736,32 +67577,26 @@ func (ec *executionContext) _ProposalVoteEdge_node(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(*ProposalVote) + res := resTmp.(int) fc.Result = res - return ec.marshalNProposalVote2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVote(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalVoteEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualData_seqNum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalVoteEdge", + Object: "PerpetualData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "vote": - return ec.fieldContext_ProposalVote_vote(ctx, field) - case "proposalId": - return ec.fieldContext_ProposalVote_proposalId(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ProposalVote", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalVoteEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalVoteEdge_cursor(ctx, field) +func (ec *executionContext) _PerpetualData_startTime(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualData_startTime(ctx, field) if err != nil { return graphql.Null } @@ -64774,35 +67609,38 @@ func (ec *executionContext) _ProposalVoteEdge_cursor(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.StartTime, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(int64) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalVoteEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualData_startTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalVoteEdge", + Object: "PerpetualData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalVoteSide_votes(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteSide) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalVoteSide_votes(ctx, field) +func (ec *executionContext) _PerpetualData_internalCompositePrice(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualData_internalCompositePrice(ctx, field) if err != nil { return graphql.Null } @@ -64815,51 +67653,38 @@ func (ec *executionContext) _ProposalVoteSide_votes(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Votes, nil + return obj.InternalCompositePrice, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.Vote) + res := resTmp.(string) fc.Result = res - return ec.marshalOVote2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐVoteᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalVoteSide_votes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualData_internalCompositePrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalVoteSide", + Object: "PerpetualData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "value": - return ec.fieldContext_Vote_value(ctx, field) - case "party": - return ec.fieldContext_Vote_party(ctx, field) - case "datetime": - return ec.fieldContext_Vote_datetime(ctx, field) - case "proposalId": - return ec.fieldContext_Vote_proposalId(ctx, field) - case "governanceTokenBalance": - return ec.fieldContext_Vote_governanceTokenBalance(ctx, field) - case "governanceTokenWeight": - return ec.fieldContext_Vote_governanceTokenWeight(ctx, field) - case "equityLikeShareWeight": - return ec.fieldContext_Vote_equityLikeShareWeight(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Vote", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalVoteSide_totalNumber(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteSide) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalVoteSide_totalNumber(ctx, field) +func (ec *executionContext) _PerpetualData_internalCompositePriceType(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualData_internalCompositePriceType(ctx, field) if err != nil { return graphql.Null } @@ -64872,7 +67697,7 @@ func (ec *executionContext) _ProposalVoteSide_totalNumber(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalNumber, nil + return ec.resolvers.PerpetualData().InternalCompositePriceType(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -64884,26 +67709,26 @@ func (ec *executionContext) _ProposalVoteSide_totalNumber(ctx context.Context, f } return graphql.Null } - res := resTmp.(string) + res := resTmp.(CompositePriceType) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNCompositePriceType2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐCompositePriceType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalVoteSide_totalNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualData_internalCompositePriceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalVoteSide", + Object: "PerpetualData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type CompositePriceType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalVoteSide_totalWeight(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteSide) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalVoteSide_totalWeight(ctx, field) +func (ec *executionContext) _PerpetualData_nextInternalCompositePriceCalc(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualData_nextInternalCompositePriceCalc(ctx, field) if err != nil { return graphql.Null } @@ -64916,7 +67741,7 @@ func (ec *executionContext) _ProposalVoteSide_totalWeight(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalWeight, nil + return ec.resolvers.PerpetualData().NextInternalCompositePriceCalc(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -64933,12 +67758,12 @@ func (ec *executionContext) _ProposalVoteSide_totalWeight(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalVoteSide_totalWeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualData_nextInternalCompositePriceCalc(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalVoteSide", + Object: "PerpetualData", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -64946,8 +67771,8 @@ func (ec *executionContext) fieldContext_ProposalVoteSide_totalWeight(ctx contex return fc, nil } -func (ec *executionContext) _ProposalVoteSide_totalTokens(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteSide) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalVoteSide_totalTokens(ctx, field) +func (ec *executionContext) _PerpetualData_underlyingIndexPrice(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualData_underlyingIndexPrice(ctx, field) if err != nil { return graphql.Null } @@ -64960,7 +67785,7 @@ func (ec *executionContext) _ProposalVoteSide_totalTokens(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalTokens, nil + return obj.UnderlyingIndexPrice, nil }) if err != nil { ec.Error(ctx, err) @@ -64977,9 +67802,9 @@ func (ec *executionContext) _ProposalVoteSide_totalTokens(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalVoteSide_totalTokens(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualData_underlyingIndexPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalVoteSide", + Object: "PerpetualData", Field: field, IsMethod: false, IsResolver: false, @@ -64990,8 +67815,8 @@ func (ec *executionContext) fieldContext_ProposalVoteSide_totalTokens(ctx contex return fc, nil } -func (ec *executionContext) _ProposalVoteSide_totalEquityLikeShareWeight(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteSide) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalVoteSide_totalEquityLikeShareWeight(ctx, field) +func (ec *executionContext) _PerpetualData_internalCompositePriceState(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualData_internalCompositePriceState(ctx, field) if err != nil { return graphql.Null } @@ -65004,38 +67829,39 @@ func (ec *executionContext) _ProposalVoteSide_totalEquityLikeShareWeight(ctx con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalEquityLikeShareWeight, nil + return obj.InternalCompositePriceState, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.CompositePriceState) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOCompositePriceState2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalVoteSide_totalEquityLikeShareWeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualData_internalCompositePriceState(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalVoteSide", + Object: "PerpetualData", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "priceSources": + return ec.fieldContext_CompositePriceState_priceSources(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CompositePriceState", field.Name) }, } return fc, nil } -func (ec *executionContext) _ProposalVotes_yes(ctx context.Context, field graphql.CollectedField, obj *ProposalVotes) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalVotes_yes(ctx, field) +func (ec *executionContext) _PerpetualProduct_settlementAsset(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualProduct_settlementAsset(ctx, field) if err != nil { return graphql.Null } @@ -65048,7 +67874,7 @@ func (ec *executionContext) _ProposalVotes_yes(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Yes, nil + return ec.resolvers.PerpetualProduct().SettlementAsset(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -65060,38 +67886,58 @@ func (ec *executionContext) _ProposalVotes_yes(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(*ProposalVoteSide) + res := resTmp.(*vega.Asset) fc.Result = res - return ec.marshalNProposalVoteSide2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVoteSide(ctx, field.Selections, res) + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalVotes_yes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualProduct_settlementAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalVotes", + Object: "PerpetualProduct", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "votes": - return ec.fieldContext_ProposalVoteSide_votes(ctx, field) - case "totalNumber": - return ec.fieldContext_ProposalVoteSide_totalNumber(ctx, field) - case "totalWeight": - return ec.fieldContext_ProposalVoteSide_totalWeight(ctx, field) - case "totalTokens": - return ec.fieldContext_ProposalVoteSide_totalTokens(ctx, field) - case "totalEquityLikeShareWeight": - return ec.fieldContext_ProposalVoteSide_totalEquityLikeShareWeight(ctx, field) + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ProposalVoteSide", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) }, } return fc, nil } -func (ec *executionContext) _ProposalVotes_no(ctx context.Context, field graphql.CollectedField, obj *ProposalVotes) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalVotes_no(ctx, field) +func (ec *executionContext) _PerpetualProduct_quoteName(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualProduct_quoteName(ctx, field) if err != nil { return graphql.Null } @@ -65104,7 +67950,7 @@ func (ec *executionContext) _ProposalVotes_no(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.No, nil + return obj.QuoteName, nil }) if err != nil { ec.Error(ctx, err) @@ -65116,38 +67962,26 @@ func (ec *executionContext) _ProposalVotes_no(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(*ProposalVoteSide) + res := resTmp.(string) fc.Result = res - return ec.marshalNProposalVoteSide2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVoteSide(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalVotes_no(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualProduct_quoteName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalVotes", + Object: "PerpetualProduct", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "votes": - return ec.fieldContext_ProposalVoteSide_votes(ctx, field) - case "totalNumber": - return ec.fieldContext_ProposalVoteSide_totalNumber(ctx, field) - case "totalWeight": - return ec.fieldContext_ProposalVoteSide_totalWeight(ctx, field) - case "totalTokens": - return ec.fieldContext_ProposalVoteSide_totalTokens(ctx, field) - case "totalEquityLikeShareWeight": - return ec.fieldContext_ProposalVoteSide_totalEquityLikeShareWeight(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ProposalVoteSide", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.GovernanceDataConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalsConnection_edges(ctx, field) +func (ec *executionContext) _PerpetualProduct_marginFundingFactor(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualProduct_marginFundingFactor(ctx, field) if err != nil { return graphql.Null } @@ -65160,41 +67994,38 @@ func (ec *executionContext) _ProposalsConnection_edges(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.MarginFundingFactor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.GovernanceDataEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalOProposalEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGovernanceDataEdge(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualProduct_marginFundingFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalsConnection", + Object: "PerpetualProduct", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_ProposalEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_ProposalEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ProposalEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProposalsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.GovernanceDataConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProposalsConnection_pageInfo(ctx, field) +func (ec *executionContext) _PerpetualProduct_interestRate(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualProduct_interestRate(ctx, field) if err != nil { return graphql.Null } @@ -65207,7 +68038,7 @@ func (ec *executionContext) _ProposalsConnection_pageInfo(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.InterestRate, nil }) if err != nil { ec.Error(ctx, err) @@ -65219,36 +68050,26 @@ func (ec *executionContext) _ProposalsConnection_pageInfo(ctx context.Context, f } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(string) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProposalsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualProduct_interestRate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProposalsConnection", + Object: "PerpetualProduct", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProtocolUpgradeProposal_upgradeBlockHeight(ctx context.Context, field graphql.CollectedField, obj *v1.ProtocolUpgradeEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProtocolUpgradeProposal_upgradeBlockHeight(ctx, field) +func (ec *executionContext) _PerpetualProduct_clampLowerBound(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualProduct_clampLowerBound(ctx, field) if err != nil { return graphql.Null } @@ -65261,7 +68082,7 @@ func (ec *executionContext) _ProtocolUpgradeProposal_upgradeBlockHeight(ctx cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ProtocolUpgradeProposal().UpgradeBlockHeight(rctx, obj) + return obj.ClampLowerBound, nil }) if err != nil { ec.Error(ctx, err) @@ -65278,12 +68099,12 @@ func (ec *executionContext) _ProtocolUpgradeProposal_upgradeBlockHeight(ctx cont return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProtocolUpgradeProposal_upgradeBlockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualProduct_clampLowerBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProtocolUpgradeProposal", + Object: "PerpetualProduct", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -65291,8 +68112,8 @@ func (ec *executionContext) fieldContext_ProtocolUpgradeProposal_upgradeBlockHei return fc, nil } -func (ec *executionContext) _ProtocolUpgradeProposal_vegaReleaseTag(ctx context.Context, field graphql.CollectedField, obj *v1.ProtocolUpgradeEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProtocolUpgradeProposal_vegaReleaseTag(ctx, field) +func (ec *executionContext) _PerpetualProduct_clampUpperBound(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualProduct_clampUpperBound(ctx, field) if err != nil { return graphql.Null } @@ -65305,7 +68126,7 @@ func (ec *executionContext) _ProtocolUpgradeProposal_vegaReleaseTag(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.VegaReleaseTag, nil + return obj.ClampUpperBound, nil }) if err != nil { ec.Error(ctx, err) @@ -65322,9 +68143,9 @@ func (ec *executionContext) _ProtocolUpgradeProposal_vegaReleaseTag(ctx context. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProtocolUpgradeProposal_vegaReleaseTag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualProduct_clampUpperBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProtocolUpgradeProposal", + Object: "PerpetualProduct", Field: field, IsMethod: false, IsResolver: false, @@ -65335,8 +68156,8 @@ func (ec *executionContext) fieldContext_ProtocolUpgradeProposal_vegaReleaseTag( return fc, nil } -func (ec *executionContext) _ProtocolUpgradeProposal_approvers(ctx context.Context, field graphql.CollectedField, obj *v1.ProtocolUpgradeEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProtocolUpgradeProposal_approvers(ctx, field) +func (ec *executionContext) _PerpetualProduct_dataSourceSpecForSettlementSchedule(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualProduct_dataSourceSpecForSettlementSchedule(ctx, field) if err != nil { return graphql.Null } @@ -65349,7 +68170,7 @@ func (ec *executionContext) _ProtocolUpgradeProposal_approvers(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Approvers, nil + return obj.DataSourceSpecForSettlementSchedule, nil }) if err != nil { ec.Error(ctx, err) @@ -65361,26 +68182,30 @@ func (ec *executionContext) _ProtocolUpgradeProposal_approvers(ctx context.Conte } return graphql.Null } - res := resTmp.([]string) + res := resTmp.(*vega.DataSourceDefinition) fc.Result = res - return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNDataSourceDefinition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProtocolUpgradeProposal_approvers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualProduct_dataSourceSpecForSettlementSchedule(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProtocolUpgradeProposal", + Object: "PerpetualProduct", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "sourceType": + return ec.fieldContext_DataSourceDefinition_sourceType(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceDefinition", field.Name) }, } return fc, nil } -func (ec *executionContext) _ProtocolUpgradeProposal_status(ctx context.Context, field graphql.CollectedField, obj *v1.ProtocolUpgradeEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProtocolUpgradeProposal_status(ctx, field) +func (ec *executionContext) _PerpetualProduct_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualProduct_dataSourceSpecForSettlementData(ctx, field) if err != nil { return graphql.Null } @@ -65393,7 +68218,7 @@ func (ec *executionContext) _ProtocolUpgradeProposal_status(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.DataSourceSpecForSettlementData, nil }) if err != nil { ec.Error(ctx, err) @@ -65405,26 +68230,30 @@ func (ec *executionContext) _ProtocolUpgradeProposal_status(ctx context.Context, } return graphql.Null } - res := resTmp.(v1.ProtocolUpgradeProposalStatus) + res := resTmp.(*vega.DataSourceDefinition) fc.Result = res - return ec.marshalNProtocolUpgradeProposalStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐProtocolUpgradeProposalStatus(ctx, field.Selections, res) + return ec.marshalNDataSourceDefinition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProtocolUpgradeProposal_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualProduct_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProtocolUpgradeProposal", + Object: "PerpetualProduct", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ProtocolUpgradeProposalStatus does not have child fields") + switch field.Name { + case "sourceType": + return ec.fieldContext_DataSourceDefinition_sourceType(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DataSourceDefinition", field.Name) }, } return fc, nil } -func (ec *executionContext) _ProtocolUpgradeProposalConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.ProtocolUpgradeProposalConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProtocolUpgradeProposalConnection_edges(ctx, field) +func (ec *executionContext) _PerpetualProduct_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualProduct_dataSourceSpecBinding(ctx, field) if err != nil { return graphql.Null } @@ -65437,41 +68266,44 @@ func (ec *executionContext) _ProtocolUpgradeProposalConnection_edges(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.DataSourceSpecBinding, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.ProtocolUpgradeProposalEdge) + res := resTmp.(*vega.DataSourceSpecToPerpetualBinding) fc.Result = res - return ec.marshalOProtocolUpgradeProposalEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐProtocolUpgradeProposalEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNDataSourceSpecPerpetualBinding2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceSpecToPerpetualBinding(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProtocolUpgradeProposalConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualProduct_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProtocolUpgradeProposalConnection", + Object: "PerpetualProduct", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_ProtocolUpgradeProposalEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_ProtocolUpgradeProposalEdge_cursor(ctx, field) + case "settlementDataProperty": + return ec.fieldContext_DataSourceSpecPerpetualBinding_settlementDataProperty(ctx, field) + case "settlementScheduleProperty": + return ec.fieldContext_DataSourceSpecPerpetualBinding_settlementScheduleProperty(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ProtocolUpgradeProposalEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type DataSourceSpecPerpetualBinding", field.Name) }, } return fc, nil } -func (ec *executionContext) _ProtocolUpgradeProposalConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.ProtocolUpgradeProposalConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProtocolUpgradeProposalConnection_pageInfo(ctx, field) +func (ec *executionContext) _PerpetualProduct_fundingRateScalingFactor(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualProduct_fundingRateScalingFactor(ctx, field) if err != nil { return graphql.Null } @@ -65484,45 +68316,38 @@ func (ec *executionContext) _ProtocolUpgradeProposalConnection_pageInfo(ctx cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.FundingRateScalingFactor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(*string) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProtocolUpgradeProposalConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualProduct_fundingRateScalingFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProtocolUpgradeProposalConnection", + Object: "PerpetualProduct", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProtocolUpgradeProposalEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.ProtocolUpgradeProposalEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProtocolUpgradeProposalEdge_node(ctx, field) +func (ec *executionContext) _PerpetualProduct_fundingRateLowerBound(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualProduct_fundingRateLowerBound(ctx, field) if err != nil { return graphql.Null } @@ -65535,7 +68360,7 @@ func (ec *executionContext) _ProtocolUpgradeProposalEdge_node(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.FundingRateLowerBound, nil }) if err != nil { ec.Error(ctx, err) @@ -65547,36 +68372,26 @@ func (ec *executionContext) _ProtocolUpgradeProposalEdge_node(ctx context.Contex } return graphql.Null } - res := resTmp.(*v1.ProtocolUpgradeEvent) + res := resTmp.(*string) fc.Result = res - return ec.marshalNProtocolUpgradeProposal2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐProtocolUpgradeEvent(ctx, field.Selections, res) + return ec.marshalNString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProtocolUpgradeProposalEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualProduct_fundingRateLowerBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProtocolUpgradeProposalEdge", + Object: "PerpetualProduct", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "upgradeBlockHeight": - return ec.fieldContext_ProtocolUpgradeProposal_upgradeBlockHeight(ctx, field) - case "vegaReleaseTag": - return ec.fieldContext_ProtocolUpgradeProposal_vegaReleaseTag(ctx, field) - case "approvers": - return ec.fieldContext_ProtocolUpgradeProposal_approvers(ctx, field) - case "status": - return ec.fieldContext_ProtocolUpgradeProposal_status(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ProtocolUpgradeProposal", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ProtocolUpgradeProposalEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.ProtocolUpgradeProposalEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProtocolUpgradeProposalEdge_cursor(ctx, field) +func (ec *executionContext) _PerpetualProduct_fundingRateUpperBound(ctx context.Context, field graphql.CollectedField, obj *vega.PerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PerpetualProduct_fundingRateUpperBound(ctx, field) if err != nil { return graphql.Null } @@ -65589,7 +68404,7 @@ func (ec *executionContext) _ProtocolUpgradeProposalEdge_cursor(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.FundingRateUpperBound, nil }) if err != nil { ec.Error(ctx, err) @@ -65601,14 +68416,14 @@ func (ec *executionContext) _ProtocolUpgradeProposalEdge_cursor(ctx context.Cont } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProtocolUpgradeProposalEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PerpetualProduct_fundingRateUpperBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProtocolUpgradeProposalEdge", + Object: "PerpetualProduct", Field: field, IsMethod: false, IsResolver: false, @@ -65619,8 +68434,8 @@ func (ec *executionContext) fieldContext_ProtocolUpgradeProposalEdge_cursor(ctx return fc, nil } -func (ec *executionContext) _ProtocolUpgradeStatus_ready(ctx context.Context, field graphql.CollectedField, obj *ProtocolUpgradeStatus) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ProtocolUpgradeStatus_ready(ctx, field) +func (ec *executionContext) _Position_market(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Position_market(ctx, field) if err != nil { return graphql.Null } @@ -65633,7 +68448,7 @@ func (ec *executionContext) _ProtocolUpgradeStatus_ready(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Ready, nil + return ec.resolvers.Position().Market(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -65645,26 +68460,88 @@ func (ec *executionContext) _ProtocolUpgradeStatus_ready(ctx context.Context, fi } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*vega.Market) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ProtocolUpgradeStatus_ready(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Position_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ProtocolUpgradeStatus", + Object: "Position", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Market_id(ctx, field) + case "fees": + return ec.fieldContext_Market_fees(ctx, field) + case "tradableInstrument": + return ec.fieldContext_Market_tradableInstrument(ctx, field) + case "decimalPlaces": + return ec.fieldContext_Market_decimalPlaces(ctx, field) + case "positionDecimalPlaces": + return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) + case "openingAuction": + return ec.fieldContext_Market_openingAuction(ctx, field) + case "priceMonitoringSettings": + return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) + case "liquidityMonitoringParameters": + return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) + case "tradingMode": + return ec.fieldContext_Market_tradingMode(ctx, field) + case "state": + return ec.fieldContext_Market_state(ctx, field) + case "proposal": + return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) + case "ordersConnection": + return ec.fieldContext_Market_ordersConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Market_accountsConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Market_tradesConnection(ctx, field) + case "depth": + return ec.fieldContext_Market_depth(ctx, field) + case "candlesConnection": + return ec.fieldContext_Market_candlesConnection(ctx, field) + case "data": + return ec.fieldContext_Market_data(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Market_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) + case "marketTimestamps": + return ec.fieldContext_Market_marketTimestamps(ctx, field) + case "riskFactors": + return ec.fieldContext_Market_riskFactors(ctx, field) + case "linearSlippageFactor": + return ec.fieldContext_Market_linearSlippageFactor(ctx, field) + case "quadraticSlippageFactor": + return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) + case "parentMarketID": + return ec.fieldContext_Market_parentMarketID(ctx, field) + case "insurancePoolFraction": + return ec.fieldContext_Market_insurancePoolFraction(ctx, field) + case "successorMarketID": + return ec.fieldContext_Market_successorMarketID(ctx, field) + case "liquiditySLAParameters": + return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, } return fc, nil } -func (ec *executionContext) _PubKey_key(ctx context.Context, field graphql.CollectedField, obj *PubKey) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PubKey_key(ctx, field) +func (ec *executionContext) _Position_party(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Position_party(ctx, field) if err != nil { return graphql.Null } @@ -65677,35 +68554,80 @@ func (ec *executionContext) _PubKey_key(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Key, nil + return ec.resolvers.Position().Party(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*vega.Party) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PubKey_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Position_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PubKey", + Object: "Position", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) }, } return fc, nil } -func (ec *executionContext) _Query_asset(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_asset(ctx, field) +func (ec *executionContext) _Position_openVolume(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Position_openVolume(ctx, field) if err != nil { return graphql.Null } @@ -65718,78 +68640,38 @@ func (ec *executionContext) _Query_asset(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Asset(rctx, fc.Args["id"].(string)) + return ec.resolvers.Position().OpenVolume(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(string) fc.Result = res - return ec.marshalOAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Position_openVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Position", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_asset_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_assetsConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_assetsConnection(ctx, field) +func (ec *executionContext) _Position_realisedPNL(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Position_realisedPNL(ctx, field) if err != nil { return graphql.Null } @@ -65802,52 +68684,38 @@ func (ec *executionContext) _Query_assetsConnection(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().AssetsConnection(rctx, fc.Args["id"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return obj.RealisedPnl, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.AssetsConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOAssetsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAssetsConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_assetsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Position_realisedPNL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Position", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_AssetsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_AssetsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type AssetsConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_assetsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_balanceChanges(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_balanceChanges(ctx, field) +func (ec *executionContext) _Position_unrealisedPNL(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Position_unrealisedPNL(ctx, field) if err != nil { return graphql.Null } @@ -65860,7 +68728,7 @@ func (ec *executionContext) _Query_balanceChanges(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().BalanceChanges(rctx, fc.Args["filter"].(*v2.AccountFilter), fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) + return obj.UnrealisedPnl, nil }) if err != nil { ec.Error(ctx, err) @@ -65872,43 +68740,26 @@ func (ec *executionContext) _Query_balanceChanges(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(*v2.AggregatedBalanceConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalNAggregatedBalanceConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAggregatedBalanceConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_balanceChanges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Position_unrealisedPNL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Position", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_AggregatedBalanceConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_AggregatedBalanceConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type AggregatedBalanceConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_balanceChanges_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_currentReferralProgram(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_currentReferralProgram(ctx, field) +func (ec *executionContext) _Position_averageEntryPrice(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Position_averageEntryPrice(ctx, field) if err != nil { return graphql.Null } @@ -65921,51 +68772,38 @@ func (ec *executionContext) _Query_currentReferralProgram(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CurrentReferralProgram(rctx) + return obj.AverageEntryPrice, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.ReferralProgram) + res := resTmp.(string) fc.Result = res - return ec.marshalOCurrentReferralProgram2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralProgram(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_currentReferralProgram(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Position_averageEntryPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Position", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_CurrentReferralProgram_id(ctx, field) - case "version": - return ec.fieldContext_CurrentReferralProgram_version(ctx, field) - case "benefitTiers": - return ec.fieldContext_CurrentReferralProgram_benefitTiers(ctx, field) - case "endOfProgramTimestamp": - return ec.fieldContext_CurrentReferralProgram_endOfProgramTimestamp(ctx, field) - case "windowLength": - return ec.fieldContext_CurrentReferralProgram_windowLength(ctx, field) - case "stakingTiers": - return ec.fieldContext_CurrentReferralProgram_stakingTiers(ctx, field) - case "endedAt": - return ec.fieldContext_CurrentReferralProgram_endedAt(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type CurrentReferralProgram", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Query_currentVolumeDiscountProgram(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_currentVolumeDiscountProgram(ctx, field) +func (ec *executionContext) _Position_lossSocializationAmount(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Position_lossSocializationAmount(ctx, field) if err != nil { return graphql.Null } @@ -65978,49 +68816,38 @@ func (ec *executionContext) _Query_currentVolumeDiscountProgram(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CurrentVolumeDiscountProgram(rctx) + return ec.resolvers.Position().LossSocializationAmount(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.VolumeDiscountProgram) + res := resTmp.(string) fc.Result = res - return ec.marshalOVolumeDiscountProgram2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐVolumeDiscountProgram(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_currentVolumeDiscountProgram(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Position_lossSocializationAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Position", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_VolumeDiscountProgram_id(ctx, field) - case "version": - return ec.fieldContext_VolumeDiscountProgram_version(ctx, field) - case "benefitTiers": - return ec.fieldContext_VolumeDiscountProgram_benefitTiers(ctx, field) - case "endOfProgramTimestamp": - return ec.fieldContext_VolumeDiscountProgram_endOfProgramTimestamp(ctx, field) - case "windowLength": - return ec.fieldContext_VolumeDiscountProgram_windowLength(ctx, field) - case "endedAt": - return ec.fieldContext_VolumeDiscountProgram_endedAt(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type VolumeDiscountProgram", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Query_coreSnapshots(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_coreSnapshots(ctx, field) +func (ec *executionContext) _Position_positionStatus(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Position_positionStatus(ctx, field) if err != nil { return graphql.Null } @@ -66033,52 +68860,38 @@ func (ec *executionContext) _Query_coreSnapshots(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().CoreSnapshots(rctx, fc.Args["pagination"].(*v2.Pagination)) + return obj.PositionStatus, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.CoreSnapshotConnection) + res := resTmp.(vega.PositionStatus) fc.Result = res - return ec.marshalOCoreSnapshotConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCoreSnapshotConnection(ctx, field.Selections, res) + return ec.marshalNPositionStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPositionStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_coreSnapshots(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Position_positionStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Position", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_CoreSnapshotConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_CoreSnapshotConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type CoreSnapshotConnection", field.Name) + return nil, errors.New("field of type PositionStatus does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_coreSnapshots_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_deposit(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_deposit(ctx, field) +func (ec *executionContext) _Position_marginsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Position_marginsConnection(ctx, field) if err != nil { return graphql.Null } @@ -66091,7 +68904,7 @@ func (ec *executionContext) _Query_deposit(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Deposit(rctx, fc.Args["id"].(string)) + return ec.resolvers.Position().MarginsConnection(rctx, obj, fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -66100,37 +68913,25 @@ func (ec *executionContext) _Query_deposit(ctx context.Context, field graphql.Co if resTmp == nil { return graphql.Null } - res := resTmp.(*vega.Deposit) + res := resTmp.(*v2.MarginConnection) fc.Result = res - return ec.marshalODeposit2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDeposit(ctx, field.Selections, res) + return ec.marshalOMarginConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarginConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_deposit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Position_marginsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Position", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Deposit_id(ctx, field) - case "party": - return ec.fieldContext_Deposit_party(ctx, field) - case "amount": - return ec.fieldContext_Deposit_amount(ctx, field) - case "asset": - return ec.fieldContext_Deposit_asset(ctx, field) - case "status": - return ec.fieldContext_Deposit_status(ctx, field) - case "createdTimestamp": - return ec.fieldContext_Deposit_createdTimestamp(ctx, field) - case "creditedTimestamp": - return ec.fieldContext_Deposit_creditedTimestamp(ctx, field) - case "txHash": - return ec.fieldContext_Deposit_txHash(ctx, field) + case "edges": + return ec.fieldContext_MarginConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_MarginConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Deposit", field.Name) + return nil, fmt.Errorf("no field named %q was found under type MarginConnection", field.Name) }, } defer func() { @@ -66140,15 +68941,15 @@ func (ec *executionContext) fieldContext_Query_deposit(ctx context.Context, fiel } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_deposit_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Position_marginsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return } return fc, nil } -func (ec *executionContext) _Query_deposits(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_deposits(ctx, field) +func (ec *executionContext) _Position_updatedAt(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Position_updatedAt(ctx, field) if err != nil { return graphql.Null } @@ -66161,7 +68962,7 @@ func (ec *executionContext) _Query_deposits(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Deposits(rctx, fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) + return obj.UpdatedAt, nil }) if err != nil { ec.Error(ctx, err) @@ -66170,43 +68971,26 @@ func (ec *executionContext) _Query_deposits(ctx context.Context, field graphql.C if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.DepositsConnection) + res := resTmp.(int64) fc.Result = res - return ec.marshalODepositsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDepositsConnection(ctx, field.Selections, res) + return ec.marshalOTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_deposits(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Position_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Position", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_DepositsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_DepositsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DepositsConnection", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_deposits_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_entities(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_entities(ctx, field) +func (ec *executionContext) _PositionConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.PositionConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -66219,107 +69003,41 @@ func (ec *executionContext) _Query_entities(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Entities(rctx, fc.Args["txHash"].(string)) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v2.ListEntitiesResponse) + res := resTmp.([]*v2.PositionEdge) fc.Result = res - return ec.marshalNEntities2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐListEntitiesResponse(ctx, field.Selections, res) + return ec.marshalOPositionEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPositionEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_entities(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "accounts": - return ec.fieldContext_Entities_accounts(ctx, field) - case "orders": - return ec.fieldContext_Entities_orders(ctx, field) - case "positions": - return ec.fieldContext_Entities_positions(ctx, field) - case "ledgerEntries": - return ec.fieldContext_Entities_ledgerEntries(ctx, field) - case "balanceChanges": - return ec.fieldContext_Entities_balanceChanges(ctx, field) - case "transfers": - return ec.fieldContext_Entities_transfers(ctx, field) - case "votes": - return ec.fieldContext_Entities_votes(ctx, field) - case "erc20MultiSigSignerAddedBundles": - return ec.fieldContext_Entities_erc20MultiSigSignerAddedBundles(ctx, field) - case "erc20MultiSigSignerRemovedBundles": - return ec.fieldContext_Entities_erc20MultiSigSignerRemovedBundles(ctx, field) - case "trades": - return ec.fieldContext_Entities_trades(ctx, field) - case "oracleSpecs": - return ec.fieldContext_Entities_oracleSpecs(ctx, field) - case "oracleData": - return ec.fieldContext_Entities_oracleData(ctx, field) - case "markets": - return ec.fieldContext_Entities_markets(ctx, field) - case "parties": - return ec.fieldContext_Entities_parties(ctx, field) - case "marginLevels": - return ec.fieldContext_Entities_marginLevels(ctx, field) - case "rewards": - return ec.fieldContext_Entities_rewards(ctx, field) - case "deposits": - return ec.fieldContext_Entities_deposits(ctx, field) - case "withdrawals": - return ec.fieldContext_Entities_withdrawals(ctx, field) - case "assets": - return ec.fieldContext_Entities_assets(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Entities_liquidityProvisions(ctx, field) - case "proposals": - return ec.fieldContext_Entities_proposals(ctx, field) - case "delegations": - return ec.fieldContext_Entities_delegations(ctx, field) - case "nodes": - return ec.fieldContext_Entities_nodes(ctx, field) - case "nodeSignatures": - return ec.fieldContext_Entities_nodeSignatures(ctx, field) - case "networkParameters": - return ec.fieldContext_Entities_networkParameters(ctx, field) - case "keyRotations": - return ec.fieldContext_Entities_keyRotations(ctx, field) - case "ethereumKeyRotations": - return ec.fieldContext_Entities_ethereumKeyRotations(ctx, field) - case "protocolUpgradeProposals": - return ec.fieldContext_Entities_protocolUpgradeProposals(ctx, field) + case "node": + return ec.fieldContext_PositionEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_PositionEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Entities", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PositionEdge", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_entities_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_epoch(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_epoch(ctx, field) +func (ec *executionContext) _PositionConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.PositionConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -66332,59 +69050,45 @@ func (ec *executionContext) _Query_epoch(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Epoch(rctx, fc.Args["id"].(*string), fc.Args["block"].(*string)) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Epoch) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNEpoch2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpoch(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Epoch_id(ctx, field) - case "timestamps": - return ec.fieldContext_Epoch_timestamps(ctx, field) - case "validatorsConnection": - return ec.fieldContext_Epoch_validatorsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Epoch_delegationsConnection(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Epoch", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_epoch_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_epochRewardSummaries(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_epochRewardSummaries(ctx, field) +func (ec *executionContext) _PositionEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.PositionEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -66397,52 +69101,60 @@ func (ec *executionContext) _Query_epochRewardSummaries(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().EpochRewardSummaries(rctx, fc.Args["filter"].(*v2.RewardSummaryFilter), fc.Args["pagination"].(*v2.Pagination)) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.EpochRewardSummaryConnection) + res := resTmp.(*vega.Position) fc.Result = res - return ec.marshalOEpochRewardSummaryConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEpochRewardSummaryConnection(ctx, field.Selections, res) + return ec.marshalNPosition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPosition(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_epochRewardSummaries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_EpochRewardSummaryConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_EpochRewardSummaryConnection_pageInfo(ctx, field) + case "market": + return ec.fieldContext_Position_market(ctx, field) + case "party": + return ec.fieldContext_Position_party(ctx, field) + case "openVolume": + return ec.fieldContext_Position_openVolume(ctx, field) + case "realisedPNL": + return ec.fieldContext_Position_realisedPNL(ctx, field) + case "unrealisedPNL": + return ec.fieldContext_Position_unrealisedPNL(ctx, field) + case "averageEntryPrice": + return ec.fieldContext_Position_averageEntryPrice(ctx, field) + case "lossSocializationAmount": + return ec.fieldContext_Position_lossSocializationAmount(ctx, field) + case "positionStatus": + return ec.fieldContext_Position_positionStatus(ctx, field) + case "marginsConnection": + return ec.fieldContext_Position_marginsConnection(ctx, field) + case "updatedAt": + return ec.fieldContext_Position_updatedAt(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type EpochRewardSummaryConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Position", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_epochRewardSummaries_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_erc20ListAssetBundle(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_erc20ListAssetBundle(ctx, field) +func (ec *executionContext) _PositionEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.PositionEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -66455,7 +69167,7 @@ func (ec *executionContext) _Query_erc20ListAssetBundle(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Erc20ListAssetBundle(rctx, fc.Args["assetId"].(string)) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -66464,47 +69176,26 @@ func (ec *executionContext) _Query_erc20ListAssetBundle(ctx context.Context, fie if resTmp == nil { return graphql.Null } - res := resTmp.(*Erc20ListAssetBundle) + res := resTmp.(string) fc.Result = res - return ec.marshalOErc20ListAssetBundle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐErc20ListAssetBundle(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_erc20ListAssetBundle(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "assetSource": - return ec.fieldContext_Erc20ListAssetBundle_assetSource(ctx, field) - case "vegaAssetId": - return ec.fieldContext_Erc20ListAssetBundle_vegaAssetId(ctx, field) - case "nonce": - return ec.fieldContext_Erc20ListAssetBundle_nonce(ctx, field) - case "signatures": - return ec.fieldContext_Erc20ListAssetBundle_signatures(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Erc20ListAssetBundle", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_erc20ListAssetBundle_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_erc20MultiSigSignerAddedBundles(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_erc20MultiSigSignerAddedBundles(ctx, field) +func (ec *executionContext) _PositionEstimate_margin(ctx context.Context, field graphql.CollectedField, obj *PositionEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionEstimate_margin(ctx, field) if err != nil { return graphql.Null } @@ -66517,7 +69208,7 @@ func (ec *executionContext) _Query_erc20MultiSigSignerAddedBundles(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Erc20MultiSigSignerAddedBundles(rctx, fc.Args["nodeId"].(string), fc.Args["submitter"].(*string), fc.Args["epochSeq"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return obj.Margin, nil }) if err != nil { ec.Error(ctx, err) @@ -66529,43 +69220,32 @@ func (ec *executionContext) _Query_erc20MultiSigSignerAddedBundles(ctx context.C } return graphql.Null } - res := resTmp.(*ERC20MultiSigSignerAddedConnection) + res := resTmp.(*v2.MarginEstimate) fc.Result = res - return ec.marshalNERC20MultiSigSignerAddedConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐERC20MultiSigSignerAddedConnection(ctx, field.Selections, res) + return ec.marshalNMarginEstimate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarginEstimate(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_erc20MultiSigSignerAddedBundles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionEstimate_margin(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionEstimate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_ERC20MultiSigSignerAddedConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_ERC20MultiSigSignerAddedConnection_pageInfo(ctx, field) + case "worstCase": + return ec.fieldContext_MarginEstimate_worstCase(ctx, field) + case "bestCase": + return ec.fieldContext_MarginEstimate_bestCase(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerAddedConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type MarginEstimate", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_erc20MultiSigSignerAddedBundles_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_erc20MultiSigSignerRemovedBundles(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_erc20MultiSigSignerRemovedBundles(ctx, field) +func (ec *executionContext) _PositionEstimate_collateralIncreaseEstimate(ctx context.Context, field graphql.CollectedField, obj *PositionEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionEstimate_collateralIncreaseEstimate(ctx, field) if err != nil { return graphql.Null } @@ -66578,7 +69258,7 @@ func (ec *executionContext) _Query_erc20MultiSigSignerRemovedBundles(ctx context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Erc20MultiSigSignerRemovedBundles(rctx, fc.Args["nodeId"].(string), fc.Args["submitter"].(*string), fc.Args["epochSeq"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return obj.CollateralIncreaseEstimate, nil }) if err != nil { ec.Error(ctx, err) @@ -66590,43 +69270,32 @@ func (ec *executionContext) _Query_erc20MultiSigSignerRemovedBundles(ctx context } return graphql.Null } - res := resTmp.(*ERC20MultiSigSignerRemovedConnection) + res := resTmp.(*v2.CollateralIncreaseEstimate) fc.Result = res - return ec.marshalNERC20MultiSigSignerRemovedConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐERC20MultiSigSignerRemovedConnection(ctx, field.Selections, res) + return ec.marshalNCollateralIncreaseEstimate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCollateralIncreaseEstimate(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_erc20MultiSigSignerRemovedBundles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionEstimate_collateralIncreaseEstimate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionEstimate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_ERC20MultiSigSignerRemovedConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_ERC20MultiSigSignerRemovedConnection_pageInfo(ctx, field) + case "worstCase": + return ec.fieldContext_CollateralIncreaseEstimate_worstCase(ctx, field) + case "bestCase": + return ec.fieldContext_CollateralIncreaseEstimate_bestCase(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerRemovedConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type CollateralIncreaseEstimate", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_erc20MultiSigSignerRemovedBundles_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_erc20SetAssetLimitsBundle(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_erc20SetAssetLimitsBundle(ctx, field) +func (ec *executionContext) _PositionEstimate_liquidation(ctx context.Context, field graphql.CollectedField, obj *PositionEstimate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionEstimate_liquidation(ctx, field) if err != nil { return graphql.Null } @@ -66639,63 +69308,41 @@ func (ec *executionContext) _Query_erc20SetAssetLimitsBundle(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Erc20SetAssetLimitsBundle(rctx, fc.Args["proposalId"].(string)) + return obj.Liquidation, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*ERC20SetAssetLimitsBundle) + res := resTmp.(*v2.LiquidationEstimate) fc.Result = res - return ec.marshalNERC20SetAssetLimitsBundle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐERC20SetAssetLimitsBundle(ctx, field.Selections, res) + return ec.marshalOLiquidationEstimate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidationEstimate(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_erc20SetAssetLimitsBundle(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionEstimate_liquidation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionEstimate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "assetSource": - return ec.fieldContext_ERC20SetAssetLimitsBundle_assetSource(ctx, field) - case "vegaAssetId": - return ec.fieldContext_ERC20SetAssetLimitsBundle_vegaAssetId(ctx, field) - case "nonce": - return ec.fieldContext_ERC20SetAssetLimitsBundle_nonce(ctx, field) - case "lifetimeLimit": - return ec.fieldContext_ERC20SetAssetLimitsBundle_lifetimeLimit(ctx, field) - case "threshold": - return ec.fieldContext_ERC20SetAssetLimitsBundle_threshold(ctx, field) - case "signatures": - return ec.fieldContext_ERC20SetAssetLimitsBundle_signatures(ctx, field) + case "worstCase": + return ec.fieldContext_LiquidationEstimate_worstCase(ctx, field) + case "bestCase": + return ec.fieldContext_LiquidationEstimate_bestCase(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ERC20SetAssetLimitsBundle", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LiquidationEstimate", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_erc20SetAssetLimitsBundle_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_erc20WithdrawalApproval(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_erc20WithdrawalApproval(ctx, field) +func (ec *executionContext) _PositionResolution_marketId(ctx context.Context, field graphql.CollectedField, obj *PositionResolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionResolution_marketId(ctx, field) if err != nil { return graphql.Null } @@ -66708,60 +69355,38 @@ func (ec *executionContext) _Query_erc20WithdrawalApproval(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Erc20WithdrawalApproval(rctx, fc.Args["withdrawalId"].(string)) + return obj.MarketID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*Erc20WithdrawalApproval) + res := resTmp.(string) fc.Result = res - return ec.marshalOErc20WithdrawalApproval2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐErc20WithdrawalApproval(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_erc20WithdrawalApproval(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionResolution_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionResolution", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "assetSource": - return ec.fieldContext_Erc20WithdrawalApproval_assetSource(ctx, field) - case "amount": - return ec.fieldContext_Erc20WithdrawalApproval_amount(ctx, field) - case "nonce": - return ec.fieldContext_Erc20WithdrawalApproval_nonce(ctx, field) - case "signatures": - return ec.fieldContext_Erc20WithdrawalApproval_signatures(ctx, field) - case "targetAddress": - return ec.fieldContext_Erc20WithdrawalApproval_targetAddress(ctx, field) - case "creation": - return ec.fieldContext_Erc20WithdrawalApproval_creation(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Erc20WithdrawalApproval", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_erc20WithdrawalApproval_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_estimateOrder(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_estimateOrder(ctx, field) +func (ec *executionContext) _PositionResolution_distressed(ctx context.Context, field graphql.CollectedField, obj *PositionResolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionResolution_distressed(ctx, field) if err != nil { return graphql.Null } @@ -66774,7 +69399,7 @@ func (ec *executionContext) _Query_estimateOrder(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().EstimateOrder(rctx, fc.Args["marketId"].(string), fc.Args["partyId"].(string), fc.Args["price"].(*string), fc.Args["size"].(string), fc.Args["side"].(vega.Side), fc.Args["timeInForce"].(vega.Order_TimeInForce), fc.Args["expiration"].(*int64), fc.Args["type"].(vega.Order_Type)) + return obj.Distressed, nil }) if err != nil { ec.Error(ctx, err) @@ -66786,45 +69411,26 @@ func (ec *executionContext) _Query_estimateOrder(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(*OrderEstimate) + res := resTmp.(int) fc.Result = res - return ec.marshalNOrderEstimate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐOrderEstimate(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_estimateOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionResolution_distressed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionResolution", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "fee": - return ec.fieldContext_OrderEstimate_fee(ctx, field) - case "totalFeeAmount": - return ec.fieldContext_OrderEstimate_totalFeeAmount(ctx, field) - case "marginLevels": - return ec.fieldContext_OrderEstimate_marginLevels(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OrderEstimate", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_estimateOrder_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_estimateFees(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_estimateFees(ctx, field) +func (ec *executionContext) _PositionResolution_closed(ctx context.Context, field graphql.CollectedField, obj *PositionResolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionResolution_closed(ctx, field) if err != nil { return graphql.Null } @@ -66837,7 +69443,7 @@ func (ec *executionContext) _Query_estimateFees(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().EstimateFees(rctx, fc.Args["marketId"].(string), fc.Args["partyId"].(string), fc.Args["price"].(*string), fc.Args["size"].(string), fc.Args["side"].(vega.Side), fc.Args["timeInForce"].(vega.Order_TimeInForce), fc.Args["expiration"].(*int64), fc.Args["type"].(vega.Order_Type)) + return obj.Closed, nil }) if err != nil { ec.Error(ctx, err) @@ -66849,43 +69455,26 @@ func (ec *executionContext) _Query_estimateFees(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(*FeeEstimate) + res := resTmp.(int) fc.Result = res - return ec.marshalNFeeEstimate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐFeeEstimate(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_estimateFees(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionResolution_closed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionResolution", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "fees": - return ec.fieldContext_FeeEstimate_fees(ctx, field) - case "totalFeeAmount": - return ec.fieldContext_FeeEstimate_totalFeeAmount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type FeeEstimate", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_estimateFees_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_estimatePosition(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_estimatePosition(ctx, field) +func (ec *executionContext) _PositionResolution_markPrice(ctx context.Context, field graphql.CollectedField, obj *PositionResolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionResolution_markPrice(ctx, field) if err != nil { return graphql.Null } @@ -66898,52 +69487,38 @@ func (ec *executionContext) _Query_estimatePosition(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().EstimatePosition(rctx, fc.Args["marketId"].(string), fc.Args["openVolume"].(string), fc.Args["orders"].([]*OrderInfo), fc.Args["collateralAvailable"].(*string), fc.Args["scaleLiquidationPriceToMarketDecimals"].(*bool)) + return obj.MarkPrice, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*PositionEstimate) + res := resTmp.(string) fc.Result = res - return ec.marshalOPositionEstimate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPositionEstimate(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_estimatePosition(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionResolution_markPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionResolution", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "margin": - return ec.fieldContext_PositionEstimate_margin(ctx, field) - case "liquidation": - return ec.fieldContext_PositionEstimate_liquidation(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PositionEstimate", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_estimatePosition_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_ethereumKeyRotations(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_ethereumKeyRotations(ctx, field) +func (ec *executionContext) _PositionUpdate_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionUpdate_marketId(ctx, field) if err != nil { return graphql.Null } @@ -66956,7 +69531,7 @@ func (ec *executionContext) _Query_ethereumKeyRotations(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().EthereumKeyRotations(rctx, fc.Args["nodeId"].(*string)) + return obj.MarketId, nil }) if err != nil { ec.Error(ctx, err) @@ -66968,43 +69543,26 @@ func (ec *executionContext) _Query_ethereumKeyRotations(ctx context.Context, fie } return graphql.Null } - res := resTmp.(*v2.EthereumKeyRotationsConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalNEthereumKeyRotationsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEthereumKeyRotationsConnection(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_ethereumKeyRotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionUpdate_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_EthereumKeyRotationsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_EthereumKeyRotationsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type EthereumKeyRotationsConnection", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_ethereumKeyRotations_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_fundingPeriods(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_fundingPeriods(ctx, field) +func (ec *executionContext) _PositionUpdate_partyId(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionUpdate_partyId(ctx, field) if err != nil { return graphql.Null } @@ -67017,7 +69575,7 @@ func (ec *executionContext) _Query_fundingPeriods(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().FundingPeriods(rctx, fc.Args["marketId"].(string), fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) + return obj.PartyId, nil }) if err != nil { ec.Error(ctx, err) @@ -67029,43 +69587,26 @@ func (ec *executionContext) _Query_fundingPeriods(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(*v2.FundingPeriodConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalNFundingPeriodConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodConnection(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_fundingPeriods(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionUpdate_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_FundingPeriodConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_FundingPeriodConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type FundingPeriodConnection", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_fundingPeriods_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_fundingPeriodDataPoints(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_fundingPeriodDataPoints(ctx, field) +func (ec *executionContext) _PositionUpdate_openVolume(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionUpdate_openVolume(ctx, field) if err != nil { return graphql.Null } @@ -67078,7 +69619,7 @@ func (ec *executionContext) _Query_fundingPeriodDataPoints(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().FundingPeriodDataPoints(rctx, fc.Args["marketId"].(string), fc.Args["dateRange"].(*v2.DateRange), fc.Args["source"].(*v1.FundingPeriodDataPoint_Source), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.PositionUpdate().OpenVolume(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -67090,43 +69631,26 @@ func (ec *executionContext) _Query_fundingPeriodDataPoints(ctx context.Context, } return graphql.Null } - res := resTmp.(*v2.FundingPeriodDataPointConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalNFundingPeriodDataPointConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_fundingPeriodDataPoints(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionUpdate_openVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionUpdate", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_FundingPeriodDataPointConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_FundingPeriodDataPointConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type FundingPeriodDataPointConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_fundingPeriodDataPoints_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_fundingPayments(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_fundingPayments(ctx, field) +func (ec *executionContext) _PositionUpdate_realisedPNL(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionUpdate_realisedPNL(ctx, field) if err != nil { return graphql.Null } @@ -67139,7 +69663,7 @@ func (ec *executionContext) _Query_fundingPayments(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().FundingPayments(rctx, fc.Args["partyId"].(string), fc.Args["marketId"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return obj.RealisedPnl, nil }) if err != nil { ec.Error(ctx, err) @@ -67151,43 +69675,26 @@ func (ec *executionContext) _Query_fundingPayments(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(*v2.FundingPaymentConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalNFundingPaymentConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPaymentConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_fundingPayments(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionUpdate_realisedPNL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_FundingPaymentConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_FundingPaymentConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type FundingPaymentConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_fundingPayments_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_getMarketDataHistoryConnectionByID(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_getMarketDataHistoryConnectionByID(ctx, field) +func (ec *executionContext) _PositionUpdate_unrealisedPNL(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionUpdate_unrealisedPNL(ctx, field) if err != nil { return graphql.Null } @@ -67200,52 +69707,38 @@ func (ec *executionContext) _Query_getMarketDataHistoryConnectionByID(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().GetMarketDataHistoryConnectionByID(rctx, fc.Args["id"].(string), fc.Args["start"].(*int64), fc.Args["end"].(*int64), fc.Args["pagination"].(*v2.Pagination)) + return obj.UnrealisedPnl, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.MarketDataConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOMarketDataConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarketDataConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_getMarketDataHistoryConnectionByID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionUpdate_unrealisedPNL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_MarketDataConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_MarketDataConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarketDataConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_getMarketDataHistoryConnectionByID_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_ledgerEntries(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_ledgerEntries(ctx, field) +func (ec *executionContext) _PositionUpdate_averageEntryPrice(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionUpdate_averageEntryPrice(ctx, field) if err != nil { return graphql.Null } @@ -67258,7 +69751,7 @@ func (ec *executionContext) _Query_ledgerEntries(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().LedgerEntries(rctx, fc.Args["filter"].(*v2.LedgerEntryFilter), fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) + return obj.AverageEntryPrice, nil }) if err != nil { ec.Error(ctx, err) @@ -67270,43 +69763,26 @@ func (ec *executionContext) _Query_ledgerEntries(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(*v2.AggregatedLedgerEntriesConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalNAggregatedLedgerEntriesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAggregatedLedgerEntriesConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_ledgerEntries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionUpdate_averageEntryPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_AggregatedLedgerEntriesConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_AggregatedLedgerEntriesConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type AggregatedLedgerEntriesConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_ledgerEntries_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_liquidityProviders(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_liquidityProviders(ctx, field) +func (ec *executionContext) _PositionUpdate_updatedAt(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionUpdate_updatedAt(ctx, field) if err != nil { return graphql.Null } @@ -67319,7 +69795,7 @@ func (ec *executionContext) _Query_liquidityProviders(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().LiquidityProviders(rctx, fc.Args["partyId"].(*string), fc.Args["marketId"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return obj.UpdatedAt, nil }) if err != nil { ec.Error(ctx, err) @@ -67328,43 +69804,26 @@ func (ec *executionContext) _Query_liquidityProviders(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.LiquidityProviderConnection) + res := resTmp.(int64) fc.Result = res - return ec.marshalOLiquidityProviderConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProviderConnection(ctx, field.Selections, res) + return ec.marshalOTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_liquidityProviders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionUpdate_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionUpdate", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_LiquidityProviderConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_LiquidityProviderConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProviderConnection", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_liquidityProviders_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_keyRotationsConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_keyRotationsConnection(ctx, field) +func (ec *executionContext) _PositionUpdate_lossSocializationAmount(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionUpdate_lossSocializationAmount(ctx, field) if err != nil { return graphql.Null } @@ -67377,7 +69836,7 @@ func (ec *executionContext) _Query_keyRotationsConnection(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().KeyRotationsConnection(rctx, fc.Args["id"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.PositionUpdate().LossSocializationAmount(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -67389,43 +69848,70 @@ func (ec *executionContext) _Query_keyRotationsConnection(ctx context.Context, f } return graphql.Null } - res := resTmp.(*v2.KeyRotationConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalNKeyRotationConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐKeyRotationConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_keyRotationsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PositionUpdate_lossSocializationAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PositionUpdate", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_KeyRotationConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_KeyRotationConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type KeyRotationConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } + return fc, nil +} + +func (ec *executionContext) _PositionUpdate_positionStatus(ctx context.Context, field graphql.CollectedField, obj *vega.Position) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PositionUpdate_positionStatus(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null } }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_keyRotationsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PositionStatus, nil + }) + if err != nil { ec.Error(ctx, err) - return + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(vega.PositionStatus) + fc.Result = res + return ec.marshalNPositionStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPositionStatus(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PositionUpdate_positionStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PositionUpdate", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type PositionStatus does not have child fields") + }, } return fc, nil } -func (ec *executionContext) _Query_lastBlockHeight(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_lastBlockHeight(ctx, field) +func (ec *executionContext) _PriceLevel_price(ctx context.Context, field graphql.CollectedField, obj *vega.PriceLevel) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PriceLevel_price(ctx, field) if err != nil { return graphql.Null } @@ -67438,7 +69924,7 @@ func (ec *executionContext) _Query_lastBlockHeight(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().LastBlockHeight(rctx) + return obj.Price, nil }) if err != nil { ec.Error(ctx, err) @@ -67455,12 +69941,12 @@ func (ec *executionContext) _Query_lastBlockHeight(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_lastBlockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PriceLevel_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PriceLevel", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -67468,8 +69954,8 @@ func (ec *executionContext) fieldContext_Query_lastBlockHeight(ctx context.Conte return fc, nil } -func (ec *executionContext) _Query_market(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_market(ctx, field) +func (ec *executionContext) _PriceLevel_volume(ctx context.Context, field graphql.CollectedField, obj *vega.PriceLevel) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PriceLevel_volume(ctx, field) if err != nil { return graphql.Null } @@ -67482,102 +69968,38 @@ func (ec *executionContext) _Query_market(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Market(rctx, fc.Args["id"].(string)) + return ec.resolvers.PriceLevel().Volume(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.Market) + res := resTmp.(string) fc.Result = res - return ec.marshalOMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PriceLevel_volume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PriceLevel", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Market_id(ctx, field) - case "fees": - return ec.fieldContext_Market_fees(ctx, field) - case "tradableInstrument": - return ec.fieldContext_Market_tradableInstrument(ctx, field) - case "decimalPlaces": - return ec.fieldContext_Market_decimalPlaces(ctx, field) - case "positionDecimalPlaces": - return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) - case "openingAuction": - return ec.fieldContext_Market_openingAuction(ctx, field) - case "priceMonitoringSettings": - return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) - case "liquidityMonitoringParameters": - return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) - case "tradingMode": - return ec.fieldContext_Market_tradingMode(ctx, field) - case "state": - return ec.fieldContext_Market_state(ctx, field) - case "proposal": - return ec.fieldContext_Market_proposal(ctx, field) - case "ordersConnection": - return ec.fieldContext_Market_ordersConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Market_accountsConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Market_tradesConnection(ctx, field) - case "depth": - return ec.fieldContext_Market_depth(ctx, field) - case "candlesConnection": - return ec.fieldContext_Market_candlesConnection(ctx, field) - case "data": - return ec.fieldContext_Market_data(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Market_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) - case "marketTimestamps": - return ec.fieldContext_Market_marketTimestamps(ctx, field) - case "riskFactors": - return ec.fieldContext_Market_riskFactors(ctx, field) - case "linearSlippageFactor": - return ec.fieldContext_Market_linearSlippageFactor(ctx, field) - case "quadraticSlippageFactor": - return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) - case "parentMarketID": - return ec.fieldContext_Market_parentMarketID(ctx, field) - case "insurancePoolFraction": - return ec.fieldContext_Market_insurancePoolFraction(ctx, field) - case "successorMarketID": - return ec.fieldContext_Market_successorMarketID(ctx, field) - case "liquiditySLAParameters": - return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_market_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_marketsConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_marketsConnection(ctx, field) +func (ec *executionContext) _PriceLevel_numberOfOrders(ctx context.Context, field graphql.CollectedField, obj *vega.PriceLevel) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PriceLevel_numberOfOrders(ctx, field) if err != nil { return graphql.Null } @@ -67590,52 +70012,38 @@ func (ec *executionContext) _Query_marketsConnection(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().MarketsConnection(rctx, fc.Args["id"].(*string), fc.Args["pagination"].(*v2.Pagination), fc.Args["includeSettled"].(*bool)) + return ec.resolvers.PriceLevel().NumberOfOrders(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.MarketConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOMarketConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarketConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_marketsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PriceLevel_numberOfOrders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PriceLevel", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_MarketConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_MarketConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarketConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_marketsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_mostRecentHistorySegment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_mostRecentHistorySegment(ctx, field) +func (ec *executionContext) _PriceMonitoringBounds_minValidPrice(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringBounds) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PriceMonitoringBounds_minValidPrice(ctx, field) if err != nil { return graphql.Null } @@ -67648,7 +70056,7 @@ func (ec *executionContext) _Query_mostRecentHistorySegment(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().MostRecentHistorySegment(rctx) + return obj.MinValidPrice, nil }) if err != nil { ec.Error(ctx, err) @@ -67660,34 +70068,26 @@ func (ec *executionContext) _Query_mostRecentHistorySegment(ctx context.Context, } return graphql.Null } - res := resTmp.(*v2.HistorySegment) + res := resTmp.(string) fc.Result = res - return ec.marshalNHistorySegment2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐHistorySegment(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_mostRecentHistorySegment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PriceMonitoringBounds_minValidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PriceMonitoringBounds", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "fromHeight": - return ec.fieldContext_HistorySegment_fromHeight(ctx, field) - case "toHeight": - return ec.fieldContext_HistorySegment_toHeight(ctx, field) - case "historySegmentId": - return ec.fieldContext_HistorySegment_historySegmentId(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type HistorySegment", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Query_networkLimits(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_networkLimits(ctx, field) +func (ec *executionContext) _PriceMonitoringBounds_maxValidPrice(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringBounds) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PriceMonitoringBounds_maxValidPrice(ctx, field) if err != nil { return graphql.Null } @@ -67700,51 +70100,38 @@ func (ec *executionContext) _Query_networkLimits(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().NetworkLimits(rctx) + return obj.MaxValidPrice, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.NetworkLimits) + res := resTmp.(string) fc.Result = res - return ec.marshalONetworkLimits2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNetworkLimits(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_networkLimits(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PriceMonitoringBounds_maxValidPrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PriceMonitoringBounds", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "canProposeMarket": - return ec.fieldContext_NetworkLimits_canProposeMarket(ctx, field) - case "canProposeAsset": - return ec.fieldContext_NetworkLimits_canProposeAsset(ctx, field) - case "proposeMarketEnabled": - return ec.fieldContext_NetworkLimits_proposeMarketEnabled(ctx, field) - case "proposeAssetEnabled": - return ec.fieldContext_NetworkLimits_proposeAssetEnabled(ctx, field) - case "genesisLoaded": - return ec.fieldContext_NetworkLimits_genesisLoaded(ctx, field) - case "proposeMarketEnabledFrom": - return ec.fieldContext_NetworkLimits_proposeMarketEnabledFrom(ctx, field) - case "proposeAssetEnabledFrom": - return ec.fieldContext_NetworkLimits_proposeAssetEnabledFrom(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type NetworkLimits", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Query_networkParameter(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_networkParameter(ctx, field) +func (ec *executionContext) _PriceMonitoringBounds_trigger(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringBounds) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PriceMonitoringBounds_trigger(ctx, field) if err != nil { return graphql.Null } @@ -67757,52 +70144,46 @@ func (ec *executionContext) _Query_networkParameter(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().NetworkParameter(rctx, fc.Args["key"].(string)) + return obj.Trigger, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.NetworkParameter) + res := resTmp.(*PriceMonitoringTrigger) fc.Result = res - return ec.marshalONetworkParameter2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNetworkParameter(ctx, field.Selections, res) + return ec.marshalNPriceMonitoringTrigger2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringTrigger(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_networkParameter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PriceMonitoringBounds_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PriceMonitoringBounds", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "key": - return ec.fieldContext_NetworkParameter_key(ctx, field) - case "value": - return ec.fieldContext_NetworkParameter_value(ctx, field) + case "horizonSecs": + return ec.fieldContext_PriceMonitoringTrigger_horizonSecs(ctx, field) + case "probability": + return ec.fieldContext_PriceMonitoringTrigger_probability(ctx, field) + case "auctionExtensionSecs": + return ec.fieldContext_PriceMonitoringTrigger_auctionExtensionSecs(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type NetworkParameter", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringTrigger", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_networkParameter_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_networkParametersConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_networkParametersConnection(ctx, field) +func (ec *executionContext) _PriceMonitoringBounds_referencePrice(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringBounds) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PriceMonitoringBounds_referencePrice(ctx, field) if err != nil { return graphql.Null } @@ -67815,7 +70196,7 @@ func (ec *executionContext) _Query_networkParametersConnection(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().NetworkParametersConnection(rctx, fc.Args["pagination"].(*v2.Pagination)) + return obj.ReferencePrice, nil }) if err != nil { ec.Error(ctx, err) @@ -67827,43 +70208,26 @@ func (ec *executionContext) _Query_networkParametersConnection(ctx context.Conte } return graphql.Null } - res := resTmp.(*v2.NetworkParameterConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalNNetworkParametersConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNetworkParameterConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_networkParametersConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PriceMonitoringBounds_referencePrice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PriceMonitoringBounds", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_NetworkParametersConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_NetworkParametersConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type NetworkParametersConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_networkParametersConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_node(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_node(ctx, field) +func (ec *executionContext) _PriceMonitoringParameters_triggers(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringParameters) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PriceMonitoringParameters_triggers(ctx, field) if err != nil { return graphql.Null } @@ -67876,7 +70240,7 @@ func (ec *executionContext) _Query_node(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Node(rctx, fc.Args["id"].(string)) + return obj.Triggers, nil }) if err != nil { ec.Error(ctx, err) @@ -67885,73 +70249,34 @@ func (ec *executionContext) _Query_node(ctx context.Context, field graphql.Colle if resTmp == nil { return graphql.Null } - res := resTmp.(*vega.Node) + res := resTmp.([]*PriceMonitoringTrigger) fc.Result = res - return ec.marshalONode2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNode(ctx, field.Selections, res) + return ec.marshalOPriceMonitoringTrigger2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringTriggerᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PriceMonitoringParameters_triggers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PriceMonitoringParameters", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Node_id(ctx, field) - case "pubkey": - return ec.fieldContext_Node_pubkey(ctx, field) - case "tmPubkey": - return ec.fieldContext_Node_tmPubkey(ctx, field) - case "ethereumAddress": - return ec.fieldContext_Node_ethereumAddress(ctx, field) - case "infoUrl": - return ec.fieldContext_Node_infoUrl(ctx, field) - case "location": - return ec.fieldContext_Node_location(ctx, field) - case "stakedByOperator": - return ec.fieldContext_Node_stakedByOperator(ctx, field) - case "stakedByDelegates": - return ec.fieldContext_Node_stakedByDelegates(ctx, field) - case "stakedTotal": - return ec.fieldContext_Node_stakedTotal(ctx, field) - case "pendingStake": - return ec.fieldContext_Node_pendingStake(ctx, field) - case "epochData": - return ec.fieldContext_Node_epochData(ctx, field) - case "status": - return ec.fieldContext_Node_status(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Node_delegationsConnection(ctx, field) - case "rewardScore": - return ec.fieldContext_Node_rewardScore(ctx, field) - case "rankingScore": - return ec.fieldContext_Node_rankingScore(ctx, field) - case "name": - return ec.fieldContext_Node_name(ctx, field) - case "avatarUrl": - return ec.fieldContext_Node_avatarUrl(ctx, field) + case "horizonSecs": + return ec.fieldContext_PriceMonitoringTrigger_horizonSecs(ctx, field) + case "probability": + return ec.fieldContext_PriceMonitoringTrigger_probability(ctx, field) + case "auctionExtensionSecs": + return ec.fieldContext_PriceMonitoringTrigger_auctionExtensionSecs(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Node", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringTrigger", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_node_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_nodeData(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_nodeData(ctx, field) +func (ec *executionContext) _PriceMonitoringSettings_parameters(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringSettings) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PriceMonitoringSettings_parameters(ctx, field) if err != nil { return graphql.Null } @@ -67964,7 +70289,7 @@ func (ec *executionContext) _Query_nodeData(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().NodeData(rctx) + return obj.Parameters, nil }) if err != nil { ec.Error(ctx, err) @@ -67973,42 +70298,30 @@ func (ec *executionContext) _Query_nodeData(ctx context.Context, field graphql.C if resTmp == nil { return graphql.Null } - res := resTmp.(*vega.NodeData) + res := resTmp.(*PriceMonitoringParameters) fc.Result = res - return ec.marshalONodeData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNodeData(ctx, field.Selections, res) + return ec.marshalOPriceMonitoringParameters2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPriceMonitoringParameters(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_nodeData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PriceMonitoringSettings_parameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PriceMonitoringSettings", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "stakedTotal": - return ec.fieldContext_NodeData_stakedTotal(ctx, field) - case "totalNodes": - return ec.fieldContext_NodeData_totalNodes(ctx, field) - case "inactiveNodes": - return ec.fieldContext_NodeData_inactiveNodes(ctx, field) - case "tendermintNodes": - return ec.fieldContext_NodeData_tendermintNodes(ctx, field) - case "ersatzNodes": - return ec.fieldContext_NodeData_ersatzNodes(ctx, field) - case "pendingNodes": - return ec.fieldContext_NodeData_pendingNodes(ctx, field) - case "uptime": - return ec.fieldContext_NodeData_uptime(ctx, field) + case "triggers": + return ec.fieldContext_PriceMonitoringParameters_triggers(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type NodeData", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PriceMonitoringParameters", field.Name) }, } return fc, nil } -func (ec *executionContext) _Query_nodesConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_nodesConnection(ctx, field) +func (ec *executionContext) _PriceMonitoringTrigger_horizonSecs(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringTrigger) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PriceMonitoringTrigger_horizonSecs(ctx, field) if err != nil { return graphql.Null } @@ -68021,7 +70334,7 @@ func (ec *executionContext) _Query_nodesConnection(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().NodesConnection(rctx, fc.Args["pagination"].(*v2.Pagination)) + return obj.HorizonSecs, nil }) if err != nil { ec.Error(ctx, err) @@ -68033,43 +70346,26 @@ func (ec *executionContext) _Query_nodesConnection(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(*v2.NodesConnection) + res := resTmp.(int) fc.Result = res - return ec.marshalNNodesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNodesConnection(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_nodesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PriceMonitoringTrigger_horizonSecs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PriceMonitoringTrigger", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_NodesConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_NodesConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type NodesConnection", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_nodesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_nodeSignaturesConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_nodeSignaturesConnection(ctx, field) +func (ec *executionContext) _PriceMonitoringTrigger_probability(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringTrigger) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PriceMonitoringTrigger_probability(ctx, field) if err != nil { return graphql.Null } @@ -68082,52 +70378,38 @@ func (ec *executionContext) _Query_nodeSignaturesConnection(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().NodeSignaturesConnection(rctx, fc.Args["resourceId"].(string), fc.Args["pagination"].(*v2.Pagination)) + return obj.Probability, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.NodeSignaturesConnection) + res := resTmp.(float64) fc.Result = res - return ec.marshalONodeSignaturesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNodeSignaturesConnection(ctx, field.Selections, res) + return ec.marshalNFloat2float64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_nodeSignaturesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PriceMonitoringTrigger_probability(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PriceMonitoringTrigger", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_NodeSignaturesConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_NodeSignaturesConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type NodeSignaturesConnection", field.Name) + return nil, errors.New("field of type Float does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_nodeSignaturesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_oracleDataBySpecConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_oracleDataBySpecConnection(ctx, field) +func (ec *executionContext) _PriceMonitoringTrigger_auctionExtensionSecs(ctx context.Context, field graphql.CollectedField, obj *PriceMonitoringTrigger) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PriceMonitoringTrigger_auctionExtensionSecs(ctx, field) if err != nil { return graphql.Null } @@ -68140,52 +70422,38 @@ func (ec *executionContext) _Query_oracleDataBySpecConnection(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().OracleDataBySpecConnection(rctx, fc.Args["oracleSpecId"].(string), fc.Args["pagination"].(*v2.Pagination)) + return obj.AuctionExtensionSecs, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.OracleDataConnection) + res := resTmp.(int) fc.Result = res - return ec.marshalOOracleDataConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOracleDataConnection(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_oracleDataBySpecConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PriceMonitoringTrigger_auctionExtensionSecs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PriceMonitoringTrigger", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_OracleDataConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_OracleDataConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OracleDataConnection", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_oracleDataBySpecConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_oracleDataConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_oracleDataConnection(ctx, field) +func (ec *executionContext) _Property_name(ctx context.Context, field graphql.CollectedField, obj *v13.Property) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Property_name(ctx, field) if err != nil { return graphql.Null } @@ -68198,52 +70466,38 @@ func (ec *executionContext) _Query_oracleDataConnection(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().OracleDataConnection(rctx, fc.Args["pagination"].(*v2.Pagination)) + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.OracleDataConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOOracleDataConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOracleDataConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_oracleDataConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Property_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Property", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_OracleDataConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_OracleDataConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OracleDataConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_oracleDataConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_oracleSpec(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_oracleSpec(ctx, field) +func (ec *executionContext) _Property_value(ctx context.Context, field graphql.CollectedField, obj *v13.Property) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Property_value(ctx, field) if err != nil { return graphql.Null } @@ -68256,52 +70510,38 @@ func (ec *executionContext) _Query_oracleSpec(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().OracleSpec(rctx, fc.Args["oracleSpecId"].(string)) + return obj.Value, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.OracleSpec) + res := resTmp.(string) fc.Result = res - return ec.marshalOOracleSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOracleSpec(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_oracleSpec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Property_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Property", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "dataSourceSpec": - return ec.fieldContext_OracleSpec_dataSourceSpec(ctx, field) - case "dataConnection": - return ec.fieldContext_OracleSpec_dataConnection(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OracleSpec", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_oracleSpec_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_oracleSpecsConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_oracleSpecsConnection(ctx, field) +func (ec *executionContext) _PropertyKey_name(ctx context.Context, field graphql.CollectedField, obj *PropertyKey) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PropertyKey_name(ctx, field) if err != nil { return graphql.Null } @@ -68314,7 +70554,7 @@ func (ec *executionContext) _Query_oracleSpecsConnection(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().OracleSpecsConnection(rctx, fc.Args["pagination"].(*v2.Pagination)) + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -68323,43 +70563,26 @@ func (ec *executionContext) _Query_oracleSpecsConnection(ctx context.Context, fi if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.OracleSpecsConnection) + res := resTmp.(*string) fc.Result = res - return ec.marshalOOracleSpecsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOracleSpecsConnection(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_oracleSpecsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PropertyKey_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PropertyKey", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_OracleSpecsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_OracleSpecsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OracleSpecsConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_oracleSpecsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_orderByID(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_orderByID(ctx, field) +func (ec *executionContext) _PropertyKey_type(ctx context.Context, field graphql.CollectedField, obj *PropertyKey) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PropertyKey_type(ctx, field) if err != nil { return graphql.Null } @@ -68372,7 +70595,7 @@ func (ec *executionContext) _Query_orderByID(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().OrderByID(rctx, fc.Args["id"].(string), fc.Args["version"].(*int)) + return obj.Type, nil }) if err != nil { ec.Error(ctx, err) @@ -68384,83 +70607,26 @@ func (ec *executionContext) _Query_orderByID(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(*vega.Order) + res := resTmp.(v13.PropertyKey_Type) fc.Result = res - return ec.marshalNOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, field.Selections, res) + return ec.marshalNPropertyKeyType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋdataᚋv1ᚐPropertyKey_Type(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_orderByID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PropertyKey_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PropertyKey", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Order_id(ctx, field) - case "price": - return ec.fieldContext_Order_price(ctx, field) - case "timeInForce": - return ec.fieldContext_Order_timeInForce(ctx, field) - case "side": - return ec.fieldContext_Order_side(ctx, field) - case "market": - return ec.fieldContext_Order_market(ctx, field) - case "size": - return ec.fieldContext_Order_size(ctx, field) - case "remaining": - return ec.fieldContext_Order_remaining(ctx, field) - case "party": - return ec.fieldContext_Order_party(ctx, field) - case "createdAt": - return ec.fieldContext_Order_createdAt(ctx, field) - case "expiresAt": - return ec.fieldContext_Order_expiresAt(ctx, field) - case "status": - return ec.fieldContext_Order_status(ctx, field) - case "reference": - return ec.fieldContext_Order_reference(ctx, field) - case "tradesConnection": - return ec.fieldContext_Order_tradesConnection(ctx, field) - case "type": - return ec.fieldContext_Order_type(ctx, field) - case "rejectionReason": - return ec.fieldContext_Order_rejectionReason(ctx, field) - case "version": - return ec.fieldContext_Order_version(ctx, field) - case "updatedAt": - return ec.fieldContext_Order_updatedAt(ctx, field) - case "peggedOrder": - return ec.fieldContext_Order_peggedOrder(ctx, field) - case "liquidityProvision": - return ec.fieldContext_Order_liquidityProvision(ctx, field) - case "postOnly": - return ec.fieldContext_Order_postOnly(ctx, field) - case "reduceOnly": - return ec.fieldContext_Order_reduceOnly(ctx, field) - case "icebergOrder": - return ec.fieldContext_Order_icebergOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Order", field.Name) + return nil, errors.New("field of type PropertyKeyType does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_orderByID_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_orderByReference(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_orderByReference(ctx, field) +func (ec *executionContext) _PropertyKey_numberDecimalPlaces(ctx context.Context, field graphql.CollectedField, obj *PropertyKey) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PropertyKey_numberDecimalPlaces(ctx, field) if err != nil { return graphql.Null } @@ -68473,95 +70639,35 @@ func (ec *executionContext) _Query_orderByReference(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().OrderByReference(rctx, fc.Args["reference"].(string)) + return obj.NumberDecimalPlaces, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Order) + res := resTmp.(*int) fc.Result = res - return ec.marshalNOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, field.Selections, res) + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_orderByReference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PropertyKey_numberDecimalPlaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PropertyKey", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Order_id(ctx, field) - case "price": - return ec.fieldContext_Order_price(ctx, field) - case "timeInForce": - return ec.fieldContext_Order_timeInForce(ctx, field) - case "side": - return ec.fieldContext_Order_side(ctx, field) - case "market": - return ec.fieldContext_Order_market(ctx, field) - case "size": - return ec.fieldContext_Order_size(ctx, field) - case "remaining": - return ec.fieldContext_Order_remaining(ctx, field) - case "party": - return ec.fieldContext_Order_party(ctx, field) - case "createdAt": - return ec.fieldContext_Order_createdAt(ctx, field) - case "expiresAt": - return ec.fieldContext_Order_expiresAt(ctx, field) - case "status": - return ec.fieldContext_Order_status(ctx, field) - case "reference": - return ec.fieldContext_Order_reference(ctx, field) - case "tradesConnection": - return ec.fieldContext_Order_tradesConnection(ctx, field) - case "type": - return ec.fieldContext_Order_type(ctx, field) - case "rejectionReason": - return ec.fieldContext_Order_rejectionReason(ctx, field) - case "version": - return ec.fieldContext_Order_version(ctx, field) - case "updatedAt": - return ec.fieldContext_Order_updatedAt(ctx, field) - case "peggedOrder": - return ec.fieldContext_Order_peggedOrder(ctx, field) - case "liquidityProvision": - return ec.fieldContext_Order_liquidityProvision(ctx, field) - case "postOnly": - return ec.fieldContext_Order_postOnly(ctx, field) - case "reduceOnly": - return ec.fieldContext_Order_reduceOnly(ctx, field) - case "icebergOrder": - return ec.fieldContext_Order_icebergOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Order", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_orderByReference_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_orderVersionsConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_orderVersionsConnection(ctx, field) +func (ec *executionContext) _Proposal_id(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_id(ctx, field) if err != nil { return graphql.Null } @@ -68574,7 +70680,7 @@ func (ec *executionContext) _Query_orderVersionsConnection(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().OrderVersionsConnection(rctx, fc.Args["orderId"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Proposal().ID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -68583,43 +70689,26 @@ func (ec *executionContext) _Query_orderVersionsConnection(ctx context.Context, if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.OrderConnection) + res := resTmp.(*string) fc.Result = res - return ec.marshalOOrderConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOrderConnection(ctx, field.Selections, res) + return ec.marshalOID2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_orderVersionsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_OrderConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_OrderConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OrderConnection", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_orderVersionsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_partiesConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_partiesConnection(ctx, field) +func (ec *executionContext) _Proposal_reference(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_reference(ctx, field) if err != nil { return graphql.Null } @@ -68632,52 +70721,38 @@ func (ec *executionContext) _Query_partiesConnection(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().PartiesConnection(rctx, fc.Args["id"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Proposal().Reference(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.PartyConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOPartyConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_partiesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_PartyConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_PartyConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PartyConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_partiesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_party(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_party(ctx, field) +func (ec *executionContext) _Proposal_party(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_party(ctx, field) if err != nil { return graphql.Null } @@ -68690,23 +70765,26 @@ func (ec *executionContext) _Query_party(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Party(rctx, fc.Args["id"].(string)) + return ec.resolvers.Proposal().Party(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.(*vega.Party) fc.Result = res - return ec.marshalOParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, @@ -68756,22 +70834,11 @@ func (ec *executionContext) fieldContext_Query_party(ctx context.Context, field return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_party_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_positions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_positions(ctx, field) +func (ec *executionContext) _Proposal_state(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_state(ctx, field) if err != nil { return graphql.Null } @@ -68784,52 +70851,38 @@ func (ec *executionContext) _Query_positions(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Positions(rctx, fc.Args["filter"].(*v2.PositionsFilter), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Proposal().State(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.PositionConnection) + res := resTmp.(vega.Proposal_State) fc.Result = res - return ec.marshalOPositionConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPositionConnection(ctx, field.Selections, res) + return ec.marshalNProposalState2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposal_State(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_positions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_PositionConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_PositionConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PositionConnection", field.Name) + return nil, errors.New("field of type ProposalState does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_positions_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_proposal(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_proposal(ctx, field) +func (ec *executionContext) _Proposal_datetime(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_datetime(ctx, field) if err != nil { return graphql.Null } @@ -68842,76 +70895,38 @@ func (ec *executionContext) _Query_proposal(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Proposal(rctx, fc.Args["id"].(*string), fc.Args["reference"].(*string)) + return ec.resolvers.Proposal().Datetime(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.GovernanceData) + res := resTmp.(int64) fc.Result = res - return ec.marshalOProposal2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐGovernanceData(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_proposal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_datetime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Proposal_id(ctx, field) - case "reference": - return ec.fieldContext_Proposal_reference(ctx, field) - case "party": - return ec.fieldContext_Proposal_party(ctx, field) - case "state": - return ec.fieldContext_Proposal_state(ctx, field) - case "datetime": - return ec.fieldContext_Proposal_datetime(ctx, field) - case "rationale": - return ec.fieldContext_Proposal_rationale(ctx, field) - case "terms": - return ec.fieldContext_Proposal_terms(ctx, field) - case "votes": - return ec.fieldContext_Proposal_votes(ctx, field) - case "rejectionReason": - return ec.fieldContext_Proposal_rejectionReason(ctx, field) - case "errorDetails": - return ec.fieldContext_Proposal_errorDetails(ctx, field) - case "requiredMajority": - return ec.fieldContext_Proposal_requiredMajority(ctx, field) - case "requiredParticipation": - return ec.fieldContext_Proposal_requiredParticipation(ctx, field) - case "requiredLpMajority": - return ec.fieldContext_Proposal_requiredLpMajority(ctx, field) - case "requiredLpParticipation": - return ec.fieldContext_Proposal_requiredLpParticipation(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Proposal", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_proposal_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_proposalsConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_proposalsConnection(ctx, field) +func (ec *executionContext) _Proposal_rationale(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_rationale(ctx, field) if err != nil { return graphql.Null } @@ -68924,52 +70939,44 @@ func (ec *executionContext) _Query_proposalsConnection(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().ProposalsConnection(rctx, fc.Args["proposalType"].(*v2.ListGovernanceDataRequest_Type), fc.Args["inState"].(*vega.Proposal_State), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Proposal().Rationale(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.GovernanceDataConnection) + res := resTmp.(*vega.ProposalRationale) fc.Result = res - return ec.marshalOProposalsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGovernanceDataConnection(ctx, field.Selections, res) + return ec.marshalNProposalRationale2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalRationale(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_proposalsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_rationale(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_ProposalsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_ProposalsConnection_pageInfo(ctx, field) + case "description": + return ec.fieldContext_ProposalRationale_description(ctx, field) + case "title": + return ec.fieldContext_ProposalRationale_title(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ProposalsConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ProposalRationale", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_proposalsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_protocolUpgradeStatus(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_protocolUpgradeStatus(ctx, field) +func (ec *executionContext) _Proposal_terms(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_terms(ctx, field) if err != nil { return graphql.Null } @@ -68982,39 +70989,48 @@ func (ec *executionContext) _Query_protocolUpgradeStatus(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().ProtocolUpgradeStatus(rctx) + return ec.resolvers.Proposal().Terms(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ProtocolUpgradeStatus) + res := resTmp.(*vega.ProposalTerms) fc.Result = res - return ec.marshalOProtocolUpgradeStatus2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProtocolUpgradeStatus(ctx, field.Selections, res) + return ec.marshalNProposalTerms2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalTerms(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_protocolUpgradeStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_terms(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "ready": - return ec.fieldContext_ProtocolUpgradeStatus_ready(ctx, field) + case "closingDatetime": + return ec.fieldContext_ProposalTerms_closingDatetime(ctx, field) + case "enactmentDatetime": + return ec.fieldContext_ProposalTerms_enactmentDatetime(ctx, field) + case "validationDatetime": + return ec.fieldContext_ProposalTerms_validationDatetime(ctx, field) + case "change": + return ec.fieldContext_ProposalTerms_change(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ProtocolUpgradeStatus", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ProposalTerms", field.Name) }, } return fc, nil } -func (ec *executionContext) _Query_protocolUpgradeProposals(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_protocolUpgradeProposals(ctx, field) +func (ec *executionContext) _Proposal_votes(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_votes(ctx, field) if err != nil { return graphql.Null } @@ -69027,52 +71043,44 @@ func (ec *executionContext) _Query_protocolUpgradeProposals(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().ProtocolUpgradeProposals(rctx, fc.Args["inState"].(*v1.ProtocolUpgradeProposalStatus), fc.Args["approvedBy"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Proposal().Votes(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.ProtocolUpgradeProposalConnection) + res := resTmp.(*ProposalVotes) fc.Result = res - return ec.marshalOProtocolUpgradeProposalConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐProtocolUpgradeProposalConnection(ctx, field.Selections, res) + return ec.marshalNProposalVotes2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVotes(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_protocolUpgradeProposals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_votes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_ProtocolUpgradeProposalConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_ProtocolUpgradeProposalConnection_pageInfo(ctx, field) + case "yes": + return ec.fieldContext_ProposalVotes_yes(ctx, field) + case "no": + return ec.fieldContext_ProposalVotes_no(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ProtocolUpgradeProposalConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ProposalVotes", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_protocolUpgradeProposals_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_referralSets(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_referralSets(ctx, field) +func (ec *executionContext) _Proposal_rejectionReason(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_rejectionReason(ctx, field) if err != nil { return graphql.Null } @@ -69085,55 +71093,35 @@ func (ec *executionContext) _Query_referralSets(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().ReferralSets(rctx, fc.Args["id"].(*string), fc.Args["referrer"].(*string), fc.Args["referee"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Proposal().RejectionReason(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v2.ReferralSetConnection) + res := resTmp.(*vega.ProposalError) fc.Result = res - return ec.marshalNReferralSetConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetConnection(ctx, field.Selections, res) + return ec.marshalOProposalRejectionReason2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalError(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_referralSets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_rejectionReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_ReferralSetConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_ReferralSetConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ReferralSetConnection", field.Name) + return nil, errors.New("field of type ProposalRejectionReason does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_referralSets_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_feesStats(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_feesStats(ctx, field) +func (ec *executionContext) _Proposal_errorDetails(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_errorDetails(ctx, field) if err != nil { return graphql.Null } @@ -69146,7 +71134,7 @@ func (ec *executionContext) _Query_feesStats(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().FeesStats(rctx, fc.Args["marketId"].(*string), fc.Args["assetId"].(*string), fc.Args["epoch"].(*int), fc.Args["partyId"].(*string)) + return ec.resolvers.Proposal().ErrorDetails(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -69155,57 +71143,26 @@ func (ec *executionContext) _Query_feesStats(ctx context.Context, field graphql. if resTmp == nil { return graphql.Null } - res := resTmp.(*v1.FeesStats) + res := resTmp.(*string) fc.Result = res - return ec.marshalOFeesStats2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFeesStats(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_feesStats(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_errorDetails(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "marketId": - return ec.fieldContext_FeesStats_marketId(ctx, field) - case "assetId": - return ec.fieldContext_FeesStats_assetId(ctx, field) - case "epoch": - return ec.fieldContext_FeesStats_epoch(ctx, field) - case "totalRewardsReceived": - return ec.fieldContext_FeesStats_totalRewardsReceived(ctx, field) - case "referrerRewardsGenerated": - return ec.fieldContext_FeesStats_referrerRewardsGenerated(ctx, field) - case "refereesDiscountApplied": - return ec.fieldContext_FeesStats_refereesDiscountApplied(ctx, field) - case "volumeDiscountApplied": - return ec.fieldContext_FeesStats_volumeDiscountApplied(ctx, field) - case "totalMakerFeesReceived": - return ec.fieldContext_FeesStats_totalMakerFeesReceived(ctx, field) - case "makerFeesGenerated": - return ec.fieldContext_FeesStats_makerFeesGenerated(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type FeesStats", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_feesStats_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_feesStatsForParty(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_feesStatsForParty(ctx, field) +func (ec *executionContext) _Proposal_requiredMajority(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_requiredMajority(ctx, field) if err != nil { return graphql.Null } @@ -69218,58 +71175,38 @@ func (ec *executionContext) _Query_feesStatsForParty(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().FeesStatsForParty(rctx, fc.Args["partyId"].(string), fc.Args["assetId"].(*string), fc.Args["fromEpoch"].(*int), fc.Args["toEpoch"].(*int)) + return ec.resolvers.Proposal().RequiredMajority(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.FeesStatsForParty) + res := resTmp.(string) fc.Result = res - return ec.marshalOFeesStatsForParty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFeesStatsForParty(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_feesStatsForParty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_requiredMajority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "assetId": - return ec.fieldContext_FeesStatsForParty_assetId(ctx, field) - case "totalRewardsReceived": - return ec.fieldContext_FeesStatsForParty_totalRewardsReceived(ctx, field) - case "refereesDiscountApplied": - return ec.fieldContext_FeesStatsForParty_refereesDiscountApplied(ctx, field) - case "volumeDiscountApplied": - return ec.fieldContext_FeesStatsForParty_volumeDiscountApplied(ctx, field) - case "totalMakerFeesReceived": - return ec.fieldContext_FeesStatsForParty_totalMakerFeesReceived(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type FeesStatsForParty", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_feesStatsForParty_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_referralSetReferees(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_referralSetReferees(ctx, field) +func (ec *executionContext) _Proposal_requiredParticipation(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_requiredParticipation(ctx, field) if err != nil { return graphql.Null } @@ -69282,7 +71219,7 @@ func (ec *executionContext) _Query_referralSetReferees(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().ReferralSetReferees(rctx, fc.Args["id"].(*string), fc.Args["referrer"].(*string), fc.Args["referee"].(*string), fc.Args["pagination"].(*v2.Pagination), fc.Args["aggregationEpochs"].(*int)) + return ec.resolvers.Proposal().RequiredParticipation(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -69294,43 +71231,26 @@ func (ec *executionContext) _Query_referralSetReferees(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(*v2.ReferralSetRefereeConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalNReferralSetRefereeConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetRefereeConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_referralSetReferees(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_requiredParticipation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_ReferralSetRefereeConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_ReferralSetRefereeConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ReferralSetRefereeConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_referralSetReferees_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_referralSetStats(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_referralSetStats(ctx, field) +func (ec *executionContext) _Proposal_requiredLpMajority(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_requiredLpMajority(ctx, field) if err != nil { return graphql.Null } @@ -69343,55 +71263,35 @@ func (ec *executionContext) _Query_referralSetStats(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().ReferralSetStats(rctx, fc.Args["setId"].(*string), fc.Args["epoch"].(*int), fc.Args["partyId"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Proposal().RequiredLpMajority(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v2.ReferralSetStatsConnection) + res := resTmp.(*string) fc.Result = res - return ec.marshalNReferralSetStatsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetStatsConnection(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_referralSetStats(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_requiredLpMajority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_ReferralSetStatsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_ReferralSetStatsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ReferralSetStatsConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_referralSetStats_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_statistics(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_statistics(ctx, field) +func (ec *executionContext) _Proposal_requiredLpParticipation(ctx context.Context, field graphql.CollectedField, obj *vega.GovernanceData) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Proposal_requiredLpParticipation(ctx, field) if err != nil { return graphql.Null } @@ -69404,94 +71304,35 @@ func (ec *executionContext) _Query_statistics(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Statistics(rctx) + return ec.resolvers.Proposal().RequiredLpParticipation(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v12.Statistics) + res := resTmp.(*string) fc.Result = res - return ec.marshalNStatistics2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋapiᚋv1ᚐStatistics(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_statistics(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Proposal_requiredLpParticipation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Proposal", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "blockHeight": - return ec.fieldContext_Statistics_blockHeight(ctx, field) - case "blockHash": - return ec.fieldContext_Statistics_blockHash(ctx, field) - case "backlogLength": - return ec.fieldContext_Statistics_backlogLength(ctx, field) - case "totalPeers": - return ec.fieldContext_Statistics_totalPeers(ctx, field) - case "genesisTime": - return ec.fieldContext_Statistics_genesisTime(ctx, field) - case "currentTime": - return ec.fieldContext_Statistics_currentTime(ctx, field) - case "upTime": - return ec.fieldContext_Statistics_upTime(ctx, field) - case "vegaTime": - return ec.fieldContext_Statistics_vegaTime(ctx, field) - case "status": - return ec.fieldContext_Statistics_status(ctx, field) - case "txPerBlock": - return ec.fieldContext_Statistics_txPerBlock(ctx, field) - case "averageTxBytes": - return ec.fieldContext_Statistics_averageTxBytes(ctx, field) - case "averageOrdersPerBlock": - return ec.fieldContext_Statistics_averageOrdersPerBlock(ctx, field) - case "tradesPerSecond": - return ec.fieldContext_Statistics_tradesPerSecond(ctx, field) - case "ordersPerSecond": - return ec.fieldContext_Statistics_ordersPerSecond(ctx, field) - case "totalMarkets": - return ec.fieldContext_Statistics_totalMarkets(ctx, field) - case "totalAmendOrder": - return ec.fieldContext_Statistics_totalAmendOrder(ctx, field) - case "totalCancelOrder": - return ec.fieldContext_Statistics_totalCancelOrder(ctx, field) - case "totalCreateOrder": - return ec.fieldContext_Statistics_totalCreateOrder(ctx, field) - case "totalOrders": - return ec.fieldContext_Statistics_totalOrders(ctx, field) - case "totalTrades": - return ec.fieldContext_Statistics_totalTrades(ctx, field) - case "eventCount": - return ec.fieldContext_Statistics_eventCount(ctx, field) - case "eventsPerSecond": - return ec.fieldContext_Statistics_eventsPerSecond(ctx, field) - case "appVersionHash": - return ec.fieldContext_Statistics_appVersionHash(ctx, field) - case "appVersion": - return ec.fieldContext_Statistics_appVersion(ctx, field) - case "chainVersion": - return ec.fieldContext_Statistics_chainVersion(ctx, field) - case "blockDuration": - return ec.fieldContext_Statistics_blockDuration(ctx, field) - case "chainId": - return ec.fieldContext_Statistics_chainId(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Statistics", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Query_stopOrder(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_stopOrder(ctx, field) +func (ec *executionContext) _ProposalDetail_id(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_id(ctx, field) if err != nil { return graphql.Null } @@ -69504,7 +71345,7 @@ func (ec *executionContext) _Query_stopOrder(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().StopOrder(rctx, fc.Args["id"].(string)) + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) @@ -69513,67 +71354,26 @@ func (ec *executionContext) _Query_stopOrder(ctx context.Context, field graphql. if resTmp == nil { return graphql.Null } - res := resTmp.(*v1.StopOrderEvent) + res := resTmp.(string) fc.Result = res - return ec.marshalOStopOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐStopOrderEvent(ctx, field.Selections, res) + return ec.marshalOID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_stopOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_StopOrder_id(ctx, field) - case "ocoLinkId": - return ec.fieldContext_StopOrder_ocoLinkId(ctx, field) - case "expiresAt": - return ec.fieldContext_StopOrder_expiresAt(ctx, field) - case "expiryStrategy": - return ec.fieldContext_StopOrder_expiryStrategy(ctx, field) - case "triggerDirection": - return ec.fieldContext_StopOrder_triggerDirection(ctx, field) - case "status": - return ec.fieldContext_StopOrder_status(ctx, field) - case "createdAt": - return ec.fieldContext_StopOrder_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_StopOrder_updatedAt(ctx, field) - case "partyId": - return ec.fieldContext_StopOrder_partyId(ctx, field) - case "marketId": - return ec.fieldContext_StopOrder_marketId(ctx, field) - case "trigger": - return ec.fieldContext_StopOrder_trigger(ctx, field) - case "submission": - return ec.fieldContext_StopOrder_submission(ctx, field) - case "order": - return ec.fieldContext_StopOrder_order(ctx, field) - case "rejectionReason": - return ec.fieldContext_StopOrder_rejectionReason(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type StopOrder", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_stopOrder_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_stopOrders(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_stopOrders(ctx, field) +func (ec *executionContext) _ProposalDetail_batchId(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_batchId(ctx, field) if err != nil { return graphql.Null } @@ -69586,7 +71386,7 @@ func (ec *executionContext) _Query_stopOrders(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().StopOrders(rctx, fc.Args["filter"].(*v2.StopOrderFilter), fc.Args["pagination"].(*v2.Pagination)) + return obj.BatchId, nil }) if err != nil { ec.Error(ctx, err) @@ -69595,43 +71395,26 @@ func (ec *executionContext) _Query_stopOrders(ctx context.Context, field graphql if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.StopOrderConnection) + res := resTmp.(*string) fc.Result = res - return ec.marshalOStopOrderConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐStopOrderConnection(ctx, field.Selections, res) + return ec.marshalOID2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_stopOrders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_batchId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_StopOrderConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_StopOrderConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type StopOrderConnection", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_stopOrders_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_successorMarkets(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_successorMarkets(ctx, field) +func (ec *executionContext) _ProposalDetail_reference(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_reference(ctx, field) if err != nil { return graphql.Null } @@ -69644,52 +71427,38 @@ func (ec *executionContext) _Query_successorMarkets(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().SuccessorMarkets(rctx, fc.Args["marketId"].(string), fc.Args["fullHistory"].(*bool), fc.Args["pagination"].(*v2.Pagination)) + return obj.Reference, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.SuccessorMarketConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOSuccessorMarketConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐSuccessorMarketConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_successorMarkets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_reference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_SuccessorMarketConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_SuccessorMarketConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SuccessorMarketConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_successorMarkets_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_teams(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_teams(ctx, field) +func (ec *executionContext) _ProposalDetail_party(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_party(ctx, field) if err != nil { return graphql.Null } @@ -69702,52 +71471,80 @@ func (ec *executionContext) _Query_teams(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Teams(rctx, fc.Args["teamId"].(*string), fc.Args["partyId"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.ProposalDetail().Party(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.TeamConnection) + res := resTmp.(*vega.Party) fc.Result = res - return ec.marshalOTeamConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamConnection(ctx, field.Selections, res) + return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_teams(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_TeamConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_TeamConnection_pageInfo(ctx, field) + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type TeamConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_teams_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_teamReferees(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_teamReferees(ctx, field) +func (ec *executionContext) _ProposalDetail_state(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_state(ctx, field) if err != nil { return graphql.Null } @@ -69760,52 +71557,38 @@ func (ec *executionContext) _Query_teamReferees(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().TeamReferees(rctx, fc.Args["teamId"].(string), fc.Args["pagination"].(*v2.Pagination)) + return obj.State, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.TeamRefereeConnection) + res := resTmp.(vega.Proposal_State) fc.Result = res - return ec.marshalOTeamRefereeConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeConnection(ctx, field.Selections, res) + return ec.marshalNProposalState2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposal_State(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_teamReferees(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_TeamRefereeConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_TeamRefereeConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TeamRefereeConnection", field.Name) + return nil, errors.New("field of type ProposalState does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_teamReferees_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_teamRefereeHistory(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_teamRefereeHistory(ctx, field) +func (ec *executionContext) _ProposalDetail_datetime(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_datetime(ctx, field) if err != nil { return graphql.Null } @@ -69818,52 +71601,38 @@ func (ec *executionContext) _Query_teamRefereeHistory(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().TeamRefereeHistory(rctx, fc.Args["referee"].(string), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.ProposalDetail().Datetime(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.TeamRefereeHistoryConnection) + res := resTmp.(int64) fc.Result = res - return ec.marshalOTeamRefereeHistoryConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistoryConnection(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_teamRefereeHistory(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_datetime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_TeamRefereeHistoryConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_TeamRefereeHistoryConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TeamRefereeHistoryConnection", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_teamRefereeHistory_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_trades(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_trades(ctx, field) +func (ec *executionContext) _ProposalDetail_terms(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_terms(ctx, field) if err != nil { return graphql.Null } @@ -69876,7 +71645,7 @@ func (ec *executionContext) _Query_trades(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Trades(rctx, fc.Args["filter"].(*TradesFilter), fc.Args["pagination"].(*v2.Pagination), fc.Args["dateRange"].(*v2.DateRange)) + return obj.Terms, nil }) if err != nil { ec.Error(ctx, err) @@ -69885,43 +71654,36 @@ func (ec *executionContext) _Query_trades(ctx context.Context, field graphql.Col if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.TradeConnection) + res := resTmp.(*vega.ProposalTerms) fc.Result = res - return ec.marshalOTradeConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTradeConnection(ctx, field.Selections, res) + return ec.marshalOProposalTerms2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalTerms(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_trades(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_terms(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_TradeConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_TradeConnection_pageInfo(ctx, field) + case "closingDatetime": + return ec.fieldContext_ProposalTerms_closingDatetime(ctx, field) + case "enactmentDatetime": + return ec.fieldContext_ProposalTerms_enactmentDatetime(ctx, field) + case "validationDatetime": + return ec.fieldContext_ProposalTerms_validationDatetime(ctx, field) + case "change": + return ec.fieldContext_ProposalTerms_change(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type TradeConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ProposalTerms", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_trades_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_transfersConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_transfersConnection(ctx, field) +func (ec *executionContext) _ProposalDetail_batchTerms(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_batchTerms(ctx, field) if err != nil { return graphql.Null } @@ -69934,7 +71696,7 @@ func (ec *executionContext) _Query_transfersConnection(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().TransfersConnection(rctx, fc.Args["partyId"].(*string), fc.Args["direction"].(*TransferDirection), fc.Args["pagination"].(*v2.Pagination), fc.Args["isReward"].(*bool)) + return obj.BatchTerms, nil }) if err != nil { ec.Error(ctx, err) @@ -69943,43 +71705,32 @@ func (ec *executionContext) _Query_transfersConnection(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.TransferConnection) + res := resTmp.(*vega.BatchProposalTerms) fc.Result = res - return ec.marshalOTransferConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTransferConnection(ctx, field.Selections, res) + return ec.marshalOBatchProposalTerms2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐBatchProposalTerms(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_transfersConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_batchTerms(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_TransferConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_TransferConnection_pageInfo(ctx, field) + case "closingDatetime": + return ec.fieldContext_BatchProposalTerms_closingDatetime(ctx, field) + case "changes": + return ec.fieldContext_BatchProposalTerms_changes(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type TransferConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type BatchProposalTerms", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_transfersConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_transfer(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_transfer(ctx, field) +func (ec *executionContext) _ProposalDetail_rationale(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_rationale(ctx, field) if err != nil { return graphql.Null } @@ -69992,72 +71743,44 @@ func (ec *executionContext) _Query_transfer(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Transfer(rctx, fc.Args["id"].(string)) + return obj.Rationale, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v1.Transfer) + res := resTmp.(*vega.ProposalRationale) fc.Result = res - return ec.marshalOTransfer2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐTransfer(ctx, field.Selections, res) + return ec.marshalNProposalRationale2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalRationale(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_transfer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_rationale(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Transfer_id(ctx, field) - case "from": - return ec.fieldContext_Transfer_from(ctx, field) - case "fromAccountType": - return ec.fieldContext_Transfer_fromAccountType(ctx, field) - case "to": - return ec.fieldContext_Transfer_to(ctx, field) - case "toAccountType": - return ec.fieldContext_Transfer_toAccountType(ctx, field) - case "asset": - return ec.fieldContext_Transfer_asset(ctx, field) - case "amount": - return ec.fieldContext_Transfer_amount(ctx, field) - case "reference": - return ec.fieldContext_Transfer_reference(ctx, field) - case "status": - return ec.fieldContext_Transfer_status(ctx, field) - case "timestamp": - return ec.fieldContext_Transfer_timestamp(ctx, field) - case "kind": - return ec.fieldContext_Transfer_kind(ctx, field) - case "reason": - return ec.fieldContext_Transfer_reason(ctx, field) + case "description": + return ec.fieldContext_ProposalRationale_description(ctx, field) + case "title": + return ec.fieldContext_ProposalRationale_title(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Transfer", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ProposalRationale", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_transfer_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_volumeDiscountStats(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_volumeDiscountStats(ctx, field) +func (ec *executionContext) _ProposalDetail_rejectionReason(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_rejectionReason(ctx, field) if err != nil { return graphql.Null } @@ -70070,55 +71793,35 @@ func (ec *executionContext) _Query_volumeDiscountStats(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().VolumeDiscountStats(rctx, fc.Args["epoch"].(*int), fc.Args["partyId"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.ProposalDetail().RejectionReason(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v2.VolumeDiscountStatsConnection) + res := resTmp.(*vega.ProposalError) fc.Result = res - return ec.marshalNVolumeDiscountStatsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐVolumeDiscountStatsConnection(ctx, field.Selections, res) + return ec.marshalOProposalRejectionReason2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalError(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_volumeDiscountStats(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_rejectionReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_VolumeDiscountStatsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_VolumeDiscountStatsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type VolumeDiscountStatsConnection", field.Name) + return nil, errors.New("field of type ProposalRejectionReason does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_volumeDiscountStats_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_withdrawal(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_withdrawal(ctx, field) +func (ec *executionContext) _ProposalDetail_errorDetails(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_errorDetails(ctx, field) if err != nil { return graphql.Null } @@ -70131,7 +71834,7 @@ func (ec *executionContext) _Query_withdrawal(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Withdrawal(rctx, fc.Args["id"].(string)) + return obj.ErrorDetails, nil }) if err != nil { ec.Error(ctx, err) @@ -70140,59 +71843,26 @@ func (ec *executionContext) _Query_withdrawal(ctx context.Context, field graphql if resTmp == nil { return graphql.Null } - res := resTmp.(*vega.Withdrawal) + res := resTmp.(*string) fc.Result = res - return ec.marshalOWithdrawal2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐWithdrawal(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_withdrawal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_errorDetails(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Withdrawal_id(ctx, field) - case "party": - return ec.fieldContext_Withdrawal_party(ctx, field) - case "amount": - return ec.fieldContext_Withdrawal_amount(ctx, field) - case "asset": - return ec.fieldContext_Withdrawal_asset(ctx, field) - case "status": - return ec.fieldContext_Withdrawal_status(ctx, field) - case "ref": - return ec.fieldContext_Withdrawal_ref(ctx, field) - case "createdTimestamp": - return ec.fieldContext_Withdrawal_createdTimestamp(ctx, field) - case "withdrawnTimestamp": - return ec.fieldContext_Withdrawal_withdrawnTimestamp(ctx, field) - case "txHash": - return ec.fieldContext_Withdrawal_txHash(ctx, field) - case "details": - return ec.fieldContext_Withdrawal_details(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Withdrawal", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_withdrawal_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_withdrawals(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_withdrawals(ctx, field) +func (ec *executionContext) _ProposalDetail_requiredMajority(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_requiredMajority(ctx, field) if err != nil { return graphql.Null } @@ -70205,52 +71875,38 @@ func (ec *executionContext) _Query_withdrawals(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Withdrawals(rctx, fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) + return obj.RequiredMajority, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.WithdrawalsConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOWithdrawalsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐWithdrawalsConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_withdrawals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_requiredMajority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_WithdrawalsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_WithdrawalsConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type WithdrawalsConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_withdrawals_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query_paidLiquidityFees(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_paidLiquidityFees(ctx, field) +func (ec *executionContext) _ProposalDetail_requiredParticipation(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_requiredParticipation(ctx, field) if err != nil { return graphql.Null } @@ -70263,52 +71919,38 @@ func (ec *executionContext) _Query_paidLiquidityFees(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().PaidLiquidityFees(rctx, fc.Args["marketId"].(*string), fc.Args["assetId"].(*string), fc.Args["epoch"].(*int), fc.Args["partyIDs"].([]string)) + return obj.RequiredParticipation, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.PaidLiquidityFeesConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalOPaidLiquidityFeesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPaidLiquidityFeesConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_paidLiquidityFees(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_requiredParticipation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_PaidLiquidityFeesConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_PaidLiquidityFeesConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PaidLiquidityFeesConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_paidLiquidityFees_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query___type(ctx, field) +func (ec *executionContext) _ProposalDetail_requiredLpMajority(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_requiredLpMajority(ctx, field) if err != nil { return graphql.Null } @@ -70321,7 +71963,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.introspectType(fc.Args["name"].(string)) + return ec.resolvers.ProposalDetail().RequiredLpMajority(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -70330,59 +71972,26 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col if resTmp == nil { return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(*string) fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_requiredLpMajority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, IsMethod: true, - IsResolver: false, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query___schema(ctx, field) +func (ec *executionContext) _ProposalDetail_requiredLpParticipation(ctx context.Context, field graphql.CollectedField, obj *vega.Proposal) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalDetail_requiredLpParticipation(ctx, field) if err != nil { return graphql.Null } @@ -70395,7 +72004,7 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.introspectSchema() + return ec.resolvers.ProposalDetail().RequiredLpParticipation(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -70404,40 +72013,26 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C if resTmp == nil { return graphql.Null } - res := resTmp.(*introspection.Schema) + res := resTmp.(*string) fc.Result = res - return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalDetail_requiredLpParticipation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ProposalDetail", Field: field, IsMethod: true, - IsResolver: false, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "description": - return ec.fieldContext___Schema_description(ctx, field) - case "types": - return ec.fieldContext___Schema_types(ctx, field) - case "queryType": - return ec.fieldContext___Schema_queryType(ctx, field) - case "mutationType": - return ec.fieldContext___Schema_mutationType(ctx, field) - case "subscriptionType": - return ec.fieldContext___Schema_subscriptionType(ctx, field) - case "directives": - return ec.fieldContext___Schema_directives(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _RankTable_startRank(ctx context.Context, field graphql.CollectedField, obj *vega.Rank) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RankTable_startRank(ctx, field) +func (ec *executionContext) _ProposalEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.GovernanceDataEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -70450,7 +72045,7 @@ func (ec *executionContext) _RankTable_startRank(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.StartRank, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -70462,26 +72057,56 @@ func (ec *executionContext) _RankTable_startRank(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(uint32) + res := resTmp.(*vega.GovernanceData) fc.Result = res - return ec.marshalNInt2uint32(ctx, field.Selections, res) + return ec.marshalNProposal2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐGovernanceData(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RankTable_startRank(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RankTable", + Object: "ProposalEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Proposal_id(ctx, field) + case "reference": + return ec.fieldContext_Proposal_reference(ctx, field) + case "party": + return ec.fieldContext_Proposal_party(ctx, field) + case "state": + return ec.fieldContext_Proposal_state(ctx, field) + case "datetime": + return ec.fieldContext_Proposal_datetime(ctx, field) + case "rationale": + return ec.fieldContext_Proposal_rationale(ctx, field) + case "terms": + return ec.fieldContext_Proposal_terms(ctx, field) + case "votes": + return ec.fieldContext_Proposal_votes(ctx, field) + case "rejectionReason": + return ec.fieldContext_Proposal_rejectionReason(ctx, field) + case "errorDetails": + return ec.fieldContext_Proposal_errorDetails(ctx, field) + case "requiredMajority": + return ec.fieldContext_Proposal_requiredMajority(ctx, field) + case "requiredParticipation": + return ec.fieldContext_Proposal_requiredParticipation(ctx, field) + case "requiredLpMajority": + return ec.fieldContext_Proposal_requiredLpMajority(ctx, field) + case "requiredLpParticipation": + return ec.fieldContext_Proposal_requiredLpParticipation(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Proposal", field.Name) }, } return fc, nil } -func (ec *executionContext) _RankTable_shareRatio(ctx context.Context, field graphql.CollectedField, obj *vega.Rank) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RankTable_shareRatio(ctx, field) +func (ec *executionContext) _ProposalEdge_proposalNode(ctx context.Context, field graphql.CollectedField, obj *v2.GovernanceDataEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalEdge_proposalNode(ctx, field) if err != nil { return graphql.Null } @@ -70494,38 +72119,35 @@ func (ec *executionContext) _RankTable_shareRatio(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ShareRatio, nil + return ec.resolvers.ProposalEdge().ProposalNode(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(uint32) + res := resTmp.(ProposalNode) fc.Result = res - return ec.marshalNInt2uint32(ctx, field.Selections, res) + return ec.marshalOProposalNode2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalNode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RankTable_shareRatio(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalEdge_proposalNode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RankTable", + Object: "ProposalEdge", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type ProposalNode does not have child fields") }, } return fc, nil } -func (ec *executionContext) _RankingScore_status(ctx context.Context, field graphql.CollectedField, obj *vega.RankingScore) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RankingScore_status(ctx, field) +func (ec *executionContext) _ProposalEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.GovernanceDataEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -70538,7 +72160,7 @@ func (ec *executionContext) _RankingScore_status(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -70550,26 +72172,26 @@ func (ec *executionContext) _RankingScore_status(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(vega.ValidatorNodeStatus) + res := resTmp.(string) fc.Result = res - return ec.marshalNValidatorStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐValidatorNodeStatus(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RankingScore_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RankingScore", + Object: "ProposalEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ValidatorStatus does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _RankingScore_previousStatus(ctx context.Context, field graphql.CollectedField, obj *vega.RankingScore) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RankingScore_previousStatus(ctx, field) +func (ec *executionContext) _ProposalRationale_description(ctx context.Context, field graphql.CollectedField, obj *vega.ProposalRationale) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalRationale_description(ctx, field) if err != nil { return graphql.Null } @@ -70582,7 +72204,7 @@ func (ec *executionContext) _RankingScore_previousStatus(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PreviousStatus, nil + return obj.Description, nil }) if err != nil { ec.Error(ctx, err) @@ -70594,26 +72216,26 @@ func (ec *executionContext) _RankingScore_previousStatus(ctx context.Context, fi } return graphql.Null } - res := resTmp.(vega.ValidatorNodeStatus) + res := resTmp.(string) fc.Result = res - return ec.marshalNValidatorStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐValidatorNodeStatus(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RankingScore_previousStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalRationale_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RankingScore", + Object: "ProposalRationale", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ValidatorStatus does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _RankingScore_rankingScore(ctx context.Context, field graphql.CollectedField, obj *vega.RankingScore) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RankingScore_rankingScore(ctx, field) +func (ec *executionContext) _ProposalRationale_title(ctx context.Context, field graphql.CollectedField, obj *vega.ProposalRationale) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalRationale_title(ctx, field) if err != nil { return graphql.Null } @@ -70626,7 +72248,7 @@ func (ec *executionContext) _RankingScore_rankingScore(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RankingScore, nil + return obj.Title, nil }) if err != nil { ec.Error(ctx, err) @@ -70643,9 +72265,9 @@ func (ec *executionContext) _RankingScore_rankingScore(ctx context.Context, fiel return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RankingScore_rankingScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalRationale_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RankingScore", + Object: "ProposalRationale", Field: field, IsMethod: false, IsResolver: false, @@ -70656,8 +72278,8 @@ func (ec *executionContext) fieldContext_RankingScore_rankingScore(ctx context.C return fc, nil } -func (ec *executionContext) _RankingScore_stakeScore(ctx context.Context, field graphql.CollectedField, obj *vega.RankingScore) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RankingScore_stakeScore(ctx, field) +func (ec *executionContext) _ProposalTerms_closingDatetime(ctx context.Context, field graphql.CollectedField, obj *vega.ProposalTerms) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalTerms_closingDatetime(ctx, field) if err != nil { return graphql.Null } @@ -70670,7 +72292,7 @@ func (ec *executionContext) _RankingScore_stakeScore(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.StakeScore, nil + return ec.resolvers.ProposalTerms().ClosingDatetime(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -70682,26 +72304,26 @@ func (ec *executionContext) _RankingScore_stakeScore(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RankingScore_stakeScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalTerms_closingDatetime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RankingScore", + Object: "ProposalTerms", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _RankingScore_performanceScore(ctx context.Context, field graphql.CollectedField, obj *vega.RankingScore) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RankingScore_performanceScore(ctx, field) +func (ec *executionContext) _ProposalTerms_enactmentDatetime(ctx context.Context, field graphql.CollectedField, obj *vega.ProposalTerms) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalTerms_enactmentDatetime(ctx, field) if err != nil { return graphql.Null } @@ -70714,38 +72336,35 @@ func (ec *executionContext) _RankingScore_performanceScore(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PerformanceScore, nil + return ec.resolvers.ProposalTerms().EnactmentDatetime(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RankingScore_performanceScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalTerms_enactmentDatetime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RankingScore", + Object: "ProposalTerms", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _RankingScore_votingPower(ctx context.Context, field graphql.CollectedField, obj *vega.RankingScore) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RankingScore_votingPower(ctx, field) +func (ec *executionContext) _ProposalTerms_validationDatetime(ctx context.Context, field graphql.CollectedField, obj *vega.ProposalTerms) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalTerms_validationDatetime(ctx, field) if err != nil { return graphql.Null } @@ -70758,38 +72377,35 @@ func (ec *executionContext) _RankingScore_votingPower(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.RankingScore().VotingPower(rctx, obj) + return ec.resolvers.ProposalTerms().ValidationDatetime(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RankingScore_votingPower(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalTerms_validationDatetime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RankingScore", + Object: "ProposalTerms", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _RecurringGovernanceTransfer_startEpoch(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringGovernanceTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RecurringGovernanceTransfer_startEpoch(ctx, field) +func (ec *executionContext) _ProposalTerms_change(ctx context.Context, field graphql.CollectedField, obj *vega.ProposalTerms) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalTerms_change(ctx, field) if err != nil { return graphql.Null } @@ -70802,7 +72418,7 @@ func (ec *executionContext) _RecurringGovernanceTransfer_startEpoch(ctx context. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.RecurringGovernanceTransfer().StartEpoch(rctx, obj) + return ec.resolvers.ProposalTerms().Change(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -70814,26 +72430,26 @@ func (ec *executionContext) _RecurringGovernanceTransfer_startEpoch(ctx context. } return graphql.Null } - res := resTmp.(int) + res := resTmp.(ProposalChange) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNProposalChange2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalChange(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RecurringGovernanceTransfer_startEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalTerms_change(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RecurringGovernanceTransfer", + Object: "ProposalTerms", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type ProposalChange does not have child fields") }, } return fc, nil } -func (ec *executionContext) _RecurringGovernanceTransfer_endEpoch(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringGovernanceTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RecurringGovernanceTransfer_endEpoch(ctx, field) +func (ec *executionContext) _ProposalVote_vote(ctx context.Context, field graphql.CollectedField, obj *ProposalVote) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalVote_vote(ctx, field) if err != nil { return graphql.Null } @@ -70846,35 +72462,54 @@ func (ec *executionContext) _RecurringGovernanceTransfer_endEpoch(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.RecurringGovernanceTransfer().EndEpoch(rctx, obj) + return obj.Vote, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*int) + res := resTmp.(*vega.Vote) fc.Result = res - return ec.marshalOInt2ᚖint(ctx, field.Selections, res) + return ec.marshalNVote2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐVote(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RecurringGovernanceTransfer_endEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalVote_vote(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RecurringGovernanceTransfer", + Object: "ProposalVote", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "value": + return ec.fieldContext_Vote_value(ctx, field) + case "party": + return ec.fieldContext_Vote_party(ctx, field) + case "datetime": + return ec.fieldContext_Vote_datetime(ctx, field) + case "proposalId": + return ec.fieldContext_Vote_proposalId(ctx, field) + case "governanceTokenBalance": + return ec.fieldContext_Vote_governanceTokenBalance(ctx, field) + case "governanceTokenWeight": + return ec.fieldContext_Vote_governanceTokenWeight(ctx, field) + case "equityLikeShareWeight": + return ec.fieldContext_Vote_equityLikeShareWeight(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Vote", field.Name) }, } return fc, nil } -func (ec *executionContext) _RecurringGovernanceTransfer_dispatchStrategy(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringGovernanceTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RecurringGovernanceTransfer_dispatchStrategy(ctx, field) +func (ec *executionContext) _ProposalVote_proposalId(ctx context.Context, field graphql.CollectedField, obj *ProposalVote) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalVote_proposalId(ctx, field) if err != nil { return graphql.Null } @@ -70887,63 +72522,38 @@ func (ec *executionContext) _RecurringGovernanceTransfer_dispatchStrategy(ctx co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DispatchStrategy, nil + return obj.ProposalID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.DispatchStrategy) + res := resTmp.(string) fc.Result = res - return ec.marshalODispatchStrategy2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDispatchStrategy(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RecurringGovernanceTransfer_dispatchStrategy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalVote_proposalId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RecurringGovernanceTransfer", + Object: "ProposalVote", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "dispatchMetric": - return ec.fieldContext_DispatchStrategy_dispatchMetric(ctx, field) - case "dispatchMetricAssetId": - return ec.fieldContext_DispatchStrategy_dispatchMetricAssetId(ctx, field) - case "marketIdsInScope": - return ec.fieldContext_DispatchStrategy_marketIdsInScope(ctx, field) - case "entityScope": - return ec.fieldContext_DispatchStrategy_entityScope(ctx, field) - case "individualScope": - return ec.fieldContext_DispatchStrategy_individualScope(ctx, field) - case "teamScope": - return ec.fieldContext_DispatchStrategy_teamScope(ctx, field) - case "nTopPerformers": - return ec.fieldContext_DispatchStrategy_nTopPerformers(ctx, field) - case "stakingRequirement": - return ec.fieldContext_DispatchStrategy_stakingRequirement(ctx, field) - case "notionalTimeWeightedAveragePositionRequirement": - return ec.fieldContext_DispatchStrategy_notionalTimeWeightedAveragePositionRequirement(ctx, field) - case "windowLength": - return ec.fieldContext_DispatchStrategy_windowLength(ctx, field) - case "lockPeriod": - return ec.fieldContext_DispatchStrategy_lockPeriod(ctx, field) - case "distributionStrategy": - return ec.fieldContext_DispatchStrategy_distributionStrategy(ctx, field) - case "rankTable": - return ec.fieldContext_DispatchStrategy_rankTable(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DispatchStrategy", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _RecurringTransfer_startEpoch(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RecurringTransfer_startEpoch(ctx, field) +func (ec *executionContext) _ProposalVoteConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalVoteConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -70956,38 +72566,41 @@ func (ec *executionContext) _RecurringTransfer_startEpoch(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.RecurringTransfer().StartEpoch(rctx, obj) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.([]*ProposalVoteEdge) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOProposalVoteEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVoteEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RecurringTransfer_startEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalVoteConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RecurringTransfer", + Object: "ProposalVoteConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_ProposalVoteEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_ProposalVoteEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProposalVoteEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _RecurringTransfer_endEpoch(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RecurringTransfer_endEpoch(ctx, field) +func (ec *executionContext) _ProposalVoteConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalVoteConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -71000,7 +72613,7 @@ func (ec *executionContext) _RecurringTransfer_endEpoch(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.RecurringTransfer().EndEpoch(rctx, obj) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -71009,26 +72622,36 @@ func (ec *executionContext) _RecurringTransfer_endEpoch(ctx context.Context, fie if resTmp == nil { return graphql.Null } - res := resTmp.(*int) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalOInt2ᚖint(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RecurringTransfer_endEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalVoteConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RecurringTransfer", + Object: "ProposalVoteConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _RecurringTransfer_factor(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RecurringTransfer_factor(ctx, field) +func (ec *executionContext) _ProposalVoteEdge_node(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalVoteEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -71041,7 +72664,7 @@ func (ec *executionContext) _RecurringTransfer_factor(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Factor, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -71053,26 +72676,32 @@ func (ec *executionContext) _RecurringTransfer_factor(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*ProposalVote) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNProposalVote2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVote(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RecurringTransfer_factor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalVoteEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RecurringTransfer", + Object: "ProposalVoteEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "vote": + return ec.fieldContext_ProposalVote_vote(ctx, field) + case "proposalId": + return ec.fieldContext_ProposalVote_proposalId(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProposalVote", field.Name) }, } return fc, nil } -func (ec *executionContext) _RecurringTransfer_dispatchStrategy(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringTransfer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RecurringTransfer_dispatchStrategy(ctx, field) +func (ec *executionContext) _ProposalVoteEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalVoteEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -71085,7 +72714,7 @@ func (ec *executionContext) _RecurringTransfer_dispatchStrategy(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DispatchStrategy, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -71094,54 +72723,26 @@ func (ec *executionContext) _RecurringTransfer_dispatchStrategy(ctx context.Cont if resTmp == nil { return graphql.Null } - res := resTmp.(*vega.DispatchStrategy) + res := resTmp.(*string) fc.Result = res - return ec.marshalODispatchStrategy2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDispatchStrategy(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RecurringTransfer_dispatchStrategy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalVoteEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RecurringTransfer", + Object: "ProposalVoteEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "dispatchMetric": - return ec.fieldContext_DispatchStrategy_dispatchMetric(ctx, field) - case "dispatchMetricAssetId": - return ec.fieldContext_DispatchStrategy_dispatchMetricAssetId(ctx, field) - case "marketIdsInScope": - return ec.fieldContext_DispatchStrategy_marketIdsInScope(ctx, field) - case "entityScope": - return ec.fieldContext_DispatchStrategy_entityScope(ctx, field) - case "individualScope": - return ec.fieldContext_DispatchStrategy_individualScope(ctx, field) - case "teamScope": - return ec.fieldContext_DispatchStrategy_teamScope(ctx, field) - case "nTopPerformers": - return ec.fieldContext_DispatchStrategy_nTopPerformers(ctx, field) - case "stakingRequirement": - return ec.fieldContext_DispatchStrategy_stakingRequirement(ctx, field) - case "notionalTimeWeightedAveragePositionRequirement": - return ec.fieldContext_DispatchStrategy_notionalTimeWeightedAveragePositionRequirement(ctx, field) - case "windowLength": - return ec.fieldContext_DispatchStrategy_windowLength(ctx, field) - case "lockPeriod": - return ec.fieldContext_DispatchStrategy_lockPeriod(ctx, field) - case "distributionStrategy": - return ec.fieldContext_DispatchStrategy_distributionStrategy(ctx, field) - case "rankTable": - return ec.fieldContext_DispatchStrategy_rankTable(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DispatchStrategy", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralProgram_id(ctx context.Context, field graphql.CollectedField, obj *vega.ReferralProgram) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralProgram_id(ctx, field) +func (ec *executionContext) _ProposalVoteSide_votes(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteSide) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalVoteSide_votes(ctx, field) if err != nil { return graphql.Null } @@ -71154,38 +72755,51 @@ func (ec *executionContext) _ReferralProgram_id(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return obj.Votes, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.Vote) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOVote2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐVoteᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralProgram_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalVoteSide_votes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralProgram", + Object: "ProposalVoteSide", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "value": + return ec.fieldContext_Vote_value(ctx, field) + case "party": + return ec.fieldContext_Vote_party(ctx, field) + case "datetime": + return ec.fieldContext_Vote_datetime(ctx, field) + case "proposalId": + return ec.fieldContext_Vote_proposalId(ctx, field) + case "governanceTokenBalance": + return ec.fieldContext_Vote_governanceTokenBalance(ctx, field) + case "governanceTokenWeight": + return ec.fieldContext_Vote_governanceTokenWeight(ctx, field) + case "equityLikeShareWeight": + return ec.fieldContext_Vote_equityLikeShareWeight(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Vote", field.Name) }, } return fc, nil } -func (ec *executionContext) _ReferralProgram_version(ctx context.Context, field graphql.CollectedField, obj *vega.ReferralProgram) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralProgram_version(ctx, field) +func (ec *executionContext) _ProposalVoteSide_totalNumber(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteSide) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalVoteSide_totalNumber(ctx, field) if err != nil { return graphql.Null } @@ -71198,7 +72812,7 @@ func (ec *executionContext) _ReferralProgram_version(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReferralProgram().Version(rctx, obj) + return obj.TotalNumber, nil }) if err != nil { ec.Error(ctx, err) @@ -71210,26 +72824,26 @@ func (ec *executionContext) _ReferralProgram_version(ctx context.Context, field } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralProgram_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalVoteSide_totalNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralProgram", + Object: "ProposalVoteSide", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralProgram_benefitTiers(ctx context.Context, field graphql.CollectedField, obj *vega.ReferralProgram) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralProgram_benefitTiers(ctx, field) +func (ec *executionContext) _ProposalVoteSide_totalWeight(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteSide) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalVoteSide_totalWeight(ctx, field) if err != nil { return graphql.Null } @@ -71242,7 +72856,7 @@ func (ec *executionContext) _ReferralProgram_benefitTiers(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BenefitTiers, nil + return obj.TotalWeight, nil }) if err != nil { ec.Error(ctx, err) @@ -71254,36 +72868,26 @@ func (ec *executionContext) _ReferralProgram_benefitTiers(ctx context.Context, f } return graphql.Null } - res := resTmp.([]*vega.BenefitTier) + res := resTmp.(string) fc.Result = res - return ec.marshalNBenefitTier2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐBenefitTierᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralProgram_benefitTiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalVoteSide_totalWeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralProgram", + Object: "ProposalVoteSide", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "minimumEpochs": - return ec.fieldContext_BenefitTier_minimumEpochs(ctx, field) - case "minimumRunningNotionalTakerVolume": - return ec.fieldContext_BenefitTier_minimumRunningNotionalTakerVolume(ctx, field) - case "referralDiscountFactor": - return ec.fieldContext_BenefitTier_referralDiscountFactor(ctx, field) - case "referralRewardFactor": - return ec.fieldContext_BenefitTier_referralRewardFactor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type BenefitTier", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralProgram_endOfProgramTimestamp(ctx context.Context, field graphql.CollectedField, obj *vega.ReferralProgram) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralProgram_endOfProgramTimestamp(ctx, field) +func (ec *executionContext) _ProposalVoteSide_totalTokens(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteSide) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalVoteSide_totalTokens(ctx, field) if err != nil { return graphql.Null } @@ -71296,7 +72900,7 @@ func (ec *executionContext) _ReferralProgram_endOfProgramTimestamp(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EndOfProgramTimestamp, nil + return obj.TotalTokens, nil }) if err != nil { ec.Error(ctx, err) @@ -71308,26 +72912,26 @@ func (ec *executionContext) _ReferralProgram_endOfProgramTimestamp(ctx context.C } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralProgram_endOfProgramTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalVoteSide_totalTokens(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralProgram", + Object: "ProposalVoteSide", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralProgram_windowLength(ctx context.Context, field graphql.CollectedField, obj *vega.ReferralProgram) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralProgram_windowLength(ctx, field) +func (ec *executionContext) _ProposalVoteSide_totalEquityLikeShareWeight(ctx context.Context, field graphql.CollectedField, obj *ProposalVoteSide) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalVoteSide_totalEquityLikeShareWeight(ctx, field) if err != nil { return graphql.Null } @@ -71340,7 +72944,7 @@ func (ec *executionContext) _ReferralProgram_windowLength(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReferralProgram().WindowLength(rctx, obj) + return obj.TotalEquityLikeShareWeight, nil }) if err != nil { ec.Error(ctx, err) @@ -71352,26 +72956,26 @@ func (ec *executionContext) _ReferralProgram_windowLength(ctx context.Context, f } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralProgram_windowLength(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalVoteSide_totalEquityLikeShareWeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralProgram", + Object: "ProposalVoteSide", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralProgram_stakingTiers(ctx context.Context, field graphql.CollectedField, obj *vega.ReferralProgram) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralProgram_stakingTiers(ctx, field) +func (ec *executionContext) _ProposalVotes_yes(ctx context.Context, field graphql.CollectedField, obj *ProposalVotes) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalVotes_yes(ctx, field) if err != nil { return graphql.Null } @@ -71384,7 +72988,7 @@ func (ec *executionContext) _ReferralProgram_stakingTiers(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.StakingTiers, nil + return obj.Yes, nil }) if err != nil { ec.Error(ctx, err) @@ -71396,32 +73000,38 @@ func (ec *executionContext) _ReferralProgram_stakingTiers(ctx context.Context, f } return graphql.Null } - res := resTmp.([]*vega.StakingTier) + res := resTmp.(*ProposalVoteSide) fc.Result = res - return ec.marshalNStakingTier2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStakingTierᚄ(ctx, field.Selections, res) + return ec.marshalNProposalVoteSide2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVoteSide(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralProgram_stakingTiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalVotes_yes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralProgram", + Object: "ProposalVotes", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "minimumStakedTokens": - return ec.fieldContext_StakingTier_minimumStakedTokens(ctx, field) - case "referralRewardMultiplier": - return ec.fieldContext_StakingTier_referralRewardMultiplier(ctx, field) + case "votes": + return ec.fieldContext_ProposalVoteSide_votes(ctx, field) + case "totalNumber": + return ec.fieldContext_ProposalVoteSide_totalNumber(ctx, field) + case "totalWeight": + return ec.fieldContext_ProposalVoteSide_totalWeight(ctx, field) + case "totalTokens": + return ec.fieldContext_ProposalVoteSide_totalTokens(ctx, field) + case "totalEquityLikeShareWeight": + return ec.fieldContext_ProposalVoteSide_totalEquityLikeShareWeight(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type StakingTier", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ProposalVoteSide", field.Name) }, } return fc, nil } -func (ec *executionContext) _ReferralSet_id(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSet) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSet_id(ctx, field) +func (ec *executionContext) _ProposalVotes_no(ctx context.Context, field graphql.CollectedField, obj *ProposalVotes) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalVotes_no(ctx, field) if err != nil { return graphql.Null } @@ -71434,7 +73044,7 @@ func (ec *executionContext) _ReferralSet_id(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return obj.No, nil }) if err != nil { ec.Error(ctx, err) @@ -71446,26 +73056,38 @@ func (ec *executionContext) _ReferralSet_id(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*ProposalVoteSide) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNProposalVoteSide2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVoteSide(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSet_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalVotes_no(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSet", + Object: "ProposalVotes", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "votes": + return ec.fieldContext_ProposalVoteSide_votes(ctx, field) + case "totalNumber": + return ec.fieldContext_ProposalVoteSide_totalNumber(ctx, field) + case "totalWeight": + return ec.fieldContext_ProposalVoteSide_totalWeight(ctx, field) + case "totalTokens": + return ec.fieldContext_ProposalVoteSide_totalTokens(ctx, field) + case "totalEquityLikeShareWeight": + return ec.fieldContext_ProposalVoteSide_totalEquityLikeShareWeight(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProposalVoteSide", field.Name) }, } return fc, nil } -func (ec *executionContext) _ReferralSet_referrer(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSet) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSet_referrer(ctx, field) +func (ec *executionContext) _ProposalsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.GovernanceDataConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalsConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -71478,38 +73100,43 @@ func (ec *executionContext) _ReferralSet_referrer(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Referrer, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.GovernanceDataEdge) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOProposalEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGovernanceDataEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSet_referrer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSet", + Object: "ProposalsConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_ProposalEdge_node(ctx, field) + case "proposalNode": + return ec.fieldContext_ProposalEdge_proposalNode(ctx, field) + case "cursor": + return ec.fieldContext_ProposalEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProposalEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _ReferralSet_createdAt(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSet) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSet_createdAt(ctx, field) +func (ec *executionContext) _ProposalsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.GovernanceDataConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProposalsConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -71522,7 +73149,7 @@ func (ec *executionContext) _ReferralSet_createdAt(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreatedAt, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -71534,26 +73161,36 @@ func (ec *executionContext) _ReferralSet_createdAt(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSet_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProposalsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSet", + Object: "ProposalsConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _ReferralSet_updatedAt(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSet) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSet_updatedAt(ctx, field) +func (ec *executionContext) _ProtocolUpgradeProposal_upgradeBlockHeight(ctx context.Context, field graphql.CollectedField, obj *v1.ProtocolUpgradeEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProtocolUpgradeProposal_upgradeBlockHeight(ctx, field) if err != nil { return graphql.Null } @@ -71566,7 +73203,7 @@ func (ec *executionContext) _ReferralSet_updatedAt(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdatedAt, nil + return ec.resolvers.ProtocolUpgradeProposal().UpgradeBlockHeight(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -71578,26 +73215,26 @@ func (ec *executionContext) _ReferralSet_updatedAt(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSet_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProtocolUpgradeProposal_upgradeBlockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSet", + Object: "ProtocolUpgradeProposal", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralSetConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetConnection_edges(ctx, field) +func (ec *executionContext) _ProtocolUpgradeProposal_vegaReleaseTag(ctx context.Context, field graphql.CollectedField, obj *v1.ProtocolUpgradeEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProtocolUpgradeProposal_vegaReleaseTag(ctx, field) if err != nil { return graphql.Null } @@ -71610,7 +73247,7 @@ func (ec *executionContext) _ReferralSetConnection_edges(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.VegaReleaseTag, nil }) if err != nil { ec.Error(ctx, err) @@ -71622,32 +73259,26 @@ func (ec *executionContext) _ReferralSetConnection_edges(ctx context.Context, fi } return graphql.Null } - res := resTmp.([]*v2.ReferralSetEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalNReferralSetEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetEdge(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProtocolUpgradeProposal_vegaReleaseTag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetConnection", + Object: "ProtocolUpgradeProposal", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_ReferralSetEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_ReferralSetEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ReferralSetEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralSetConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetConnection_pageInfo(ctx, field) +func (ec *executionContext) _ProtocolUpgradeProposal_approvers(ctx context.Context, field graphql.CollectedField, obj *v1.ProtocolUpgradeEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProtocolUpgradeProposal_approvers(ctx, field) if err != nil { return graphql.Null } @@ -71660,7 +73291,7 @@ func (ec *executionContext) _ReferralSetConnection_pageInfo(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Approvers, nil }) if err != nil { ec.Error(ctx, err) @@ -71672,36 +73303,26 @@ func (ec *executionContext) _ReferralSetConnection_pageInfo(ctx context.Context, } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.([]string) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProtocolUpgradeProposal_approvers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetConnection", + Object: "ProtocolUpgradeProposal", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralSetEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetEdge_node(ctx, field) +func (ec *executionContext) _ProtocolUpgradeProposal_status(ctx context.Context, field graphql.CollectedField, obj *v1.ProtocolUpgradeEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProtocolUpgradeProposal_status(ctx, field) if err != nil { return graphql.Null } @@ -71714,7 +73335,7 @@ func (ec *executionContext) _ReferralSetEdge_node(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) @@ -71726,36 +73347,26 @@ func (ec *executionContext) _ReferralSetEdge_node(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(*v2.ReferralSet) + res := resTmp.(v1.ProtocolUpgradeProposalStatus) fc.Result = res - return ec.marshalNReferralSet2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSet(ctx, field.Selections, res) + return ec.marshalNProtocolUpgradeProposalStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐProtocolUpgradeProposalStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProtocolUpgradeProposal_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetEdge", + Object: "ProtocolUpgradeProposal", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_ReferralSet_id(ctx, field) - case "referrer": - return ec.fieldContext_ReferralSet_referrer(ctx, field) - case "createdAt": - return ec.fieldContext_ReferralSet_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_ReferralSet_updatedAt(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ReferralSet", field.Name) + return nil, errors.New("field of type ProtocolUpgradeProposalStatus does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralSetEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetEdge_cursor(ctx, field) +func (ec *executionContext) _ProtocolUpgradeProposalConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.ProtocolUpgradeProposalConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProtocolUpgradeProposalConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -71768,38 +73379,41 @@ func (ec *executionContext) _ReferralSetEdge_cursor(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.ProtocolUpgradeProposalEdge) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOProtocolUpgradeProposalEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐProtocolUpgradeProposalEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProtocolUpgradeProposalConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetEdge", + Object: "ProtocolUpgradeProposalConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_ProtocolUpgradeProposalEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_ProtocolUpgradeProposalEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProtocolUpgradeProposalEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _ReferralSetReferee_referralSetId(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetReferee) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetReferee_referralSetId(ctx, field) +func (ec *executionContext) _ProtocolUpgradeProposalConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.ProtocolUpgradeProposalConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProtocolUpgradeProposalConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -71812,38 +73426,45 @@ func (ec *executionContext) _ReferralSetReferee_referralSetId(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReferralSetId, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetReferee_referralSetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProtocolUpgradeProposalConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetReferee", + Object: "ProtocolUpgradeProposalConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _ReferralSetReferee_refereeId(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetReferee) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetReferee_refereeId(ctx, field) +func (ec *executionContext) _ProtocolUpgradeProposalEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.ProtocolUpgradeProposalEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProtocolUpgradeProposalEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -71856,7 +73477,7 @@ func (ec *executionContext) _ReferralSetReferee_refereeId(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReferralSetReferee().RefereeID(rctx, obj) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -71868,26 +73489,36 @@ func (ec *executionContext) _ReferralSetReferee_refereeId(ctx context.Context, f } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v1.ProtocolUpgradeEvent) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNProtocolUpgradeProposal2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐProtocolUpgradeEvent(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetReferee_refereeId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProtocolUpgradeProposalEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetReferee", + Object: "ProtocolUpgradeProposalEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "upgradeBlockHeight": + return ec.fieldContext_ProtocolUpgradeProposal_upgradeBlockHeight(ctx, field) + case "vegaReleaseTag": + return ec.fieldContext_ProtocolUpgradeProposal_vegaReleaseTag(ctx, field) + case "approvers": + return ec.fieldContext_ProtocolUpgradeProposal_approvers(ctx, field) + case "status": + return ec.fieldContext_ProtocolUpgradeProposal_status(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProtocolUpgradeProposal", field.Name) }, } return fc, nil } -func (ec *executionContext) _ReferralSetReferee_joinedAt(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetReferee) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetReferee_joinedAt(ctx, field) +func (ec *executionContext) _ProtocolUpgradeProposalEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.ProtocolUpgradeProposalEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProtocolUpgradeProposalEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -71900,7 +73531,7 @@ func (ec *executionContext) _ReferralSetReferee_joinedAt(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.JoinedAt, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -71912,26 +73543,26 @@ func (ec *executionContext) _ReferralSetReferee_joinedAt(ctx context.Context, fi } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetReferee_joinedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProtocolUpgradeProposalEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetReferee", + Object: "ProtocolUpgradeProposalEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralSetReferee_atEpoch(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetReferee) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetReferee_atEpoch(ctx, field) +func (ec *executionContext) _ProtocolUpgradeStatus_ready(ctx context.Context, field graphql.CollectedField, obj *ProtocolUpgradeStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ProtocolUpgradeStatus_ready(ctx, field) if err != nil { return graphql.Null } @@ -71944,7 +73575,7 @@ func (ec *executionContext) _ReferralSetReferee_atEpoch(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReferralSetReferee().AtEpoch(rctx, obj) + return obj.Ready, nil }) if err != nil { ec.Error(ctx, err) @@ -71956,26 +73587,26 @@ func (ec *executionContext) _ReferralSetReferee_atEpoch(ctx context.Context, fie } return graphql.Null } - res := resTmp.(int) + res := resTmp.(bool) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetReferee_atEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ProtocolUpgradeStatus_ready(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetReferee", + Object: "ProtocolUpgradeStatus", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralSetReferee_totalRefereeNotionalTakerVolume(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetReferee) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetReferee_totalRefereeNotionalTakerVolume(ctx, field) +func (ec *executionContext) _PubKey_key(ctx context.Context, field graphql.CollectedField, obj *PubKey) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PubKey_key(ctx, field) if err != nil { return graphql.Null } @@ -71988,26 +73619,23 @@ func (ec *executionContext) _ReferralSetReferee_totalRefereeNotionalTakerVolume( }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalRefereeNotionalTakerVolume, nil + return obj.Key, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetReferee_totalRefereeNotionalTakerVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PubKey_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetReferee", + Object: "PubKey", Field: field, IsMethod: false, IsResolver: false, @@ -72018,8 +73646,8 @@ func (ec *executionContext) fieldContext_ReferralSetReferee_totalRefereeNotional return fc, nil } -func (ec *executionContext) _ReferralSetReferee_totalRefereeGeneratedRewards(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetReferee) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetReferee_totalRefereeGeneratedRewards(ctx, field) +func (ec *executionContext) _QuantumRewardsPerEpoch_epoch(ctx context.Context, field graphql.CollectedField, obj *v2.QuantumRewardsPerEpoch) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_QuantumRewardsPerEpoch_epoch(ctx, field) if err != nil { return graphql.Null } @@ -72032,7 +73660,7 @@ func (ec *executionContext) _ReferralSetReferee_totalRefereeGeneratedRewards(ctx }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalRefereeGeneratedRewards, nil + return ec.resolvers.QuantumRewardsPerEpoch().Epoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -72044,26 +73672,26 @@ func (ec *executionContext) _ReferralSetReferee_totalRefereeGeneratedRewards(ctx } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetReferee_totalRefereeGeneratedRewards(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_QuantumRewardsPerEpoch_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetReferee", + Object: "QuantumRewardsPerEpoch", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralSetRefereeConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetRefereeConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetRefereeConnection_edges(ctx, field) +func (ec *executionContext) _QuantumRewardsPerEpoch_totalQuantumRewards(ctx context.Context, field graphql.CollectedField, obj *v2.QuantumRewardsPerEpoch) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_QuantumRewardsPerEpoch_totalQuantumRewards(ctx, field) if err != nil { return graphql.Null } @@ -72076,7 +73704,7 @@ func (ec *executionContext) _ReferralSetRefereeConnection_edges(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.TotalQuantumRewards, nil }) if err != nil { ec.Error(ctx, err) @@ -72088,32 +73716,26 @@ func (ec *executionContext) _ReferralSetRefereeConnection_edges(ctx context.Cont } return graphql.Null } - res := resTmp.([]*v2.ReferralSetRefereeEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalNReferralSetRefereeEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetRefereeEdge(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetRefereeConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_QuantumRewardsPerEpoch_totalQuantumRewards(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetRefereeConnection", + Object: "QuantumRewardsPerEpoch", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_ReferralSetRefereeEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_ReferralSetRefereeEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ReferralSetRefereeEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralSetRefereeConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetRefereeConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetRefereeConnection_pageInfo(ctx, field) +func (ec *executionContext) _QuantumVolumesPerEpoch_epoch(ctx context.Context, field graphql.CollectedField, obj *v2.QuantumVolumesPerEpoch) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_QuantumVolumesPerEpoch_epoch(ctx, field) if err != nil { return graphql.Null } @@ -72126,7 +73748,7 @@ func (ec *executionContext) _ReferralSetRefereeConnection_pageInfo(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.QuantumVolumesPerEpoch().Epoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -72138,36 +73760,26 @@ func (ec *executionContext) _ReferralSetRefereeConnection_pageInfo(ctx context.C } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(int) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetRefereeConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_QuantumVolumesPerEpoch_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetRefereeConnection", + Object: "QuantumVolumesPerEpoch", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralSetRefereeEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetRefereeEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetRefereeEdge_node(ctx, field) +func (ec *executionContext) _QuantumVolumesPerEpoch_totalQuantumVolumes(ctx context.Context, field graphql.CollectedField, obj *v2.QuantumVolumesPerEpoch) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_QuantumVolumesPerEpoch_totalQuantumVolumes(ctx, field) if err != nil { return graphql.Null } @@ -72180,7 +73792,7 @@ func (ec *executionContext) _ReferralSetRefereeEdge_node(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.TotalQuantumVolumes, nil }) if err != nil { ec.Error(ctx, err) @@ -72192,40 +73804,26 @@ func (ec *executionContext) _ReferralSetRefereeEdge_node(ctx context.Context, fi } return graphql.Null } - res := resTmp.(*v2.ReferralSetReferee) + res := resTmp.(string) fc.Result = res - return ec.marshalNReferralSetReferee2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetReferee(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetRefereeEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_QuantumVolumesPerEpoch_totalQuantumVolumes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetRefereeEdge", + Object: "QuantumVolumesPerEpoch", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "referralSetId": - return ec.fieldContext_ReferralSetReferee_referralSetId(ctx, field) - case "refereeId": - return ec.fieldContext_ReferralSetReferee_refereeId(ctx, field) - case "joinedAt": - return ec.fieldContext_ReferralSetReferee_joinedAt(ctx, field) - case "atEpoch": - return ec.fieldContext_ReferralSetReferee_atEpoch(ctx, field) - case "totalRefereeNotionalTakerVolume": - return ec.fieldContext_ReferralSetReferee_totalRefereeNotionalTakerVolume(ctx, field) - case "totalRefereeGeneratedRewards": - return ec.fieldContext_ReferralSetReferee_totalRefereeGeneratedRewards(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ReferralSetReferee", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ReferralSetRefereeEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetRefereeEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetRefereeEdge_cursor(ctx, field) +func (ec *executionContext) _Query_asset(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_asset(ctx, field) if err != nil { return graphql.Null } @@ -72238,38 +73836,78 @@ func (ec *executionContext) _ReferralSetRefereeEdge_cursor(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.Query().Asset(rctx, fc.Args["id"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Asset) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetRefereeEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetRefereeEdge", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_asset_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ReferralSetStats_atEpoch(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStats_atEpoch(ctx, field) +func (ec *executionContext) _Query_assetsConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_assetsConnection(ctx, field) if err != nil { return graphql.Null } @@ -72282,38 +73920,52 @@ func (ec *executionContext) _ReferralSetStats_atEpoch(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReferralSetStats().AtEpoch(rctx, obj) + return ec.resolvers.Query().AssetsConnection(rctx, fc.Args["id"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*v2.AssetsConnection) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOAssetsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAssetsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStats_atEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_assetsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStats", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_AssetsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_AssetsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AssetsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_assetsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ReferralSetStats_partyId(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStats_partyId(ctx, field) +func (ec *executionContext) _Query_balanceChanges(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_balanceChanges(ctx, field) if err != nil { return graphql.Null } @@ -72326,7 +73978,7 @@ func (ec *executionContext) _ReferralSetStats_partyId(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PartyId, nil + return ec.resolvers.Query().BalanceChanges(rctx, fc.Args["filter"].(*v2.AccountFilter), fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -72338,26 +73990,43 @@ func (ec *executionContext) _ReferralSetStats_partyId(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.AggregatedBalanceConnection) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNAggregatedBalanceConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAggregatedBalanceConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStats_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_balanceChanges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStats", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_AggregatedBalanceConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_AggregatedBalanceConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AggregatedBalanceConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_balanceChanges_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ReferralSetStats_wasEligible(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStats_wasEligible(ctx, field) +func (ec *executionContext) _Query_currentReferralProgram(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_currentReferralProgram(ctx, field) if err != nil { return graphql.Null } @@ -72370,38 +74039,51 @@ func (ec *executionContext) _ReferralSetStats_wasEligible(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.WasEligible, nil + return ec.resolvers.Query().CurrentReferralProgram(rctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*v2.ReferralProgram) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOCurrentReferralProgram2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralProgram(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStats_wasEligible(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_currentReferralProgram(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStats", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_CurrentReferralProgram_id(ctx, field) + case "version": + return ec.fieldContext_CurrentReferralProgram_version(ctx, field) + case "benefitTiers": + return ec.fieldContext_CurrentReferralProgram_benefitTiers(ctx, field) + case "endOfProgramTimestamp": + return ec.fieldContext_CurrentReferralProgram_endOfProgramTimestamp(ctx, field) + case "windowLength": + return ec.fieldContext_CurrentReferralProgram_windowLength(ctx, field) + case "stakingTiers": + return ec.fieldContext_CurrentReferralProgram_stakingTiers(ctx, field) + case "endedAt": + return ec.fieldContext_CurrentReferralProgram_endedAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CurrentReferralProgram", field.Name) }, } return fc, nil } -func (ec *executionContext) _ReferralSetStats_discountFactor(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStats_discountFactor(ctx, field) +func (ec *executionContext) _Query_currentVolumeDiscountProgram(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_currentVolumeDiscountProgram(ctx, field) if err != nil { return graphql.Null } @@ -72414,38 +74096,49 @@ func (ec *executionContext) _ReferralSetStats_discountFactor(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DiscountFactor, nil + return ec.resolvers.Query().CurrentVolumeDiscountProgram(rctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.VolumeDiscountProgram) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOVolumeDiscountProgram2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐVolumeDiscountProgram(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStats_discountFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_currentVolumeDiscountProgram(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStats", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_VolumeDiscountProgram_id(ctx, field) + case "version": + return ec.fieldContext_VolumeDiscountProgram_version(ctx, field) + case "benefitTiers": + return ec.fieldContext_VolumeDiscountProgram_benefitTiers(ctx, field) + case "endOfProgramTimestamp": + return ec.fieldContext_VolumeDiscountProgram_endOfProgramTimestamp(ctx, field) + case "windowLength": + return ec.fieldContext_VolumeDiscountProgram_windowLength(ctx, field) + case "endedAt": + return ec.fieldContext_VolumeDiscountProgram_endedAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type VolumeDiscountProgram", field.Name) }, } return fc, nil } -func (ec *executionContext) _ReferralSetStats_rewardFactor(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStats_rewardFactor(ctx, field) +func (ec *executionContext) _Query_coreSnapshots(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_coreSnapshots(ctx, field) if err != nil { return graphql.Null } @@ -72458,38 +74151,52 @@ func (ec *executionContext) _ReferralSetStats_rewardFactor(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RewardFactor, nil + return ec.resolvers.Query().CoreSnapshots(rctx, fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.CoreSnapshotConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOCoreSnapshotConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCoreSnapshotConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStats_rewardFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_coreSnapshots(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStats", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_CoreSnapshotConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_CoreSnapshotConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CoreSnapshotConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_coreSnapshots_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ReferralSetStats_epochNotionalTakerVolume(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStats_epochNotionalTakerVolume(ctx, field) +func (ec *executionContext) _Query_deposit(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_deposit(ctx, field) if err != nil { return graphql.Null } @@ -72502,38 +74209,64 @@ func (ec *executionContext) _ReferralSetStats_epochNotionalTakerVolume(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EpochNotionalTakerVolume, nil + return ec.resolvers.Query().Deposit(rctx, fc.Args["id"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Deposit) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalODeposit2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDeposit(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStats_epochNotionalTakerVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_deposit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStats", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Deposit_id(ctx, field) + case "party": + return ec.fieldContext_Deposit_party(ctx, field) + case "amount": + return ec.fieldContext_Deposit_amount(ctx, field) + case "asset": + return ec.fieldContext_Deposit_asset(ctx, field) + case "status": + return ec.fieldContext_Deposit_status(ctx, field) + case "createdTimestamp": + return ec.fieldContext_Deposit_createdTimestamp(ctx, field) + case "creditedTimestamp": + return ec.fieldContext_Deposit_creditedTimestamp(ctx, field) + case "txHash": + return ec.fieldContext_Deposit_txHash(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Deposit", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_deposit_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ReferralSetStats_referralSetRunningNotionalTakerVolume(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStats_referralSetRunningNotionalTakerVolume(ctx, field) +func (ec *executionContext) _Query_deposits(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_deposits(ctx, field) if err != nil { return graphql.Null } @@ -72546,38 +74279,52 @@ func (ec *executionContext) _ReferralSetStats_referralSetRunningNotionalTakerVol }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReferralSetRunningNotionalTakerVolume, nil + return ec.resolvers.Query().Deposits(rctx, fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.DepositsConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalODepositsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDepositsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStats_referralSetRunningNotionalTakerVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_deposits(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStats", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_DepositsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_DepositsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DepositsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_deposits_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ReferralSetStats_rewardsMultiplier(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStats_rewardsMultiplier(ctx, field) +func (ec *executionContext) _Query_entities(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_entities(ctx, field) if err != nil { return graphql.Null } @@ -72590,7 +74337,7 @@ func (ec *executionContext) _ReferralSetStats_rewardsMultiplier(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RewardsMultiplier, nil + return ec.resolvers.Query().Entities(rctx, fc.Args["txHash"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -72602,26 +74349,95 @@ func (ec *executionContext) _ReferralSetStats_rewardsMultiplier(ctx context.Cont } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.ListEntitiesResponse) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNEntities2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐListEntitiesResponse(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStats_rewardsMultiplier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_entities(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStats", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "accounts": + return ec.fieldContext_Entities_accounts(ctx, field) + case "orders": + return ec.fieldContext_Entities_orders(ctx, field) + case "positions": + return ec.fieldContext_Entities_positions(ctx, field) + case "ledgerEntries": + return ec.fieldContext_Entities_ledgerEntries(ctx, field) + case "balanceChanges": + return ec.fieldContext_Entities_balanceChanges(ctx, field) + case "transfers": + return ec.fieldContext_Entities_transfers(ctx, field) + case "votes": + return ec.fieldContext_Entities_votes(ctx, field) + case "erc20MultiSigSignerAddedBundles": + return ec.fieldContext_Entities_erc20MultiSigSignerAddedBundles(ctx, field) + case "erc20MultiSigSignerRemovedBundles": + return ec.fieldContext_Entities_erc20MultiSigSignerRemovedBundles(ctx, field) + case "trades": + return ec.fieldContext_Entities_trades(ctx, field) + case "oracleSpecs": + return ec.fieldContext_Entities_oracleSpecs(ctx, field) + case "oracleData": + return ec.fieldContext_Entities_oracleData(ctx, field) + case "markets": + return ec.fieldContext_Entities_markets(ctx, field) + case "parties": + return ec.fieldContext_Entities_parties(ctx, field) + case "marginLevels": + return ec.fieldContext_Entities_marginLevels(ctx, field) + case "rewards": + return ec.fieldContext_Entities_rewards(ctx, field) + case "deposits": + return ec.fieldContext_Entities_deposits(ctx, field) + case "withdrawals": + return ec.fieldContext_Entities_withdrawals(ctx, field) + case "assets": + return ec.fieldContext_Entities_assets(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Entities_liquidityProvisions(ctx, field) + case "proposals": + return ec.fieldContext_Entities_proposals(ctx, field) + case "delegations": + return ec.fieldContext_Entities_delegations(ctx, field) + case "nodes": + return ec.fieldContext_Entities_nodes(ctx, field) + case "nodeSignatures": + return ec.fieldContext_Entities_nodeSignatures(ctx, field) + case "networkParameters": + return ec.fieldContext_Entities_networkParameters(ctx, field) + case "keyRotations": + return ec.fieldContext_Entities_keyRotations(ctx, field) + case "ethereumKeyRotations": + return ec.fieldContext_Entities_ethereumKeyRotations(ctx, field) + case "protocolUpgradeProposals": + return ec.fieldContext_Entities_protocolUpgradeProposals(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Entities", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_entities_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ReferralSetStats_rewardsFactorMultiplier(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStats_rewardsFactorMultiplier(ctx, field) +func (ec *executionContext) _Query_epoch(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_epoch(ctx, field) if err != nil { return graphql.Null } @@ -72634,7 +74450,7 @@ func (ec *executionContext) _ReferralSetStats_rewardsFactorMultiplier(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RewardsFactorMultiplier, nil + return ec.resolvers.Query().Epoch(rctx, fc.Args["id"].(*string), fc.Args["block"].(*string)) }) if err != nil { ec.Error(ctx, err) @@ -72646,26 +74462,47 @@ func (ec *executionContext) _ReferralSetStats_rewardsFactorMultiplier(ctx contex } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Epoch) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNEpoch2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpoch(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStats_rewardsFactorMultiplier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStats", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Epoch_id(ctx, field) + case "timestamps": + return ec.fieldContext_Epoch_timestamps(ctx, field) + case "validatorsConnection": + return ec.fieldContext_Epoch_validatorsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Epoch_delegationsConnection(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Epoch", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_epoch_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ReferralSetStats_referrerTakerVolume(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStats_referrerTakerVolume(ctx, field) +func (ec *executionContext) _Query_epochRewardSummaries(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_epochRewardSummaries(ctx, field) if err != nil { return graphql.Null } @@ -72678,38 +74515,52 @@ func (ec *executionContext) _ReferralSetStats_referrerTakerVolume(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReferrerTakerVolume, nil + return ec.resolvers.Query().EpochRewardSummaries(rctx, fc.Args["filter"].(*v2.RewardSummaryFilter), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.EpochRewardSummaryConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOEpochRewardSummaryConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEpochRewardSummaryConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStats_referrerTakerVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_epochRewardSummaries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStats", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_EpochRewardSummaryConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_EpochRewardSummaryConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type EpochRewardSummaryConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_epochRewardSummaries_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ReferralSetStatsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStatsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStatsConnection_edges(ctx, field) +func (ec *executionContext) _Query_erc20ListAssetBundle(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_erc20ListAssetBundle(ctx, field) if err != nil { return graphql.Null } @@ -72722,44 +74573,56 @@ func (ec *executionContext) _ReferralSetStatsConnection_edges(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.Query().Erc20ListAssetBundle(rctx, fc.Args["assetId"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]*v2.ReferralSetStatsEdge) + res := resTmp.(*Erc20ListAssetBundle) fc.Result = res - return ec.marshalNReferralSetStatsEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetStatsEdge(ctx, field.Selections, res) + return ec.marshalOErc20ListAssetBundle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐErc20ListAssetBundle(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStatsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_erc20ListAssetBundle(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStatsConnection", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_ReferralSetStatsEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_ReferralSetStatsEdge_cursor(ctx, field) + case "assetSource": + return ec.fieldContext_Erc20ListAssetBundle_assetSource(ctx, field) + case "vegaAssetId": + return ec.fieldContext_Erc20ListAssetBundle_vegaAssetId(ctx, field) + case "nonce": + return ec.fieldContext_Erc20ListAssetBundle_nonce(ctx, field) + case "signatures": + return ec.fieldContext_Erc20ListAssetBundle_signatures(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ReferralSetStatsEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Erc20ListAssetBundle", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_erc20ListAssetBundle_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ReferralSetStatsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStatsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStatsConnection_pageInfo(ctx, field) +func (ec *executionContext) _Query_erc20MultiSigSignerAddedBundles(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_erc20MultiSigSignerAddedBundles(ctx, field) if err != nil { return graphql.Null } @@ -72772,7 +74635,7 @@ func (ec *executionContext) _ReferralSetStatsConnection_pageInfo(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.Query().Erc20MultiSigSignerAddedBundles(rctx, fc.Args["nodeId"].(string), fc.Args["submitter"].(*string), fc.Args["epochSeq"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -72784,36 +74647,43 @@ func (ec *executionContext) _ReferralSetStatsConnection_pageInfo(ctx context.Con } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(*ERC20MultiSigSignerAddedConnection) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNERC20MultiSigSignerAddedConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐERC20MultiSigSignerAddedConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStatsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_erc20MultiSigSignerAddedBundles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStatsConnection", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "edges": + return ec.fieldContext_ERC20MultiSigSignerAddedConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_ERC20MultiSigSignerAddedConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerAddedConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_erc20MultiSigSignerAddedBundles_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ReferralSetStatsEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStatsEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStatsEdge_node(ctx, field) +func (ec *executionContext) _Query_erc20MultiSigSignerRemovedBundles(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_erc20MultiSigSignerRemovedBundles(ctx, field) if err != nil { return graphql.Null } @@ -72826,7 +74696,7 @@ func (ec *executionContext) _ReferralSetStatsEdge_node(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.Query().Erc20MultiSigSignerRemovedBundles(rctx, fc.Args["nodeId"].(string), fc.Args["submitter"].(*string), fc.Args["epochSeq"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -72838,48 +74708,43 @@ func (ec *executionContext) _ReferralSetStatsEdge_node(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(*v2.ReferralSetStats) + res := resTmp.(*ERC20MultiSigSignerRemovedConnection) fc.Result = res - return ec.marshalNReferralSetStats2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetStats(ctx, field.Selections, res) + return ec.marshalNERC20MultiSigSignerRemovedConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐERC20MultiSigSignerRemovedConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStatsEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_erc20MultiSigSignerRemovedBundles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStatsEdge", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "atEpoch": - return ec.fieldContext_ReferralSetStats_atEpoch(ctx, field) - case "partyId": - return ec.fieldContext_ReferralSetStats_partyId(ctx, field) - case "wasEligible": - return ec.fieldContext_ReferralSetStats_wasEligible(ctx, field) - case "discountFactor": - return ec.fieldContext_ReferralSetStats_discountFactor(ctx, field) - case "rewardFactor": - return ec.fieldContext_ReferralSetStats_rewardFactor(ctx, field) - case "epochNotionalTakerVolume": - return ec.fieldContext_ReferralSetStats_epochNotionalTakerVolume(ctx, field) - case "referralSetRunningNotionalTakerVolume": - return ec.fieldContext_ReferralSetStats_referralSetRunningNotionalTakerVolume(ctx, field) - case "rewardsMultiplier": - return ec.fieldContext_ReferralSetStats_rewardsMultiplier(ctx, field) - case "rewardsFactorMultiplier": - return ec.fieldContext_ReferralSetStats_rewardsFactorMultiplier(ctx, field) - case "referrerTakerVolume": - return ec.fieldContext_ReferralSetStats_referrerTakerVolume(ctx, field) + case "edges": + return ec.fieldContext_ERC20MultiSigSignerRemovedConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_ERC20MultiSigSignerRemovedConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ReferralSetStats", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ERC20MultiSigSignerRemovedConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_erc20MultiSigSignerRemovedBundles_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ReferralSetStatsEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStatsEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferralSetStatsEdge_cursor(ctx, field) +func (ec *executionContext) _Query_erc20SetAssetLimitsBundle(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_erc20SetAssetLimitsBundle(ctx, field) if err != nil { return graphql.Null } @@ -72892,7 +74757,7 @@ func (ec *executionContext) _ReferralSetStatsEdge_cursor(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.Query().Erc20SetAssetLimitsBundle(rctx, fc.Args["proposalId"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -72904,26 +74769,51 @@ func (ec *executionContext) _ReferralSetStatsEdge_cursor(ctx context.Context, fi } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*ERC20SetAssetLimitsBundle) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNERC20SetAssetLimitsBundle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐERC20SetAssetLimitsBundle(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferralSetStatsEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_erc20SetAssetLimitsBundle(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferralSetStatsEdge", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "assetSource": + return ec.fieldContext_ERC20SetAssetLimitsBundle_assetSource(ctx, field) + case "vegaAssetId": + return ec.fieldContext_ERC20SetAssetLimitsBundle_vegaAssetId(ctx, field) + case "nonce": + return ec.fieldContext_ERC20SetAssetLimitsBundle_nonce(ctx, field) + case "lifetimeLimit": + return ec.fieldContext_ERC20SetAssetLimitsBundle_lifetimeLimit(ctx, field) + case "threshold": + return ec.fieldContext_ERC20SetAssetLimitsBundle_threshold(ctx, field) + case "signatures": + return ec.fieldContext_ERC20SetAssetLimitsBundle_signatures(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ERC20SetAssetLimitsBundle", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_erc20SetAssetLimitsBundle_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ReferrerRewardsGenerated_referrerId(ctx context.Context, field graphql.CollectedField, obj *v1.ReferrerRewardsGenerated) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferrerRewardsGenerated_referrerId(ctx, field) +func (ec *executionContext) _Query_erc20WithdrawalApproval(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_erc20WithdrawalApproval(ctx, field) if err != nil { return graphql.Null } @@ -72936,40 +74826,62 @@ func (ec *executionContext) _ReferrerRewardsGenerated_referrerId(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ReferrerRewardsGenerated().ReferrerID(rctx, obj) + return ec.resolvers.Query().Erc20WithdrawalApproval(rctx, fc.Args["withdrawalId"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*Erc20WithdrawalApproval) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOErc20WithdrawalApproval2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐErc20WithdrawalApproval(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferrerRewardsGenerated_referrerId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_erc20WithdrawalApproval(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferrerRewardsGenerated", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _ReferrerRewardsGenerated_generatedReward(ctx context.Context, field graphql.CollectedField, obj *v1.ReferrerRewardsGenerated) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ReferrerRewardsGenerated_generatedReward(ctx, field) - if err != nil { - return graphql.Null + switch field.Name { + case "assetSource": + return ec.fieldContext_Erc20WithdrawalApproval_assetSource(ctx, field) + case "amount": + return ec.fieldContext_Erc20WithdrawalApproval_amount(ctx, field) + case "nonce": + return ec.fieldContext_Erc20WithdrawalApproval_nonce(ctx, field) + case "signatures": + return ec.fieldContext_Erc20WithdrawalApproval_signatures(ctx, field) + case "targetAddress": + return ec.fieldContext_Erc20WithdrawalApproval_targetAddress(ctx, field) + case "creation": + return ec.fieldContext_Erc20WithdrawalApproval_creation(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Erc20WithdrawalApproval", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_erc20WithdrawalApproval_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_estimateOrder(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_estimateOrder(ctx, field) + if err != nil { + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { @@ -72980,7 +74892,7 @@ func (ec *executionContext) _ReferrerRewardsGenerated_generatedReward(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.GeneratedReward, nil + return ec.resolvers.Query().EstimateOrder(rctx, fc.Args["marketId"].(string), fc.Args["partyId"].(string), fc.Args["price"].(*string), fc.Args["size"].(string), fc.Args["side"].(vega.Side), fc.Args["timeInForce"].(vega.Order_TimeInForce), fc.Args["expiration"].(*int64), fc.Args["type"].(vega.Order_Type)) }) if err != nil { ec.Error(ctx, err) @@ -72992,32 +74904,45 @@ func (ec *executionContext) _ReferrerRewardsGenerated_generatedReward(ctx contex } return graphql.Null } - res := resTmp.([]*v1.PartyAmount) + res := resTmp.(*OrderEstimate) fc.Result = res - return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) + return ec.marshalNOrderEstimate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐOrderEstimate(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ReferrerRewardsGenerated_generatedReward(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_estimateOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ReferrerRewardsGenerated", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "partyId": - return ec.fieldContext_PartyAmount_partyId(ctx, field) - case "amount": - return ec.fieldContext_PartyAmount_amount(ctx, field) + case "fee": + return ec.fieldContext_OrderEstimate_fee(ctx, field) + case "totalFeeAmount": + return ec.fieldContext_OrderEstimate_totalFeeAmount(ctx, field) + case "marginLevels": + return ec.fieldContext_OrderEstimate_marginLevels(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) + return nil, fmt.Errorf("no field named %q was found under type OrderEstimate", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_estimateOrder_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Reward_asset(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Reward_asset(ctx, field) +func (ec *executionContext) _Query_estimateFees(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_estimateFees(ctx, field) if err != nil { return graphql.Null } @@ -73030,7 +74955,7 @@ func (ec *executionContext) _Reward_asset(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Reward().Asset(rctx, obj) + return ec.resolvers.Query().EstimateFees(rctx, fc.Args["marketId"].(string), fc.Args["partyId"].(string), fc.Args["price"].(*string), fc.Args["size"].(string), fc.Args["side"].(vega.Side), fc.Args["timeInForce"].(vega.Order_TimeInForce), fc.Args["expiration"].(*int64), fc.Args["type"].(vega.Order_Type)) }) if err != nil { ec.Error(ctx, err) @@ -73042,58 +74967,43 @@ func (ec *executionContext) _Reward_asset(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(*FeeEstimate) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalNFeeEstimate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐFeeEstimate(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Reward_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_estimateFees(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Reward", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + case "fees": + return ec.fieldContext_FeeEstimate_fees(ctx, field) + case "totalFeeAmount": + return ec.fieldContext_FeeEstimate_totalFeeAmount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, fmt.Errorf("no field named %q was found under type FeeEstimate", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_estimateFees_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Reward_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Reward_marketId(ctx, field) +func (ec *executionContext) _Query_estimatePosition(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_estimatePosition(ctx, field) if err != nil { return graphql.Null } @@ -73106,38 +75016,54 @@ func (ec *executionContext) _Reward_marketId(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketId, nil + return ec.resolvers.Query().EstimatePosition(rctx, fc.Args["marketId"].(string), fc.Args["openVolume"].(string), fc.Args["averageEntryPrice"].(string), fc.Args["orders"].([]*v2.OrderInfo), fc.Args["marginAccountBalance"].(string), fc.Args["generalAccountBalance"].(string), fc.Args["orderMarginAccountBalance"].(string), fc.Args["marginMode"].(vega.MarginMode), fc.Args["marginFactor"].(*string), fc.Args["includeRequiredPositionMarginInAvailableCollateral"].(*bool), fc.Args["scaleLiquidationPriceToMarketDecimals"].(*bool)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*PositionEstimate) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOPositionEstimate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐPositionEstimate(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Reward_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_estimatePosition(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Reward", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "margin": + return ec.fieldContext_PositionEstimate_margin(ctx, field) + case "collateralIncreaseEstimate": + return ec.fieldContext_PositionEstimate_collateralIncreaseEstimate(ctx, field) + case "liquidation": + return ec.fieldContext_PositionEstimate_liquidation(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PositionEstimate", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_estimatePosition_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Reward_rewardType(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Reward_rewardType(ctx, field) +func (ec *executionContext) _Query_ethereumKeyRotations(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_ethereumKeyRotations(ctx, field) if err != nil { return graphql.Null } @@ -73150,7 +75076,7 @@ func (ec *executionContext) _Reward_rewardType(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Reward().RewardType(rctx, obj) + return ec.resolvers.Query().EthereumKeyRotations(rctx, fc.Args["nodeId"].(*string)) }) if err != nil { ec.Error(ctx, err) @@ -73162,26 +75088,43 @@ func (ec *executionContext) _Reward_rewardType(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(vega.AccountType) + res := resTmp.(*v2.EthereumKeyRotationsConnection) fc.Result = res - return ec.marshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, field.Selections, res) + return ec.marshalNEthereumKeyRotationsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEthereumKeyRotationsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Reward_rewardType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_ethereumKeyRotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Reward", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type AccountType does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_EthereumKeyRotationsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_EthereumKeyRotationsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type EthereumKeyRotationsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_ethereumKeyRotations_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Reward_party(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Reward_party(ctx, field) +func (ec *executionContext) _Query_estimateTransferFee(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_estimateTransferFee(ctx, field) if err != nil { return graphql.Null } @@ -73194,80 +75137,52 @@ func (ec *executionContext) _Reward_party(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Reward().Party(rctx, obj) + return ec.resolvers.Query().EstimateTransferFee(rctx, fc.Args["fromAccount"].(string), fc.Args["fromAccountType"].(vega.AccountType), fc.Args["toAccount"].(string), fc.Args["amount"].(string), fc.Args["assetId"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Party) + res := resTmp.(*v2.EstimateTransferFeeResponse) fc.Result = res - return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalOEstimatedTransferFee2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEstimateTransferFeeResponse(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Reward_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_estimateTransferFee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Reward", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) + case "fee": + return ec.fieldContext_EstimatedTransferFee_fee(ctx, field) + case "discount": + return ec.fieldContext_EstimatedTransferFee_discount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, fmt.Errorf("no field named %q was found under type EstimatedTransferFee", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_estimateTransferFee_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Reward_epoch(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Reward_epoch(ctx, field) +func (ec *executionContext) _Query_feesStats(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_feesStats(ctx, field) if err != nil { return graphql.Null } @@ -73280,48 +75195,66 @@ func (ec *executionContext) _Reward_epoch(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Reward().Epoch(rctx, obj) + return ec.resolvers.Query().FeesStats(rctx, fc.Args["marketId"].(*string), fc.Args["assetId"].(*string), fc.Args["epoch"].(*int), fc.Args["partyId"].(*string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Epoch) + res := resTmp.(*v1.FeesStats) fc.Result = res - return ec.marshalNEpoch2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpoch(ctx, field.Selections, res) + return ec.marshalOFeesStats2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFeesStats(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Reward_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_feesStats(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Reward", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Epoch_id(ctx, field) - case "timestamps": - return ec.fieldContext_Epoch_timestamps(ctx, field) - case "validatorsConnection": - return ec.fieldContext_Epoch_validatorsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Epoch_delegationsConnection(ctx, field) + case "marketId": + return ec.fieldContext_FeesStats_marketId(ctx, field) + case "assetId": + return ec.fieldContext_FeesStats_assetId(ctx, field) + case "epoch": + return ec.fieldContext_FeesStats_epoch(ctx, field) + case "totalRewardsReceived": + return ec.fieldContext_FeesStats_totalRewardsReceived(ctx, field) + case "referrerRewardsGenerated": + return ec.fieldContext_FeesStats_referrerRewardsGenerated(ctx, field) + case "refereesDiscountApplied": + return ec.fieldContext_FeesStats_refereesDiscountApplied(ctx, field) + case "volumeDiscountApplied": + return ec.fieldContext_FeesStats_volumeDiscountApplied(ctx, field) + case "totalMakerFeesReceived": + return ec.fieldContext_FeesStats_totalMakerFeesReceived(ctx, field) + case "makerFeesGenerated": + return ec.fieldContext_FeesStats_makerFeesGenerated(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Epoch", field.Name) + return nil, fmt.Errorf("no field named %q was found under type FeesStats", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_feesStats_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Reward_amount(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Reward_amount(ctx, field) +func (ec *executionContext) _Query_feesStatsForParty(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_feesStatsForParty(ctx, field) if err != nil { return graphql.Null } @@ -73334,38 +75267,58 @@ func (ec *executionContext) _Reward_amount(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Amount, nil + return ec.resolvers.Query().FeesStatsForParty(rctx, fc.Args["partyId"].(string), fc.Args["assetId"].(*string), fc.Args["fromEpoch"].(*int), fc.Args["toEpoch"].(*int)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.FeesStatsForParty) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOFeesStatsForParty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFeesStatsForParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Reward_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_feesStatsForParty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Reward", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "assetId": + return ec.fieldContext_FeesStatsForParty_assetId(ctx, field) + case "totalRewardsReceived": + return ec.fieldContext_FeesStatsForParty_totalRewardsReceived(ctx, field) + case "refereesDiscountApplied": + return ec.fieldContext_FeesStatsForParty_refereesDiscountApplied(ctx, field) + case "volumeDiscountApplied": + return ec.fieldContext_FeesStatsForParty_volumeDiscountApplied(ctx, field) + case "totalMakerFeesReceived": + return ec.fieldContext_FeesStatsForParty_totalMakerFeesReceived(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type FeesStatsForParty", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_feesStatsForParty_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Reward_percentageOfTotal(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Reward_percentageOfTotal(ctx, field) +func (ec *executionContext) _Query_fundingPayments(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_fundingPayments(ctx, field) if err != nil { return graphql.Null } @@ -73378,7 +75331,7 @@ func (ec *executionContext) _Reward_percentageOfTotal(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PercentageOfTotal, nil + return ec.resolvers.Query().FundingPayments(rctx, fc.Args["partyId"].(string), fc.Args["marketId"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -73390,26 +75343,43 @@ func (ec *executionContext) _Reward_percentageOfTotal(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.FundingPaymentConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNFundingPaymentConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPaymentConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Reward_percentageOfTotal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_fundingPayments(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Reward", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_FundingPaymentConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_FundingPaymentConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type FundingPaymentConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_fundingPayments_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Reward_receivedAt(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Reward_receivedAt(ctx, field) +func (ec *executionContext) _Query_fundingPeriods(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_fundingPeriods(ctx, field) if err != nil { return graphql.Null } @@ -73422,7 +75392,7 @@ func (ec *executionContext) _Reward_receivedAt(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReceivedAt, nil + return ec.resolvers.Query().FundingPeriods(rctx, fc.Args["marketId"].(string), fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -73434,26 +75404,43 @@ func (ec *executionContext) _Reward_receivedAt(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*v2.FundingPeriodConnection) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNFundingPeriodConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Reward_receivedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_fundingPeriods(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Reward", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_FundingPeriodConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_FundingPeriodConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type FundingPeriodConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_fundingPeriods_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Reward_lockedUntilEpoch(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Reward_lockedUntilEpoch(ctx, field) +func (ec *executionContext) _Query_fundingPeriodDataPoints(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_fundingPeriodDataPoints(ctx, field) if err != nil { return graphql.Null } @@ -73466,7 +75453,7 @@ func (ec *executionContext) _Reward_lockedUntilEpoch(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Reward().LockedUntilEpoch(rctx, obj) + return ec.resolvers.Query().FundingPeriodDataPoints(rctx, fc.Args["marketId"].(string), fc.Args["dateRange"].(*v2.DateRange), fc.Args["source"].(*v1.FundingPeriodDataPoint_Source), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -73478,36 +75465,43 @@ func (ec *executionContext) _Reward_lockedUntilEpoch(ctx context.Context, field } return graphql.Null } - res := resTmp.(*vega.Epoch) + res := resTmp.(*v2.FundingPeriodDataPointConnection) fc.Result = res - return ec.marshalNEpoch2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpoch(ctx, field.Selections, res) + return ec.marshalNFundingPeriodDataPointConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Reward_lockedUntilEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_fundingPeriodDataPoints(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Reward", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Epoch_id(ctx, field) - case "timestamps": - return ec.fieldContext_Epoch_timestamps(ctx, field) - case "validatorsConnection": - return ec.fieldContext_Epoch_validatorsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Epoch_delegationsConnection(ctx, field) + case "edges": + return ec.fieldContext_FundingPeriodDataPointConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_FundingPeriodDataPointConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Epoch", field.Name) + return nil, fmt.Errorf("no field named %q was found under type FundingPeriodDataPointConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_fundingPeriodDataPoints_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RewardEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.RewardEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardEdge_node(ctx, field) +func (ec *executionContext) _Query_games(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_games(ctx, field) if err != nil { return graphql.Null } @@ -73520,7 +75514,7 @@ func (ec *executionContext) _RewardEdge_node(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.Query().Games(rctx, fc.Args["gameId"].(*string), fc.Args["epochFrom"].(*int), fc.Args["epochTo"].(*int), fc.Args["entityScope"].(*vega.EntityScope), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -73532,46 +75526,43 @@ func (ec *executionContext) _RewardEdge_node(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(*vega.Reward) + res := resTmp.(*v2.GamesConnection) fc.Result = res - return ec.marshalNReward2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐReward(ctx, field.Selections, res) + return ec.marshalNGamesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGamesConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_games(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardEdge", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "asset": - return ec.fieldContext_Reward_asset(ctx, field) - case "marketId": - return ec.fieldContext_Reward_marketId(ctx, field) - case "rewardType": - return ec.fieldContext_Reward_rewardType(ctx, field) - case "party": - return ec.fieldContext_Reward_party(ctx, field) - case "epoch": - return ec.fieldContext_Reward_epoch(ctx, field) - case "amount": - return ec.fieldContext_Reward_amount(ctx, field) - case "percentageOfTotal": - return ec.fieldContext_Reward_percentageOfTotal(ctx, field) - case "receivedAt": - return ec.fieldContext_Reward_receivedAt(ctx, field) - case "lockedUntilEpoch": - return ec.fieldContext_Reward_lockedUntilEpoch(ctx, field) + case "edges": + return ec.fieldContext_GamesConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_GamesConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Reward", field.Name) + return nil, fmt.Errorf("no field named %q was found under type GamesConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_games_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RewardEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.RewardEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardEdge_cursor(ctx, field) +func (ec *executionContext) _Query_getMarketDataHistoryConnectionByID(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_getMarketDataHistoryConnectionByID(ctx, field) if err != nil { return graphql.Null } @@ -73584,38 +75575,52 @@ func (ec *executionContext) _RewardEdge_cursor(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.Query().GetMarketDataHistoryConnectionByID(rctx, fc.Args["id"].(string), fc.Args["start"].(*int64), fc.Args["end"].(*int64), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.MarketDataConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOMarketDataConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarketDataConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_getMarketDataHistoryConnectionByID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardEdge", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_MarketDataConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_MarketDataConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type MarketDataConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_getMarketDataHistoryConnectionByID_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RewardScore_rawValidatorScore(ctx context.Context, field graphql.CollectedField, obj *vega.RewardScore) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardScore_rawValidatorScore(ctx, field) +func (ec *executionContext) _Query_keyRotationsConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_keyRotationsConnection(ctx, field) if err != nil { return graphql.Null } @@ -73628,7 +75633,7 @@ func (ec *executionContext) _RewardScore_rawValidatorScore(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RawValidatorScore, nil + return ec.resolvers.Query().KeyRotationsConnection(rctx, fc.Args["id"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -73640,26 +75645,43 @@ func (ec *executionContext) _RewardScore_rawValidatorScore(ctx context.Context, } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.KeyRotationConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNKeyRotationConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐKeyRotationConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardScore_rawValidatorScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_keyRotationsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardScore", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_KeyRotationConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_KeyRotationConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type KeyRotationConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_keyRotationsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RewardScore_performanceScore(ctx context.Context, field graphql.CollectedField, obj *vega.RewardScore) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardScore_performanceScore(ctx, field) +func (ec *executionContext) _Query_ledgerEntries(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_ledgerEntries(ctx, field) if err != nil { return graphql.Null } @@ -73672,7 +75694,7 @@ func (ec *executionContext) _RewardScore_performanceScore(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PerformanceScore, nil + return ec.resolvers.Query().LedgerEntries(rctx, fc.Args["filter"].(*v2.LedgerEntryFilter), fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -73684,26 +75706,43 @@ func (ec *executionContext) _RewardScore_performanceScore(ctx context.Context, f } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.AggregatedLedgerEntriesConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNAggregatedLedgerEntriesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAggregatedLedgerEntriesConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardScore_performanceScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_ledgerEntries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardScore", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_AggregatedLedgerEntriesConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_AggregatedLedgerEntriesConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AggregatedLedgerEntriesConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_ledgerEntries_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RewardScore_multisigScore(ctx context.Context, field graphql.CollectedField, obj *vega.RewardScore) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardScore_multisigScore(ctx, field) +func (ec *executionContext) _Query_liquidityProviders(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_liquidityProviders(ctx, field) if err != nil { return graphql.Null } @@ -73716,38 +75755,52 @@ func (ec *executionContext) _RewardScore_multisigScore(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MultisigScore, nil + return ec.resolvers.Query().LiquidityProviders(rctx, fc.Args["partyId"].(*string), fc.Args["marketId"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.LiquidityProviderConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOLiquidityProviderConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐLiquidityProviderConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardScore_multisigScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_liquidityProviders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardScore", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_LiquidityProviderConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_LiquidityProviderConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityProviderConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_liquidityProviders_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RewardScore_validatorScore(ctx context.Context, field graphql.CollectedField, obj *vega.RewardScore) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardScore_validatorScore(ctx, field) +func (ec *executionContext) _Query_lastBlockHeight(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_lastBlockHeight(ctx, field) if err != nil { return graphql.Null } @@ -73760,7 +75813,7 @@ func (ec *executionContext) _RewardScore_validatorScore(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ValidatorScore, nil + return ec.resolvers.Query().LastBlockHeight(rctx) }) if err != nil { ec.Error(ctx, err) @@ -73777,12 +75830,12 @@ func (ec *executionContext) _RewardScore_validatorScore(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardScore_validatorScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_lastBlockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardScore", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -73790,8 +75843,8 @@ func (ec *executionContext) fieldContext_RewardScore_validatorScore(ctx context. return fc, nil } -func (ec *executionContext) _RewardScore_normalisedScore(ctx context.Context, field graphql.CollectedField, obj *vega.RewardScore) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardScore_normalisedScore(ctx, field) +func (ec *executionContext) _Query_market(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_market(ctx, field) if err != nil { return graphql.Null } @@ -73804,38 +75857,108 @@ func (ec *executionContext) _RewardScore_normalisedScore(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NormalisedScore, nil + return ec.resolvers.Query().Market(rctx, fc.Args["id"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Market) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardScore_normalisedScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardScore", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Market_id(ctx, field) + case "fees": + return ec.fieldContext_Market_fees(ctx, field) + case "tradableInstrument": + return ec.fieldContext_Market_tradableInstrument(ctx, field) + case "decimalPlaces": + return ec.fieldContext_Market_decimalPlaces(ctx, field) + case "positionDecimalPlaces": + return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) + case "openingAuction": + return ec.fieldContext_Market_openingAuction(ctx, field) + case "priceMonitoringSettings": + return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) + case "liquidityMonitoringParameters": + return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) + case "tradingMode": + return ec.fieldContext_Market_tradingMode(ctx, field) + case "state": + return ec.fieldContext_Market_state(ctx, field) + case "proposal": + return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) + case "ordersConnection": + return ec.fieldContext_Market_ordersConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Market_accountsConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Market_tradesConnection(ctx, field) + case "depth": + return ec.fieldContext_Market_depth(ctx, field) + case "candlesConnection": + return ec.fieldContext_Market_candlesConnection(ctx, field) + case "data": + return ec.fieldContext_Market_data(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Market_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) + case "marketTimestamps": + return ec.fieldContext_Market_marketTimestamps(ctx, field) + case "riskFactors": + return ec.fieldContext_Market_riskFactors(ctx, field) + case "linearSlippageFactor": + return ec.fieldContext_Market_linearSlippageFactor(ctx, field) + case "quadraticSlippageFactor": + return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) + case "parentMarketID": + return ec.fieldContext_Market_parentMarketID(ctx, field) + case "insurancePoolFraction": + return ec.fieldContext_Market_insurancePoolFraction(ctx, field) + case "successorMarketID": + return ec.fieldContext_Market_successorMarketID(ctx, field) + case "liquiditySLAParameters": + return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_market_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RewardScore_validatorStatus(ctx context.Context, field graphql.CollectedField, obj *vega.RewardScore) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardScore_validatorStatus(ctx, field) +func (ec *executionContext) _Query_marketsConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_marketsConnection(ctx, field) if err != nil { return graphql.Null } @@ -73848,38 +75971,52 @@ func (ec *executionContext) _RewardScore_validatorStatus(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ValidatorStatus, nil + return ec.resolvers.Query().MarketsConnection(rctx, fc.Args["id"].(*string), fc.Args["pagination"].(*v2.Pagination), fc.Args["includeSettled"].(*bool)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(vega.ValidatorNodeStatus) + res := resTmp.(*v2.MarketConnection) fc.Result = res - return ec.marshalNValidatorStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐValidatorNodeStatus(ctx, field.Selections, res) + return ec.marshalOMarketConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐMarketConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardScore_validatorStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_marketsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardScore", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ValidatorStatus does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_MarketConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_MarketConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type MarketConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_marketsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RewardSummary_asset(ctx context.Context, field graphql.CollectedField, obj *vega.RewardSummary) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardSummary_asset(ctx, field) +func (ec *executionContext) _Query_mostRecentHistorySegment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_mostRecentHistorySegment(ctx, field) if err != nil { return graphql.Null } @@ -73892,7 +76029,7 @@ func (ec *executionContext) _RewardSummary_asset(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.RewardSummary().Asset(rctx, obj) + return ec.resolvers.Query().MostRecentHistorySegment(rctx) }) if err != nil { ec.Error(ctx, err) @@ -73904,58 +76041,34 @@ func (ec *executionContext) _RewardSummary_asset(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(*v2.HistorySegment) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalNHistorySegment2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐHistorySegment(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardSummary_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_mostRecentHistorySegment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardSummary", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + case "fromHeight": + return ec.fieldContext_HistorySegment_fromHeight(ctx, field) + case "toHeight": + return ec.fieldContext_HistorySegment_toHeight(ctx, field) + case "historySegmentId": + return ec.fieldContext_HistorySegment_historySegmentId(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, fmt.Errorf("no field named %q was found under type HistorySegment", field.Name) }, } return fc, nil } -func (ec *executionContext) _RewardSummary_amount(ctx context.Context, field graphql.CollectedField, obj *vega.RewardSummary) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardSummary_amount(ctx, field) +func (ec *executionContext) _Query_networkLimits(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_networkLimits(ctx, field) if err != nil { return graphql.Null } @@ -73968,38 +76081,51 @@ func (ec *executionContext) _RewardSummary_amount(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Amount, nil + return ec.resolvers.Query().NetworkLimits(rctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.NetworkLimits) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalONetworkLimits2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNetworkLimits(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardSummary_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_networkLimits(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardSummary", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "canProposeMarket": + return ec.fieldContext_NetworkLimits_canProposeMarket(ctx, field) + case "canProposeAsset": + return ec.fieldContext_NetworkLimits_canProposeAsset(ctx, field) + case "proposeMarketEnabled": + return ec.fieldContext_NetworkLimits_proposeMarketEnabled(ctx, field) + case "proposeAssetEnabled": + return ec.fieldContext_NetworkLimits_proposeAssetEnabled(ctx, field) + case "genesisLoaded": + return ec.fieldContext_NetworkLimits_genesisLoaded(ctx, field) + case "proposeMarketEnabledFrom": + return ec.fieldContext_NetworkLimits_proposeMarketEnabledFrom(ctx, field) + case "proposeAssetEnabledFrom": + return ec.fieldContext_NetworkLimits_proposeAssetEnabledFrom(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NetworkLimits", field.Name) }, } return fc, nil } -func (ec *executionContext) _RewardSummary_rewardsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.RewardSummary) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardSummary_rewardsConnection(ctx, field) +func (ec *executionContext) _Query_networkParameter(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_networkParameter(ctx, field) if err != nil { return graphql.Null } @@ -74012,7 +76138,7 @@ func (ec *executionContext) _RewardSummary_rewardsConnection(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.RewardSummary().RewardsConnection(rctx, obj, fc.Args["assetId"].(*string), fc.Args["pagination"].(*v2.Pagination)) + return ec.resolvers.Query().NetworkParameter(rctx, fc.Args["key"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -74021,25 +76147,25 @@ func (ec *executionContext) _RewardSummary_rewardsConnection(ctx context.Context if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.RewardsConnection) + res := resTmp.(*vega.NetworkParameter) fc.Result = res - return ec.marshalORewardsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐRewardsConnection(ctx, field.Selections, res) + return ec.marshalONetworkParameter2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNetworkParameter(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardSummary_rewardsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_networkParameter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardSummary", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_RewardsConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_RewardsConnection_pageInfo(ctx, field) + case "key": + return ec.fieldContext_NetworkParameter_key(ctx, field) + case "value": + return ec.fieldContext_NetworkParameter_value(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type RewardsConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type NetworkParameter", field.Name) }, } defer func() { @@ -74049,15 +76175,15 @@ func (ec *executionContext) fieldContext_RewardSummary_rewardsConnection(ctx con } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_RewardSummary_rewardsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Query_networkParameter_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return } return fc, nil } -func (ec *executionContext) _RewardSummaryConnection_edges(ctx context.Context, field graphql.CollectedField, obj *RewardSummaryConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardSummaryConnection_edges(ctx, field) +func (ec *executionContext) _Query_networkParametersConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_networkParametersConnection(ctx, field) if err != nil { return graphql.Null } @@ -74070,41 +76196,55 @@ func (ec *executionContext) _RewardSummaryConnection_edges(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.Query().NetworkParametersConnection(rctx, fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*RewardSummaryEdge) + res := resTmp.(*v2.NetworkParameterConnection) fc.Result = res - return ec.marshalORewardSummaryEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐRewardSummaryEdge(ctx, field.Selections, res) + return ec.marshalNNetworkParametersConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNetworkParameterConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardSummaryConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_networkParametersConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardSummaryConnection", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_RewardSummaryEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_RewardSummaryEdge_cursor(ctx, field) + case "edges": + return ec.fieldContext_NetworkParametersConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_NetworkParametersConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type RewardSummaryEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type NetworkParametersConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_networkParametersConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RewardSummaryConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *RewardSummaryConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardSummaryConnection_pageInfo(ctx, field) +func (ec *executionContext) _Query_node(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_node(ctx, field) if err != nil { return graphql.Null } @@ -74117,51 +76257,85 @@ func (ec *executionContext) _RewardSummaryConnection_pageInfo(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.Query().Node(rctx, fc.Args["id"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(*vega.Node) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalONode2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardSummaryConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardSummaryConnection", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) _RewardSummaryEdge_node(ctx context.Context, field graphql.CollectedField, obj *RewardSummaryEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardSummaryEdge_node(ctx, field) - if err != nil { - return graphql.Null - } + case "id": + return ec.fieldContext_Node_id(ctx, field) + case "pubkey": + return ec.fieldContext_Node_pubkey(ctx, field) + case "tmPubkey": + return ec.fieldContext_Node_tmPubkey(ctx, field) + case "ethereumAddress": + return ec.fieldContext_Node_ethereumAddress(ctx, field) + case "infoUrl": + return ec.fieldContext_Node_infoUrl(ctx, field) + case "location": + return ec.fieldContext_Node_location(ctx, field) + case "stakedByOperator": + return ec.fieldContext_Node_stakedByOperator(ctx, field) + case "stakedByDelegates": + return ec.fieldContext_Node_stakedByDelegates(ctx, field) + case "stakedTotal": + return ec.fieldContext_Node_stakedTotal(ctx, field) + case "pendingStake": + return ec.fieldContext_Node_pendingStake(ctx, field) + case "epochData": + return ec.fieldContext_Node_epochData(ctx, field) + case "status": + return ec.fieldContext_Node_status(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Node_delegationsConnection(ctx, field) + case "rewardScore": + return ec.fieldContext_Node_rewardScore(ctx, field) + case "rankingScore": + return ec.fieldContext_Node_rankingScore(ctx, field) + case "name": + return ec.fieldContext_Node_name(ctx, field) + case "avatarUrl": + return ec.fieldContext_Node_avatarUrl(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Node", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_node_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_nodeData(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_nodeData(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { @@ -74171,46 +76345,51 @@ func (ec *executionContext) _RewardSummaryEdge_node(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.Query().NodeData(rctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.RewardSummary) + res := resTmp.(*vega.NodeData) fc.Result = res - return ec.marshalNRewardSummary2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐRewardSummary(ctx, field.Selections, res) + return ec.marshalONodeData2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNodeData(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardSummaryEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_nodeData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardSummaryEdge", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "asset": - return ec.fieldContext_RewardSummary_asset(ctx, field) - case "amount": - return ec.fieldContext_RewardSummary_amount(ctx, field) - case "rewardsConnection": - return ec.fieldContext_RewardSummary_rewardsConnection(ctx, field) + case "stakedTotal": + return ec.fieldContext_NodeData_stakedTotal(ctx, field) + case "totalNodes": + return ec.fieldContext_NodeData_totalNodes(ctx, field) + case "inactiveNodes": + return ec.fieldContext_NodeData_inactiveNodes(ctx, field) + case "tendermintNodes": + return ec.fieldContext_NodeData_tendermintNodes(ctx, field) + case "ersatzNodes": + return ec.fieldContext_NodeData_ersatzNodes(ctx, field) + case "pendingNodes": + return ec.fieldContext_NodeData_pendingNodes(ctx, field) + case "uptime": + return ec.fieldContext_NodeData_uptime(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type RewardSummary", field.Name) + return nil, fmt.Errorf("no field named %q was found under type NodeData", field.Name) }, } return fc, nil } -func (ec *executionContext) _RewardSummaryEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *RewardSummaryEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardSummaryEdge_cursor(ctx, field) +func (ec *executionContext) _Query_nodesConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_nodesConnection(ctx, field) if err != nil { return graphql.Null } @@ -74223,7 +76402,7 @@ func (ec *executionContext) _RewardSummaryEdge_cursor(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.Query().NodesConnection(rctx, fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -74235,26 +76414,43 @@ func (ec *executionContext) _RewardSummaryEdge_cursor(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.NodesConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNNodesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNodesConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardSummaryEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_nodesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardSummaryEdge", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_NodesConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_NodesConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type NodesConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_nodesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RewardsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.RewardsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardsConnection_edges(ctx, field) +func (ec *executionContext) _Query_nodeSignaturesConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_nodeSignaturesConnection(ctx, field) if err != nil { return graphql.Null } @@ -74267,7 +76463,7 @@ func (ec *executionContext) _RewardsConnection_edges(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.Query().NodeSignaturesConnection(rctx, fc.Args["resourceId"].(string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -74276,32 +76472,43 @@ func (ec *executionContext) _RewardsConnection_edges(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.([]*v2.RewardEdge) + res := resTmp.(*v2.NodeSignaturesConnection) fc.Result = res - return ec.marshalORewardEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐRewardEdge(ctx, field.Selections, res) + return ec.marshalONodeSignaturesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐNodeSignaturesConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_nodeSignaturesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardsConnection", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_RewardEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_RewardEdge_cursor(ctx, field) + case "edges": + return ec.fieldContext_NodeSignaturesConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_NodeSignaturesConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type RewardEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type NodeSignaturesConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_nodeSignaturesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RewardsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.RewardsConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RewardsConnection_pageInfo(ctx, field) +func (ec *executionContext) _Query_oracleDataBySpecConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_oracleDataBySpecConnection(ctx, field) if err != nil { return graphql.Null } @@ -74314,7 +76521,7 @@ func (ec *executionContext) _RewardsConnection_pageInfo(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.Query().OracleDataBySpecConnection(rctx, fc.Args["oracleSpecId"].(string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -74323,36 +76530,43 @@ func (ec *executionContext) _RewardsConnection_pageInfo(ctx context.Context, fie if resTmp == nil { return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(*v2.OracleDataConnection) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalOOracleDataConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOracleDataConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RewardsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_oracleDataBySpecConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RewardsConnection", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "edges": + return ec.fieldContext_OracleDataConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_OracleDataConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, fmt.Errorf("no field named %q was found under type OracleDataConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_oracleDataBySpecConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RiskFactor_market(ctx context.Context, field graphql.CollectedField, obj *vega.RiskFactor) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RiskFactor_market(ctx, field) +func (ec *executionContext) _Query_oracleDataConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_oracleDataConnection(ctx, field) if err != nil { return graphql.Null } @@ -74365,38 +76579,52 @@ func (ec *executionContext) _RiskFactor_market(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Market, nil + return ec.resolvers.Query().OracleDataConnection(rctx, fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.OracleDataConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOOracleDataConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOracleDataConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RiskFactor_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_oracleDataConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RiskFactor", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_OracleDataConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_OracleDataConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OracleDataConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_oracleDataConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RiskFactor_short(ctx context.Context, field graphql.CollectedField, obj *vega.RiskFactor) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RiskFactor_short(ctx, field) +func (ec *executionContext) _Query_oracleSpec(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_oracleSpec(ctx, field) if err != nil { return graphql.Null } @@ -74409,38 +76637,52 @@ func (ec *executionContext) _RiskFactor_short(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Short, nil + return ec.resolvers.Query().OracleSpec(rctx, fc.Args["oracleSpecId"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.OracleSpec) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOOracleSpec2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOracleSpec(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RiskFactor_short(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_oracleSpec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RiskFactor", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "dataSourceSpec": + return ec.fieldContext_OracleSpec_dataSourceSpec(ctx, field) + case "dataConnection": + return ec.fieldContext_OracleSpec_dataConnection(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OracleSpec", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_oracleSpec_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _RiskFactor_long(ctx context.Context, field graphql.CollectedField, obj *vega.RiskFactor) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_RiskFactor_long(ctx, field) +func (ec *executionContext) _Query_oracleSpecsConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_oracleSpecsConnection(ctx, field) if err != nil { return graphql.Null } @@ -74453,38 +76695,52 @@ func (ec *executionContext) _RiskFactor_long(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Long, nil + return ec.resolvers.Query().OracleSpecsConnection(rctx, fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.OracleSpecsConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOOracleSpecsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOracleSpecsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RiskFactor_long(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_oracleSpecsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "RiskFactor", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_OracleSpecsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_OracleSpecsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OracleSpecsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_oracleSpecsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ScalingFactors_searchLevel(ctx context.Context, field graphql.CollectedField, obj *vega.ScalingFactors) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ScalingFactors_searchLevel(ctx, field) +func (ec *executionContext) _Query_orderByID(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_orderByID(ctx, field) if err != nil { return graphql.Null } @@ -74497,7 +76753,7 @@ func (ec *executionContext) _ScalingFactors_searchLevel(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SearchLevel, nil + return ec.resolvers.Query().OrderByID(rctx, fc.Args["id"].(string), fc.Args["version"].(*int)) }) if err != nil { ec.Error(ctx, err) @@ -74509,26 +76765,83 @@ func (ec *executionContext) _ScalingFactors_searchLevel(ctx context.Context, fie } return graphql.Null } - res := resTmp.(float64) + res := resTmp.(*vega.Order) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalNOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScalingFactors_searchLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_orderByID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ScalingFactors", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Order_id(ctx, field) + case "price": + return ec.fieldContext_Order_price(ctx, field) + case "timeInForce": + return ec.fieldContext_Order_timeInForce(ctx, field) + case "side": + return ec.fieldContext_Order_side(ctx, field) + case "market": + return ec.fieldContext_Order_market(ctx, field) + case "size": + return ec.fieldContext_Order_size(ctx, field) + case "remaining": + return ec.fieldContext_Order_remaining(ctx, field) + case "party": + return ec.fieldContext_Order_party(ctx, field) + case "createdAt": + return ec.fieldContext_Order_createdAt(ctx, field) + case "expiresAt": + return ec.fieldContext_Order_expiresAt(ctx, field) + case "status": + return ec.fieldContext_Order_status(ctx, field) + case "reference": + return ec.fieldContext_Order_reference(ctx, field) + case "tradesConnection": + return ec.fieldContext_Order_tradesConnection(ctx, field) + case "type": + return ec.fieldContext_Order_type(ctx, field) + case "rejectionReason": + return ec.fieldContext_Order_rejectionReason(ctx, field) + case "version": + return ec.fieldContext_Order_version(ctx, field) + case "updatedAt": + return ec.fieldContext_Order_updatedAt(ctx, field) + case "peggedOrder": + return ec.fieldContext_Order_peggedOrder(ctx, field) + case "liquidityProvision": + return ec.fieldContext_Order_liquidityProvision(ctx, field) + case "postOnly": + return ec.fieldContext_Order_postOnly(ctx, field) + case "reduceOnly": + return ec.fieldContext_Order_reduceOnly(ctx, field) + case "icebergOrder": + return ec.fieldContext_Order_icebergOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Order", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_orderByID_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ScalingFactors_initialMargin(ctx context.Context, field graphql.CollectedField, obj *vega.ScalingFactors) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ScalingFactors_initialMargin(ctx, field) +func (ec *executionContext) _Query_orderByReference(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_orderByReference(ctx, field) if err != nil { return graphql.Null } @@ -74541,7 +76854,7 @@ func (ec *executionContext) _ScalingFactors_initialMargin(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InitialMargin, nil + return ec.resolvers.Query().OrderByReference(rctx, fc.Args["reference"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -74553,26 +76866,83 @@ func (ec *executionContext) _ScalingFactors_initialMargin(ctx context.Context, f } return graphql.Null } - res := resTmp.(float64) + res := resTmp.(*vega.Order) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalNOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScalingFactors_initialMargin(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_orderByReference(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ScalingFactors", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Order_id(ctx, field) + case "price": + return ec.fieldContext_Order_price(ctx, field) + case "timeInForce": + return ec.fieldContext_Order_timeInForce(ctx, field) + case "side": + return ec.fieldContext_Order_side(ctx, field) + case "market": + return ec.fieldContext_Order_market(ctx, field) + case "size": + return ec.fieldContext_Order_size(ctx, field) + case "remaining": + return ec.fieldContext_Order_remaining(ctx, field) + case "party": + return ec.fieldContext_Order_party(ctx, field) + case "createdAt": + return ec.fieldContext_Order_createdAt(ctx, field) + case "expiresAt": + return ec.fieldContext_Order_expiresAt(ctx, field) + case "status": + return ec.fieldContext_Order_status(ctx, field) + case "reference": + return ec.fieldContext_Order_reference(ctx, field) + case "tradesConnection": + return ec.fieldContext_Order_tradesConnection(ctx, field) + case "type": + return ec.fieldContext_Order_type(ctx, field) + case "rejectionReason": + return ec.fieldContext_Order_rejectionReason(ctx, field) + case "version": + return ec.fieldContext_Order_version(ctx, field) + case "updatedAt": + return ec.fieldContext_Order_updatedAt(ctx, field) + case "peggedOrder": + return ec.fieldContext_Order_peggedOrder(ctx, field) + case "liquidityProvision": + return ec.fieldContext_Order_liquidityProvision(ctx, field) + case "postOnly": + return ec.fieldContext_Order_postOnly(ctx, field) + case "reduceOnly": + return ec.fieldContext_Order_reduceOnly(ctx, field) + case "icebergOrder": + return ec.fieldContext_Order_icebergOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Order", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_orderByReference_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _ScalingFactors_collateralRelease(ctx context.Context, field graphql.CollectedField, obj *vega.ScalingFactors) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ScalingFactors_collateralRelease(ctx, field) +func (ec *executionContext) _Query_orderVersionsConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_orderVersionsConnection(ctx, field) if err != nil { return graphql.Null } @@ -74585,38 +76955,52 @@ func (ec *executionContext) _ScalingFactors_collateralRelease(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CollateralRelease, nil + return ec.resolvers.Query().OrderVersionsConnection(rctx, fc.Args["orderId"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(float64) + res := resTmp.(*v2.OrderConnection) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalOOrderConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOrderConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScalingFactors_collateralRelease(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_orderVersionsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ScalingFactors", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_OrderConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_OrderConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OrderConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_orderVersionsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SettleDistressed_marketId(ctx context.Context, field graphql.CollectedField, obj *SettleDistressed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SettleDistressed_marketId(ctx, field) +func (ec *executionContext) _Query_paidLiquidityFees(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_paidLiquidityFees(ctx, field) if err != nil { return graphql.Null } @@ -74629,38 +77013,52 @@ func (ec *executionContext) _SettleDistressed_marketId(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketID, nil + return ec.resolvers.Query().PaidLiquidityFees(rctx, fc.Args["marketId"].(*string), fc.Args["assetId"].(*string), fc.Args["epoch"].(*int), fc.Args["partyIDs"].([]string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PaidLiquidityFeesConnection) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOPaidLiquidityFeesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPaidLiquidityFeesConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SettleDistressed_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_paidLiquidityFees(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SettleDistressed", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_PaidLiquidityFeesConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_PaidLiquidityFeesConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PaidLiquidityFeesConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_paidLiquidityFees_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SettleDistressed_partyId(ctx context.Context, field graphql.CollectedField, obj *SettleDistressed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SettleDistressed_partyId(ctx, field) +func (ec *executionContext) _Query_partiesConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_partiesConnection(ctx, field) if err != nil { return graphql.Null } @@ -74673,38 +77071,52 @@ func (ec *executionContext) _SettleDistressed_partyId(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PartyID, nil + return ec.resolvers.Query().PartiesConnection(rctx, fc.Args["id"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PartyConnection) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOPartyConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SettleDistressed_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_partiesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SettleDistressed", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_PartyConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_PartyConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_partiesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SettleDistressed_margin(ctx context.Context, field graphql.CollectedField, obj *SettleDistressed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SettleDistressed_margin(ctx, field) +func (ec *executionContext) _Query_partiesProfilesConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_partiesProfilesConnection(ctx, field) if err != nil { return graphql.Null } @@ -74717,38 +77129,52 @@ func (ec *executionContext) _SettleDistressed_margin(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Margin, nil + return ec.resolvers.Query().PartiesProfilesConnection(rctx, fc.Args["ids"].([]string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PartiesProfilesConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOPartiesProfilesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartiesProfilesConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SettleDistressed_margin(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_partiesProfilesConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SettleDistressed", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_PartiesProfilesConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_PartiesProfilesConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartiesProfilesConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_partiesProfilesConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SettleDistressed_price(ctx context.Context, field graphql.CollectedField, obj *SettleDistressed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SettleDistressed_price(ctx, field) +func (ec *executionContext) _Query_party(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_party(ctx, field) if err != nil { return graphql.Null } @@ -74761,38 +77187,88 @@ func (ec *executionContext) _SettleDistressed_price(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Price, nil + return ec.resolvers.Query().Party(rctx, fc.Args["id"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Party) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SettleDistressed_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SettleDistressed", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_party_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SettlePosition_marketId(ctx context.Context, field graphql.CollectedField, obj *SettlePosition) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SettlePosition_marketId(ctx, field) +func (ec *executionContext) _Query_positions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_positions(ctx, field) if err != nil { return graphql.Null } @@ -74805,38 +77281,52 @@ func (ec *executionContext) _SettlePosition_marketId(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MarketID, nil + return ec.resolvers.Query().Positions(rctx, fc.Args["filter"].(*v2.PositionsFilter), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PositionConnection) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOPositionConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPositionConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SettlePosition_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_positions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SettlePosition", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_PositionConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_PositionConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PositionConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_positions_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SettlePosition_partyId(ctx context.Context, field graphql.CollectedField, obj *SettlePosition) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SettlePosition_partyId(ctx, field) +func (ec *executionContext) _Query_proposal(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_proposal(ctx, field) if err != nil { return graphql.Null } @@ -74849,38 +77339,46 @@ func (ec *executionContext) _SettlePosition_partyId(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PartyID, nil + return ec.resolvers.Query().Proposal(rctx, fc.Args["id"].(*string), fc.Args["reference"].(*string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(ProposalNode) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOProposalNode2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalNode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SettlePosition_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_proposal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SettlePosition", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type ProposalNode does not have child fields") }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_proposal_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SettlePosition_price(ctx context.Context, field graphql.CollectedField, obj *SettlePosition) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SettlePosition_price(ctx, field) +func (ec *executionContext) _Query_proposalsConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_proposalsConnection(ctx, field) if err != nil { return graphql.Null } @@ -74893,38 +77391,52 @@ func (ec *executionContext) _SettlePosition_price(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Price, nil + return ec.resolvers.Query().ProposalsConnection(rctx, fc.Args["proposalType"].(*v2.ListGovernanceDataRequest_Type), fc.Args["inState"].(*vega.Proposal_State), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.GovernanceDataConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOProposalsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGovernanceDataConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SettlePosition_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_proposalsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SettlePosition", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_ProposalsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_ProposalsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProposalsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_proposalsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SettlePosition_tradeSettlements(ctx context.Context, field graphql.CollectedField, obj *SettlePosition) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SettlePosition_tradeSettlements(ctx, field) +func (ec *executionContext) _Query_protocolUpgradeStatus(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_protocolUpgradeStatus(ctx, field) if err != nil { return graphql.Null } @@ -74937,7 +77449,7 @@ func (ec *executionContext) _SettlePosition_tradeSettlements(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TradeSettlements, nil + return ec.resolvers.Query().ProtocolUpgradeStatus(rctx) }) if err != nil { ec.Error(ctx, err) @@ -74946,32 +77458,30 @@ func (ec *executionContext) _SettlePosition_tradeSettlements(ctx context.Context if resTmp == nil { return graphql.Null } - res := resTmp.([]*TradeSettlement) + res := resTmp.(*ProtocolUpgradeStatus) fc.Result = res - return ec.marshalOTradeSettlement2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTradeSettlementᚄ(ctx, field.Selections, res) + return ec.marshalOProtocolUpgradeStatus2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProtocolUpgradeStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SettlePosition_tradeSettlements(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_protocolUpgradeStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SettlePosition", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "size": - return ec.fieldContext_TradeSettlement_size(ctx, field) - case "price": - return ec.fieldContext_TradeSettlement_price(ctx, field) + case "ready": + return ec.fieldContext_ProtocolUpgradeStatus_ready(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type TradeSettlement", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ProtocolUpgradeStatus", field.Name) }, } return fc, nil } -func (ec *executionContext) _Signer_signer(ctx context.Context, field graphql.CollectedField, obj *Signer) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Signer_signer(ctx, field) +func (ec *executionContext) _Query_protocolUpgradeProposals(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_protocolUpgradeProposals(ctx, field) if err != nil { return graphql.Null } @@ -74984,38 +77494,52 @@ func (ec *executionContext) _Signer_signer(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Signer, nil + return ec.resolvers.Query().ProtocolUpgradeProposals(rctx, fc.Args["inState"].(*v1.ProtocolUpgradeProposalStatus), fc.Args["approvedBy"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(SignerKind) + res := resTmp.(*v2.ProtocolUpgradeProposalConnection) fc.Result = res - return ec.marshalNSignerKind2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐSignerKind(ctx, field.Selections, res) + return ec.marshalOProtocolUpgradeProposalConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐProtocolUpgradeProposalConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Signer_signer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_protocolUpgradeProposals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Signer", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type SignerKind does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_ProtocolUpgradeProposalConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_ProtocolUpgradeProposalConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProtocolUpgradeProposalConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_protocolUpgradeProposals_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SimpleRiskModel_params(ctx context.Context, field graphql.CollectedField, obj *vega.SimpleRiskModel) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SimpleRiskModel_params(ctx, field) +func (ec *executionContext) _Query_referralSets(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_referralSets(ctx, field) if err != nil { return graphql.Null } @@ -75028,7 +77552,7 @@ func (ec *executionContext) _SimpleRiskModel_params(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Params, nil + return ec.resolvers.Query().ReferralSets(rctx, fc.Args["id"].(*string), fc.Args["referrer"].(*string), fc.Args["referee"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -75040,32 +77564,43 @@ func (ec *executionContext) _SimpleRiskModel_params(ctx context.Context, field g } return graphql.Null } - res := resTmp.(*vega.SimpleModelParams) + res := resTmp.(*v2.ReferralSetConnection) fc.Result = res - return ec.marshalNSimpleRiskModelParams2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐSimpleModelParams(ctx, field.Selections, res) + return ec.marshalNReferralSetConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SimpleRiskModel_params(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_referralSets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SimpleRiskModel", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "factorLong": - return ec.fieldContext_SimpleRiskModelParams_factorLong(ctx, field) - case "factorShort": - return ec.fieldContext_SimpleRiskModelParams_factorShort(ctx, field) + case "edges": + return ec.fieldContext_ReferralSetConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_ReferralSetConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SimpleRiskModelParams", field.Name) + return nil, fmt.Errorf("no field named %q was found under type ReferralSetConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_referralSets_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SimpleRiskModelParams_factorLong(ctx context.Context, field graphql.CollectedField, obj *vega.SimpleModelParams) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SimpleRiskModelParams_factorLong(ctx, field) +func (ec *executionContext) _Query_referralSetReferees(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_referralSetReferees(ctx, field) if err != nil { return graphql.Null } @@ -75078,7 +77613,7 @@ func (ec *executionContext) _SimpleRiskModelParams_factorLong(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.FactorLong, nil + return ec.resolvers.Query().ReferralSetReferees(rctx, fc.Args["id"].(*string), fc.Args["referrer"].(*string), fc.Args["referee"].(*string), fc.Args["pagination"].(*v2.Pagination), fc.Args["aggregationEpochs"].(*int)) }) if err != nil { ec.Error(ctx, err) @@ -75090,26 +77625,43 @@ func (ec *executionContext) _SimpleRiskModelParams_factorLong(ctx context.Contex } return graphql.Null } - res := resTmp.(float64) + res := resTmp.(*v2.ReferralSetRefereeConnection) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalNReferralSetRefereeConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetRefereeConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SimpleRiskModelParams_factorLong(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_referralSetReferees(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SimpleRiskModelParams", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_ReferralSetRefereeConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_ReferralSetRefereeConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ReferralSetRefereeConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_referralSetReferees_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SimpleRiskModelParams_factorShort(ctx context.Context, field graphql.CollectedField, obj *vega.SimpleModelParams) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SimpleRiskModelParams_factorShort(ctx, field) +func (ec *executionContext) _Query_referralSetStats(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_referralSetStats(ctx, field) if err != nil { return graphql.Null } @@ -75122,7 +77674,7 @@ func (ec *executionContext) _SimpleRiskModelParams_factorShort(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.FactorShort, nil + return ec.resolvers.Query().ReferralSetStats(rctx, fc.Args["setId"].(*string), fc.Args["epoch"].(*int), fc.Args["partyId"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -75134,26 +77686,43 @@ func (ec *executionContext) _SimpleRiskModelParams_factorShort(ctx context.Conte } return graphql.Null } - res := resTmp.(float64) + res := resTmp.(*v2.ReferralSetStatsConnection) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalNReferralSetStatsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetStatsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SimpleRiskModelParams_factorShort(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_referralSetStats(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SimpleRiskModelParams", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_ReferralSetStatsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_ReferralSetStatsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ReferralSetStatsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_referralSetStats_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Spot_baseAsset(ctx context.Context, field graphql.CollectedField, obj *vega.Spot) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Spot_baseAsset(ctx, field) +func (ec *executionContext) _Query_statistics(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_statistics(ctx, field) if err != nil { return graphql.Null } @@ -75166,7 +77735,7 @@ func (ec *executionContext) _Spot_baseAsset(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Spot().BaseAsset(rctx, obj) + return ec.resolvers.Query().Statistics(rctx) }) if err != nil { ec.Error(ctx, err) @@ -75178,58 +77747,82 @@ func (ec *executionContext) _Spot_baseAsset(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(*v12.Statistics) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalNStatistics2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋapiᚋv1ᚐStatistics(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Spot_baseAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_statistics(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Spot", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) + case "blockHeight": + return ec.fieldContext_Statistics_blockHeight(ctx, field) + case "blockHash": + return ec.fieldContext_Statistics_blockHash(ctx, field) + case "backlogLength": + return ec.fieldContext_Statistics_backlogLength(ctx, field) + case "totalPeers": + return ec.fieldContext_Statistics_totalPeers(ctx, field) + case "genesisTime": + return ec.fieldContext_Statistics_genesisTime(ctx, field) + case "currentTime": + return ec.fieldContext_Statistics_currentTime(ctx, field) + case "upTime": + return ec.fieldContext_Statistics_upTime(ctx, field) + case "vegaTime": + return ec.fieldContext_Statistics_vegaTime(ctx, field) case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + return ec.fieldContext_Statistics_status(ctx, field) + case "txPerBlock": + return ec.fieldContext_Statistics_txPerBlock(ctx, field) + case "averageTxBytes": + return ec.fieldContext_Statistics_averageTxBytes(ctx, field) + case "averageOrdersPerBlock": + return ec.fieldContext_Statistics_averageOrdersPerBlock(ctx, field) + case "tradesPerSecond": + return ec.fieldContext_Statistics_tradesPerSecond(ctx, field) + case "ordersPerSecond": + return ec.fieldContext_Statistics_ordersPerSecond(ctx, field) + case "totalMarkets": + return ec.fieldContext_Statistics_totalMarkets(ctx, field) + case "totalAmendOrder": + return ec.fieldContext_Statistics_totalAmendOrder(ctx, field) + case "totalCancelOrder": + return ec.fieldContext_Statistics_totalCancelOrder(ctx, field) + case "totalCreateOrder": + return ec.fieldContext_Statistics_totalCreateOrder(ctx, field) + case "totalOrders": + return ec.fieldContext_Statistics_totalOrders(ctx, field) + case "totalTrades": + return ec.fieldContext_Statistics_totalTrades(ctx, field) + case "eventCount": + return ec.fieldContext_Statistics_eventCount(ctx, field) + case "eventsPerSecond": + return ec.fieldContext_Statistics_eventsPerSecond(ctx, field) + case "appVersionHash": + return ec.fieldContext_Statistics_appVersionHash(ctx, field) + case "appVersion": + return ec.fieldContext_Statistics_appVersion(ctx, field) + case "chainVersion": + return ec.fieldContext_Statistics_chainVersion(ctx, field) + case "blockDuration": + return ec.fieldContext_Statistics_blockDuration(ctx, field) + case "chainId": + return ec.fieldContext_Statistics_chainId(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Statistics", field.Name) }, } return fc, nil } -func (ec *executionContext) _Spot_quoteAsset(ctx context.Context, field graphql.CollectedField, obj *vega.Spot) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Spot_quoteAsset(ctx, field) +func (ec *executionContext) _Query_stopOrder(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_stopOrder(ctx, field) if err != nil { return graphql.Null } @@ -75242,70 +77835,80 @@ func (ec *executionContext) _Spot_quoteAsset(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Spot().QuoteAsset(rctx, obj) + return ec.resolvers.Query().StopOrder(rctx, fc.Args["id"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(*v1.StopOrderEvent) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalOStopOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐStopOrderEvent(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Spot_quoteAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_stopOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Spot", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) + return ec.fieldContext_StopOrder_id(ctx, field) + case "ocoLinkId": + return ec.fieldContext_StopOrder_ocoLinkId(ctx, field) + case "expiresAt": + return ec.fieldContext_StopOrder_expiresAt(ctx, field) + case "expiryStrategy": + return ec.fieldContext_StopOrder_expiryStrategy(ctx, field) + case "triggerDirection": + return ec.fieldContext_StopOrder_triggerDirection(ctx, field) case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + return ec.fieldContext_StopOrder_status(ctx, field) + case "createdAt": + return ec.fieldContext_StopOrder_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_StopOrder_updatedAt(ctx, field) + case "partyId": + return ec.fieldContext_StopOrder_partyId(ctx, field) + case "marketId": + return ec.fieldContext_StopOrder_marketId(ctx, field) + case "trigger": + return ec.fieldContext_StopOrder_trigger(ctx, field) + case "submission": + return ec.fieldContext_StopOrder_submission(ctx, field) + case "order": + return ec.fieldContext_StopOrder_order(ctx, field) + case "rejectionReason": + return ec.fieldContext_StopOrder_rejectionReason(ctx, field) + case "sizeOverrideSetting": + return ec.fieldContext_StopOrder_sizeOverrideSetting(ctx, field) + case "sizeOverrideValue": + return ec.fieldContext_StopOrder_sizeOverrideValue(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, fmt.Errorf("no field named %q was found under type StopOrder", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_stopOrder_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _Spot_name(ctx context.Context, field graphql.CollectedField, obj *vega.Spot) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Spot_name(ctx, field) +func (ec *executionContext) _Query_stopOrders(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_stopOrders(ctx, field) if err != nil { return graphql.Null } @@ -75318,38 +77921,52 @@ func (ec *executionContext) _Spot_name(ctx context.Context, field graphql.Collec }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return ec.resolvers.Query().StopOrders(rctx, fc.Args["filter"].(*v2.StopOrderFilter), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.StopOrderConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOStopOrderConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐStopOrderConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Spot_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_stopOrders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Spot", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_StopOrderConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_StopOrderConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type StopOrderConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_stopOrders_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SpotProduct_baseAsset(ctx context.Context, field graphql.CollectedField, obj *vega.SpotProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SpotProduct_baseAsset(ctx, field) +func (ec *executionContext) _Query_successorMarkets(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_successorMarkets(ctx, field) if err != nil { return graphql.Null } @@ -75362,70 +77979,52 @@ func (ec *executionContext) _SpotProduct_baseAsset(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SpotProduct().BaseAsset(rctx, obj) + return ec.resolvers.Query().SuccessorMarkets(rctx, fc.Args["marketId"].(string), fc.Args["fullHistory"].(*bool), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(*v2.SuccessorMarketConnection) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalOSuccessorMarketConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐSuccessorMarketConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SpotProduct_baseAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_successorMarkets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SpotProduct", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + case "edges": + return ec.fieldContext_SuccessorMarketConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_SuccessorMarketConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, fmt.Errorf("no field named %q was found under type SuccessorMarketConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_successorMarkets_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SpotProduct_quoteAsset(ctx context.Context, field graphql.CollectedField, obj *vega.SpotProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SpotProduct_quoteAsset(ctx, field) +func (ec *executionContext) _Query_teams(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_teams(ctx, field) if err != nil { return graphql.Null } @@ -75438,70 +78037,52 @@ func (ec *executionContext) _SpotProduct_quoteAsset(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.SpotProduct().QuoteAsset(rctx, obj) + return ec.resolvers.Query().Teams(rctx, fc.Args["teamId"].(*string), fc.Args["partyId"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Asset) + res := resTmp.(*v2.TeamConnection) fc.Result = res - return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) + return ec.marshalOTeamConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SpotProduct_quoteAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_teams(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SpotProduct", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Asset_id(ctx, field) - case "name": - return ec.fieldContext_Asset_name(ctx, field) - case "symbol": - return ec.fieldContext_Asset_symbol(ctx, field) - case "decimals": - return ec.fieldContext_Asset_decimals(ctx, field) - case "quantum": - return ec.fieldContext_Asset_quantum(ctx, field) - case "source": - return ec.fieldContext_Asset_source(ctx, field) - case "status": - return ec.fieldContext_Asset_status(ctx, field) - case "infrastructureFeeAccount": - return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) - case "globalRewardPoolAccount": - return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) - case "globalInsuranceAccount": - return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) - case "networkTreasuryAccount": - return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) - case "takerFeeRewardAccount": - return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) - case "makerFeeRewardAccount": - return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) - case "lpFeeRewardAccount": - return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) - case "marketProposerRewardAccount": - return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + case "edges": + return ec.fieldContext_TeamConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_TeamConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TeamConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_teams_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _SpotProduct_name(ctx context.Context, field graphql.CollectedField, obj *vega.SpotProduct) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SpotProduct_name(ctx, field) +func (ec *executionContext) _Query_teamsStatistics(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_teamsStatistics(ctx, field) if err != nil { return graphql.Null } @@ -75514,38 +78095,52 @@ func (ec *executionContext) _SpotProduct_name(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return ec.resolvers.Query().TeamsStatistics(rctx, fc.Args["teamId"].(*string), fc.Args["aggregationEpochs"].(*int), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.TeamsStatisticsConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTeamsStatisticsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamsStatisticsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SpotProduct_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_teamsStatistics(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SpotProduct", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_TeamsStatisticsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_TeamsStatisticsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TeamsStatisticsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_teamsStatistics_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _StakeLinking_id(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakeLinking_id(ctx, field) +func (ec *executionContext) _Query_teamMembersStatistics(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_teamMembersStatistics(ctx, field) if err != nil { return graphql.Null } @@ -75558,38 +78153,52 @@ func (ec *executionContext) _StakeLinking_id(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id, nil + return ec.resolvers.Query().TeamMembersStatistics(rctx, fc.Args["teamId"].(string), fc.Args["partyId"].(*string), fc.Args["aggregationEpochs"].(*int), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.TeamMembersStatisticsConnection) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalOTeamMembersStatisticsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamMembersStatisticsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakeLinking_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_teamMembersStatistics(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakeLinking", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_TeamMembersStatisticsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_TeamMembersStatisticsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TeamMembersStatisticsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_teamMembersStatistics_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _StakeLinking_type(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakeLinking_type(ctx, field) +func (ec *executionContext) _Query_teamReferees(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_teamReferees(ctx, field) if err != nil { return graphql.Null } @@ -75602,38 +78211,52 @@ func (ec *executionContext) _StakeLinking_type(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return ec.resolvers.Query().TeamReferees(rctx, fc.Args["teamId"].(string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(v1.StakeLinking_Type) + res := resTmp.(*v2.TeamRefereeConnection) fc.Result = res - return ec.marshalNStakeLinkingType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐStakeLinking_Type(ctx, field.Selections, res) + return ec.marshalOTeamRefereeConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakeLinking_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_teamReferees(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakeLinking", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type StakeLinkingType does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_TeamRefereeConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_TeamRefereeConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TeamRefereeConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_teamReferees_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _StakeLinking_timestamp(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakeLinking_timestamp(ctx, field) +func (ec *executionContext) _Query_teamRefereeHistory(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_teamRefereeHistory(ctx, field) if err != nil { return graphql.Null } @@ -75646,38 +78269,52 @@ func (ec *executionContext) _StakeLinking_timestamp(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StakeLinking().Timestamp(rctx, obj) + return ec.resolvers.Query().TeamRefereeHistory(rctx, fc.Args["referee"].(string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*v2.TeamRefereeHistoryConnection) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOTeamRefereeHistoryConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistoryConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakeLinking_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_teamRefereeHistory(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakeLinking", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_TeamRefereeHistoryConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_TeamRefereeHistoryConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TeamRefereeHistoryConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_teamRefereeHistory_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _StakeLinking_party(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakeLinking_party(ctx, field) +func (ec *executionContext) _Query_totalTransferFeeDiscount(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_totalTransferFeeDiscount(ctx, field) if err != nil { return graphql.Null } @@ -75690,80 +78327,50 @@ func (ec *executionContext) _StakeLinking_party(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StakeLinking().Party(rctx, obj) + return ec.resolvers.Query().TotalTransferFeeDiscount(rctx, fc.Args["partyId"].(string), fc.Args["assetId"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*vega.Party) + res := resTmp.(*v2.GetTotalTransferFeeDiscountResponse) fc.Result = res - return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) + return ec.marshalOTotalTransferFeeDiscount2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGetTotalTransferFeeDiscountResponse(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakeLinking_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_totalTransferFeeDiscount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakeLinking", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Party_id(ctx, field) - case "ordersConnection": - return ec.fieldContext_Party_ordersConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Party_tradesConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Party_accountsConnection(ctx, field) - case "positionsConnection": - return ec.fieldContext_Party_positionsConnection(ctx, field) - case "marginsConnection": - return ec.fieldContext_Party_marginsConnection(ctx, field) - case "proposalsConnection": - return ec.fieldContext_Party_proposalsConnection(ctx, field) - case "votesConnection": - return ec.fieldContext_Party_votesConnection(ctx, field) - case "withdrawalsConnection": - return ec.fieldContext_Party_withdrawalsConnection(ctx, field) - case "depositsConnection": - return ec.fieldContext_Party_depositsConnection(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Party_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) - case "delegationsConnection": - return ec.fieldContext_Party_delegationsConnection(ctx, field) - case "stakingSummary": - return ec.fieldContext_Party_stakingSummary(ctx, field) - case "rewardsConnection": - return ec.fieldContext_Party_rewardsConnection(ctx, field) - case "rewardSummaries": - return ec.fieldContext_Party_rewardSummaries(ctx, field) - case "transfersConnection": - return ec.fieldContext_Party_transfersConnection(ctx, field) - case "activityStreak": - return ec.fieldContext_Party_activityStreak(ctx, field) - case "vestingBalancesSummary": - return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) - case "vestingStats": - return ec.fieldContext_Party_vestingStats(ctx, field) + case "totalDiscount": + return ec.fieldContext_TotalTransferFeeDiscount_totalDiscount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TotalTransferFeeDiscount", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_totalTransferFeeDiscount_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _StakeLinking_amount(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakeLinking_amount(ctx, field) +func (ec *executionContext) _Query_trades(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_trades(ctx, field) if err != nil { return graphql.Null } @@ -75776,38 +78383,52 @@ func (ec *executionContext) _StakeLinking_amount(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Amount, nil + return ec.resolvers.Query().Trades(rctx, fc.Args["filter"].(*TradesFilter), fc.Args["pagination"].(*v2.Pagination), fc.Args["dateRange"].(*v2.DateRange)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.TradeConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOTradeConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTradeConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakeLinking_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_trades(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakeLinking", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_TradeConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_TradeConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TradeConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_trades_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _StakeLinking_status(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakeLinking_status(ctx, field) +func (ec *executionContext) _Query_transfersConnection(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_transfersConnection(ctx, field) if err != nil { return graphql.Null } @@ -75820,38 +78441,52 @@ func (ec *executionContext) _StakeLinking_status(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return ec.resolvers.Query().TransfersConnection(rctx, fc.Args["partyId"].(*string), fc.Args["direction"].(*TransferDirection), fc.Args["pagination"].(*v2.Pagination), fc.Args["isReward"].(*bool), fc.Args["fromEpoch"].(*int), fc.Args["toEpoch"].(*int), fc.Args["status"].(*v1.Transfer_Status), fc.Args["scope"].(*v2.ListTransfersRequest_Scope)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(v1.StakeLinking_Status) + res := resTmp.(*v2.TransferConnection) fc.Result = res - return ec.marshalNStakeLinkingStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐStakeLinking_Status(ctx, field.Selections, res) + return ec.marshalOTransferConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTransferConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakeLinking_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_transfersConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakeLinking", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type StakeLinkingStatus does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_TransferConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_TransferConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TransferConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_transfersConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _StakeLinking_finalizedAt(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakeLinking_finalizedAt(ctx, field) +func (ec *executionContext) _Query_transfer(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_transfer(ctx, field) if err != nil { return graphql.Null } @@ -75864,7 +78499,7 @@ func (ec *executionContext) _StakeLinking_finalizedAt(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.FinalizedAt, nil + return ec.resolvers.Query().Transfer(rctx, fc.Args["id"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -75873,26 +78508,43 @@ func (ec *executionContext) _StakeLinking_finalizedAt(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*v2.TransferNode) fc.Result = res - return ec.marshalOTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOTransferNode2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTransferNode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakeLinking_finalizedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_transfer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakeLinking", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "transfer": + return ec.fieldContext_TransferNode_transfer(ctx, field) + case "fees": + return ec.fieldContext_TransferNode_fees(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TransferNode", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_transfer_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _StakeLinking_txHash(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakeLinking_txHash(ctx, field) +func (ec *executionContext) _Query_volumeDiscountStats(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_volumeDiscountStats(ctx, field) if err != nil { return graphql.Null } @@ -75905,7 +78557,7 @@ func (ec *executionContext) _StakeLinking_txHash(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TxHash, nil + return ec.resolvers.Query().VolumeDiscountStats(rctx, fc.Args["epoch"].(*int), fc.Args["partyId"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) @@ -75917,26 +78569,43 @@ func (ec *executionContext) _StakeLinking_txHash(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.VolumeDiscountStatsConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNVolumeDiscountStatsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐVolumeDiscountStatsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakeLinking_txHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_volumeDiscountStats(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakeLinking", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_VolumeDiscountStatsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_VolumeDiscountStatsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type VolumeDiscountStatsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_volumeDiscountStats_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _StakeLinking_blockHeight(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakeLinking_blockHeight(ctx, field) +func (ec *executionContext) _Query_withdrawal(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_withdrawal(ctx, field) if err != nil { return graphql.Null } @@ -75949,38 +78618,68 @@ func (ec *executionContext) _StakeLinking_blockHeight(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StakeLinking().BlockHeight(rctx, obj) + return ec.resolvers.Query().Withdrawal(rctx, fc.Args["id"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.Withdrawal) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOWithdrawal2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐWithdrawal(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakeLinking_blockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_withdrawal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakeLinking", + Object: "Query", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Withdrawal_id(ctx, field) + case "party": + return ec.fieldContext_Withdrawal_party(ctx, field) + case "amount": + return ec.fieldContext_Withdrawal_amount(ctx, field) + case "asset": + return ec.fieldContext_Withdrawal_asset(ctx, field) + case "status": + return ec.fieldContext_Withdrawal_status(ctx, field) + case "ref": + return ec.fieldContext_Withdrawal_ref(ctx, field) + case "createdTimestamp": + return ec.fieldContext_Withdrawal_createdTimestamp(ctx, field) + case "withdrawnTimestamp": + return ec.fieldContext_Withdrawal_withdrawnTimestamp(ctx, field) + case "txHash": + return ec.fieldContext_Withdrawal_txHash(ctx, field) + case "details": + return ec.fieldContext_Withdrawal_details(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Withdrawal", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_withdrawal_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _StakeLinkingEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.StakeLinkingEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakeLinkingEdge_node(ctx, field) +func (ec *executionContext) _Query_withdrawals(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_withdrawals(ctx, field) if err != nil { return graphql.Null } @@ -75993,58 +78692,52 @@ func (ec *executionContext) _StakeLinkingEdge_node(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.Query().Withdrawals(rctx, fc.Args["dateRange"].(*v2.DateRange), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v1.StakeLinking) + res := resTmp.(*v2.WithdrawalsConnection) fc.Result = res - return ec.marshalNStakeLinking2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐStakeLinking(ctx, field.Selections, res) + return ec.marshalOWithdrawalsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐWithdrawalsConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakeLinkingEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_withdrawals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakeLinkingEdge", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_StakeLinking_id(ctx, field) - case "type": - return ec.fieldContext_StakeLinking_type(ctx, field) - case "timestamp": - return ec.fieldContext_StakeLinking_timestamp(ctx, field) - case "party": - return ec.fieldContext_StakeLinking_party(ctx, field) - case "amount": - return ec.fieldContext_StakeLinking_amount(ctx, field) - case "status": - return ec.fieldContext_StakeLinking_status(ctx, field) - case "finalizedAt": - return ec.fieldContext_StakeLinking_finalizedAt(ctx, field) - case "txHash": - return ec.fieldContext_StakeLinking_txHash(ctx, field) - case "blockHeight": - return ec.fieldContext_StakeLinking_blockHeight(ctx, field) + case "edges": + return ec.fieldContext_WithdrawalsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_WithdrawalsConnection_pageInfo(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type StakeLinking", field.Name) + return nil, fmt.Errorf("no field named %q was found under type WithdrawalsConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_withdrawals_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _StakeLinkingEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.StakeLinkingEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakeLinkingEdge_cursor(ctx, field) +func (ec *executionContext) _Query_partyMarginModes(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_partyMarginModes(ctx, field) if err != nil { return graphql.Null } @@ -76057,38 +78750,52 @@ func (ec *executionContext) _StakeLinkingEdge_cursor(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.Query().PartyMarginModes(rctx, fc.Args["marketId"].(*string), fc.Args["partyId"].(*string), fc.Args["pagination"].(*v2.Pagination)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PartyMarginModesConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOPartyMarginModesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyMarginModesConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakeLinkingEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_partyMarginModes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakeLinkingEdge", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_PartyMarginModesConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_PartyMarginModesConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PartyMarginModesConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_partyMarginModes_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _StakesConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.StakesConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakesConnection_edges(ctx, field) +func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___type(ctx, field) if err != nil { return graphql.Null } @@ -76101,7 +78808,7 @@ func (ec *executionContext) _StakesConnection_edges(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.introspectType(fc.Args["name"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -76110,32 +78817,59 @@ func (ec *executionContext) _StakesConnection_edges(ctx context.Context, field g if resTmp == nil { return graphql.Null } - res := resTmp.([]*v2.StakeLinkingEdge) + res := resTmp.(*introspection.Type) fc.Result = res - return ec.marshalOStakeLinkingEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐStakeLinkingEdge(ctx, field.Selections, res) + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakesConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakesConnection", + Object: "Query", Field: field, - IsMethod: false, + IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_StakeLinkingEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_StakeLinkingEdge_cursor(ctx, field) + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type StakeLinkingEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } return fc, nil } -func (ec *executionContext) _StakesConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.StakesConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakesConnection_pageInfo(ctx, field) +func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___schema(ctx, field) if err != nil { return graphql.Null } @@ -76148,48 +78882,49 @@ func (ec *executionContext) _StakesConnection_pageInfo(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.introspectSchema() }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(*introspection.Schema) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakesConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakesConnection", + Object: "Query", Field: field, - IsMethod: false, + IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "description": + return ec.fieldContext___Schema_description(ctx, field) + case "types": + return ec.fieldContext___Schema_types(ctx, field) + case "queryType": + return ec.fieldContext___Schema_queryType(ctx, field) + case "mutationType": + return ec.fieldContext___Schema_mutationType(ctx, field) + case "subscriptionType": + return ec.fieldContext___Schema_subscriptionType(ctx, field) + case "directives": + return ec.fieldContext___Schema_directives(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) }, } return fc, nil } -func (ec *executionContext) _StakingSummary_currentStakeAvailable(ctx context.Context, field graphql.CollectedField, obj *StakingSummary) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakingSummary_currentStakeAvailable(ctx, field) +func (ec *executionContext) _RankTable_startRank(ctx context.Context, field graphql.CollectedField, obj *vega.Rank) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RankTable_startRank(ctx, field) if err != nil { return graphql.Null } @@ -76202,7 +78937,7 @@ func (ec *executionContext) _StakingSummary_currentStakeAvailable(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CurrentStakeAvailable, nil + return obj.StartRank, nil }) if err != nil { ec.Error(ctx, err) @@ -76214,26 +78949,26 @@ func (ec *executionContext) _StakingSummary_currentStakeAvailable(ctx context.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(uint32) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2uint32(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakingSummary_currentStakeAvailable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RankTable_startRank(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakingSummary", + Object: "RankTable", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StakingSummary_linkings(ctx context.Context, field graphql.CollectedField, obj *StakingSummary) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakingSummary_linkings(ctx, field) +func (ec *executionContext) _RankTable_shareRatio(ctx context.Context, field graphql.CollectedField, obj *vega.Rank) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RankTable_shareRatio(ctx, field) if err != nil { return graphql.Null } @@ -76246,7 +78981,7 @@ func (ec *executionContext) _StakingSummary_linkings(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Linkings, nil + return obj.ShareRatio, nil }) if err != nil { ec.Error(ctx, err) @@ -76258,43 +78993,26 @@ func (ec *executionContext) _StakingSummary_linkings(ctx context.Context, field } return graphql.Null } - res := resTmp.(*v2.StakesConnection) + res := resTmp.(uint32) fc.Result = res - return ec.marshalNStakesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐStakesConnection(ctx, field.Selections, res) + return ec.marshalNInt2uint32(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakingSummary_linkings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RankTable_shareRatio(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakingSummary", + Object: "RankTable", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_StakesConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_StakesConnection_pageInfo(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type StakesConnection", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_StakingSummary_linkings_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _StakingTier_minimumStakedTokens(ctx context.Context, field graphql.CollectedField, obj *vega.StakingTier) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakingTier_minimumStakedTokens(ctx, field) +func (ec *executionContext) _RankingScore_status(ctx context.Context, field graphql.CollectedField, obj *vega.RankingScore) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RankingScore_status(ctx, field) if err != nil { return graphql.Null } @@ -76307,7 +79025,7 @@ func (ec *executionContext) _StakingTier_minimumStakedTokens(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MinimumStakedTokens, nil + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) @@ -76319,26 +79037,26 @@ func (ec *executionContext) _StakingTier_minimumStakedTokens(ctx context.Context } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.ValidatorNodeStatus) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNValidatorStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐValidatorNodeStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakingTier_minimumStakedTokens(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RankingScore_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakingTier", + Object: "RankingScore", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ValidatorStatus does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StakingTier_referralRewardMultiplier(ctx context.Context, field graphql.CollectedField, obj *vega.StakingTier) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StakingTier_referralRewardMultiplier(ctx, field) +func (ec *executionContext) _RankingScore_previousStatus(ctx context.Context, field graphql.CollectedField, obj *vega.RankingScore) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RankingScore_previousStatus(ctx, field) if err != nil { return graphql.Null } @@ -76351,7 +79069,7 @@ func (ec *executionContext) _StakingTier_referralRewardMultiplier(ctx context.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReferralRewardMultiplier, nil + return obj.PreviousStatus, nil }) if err != nil { ec.Error(ctx, err) @@ -76363,26 +79081,26 @@ func (ec *executionContext) _StakingTier_referralRewardMultiplier(ctx context.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(vega.ValidatorNodeStatus) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNValidatorStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐValidatorNodeStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StakingTier_referralRewardMultiplier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RankingScore_previousStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StakingTier", + Object: "RankingScore", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ValidatorStatus does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_blockHeight(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_blockHeight(ctx, field) +func (ec *executionContext) _RankingScore_rankingScore(ctx context.Context, field graphql.CollectedField, obj *vega.RankingScore) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RankingScore_rankingScore(ctx, field) if err != nil { return graphql.Null } @@ -76395,7 +79113,7 @@ func (ec *executionContext) _Statistics_blockHeight(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().BlockHeight(rctx, obj) + return obj.RankingScore, nil }) if err != nil { ec.Error(ctx, err) @@ -76412,12 +79130,12 @@ func (ec *executionContext) _Statistics_blockHeight(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_blockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RankingScore_rankingScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "RankingScore", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -76425,8 +79143,8 @@ func (ec *executionContext) fieldContext_Statistics_blockHeight(ctx context.Cont return fc, nil } -func (ec *executionContext) _Statistics_blockHash(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_blockHash(ctx, field) +func (ec *executionContext) _RankingScore_stakeScore(ctx context.Context, field graphql.CollectedField, obj *vega.RankingScore) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RankingScore_stakeScore(ctx, field) if err != nil { return graphql.Null } @@ -76439,7 +79157,7 @@ func (ec *executionContext) _Statistics_blockHash(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.BlockHash, nil + return obj.StakeScore, nil }) if err != nil { ec.Error(ctx, err) @@ -76456,9 +79174,9 @@ func (ec *executionContext) _Statistics_blockHash(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_blockHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RankingScore_stakeScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "RankingScore", Field: field, IsMethod: false, IsResolver: false, @@ -76469,8 +79187,8 @@ func (ec *executionContext) fieldContext_Statistics_blockHash(ctx context.Contex return fc, nil } -func (ec *executionContext) _Statistics_backlogLength(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_backlogLength(ctx, field) +func (ec *executionContext) _RankingScore_performanceScore(ctx context.Context, field graphql.CollectedField, obj *vega.RankingScore) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RankingScore_performanceScore(ctx, field) if err != nil { return graphql.Null } @@ -76483,7 +79201,7 @@ func (ec *executionContext) _Statistics_backlogLength(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().BacklogLength(rctx, obj) + return obj.PerformanceScore, nil }) if err != nil { ec.Error(ctx, err) @@ -76500,12 +79218,12 @@ func (ec *executionContext) _Statistics_backlogLength(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_backlogLength(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RankingScore_performanceScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "RankingScore", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -76513,8 +79231,8 @@ func (ec *executionContext) fieldContext_Statistics_backlogLength(ctx context.Co return fc, nil } -func (ec *executionContext) _Statistics_totalPeers(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_totalPeers(ctx, field) +func (ec *executionContext) _RankingScore_votingPower(ctx context.Context, field graphql.CollectedField, obj *vega.RankingScore) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RankingScore_votingPower(ctx, field) if err != nil { return graphql.Null } @@ -76527,7 +79245,7 @@ func (ec *executionContext) _Statistics_totalPeers(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().TotalPeers(rctx, obj) + return ec.resolvers.RankingScore().VotingPower(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -76544,9 +79262,9 @@ func (ec *executionContext) _Statistics_totalPeers(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_totalPeers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RankingScore_votingPower(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "RankingScore", Field: field, IsMethod: true, IsResolver: true, @@ -76557,8 +79275,8 @@ func (ec *executionContext) fieldContext_Statistics_totalPeers(ctx context.Conte return fc, nil } -func (ec *executionContext) _Statistics_genesisTime(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_genesisTime(ctx, field) +func (ec *executionContext) _RecurringGovernanceTransfer_startEpoch(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringGovernanceTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RecurringGovernanceTransfer_startEpoch(ctx, field) if err != nil { return graphql.Null } @@ -76571,7 +79289,7 @@ func (ec *executionContext) _Statistics_genesisTime(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().GenesisTime(rctx, obj) + return ec.resolvers.RecurringGovernanceTransfer().StartEpoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -76583,26 +79301,26 @@ func (ec *executionContext) _Statistics_genesisTime(ctx context.Context, field g } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(int) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_genesisTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RecurringGovernanceTransfer_startEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "RecurringGovernanceTransfer", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_currentTime(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_currentTime(ctx, field) +func (ec *executionContext) _RecurringGovernanceTransfer_endEpoch(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringGovernanceTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RecurringGovernanceTransfer_endEpoch(ctx, field) if err != nil { return graphql.Null } @@ -76615,38 +79333,35 @@ func (ec *executionContext) _Statistics_currentTime(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().CurrentTime(rctx, obj) + return ec.resolvers.RecurringGovernanceTransfer().EndEpoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*int) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_currentTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RecurringGovernanceTransfer_endEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "RecurringGovernanceTransfer", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_upTime(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_upTime(ctx, field) +func (ec *executionContext) _RecurringGovernanceTransfer_dispatchStrategy(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringGovernanceTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RecurringGovernanceTransfer_dispatchStrategy(ctx, field) if err != nil { return graphql.Null } @@ -76659,38 +79374,63 @@ func (ec *executionContext) _Statistics_upTime(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Uptime, nil + return obj.DispatchStrategy, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.DispatchStrategy) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalODispatchStrategy2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDispatchStrategy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_upTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RecurringGovernanceTransfer_dispatchStrategy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "RecurringGovernanceTransfer", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "dispatchMetric": + return ec.fieldContext_DispatchStrategy_dispatchMetric(ctx, field) + case "dispatchMetricAssetId": + return ec.fieldContext_DispatchStrategy_dispatchMetricAssetId(ctx, field) + case "marketIdsInScope": + return ec.fieldContext_DispatchStrategy_marketIdsInScope(ctx, field) + case "entityScope": + return ec.fieldContext_DispatchStrategy_entityScope(ctx, field) + case "individualScope": + return ec.fieldContext_DispatchStrategy_individualScope(ctx, field) + case "teamScope": + return ec.fieldContext_DispatchStrategy_teamScope(ctx, field) + case "nTopPerformers": + return ec.fieldContext_DispatchStrategy_nTopPerformers(ctx, field) + case "stakingRequirement": + return ec.fieldContext_DispatchStrategy_stakingRequirement(ctx, field) + case "notionalTimeWeightedAveragePositionRequirement": + return ec.fieldContext_DispatchStrategy_notionalTimeWeightedAveragePositionRequirement(ctx, field) + case "windowLength": + return ec.fieldContext_DispatchStrategy_windowLength(ctx, field) + case "lockPeriod": + return ec.fieldContext_DispatchStrategy_lockPeriod(ctx, field) + case "distributionStrategy": + return ec.fieldContext_DispatchStrategy_distributionStrategy(ctx, field) + case "rankTable": + return ec.fieldContext_DispatchStrategy_rankTable(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DispatchStrategy", field.Name) }, } return fc, nil } -func (ec *executionContext) _Statistics_vegaTime(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_vegaTime(ctx, field) +func (ec *executionContext) _RecurringTransfer_startEpoch(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RecurringTransfer_startEpoch(ctx, field) if err != nil { return graphql.Null } @@ -76703,7 +79443,7 @@ func (ec *executionContext) _Statistics_vegaTime(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().VegaTime(rctx, obj) + return ec.resolvers.RecurringTransfer().StartEpoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -76715,26 +79455,26 @@ func (ec *executionContext) _Statistics_vegaTime(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(int) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_vegaTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RecurringTransfer_startEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "RecurringTransfer", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_status(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_status(ctx, field) +func (ec *executionContext) _RecurringTransfer_endEpoch(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RecurringTransfer_endEpoch(ctx, field) if err != nil { return graphql.Null } @@ -76747,38 +79487,35 @@ func (ec *executionContext) _Statistics_status(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().Status(rctx, obj) + return ec.resolvers.RecurringTransfer().EndEpoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RecurringTransfer_endEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "RecurringTransfer", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_txPerBlock(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_txPerBlock(ctx, field) +func (ec *executionContext) _RecurringTransfer_factor(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RecurringTransfer_factor(ctx, field) if err != nil { return graphql.Null } @@ -76791,7 +79528,7 @@ func (ec *executionContext) _Statistics_txPerBlock(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().TxPerBlock(rctx, obj) + return obj.Factor, nil }) if err != nil { ec.Error(ctx, err) @@ -76808,12 +79545,12 @@ func (ec *executionContext) _Statistics_txPerBlock(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_txPerBlock(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RecurringTransfer_factor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "RecurringTransfer", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -76821,8 +79558,8 @@ func (ec *executionContext) fieldContext_Statistics_txPerBlock(ctx context.Conte return fc, nil } -func (ec *executionContext) _Statistics_averageTxBytes(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_averageTxBytes(ctx, field) +func (ec *executionContext) _RecurringTransfer_dispatchStrategy(ctx context.Context, field graphql.CollectedField, obj *v1.RecurringTransfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RecurringTransfer_dispatchStrategy(ctx, field) if err != nil { return graphql.Null } @@ -76835,38 +79572,63 @@ func (ec *executionContext) _Statistics_averageTxBytes(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().AverageTxBytes(rctx, obj) + return obj.DispatchStrategy, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*vega.DispatchStrategy) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalODispatchStrategy2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDispatchStrategy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_averageTxBytes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RecurringTransfer_dispatchStrategy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "RecurringTransfer", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "dispatchMetric": + return ec.fieldContext_DispatchStrategy_dispatchMetric(ctx, field) + case "dispatchMetricAssetId": + return ec.fieldContext_DispatchStrategy_dispatchMetricAssetId(ctx, field) + case "marketIdsInScope": + return ec.fieldContext_DispatchStrategy_marketIdsInScope(ctx, field) + case "entityScope": + return ec.fieldContext_DispatchStrategy_entityScope(ctx, field) + case "individualScope": + return ec.fieldContext_DispatchStrategy_individualScope(ctx, field) + case "teamScope": + return ec.fieldContext_DispatchStrategy_teamScope(ctx, field) + case "nTopPerformers": + return ec.fieldContext_DispatchStrategy_nTopPerformers(ctx, field) + case "stakingRequirement": + return ec.fieldContext_DispatchStrategy_stakingRequirement(ctx, field) + case "notionalTimeWeightedAveragePositionRequirement": + return ec.fieldContext_DispatchStrategy_notionalTimeWeightedAveragePositionRequirement(ctx, field) + case "windowLength": + return ec.fieldContext_DispatchStrategy_windowLength(ctx, field) + case "lockPeriod": + return ec.fieldContext_DispatchStrategy_lockPeriod(ctx, field) + case "distributionStrategy": + return ec.fieldContext_DispatchStrategy_distributionStrategy(ctx, field) + case "rankTable": + return ec.fieldContext_DispatchStrategy_rankTable(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DispatchStrategy", field.Name) }, } return fc, nil } -func (ec *executionContext) _Statistics_averageOrdersPerBlock(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_averageOrdersPerBlock(ctx, field) +func (ec *executionContext) _ReferralProgram_id(ctx context.Context, field graphql.CollectedField, obj *vega.ReferralProgram) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralProgram_id(ctx, field) if err != nil { return graphql.Null } @@ -76879,7 +79641,7 @@ func (ec *executionContext) _Statistics_averageOrdersPerBlock(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().AverageOrdersPerBlock(rctx, obj) + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) @@ -76893,24 +79655,24 @@ func (ec *executionContext) _Statistics_averageOrdersPerBlock(ctx context.Contex } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_averageOrdersPerBlock(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralProgram_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralProgram", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_tradesPerSecond(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_tradesPerSecond(ctx, field) +func (ec *executionContext) _ReferralProgram_version(ctx context.Context, field graphql.CollectedField, obj *vega.ReferralProgram) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralProgram_version(ctx, field) if err != nil { return graphql.Null } @@ -76923,7 +79685,7 @@ func (ec *executionContext) _Statistics_tradesPerSecond(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().TradesPerSecond(rctx, obj) + return ec.resolvers.ReferralProgram().Version(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -76935,26 +79697,26 @@ func (ec *executionContext) _Statistics_tradesPerSecond(ctx context.Context, fie } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_tradesPerSecond(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralProgram_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralProgram", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_ordersPerSecond(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_ordersPerSecond(ctx, field) +func (ec *executionContext) _ReferralProgram_benefitTiers(ctx context.Context, field graphql.CollectedField, obj *vega.ReferralProgram) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralProgram_benefitTiers(ctx, field) if err != nil { return graphql.Null } @@ -76967,7 +79729,7 @@ func (ec *executionContext) _Statistics_ordersPerSecond(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().OrdersPerSecond(rctx, obj) + return obj.BenefitTiers, nil }) if err != nil { ec.Error(ctx, err) @@ -76979,26 +79741,36 @@ func (ec *executionContext) _Statistics_ordersPerSecond(ctx context.Context, fie } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.BenefitTier) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNBenefitTier2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐBenefitTierᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_ordersPerSecond(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralProgram_benefitTiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralProgram", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "minimumEpochs": + return ec.fieldContext_BenefitTier_minimumEpochs(ctx, field) + case "minimumRunningNotionalTakerVolume": + return ec.fieldContext_BenefitTier_minimumRunningNotionalTakerVolume(ctx, field) + case "referralDiscountFactor": + return ec.fieldContext_BenefitTier_referralDiscountFactor(ctx, field) + case "referralRewardFactor": + return ec.fieldContext_BenefitTier_referralRewardFactor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type BenefitTier", field.Name) }, } return fc, nil } -func (ec *executionContext) _Statistics_totalMarkets(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_totalMarkets(ctx, field) +func (ec *executionContext) _ReferralProgram_endOfProgramTimestamp(ctx context.Context, field graphql.CollectedField, obj *vega.ReferralProgram) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralProgram_endOfProgramTimestamp(ctx, field) if err != nil { return graphql.Null } @@ -77011,7 +79783,7 @@ func (ec *executionContext) _Statistics_totalMarkets(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().TotalMarkets(rctx, obj) + return obj.EndOfProgramTimestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -77023,26 +79795,26 @@ func (ec *executionContext) _Statistics_totalMarkets(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_totalMarkets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralProgram_endOfProgramTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralProgram", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_totalAmendOrder(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_totalAmendOrder(ctx, field) +func (ec *executionContext) _ReferralProgram_windowLength(ctx context.Context, field graphql.CollectedField, obj *vega.ReferralProgram) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralProgram_windowLength(ctx, field) if err != nil { return graphql.Null } @@ -77055,7 +79827,7 @@ func (ec *executionContext) _Statistics_totalAmendOrder(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().TotalAmendOrder(rctx, obj) + return ec.resolvers.ReferralProgram().WindowLength(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -77067,26 +79839,26 @@ func (ec *executionContext) _Statistics_totalAmendOrder(ctx context.Context, fie } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_totalAmendOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralProgram_windowLength(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralProgram", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_totalCancelOrder(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_totalCancelOrder(ctx, field) +func (ec *executionContext) _ReferralProgram_stakingTiers(ctx context.Context, field graphql.CollectedField, obj *vega.ReferralProgram) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralProgram_stakingTiers(ctx, field) if err != nil { return graphql.Null } @@ -77099,7 +79871,7 @@ func (ec *executionContext) _Statistics_totalCancelOrder(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().TotalCancelOrder(rctx, obj) + return obj.StakingTiers, nil }) if err != nil { ec.Error(ctx, err) @@ -77111,26 +79883,32 @@ func (ec *executionContext) _Statistics_totalCancelOrder(ctx context.Context, fi } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*vega.StakingTier) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNStakingTier2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStakingTierᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_totalCancelOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralProgram_stakingTiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralProgram", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "minimumStakedTokens": + return ec.fieldContext_StakingTier_minimumStakedTokens(ctx, field) + case "referralRewardMultiplier": + return ec.fieldContext_StakingTier_referralRewardMultiplier(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type StakingTier", field.Name) }, } return fc, nil } -func (ec *executionContext) _Statistics_totalCreateOrder(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_totalCreateOrder(ctx, field) +func (ec *executionContext) _ReferralSet_id(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSet) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSet_id(ctx, field) if err != nil { return graphql.Null } @@ -77143,7 +79921,7 @@ func (ec *executionContext) _Statistics_totalCreateOrder(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().TotalCreateOrder(rctx, obj) + return obj.Id, nil }) if err != nil { ec.Error(ctx, err) @@ -77157,24 +79935,24 @@ func (ec *executionContext) _Statistics_totalCreateOrder(ctx context.Context, fi } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_totalCreateOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSet_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralSet", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_totalOrders(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_totalOrders(ctx, field) +func (ec *executionContext) _ReferralSet_referrer(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSet) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSet_referrer(ctx, field) if err != nil { return graphql.Null } @@ -77187,7 +79965,7 @@ func (ec *executionContext) _Statistics_totalOrders(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().TotalOrders(rctx, obj) + return obj.Referrer, nil }) if err != nil { ec.Error(ctx, err) @@ -77201,24 +79979,24 @@ func (ec *executionContext) _Statistics_totalOrders(ctx context.Context, field g } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_totalOrders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSet_referrer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralSet", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_totalTrades(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_totalTrades(ctx, field) +func (ec *executionContext) _ReferralSet_totalMembers(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSet) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSet_totalMembers(ctx, field) if err != nil { return graphql.Null } @@ -77231,7 +80009,7 @@ func (ec *executionContext) _Statistics_totalTrades(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().TotalTrades(rctx, obj) + return ec.resolvers.ReferralSet().TotalMembers(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -77243,26 +80021,26 @@ func (ec *executionContext) _Statistics_totalTrades(ctx context.Context, field g } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_totalTrades(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSet_totalMembers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralSet", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_eventCount(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_eventCount(ctx, field) +func (ec *executionContext) _ReferralSet_createdAt(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSet) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSet_createdAt(ctx, field) if err != nil { return graphql.Null } @@ -77275,7 +80053,7 @@ func (ec *executionContext) _Statistics_eventCount(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().EventCount(rctx, obj) + return obj.CreatedAt, nil }) if err != nil { ec.Error(ctx, err) @@ -77287,26 +80065,26 @@ func (ec *executionContext) _Statistics_eventCount(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_eventCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSet_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralSet", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_eventsPerSecond(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_eventsPerSecond(ctx, field) +func (ec *executionContext) _ReferralSet_updatedAt(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSet) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSet_updatedAt(ctx, field) if err != nil { return graphql.Null } @@ -77319,7 +80097,7 @@ func (ec *executionContext) _Statistics_eventsPerSecond(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().EventsPerSecond(rctx, obj) + return obj.UpdatedAt, nil }) if err != nil { ec.Error(ctx, err) @@ -77331,26 +80109,26 @@ func (ec *executionContext) _Statistics_eventsPerSecond(ctx context.Context, fie } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int64) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_eventsPerSecond(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSet_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralSet", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Statistics_appVersionHash(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_appVersionHash(ctx, field) +func (ec *executionContext) _ReferralSetConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -77363,7 +80141,7 @@ func (ec *executionContext) _Statistics_appVersionHash(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AppVersionHash, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -77375,26 +80153,32 @@ func (ec *executionContext) _Statistics_appVersionHash(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.ReferralSetEdge) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNReferralSetEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_appVersionHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralSetConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_ReferralSetEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_ReferralSetEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ReferralSetEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _Statistics_appVersion(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_appVersion(ctx, field) +func (ec *executionContext) _ReferralSetConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -77407,7 +80191,7 @@ func (ec *executionContext) _Statistics_appVersion(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AppVersion, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -77419,26 +80203,36 @@ func (ec *executionContext) _Statistics_appVersion(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_appVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralSetConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Statistics_chainVersion(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_chainVersion(ctx, field) +func (ec *executionContext) _ReferralSetEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -77451,7 +80245,7 @@ func (ec *executionContext) _Statistics_chainVersion(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ChainVersion, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -77463,26 +80257,38 @@ func (ec *executionContext) _Statistics_chainVersion(ctx context.Context, field } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.ReferralSet) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNReferralSet2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSet(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_chainVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralSetEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_ReferralSet_id(ctx, field) + case "referrer": + return ec.fieldContext_ReferralSet_referrer(ctx, field) + case "totalMembers": + return ec.fieldContext_ReferralSet_totalMembers(ctx, field) + case "createdAt": + return ec.fieldContext_ReferralSet_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_ReferralSet_updatedAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ReferralSet", field.Name) }, } return fc, nil } -func (ec *executionContext) _Statistics_blockDuration(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_blockDuration(ctx, field) +func (ec *executionContext) _ReferralSetEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -77495,7 +80301,7 @@ func (ec *executionContext) _Statistics_blockDuration(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Statistics().BlockDuration(rctx, obj) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -77512,12 +80318,12 @@ func (ec *executionContext) _Statistics_blockDuration(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_blockDuration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralSetEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, @@ -77525,8 +80331,8 @@ func (ec *executionContext) fieldContext_Statistics_blockDuration(ctx context.Co return fc, nil } -func (ec *executionContext) _Statistics_chainId(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Statistics_chainId(ctx, field) +func (ec *executionContext) _ReferralSetReferee_referralSetId(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetReferee) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetReferee_referralSetId(ctx, field) if err != nil { return graphql.Null } @@ -77539,7 +80345,7 @@ func (ec *executionContext) _Statistics_chainId(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ChainId, nil + return obj.ReferralSetId, nil }) if err != nil { ec.Error(ctx, err) @@ -77556,9 +80362,9 @@ func (ec *executionContext) _Statistics_chainId(ctx context.Context, field graph return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Statistics_chainId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetReferee_referralSetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Statistics", + Object: "ReferralSetReferee", Field: field, IsMethod: false, IsResolver: false, @@ -77569,8 +80375,8 @@ func (ec *executionContext) fieldContext_Statistics_chainId(ctx context.Context, return fc, nil } -func (ec *executionContext) _StopOrder_id(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_id(ctx, field) +func (ec *executionContext) _ReferralSetReferee_refereeId(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetReferee) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetReferee_refereeId(ctx, field) if err != nil { return graphql.Null } @@ -77583,7 +80389,7 @@ func (ec *executionContext) _StopOrder_id(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StopOrder().ID(rctx, obj) + return ec.resolvers.ReferralSetReferee().RefereeID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -77600,9 +80406,9 @@ func (ec *executionContext) _StopOrder_id(ctx context.Context, field graphql.Col return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetReferee_refereeId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetReferee", Field: field, IsMethod: true, IsResolver: true, @@ -77613,8 +80419,8 @@ func (ec *executionContext) fieldContext_StopOrder_id(ctx context.Context, field return fc, nil } -func (ec *executionContext) _StopOrder_ocoLinkId(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_ocoLinkId(ctx, field) +func (ec *executionContext) _ReferralSetReferee_joinedAt(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetReferee) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetReferee_joinedAt(ctx, field) if err != nil { return graphql.Null } @@ -77627,35 +80433,38 @@ func (ec *executionContext) _StopOrder_ocoLinkId(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StopOrder().OcoLinkID(rctx, obj) + return obj.JoinedAt, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(int64) fc.Result = res - return ec.marshalOID2ᚖstring(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_ocoLinkId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetReferee_joinedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetReferee", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StopOrder_expiresAt(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_expiresAt(ctx, field) +func (ec *executionContext) _ReferralSetReferee_atEpoch(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetReferee) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetReferee_atEpoch(ctx, field) if err != nil { return graphql.Null } @@ -77668,35 +80477,38 @@ func (ec *executionContext) _StopOrder_expiresAt(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StopOrder().ExpiresAt(rctx, obj) + return ec.resolvers.ReferralSetReferee().AtEpoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*int64) + res := resTmp.(int) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_expiresAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetReferee_atEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetReferee", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StopOrder_expiryStrategy(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_expiryStrategy(ctx, field) +func (ec *executionContext) _ReferralSetReferee_totalRefereeNotionalTakerVolume(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetReferee) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetReferee_totalRefereeNotionalTakerVolume(ctx, field) if err != nil { return graphql.Null } @@ -77709,35 +80521,38 @@ func (ec *executionContext) _StopOrder_expiryStrategy(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StopOrder().ExpiryStrategy(rctx, obj) + return obj.TotalRefereeNotionalTakerVolume, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.StopOrder_ExpiryStrategy) + res := resTmp.(string) fc.Result = res - return ec.marshalOStopOrderExpiryStrategy2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStopOrder_ExpiryStrategy(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_expiryStrategy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetReferee_totalRefereeNotionalTakerVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetReferee", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type StopOrderExpiryStrategy does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StopOrder_triggerDirection(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_triggerDirection(ctx, field) +func (ec *executionContext) _ReferralSetReferee_totalRefereeGeneratedRewards(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetReferee) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetReferee_totalRefereeGeneratedRewards(ctx, field) if err != nil { return graphql.Null } @@ -77750,7 +80565,7 @@ func (ec *executionContext) _StopOrder_triggerDirection(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StopOrder().TriggerDirection(rctx, obj) + return obj.TotalRefereeGeneratedRewards, nil }) if err != nil { ec.Error(ctx, err) @@ -77762,26 +80577,26 @@ func (ec *executionContext) _StopOrder_triggerDirection(ctx context.Context, fie } return graphql.Null } - res := resTmp.(vega.StopOrder_TriggerDirection) + res := resTmp.(string) fc.Result = res - return ec.marshalNStopOrderTriggerDirection2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStopOrder_TriggerDirection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_triggerDirection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetReferee_totalRefereeGeneratedRewards(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetReferee", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type StopOrderTriggerDirection does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StopOrder_status(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_status(ctx, field) +func (ec *executionContext) _ReferralSetRefereeConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetRefereeConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetRefereeConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -77794,7 +80609,7 @@ func (ec *executionContext) _StopOrder_status(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StopOrder().Status(rctx, obj) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -77806,26 +80621,32 @@ func (ec *executionContext) _StopOrder_status(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(vega.StopOrder_Status) + res := resTmp.([]*v2.ReferralSetRefereeEdge) fc.Result = res - return ec.marshalNStopOrderStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStopOrder_Status(ctx, field.Selections, res) + return ec.marshalNReferralSetRefereeEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetRefereeEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetRefereeConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetRefereeConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type StopOrderStatus does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_ReferralSetRefereeEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_ReferralSetRefereeEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ReferralSetRefereeEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _StopOrder_createdAt(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_createdAt(ctx, field) +func (ec *executionContext) _ReferralSetRefereeConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetRefereeConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetRefereeConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -77838,7 +80659,7 @@ func (ec *executionContext) _StopOrder_createdAt(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StopOrder().CreatedAt(rctx, obj) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -77850,26 +80671,36 @@ func (ec *executionContext) _StopOrder_createdAt(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetRefereeConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetRefereeConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _StopOrder_updatedAt(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_updatedAt(ctx, field) +func (ec *executionContext) _ReferralSetRefereeEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetRefereeEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetRefereeEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -77882,35 +80713,52 @@ func (ec *executionContext) _StopOrder_updatedAt(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StopOrder().UpdatedAt(rctx, obj) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*int64) + res := resTmp.(*v2.ReferralSetReferee) fc.Result = res - return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) + return ec.marshalNReferralSetReferee2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetReferee(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetRefereeEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetRefereeEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + switch field.Name { + case "referralSetId": + return ec.fieldContext_ReferralSetReferee_referralSetId(ctx, field) + case "refereeId": + return ec.fieldContext_ReferralSetReferee_refereeId(ctx, field) + case "joinedAt": + return ec.fieldContext_ReferralSetReferee_joinedAt(ctx, field) + case "atEpoch": + return ec.fieldContext_ReferralSetReferee_atEpoch(ctx, field) + case "totalRefereeNotionalTakerVolume": + return ec.fieldContext_ReferralSetReferee_totalRefereeNotionalTakerVolume(ctx, field) + case "totalRefereeGeneratedRewards": + return ec.fieldContext_ReferralSetReferee_totalRefereeGeneratedRewards(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ReferralSetReferee", field.Name) }, } return fc, nil } -func (ec *executionContext) _StopOrder_partyId(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_partyId(ctx, field) +func (ec *executionContext) _ReferralSetRefereeEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetRefereeEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetRefereeEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -77923,7 +80771,7 @@ func (ec *executionContext) _StopOrder_partyId(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StopOrder().PartyID(rctx, obj) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -77937,24 +80785,24 @@ func (ec *executionContext) _StopOrder_partyId(ctx context.Context, field graphq } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetRefereeEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetRefereeEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StopOrder_marketId(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_marketId(ctx, field) +func (ec *executionContext) _ReferralSetStats_atEpoch(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStats_atEpoch(ctx, field) if err != nil { return graphql.Null } @@ -77967,7 +80815,7 @@ func (ec *executionContext) _StopOrder_marketId(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StopOrder().MarketID(rctx, obj) + return ec.resolvers.ReferralSetStats().AtEpoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -77979,26 +80827,26 @@ func (ec *executionContext) _StopOrder_marketId(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetStats_atEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetStats", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StopOrder_trigger(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_trigger(ctx, field) +func (ec *executionContext) _ReferralSetStats_partyId(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStats_partyId(ctx, field) if err != nil { return graphql.Null } @@ -78011,7 +80859,7 @@ func (ec *executionContext) _StopOrder_trigger(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StopOrder().Trigger(rctx, obj) + return obj.PartyId, nil }) if err != nil { ec.Error(ctx, err) @@ -78023,26 +80871,26 @@ func (ec *executionContext) _StopOrder_trigger(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(StopOrderTrigger) + res := resTmp.(string) fc.Result = res - return ec.marshalNStopOrderTrigger2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐStopOrderTrigger(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetStats_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetStats", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type StopOrderTrigger does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StopOrder_submission(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_submission(ctx, field) +func (ec *executionContext) _ReferralSetStats_wasEligible(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStats_wasEligible(ctx, field) if err != nil { return graphql.Null } @@ -78055,7 +80903,7 @@ func (ec *executionContext) _StopOrder_submission(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Submission, nil + return obj.WasEligible, nil }) if err != nil { ec.Error(ctx, err) @@ -78067,52 +80915,26 @@ func (ec *executionContext) _StopOrder_submission(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(*v11.OrderSubmission) + res := resTmp.(bool) fc.Result = res - return ec.marshalNOrderSubmission2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋcommandsᚋv1ᚐOrderSubmission(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_submission(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetStats_wasEligible(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetStats", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "marketId": - return ec.fieldContext_OrderSubmission_marketId(ctx, field) - case "price": - return ec.fieldContext_OrderSubmission_price(ctx, field) - case "size": - return ec.fieldContext_OrderSubmission_size(ctx, field) - case "side": - return ec.fieldContext_OrderSubmission_side(ctx, field) - case "timeInForce": - return ec.fieldContext_OrderSubmission_timeInForce(ctx, field) - case "expiresAt": - return ec.fieldContext_OrderSubmission_expiresAt(ctx, field) - case "type": - return ec.fieldContext_OrderSubmission_type(ctx, field) - case "reference": - return ec.fieldContext_OrderSubmission_reference(ctx, field) - case "peggedOrder": - return ec.fieldContext_OrderSubmission_peggedOrder(ctx, field) - case "postOnly": - return ec.fieldContext_OrderSubmission_postOnly(ctx, field) - case "reduceOnly": - return ec.fieldContext_OrderSubmission_reduceOnly(ctx, field) - case "icebergOrder": - return ec.fieldContext_OrderSubmission_icebergOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OrderSubmission", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StopOrder_order(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_order(ctx, field) +func (ec *executionContext) _ReferralSetStats_discountFactor(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStats_discountFactor(ctx, field) if err != nil { return graphql.Null } @@ -78125,81 +80947,38 @@ func (ec *executionContext) _StopOrder_order(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StopOrder().Order(rctx, obj) + return obj.DiscountFactor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.Order) + res := resTmp.(string) fc.Result = res - return ec.marshalOOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_order(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetStats_discountFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetStats", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Order_id(ctx, field) - case "price": - return ec.fieldContext_Order_price(ctx, field) - case "timeInForce": - return ec.fieldContext_Order_timeInForce(ctx, field) - case "side": - return ec.fieldContext_Order_side(ctx, field) - case "market": - return ec.fieldContext_Order_market(ctx, field) - case "size": - return ec.fieldContext_Order_size(ctx, field) - case "remaining": - return ec.fieldContext_Order_remaining(ctx, field) - case "party": - return ec.fieldContext_Order_party(ctx, field) - case "createdAt": - return ec.fieldContext_Order_createdAt(ctx, field) - case "expiresAt": - return ec.fieldContext_Order_expiresAt(ctx, field) - case "status": - return ec.fieldContext_Order_status(ctx, field) - case "reference": - return ec.fieldContext_Order_reference(ctx, field) - case "tradesConnection": - return ec.fieldContext_Order_tradesConnection(ctx, field) - case "type": - return ec.fieldContext_Order_type(ctx, field) - case "rejectionReason": - return ec.fieldContext_Order_rejectionReason(ctx, field) - case "version": - return ec.fieldContext_Order_version(ctx, field) - case "updatedAt": - return ec.fieldContext_Order_updatedAt(ctx, field) - case "peggedOrder": - return ec.fieldContext_Order_peggedOrder(ctx, field) - case "liquidityProvision": - return ec.fieldContext_Order_liquidityProvision(ctx, field) - case "postOnly": - return ec.fieldContext_Order_postOnly(ctx, field) - case "reduceOnly": - return ec.fieldContext_Order_reduceOnly(ctx, field) - case "icebergOrder": - return ec.fieldContext_Order_icebergOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Order", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StopOrder_rejectionReason(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrder_rejectionReason(ctx, field) +func (ec *executionContext) _ReferralSetStats_rewardFactor(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStats_rewardFactor(ctx, field) if err != nil { return graphql.Null } @@ -78212,35 +80991,38 @@ func (ec *executionContext) _StopOrder_rejectionReason(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.StopOrder().RejectionReason(rctx, obj) + return obj.RewardFactor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*vega.StopOrder_RejectionReason) + res := resTmp.(string) fc.Result = res - return ec.marshalOStopOrderRejectionReason2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStopOrder_RejectionReason(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrder_rejectionReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetStats_rewardFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrder", + Object: "ReferralSetStats", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type StopOrderRejectionReason does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StopOrderConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.StopOrderConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrderConnection_edges(ctx, field) +func (ec *executionContext) _ReferralSetStats_epochNotionalTakerVolume(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStats_epochNotionalTakerVolume(ctx, field) if err != nil { return graphql.Null } @@ -78253,41 +81035,38 @@ func (ec *executionContext) _StopOrderConnection_edges(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.EpochNotionalTakerVolume, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*v2.StopOrderEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalOStopOrderEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐStopOrderEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrderConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetStats_epochNotionalTakerVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrderConnection", + Object: "ReferralSetStats", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_StopOrderEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_StopOrderEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type StopOrderEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StopOrderConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.StopOrderConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrderConnection_pageInfo(ctx, field) +func (ec *executionContext) _ReferralSetStats_referralSetRunningNotionalTakerVolume(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStats_referralSetRunningNotionalTakerVolume(ctx, field) if err != nil { return graphql.Null } @@ -78300,45 +81079,38 @@ func (ec *executionContext) _StopOrderConnection_pageInfo(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.ReferralSetRunningNotionalTakerVolume, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.(string) fc.Result = res - return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrderConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetStats_referralSetRunningNotionalTakerVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrderConnection", + Object: "ReferralSetStats", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StopOrderEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.StopOrderEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrderEdge_node(ctx, field) +func (ec *executionContext) _ReferralSetStats_rewardsMultiplier(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStats_rewardsMultiplier(ctx, field) if err != nil { return graphql.Null } @@ -78351,65 +81123,38 @@ func (ec *executionContext) _StopOrderEdge_node(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.RewardsMultiplier, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*v1.StopOrderEvent) + res := resTmp.(string) fc.Result = res - return ec.marshalOStopOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐStopOrderEvent(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrderEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetStats_rewardsMultiplier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrderEdge", + Object: "ReferralSetStats", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_StopOrder_id(ctx, field) - case "ocoLinkId": - return ec.fieldContext_StopOrder_ocoLinkId(ctx, field) - case "expiresAt": - return ec.fieldContext_StopOrder_expiresAt(ctx, field) - case "expiryStrategy": - return ec.fieldContext_StopOrder_expiryStrategy(ctx, field) - case "triggerDirection": - return ec.fieldContext_StopOrder_triggerDirection(ctx, field) - case "status": - return ec.fieldContext_StopOrder_status(ctx, field) - case "createdAt": - return ec.fieldContext_StopOrder_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_StopOrder_updatedAt(ctx, field) - case "partyId": - return ec.fieldContext_StopOrder_partyId(ctx, field) - case "marketId": - return ec.fieldContext_StopOrder_marketId(ctx, field) - case "trigger": - return ec.fieldContext_StopOrder_trigger(ctx, field) - case "submission": - return ec.fieldContext_StopOrder_submission(ctx, field) - case "order": - return ec.fieldContext_StopOrder_order(ctx, field) - case "rejectionReason": - return ec.fieldContext_StopOrder_rejectionReason(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type StopOrder", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _StopOrderEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.StopOrderEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrderEdge_cursor(ctx, field) +func (ec *executionContext) _ReferralSetStats_rewardsFactorMultiplier(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStats_rewardsFactorMultiplier(ctx, field) if err != nil { return graphql.Null } @@ -78422,23 +81167,26 @@ func (ec *executionContext) _StopOrderEdge_cursor(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.RewardsFactorMultiplier, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } res := resTmp.(string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrderEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetStats_rewardsFactorMultiplier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrderEdge", + Object: "ReferralSetStats", Field: field, IsMethod: false, IsResolver: false, @@ -78449,8 +81197,8 @@ func (ec *executionContext) fieldContext_StopOrderEdge_cursor(ctx context.Contex return fc, nil } -func (ec *executionContext) _StopOrderPrice_price(ctx context.Context, field graphql.CollectedField, obj *StopOrderPrice) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrderPrice_price(ctx, field) +func (ec *executionContext) _ReferralSetStats_referrerTakerVolume(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStats) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStats_referrerTakerVolume(ctx, field) if err != nil { return graphql.Null } @@ -78463,7 +81211,7 @@ func (ec *executionContext) _StopOrderPrice_price(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Price, nil + return obj.ReferrerTakerVolume, nil }) if err != nil { ec.Error(ctx, err) @@ -78480,9 +81228,9 @@ func (ec *executionContext) _StopOrderPrice_price(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrderPrice_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetStats_referrerTakerVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrderPrice", + Object: "ReferralSetStats", Field: field, IsMethod: false, IsResolver: false, @@ -78493,8 +81241,8 @@ func (ec *executionContext) fieldContext_StopOrderPrice_price(ctx context.Contex return fc, nil } -func (ec *executionContext) _StopOrderTrailingPercentOffset_trailingPercentOffset(ctx context.Context, field graphql.CollectedField, obj *StopOrderTrailingPercentOffset) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_StopOrderTrailingPercentOffset_trailingPercentOffset(ctx, field) +func (ec *executionContext) _ReferralSetStatsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStatsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStatsConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -78507,7 +81255,7 @@ func (ec *executionContext) _StopOrderTrailingPercentOffset_trailingPercentOffse }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TrailingPercentOffset, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -78519,14 +81267,184 @@ func (ec *executionContext) _StopOrderTrailingPercentOffset_trailingPercentOffse } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.ReferralSetStatsEdge) + fc.Result = res + return ec.marshalNReferralSetStatsEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetStatsEdge(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_ReferralSetStatsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ReferralSetStatsConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "node": + return ec.fieldContext_ReferralSetStatsEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_ReferralSetStatsEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ReferralSetStatsEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _ReferralSetStatsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStatsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStatsConnection_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*v2.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_ReferralSetStatsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ReferralSetStatsConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _ReferralSetStatsEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStatsEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStatsEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*v2.ReferralSetStats) + fc.Result = res + return ec.marshalNReferralSetStats2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐReferralSetStats(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_ReferralSetStatsEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ReferralSetStatsEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "atEpoch": + return ec.fieldContext_ReferralSetStats_atEpoch(ctx, field) + case "partyId": + return ec.fieldContext_ReferralSetStats_partyId(ctx, field) + case "wasEligible": + return ec.fieldContext_ReferralSetStats_wasEligible(ctx, field) + case "discountFactor": + return ec.fieldContext_ReferralSetStats_discountFactor(ctx, field) + case "rewardFactor": + return ec.fieldContext_ReferralSetStats_rewardFactor(ctx, field) + case "epochNotionalTakerVolume": + return ec.fieldContext_ReferralSetStats_epochNotionalTakerVolume(ctx, field) + case "referralSetRunningNotionalTakerVolume": + return ec.fieldContext_ReferralSetStats_referralSetRunningNotionalTakerVolume(ctx, field) + case "rewardsMultiplier": + return ec.fieldContext_ReferralSetStats_rewardsMultiplier(ctx, field) + case "rewardsFactorMultiplier": + return ec.fieldContext_ReferralSetStats_rewardsFactorMultiplier(ctx, field) + case "referrerTakerVolume": + return ec.fieldContext_ReferralSetStats_referrerTakerVolume(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ReferralSetStats", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _ReferralSetStatsEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.ReferralSetStatsEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferralSetStatsEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) fc.Result = res return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StopOrderTrailingPercentOffset_trailingPercentOffset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ReferralSetStatsEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "StopOrderTrailingPercentOffset", + Object: "ReferralSetStatsEdge", Field: field, IsMethod: false, IsResolver: false, @@ -78537,1293 +81455,8978 @@ func (ec *executionContext) fieldContext_StopOrderTrailingPercentOffset_trailing return fc, nil } -func (ec *executionContext) _Subscription_accounts(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_accounts(ctx, field) +func (ec *executionContext) _ReferrerRewardsGenerated_referrerId(ctx context.Context, field graphql.CollectedField, obj *v1.ReferrerRewardsGenerated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferrerRewardsGenerated_referrerId(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().Accounts(rctx, fc.Args["marketId"].(*string), fc.Args["partyId"].(*string), fc.Args["assetId"].(*string), fc.Args["type"].(*vega.AccountType)) + return ec.resolvers.ReferrerRewardsGenerated().ReferrerID(rctx, obj) }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } - return nil + return graphql.Null } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan []*v2.AccountBalance): - if !ok { - return nil + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_ReferrerRewardsGenerated_referrerId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ReferrerRewardsGenerated", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _ReferrerRewardsGenerated_generatedReward(ctx context.Context, field graphql.CollectedField, obj *v1.ReferrerRewardsGenerated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ReferrerRewardsGenerated_generatedReward(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.GeneratedReward, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*v1.PartyAmount) + fc.Result = res + return ec.marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmountᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_ReferrerRewardsGenerated_generatedReward(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ReferrerRewardsGenerated", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "partyId": + return ec.fieldContext_PartyAmount_partyId(ctx, field) + case "amount": + return ec.fieldContext_PartyAmount_amount(ctx, field) } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalNAccountUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAccountBalanceᚄ(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil + return nil, fmt.Errorf("no field named %q was found under type PartyAmount", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Reward_asset(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Reward_asset(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Reward().Asset(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") } + return graphql.Null } + res := resTmp.(*vega.Asset) + fc.Result = res + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_accounts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Reward_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "Reward", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "balance": - return ec.fieldContext_AccountUpdate_balance(ctx, field) - case "assetId": - return ec.fieldContext_AccountUpdate_assetId(ctx, field) - case "type": - return ec.fieldContext_AccountUpdate_type(ctx, field) - case "marketId": - return ec.fieldContext_AccountUpdate_marketId(ctx, field) - case "partyId": - return ec.fieldContext_AccountUpdate_partyId(ctx, field) + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type AccountUpdate", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) }, } + return fc, nil +} + +func (ec *executionContext) _Reward_marketId(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Reward_marketId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null } }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MarketId, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Reward_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Reward", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Reward_rewardType(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Reward_rewardType(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_accounts_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Reward().RewardType(rctx, obj) + }) + if err != nil { ec.Error(ctx, err) - return + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(vega.AccountType) + fc.Result = res + return ec.marshalNAccountType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAccountType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Reward_rewardType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Reward", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type AccountType does not have child fields") + }, } return fc, nil } -func (ec *executionContext) _Subscription_busEvents(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_busEvents(ctx, field) +func (ec *executionContext) _Reward_party(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Reward_party(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().BusEvents(rctx, fc.Args["types"].([]BusEventType), fc.Args["marketId"].(*string), fc.Args["partyId"].(*string), fc.Args["batchSize"].(int)) + return ec.resolvers.Reward().Party(rctx, obj) }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { - return nil + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan []*BusEvent): - if !ok { - return nil + res := resTmp.(*vega.Party) + fc.Result = res + return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Reward_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Reward", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalOBusEvent2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐBusEventᚄ(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Reward_epoch(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Reward_epoch(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Reward().Epoch(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") } + return graphql.Null } + res := resTmp.(*vega.Epoch) + fc.Result = res + return ec.marshalNEpoch2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpoch(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_busEvents(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Reward_epoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "Reward", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": - return ec.fieldContext_BusEvent_id(ctx, field) - case "block": - return ec.fieldContext_BusEvent_block(ctx, field) - case "type": - return ec.fieldContext_BusEvent_type(ctx, field) - case "event": - return ec.fieldContext_BusEvent_event(ctx, field) + return ec.fieldContext_Epoch_id(ctx, field) + case "timestamps": + return ec.fieldContext_Epoch_timestamps(ctx, field) + case "validatorsConnection": + return ec.fieldContext_Epoch_validatorsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Epoch_delegationsConnection(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type BusEvent", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Epoch", field.Name) }, } + return fc, nil +} + +func (ec *executionContext) _Reward_amount(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Reward_amount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null } }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Amount, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Reward_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Reward", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Reward_quantumAmount(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Reward_quantumAmount(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_busEvents_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.QuantumAmount, nil + }) + if err != nil { ec.Error(ctx, err) - return + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Reward_quantumAmount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Reward", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } return fc, nil } -func (ec *executionContext) _Subscription_candles(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_candles(ctx, field) +func (ec *executionContext) _Reward_percentageOfTotal(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Reward_percentageOfTotal(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().Candles(rctx, fc.Args["marketId"].(string), fc.Args["interval"].(vega.Interval)) + return obj.PercentageOfTotal, nil }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } - return nil + return graphql.Null } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan *v2.Candle): - if !ok { - return nil - } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalNCandle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCandle(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Reward_percentageOfTotal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Reward", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Reward_receivedAt(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Reward_receivedAt(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ReceivedAt, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") } + return graphql.Null } + res := resTmp.(int64) + fc.Result = res + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_candles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Reward_receivedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "Reward", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Timestamp does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Reward_lockedUntilEpoch(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Reward_lockedUntilEpoch(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Reward().LockedUntilEpoch(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*vega.Epoch) + fc.Result = res + return ec.marshalNEpoch2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpoch(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Reward_lockedUntilEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Reward", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "periodStart": - return ec.fieldContext_Candle_periodStart(ctx, field) - case "lastUpdateInPeriod": - return ec.fieldContext_Candle_lastUpdateInPeriod(ctx, field) - case "high": - return ec.fieldContext_Candle_high(ctx, field) - case "low": - return ec.fieldContext_Candle_low(ctx, field) - case "open": - return ec.fieldContext_Candle_open(ctx, field) - case "close": - return ec.fieldContext_Candle_close(ctx, field) - case "volume": - return ec.fieldContext_Candle_volume(ctx, field) - case "notional": - return ec.fieldContext_Candle_notional(ctx, field) + case "id": + return ec.fieldContext_Epoch_id(ctx, field) + case "timestamps": + return ec.fieldContext_Epoch_timestamps(ctx, field) + case "validatorsConnection": + return ec.fieldContext_Epoch_validatorsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Epoch_delegationsConnection(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Candle", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Epoch", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Reward_gameId(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Reward_gameId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.GameId, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOID2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Reward_gameId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Reward", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Reward_teamId(ctx context.Context, field graphql.CollectedField, obj *vega.Reward) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Reward_teamId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TeamId, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOID2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Reward_teamId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Reward", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.RewardEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*vega.Reward) + fc.Result = res + return ec.marshalNReward2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐReward(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "asset": + return ec.fieldContext_Reward_asset(ctx, field) + case "marketId": + return ec.fieldContext_Reward_marketId(ctx, field) + case "rewardType": + return ec.fieldContext_Reward_rewardType(ctx, field) + case "party": + return ec.fieldContext_Reward_party(ctx, field) + case "epoch": + return ec.fieldContext_Reward_epoch(ctx, field) + case "amount": + return ec.fieldContext_Reward_amount(ctx, field) + case "quantumAmount": + return ec.fieldContext_Reward_quantumAmount(ctx, field) + case "percentageOfTotal": + return ec.fieldContext_Reward_percentageOfTotal(ctx, field) + case "receivedAt": + return ec.fieldContext_Reward_receivedAt(ctx, field) + case "lockedUntilEpoch": + return ec.fieldContext_Reward_lockedUntilEpoch(ctx, field) + case "gameId": + return ec.fieldContext_Reward_gameId(ctx, field) + case "teamId": + return ec.fieldContext_Reward_teamId(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Reward", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.RewardEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardScore_rawValidatorScore(ctx context.Context, field graphql.CollectedField, obj *vega.RewardScore) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardScore_rawValidatorScore(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RawValidatorScore, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardScore_rawValidatorScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardScore", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardScore_performanceScore(ctx context.Context, field graphql.CollectedField, obj *vega.RewardScore) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardScore_performanceScore(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PerformanceScore, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardScore_performanceScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardScore", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardScore_multisigScore(ctx context.Context, field graphql.CollectedField, obj *vega.RewardScore) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardScore_multisigScore(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MultisigScore, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardScore_multisigScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardScore", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardScore_validatorScore(ctx context.Context, field graphql.CollectedField, obj *vega.RewardScore) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardScore_validatorScore(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ValidatorScore, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardScore_validatorScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardScore", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardScore_normalisedScore(ctx context.Context, field graphql.CollectedField, obj *vega.RewardScore) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardScore_normalisedScore(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.NormalisedScore, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardScore_normalisedScore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardScore", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardScore_validatorStatus(ctx context.Context, field graphql.CollectedField, obj *vega.RewardScore) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardScore_validatorStatus(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ValidatorStatus, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(vega.ValidatorNodeStatus) + fc.Result = res + return ec.marshalNValidatorStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐValidatorNodeStatus(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardScore_validatorStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardScore", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ValidatorStatus does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardSummary_asset(ctx context.Context, field graphql.CollectedField, obj *vega.RewardSummary) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardSummary_asset(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.RewardSummary().Asset(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*vega.Asset) + fc.Result = res + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardSummary_asset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardSummary", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardSummary_amount(ctx context.Context, field graphql.CollectedField, obj *vega.RewardSummary) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardSummary_amount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Amount, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardSummary_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardSummary", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardSummary_rewardsConnection(ctx context.Context, field graphql.CollectedField, obj *vega.RewardSummary) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardSummary_rewardsConnection(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.RewardSummary().RewardsConnection(rctx, obj, fc.Args["assetId"].(*string), fc.Args["pagination"].(*v2.Pagination)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*v2.RewardsConnection) + fc.Result = res + return ec.marshalORewardsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐRewardsConnection(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardSummary_rewardsConnection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardSummary", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "edges": + return ec.fieldContext_RewardsConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_RewardsConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type RewardsConnection", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_RewardSummary_rewardsConnection_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _RewardSummaryConnection_edges(ctx context.Context, field graphql.CollectedField, obj *RewardSummaryConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardSummaryConnection_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*RewardSummaryEdge) + fc.Result = res + return ec.marshalORewardSummaryEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐRewardSummaryEdge(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardSummaryConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardSummaryConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "node": + return ec.fieldContext_RewardSummaryEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_RewardSummaryEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type RewardSummaryEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardSummaryConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *RewardSummaryConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardSummaryConnection_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*v2.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardSummaryConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardSummaryConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardSummaryEdge_node(ctx context.Context, field graphql.CollectedField, obj *RewardSummaryEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardSummaryEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*vega.RewardSummary) + fc.Result = res + return ec.marshalNRewardSummary2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐRewardSummary(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardSummaryEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardSummaryEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "asset": + return ec.fieldContext_RewardSummary_asset(ctx, field) + case "amount": + return ec.fieldContext_RewardSummary_amount(ctx, field) + case "rewardsConnection": + return ec.fieldContext_RewardSummary_rewardsConnection(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type RewardSummary", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardSummaryEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *RewardSummaryEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardSummaryEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardSummaryEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardSummaryEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.RewardsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardsConnection_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*v2.RewardEdge) + fc.Result = res + return ec.marshalORewardEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐRewardEdge(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardsConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "node": + return ec.fieldContext_RewardEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_RewardEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type RewardEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _RewardsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.RewardsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RewardsConnection_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*v2.PageInfo) + fc.Result = res + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RewardsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RewardsConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _RiskFactor_market(ctx context.Context, field graphql.CollectedField, obj *vega.RiskFactor) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RiskFactor_market(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Market, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RiskFactor_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RiskFactor", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RiskFactor_short(ctx context.Context, field graphql.CollectedField, obj *vega.RiskFactor) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RiskFactor_short(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Short, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RiskFactor_short(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RiskFactor", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _RiskFactor_long(ctx context.Context, field graphql.CollectedField, obj *vega.RiskFactor) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_RiskFactor_long(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Long, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_RiskFactor_long(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "RiskFactor", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _ScalingFactors_searchLevel(ctx context.Context, field graphql.CollectedField, obj *vega.ScalingFactors) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ScalingFactors_searchLevel(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SearchLevel, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(float64) + fc.Result = res + return ec.marshalNFloat2float64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_ScalingFactors_searchLevel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ScalingFactors", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _ScalingFactors_initialMargin(ctx context.Context, field graphql.CollectedField, obj *vega.ScalingFactors) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ScalingFactors_initialMargin(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.InitialMargin, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(float64) + fc.Result = res + return ec.marshalNFloat2float64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_ScalingFactors_initialMargin(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ScalingFactors", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _ScalingFactors_collateralRelease(ctx context.Context, field graphql.CollectedField, obj *vega.ScalingFactors) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ScalingFactors_collateralRelease(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CollateralRelease, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(float64) + fc.Result = res + return ec.marshalNFloat2float64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_ScalingFactors_collateralRelease(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ScalingFactors", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SettleDistressed_marketId(ctx context.Context, field graphql.CollectedField, obj *SettleDistressed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SettleDistressed_marketId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MarketID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SettleDistressed_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SettleDistressed", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SettleDistressed_partyId(ctx context.Context, field graphql.CollectedField, obj *SettleDistressed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SettleDistressed_partyId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PartyID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SettleDistressed_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SettleDistressed", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SettleDistressed_margin(ctx context.Context, field graphql.CollectedField, obj *SettleDistressed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SettleDistressed_margin(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Margin, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SettleDistressed_margin(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SettleDistressed", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SettleDistressed_price(ctx context.Context, field graphql.CollectedField, obj *SettleDistressed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SettleDistressed_price(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Price, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SettleDistressed_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SettleDistressed", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SettlePosition_marketId(ctx context.Context, field graphql.CollectedField, obj *SettlePosition) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SettlePosition_marketId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MarketID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SettlePosition_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SettlePosition", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SettlePosition_partyId(ctx context.Context, field graphql.CollectedField, obj *SettlePosition) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SettlePosition_partyId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PartyID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SettlePosition_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SettlePosition", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SettlePosition_price(ctx context.Context, field graphql.CollectedField, obj *SettlePosition) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SettlePosition_price(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Price, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SettlePosition_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SettlePosition", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SettlePosition_tradeSettlements(ctx context.Context, field graphql.CollectedField, obj *SettlePosition) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SettlePosition_tradeSettlements(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TradeSettlements, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*TradeSettlement) + fc.Result = res + return ec.marshalOTradeSettlement2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTradeSettlementᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SettlePosition_tradeSettlements(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SettlePosition", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "size": + return ec.fieldContext_TradeSettlement_size(ctx, field) + case "price": + return ec.fieldContext_TradeSettlement_price(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TradeSettlement", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Signer_signer(ctx context.Context, field graphql.CollectedField, obj *Signer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Signer_signer(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Signer, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(SignerKind) + fc.Result = res + return ec.marshalNSignerKind2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐSignerKind(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Signer_signer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Signer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type SignerKind does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SimpleRiskModel_params(ctx context.Context, field graphql.CollectedField, obj *vega.SimpleRiskModel) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SimpleRiskModel_params(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Params, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*vega.SimpleModelParams) + fc.Result = res + return ec.marshalNSimpleRiskModelParams2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐSimpleModelParams(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SimpleRiskModel_params(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SimpleRiskModel", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "factorLong": + return ec.fieldContext_SimpleRiskModelParams_factorLong(ctx, field) + case "factorShort": + return ec.fieldContext_SimpleRiskModelParams_factorShort(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SimpleRiskModelParams", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SimpleRiskModelParams_factorLong(ctx context.Context, field graphql.CollectedField, obj *vega.SimpleModelParams) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SimpleRiskModelParams_factorLong(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.FactorLong, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(float64) + fc.Result = res + return ec.marshalNFloat2float64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SimpleRiskModelParams_factorLong(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SimpleRiskModelParams", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SimpleRiskModelParams_factorShort(ctx context.Context, field graphql.CollectedField, obj *vega.SimpleModelParams) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SimpleRiskModelParams_factorShort(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.FactorShort, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(float64) + fc.Result = res + return ec.marshalNFloat2float64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SimpleRiskModelParams_factorShort(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SimpleRiskModelParams", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SpecBindingForCompositePrice_priceSourceProperty(ctx context.Context, field graphql.CollectedField, obj *SpecBindingForCompositePrice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SpecBindingForCompositePrice_priceSourceProperty(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PriceSourceProperty, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SpecBindingForCompositePrice_priceSourceProperty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SpecBindingForCompositePrice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Spot_baseAsset(ctx context.Context, field graphql.CollectedField, obj *vega.Spot) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Spot_baseAsset(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Spot().BaseAsset(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*vega.Asset) + fc.Result = res + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Spot_baseAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Spot", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Spot_quoteAsset(ctx context.Context, field graphql.CollectedField, obj *vega.Spot) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Spot_quoteAsset(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Spot().QuoteAsset(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*vega.Asset) + fc.Result = res + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Spot_quoteAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Spot", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Spot_name(ctx context.Context, field graphql.CollectedField, obj *vega.Spot) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Spot_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Spot_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Spot", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SpotProduct_baseAsset(ctx context.Context, field graphql.CollectedField, obj *vega.SpotProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SpotProduct_baseAsset(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.SpotProduct().BaseAsset(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*vega.Asset) + fc.Result = res + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SpotProduct_baseAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SpotProduct", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SpotProduct_quoteAsset(ctx context.Context, field graphql.CollectedField, obj *vega.SpotProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SpotProduct_quoteAsset(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.SpotProduct().QuoteAsset(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*vega.Asset) + fc.Result = res + return ec.marshalNAsset2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐAsset(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SpotProduct_quoteAsset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SpotProduct", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Asset_id(ctx, field) + case "name": + return ec.fieldContext_Asset_name(ctx, field) + case "symbol": + return ec.fieldContext_Asset_symbol(ctx, field) + case "decimals": + return ec.fieldContext_Asset_decimals(ctx, field) + case "quantum": + return ec.fieldContext_Asset_quantum(ctx, field) + case "source": + return ec.fieldContext_Asset_source(ctx, field) + case "status": + return ec.fieldContext_Asset_status(ctx, field) + case "infrastructureFeeAccount": + return ec.fieldContext_Asset_infrastructureFeeAccount(ctx, field) + case "globalRewardPoolAccount": + return ec.fieldContext_Asset_globalRewardPoolAccount(ctx, field) + case "globalInsuranceAccount": + return ec.fieldContext_Asset_globalInsuranceAccount(ctx, field) + case "networkTreasuryAccount": + return ec.fieldContext_Asset_networkTreasuryAccount(ctx, field) + case "takerFeeRewardAccount": + return ec.fieldContext_Asset_takerFeeRewardAccount(ctx, field) + case "makerFeeRewardAccount": + return ec.fieldContext_Asset_makerFeeRewardAccount(ctx, field) + case "lpFeeRewardAccount": + return ec.fieldContext_Asset_lpFeeRewardAccount(ctx, field) + case "marketProposerRewardAccount": + return ec.fieldContext_Asset_marketProposerRewardAccount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Asset", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SpotProduct_name(ctx context.Context, field graphql.CollectedField, obj *vega.SpotProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SpotProduct_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SpotProduct_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SpotProduct", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StakeLinking_id(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakeLinking_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Id, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakeLinking_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakeLinking", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StakeLinking_type(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakeLinking_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(v1.StakeLinking_Type) + fc.Result = res + return ec.marshalNStakeLinkingType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐStakeLinking_Type(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakeLinking_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakeLinking", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type StakeLinkingType does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StakeLinking_timestamp(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakeLinking_timestamp(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StakeLinking().Timestamp(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakeLinking_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakeLinking", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Timestamp does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StakeLinking_party(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakeLinking_party(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StakeLinking().Party(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*vega.Party) + fc.Result = res + return ec.marshalNParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakeLinking_party(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakeLinking", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Party_id(ctx, field) + case "ordersConnection": + return ec.fieldContext_Party_ordersConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Party_tradesConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Party_accountsConnection(ctx, field) + case "positionsConnection": + return ec.fieldContext_Party_positionsConnection(ctx, field) + case "marginsConnection": + return ec.fieldContext_Party_marginsConnection(ctx, field) + case "proposalsConnection": + return ec.fieldContext_Party_proposalsConnection(ctx, field) + case "votesConnection": + return ec.fieldContext_Party_votesConnection(ctx, field) + case "withdrawalsConnection": + return ec.fieldContext_Party_withdrawalsConnection(ctx, field) + case "depositsConnection": + return ec.fieldContext_Party_depositsConnection(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Party_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Party_liquidityProvisionsConnection(ctx, field) + case "delegationsConnection": + return ec.fieldContext_Party_delegationsConnection(ctx, field) + case "stakingSummary": + return ec.fieldContext_Party_stakingSummary(ctx, field) + case "rewardsConnection": + return ec.fieldContext_Party_rewardsConnection(ctx, field) + case "rewardSummaries": + return ec.fieldContext_Party_rewardSummaries(ctx, field) + case "transfersConnection": + return ec.fieldContext_Party_transfersConnection(ctx, field) + case "activityStreak": + return ec.fieldContext_Party_activityStreak(ctx, field) + case "vestingBalancesSummary": + return ec.fieldContext_Party_vestingBalancesSummary(ctx, field) + case "vestingStats": + return ec.fieldContext_Party_vestingStats(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Party", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _StakeLinking_amount(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakeLinking_amount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Amount, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakeLinking_amount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakeLinking", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StakeLinking_status(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakeLinking_status(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Status, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(v1.StakeLinking_Status) + fc.Result = res + return ec.marshalNStakeLinkingStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐStakeLinking_Status(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakeLinking_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakeLinking", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type StakeLinkingStatus does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StakeLinking_finalizedAt(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakeLinking_finalizedAt(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.FinalizedAt, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalOTimestamp2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakeLinking_finalizedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakeLinking", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Timestamp does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StakeLinking_txHash(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakeLinking_txHash(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TxHash, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakeLinking_txHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakeLinking", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StakeLinking_blockHeight(ctx context.Context, field graphql.CollectedField, obj *v1.StakeLinking) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakeLinking_blockHeight(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StakeLinking().BlockHeight(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakeLinking_blockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakeLinking", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StakeLinkingEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.StakeLinkingEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakeLinkingEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*v1.StakeLinking) + fc.Result = res + return ec.marshalNStakeLinking2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐStakeLinking(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakeLinkingEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakeLinkingEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_StakeLinking_id(ctx, field) + case "type": + return ec.fieldContext_StakeLinking_type(ctx, field) + case "timestamp": + return ec.fieldContext_StakeLinking_timestamp(ctx, field) + case "party": + return ec.fieldContext_StakeLinking_party(ctx, field) + case "amount": + return ec.fieldContext_StakeLinking_amount(ctx, field) + case "status": + return ec.fieldContext_StakeLinking_status(ctx, field) + case "finalizedAt": + return ec.fieldContext_StakeLinking_finalizedAt(ctx, field) + case "txHash": + return ec.fieldContext_StakeLinking_txHash(ctx, field) + case "blockHeight": + return ec.fieldContext_StakeLinking_blockHeight(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type StakeLinking", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _StakeLinkingEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.StakeLinkingEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakeLinkingEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakeLinkingEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakeLinkingEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StakesConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.StakesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakesConnection_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*v2.StakeLinkingEdge) + fc.Result = res + return ec.marshalOStakeLinkingEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐStakeLinkingEdge(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakesConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakesConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "node": + return ec.fieldContext_StakeLinkingEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_StakeLinkingEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type StakeLinkingEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _StakesConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.StakesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakesConnection_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*v2.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakesConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakesConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _StakingSummary_currentStakeAvailable(ctx context.Context, field graphql.CollectedField, obj *StakingSummary) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakingSummary_currentStakeAvailable(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CurrentStakeAvailable, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakingSummary_currentStakeAvailable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakingSummary", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StakingSummary_linkings(ctx context.Context, field graphql.CollectedField, obj *StakingSummary) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakingSummary_linkings(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Linkings, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*v2.StakesConnection) + fc.Result = res + return ec.marshalNStakesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐStakesConnection(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakingSummary_linkings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakingSummary", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "edges": + return ec.fieldContext_StakesConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_StakesConnection_pageInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type StakesConnection", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_StakingSummary_linkings_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _StakingTier_minimumStakedTokens(ctx context.Context, field graphql.CollectedField, obj *vega.StakingTier) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakingTier_minimumStakedTokens(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MinimumStakedTokens, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakingTier_minimumStakedTokens(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakingTier", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StakingTier_referralRewardMultiplier(ctx context.Context, field graphql.CollectedField, obj *vega.StakingTier) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StakingTier_referralRewardMultiplier(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ReferralRewardMultiplier, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StakingTier_referralRewardMultiplier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StakingTier", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_blockHeight(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_blockHeight(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().BlockHeight(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_blockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_blockHash(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_blockHash(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.BlockHash, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_blockHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_backlogLength(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_backlogLength(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().BacklogLength(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_backlogLength(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_totalPeers(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_totalPeers(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().TotalPeers(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_totalPeers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_genesisTime(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_genesisTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().GenesisTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_genesisTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Timestamp does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_currentTime(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_currentTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().CurrentTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_currentTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Timestamp does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_upTime(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_upTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Uptime, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_upTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_vegaTime(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_vegaTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().VegaTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_vegaTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Timestamp does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_status(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_status(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().Status(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_txPerBlock(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_txPerBlock(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().TxPerBlock(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_txPerBlock(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_averageTxBytes(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_averageTxBytes(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().AverageTxBytes(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_averageTxBytes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_averageOrdersPerBlock(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_averageOrdersPerBlock(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().AverageOrdersPerBlock(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_averageOrdersPerBlock(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_tradesPerSecond(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_tradesPerSecond(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().TradesPerSecond(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_tradesPerSecond(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_ordersPerSecond(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_ordersPerSecond(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().OrdersPerSecond(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_ordersPerSecond(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_totalMarkets(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_totalMarkets(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().TotalMarkets(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_totalMarkets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_totalAmendOrder(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_totalAmendOrder(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().TotalAmendOrder(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_totalAmendOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_totalCancelOrder(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_totalCancelOrder(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().TotalCancelOrder(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_totalCancelOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_totalCreateOrder(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_totalCreateOrder(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().TotalCreateOrder(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_totalCreateOrder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_totalOrders(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_totalOrders(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().TotalOrders(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_totalOrders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_totalTrades(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_totalTrades(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().TotalTrades(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_totalTrades(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_eventCount(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_eventCount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().EventCount(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_eventCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_eventsPerSecond(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_eventsPerSecond(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().EventsPerSecond(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_eventsPerSecond(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_appVersionHash(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_appVersionHash(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.AppVersionHash, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_appVersionHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_appVersion(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_appVersion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.AppVersion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_appVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_chainVersion(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_chainVersion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ChainVersion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_chainVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_blockDuration(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_blockDuration(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Statistics().BlockDuration(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_blockDuration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Statistics_chainId(ctx context.Context, field graphql.CollectedField, obj *v12.Statistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Statistics_chainId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ChainId, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Statistics_chainId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Statistics", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_id(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().ID(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_ocoLinkId(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_ocoLinkId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().OcoLinkID(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOID2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_ocoLinkId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_expiresAt(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_expiresAt(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().ExpiresAt(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int64) + fc.Result = res + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_expiresAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Timestamp does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_expiryStrategy(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_expiryStrategy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().ExpiryStrategy(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*vega.StopOrder_ExpiryStrategy) + fc.Result = res + return ec.marshalOStopOrderExpiryStrategy2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStopOrder_ExpiryStrategy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_expiryStrategy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type StopOrderExpiryStrategy does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_triggerDirection(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_triggerDirection(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().TriggerDirection(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(vega.StopOrder_TriggerDirection) + fc.Result = res + return ec.marshalNStopOrderTriggerDirection2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStopOrder_TriggerDirection(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_triggerDirection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type StopOrderTriggerDirection does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_status(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_status(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().Status(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(vega.StopOrder_Status) + fc.Result = res + return ec.marshalNStopOrderStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStopOrder_Status(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type StopOrderStatus does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_createdAt(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_createdAt(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().CreatedAt(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Timestamp does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_updatedAt(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_updatedAt(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().UpdatedAt(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int64) + fc.Result = res + return ec.marshalOTimestamp2ᚖint64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Timestamp does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_partyId(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_partyId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().PartyID(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_marketId(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_marketId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().MarketID(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_marketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_trigger(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_trigger(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().Trigger(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(StopOrderTrigger) + fc.Result = res + return ec.marshalNStopOrderTrigger2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐStopOrderTrigger(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_trigger(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type StopOrderTrigger does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_submission(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_submission(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Submission, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*v11.OrderSubmission) + fc.Result = res + return ec.marshalNOrderSubmission2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋcommandsᚋv1ᚐOrderSubmission(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_submission(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "marketId": + return ec.fieldContext_OrderSubmission_marketId(ctx, field) + case "price": + return ec.fieldContext_OrderSubmission_price(ctx, field) + case "size": + return ec.fieldContext_OrderSubmission_size(ctx, field) + case "side": + return ec.fieldContext_OrderSubmission_side(ctx, field) + case "timeInForce": + return ec.fieldContext_OrderSubmission_timeInForce(ctx, field) + case "expiresAt": + return ec.fieldContext_OrderSubmission_expiresAt(ctx, field) + case "type": + return ec.fieldContext_OrderSubmission_type(ctx, field) + case "reference": + return ec.fieldContext_OrderSubmission_reference(ctx, field) + case "peggedOrder": + return ec.fieldContext_OrderSubmission_peggedOrder(ctx, field) + case "postOnly": + return ec.fieldContext_OrderSubmission_postOnly(ctx, field) + case "reduceOnly": + return ec.fieldContext_OrderSubmission_reduceOnly(ctx, field) + case "icebergOrder": + return ec.fieldContext_OrderSubmission_icebergOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OrderSubmission", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_order(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_order(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().Order(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*vega.Order) + fc.Result = res + return ec.marshalOOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_order(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Order_id(ctx, field) + case "price": + return ec.fieldContext_Order_price(ctx, field) + case "timeInForce": + return ec.fieldContext_Order_timeInForce(ctx, field) + case "side": + return ec.fieldContext_Order_side(ctx, field) + case "market": + return ec.fieldContext_Order_market(ctx, field) + case "size": + return ec.fieldContext_Order_size(ctx, field) + case "remaining": + return ec.fieldContext_Order_remaining(ctx, field) + case "party": + return ec.fieldContext_Order_party(ctx, field) + case "createdAt": + return ec.fieldContext_Order_createdAt(ctx, field) + case "expiresAt": + return ec.fieldContext_Order_expiresAt(ctx, field) + case "status": + return ec.fieldContext_Order_status(ctx, field) + case "reference": + return ec.fieldContext_Order_reference(ctx, field) + case "tradesConnection": + return ec.fieldContext_Order_tradesConnection(ctx, field) + case "type": + return ec.fieldContext_Order_type(ctx, field) + case "rejectionReason": + return ec.fieldContext_Order_rejectionReason(ctx, field) + case "version": + return ec.fieldContext_Order_version(ctx, field) + case "updatedAt": + return ec.fieldContext_Order_updatedAt(ctx, field) + case "peggedOrder": + return ec.fieldContext_Order_peggedOrder(ctx, field) + case "liquidityProvision": + return ec.fieldContext_Order_liquidityProvision(ctx, field) + case "postOnly": + return ec.fieldContext_Order_postOnly(ctx, field) + case "reduceOnly": + return ec.fieldContext_Order_reduceOnly(ctx, field) + case "icebergOrder": + return ec.fieldContext_Order_icebergOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Order", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_rejectionReason(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_rejectionReason(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().RejectionReason(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*vega.StopOrder_RejectionReason) + fc.Result = res + return ec.marshalOStopOrderRejectionReason2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStopOrder_RejectionReason(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_rejectionReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type StopOrderRejectionReason does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_sizeOverrideSetting(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_sizeOverrideSetting(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().SizeOverrideSetting(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(vega.StopOrder_SizeOverrideSetting) + fc.Result = res + return ec.marshalNStopOrderSizeOverrideSetting2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStopOrder_SizeOverrideSetting(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_sizeOverrideSetting(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type StopOrderSizeOverrideSetting does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrder_sizeOverrideValue(ctx context.Context, field graphql.CollectedField, obj *v1.StopOrderEvent) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrder_sizeOverrideValue(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.StopOrder().SizeOverrideValue(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrder_sizeOverrideValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrder", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrderConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.StopOrderConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrderConnection_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*v2.StopOrderEdge) + fc.Result = res + return ec.marshalOStopOrderEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐStopOrderEdgeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrderConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrderConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "node": + return ec.fieldContext_StopOrderEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_StopOrderEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type StopOrderEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrderConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.StopOrderConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrderConnection_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*v2.PageInfo) + fc.Result = res + return ec.marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrderConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrderConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrderEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.StopOrderEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrderEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*v1.StopOrderEvent) + fc.Result = res + return ec.marshalOStopOrder2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐStopOrderEvent(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrderEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrderEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_StopOrder_id(ctx, field) + case "ocoLinkId": + return ec.fieldContext_StopOrder_ocoLinkId(ctx, field) + case "expiresAt": + return ec.fieldContext_StopOrder_expiresAt(ctx, field) + case "expiryStrategy": + return ec.fieldContext_StopOrder_expiryStrategy(ctx, field) + case "triggerDirection": + return ec.fieldContext_StopOrder_triggerDirection(ctx, field) + case "status": + return ec.fieldContext_StopOrder_status(ctx, field) + case "createdAt": + return ec.fieldContext_StopOrder_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_StopOrder_updatedAt(ctx, field) + case "partyId": + return ec.fieldContext_StopOrder_partyId(ctx, field) + case "marketId": + return ec.fieldContext_StopOrder_marketId(ctx, field) + case "trigger": + return ec.fieldContext_StopOrder_trigger(ctx, field) + case "submission": + return ec.fieldContext_StopOrder_submission(ctx, field) + case "order": + return ec.fieldContext_StopOrder_order(ctx, field) + case "rejectionReason": + return ec.fieldContext_StopOrder_rejectionReason(ctx, field) + case "sizeOverrideSetting": + return ec.fieldContext_StopOrder_sizeOverrideSetting(ctx, field) + case "sizeOverrideValue": + return ec.fieldContext_StopOrder_sizeOverrideValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type StopOrder", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrderEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.StopOrderEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrderEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrderEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrderEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrderPrice_price(ctx context.Context, field graphql.CollectedField, obj *StopOrderPrice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrderPrice_price(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Price, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrderPrice_price(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrderPrice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _StopOrderTrailingPercentOffset_trailingPercentOffset(ctx context.Context, field graphql.CollectedField, obj *StopOrderTrailingPercentOffset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_StopOrderTrailingPercentOffset_trailingPercentOffset(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TrailingPercentOffset, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_StopOrderTrailingPercentOffset_trailingPercentOffset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "StopOrderTrailingPercentOffset", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Subscription_accounts(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_accounts(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().Accounts(rctx, fc.Args["marketId"].(*string), fc.Args["partyId"].(*string), fc.Args["assetId"].(*string), fc.Args["type"].(*vega.AccountType)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan []*v2.AccountBalance): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalNAccountUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAccountBalanceᚄ(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_accounts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "balance": + return ec.fieldContext_AccountUpdate_balance(ctx, field) + case "assetId": + return ec.fieldContext_AccountUpdate_assetId(ctx, field) + case "type": + return ec.fieldContext_AccountUpdate_type(ctx, field) + case "marketId": + return ec.fieldContext_AccountUpdate_marketId(ctx, field) + case "partyId": + return ec.fieldContext_AccountUpdate_partyId(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AccountUpdate", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_accounts_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_busEvents(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_busEvents(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().BusEvents(rctx, fc.Args["types"].([]BusEventType), fc.Args["marketId"].(*string), fc.Args["partyId"].(*string), fc.Args["batchSize"].(int)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan []*BusEvent): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOBusEvent2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐBusEventᚄ(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_busEvents(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_BusEvent_id(ctx, field) + case "block": + return ec.fieldContext_BusEvent_block(ctx, field) + case "type": + return ec.fieldContext_BusEvent_type(ctx, field) + case "event": + return ec.fieldContext_BusEvent_event(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type BusEvent", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_busEvents_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_candles(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_candles(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().Candles(rctx, fc.Args["marketId"].(string), fc.Args["interval"].(vega.Interval)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *v2.Candle): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalNCandle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCandle(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_candles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "periodStart": + return ec.fieldContext_Candle_periodStart(ctx, field) + case "lastUpdateInPeriod": + return ec.fieldContext_Candle_lastUpdateInPeriod(ctx, field) + case "high": + return ec.fieldContext_Candle_high(ctx, field) + case "low": + return ec.fieldContext_Candle_low(ctx, field) + case "open": + return ec.fieldContext_Candle_open(ctx, field) + case "close": + return ec.fieldContext_Candle_close(ctx, field) + case "volume": + return ec.fieldContext_Candle_volume(ctx, field) + case "notional": + return ec.fieldContext_Candle_notional(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Candle", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_candles_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_liquidityProvisions(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_liquidityProvisions(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().LiquidityProvisions(rctx, fc.Args["partyId"].(*string), fc.Args["marketId"].(*string)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan []*vega.LiquidityProvision): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOLiquidityProvisionUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvisionᚄ(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_liquidityProvisions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_LiquidityProvisionUpdate_id(ctx, field) + case "partyID": + return ec.fieldContext_LiquidityProvisionUpdate_partyID(ctx, field) + case "createdAt": + return ec.fieldContext_LiquidityProvisionUpdate_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_LiquidityProvisionUpdate_updatedAt(ctx, field) + case "marketID": + return ec.fieldContext_LiquidityProvisionUpdate_marketID(ctx, field) + case "commitmentAmount": + return ec.fieldContext_LiquidityProvisionUpdate_commitmentAmount(ctx, field) + case "fee": + return ec.fieldContext_LiquidityProvisionUpdate_fee(ctx, field) + case "sells": + return ec.fieldContext_LiquidityProvisionUpdate_sells(ctx, field) + case "buys": + return ec.fieldContext_LiquidityProvisionUpdate_buys(ctx, field) + case "version": + return ec.fieldContext_LiquidityProvisionUpdate_version(ctx, field) + case "status": + return ec.fieldContext_LiquidityProvisionUpdate_status(ctx, field) + case "reference": + return ec.fieldContext_LiquidityProvisionUpdate_reference(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionUpdate", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_liquidityProvisions_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_margins(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_margins(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().Margins(rctx, fc.Args["partyId"].(string), fc.Args["marketId"].(*string)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *vega.MarginLevels): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalNMarginLevelsUpdate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginLevels(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_margins(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "marketId": + return ec.fieldContext_MarginLevelsUpdate_marketId(ctx, field) + case "asset": + return ec.fieldContext_MarginLevelsUpdate_asset(ctx, field) + case "partyId": + return ec.fieldContext_MarginLevelsUpdate_partyId(ctx, field) + case "maintenanceLevel": + return ec.fieldContext_MarginLevelsUpdate_maintenanceLevel(ctx, field) + case "searchLevel": + return ec.fieldContext_MarginLevelsUpdate_searchLevel(ctx, field) + case "initialLevel": + return ec.fieldContext_MarginLevelsUpdate_initialLevel(ctx, field) + case "orderMarginLevel": + return ec.fieldContext_MarginLevelsUpdate_orderMarginLevel(ctx, field) + case "collateralReleaseLevel": + return ec.fieldContext_MarginLevelsUpdate_collateralReleaseLevel(ctx, field) + case "timestamp": + return ec.fieldContext_MarginLevelsUpdate_timestamp(ctx, field) + case "marginMode": + return ec.fieldContext_MarginLevelsUpdate_marginMode(ctx, field) + case "marginFactor": + return ec.fieldContext_MarginLevelsUpdate_marginFactor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type MarginLevelsUpdate", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_margins_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_marketsData(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_marketsData(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().MarketsData(rctx, fc.Args["marketIds"].([]string)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan []*vega.MarketData): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalNObservableMarketData2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketDataᚄ(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_marketsData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "marketId": + return ec.fieldContext_ObservableMarketData_marketId(ctx, field) + case "markPrice": + return ec.fieldContext_ObservableMarketData_markPrice(ctx, field) + case "bestBidPrice": + return ec.fieldContext_ObservableMarketData_bestBidPrice(ctx, field) + case "bestBidVolume": + return ec.fieldContext_ObservableMarketData_bestBidVolume(ctx, field) + case "bestOfferPrice": + return ec.fieldContext_ObservableMarketData_bestOfferPrice(ctx, field) + case "bestOfferVolume": + return ec.fieldContext_ObservableMarketData_bestOfferVolume(ctx, field) + case "bestStaticBidPrice": + return ec.fieldContext_ObservableMarketData_bestStaticBidPrice(ctx, field) + case "bestStaticBidVolume": + return ec.fieldContext_ObservableMarketData_bestStaticBidVolume(ctx, field) + case "bestStaticOfferPrice": + return ec.fieldContext_ObservableMarketData_bestStaticOfferPrice(ctx, field) + case "bestStaticOfferVolume": + return ec.fieldContext_ObservableMarketData_bestStaticOfferVolume(ctx, field) + case "midPrice": + return ec.fieldContext_ObservableMarketData_midPrice(ctx, field) + case "staticMidPrice": + return ec.fieldContext_ObservableMarketData_staticMidPrice(ctx, field) + case "timestamp": + return ec.fieldContext_ObservableMarketData_timestamp(ctx, field) + case "openInterest": + return ec.fieldContext_ObservableMarketData_openInterest(ctx, field) + case "auctionEnd": + return ec.fieldContext_ObservableMarketData_auctionEnd(ctx, field) + case "auctionStart": + return ec.fieldContext_ObservableMarketData_auctionStart(ctx, field) + case "indicativePrice": + return ec.fieldContext_ObservableMarketData_indicativePrice(ctx, field) + case "indicativeVolume": + return ec.fieldContext_ObservableMarketData_indicativeVolume(ctx, field) + case "marketTradingMode": + return ec.fieldContext_ObservableMarketData_marketTradingMode(ctx, field) + case "marketState": + return ec.fieldContext_ObservableMarketData_marketState(ctx, field) + case "trigger": + return ec.fieldContext_ObservableMarketData_trigger(ctx, field) + case "extensionTrigger": + return ec.fieldContext_ObservableMarketData_extensionTrigger(ctx, field) + case "targetStake": + return ec.fieldContext_ObservableMarketData_targetStake(ctx, field) + case "suppliedStake": + return ec.fieldContext_ObservableMarketData_suppliedStake(ctx, field) + case "priceMonitoringBounds": + return ec.fieldContext_ObservableMarketData_priceMonitoringBounds(ctx, field) + case "marketValueProxy": + return ec.fieldContext_ObservableMarketData_marketValueProxy(ctx, field) + case "liquidityProviderFeeShare": + return ec.fieldContext_ObservableMarketData_liquidityProviderFeeShare(ctx, field) + case "liquidityProviderSla": + return ec.fieldContext_ObservableMarketData_liquidityProviderSla(ctx, field) + case "nextMarkToMarket": + return ec.fieldContext_ObservableMarketData_nextMarkToMarket(ctx, field) + case "marketGrowth": + return ec.fieldContext_ObservableMarketData_marketGrowth(ctx, field) + case "lastTradedPrice": + return ec.fieldContext_ObservableMarketData_lastTradedPrice(ctx, field) + case "productData": + return ec.fieldContext_ObservableMarketData_productData(ctx, field) + case "markPriceType": + return ec.fieldContext_ObservableMarketData_markPriceType(ctx, field) + case "markPriceState": + return ec.fieldContext_ObservableMarketData_markPriceState(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ObservableMarketData", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_marketsData_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_marketsDepth(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_marketsDepth(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().MarketsDepth(rctx, fc.Args["marketIds"].([]string)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan []*vega.MarketDepth): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalNObservableMarketDepth2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketDepthᚄ(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_marketsDepth(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "marketId": + return ec.fieldContext_ObservableMarketDepth_marketId(ctx, field) + case "buy": + return ec.fieldContext_ObservableMarketDepth_buy(ctx, field) + case "sell": + return ec.fieldContext_ObservableMarketDepth_sell(ctx, field) + case "lastTrade": + return ec.fieldContext_ObservableMarketDepth_lastTrade(ctx, field) + case "sequenceNumber": + return ec.fieldContext_ObservableMarketDepth_sequenceNumber(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ObservableMarketDepth", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_marketsDepth_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_marketsDepthUpdate(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_marketsDepthUpdate(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().MarketsDepthUpdate(rctx, fc.Args["marketIds"].([]string)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan []*vega.MarketDepthUpdate): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalNObservableMarketDepthUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketDepthUpdateᚄ(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_marketsDepthUpdate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "marketId": + return ec.fieldContext_ObservableMarketDepthUpdate_marketId(ctx, field) + case "buy": + return ec.fieldContext_ObservableMarketDepthUpdate_buy(ctx, field) + case "sell": + return ec.fieldContext_ObservableMarketDepthUpdate_sell(ctx, field) + case "sequenceNumber": + return ec.fieldContext_ObservableMarketDepthUpdate_sequenceNumber(ctx, field) + case "previousSequenceNumber": + return ec.fieldContext_ObservableMarketDepthUpdate_previousSequenceNumber(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ObservableMarketDepthUpdate", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_marketsDepthUpdate_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_orders(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_orders(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().Orders(rctx, fc.Args["filter"].(*OrderByMarketAndPartyIdsFilter)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan []*vega.Order): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOOrderUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrderᚄ(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_orders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_OrderUpdate_id(ctx, field) + case "price": + return ec.fieldContext_OrderUpdate_price(ctx, field) + case "timeInForce": + return ec.fieldContext_OrderUpdate_timeInForce(ctx, field) + case "side": + return ec.fieldContext_OrderUpdate_side(ctx, field) + case "marketId": + return ec.fieldContext_OrderUpdate_marketId(ctx, field) + case "size": + return ec.fieldContext_OrderUpdate_size(ctx, field) + case "remaining": + return ec.fieldContext_OrderUpdate_remaining(ctx, field) + case "partyId": + return ec.fieldContext_OrderUpdate_partyId(ctx, field) + case "createdAt": + return ec.fieldContext_OrderUpdate_createdAt(ctx, field) + case "expiresAt": + return ec.fieldContext_OrderUpdate_expiresAt(ctx, field) + case "status": + return ec.fieldContext_OrderUpdate_status(ctx, field) + case "reference": + return ec.fieldContext_OrderUpdate_reference(ctx, field) + case "type": + return ec.fieldContext_OrderUpdate_type(ctx, field) + case "rejectionReason": + return ec.fieldContext_OrderUpdate_rejectionReason(ctx, field) + case "version": + return ec.fieldContext_OrderUpdate_version(ctx, field) + case "updatedAt": + return ec.fieldContext_OrderUpdate_updatedAt(ctx, field) + case "peggedOrder": + return ec.fieldContext_OrderUpdate_peggedOrder(ctx, field) + case "liquidityProvisionId": + return ec.fieldContext_OrderUpdate_liquidityProvisionId(ctx, field) + case "icebergOrder": + return ec.fieldContext_OrderUpdate_icebergOrder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type OrderUpdate", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_orders_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_positions(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_positions(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().Positions(rctx, fc.Args["partyId"].(*string), fc.Args["marketId"].(*string)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan []*vega.Position): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalNPositionUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPositionᚄ(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_positions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "marketId": + return ec.fieldContext_PositionUpdate_marketId(ctx, field) + case "partyId": + return ec.fieldContext_PositionUpdate_partyId(ctx, field) + case "openVolume": + return ec.fieldContext_PositionUpdate_openVolume(ctx, field) + case "realisedPNL": + return ec.fieldContext_PositionUpdate_realisedPNL(ctx, field) + case "unrealisedPNL": + return ec.fieldContext_PositionUpdate_unrealisedPNL(ctx, field) + case "averageEntryPrice": + return ec.fieldContext_PositionUpdate_averageEntryPrice(ctx, field) + case "updatedAt": + return ec.fieldContext_PositionUpdate_updatedAt(ctx, field) + case "lossSocializationAmount": + return ec.fieldContext_PositionUpdate_lossSocializationAmount(ctx, field) + case "positionStatus": + return ec.fieldContext_PositionUpdate_positionStatus(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PositionUpdate", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_positions_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_proposals(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_proposals(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().Proposals(rctx, fc.Args["partyId"].(*string)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *vega.GovernanceData): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalNProposal2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐGovernanceData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_proposals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Proposal_id(ctx, field) + case "reference": + return ec.fieldContext_Proposal_reference(ctx, field) + case "party": + return ec.fieldContext_Proposal_party(ctx, field) + case "state": + return ec.fieldContext_Proposal_state(ctx, field) + case "datetime": + return ec.fieldContext_Proposal_datetime(ctx, field) + case "rationale": + return ec.fieldContext_Proposal_rationale(ctx, field) + case "terms": + return ec.fieldContext_Proposal_terms(ctx, field) + case "votes": + return ec.fieldContext_Proposal_votes(ctx, field) + case "rejectionReason": + return ec.fieldContext_Proposal_rejectionReason(ctx, field) + case "errorDetails": + return ec.fieldContext_Proposal_errorDetails(ctx, field) + case "requiredMajority": + return ec.fieldContext_Proposal_requiredMajority(ctx, field) + case "requiredParticipation": + return ec.fieldContext_Proposal_requiredParticipation(ctx, field) + case "requiredLpMajority": + return ec.fieldContext_Proposal_requiredLpMajority(ctx, field) + case "requiredLpParticipation": + return ec.fieldContext_Proposal_requiredLpParticipation(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Proposal", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_proposals_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_trades(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_trades(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().Trades(rctx, fc.Args["marketId"].(*string), fc.Args["partyId"].(*string)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan []*vega.Trade): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOTradeUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTradeᚄ(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_trades(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_TradeUpdate_id(ctx, field) + case "marketId": + return ec.fieldContext_TradeUpdate_marketId(ctx, field) + case "buyOrder": + return ec.fieldContext_TradeUpdate_buyOrder(ctx, field) + case "sellOrder": + return ec.fieldContext_TradeUpdate_sellOrder(ctx, field) + case "buyerId": + return ec.fieldContext_TradeUpdate_buyerId(ctx, field) + case "sellerId": + return ec.fieldContext_TradeUpdate_sellerId(ctx, field) + case "aggressor": + return ec.fieldContext_TradeUpdate_aggressor(ctx, field) + case "price": + return ec.fieldContext_TradeUpdate_price(ctx, field) + case "size": + return ec.fieldContext_TradeUpdate_size(ctx, field) + case "createdAt": + return ec.fieldContext_TradeUpdate_createdAt(ctx, field) + case "type": + return ec.fieldContext_TradeUpdate_type(ctx, field) + case "buyerFee": + return ec.fieldContext_TradeUpdate_buyerFee(ctx, field) + case "sellerFee": + return ec.fieldContext_TradeUpdate_sellerFee(ctx, field) + case "buyerAuctionBatch": + return ec.fieldContext_TradeUpdate_buyerAuctionBatch(ctx, field) + case "sellerAuctionBatch": + return ec.fieldContext_TradeUpdate_sellerAuctionBatch(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TradeUpdate", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_trades_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_tradesStream(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_tradesStream(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().TradesStream(rctx, fc.Args["filter"].(TradesSubscriptionFilter)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan []*vega.Trade): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOTradeUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTradeᚄ(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_tradesStream(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_TradeUpdate_id(ctx, field) + case "marketId": + return ec.fieldContext_TradeUpdate_marketId(ctx, field) + case "buyOrder": + return ec.fieldContext_TradeUpdate_buyOrder(ctx, field) + case "sellOrder": + return ec.fieldContext_TradeUpdate_sellOrder(ctx, field) + case "buyerId": + return ec.fieldContext_TradeUpdate_buyerId(ctx, field) + case "sellerId": + return ec.fieldContext_TradeUpdate_sellerId(ctx, field) + case "aggressor": + return ec.fieldContext_TradeUpdate_aggressor(ctx, field) + case "price": + return ec.fieldContext_TradeUpdate_price(ctx, field) + case "size": + return ec.fieldContext_TradeUpdate_size(ctx, field) + case "createdAt": + return ec.fieldContext_TradeUpdate_createdAt(ctx, field) + case "type": + return ec.fieldContext_TradeUpdate_type(ctx, field) + case "buyerFee": + return ec.fieldContext_TradeUpdate_buyerFee(ctx, field) + case "sellerFee": + return ec.fieldContext_TradeUpdate_sellerFee(ctx, field) + case "buyerAuctionBatch": + return ec.fieldContext_TradeUpdate_buyerAuctionBatch(ctx, field) + case "sellerAuctionBatch": + return ec.fieldContext_TradeUpdate_sellerAuctionBatch(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TradeUpdate", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_tradesStream_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_votes(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_votes(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().Votes(rctx, fc.Args["proposalId"].(*string), fc.Args["partyId"].(*string)) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *ProposalVote): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalNProposalVote2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVote(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_votes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "vote": + return ec.fieldContext_ProposalVote_vote(ctx, field) + case "proposalId": + return ec.fieldContext_ProposalVote_proposalId(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ProposalVote", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_votes_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _SuccessorConfiguration_parentMarketId(ctx context.Context, field graphql.CollectedField, obj *vega.SuccessorConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SuccessorConfiguration_parentMarketId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ParentMarketId, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SuccessorConfiguration_parentMarketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SuccessorConfiguration", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SuccessorConfiguration_insurancePoolFraction(ctx context.Context, field graphql.CollectedField, obj *vega.SuccessorConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SuccessorConfiguration_insurancePoolFraction(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.InsurancePoolFraction, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SuccessorConfiguration_insurancePoolFraction(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SuccessorConfiguration", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _SuccessorMarket_market(ctx context.Context, field graphql.CollectedField, obj *v2.SuccessorMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SuccessorMarket_market(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Market, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*vega.Market) + fc.Result = res + return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SuccessorMarket_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SuccessorMarket", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Market_id(ctx, field) + case "fees": + return ec.fieldContext_Market_fees(ctx, field) + case "tradableInstrument": + return ec.fieldContext_Market_tradableInstrument(ctx, field) + case "decimalPlaces": + return ec.fieldContext_Market_decimalPlaces(ctx, field) + case "positionDecimalPlaces": + return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) + case "openingAuction": + return ec.fieldContext_Market_openingAuction(ctx, field) + case "priceMonitoringSettings": + return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) + case "liquidityMonitoringParameters": + return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) + case "tradingMode": + return ec.fieldContext_Market_tradingMode(ctx, field) + case "state": + return ec.fieldContext_Market_state(ctx, field) + case "proposal": + return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) + case "ordersConnection": + return ec.fieldContext_Market_ordersConnection(ctx, field) + case "accountsConnection": + return ec.fieldContext_Market_accountsConnection(ctx, field) + case "tradesConnection": + return ec.fieldContext_Market_tradesConnection(ctx, field) + case "depth": + return ec.fieldContext_Market_depth(ctx, field) + case "candlesConnection": + return ec.fieldContext_Market_candlesConnection(ctx, field) + case "data": + return ec.fieldContext_Market_data(ctx, field) + case "liquidityProvisions": + return ec.fieldContext_Market_liquidityProvisions(ctx, field) + case "liquidityProvisionsConnection": + return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) + case "marketTimestamps": + return ec.fieldContext_Market_marketTimestamps(ctx, field) + case "riskFactors": + return ec.fieldContext_Market_riskFactors(ctx, field) + case "linearSlippageFactor": + return ec.fieldContext_Market_linearSlippageFactor(ctx, field) + case "quadraticSlippageFactor": + return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) + case "parentMarketID": + return ec.fieldContext_Market_parentMarketID(ctx, field) + case "insurancePoolFraction": + return ec.fieldContext_Market_insurancePoolFraction(ctx, field) + case "successorMarketID": + return ec.fieldContext_Market_successorMarketID(ctx, field) + case "liquiditySLAParameters": + return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SuccessorMarket_proposals(ctx context.Context, field graphql.CollectedField, obj *v2.SuccessorMarket) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SuccessorMarket_proposals(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Proposals, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*vega.GovernanceData) + fc.Result = res + return ec.marshalOProposal2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐGovernanceData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SuccessorMarket_proposals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SuccessorMarket", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Proposal_id(ctx, field) + case "reference": + return ec.fieldContext_Proposal_reference(ctx, field) + case "party": + return ec.fieldContext_Proposal_party(ctx, field) + case "state": + return ec.fieldContext_Proposal_state(ctx, field) + case "datetime": + return ec.fieldContext_Proposal_datetime(ctx, field) + case "rationale": + return ec.fieldContext_Proposal_rationale(ctx, field) + case "terms": + return ec.fieldContext_Proposal_terms(ctx, field) + case "votes": + return ec.fieldContext_Proposal_votes(ctx, field) + case "rejectionReason": + return ec.fieldContext_Proposal_rejectionReason(ctx, field) + case "errorDetails": + return ec.fieldContext_Proposal_errorDetails(ctx, field) + case "requiredMajority": + return ec.fieldContext_Proposal_requiredMajority(ctx, field) + case "requiredParticipation": + return ec.fieldContext_Proposal_requiredParticipation(ctx, field) + case "requiredLpMajority": + return ec.fieldContext_Proposal_requiredLpMajority(ctx, field) + case "requiredLpParticipation": + return ec.fieldContext_Proposal_requiredLpParticipation(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Proposal", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SuccessorMarketConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.SuccessorMarketConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SuccessorMarketConnection_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*v2.SuccessorMarketEdge) + fc.Result = res + return ec.marshalNSuccessorMarketEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐSuccessorMarketEdgeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SuccessorMarketConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SuccessorMarketConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "node": + return ec.fieldContext_SuccessorMarketEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_SuccessorMarketEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SuccessorMarketEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SuccessorMarketConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.SuccessorMarketConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SuccessorMarketConnection_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*v2.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SuccessorMarketConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SuccessorMarketConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SuccessorMarketEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.SuccessorMarketEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SuccessorMarketEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*v2.SuccessorMarket) + fc.Result = res + return ec.marshalNSuccessorMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐSuccessorMarket(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SuccessorMarketEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SuccessorMarketEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "market": + return ec.fieldContext_SuccessorMarket_market(ctx, field) + case "proposals": + return ec.fieldContext_SuccessorMarket_proposals(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SuccessorMarket", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _SuccessorMarketEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.SuccessorMarketEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SuccessorMarketEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_SuccessorMarketEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "SuccessorMarketEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _TargetStakeParameters_timeWindow(ctx context.Context, field graphql.CollectedField, obj *TargetStakeParameters) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TargetStakeParameters_timeWindow(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TimeWindow, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_TargetStakeParameters_timeWindow(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "TargetStakeParameters", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _TargetStakeParameters_scalingFactor(ctx context.Context, field graphql.CollectedField, obj *TargetStakeParameters) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TargetStakeParameters_scalingFactor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ScalingFactor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(float64) + fc.Result = res + return ec.marshalNFloat2float64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_TargetStakeParameters_scalingFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "TargetStakeParameters", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Team_teamId(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Team_teamId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TeamId, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Team_teamId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Team", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Team_referrer(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Team_referrer(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Referrer, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Team_referrer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Team", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Team_name(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Team_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Team_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Team", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Team_teamUrl(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Team_teamUrl(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TeamUrl, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalNString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Team_teamUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Team", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Team_avatarUrl(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Team_avatarUrl(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.AvatarUrl, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalNString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Team_avatarUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Team", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Team_totalMembers(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Team_totalMembers(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Team().TotalMembers(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Team_totalMembers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Team", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Team_createdAt(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Team_createdAt(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CreatedAt, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Team_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Team", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Timestamp does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Team_createdAtEpoch(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Team_createdAtEpoch(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Team().CreatedAtEpoch(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Team_createdAtEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Team", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Team_closed(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Team_closed(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Closed, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Team_closed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Team", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Team_allowList(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Team_allowList(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.AllowList, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Team_allowList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Team", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _TeamConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.TeamConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamConnection_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*v2.TeamEdge) + fc.Result = res + return ec.marshalNTeamEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamEdgeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_TeamConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "TeamConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "node": + return ec.fieldContext_TeamEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_TeamEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TeamEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _TeamConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.TeamConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamConnection_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*v2.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_TeamConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "TeamConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _TeamEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.TeamEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*v2.Team) + fc.Result = res + return ec.marshalNTeam2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeam(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_TeamEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "TeamEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "teamId": + return ec.fieldContext_Team_teamId(ctx, field) + case "referrer": + return ec.fieldContext_Team_referrer(ctx, field) + case "name": + return ec.fieldContext_Team_name(ctx, field) + case "teamUrl": + return ec.fieldContext_Team_teamUrl(ctx, field) + case "avatarUrl": + return ec.fieldContext_Team_avatarUrl(ctx, field) + case "totalMembers": + return ec.fieldContext_Team_totalMembers(ctx, field) + case "createdAt": + return ec.fieldContext_Team_createdAt(ctx, field) + case "createdAtEpoch": + return ec.fieldContext_Team_createdAtEpoch(ctx, field) + case "closed": + return ec.fieldContext_Team_closed(ctx, field) + case "allowList": + return ec.fieldContext_Team_allowList(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Team", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _TeamEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.TeamEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_TeamEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "TeamEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _TeamGameEntity_team(ctx context.Context, field graphql.CollectedField, obj *TeamGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamGameEntity_team(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Team, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*TeamParticipation) + fc.Result = res + return ec.marshalNTeamParticipation2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTeamParticipation(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_TeamGameEntity_team(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "TeamGameEntity", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "teamId": + return ec.fieldContext_TeamParticipation_teamId(ctx, field) + case "membersParticipating": + return ec.fieldContext_TeamParticipation_membersParticipating(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TeamParticipation", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_candles_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Subscription_liquidityProvisions(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_liquidityProvisions(ctx, field) +func (ec *executionContext) _TeamGameEntity_rank(ctx context.Context, field graphql.CollectedField, obj *TeamGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamGameEntity_rank(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().LiquidityProvisions(rctx, fc.Args["partyId"].(*string), fc.Args["marketId"].(*string)) + return obj.Rank, nil }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { - return nil - } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan []*vega.LiquidityProvision): - if !ok { - return nil - } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalOLiquidityProvisionUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityProvisionᚄ(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") } + return graphql.Null } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_liquidityProvisions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamGameEntity_rank(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "TeamGameEntity", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_LiquidityProvisionUpdate_id(ctx, field) - case "partyID": - return ec.fieldContext_LiquidityProvisionUpdate_partyID(ctx, field) - case "createdAt": - return ec.fieldContext_LiquidityProvisionUpdate_createdAt(ctx, field) - case "updatedAt": - return ec.fieldContext_LiquidityProvisionUpdate_updatedAt(ctx, field) - case "marketID": - return ec.fieldContext_LiquidityProvisionUpdate_marketID(ctx, field) - case "commitmentAmount": - return ec.fieldContext_LiquidityProvisionUpdate_commitmentAmount(ctx, field) - case "fee": - return ec.fieldContext_LiquidityProvisionUpdate_fee(ctx, field) - case "sells": - return ec.fieldContext_LiquidityProvisionUpdate_sells(ctx, field) - case "buys": - return ec.fieldContext_LiquidityProvisionUpdate_buys(ctx, field) - case "version": - return ec.fieldContext_LiquidityProvisionUpdate_version(ctx, field) - case "status": - return ec.fieldContext_LiquidityProvisionUpdate_status(ctx, field) - case "reference": - return ec.fieldContext_LiquidityProvisionUpdate_reference(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LiquidityProvisionUpdate", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_liquidityProvisions_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Subscription_margins(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_margins(ctx, field) +func (ec *executionContext) _TeamGameEntity_volume(ctx context.Context, field graphql.CollectedField, obj *TeamGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamGameEntity_volume(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().Margins(rctx, fc.Args["partyId"].(string), fc.Args["marketId"].(*string)) + return obj.Volume, nil }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } - return nil - } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan *vega.MarginLevels): - if !ok { - return nil - } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalNMarginLevelsUpdate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginLevels(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil - } + return graphql.Null } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_margins(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamGameEntity_volume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "TeamGameEntity", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "marketId": - return ec.fieldContext_MarginLevelsUpdate_marketId(ctx, field) - case "asset": - return ec.fieldContext_MarginLevelsUpdate_asset(ctx, field) - case "partyId": - return ec.fieldContext_MarginLevelsUpdate_partyId(ctx, field) - case "maintenanceLevel": - return ec.fieldContext_MarginLevelsUpdate_maintenanceLevel(ctx, field) - case "searchLevel": - return ec.fieldContext_MarginLevelsUpdate_searchLevel(ctx, field) - case "initialLevel": - return ec.fieldContext_MarginLevelsUpdate_initialLevel(ctx, field) - case "collateralReleaseLevel": - return ec.fieldContext_MarginLevelsUpdate_collateralReleaseLevel(ctx, field) - case "timestamp": - return ec.fieldContext_MarginLevelsUpdate_timestamp(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type MarginLevelsUpdate", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_margins_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Subscription_marketsData(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_marketsData(ctx, field) +func (ec *executionContext) _TeamGameEntity_rewardMetric(ctx context.Context, field graphql.CollectedField, obj *TeamGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamGameEntity_rewardMetric(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().MarketsData(rctx, fc.Args["marketIds"].([]string)) + return obj.RewardMetric, nil }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } - return nil - } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan []*vega.MarketData): - if !ok { - return nil - } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalNObservableMarketData2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketDataᚄ(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil - } + return graphql.Null } + res := resTmp.(vega.DispatchMetric) + fc.Result = res + return ec.marshalNDispatchMetric2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDispatchMetric(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_marketsData(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamGameEntity_rewardMetric(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "TeamGameEntity", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "marketId": - return ec.fieldContext_ObservableMarketData_marketId(ctx, field) - case "markPrice": - return ec.fieldContext_ObservableMarketData_markPrice(ctx, field) - case "bestBidPrice": - return ec.fieldContext_ObservableMarketData_bestBidPrice(ctx, field) - case "bestBidVolume": - return ec.fieldContext_ObservableMarketData_bestBidVolume(ctx, field) - case "bestOfferPrice": - return ec.fieldContext_ObservableMarketData_bestOfferPrice(ctx, field) - case "bestOfferVolume": - return ec.fieldContext_ObservableMarketData_bestOfferVolume(ctx, field) - case "bestStaticBidPrice": - return ec.fieldContext_ObservableMarketData_bestStaticBidPrice(ctx, field) - case "bestStaticBidVolume": - return ec.fieldContext_ObservableMarketData_bestStaticBidVolume(ctx, field) - case "bestStaticOfferPrice": - return ec.fieldContext_ObservableMarketData_bestStaticOfferPrice(ctx, field) - case "bestStaticOfferVolume": - return ec.fieldContext_ObservableMarketData_bestStaticOfferVolume(ctx, field) - case "midPrice": - return ec.fieldContext_ObservableMarketData_midPrice(ctx, field) - case "staticMidPrice": - return ec.fieldContext_ObservableMarketData_staticMidPrice(ctx, field) - case "timestamp": - return ec.fieldContext_ObservableMarketData_timestamp(ctx, field) - case "openInterest": - return ec.fieldContext_ObservableMarketData_openInterest(ctx, field) - case "auctionEnd": - return ec.fieldContext_ObservableMarketData_auctionEnd(ctx, field) - case "auctionStart": - return ec.fieldContext_ObservableMarketData_auctionStart(ctx, field) - case "indicativePrice": - return ec.fieldContext_ObservableMarketData_indicativePrice(ctx, field) - case "indicativeVolume": - return ec.fieldContext_ObservableMarketData_indicativeVolume(ctx, field) - case "marketTradingMode": - return ec.fieldContext_ObservableMarketData_marketTradingMode(ctx, field) - case "marketState": - return ec.fieldContext_ObservableMarketData_marketState(ctx, field) - case "trigger": - return ec.fieldContext_ObservableMarketData_trigger(ctx, field) - case "extensionTrigger": - return ec.fieldContext_ObservableMarketData_extensionTrigger(ctx, field) - case "targetStake": - return ec.fieldContext_ObservableMarketData_targetStake(ctx, field) - case "suppliedStake": - return ec.fieldContext_ObservableMarketData_suppliedStake(ctx, field) - case "priceMonitoringBounds": - return ec.fieldContext_ObservableMarketData_priceMonitoringBounds(ctx, field) - case "marketValueProxy": - return ec.fieldContext_ObservableMarketData_marketValueProxy(ctx, field) - case "liquidityProviderFeeShare": - return ec.fieldContext_ObservableMarketData_liquidityProviderFeeShare(ctx, field) - case "liquidityProviderSla": - return ec.fieldContext_ObservableMarketData_liquidityProviderSla(ctx, field) - case "nextMarkToMarket": - return ec.fieldContext_ObservableMarketData_nextMarkToMarket(ctx, field) - case "marketGrowth": - return ec.fieldContext_ObservableMarketData_marketGrowth(ctx, field) - case "lastTradedPrice": - return ec.fieldContext_ObservableMarketData_lastTradedPrice(ctx, field) - case "productData": - return ec.fieldContext_ObservableMarketData_productData(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ObservableMarketData", field.Name) + return nil, errors.New("field of type DispatchMetric does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_marketsData_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Subscription_marketsDepth(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_marketsDepth(ctx, field) +func (ec *executionContext) _TeamGameEntity_rewardEarned(ctx context.Context, field graphql.CollectedField, obj *TeamGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamGameEntity_rewardEarned(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().MarketsDepth(rctx, fc.Args["marketIds"].([]string)) + return obj.RewardEarned, nil }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } - return nil - } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan []*vega.MarketDepth): - if !ok { - return nil - } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalNObservableMarketDepth2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketDepthᚄ(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil - } + return graphql.Null } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_marketsDepth(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamGameEntity_rewardEarned(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "TeamGameEntity", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "marketId": - return ec.fieldContext_ObservableMarketDepth_marketId(ctx, field) - case "buy": - return ec.fieldContext_ObservableMarketDepth_buy(ctx, field) - case "sell": - return ec.fieldContext_ObservableMarketDepth_sell(ctx, field) - case "lastTrade": - return ec.fieldContext_ObservableMarketDepth_lastTrade(ctx, field) - case "sequenceNumber": - return ec.fieldContext_ObservableMarketDepth_sequenceNumber(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ObservableMarketDepth", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_marketsDepth_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Subscription_marketsDepthUpdate(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_marketsDepthUpdate(ctx, field) +func (ec *executionContext) _TeamGameEntity_totalRewardsEarned(ctx context.Context, field graphql.CollectedField, obj *TeamGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamGameEntity_totalRewardsEarned(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().MarketsDepthUpdate(rctx, fc.Args["marketIds"].([]string)) + return obj.TotalRewardsEarned, nil }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } - return nil - } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan []*vega.MarketDepthUpdate): - if !ok { - return nil - } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalNObservableMarketDepthUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarketDepthUpdateᚄ(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil - } + return graphql.Null } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_marketsDepthUpdate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamGameEntity_totalRewardsEarned(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "TeamGameEntity", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "marketId": - return ec.fieldContext_ObservableMarketDepthUpdate_marketId(ctx, field) - case "buy": - return ec.fieldContext_ObservableMarketDepthUpdate_buy(ctx, field) - case "sell": - return ec.fieldContext_ObservableMarketDepthUpdate_sell(ctx, field) - case "sequenceNumber": - return ec.fieldContext_ObservableMarketDepthUpdate_sequenceNumber(ctx, field) - case "previousSequenceNumber": - return ec.fieldContext_ObservableMarketDepthUpdate_previousSequenceNumber(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ObservableMarketDepthUpdate", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_marketsDepthUpdate_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Subscription_orders(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_orders(ctx, field) +func (ec *executionContext) _TeamGameEntity_rewardEarnedQuantum(ctx context.Context, field graphql.CollectedField, obj *TeamGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamGameEntity_rewardEarnedQuantum(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().Orders(rctx, fc.Args["filter"].(*OrderByMarketAndPartyIdsFilter)) + return obj.RewardEarnedQuantum, nil }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { - return nil - } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan []*vega.Order): - if !ok { - return nil - } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalOOrderUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrderᚄ(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") } + return graphql.Null } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_orders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamGameEntity_rewardEarnedQuantum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "TeamGameEntity", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_OrderUpdate_id(ctx, field) - case "price": - return ec.fieldContext_OrderUpdate_price(ctx, field) - case "timeInForce": - return ec.fieldContext_OrderUpdate_timeInForce(ctx, field) - case "side": - return ec.fieldContext_OrderUpdate_side(ctx, field) - case "marketId": - return ec.fieldContext_OrderUpdate_marketId(ctx, field) - case "size": - return ec.fieldContext_OrderUpdate_size(ctx, field) - case "remaining": - return ec.fieldContext_OrderUpdate_remaining(ctx, field) - case "partyId": - return ec.fieldContext_OrderUpdate_partyId(ctx, field) - case "createdAt": - return ec.fieldContext_OrderUpdate_createdAt(ctx, field) - case "expiresAt": - return ec.fieldContext_OrderUpdate_expiresAt(ctx, field) - case "status": - return ec.fieldContext_OrderUpdate_status(ctx, field) - case "reference": - return ec.fieldContext_OrderUpdate_reference(ctx, field) - case "type": - return ec.fieldContext_OrderUpdate_type(ctx, field) - case "rejectionReason": - return ec.fieldContext_OrderUpdate_rejectionReason(ctx, field) - case "version": - return ec.fieldContext_OrderUpdate_version(ctx, field) - case "updatedAt": - return ec.fieldContext_OrderUpdate_updatedAt(ctx, field) - case "peggedOrder": - return ec.fieldContext_OrderUpdate_peggedOrder(ctx, field) - case "liquidityProvisionId": - return ec.fieldContext_OrderUpdate_liquidityProvisionId(ctx, field) - case "icebergOrder": - return ec.fieldContext_OrderUpdate_icebergOrder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type OrderUpdate", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_orders_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Subscription_positions(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_positions(ctx, field) +func (ec *executionContext) _TeamGameEntity_totalRewardsEarnedQuantum(ctx context.Context, field graphql.CollectedField, obj *TeamGameEntity) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamGameEntity_totalRewardsEarnedQuantum(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().Positions(rctx, fc.Args["partyId"].(*string), fc.Args["marketId"].(*string)) + return obj.TotalRewardsEarnedQuantum, nil }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } - return nil - } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan []*vega.Position): - if !ok { - return nil - } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalNPositionUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPositionᚄ(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil - } + return graphql.Null } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_positions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamGameEntity_totalRewardsEarnedQuantum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "TeamGameEntity", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "marketId": - return ec.fieldContext_PositionUpdate_marketId(ctx, field) - case "partyId": - return ec.fieldContext_PositionUpdate_partyId(ctx, field) - case "openVolume": - return ec.fieldContext_PositionUpdate_openVolume(ctx, field) - case "realisedPNL": - return ec.fieldContext_PositionUpdate_realisedPNL(ctx, field) - case "unrealisedPNL": - return ec.fieldContext_PositionUpdate_unrealisedPNL(ctx, field) - case "averageEntryPrice": - return ec.fieldContext_PositionUpdate_averageEntryPrice(ctx, field) - case "updatedAt": - return ec.fieldContext_PositionUpdate_updatedAt(ctx, field) - case "lossSocializationAmount": - return ec.fieldContext_PositionUpdate_lossSocializationAmount(ctx, field) - case "positionStatus": - return ec.fieldContext_PositionUpdate_positionStatus(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PositionUpdate", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_positions_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Subscription_proposals(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_proposals(ctx, field) +func (ec *executionContext) _TeamMemberStatistics_partyId(ctx context.Context, field graphql.CollectedField, obj *v2.TeamMemberStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamMemberStatistics_partyId(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().Proposals(rctx, fc.Args["partyId"].(*string)) + return obj.PartyId, nil }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } - return nil - } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan *vega.GovernanceData): - if !ok { - return nil - } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalNProposal2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐGovernanceData(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil - } + return graphql.Null } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_proposals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamMemberStatistics_partyId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "TeamMemberStatistics", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Proposal_id(ctx, field) - case "reference": - return ec.fieldContext_Proposal_reference(ctx, field) - case "party": - return ec.fieldContext_Proposal_party(ctx, field) - case "state": - return ec.fieldContext_Proposal_state(ctx, field) - case "datetime": - return ec.fieldContext_Proposal_datetime(ctx, field) - case "rationale": - return ec.fieldContext_Proposal_rationale(ctx, field) - case "terms": - return ec.fieldContext_Proposal_terms(ctx, field) - case "votes": - return ec.fieldContext_Proposal_votes(ctx, field) - case "rejectionReason": - return ec.fieldContext_Proposal_rejectionReason(ctx, field) - case "errorDetails": - return ec.fieldContext_Proposal_errorDetails(ctx, field) - case "requiredMajority": - return ec.fieldContext_Proposal_requiredMajority(ctx, field) - case "requiredParticipation": - return ec.fieldContext_Proposal_requiredParticipation(ctx, field) - case "requiredLpMajority": - return ec.fieldContext_Proposal_requiredLpMajority(ctx, field) - case "requiredLpParticipation": - return ec.fieldContext_Proposal_requiredLpParticipation(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Proposal", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_proposals_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Subscription_trades(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_trades(ctx, field) +func (ec *executionContext) _TeamMemberStatistics_totalQuantumVolume(ctx context.Context, field graphql.CollectedField, obj *v2.TeamMemberStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamMemberStatistics_totalQuantumVolume(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().Trades(rctx, fc.Args["marketId"].(*string), fc.Args["partyId"].(*string)) + return obj.TotalQuantumVolume, nil }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { - return nil - } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan []*vega.Trade): - if !ok { - return nil - } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalOTradeUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTradeᚄ(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") } + return graphql.Null } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_trades(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamMemberStatistics_totalQuantumVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "TeamMemberStatistics", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_TradeUpdate_id(ctx, field) - case "marketId": - return ec.fieldContext_TradeUpdate_marketId(ctx, field) - case "buyOrder": - return ec.fieldContext_TradeUpdate_buyOrder(ctx, field) - case "sellOrder": - return ec.fieldContext_TradeUpdate_sellOrder(ctx, field) - case "buyerId": - return ec.fieldContext_TradeUpdate_buyerId(ctx, field) - case "sellerId": - return ec.fieldContext_TradeUpdate_sellerId(ctx, field) - case "aggressor": - return ec.fieldContext_TradeUpdate_aggressor(ctx, field) - case "price": - return ec.fieldContext_TradeUpdate_price(ctx, field) - case "size": - return ec.fieldContext_TradeUpdate_size(ctx, field) - case "createdAt": - return ec.fieldContext_TradeUpdate_createdAt(ctx, field) - case "type": - return ec.fieldContext_TradeUpdate_type(ctx, field) - case "buyerFee": - return ec.fieldContext_TradeUpdate_buyerFee(ctx, field) - case "sellerFee": - return ec.fieldContext_TradeUpdate_sellerFee(ctx, field) - case "buyerAuctionBatch": - return ec.fieldContext_TradeUpdate_buyerAuctionBatch(ctx, field) - case "sellerAuctionBatch": - return ec.fieldContext_TradeUpdate_sellerAuctionBatch(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TradeUpdate", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_trades_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _Subscription_tradesStream(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_tradesStream(ctx, field) +func (ec *executionContext) _TeamMemberStatistics_quantumVolumes(ctx context.Context, field graphql.CollectedField, obj *v2.TeamMemberStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamMemberStatistics_quantumVolumes(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().TradesStream(rctx, fc.Args["filter"].(TradesSubscriptionFilter)) + return obj.QuantumVolumes, nil }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { - return nil - } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan []*vega.Trade): - if !ok { - return nil - } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalOTradeUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTradeᚄ(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") } + return graphql.Null } + res := resTmp.([]*v2.QuantumVolumesPerEpoch) + fc.Result = res + return ec.marshalNQuantumVolumesPerEpoch2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐQuantumVolumesPerEpochᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_tradesStream(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamMemberStatistics_quantumVolumes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "TeamMemberStatistics", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_TradeUpdate_id(ctx, field) - case "marketId": - return ec.fieldContext_TradeUpdate_marketId(ctx, field) - case "buyOrder": - return ec.fieldContext_TradeUpdate_buyOrder(ctx, field) - case "sellOrder": - return ec.fieldContext_TradeUpdate_sellOrder(ctx, field) - case "buyerId": - return ec.fieldContext_TradeUpdate_buyerId(ctx, field) - case "sellerId": - return ec.fieldContext_TradeUpdate_sellerId(ctx, field) - case "aggressor": - return ec.fieldContext_TradeUpdate_aggressor(ctx, field) - case "price": - return ec.fieldContext_TradeUpdate_price(ctx, field) - case "size": - return ec.fieldContext_TradeUpdate_size(ctx, field) - case "createdAt": - return ec.fieldContext_TradeUpdate_createdAt(ctx, field) - case "type": - return ec.fieldContext_TradeUpdate_type(ctx, field) - case "buyerFee": - return ec.fieldContext_TradeUpdate_buyerFee(ctx, field) - case "sellerFee": - return ec.fieldContext_TradeUpdate_sellerFee(ctx, field) - case "buyerAuctionBatch": - return ec.fieldContext_TradeUpdate_buyerAuctionBatch(ctx, field) - case "sellerAuctionBatch": - return ec.fieldContext_TradeUpdate_sellerAuctionBatch(ctx, field) + case "epoch": + return ec.fieldContext_QuantumVolumesPerEpoch_epoch(ctx, field) + case "totalQuantumVolumes": + return ec.fieldContext_QuantumVolumesPerEpoch_totalQuantumVolumes(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type TradeUpdate", field.Name) + return nil, fmt.Errorf("no field named %q was found under type QuantumVolumesPerEpoch", field.Name) }, } + return fc, nil +} + +func (ec *executionContext) _TeamMemberStatistics_totalQuantumRewards(ctx context.Context, field graphql.CollectedField, obj *v2.TeamMemberStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamMemberStatistics_totalQuantumRewards(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null } }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_tradesStream_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TotalQuantumRewards, nil + }) + if err != nil { ec.Error(ctx, err) - return + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_TeamMemberStatistics_totalQuantumRewards(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "TeamMemberStatistics", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } return fc, nil } -func (ec *executionContext) _Subscription_votes(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { - fc, err := ec.fieldContext_Subscription_votes(ctx, field) +func (ec *executionContext) _TeamMemberStatistics_quantumRewards(ctx context.Context, field graphql.CollectedField, obj *v2.TeamMemberStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamMemberStatistics_quantumRewards(ctx, field) if err != nil { - return nil + return graphql.Null } ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil + ret = graphql.Null } }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().Votes(rctx, fc.Args["proposalId"].(*string), fc.Args["partyId"].(*string)) + return obj.QuantumRewards, nil }) if err != nil { ec.Error(ctx, err) - return nil + return graphql.Null } if resTmp == nil { if !graphql.HasFieldError(ctx, fc) { ec.Errorf(ctx, "must not be null") } - return nil - } - return func(ctx context.Context) graphql.Marshaler { - select { - case res, ok := <-resTmp.(<-chan *ProposalVote): - if !ok { - return nil - } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalNProposalVote2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalVote(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) - case <-ctx.Done(): - return nil - } + return graphql.Null } + res := resTmp.([]*v2.QuantumRewardsPerEpoch) + fc.Result = res + return ec.marshalNQuantumRewardsPerEpoch2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐQuantumRewardsPerEpochᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Subscription_votes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamMemberStatistics_quantumRewards(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Subscription", + Object: "TeamMemberStatistics", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "vote": - return ec.fieldContext_ProposalVote_vote(ctx, field) - case "proposalId": - return ec.fieldContext_ProposalVote_proposalId(ctx, field) + case "epoch": + return ec.fieldContext_QuantumRewardsPerEpoch_epoch(ctx, field) + case "totalQuantumRewards": + return ec.fieldContext_QuantumRewardsPerEpoch_totalQuantumRewards(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ProposalVote", field.Name) + return nil, fmt.Errorf("no field named %q was found under type QuantumRewardsPerEpoch", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Subscription_votes_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return - } return fc, nil } -func (ec *executionContext) _SuccessorConfiguration_parentMarketId(ctx context.Context, field graphql.CollectedField, obj *vega.SuccessorConfiguration) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SuccessorConfiguration_parentMarketId(ctx, field) +func (ec *executionContext) _TeamMemberStatistics_totalGamesPlayed(ctx context.Context, field graphql.CollectedField, obj *v2.TeamMemberStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamMemberStatistics_totalGamesPlayed(ctx, field) if err != nil { return graphql.Null } @@ -79836,7 +90439,7 @@ func (ec *executionContext) _SuccessorConfiguration_parentMarketId(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ParentMarketId, nil + return ec.resolvers.TeamMemberStatistics().TotalGamesPlayed(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -79848,26 +90451,26 @@ func (ec *executionContext) _SuccessorConfiguration_parentMarketId(ctx context.C } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SuccessorConfiguration_parentMarketId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamMemberStatistics_totalGamesPlayed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SuccessorConfiguration", + Object: "TeamMemberStatistics", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _SuccessorConfiguration_insurancePoolFraction(ctx context.Context, field graphql.CollectedField, obj *vega.SuccessorConfiguration) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SuccessorConfiguration_insurancePoolFraction(ctx, field) +func (ec *executionContext) _TeamMemberStatistics_gamesPlayed(ctx context.Context, field graphql.CollectedField, obj *v2.TeamMemberStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamMemberStatistics_gamesPlayed(ctx, field) if err != nil { return graphql.Null } @@ -79880,7 +90483,7 @@ func (ec *executionContext) _SuccessorConfiguration_insurancePoolFraction(ctx co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InsurancePoolFraction, nil + return obj.GamesPlayed, nil }) if err != nil { ec.Error(ctx, err) @@ -79892,14 +90495,14 @@ func (ec *executionContext) _SuccessorConfiguration_insurancePoolFraction(ctx co } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SuccessorConfiguration_insurancePoolFraction(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamMemberStatistics_gamesPlayed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SuccessorConfiguration", + Object: "TeamMemberStatistics", Field: field, IsMethod: false, IsResolver: false, @@ -79910,8 +90513,8 @@ func (ec *executionContext) fieldContext_SuccessorConfiguration_insurancePoolFra return fc, nil } -func (ec *executionContext) _SuccessorMarket_market(ctx context.Context, field graphql.CollectedField, obj *v2.SuccessorMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SuccessorMarket_market(ctx, field) +func (ec *executionContext) _TeamMemberStatisticsEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.TeamMemberStatisticsEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamMemberStatisticsEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -79924,7 +90527,7 @@ func (ec *executionContext) _SuccessorMarket_market(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Market, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -79936,82 +90539,42 @@ func (ec *executionContext) _SuccessorMarket_market(ctx context.Context, field g } return graphql.Null } - res := resTmp.(*vega.Market) + res := resTmp.(*v2.TeamMemberStatistics) fc.Result = res - return ec.marshalNMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx, field.Selections, res) + return ec.marshalNTeamMemberStatistics2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamMemberStatistics(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SuccessorMarket_market(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamMemberStatisticsEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SuccessorMarket", + Object: "TeamMemberStatisticsEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Market_id(ctx, field) - case "fees": - return ec.fieldContext_Market_fees(ctx, field) - case "tradableInstrument": - return ec.fieldContext_Market_tradableInstrument(ctx, field) - case "decimalPlaces": - return ec.fieldContext_Market_decimalPlaces(ctx, field) - case "positionDecimalPlaces": - return ec.fieldContext_Market_positionDecimalPlaces(ctx, field) - case "openingAuction": - return ec.fieldContext_Market_openingAuction(ctx, field) - case "priceMonitoringSettings": - return ec.fieldContext_Market_priceMonitoringSettings(ctx, field) - case "liquidityMonitoringParameters": - return ec.fieldContext_Market_liquidityMonitoringParameters(ctx, field) - case "tradingMode": - return ec.fieldContext_Market_tradingMode(ctx, field) - case "state": - return ec.fieldContext_Market_state(ctx, field) - case "proposal": - return ec.fieldContext_Market_proposal(ctx, field) - case "ordersConnection": - return ec.fieldContext_Market_ordersConnection(ctx, field) - case "accountsConnection": - return ec.fieldContext_Market_accountsConnection(ctx, field) - case "tradesConnection": - return ec.fieldContext_Market_tradesConnection(ctx, field) - case "depth": - return ec.fieldContext_Market_depth(ctx, field) - case "candlesConnection": - return ec.fieldContext_Market_candlesConnection(ctx, field) - case "data": - return ec.fieldContext_Market_data(ctx, field) - case "liquidityProvisions": - return ec.fieldContext_Market_liquidityProvisions(ctx, field) - case "liquidityProvisionsConnection": - return ec.fieldContext_Market_liquidityProvisionsConnection(ctx, field) - case "marketTimestamps": - return ec.fieldContext_Market_marketTimestamps(ctx, field) - case "riskFactors": - return ec.fieldContext_Market_riskFactors(ctx, field) - case "linearSlippageFactor": - return ec.fieldContext_Market_linearSlippageFactor(ctx, field) - case "quadraticSlippageFactor": - return ec.fieldContext_Market_quadraticSlippageFactor(ctx, field) - case "parentMarketID": - return ec.fieldContext_Market_parentMarketID(ctx, field) - case "insurancePoolFraction": - return ec.fieldContext_Market_insurancePoolFraction(ctx, field) - case "successorMarketID": - return ec.fieldContext_Market_successorMarketID(ctx, field) - case "liquiditySLAParameters": - return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "partyId": + return ec.fieldContext_TeamMemberStatistics_partyId(ctx, field) + case "totalQuantumVolume": + return ec.fieldContext_TeamMemberStatistics_totalQuantumVolume(ctx, field) + case "quantumVolumes": + return ec.fieldContext_TeamMemberStatistics_quantumVolumes(ctx, field) + case "totalQuantumRewards": + return ec.fieldContext_TeamMemberStatistics_totalQuantumRewards(ctx, field) + case "quantumRewards": + return ec.fieldContext_TeamMemberStatistics_quantumRewards(ctx, field) + case "totalGamesPlayed": + return ec.fieldContext_TeamMemberStatistics_totalGamesPlayed(ctx, field) + case "gamesPlayed": + return ec.fieldContext_TeamMemberStatistics_gamesPlayed(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TeamMemberStatistics", field.Name) }, } return fc, nil } -func (ec *executionContext) _SuccessorMarket_proposals(ctx context.Context, field graphql.CollectedField, obj *v2.SuccessorMarket) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SuccessorMarket_proposals(ctx, field) +func (ec *executionContext) _TeamMemberStatisticsEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.TeamMemberStatisticsEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamMemberStatisticsEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -80024,65 +90587,38 @@ func (ec *executionContext) _SuccessorMarket_proposals(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Proposals, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*vega.GovernanceData) + res := resTmp.(string) fc.Result = res - return ec.marshalOProposal2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐGovernanceData(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SuccessorMarket_proposals(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamMemberStatisticsEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SuccessorMarket", + Object: "TeamMemberStatisticsEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Proposal_id(ctx, field) - case "reference": - return ec.fieldContext_Proposal_reference(ctx, field) - case "party": - return ec.fieldContext_Proposal_party(ctx, field) - case "state": - return ec.fieldContext_Proposal_state(ctx, field) - case "datetime": - return ec.fieldContext_Proposal_datetime(ctx, field) - case "rationale": - return ec.fieldContext_Proposal_rationale(ctx, field) - case "terms": - return ec.fieldContext_Proposal_terms(ctx, field) - case "votes": - return ec.fieldContext_Proposal_votes(ctx, field) - case "rejectionReason": - return ec.fieldContext_Proposal_rejectionReason(ctx, field) - case "errorDetails": - return ec.fieldContext_Proposal_errorDetails(ctx, field) - case "requiredMajority": - return ec.fieldContext_Proposal_requiredMajority(ctx, field) - case "requiredParticipation": - return ec.fieldContext_Proposal_requiredParticipation(ctx, field) - case "requiredLpMajority": - return ec.fieldContext_Proposal_requiredLpMajority(ctx, field) - case "requiredLpParticipation": - return ec.fieldContext_Proposal_requiredLpParticipation(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Proposal", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _SuccessorMarketConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.SuccessorMarketConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SuccessorMarketConnection_edges(ctx, field) +func (ec *executionContext) _TeamMembersStatisticsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.TeamMembersStatisticsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamMembersStatisticsConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -80107,32 +90643,32 @@ func (ec *executionContext) _SuccessorMarketConnection_edges(ctx context.Context } return graphql.Null } - res := resTmp.([]*v2.SuccessorMarketEdge) + res := resTmp.([]*v2.TeamMemberStatisticsEdge) fc.Result = res - return ec.marshalNSuccessorMarketEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐSuccessorMarketEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNTeamMemberStatisticsEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamMemberStatisticsEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SuccessorMarketConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamMembersStatisticsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SuccessorMarketConnection", + Object: "TeamMembersStatisticsConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "node": - return ec.fieldContext_SuccessorMarketEdge_node(ctx, field) + return ec.fieldContext_TeamMemberStatisticsEdge_node(ctx, field) case "cursor": - return ec.fieldContext_SuccessorMarketEdge_cursor(ctx, field) + return ec.fieldContext_TeamMemberStatisticsEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SuccessorMarketEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TeamMemberStatisticsEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _SuccessorMarketConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.SuccessorMarketConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SuccessorMarketConnection_pageInfo(ctx, field) +func (ec *executionContext) _TeamMembersStatisticsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.TeamMembersStatisticsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamMembersStatisticsConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -80162,9 +90698,9 @@ func (ec *executionContext) _SuccessorMarketConnection_pageInfo(ctx context.Cont return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SuccessorMarketConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamMembersStatisticsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SuccessorMarketConnection", + Object: "TeamMembersStatisticsConnection", Field: field, IsMethod: false, IsResolver: false, @@ -80185,8 +90721,8 @@ func (ec *executionContext) fieldContext_SuccessorMarketConnection_pageInfo(ctx return fc, nil } -func (ec *executionContext) _SuccessorMarketEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.SuccessorMarketEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SuccessorMarketEdge_node(ctx, field) +func (ec *executionContext) _TeamParticipation_teamId(ctx context.Context, field graphql.CollectedField, obj *TeamParticipation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamParticipation_teamId(ctx, field) if err != nil { return graphql.Null } @@ -80199,7 +90735,7 @@ func (ec *executionContext) _SuccessorMarketEdge_node(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.TeamID, nil }) if err != nil { ec.Error(ctx, err) @@ -80211,32 +90747,88 @@ func (ec *executionContext) _SuccessorMarketEdge_node(ctx context.Context, field } return graphql.Null } - res := resTmp.(*v2.SuccessorMarket) + res := resTmp.(string) fc.Result = res - return ec.marshalNSuccessorMarket2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐSuccessorMarket(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SuccessorMarketEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamParticipation_teamId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SuccessorMarketEdge", + Object: "TeamParticipation", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _TeamParticipation_membersParticipating(ctx context.Context, field graphql.CollectedField, obj *TeamParticipation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamParticipation_membersParticipating(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MembersParticipating, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*IndividualGameEntity) + fc.Result = res + return ec.marshalNIndividualGameEntity2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐIndividualGameEntityᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_TeamParticipation_membersParticipating(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "TeamParticipation", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "market": - return ec.fieldContext_SuccessorMarket_market(ctx, field) - case "proposals": - return ec.fieldContext_SuccessorMarket_proposals(ctx, field) + case "individual": + return ec.fieldContext_IndividualGameEntity_individual(ctx, field) + case "rank": + return ec.fieldContext_IndividualGameEntity_rank(ctx, field) + case "volume": + return ec.fieldContext_IndividualGameEntity_volume(ctx, field) + case "rewardMetric": + return ec.fieldContext_IndividualGameEntity_rewardMetric(ctx, field) + case "rewardEarned": + return ec.fieldContext_IndividualGameEntity_rewardEarned(ctx, field) + case "totalRewardsEarned": + return ec.fieldContext_IndividualGameEntity_totalRewardsEarned(ctx, field) + case "rewardEarnedQuantum": + return ec.fieldContext_IndividualGameEntity_rewardEarnedQuantum(ctx, field) + case "totalRewardsEarnedQuantum": + return ec.fieldContext_IndividualGameEntity_totalRewardsEarnedQuantum(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SuccessorMarket", field.Name) + return nil, fmt.Errorf("no field named %q was found under type IndividualGameEntity", field.Name) }, } return fc, nil } -func (ec *executionContext) _SuccessorMarketEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.SuccessorMarketEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SuccessorMarketEdge_cursor(ctx, field) +func (ec *executionContext) _TeamReferee_teamId(ctx context.Context, field graphql.CollectedField, obj *v2.TeamReferee) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamReferee_teamId(ctx, field) if err != nil { return graphql.Null } @@ -80249,7 +90841,7 @@ func (ec *executionContext) _SuccessorMarketEdge_cursor(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.TeamId, nil }) if err != nil { ec.Error(ctx, err) @@ -80263,24 +90855,24 @@ func (ec *executionContext) _SuccessorMarketEdge_cursor(ctx context.Context, fie } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SuccessorMarketEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamReferee_teamId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SuccessorMarketEdge", + Object: "TeamReferee", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _TargetStakeParameters_timeWindow(ctx context.Context, field graphql.CollectedField, obj *TargetStakeParameters) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TargetStakeParameters_timeWindow(ctx, field) +func (ec *executionContext) _TeamReferee_referee(ctx context.Context, field graphql.CollectedField, obj *v2.TeamReferee) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamReferee_referee(ctx, field) if err != nil { return graphql.Null } @@ -80293,7 +90885,7 @@ func (ec *executionContext) _TargetStakeParameters_timeWindow(ctx context.Contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TimeWindow, nil + return obj.Referee, nil }) if err != nil { ec.Error(ctx, err) @@ -80305,26 +90897,26 @@ func (ec *executionContext) _TargetStakeParameters_timeWindow(ctx context.Contex } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TargetStakeParameters_timeWindow(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamReferee_referee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TargetStakeParameters", + Object: "TeamReferee", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _TargetStakeParameters_scalingFactor(ctx context.Context, field graphql.CollectedField, obj *TargetStakeParameters) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TargetStakeParameters_scalingFactor(ctx, field) +func (ec *executionContext) _TeamReferee_joinedAt(ctx context.Context, field graphql.CollectedField, obj *v2.TeamReferee) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamReferee_joinedAt(ctx, field) if err != nil { return graphql.Null } @@ -80337,7 +90929,7 @@ func (ec *executionContext) _TargetStakeParameters_scalingFactor(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ScalingFactor, nil + return obj.JoinedAt, nil }) if err != nil { ec.Error(ctx, err) @@ -80349,26 +90941,26 @@ func (ec *executionContext) _TargetStakeParameters_scalingFactor(ctx context.Con } return graphql.Null } - res := resTmp.(float64) + res := resTmp.(int64) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TargetStakeParameters_scalingFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamReferee_joinedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TargetStakeParameters", + Object: "TeamReferee", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Team_teamId(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Team_teamId(ctx, field) +func (ec *executionContext) _TeamReferee_joinedAtEpoch(ctx context.Context, field graphql.CollectedField, obj *v2.TeamReferee) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamReferee_joinedAtEpoch(ctx, field) if err != nil { return graphql.Null } @@ -80381,7 +90973,7 @@ func (ec *executionContext) _Team_teamId(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TeamId, nil + return ec.resolvers.TeamReferee().JoinedAtEpoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -80393,26 +90985,26 @@ func (ec *executionContext) _Team_teamId(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Team_teamId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamReferee_joinedAtEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Team", + Object: "TeamReferee", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Team_referrer(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Team_referrer(ctx, field) +func (ec *executionContext) _TeamRefereeConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamRefereeConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -80425,7 +91017,7 @@ func (ec *executionContext) _Team_referrer(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Referrer, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -80437,26 +91029,32 @@ func (ec *executionContext) _Team_referrer(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]*v2.TeamRefereeEdge) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNTeamRefereeEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Team_referrer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamRefereeConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Team", + Object: "TeamRefereeConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_TeamRefereeEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_TeamRefereeEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TeamRefereeEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _Team_name(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Team_name(ctx, field) +func (ec *executionContext) _TeamRefereeConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamRefereeConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -80469,7 +91067,7 @@ func (ec *executionContext) _Team_name(ctx context.Context, field graphql.Collec }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -80481,26 +91079,36 @@ func (ec *executionContext) _Team_name(ctx context.Context, field graphql.Collec } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.PageInfo) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Team_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamRefereeConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Team", + Object: "TeamRefereeConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Team_teamURL(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Team_teamURL(ctx, field) +func (ec *executionContext) _TeamRefereeEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamRefereeEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -80513,7 +91121,7 @@ func (ec *executionContext) _Team_teamURL(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TeamUrl, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -80525,26 +91133,36 @@ func (ec *executionContext) _Team_teamURL(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*v2.TeamReferee) fc.Result = res - return ec.marshalNString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNTeamReferee2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamReferee(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Team_teamURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamRefereeEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Team", + Object: "TeamRefereeEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "teamId": + return ec.fieldContext_TeamReferee_teamId(ctx, field) + case "referee": + return ec.fieldContext_TeamReferee_referee(ctx, field) + case "joinedAt": + return ec.fieldContext_TeamReferee_joinedAt(ctx, field) + case "joinedAtEpoch": + return ec.fieldContext_TeamReferee_joinedAtEpoch(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TeamReferee", field.Name) }, } return fc, nil } -func (ec *executionContext) _Team_avatarURL(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Team_avatarURL(ctx, field) +func (ec *executionContext) _TeamRefereeEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamRefereeEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -80557,7 +91175,7 @@ func (ec *executionContext) _Team_avatarURL(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AvatarUrl, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -80569,14 +91187,14 @@ func (ec *executionContext) _Team_avatarURL(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalNString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Team_avatarURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamRefereeEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Team", + Object: "TeamRefereeEdge", Field: field, IsMethod: false, IsResolver: false, @@ -80587,8 +91205,8 @@ func (ec *executionContext) fieldContext_Team_avatarURL(ctx context.Context, fie return fc, nil } -func (ec *executionContext) _Team_createdAt(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Team_createdAt(ctx, field) +func (ec *executionContext) _TeamRefereeHistory_teamId(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistory) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamRefereeHistory_teamId(ctx, field) if err != nil { return graphql.Null } @@ -80601,7 +91219,7 @@ func (ec *executionContext) _Team_createdAt(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreatedAt, nil + return obj.TeamId, nil }) if err != nil { ec.Error(ctx, err) @@ -80613,26 +91231,26 @@ func (ec *executionContext) _Team_createdAt(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Team_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamRefereeHistory_teamId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Team", + Object: "TeamRefereeHistory", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Team_createdAtEpoch(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Team_createdAtEpoch(ctx, field) +func (ec *executionContext) _TeamRefereeHistory_joinedAt(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistory) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamRefereeHistory_joinedAt(ctx, field) if err != nil { return graphql.Null } @@ -80645,7 +91263,7 @@ func (ec *executionContext) _Team_createdAtEpoch(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Team().CreatedAtEpoch(rctx, obj) + return obj.JoinedAt, nil }) if err != nil { ec.Error(ctx, err) @@ -80657,26 +91275,26 @@ func (ec *executionContext) _Team_createdAtEpoch(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(int) + res := resTmp.(int64) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Team_createdAtEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamRefereeHistory_joinedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Team", + Object: "TeamRefereeHistory", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Team_closed(ctx context.Context, field graphql.CollectedField, obj *v2.Team) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Team_closed(ctx, field) +func (ec *executionContext) _TeamRefereeHistory_joinedAtEpoch(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistory) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamRefereeHistory_joinedAtEpoch(ctx, field) if err != nil { return graphql.Null } @@ -80689,7 +91307,7 @@ func (ec *executionContext) _Team_closed(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Closed, nil + return ec.resolvers.TeamRefereeHistory().JoinedAtEpoch(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -80701,26 +91319,26 @@ func (ec *executionContext) _Team_closed(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(int) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Team_closed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamRefereeHistory_joinedAtEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Team", + Object: "TeamRefereeHistory", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _TeamConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.TeamConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamConnection_edges(ctx, field) +func (ec *executionContext) _TeamRefereeHistoryConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistoryConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamRefereeHistoryConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -80745,32 +91363,32 @@ func (ec *executionContext) _TeamConnection_edges(ctx context.Context, field gra } return graphql.Null } - res := resTmp.([]*v2.TeamEdge) + res := resTmp.([]*v2.TeamRefereeHistoryEdge) fc.Result = res - return ec.marshalNTeamEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNTeamRefereeHistoryEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistoryEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamRefereeHistoryConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamConnection", + Object: "TeamRefereeHistoryConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "node": - return ec.fieldContext_TeamEdge_node(ctx, field) + return ec.fieldContext_TeamRefereeHistoryEdge_node(ctx, field) case "cursor": - return ec.fieldContext_TeamEdge_cursor(ctx, field) + return ec.fieldContext_TeamRefereeHistoryEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type TeamEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TeamRefereeHistoryEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _TeamConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.TeamConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamConnection_pageInfo(ctx, field) +func (ec *executionContext) _TeamRefereeHistoryConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistoryConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamRefereeHistoryConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -80800,9 +91418,9 @@ func (ec *executionContext) _TeamConnection_pageInfo(ctx context.Context, field return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamRefereeHistoryConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamConnection", + Object: "TeamRefereeHistoryConnection", Field: field, IsMethod: false, IsResolver: false, @@ -80823,8 +91441,8 @@ func (ec *executionContext) fieldContext_TeamConnection_pageInfo(ctx context.Con return fc, nil } -func (ec *executionContext) _TeamEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.TeamEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamEdge_node(ctx, field) +func (ec *executionContext) _TeamRefereeHistoryEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistoryEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamRefereeHistoryEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -80849,44 +91467,34 @@ func (ec *executionContext) _TeamEdge_node(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(*v2.Team) + res := resTmp.(*v2.TeamRefereeHistory) fc.Result = res - return ec.marshalNTeam2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeam(ctx, field.Selections, res) + return ec.marshalNTeamRefereeHistory2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistory(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamRefereeHistoryEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamEdge", + Object: "TeamRefereeHistoryEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "teamId": - return ec.fieldContext_Team_teamId(ctx, field) - case "referrer": - return ec.fieldContext_Team_referrer(ctx, field) - case "name": - return ec.fieldContext_Team_name(ctx, field) - case "teamURL": - return ec.fieldContext_Team_teamURL(ctx, field) - case "avatarURL": - return ec.fieldContext_Team_avatarURL(ctx, field) - case "createdAt": - return ec.fieldContext_Team_createdAt(ctx, field) - case "createdAtEpoch": - return ec.fieldContext_Team_createdAtEpoch(ctx, field) - case "closed": - return ec.fieldContext_Team_closed(ctx, field) + return ec.fieldContext_TeamRefereeHistory_teamId(ctx, field) + case "joinedAt": + return ec.fieldContext_TeamRefereeHistory_joinedAt(ctx, field) + case "joinedAtEpoch": + return ec.fieldContext_TeamRefereeHistory_joinedAtEpoch(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Team", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TeamRefereeHistory", field.Name) }, } return fc, nil } -func (ec *executionContext) _TeamEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.TeamEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamEdge_cursor(ctx, field) +func (ec *executionContext) _TeamRefereeHistoryEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistoryEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamRefereeHistoryEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -80916,9 +91524,9 @@ func (ec *executionContext) _TeamEdge_cursor(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamRefereeHistoryEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamEdge", + Object: "TeamRefereeHistoryEdge", Field: field, IsMethod: false, IsResolver: false, @@ -80929,8 +91537,8 @@ func (ec *executionContext) fieldContext_TeamEdge_cursor(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _TeamReferee_teamId(ctx context.Context, field graphql.CollectedField, obj *v2.TeamReferee) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamReferee_teamId(ctx, field) +func (ec *executionContext) _TeamStatistics_teamId(ctx context.Context, field graphql.CollectedField, obj *v2.TeamStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamStatistics_teamId(ctx, field) if err != nil { return graphql.Null } @@ -80957,24 +91565,24 @@ func (ec *executionContext) _TeamReferee_teamId(ctx context.Context, field graph } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamReferee_teamId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamStatistics_teamId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamReferee", + Object: "TeamStatistics", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _TeamReferee_referee(ctx context.Context, field graphql.CollectedField, obj *v2.TeamReferee) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamReferee_referee(ctx, field) +func (ec *executionContext) _TeamStatistics_totalQuantumVolume(ctx context.Context, field graphql.CollectedField, obj *v2.TeamStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamStatistics_totalQuantumVolume(ctx, field) if err != nil { return graphql.Null } @@ -80987,7 +91595,7 @@ func (ec *executionContext) _TeamReferee_referee(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Referee, nil + return obj.TotalQuantumVolume, nil }) if err != nil { ec.Error(ctx, err) @@ -81001,24 +91609,24 @@ func (ec *executionContext) _TeamReferee_referee(ctx context.Context, field grap } res := resTmp.(string) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamReferee_referee(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamStatistics_totalQuantumVolume(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamReferee", + Object: "TeamStatistics", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _TeamReferee_joinedAt(ctx context.Context, field graphql.CollectedField, obj *v2.TeamReferee) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamReferee_joinedAt(ctx, field) +func (ec *executionContext) _TeamStatistics_quantumVolumes(ctx context.Context, field graphql.CollectedField, obj *v2.TeamStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamStatistics_quantumVolumes(ctx, field) if err != nil { return graphql.Null } @@ -81031,7 +91639,7 @@ func (ec *executionContext) _TeamReferee_joinedAt(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.JoinedAt, nil + return obj.QuantumVolumes, nil }) if err != nil { ec.Error(ctx, err) @@ -81043,70 +91651,32 @@ func (ec *executionContext) _TeamReferee_joinedAt(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(int64) + res := resTmp.([]*v2.QuantumVolumesPerEpoch) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNQuantumVolumesPerEpoch2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐQuantumVolumesPerEpochᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamReferee_joinedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamStatistics_quantumVolumes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamReferee", + Object: "TeamStatistics", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _TeamReferee_joinedAtEpoch(ctx context.Context, field graphql.CollectedField, obj *v2.TeamReferee) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamReferee_joinedAtEpoch(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.TeamReferee().JoinedAtEpoch(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(int) - fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_TeamReferee_joinedAtEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "TeamReferee", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "epoch": + return ec.fieldContext_QuantumVolumesPerEpoch_epoch(ctx, field) + case "totalQuantumVolumes": + return ec.fieldContext_QuantumVolumesPerEpoch_totalQuantumVolumes(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type QuantumVolumesPerEpoch", field.Name) }, } return fc, nil } -func (ec *executionContext) _TeamRefereeConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamRefereeConnection_edges(ctx, field) +func (ec *executionContext) _TeamStatistics_totalQuantumRewards(ctx context.Context, field graphql.CollectedField, obj *v2.TeamStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamStatistics_totalQuantumRewards(ctx, field) if err != nil { return graphql.Null } @@ -81119,7 +91689,7 @@ func (ec *executionContext) _TeamRefereeConnection_edges(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.TotalQuantumRewards, nil }) if err != nil { ec.Error(ctx, err) @@ -81131,32 +91701,26 @@ func (ec *executionContext) _TeamRefereeConnection_edges(ctx context.Context, fi } return graphql.Null } - res := resTmp.([]*v2.TeamRefereeEdge) + res := resTmp.(string) fc.Result = res - return ec.marshalNTeamRefereeEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamRefereeConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamStatistics_totalQuantumRewards(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamRefereeConnection", + Object: "TeamStatistics", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_TeamRefereeEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_TeamRefereeEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TeamRefereeEdge", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _TeamRefereeConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamRefereeConnection_pageInfo(ctx, field) +func (ec *executionContext) _TeamStatistics_quantumRewards(ctx context.Context, field graphql.CollectedField, obj *v2.TeamStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamStatistics_quantumRewards(ctx, field) if err != nil { return graphql.Null } @@ -81169,7 +91733,7 @@ func (ec *executionContext) _TeamRefereeConnection_pageInfo(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.QuantumRewards, nil }) if err != nil { ec.Error(ctx, err) @@ -81181,36 +91745,32 @@ func (ec *executionContext) _TeamRefereeConnection_pageInfo(ctx context.Context, } return graphql.Null } - res := resTmp.(*v2.PageInfo) + res := resTmp.([]*v2.QuantumRewardsPerEpoch) fc.Result = res - return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNQuantumRewardsPerEpoch2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐQuantumRewardsPerEpochᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamRefereeConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamStatistics_quantumRewards(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamRefereeConnection", + Object: "TeamStatistics", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "epoch": + return ec.fieldContext_QuantumRewardsPerEpoch_epoch(ctx, field) + case "totalQuantumRewards": + return ec.fieldContext_QuantumRewardsPerEpoch_totalQuantumRewards(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, fmt.Errorf("no field named %q was found under type QuantumRewardsPerEpoch", field.Name) }, } return fc, nil } -func (ec *executionContext) _TeamRefereeEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamRefereeEdge_node(ctx, field) +func (ec *executionContext) _TeamStatistics_totalGamesPlayed(ctx context.Context, field graphql.CollectedField, obj *v2.TeamStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamStatistics_totalGamesPlayed(ctx, field) if err != nil { return graphql.Null } @@ -81223,7 +91783,7 @@ func (ec *executionContext) _TeamRefereeEdge_node(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.TeamStatistics().TotalGamesPlayed(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -81235,36 +91795,26 @@ func (ec *executionContext) _TeamRefereeEdge_node(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(*v2.TeamReferee) + res := resTmp.(int) fc.Result = res - return ec.marshalNTeamReferee2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamReferee(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamRefereeEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamStatistics_totalGamesPlayed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamRefereeEdge", + Object: "TeamStatistics", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "teamId": - return ec.fieldContext_TeamReferee_teamId(ctx, field) - case "referee": - return ec.fieldContext_TeamReferee_referee(ctx, field) - case "joinedAt": - return ec.fieldContext_TeamReferee_joinedAt(ctx, field) - case "joinedAtEpoch": - return ec.fieldContext_TeamReferee_joinedAtEpoch(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TeamReferee", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _TeamRefereeEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamRefereeEdge_cursor(ctx, field) +func (ec *executionContext) _TeamStatistics_gamesPlayed(ctx context.Context, field graphql.CollectedField, obj *v2.TeamStatistics) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamStatistics_gamesPlayed(ctx, field) if err != nil { return graphql.Null } @@ -81277,7 +91827,7 @@ func (ec *executionContext) _TeamRefereeEdge_cursor(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.GamesPlayed, nil }) if err != nil { ec.Error(ctx, err) @@ -81289,14 +91839,14 @@ func (ec *executionContext) _TeamRefereeEdge_cursor(ctx context.Context, field g } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamRefereeEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamStatistics_gamesPlayed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamRefereeEdge", + Object: "TeamStatistics", Field: field, IsMethod: false, IsResolver: false, @@ -81307,8 +91857,8 @@ func (ec *executionContext) fieldContext_TeamRefereeEdge_cursor(ctx context.Cont return fc, nil } -func (ec *executionContext) _TeamRefereeHistory_teamId(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistory) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamRefereeHistory_teamId(ctx, field) +func (ec *executionContext) _TeamStatisticsEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.TeamStatisticsEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamStatisticsEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -81321,7 +91871,7 @@ func (ec *executionContext) _TeamRefereeHistory_teamId(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TeamId, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -81333,26 +91883,42 @@ func (ec *executionContext) _TeamRefereeHistory_teamId(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*v2.TeamStatistics) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNTeamStatistics2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamStatistics(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamRefereeHistory_teamId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamStatisticsEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamRefereeHistory", + Object: "TeamStatisticsEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "teamId": + return ec.fieldContext_TeamStatistics_teamId(ctx, field) + case "totalQuantumVolume": + return ec.fieldContext_TeamStatistics_totalQuantumVolume(ctx, field) + case "quantumVolumes": + return ec.fieldContext_TeamStatistics_quantumVolumes(ctx, field) + case "totalQuantumRewards": + return ec.fieldContext_TeamStatistics_totalQuantumRewards(ctx, field) + case "quantumRewards": + return ec.fieldContext_TeamStatistics_quantumRewards(ctx, field) + case "totalGamesPlayed": + return ec.fieldContext_TeamStatistics_totalGamesPlayed(ctx, field) + case "gamesPlayed": + return ec.fieldContext_TeamStatistics_gamesPlayed(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TeamStatistics", field.Name) }, } return fc, nil } -func (ec *executionContext) _TeamRefereeHistory_joinedAt(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistory) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamRefereeHistory_joinedAt(ctx, field) +func (ec *executionContext) _TeamStatisticsEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.TeamStatisticsEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamStatisticsEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -81365,7 +91931,7 @@ func (ec *executionContext) _TeamRefereeHistory_joinedAt(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.JoinedAt, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -81377,70 +91943,26 @@ func (ec *executionContext) _TeamRefereeHistory_joinedAt(ctx context.Context, fi } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamRefereeHistory_joinedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamStatisticsEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamRefereeHistory", + Object: "TeamStatisticsEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _TeamRefereeHistory_joinedAtEpoch(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistory) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamRefereeHistory_joinedAtEpoch(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.TeamRefereeHistory().JoinedAtEpoch(rctx, obj) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(int) - fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_TeamRefereeHistory_joinedAtEpoch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "TeamRefereeHistory", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _TeamRefereeHistoryConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistoryConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamRefereeHistoryConnection_edges(ctx, field) +func (ec *executionContext) _TeamsStatisticsConnection_edges(ctx context.Context, field graphql.CollectedField, obj *v2.TeamsStatisticsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamsStatisticsConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -81465,32 +91987,32 @@ func (ec *executionContext) _TeamRefereeHistoryConnection_edges(ctx context.Cont } return graphql.Null } - res := resTmp.([]*v2.TeamRefereeHistoryEdge) + res := resTmp.([]*v2.TeamStatisticsEdge) fc.Result = res - return ec.marshalNTeamRefereeHistoryEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistoryEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNTeamStatisticsEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamStatisticsEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamRefereeHistoryConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamsStatisticsConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamRefereeHistoryConnection", + Object: "TeamsStatisticsConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "node": - return ec.fieldContext_TeamRefereeHistoryEdge_node(ctx, field) + return ec.fieldContext_TeamStatisticsEdge_node(ctx, field) case "cursor": - return ec.fieldContext_TeamRefereeHistoryEdge_cursor(ctx, field) + return ec.fieldContext_TeamStatisticsEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type TeamRefereeHistoryEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TeamStatisticsEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _TeamRefereeHistoryConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistoryConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamRefereeHistoryConnection_pageInfo(ctx, field) +func (ec *executionContext) _TeamsStatisticsConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *v2.TeamsStatisticsConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TeamsStatisticsConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -81520,9 +92042,9 @@ func (ec *executionContext) _TeamRefereeHistoryConnection_pageInfo(ctx context.C return ec.marshalNPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamRefereeHistoryConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TeamsStatisticsConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamRefereeHistoryConnection", + Object: "TeamsStatisticsConnection", Field: field, IsMethod: false, IsResolver: false, @@ -81543,8 +92065,8 @@ func (ec *executionContext) fieldContext_TeamRefereeHistoryConnection_pageInfo(c return fc, nil } -func (ec *executionContext) _TeamRefereeHistoryEdge_node(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistoryEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamRefereeHistoryEdge_node(ctx, field) +func (ec *executionContext) _TimeUpdate_timestamp(ctx context.Context, field graphql.CollectedField, obj *TimeUpdate) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TimeUpdate_timestamp(ctx, field) if err != nil { return graphql.Null } @@ -81557,7 +92079,7 @@ func (ec *executionContext) _TeamRefereeHistoryEdge_node(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.Timestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -81569,34 +92091,26 @@ func (ec *executionContext) _TeamRefereeHistoryEdge_node(ctx context.Context, fi } return graphql.Null } - res := resTmp.(*v2.TeamRefereeHistory) + res := resTmp.(int64) fc.Result = res - return ec.marshalNTeamRefereeHistory2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistory(ctx, field.Selections, res) + return ec.marshalNTimestamp2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamRefereeHistoryEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TimeUpdate_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamRefereeHistoryEdge", + Object: "TimeUpdate", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "teamId": - return ec.fieldContext_TeamRefereeHistory_teamId(ctx, field) - case "joinedAt": - return ec.fieldContext_TeamRefereeHistory_joinedAt(ctx, field) - case "joinedAtEpoch": - return ec.fieldContext_TeamRefereeHistory_joinedAtEpoch(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TeamRefereeHistory", field.Name) + return nil, errors.New("field of type Timestamp does not have child fields") }, } return fc, nil } -func (ec *executionContext) _TeamRefereeHistoryEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *v2.TeamRefereeHistoryEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TeamRefereeHistoryEdge_cursor(ctx, field) +func (ec *executionContext) _TotalTransferFeeDiscount_totalDiscount(ctx context.Context, field graphql.CollectedField, obj *v2.GetTotalTransferFeeDiscountResponse) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TotalTransferFeeDiscount_totalDiscount(ctx, field) if err != nil { return graphql.Null } @@ -81609,7 +92123,7 @@ func (ec *executionContext) _TeamRefereeHistoryEdge_cursor(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.TotalDiscount, nil }) if err != nil { ec.Error(ctx, err) @@ -81626,9 +92140,9 @@ func (ec *executionContext) _TeamRefereeHistoryEdge_cursor(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TeamRefereeHistoryEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TotalTransferFeeDiscount_totalDiscount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TeamRefereeHistoryEdge", + Object: "TotalTransferFeeDiscount", Field: field, IsMethod: false, IsResolver: false, @@ -81639,50 +92153,6 @@ func (ec *executionContext) fieldContext_TeamRefereeHistoryEdge_cursor(ctx conte return fc, nil } -func (ec *executionContext) _TimeUpdate_timestamp(ctx context.Context, field graphql.CollectedField, obj *TimeUpdate) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TimeUpdate_timestamp(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Timestamp, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(int64) - fc.Result = res - return ec.marshalNTimestamp2int64(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_TimeUpdate_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "TimeUpdate", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Timestamp does not have child fields") - }, - } - return fc, nil -} - func (ec *executionContext) _TradableInstrument_instrument(ctx context.Context, field graphql.CollectedField, obj *vega.TradableInstrument) (ret graphql.Marshaler) { fc, err := ec.fieldContext_TradableInstrument_instrument(ctx, field) if err != nil { @@ -81933,6 +92403,8 @@ func (ec *executionContext) fieldContext_Trade_market(ctx context.Context, field return ec.fieldContext_Market_state(ctx, field) case "proposal": return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) case "ordersConnection": return ec.fieldContext_Market_ordersConnection(ctx, field) case "accountsConnection": @@ -81965,6 +92437,10 @@ func (ec *executionContext) fieldContext_Trade_market(ctx context.Context, field return ec.fieldContext_Market_successorMarketID(ctx, field) case "liquiditySLAParameters": return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, @@ -84814,6 +95290,47 @@ func (ec *executionContext) fieldContext_Transfer_reason(ctx context.Context, fi return fc, nil } +func (ec *executionContext) _Transfer_gameId(ctx context.Context, field graphql.CollectedField, obj *v1.Transfer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Transfer_gameId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.GameId, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOID2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Transfer_gameId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Transfer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _TransferBalance_account(ctx context.Context, field graphql.CollectedField, obj *TransferBalance) (ret graphql.Marshaler) { fc, err := ec.fieldContext_TransferBalance_account(ctx, field) if err != nil { @@ -85302,6 +95819,8 @@ func (ec *executionContext) fieldContext_TransferNode_transfer(ctx context.Conte return ec.fieldContext_Transfer_kind(ctx, field) case "reason": return ec.fieldContext_Transfer_reason(ctx, field) + case "gameId": + return ec.fieldContext_Transfer_gameId(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Transfer", field.Name) }, @@ -85963,6 +96482,50 @@ func (ec *executionContext) fieldContext_UpdateInstrumentConfiguration_code(ctx return fc, nil } +func (ec *executionContext) _UpdateInstrumentConfiguration_name(ctx context.Context, field graphql.CollectedField, obj *UpdateInstrumentConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UpdateInstrumentConfiguration_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_UpdateInstrumentConfiguration_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "UpdateInstrumentConfiguration", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _UpdateInstrumentConfiguration_product(ctx context.Context, field graphql.CollectedField, obj *UpdateInstrumentConfiguration) (ret graphql.Marshaler) { fc, err := ec.fieldContext_UpdateInstrumentConfiguration_product(ctx, field) if err != nil { @@ -86106,6 +96669,12 @@ func (ec *executionContext) fieldContext_UpdateMarket_updateMarketConfiguration( return ec.fieldContext_UpdateMarketConfiguration_quadraticSlippageFactor(ctx, field) case "liquiditySLAParameters": return ec.fieldContext_UpdateMarketConfiguration_liquiditySLAParameters(ctx, field) + case "liquidityFeeSettings": + return ec.fieldContext_UpdateMarketConfiguration_liquidityFeeSettings(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_UpdateMarketConfiguration_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_UpdateMarketConfiguration_markPriceConfiguration(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type UpdateMarketConfiguration", field.Name) }, @@ -86154,6 +96723,8 @@ func (ec *executionContext) fieldContext_UpdateMarketConfiguration_instrument(ct switch field.Name { case "code": return ec.fieldContext_UpdateInstrumentConfiguration_code(ctx, field) + case "name": + return ec.fieldContext_UpdateInstrumentConfiguration_name(ctx, field) case "product": return ec.fieldContext_UpdateInstrumentConfiguration_product(ctx, field) } @@ -86293,10 +96864,6 @@ func (ec *executionContext) fieldContext_UpdateMarketConfiguration_liquidityMoni switch field.Name { case "targetStakeParameters": return ec.fieldContext_LiquidityMonitoringParameters_targetStakeParameters(ctx, field) - case "triggeringRatio": - return ec.fieldContext_LiquidityMonitoringParameters_triggeringRatio(ctx, field) - case "auctionExtensionSecs": - return ec.fieldContext_LiquidityMonitoringParameters_auctionExtensionSecs(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type LiquidityMonitoringParameters", field.Name) }, @@ -86487,6 +97054,163 @@ func (ec *executionContext) fieldContext_UpdateMarketConfiguration_liquiditySLAP return fc, nil } +func (ec *executionContext) _UpdateMarketConfiguration_liquidityFeeSettings(ctx context.Context, field graphql.CollectedField, obj *vega.UpdateMarketConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UpdateMarketConfiguration_liquidityFeeSettings(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LiquidityFeeSettings, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*vega.LiquidityFeeSettings) + fc.Result = res + return ec.marshalOLiquidityFeeSettings2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityFeeSettings(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_UpdateMarketConfiguration_liquidityFeeSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "UpdateMarketConfiguration", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "method": + return ec.fieldContext_LiquidityFeeSettings_method(ctx, field) + case "feeConstant": + return ec.fieldContext_LiquidityFeeSettings_feeConstant(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityFeeSettings", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _UpdateMarketConfiguration_liquidationStrategy(ctx context.Context, field graphql.CollectedField, obj *vega.UpdateMarketConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UpdateMarketConfiguration_liquidationStrategy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LiquidationStrategy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*vega.LiquidationStrategy) + fc.Result = res + return ec.marshalOLiquidationStrategy2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidationStrategy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_UpdateMarketConfiguration_liquidationStrategy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "UpdateMarketConfiguration", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "disposalTimeStep": + return ec.fieldContext_LiquidationStrategy_disposalTimeStep(ctx, field) + case "disposalFraction": + return ec.fieldContext_LiquidationStrategy_disposalFraction(ctx, field) + case "fullDisposalSize": + return ec.fieldContext_LiquidationStrategy_fullDisposalSize(ctx, field) + case "maxFractionConsumed": + return ec.fieldContext_LiquidationStrategy_maxFractionConsumed(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidationStrategy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _UpdateMarketConfiguration_markPriceConfiguration(ctx context.Context, field graphql.CollectedField, obj *vega.UpdateMarketConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UpdateMarketConfiguration_markPriceConfiguration(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MarkPriceConfiguration, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*vega.CompositePriceConfiguration) + fc.Result = res + return ec.marshalOCompositePriceConfiguration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceConfiguration(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_UpdateMarketConfiguration_markPriceConfiguration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "UpdateMarketConfiguration", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "decayWeight": + return ec.fieldContext_CompositePriceConfiguration_decayWeight(ctx, field) + case "decayPower": + return ec.fieldContext_CompositePriceConfiguration_decayPower(ctx, field) + case "cashAmount": + return ec.fieldContext_CompositePriceConfiguration_cashAmount(ctx, field) + case "SourceWeights": + return ec.fieldContext_CompositePriceConfiguration_SourceWeights(ctx, field) + case "SourceStalenessTolerance": + return ec.fieldContext_CompositePriceConfiguration_SourceStalenessTolerance(ctx, field) + case "CompositePriceType": + return ec.fieldContext_CompositePriceConfiguration_CompositePriceType(ctx, field) + case "dataSourcesSpec": + return ec.fieldContext_CompositePriceConfiguration_dataSourcesSpec(ctx, field) + case "dataSourcesSpecBinding": + return ec.fieldContext_CompositePriceConfiguration_dataSourcesSpecBinding(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CompositePriceConfiguration", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _UpdateMarketLogNormalRiskModel_logNormal(ctx context.Context, field graphql.CollectedField, obj *vega.UpdateMarketConfiguration_LogNormal) (ret graphql.Marshaler) { fc, err := ec.fieldContext_UpdateMarketLogNormalRiskModel_logNormal(ctx, field) if err != nil { @@ -86644,6 +97368,8 @@ func (ec *executionContext) fieldContext_UpdateMarketState_market(ctx context.Co return ec.fieldContext_Market_state(ctx, field) case "proposal": return ec.fieldContext_Market_proposal(ctx, field) + case "marketProposal": + return ec.fieldContext_Market_marketProposal(ctx, field) case "ordersConnection": return ec.fieldContext_Market_ordersConnection(ctx, field) case "accountsConnection": @@ -86676,6 +97402,10 @@ func (ec *executionContext) fieldContext_UpdateMarketState_market(ctx context.Co return ec.fieldContext_Market_successorMarketID(ctx, field) case "liquiditySLAParameters": return ec.fieldContext_Market_liquiditySLAParameters(ctx, field) + case "liquidationStrategy": + return ec.fieldContext_Market_liquidationStrategy(ctx, field) + case "markPriceConfiguration": + return ec.fieldContext_Market_markPriceConfiguration(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Market", field.Name) }, @@ -86818,7 +97548,7 @@ func (ec *executionContext) fieldContext_UpdateNetworkParameter_networkParameter return fc, nil } -func (ec *executionContext) _UpdatePerpetualProduct_quoteName(ctx context.Context, field graphql.CollectedField, obj *UpdatePerpetualProduct) (ret graphql.Marshaler) { +func (ec *executionContext) _UpdatePerpetualProduct_quoteName(ctx context.Context, field graphql.CollectedField, obj *vega.UpdatePerpetualProduct) (ret graphql.Marshaler) { fc, err := ec.fieldContext_UpdatePerpetualProduct_quoteName(ctx, field) if err != nil { return graphql.Null @@ -86862,7 +97592,7 @@ func (ec *executionContext) fieldContext_UpdatePerpetualProduct_quoteName(ctx co return fc, nil } -func (ec *executionContext) _UpdatePerpetualProduct_marginFundingFactor(ctx context.Context, field graphql.CollectedField, obj *UpdatePerpetualProduct) (ret graphql.Marshaler) { +func (ec *executionContext) _UpdatePerpetualProduct_marginFundingFactor(ctx context.Context, field graphql.CollectedField, obj *vega.UpdatePerpetualProduct) (ret graphql.Marshaler) { fc, err := ec.fieldContext_UpdatePerpetualProduct_marginFundingFactor(ctx, field) if err != nil { return graphql.Null @@ -86906,7 +97636,7 @@ func (ec *executionContext) fieldContext_UpdatePerpetualProduct_marginFundingFac return fc, nil } -func (ec *executionContext) _UpdatePerpetualProduct_interestRate(ctx context.Context, field graphql.CollectedField, obj *UpdatePerpetualProduct) (ret graphql.Marshaler) { +func (ec *executionContext) _UpdatePerpetualProduct_interestRate(ctx context.Context, field graphql.CollectedField, obj *vega.UpdatePerpetualProduct) (ret graphql.Marshaler) { fc, err := ec.fieldContext_UpdatePerpetualProduct_interestRate(ctx, field) if err != nil { return graphql.Null @@ -86950,7 +97680,7 @@ func (ec *executionContext) fieldContext_UpdatePerpetualProduct_interestRate(ctx return fc, nil } -func (ec *executionContext) _UpdatePerpetualProduct_clampLowerBound(ctx context.Context, field graphql.CollectedField, obj *UpdatePerpetualProduct) (ret graphql.Marshaler) { +func (ec *executionContext) _UpdatePerpetualProduct_clampLowerBound(ctx context.Context, field graphql.CollectedField, obj *vega.UpdatePerpetualProduct) (ret graphql.Marshaler) { fc, err := ec.fieldContext_UpdatePerpetualProduct_clampLowerBound(ctx, field) if err != nil { return graphql.Null @@ -86994,7 +97724,7 @@ func (ec *executionContext) fieldContext_UpdatePerpetualProduct_clampLowerBound( return fc, nil } -func (ec *executionContext) _UpdatePerpetualProduct_clampUpperBound(ctx context.Context, field graphql.CollectedField, obj *UpdatePerpetualProduct) (ret graphql.Marshaler) { +func (ec *executionContext) _UpdatePerpetualProduct_clampUpperBound(ctx context.Context, field graphql.CollectedField, obj *vega.UpdatePerpetualProduct) (ret graphql.Marshaler) { fc, err := ec.fieldContext_UpdatePerpetualProduct_clampUpperBound(ctx, field) if err != nil { return graphql.Null @@ -87038,7 +97768,7 @@ func (ec *executionContext) fieldContext_UpdatePerpetualProduct_clampUpperBound( return fc, nil } -func (ec *executionContext) _UpdatePerpetualProduct_dataSourceSpecForSettlementSchedule(ctx context.Context, field graphql.CollectedField, obj *UpdatePerpetualProduct) (ret graphql.Marshaler) { +func (ec *executionContext) _UpdatePerpetualProduct_dataSourceSpecForSettlementSchedule(ctx context.Context, field graphql.CollectedField, obj *vega.UpdatePerpetualProduct) (ret graphql.Marshaler) { fc, err := ec.fieldContext_UpdatePerpetualProduct_dataSourceSpecForSettlementSchedule(ctx, field) if err != nil { return graphql.Null @@ -87086,7 +97816,7 @@ func (ec *executionContext) fieldContext_UpdatePerpetualProduct_dataSourceSpecFo return fc, nil } -func (ec *executionContext) _UpdatePerpetualProduct_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField, obj *UpdatePerpetualProduct) (ret graphql.Marshaler) { +func (ec *executionContext) _UpdatePerpetualProduct_dataSourceSpecForSettlementData(ctx context.Context, field graphql.CollectedField, obj *vega.UpdatePerpetualProduct) (ret graphql.Marshaler) { fc, err := ec.fieldContext_UpdatePerpetualProduct_dataSourceSpecForSettlementData(ctx, field) if err != nil { return graphql.Null @@ -87134,7 +97864,7 @@ func (ec *executionContext) fieldContext_UpdatePerpetualProduct_dataSourceSpecFo return fc, nil } -func (ec *executionContext) _UpdatePerpetualProduct_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField, obj *UpdatePerpetualProduct) (ret graphql.Marshaler) { +func (ec *executionContext) _UpdatePerpetualProduct_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField, obj *vega.UpdatePerpetualProduct) (ret graphql.Marshaler) { fc, err := ec.fieldContext_UpdatePerpetualProduct_dataSourceSpecBinding(ctx, field) if err != nil { return graphql.Null @@ -87160,9 +97890,9 @@ func (ec *executionContext) _UpdatePerpetualProduct_dataSourceSpecBinding(ctx co } return graphql.Null } - res := resTmp.(*DataSourceSpecPerpetualBinding) + res := resTmp.(*vega.DataSourceSpecToPerpetualBinding) fc.Result = res - return ec.marshalNDataSourceSpecPerpetualBinding2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpecPerpetualBinding(ctx, field.Selections, res) + return ec.marshalNDataSourceSpecPerpetualBinding2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceSpecToPerpetualBinding(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_UpdatePerpetualProduct_dataSourceSpecBinding(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -87184,6 +97914,138 @@ func (ec *executionContext) fieldContext_UpdatePerpetualProduct_dataSourceSpecBi return fc, nil } +func (ec *executionContext) _UpdatePerpetualProduct_fundingRateScalingFactor(ctx context.Context, field graphql.CollectedField, obj *vega.UpdatePerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UpdatePerpetualProduct_fundingRateScalingFactor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.FundingRateScalingFactor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalNString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_UpdatePerpetualProduct_fundingRateScalingFactor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "UpdatePerpetualProduct", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _UpdatePerpetualProduct_fundingRateLowerBound(ctx context.Context, field graphql.CollectedField, obj *vega.UpdatePerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UpdatePerpetualProduct_fundingRateLowerBound(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.FundingRateLowerBound, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalNString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_UpdatePerpetualProduct_fundingRateLowerBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "UpdatePerpetualProduct", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _UpdatePerpetualProduct_fundingRateUpperBound(ctx context.Context, field graphql.CollectedField, obj *vega.UpdatePerpetualProduct) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UpdatePerpetualProduct_fundingRateUpperBound(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.FundingRateUpperBound, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalNString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_UpdatePerpetualProduct_fundingRateUpperBound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "UpdatePerpetualProduct", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _UpdateReferralProgram_benefitTiers(ctx context.Context, field graphql.CollectedField, obj *vega.UpdateReferralProgram) (ret graphql.Marshaler) { fc, err := ec.fieldContext_UpdateReferralProgram_benefitTiers(ctx, field) if err != nil { @@ -87469,6 +98331,8 @@ func (ec *executionContext) fieldContext_UpdateSpotMarket_updateSpotMarketConfig return ec.fieldContext_UpdateSpotMarketConfiguration_riskParameters(ctx, field) case "liquiditySLAParams": return ec.fieldContext_UpdateSpotMarketConfiguration_liquiditySLAParams(ctx, field) + case "liquidityFeeSettings": + return ec.fieldContext_UpdateSpotMarketConfiguration_liquidityFeeSettings(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type UpdateSpotMarketConfiguration", field.Name) }, @@ -87716,6 +98580,53 @@ func (ec *executionContext) fieldContext_UpdateSpotMarketConfiguration_liquidity return fc, nil } +func (ec *executionContext) _UpdateSpotMarketConfiguration_liquidityFeeSettings(ctx context.Context, field graphql.CollectedField, obj *vega.UpdateSpotMarketConfiguration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UpdateSpotMarketConfiguration_liquidityFeeSettings(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LiquidityFeeSettings, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*vega.LiquidityFeeSettings) + fc.Result = res + return ec.marshalOLiquidityFeeSettings2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityFeeSettings(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_UpdateSpotMarketConfiguration_liquidityFeeSettings(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "UpdateSpotMarketConfiguration", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "method": + return ec.fieldContext_LiquidityFeeSettings_method(ctx, field) + case "feeConstant": + return ec.fieldContext_LiquidityFeeSettings_feeConstant(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type LiquidityFeeSettings", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _UpdateVolumeDiscountProgram_benefitTiers(ctx context.Context, field graphql.CollectedField, obj *vega.UpdateVolumeDiscountProgram) (ret graphql.Marshaler) { fc, err := ec.fieldContext_UpdateVolumeDiscountProgram_benefitTiers(ctx, field) if err != nil { @@ -91723,7 +102634,7 @@ func (ec *executionContext) unmarshalInputLedgerEntryFilter(ctx context.Context, asMap[k] = v } - fieldsInOrder := [...]string{"CloseOnAccountFilters", "FromAccountFilter", "ToAccountFilter", "TransferTypes"} + fieldsInOrder := [...]string{"CloseOnAccountFilters", "FromAccountFilter", "ToAccountFilter", "TransferTypes", "TransferId"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -91762,6 +102673,14 @@ func (ec *executionContext) unmarshalInputLedgerEntryFilter(ctx context.Context, if err != nil { return it, err } + case "TransferId": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("TransferId")) + it.TransferId, err = ec.unmarshalOID2ᚖstring(ctx, v) + if err != nil { + return it, err + } } } @@ -91958,8 +102877,8 @@ func (ec *executionContext) unmarshalInputOrderFilter(ctx context.Context, obj i return it, nil } -func (ec *executionContext) unmarshalInputOrderInfo(ctx context.Context, obj interface{}) (OrderInfo, error) { - var it OrderInfo +func (ec *executionContext) unmarshalInputOrderInfo(ctx context.Context, obj interface{}) (v2.OrderInfo, error) { + var it v2.OrderInfo asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v @@ -91992,10 +102911,13 @@ func (ec *executionContext) unmarshalInputOrderInfo(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("remaining")) - it.Remaining, err = ec.unmarshalNString2string(ctx, v) + data, err := ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } + if err = ec.resolvers.OrderInfo().Remaining(ctx, &it, data); err != nil { + return it, err + } case "isMarketOrder": var err error @@ -92426,6 +103348,29 @@ func (ec *executionContext) _ExternalDataSourceKind(ctx context.Context, sel ast } } +func (ec *executionContext) _GameEntity(ctx context.Context, sel ast.SelectionSet, obj GameEntity) graphql.Marshaler { + switch obj := (obj).(type) { + case nil: + return graphql.Null + case TeamGameEntity: + return ec._TeamGameEntity(ctx, sel, &obj) + case *TeamGameEntity: + if obj == nil { + return graphql.Null + } + return ec._TeamGameEntity(ctx, sel, obj) + case IndividualGameEntity: + return ec._IndividualGameEntity(ctx, sel, &obj) + case *IndividualGameEntity: + if obj == nil { + return graphql.Null + } + return ec._IndividualGameEntity(ctx, sel, obj) + default: + panic(fmt.Errorf("unexpected type %T", obj)) + } +} + func (ec *executionContext) _GovernanceTransferKind(ctx context.Context, sel ast.SelectionSet, obj GovernanceTransferKind) graphql.Marshaler { switch obj := (obj).(type) { case nil: @@ -92664,6 +103609,27 @@ func (ec *executionContext) _ProposalChange(ctx context.Context, sel ast.Selecti } } +func (ec *executionContext) _ProposalNode(ctx context.Context, sel ast.SelectionSet, obj ProposalNode) graphql.Marshaler { + switch obj := (obj).(type) { + case nil: + return graphql.Null + case *vega.GovernanceData: + if obj == nil { + return graphql.Null + } + return ec._Proposal(ctx, sel, obj) + case BatchProposal: + return ec._BatchProposal(ctx, sel, &obj) + case *BatchProposal: + if obj == nil { + return graphql.Null + } + return ec._BatchProposal(ctx, sel, obj) + default: + panic(fmt.Errorf("unexpected type %T", obj)) + } +} + func (ec *executionContext) _RiskModel(ctx context.Context, sel ast.SelectionSet, obj RiskModel) graphql.Marshaler { switch obj := (obj).(type) { case nil: @@ -92836,9 +103802,9 @@ func (ec *executionContext) _UpdateProductConfiguration(ctx context.Context, sel return graphql.Null } return ec._UpdateFutureProduct(ctx, sel, obj) - case UpdatePerpetualProduct: + case vega.UpdatePerpetualProduct: return ec._UpdatePerpetualProduct(ctx, sel, &obj) - case *UpdatePerpetualProduct: + case *vega.UpdatePerpetualProduct: if obj == nil { return graphql.Null } @@ -92868,6 +103834,90 @@ func (ec *executionContext) _WithdrawalDetails(ctx context.Context, sel ast.Sele // region **************************** object.gotpl **************************** +var abstractMarginLevelsImplementors = []string{"AbstractMarginLevels"} + +func (ec *executionContext) _AbstractMarginLevels(ctx context.Context, sel ast.SelectionSet, obj *AbstractMarginLevels) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, abstractMarginLevelsImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("AbstractMarginLevels") + case "market": + + out.Values[i] = ec._AbstractMarginLevels_market(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "asset": + + out.Values[i] = ec._AbstractMarginLevels_asset(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "maintenanceLevel": + + out.Values[i] = ec._AbstractMarginLevels_maintenanceLevel(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "searchLevel": + + out.Values[i] = ec._AbstractMarginLevels_searchLevel(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "initialLevel": + + out.Values[i] = ec._AbstractMarginLevels_initialLevel(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "orderMarginLevel": + + out.Values[i] = ec._AbstractMarginLevels_orderMarginLevel(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "collateralReleaseLevel": + + out.Values[i] = ec._AbstractMarginLevels_collateralReleaseLevel(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "marginMode": + + out.Values[i] = ec._AbstractMarginLevels_marginMode(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "marginFactor": + + out.Values[i] = ec._AbstractMarginLevels_marginFactor(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var accountBalanceImplementors = []string{"AccountBalance"} func (ec *executionContext) _AccountBalance(ctx context.Context, sel ast.SelectionSet, obj *v2.AccountBalance) graphql.Marshaler { @@ -93996,6 +105046,217 @@ func (ec *executionContext) _AuctionEvent(ctx context.Context, sel ast.Selection return out } +var batchProposalImplementors = []string{"BatchProposal", "ProposalNode"} + +func (ec *executionContext) _BatchProposal(ctx context.Context, sel ast.SelectionSet, obj *BatchProposal) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, batchProposalImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BatchProposal") + case "id": + + out.Values[i] = ec._BatchProposal_id(ctx, field, obj) + + case "reference": + + out.Values[i] = ec._BatchProposal_reference(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "party": + + out.Values[i] = ec._BatchProposal_party(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "state": + + out.Values[i] = ec._BatchProposal_state(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "datetime": + + out.Values[i] = ec._BatchProposal_datetime(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "batchTerms": + + out.Values[i] = ec._BatchProposal_batchTerms(ctx, field, obj) + + case "rationale": + + out.Values[i] = ec._BatchProposal_rationale(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "votes": + + out.Values[i] = ec._BatchProposal_votes(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "rejectionReason": + + out.Values[i] = ec._BatchProposal_rejectionReason(ctx, field, obj) + + case "errorDetails": + + out.Values[i] = ec._BatchProposal_errorDetails(ctx, field, obj) + + case "requiredMajority": + + out.Values[i] = ec._BatchProposal_requiredMajority(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "requiredParticipation": + + out.Values[i] = ec._BatchProposal_requiredParticipation(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "requiredLpMajority": + + out.Values[i] = ec._BatchProposal_requiredLpMajority(ctx, field, obj) + + case "requiredLpParticipation": + + out.Values[i] = ec._BatchProposal_requiredLpParticipation(ctx, field, obj) + + case "subProposals": + + out.Values[i] = ec._BatchProposal_subProposals(ctx, field, obj) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var batchProposalTermsImplementors = []string{"BatchProposalTerms"} + +func (ec *executionContext) _BatchProposalTerms(ctx context.Context, sel ast.SelectionSet, obj *vega.BatchProposalTerms) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, batchProposalTermsImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BatchProposalTerms") + case "closingDatetime": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._BatchProposalTerms_closingDatetime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "changes": + + out.Values[i] = ec._BatchProposalTerms_changes(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var batchProposalTermsChangeImplementors = []string{"BatchProposalTermsChange"} + +func (ec *executionContext) _BatchProposalTermsChange(ctx context.Context, sel ast.SelectionSet, obj *vega.BatchProposalTermsChange) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, batchProposalTermsChangeImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BatchProposalTermsChange") + case "enactmentDatetime": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._BatchProposalTermsChange_enactmentDatetime(ctx, field, obj) + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "change": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._BatchProposalTermsChange_change(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var benefitTierImplementors = []string{"BenefitTier"} func (ec *executionContext) _BenefitTier(ctx context.Context, sel ast.SelectionSet, obj *vega.BenefitTier) graphql.Marshaler { @@ -94369,6 +105630,215 @@ func (ec *executionContext) _CandleEdge(ctx context.Context, sel ast.SelectionSe return out } +var collateralIncreaseEstimateImplementors = []string{"CollateralIncreaseEstimate"} + +func (ec *executionContext) _CollateralIncreaseEstimate(ctx context.Context, sel ast.SelectionSet, obj *v2.CollateralIncreaseEstimate) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, collateralIncreaseEstimateImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CollateralIncreaseEstimate") + case "worstCase": + + out.Values[i] = ec._CollateralIncreaseEstimate_worstCase(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "bestCase": + + out.Values[i] = ec._CollateralIncreaseEstimate_bestCase(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var compositePriceConfigurationImplementors = []string{"CompositePriceConfiguration"} + +func (ec *executionContext) _CompositePriceConfiguration(ctx context.Context, sel ast.SelectionSet, obj *vega.CompositePriceConfiguration) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, compositePriceConfigurationImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CompositePriceConfiguration") + case "decayWeight": + + out.Values[i] = ec._CompositePriceConfiguration_decayWeight(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "decayPower": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._CompositePriceConfiguration_decayPower(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "cashAmount": + + out.Values[i] = ec._CompositePriceConfiguration_cashAmount(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "SourceWeights": + + out.Values[i] = ec._CompositePriceConfiguration_SourceWeights(ctx, field, obj) + + case "SourceStalenessTolerance": + + out.Values[i] = ec._CompositePriceConfiguration_SourceStalenessTolerance(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "CompositePriceType": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._CompositePriceConfiguration_CompositePriceType(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "dataSourcesSpec": + + out.Values[i] = ec._CompositePriceConfiguration_dataSourcesSpec(ctx, field, obj) + + case "dataSourcesSpecBinding": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._CompositePriceConfiguration_dataSourcesSpecBinding(ctx, field, obj) + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var compositePriceSourceImplementors = []string{"CompositePriceSource"} + +func (ec *executionContext) _CompositePriceSource(ctx context.Context, sel ast.SelectionSet, obj *vega.CompositePriceSource) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, compositePriceSourceImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CompositePriceSource") + case "price": + + out.Values[i] = ec._CompositePriceSource_price(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "lastUpdated": + + out.Values[i] = ec._CompositePriceSource_lastUpdated(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "PriceSource": + + out.Values[i] = ec._CompositePriceSource_PriceSource(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var compositePriceStateImplementors = []string{"CompositePriceState"} + +func (ec *executionContext) _CompositePriceState(ctx context.Context, sel ast.SelectionSet, obj *vega.CompositePriceState) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, compositePriceStateImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CompositePriceState") + case "priceSources": + + out.Values[i] = ec._CompositePriceState_priceSources(ctx, field, obj) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var conditionImplementors = []string{"Condition"} func (ec *executionContext) _Condition(ctx context.Context, sel ast.SelectionSet, obj *Condition) graphql.Marshaler { @@ -95020,7 +106490,7 @@ func (ec *executionContext) _DataSourceSpecConfigurationTimeTrigger(ctx context. var dataSourceSpecPerpetualBindingImplementors = []string{"DataSourceSpecPerpetualBinding"} -func (ec *executionContext) _DataSourceSpecPerpetualBinding(ctx context.Context, sel ast.SelectionSet, obj *DataSourceSpecPerpetualBinding) graphql.Marshaler { +func (ec *executionContext) _DataSourceSpecPerpetualBinding(ctx context.Context, sel ast.SelectionSet, obj *vega.DataSourceSpecToPerpetualBinding) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, dataSourceSpecPerpetualBindingImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -96697,6 +108167,41 @@ func (ec *executionContext) _Erc20WithdrawalDetails(ctx context.Context, sel ast return out } +var estimatedTransferFeeImplementors = []string{"EstimatedTransferFee"} + +func (ec *executionContext) _EstimatedTransferFee(ctx context.Context, sel ast.SelectionSet, obj *v2.EstimateTransferFeeResponse) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, estimatedTransferFeeImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("EstimatedTransferFee") + case "fee": + + out.Values[i] = ec._EstimatedTransferFee_fee(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "discount": + + out.Values[i] = ec._EstimatedTransferFee_discount(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var ethCallSpecImplementors = []string{"EthCallSpec", "ExternalDataSourceKind"} func (ec *executionContext) _EthCallSpec(ctx context.Context, sel ast.SelectionSet, obj *vega.EthCallSpec) graphql.Marshaler { @@ -96825,6 +108330,26 @@ func (ec *executionContext) _EthCallSpec(ctx context.Context, sel ast.SelectionS return res } + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "sourceChainId": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._EthCallSpec_sourceChainId(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + out.Concurrently(i, func() graphql.Marshaler { return innerFunc(ctx) @@ -97212,6 +108737,10 @@ func (ec *executionContext) _Fees(ctx context.Context, sel ast.SelectionSet, obj if out.Values[i] == graphql.Null { invalids++ } + case "liquidityFeeSettings": + + out.Values[i] = ec._Fees_liquidityFeeSettings(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -98058,6 +109587,165 @@ func (ec *executionContext) _FutureProduct(ctx context.Context, sel ast.Selectio return out } +var gameImplementors = []string{"Game"} + +func (ec *executionContext) _Game(ctx context.Context, sel ast.SelectionSet, obj *v2.Game) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, gameImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Game") + case "id": + + out.Values[i] = ec._Game_id(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "epoch": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Game_epoch(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "numberOfParticipants": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Game_numberOfParticipants(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "entities": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Game_entities(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "rewardAssetId": + + out.Values[i] = ec._Game_rewardAssetId(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var gameEdgeImplementors = []string{"GameEdge"} + +func (ec *executionContext) _GameEdge(ctx context.Context, sel ast.SelectionSet, obj *v2.GameEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, gameEdgeImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("GameEdge") + case "node": + + out.Values[i] = ec._GameEdge_node(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "cursor": + + out.Values[i] = ec._GameEdge_cursor(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var gamesConnectionImplementors = []string{"GamesConnection"} + +func (ec *executionContext) _GamesConnection(ctx context.Context, sel ast.SelectionSet, obj *v2.GamesConnection) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, gamesConnectionImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("GamesConnection") + case "edges": + + out.Values[i] = ec._GamesConnection_edges(ctx, field, obj) + + case "pageInfo": + + out.Values[i] = ec._GamesConnection_pageInfo(ctx, field, obj) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var historySegmentImplementors = []string{"HistorySegment"} func (ec *executionContext) _HistorySegment(ctx context.Context, sel ast.SelectionSet, obj *v2.HistorySegment) graphql.Marshaler { @@ -98181,6 +109869,83 @@ func (ec *executionContext) _IcebergOrder(ctx context.Context, sel ast.Selection return out } +var individualGameEntityImplementors = []string{"IndividualGameEntity", "GameEntity"} + +func (ec *executionContext) _IndividualGameEntity(ctx context.Context, sel ast.SelectionSet, obj *IndividualGameEntity) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, individualGameEntityImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IndividualGameEntity") + case "individual": + + out.Values[i] = ec._IndividualGameEntity_individual(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "rank": + + out.Values[i] = ec._IndividualGameEntity_rank(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "volume": + + out.Values[i] = ec._IndividualGameEntity_volume(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "rewardMetric": + + out.Values[i] = ec._IndividualGameEntity_rewardMetric(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "rewardEarned": + + out.Values[i] = ec._IndividualGameEntity_rewardEarned(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "totalRewardsEarned": + + out.Values[i] = ec._IndividualGameEntity_totalRewardsEarned(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "rewardEarnedQuantum": + + out.Values[i] = ec._IndividualGameEntity_rewardEarnedQuantum(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "totalRewardsEarnedQuantum": + + out.Values[i] = ec._IndividualGameEntity_totalRewardsEarnedQuantum(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var instrumentImplementors = []string{"Instrument"} func (ec *executionContext) _Instrument(ctx context.Context, sel ast.SelectionSet, obj *vega.Instrument) graphql.Marshaler { @@ -98675,33 +110440,113 @@ func (ec *executionContext) _LiquidationPrice(ctx context.Context, sel ast.Selec return out } -var liquidityMonitoringParametersImplementors = []string{"LiquidityMonitoringParameters"} +var liquidationStrategyImplementors = []string{"LiquidationStrategy"} -func (ec *executionContext) _LiquidityMonitoringParameters(ctx context.Context, sel ast.SelectionSet, obj *LiquidityMonitoringParameters) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, liquidityMonitoringParametersImplementors) +func (ec *executionContext) _LiquidationStrategy(ctx context.Context, sel ast.SelectionSet, obj *vega.LiquidationStrategy) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, liquidationStrategyImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("LiquidityMonitoringParameters") - case "targetStakeParameters": + out.Values[i] = graphql.MarshalString("LiquidationStrategy") + case "disposalTimeStep": - out.Values[i] = ec._LiquidityMonitoringParameters_targetStakeParameters(ctx, field, obj) + out.Values[i] = ec._LiquidationStrategy_disposalTimeStep(ctx, field, obj) if out.Values[i] == graphql.Null { - invalids++ + atomic.AddUint32(&invalids, 1) + } + case "disposalFraction": + + out.Values[i] = ec._LiquidationStrategy_disposalFraction(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) } - case "triggeringRatio": + case "fullDisposalSize": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._LiquidationStrategy_fullDisposalSize(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "maxFractionConsumed": + + out.Values[i] = ec._LiquidationStrategy_maxFractionConsumed(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var liquidityFeeSettingsImplementors = []string{"LiquidityFeeSettings"} + +func (ec *executionContext) _LiquidityFeeSettings(ctx context.Context, sel ast.SelectionSet, obj *vega.LiquidityFeeSettings) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, liquidityFeeSettingsImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("LiquidityFeeSettings") + case "method": - out.Values[i] = ec._LiquidityMonitoringParameters_triggeringRatio(ctx, field, obj) + out.Values[i] = ec._LiquidityFeeSettings_method(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } - case "auctionExtensionSecs": + case "feeConstant": + + out.Values[i] = ec._LiquidityFeeSettings_feeConstant(ctx, field, obj) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var liquidityMonitoringParametersImplementors = []string{"LiquidityMonitoringParameters"} + +func (ec *executionContext) _LiquidityMonitoringParameters(ctx context.Context, sel ast.SelectionSet, obj *LiquidityMonitoringParameters) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, liquidityMonitoringParametersImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("LiquidityMonitoringParameters") + case "targetStakeParameters": - out.Values[i] = ec._LiquidityMonitoringParameters_auctionExtensionSecs(ctx, field, obj) + out.Values[i] = ec._LiquidityMonitoringParameters_targetStakeParameters(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ @@ -99816,19 +111661,45 @@ func (ec *executionContext) _MarginEstimate(ctx context.Context, sel ast.Selecti case "__typename": out.Values[i] = graphql.MarshalString("MarginEstimate") case "worstCase": + field := field - out.Values[i] = ec._MarginEstimate_worstCase(ctx, field, obj) - - if out.Values[i] == graphql.Null { - invalids++ + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._MarginEstimate_worstCase(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res } - case "bestCase": - out.Values[i] = ec._MarginEstimate_bestCase(ctx, field, obj) + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) - if out.Values[i] == graphql.Null { - invalids++ + }) + case "bestCase": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._MarginEstimate_bestCase(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -99953,6 +111824,26 @@ func (ec *executionContext) _MarginLevels(ctx context.Context, sel ast.Selection return res } + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "orderMarginLevel": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._MarginLevels_orderMarginLevel(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + out.Concurrently(i, func() graphql.Marshaler { return innerFunc(ctx) @@ -99968,6 +111859,20 @@ func (ec *executionContext) _MarginLevels(ctx context.Context, sel ast.Selection out.Values[i] = ec._MarginLevels_timestamp(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "marginMode": + + out.Values[i] = ec._MarginLevels_marginMode(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "marginFactor": + + out.Values[i] = ec._MarginLevels_marginFactor(ctx, field, obj) + if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } @@ -100056,6 +111961,26 @@ func (ec *executionContext) _MarginLevelsUpdate(ctx context.Context, sel ast.Sel return res } + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "orderMarginLevel": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._MarginLevelsUpdate_orderMarginLevel(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + out.Concurrently(i, func() graphql.Marshaler { return innerFunc(ctx) @@ -100071,6 +111996,20 @@ func (ec *executionContext) _MarginLevelsUpdate(ctx context.Context, sel ast.Sel out.Values[i] = ec._MarginLevelsUpdate_timestamp(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "marginMode": + + out.Values[i] = ec._MarginLevelsUpdate_marginMode(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "marginFactor": + + out.Values[i] = ec._MarginLevelsUpdate_marginFactor(ctx, field, obj) + if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } @@ -100230,6 +112169,23 @@ func (ec *executionContext) _Market(ctx context.Context, sel ast.SelectionSet, o return res } + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "marketProposal": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Market_marketProposal(ctx, field, obj) + return res + } + out.Concurrently(i, func() graphql.Marshaler { return innerFunc(ctx) @@ -100440,6 +112396,17 @@ func (ec *executionContext) _Market(ctx context.Context, sel ast.SelectionSet, o return innerFunc(ctx) }) + case "liquidationStrategy": + + out.Values[i] = ec._Market_liquidationStrategy(ctx, field, obj) + + case "markPriceConfiguration": + + out.Values[i] = ec._Market_markPriceConfiguration(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -100523,6 +112490,26 @@ func (ec *executionContext) _MarketData(ctx context.Context, sel ast.SelectionSe if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } + case "markPriceType": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._MarketData_markPriceType(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) case "bestBidPrice": out.Values[i] = ec._MarketData_bestBidPrice(ctx, field, obj) @@ -100898,6 +112885,30 @@ func (ec *executionContext) _MarketData(ctx context.Context, sel ast.SelectionSe return innerFunc(ctx) }) + case "nextNetworkCloseout": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._MarketData_nextNetworkCloseout(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "markPriceState": + + out.Values[i] = ec._MarketData_markPriceState(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -101367,6 +113378,41 @@ func (ec *executionContext) _MarketTimestamps(ctx context.Context, sel ast.Selec return out } +var metadataImplementors = []string{"Metadata"} + +func (ec *executionContext) _Metadata(ctx context.Context, sel ast.SelectionSet, obj *vega.Metadata) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, metadataImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Metadata") + case "key": + + out.Values[i] = ec._Metadata_key(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "value": + + out.Values[i] = ec._Metadata_value(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var networkLimitsImplementors = []string{"NetworkLimits"} func (ec *executionContext) _NetworkLimits(ctx context.Context, sel ast.SelectionSet, obj *vega.NetworkLimits) graphql.Marshaler { @@ -101915,6 +113961,60 @@ func (ec *executionContext) _NewMarket(ctx context.Context, sel ast.SelectionSet return res } + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "liquidityFeeSettings": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._NewMarket_liquidityFeeSettings(ctx, field, obj) + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "liquidationStrategy": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._NewMarket_liquidationStrategy(ctx, field, obj) + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "markPriceConfiguration": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._NewMarket_markPriceConfiguration(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + out.Concurrently(i, func() graphql.Marshaler { return innerFunc(ctx) @@ -102093,6 +114193,23 @@ func (ec *executionContext) _NewSpotMarket(ctx context.Context, sel ast.Selectio return res } + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "liquidityFeeSettings": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._NewSpotMarket_liquidityFeeSettings(ctx, field, obj) + return res + } + out.Concurrently(i, func() graphql.Marshaler { return innerFunc(ctx) @@ -103437,6 +115554,30 @@ func (ec *executionContext) _ObservableMarketData(ctx context.Context, sel ast.S return innerFunc(ctx) }) + case "markPriceType": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._ObservableMarketData_markPriceType(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "markPriceState": + + out.Values[i] = ec._ObservableMarketData_markPriceState(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -104753,6 +116894,41 @@ func (ec *executionContext) _PaidLiquidityFeesEdge(ctx context.Context, sel ast. return out } +var partiesProfilesConnectionImplementors = []string{"PartiesProfilesConnection"} + +func (ec *executionContext) _PartiesProfilesConnection(ctx context.Context, sel ast.SelectionSet, obj *v2.PartiesProfilesConnection) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, partiesProfilesConnectionImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("PartiesProfilesConnection") + case "edges": + + out.Values[i] = ec._PartiesProfilesConnection_edges(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "pageInfo": + + out.Values[i] = ec._PartiesProfilesConnection_pageInfo(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var partyImplementors = []string{"Party"} func (ec *executionContext) _Party(ctx context.Context, sel ast.SelectionSet, obj *vega.Party) graphql.Marshaler { @@ -105438,6 +117614,221 @@ func (ec *executionContext) _PartyLockedBalance(ctx context.Context, sel ast.Sel return out } +var partyMarginModeImplementors = []string{"PartyMarginMode"} + +func (ec *executionContext) _PartyMarginMode(ctx context.Context, sel ast.SelectionSet, obj *v2.PartyMarginMode) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, partyMarginModeImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("PartyMarginMode") + case "marketId": + + out.Values[i] = ec._PartyMarginMode_marketId(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "partyId": + + out.Values[i] = ec._PartyMarginMode_partyId(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "marginMode": + + out.Values[i] = ec._PartyMarginMode_marginMode(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "marginFactor": + + out.Values[i] = ec._PartyMarginMode_marginFactor(ctx, field, obj) + + case "minTheoreticalMarginFactor": + + out.Values[i] = ec._PartyMarginMode_minTheoreticalMarginFactor(ctx, field, obj) + + case "maxTheoreticalLeverage": + + out.Values[i] = ec._PartyMarginMode_maxTheoreticalLeverage(ctx, field, obj) + + case "atEpoch": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._PartyMarginMode_atEpoch(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var partyMarginModeEdgeImplementors = []string{"PartyMarginModeEdge"} + +func (ec *executionContext) _PartyMarginModeEdge(ctx context.Context, sel ast.SelectionSet, obj *v2.PartyMarginModeEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, partyMarginModeEdgeImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("PartyMarginModeEdge") + case "node": + + out.Values[i] = ec._PartyMarginModeEdge_node(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "cursor": + + out.Values[i] = ec._PartyMarginModeEdge_cursor(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var partyMarginModesConnectionImplementors = []string{"PartyMarginModesConnection"} + +func (ec *executionContext) _PartyMarginModesConnection(ctx context.Context, sel ast.SelectionSet, obj *v2.PartyMarginModesConnection) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, partyMarginModesConnectionImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("PartyMarginModesConnection") + case "edges": + + out.Values[i] = ec._PartyMarginModesConnection_edges(ctx, field, obj) + + case "pageInfo": + + out.Values[i] = ec._PartyMarginModesConnection_pageInfo(ctx, field, obj) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var partyProfileImplementors = []string{"PartyProfile"} + +func (ec *executionContext) _PartyProfile(ctx context.Context, sel ast.SelectionSet, obj *vega.PartyProfile) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, partyProfileImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("PartyProfile") + case "partyId": + + out.Values[i] = ec._PartyProfile_partyId(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "alias": + + out.Values[i] = ec._PartyProfile_alias(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "metadata": + + out.Values[i] = ec._PartyProfile_metadata(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var partyProfileEdgeImplementors = []string{"PartyProfileEdge"} + +func (ec *executionContext) _PartyProfileEdge(ctx context.Context, sel ast.SelectionSet, obj *v2.PartyProfileEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, partyProfileEdgeImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("PartyProfileEdge") + case "node": + + out.Values[i] = ec._PartyProfileEdge_node(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "cursor": + + out.Values[i] = ec._PartyProfileEdge_cursor(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var partyStakeImplementors = []string{"PartyStake"} func (ec *executionContext) _PartyStake(ctx context.Context, sel ast.SelectionSet, obj *v2.GetStakeResponse) graphql.Marshaler { @@ -105773,25 +118164,37 @@ func (ec *executionContext) _Perpetual(ctx context.Context, sel ast.SelectionSet }) case "dataSourceSpecBinding": - field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Perpetual_dataSourceSpecBinding(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&invalids, 1) - } - return res + out.Values[i] = ec._Perpetual_dataSourceSpecBinding(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) } + case "fundingRateScalingFactor": - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + out.Values[i] = ec._Perpetual_fundingRateScalingFactor(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "fundingRateLowerBound": + + out.Values[i] = ec._Perpetual_fundingRateLowerBound(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "fundingRateUpperBound": + + out.Values[i] = ec._Perpetual_fundingRateUpperBound(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "internalCompositePriceConfig": + + out.Values[i] = ec._Perpetual_internalCompositePriceConfig(ctx, field, obj) - }) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -105829,6 +118232,91 @@ func (ec *executionContext) _PerpetualData(ctx context.Context, sel ast.Selectio out.Values[i] = ec._PerpetualData_internalTwap(ctx, field, obj) + case "seqNum": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._PerpetualData_seqNum(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "startTime": + + out.Values[i] = ec._PerpetualData_startTime(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "internalCompositePrice": + + out.Values[i] = ec._PerpetualData_internalCompositePrice(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "internalCompositePriceType": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._PerpetualData_internalCompositePriceType(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "nextInternalCompositePriceCalc": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._PerpetualData_nextInternalCompositePriceCalc(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "underlyingIndexPrice": + + out.Values[i] = ec._PerpetualData_underlyingIndexPrice(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "internalCompositePriceState": + + out.Values[i] = ec._PerpetualData_internalCompositePriceState(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -105920,25 +118408,33 @@ func (ec *executionContext) _PerpetualProduct(ctx context.Context, sel ast.Selec atomic.AddUint32(&invalids, 1) } case "dataSourceSpecBinding": - field := field - innerFunc := func(ctx context.Context) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._PerpetualProduct_dataSourceSpecBinding(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&invalids, 1) - } - return res + out.Values[i] = ec._PerpetualProduct_dataSourceSpecBinding(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) } + case "fundingRateScalingFactor": - out.Concurrently(i, func() graphql.Marshaler { - return innerFunc(ctx) + out.Values[i] = ec._PerpetualProduct_fundingRateScalingFactor(ctx, field, obj) - }) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "fundingRateLowerBound": + + out.Values[i] = ec._PerpetualProduct_fundingRateLowerBound(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "fundingRateUpperBound": + + out.Values[i] = ec._PerpetualProduct_fundingRateUpperBound(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -106175,6 +118671,13 @@ func (ec *executionContext) _PositionEstimate(ctx context.Context, sel ast.Selec out.Values[i] = ec._PositionEstimate_margin(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "collateralIncreaseEstimate": + + out.Values[i] = ec._PositionEstimate_collateralIncreaseEstimate(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } @@ -106629,7 +119132,7 @@ func (ec *executionContext) _PropertyKey(ctx context.Context, sel ast.SelectionS return out } -var proposalImplementors = []string{"Proposal"} +var proposalImplementors = []string{"Proposal", "ProposalNode"} func (ec *executionContext) _Proposal(ctx context.Context, sel ast.SelectionSet, obj *vega.GovernanceData) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, proposalImplementors) @@ -106929,6 +119432,10 @@ func (ec *executionContext) _ProposalDetail(ctx context.Context, sel ast.Selecti out.Values[i] = ec._ProposalDetail_id(ctx, field, obj) + case "batchId": + + out.Values[i] = ec._ProposalDetail_batchId(ctx, field, obj) + case "reference": out.Values[i] = ec._ProposalDetail_reference(ctx, field, obj) @@ -106987,9 +119494,10 @@ func (ec *executionContext) _ProposalDetail(ctx context.Context, sel ast.Selecti out.Values[i] = ec._ProposalDetail_terms(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&invalids, 1) - } + case "batchTerms": + + out.Values[i] = ec._ProposalDetail_batchTerms(ctx, field, obj) + case "rationale": out.Values[i] = ec._ProposalDetail_rationale(ctx, field, obj) @@ -107092,14 +119600,31 @@ func (ec *executionContext) _ProposalEdge(ctx context.Context, sel ast.Selection out.Values[i] = ec._ProposalEdge_node(ctx, field, obj) if out.Values[i] == graphql.Null { - invalids++ + atomic.AddUint32(&invalids, 1) } + case "proposalNode": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._ProposalEdge_proposalNode(ctx, field, obj) + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) case "cursor": out.Values[i] = ec._ProposalEdge_cursor(ctx, field, obj) if out.Values[i] == graphql.Null { - invalids++ + atomic.AddUint32(&invalids, 1) } default: panic("unknown field " + strconv.Quote(field.Name)) @@ -107637,6 +120162,102 @@ func (ec *executionContext) _PubKey(ctx context.Context, sel ast.SelectionSet, o return out } +var quantumRewardsPerEpochImplementors = []string{"QuantumRewardsPerEpoch"} + +func (ec *executionContext) _QuantumRewardsPerEpoch(ctx context.Context, sel ast.SelectionSet, obj *v2.QuantumRewardsPerEpoch) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, quantumRewardsPerEpochImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("QuantumRewardsPerEpoch") + case "epoch": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._QuantumRewardsPerEpoch_epoch(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "totalQuantumRewards": + + out.Values[i] = ec._QuantumRewardsPerEpoch_totalQuantumRewards(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var quantumVolumesPerEpochImplementors = []string{"QuantumVolumesPerEpoch"} + +func (ec *executionContext) _QuantumVolumesPerEpoch(ctx context.Context, sel ast.SelectionSet, obj *v2.QuantumVolumesPerEpoch) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, quantumVolumesPerEpochImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("QuantumVolumesPerEpoch") + case "epoch": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._QuantumVolumesPerEpoch_epoch(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "totalQuantumVolumes": + + out.Values[i] = ec._QuantumVolumesPerEpoch_totalQuantumVolumes(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { @@ -108080,6 +120701,89 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) } + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) + }) + case "estimateTransferFee": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_estimateTransferFee(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) + }) + case "feesStats": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_feesStats(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) + }) + case "feesStatsForParty": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_feesStatsForParty(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) + }) + case "fundingPayments": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_fundingPayments(ctx, field) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) @@ -108129,7 +120833,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "fundingPayments": + case "games": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108138,7 +120842,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_fundingPayments(ctx, field) + res = ec._Query_games(ctx, field) if res == graphql.Null { atomic.AddUint32(&invalids, 1) } @@ -108172,7 +120876,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "ledgerEntries": + case "keyRotationsConnection": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108181,7 +120885,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_ledgerEntries(ctx, field) + res = ec._Query_keyRotationsConnection(ctx, field) if res == graphql.Null { atomic.AddUint32(&invalids, 1) } @@ -108195,7 +120899,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "liquidityProviders": + case "ledgerEntries": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108204,7 +120908,10 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_liquidityProviders(ctx, field) + res = ec._Query_ledgerEntries(ctx, field) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } return res } @@ -108215,7 +120922,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "keyRotationsConnection": + case "liquidityProviders": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108224,10 +120931,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_keyRotationsConnection(ctx, field) - if res == graphql.Null { - atomic.AddUint32(&invalids, 1) - } + res = ec._Query_liquidityProviders(ctx, field) return res } @@ -108616,7 +121320,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "partiesConnection": + case "paidLiquidityFees": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108625,7 +121329,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_partiesConnection(ctx, field) + res = ec._Query_paidLiquidityFees(ctx, field) return res } @@ -108636,7 +121340,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "party": + case "partiesConnection": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108645,7 +121349,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_party(ctx, field) + res = ec._Query_partiesConnection(ctx, field) return res } @@ -108656,7 +121360,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "positions": + case "partiesProfilesConnection": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108665,7 +121369,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_positions(ctx, field) + res = ec._Query_partiesProfilesConnection(ctx, field) return res } @@ -108676,7 +121380,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "proposal": + case "party": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108685,7 +121389,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_proposal(ctx, field) + res = ec._Query_party(ctx, field) return res } @@ -108696,7 +121400,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "proposalsConnection": + case "positions": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108705,7 +121409,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_proposalsConnection(ctx, field) + res = ec._Query_positions(ctx, field) return res } @@ -108716,7 +121420,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "protocolUpgradeStatus": + case "proposal": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108725,7 +121429,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_protocolUpgradeStatus(ctx, field) + res = ec._Query_proposal(ctx, field) return res } @@ -108736,7 +121440,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "protocolUpgradeProposals": + case "proposalsConnection": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108745,7 +121449,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_protocolUpgradeProposals(ctx, field) + res = ec._Query_proposalsConnection(ctx, field) return res } @@ -108756,7 +121460,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "referralSets": + case "protocolUpgradeStatus": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108765,10 +121469,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_referralSets(ctx, field) - if res == graphql.Null { - atomic.AddUint32(&invalids, 1) - } + res = ec._Query_protocolUpgradeStatus(ctx, field) return res } @@ -108779,7 +121480,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "feesStats": + case "protocolUpgradeProposals": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108788,7 +121489,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_feesStats(ctx, field) + res = ec._Query_protocolUpgradeProposals(ctx, field) return res } @@ -108799,7 +121500,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "feesStatsForParty": + case "referralSets": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -108808,7 +121509,10 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_feesStatsForParty(ctx, field) + res = ec._Query_referralSets(ctx, field) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } return res } @@ -108965,6 +121669,46 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) } + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) + }) + case "teamsStatistics": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_teamsStatistics(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) + }) + case "teamMembersStatistics": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_teamMembersStatistics(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) @@ -109005,6 +121749,26 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) } + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) + }) + case "totalTransferFeeDiscount": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_totalTransferFeeDiscount(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) @@ -109131,7 +121895,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out.Concurrently(i, func() graphql.Marshaler { return rrm(innerCtx) }) - case "paidLiquidityFees": + case "partyMarginModes": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -109140,7 +121904,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_paidLiquidityFees(ctx, field) + res = ec._Query_partyMarginModes(ctx, field) return res } @@ -109520,28 +122284,48 @@ func (ec *executionContext) _ReferralSet(ctx context.Context, sel ast.SelectionS out.Values[i] = ec._ReferralSet_id(ctx, field, obj) if out.Values[i] == graphql.Null { - invalids++ + atomic.AddUint32(&invalids, 1) } case "referrer": out.Values[i] = ec._ReferralSet_referrer(ctx, field, obj) if out.Values[i] == graphql.Null { - invalids++ + atomic.AddUint32(&invalids, 1) + } + case "totalMembers": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._ReferralSet_totalMembers(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) case "createdAt": out.Values[i] = ec._ReferralSet_createdAt(ctx, field, obj) if out.Values[i] == graphql.Null { - invalids++ + atomic.AddUint32(&invalids, 1) } case "updatedAt": out.Values[i] = ec._ReferralSet_updatedAt(ctx, field, obj) if out.Values[i] == graphql.Null { - invalids++ + atomic.AddUint32(&invalids, 1) } default: panic("unknown field " + strconv.Quote(field.Name)) @@ -110106,6 +122890,13 @@ func (ec *executionContext) _Reward(ctx context.Context, sel ast.SelectionSet, o out.Values[i] = ec._Reward_amount(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "quantumAmount": + + out.Values[i] = ec._Reward_quantumAmount(ctx, field, obj) + if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } @@ -110143,6 +122934,14 @@ func (ec *executionContext) _Reward(ctx context.Context, sel ast.SelectionSet, o return innerFunc(ctx) }) + case "gameId": + + out.Values[i] = ec._Reward_gameId(ctx, field, obj) + + case "teamId": + + out.Values[i] = ec._Reward_teamId(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -110683,6 +123482,34 @@ func (ec *executionContext) _SimpleRiskModelParams(ctx context.Context, sel ast. return out } +var specBindingForCompositePriceImplementors = []string{"SpecBindingForCompositePrice"} + +func (ec *executionContext) _SpecBindingForCompositePrice(ctx context.Context, sel ast.SelectionSet, obj *SpecBindingForCompositePrice) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, specBindingForCompositePriceImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("SpecBindingForCompositePrice") + case "priceSourceProperty": + + out.Values[i] = ec._SpecBindingForCompositePrice_priceSourceProperty(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var spotImplementors = []string{"Spot", "Product"} func (ec *executionContext) _Spot(ctx context.Context, sel ast.SelectionSet, obj *vega.Spot) graphql.Marshaler { @@ -111814,6 +124641,43 @@ func (ec *executionContext) _StopOrder(ctx context.Context, sel ast.SelectionSet return res } + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "sizeOverrideSetting": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._StopOrder_sizeOverrideSetting(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "sizeOverrideValue": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._StopOrder_sizeOverrideValue(ctx, field, obj) + return res + } + out.Concurrently(i, func() graphql.Marshaler { return innerFunc(ctx) @@ -112192,20 +125056,40 @@ func (ec *executionContext) _Team(ctx context.Context, sel ast.SelectionSet, obj if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } - case "teamURL": + case "teamUrl": - out.Values[i] = ec._Team_teamURL(ctx, field, obj) + out.Values[i] = ec._Team_teamUrl(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } - case "avatarURL": + case "avatarUrl": - out.Values[i] = ec._Team_avatarURL(ctx, field, obj) + out.Values[i] = ec._Team_avatarUrl(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } + case "totalMembers": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Team_totalMembers(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) case "createdAt": out.Values[i] = ec._Team_createdAt(ctx, field, obj) @@ -112237,6 +125121,13 @@ func (ec *executionContext) _Team(ctx context.Context, sel ast.SelectionSet, obj out.Values[i] = ec._Team_closed(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "allowList": + + out.Values[i] = ec._Team_allowList(ctx, field, obj) + if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } @@ -112321,6 +125212,271 @@ func (ec *executionContext) _TeamEdge(ctx context.Context, sel ast.SelectionSet, return out } +var teamGameEntityImplementors = []string{"TeamGameEntity", "GameEntity"} + +func (ec *executionContext) _TeamGameEntity(ctx context.Context, sel ast.SelectionSet, obj *TeamGameEntity) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamGameEntityImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("TeamGameEntity") + case "team": + + out.Values[i] = ec._TeamGameEntity_team(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "rank": + + out.Values[i] = ec._TeamGameEntity_rank(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "volume": + + out.Values[i] = ec._TeamGameEntity_volume(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "rewardMetric": + + out.Values[i] = ec._TeamGameEntity_rewardMetric(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "rewardEarned": + + out.Values[i] = ec._TeamGameEntity_rewardEarned(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "totalRewardsEarned": + + out.Values[i] = ec._TeamGameEntity_totalRewardsEarned(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "rewardEarnedQuantum": + + out.Values[i] = ec._TeamGameEntity_rewardEarnedQuantum(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "totalRewardsEarnedQuantum": + + out.Values[i] = ec._TeamGameEntity_totalRewardsEarnedQuantum(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var teamMemberStatisticsImplementors = []string{"TeamMemberStatistics"} + +func (ec *executionContext) _TeamMemberStatistics(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamMemberStatistics) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamMemberStatisticsImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("TeamMemberStatistics") + case "partyId": + + out.Values[i] = ec._TeamMemberStatistics_partyId(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "totalQuantumVolume": + + out.Values[i] = ec._TeamMemberStatistics_totalQuantumVolume(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "quantumVolumes": + + out.Values[i] = ec._TeamMemberStatistics_quantumVolumes(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "totalQuantumRewards": + + out.Values[i] = ec._TeamMemberStatistics_totalQuantumRewards(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "quantumRewards": + + out.Values[i] = ec._TeamMemberStatistics_quantumRewards(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "totalGamesPlayed": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._TeamMemberStatistics_totalGamesPlayed(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + case "gamesPlayed": + + out.Values[i] = ec._TeamMemberStatistics_gamesPlayed(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var teamMemberStatisticsEdgeImplementors = []string{"TeamMemberStatisticsEdge"} + +func (ec *executionContext) _TeamMemberStatisticsEdge(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamMemberStatisticsEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamMemberStatisticsEdgeImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("TeamMemberStatisticsEdge") + case "node": + + out.Values[i] = ec._TeamMemberStatisticsEdge_node(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "cursor": + + out.Values[i] = ec._TeamMemberStatisticsEdge_cursor(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var teamMembersStatisticsConnectionImplementors = []string{"TeamMembersStatisticsConnection"} + +func (ec *executionContext) _TeamMembersStatisticsConnection(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamMembersStatisticsConnection) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamMembersStatisticsConnectionImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("TeamMembersStatisticsConnection") + case "edges": + + out.Values[i] = ec._TeamMembersStatisticsConnection_edges(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "pageInfo": + + out.Values[i] = ec._TeamMembersStatisticsConnection_pageInfo(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var teamParticipationImplementors = []string{"TeamParticipation"} + +func (ec *executionContext) _TeamParticipation(ctx context.Context, sel ast.SelectionSet, obj *TeamParticipation) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamParticipationImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("TeamParticipation") + case "teamId": + + out.Values[i] = ec._TeamParticipation_teamId(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "membersParticipating": + + out.Values[i] = ec._TeamParticipation_membersParticipating(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var teamRefereeImplementors = []string{"TeamReferee"} func (ec *executionContext) _TeamReferee(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamReferee) graphql.Marshaler { @@ -112383,26 +125539,151 @@ func (ec *executionContext) _TeamReferee(ctx context.Context, sel ast.SelectionS return out } -var teamRefereeConnectionImplementors = []string{"TeamRefereeConnection"} +var teamRefereeConnectionImplementors = []string{"TeamRefereeConnection"} + +func (ec *executionContext) _TeamRefereeConnection(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamRefereeConnection) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamRefereeConnectionImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("TeamRefereeConnection") + case "edges": + + out.Values[i] = ec._TeamRefereeConnection_edges(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "pageInfo": + + out.Values[i] = ec._TeamRefereeConnection_pageInfo(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var teamRefereeEdgeImplementors = []string{"TeamRefereeEdge"} + +func (ec *executionContext) _TeamRefereeEdge(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamRefereeEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamRefereeEdgeImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("TeamRefereeEdge") + case "node": + + out.Values[i] = ec._TeamRefereeEdge_node(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "cursor": + + out.Values[i] = ec._TeamRefereeEdge_cursor(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var teamRefereeHistoryImplementors = []string{"TeamRefereeHistory"} + +func (ec *executionContext) _TeamRefereeHistory(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamRefereeHistory) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamRefereeHistoryImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("TeamRefereeHistory") + case "teamId": + + out.Values[i] = ec._TeamRefereeHistory_teamId(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "joinedAt": + + out.Values[i] = ec._TeamRefereeHistory_joinedAt(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "joinedAtEpoch": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._TeamRefereeHistory_joinedAtEpoch(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var teamRefereeHistoryConnectionImplementors = []string{"TeamRefereeHistoryConnection"} -func (ec *executionContext) _TeamRefereeConnection(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamRefereeConnection) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, teamRefereeConnectionImplementors) +func (ec *executionContext) _TeamRefereeHistoryConnection(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamRefereeHistoryConnection) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamRefereeHistoryConnectionImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("TeamRefereeConnection") + out.Values[i] = graphql.MarshalString("TeamRefereeHistoryConnection") case "edges": - out.Values[i] = ec._TeamRefereeConnection_edges(ctx, field, obj) + out.Values[i] = ec._TeamRefereeHistoryConnection_edges(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "pageInfo": - out.Values[i] = ec._TeamRefereeConnection_pageInfo(ctx, field, obj) + out.Values[i] = ec._TeamRefereeHistoryConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ @@ -112418,26 +125699,26 @@ func (ec *executionContext) _TeamRefereeConnection(ctx context.Context, sel ast. return out } -var teamRefereeEdgeImplementors = []string{"TeamRefereeEdge"} +var teamRefereeHistoryEdgeImplementors = []string{"TeamRefereeHistoryEdge"} -func (ec *executionContext) _TeamRefereeEdge(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamRefereeEdge) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, teamRefereeEdgeImplementors) +func (ec *executionContext) _TeamRefereeHistoryEdge(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamRefereeHistoryEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamRefereeHistoryEdgeImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("TeamRefereeEdge") + out.Values[i] = graphql.MarshalString("TeamRefereeHistoryEdge") case "node": - out.Values[i] = ec._TeamRefereeEdge_node(ctx, field, obj) + out.Values[i] = ec._TeamRefereeHistoryEdge_node(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } case "cursor": - out.Values[i] = ec._TeamRefereeEdge_cursor(ctx, field, obj) + out.Values[i] = ec._TeamRefereeHistoryEdge_cursor(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ @@ -112453,31 +125734,52 @@ func (ec *executionContext) _TeamRefereeEdge(ctx context.Context, sel ast.Select return out } -var teamRefereeHistoryImplementors = []string{"TeamRefereeHistory"} +var teamStatisticsImplementors = []string{"TeamStatistics"} -func (ec *executionContext) _TeamRefereeHistory(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamRefereeHistory) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, teamRefereeHistoryImplementors) +func (ec *executionContext) _TeamStatistics(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamStatistics) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamStatisticsImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("TeamRefereeHistory") + out.Values[i] = graphql.MarshalString("TeamStatistics") case "teamId": - out.Values[i] = ec._TeamRefereeHistory_teamId(ctx, field, obj) + out.Values[i] = ec._TeamStatistics_teamId(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } - case "joinedAt": + case "totalQuantumVolume": - out.Values[i] = ec._TeamRefereeHistory_joinedAt(ctx, field, obj) + out.Values[i] = ec._TeamStatistics_totalQuantumVolume(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } - case "joinedAtEpoch": + case "quantumVolumes": + + out.Values[i] = ec._TeamStatistics_quantumVolumes(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "totalQuantumRewards": + + out.Values[i] = ec._TeamStatistics_totalQuantumRewards(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "quantumRewards": + + out.Values[i] = ec._TeamStatistics_quantumRewards(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "totalGamesPlayed": field := field innerFunc := func(ctx context.Context) (res graphql.Marshaler) { @@ -112486,7 +125788,7 @@ func (ec *executionContext) _TeamRefereeHistory(ctx context.Context, sel ast.Sel ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._TeamRefereeHistory_joinedAtEpoch(ctx, field, obj) + res = ec._TeamStatistics_totalGamesPlayed(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&invalids, 1) } @@ -112497,6 +125799,13 @@ func (ec *executionContext) _TeamRefereeHistory(ctx context.Context, sel ast.Sel return innerFunc(ctx) }) + case "gamesPlayed": + + out.Values[i] = ec._TeamStatistics_gamesPlayed(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -112508,26 +125817,26 @@ func (ec *executionContext) _TeamRefereeHistory(ctx context.Context, sel ast.Sel return out } -var teamRefereeHistoryConnectionImplementors = []string{"TeamRefereeHistoryConnection"} +var teamStatisticsEdgeImplementors = []string{"TeamStatisticsEdge"} -func (ec *executionContext) _TeamRefereeHistoryConnection(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamRefereeHistoryConnection) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, teamRefereeHistoryConnectionImplementors) +func (ec *executionContext) _TeamStatisticsEdge(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamStatisticsEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamStatisticsEdgeImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("TeamRefereeHistoryConnection") - case "edges": + out.Values[i] = graphql.MarshalString("TeamStatisticsEdge") + case "node": - out.Values[i] = ec._TeamRefereeHistoryConnection_edges(ctx, field, obj) + out.Values[i] = ec._TeamStatisticsEdge_node(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } - case "pageInfo": + case "cursor": - out.Values[i] = ec._TeamRefereeHistoryConnection_pageInfo(ctx, field, obj) + out.Values[i] = ec._TeamStatisticsEdge_cursor(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ @@ -112543,26 +125852,26 @@ func (ec *executionContext) _TeamRefereeHistoryConnection(ctx context.Context, s return out } -var teamRefereeHistoryEdgeImplementors = []string{"TeamRefereeHistoryEdge"} +var teamsStatisticsConnectionImplementors = []string{"TeamsStatisticsConnection"} -func (ec *executionContext) _TeamRefereeHistoryEdge(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamRefereeHistoryEdge) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, teamRefereeHistoryEdgeImplementors) +func (ec *executionContext) _TeamsStatisticsConnection(ctx context.Context, sel ast.SelectionSet, obj *v2.TeamsStatisticsConnection) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, teamsStatisticsConnectionImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("TeamRefereeHistoryEdge") - case "node": + out.Values[i] = graphql.MarshalString("TeamsStatisticsConnection") + case "edges": - out.Values[i] = ec._TeamRefereeHistoryEdge_node(ctx, field, obj) + out.Values[i] = ec._TeamsStatisticsConnection_edges(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ } - case "cursor": + case "pageInfo": - out.Values[i] = ec._TeamRefereeHistoryEdge_cursor(ctx, field, obj) + out.Values[i] = ec._TeamsStatisticsConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { invalids++ @@ -112606,6 +125915,34 @@ func (ec *executionContext) _TimeUpdate(ctx context.Context, sel ast.SelectionSe return out } +var totalTransferFeeDiscountImplementors = []string{"TotalTransferFeeDiscount"} + +func (ec *executionContext) _TotalTransferFeeDiscount(ctx context.Context, sel ast.SelectionSet, obj *v2.GetTotalTransferFeeDiscountResponse) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, totalTransferFeeDiscountImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("TotalTransferFeeDiscount") + case "totalDiscount": + + out.Values[i] = ec._TotalTransferFeeDiscount_totalDiscount(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var tradableInstrumentImplementors = []string{"TradableInstrument"} func (ec *executionContext) _TradableInstrument(ctx context.Context, sel ast.SelectionSet, obj *vega.TradableInstrument) graphql.Marshaler { @@ -113488,6 +126825,10 @@ func (ec *executionContext) _Transfer(ctx context.Context, sel ast.SelectionSet, out.Values[i] = ec._Transfer_reason(ctx, field, obj) + case "gameId": + + out.Values[i] = ec._Transfer_gameId(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -113908,6 +127249,13 @@ func (ec *executionContext) _UpdateInstrumentConfiguration(ctx context.Context, out.Values[i] = ec._UpdateInstrumentConfiguration_code(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "name": + + out.Values[i] = ec._UpdateInstrumentConfiguration_name(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } @@ -114089,6 +127437,18 @@ func (ec *executionContext) _UpdateMarketConfiguration(ctx context.Context, sel out.Values[i] = ec._UpdateMarketConfiguration_liquiditySLAParameters(ctx, field, obj) + case "liquidityFeeSettings": + + out.Values[i] = ec._UpdateMarketConfiguration_liquidityFeeSettings(ctx, field, obj) + + case "liquidationStrategy": + + out.Values[i] = ec._UpdateMarketConfiguration_liquidationStrategy(ctx, field, obj) + + case "markPriceConfiguration": + + out.Values[i] = ec._UpdateMarketConfiguration_markPriceConfiguration(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -114271,7 +127631,7 @@ func (ec *executionContext) _UpdateNetworkParameter(ctx context.Context, sel ast var updatePerpetualProductImplementors = []string{"UpdatePerpetualProduct", "UpdateProductConfiguration"} -func (ec *executionContext) _UpdatePerpetualProduct(ctx context.Context, sel ast.SelectionSet, obj *UpdatePerpetualProduct) graphql.Marshaler { +func (ec *executionContext) _UpdatePerpetualProduct(ctx context.Context, sel ast.SelectionSet, obj *vega.UpdatePerpetualProduct) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, updatePerpetualProductImplementors) out := graphql.NewFieldSet(fields) var invalids uint32 @@ -114332,6 +127692,27 @@ func (ec *executionContext) _UpdatePerpetualProduct(ctx context.Context, sel ast out.Values[i] = ec._UpdatePerpetualProduct_dataSourceSpecBinding(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "fundingRateScalingFactor": + + out.Values[i] = ec._UpdatePerpetualProduct_fundingRateScalingFactor(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "fundingRateLowerBound": + + out.Values[i] = ec._UpdatePerpetualProduct_fundingRateLowerBound(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "fundingRateUpperBound": + + out.Values[i] = ec._UpdatePerpetualProduct_fundingRateUpperBound(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } @@ -114592,6 +127973,10 @@ func (ec *executionContext) _UpdateSpotMarketConfiguration(ctx context.Context, return innerFunc(ctx) }) + case "liquidityFeeSettings": + + out.Values[i] = ec._UpdateSpotMarketConfiguration_liquidityFeeSettings(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -115649,6 +129034,20 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o // region ***************************** type.gotpl ***************************** +func (ec *executionContext) marshalNAbstractMarginLevels2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐAbstractMarginLevels(ctx context.Context, sel ast.SelectionSet, v AbstractMarginLevels) graphql.Marshaler { + return ec._AbstractMarginLevels(ctx, sel, &v) +} + +func (ec *executionContext) marshalNAbstractMarginLevels2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐAbstractMarginLevels(ctx context.Context, sel ast.SelectionSet, v *AbstractMarginLevels) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._AbstractMarginLevels(ctx, sel, v) +} + func (ec *executionContext) marshalNAccountBalance2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐAccountBalance(ctx context.Context, sel ast.SelectionSet, v *v2.AccountBalance) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { @@ -115934,6 +129333,44 @@ func (ec *executionContext) marshalNAuctionTrigger2codeᚗvegaprotocolᚗioᚋve return res } +func (ec *executionContext) marshalNBatchProposalTermsChange2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐBatchProposalTermsChange(ctx context.Context, sel ast.SelectionSet, v []*vega.BatchProposalTermsChange) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalOBatchProposalTermsChange2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐBatchProposalTermsChange(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + return ret +} + func (ec *executionContext) marshalNBenefitTier2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐBenefitTierᚄ(ctx context.Context, sel ast.SelectionSet, v []*vega.BenefitTier) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup @@ -116098,6 +129535,50 @@ func (ec *executionContext) marshalNCandle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋ return ec._Candle(ctx, sel, v) } +func (ec *executionContext) marshalNCollateralIncreaseEstimate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐCollateralIncreaseEstimate(ctx context.Context, sel ast.SelectionSet, v *v2.CollateralIncreaseEstimate) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._CollateralIncreaseEstimate(ctx, sel, v) +} + +func (ec *executionContext) marshalNCompositePriceConfiguration2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceConfiguration(ctx context.Context, sel ast.SelectionSet, v vega.CompositePriceConfiguration) graphql.Marshaler { + return ec._CompositePriceConfiguration(ctx, sel, &v) +} + +func (ec *executionContext) marshalNCompositePriceConfiguration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceConfiguration(ctx context.Context, sel ast.SelectionSet, v *vega.CompositePriceConfiguration) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._CompositePriceConfiguration(ctx, sel, v) +} + +func (ec *executionContext) marshalNCompositePriceSource2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceSource(ctx context.Context, sel ast.SelectionSet, v *vega.CompositePriceSource) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._CompositePriceSource(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNCompositePriceType2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐCompositePriceType(ctx context.Context, v interface{}) (CompositePriceType, error) { + var res CompositePriceType + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNCompositePriceType2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐCompositePriceType(ctx context.Context, sel ast.SelectionSet, v CompositePriceType) graphql.Marshaler { + return v +} + func (ec *executionContext) marshalNCondition2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐCondition(ctx context.Context, sel ast.SelectionSet, v []*Condition) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup @@ -116225,11 +129706,7 @@ func (ec *executionContext) marshalNDataSourceSpec2ᚖcodeᚗvegaprotocolᚗio return ec._DataSourceSpec(ctx, sel, v) } -func (ec *executionContext) marshalNDataSourceSpecPerpetualBinding2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpecPerpetualBinding(ctx context.Context, sel ast.SelectionSet, v DataSourceSpecPerpetualBinding) graphql.Marshaler { - return ec._DataSourceSpecPerpetualBinding(ctx, sel, &v) -} - -func (ec *executionContext) marshalNDataSourceSpecPerpetualBinding2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐDataSourceSpecPerpetualBinding(ctx context.Context, sel ast.SelectionSet, v *DataSourceSpecPerpetualBinding) graphql.Marshaler { +func (ec *executionContext) marshalNDataSourceSpecPerpetualBinding2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceSpecToPerpetualBinding(ctx context.Context, sel ast.SelectionSet, v *vega.DataSourceSpecToPerpetualBinding) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -116696,7 +130173,109 @@ func (ec *executionContext) marshalNFundingPaymentEdge2ᚕᚖcodeᚗvegaprotocol if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNFundingPaymentEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPaymentEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNFundingPaymentEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPaymentEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNFundingPaymentEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPaymentEdge(ctx context.Context, sel ast.SelectionSet, v *v2.FundingPaymentEdge) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._FundingPaymentEdge(ctx, sel, v) +} + +func (ec *executionContext) marshalNFundingPeriod2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriod(ctx context.Context, sel ast.SelectionSet, v *v1.FundingPeriod) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._FundingPeriod(ctx, sel, v) +} + +func (ec *executionContext) marshalNFundingPeriodConnection2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodConnection(ctx context.Context, sel ast.SelectionSet, v v2.FundingPeriodConnection) graphql.Marshaler { + return ec._FundingPeriodConnection(ctx, sel, &v) +} + +func (ec *executionContext) marshalNFundingPeriodConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodConnection(ctx context.Context, sel ast.SelectionSet, v *v2.FundingPeriodConnection) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._FundingPeriodConnection(ctx, sel, v) +} + +func (ec *executionContext) marshalNFundingPeriodDataPoint2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriodDataPoint(ctx context.Context, sel ast.SelectionSet, v *v1.FundingPeriodDataPoint) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._FundingPeriodDataPoint(ctx, sel, v) +} + +func (ec *executionContext) marshalNFundingPeriodDataPointConnection2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointConnection(ctx context.Context, sel ast.SelectionSet, v v2.FundingPeriodDataPointConnection) graphql.Marshaler { + return ec._FundingPeriodDataPointConnection(ctx, sel, &v) +} + +func (ec *executionContext) marshalNFundingPeriodDataPointConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointConnection(ctx context.Context, sel ast.SelectionSet, v *v2.FundingPeriodDataPointConnection) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._FundingPeriodDataPointConnection(ctx, sel, v) +} + +func (ec *executionContext) marshalNFundingPeriodDataPointEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*v2.FundingPeriodDataPointEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNFundingPeriodDataPointEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -116716,65 +130295,17 @@ func (ec *executionContext) marshalNFundingPaymentEdge2ᚕᚖcodeᚗvegaprotocol return ret } -func (ec *executionContext) marshalNFundingPaymentEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPaymentEdge(ctx context.Context, sel ast.SelectionSet, v *v2.FundingPaymentEdge) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") - } - return graphql.Null - } - return ec._FundingPaymentEdge(ctx, sel, v) -} - -func (ec *executionContext) marshalNFundingPeriod2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriod(ctx context.Context, sel ast.SelectionSet, v *v1.FundingPeriod) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") - } - return graphql.Null - } - return ec._FundingPeriod(ctx, sel, v) -} - -func (ec *executionContext) marshalNFundingPeriodConnection2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodConnection(ctx context.Context, sel ast.SelectionSet, v v2.FundingPeriodConnection) graphql.Marshaler { - return ec._FundingPeriodConnection(ctx, sel, &v) -} - -func (ec *executionContext) marshalNFundingPeriodConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodConnection(ctx context.Context, sel ast.SelectionSet, v *v2.FundingPeriodConnection) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") - } - return graphql.Null - } - return ec._FundingPeriodConnection(ctx, sel, v) -} - -func (ec *executionContext) marshalNFundingPeriodDataPoint2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriodDataPoint(ctx context.Context, sel ast.SelectionSet, v *v1.FundingPeriodDataPoint) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") - } - return graphql.Null - } - return ec._FundingPeriodDataPoint(ctx, sel, v) -} - -func (ec *executionContext) marshalNFundingPeriodDataPointConnection2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointConnection(ctx context.Context, sel ast.SelectionSet, v v2.FundingPeriodDataPointConnection) graphql.Marshaler { - return ec._FundingPeriodDataPointConnection(ctx, sel, &v) -} - -func (ec *executionContext) marshalNFundingPeriodDataPointConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointConnection(ctx context.Context, sel ast.SelectionSet, v *v2.FundingPeriodDataPointConnection) graphql.Marshaler { +func (ec *executionContext) marshalNFundingPeriodDataPointEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointEdge(ctx context.Context, sel ast.SelectionSet, v *v2.FundingPeriodDataPointEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } - return ec._FundingPeriodDataPointConnection(ctx, sel, v) + return ec._FundingPeriodDataPointEdge(ctx, sel, v) } -func (ec *executionContext) marshalNFundingPeriodDataPointEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*v2.FundingPeriodDataPointEdge) graphql.Marshaler { +func (ec *executionContext) marshalNFundingPeriodEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*v2.FundingPeriodEdge) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -116798,7 +130329,7 @@ func (ec *executionContext) marshalNFundingPeriodDataPointEdge2ᚕᚖcodeᚗvega if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNFundingPeriodDataPointEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNFundingPeriodEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -116818,17 +130349,37 @@ func (ec *executionContext) marshalNFundingPeriodDataPointEdge2ᚕᚖcodeᚗvega return ret } -func (ec *executionContext) marshalNFundingPeriodDataPointEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodDataPointEdge(ctx context.Context, sel ast.SelectionSet, v *v2.FundingPeriodDataPointEdge) graphql.Marshaler { +func (ec *executionContext) marshalNFundingPeriodEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodEdge(ctx context.Context, sel ast.SelectionSet, v *v2.FundingPeriodEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } - return ec._FundingPeriodDataPointEdge(ctx, sel, v) + return ec._FundingPeriodEdge(ctx, sel, v) } -func (ec *executionContext) marshalNFundingPeriodEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*v2.FundingPeriodEdge) graphql.Marshaler { +func (ec *executionContext) marshalNGame2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGame(ctx context.Context, sel ast.SelectionSet, v *v2.Game) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Game(ctx, sel, v) +} + +func (ec *executionContext) marshalNGameEntity2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐGameEntity(ctx context.Context, sel ast.SelectionSet, v GameEntity) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._GameEntity(ctx, sel, v) +} + +func (ec *executionContext) marshalNGameEntity2ᚕcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐGameEntityᚄ(ctx context.Context, sel ast.SelectionSet, v []GameEntity) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -116852,7 +130403,7 @@ func (ec *executionContext) marshalNFundingPeriodEdge2ᚕᚖcodeᚗvegaprotocol if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNFundingPeriodEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNGameEntity2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐGameEntity(ctx, sel, v[i]) } if isLen1 { f(i) @@ -116872,14 +130423,18 @@ func (ec *executionContext) marshalNFundingPeriodEdge2ᚕᚖcodeᚗvegaprotocol return ret } -func (ec *executionContext) marshalNFundingPeriodEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFundingPeriodEdge(ctx context.Context, sel ast.SelectionSet, v *v2.FundingPeriodEdge) graphql.Marshaler { +func (ec *executionContext) marshalNGamesConnection2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGamesConnection(ctx context.Context, sel ast.SelectionSet, v v2.GamesConnection) graphql.Marshaler { + return ec._GamesConnection(ctx, sel, &v) +} + +func (ec *executionContext) marshalNGamesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGamesConnection(ctx context.Context, sel ast.SelectionSet, v *v2.GamesConnection) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } - return ec._FundingPeriodEdge(ctx, sel, v) + return ec._GamesConnection(ctx, sel, v) } func (ec *executionContext) marshalNGovernanceTransferKind2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐGovernanceTransferKind(ctx context.Context, sel ast.SelectionSet, v GovernanceTransferKind) graphql.Marshaler { @@ -116963,6 +130518,60 @@ func (ec *executionContext) marshalNID2ᚕstringᚄ(ctx context.Context, sel ast return ret } +func (ec *executionContext) marshalNIndividualGameEntity2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐIndividualGameEntityᚄ(ctx context.Context, sel ast.SelectionSet, v []*IndividualGameEntity) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNIndividualGameEntity2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐIndividualGameEntity(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNIndividualGameEntity2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐIndividualGameEntity(ctx context.Context, sel ast.SelectionSet, v *IndividualGameEntity) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._IndividualGameEntity(ctx, sel, v) +} + func (ec *executionContext) marshalNInstrument2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐInstrument(ctx context.Context, sel ast.SelectionSet, v *vega.Instrument) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { @@ -117164,6 +130773,21 @@ func (ec *executionContext) marshalNLiquidationPrice2ᚖcodeᚗvegaprotocolᚗio return ec._LiquidationPrice(ctx, sel, v) } +func (ec *executionContext) unmarshalNLiquidityFeeMethod2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityFeeSettings_Method(ctx context.Context, v interface{}) (vega.LiquidityFeeSettings_Method, error) { + res, err := marshallers.UnmarshalLiquidityFeeMethod(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNLiquidityFeeMethod2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityFeeSettings_Method(ctx context.Context, sel ast.SelectionSet, v vega.LiquidityFeeSettings_Method) graphql.Marshaler { + res := marshallers.MarshalLiquidityFeeMethod(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + func (ec *executionContext) marshalNLiquidityMonitoringParameters2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐLiquidityMonitoringParameters(ctx context.Context, sel ast.SelectionSet, v LiquidityMonitoringParameters) graphql.Marshaler { return ec._LiquidityMonitoringParameters(ctx, sel, &v) } @@ -117493,6 +131117,21 @@ func (ec *executionContext) marshalNMarginLevelsUpdate2ᚖcodeᚗvegaprotocolᚗ return ec._MarginLevelsUpdate(ctx, sel, v) } +func (ec *executionContext) unmarshalNMarginMode2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginMode(ctx context.Context, v interface{}) (vega.MarginMode, error) { + res, err := marshallers.UnmarshalMarginMode(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMarginMode2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarginMode(ctx context.Context, sel ast.SelectionSet, v vega.MarginMode) graphql.Marshaler { + res := marshallers.MarshalMarginMode(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + func (ec *executionContext) marshalNMarket2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMarket(ctx context.Context, sel ast.SelectionSet, v vega.Market) graphql.Marshaler { return ec._Market(ctx, sel, &v) } @@ -117663,6 +131302,60 @@ func (ec *executionContext) marshalNMarketUpdateType2codeᚗvegaprotocolᚗioᚋ return v } +func (ec *executionContext) marshalNMetadata2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMetadataᚄ(ctx context.Context, sel ast.SelectionSet, v []*vega.Metadata) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMetadata2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMetadata(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNMetadata2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐMetadata(ctx context.Context, sel ast.SelectionSet, v *vega.Metadata) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Metadata(ctx, sel, v) +} + func (ec *executionContext) marshalNNetworkParameter2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐNetworkParameter(ctx context.Context, sel ast.SelectionSet, v vega.NetworkParameter) graphql.Marshaler { return ec._NetworkParameter(ctx, sel, &v) } @@ -118076,7 +131769,7 @@ func (ec *executionContext) marshalNOrderEstimate2ᚖcodeᚗvegaprotocolᚗioᚋ return ec._OrderEstimate(ctx, sel, v) } -func (ec *executionContext) unmarshalNOrderInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐOrderInfo(ctx context.Context, v interface{}) (*OrderInfo, error) { +func (ec *executionContext) unmarshalNOrderInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOrderInfo(ctx context.Context, v interface{}) (*v2.OrderInfo, error) { res, err := ec.unmarshalInputOrderInfo(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } @@ -118242,7 +131935,61 @@ func (ec *executionContext) marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗio if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNPartyAmount2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmount(ctx, sel, v[i]) + ret[i] = ec.marshalNPartyAmount2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmount(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNPartyAmount2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmount(ctx context.Context, sel ast.SelectionSet, v *v1.PartyAmount) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._PartyAmount(ctx, sel, v) +} + +func (ec *executionContext) marshalNPartyEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*v2.PartyEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNPartyEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -118262,17 +132009,47 @@ func (ec *executionContext) marshalNPartyAmount2ᚕᚖcodeᚗvegaprotocolᚗio return ret } -func (ec *executionContext) marshalNPartyAmount2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyAmount(ctx context.Context, sel ast.SelectionSet, v *v1.PartyAmount) graphql.Marshaler { +func (ec *executionContext) marshalNPartyEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyEdge(ctx context.Context, sel ast.SelectionSet, v *v2.PartyEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } - return ec._PartyAmount(ctx, sel, v) + return ec._PartyEdge(ctx, sel, v) } -func (ec *executionContext) marshalNPartyEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*v2.PartyEdge) graphql.Marshaler { +func (ec *executionContext) marshalNPartyLockedBalance2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyLockedBalance(ctx context.Context, sel ast.SelectionSet, v *v1.PartyLockedBalance) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._PartyLockedBalance(ctx, sel, v) +} + +func (ec *executionContext) marshalNPartyMarginMode2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyMarginMode(ctx context.Context, sel ast.SelectionSet, v *v2.PartyMarginMode) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._PartyMarginMode(ctx, sel, v) +} + +func (ec *executionContext) marshalNPartyProfile2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐPartyProfile(ctx context.Context, sel ast.SelectionSet, v *vega.PartyProfile) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._PartyProfile(ctx, sel, v) +} + +func (ec *executionContext) marshalNPartyProfileEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyProfileEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*v2.PartyProfileEdge) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -118296,7 +132073,7 @@ func (ec *executionContext) marshalNPartyEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋv if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNPartyEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNPartyProfileEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyProfileEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -118316,24 +132093,14 @@ func (ec *executionContext) marshalNPartyEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋv return ret } -func (ec *executionContext) marshalNPartyEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyEdge(ctx context.Context, sel ast.SelectionSet, v *v2.PartyEdge) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") - } - return graphql.Null - } - return ec._PartyEdge(ctx, sel, v) -} - -func (ec *executionContext) marshalNPartyLockedBalance2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyLockedBalance(ctx context.Context, sel ast.SelectionSet, v *v1.PartyLockedBalance) graphql.Marshaler { +func (ec *executionContext) marshalNPartyProfileEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyProfileEdge(ctx context.Context, sel ast.SelectionSet, v *v2.PartyProfileEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } - return ec._PartyLockedBalance(ctx, sel, v) + return ec._PartyProfileEdge(ctx, sel, v) } func (ec *executionContext) marshalNPartyVestingBalance2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyVestingBalance(ctx context.Context, sel ast.SelectionSet, v *v1.PartyVestingBalance) graphql.Marshaler { @@ -118717,6 +132484,114 @@ func (ec *executionContext) marshalNProtocolUpgradeProposalStatus2codeᚗvegapro return res } +func (ec *executionContext) marshalNQuantumRewardsPerEpoch2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐQuantumRewardsPerEpochᚄ(ctx context.Context, sel ast.SelectionSet, v []*v2.QuantumRewardsPerEpoch) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNQuantumRewardsPerEpoch2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐQuantumRewardsPerEpoch(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNQuantumRewardsPerEpoch2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐQuantumRewardsPerEpoch(ctx context.Context, sel ast.SelectionSet, v *v2.QuantumRewardsPerEpoch) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._QuantumRewardsPerEpoch(ctx, sel, v) +} + +func (ec *executionContext) marshalNQuantumVolumesPerEpoch2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐQuantumVolumesPerEpochᚄ(ctx context.Context, sel ast.SelectionSet, v []*v2.QuantumVolumesPerEpoch) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNQuantumVolumesPerEpoch2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐQuantumVolumesPerEpoch(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNQuantumVolumesPerEpoch2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐQuantumVolumesPerEpoch(ctx context.Context, sel ast.SelectionSet, v *v2.QuantumVolumesPerEpoch) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._QuantumVolumesPerEpoch(ctx, sel, v) +} + func (ec *executionContext) marshalNRankingScore2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐRankingScore(ctx context.Context, sel ast.SelectionSet, v *vega.RankingScore) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { @@ -119209,6 +133084,21 @@ func (ec *executionContext) marshalNStopOrderExpiryStrategy2codeᚗvegaprotocol return res } +func (ec *executionContext) unmarshalNStopOrderSizeOverrideSetting2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStopOrder_SizeOverrideSetting(ctx context.Context, v interface{}) (vega.StopOrder_SizeOverrideSetting, error) { + res, err := marshallers.UnmarshalStopOrderSizeOverrideSetting(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNStopOrderSizeOverrideSetting2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStopOrder_SizeOverrideSetting(ctx context.Context, sel ast.SelectionSet, v vega.StopOrder_SizeOverrideSetting) graphql.Marshaler { + res := marshallers.MarshalStopOrderSizeOverrideSetting(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + func (ec *executionContext) unmarshalNStopOrderStatus2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐStopOrder_Status(ctx context.Context, v interface{}) (vega.StopOrder_Status, error) { res, err := marshallers.UnmarshalStopOrderStatus(v) return res, graphql.ErrorOnPath(ctx, err) @@ -119459,6 +133349,80 @@ func (ec *executionContext) marshalNTeamEdge2ᚖcodeᚗvegaprotocolᚗioᚋvega return ec._TeamEdge(ctx, sel, v) } +func (ec *executionContext) marshalNTeamMemberStatistics2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamMemberStatistics(ctx context.Context, sel ast.SelectionSet, v *v2.TeamMemberStatistics) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._TeamMemberStatistics(ctx, sel, v) +} + +func (ec *executionContext) marshalNTeamMemberStatisticsEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamMemberStatisticsEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*v2.TeamMemberStatisticsEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNTeamMemberStatisticsEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamMemberStatisticsEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNTeamMemberStatisticsEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamMemberStatisticsEdge(ctx context.Context, sel ast.SelectionSet, v *v2.TeamMemberStatisticsEdge) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._TeamMemberStatisticsEdge(ctx, sel, v) +} + +func (ec *executionContext) marshalNTeamParticipation2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTeamParticipation(ctx context.Context, sel ast.SelectionSet, v *TeamParticipation) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._TeamParticipation(ctx, sel, v) +} + func (ec *executionContext) marshalNTeamReferee2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamReferee(ctx context.Context, sel ast.SelectionSet, v *v2.TeamReferee) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { @@ -119493,7 +133457,71 @@ func (ec *executionContext) marshalNTeamRefereeEdge2ᚕᚖcodeᚗvegaprotocolᚗ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTeamRefereeEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNTeamRefereeEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNTeamRefereeEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeEdge(ctx context.Context, sel ast.SelectionSet, v *v2.TeamRefereeEdge) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._TeamRefereeEdge(ctx, sel, v) +} + +func (ec *executionContext) marshalNTeamRefereeHistory2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistory(ctx context.Context, sel ast.SelectionSet, v *v2.TeamRefereeHistory) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._TeamRefereeHistory(ctx, sel, v) +} + +func (ec *executionContext) marshalNTeamRefereeHistoryEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistoryEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*v2.TeamRefereeHistoryEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNTeamRefereeHistoryEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistoryEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -119513,27 +133541,27 @@ func (ec *executionContext) marshalNTeamRefereeEdge2ᚕᚖcodeᚗvegaprotocolᚗ return ret } -func (ec *executionContext) marshalNTeamRefereeEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeEdge(ctx context.Context, sel ast.SelectionSet, v *v2.TeamRefereeEdge) graphql.Marshaler { +func (ec *executionContext) marshalNTeamRefereeHistoryEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistoryEdge(ctx context.Context, sel ast.SelectionSet, v *v2.TeamRefereeHistoryEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } - return ec._TeamRefereeEdge(ctx, sel, v) + return ec._TeamRefereeHistoryEdge(ctx, sel, v) } -func (ec *executionContext) marshalNTeamRefereeHistory2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistory(ctx context.Context, sel ast.SelectionSet, v *v2.TeamRefereeHistory) graphql.Marshaler { +func (ec *executionContext) marshalNTeamStatistics2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamStatistics(ctx context.Context, sel ast.SelectionSet, v *v2.TeamStatistics) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } - return ec._TeamRefereeHistory(ctx, sel, v) + return ec._TeamStatistics(ctx, sel, v) } -func (ec *executionContext) marshalNTeamRefereeHistoryEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistoryEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*v2.TeamRefereeHistoryEdge) graphql.Marshaler { +func (ec *executionContext) marshalNTeamStatisticsEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamStatisticsEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*v2.TeamStatisticsEdge) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -119557,7 +133585,7 @@ func (ec *executionContext) marshalNTeamRefereeHistoryEdge2ᚕᚖcodeᚗvegaprot if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTeamRefereeHistoryEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistoryEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNTeamStatisticsEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamStatisticsEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -119577,14 +133605,14 @@ func (ec *executionContext) marshalNTeamRefereeHistoryEdge2ᚕᚖcodeᚗvegaprot return ret } -func (ec *executionContext) marshalNTeamRefereeHistoryEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeHistoryEdge(ctx context.Context, sel ast.SelectionSet, v *v2.TeamRefereeHistoryEdge) graphql.Marshaler { +func (ec *executionContext) marshalNTeamStatisticsEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamStatisticsEdge(ctx context.Context, sel ast.SelectionSet, v *v2.TeamStatisticsEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } - return ec._TeamRefereeHistoryEdge(ctx, sel, v) + return ec._TeamStatisticsEdge(ctx, sel, v) } func (ec *executionContext) unmarshalNTimestamp2int64(ctx context.Context, v interface{}) (int64, error) { @@ -120715,6 +134743,20 @@ func (ec *executionContext) marshalOAuctionTrigger2codeᚗvegaprotocolᚗioᚋve return res } +func (ec *executionContext) marshalOBatchProposalTerms2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐBatchProposalTerms(ctx context.Context, sel ast.SelectionSet, v *vega.BatchProposalTerms) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._BatchProposalTerms(ctx, sel, v) +} + +func (ec *executionContext) marshalOBatchProposalTermsChange2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐBatchProposalTermsChange(ctx context.Context, sel ast.SelectionSet, v *vega.BatchProposalTermsChange) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._BatchProposalTermsChange(ctx, sel, v) +} + func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { res, err := graphql.UnmarshalBoolean(v) return res, graphql.ErrorOnPath(ctx, err) @@ -120843,6 +134885,67 @@ func (ec *executionContext) marshalOCandleEdge2ᚖcodeᚗvegaprotocolᚗioᚋveg return ec._CandleEdge(ctx, sel, v) } +func (ec *executionContext) marshalOCompositePriceConfiguration2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceConfiguration(ctx context.Context, sel ast.SelectionSet, v *vega.CompositePriceConfiguration) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._CompositePriceConfiguration(ctx, sel, v) +} + +func (ec *executionContext) marshalOCompositePriceSource2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceSourceᚄ(ctx context.Context, sel ast.SelectionSet, v []*vega.CompositePriceSource) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNCompositePriceSource2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceSource(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalOCompositePriceState2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐCompositePriceState(ctx context.Context, sel ast.SelectionSet, v *vega.CompositePriceState) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._CompositePriceState(ctx, sel, v) +} + func (ec *executionContext) marshalOCondition2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐConditionᚄ(ctx context.Context, sel ast.SelectionSet, v []*Condition) graphql.Marshaler { if v == nil { return graphql.Null @@ -120958,6 +135061,54 @@ func (ec *executionContext) marshalOCurrentReferralProgram2ᚖcodeᚗvegaprotoco return ec._CurrentReferralProgram(ctx, sel, v) } +func (ec *executionContext) marshalODataSourceDefinition2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx context.Context, sel ast.SelectionSet, v []*vega.DataSourceDefinition) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalODataSourceDefinition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + return ret +} + +func (ec *executionContext) marshalODataSourceDefinition2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐDataSourceDefinition(ctx context.Context, sel ast.SelectionSet, v *vega.DataSourceDefinition) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._DataSourceDefinition(ctx, sel, v) +} + func (ec *executionContext) unmarshalODateRange2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐDateRange(ctx context.Context, v interface{}) (*v2.DateRange, error) { if v == nil { return nil, nil @@ -121371,6 +135522,22 @@ func (ec *executionContext) marshalOERC20MultiSigSignerRemovedBundleEdge2ᚖcode return ec._ERC20MultiSigSignerRemovedBundleEdge(ctx, sel, v) } +func (ec *executionContext) unmarshalOEntityScope2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEntityScope(ctx context.Context, v interface{}) (*vega.EntityScope, error) { + if v == nil { + return nil, nil + } + res, err := marshallers.UnmarshalEntityScope(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOEntityScope2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEntityScope(ctx context.Context, sel ast.SelectionSet, v *vega.EntityScope) graphql.Marshaler { + if v == nil { + return graphql.Null + } + res := marshallers.MarshalEntityScope(*v) + return res +} + func (ec *executionContext) marshalOEpoch2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐEpoch(ctx context.Context, sel ast.SelectionSet, v *vega.Epoch) graphql.Marshaler { if v == nil { return graphql.Null @@ -121419,7 +135586,131 @@ func (ec *executionContext) marshalOEpochRewardSummaryEdge2ᚕᚖcodeᚗvegaprot if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalOEpochRewardSummaryEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEpochRewardSummaryEdge(ctx, sel, v[i]) + ret[i] = ec.marshalOEpochRewardSummaryEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEpochRewardSummaryEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + return ret +} + +func (ec *executionContext) marshalOEpochRewardSummaryEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEpochRewardSummaryEdge(ctx context.Context, sel ast.SelectionSet, v *v2.EpochRewardSummaryEdge) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._EpochRewardSummaryEdge(ctx, sel, v) +} + +func (ec *executionContext) marshalOErc20ListAssetBundle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐErc20ListAssetBundle(ctx context.Context, sel ast.SelectionSet, v *Erc20ListAssetBundle) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Erc20ListAssetBundle(ctx, sel, v) +} + +func (ec *executionContext) marshalOErc20WithdrawalApproval2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐErc20WithdrawalApproval(ctx context.Context, sel ast.SelectionSet, v *Erc20WithdrawalApproval) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Erc20WithdrawalApproval(ctx, sel, v) +} + +func (ec *executionContext) marshalOEstimatedTransferFee2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEstimateTransferFeeResponse(ctx context.Context, sel ast.SelectionSet, v *v2.EstimateTransferFeeResponse) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._EstimatedTransferFee(ctx, sel, v) +} + +func (ec *executionContext) marshalOEthereumKeyRotation2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐEthereumKeyRotation(ctx context.Context, sel ast.SelectionSet, v []*v1.EthereumKeyRotation) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalOEthereumKeyRotation2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐEthereumKeyRotation(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + return ret +} + +func (ec *executionContext) marshalOEthereumKeyRotation2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐEthereumKeyRotation(ctx context.Context, sel ast.SelectionSet, v *v1.EthereumKeyRotation) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._EthereumKeyRotation(ctx, sel, v) +} + +func (ec *executionContext) marshalOFeesStats2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFeesStats(ctx context.Context, sel ast.SelectionSet, v *v1.FeesStats) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._FeesStats(ctx, sel, v) +} + +func (ec *executionContext) marshalOFeesStatsForParty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFeesStatsForParty(ctx context.Context, sel ast.SelectionSet, v []*v2.FeesStatsForParty) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalOFeesStatsForParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFeesStatsForParty(ctx, sel, v[i]) } if isLen1 { f(i) @@ -121433,28 +135724,14 @@ func (ec *executionContext) marshalOEpochRewardSummaryEdge2ᚕᚖcodeᚗvegaprot return ret } -func (ec *executionContext) marshalOEpochRewardSummaryEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐEpochRewardSummaryEdge(ctx context.Context, sel ast.SelectionSet, v *v2.EpochRewardSummaryEdge) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._EpochRewardSummaryEdge(ctx, sel, v) -} - -func (ec *executionContext) marshalOErc20ListAssetBundle2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐErc20ListAssetBundle(ctx context.Context, sel ast.SelectionSet, v *Erc20ListAssetBundle) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Erc20ListAssetBundle(ctx, sel, v) -} - -func (ec *executionContext) marshalOErc20WithdrawalApproval2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐErc20WithdrawalApproval(ctx context.Context, sel ast.SelectionSet, v *Erc20WithdrawalApproval) graphql.Marshaler { +func (ec *executionContext) marshalOFeesStatsForParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFeesStatsForParty(ctx context.Context, sel ast.SelectionSet, v *v2.FeesStatsForParty) graphql.Marshaler { if v == nil { return graphql.Null } - return ec._Erc20WithdrawalApproval(ctx, sel, v) + return ec._FeesStatsForParty(ctx, sel, v) } -func (ec *executionContext) marshalOEthereumKeyRotation2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐEthereumKeyRotation(ctx context.Context, sel ast.SelectionSet, v []*v1.EthereumKeyRotation) graphql.Marshaler { +func (ec *executionContext) marshalOFilter2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐFilterᚄ(ctx context.Context, sel ast.SelectionSet, v []*Filter) graphql.Marshaler { if v == nil { return graphql.Null } @@ -121481,7 +135758,7 @@ func (ec *executionContext) marshalOEthereumKeyRotation2ᚕᚖcodeᚗvegaprotoco if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalOEthereumKeyRotation2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐEthereumKeyRotation(ctx, sel, v[i]) + ret[i] = ec.marshalNFilter2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐFilter(ctx, sel, v[i]) } if isLen1 { f(i) @@ -121492,72 +135769,55 @@ func (ec *executionContext) marshalOEthereumKeyRotation2ᚕᚖcodeᚗvegaprotoco } wg.Wait() + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) marshalOEthereumKeyRotation2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐEthereumKeyRotation(ctx context.Context, sel ast.SelectionSet, v *v1.EthereumKeyRotation) graphql.Marshaler { +func (ec *executionContext) unmarshalOFloat2ᚖfloat64(ctx context.Context, v interface{}) (*float64, error) { if v == nil { - return graphql.Null + return nil, nil } - return ec._EthereumKeyRotation(ctx, sel, v) + res, err := graphql.UnmarshalFloatContext(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOFeesStats2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFeesStats(ctx context.Context, sel ast.SelectionSet, v *v1.FeesStats) graphql.Marshaler { +func (ec *executionContext) marshalOFloat2ᚖfloat64(ctx context.Context, sel ast.SelectionSet, v *float64) graphql.Marshaler { if v == nil { return graphql.Null } - return ec._FeesStats(ctx, sel, v) + res := graphql.MarshalFloatContext(*v) + return graphql.WrapContextMarshaler(ctx, res) } -func (ec *executionContext) marshalOFeesStatsForParty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFeesStatsForParty(ctx context.Context, sel ast.SelectionSet, v []*v2.FeesStatsForParty) graphql.Marshaler { +func (ec *executionContext) unmarshalOFundingPeriodDataPointSource2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriodDataPoint_Source(ctx context.Context, v interface{}) (*v1.FundingPeriodDataPoint_Source, error) { if v == nil { - return graphql.Null - } - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) + return nil, nil } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalOFeesStatsForParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFeesStatsForParty(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } + res, err := marshallers.UnmarshalFundingPeriodDataPointSource(v) + return &res, graphql.ErrorOnPath(ctx, err) +} +func (ec *executionContext) marshalOFundingPeriodDataPointSource2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriodDataPoint_Source(ctx context.Context, sel ast.SelectionSet, v *v1.FundingPeriodDataPoint_Source) graphql.Marshaler { + if v == nil { + return graphql.Null } - wg.Wait() - - return ret + res := marshallers.MarshalFundingPeriodDataPointSource(*v) + return res } -func (ec *executionContext) marshalOFeesStatsForParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐFeesStatsForParty(ctx context.Context, sel ast.SelectionSet, v *v2.FeesStatsForParty) graphql.Marshaler { +func (ec *executionContext) marshalOFutureProduct2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐFutureProduct(ctx context.Context, sel ast.SelectionSet, v *vega.FutureProduct) graphql.Marshaler { if v == nil { return graphql.Null } - return ec._FeesStatsForParty(ctx, sel, v) + return ec._FutureProduct(ctx, sel, v) } -func (ec *executionContext) marshalOFilter2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐFilterᚄ(ctx context.Context, sel ast.SelectionSet, v []*Filter) graphql.Marshaler { +func (ec *executionContext) marshalOGameEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGameEdge(ctx context.Context, sel ast.SelectionSet, v []*v2.GameEdge) graphql.Marshaler { if v == nil { return graphql.Null } @@ -121584,7 +135844,7 @@ func (ec *executionContext) marshalOFilter2ᚕᚖcodeᚗvegaprotocolᚗioᚋvega if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNFilter2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐFilter(ctx, sel, v[i]) + ret[i] = ec.marshalOGameEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGameEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -121595,52 +135855,14 @@ func (ec *executionContext) marshalOFilter2ᚕᚖcodeᚗvegaprotocolᚗioᚋvega } wg.Wait() - for _, e := range ret { - if e == graphql.Null { - return graphql.Null - } - } - return ret } -func (ec *executionContext) unmarshalOFloat2ᚖfloat64(ctx context.Context, v interface{}) (*float64, error) { - if v == nil { - return nil, nil - } - res, err := graphql.UnmarshalFloatContext(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOFloat2ᚖfloat64(ctx context.Context, sel ast.SelectionSet, v *float64) graphql.Marshaler { +func (ec *executionContext) marshalOGameEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGameEdge(ctx context.Context, sel ast.SelectionSet, v *v2.GameEdge) graphql.Marshaler { if v == nil { return graphql.Null } - res := graphql.MarshalFloatContext(*v) - return graphql.WrapContextMarshaler(ctx, res) -} - -func (ec *executionContext) unmarshalOFundingPeriodDataPointSource2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriodDataPoint_Source(ctx context.Context, v interface{}) (*v1.FundingPeriodDataPoint_Source, error) { - if v == nil { - return nil, nil - } - res, err := marshallers.UnmarshalFundingPeriodDataPointSource(v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOFundingPeriodDataPointSource2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐFundingPeriodDataPoint_Source(ctx context.Context, sel ast.SelectionSet, v *v1.FundingPeriodDataPoint_Source) graphql.Marshaler { - if v == nil { - return graphql.Null - } - res := marshallers.MarshalFundingPeriodDataPointSource(*v) - return res -} - -func (ec *executionContext) marshalOFutureProduct2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐFutureProduct(ctx context.Context, sel ast.SelectionSet, v *vega.FutureProduct) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._FutureProduct(ctx, sel, v) + return ec._GameEdge(ctx, sel, v) } func (ec *executionContext) unmarshalOID2string(ctx context.Context, v interface{}) (string, error) { @@ -122027,6 +136249,20 @@ func (ec *executionContext) marshalOLiquidationEstimate2ᚖcodeᚗvegaprotocol return ec._LiquidationEstimate(ctx, sel, v) } +func (ec *executionContext) marshalOLiquidationStrategy2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidationStrategy(ctx context.Context, sel ast.SelectionSet, v *vega.LiquidationStrategy) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._LiquidationStrategy(ctx, sel, v) +} + +func (ec *executionContext) marshalOLiquidityFeeSettings2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityFeeSettings(ctx context.Context, sel ast.SelectionSet, v *vega.LiquidityFeeSettings) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._LiquidityFeeSettings(ctx, sel, v) +} + func (ec *executionContext) marshalOLiquidityOrderReference2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐLiquidityOrderReferenceᚄ(ctx context.Context, sel ast.SelectionSet, v []*vega.LiquidityOrderReference) graphql.Marshaler { if v == nil { return graphql.Null @@ -123407,7 +137643,7 @@ func (ec *executionContext) unmarshalOOrderFilter2ᚖcodeᚗvegaprotocolᚗioᚋ return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalOOrderInfo2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐOrderInfoᚄ(ctx context.Context, v interface{}) ([]*OrderInfo, error) { +func (ec *executionContext) unmarshalOOrderInfo2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOrderInfoᚄ(ctx context.Context, v interface{}) ([]*v2.OrderInfo, error) { if v == nil { return nil, nil } @@ -123416,10 +137652,10 @@ func (ec *executionContext) unmarshalOOrderInfo2ᚕᚖcodeᚗvegaprotocolᚗio vSlice = graphql.CoerceList(v) } var err error - res := make([]*OrderInfo, len(vSlice)) + res := make([]*v2.OrderInfo, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNOrderInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐOrderInfo(ctx, vSlice[i]) + res[i], err = ec.unmarshalNOrderInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐOrderInfo(ctx, vSlice[i]) if err != nil { return nil, err } @@ -123557,7 +137793,131 @@ func (ec *executionContext) marshalOOrderTimeInForce2ᚕcodeᚗvegaprotocolᚗio if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNOrderTimeInForce2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_TimeInForce(ctx, sel, v[i]) + ret[i] = ec.marshalNOrderTimeInForce2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_TimeInForce(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalOOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx context.Context, v interface{}) (vega.Order_Type, error) { + res, err := marshallers.UnmarshalOrderType(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx context.Context, sel ast.SelectionSet, v vega.Order_Type) graphql.Marshaler { + res := marshallers.MarshalOrderType(v) + return res +} + +func (ec *executionContext) unmarshalOOrderType2ᚕcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Typeᚄ(ctx context.Context, v interface{}) ([]vega.Order_Type, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]vega.Order_Type, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOOrderType2ᚕcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Typeᚄ(ctx context.Context, sel ast.SelectionSet, v []vega.Order_Type) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalOOrderUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrderᚄ(ctx context.Context, sel ast.SelectionSet, v []*vega.Order) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNOrderUpdate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, sel, v[i]) } if isLen1 { f(i) @@ -123577,84 +137937,43 @@ func (ec *executionContext) marshalOOrderTimeInForce2ᚕcodeᚗvegaprotocolᚗio return ret } -func (ec *executionContext) unmarshalOOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx context.Context, v interface{}) (vega.Order_Type, error) { - res, err := marshallers.UnmarshalOrderType(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx context.Context, sel ast.SelectionSet, v vega.Order_Type) graphql.Marshaler { - res := marshallers.MarshalOrderType(v) - return res +func (ec *executionContext) marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *v2.PageInfo) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._PageInfo(ctx, sel, v) } -func (ec *executionContext) unmarshalOOrderType2ᚕcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Typeᚄ(ctx context.Context, v interface{}) ([]vega.Order_Type, error) { +func (ec *executionContext) unmarshalOPagination2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPagination(ctx context.Context, v interface{}) (*v2.Pagination, error) { if v == nil { return nil, nil } - var vSlice []interface{} - if v != nil { - vSlice = graphql.CoerceList(v) - } - var err error - res := make([]vega.Order_Type, len(vSlice)) - for i := range vSlice { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx, vSlice[i]) - if err != nil { - return nil, err - } - } - return res, nil + res, err := ec.unmarshalInputPagination(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOOrderType2ᚕcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Typeᚄ(ctx context.Context, sel ast.SelectionSet, v []vega.Order_Type) graphql.Marshaler { +func (ec *executionContext) marshalOPaidLiquidityFeesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPaidLiquidityFeesConnection(ctx context.Context, sel ast.SelectionSet, v *v2.PaidLiquidityFeesConnection) graphql.Marshaler { if v == nil { return graphql.Null } - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalNOrderType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder_Type(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } + return ec._PaidLiquidityFeesConnection(ctx, sel, v) +} +func (ec *executionContext) marshalOPaidLiquidityFeesEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPaidLiquidityFeesEdge(ctx context.Context, sel ast.SelectionSet, v *v2.PaidLiquidityFeesEdge) graphql.Marshaler { + if v == nil { + return graphql.Null } - wg.Wait() + return ec._PaidLiquidityFeesEdge(ctx, sel, v) +} - for _, e := range ret { - if e == graphql.Null { - return graphql.Null - } +func (ec *executionContext) marshalOPartiesProfilesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartiesProfilesConnection(ctx context.Context, sel ast.SelectionSet, v *v2.PartiesProfilesConnection) graphql.Marshaler { + if v == nil { + return graphql.Null } - - return ret + return ec._PartiesProfilesConnection(ctx, sel, v) } -func (ec *executionContext) marshalOOrderUpdate2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrderᚄ(ctx context.Context, sel ast.SelectionSet, v []*vega.Order) graphql.Marshaler { +func (ec *executionContext) marshalOParty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx context.Context, sel ast.SelectionSet, v []*vega.Party) graphql.Marshaler { if v == nil { return graphql.Null } @@ -123681,7 +138000,7 @@ func (ec *executionContext) marshalOOrderUpdate2ᚕᚖcodeᚗvegaprotocolᚗio if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNOrderUpdate2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐOrder(ctx, sel, v[i]) + ret[i] = ec.marshalOParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, sel, v[i]) } if isLen1 { f(i) @@ -123692,45 +138011,31 @@ func (ec *executionContext) marshalOOrderUpdate2ᚕᚖcodeᚗvegaprotocolᚗio } wg.Wait() - for _, e := range ret { - if e == graphql.Null { - return graphql.Null - } - } - return ret } -func (ec *executionContext) marshalOPageInfo2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *v2.PageInfo) graphql.Marshaler { +func (ec *executionContext) marshalOParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx context.Context, sel ast.SelectionSet, v *vega.Party) graphql.Marshaler { if v == nil { return graphql.Null } - return ec._PageInfo(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOPagination2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPagination(ctx context.Context, v interface{}) (*v2.Pagination, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputPagination(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) + return ec._Party(ctx, sel, v) } -func (ec *executionContext) marshalOPaidLiquidityFeesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPaidLiquidityFeesConnection(ctx context.Context, sel ast.SelectionSet, v *v2.PaidLiquidityFeesConnection) graphql.Marshaler { +func (ec *executionContext) marshalOPartyActivityStreak2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyActivityStreak(ctx context.Context, sel ast.SelectionSet, v *v1.PartyActivityStreak) graphql.Marshaler { if v == nil { return graphql.Null } - return ec._PaidLiquidityFeesConnection(ctx, sel, v) + return ec._PartyActivityStreak(ctx, sel, v) } -func (ec *executionContext) marshalOPaidLiquidityFeesEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPaidLiquidityFeesEdge(ctx context.Context, sel ast.SelectionSet, v *v2.PaidLiquidityFeesEdge) graphql.Marshaler { +func (ec *executionContext) marshalOPartyConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyConnection(ctx context.Context, sel ast.SelectionSet, v *v2.PartyConnection) graphql.Marshaler { if v == nil { return graphql.Null } - return ec._PaidLiquidityFeesEdge(ctx, sel, v) + return ec._PartyConnection(ctx, sel, v) } -func (ec *executionContext) marshalOParty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx context.Context, sel ast.SelectionSet, v []*vega.Party) graphql.Marshaler { +func (ec *executionContext) marshalOPartyLockedBalance2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyLockedBalanceᚄ(ctx context.Context, sel ast.SelectionSet, v []*v1.PartyLockedBalance) graphql.Marshaler { if v == nil { return graphql.Null } @@ -123757,7 +138062,7 @@ func (ec *executionContext) marshalOParty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvega if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalOParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx, sel, v[i]) + ret[i] = ec.marshalNPartyLockedBalance2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyLockedBalance(ctx, sel, v[i]) } if isLen1 { f(i) @@ -123768,31 +138073,16 @@ func (ec *executionContext) marshalOParty2ᚕᚖcodeᚗvegaprotocolᚗioᚋvega } wg.Wait() - return ret -} - -func (ec *executionContext) marshalOParty2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐParty(ctx context.Context, sel ast.SelectionSet, v *vega.Party) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._Party(ctx, sel, v) -} - -func (ec *executionContext) marshalOPartyActivityStreak2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyActivityStreak(ctx context.Context, sel ast.SelectionSet, v *v1.PartyActivityStreak) graphql.Marshaler { - if v == nil { - return graphql.Null + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } } - return ec._PartyActivityStreak(ctx, sel, v) -} -func (ec *executionContext) marshalOPartyConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyConnection(ctx context.Context, sel ast.SelectionSet, v *v2.PartyConnection) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._PartyConnection(ctx, sel, v) + return ret } -func (ec *executionContext) marshalOPartyLockedBalance2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyLockedBalanceᚄ(ctx context.Context, sel ast.SelectionSet, v []*v1.PartyLockedBalance) graphql.Marshaler { +func (ec *executionContext) marshalOPartyMarginModeEdge2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyMarginModeEdge(ctx context.Context, sel ast.SelectionSet, v []*v2.PartyMarginModeEdge) graphql.Marshaler { if v == nil { return graphql.Null } @@ -123819,7 +138109,7 @@ func (ec *executionContext) marshalOPartyLockedBalance2ᚕᚖcodeᚗvegaprotocol if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNPartyLockedBalance2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyLockedBalance(ctx, sel, v[i]) + ret[i] = ec.marshalOPartyMarginModeEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyMarginModeEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -123830,13 +138120,21 @@ func (ec *executionContext) marshalOPartyLockedBalance2ᚕᚖcodeᚗvegaprotocol } wg.Wait() - for _, e := range ret { - if e == graphql.Null { - return graphql.Null - } + return ret +} + +func (ec *executionContext) marshalOPartyMarginModeEdge2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyMarginModeEdge(ctx context.Context, sel ast.SelectionSet, v *v2.PartyMarginModeEdge) graphql.Marshaler { + if v == nil { + return graphql.Null } + return ec._PartyMarginModeEdge(ctx, sel, v) +} - return ret +func (ec *executionContext) marshalOPartyMarginModesConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐPartyMarginModesConnection(ctx context.Context, sel ast.SelectionSet, v *v2.PartyMarginModesConnection) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._PartyMarginModesConnection(ctx, sel, v) } func (ec *executionContext) marshalOPartyVestingBalance2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐPartyVestingBalanceᚄ(ctx context.Context, sel ast.SelectionSet, v []*v1.PartyVestingBalance) graphql.Marshaler { @@ -124418,6 +138716,13 @@ func (ec *executionContext) marshalOProposalEdge2ᚖcodeᚗvegaprotocolᚗioᚋv return ec._ProposalEdge(ctx, sel, v) } +func (ec *executionContext) marshalOProposalNode2codeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐProposalNode(ctx context.Context, sel ast.SelectionSet, v ProposalNode) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._ProposalNode(ctx, sel, v) +} + func (ec *executionContext) unmarshalOProposalRejectionReason2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalError(ctx context.Context, v interface{}) (*vega.ProposalError, error) { if v == nil { return nil, nil @@ -124450,6 +138755,13 @@ func (ec *executionContext) marshalOProposalState2ᚖcodeᚗvegaprotocolᚗioᚋ return res } +func (ec *executionContext) marshalOProposalTerms2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐProposalTerms(ctx context.Context, sel ast.SelectionSet, v *vega.ProposalTerms) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._ProposalTerms(ctx, sel, v) +} + func (ec *executionContext) unmarshalOProposalType2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐListGovernanceDataRequest_Type(ctx context.Context, v interface{}) (*v2.ListGovernanceDataRequest_Type, error) { if v == nil { return nil, nil @@ -125003,6 +139315,54 @@ func (ec *executionContext) marshalOSimpleRiskModelParams2ᚖcodeᚗvegaprotocol return ec._SimpleRiskModelParams(ctx, sel, v) } +func (ec *executionContext) marshalOSpecBindingForCompositePrice2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐSpecBindingForCompositePrice(ctx context.Context, sel ast.SelectionSet, v []*SpecBindingForCompositePrice) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalOSpecBindingForCompositePrice2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐSpecBindingForCompositePrice(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + return ret +} + +func (ec *executionContext) marshalOSpecBindingForCompositePrice2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐSpecBindingForCompositePrice(ctx context.Context, sel ast.SelectionSet, v *SpecBindingForCompositePrice) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._SpecBindingForCompositePrice(ctx, sel, v) +} + func (ec *executionContext) marshalOStakeLinking2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐStakeLinkingᚄ(ctx context.Context, sel ast.SelectionSet, v []*v1.StakeLinking) graphql.Marshaler { if v == nil { return graphql.Null @@ -125450,6 +139810,13 @@ func (ec *executionContext) marshalOTeamConnection2ᚖcodeᚗvegaprotocolᚗio return ec._TeamConnection(ctx, sel, v) } +func (ec *executionContext) marshalOTeamMembersStatisticsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamMembersStatisticsConnection(ctx context.Context, sel ast.SelectionSet, v *v2.TeamMembersStatisticsConnection) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._TeamMembersStatisticsConnection(ctx, sel, v) +} + func (ec *executionContext) marshalOTeamRefereeConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamRefereeConnection(ctx context.Context, sel ast.SelectionSet, v *v2.TeamRefereeConnection) graphql.Marshaler { if v == nil { return graphql.Null @@ -125464,6 +139831,13 @@ func (ec *executionContext) marshalOTeamRefereeHistoryConnection2ᚖcodeᚗvegap return ec._TeamRefereeHistoryConnection(ctx, sel, v) } +func (ec *executionContext) marshalOTeamsStatisticsConnection2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTeamsStatisticsConnection(ctx context.Context, sel ast.SelectionSet, v *v2.TeamsStatisticsConnection) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._TeamsStatisticsConnection(ctx, sel, v) +} + func (ec *executionContext) unmarshalOTimestamp2int64(ctx context.Context, v interface{}) (int64, error) { res, err := marshallers.UnmarshalTimestamp(v) return res, graphql.ErrorOnPath(ctx, err) @@ -125490,6 +139864,13 @@ func (ec *executionContext) marshalOTimestamp2ᚖint64(ctx context.Context, sel return res } +func (ec *executionContext) marshalOTotalTransferFeeDiscount2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐGetTotalTransferFeeDiscountResponse(ctx context.Context, sel ast.SelectionSet, v *v2.GetTotalTransferFeeDiscountResponse) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._TotalTransferFeeDiscount(ctx, sel, v) +} + func (ec *executionContext) marshalOTrade2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTrade(ctx context.Context, sel ast.SelectionSet, v []*vega.Trade) graphql.Marshaler { if v == nil { return graphql.Null @@ -125861,6 +140242,13 @@ func (ec *executionContext) marshalOTransferFee2ᚖcodeᚗvegaprotocolᚗioᚋve return ec._TransferFee(ctx, sel, v) } +func (ec *executionContext) marshalOTransferNode2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐTransferNode(ctx context.Context, sel ast.SelectionSet, v *v2.TransferNode) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._TransferNode(ctx, sel, v) +} + func (ec *executionContext) marshalOTransferResponse2ᚕᚖcodeᚗvegaprotocolᚗioᚋvegaᚋdatanodeᚋgatewayᚋgraphqlᚐTransferResponseᚄ(ctx context.Context, sel ast.SelectionSet, v []*TransferResponse) graphql.Marshaler { if v == nil { return graphql.Null @@ -125908,6 +140296,38 @@ func (ec *executionContext) marshalOTransferResponse2ᚕᚖcodeᚗvegaprotocol return ret } +func (ec *executionContext) unmarshalOTransferScope2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐListTransfersRequest_Scope(ctx context.Context, v interface{}) (*v2.ListTransfersRequest_Scope, error) { + if v == nil { + return nil, nil + } + res, err := marshallers.UnmarshalTransferScope(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOTransferScope2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋdataᚑnodeᚋapiᚋv2ᚐListTransfersRequest_Scope(ctx context.Context, sel ast.SelectionSet, v *v2.ListTransfersRequest_Scope) graphql.Marshaler { + if v == nil { + return graphql.Null + } + res := marshallers.MarshalTransferScope(*v) + return res +} + +func (ec *executionContext) unmarshalOTransferStatus2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐTransfer_Status(ctx context.Context, v interface{}) (*v1.Transfer_Status, error) { + if v == nil { + return nil, nil + } + res, err := marshallers.UnmarshalTransferStatus(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOTransferStatus2ᚖcodeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚋeventsᚋv1ᚐTransfer_Status(ctx context.Context, sel ast.SelectionSet, v *v1.Transfer_Status) graphql.Marshaler { + if v == nil { + return graphql.Null + } + res := marshallers.MarshalTransferStatus(*v) + return res +} + func (ec *executionContext) unmarshalOTransferType2codeᚗvegaprotocolᚗioᚋvegaᚋprotosᚋvegaᚐTransferType(ctx context.Context, v interface{}) (vega.TransferType, error) { res, err := marshallers.UnmarshalTransferType(v) return res, graphql.ErrorOnPath(ctx, err) diff --git a/datanode/gateway/graphql/gqlgen.yml b/datanode/gateway/graphql/gqlgen.yml index d8feef62ee..763f231eba 100644 --- a/datanode/gateway/graphql/gqlgen.yml +++ b/datanode/gateway/graphql/gqlgen.yml @@ -62,6 +62,9 @@ models: OrderStatus: model: - code.vegaprotocol.io/vega/datanode/gateway/graphql/marshallers.OrderStatus + LiquidityFeeMethod: + model: + - code.vegaprotocol.io/vega/datanode/gateway/graphql/marshallers.LiquidityFeeMethod DepositStatus: model: - code.vegaprotocol.io/vega/datanode/gateway/graphql/marshallers.DepositStatus @@ -77,6 +80,9 @@ models: TransferStatus: model: - code.vegaprotocol.io/vega/datanode/gateway/graphql/marshallers.TransferStatus + TransferScope: + model: + - code.vegaprotocol.io/vega/datanode/gateway/graphql/marshallers.TransferScope TransferType: model: - code.vegaprotocol.io/vega/datanode/gateway/graphql/marshallers.TransferType @@ -119,6 +125,9 @@ models: StopOrderTriggerDirection: model: - code.vegaprotocol.io/vega/datanode/gateway/graphql/marshallers.StopOrderTriggerDirection + StopOrderSizeOverrideSetting: + model: + - code.vegaprotocol.io/vega/datanode/gateway/graphql/marshallers.StopOrderSizeOverrideSetting Order: model: code.vegaprotocol.io/vega/protos/vega.Order OrderUpdate: @@ -159,16 +168,24 @@ models: model: code.vegaprotocol.io/vega/protos/vega.MarketData ObservableMarketData: model: code.vegaprotocol.io/vega/protos/vega.MarketData + CompositePriceState: + model: code.vegaprotocol.io/vega/protos/vega.CompositePriceState + CompositePriceSource: + model: code.vegaprotocol.io/vega/protos/vega.CompositePriceSource MarginLevels: model: code.vegaprotocol.io/vega/protos/vega.MarginLevels MarginLevelsUpdate: model: code.vegaprotocol.io/vega/protos/vega.MarginLevels MarginEstimate: model: code.vegaprotocol.io/vega/protos/data-node/api/v2.MarginEstimate + OrderInfo: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.OrderInfo LiquidationPrice: model: code.vegaprotocol.io/vega/protos/data-node/api/v2.LiquidationPrice LiquidationEstimate: model: code.vegaprotocol.io/vega/protos/data-node/api/v2.LiquidationEstimate + CollateralIncreaseEstimate: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.CollateralIncreaseEstimate NodeSignature: model: code.vegaprotocol.io/vega/protos/vega/commands/v1.NodeSignature ProposalEvent: @@ -270,6 +287,10 @@ models: model: code.vegaprotocol.io/vega/protos/vega.ProposalRationale ProposalTerms: model: code.vegaprotocol.io/vega/protos/vega.ProposalTerms + BatchProposalTerms: + model: code.vegaprotocol.io/vega/protos/vega.BatchProposalTerms + BatchProposalTermsChange: + model: code.vegaprotocol.io/vega/protos/vega.BatchProposalTermsChange ProposalDetail: model: code.vegaprotocol.io/vega/protos/vega.Proposal NewMarket: @@ -312,6 +333,12 @@ models: model: code.vegaprotocol.io/vega/protos/vega.UpdateSpotMarketConfiguration LiquiditySLAParameters: model: code.vegaprotocol.io/vega/protos/vega.LiquiditySLAParameters + LiquidationStrategy: + model: code.vegaprotocol.io/vega/protos/vega.LiquidationStrategy + CompositePriceConfiguration: + model: code.vegaprotocol.io/vega/protos/vega.CompositePriceConfiguration + LiquidityFeeSettings: + model: code.vegaprotocol.io/vega/protos/vega.LiquidityFeeSettings Asset: model: code.vegaprotocol.io/vega/protos/vega.Asset fields: @@ -330,6 +357,8 @@ models: model: code.vegaprotocol.io/vega/protos/vega.IcebergOrder DataSourceSpecToFutureBinding: model: code.vegaprotocol.io/vega/protos/vega.DataSourceSpecToFutureBinding + DataSourceSpecPerpetualBinding: + model: code.vegaprotocol.io/vega/protos/vega.DataSourceSpecToPerpetualBinding DataSourceDefinition: model: code.vegaprotocol.io/vega/protos/vega.DataSourceDefinition DataSourceDefinitionExternal: @@ -450,6 +479,8 @@ models: model: code.vegaprotocol.io/vega/protos/vega.UpdateMarketConfiguration_LogNormal UpdateFutureProduct: model: code.vegaprotocol.io/vega/protos/vega.UpdateFutureProduct + UpdatePerpetualProduct: + model: code.vegaprotocol.io/vega/protos/vega.UpdatePerpetualProduct TradeConnection: model: code.vegaprotocol.io/vega/protos/data-node/api/v2.TradeConnection TradeEdge: @@ -674,6 +705,22 @@ models: model: code.vegaprotocol.io/vega/protos/data-node/api/v2.TeamEdge TeamConnection: model: code.vegaprotocol.io/vega/protos/data-node/api/v2.TeamConnection + TeamStatistics: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.TeamStatistics + QuantumRewardsPerEpoch: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.QuantumRewardsPerEpoch + QuantumVolumesPerEpoch: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.QuantumVolumesPerEpoch + TeamStatisticsEdge: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.TeamStatisticsEdge + TeamsStatisticsConnection: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.TeamsStatisticsConnection + TeamMemberStatistics: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.TeamMemberStatistics + TeamMemberStatisticsEdge: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.TeamMemberStatisticsEdge + TeamMembersStatisticsConnection: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.TeamMembersStatisticsConnection TeamReferee: model: code.vegaprotocol.io/vega/protos/data-node/api/v2.TeamReferee TeamRefereeEdge: @@ -726,3 +773,29 @@ models: model: code.vegaprotocol.io/vega/datanode/gateway/graphql/marshallers.EntityScope DistributionStrategy: model: code.vegaprotocol.io/vega/datanode/gateway/graphql/marshallers.DistributionStrategy + TotalTransferFeeDiscount: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.GetTotalTransferFeeDiscountResponse + EstimatedTransferFee: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.EstimateTransferFeeResponse + Game: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.Game + GameEdge: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.GameEdge + GamesConnection: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.GamesConnection + PartyMarginMode: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.PartyMarginMode + PartyMarginModeEdge: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.PartyMarginModeEdge + PartyMarginModesConnection: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.PartyMarginModesConnection + PartiesProfilesConnection: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.PartiesProfilesConnection + PartyProfileEdge: + model: code.vegaprotocol.io/vega/protos/data-node/api/v2.PartyProfileEdge + PartyProfile: + model: code.vegaprotocol.io/vega/protos/vega.PartyProfile + Metadata: + model: code.vegaprotocol.io/vega/protos/vega.Metadata + MarginMode: + model: code.vegaprotocol.io/vega/datanode/gateway/graphql/marshallers.MarginMode diff --git a/datanode/gateway/graphql/helpers.go b/datanode/gateway/graphql/helpers.go index b069eca1f3..473f0050c3 100644 --- a/datanode/gateway/graphql/helpers.go +++ b/datanode/gateway/graphql/helpers.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/helpers_enum.go b/datanode/gateway/graphql/helpers_enum.go index 3fd98bfda5..17de7d9984 100644 --- a/datanode/gateway/graphql/helpers_enum.go +++ b/datanode/gateway/graphql/helpers_enum.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( @@ -43,12 +31,22 @@ func convertDataNodeIntervalToProto(interval string) (types.Interval, error) { return types.Interval_INTERVAL_I5M, nil case "15 minutes": return types.Interval_INTERVAL_I15M, nil + case "30 minutes": + return types.Interval_INTERVAL_I30M, nil case "1 hour": return types.Interval_INTERVAL_I1H, nil + case "4 hours": + return types.Interval_INTERVAL_I4H, nil case "6 hours": return types.Interval_INTERVAL_I6H, nil + case "8 hours": + return types.Interval_INTERVAL_I8H, nil + case "12 hours": + return types.Interval_INTERVAL_I12H, nil case "1 day": return types.Interval_INTERVAL_I1D, nil + case "7 days": + return types.Interval_INTERVAL_I7D, nil default: err := fmt.Errorf("failed to convert Interval from GraphQL to Proto: %v", interval) return types.Interval_INTERVAL_UNSPECIFIED, err diff --git a/datanode/gateway/graphql/helpers_test.go b/datanode/gateway/graphql/helpers_test.go index 3c06978dab..140f91a776 100644 --- a/datanode/gateway/graphql/helpers_test.go +++ b/datanode/gateway/graphql/helpers_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/iceberg_order_resolver.go b/datanode/gateway/graphql/iceberg_order_resolver.go index b08631a2dd..82403f5dee 100644 --- a/datanode/gateway/graphql/iceberg_order_resolver.go +++ b/datanode/gateway/graphql/iceberg_order_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/instrument_configuration_resolver.go b/datanode/gateway/graphql/instrument_configuration_resolver.go index 49f7a3698d..ff724f318a 100644 --- a/datanode/gateway/graphql/instrument_configuration_resolver.go +++ b/datanode/gateway/graphql/instrument_configuration_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/instrument_resolver.go b/datanode/gateway/graphql/instrument_resolver.go index a1cb30bdc9..779e860150 100644 --- a/datanode/gateway/graphql/instrument_resolver.go +++ b/datanode/gateway/graphql/instrument_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/key_rotation_resolver.go b/datanode/gateway/graphql/key_rotation_resolver.go index d783ad2a66..7206c17da2 100644 --- a/datanode/gateway/graphql/key_rotation_resolver.go +++ b/datanode/gateway/graphql/key_rotation_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/liquidation_strategy_resolver.go b/datanode/gateway/graphql/liquidation_strategy_resolver.go new file mode 100644 index 0000000000..a1571d04c4 --- /dev/null +++ b/datanode/gateway/graphql/liquidation_strategy_resolver.go @@ -0,0 +1,28 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package gql + +import ( + "context" + + "code.vegaprotocol.io/vega/protos/vega" +) + +type liquidationStrategyResolver VegaResolverRoot + +func (r liquidationStrategyResolver) FullDisposalSize(ctx context.Context, obj *vega.LiquidationStrategy) (int, error) { + return int(obj.FullDisposalSize), nil +} diff --git a/datanode/gateway/graphql/margin_estimate_resolver.go b/datanode/gateway/graphql/margin_estimate_resolver.go new file mode 100644 index 0000000000..5da82e2412 --- /dev/null +++ b/datanode/gateway/graphql/margin_estimate_resolver.go @@ -0,0 +1,62 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package gql + +import ( + "context" + + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + vega "code.vegaprotocol.io/vega/protos/vega" +) + +type myMarginEstimateResolver VegaResolverRoot + +// BestCase implements MarginEstimateResolver. +func (me *myMarginEstimateResolver) BestCase(ctx context.Context, obj *v2.MarginEstimate) (*AbstractMarginLevels, error) { + if obj == nil { + return nil, nil + } + + return me.marginEstimateToAbstract(ctx, obj.BestCase) +} + +// WorstCase implements MarginEstimateResolver. +func (me *myMarginEstimateResolver) WorstCase(ctx context.Context, obj *v2.MarginEstimate) (*AbstractMarginLevels, error) { + return me.marginEstimateToAbstract(ctx, obj.WorstCase) +} + +func (me *myMarginEstimateResolver) marginEstimateToAbstract(ctx context.Context, obj *vega.MarginLevels) (*AbstractMarginLevels, error) { + market, err := me.r.getMarketByID(ctx, obj.MarketId) + if err != nil { + return nil, err + } + + asset, err := me.r.getAssetByID(ctx, obj.Asset) + if err != nil { + return nil, err + } + return &AbstractMarginLevels{ + Market: market, + Asset: asset, + MaintenanceLevel: obj.MaintenanceMargin, + SearchLevel: obj.SearchLevel, + InitialLevel: obj.InitialMargin, + OrderMarginLevel: obj.OrderMargin, + CollateralReleaseLevel: obj.CollateralReleaseLevel, + MarginMode: obj.MarginMode, + MarginFactor: obj.MarginFactor, + }, nil +} diff --git a/datanode/gateway/graphql/margin_mode_resolver.go b/datanode/gateway/graphql/margin_mode_resolver.go new file mode 100644 index 0000000000..8c7438876c --- /dev/null +++ b/datanode/gateway/graphql/margin_mode_resolver.go @@ -0,0 +1,28 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package gql + +import ( + "context" + + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" +) + +type marginModeResolver VegaResolverRoot + +func (m marginModeResolver) AtEpoch(_ context.Context, obj *v2.PartyMarginMode) (int, error) { + return int(obj.AtEpoch), nil +} diff --git a/datanode/gateway/graphql/mark_price_configuration_resolver.go b/datanode/gateway/graphql/mark_price_configuration_resolver.go new file mode 100644 index 0000000000..e1e9ae55f0 --- /dev/null +++ b/datanode/gateway/graphql/mark_price_configuration_resolver.go @@ -0,0 +1,72 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package gql + +import ( + "context" + + "code.vegaprotocol.io/vega/protos/vega" + types "code.vegaprotocol.io/vega/protos/vega" +) + +type compositePriceConfigurationResolver VegaResolverRoot + +func (*compositePriceConfigurationResolver) MarkPriceSourceWeights(ctx context.Context, obj *vega.CompositePriceConfiguration) ([]string, error) { + if obj == nil { + return []string{}, nil + } + return obj.SourceWeights, nil +} + +func (*compositePriceConfigurationResolver) MarkPriceSourceStalenessTolerance(ctx context.Context, obj *vega.CompositePriceConfiguration) ([]string, error) { + if obj == nil { + return []string{}, nil + } + return obj.SourceStalenessTolerance, nil +} + +func (*compositePriceConfigurationResolver) CompositePriceType(ctx context.Context, obj *vega.CompositePriceConfiguration) (CompositePriceType, error) { + if obj == nil { + return CompositePriceTypeCompositePriceTypeLastTrade, nil + } + if obj.CompositePriceType == types.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED { + return CompositePriceTypeCompositePriceTypeWeighted, nil + } else if obj.CompositePriceType == types.CompositePriceType_COMPOSITE_PRICE_TYPE_MEDIAN { + return CompositePriceTypeCompositePriceTypeMedian, nil + } else { + return CompositePriceTypeCompositePriceTypeLastTrade, nil + } +} + +func (*compositePriceConfigurationResolver) DecayPower(ctx context.Context, obj *vega.CompositePriceConfiguration) (int, error) { + if obj == nil { + return 0, nil + } + return int(obj.DecayPower), nil +} + +func (*compositePriceConfigurationResolver) DataSourcesSpecBinding(ctx context.Context, obj *vega.CompositePriceConfiguration) ([]*SpecBindingForCompositePrice, error) { + if obj == nil || obj.DataSourcesSpecBinding == nil { + return nil, nil + } + binding := make([]*SpecBindingForCompositePrice, 0, len(obj.DataSourcesSpecBinding)) + for _, sbfcp := range obj.DataSourcesSpecBinding { + binding = append(binding, &SpecBindingForCompositePrice{ + PriceSourceProperty: sbfcp.PriceSourceProperty, + }) + } + return binding, nil +} diff --git a/datanode/gateway/graphql/market_data_resolvers.go b/datanode/gateway/graphql/market_data_resolvers.go index 953899eaf2..cb565aafa7 100644 --- a/datanode/gateway/graphql/market_data_resolvers.go +++ b/datanode/gateway/graphql/market_data_resolvers.go @@ -27,6 +27,7 @@ import ( types "code.vegaprotocol.io/vega/protos/vega" vega "code.vegaprotocol.io/vega/protos/vega" vegapb "code.vegaprotocol.io/vega/protos/vega" + "google.golang.org/grpc" ) @@ -61,6 +62,16 @@ func (r *VegaResolverRoot) ObservableMarketData() ObservableMarketDataResolver { type myMarketDataResolver VegaResolverRoot +func (r *myMarketDataResolver) MarkPriceType(_ context.Context, m *types.MarketData) (CompositePriceType, error) { + if m.MarkPriceType == types.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED { + return CompositePriceTypeCompositePriceTypeWeighted, nil + } else if m.MarkPriceType == types.CompositePriceType_COMPOSITE_PRICE_TYPE_MEDIAN { + return CompositePriceTypeCompositePriceTypeMedian, nil + } else { + return CompositePriceTypeCompositePriceTypeLastTrade, nil + } +} + func (r *myMarketDataResolver) AuctionStart(_ context.Context, m *types.MarketData) (*string, error) { if m.AuctionStart <= 0 { return nil, nil @@ -227,6 +238,13 @@ func (r *myMarketDataResolver) NextMarkToMarket(_ context.Context, m *types.Mark return vegatime.Format(vegatime.UnixNano(m.NextMarkToMarket)), nil } +func (r *myMarketDataResolver) NextNetworkCloseout(_ context.Context, m *types.MarketData) (string, error) { + if m.NextNetworkCloseout == 0 { + return "", nil + } + return vegatime.Format(vegatime.UnixNano(m.NextNetworkCloseout)), nil +} + func (r *myMarketDataResolver) MarketGrowth(_ context.Context, m *types.MarketData) (string, error) { return m.MarketGrowth, nil } @@ -313,6 +331,16 @@ func (r *myObservableMarketDataResolver) MarkPrice(ctx context.Context, m *types return (*myMarketDataResolver)(r).MarkPrice(ctx, m) } +func (r *myObservableMarketDataResolver) MarkPriceType(_ context.Context, m *types.MarketData) (CompositePriceType, error) { + if m.MarkPriceType == types.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED { + return CompositePriceTypeCompositePriceTypeWeighted, nil + } else if m.MarkPriceType == types.CompositePriceType_COMPOSITE_PRICE_TYPE_MEDIAN { + return CompositePriceTypeCompositePriceTypeMedian, nil + } else { + return CompositePriceTypeCompositePriceTypeLastTrade, nil + } +} + func (r *myObservableMarketDataResolver) Timestamp(ctx context.Context, m *types.MarketData) (string, error) { return (*myMarketDataResolver)(r).Timestamp(ctx, m) } @@ -374,6 +402,10 @@ func (r *myObservableMarketDataResolver) NextMarkToMarket(ctx context.Context, m return (*myMarketDataResolver)(r).NextMarkToMarket(ctx, m) } +func (r *myObservableMarketDataResolver) NextNetworkCloseout(ctx context.Context, m *types.MarketData) (string, error) { + return (*myMarketDataResolver)(r).NextNetworkCloseout(ctx, m) +} + func (r *myObservableMarketDataResolver) MarketGrowth(ctx context.Context, m *types.MarketData) (string, error) { return (*myMarketDataResolver)(r).MarketGrowth(ctx, m) } diff --git a/datanode/gateway/graphql/market_resolvers.go b/datanode/gateway/graphql/market_resolvers.go index bdd31a4f1d..0f138d6323 100644 --- a/datanode/gateway/graphql/market_resolvers.go +++ b/datanode/gateway/graphql/market_resolvers.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( @@ -256,11 +244,29 @@ func (r *myMarketResolver) LiquidityMonitoringParameters(_ context.Context, obj TimeWindow: int(obj.LiquidityMonitoringParameters.TargetStakeParameters.TimeWindow), ScalingFactor: obj.LiquidityMonitoringParameters.TargetStakeParameters.ScalingFactor, }, - TriggeringRatio: obj.LiquidityMonitoringParameters.TriggeringRatio, }, nil } -func (r *myMarketResolver) Proposal(ctx context.Context, obj *types.Market) (*types.GovernanceData, error) { +func (r *myMarketResolver) MarketProposal(ctx context.Context, obj *types.Market) (ProposalNode, error) { + resp, err := r.tradingDataClientV2.GetGovernanceData(ctx, &v2.GetGovernanceDataRequest{ + ProposalId: &obj.Id, + }) + // it's possible to not find a proposal as of now. + // some market are loaded at startup, without + // going through the proposal phase + if err != nil { + return nil, nil //nolint:nilerr + } + + resolver := (*proposalEdgeResolver)(r) + if resp.GetData().ProposalType == vega.GovernanceData_TYPE_BATCH { + return resolver.BatchProposal(ctx, resp.GetData()) + } + + return resp.Data, nil +} + +func (r *myMarketResolver) Proposal(ctx context.Context, obj *types.Market) (*vega.GovernanceData, error) { resp, err := r.tradingDataClientV2.GetGovernanceData(ctx, &v2.GetGovernanceDataRequest{ ProposalId: &obj.Id, }) @@ -270,6 +276,7 @@ func (r *myMarketResolver) Proposal(ctx context.Context, obj *types.Market) (*ty if err != nil { return nil, nil //nolint:nilerr } + return resp.Data, nil } diff --git a/datanode/gateway/graphql/marshallers/account_field.go b/datanode/gateway/graphql/marshallers/account_field.go index bb03d31383..61b45b17c9 100644 --- a/datanode/gateway/graphql/marshallers/account_field.go +++ b/datanode/gateway/graphql/marshallers/account_field.go @@ -13,24 +13,13 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package marshallers import ( "fmt" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/99designs/gqlgen/graphql" ) diff --git a/datanode/gateway/graphql/marshallers/int32.go b/datanode/gateway/graphql/marshallers/int32.go index afb3735081..bde5f79c11 100644 --- a/datanode/gateway/graphql/marshallers/int32.go +++ b/datanode/gateway/graphql/marshallers/int32.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package marshallers import ( diff --git a/datanode/gateway/graphql/marshallers/ledgerentry_field.go b/datanode/gateway/graphql/marshallers/ledgerentry_field.go index 470344c657..47ff2c9af6 100644 --- a/datanode/gateway/graphql/marshallers/ledgerentry_field.go +++ b/datanode/gateway/graphql/marshallers/ledgerentry_field.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package marshallers import ( @@ -32,6 +20,7 @@ import ( "fmt" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/99designs/gqlgen/graphql" ) diff --git a/datanode/gateway/graphql/marshallers/marshallers.go b/datanode/gateway/graphql/marshallers/marshallers.go index 5fbb873890..d43f1bc7c7 100644 --- a/datanode/gateway/graphql/marshallers/marshallers.go +++ b/datanode/gateway/graphql/marshallers/marshallers.go @@ -159,6 +159,26 @@ func MarshalTransferType(t vega.TransferType) graphql.Marshaler { }) } +func MarshalTransferScope(s v2.ListTransfersRequest_Scope) graphql.Marshaler { + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte(strconv.Quote(s.String()))) + }) +} + +func UnmarshalTransferScope(v interface{}) (v2.ListTransfersRequest_Scope, error) { + s, ok := v.(string) + if !ok { + return v2.ListTransfersRequest_SCOPE_UNSPECIFIED, fmt.Errorf("expected transfer scope to be a string") + } + + t, ok := v2.ListGovernanceDataRequest_Type_value[s] + if !ok { + return v2.ListTransfersRequest_SCOPE_UNSPECIFIED, fmt.Errorf("failed to convert transfer scope from GraphQL to Proto: %v", s) + } + + return v2.ListTransfersRequest_Scope(t), nil +} + func UnmarshalTransferType(v interface{}) (vega.TransferType, error) { s, ok := v.(string) if !ok { @@ -595,6 +615,24 @@ func UnmarshalStopOrderTriggerDirection(v interface{}) (vega.StopOrder_TriggerDi return vega.StopOrder_TriggerDirection(t), nil } +func MarshalStopOrderSizeOverrideSetting(s vega.StopOrder_SizeOverrideSetting) graphql.Marshaler { + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte(strconv.Quote(s.String()))) + }) +} + +func UnmarshalStopOrderSizeOverrideSetting(v interface{}) (vega.StopOrder_SizeOverrideSetting, error) { + s, ok := v.(string) + if !ok { + return vega.StopOrder_SIZE_OVERRIDE_SETTING_UNSPECIFIED, fmt.Errorf("expected stop order size override setting to be a string") + } + t, ok := vega.StopOrder_SizeOverrideSetting_value[s] + if !ok { + return vega.StopOrder_SIZE_OVERRIDE_SETTING_UNSPECIFIED, fmt.Errorf("failed to convert stop order size override setting to Proto: %v", s) + } + return vega.StopOrder_SizeOverrideSetting(t), nil +} + func MarshalFundingPeriodDataPointSource(s eventspb.FundingPeriodDataPoint_Source) graphql.Marshaler { return graphql.WriterFunc(func(w io.Writer) { w.Write([]byte(strconv.Quote(s.String()))) @@ -612,3 +650,43 @@ func UnmarshalFundingPeriodDataPointSource(v interface{}) (eventspb.FundingPerio } return eventspb.FundingPeriodDataPoint_Source(t), nil } + +func MarshalLiquidityFeeMethod(s vega.LiquidityFeeSettings_Method) graphql.Marshaler { + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte(strconv.Quote(s.String()))) + }) +} + +func UnmarshalLiquidityFeeMethod(v interface{}) (vega.LiquidityFeeSettings_Method, error) { + s, ok := v.(string) + if !ok { + return vega.LiquidityFeeSettings_METHOD_UNSPECIFIED, fmt.Errorf("expected method state to be a string") + } + + side, ok := vega.Proposal_State_value[s] + if !ok { + return vega.LiquidityFeeSettings_METHOD_UNSPECIFIED, fmt.Errorf("failed to convert method from GraphQL to Proto: %v", s) + } + + return vega.LiquidityFeeSettings_Method(side), nil +} + +func MarshalMarginMode(s vega.MarginMode) graphql.Marshaler { + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte(strconv.Quote(s.String()))) + }) +} + +func UnmarshalMarginMode(v interface{}) (vega.MarginMode, error) { + s, ok := v.(string) + if !ok { + return vega.MarginMode_MARGIN_MODE_UNSPECIFIED, fmt.Errorf("expected margin mode to be a string") + } + + side, ok := vega.MarginMode_value[s] + if !ok { + return vega.MarginMode_MARGIN_MODE_UNSPECIFIED, fmt.Errorf("failed to convert margin mode from GraphQL to Proto: %v", s) + } + + return vega.MarginMode(side), nil +} diff --git a/datanode/gateway/graphql/marshallers/timestamp.go b/datanode/gateway/graphql/marshallers/timestamp.go index 45da850226..46b28edb85 100644 --- a/datanode/gateway/graphql/marshallers/timestamp.go +++ b/datanode/gateway/graphql/marshallers/timestamp.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package marshallers import ( @@ -33,6 +21,7 @@ import ( "strconv" "code.vegaprotocol.io/vega/datanode/vegatime" + "github.com/99designs/gqlgen/graphql" ) diff --git a/datanode/gateway/graphql/mocks/mocks.go b/datanode/gateway/graphql/mocks/mocks.go index 0a56f3b0e8..572c9724a9 100644 --- a/datanode/gateway/graphql/mocks/mocks.go +++ b/datanode/gateway/graphql/mocks/mocks.go @@ -320,6 +320,26 @@ func (mr *MockTradingDataServiceClientV2MockRecorder) EstimatePosition(arg0, arg return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EstimatePosition", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).EstimatePosition), varargs...) } +// EstimateTransferFee mocks base method. +func (m *MockTradingDataServiceClientV2) EstimateTransferFee(arg0 context.Context, arg1 *v2.EstimateTransferFeeRequest, arg2 ...grpc.CallOption) (*v2.EstimateTransferFeeResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "EstimateTransferFee", varargs...) + ret0, _ := ret[0].(*v2.EstimateTransferFeeResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EstimateTransferFee indicates an expected call of EstimateTransferFee. +func (mr *MockTradingDataServiceClientV2MockRecorder) EstimateTransferFee(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EstimateTransferFee", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).EstimateTransferFee), varargs...) +} + // ExportLedgerEntries mocks base method. func (m *MockTradingDataServiceClientV2) ExportLedgerEntries(arg0 context.Context, arg1 *v2.ExportLedgerEntriesRequest, arg2 ...grpc.CallOption) (v2.TradingDataService_ExportLedgerEntriesClient, error) { m.ctrl.T.Helper() @@ -1040,6 +1060,26 @@ func (mr *MockTradingDataServiceClientV2MockRecorder) GetStopOrder(arg0, arg1 in return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStopOrder", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).GetStopOrder), varargs...) } +// GetTotalTransferFeeDiscount mocks base method. +func (m *MockTradingDataServiceClientV2) GetTotalTransferFeeDiscount(arg0 context.Context, arg1 *v2.GetTotalTransferFeeDiscountRequest, arg2 ...grpc.CallOption) (*v2.GetTotalTransferFeeDiscountResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetTotalTransferFeeDiscount", varargs...) + ret0, _ := ret[0].(*v2.GetTotalTransferFeeDiscountResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetTotalTransferFeeDiscount indicates an expected call of GetTotalTransferFeeDiscount. +func (mr *MockTradingDataServiceClientV2MockRecorder) GetTotalTransferFeeDiscount(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTotalTransferFeeDiscount", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).GetTotalTransferFeeDiscount), varargs...) +} + // GetTransfer mocks base method. func (m *MockTradingDataServiceClientV2) GetTransfer(arg0 context.Context, arg1 *v2.GetTransferRequest, arg2 ...grpc.CallOption) (*v2.GetTransferResponse, error) { m.ctrl.T.Helper() @@ -1560,6 +1600,26 @@ func (mr *MockTradingDataServiceClientV2MockRecorder) ListFundingPeriods(arg0, a return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListFundingPeriods", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).ListFundingPeriods), varargs...) } +// ListGames mocks base method. +func (m *MockTradingDataServiceClientV2) ListGames(arg0 context.Context, arg1 *v2.ListGamesRequest, arg2 ...grpc.CallOption) (*v2.ListGamesResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListGames", varargs...) + ret0, _ := ret[0].(*v2.ListGamesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListGames indicates an expected call of ListGames. +func (mr *MockTradingDataServiceClientV2MockRecorder) ListGames(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGames", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).ListGames), varargs...) +} + // ListGovernanceData mocks base method. func (m *MockTradingDataServiceClientV2) ListGovernanceData(arg0 context.Context, arg1 *v2.ListGovernanceDataRequest, arg2 ...grpc.CallOption) (*v2.ListGovernanceDataResponse, error) { m.ctrl.T.Helper() @@ -1900,6 +1960,46 @@ func (mr *MockTradingDataServiceClientV2MockRecorder) ListParties(arg0, arg1 int return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListParties", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).ListParties), varargs...) } +// ListPartiesProfiles mocks base method. +func (m *MockTradingDataServiceClientV2) ListPartiesProfiles(arg0 context.Context, arg1 *v2.ListPartiesProfilesRequest, arg2 ...grpc.CallOption) (*v2.ListPartiesProfilesResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListPartiesProfiles", varargs...) + ret0, _ := ret[0].(*v2.ListPartiesProfilesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListPartiesProfiles indicates an expected call of ListPartiesProfiles. +func (mr *MockTradingDataServiceClientV2MockRecorder) ListPartiesProfiles(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPartiesProfiles", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).ListPartiesProfiles), varargs...) +} + +// ListPartyMarginModes mocks base method. +func (m *MockTradingDataServiceClientV2) ListPartyMarginModes(arg0 context.Context, arg1 *v2.ListPartyMarginModesRequest, arg2 ...grpc.CallOption) (*v2.ListPartyMarginModesResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListPartyMarginModes", varargs...) + ret0, _ := ret[0].(*v2.ListPartyMarginModesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListPartyMarginModes indicates an expected call of ListPartyMarginModes. +func (mr *MockTradingDataServiceClientV2MockRecorder) ListPartyMarginModes(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPartyMarginModes", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).ListPartyMarginModes), varargs...) +} + // ListPositions mocks base method. func (m *MockTradingDataServiceClientV2) ListPositions(arg0 context.Context, arg1 *v2.ListPositionsRequest, arg2 ...grpc.CallOption) (*v2.ListPositionsResponse, error) { m.ctrl.T.Helper() @@ -2060,6 +2160,26 @@ func (mr *MockTradingDataServiceClientV2MockRecorder) ListSuccessorMarkets(arg0, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSuccessorMarkets", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).ListSuccessorMarkets), varargs...) } +// ListTeamMembersStatistics mocks base method. +func (m *MockTradingDataServiceClientV2) ListTeamMembersStatistics(arg0 context.Context, arg1 *v2.ListTeamMembersStatisticsRequest, arg2 ...grpc.CallOption) (*v2.ListTeamMembersStatisticsResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListTeamMembersStatistics", varargs...) + ret0, _ := ret[0].(*v2.ListTeamMembersStatisticsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListTeamMembersStatistics indicates an expected call of ListTeamMembersStatistics. +func (mr *MockTradingDataServiceClientV2MockRecorder) ListTeamMembersStatistics(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListTeamMembersStatistics", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).ListTeamMembersStatistics), varargs...) +} + // ListTeamRefereeHistory mocks base method. func (m *MockTradingDataServiceClientV2) ListTeamRefereeHistory(arg0 context.Context, arg1 *v2.ListTeamRefereeHistoryRequest, arg2 ...grpc.CallOption) (*v2.ListTeamRefereeHistoryResponse, error) { m.ctrl.T.Helper() @@ -2120,6 +2240,26 @@ func (mr *MockTradingDataServiceClientV2MockRecorder) ListTeams(arg0, arg1 inter return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListTeams", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).ListTeams), varargs...) } +// ListTeamsStatistics mocks base method. +func (m *MockTradingDataServiceClientV2) ListTeamsStatistics(arg0 context.Context, arg1 *v2.ListTeamsStatisticsRequest, arg2 ...grpc.CallOption) (*v2.ListTeamsStatisticsResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListTeamsStatistics", varargs...) + ret0, _ := ret[0].(*v2.ListTeamsStatisticsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListTeamsStatistics indicates an expected call of ListTeamsStatistics. +func (mr *MockTradingDataServiceClientV2MockRecorder) ListTeamsStatistics(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListTeamsStatistics", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).ListTeamsStatistics), varargs...) +} + // ListTrades mocks base method. func (m *MockTradingDataServiceClientV2) ListTrades(arg0 context.Context, arg1 *v2.ListTradesRequest, arg2 ...grpc.CallOption) (*v2.ListTradesResponse, error) { m.ctrl.T.Helper() @@ -2460,6 +2600,26 @@ func (mr *MockTradingDataServiceClientV2MockRecorder) ObserveTrades(arg0, arg1 i return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObserveTrades", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).ObserveTrades), varargs...) } +// ObserveTransactionResults mocks base method. +func (m *MockTradingDataServiceClientV2) ObserveTransactionResults(arg0 context.Context, arg1 *v2.ObserveTransactionResultsRequest, arg2 ...grpc.CallOption) (v2.TradingDataService_ObserveTransactionResultsClient, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ObserveTransactionResults", varargs...) + ret0, _ := ret[0].(v2.TradingDataService_ObserveTransactionResultsClient) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ObserveTransactionResults indicates an expected call of ObserveTransactionResults. +func (mr *MockTradingDataServiceClientV2MockRecorder) ObserveTransactionResults(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObserveTransactionResults", reflect.TypeOf((*MockTradingDataServiceClientV2)(nil).ObserveTransactionResults), varargs...) +} + // ObserveVotes mocks base method. func (m *MockTradingDataServiceClientV2) ObserveVotes(arg0 context.Context, arg1 *v2.ObserveVotesRequest, arg2 ...grpc.CallOption) (v2.TradingDataService_ObserveVotesClient, error) { m.ctrl.T.Helper() diff --git a/datanode/gateway/graphql/modelext.go b/datanode/gateway/graphql/modelext.go index 06fcc76c27..2a507ceb99 100644 --- a/datanode/gateway/graphql/modelext.go +++ b/datanode/gateway/graphql/modelext.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/models.go b/datanode/gateway/graphql/models.go index 6be791ccbd..c1e6f04497 100644 --- a/datanode/gateway/graphql/models.go +++ b/datanode/gateway/graphql/models.go @@ -30,6 +30,10 @@ type ExternalDataSourceKind interface { IsExternalDataSourceKind() } +type GameEntity interface { + IsGameEntity() +} + type GovernanceTransferKind interface { IsGovernanceTransferKind() } @@ -58,6 +62,10 @@ type ProposalChange interface { IsProposalChange() } +type ProposalNode interface { + IsProposalNode() +} + type RiskModel interface { IsRiskModel() } @@ -95,6 +103,29 @@ type WithdrawalDetails interface { IsWithdrawalDetails() } +// Margins for a hypothetical position not related to any existing party +type AbstractMarginLevels struct { + // Market in which the margin is required for this party + Market *vega.Market `json:"market"` + // Asset for the current margins + Asset *vega.Asset `json:"asset"` + // Minimal margin for the position to be maintained in the network (unsigned integer) + MaintenanceLevel string `json:"maintenanceLevel"` + // If the margin is between maintenance and search, the network will initiate a collateral search, expressed as unsigned integer + SearchLevel string `json:"searchLevel"` + // This is the minimum margin required for a party to place a new order on the network, expressed as unsigned integer + InitialLevel string `json:"initialLevel"` + // When in isolated margin, the required order margin level, otherwise, 0 + OrderMarginLevel string `json:"orderMarginLevel"` + // If the margin of the party is greater than this level, then collateral will be released from the margin account into + // the general account of the party for the given asset. + CollateralReleaseLevel string `json:"collateralReleaseLevel"` + // Margin mode of the party, cross margin or isolated margin + MarginMode vega.MarginMode `json:"marginMode"` + // Margin factor, only relevant for isolated margin mode, else 0 + MarginFactor string `json:"marginFactor"` +} + // An auction duration is used to configure 3 auction periods: // 1. `duration > 0`, `volume == 0`: // The auction will last for at least N seconds. @@ -109,6 +140,41 @@ type AuctionDuration struct { Volume int `json:"volume"` } +type BatchProposal struct { + // Proposal ID that is provided by Vega once proposal reaches the network + ID *string `json:"id"` + // A UUID reference to aid tracking proposals on Vega + Reference string `json:"reference"` + // Party that prepared the proposal + Party *vega.Party `json:"party"` + // State of the proposal + State vega.Proposal_State `json:"state"` + // RFC3339Nano time and date when the proposal reached the network + Datetime int64 `json:"datetime"` + // Terms of all the proposals in the batch + BatchTerms *vega.BatchProposalTerms `json:"batchTerms"` + // Rationale behind the proposal + Rationale *vega.ProposalRationale `json:"rationale"` + // Votes cast for this proposal + Votes *ProposalVotes `json:"votes"` + // Reason the proposal was rejected + RejectionReason *vega.ProposalError `json:"rejectionReason"` + // Details of the rejection reason + ErrorDetails *string `json:"errorDetails"` + // Required majority for this proposal to succeed + RequiredMajority string `json:"requiredMajority"` + // Required participation for this proposal to succeed + RequiredParticipation string `json:"requiredParticipation"` + // Equity-like share required for a market amendment proposal to be enacted, represented as a fraction that can be converted to a percentage. If not met, the proposal will not be enacted + RequiredLpMajority *string `json:"requiredLpMajority"` + // The market share of LPs' equity-like share that must take part in a market amendment vote for the proposal to pass. This means the votes of LPs that have submitted more liquidity to that market, or have been LPs from the start carry more weight. If it requires 50% of a market's equity-like share for a majority, and the full batch of proposals receives all YES votes but only LPs with 49% of the equity-like share voted, the proposal will not pass + RequiredLpParticipation *string `json:"requiredLpParticipation"` + // Proposals that are part of the batch + SubProposals []*vega.Proposal `json:"subProposals"` +} + +func (BatchProposal) IsProposalNode() {} + // A Vega builtin asset, mostly for testing purpose type BuiltinAsset struct { // Maximum amount that can be requested by a party through the built-in asset faucet at a time @@ -172,18 +238,6 @@ type DataSourceSpec struct { Status DataSourceSpecStatus `json:"status"` } -// Bindings to describe which property of the data source data is to be used as settlement data -// and which is to be used as the trading termination trigger. -type DataSourceSpecPerpetualBinding struct { - // Name of the property in the source data that should be used as settlement data. - // For example, if it is set to "prices.BTC.value", then the perpetual market will use the value of this property - // as settlement data. - SettlementDataProperty string `json:"settlementDataProperty"` - // Name of the property in the source data that should be used as settlement schedule. - // For example, if it is set to "prices.BTC.timestamp", then the perpetual market will use the value of this property - SettlementScheduleProperty string `json:"settlementScheduleProperty"` -} - // Frequent batch auctions trading mode type DiscreteTrading struct { // Duration of the discrete trading batch in nanoseconds. Maximum 1 month. @@ -361,14 +415,32 @@ type Filter struct { Conditions []*Condition `json:"conditions"` } +// Individual party participating in a game and their metrics +type IndividualGameEntity struct { + // Party ID of the participant + Individual string `json:"individual"` + // The rank of the individual within the game. If the individual is in a team, then the rank of the individual in the team + Rank int `json:"rank"` + // The volume traded by the individual + Volume string `json:"volume"` + // The reward metric applied to the game + RewardMetric vega.DispatchMetric `json:"rewardMetric"` + // The rewards earned by the individual during the epoch + RewardEarned string `json:"rewardEarned"` + // Total rewards earned by the individual during the game + TotalRewardsEarned string `json:"totalRewardsEarned"` + // The rewards earned by the individual during the epoch in quantum value + RewardEarnedQuantum string `json:"rewardEarnedQuantum"` + // Total rewards earned by the individual during the game in quantum value + TotalRewardsEarnedQuantum string `json:"totalRewardsEarnedQuantum"` +} + +func (IndividualGameEntity) IsGameEntity() {} + // Configuration of a market liquidity monitoring parameters type LiquidityMonitoringParameters struct { // Specifies parameters related to target stake calculation TargetStakeParameters *TargetStakeParameters `json:"targetStakeParameters"` - // Specifies the triggering ratio for entering liquidity auction - TriggeringRatio string `json:"triggeringRatio"` - // Specifies by how many seconds an auction should be extended if leaving the auction were to trigger a liquidity auction - AuctionExtensionSecs int `json:"auctionExtensionSecs"` } // The equity like share of liquidity fee for each liquidity provider @@ -528,22 +600,12 @@ type OrderEstimate struct { MarginLevels *vega.MarginLevels `json:"marginLevels"` } -// Basic description of an order -type OrderInfo struct { - // Whether the order is to buy or sell - Side vega.Side `json:"side"` - // Price for the order - Price string `json:"price"` - // Number of units remaining of the total that have not yet been bought or sold (uint64) - Remaining string `json:"remaining"` - // Boolean indicating a market order - IsMarketOrder bool `json:"isMarketOrder"` -} - // Response for the estimate of the margin level and, if available, collateral was provided in the request, liquidation price for the specified position type PositionEstimate struct { // Margin level range estimate for the specified position Margin *v2.MarginEstimate `json:"margin"` + // Estimated margin account balance increase + CollateralIncreaseEstimate *v2.CollateralIncreaseEstimate `json:"collateralIncreaseEstimate"` // Liquidation price range estimate for the specified position. Only populated if available collateral was specified in the request Liquidation *v2.LiquidationEstimate `json:"liquidation"` } @@ -703,6 +765,12 @@ type Signer struct { Signer SignerKind `json:"signer"` } +// Describes which property of the data source data should be +// used as composite price source. +type SpecBindingForCompositePrice struct { + PriceSourceProperty string `json:"priceSourceProperty"` +} + // All staking information related to a Party. // Contains the current recognised balance by the network and // all the StakeLink/Unlink seen by the network @@ -735,6 +803,36 @@ type TargetStakeParameters struct { ScalingFactor float64 `json:"scalingFactor"` } +// Team participating in a game and their metrics. +type TeamGameEntity struct { + // Breakdown of the team members and their contributions to the total team metrics. + Team *TeamParticipation `json:"team"` + // Rank of the team within the game. + Rank int `json:"rank"` + // Total volume traded by the team + Volume string `json:"volume"` + // Reward metric applied to the game. + RewardMetric vega.DispatchMetric `json:"rewardMetric"` + // Total rewards earned by the team during the epoch + RewardEarned string `json:"rewardEarned"` + // Total rewards earned by the team for the game + TotalRewardsEarned string `json:"totalRewardsEarned"` + // Total rewards earned by the team during the epoch in quantum value + RewardEarnedQuantum string `json:"rewardEarnedQuantum"` + // Total rewards earned by the team for the game in quantum value + TotalRewardsEarnedQuantum string `json:"totalRewardsEarnedQuantum"` +} + +func (TeamGameEntity) IsGameEntity() {} + +// Team participation information, i.e. the team ID and the metrics for each participating team member. +type TeamParticipation struct { + // Team ID + TeamID string `json:"teamId"` + // List of participating team members and their metrics. + MembersParticipating []*IndividualGameEntity `json:"membersParticipating"` +} + type TimeUpdate struct { // RFC3339Nano time of new block time Timestamp int64 `json:"timestamp"` @@ -832,30 +930,10 @@ func (UpdateErc20) IsUpdateAssetSource() {} type UpdateInstrumentConfiguration struct { Code string `json:"code"` + Name string `json:"name"` Product UpdateProductConfiguration `json:"product"` } -type UpdatePerpetualProduct struct { - // Quote name of the instrument - QuoteName string `json:"quoteName"` - // Controls how much the upcoming funding payment liability contributes to party's margin, in the range [0, 1] - MarginFundingFactor string `json:"marginFundingFactor"` - // Continuously compounded interest rate used in funding rate calculation, in the range [-1, 1] - InterestRate string `json:"interestRate"` - // Lower bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1] - ClampLowerBound string `json:"clampLowerBound"` - // Upper bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1] - ClampUpperBound string `json:"clampUpperBound"` - // Data source specification describing the data source for settlement schedule - DataSourceSpecForSettlementSchedule *vega.DataSourceDefinition `json:"dataSourceSpecForSettlementSchedule"` - // Data source specification describing the data source for settlement - DataSourceSpecForSettlementData *vega.DataSourceDefinition `json:"dataSourceSpecForSettlementData"` - // Binding between the data source spec and the settlement data - DataSourceSpecBinding *DataSourceSpecPerpetualBinding `json:"dataSourceSpecBinding"` -} - -func (UpdatePerpetualProduct) IsUpdateProductConfiguration() {} - // Event types type BusEventType string @@ -906,6 +984,52 @@ func (e BusEventType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +type CompositePriceType string + +const ( + // Composite price is calculated as a weighted average of the underlying price sources + CompositePriceTypeCompositePriceTypeWeighted CompositePriceType = "COMPOSITE_PRICE_TYPE_WEIGHTED" + // Composite price is calculated as a median of the underlying price sources + CompositePriceTypeCompositePriceTypeMedian CompositePriceType = "COMPOSITE_PRICE_TYPE_MEDIAN" + // Composite price is set to the last trade (legacy) + CompositePriceTypeCompositePriceTypeLastTrade CompositePriceType = "COMPOSITE_PRICE_TYPE_LAST_TRADE" +) + +var AllCompositePriceType = []CompositePriceType{ + CompositePriceTypeCompositePriceTypeWeighted, + CompositePriceTypeCompositePriceTypeMedian, + CompositePriceTypeCompositePriceTypeLastTrade, +} + +func (e CompositePriceType) IsValid() bool { + switch e { + case CompositePriceTypeCompositePriceTypeWeighted, CompositePriceTypeCompositePriceTypeMedian, CompositePriceTypeCompositePriceTypeLastTrade: + return true + } + return false +} + +func (e CompositePriceType) String() string { + return string(e) +} + +func (e *CompositePriceType) UnmarshalGQL(v interface{}) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = CompositePriceType(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid CompositePriceType", str) + } + return nil +} + +func (e CompositePriceType) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + // Describes the status of the data spec type DataSourceSpecStatus string diff --git a/datanode/gateway/graphql/new_asset_resolver.go b/datanode/gateway/graphql/new_asset_resolver.go index d645ebfe8b..a0d06d297c 100644 --- a/datanode/gateway/graphql/new_asset_resolver.go +++ b/datanode/gateway/graphql/new_asset_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/new_freeform_resolver.go b/datanode/gateway/graphql/new_freeform_resolver.go index 31bab1ef40..cf32e997f1 100644 --- a/datanode/gateway/graphql/new_freeform_resolver.go +++ b/datanode/gateway/graphql/new_freeform_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/new_market_resolver.go b/datanode/gateway/graphql/new_market_resolver.go index 4c1ebec572..0c0c0c7a7e 100644 --- a/datanode/gateway/graphql/new_market_resolver.go +++ b/datanode/gateway/graphql/new_market_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( @@ -67,10 +55,7 @@ func (r *newMarketResolver) LiquidityMonitoringParameters(_ context.Context, obj return nil, nil } - lmp := &LiquidityMonitoringParameters{ - TriggeringRatio: params.TriggeringRatio, - AuctionExtensionSecs: int(params.AuctionExtension), - } + lmp := &LiquidityMonitoringParameters{} if params.TargetStakeParameters != nil { lmp.TargetStakeParameters = &TargetStakeParameters{ @@ -115,3 +100,15 @@ func (r *newMarketResolver) SuccessorConfiguration(ctx context.Context, obj *typ func (r *newMarketResolver) LiquiditySLAParameters(ctx context.Context, obj *types.NewMarket) (*types.LiquiditySLAParameters, error) { return obj.Changes.LiquiditySlaParameters, nil } + +func (r *newMarketResolver) LiquidityFeeSettings(ctx context.Context, obj *types.NewMarket) (*types.LiquidityFeeSettings, error) { + return obj.Changes.LiquidityFeeSettings, nil +} + +func (r *newMarketResolver) LiquidationStrategy(ctx context.Context, obj *types.NewMarket) (*types.LiquidationStrategy, error) { + return obj.Changes.LiquidationStrategy, nil +} + +func (r *newMarketResolver) MarkPriceConfiguration(ctx context.Context, obj *types.NewMarket) (*types.CompositePriceConfiguration, error) { + return obj.Changes.MarkPriceConfiguration, nil +} diff --git a/datanode/gateway/graphql/new_transfer_resolver.go b/datanode/gateway/graphql/new_transfer_resolver.go index 5f8053f9df..f3a24c82e4 100644 --- a/datanode/gateway/graphql/new_transfer_resolver.go +++ b/datanode/gateway/graphql/new_transfer_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/node_data_resolver.go b/datanode/gateway/graphql/node_data_resolver.go index fa9f77ccc5..0fd3f4da13 100644 --- a/datanode/gateway/graphql/node_data_resolver.go +++ b/datanode/gateway/graphql/node_data_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/node_resolver.go b/datanode/gateway/graphql/node_resolver.go index 38d344d9dd..91fa93eac6 100644 --- a/datanode/gateway/graphql/node_resolver.go +++ b/datanode/gateway/graphql/node_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/oracles_resolver.go b/datanode/gateway/graphql/oracles_resolver.go index b309186924..e417e29364 100644 --- a/datanode/gateway/graphql/oracles_resolver.go +++ b/datanode/gateway/graphql/oracles_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( @@ -221,7 +209,7 @@ func resolveNormaliser(obj any) (normaliser *Normaliser) { } // return } - //} + // } return } diff --git a/datanode/gateway/graphql/oracles_resolver_test.go b/datanode/gateway/graphql/oracles_resolver_test.go index 8762d44938..8337ffcdee 100644 --- a/datanode/gateway/graphql/oracles_resolver_test.go +++ b/datanode/gateway/graphql/oracles_resolver_test.go @@ -22,10 +22,10 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - vegapb "code.vegaprotocol.io/vega/protos/vega" v1 "code.vegaprotocol.io/vega/protos/vega/data/v1" + + "github.com/stretchr/testify/assert" ) func Test_oracleSpecResolver_DataSourceSpec(t *testing.T) { diff --git a/datanode/gateway/graphql/perpetual_data_resolver.go b/datanode/gateway/graphql/perpetual_data_resolver.go new file mode 100644 index 0000000000..c23e5e8b94 --- /dev/null +++ b/datanode/gateway/graphql/perpetual_data_resolver.go @@ -0,0 +1,53 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package gql + +import ( + "context" + "errors" + "math" + + "code.vegaprotocol.io/vega/datanode/vegatime" + "code.vegaprotocol.io/vega/protos/vega" + types "code.vegaprotocol.io/vega/protos/vega" +) + +type perpetualDataResolver VegaResolverRoot + +func (p perpetualDataResolver) SeqNum(_ context.Context, obj *vega.PerpetualData) (int, error) { + if obj.SeqNum > math.MaxInt { + return 0, errors.New("funding period sequence number is too large") + } + return int(obj.SeqNum), nil +} + +func (p perpetualDataResolver) InternalCompositePriceType(_ context.Context, obj *vega.PerpetualData) (CompositePriceType, error) { + if obj.InternalCompositePriceType == types.CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED { + return CompositePriceTypeCompositePriceTypeWeighted, nil + } else if obj.InternalCompositePriceType == types.CompositePriceType_COMPOSITE_PRICE_TYPE_MEDIAN { + return CompositePriceTypeCompositePriceTypeMedian, nil + } else { + return CompositePriceTypeCompositePriceTypeLastTrade, nil + } +} + +func (p perpetualDataResolver) InternalCompositePrice(_ context.Context, obj *vega.PerpetualData) (string, error) { + return obj.InternalCompositePrice, nil +} + +func (p perpetualDataResolver) NextInternalCompositePriceCalc(_ context.Context, obj *vega.PerpetualData) (string, error) { + return vegatime.Format(vegatime.UnixNano(obj.NextInternalCompositePriceCalc)), nil +} diff --git a/datanode/gateway/graphql/perps_resolver.go b/datanode/gateway/graphql/perps_resolver.go index c41bf61e95..649bef96db 100644 --- a/datanode/gateway/graphql/perps_resolver.go +++ b/datanode/gateway/graphql/perps_resolver.go @@ -36,26 +36,12 @@ func (r *perpetualResolver) DataSourceSpecForSettlementData(ctx context.Context, return resolveDataSourceSpec(obj.DataSourceSpecForSettlementData), nil } -func (r *perpetualResolver) DataSourceSpecBinding(ctx context.Context, obj *vega.Perpetual) (*DataSourceSpecPerpetualBinding, error) { - return &DataSourceSpecPerpetualBinding{ - SettlementDataProperty: obj.DataSourceSpecBinding.SettlementDataProperty, - SettlementScheduleProperty: obj.DataSourceSpecBinding.SettlementScheduleProperty, - }, nil -} - type perpetualProductResolver VegaResolverRoot func (r *perpetualProductResolver) SettlementAsset(ctx context.Context, obj *vega.PerpetualProduct) (*vega.Asset, error) { return r.r.getAssetByID(ctx, obj.SettlementAsset) } -func (r *perpetualProductResolver) DataSourceSpecBinding(ctx context.Context, obj *vega.PerpetualProduct) (*DataSourceSpecPerpetualBinding, error) { - return &DataSourceSpecPerpetualBinding{ - SettlementDataProperty: obj.DataSourceSpecBinding.SettlementDataProperty, - SettlementScheduleProperty: obj.DataSourceSpecBinding.SettlementScheduleProperty, - }, nil -} - func (r *perpetualProductResolver) DataSourceSpecForSettlementData(_ context.Context, obj *vegapb.PerpetualProduct) (*vegapb.DataSourceDefinition, error) { if obj.DataSourceSpecForSettlementData == nil { return nil, nil diff --git a/datanode/gateway/graphql/proposal_detail_resolver.go b/datanode/gateway/graphql/proposal_detail_resolver.go index 34df066586..d3c03bbf56 100644 --- a/datanode/gateway/graphql/proposal_detail_resolver.go +++ b/datanode/gateway/graphql/proposal_detail_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/proposal_edge_resolver.go b/datanode/gateway/graphql/proposal_edge_resolver.go new file mode 100644 index 0000000000..3c6610abdd --- /dev/null +++ b/datanode/gateway/graphql/proposal_edge_resolver.go @@ -0,0 +1,84 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package gql + +import ( + "context" + + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "code.vegaprotocol.io/vega/protos/vega" + types "code.vegaprotocol.io/vega/protos/vega" +) + +type proposalEdgeResolver VegaResolverRoot + +func (r *proposalEdgeResolver) ProposalNode(ctx context.Context, data *v2.GovernanceDataEdge) (ProposalNode, error) { + if data == nil || data.Node == nil || data.Node.Proposal == nil { + return nil, ErrInvalidProposal + } + + if data.GetNode().ProposalType == vega.GovernanceData_TYPE_BATCH { + return r.BatchProposal(ctx, data.Node) + } + + return data.Node, nil +} + +func (r *proposalEdgeResolver) Proposal(ctx context.Context, data *v2.GovernanceDataEdge) (*vega.GovernanceData, error) { + if data == nil || data.Node == nil || data.Node.Proposal == nil { + return nil, ErrInvalidProposal + } + + if data.GetNode().ProposalType == vega.GovernanceData_TYPE_BATCH { + return nil, nil + } + + return data.Node, nil +} + +func (r *proposalEdgeResolver) BatchProposal(ctx context.Context, data *types.GovernanceData) (ProposalNode, error) { + proposal := data.Proposal + + resolver := (*proposalResolver)(r) + + party, err := resolver.Party(ctx, data) + if err != nil { + return nil, err + } + + votes, err := resolver.Votes(ctx, data) + if err != nil { + return nil, err + } + + return BatchProposal{ + ID: &proposal.Id, + Reference: proposal.Reference, + Party: party, + State: proposal.State, + Datetime: proposal.Timestamp, + Rationale: proposal.Rationale, + BatchTerms: proposal.BatchTerms, + Votes: votes, + RejectionReason: proposal.Reason, + ErrorDetails: proposal.ErrorDetails, + RequiredMajority: proposal.RequiredMajority, + RequiredParticipation: proposal.RequiredParticipation, + RequiredLpMajority: proposal.RequiredLiquidityProviderMajority, + RequiredLpParticipation: proposal.RequiredLiquidityProviderParticipation, + SubProposals: data.Proposals, + }, nil +} diff --git a/datanode/gateway/graphql/proposal_resolver.go b/datanode/gateway/graphql/proposal_resolver.go index 027d3c4e3d..be1d21b1a3 100644 --- a/datanode/gateway/graphql/proposal_resolver.go +++ b/datanode/gateway/graphql/proposal_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/proposal_terms_resolver.go b/datanode/gateway/graphql/proposal_terms_resolver.go index 19dd922ca1..1f107aaf81 100644 --- a/datanode/gateway/graphql/proposal_terms_resolver.go +++ b/datanode/gateway/graphql/proposal_terms_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( @@ -34,10 +22,62 @@ import ( "code.vegaprotocol.io/vega/libs/ptr" types "code.vegaprotocol.io/vega/protos/vega" + vega "code.vegaprotocol.io/vega/protos/vega" ) var ErrUnsupportedProposalTermsChanges = errors.New("unsupported proposal terms changes") +type batchProposalTermsResolver VegaResolverRoot + +func (r *batchProposalTermsResolver) ClosingDatetime(ctx context.Context, obj *vega.BatchProposalTerms) (int64, error) { + // this is a unix timestamp (specified by users) + // needs to convert to time then UnixNano for the Timestamp resolver to work + return time.Unix(obj.ClosingTimestamp, 0).UnixNano(), nil +} + +type batchProposalTermsChangeResolver VegaResolverRoot + +func (r *batchProposalTermsChangeResolver) EnactmentDatetime(ctx context.Context, obj *vega.BatchProposalTermsChange) (*int64, error) { + var dt *int64 + if obj.EnactmentTimestamp != 0 { + // this is a unix timestamp (specified by users) + // needs to convert to time then UnixNano for the Timestamp resolver to work + dt = ptr.From(time.Unix(obj.EnactmentTimestamp, 0).UnixNano()) + } + return dt, nil +} + +func (r *batchProposalTermsChangeResolver) Change(ctx context.Context, obj *vega.BatchProposalTermsChange) (ProposalChange, error) { + switch obj.Change.(type) { + case *types.BatchProposalTermsChange_UpdateMarket: + return obj.GetUpdateMarket(), nil + case *types.BatchProposalTermsChange_UpdateNetworkParameter: + return obj.GetUpdateNetworkParameter(), nil + case *types.BatchProposalTermsChange_NewMarket: + return obj.GetNewMarket(), nil + case *types.BatchProposalTermsChange_NewFreeform: + return obj.GetNewFreeform(), nil + case *types.BatchProposalTermsChange_UpdateAsset: + return obj.GetUpdateAsset(), nil + case *types.BatchProposalTermsChange_CancelTransfer: + return obj.GetCancelTransfer(), nil + case *types.BatchProposalTermsChange_NewTransfer: + return obj.GetNewTransfer(), nil + case *types.BatchProposalTermsChange_NewSpotMarket: + return obj.GetNewSpotMarket(), nil + case *types.BatchProposalTermsChange_UpdateSpotMarket: + return obj.GetUpdateSpotMarket(), nil + case *types.BatchProposalTermsChange_UpdateMarketState: + return obj.GetUpdateMarketState(), nil + case *types.BatchProposalTermsChange_UpdateReferralProgram: + return obj.GetUpdateReferralProgram(), nil + case *types.BatchProposalTermsChange_UpdateVolumeDiscountProgram: + return obj.GetUpdateVolumeDiscountProgram(), nil + default: + return nil, ErrUnsupportedProposalTermsChanges + } +} + type proposalTermsResolver VegaResolverRoot func (r *proposalTermsResolver) ClosingDatetime(ctx context.Context, obj *types.ProposalTerms) (int64, error) { diff --git a/datanode/gateway/graphql/ranking_score_resolver.go b/datanode/gateway/graphql/ranking_score_resolver.go index b2e0351801..f00a79d50f 100644 --- a/datanode/gateway/graphql/ranking_score_resolver.go +++ b/datanode/gateway/graphql/ranking_score_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/referral_program_resolver.go b/datanode/gateway/graphql/referral_program_resolver.go index bd6d2dc3f4..ed3671d476 100644 --- a/datanode/gateway/graphql/referral_program_resolver.go +++ b/datanode/gateway/graphql/referral_program_resolver.go @@ -21,7 +21,6 @@ import ( "math" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "code.vegaprotocol.io/vega/protos/vega" ) diff --git a/datanode/gateway/graphql/referral_set_resolver.go b/datanode/gateway/graphql/referral_set_resolver.go index 52f93962a0..3b93dcf2a3 100644 --- a/datanode/gateway/graphql/referral_set_resolver.go +++ b/datanode/gateway/graphql/referral_set_resolver.go @@ -23,6 +23,12 @@ import ( v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" ) +type referralSetResolver VegaResolverRoot + +func (t referralSetResolver) TotalMembers(_ context.Context, obj *v2.ReferralSet) (int, error) { + return int(obj.TotalMembers), nil +} + type referralSetRefereeResolver VegaResolverRoot func (r *referralSetRefereeResolver) AtEpoch(ctx context.Context, obj *v2.ReferralSetReferee) (int, error) { diff --git a/datanode/gateway/graphql/resolvers.go b/datanode/gateway/graphql/resolvers.go index e3651c7480..0767dc58f7 100644 --- a/datanode/gateway/graphql/resolvers.go +++ b/datanode/gateway/graphql/resolvers.go @@ -23,9 +23,6 @@ import ( "io" "strconv" - "github.com/shopspring/decimal" - "google.golang.org/grpc" - "code.vegaprotocol.io/vega/datanode/gateway" "code.vegaprotocol.io/vega/datanode/vegatime" "code.vegaprotocol.io/vega/libs/num" @@ -38,6 +35,9 @@ import ( commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" v1 "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/shopspring/decimal" + "google.golang.org/grpc" ) var ( @@ -121,11 +121,30 @@ func (r *VegaResolverRoot) MarginLevels() MarginLevelsResolver { return (*myMarginLevelsResolver)(r) } +// MarginLevels returns the market levels resolver. +func (r *VegaResolverRoot) MarginEstimate() MarginEstimateResolver { + return (*myMarginEstimateResolver)(r) +} + // MarginLevelsUpdate returns the market levels resolver. func (r *VegaResolverRoot) MarginLevelsUpdate() MarginLevelsUpdateResolver { return (*myMarginLevelsUpdateResolver)(r) } +func (r *VegaResolverRoot) OrderInfo() OrderInfoResolver { + return (*myOrderInfoResolver)(r) +} + +type myOrderInfoResolver VegaResolverRoot + +func (r *myOrderInfoResolver) Remaining(ctx context.Context, obj *v2.OrderInfo, data string) error { + remaining, err := strconv.ParseUint(data, 10, 64) + if err == nil { + obj.Remaining = remaining + } + return err +} + // PriceLevel returns the price levels resolver. func (r *VegaResolverRoot) PriceLevel() PriceLevelResolver { return (*myPriceLevelResolver)(r) @@ -191,6 +210,11 @@ func (r *VegaResolverRoot) Proposal() ProposalResolver { return (*proposalResolver)(r) } +// Proposal returns the proposal resolver. +func (r *VegaResolverRoot) ProposalEdge() ProposalEdgeResolver { + return (*proposalEdgeResolver)(r) +} + // ProposalDetail returns the Proposal detail resolver. func (r *VegaResolverRoot) ProposalDetail() ProposalDetailResolver { return (*proposalDetailResolver)(r) @@ -268,6 +292,14 @@ func (r *VegaResolverRoot) ProposalTerms() ProposalTermsResolver { return (*proposalTermsResolver)(r) } +func (r *VegaResolverRoot) BatchProposalTerms() BatchProposalTermsResolver { + return (*batchProposalTermsResolver)(r) +} + +func (r *VegaResolverRoot) BatchProposalTermsChange() BatchProposalTermsChangeResolver { + return (*batchProposalTermsChangeResolver)(r) +} + func (r *VegaResolverRoot) UpdateMarket() UpdateMarketResolver { return (*updateMarketResolver)(r) } @@ -481,6 +513,14 @@ func (r *VegaResolverRoot) LiquiditySLAParameters() LiquiditySLAParametersResolv return (*liquiditySLAParametersResolver)(r) } +func (r *VegaResolverRoot) LiquidationStrategy() LiquidationStrategyResolver { + return (*liquidationStrategyResolver)(r) +} + +func (r *VegaResolverRoot) CompositePriceConfiguration() CompositePriceConfigurationResolver { + return (*compositePriceConfigurationResolver)(r) +} + func (r *VegaResolverRoot) NewSpotMarket() NewSpotMarketResolver { return (*newSpotMarketResolver)(r) } @@ -505,6 +545,10 @@ func (r *VegaResolverRoot) CurrentReferralProgram() CurrentReferralProgramResolv return (*currentReferralProgramResolver)(r) } +func (r *VegaResolverRoot) ReferralSet() ReferralSetResolver { + return (*referralSetResolver)(r) +} + func (r *VegaResolverRoot) ReferralSetReferee() ReferralSetRefereeResolver { return (*referralSetRefereeResolver)(r) } @@ -521,6 +565,22 @@ func (r *VegaResolverRoot) Team() TeamResolver { return (*teamResolver)(r) } +func (r *VegaResolverRoot) TeamStatistics() TeamStatisticsResolver { + return (*teamStatsResolver)(r) +} + +func (r *VegaResolverRoot) QuantumRewardsPerEpoch() QuantumRewardsPerEpochResolver { + return (*quantumRewardsPerEpochResolver)(r) +} + +func (r *VegaResolverRoot) QuantumVolumesPerEpoch() QuantumVolumesPerEpochResolver { + return (*quantumVolumesPerEpochResolver)(r) +} + +func (r *VegaResolverRoot) TeamMemberStatistics() TeamMemberStatisticsResolver { + return (*teamMemberStatsResolver)(r) +} + func (r *VegaResolverRoot) TeamReferee() TeamRefereeResolver { return (*teamRefereeResolver)(r) } @@ -589,6 +649,18 @@ func (r *VegaResolverRoot) DispatchStrategy() DispatchStrategyResolver { return (*dispatchStrategyResolver)(r) } +func (r *VegaResolverRoot) Game() GameResolver { + return (*gameResolver)(r) +} + +func (r *VegaResolverRoot) PartyMarginMode() PartyMarginModeResolver { + return (*marginModeResolver)(r) +} + +func (r *VegaResolverRoot) PerpetualData() PerpetualDataResolver { + return (*perpetualDataResolver)(r) +} + type protocolUpgradeProposalResolver VegaResolverRoot func (r *protocolUpgradeProposalResolver) UpgradeBlockHeight(_ context.Context, obj *eventspb.ProtocolUpgradeEvent) (string, error) { @@ -696,6 +768,59 @@ func (r *myDepositResolver) CreditedTimestamp(_ context.Context, obj *vegapb.Dep type myQueryResolver VegaResolverRoot +func (r *myQueryResolver) PartiesProfilesConnection(ctx context.Context, ids []string, pagination *v2.Pagination) (*v2.PartiesProfilesConnection, error) { + req := v2.ListPartiesProfilesRequest{ + Parties: ids, + Pagination: pagination, + } + + res, err := r.tradingDataClientV2.ListPartiesProfiles(ctx, &req) + if err != nil { + return nil, err + } + return res.Profiles, nil +} + +func (r *myQueryResolver) PartyMarginModes(ctx context.Context, marketID *string, partyID *string, pagination *v2.Pagination) (*v2.PartyMarginModesConnection, error) { + req := v2.ListPartyMarginModesRequest{ + MarketId: marketID, + PartyId: partyID, + Pagination: pagination, + } + + res, err := r.tradingDataClientV2.ListPartyMarginModes(ctx, &req) + if err != nil { + return nil, err + } + return res.PartyMarginModes, nil +} + +func (r *myQueryResolver) Games(ctx context.Context, gameID *string, epochFrom *int, epochTo *int, entityScope *vega.EntityScope, pagination *v2.Pagination) (*v2.GamesConnection, error) { + var from *uint64 + var to *uint64 + + if epochFrom != nil { + from = ptr.From(uint64(*epochFrom)) + } + + if epochTo != nil { + to = ptr.From(uint64(*epochTo)) + } + + req := v2.ListGamesRequest{ + GameId: gameID, + EpochFrom: from, + EpochTo: to, + EntityScope: entityScope, + Pagination: pagination, + } + res, err := r.tradingDataClientV2.ListGames(ctx, &req) + if err != nil { + return nil, err + } + return res.Games, nil +} + func (r *myQueryResolver) FundingPayments( ctx context.Context, partyID string, @@ -776,13 +901,21 @@ func (r *myQueryResolver) Positions(ctx context.Context, filter *v2.PositionsFil return resp.Positions, nil } -func (r *myQueryResolver) TransfersConnection(ctx context.Context, partyID *string, direction *TransferDirection, - pagination *v2.Pagination, isReward *bool, +func (r *myQueryResolver) TransfersConnection( + ctx context.Context, + partyID *string, + direction *TransferDirection, + pagination *v2.Pagination, + isReward *bool, + fromEpoch *int, + toEpoch *int, + status *eventspb.Transfer_Status, + scope *v2.ListTransfersRequest_Scope, ) (*v2.TransferConnection, error) { - return r.r.transfersConnection(ctx, partyID, direction, pagination, isReward) + return r.r.transfersConnection(ctx, partyID, direction, pagination, isReward, fromEpoch, toEpoch, status, scope) } -func (r *myQueryResolver) Transfer(ctx context.Context, id string) (*eventspb.Transfer, error) { +func (r *myQueryResolver) Transfer(ctx context.Context, id string) (*v2.TransferNode, error) { req := v2.GetTransferRequest{ TransferId: id, } @@ -790,7 +923,7 @@ func (r *myQueryResolver) Transfer(ctx context.Context, id string) (*eventspb.Tr if err != nil { return nil, err } - return resp.Transfer, nil + return resp.TransferNode, nil } func (r *myQueryResolver) LastBlockHeight(ctx context.Context) (string, error) { @@ -1204,8 +1337,14 @@ func (r *myQueryResolver) EstimatePosition( ctx context.Context, marketId string, openVolume string, - orders []*OrderInfo, - collateralAvailable *string, + averageEntryPrice string, + orders []*v2.OrderInfo, + marginAccountBalance string, + generalAccountBalance string, + orderMarginAccountBalance string, + marginMode vega.MarginMode, + marginFactor *string, + incluedRequiredPositionMarginInAvailableCollateral *bool, scaleLiquidationPriceToMarketDecimals *bool, ) (*PositionEstimate, error) { ov, err := safeStringInt64(openVolume) @@ -1213,27 +1352,18 @@ func (r *myQueryResolver) EstimatePosition( return nil, err } - ord := make([]*v2.OrderInfo, 0, len(orders)) - for _, o := range orders { - r, err := safeStringUint64(o.Remaining) - if err != nil { - return nil, err - } - - ord = append(ord, &v2.OrderInfo{ - Side: o.Side, - Price: o.Price, - Remaining: r, - IsMarketOrder: o.IsMarketOrder, - }) - } - req := &v2.EstimatePositionRequest{ - MarketId: marketId, - OpenVolume: ov, - Orders: ord, - CollateralAvailable: collateralAvailable, - ScaleLiquidationPriceToMarketDecimals: scaleLiquidationPriceToMarketDecimals, + MarketId: marketId, + OpenVolume: ov, + AverageEntryPrice: averageEntryPrice, + Orders: orders, + MarginAccountBalance: marginAccountBalance, + GeneralAccountBalance: generalAccountBalance, + OrderMarginAccountBalance: orderMarginAccountBalance, + MarginMode: vegapb.MarginMode(vega.MarginMode_value[marginMode.String()]), + MarginFactor: marginFactor, + IncludeRequiredPositionMarginInAvailableCollateral: incluedRequiredPositionMarginInAvailableCollateral, + ScaleLiquidationPriceToMarketDecimals: scaleLiquidationPriceToMarketDecimals, } resp, err := r.tradingDataClientV2.EstimatePosition(ctx, req) @@ -1242,8 +1372,9 @@ func (r *myQueryResolver) EstimatePosition( } return &PositionEstimate{ - Margin: resp.Margin, - Liquidation: resp.Liquidation, + Margin: resp.Margin, + CollateralIncreaseEstimate: resp.CollateralIncreaseEstimate, + Liquidation: resp.Liquidation, }, nil } @@ -1333,7 +1464,7 @@ func (r *myQueryResolver) ProposalsConnection(ctx context.Context, proposalType return handleProposalsRequest(ctx, r.tradingDataClientV2, nil, nil, proposalType, inState, pagination) } -func (r *myQueryResolver) Proposal(ctx context.Context, id *string, reference *string) (*vegapb.GovernanceData, error) { +func (r *myQueryResolver) Proposal(ctx context.Context, id *string, reference *string) (ProposalNode, error) { if id != nil { resp, err := r.tradingDataClientV2.GetGovernanceData(ctx, &v2.GetGovernanceDataRequest{ ProposalId: id, @@ -1341,6 +1472,12 @@ func (r *myQueryResolver) Proposal(ctx context.Context, id *string, reference *s if err != nil { return nil, err } + + resolver := (*proposalEdgeResolver)(r) + if resp.GetData().ProposalType == vega.GovernanceData_TYPE_BATCH { + return resolver.BatchProposal(ctx, resp.GetData()) + } + return resp.Data, nil } else if reference != nil { resp, err := r.tradingDataClientV2.GetGovernanceData(ctx, &v2.GetGovernanceDataRequest{ @@ -1349,6 +1486,12 @@ func (r *myQueryResolver) Proposal(ctx context.Context, id *string, reference *s if err != nil { return nil, err } + + resolver := (*proposalEdgeResolver)(r) + if resp.GetData().ProposalType == vega.GovernanceData_TYPE_BATCH { + return resolver.BatchProposal(ctx, resp.GetData()) + } + return resp.Data, nil } @@ -1729,6 +1872,43 @@ func (r *myQueryResolver) Teams(ctx context.Context, teamID *string, partyID *st return teams.Teams, nil } +func (r *myQueryResolver) TeamsStatistics(ctx context.Context, teamID *string, aggregationEpochs *int, pagination *v2.Pagination) (*v2.TeamsStatisticsConnection, error) { + filters := &v2.ListTeamsStatisticsRequest{ + TeamId: teamID, + Pagination: pagination, + } + + if aggregationEpochs != nil { + filters.AggregationEpochs = ptr.From(uint64(*aggregationEpochs)) + } + + stats, err := r.tradingDataClientV2.ListTeamsStatistics(ctx, filters) + if err != nil { + return nil, err + } + + return stats.Statistics, nil +} + +func (r *myQueryResolver) TeamMembersStatistics(ctx context.Context, teamID string, partyID *string, aggregationEpochs *int, pagination *v2.Pagination) (*v2.TeamMembersStatisticsConnection, error) { + filters := &v2.ListTeamMembersStatisticsRequest{ + TeamId: teamID, + PartyId: partyID, + Pagination: pagination, + } + + if aggregationEpochs != nil { + filters.AggregationEpochs = ptr.From(uint64(*aggregationEpochs)) + } + + stats, err := r.tradingDataClientV2.ListTeamMembersStatistics(ctx, filters) + if err != nil { + return nil, err + } + + return stats.Statistics, nil +} + func (r *myQueryResolver) TeamReferees(ctx context.Context, teamID string, pagination *v2.Pagination) (*v2.TeamRefereeConnection, error) { referees, err := r.tradingDataClientV2.ListTeamReferees(ctx, &v2.ListTeamRefereesRequest{ TeamId: teamID, @@ -1831,6 +2011,44 @@ func (r *myQueryResolver) PaidLiquidityFees( return resp.PaidLiquidityFees, nil } +func (r *myQueryResolver) TotalTransferFeeDiscount( + ctx context.Context, + partyId string, + assetId string, +) (*v2.GetTotalTransferFeeDiscountResponse, error) { + resp, err := r.tradingDataClientV2.GetTotalTransferFeeDiscount(ctx, &v2.GetTotalTransferFeeDiscountRequest{ + PartyId: partyId, + AssetId: assetId, + }) + if err != nil { + return nil, err + } + + return resp, nil +} + +func (r *myQueryResolver) EstimateTransferFee( + ctx context.Context, + fromAccount string, + fromAccountType vega.AccountType, + toAccount string, + amount string, + assetId string, +) (*v2.EstimateTransferFeeResponse, error) { + resp, err := r.tradingDataClientV2.EstimateTransferFee(ctx, &v2.EstimateTransferFeeRequest{ + FromAccount: fromAccount, + FromAccountType: fromAccountType, + ToAccount: toAccount, + Amount: amount, + AssetId: assetId, + }) + if err != nil { + return nil, err + } + + return resp, nil +} + // END: Root Resolver type myNodeSignatureResolver VegaResolverRoot @@ -1903,11 +2121,16 @@ func (r *myPartyResolver) TransfersConnection( direction *TransferDirection, pagination *v2.Pagination, isReward *bool, + fromEpoch, toEpoch *int, + status *eventspb.Transfer_Status, + scope *v2.ListTransfersRequest_Scope, ) (*v2.TransferConnection, error) { - return r.r.transfersConnection(ctx, &party.Id, direction, pagination, isReward) + return r.r.transfersConnection(ctx, &party.Id, direction, pagination, isReward, fromEpoch, toEpoch, status, scope) } -func (r *myPartyResolver) RewardsConnection(ctx context.Context, party *vegapb.Party, assetID *string, pagination *v2.Pagination, fromEpoch *int, toEpoch *int) (*v2.RewardsConnection, error) { +func (r *myPartyResolver) RewardsConnection(ctx context.Context, party *vegapb.Party, assetID *string, pagination *v2.Pagination, + fromEpoch *int, toEpoch *int, teamID, gameID *string, +) (*v2.RewardsConnection, error) { var from, to *uint64 if fromEpoch != nil { @@ -1931,6 +2154,8 @@ func (r *myPartyResolver) RewardsConnection(ctx context.Context, party *vegapb.P Pagination: pagination, FromEpoch: from, ToEpoch: to, + TeamId: teamID, + GameId: gameID, } resp, err := r.tradingDataClientV2.ListRewards(ctx, &req) if err != nil { @@ -2193,6 +2418,7 @@ func (r *myPartyResolver) AccountsConnection(ctx context.Context, party *vegapb. accTy = *accType if accTy != vegapb.AccountType_ACCOUNT_TYPE_GENERAL && accTy != vegapb.AccountType_ACCOUNT_TYPE_MARGIN && + accTy != vegapb.AccountType_ACCOUNT_TYPE_ORDER_MARGIN && accTy != vegapb.AccountType_ACCOUNT_TYPE_BOND && accTy != vega.AccountType_ACCOUNT_TYPE_VESTED_REWARDS && accTy != vega.AccountType_ACCOUNT_TYPE_VESTING_REWARDS { @@ -2291,6 +2517,14 @@ func (r *myMarginLevelsUpdateResolver) MaintenanceLevel(_ context.Context, m *ve return m.MaintenanceMargin, nil } +func (r *myMarginLevelsUpdateResolver) OrderMarginLevel(_ context.Context, m *vegapb.MarginLevels) (string, error) { + return m.OrderMargin, nil +} + +func (r *myMarginLevelsUpdateResolver) MarginFactor(_ context.Context, m *vegapb.MarginLevels) (string, error) { + return m.MarginFactor, nil +} + // BEGIN: MarginLevels Resolver type myMarginLevelsResolver VegaResolverRoot @@ -2335,6 +2569,14 @@ func (r *myMarginLevelsResolver) MaintenanceLevel(_ context.Context, m *vegapb.M return m.MaintenanceMargin, nil } +func (r *myMarginLevelsResolver) OrderMarginLevel(_ context.Context, m *vegapb.MarginLevels) (string, error) { + return m.OrderMargin, nil +} + +func (r *myMarginLevelsResolver) MarginFactor(_ context.Context, m *vegapb.MarginLevels) (string, error) { + return m.MarginFactor, nil +} + // END: MarginLevels Resolver type myOrderUpdateResolver VegaResolverRoot @@ -2673,6 +2915,14 @@ func (m *myDataSourceSpecConfigurationTimeTriggerResolver) Conditions(ctx contex // BEGIN: EthCallSpec Resolver. type ethCallSpecResolver VegaResolverRoot +func (m *ethCallSpecResolver) SourceChainID(ctx context.Context, obj *vegapb.EthCallSpec) (int, error) { + if obj != nil { + return int(obj.SourceChainId), nil + } + + return 0, nil +} + func (m *ethCallSpecResolver) Abi(ctx context.Context, obj *vegapb.EthCallSpec) ([]string, error) { if obj != nil { if len(obj.Abi) > 0 { diff --git a/datanode/gateway/graphql/resolvers_test.go b/datanode/gateway/graphql/resolvers_test.go index c84f2d912a..ec9e001315 100644 --- a/datanode/gateway/graphql/resolvers_test.go +++ b/datanode/gateway/graphql/resolvers_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql_test import ( @@ -34,11 +22,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "google.golang.org/grpc" - dstypes "code.vegaprotocol.io/vega/core/datasource/common" "code.vegaprotocol.io/vega/datanode/gateway" gql "code.vegaprotocol.io/vega/datanode/gateway/graphql" @@ -48,6 +31,11 @@ import ( "code.vegaprotocol.io/vega/protos/vega" protoTypes "code.vegaprotocol.io/vega/protos/vega" datav1 "code.vegaprotocol.io/vega/protos/vega/data/v1" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/grpc" ) func TestNewResolverRoot_ConstructAndResolve(t *testing.T) { @@ -317,9 +305,7 @@ func getTestMarket() *protoTypes.Market { }, }, }, - LiquidityMonitoringParameters: &protoTypes.LiquidityMonitoringParameters{ - TriggeringRatio: "0.3", - }, + LiquidityMonitoringParameters: &protoTypes.LiquidityMonitoringParameters{}, } } @@ -683,7 +669,6 @@ func TestNewResolverRoot_Proposals(t *testing.T) { ) var ( - p *protoTypes.GovernanceData terms *protoTypes.ProposalTerms newMarket *protoTypes.ProposalTerms_NewMarket asset *protoTypes.Asset @@ -691,7 +676,8 @@ func TestNewResolverRoot_Proposals(t *testing.T) { err error ) - p, err = root.Query().Proposal(ctx, &id, nil) + pn, err := root.Query().Proposal(ctx, &id, nil) + p := pn.(*protoTypes.GovernanceData) t.Run("Proposal terms should be for a new market", func(t *testing.T) { terms, err = root.Proposal().Terms(ctx, p) @@ -743,7 +729,6 @@ func TestNewResolverRoot_Proposals(t *testing.T) { ) var ( - p *protoTypes.GovernanceData terms *protoTypes.ProposalTerms newMarket *protoTypes.ProposalTerms_NewSpotMarket asset *protoTypes.Asset @@ -751,7 +736,8 @@ func TestNewResolverRoot_Proposals(t *testing.T) { err error ) - p, err = root.Query().Proposal(ctx, &id, nil) + pn, err := root.Query().Proposal(ctx, &id, nil) + p := pn.(*protoTypes.GovernanceData) t.Run("Proposal should be for a new spot market", func(t *testing.T) { terms, err = root.Proposal().Terms(ctx, p) @@ -822,7 +808,6 @@ func TestNewResolverRoot_Proposals(t *testing.T) { ) var ( - p *protoTypes.GovernanceData terms *protoTypes.ProposalTerms newMarket *protoTypes.ProposalTerms_NewMarket asset *protoTypes.Asset @@ -830,7 +815,8 @@ func TestNewResolverRoot_Proposals(t *testing.T) { err error ) - p, err = root.Query().Proposal(ctx, &id, nil) + pn, err := root.Query().Proposal(ctx, &id, nil) + p := pn.(*protoTypes.GovernanceData) t.Run("Proposal terms should be for a new market", func(t *testing.T) { terms, err = root.Proposal().Terms(ctx, p) @@ -882,14 +868,14 @@ func TestNewResolverRoot_Proposals(t *testing.T) { ) var ( - p *protoTypes.GovernanceData terms *protoTypes.ProposalTerms newMarket *protoTypes.ProposalTerms_UpdateMarket product *protoTypes.UpdateInstrumentConfiguration_Future err error ) - p, err = root.Query().Proposal(ctx, &id, nil) + pn, err := root.Query().Proposal(ctx, &id, nil) + p := pn.(*protoTypes.GovernanceData) t.Run("Proposal terms should be to update market", func(t *testing.T) { terms, err = root.Proposal().Terms(ctx, p) @@ -966,13 +952,13 @@ func TestNewResolverRoot_Proposals(t *testing.T) { ) var ( - p *protoTypes.GovernanceData terms *protoTypes.ProposalTerms newMarket *protoTypes.ProposalTerms_UpdateSpotMarket err error ) - p, err = root.Query().Proposal(ctx, &id, nil) + pn, err := root.Query().Proposal(ctx, &id, nil) + p := pn.(*protoTypes.GovernanceData) t.Run("Proposal should be to update a spot market", func(t *testing.T) { terms, err = root.Proposal().Terms(ctx, p) @@ -1031,14 +1017,14 @@ func TestNewResolverRoot_Proposals(t *testing.T) { ) var ( - p *protoTypes.GovernanceData terms *protoTypes.ProposalTerms newMarket *protoTypes.ProposalTerms_UpdateMarket product *protoTypes.UpdateInstrumentConfiguration_Perpetual err error ) - p, err = root.Query().Proposal(ctx, &id, nil) + pn, err := root.Query().Proposal(ctx, &id, nil) + p := pn.(*protoTypes.GovernanceData) t.Run("Proposal terms should be to update market", func(t *testing.T) { // Test the proposal resolver to make sure the terms and underlying changes are correct @@ -1192,11 +1178,6 @@ func TestNewResolverRoot_PerpetualResolver(t *testing.T) { assert.Equal(t, want.DataSourceSpecForSettlementData.UpdatedAt, *gotData.UpdatedAt) assert.Equal(t, want.DataSourceSpecForSettlementData.Data, gotData.Data) assert.Equal(t, want.DataSourceSpecForSettlementData.Status.String(), gotData.Status.String()) - - wantBinding, err := root.Perpetual().DataSourceSpecBinding(ctx, perps) - require.NoError(t, err) - assert.Equal(t, want.DataSourceSpecBinding.SettlementScheduleProperty, wantBinding.SettlementScheduleProperty) - assert.Equal(t, want.DataSourceSpecBinding.SettlementDataProperty, wantBinding.SettlementDataProperty) } func TestNewResolverRoot_Resolver(t *testing.T) { diff --git a/datanode/gateway/graphql/reward.go b/datanode/gateway/graphql/reward.go index 66fe93c6be..81b4a684ad 100644 --- a/datanode/gateway/graphql/reward.go +++ b/datanode/gateway/graphql/reward.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/reward_summary.go b/datanode/gateway/graphql/reward_summary.go index cdbbd6d787..0a0c0cf65b 100644 --- a/datanode/gateway/graphql/reward_summary.go +++ b/datanode/gateway/graphql/reward_summary.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/schema.graphql b/datanode/gateway/graphql/schema.graphql index 9200dbf3cf..cfc48234ba 100644 --- a/datanode/gateway/graphql/schema.graphql +++ b/datanode/gateway/graphql/schema.graphql @@ -5,6 +5,14 @@ schema { subscription: Subscription } +"Generic structure holding a key/value pair." +type Metadata { + "Key of the metadata." + key: String! + "Value of the metadata." + value: String! +} + "The result from processing a transaction" type TransactionResult { "The party which submitted this transaction" @@ -127,9 +135,9 @@ type Subscription { "ID of the party from which you want trades updates" partyId: ID ): [TradeUpdate!] - @deprecated( - reason: "Use tradesStream instead as it allows for filtering multiple markets and/or parties at once" - ) + @deprecated( + reason: "Use tradesStream instead as it allows for filtering multiple markets and/or parties at once" + ) "Subscribe to the trades updates" tradesStream( @@ -160,6 +168,8 @@ type MarginLevels { searchLevel: String! "This is the minimum margin required for a party to place a new order on the network, expressed as unsigned integer" initialLevel: String! + "When in isolated margin, the required order margin level, otherwise, 0" + orderMarginLevel: String! """ If the margin of the party is greater than this level, then collateral will be released from the margin account into the general account of the party for the given asset. @@ -167,6 +177,46 @@ type MarginLevels { collateralReleaseLevel: String! "RFC3339Nano time from at which this margin level was relevant" timestamp: Timestamp! + + "Margin mode of the party, cross margin or isolated margin" + marginMode: MarginMode! + + "Margin factor, only relevant for isolated margin mode, else 0" + marginFactor: String! +} + +"Margins for a hypothetical position not related to any existing party" +type AbstractMarginLevels { + "Market in which the margin is required for this party" + market: Market! + "Asset for the current margins" + asset: Asset! + "Minimal margin for the position to be maintained in the network (unsigned integer)" + maintenanceLevel: String! + "If the margin is between maintenance and search, the network will initiate a collateral search, expressed as unsigned integer" + searchLevel: String! + "This is the minimum margin required for a party to place a new order on the network, expressed as unsigned integer" + initialLevel: String! + "When in isolated margin, the required order margin level, otherwise, 0" + orderMarginLevel: String! + """ + If the margin of the party is greater than this level, then collateral will be released from the margin account into + the general account of the party for the given asset. + """ + collateralReleaseLevel: String! + "Margin mode of the party, cross margin or isolated margin" + marginMode: MarginMode! + "Margin factor, only relevant for isolated margin mode, else 0" + marginFactor: String! +} + +enum MarginMode { + "Margin mode is not specified." + MARGIN_MODE_UNSPECIFIED + "Party is in cross margin mode" + MARGIN_MODE_CROSS_MARGIN + "Party is in isolated margin mode" + MARGIN_MODE_ISOLATED_MARGIN } "Margins for a given a party" @@ -183,6 +233,8 @@ type MarginLevelsUpdate { searchLevel: String! "This is the minimum margin required for a party to place a new order on the network (unsigned integer)" initialLevel: String! + "When in isolated margin, the required order margin level, otherwise, 0" + orderMarginLevel: String! """ If the margin of the party is greater than this level, then collateral will be released from the margin account into the general account of the party for the given asset. @@ -190,6 +242,12 @@ type MarginLevelsUpdate { collateralReleaseLevel: String! "RFC3339Nano time from at which this margin level was relevant" timestamp: Timestamp! + + "Margin mode of the party, cross margin or isolated margin" + marginMode: MarginMode! + + "Margin factor, only relevant for isolated margin mode, else 0" + marginFactor: String! } "Details of a perpetual product." @@ -202,16 +260,55 @@ type PerpetualData { externalTwap: String "Time-weighted average price calculated from data points for this period from the internal data source." internalTwap: String + "Funding period sequence number" + seqNum: Int! + "Time at which the funding period started" + startTime: Timestamp! + "Internal composite price used as input to the internal VWAP" + internalCompositePrice: String! + "The methodology used to calculated internal composite price for perpetual markets" + internalCompositePriceType: CompositePriceType! + "RFC3339Nano time indicating the next time internal composite price will be calculated for perpetual markets, where applicable" + nextInternalCompositePriceCalc: String! + "The last value from the external oracle" + underlyingIndexPrice: String! + "The internal state of the underlying internal composite price" + internalCompositePriceState: CompositePriceState +} + +type CompositePriceSource { + "The current value of the composite source price" + price: String! + "The last time the price source was updated in RFC3339Nano" + lastUpdated: Timestamp! + "The source of the price" + PriceSource: String! +} + +type CompositePriceState { + "Underlying state of the composite price" + priceSources: [CompositePriceSource!] } union ProductData = PerpetualData +enum CompositePriceType { + "Composite price is calculated as a weighted average of the underlying price sources" + COMPOSITE_PRICE_TYPE_WEIGHTED + "Composite price is calculated as a median of the underlying price sources" + COMPOSITE_PRICE_TYPE_MEDIAN + "Composite price is set to the last trade (legacy)" + COMPOSITE_PRICE_TYPE_LAST_TRADE +} + "Live data of a Market" type MarketData { "Market of the associated mark price" market: Market! "The mark price (an unsigned integer)" markPrice: String! + "The methodology used for the calculation of the mark price" + markPriceType: CompositePriceType! "The highest price level on an order book for buy orders." bestBidPrice: String! "The aggregated volume being bid at the best bid price." @@ -274,6 +371,10 @@ type MarketData { lastTradedPrice: String! "The current funding rate. This applies only to a perpetual market" productData: ProductData + "RFC3339Nano time indicating the next time the network will attempt to close part of its position" + nextNetworkCloseout: String! + "State of the underlying internal composite price" + markPriceState: CompositePriceState } "Live data of a Market" @@ -342,6 +443,10 @@ type ObservableMarketData { lastTradedPrice: String! "The current funding rate. This applies only to a perpetual market" productData: ProductData + "The methodology used to calculated mark price" + markPriceType: CompositePriceType! + "State of the underlying internal composite price" + markPriceState: CompositePriceState } "Timestamps for when the market changes state" @@ -464,6 +569,8 @@ input LedgerEntryFilter { ToAccountFilter: AccountFilter "List of transfer types that is used for filtering sender and receiver accounts." TransferTypes: [TransferType] + "Optional transfer ID to filter by. If provided, all other filters are ignored." + TransferId: ID } "Filter for historical reward summary queries" @@ -582,7 +689,7 @@ type Query { "Type of the order" type: OrderType! ): OrderEstimate! - @deprecated(reason: "Use estimateFees and estimatePosition instead") + @deprecated(reason: "Use estimateFees and estimatePosition instead") "Return an estimation of the potential cost for a new order" estimateFees( @@ -610,10 +717,22 @@ type Query { marketId: ID! "Open volume - negative for short position (int64)" openVolume: String! + "Average entry price corresponding to the open volume. The price is an unsigned integer. For example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places" + averageEntryPrice: String! "Open and/or hypothetical orders" orders: [OrderInfo!] - "Optional argument specifying collateral available for the position, if provided then response will contain the liquidation price estimate" - collateralAvailable: String + "Margin account balance. Needs to be provided scaled to asset decimal places" + marginAccountBalance: String! + "General account balance. Needs to be provided scaled to asset decimal places" + generalAccountBalance: String! + "Order margin account balance. Needs to be provided scaled to asset decimal places" + orderMarginAccountBalance: String! + "Margin mode for the party, cross margin or isolated margin" + marginMode: MarginMode! + "Margin factor to be used along with isolated margin mode" + marginFactor: String + "Optional argument specifying if the estimated position margin increase should be included in available collateral for liquidation price calculation in isolated margin mode." + includeRequiredPositionMarginInAvailableCollateral: Boolean "Optional argument specifying if liquidation price estimates should be scaled to market decimal places, returned in asset decimal places by default" scaleLiquidationPriceToMarketDecimals: Boolean ): PositionEstimate @@ -621,6 +740,56 @@ type Query { "Query for historic ethereum key rotations" ethereumKeyRotations(nodeId: ID): EthereumKeyRotationsConnection! + "Estimate transfer fee" + estimateTransferFee( + "Sender's public key." + fromAccount: ID! + "Type of account sent from." + fromAccountType: AccountType! + "Receiver's public key." + toAccount: ID! + "Amount to be transferred." + amount: String! + "Asset ID for the asset used in the transaction." + assetId: String! + ): EstimatedTransferFee + + "Get fees statistics" + feesStats( + "Optional market ID to filter for. If omitted, asset ID must be provided." + marketId: ID + "Optional asset ID to filter for. If omitted, market ID must be provided." + assetId: ID + "Optional epoch to filter for. If omitted, the most recent epoch's data is returned." + epoch: Int + "Optional party ID to filter for" + partyId: ID + ): FeesStats + + "Get fees statistics for a given party" + feesStatsForParty( + "Party ID to filter for" + partyId: ID! + "Optional asset ID to filter for. If omitted, statistics for each asset are returned." + assetId: ID + "Optional epoch to filter from (included). If omitted, `toEpoch` must not be set. If both omitted, the most recent epoch's data is returned." + fromEpoch: Int + "Optional epoch to filter to (included). If omitted, the range goes from `fromEpoch` to the most recent epoch." + toEpoch: Int + ): [FeesStatsForParty] + + """ + Funding payment for perpetual markets. + """ + fundingPayments( + "ID of the party" + partyId: ID! + "ID of the perpetual market to get funding periods for" + marketId: ID + "Pagination control" + pagination: Pagination + ): FundingPaymentConnection! + "Funding periods for perpetual markets" fundingPeriods( "ID of the perpetual market to get funding periods for" @@ -654,17 +823,19 @@ type Query { pagination: Pagination ): FundingPeriodDataPointConnection! - """ - Funding payment for perpetual markets. - """ - fundingPayments( - "ID of the party" - partyId: ID! - "ID of the perpetual market to get funding periods for" - marketId: ID + "Get a list of games and their metrics." + games( + "Optional game ID to filter for" + gameId: ID + "Start epoch to return the results from (inclusive), if not provided the most recent epoch will be used." + epochFrom: Int + "End epoch to return the results to (inclusive), if not provided the most recent epoch will be used." + epochTo: Int + "Entity scope to filter for, i.e. individual or team. If not provided games for both individuals and teams will be returned." + entityScope: EntityScope "Pagination control" pagination: Pagination - ): FundingPaymentConnection! + ): GamesConnection! "Get market data history for a specific market. If no dates are given, the latest snapshot will be returned. If only the start date is provided all history from the given date will be provided, and if only the end date is provided, all history from the start up to and including the end date will be provided." getMarketDataHistoryConnectionByID( @@ -685,8 +856,23 @@ type Query { pagination: Pagination ): MarketDataConnection + "Query for historic key rotations" + keyRotationsConnection(id: ID, pagination: Pagination): KeyRotationConnection! + """ - Get ledger entries by asset, market, party, account type, transfer type within the given date range. + Get a list of ledger entries within the given date range. The date range is restricted to a maximum of 5 days. + This query requests and sums the number of ledger entries from a given subset of accounts, specified via the 'filter' argument. + It returns a time series - implemented as a list of AggregateLedgerEntry structs - with a row for every time + the summed ledger entries of the set of specified accounts changes. + Each account filter must contain no more than one party ID. + At least one party ID must be specified in the from or to account filter. + + Entries can be filtered by: + - the sending account (market ID, asset ID, account type) + - receiving account (market ID, asset ID, account type) + - sending AND receiving account + - transfer type either in addition to the above filters or as a standalone option + Note: The date range is restricted to any 5 days. If no start or end date is provided, only ledger entries from the last 5 days will be returned. If a start and end date are provided, but the end date is more than 5 days after the start date, only data up to 5 days after the start date will be returned. @@ -714,9 +900,6 @@ type Query { pagination: Pagination ): LiquidityProviderConnection - "Query for historic key rotations" - keyRotationsConnection(id: ID, pagination: Pagination): KeyRotationConnection! - "The last block process by the blockchain" lastBlockHeight: String! @@ -808,6 +991,18 @@ type Query { pagination: Pagination ): OrderConnection + "List statistics about paid liquidity fees" + paidLiquidityFees( + "Optional market ID to filter for." + marketId: ID + "Optional asset ID to filter for." + assetId: ID + "Optional epoch to filter for. If omitted, the most recent epoch's data is returned." + epoch: Int + "Optional party IDs to filter for" + partyIDs: [String!] + ): PaidLiquidityFeesConnection + "One or more entities that are trading on the Vega network" partiesConnection( "Optional ID of a party to retrieve" @@ -816,6 +1011,14 @@ type Query { pagination: Pagination ): PartyConnection + "List parties' profiles by their IDs. If no ID is set, all profiles are returned." + partiesProfilesConnection( + "Restrict the returned parties' profiles to only the given party IDs. If not set, all profiles will be returned." + ids: [ID!] + "Optional pagination information" + pagination: Pagination + ): PartiesProfilesConnection + "An entity that is trading on the Vega network" party("ID of a party" id: ID!): Party @@ -828,7 +1031,7 @@ type Query { id: ID "Optionally, locate proposal by its reference. If ID is set, this parameter is ignored." reference: String - ): Proposal + ): ProposalNode "All governance proposals in the Vega network" proposalsConnection( @@ -862,30 +1065,6 @@ type Query { pagination: Pagination ): ReferralSetConnection! - "Get fees statistics" - feesStats( - "Optional market ID to filter for. If omitted, asset ID must be provided." - marketId: ID - "Optional asset ID to filter for. If omitted, market ID must be provided." - assetId: ID - "Optional epoch to filter for. If omitted, the most recent epoch's data is returned." - epoch: Int - "Optional party ID to filter for" - partyId: ID - ): FeesStats - - "Get fees statistics for a given party" - feesStatsForParty( - "Party ID to filter for" - partyId: ID! - "Optional asset ID to filter for. If omitted, statistics for each asset are returned." - assetId: ID - "Optional epoch to filter from (included). If omitted, `toEpoch` must not be set. If both omitted, the most recent epoch's data is returned." - fromEpoch: Int - "Optional epoch to filter to (included). If omitted, the range goes from `fromEpoch` to the most recent epoch." - toEpoch: Int - ): [FeesStatsForParty] - referralSetReferees( "Optional referral set ID to fetch referees for" id: ID @@ -955,6 +1134,36 @@ type Query { pagination: Pagination ): TeamConnection + """ + List teams statistics + Get the statistics of all teams, or for a specific team by using team ID, over a number of epochs. + If a team does not have at least the number of epochs worth of data, it is ignored. + """ + teamsStatistics( + "Optional team ID to filter for" + teamId: ID + "Optional number of epochs to aggregate referee volume and reward statistics for. If omitted, the default is 10 epochs." + aggregationEpochs: Int + "Optional pagination information" + pagination: Pagination + ): TeamsStatisticsConnection + + """ + List team members' statistics for a given team + Get the statistics of all team members for a given team ID, or for a specific member by using party ID, over a number of epochs. + If a team does not have at least the number of epochs worth of data, it is ignored. + """ + teamMembersStatistics( + "Team ID to filter for" + teamId: ID! + "Optional party ID to filter for" + partyId: ID + "Optional number of epochs to aggregate referee volume and reward statistics for. If omitted, the default is 10 epochs." + aggregationEpochs: Int + "Optional pagination information" + pagination: Pagination + ): TeamMembersStatisticsConnection + "List all referees for a team" teamReferees( "ID of the team to list referees for" @@ -971,6 +1180,14 @@ type Query { pagination: Pagination ): TeamRefereeHistoryConnection + "Get total transfer fee discount available" + totalTransferFeeDiscount( + "ID of party eligible for the discount." + partyId: String! + "ID of the asset that the discount relates to." + assetId: String! + ): TotalTransferFeeDiscount + "Get a list of all trades and apply any given filters to the results" trades( filter: TradesFilter @@ -990,10 +1207,18 @@ type Query { pagination: Pagination "Filter for reward transfers only. Direction must be 'From' if a public key is used" isReward: Boolean + "Optional epoch to filter from (included). If omitted, the range goes from the oldest epoch to the `to epoch`." + fromEpoch: Int + "Optional epoch to filter to (included). If omitted, the range goes from `from epoch` to the most recent epoch." + toEpoch: Int + "Optional status to filter on." + status: TransferStatus + "Optional dispatch strategy's scope to filter for." + scope: TransferScope ): TransferConnection "Find a transfer using its ID" - transfer("ID of the transfer" id: ID!): Transfer + transfer("ID of the transfer" id: ID!): TransferNode "Get volume discount statistics" volumeDiscountStats( @@ -1016,17 +1241,27 @@ type Query { pagination: Pagination ): WithdrawalsConnection - "List paid liquidity fees statistics" - paidLiquidityFees( - "Optional market ID to filter for." + """ + List margin modes per party per market + + Get a list of all margin modes, or for a specific market ID, or party ID. + """ + partyMarginModes( + "Optional team ID to filter for" marketId: ID - "Optional asset ID to filter for." - assetId: ID - "Optional epoch to filter for. If omitted, the most recent epoch's data is returned." - epoch: Int - "Optional party IDs to filter for" - partyIDs: [String!] - ): PaidLiquidityFeesConnection + "Optional referrer, or team referee to filter for" + partyId: ID + "Optional pagination information" + pagination: Pagination + ): PartyMarginModesConnection +} + +"Defines the types of a dispatch strategy's scope the API can filter on." +enum TransferScope { + "Matches transfers that have dispatch strategy scope of individual set." + SCOPE_INDIVIDUAL + "Matches transfers that have dispatch strategy scope of team set." + SCOPE_TEAM } "All the states a transfer can transition between" @@ -1083,10 +1318,13 @@ type Transfer { "An optional reason explaining the status of the transfer" reason: String + + "An optional game ID to filter for transfers that are made for rewarding participation in games" + gameId: ID } union TransferKind = - OneOffTransfer + OneOffTransfer | RecurringTransfer | OneOffGovernanceTransfer | RecurringGovernanceTransfer @@ -1833,6 +2071,14 @@ type Perpetual { dataSourceSpecForSettlementData: DataSourceSpec! "Binding between the data source spec and the settlement data" dataSourceSpecBinding: DataSourceSpecPerpetualBinding! + "Factor applied to funding-rates. This scales the impact that spot price deviations have on funding payments" + fundingRateScalingFactor: String! + "Lower bound for the funding-rate such that the funding-rate will never be lower than this value" + fundingRateLowerBound: String! + "Upper bound for the funding-rate such that the funding-rate will never be higher than this value" + fundingRateUpperBound: String! + "Optional configuration driving the internal composite price calculation for perpetual product" + internalCompositePriceConfig: CompositePriceConfiguration } """ @@ -1853,6 +2099,14 @@ type DataSourceSpecPerpetualBinding { settlementScheduleProperty: String! } +""" +Describes which property of the data source data should be +used as composite price source. +""" +type SpecBindingForCompositePrice { + priceSourceProperty: String! +} + """ DataSourceSpecToFutureBinding tells on which property data source data should be used as settlement data and trading termination. @@ -2095,10 +2349,30 @@ type FeeFactors { liquidityFee: String! } +enum LiquidityFeeMethod { + METHOD_UNSPECIFIED + "Fee is smallest value of all bids, such that liquidity providers with nominated fees less than or equal to this value still have sufficient commitment to fulfil the market's target stake." + METHOD_MARGINAL_COST + "Fee is the weighted average of all liquidity providers' nominated fees, weighted by their commitment" + METHOD_WEIGHTED_AVERAGE + "Fee is set by the market to a constant value irrespective of any liquidity provider's nominated fee" + METHOD_CONSTANT +} + +"Market settings that describe how the liquidity fee is calculated" +type LiquidityFeeSettings { + "Method used to calculate the market's liquidity fee" + method: LiquidityFeeMethod! + "Constant liquidity fee used when using the constant fee method" + feeConstant: String +} + "The fees applicable to a market" type Fees { "The factors used to calculate the different fees" factors: FeeFactors! + "Liquidity fee settings for the market describing how the fee was calculated" + liquidityFeeSettings: LiquidityFeeSettings } """ @@ -2172,10 +2446,6 @@ type TargetStakeParameters { type LiquidityMonitoringParameters { "Specifies parameters related to target stake calculation" targetStakeParameters: TargetStakeParameters! - "Specifies the triggering ratio for entering liquidity auction" - triggeringRatio: String! - "Specifies by how many seconds an auction should be extended if leaving the auction were to trigger a liquidity auction" - auctionExtensionSecs: Int! } "Represents a product & associated parameters that can be traded on Vega, has an associated OrderBook and Trade history" @@ -2234,7 +2504,10 @@ type Market { state: MarketState! "The proposal that initiated this market" - proposal: Proposal + proposal: Proposal @deprecated(reason: "Use marketProposal") + + "The proposal that initiated this market" + marketProposal: ProposalNode "Orders on a market" ordersConnection( @@ -2258,9 +2531,9 @@ type Market { "Pagination information" pagination: Pagination ): TradeConnection - @deprecated( - reason: "Simplify and consolidate trades query and remove nesting. Use trades query instead" - ) + @deprecated( + reason: "Simplify and consolidate trades query and remove nesting. Use trades query instead" + ) "Current depth on the order book for this market" depth( @@ -2301,7 +2574,8 @@ type Market { live: Boolean "Pagination information" pagination: Pagination - ): LiquidityProvisionsConnection @deprecated(reason: "Use liquidityProvisions instead") + ): LiquidityProvisionsConnection + @deprecated(reason: "Use liquidityProvisions instead") "Timestamps for state changes in the market" marketTimestamps: MarketTimestamps! @@ -2314,6 +2588,7 @@ type Market { "Quadratic slippage factor is used to cap the slippage component of maintainence margin - it is applied to the square of the slippage volume" quadraticSlippageFactor: String! + @deprecated(reason: "This field will be removed in a future release") """ Optional: Parent market ID. A market can be a successor to another market. If this market is a successor to a previous market, @@ -2331,6 +2606,12 @@ type Market { "Optional: Liquidity SLA parameters for the market" liquiditySLAParameters: LiquiditySLAParameters + + "Optional: Liquidation strategy for the market" + liquidationStrategy: LiquidationStrategy + + "Configuration driving the mark price for the market" + markPriceConfiguration: CompositePriceConfiguration! } """ @@ -2488,9 +2769,9 @@ type Party { "Pagination information" pagination: Pagination ): TradeConnection - @deprecated( - reason: "Simplify and consolidate trades query and remove nesting. Use trades query instead" - ) + @deprecated( + reason: "Simplify and consolidate trades query and remove nesting. Use trades query instead" + ) "Collateral accounts relating to a party" accountsConnection( @@ -2506,7 +2787,7 @@ type Party { "Trading positions relating to a party" positionsConnection(market: ID, pagination: Pagination): PositionConnection - @deprecated(reason: "Use root positions query instead of sub-query") + @deprecated(reason: "Use root positions query instead of sub-query") "Margin levels for a market" marginsConnection( @@ -2570,7 +2851,8 @@ type Party { live: Boolean "Optional Pagination information" pagination: Pagination - ): LiquidityProvisionsConnection @deprecated(reason: "Use liquidityProvisions instead") + ): LiquidityProvisionsConnection + @deprecated(reason: "Use liquidityProvisions instead") # All delegations for a party to a given node if node is specified, or all delegations if not delegationsConnection( @@ -2593,6 +2875,10 @@ type Party { fromEpoch: Int "Optionally only return rewards <= this epoch" toEpoch: Int + "Optionally filter for rewards earned by the party for team participation." + teamId: ID + "Optionally filter for rewards earned for the given game ID" + gameId: ID ): RewardsConnection "Return net reward information" @@ -2606,6 +2892,14 @@ type Party { pagination: Pagination "Filter for reward transfers only. Direction must be 'From'" isReward: Boolean + "Optional epoch to filter from (included). If omitted, the range goes from the oldest epoch to the `to epoch`." + fromEpoch: Int + "Optional epoch to filter to (included). If omitted, the range goes from `from epoch` to the most recent epoch." + toEpoch: Int + "Optional status to filter on." + status: TransferStatus + "Optional dispatch strategy's scope to filter for." + scope: TransferScope ): TransferConnection "The activity streak" @@ -2658,7 +2952,7 @@ type PartyVestingBalance { """ Summary of a party's reward vesting balances. """ -type PartyVestingBalancesSummary{ +type PartyVestingBalancesSummary { "The epoch for which this summary is valid" epoch: Int "The party vesting balances" @@ -2897,9 +3191,9 @@ type Order { dateRange: DateRange pagination: Pagination ): TradeConnection - @deprecated( - reason: "Simplify and consolidate trades query and remove nesting. Use trades query instead" - ) + @deprecated( + reason: "Simplify and consolidate trades query and remove nesting. Use trades query instead" + ) "The order type" type: OrderType @@ -2955,6 +3249,20 @@ enum StopOrderRejectionReason { REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_WITHOUT_A_POSITION "This stop order does not close the position" REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION + "Stop orders are not allowed during the opening auction" + REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION + "Stop order cannot have matching OCO expiry times" + REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES +} + +"Stop order size override settings" +enum StopOrderSizeOverrideSetting { + "The size override has not been specified, this should never happen!" + SIZE_OVERRIDE_SETTING_UNSPECIFIED + "No size override, the size within the contained normal order submission will be used" + SIZE_OVERRIDE_SETTING_NONE + "Use the total position of the trader" + SIZE_OVERRIDE_SETTING_POSITION } "A stop order in Vega" @@ -2987,6 +3295,10 @@ type StopOrder { order: Order "Optional rejection reason for an order" rejectionReason: StopOrderRejectionReason + "Size override setting" + sizeOverrideSetting: StopOrderSizeOverrideSetting! + "Size override value" + sizeOverrideValue: String } "Details of the order that will be submitted when the stop order is triggered." @@ -3081,6 +3393,8 @@ type OrderUpdate { type PositionEstimate { "Margin level range estimate for the specified position" margin: MarginEstimate! + "Estimated margin account balance increase" + collateralIncreaseEstimate: CollateralIncreaseEstimate! "Liquidation price range estimate for the specified position. Only populated if available collateral was specified in the request" liquidation: LiquidationEstimate } @@ -3088,9 +3402,17 @@ type PositionEstimate { "Margin level estimate for both worst and best case possible" type MarginEstimate { "Margin level estimate assuming slippage cap is applied" - worstCase: MarginLevels! + worstCase: AbstractMarginLevels! "Margin level estimate assuming no slippage" - bestCase: MarginLevels! + bestCase: AbstractMarginLevels! +} + +"Collateral increase estimate for the additional funds needed to support the specified position" +type CollateralIncreaseEstimate { + "Estimate assuming slippage cap is applied" + worstCase: String! + "Estimate assuming no slippage" + bestCase: String! } "Liquidation estimate for both worst and best case possible" @@ -3850,6 +4172,12 @@ enum OrderRejectionReason { "A post-only order would produce an aggressive trade and thus it has been rejected" ORDER_ERROR_POST_ONLY_ORDER_WOULD_TRADE + + "Party has insufficient funds to cover for the order margin for the new or amended order" + ORDER_ERROR_ISOLATED_MARGIN_CHECK_FAILED + + "Pegged orders are not allowed for a party in isolated margin mode" + ORDER_ERROR_PEGGED_ORDERS_NOT_ALLOWED_IN_ISOLATED_MARGIN_MODE } "Types of orders" @@ -3933,24 +4261,28 @@ enum Side { enum Interval { "The block interval is not a fixed amount of time, rather it used to indicate grouping of events that occur in a single block. It is usually about a second." INTERVAL_BLOCK - "1 minute interval" INTERVAL_I1M - "5 minute interval" INTERVAL_I5M - "15 minute interval (default)" INTERVAL_I15M - + "30 minute interval" + INTERVAL_I30M "1 hour interval" INTERVAL_I1H - + "4 hour interval" + INTERVAL_I4H "6 hour interval" INTERVAL_I6H - + "8 hour interval" + INTERVAL_I8H + "12 hour interval" + INTERVAL_I12H "1 day interval" INTERVAL_I1D + "7 day interval" + INTERVAL_I7D } "The various account types in Vega (used by collateral)" @@ -4014,6 +4346,8 @@ enum AccountType { ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING "Holds pending rewards to be paid to the referrer of a party out of fees paid by the taker" ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD + "Per asset market account for party in isolated margin mode" + ACCOUNT_TYPE_ORDER_MARGIN } "Types that describe why a transfer has been made" @@ -4092,6 +4426,12 @@ enum TransferType { TRANSFER_TYPE_PERPETUALS_FUNDING_WIN "Funds moved from the vesting account to the vested account once the vesting period is reached." TRANSFER_TYPE_REWARDS_VESTED + "Funds moved from general account to order margin account." + TRANSFER_TYPE_ORDER_MARGIN_LOW + "Funds released from order margin account to general." + TRANSFER_TYPE_ORDER_MARGIN_HIGH + "Funds moved from order margin account to margin account." + TRANSFER_TYPE_ISOLATED_MARGIN_LOW } union ProductConfiguration = FutureProduct | SpotProduct | PerpetualProduct @@ -4144,6 +4484,12 @@ type PerpetualProduct { dataSourceSpecForSettlementData: DataSourceDefinition! "Binding between the data source spec and the settlement data" dataSourceSpecBinding: DataSourceSpecPerpetualBinding! + "Factor applied to funding-rates. This scales the impact that spot price deviations have on funding payments." + fundingRateScalingFactor: String! + "Lower bound for the funding-rate such that the funding-rate will never be lower than this value" + fundingRateLowerBound: String! + "Upper bound for the funding-rate such that the funding-rate will never be higher than this value" + fundingRateUpperBound: String! } """ @@ -4230,6 +4576,8 @@ type EthCallSpec { normalisers: [Normaliser!] "Filters the data returned from the contract method." filters: [Filter!] + "The ID of the EVM based chain which is to be used to source the oracle data." + sourceChainId: Int! } type InstrumentConfiguration { @@ -4262,10 +4610,36 @@ type NewMarket { linearSlippageFactor: String! "Quadratic slippage factor is used to cap the slippage component of maintenance margin - it is applied to the square of the slippage volume" quadraticSlippageFactor: String! + @deprecated(reason: "This field will be removed in a future release") "Successor market configuration. If this proposed market is meant to succeed a given market, then this needs to be set." successorConfiguration: SuccessorConfiguration "Liquidity SLA Parameters" liquiditySLAParameters: LiquiditySLAParameters + "Specifies how the liquidity fee for the market will be calculated" + liquidityFeeSettings: LiquidityFeeSettings + "Liquidation strategy for the market" + liquidationStrategy: LiquidationStrategy + "Configuration for mark price calculation for the market" + markPriceConfiguration: CompositePriceConfiguration! +} + +type CompositePriceConfiguration { + "Decay weight used in calculating time weight for a given trade" + decayWeight: String! + "Decay power used in calculating time weight for a given trade" + decayPower: Int! + "Cash amount used in calculating mark price from the order book" + cashAmount: String! + "Weights for each given price source, first entry is price from trade, then price from book, then first oracle, next oracle, etc. And last entry is for median price" + SourceWeights: [String!] + "Staleness tolerance duration for each given price sources in the order mentioned above" + SourceStalenessTolerance: [String!]! + "Composite price calculation methodology" + CompositePriceType: CompositePriceType! + "Oracle configuration for external composite price sources" + dataSourcesSpec: [DataSourceDefinition] + "Spec bindings for external composite price sources" + dataSourcesSpecBinding: [SpecBindingForCompositePrice] } type SuccessorConfiguration { @@ -4299,12 +4673,20 @@ type UpdateMarketConfiguration { linearSlippageFactor: String! "Quadratic slippage factor is used to cap the slippage component of maintenance margin - it is applied to the square of the slippage volume." quadraticSlippageFactor: String! + @deprecated(reason: "This field will be removed in a future release") "Liquidity SLA Parameters." liquiditySLAParameters: LiquiditySLAParameters + "Specifies how the liquidity fee for the market will be calculated" + liquidityFeeSettings: LiquidityFeeSettings + "Liquidation strategy for the market" + liquidationStrategy: LiquidationStrategy + "Configuration for mark price calculation for the market" + markPriceConfiguration: CompositePriceConfiguration } type UpdateInstrumentConfiguration { code: String! + name: String! product: UpdateProductConfiguration! } @@ -4334,10 +4716,16 @@ type UpdatePerpetualProduct { dataSourceSpecForSettlementData: DataSourceDefinition! "Binding between the data source spec and the settlement data" dataSourceSpecBinding: DataSourceSpecPerpetualBinding! + "Factor applied to funding-rates. This scales the impact that spot price deviations have on funding payments." + fundingRateScalingFactor: String! + "Lower bound for the funding-rate such that the funding-rate will never be lower than this value" + fundingRateLowerBound: String! + "Upper bound for the funding-rate such that the funding-rate will never be higher than this value" + fundingRateUpperBound: String! } union UpdateMarketRiskParameters = - UpdateMarketSimpleRiskModel + UpdateMarketSimpleRiskModel | UpdateMarketLogNormalRiskModel type UpdateMarketSimpleRiskModel { @@ -4418,7 +4806,7 @@ type NewTransfer { } union GovernanceTransferKind = - OneOffGovernanceTransfer + OneOffGovernanceTransfer | RecurringGovernanceTransfer "Allows for cancellation of an existing governance transfer" @@ -4519,6 +4907,8 @@ type NewSpotMarket { positionDecimalPlaces: Int! "Specifies the liquidity provision SLA parameters" liquiditySLAParams: LiquiditySLAParameters! + "Specifies how the liquidity fee for the market will be calculated" + liquidityFeeSettings: LiquidityFeeSettings } "Update an existing spot market on Vega" @@ -4540,6 +4930,8 @@ type UpdateSpotMarketConfiguration { riskParameters: RiskModel! "Specifies the liquidity provision SLA parameters" liquiditySLAParams: LiquiditySLAParameters! + "Specifies how the liquidity fee for the market will be calculated" + liquidityFeeSettings: LiquidityFeeSettings } type LiquiditySLAParameters { @@ -4555,6 +4947,17 @@ type LiquiditySLAParameters { slaCompetitionFactor: String! } +type LiquidationStrategy { + "Specifies the interval, in seconds, at which point the network will try to unload its position." + disposalTimeStep: Int! + "Specifies the fraction of its position the network will try to reduce its position by in a single disposal attempt." + disposalFraction: String! + "Specifies the size of the position held by the network that it will try to dispose of in one attempt." + fullDisposalSize: Int! + "Specifies the maximum size by which the network can reduce its position as a fraction of the volume on the book." + maxFractionConsumed: String! +} + "Representation of a network parameter" type NetworkParameter { "The name of the network parameter" @@ -4564,7 +4967,7 @@ type NetworkParameter { } union ProposalChange = - NewMarket + NewMarket | UpdateMarket | UpdateNetworkParameter | NewAsset @@ -4616,6 +5019,30 @@ type ProposalTerms { change: ProposalChange! } +"Terms for a batch governance proposal" +type BatchProposalTermsChange { + """ + RFC3339Nano time and date when this proposal will be executed, if it passes. + Constrained by "minEnactInSeconds" and "maxEnactInSeconds" network parameters. + """ + enactmentDatetime: Timestamp + + "Actual change being introduced by the proposal - action the proposal triggers if passed and enacted." + change: ProposalChange! +} + +"The terms for the batch proposal" +type BatchProposalTerms { + """ + RFC3339Nano time and date when voting closes for this proposal. + Constrained by "minClose" and "maxClose" network parameters. + """ + closingDatetime: Timestamp! + + "Actual changes being introduced by the batch proposal - actions the proposal triggers if passed and enacted." + changes: [BatchProposalTermsChange]! +} + """ Various proposal types that are supported by Vega """ @@ -4703,9 +5130,44 @@ type Proposal { requiredLpParticipation: String } +type BatchProposal { + "Proposal ID that is provided by Vega once proposal reaches the network" + id: ID + "A UUID reference to aid tracking proposals on Vega" + reference: String! + "Party that prepared the proposal" + party: Party! + "State of the proposal" + state: ProposalState! + "RFC3339Nano time and date when the proposal reached the network" + datetime: Timestamp! + "Terms of all the proposals in the batch" + batchTerms: BatchProposalTerms + "Rationale behind the proposal" + rationale: ProposalRationale! + "Votes cast for this proposal" + votes: ProposalVotes! + "Reason the proposal was rejected" + rejectionReason: ProposalRejectionReason + "Details of the rejection reason" + errorDetails: String + "Required majority for this proposal to succeed" + requiredMajority: String! + "Required participation for this proposal to succeed" + requiredParticipation: String! + "Equity-like share required for a market amendment proposal to be enacted, represented as a fraction that can be converted to a percentage. If not met, the proposal will not be enacted" + requiredLpMajority: String + "The market share of LPs' equity-like share that must take part in a market amendment vote for the proposal to pass. This means the votes of LPs that have submitted more liquidity to that market, or have been LPs from the start carry more weight. If it requires 50% of a market's equity-like share for a majority, and the full batch of proposals receives all YES votes but only LPs with 49% of the equity-like share voted, the proposal will not pass" + requiredLpParticipation: String + "Proposals that are part of the batch" + subProposals: [ProposalDetail] +} + type ProposalDetail { "Proposal ID that is provided by Vega once proposal reaches the network" id: ID + "Batch proposal ID that is provided by Vega once proposal reaches the network" + batchId: ID "A UUID reference to aid tracking proposals on Vega" reference: String! "Party that prepared the proposal" @@ -4715,7 +5177,9 @@ type ProposalDetail { "RFC3339Nano time and date when the proposal reached the Vega network" datetime: Timestamp! "Terms of the proposal" - terms: ProposalTerms! + terms: ProposalTerms + "Terms of all the proposals in the batch" + batchTerms: BatchProposalTerms "Rationale behind the proposal" rationale: ProposalRationale! "Why the proposal was rejected by the core" @@ -5069,7 +5533,7 @@ type Reward { "The asset this reward is paid in" asset: Asset! "The market ID for which this reward is paid if any" - marketId: ID! + marketId: ID! @deprecated(reason: "Use gameId") "The type of reward" rewardType: AccountType! "Party receiving the reward" @@ -5078,12 +5542,18 @@ type Reward { epoch: Epoch! "Amount received for this reward" amount: String! + "Amount paid as a reward, expressed in asset's quantum unit" + quantumAmount: String! "Percentage out of the total distributed reward" percentageOfTotal: String! "RFC3339Nano time when the rewards were received" receivedAt: Timestamp! "The epoch when the reward is released" lockedUntilEpoch: Epoch! + "Optional game ID for rewards that are paid for participation in a game" + gameId: ID + "Optional team ID for rewards that are paid if the party is a member of a team, and for participation in a game." + teamId: ID } type RewardSummary { @@ -5271,6 +5741,30 @@ type PartyConnection { pageInfo: PageInfo! } +"Holds metadata associated to a party." +type PartyProfile { + partyId: ID! + "Alias given to the party." + alias: String! + "Metadata to associate to a party, in a key/value format where the key describes the type of metadata in the value field." + metadata: [Metadata!]! +} +"Edge type containing the party and cursor information returned by a PartiesProfilesConnection" +type PartyProfileEdge { + "The party's profile" + node: PartyProfile! + "The cursor for this party's profile" + cursor: String! +} + +"Connection type for retrieving cursor-based paginated profile information for multiple parties" +type PartiesProfilesConnection { + "The profiles in this connection" + edges: [PartyProfileEdge!]! + "The pagination information" + pageInfo: PageInfo! +} + "Edge type containing the market and cursor information returned by a MarketConnection" type MarketEdge { "The market" @@ -5663,10 +6157,14 @@ enum TransferDirection { ToOrFrom } +union ProposalNode = Proposal | BatchProposal + "Edge type containing the proposals and cursor information returned by a ProposalsConnection" type ProposalEdge { "The proposal data" - node: Proposal! + node: Proposal! @deprecated(reason: "Use proposalNode") + "The data of either single or batch proposal" + proposalNode: ProposalNode "Cursor identifying the proposal" cursor: String! } @@ -5940,7 +6438,7 @@ type DataSourceSpecConfigurationTimeTrigger { } union InternalDataSourceKind = - DataSourceSpecConfigurationTime + DataSourceSpecConfigurationTime | DataSourceSpecConfigurationTimeTrigger """ @@ -5962,7 +6460,7 @@ type DataSourceDefinitionExternal { } union DataSourceKind = - DataSourceDefinitionInternal + DataSourceDefinitionInternal | DataSourceDefinitionExternal """ @@ -6190,6 +6688,8 @@ type ReferralSet { id: ID! "Party that created the set." referrer: ID! + "Current number of members in the referral set." + totalMembers: Int! "Timestamp as RFC3339Nano when the referral set was created." createdAt: Timestamp! "Timestamp as RFC3339Nano when the referral set was updated." @@ -6292,15 +6792,19 @@ type Team { "Name of the team." name: String! "Link to the team's homepage." - teamURL: String! + teamUrl: String! "Link to an image of the team's avatar." - avatarURL: String! + avatarUrl: String! + "Current number of members in the team." + totalMembers: Int! "Time in RFC3339Nano format when the team was created." createdAt: Timestamp! "Epoch at which the team was created." createdAtEpoch: Int! - "Tells if a party can join the team or not." + "Whether or not the team is closed to new party members. When closed, only parties specified in the allow list can join the team." closed: Boolean! + "List of public keys that are allowed to join the team. Only applicable to closed teams." + allowList: [String!]! } "Edge type containing a team cursor and its associated team data" @@ -6319,6 +6823,88 @@ type TeamConnection { pageInfo: PageInfo! } +"Team's statistics record containing the team information." +type TeamStatistics { + "Team ID the statistics are related to." + teamId: String! + "Total of volume accumulated over the requested epoch period, expressed in quantum value." + totalQuantumVolume: String! + "List of trading volume totals per epoch, over the requested epoch period, expressed in quantum value" + quantumVolumes: [QuantumVolumesPerEpoch!]! + "Total of rewards accumulated over the requested epoch period, expressed in quantum value." + totalQuantumRewards: String! + "List of rewards over the requested epoch period, expressed in quantum value for each epoch" + quantumRewards: [QuantumRewardsPerEpoch!]! + "Total of games played." + totalGamesPlayed: Int! + "List of games played over the requested epoch period." + gamesPlayed: [String!]! +} + +type QuantumRewardsPerEpoch { + "Epoch for which this information is valid." + epoch: Int! + "Total of rewards accumulated over the epoch period expressed in quantum value." + totalQuantumRewards: String! +} + +type QuantumVolumesPerEpoch { + "Epoch for which this information is valid." + epoch: Int! + "Total volume across all markets, accumulated over the epoch period, expressed in quantum value." + totalQuantumVolumes: String! +} + +"Edge type containing a team statistics cursor and its associated team's statistics data" +type TeamStatisticsEdge { + "Team's statistics data" + node: TeamStatistics! + "Cursor identifying the team data" + cursor: String! +} + +"Connection type for retrieving cursor-based paginated team statistics data" +type TeamsStatisticsConnection { + "Teams' statistics in this connection" + edges: [TeamStatisticsEdge!]! + "Pagination information" + pageInfo: PageInfo! +} + +"Team member's statistics record containing the member's information." +type TeamMemberStatistics { + "Party ID the statistics are related to." + partyId: String! + "Total of volume accumulated over the requested epoch period, expressed in quantum value." + totalQuantumVolume: String! + "List of trading volume totals per epoch, for the requested epoch period, expressed in quantum value" + quantumVolumes: [QuantumVolumesPerEpoch!]! + "Total of rewards accumulated over the requested epoch period, expressed in quantum value." + totalQuantumRewards: String! + "List of rewards over the requested epoch period, expressed in quantum value for each epoch" + quantumRewards: [QuantumRewardsPerEpoch!]! + "Total number of games played." + totalGamesPlayed: Int! + "List of games played over the requested epoch period." + gamesPlayed: [String!]! +} + +"Edge type containing a team member statistics cursor and its associated statistics data" +type TeamMemberStatisticsEdge { + "Team member's statistics data" + node: TeamMemberStatistics! + "Cursor identifying the team data" + cursor: String! +} + +"Connection type for retrieving cursor-based paginated team member statistics data" +type TeamMembersStatisticsConnection { + "Team members' statistics in this connection" + edges: [TeamMemberStatisticsEdge!]! + "Pagination information" + pageInfo: PageInfo! +} + "A team's referee info" type TeamReferee { "Team ID." @@ -6505,3 +7091,129 @@ type PaidLiquidityFeesEdge { "The cursor for this volume discount statistics" cursor: String! } + +"Returns total transfer fee discount available" +type TotalTransferFeeDiscount { + "Total per party per asset discount available." + totalDiscount: String! +} + +"EstimatedTransferFee Results of estimation of transfer fee and the fee discount" +type EstimatedTransferFee { + "Estimated fee for the transfer." + fee: String! + "Discount applied to the fee." + discount: String! +} + +"Individual party participating in a game and their metrics" +type IndividualGameEntity { + "Party ID of the participant" + individual: ID! + "The rank of the individual within the game. If the individual is in a team, then the rank of the individual in the team" + rank: Int! + "The volume traded by the individual" + volume: String! + "The reward metric applied to the game" + rewardMetric: DispatchMetric! + "The rewards earned by the individual during the epoch" + rewardEarned: String! + "Total rewards earned by the individual during the game" + totalRewardsEarned: String! + "The rewards earned by the individual during the epoch in quantum value" + rewardEarnedQuantum: String! + "Total rewards earned by the individual during the game in quantum value" + totalRewardsEarnedQuantum: String! +} + +"Team participation information, i.e. the team ID and the metrics for each participating team member." +type TeamParticipation { + "Team ID" + teamId: ID! + "List of participating team members and their metrics." + membersParticipating: [IndividualGameEntity!]! +} + +"Team participating in a game and their metrics." +type TeamGameEntity { + "Breakdown of the team members and their contributions to the total team metrics." + team: TeamParticipation! + "Rank of the team within the game." + rank: Int! + "Total volume traded by the team" + volume: String! + "Reward metric applied to the game." + rewardMetric: DispatchMetric! + "Total rewards earned by the team during the epoch" + rewardEarned: String! + "Total rewards earned by the team for the game" + totalRewardsEarned: String! + "Total rewards earned by the team during the epoch in quantum value" + rewardEarnedQuantum: String! + "Total rewards earned by the team for the game in quantum value" + totalRewardsEarnedQuantum: String! +} + +union GameEntity = TeamGameEntity | IndividualGameEntity + +"Game metrics for a given epoch" +type Game { + "ID of the game." + id: ID! + "Epoch during which the metrics were calculated." + epoch: Int! + "Number of participants that took part in the game during the epoch." + numberOfParticipants: Int! + "Entities that were rewarded during the epoch." + entities: [GameEntity!]! + "ID of asset in which the rewards were paid." + rewardAssetId: ID! +} + +"Edge type containing the game metrics and cursor information returned by a GameConnection" +type GameEdge { + "Game information and metrics." + node: Game! + "Cursor identifying the game" + cursor: String! +} + +"Connection type for retrieving cursor-based paginated game information" +type GamesConnection { + "Page of game edges for the connection" + edges: [GameEdge] + "Current page information" + pageInfo: PageInfo +} + +"Connection type for retrieving cursor-based paginated party margin modes information" +type PartyMarginModesConnection { + "The party margin modes" + edges: [PartyMarginModeEdge] + "The pagination information" + pageInfo: PageInfo +} + +"Edge type containing the deposit and cursor information returned by a PartyMarginModeConnection" +type PartyMarginModeEdge { + node: PartyMarginMode! + cursor: String! +} + +"Margin mode selected for the given party and market." +type PartyMarginMode { + "Unique ID of the market." + marketId: ID! + "Unique ID of the party." + partyId: ID! + "Selected margin mode." + marginMode: MarginMode! + "Margin factor for the market. Isolated mode only." + marginFactor: String + "Minimum theoretical margin factor for the market. Isolated mode only." + minTheoreticalMarginFactor: String + "Maximum theoretical leverage for the market. Isolated mode only." + maxTheoreticalLeverage: String + "Epoch at which the update happened." + atEpoch: Int! +} diff --git a/datanode/gateway/graphql/server.go b/datanode/gateway/graphql/server.go index 01128f6809..9ad2b4cf4f 100644 --- a/datanode/gateway/graphql/server.go +++ b/datanode/gateway/graphql/server.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/spot_resolver.go b/datanode/gateway/graphql/spot_resolver.go index cf20a913bb..181fb87429 100644 --- a/datanode/gateway/graphql/spot_resolver.go +++ b/datanode/gateway/graphql/spot_resolver.go @@ -119,3 +119,7 @@ func (r newSpotMarketResolver) PositionDecimalPlaces(ctx context.Context, obj *v func (r newSpotMarketResolver) LiquiditySLAParams(ctx context.Context, obj *vega.NewSpotMarket) (*vega.LiquiditySLAParameters, error) { return obj.Changes.SlaParams, nil } + +func (r newSpotMarketResolver) LiquidityFeeSettings(ctx context.Context, obj *vega.NewSpotMarket) (*vega.LiquidityFeeSettings, error) { + return obj.Changes.LiquidityFeeSettings, nil +} diff --git a/datanode/gateway/graphql/staking.go b/datanode/gateway/graphql/staking.go index f0e647676e..0593468099 100644 --- a/datanode/gateway/graphql/staking.go +++ b/datanode/gateway/graphql/staking.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/statistics.go b/datanode/gateway/graphql/statistics.go index 00f1b8df9d..ad663f8f3b 100644 --- a/datanode/gateway/graphql/statistics.go +++ b/datanode/gateway/graphql/statistics.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/stop_order_resolver.go b/datanode/gateway/graphql/stop_order_resolver.go index 6a9e7a419a..23e6b400ba 100644 --- a/datanode/gateway/graphql/stop_order_resolver.go +++ b/datanode/gateway/graphql/stop_order_resolver.go @@ -19,8 +19,8 @@ import ( "context" "fmt" + "code.vegaprotocol.io/vega/libs/ptr" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" ) @@ -128,6 +128,17 @@ func (s stopOrderResolver) RejectionReason(ctx context.Context, obj *eventspb.St return obj.StopOrder.RejectionReason, nil } +func (s stopOrderResolver) SizeOverrideSetting(_ context.Context, obj *eventspb.StopOrderEvent) (vega.StopOrder_SizeOverrideSetting, error) { + return obj.StopOrder.SizeOverrideSetting, nil +} + +func (s stopOrderResolver) SizeOverrideValue(_ context.Context, obj *eventspb.StopOrderEvent) (*string, error) { + if obj.StopOrder.SizeOverrideValue == nil { + return nil, nil + } + return ptr.From(obj.StopOrder.SizeOverrideValue.Percentage), nil +} + type stopOrderFilterResolver VegaResolverRoot func (s stopOrderFilterResolver) Parties(ctx context.Context, obj *v2.StopOrderFilter, data []string) error { diff --git a/datanode/gateway/graphql/team_resolvers.go b/datanode/gateway/graphql/team_resolvers.go index 14f854086c..5717a9e0fb 100644 --- a/datanode/gateway/graphql/team_resolvers.go +++ b/datanode/gateway/graphql/team_resolvers.go @@ -23,6 +23,10 @@ import ( type teamResolver VegaResolverRoot +func (t teamResolver) TotalMembers(_ context.Context, obj *v2.Team) (int, error) { + return int(obj.TotalMembers), nil +} + func (t teamResolver) CreatedAtEpoch(_ context.Context, obj *v2.Team) (int, error) { return int(obj.CreatedAtEpoch), nil } @@ -38,3 +42,27 @@ type teamRefereeHistoryResolver VegaResolverRoot func (t teamRefereeHistoryResolver) JoinedAtEpoch(_ context.Context, obj *v2.TeamRefereeHistory) (int, error) { return int(obj.JoinedAtEpoch), nil } + +type teamStatsResolver VegaResolverRoot + +func (t teamStatsResolver) TotalGamesPlayed(_ context.Context, obj *v2.TeamStatistics) (int, error) { + return int(obj.TotalGamesPlayed), nil +} + +type quantumRewardsPerEpochResolver VegaResolverRoot + +func (q quantumRewardsPerEpochResolver) Epoch(_ context.Context, obj *v2.QuantumRewardsPerEpoch) (int, error) { + return int(obj.Epoch), nil +} + +type quantumVolumesPerEpochResolver VegaResolverRoot + +func (q quantumVolumesPerEpochResolver) Epoch(_ context.Context, obj *v2.QuantumVolumesPerEpoch) (int, error) { + return int(obj.Epoch), nil +} + +type teamMemberStatsResolver VegaResolverRoot + +func (t teamMemberStatsResolver) TotalGamesPlayed(_ context.Context, obj *v2.TeamMemberStatistics) (int, error) { + return int(obj.TotalGamesPlayed), nil +} diff --git a/datanode/gateway/graphql/tools/tools.go b/datanode/gateway/graphql/tools/tools.go index 1818fe06c3..c9537e003c 100644 --- a/datanode/gateway/graphql/tools/tools.go +++ b/datanode/gateway/graphql/tools/tools.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package tools import ( diff --git a/datanode/gateway/graphql/tradable_instrument_resolver.go b/datanode/gateway/graphql/tradable_instrument_resolver.go index 3b40c0ee64..11e342e159 100644 --- a/datanode/gateway/graphql/tradable_instrument_resolver.go +++ b/datanode/gateway/graphql/tradable_instrument_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/transfers_resolver.go b/datanode/gateway/graphql/transfers_resolver.go index a77070865d..11ba7db528 100644 --- a/datanode/gateway/graphql/transfers_resolver.go +++ b/datanode/gateway/graphql/transfers_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/update_asset_resolver.go b/datanode/gateway/graphql/update_asset_resolver.go index 2175861a61..688ebc03a1 100644 --- a/datanode/gateway/graphql/update_asset_resolver.go +++ b/datanode/gateway/graphql/update_asset_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/update_market_configuration_resolver.go b/datanode/gateway/graphql/update_market_configuration_resolver.go index df56a785a8..f0af3d430a 100644 --- a/datanode/gateway/graphql/update_market_configuration_resolver.go +++ b/datanode/gateway/graphql/update_market_configuration_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( @@ -45,7 +33,7 @@ func (r *updateMarketConfigurationResolver) Instrument(ctx context.Context, } protoInstrument := obj.Instrument - var product *vega.UpdateFutureProduct + var product UpdateProductConfiguration switch p := protoInstrument.Product.(type) { case *vega.UpdateInstrumentConfiguration_Future: @@ -55,12 +43,27 @@ func (r *updateMarketConfigurationResolver) Instrument(ctx context.Context, DataSourceSpecForTradingTermination: p.Future.DataSourceSpecForTradingTermination, DataSourceSpecBinding: p.Future.DataSourceSpecBinding, } + case *vega.UpdateInstrumentConfiguration_Perpetual: + product = &vega.UpdatePerpetualProduct{ + QuoteName: p.Perpetual.QuoteName, + MarginFundingFactor: p.Perpetual.MarginFundingFactor, + InterestRate: p.Perpetual.InterestRate, + ClampLowerBound: p.Perpetual.ClampLowerBound, + ClampUpperBound: p.Perpetual.ClampUpperBound, + FundingRateScalingFactor: p.Perpetual.FundingRateScalingFactor, + FundingRateLowerBound: p.Perpetual.FundingRateLowerBound, + FundingRateUpperBound: p.Perpetual.FundingRateUpperBound, + DataSourceSpecForSettlementSchedule: p.Perpetual.DataSourceSpecForSettlementSchedule, + DataSourceSpecForSettlementData: p.Perpetual.DataSourceSpecForSettlementData, + DataSourceSpecBinding: p.Perpetual.DataSourceSpecBinding, + } default: return nil, ErrUnsupportedProduct } updateInstrumentConfiguration := &UpdateInstrumentConfiguration{ Code: protoInstrument.Code, + Name: protoInstrument.Name, Product: product, } @@ -115,7 +118,6 @@ func (r *updateMarketConfigurationResolver) LiquidityMonitoringParameters(ctx co TimeWindow: int(obj.LiquidityMonitoringParameters.TargetStakeParameters.TimeWindow), ScalingFactor: obj.LiquidityMonitoringParameters.TargetStakeParameters.ScalingFactor, }, - TriggeringRatio: obj.LiquidityMonitoringParameters.TriggeringRatio, }, nil } diff --git a/datanode/gateway/graphql/update_market_resolver.go b/datanode/gateway/graphql/update_market_resolver.go index afc4c5cb10..9a8b709c17 100644 --- a/datanode/gateway/graphql/update_market_resolver.go +++ b/datanode/gateway/graphql/update_market_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/update_network_parameter_resolver.go b/datanode/gateway/graphql/update_network_parameter_resolver.go index 27be602d16..541310b0a5 100644 --- a/datanode/gateway/graphql/update_network_parameter_resolver.go +++ b/datanode/gateway/graphql/update_network_parameter_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/vote_resolver.go b/datanode/gateway/graphql/vote_resolver.go index 95103aced2..e81bd199e1 100644 --- a/datanode/gateway/graphql/vote_resolver.go +++ b/datanode/gateway/graphql/vote_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/graphql/withdrawal_resolver.go b/datanode/gateway/graphql/withdrawal_resolver.go index daa6640af3..35a740953e 100644 --- a/datanode/gateway/graphql/withdrawal_resolver.go +++ b/datanode/gateway/graphql/withdrawal_resolver.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gql import ( diff --git a/datanode/gateway/middleware.go b/datanode/gateway/middleware.go index 7cb37544d8..fff19e3b1d 100644 --- a/datanode/gateway/middleware.go +++ b/datanode/gateway/middleware.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package gateway import ( @@ -37,15 +25,15 @@ import ( "sync" "time" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "code.vegaprotocol.io/vega/datanode/contextutil" "code.vegaprotocol.io/vega/datanode/metrics" vfmt "code.vegaprotocol.io/vega/libs/fmt" vhttp "code.vegaprotocol.io/vega/libs/http" "code.vegaprotocol.io/vega/logging" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) var ErrMaxSubscriptionReached = func(ip string, max uint32) error { diff --git a/datanode/gateway/rest/doc.go b/datanode/gateway/rest/doc.go index fe78343242..3a23710fb3 100644 --- a/datanode/gateway/rest/doc.go +++ b/datanode/gateway/rest/doc.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - // Package rest contains code for running the REST-to-gRPC gateway. // // In order to add a new REST endpoint, add an entry to diff --git a/datanode/gateway/rest/gziphandler.go b/datanode/gateway/rest/gziphandler.go index da89c1d8c3..040dadb285 100644 --- a/datanode/gateway/rest/gziphandler.go +++ b/datanode/gateway/rest/gziphandler.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package rest import ( diff --git a/datanode/gateway/rest/gziphandler_test.go b/datanode/gateway/rest/gziphandler_test.go index 9754e0e258..fded74d324 100644 --- a/datanode/gateway/rest/gziphandler_test.go +++ b/datanode/gateway/rest/gziphandler_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package rest import ( @@ -166,7 +154,7 @@ func TestNoBody(t *testing.T) { } if testing.Verbose() { - b, _ := httputil.DumpResponse(rec.Result(), true) //nolint: bodyclose + b, _ := httputil.DumpResponse(rec.Result(), true) // nolint: bodyclose t.Log("\n" + string(b)) } } diff --git a/datanode/gateway/rest/jsonpb.go b/datanode/gateway/rest/jsonpb.go index f3658e533f..9031edede4 100644 --- a/datanode/gateway/rest/jsonpb.go +++ b/datanode/gateway/rest/jsonpb.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package rest import ( diff --git a/datanode/gateway/rest/server.go b/datanode/gateway/rest/server.go index b5f1e74969..bbaedfbf9b 100644 --- a/datanode/gateway/rest/server.go +++ b/datanode/gateway/rest/server.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package rest import ( diff --git a/datanode/gateway/server/server.go b/datanode/gateway/server/server.go index 649d6c3be5..2cf7111fcf 100644 --- a/datanode/gateway/server/server.go +++ b/datanode/gateway/server/server.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package server import ( @@ -35,15 +23,15 @@ import ( "strconv" "strings" - "github.com/rs/cors" - "golang.org/x/sync/errgroup" - "code.vegaprotocol.io/vega/datanode/gateway" gql "code.vegaprotocol.io/vega/datanode/gateway/graphql" "code.vegaprotocol.io/vega/datanode/gateway/rest" libhttp "code.vegaprotocol.io/vega/libs/http" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + + "github.com/rs/cors" + "golang.org/x/sync/errgroup" ) type Server struct { diff --git a/datanode/gateway/tlsconfig.go b/datanode/gateway/tlsconfig.go index 8a986533cf..1ec43bce1c 100644 --- a/datanode/gateway/tlsconfig.go +++ b/datanode/gateway/tlsconfig.go @@ -21,6 +21,7 @@ import ( "net/http" "code.vegaprotocol.io/vega/paths" + "golang.org/x/crypto/acme/autocert" ) diff --git a/datanode/integration/balances_test.go b/datanode/integration/balances_test.go index 5a75de7b06..b4c7df740f 100644 --- a/datanode/integration/balances_test.go +++ b/datanode/integration/balances_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import "testing" diff --git a/datanode/integration/epoch_test.go b/datanode/integration/epoch_test.go index 40f0aa2abb..361f4d71f4 100644 --- a/datanode/integration/epoch_test.go +++ b/datanode/integration/epoch_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import "testing" diff --git a/datanode/integration/erc20withdrawal_test.go b/datanode/integration/erc20withdrawal_test.go index d7280e7ffd..f96ef3c94e 100644 --- a/datanode/integration/erc20withdrawal_test.go +++ b/datanode/integration/erc20withdrawal_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import "testing" diff --git a/datanode/integration/governance_test.go b/datanode/integration/governance_test.go index 73b5a40a0e..2832da6e20 100644 --- a/datanode/integration/governance_test.go +++ b/datanode/integration/governance_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import "testing" @@ -34,7 +22,7 @@ func TestGovernance(t *testing.T) { "Proposals": `{ proposalsConnection{ edges { node { id, reference, party { id }, state, datetime, rejectionReason, errorDetails } } } }`, "ProposalVoteSummary": `{ proposalsConnection{ edges { node { id votes{ yes{ totalNumber totalWeight totalTokens } } } } } }`, "ProposalVoteDetails": `{ proposalsConnection{ edges { node { id votes{ yes{ votes{value party { id } datetime proposalId governanceTokenBalance governanceTokenWeight } } } } } } }`, - "ProposalNewMarket": `{ proposalsConnection { edges { node { id terms { change { ... on NewMarket { instrument { name } decimalPlaces riskParameters { ... on SimpleRiskModel { params { factorLong factorShort } } } metadata priceMonitoringParameters { triggers { horizonSecs probability auctionExtensionSecs } } liquidityMonitoringParameters { targetStakeParameters { timeWindow scalingFactor } triggeringRatio auctionExtensionSecs } positionDecimalPlaces } } } } } } }`, + "ProposalNewMarket": `{ proposalsConnection { edges { node { id terms { change { ... on NewMarket { instrument { name } decimalPlaces riskParameters { ... on SimpleRiskModel { params { factorLong factorShort } } } metadata priceMonitoringParameters { triggers { horizonSecs probability auctionExtensionSecs } } liquidityMonitoringParameters { targetStakeParameters { timeWindow scalingFactor } } positionDecimalPlaces } } } } } } }`, } for name, query := range queries { diff --git a/datanode/integration/integration_test.go b/datanode/integration/integration_test.go index cc31f04011..7ada6be44c 100644 --- a/datanode/integration/integration_test.go +++ b/datanode/integration/integration_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import ( @@ -44,11 +32,10 @@ import ( "testing" "time" - "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/cmd/data-node/commands/start" "code.vegaprotocol.io/vega/datanode/config" "code.vegaprotocol.io/vega/datanode/config/encoding" + "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/datanode/utils" "code.vegaprotocol.io/vega/datanode/utils/databasetest" vgfs "code.vegaprotocol.io/vega/libs/fs" diff --git a/datanode/integration/market_test.go b/datanode/integration/market_test.go index f6c20819c2..b215262e39 100644 --- a/datanode/integration/market_test.go +++ b/datanode/integration/market_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import "testing" @@ -36,7 +24,7 @@ func TestMarkets(t *testing.T) { "Instrument": "{ marketsConnection{ edges { node { id, tradableInstrument{ instrument{ id, code, name, metadata{ tags } } } } } } }", "MarginCalculator": "{ marketsConnection{ edges { node { id, tradableInstrument{ marginCalculator{ scalingFactors{ searchLevel, initialMargin,collateralRelease } } } } } } }", "PriceMonitor": "{ marketsConnection{ edges { node { id, priceMonitoringSettings{ parameters{ triggers{ horizonSecs, probability } } } } } } }", - "LiquidityMonitor": "{ marketsConnection{ edges { node { id, liquidityMonitoringParameters{ targetStakeParameters{ timeWindow, scalingFactor } triggeringRatio} } } } }", + "LiquidityMonitor": "{ marketsConnection{ edges { node { id, liquidityMonitoringParameters{ targetStakeParameters{ timeWindow, scalingFactor } } } } } }", "Proposal": "{ marketsConnection{ edges { node { id, proposal{ id, reference, party { id }, state, datetime, rejectionReason} } } } }", "ProposalTerms": "{ marketsConnection{ edges { node { id, proposal{ id, terms{ closingDatetime, enactmentDatetime } } } } } }", "ProposalYes": "{ marketsConnection{ edges { node { id, proposal{ id, votes{ yes{ totalNumber totalWeight totalTokens} } } } } } }", diff --git a/datanode/integration/network_parameters_test.go b/datanode/integration/network_parameters_test.go index ffc9bc0cb3..c280a23b65 100644 --- a/datanode/integration/network_parameters_test.go +++ b/datanode/integration/network_parameters_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import "testing" diff --git a/datanode/integration/node_signatures_test.go b/datanode/integration/node_signatures_test.go index d7e8d3195b..b1aa16ba66 100644 --- a/datanode/integration/node_signatures_test.go +++ b/datanode/integration/node_signatures_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import "testing" diff --git a/datanode/integration/nodes_test.go b/datanode/integration/nodes_test.go index cd8d0e12e2..2c5c504439 100644 --- a/datanode/integration/nodes_test.go +++ b/datanode/integration/nodes_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import "testing" diff --git a/datanode/integration/oracles_test.go b/datanode/integration/oracles_test.go index edb62316ad..083f95ec50 100644 --- a/datanode/integration/oracles_test.go +++ b/datanode/integration/oracles_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import ( diff --git a/datanode/integration/parties_test.go b/datanode/integration/parties_test.go index 7d87db9052..327fa0a17e 100644 --- a/datanode/integration/parties_test.go +++ b/datanode/integration/parties_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import "testing" diff --git a/datanode/integration/positions_test.go b/datanode/integration/positions_test.go index 311711500b..78a2a7759d 100644 --- a/datanode/integration/positions_test.go +++ b/datanode/integration/positions_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import "testing" diff --git a/datanode/integration/ratelimit_test.go b/datanode/integration/ratelimit_test.go index edb7c78db0..06cc886113 100644 --- a/datanode/integration/ratelimit_test.go +++ b/datanode/integration/ratelimit_test.go @@ -20,7 +20,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) diff --git a/datanode/integration/reward_summaries_test.go b/datanode/integration/reward_summaries_test.go index df98c01759..6eede94f67 100644 --- a/datanode/integration/reward_summaries_test.go +++ b/datanode/integration/reward_summaries_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import "testing" diff --git a/datanode/integration/testdata/golden/TestAccounts_AssetFeeAccounts b/datanode/integration/testdata/golden/TestAccounts_AssetFeeAccounts index 216c54b518..dc15c4531e 100644 --- a/datanode/integration/testdata/golden/TestAccounts_AssetFeeAccounts +++ b/datanode/integration/testdata/golden/TestAccounts_AssetFeeAccounts @@ -72,5 +72,5 @@ ] } }, - "Duration": 27341026 -} \ No newline at end of file + "Duration": 1964792 +} diff --git a/datanode/integration/testdata/golden/TestAccounts_AssetRewardAccounts b/datanode/integration/testdata/golden/TestAccounts_AssetRewardAccounts index 0b22fcae16..5df96c9009 100644 --- a/datanode/integration/testdata/golden/TestAccounts_AssetRewardAccounts +++ b/datanode/integration/testdata/golden/TestAccounts_AssetRewardAccounts @@ -72,5 +72,5 @@ ] } }, - "Duration": 2502861 -} \ No newline at end of file + "Duration": 1712871 +} diff --git a/datanode/integration/testdata/golden/TestAccounts_MarketAccounts b/datanode/integration/testdata/golden/TestAccounts_MarketAccounts index fec956f0b4..56e7dc3175 100644 --- a/datanode/integration/testdata/golden/TestAccounts_MarketAccounts +++ b/datanode/integration/testdata/golden/TestAccounts_MarketAccounts @@ -106,5 +106,5 @@ ] } }, - "Duration": 6151239 -} \ No newline at end of file + "Duration": 3914986 +} diff --git a/datanode/integration/testdata/golden/TestAccounts_PartyAccounts b/datanode/integration/testdata/golden/TestAccounts_PartyAccounts index 6626164a7e..71a22a9e0d 100644 --- a/datanode/integration/testdata/golden/TestAccounts_PartyAccounts +++ b/datanode/integration/testdata/golden/TestAccounts_PartyAccounts @@ -1184,5 +1184,5 @@ ] } }, - "Duration": 32579420 -} \ No newline at end of file + "Duration": 58085241 +} diff --git a/datanode/integration/testdata/golden/TestBalances_Positions b/datanode/integration/testdata/golden/TestBalances_Positions index 28044fc865..973345ee7f 100644 --- a/datanode/integration/testdata/golden/TestBalances_Positions +++ b/datanode/integration/testdata/golden/TestBalances_Positions @@ -1184,5 +1184,5 @@ ] } }, - "Duration": 22138218 -} \ No newline at end of file + "Duration": 4376640 +} diff --git a/datanode/integration/testdata/golden/TestERC20WithdrawalApproval_ERC20WithdrawalApproval b/datanode/integration/testdata/golden/TestERC20WithdrawalApproval_ERC20WithdrawalApproval index 976948c503..4d61670163 100644 --- a/datanode/integration/testdata/golden/TestERC20WithdrawalApproval_ERC20WithdrawalApproval +++ b/datanode/integration/testdata/golden/TestERC20WithdrawalApproval_ERC20WithdrawalApproval @@ -10,5 +10,5 @@ "targetAddress": "0x0b755ae366FE0368F5b0D1879002B06e9Af40f26" } }, - "Duration": 3184934 -} \ No newline at end of file + "Duration": 1984137 +} diff --git a/datanode/integration/testdata/golden/TestEpochs_CurrentEpoch b/datanode/integration/testdata/golden/TestEpochs_CurrentEpoch index 6971549740..5f36182787 100644 --- a/datanode/integration/testdata/golden/TestEpochs_CurrentEpoch +++ b/datanode/integration/testdata/golden/TestEpochs_CurrentEpoch @@ -13,5 +13,5 @@ } } }, - "Duration": 5996193 -} \ No newline at end of file + "Duration": 4654750 +} diff --git a/datanode/integration/testdata/golden/TestEpochs_EpochByBlock b/datanode/integration/testdata/golden/TestEpochs_EpochByBlock index f4b4a8cfc5..69f22721f7 100644 --- a/datanode/integration/testdata/golden/TestEpochs_EpochByBlock +++ b/datanode/integration/testdata/golden/TestEpochs_EpochByBlock @@ -13,5 +13,5 @@ } } }, - "Duration": 3037208 -} \ No newline at end of file + "Duration": 2582263 +} diff --git a/datanode/integration/testdata/golden/TestEpochs_EpochDelegations b/datanode/integration/testdata/golden/TestEpochs_EpochDelegations index dbfc536cab..50808c2291 100644 --- a/datanode/integration/testdata/golden/TestEpochs_EpochDelegations +++ b/datanode/integration/testdata/golden/TestEpochs_EpochDelegations @@ -31,5 +31,5 @@ } } }, - "Duration": 17844220 -} \ No newline at end of file + "Duration": 6316078 +} diff --git a/datanode/integration/testdata/golden/TestEpochs_SpecificEpoch b/datanode/integration/testdata/golden/TestEpochs_SpecificEpoch index a5c604ea71..7348ec04e3 100644 --- a/datanode/integration/testdata/golden/TestEpochs_SpecificEpoch +++ b/datanode/integration/testdata/golden/TestEpochs_SpecificEpoch @@ -13,5 +13,5 @@ } } }, - "Duration": 15647951 -} \ No newline at end of file + "Duration": 2782709 +} diff --git a/datanode/integration/testdata/golden/TestGovernance_ProposalNewMarket b/datanode/integration/testdata/golden/TestGovernance_ProposalNewMarket index 06f09bf12f..a4bf3b5628 100644 --- a/datanode/integration/testdata/golden/TestGovernance_ProposalNewMarket +++ b/datanode/integration/testdata/golden/TestGovernance_ProposalNewMarket @@ -1,6 +1,6 @@ { "TestName": "TestGovernance_ProposalNewMarket", - "Query": "{ proposalsConnection { edges { node { id terms { change { ... on NewMarket { instrument { name } decimalPlaces riskParameters { ... on SimpleRiskModel { params { factorLong factorShort } } } metadata priceMonitoringParameters { triggers { horizonSecs probability auctionExtensionSecs } } liquidityMonitoringParameters { targetStakeParameters { timeWindow scalingFactor } triggeringRatio auctionExtensionSecs } positionDecimalPlaces } } } } } } }", + "Query": "{ proposalsConnection { edges { node { id terms { change { ... on NewMarket { instrument { name } decimalPlaces riskParameters { ... on SimpleRiskModel { params { factorLong factorShort } } } metadata priceMonitoringParameters { triggers { horizonSecs probability auctionExtensionSecs } } liquidityMonitoringParameters { targetStakeParameters { timeWindow scalingFactor } } positionDecimalPlaces } } } } } } }", "Result": { "proposalsConnection": { "edges": [ @@ -22,12 +22,10 @@ "name": "Futures System-Tests Market" }, "liquidityMonitoringParameters": { - "auctionExtensionSecs": 1, "targetStakeParameters": { "scalingFactor": 5, "timeWindow": 10 - }, - "triggeringRatio": "0" + } }, "metadata": [ "asset_class:fx/crypto", @@ -76,12 +74,10 @@ "name": "Futures System-Tests Market" }, "liquidityMonitoringParameters": { - "auctionExtensionSecs": 1, "targetStakeParameters": { "scalingFactor": 5, "timeWindow": 10 - }, - "triggeringRatio": "0" + } }, "metadata": [ "asset_class:fx/crypto", @@ -106,12 +102,10 @@ "name": "Futures System-Tests Market" }, "liquidityMonitoringParameters": { - "auctionExtensionSecs": 1, "targetStakeParameters": { "scalingFactor": 5, "timeWindow": 10 - }, - "triggeringRatio": "0" + } }, "metadata": [ "asset_class:fx/crypto", @@ -161,5 +155,5 @@ ] } }, - "Duration": 6022109 -} \ No newline at end of file + "Duration": 3396689 +} diff --git a/datanode/integration/testdata/golden/TestGovernance_ProposalVoteDetails b/datanode/integration/testdata/golden/TestGovernance_ProposalVoteDetails index caa152aa57..fdacbb1e94 100644 --- a/datanode/integration/testdata/golden/TestGovernance_ProposalVoteDetails +++ b/datanode/integration/testdata/golden/TestGovernance_ProposalVoteDetails @@ -227,5 +227,5 @@ ] } }, - "Duration": 5362151 -} \ No newline at end of file + "Duration": 4705386 +} diff --git a/datanode/integration/testdata/golden/TestGovernance_ProposalVoteSummary b/datanode/integration/testdata/golden/TestGovernance_ProposalVoteSummary index 3f3f98d571..4c93d9d66b 100644 --- a/datanode/integration/testdata/golden/TestGovernance_ProposalVoteSummary +++ b/datanode/integration/testdata/golden/TestGovernance_ProposalVoteSummary @@ -139,5 +139,5 @@ ] } }, - "Duration": 7351322 -} \ No newline at end of file + "Duration": 4132543 +} diff --git a/datanode/integration/testdata/golden/TestGovernance_Proposals b/datanode/integration/testdata/golden/TestGovernance_Proposals index caef40db62..12295c66a3 100644 --- a/datanode/integration/testdata/golden/TestGovernance_Proposals +++ b/datanode/integration/testdata/golden/TestGovernance_Proposals @@ -150,5 +150,5 @@ ] } }, - "Duration": 6761712 -} \ No newline at end of file + "Duration": 3310644 +} diff --git a/datanode/integration/testdata/golden/TestMarkets b/datanode/integration/testdata/golden/TestMarkets index 7ed3ac9818..7dcb2325a7 100644 --- a/datanode/integration/testdata/golden/TestMarkets +++ b/datanode/integration/testdata/golden/TestMarkets @@ -258,5 +258,5 @@ ] } }, - "Duration": 3706499 -} \ No newline at end of file + "Duration": 3080166 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_Accounts b/datanode/integration/testdata/golden/TestMarkets_Accounts index fa970a15c6..0ac765b04c 100644 --- a/datanode/integration/testdata/golden/TestMarkets_Accounts +++ b/datanode/integration/testdata/golden/TestMarkets_Accounts @@ -106,5 +106,5 @@ ] } }, - "Duration": 3026333 -} \ No newline at end of file + "Duration": 1639398 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_Basic b/datanode/integration/testdata/golden/TestMarkets_Basic index febc49feaf..8c9d33c748 100644 --- a/datanode/integration/testdata/golden/TestMarkets_Basic +++ b/datanode/integration/testdata/golden/TestMarkets_Basic @@ -31,5 +31,5 @@ ] } }, - "Duration": 1068482 -} \ No newline at end of file + "Duration": 498671 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_Candles15Minute b/datanode/integration/testdata/golden/TestMarkets_Candles15Minute index 11557acbf8..1fcb2c7699 100644 --- a/datanode/integration/testdata/golden/TestMarkets_Candles15Minute +++ b/datanode/integration/testdata/golden/TestMarkets_Candles15Minute @@ -10,18 +10,22016 @@ "edges": [ { "node": { - "close": "97600000", - "high": "97600000", - "lastUpdateInPeriod": "2023-03-10T10:27:57.70992Z", - "low": "97600000", - "open": "97600000", - "periodStart": "2023-03-10T10:15:00Z", - "volume": "500000" + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T09:45:00Z", + "volume": "0" + } + } + ] + }, + "id": "bda439ade276efe1567fedec94ea5b9c040c5f89f72382ef1cf893faf0454f32" + } + }, + { + "node": { + "candlesConnection": { + "edges": [ + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T09:45:00Z", + "volume": "0" } } ] }, - "id": "bda439ade276efe1567fedec94ea5b9c040c5f89f72382ef1cf893faf0454f32" + "id": "c8657325431e08fc2a22f5094d3fb42a570b6b13d5dafc346924e340ea2a6711" } }, { @@ -30,33 +22028,11002 @@ "edges": [ { "node": { - "close": "90000000", - "high": "97600000", - "lastUpdateInPeriod": "2023-03-10T10:24:29.769344Z", - "low": "90000000", - "open": "97600000", - "periodStart": "2023-03-10T10:15:00Z", - "volume": "600000" + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-05T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-05T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-06T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-06T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-07T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-07T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-08T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-08T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-09T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-09T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T13:00:00Z", + "volume": "0" } - } - ] - }, - "id": "c8657325431e08fc2a22f5094d3fb42a570b6b13d5dafc346924e340ea2a6711" - } - }, - { - "node": { - "candlesConnection": { - "edges": [ + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-10T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-10T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T09:30:00Z", + "volume": "0" + } + }, { "node": { - "close": "100000000", - "high": "100000000", - "lastUpdateInPeriod": "2023-03-10T10:23:36.098505Z", - "low": "100000000", - "open": "100000000", - "periodStart": "2023-03-10T10:15:00Z", - "volume": "100000" + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-11T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-11T09:45:00Z", + "volume": "0" } } ] @@ -67,5 +33034,5 @@ ] } }, - "Duration": 11594972 -} \ No newline at end of file + "Duration": 402512555 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_Candles1Minute b/datanode/integration/testdata/golden/TestMarkets_Candles1Minute index b39bbfd14e..2e05e65b5f 100644 --- a/datanode/integration/testdata/golden/TestMarkets_Candles1Minute +++ b/datanode/integration/testdata/golden/TestMarkets_Candles1Minute @@ -10,18 +10,22016 @@ "edges": [ { "node": { - "close": "97600000", - "high": "97600000", - "lastUpdateInPeriod": "2023-03-10T10:27:57.70992Z", - "low": "97600000", - "open": "97600000", - "periodStart": "2023-03-10T10:27:00Z", - "volume": "500000" + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:39:00Z", + "volume": "0" + } + } + ] + }, + "id": "bda439ade276efe1567fedec94ea5b9c040c5f89f72382ef1cf893faf0454f32" + } + }, + { + "node": { + "candlesConnection": { + "edges": [ + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:39:00Z", + "volume": "0" } } ] }, - "id": "bda439ade276efe1567fedec94ea5b9c040c5f89f72382ef1cf893faf0454f32" + "id": "c8657325431e08fc2a22f5094d3fb42a570b6b13d5dafc346924e340ea2a6711" } }, { @@ -30,33 +22028,11002 @@ "edges": [ { "node": { - "close": "90000000", - "high": "97600000", - "lastUpdateInPeriod": "2023-03-10T10:24:29.769344Z", - "low": "90000000", - "open": "97600000", - "periodStart": "2023-03-10T10:24:00Z", - "volume": "600000" + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:16:00Z", + "volume": "0" } - } - ] - }, - "id": "c8657325431e08fc2a22f5094d3fb42a570b6b13d5dafc346924e340ea2a6711" - } - }, - { - "node": { - "candlesConnection": { - "edges": [ + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:38:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:39:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:41:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:41:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:42:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:42:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:43:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:43:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:44:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:44:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:46:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:46:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:47:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:47:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:48:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:48:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:49:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:49:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:51:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:51:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:52:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:52:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:53:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:53:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:54:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:54:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:56:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:56:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:57:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:57:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:58:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:58:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:59:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:59:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:01:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:01:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:02:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:02:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:03:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:03:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:04:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:04:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:06:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:06:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:07:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:07:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:08:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:08:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:09:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:09:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:11:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:11:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:12:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:12:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:13:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:13:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:14:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:14:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:16:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:16:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:17:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:17:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:18:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:18:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:19:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:19:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:21:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:21:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:22:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:22:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:23:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:23:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:24:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:24:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:26:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:26:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:27:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:27:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:28:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:28:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:29:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:29:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:31:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:31:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:32:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:32:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:33:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:33:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:34:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:34:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:36:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:36:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:37:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:37:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:38:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:38:00Z", + "volume": "0" + } + }, { "node": { - "close": "100000000", - "high": "100000000", - "lastUpdateInPeriod": "2023-03-10T10:23:36.098505Z", - "low": "100000000", - "open": "100000000", - "periodStart": "2023-03-10T10:23:00Z", - "volume": "100000" + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:39:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:39:00Z", + "volume": "0" } } ] @@ -67,5 +33034,5 @@ ] } }, - "Duration": 10025544 -} \ No newline at end of file + "Duration": 5143934740 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_Candles5Minute b/datanode/integration/testdata/golden/TestMarkets_Candles5Minute index eed8be3720..84e4edecf2 100644 --- a/datanode/integration/testdata/golden/TestMarkets_Candles5Minute +++ b/datanode/integration/testdata/golden/TestMarkets_Candles5Minute @@ -10,18 +10,22016 @@ "edges": [ { "node": { - "close": "97600000", - "high": "97600000", - "lastUpdateInPeriod": "2023-03-10T10:27:57.70992Z", - "low": "97600000", - "open": "97600000", - "periodStart": "2023-03-10T10:25:00Z", - "volume": "500000" + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:15:00Z", + "volume": "0" + } + } + ] + }, + "id": "bda439ade276efe1567fedec94ea5b9c040c5f89f72382ef1cf893faf0454f32" + } + }, + { + "node": { + "candlesConnection": { + "edges": [ + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:15:00Z", + "volume": "0" } } ] }, - "id": "bda439ade276efe1567fedec94ea5b9c040c5f89f72382ef1cf893faf0454f32" + "id": "c8657325431e08fc2a22f5094d3fb42a570b6b13d5dafc346924e340ea2a6711" } }, { @@ -30,33 +22028,11002 @@ "edges": [ { "node": { - "close": "90000000", - "high": "97600000", - "lastUpdateInPeriod": "2023-03-10T10:24:29.769344Z", - "low": "90000000", - "open": "97600000", - "periodStart": "2023-03-10T10:20:00Z", - "volume": "600000" + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T11:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T11:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T12:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T12:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T13:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T13:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T14:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T14:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T15:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T15:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T16:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T16:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T17:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T17:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T18:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T18:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T19:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T19:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T20:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T20:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T21:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T21:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T22:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T22:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-01T23:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-01T23:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T11:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T11:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T12:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T12:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T13:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T13:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T14:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T14:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T15:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T15:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T16:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T16:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T17:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T17:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T18:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T18:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T19:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T19:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T20:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T20:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T21:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T21:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T22:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T22:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-02T23:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-02T23:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T11:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T11:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T12:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T12:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T13:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T13:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T14:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T14:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T15:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T15:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T16:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T16:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T17:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T17:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T18:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T18:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T19:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T19:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T20:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T20:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T21:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T21:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T22:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T22:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-03T23:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-03T23:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T00:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T00:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T01:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T01:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T02:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T02:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T03:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T03:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:20:00Z", + "volume": "0" } - } - ] - }, - "id": "c8657325431e08fc2a22f5094d3fb42a570b6b13d5dafc346924e340ea2a6711" - } - }, - { - "node": { - "candlesConnection": { - "edges": [ + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T04:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T04:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T05:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T05:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T06:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T06:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T07:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T07:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T08:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T08:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T09:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T09:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:10:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:15:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:20:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:20:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:25:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:25:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:30:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:30:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:35:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:35:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:40:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:40:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:45:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:45:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:50:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:50:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T10:55:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T10:55:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:00:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:00:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:05:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:05:00Z", + "volume": "0" + } + }, + { + "node": { + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:10:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:10:00Z", + "volume": "0" + } + }, { "node": { - "close": "100000000", - "high": "100000000", - "lastUpdateInPeriod": "2023-03-10T10:23:36.098505Z", - "low": "100000000", - "open": "100000000", - "periodStart": "2023-03-10T10:20:00Z", - "volume": "100000" + "close": "", + "high": "", + "lastUpdateInPeriod": "2000-01-04T11:15:00Z", + "low": "", + "open": "", + "periodStart": "2000-01-04T11:15:00Z", + "volume": "0" } } ] @@ -67,5 +33034,5 @@ ] } }, - "Duration": 5505235 -} \ No newline at end of file + "Duration": 1053713884 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_Fees b/datanode/integration/testdata/golden/TestMarkets_Fees index b8a757efc3..261edd7ef6 100644 --- a/datanode/integration/testdata/golden/TestMarkets_Fees +++ b/datanode/integration/testdata/golden/TestMarkets_Fees @@ -43,5 +43,5 @@ ] } }, - "Duration": 1150852 -} \ No newline at end of file + "Duration": 459699 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_Instrument b/datanode/integration/testdata/golden/TestMarkets_Instrument index 50589e19d3..a6b5f3bd17 100644 --- a/datanode/integration/testdata/golden/TestMarkets_Instrument +++ b/datanode/integration/testdata/golden/TestMarkets_Instrument @@ -61,5 +61,5 @@ ] } }, - "Duration": 997427 -} \ No newline at end of file + "Duration": 451667 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_LiquidityMonitor b/datanode/integration/testdata/golden/TestMarkets_LiquidityMonitor index d749b586d5..860990c4ef 100644 --- a/datanode/integration/testdata/golden/TestMarkets_LiquidityMonitor +++ b/datanode/integration/testdata/golden/TestMarkets_LiquidityMonitor @@ -1,6 +1,6 @@ { "TestName": "TestMarkets_LiquidityMonitor", - "Query": "{ marketsConnection{ edges { node { id, liquidityMonitoringParameters{ targetStakeParameters{ timeWindow, scalingFactor } triggeringRatio} } } } }", + "Query": "{ marketsConnection{ edges { node { id, liquidityMonitoringParameters{ targetStakeParameters{ timeWindow, scalingFactor } } } } } }", "Result": { "marketsConnection": { "edges": [ @@ -11,8 +11,7 @@ "targetStakeParameters": { "scalingFactor": 5, "timeWindow": 10 - }, - "triggeringRatio": "0" + } } } }, @@ -23,8 +22,7 @@ "targetStakeParameters": { "scalingFactor": 5, "timeWindow": 10 - }, - "triggeringRatio": "0" + } } } }, @@ -35,13 +33,12 @@ "targetStakeParameters": { "scalingFactor": 5, "timeWindow": 10 - }, - "triggeringRatio": "0" + } } } } ] } }, - "Duration": 866179 -} \ No newline at end of file + "Duration": 481350 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_LiquidityProvisions b/datanode/integration/testdata/golden/TestMarkets_LiquidityProvisions index e1aa178b8c..4fb0a68a93 100644 --- a/datanode/integration/testdata/golden/TestMarkets_LiquidityProvisions +++ b/datanode/integration/testdata/golden/TestMarkets_LiquidityProvisions @@ -258,5 +258,5 @@ ] } }, - "Duration": 2460499 -} \ No newline at end of file + "Duration": 2020874 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_MarginCalculator b/datanode/integration/testdata/golden/TestMarkets_MarginCalculator index bc43aa8a40..b5f9a067ea 100644 --- a/datanode/integration/testdata/golden/TestMarkets_MarginCalculator +++ b/datanode/integration/testdata/golden/TestMarkets_MarginCalculator @@ -49,5 +49,5 @@ ] } }, - "Duration": 1454187 -} \ No newline at end of file + "Duration": 543859 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_MarketDepth b/datanode/integration/testdata/golden/TestMarkets_MarketDepth index a3e1ce557e..59482740af 100644 --- a/datanode/integration/testdata/golden/TestMarkets_MarketDepth +++ b/datanode/integration/testdata/golden/TestMarkets_MarketDepth @@ -114,5 +114,5 @@ ] } }, - "Duration": 3810956 -} \ No newline at end of file + "Duration": 2640931 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_OrderBuyFees b/datanode/integration/testdata/golden/TestMarkets_OrderBuyFees index b15cb21082..917abe1907 100644 --- a/datanode/integration/testdata/golden/TestMarkets_OrderBuyFees +++ b/datanode/integration/testdata/golden/TestMarkets_OrderBuyFees @@ -74,5 +74,5 @@ ] } }, - "Duration": 3367784 -} \ No newline at end of file + "Duration": 2021992 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_OrderLP b/datanode/integration/testdata/golden/TestMarkets_OrderLP index 27346d5d98..3ee1e83688 100644 --- a/datanode/integration/testdata/golden/TestMarkets_OrderLP +++ b/datanode/integration/testdata/golden/TestMarkets_OrderLP @@ -244,5 +244,5 @@ ] } }, - "Duration": 7356836 -} \ No newline at end of file + "Duration": 4592871 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_OrderSellFees b/datanode/integration/testdata/golden/TestMarkets_OrderSellFees index 3bbf8de67d..ee3517484a 100644 --- a/datanode/integration/testdata/golden/TestMarkets_OrderSellFees +++ b/datanode/integration/testdata/golden/TestMarkets_OrderSellFees @@ -74,5 +74,5 @@ ] } }, - "Duration": 2762997 -} \ No newline at end of file + "Duration": 1285440 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_OrderTrades b/datanode/integration/testdata/golden/TestMarkets_OrderTrades index d314845320..d547317426 100644 --- a/datanode/integration/testdata/golden/TestMarkets_OrderTrades +++ b/datanode/integration/testdata/golden/TestMarkets_OrderTrades @@ -126,5 +126,5 @@ ] } }, - "Duration": 3335832 -} \ No newline at end of file + "Duration": 2152037 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_Orders b/datanode/integration/testdata/golden/TestMarkets_Orders index 74671ee507..348e457ccb 100644 --- a/datanode/integration/testdata/golden/TestMarkets_Orders +++ b/datanode/integration/testdata/golden/TestMarkets_Orders @@ -754,5 +754,5 @@ ] } }, - "Duration": 9942491 -} \ No newline at end of file + "Duration": 7235617 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_PriceMonitor b/datanode/integration/testdata/golden/TestMarkets_PriceMonitor index 0dab1d80f8..250b70492f 100644 --- a/datanode/integration/testdata/golden/TestMarkets_PriceMonitor +++ b/datanode/integration/testdata/golden/TestMarkets_PriceMonitor @@ -37,5 +37,5 @@ ] } }, - "Duration": 1603741 -} \ No newline at end of file + "Duration": 415908 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_Proposal b/datanode/integration/testdata/golden/TestMarkets_Proposal index 3cd92a38e8..f8eb6f6657 100644 --- a/datanode/integration/testdata/golden/TestMarkets_Proposal +++ b/datanode/integration/testdata/golden/TestMarkets_Proposal @@ -52,5 +52,5 @@ ] } }, - "Duration": 4302873 -} \ No newline at end of file + "Duration": 2363518 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_ProposalNo b/datanode/integration/testdata/golden/TestMarkets_ProposalNo index bf95d53b9e..8774022465 100644 --- a/datanode/integration/testdata/golden/TestMarkets_ProposalNo +++ b/datanode/integration/testdata/golden/TestMarkets_ProposalNo @@ -52,5 +52,5 @@ ] } }, - "Duration": 2695396 -} \ No newline at end of file + "Duration": 1518082 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_ProposalTerms b/datanode/integration/testdata/golden/TestMarkets_ProposalTerms index 0e39cabc55..06e56cbd39 100644 --- a/datanode/integration/testdata/golden/TestMarkets_ProposalTerms +++ b/datanode/integration/testdata/golden/TestMarkets_ProposalTerms @@ -43,5 +43,5 @@ ] } }, - "Duration": 4770771 -} \ No newline at end of file + "Duration": 3055511 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_ProposalYes b/datanode/integration/testdata/golden/TestMarkets_ProposalYes index d772ccebc2..4a63703ede 100644 --- a/datanode/integration/testdata/golden/TestMarkets_ProposalYes +++ b/datanode/integration/testdata/golden/TestMarkets_ProposalYes @@ -52,5 +52,5 @@ ] } }, - "Duration": 4089924 -} \ No newline at end of file + "Duration": 1666986 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_ProposalYesVotes b/datanode/integration/testdata/golden/TestMarkets_ProposalYesVotes index e8e2561eb2..06cb6f2ace 100644 --- a/datanode/integration/testdata/golden/TestMarkets_ProposalYesVotes +++ b/datanode/integration/testdata/golden/TestMarkets_ProposalYesVotes @@ -79,5 +79,5 @@ ] } }, - "Duration": 3075378 -} \ No newline at end of file + "Duration": 1643659 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_PropsalNoVotes b/datanode/integration/testdata/golden/TestMarkets_PropsalNoVotes index f74cdeaa47..923d9b6b6e 100644 --- a/datanode/integration/testdata/golden/TestMarkets_PropsalNoVotes +++ b/datanode/integration/testdata/golden/TestMarkets_PropsalNoVotes @@ -46,5 +46,5 @@ ] } }, - "Duration": 7098527 -} \ No newline at end of file + "Duration": 1524019 +} diff --git a/datanode/integration/testdata/golden/TestMarkets_RiskFactor b/datanode/integration/testdata/golden/TestMarkets_RiskFactor index 046d161e9a..64b63dfb9d 100644 --- a/datanode/integration/testdata/golden/TestMarkets_RiskFactor +++ b/datanode/integration/testdata/golden/TestMarkets_RiskFactor @@ -34,5 +34,5 @@ ] } }, - "Duration": 2518825 -} \ No newline at end of file + "Duration": 1013964 +} diff --git a/datanode/integration/testdata/golden/TestNetParams_Network_Parameters b/datanode/integration/testdata/golden/TestNetParams_Network_Parameters index c062e66f10..2c34c4fc13 100644 --- a/datanode/integration/testdata/golden/TestNetParams_Network_Parameters +++ b/datanode/integration/testdata/golden/TestNetParams_Network_Parameters @@ -703,5 +703,5 @@ ] } }, - "Duration": 2763721 -} \ No newline at end of file + "Duration": 1441257 +} diff --git a/datanode/integration/testdata/golden/TestNodeData_NodeData b/datanode/integration/testdata/golden/TestNodeData_NodeData index 556e5bb987..8ecfcba36d 100644 --- a/datanode/integration/testdata/golden/TestNodeData_NodeData +++ b/datanode/integration/testdata/golden/TestNodeData_NodeData @@ -16,5 +16,5 @@ "uptime": 12.15278434753418 } }, - "Duration": 14821729 -} \ No newline at end of file + "Duration": 5391652 +} diff --git a/datanode/integration/testdata/golden/TestNodeSignatures_NodeSignatures b/datanode/integration/testdata/golden/TestNodeSignatures_NodeSignatures index 68ccc4575d..f412654ecf 100644 --- a/datanode/integration/testdata/golden/TestNodeSignatures_NodeSignatures +++ b/datanode/integration/testdata/golden/TestNodeSignatures_NodeSignatures @@ -6,5 +6,5 @@ "edges": [] } }, - "Duration": 1655918 -} \ No newline at end of file + "Duration": 693251 +} diff --git a/datanode/integration/testdata/golden/TestNodes_Nodes b/datanode/integration/testdata/golden/TestNodes_Nodes index f7557bb90f..75bd391758 100644 --- a/datanode/integration/testdata/golden/TestNodes_Nodes +++ b/datanode/integration/testdata/golden/TestNodes_Nodes @@ -1869,5 +1869,5 @@ ] } }, - "Duration": 12992479 -} \ No newline at end of file + "Duration": 7760339 +} diff --git a/datanode/integration/testdata/golden/TestOracles_OracleDataConnectionExternal b/datanode/integration/testdata/golden/TestOracles_OracleDataConnectionExternal index b7c5c23d8e..a2257897b6 100644 --- a/datanode/integration/testdata/golden/TestOracles_OracleDataConnectionExternal +++ b/datanode/integration/testdata/golden/TestOracles_OracleDataConnectionExternal @@ -75,5 +75,5 @@ ] } }, - "Duration": 10529999 -} \ No newline at end of file + "Duration": 2742620 +} diff --git a/datanode/integration/testdata/golden/TestOracles_OracleDataConnectionExternalEthereum b/datanode/integration/testdata/golden/TestOracles_OracleDataConnectionExternalEthereum index 5b66d503bb..a2f5e6fd74 100644 --- a/datanode/integration/testdata/golden/TestOracles_OracleDataConnectionExternalEthereum +++ b/datanode/integration/testdata/golden/TestOracles_OracleDataConnectionExternalEthereum @@ -75,5 +75,5 @@ ] } }, - "Duration": 939708 -} \ No newline at end of file + "Duration": 1526185 +} diff --git a/datanode/integration/testdata/golden/TestOracles_OracleDataConnectionInternal b/datanode/integration/testdata/golden/TestOracles_OracleDataConnectionInternal index bed2801295..258796636b 100644 --- a/datanode/integration/testdata/golden/TestOracles_OracleDataConnectionInternal +++ b/datanode/integration/testdata/golden/TestOracles_OracleDataConnectionInternal @@ -75,5 +75,5 @@ ] } }, - "Duration": 965981 -} \ No newline at end of file + "Duration": 1507956 +} diff --git a/datanode/integration/testdata/golden/TestOracles_OracleDataSourceExternal b/datanode/integration/testdata/golden/TestOracles_OracleDataSourceExternal index 521d8f4fe6..b062f9887e 100644 --- a/datanode/integration/testdata/golden/TestOracles_OracleDataSourceExternal +++ b/datanode/integration/testdata/golden/TestOracles_OracleDataSourceExternal @@ -241,5 +241,5 @@ ] } }, - "Duration": 6803006 -} \ No newline at end of file + "Duration": 1457809 +} diff --git a/datanode/integration/testdata/golden/TestOracles_OracleDataSourceExternalEthereum b/datanode/integration/testdata/golden/TestOracles_OracleDataSourceExternalEthereum index 6d2b5969b4..5a10234537 100644 --- a/datanode/integration/testdata/golden/TestOracles_OracleDataSourceExternalEthereum +++ b/datanode/integration/testdata/golden/TestOracles_OracleDataSourceExternalEthereum @@ -109,5 +109,5 @@ ] } }, - "Duration": 877043 -} \ No newline at end of file + "Duration": 1025977 +} diff --git a/datanode/integration/testdata/golden/TestOracles_OracleDataSourceInternal b/datanode/integration/testdata/golden/TestOracles_OracleDataSourceInternal index 385b6ab825..85614d8d14 100644 --- a/datanode/integration/testdata/golden/TestOracles_OracleDataSourceInternal +++ b/datanode/integration/testdata/golden/TestOracles_OracleDataSourceInternal @@ -97,5 +97,5 @@ ] } }, - "Duration": 614530 -} \ No newline at end of file + "Duration": 982605 +} diff --git a/datanode/integration/testdata/golden/TestParties_Delegations b/datanode/integration/testdata/golden/TestParties_Delegations index bbb5fd48c2..eee030e232 100644 --- a/datanode/integration/testdata/golden/TestParties_Delegations +++ b/datanode/integration/testdata/golden/TestParties_Delegations @@ -2681,5 +2681,5 @@ ] } }, - "Duration": 103485890 -} \ No newline at end of file + "Duration": 88257002 +} diff --git a/datanode/integration/testdata/golden/TestParties_Deposits b/datanode/integration/testdata/golden/TestParties_Deposits index a36e240516..68bd9b7560 100644 --- a/datanode/integration/testdata/golden/TestParties_Deposits +++ b/datanode/integration/testdata/golden/TestParties_Deposits @@ -885,5 +885,5 @@ ] } }, - "Duration": 7880475 -} \ No newline at end of file + "Duration": 5446828 +} diff --git a/datanode/integration/testdata/golden/TestParties_LiquidityProvision b/datanode/integration/testdata/golden/TestParties_LiquidityProvision index e06cdaf0fa..3d8de95d65 100644 --- a/datanode/integration/testdata/golden/TestParties_LiquidityProvision +++ b/datanode/integration/testdata/golden/TestParties_LiquidityProvision @@ -641,5 +641,5 @@ ] } }, - "Duration": 13244005 -} \ No newline at end of file + "Duration": 9185882 +} diff --git a/datanode/integration/testdata/golden/TestParties_Margin_Levels b/datanode/integration/testdata/golden/TestParties_Margin_Levels index 294d0c3872..6530365a6f 100644 --- a/datanode/integration/testdata/golden/TestParties_Margin_Levels +++ b/datanode/integration/testdata/golden/TestParties_Margin_Levels @@ -485,5 +485,5 @@ ] } }, - "Duration": 5771603 -} \ No newline at end of file + "Duration": 4227459 +} diff --git a/datanode/integration/testdata/golden/TestParties_Proposals b/datanode/integration/testdata/golden/TestParties_Proposals index 63867b832d..e17dc1e801 100644 --- a/datanode/integration/testdata/golden/TestParties_Proposals +++ b/datanode/integration/testdata/golden/TestParties_Proposals @@ -427,5 +427,5 @@ ] } }, - "Duration": 8863950 -} \ No newline at end of file + "Duration": 8998776 +} diff --git a/datanode/integration/testdata/golden/TestParties_StakeLinking b/datanode/integration/testdata/golden/TestParties_StakeLinking index d46f474b89..76e45bb5ac 100644 --- a/datanode/integration/testdata/golden/TestParties_StakeLinking +++ b/datanode/integration/testdata/golden/TestParties_StakeLinking @@ -587,5 +587,5 @@ ] } }, - "Duration": 114906823 -} \ No newline at end of file + "Duration": 5172349 +} diff --git a/datanode/integration/testdata/golden/TestParties_Votes b/datanode/integration/testdata/golden/TestParties_Votes index 29a0cde53a..15d783c1bb 100644 --- a/datanode/integration/testdata/golden/TestParties_Votes +++ b/datanode/integration/testdata/golden/TestParties_Votes @@ -363,5 +363,5 @@ ] } }, - "Duration": 5284971 -} \ No newline at end of file + "Duration": 3235076 +} diff --git a/datanode/integration/testdata/golden/TestParties_Withdrawals b/datanode/integration/testdata/golden/TestParties_Withdrawals index c4b0520642..a2ca200375 100644 --- a/datanode/integration/testdata/golden/TestParties_Withdrawals +++ b/datanode/integration/testdata/golden/TestParties_Withdrawals @@ -350,5 +350,5 @@ ] } }, - "Duration": 5838549 -} \ No newline at end of file + "Duration": 4396755 +} diff --git a/datanode/integration/testdata/golden/TestPositions_Positions b/datanode/integration/testdata/golden/TestPositions_Positions index ced7b90ea7..e5cef46f37 100644 --- a/datanode/integration/testdata/golden/TestPositions_Positions +++ b/datanode/integration/testdata/golden/TestPositions_Positions @@ -452,5 +452,5 @@ ] } }, - "Duration": 6383903 -} \ No newline at end of file + "Duration": 4768383 +} diff --git a/datanode/integration/testdata/golden/TestRewardSummaries_RewardSummaries b/datanode/integration/testdata/golden/TestRewardSummaries_RewardSummaries index b29a297548..c561a15e2c 100644 --- a/datanode/integration/testdata/golden/TestRewardSummaries_RewardSummaries +++ b/datanode/integration/testdata/golden/TestRewardSummaries_RewardSummaries @@ -6,5 +6,5 @@ "edges": null } }, - "Duration": 3091848 -} \ No newline at end of file + "Duration": 2054817 +} diff --git a/datanode/integration/testdata/golden/TestTransfers_Transfers b/datanode/integration/testdata/golden/TestTransfers_Transfers index 77911fe6b1..e64afe2e9f 100644 --- a/datanode/integration/testdata/golden/TestTransfers_Transfers +++ b/datanode/integration/testdata/golden/TestTransfers_Transfers @@ -6,5 +6,5 @@ "edges": null } }, - "Duration": 2903006 + "Duration": 1372812 } diff --git a/datanode/integration/transfers_test.go b/datanode/integration/transfers_test.go index 4f445a6d82..df693c26a8 100644 --- a/datanode/integration/transfers_test.go +++ b/datanode/integration/transfers_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package integration_test import "testing" diff --git a/datanode/libs/testing/helpers.go b/datanode/libs/testing/helpers.go index 58e89200a1..5bcd7eb461 100644 --- a/datanode/libs/testing/helpers.go +++ b/datanode/libs/testing/helpers.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package testing import ( @@ -34,6 +22,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/paths" + "github.com/stretchr/testify/assert" "google.golang.org/protobuf/proto" ) diff --git a/datanode/metrics/config.go b/datanode/metrics/config.go index 1de8f69f0f..69027d3ff2 100644 --- a/datanode/metrics/config.go +++ b/datanode/metrics/config.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package metrics import ( diff --git a/datanode/metrics/prometheus.go b/datanode/metrics/prometheus.go index 8ce4834dc2..273be868d0 100644 --- a/datanode/metrics/prometheus.go +++ b/datanode/metrics/prometheus.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package metrics import ( @@ -35,9 +23,9 @@ import ( "strings" "time" + "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/protos" - "code.vegaprotocol.io/vega/core/events" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" diff --git a/datanode/metrics/timecounter.go b/datanode/metrics/timecounter.go index 62f5389c19..07c0126982 100644 --- a/datanode/metrics/timecounter.go +++ b/datanode/metrics/timecounter.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package metrics import ( diff --git a/datanode/networkhistory/block_commit_handler.go b/datanode/networkhistory/block_commit_handler.go index 5b5a689a33..69664032c8 100644 --- a/datanode/networkhistory/block_commit_handler.go +++ b/datanode/networkhistory/block_commit_handler.go @@ -21,6 +21,7 @@ import ( "time" "code.vegaprotocol.io/vega/logging" + "github.com/cenkalti/backoff" ) diff --git a/datanode/networkhistory/block_commit_handler_test.go b/datanode/networkhistory/block_commit_handler_test.go index 077df9f0c5..16f68c0caa 100644 --- a/datanode/networkhistory/block_commit_handler_test.go +++ b/datanode/networkhistory/block_commit_handler_test.go @@ -22,7 +22,6 @@ import ( "time" "code.vegaprotocol.io/vega/datanode/networkhistory" - "code.vegaprotocol.io/vega/logging" "github.com/stretchr/testify/assert" diff --git a/datanode/networkhistory/fsutil/fsutil.go b/datanode/networkhistory/fsutil/fsutil.go index cd255cd3f3..e74d54ede0 100644 --- a/datanode/networkhistory/fsutil/fsutil.go +++ b/datanode/networkhistory/fsutil/fsutil.go @@ -17,60 +17,11 @@ package fsutil import ( "archive/zip" - "crypto/md5" - "encoding/hex" "fmt" "io" - "os" "path/filepath" - - vgfs "code.vegaprotocol.io/vega/libs/fs" ) -// RemoveAllFromDirectoryIfExists used in place of os.RemoveAll when the directory should be emptied but not removed. -func RemoveAllFromDirectoryIfExists(dir string) error { - exists, err := vgfs.PathExists(dir) - if err != nil { - return err - } - if !exists { - return nil - } - - err = filepath.Walk(dir, func(file string, fi os.FileInfo, err error) error { - if file != dir { - err := os.RemoveAll(file) - if err != nil { - return fmt.Errorf("failed to remove file:%w", err) - } - } - - return nil - }) - - if err != nil { - return fmt.Errorf("failed to walk directory:%w", err) - } - - return nil -} - -func Md5Hash(path string) (string, error) { - hash := md5.New() - file, err := os.Open(path) - if err != nil { - return "", err - } - defer file.Close() - - _, err = io.Copy(hash, file) - if err != nil { - return "", err - } - - return hex.EncodeToString(hash.Sum(nil)), nil -} - type readerAtWrapper struct { r io.ReadSeeker } diff --git a/datanode/networkhistory/initialise_test.go b/datanode/networkhistory/initialise_test.go index 94a82b07fd..d9b341f809 100644 --- a/datanode/networkhistory/initialise_test.go +++ b/datanode/networkhistory/initialise_test.go @@ -25,10 +25,9 @@ import ( "code.vegaprotocol.io/vega/datanode/networkhistory/segment" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/logging" + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "github.com/golang/mock/gomock" - - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "github.com/stretchr/testify/assert" ) diff --git a/datanode/networkhistory/ipfs/ipfsfetcher.go b/datanode/networkhistory/ipfs/ipfsfetcher.go new file mode 100644 index 0000000000..80e75a60f2 --- /dev/null +++ b/datanode/networkhistory/ipfs/ipfsfetcher.go @@ -0,0 +1,102 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package ipfs + +import ( + "bytes" + "context" + "fmt" + "io" + "path" + "strings" + "time" + + kuboClient "github.com/ipfs/kubo/client/rpc" + "github.com/ipfs/kubo/repo/fsrepo/migrations" +) + +const ( + shellUpTimeout = 2 * time.Second + defaultFetchLimit = 1024 * 1024 * 512 +) + +type ipfsFetcher struct { + distPath string + ipfsDir string + limit int64 +} + +// newIpfsFetcher creates a new IpfsFetcher +// +// Specifying "" for distPath sets the default IPNS path. +// Specifying 0 for fetchLimit sets the default, -1 means no limit. +func newIpfsFetcher(distPath string, ipfsDir string, fetchLimit int64) *ipfsFetcher { + f := &ipfsFetcher{ + limit: defaultFetchLimit, + distPath: migrations.LatestIpfsDist, + ipfsDir: ipfsDir, + } + + if distPath != "" { + if !strings.HasPrefix(distPath, "/") { + distPath = "/" + distPath + } + f.distPath = distPath + } + + if fetchLimit != 0 { + if fetchLimit == -1 { + fetchLimit = 0 + } + f.limit = fetchLimit + } + + return f +} + +func (f *ipfsFetcher) Close() error { + return nil +} + +// Fetch attempts to fetch the file at the given path, from the distribution +// site configured for this HttpFetcher. Returns io.ReadCloser on success, +// which caller must close. +func (f *ipfsFetcher) Fetch(ctx context.Context, filePath string) ([]byte, error) { + sh, err := kuboClient.NewPathApi(f.ipfsDir) + if err != nil { + return nil, fmt.Errorf("failed to create a ipfs shell migration: %w", err) + } + resp, err := sh.Request("cat", path.Join(f.distPath, filePath)).Send(ctx) + if err != nil { + return nil, fmt.Errorf("failed to read file from the ipfs node: %w", err) + } + if resp.Error != nil { + return nil, resp.Error + } + defer resp.Close() + + var output io.Reader + if f.limit != 0 { + output = migrations.NewLimitReadCloser(resp.Output, f.limit) + } else { + output = resp.Output + } + + buf := new(bytes.Buffer) + buf.ReadFrom(output) + + return buf.Bytes(), nil +} diff --git a/datanode/networkhistory/ipfs/migration.go b/datanode/networkhistory/ipfs/migration.go new file mode 100644 index 0000000000..297aea2f96 --- /dev/null +++ b/datanode/networkhistory/ipfs/migration.go @@ -0,0 +1,87 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package ipfs + +import ( + "context" + "fmt" + + "code.vegaprotocol.io/vega/logging" + + "github.com/ipfs/kubo/repo/fsrepo" + "github.com/ipfs/kubo/repo/fsrepo/migrations" +) + +func createFetcher(distPath string, ipfsDir string) migrations.Fetcher { + const userAgent = "fs-repo-migrations" + + if distPath == "" { + distPath = migrations.GetDistPathEnv(migrations.LatestIpfsDist) + } + + return migrations.NewMultiFetcher( + newIpfsFetcher(distPath, ipfsDir, 0), + migrations.NewHttpFetcher(distPath, "", userAgent, 0)) +} + +// LatestSupportedVersion returns the latest version supported by the kubo library. +func latestSupportedVersion() int { + // TODO: Maybe We should hardcode it to be safe and control when the migration happens? + return fsrepo.RepoVersion +} + +// IsMigrationNeeded check if migration of the IPFS repository is needed. +func isMigrationNeeded(ipfsDir string) (bool, error) { + repoVersion, err := migrations.RepoVersion(ipfsDir) + if err != nil { + return false, fmt.Errorf("failed to check version for the %s IPFS repository: %w", ipfsDir, err) + } + + return repoVersion < latestSupportedVersion(), nil +} + +// MigrateIpfsStorageVersion migrates the IPFS store to the latest supported by the +// library version. +// High level overview: +// 1. Check version of the local store, +// 2. Check max supported version for the kubo library, +// 3. Connect to local or remote IPFS node and download required migration binaries, +// 4. Run downloaded binaries to migrate the file system. +func MigrateIpfsStorageVersion(log *logging.Logger, ipfsDir string) error { + isMigrationNeeded, err := isMigrationNeeded(ipfsDir) + if err != nil { + return fmt.Errorf("failed to check if the ipfs migration is needed: %w", err) + } + if !isMigrationNeeded { + if log != nil { + log.Info("The IPFS for the network-history is up to date. Migration not needed") + } + return nil + } + + localIpfsDir, err := migrations.IpfsDir(ipfsDir) + if err != nil { + return fmt.Errorf("failed to find local ipfs directory: %w", err) + } + + fetcher := createFetcher("", localIpfsDir) + err = migrations.RunMigration(context.Background(), fetcher, latestSupportedVersion(), localIpfsDir, false) + if err != nil { + return fmt.Errorf("failed to execute the ipfs migration: %w", err) + } + + return nil +} diff --git a/datanode/networkhistory/segment/segment.go b/datanode/networkhistory/segment/segment.go index bd48bdb05f..e2c1690ec3 100644 --- a/datanode/networkhistory/segment/segment.go +++ b/datanode/networkhistory/segment/segment.go @@ -39,15 +39,19 @@ func (m Base) ZipFileName() string { return fmt.Sprintf("%s-%d-%d-%d.zip", m.ChainID, m.DatabaseVersion, m.HeightFrom, m.HeightTo) } -func NewFromZipFileName(fileName string) (Base, error) { - re, err := regexp.Compile(`(.*)-(\d+)-(\d+)-(\d+).zip`) +func (m Base) SnapshotDataDirectory() string { + return fmt.Sprintf("%s-%d-%d-%d", m.ChainID, m.DatabaseVersion, m.HeightFrom, m.HeightTo) +} + +func NewFromSnapshotDataDirectory(dirName string) (Base, error) { + re, err := regexp.Compile(`(.*)-(\d+)-(\d+)-(\d+)`) if err != nil { return Base{}, fmt.Errorf("failed to compile reg exp:%w", err) } - matches := re.FindStringSubmatch(fileName) + matches := re.FindStringSubmatch(dirName) if len(matches) != 5 { - return Base{}, fmt.Errorf("failed to find matches in zip file name:%s", fileName) + return Base{}, fmt.Errorf("failed to find matches in zip file name:%s", dirName) } dbVersion, err := strconv.ParseInt(matches[2], 10, 64) @@ -128,8 +132,8 @@ type Unpublished struct { Directory string } -func (s Unpublished) ZipFilePath() string { - return path.Join(s.Directory, s.ZipFileName()) +func (s Unpublished) UnpublishedSnapshotDataDirectory() string { + return path.Join(s.Directory, s.SnapshotDataDirectory()) } func (s Unpublished) InProgressFilePath() string { diff --git a/datanode/networkhistory/service.go b/datanode/networkhistory/service.go index 95393f58c7..b60f77ef4b 100644 --- a/datanode/networkhistory/service.go +++ b/datanode/networkhistory/service.go @@ -21,20 +21,19 @@ import ( "fmt" "io" "sort" + "strings" "sync" "time" - "github.com/multiformats/go-multiaddr" - - "github.com/jackc/pgx/v4/pgxpool" - - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "code.vegaprotocol.io/vega/datanode/networkhistory/segment" "code.vegaprotocol.io/vega/datanode/networkhistory/snapshot" "code.vegaprotocol.io/vega/datanode/networkhistory/store" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/logging" + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + + "github.com/jackc/pgx/v4/pgxpool" + "github.com/multiformats/go-multiaddr" ) type Service struct { @@ -263,6 +262,9 @@ func (d *Service) LoadNetworkHistoryIntoDatanode(ctx context.Context, chunk segm func (d *Service) LoadNetworkHistoryIntoDatanodeWithLog(ctx context.Context, log snapshot.LoadLog, chunk segment.ContiguousHistory[segment.Full], connConfig sqlstore.ConnectionConfig, withIndexesAndOrderTriggers, verbose bool, ) (snapshot.LoadResult, error) { + maxRetries := 3 + // the deadlock error that should trigger a retry + status := "deadlock detected (SQLSTATE 40P01)" datanodeBlockSpan, err := sqlstore.GetDatanodeBlockSpan(ctx, d.connPool) if err != nil { return snapshot.LoadResult{}, fmt.Errorf("failed to get data node block span: %w", err) @@ -274,16 +276,27 @@ func (d *Service) LoadNetworkHistoryIntoDatanodeWithLog(ctx context.Context, log start := time.Now() + var rErr error // return error chunks := chunk.Slice(datanodeBlockSpan.ToHeight+1, chunk.HeightTo) - loadResult, err := d.snapshotService.LoadSnapshotData(ctx, log, chunks, connConfig, withIndexesAndOrderTriggers, verbose) - if err != nil { - return snapshot.LoadResult{}, fmt.Errorf("failed to load snapshot data:%w", err) + for retries := 0; retries < maxRetries; retries++ { + loadResult, err := d.snapshotService.LoadSnapshotData(ctx, log, chunks, connConfig, withIndexesAndOrderTriggers, verbose) + if err == nil { + log.Info("loaded all available data into datanode", + logging.String("result", fmt.Sprintf("%+v", loadResult)), + logging.Duration("time taken", time.Since(start)), + logging.Int("retry-count", retries), + ) + return loadResult, nil + } + // keep track of the last error + rErr = err + if !strings.Contains(err.Error(), status) { + // some error other than 40P01 encountered + break + } } - - log.Info("loaded all available data into datanode", logging.String("result", fmt.Sprintf("%+v", loadResult)), - logging.Duration("time taken", time.Since(start))) - - return loadResult, err + // retries still ended up failing + return snapshot.LoadResult{}, fmt.Errorf("failed to load snapshot data:%w", rErr) } func (d *Service) GetMostRecentHistorySegmentFromBootstrapPeers(ctx context.Context, diff --git a/datanode/networkhistory/service_test.go b/datanode/networkhistory/service_test.go index 1d7f9fe10e..e67c8b0b44 100644 --- a/datanode/networkhistory/service_test.go +++ b/datanode/networkhistory/service_test.go @@ -19,6 +19,8 @@ import ( "bytes" "compress/gzip" "context" + "crypto/md5" + "encoding/hex" "errors" "fmt" "io" @@ -38,7 +40,6 @@ import ( config2 "code.vegaprotocol.io/vega/datanode/config" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/networkhistory" - "code.vegaprotocol.io/vega/datanode/networkhistory/fsutil" "code.vegaprotocol.io/vega/datanode/networkhistory/segment" "code.vegaprotocol.io/vega/datanode/networkhistory/snapshot" "code.vegaprotocol.io/vega/datanode/networkhistory/store" @@ -187,7 +188,7 @@ func TestMain(t *testing.M) { snapshots = append(snapshots, ss) - md5Hash, err := fsutil.Md5Hash(ss.ZipFilePath()) + md5Hash, err := Md5Hash(ss.UnpublishedSnapshotDataDirectory()) if err != nil { panic(fmt.Errorf("failed to get snapshot hash:%w", err)) } @@ -212,7 +213,7 @@ func TestMain(t *testing.M) { waitForSnapshotToComplete(lastSnapshot) snapshots = append(snapshots, lastSnapshot) - md5Hash, err := fsutil.Md5Hash(lastSnapshot.ZipFilePath()) + md5Hash, err := Md5Hash(lastSnapshot.UnpublishedSnapshotDataDirectory()) if err != nil { panic(fmt.Errorf("failed to get snapshot hash:%w", err)) } @@ -269,7 +270,7 @@ func TestMain(t *testing.M) { waitForSnapshotToComplete(lastSnapshot) snapshots = append(snapshots, lastSnapshot) - md5Hash, err := fsutil.Md5Hash(lastSnapshot.ZipFilePath()) + md5Hash, err := Md5Hash(lastSnapshot.UnpublishedSnapshotDataDirectory()) if err != nil { panic(fmt.Errorf("failed to get snapshot hash:%w", err)) } @@ -378,12 +379,12 @@ func TestMain(t *testing.M) { log.Infof("%s", goldenSourceHistorySegment[4000].HistorySegmentID) log.Infof("%s", goldenSourceHistorySegment[5000].HistorySegmentID) - panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[1000].HistorySegmentID, "QmQGrPqM72evPWmpaCduiEzcndEwzsVM8PrWe7w9gqPtv4", snapshots) - panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[2000].HistorySegmentID, "QmQKVcMmo9D9Bx8MFHg7q2hkmDksi5zmYhanvzXmpNk7kx", snapshots) - panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[2500].HistorySegmentID, "QmVAP6NsCAC3qTN2VnVxyBY6A8s4tVLqppUhWL8ArkVePg", snapshots) - panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[3000].HistorySegmentID, "QmUXg7sLvDd53NmykEptcKUyzkb6RUvNXGR9StjjyUiE2K", snapshots) - panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[4000].HistorySegmentID, "QmUCbCaewhdYsEPHpC7f2uynSJjcnMXY5GEw4UKUWuJLCu", snapshots) - panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[5000].HistorySegmentID, "QmcGBEV4XiM98idDU9evmAArP7pZwmFe9DSP2aYsnfTg9w", snapshots) + panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[1000].HistorySegmentID, "QmbfvmyGnj6UyauBVxgiCQP7avRSBDL2bbYFgqBgMaAXrx", snapshots) + panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[2000].HistorySegmentID, "QmUKgaoCGvCXBZPv43UPbrTi3jeFrisoqCiz3rAxGCsZbD", snapshots) + panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[2500].HistorySegmentID, "Qmf8maNUucahTUNCzJtzKqAf4RPsEpm6ZicAkJUkFckyho", snapshots) + panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[3000].HistorySegmentID, "QmdRRfXG5c7mdFZ7H918DuNQM5aC7YMJuRXmG5Be1hEudZ", snapshots) + panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[4000].HistorySegmentID, "QmZGXV842qutTCsuikBtxTP9D2uPvz7PaS6FnYfxRqbHB2", snapshots) + panicIfHistorySegmentIdsNotEqual(goldenSourceHistorySegment[5000].HistorySegmentID, "QmdkwfTk2KSumcTZ3XPU5WbpqQTE3tH4br1WeADjg5EsvA", snapshots) }, postgresRuntimePath, sqlFs) if exitCode != 0 { @@ -454,7 +455,7 @@ func TestLoadingDataFetchedAsynchronously(t *testing.T) { waitForSnapshotToComplete(ss) - md5Hash, err = fsutil.Md5Hash(ss.ZipFilePath()) + md5Hash, err = Md5Hash(ss.UnpublishedSnapshotDataDirectory()) require.NoError(t, err) fromEventHashes = append(fromEventHashes, md5Hash) @@ -584,7 +585,7 @@ func TestRestoringNodeThatAlreadyContainsData(t *testing.T) { waitForSnapshotToComplete(ss) - md5Hash, err = fsutil.Md5Hash(ss.ZipFilePath()) + md5Hash, err = Md5Hash(ss.UnpublishedSnapshotDataDirectory()) require.NoError(t, err) fromEventHashes = append(fromEventHashes, md5Hash) @@ -890,7 +891,7 @@ func TestRestoreFromPartialHistoryAndProcessEvents(t *testing.T) { waitForSnapshotToComplete(ss) if lastCommittedBlockHeight == 4000 { - newSnapshotFileHashAt4000, err = fsutil.Md5Hash(ss.ZipFilePath()) + newSnapshotFileHashAt4000, err = Md5Hash(ss.UnpublishedSnapshotDataDirectory()) require.NoError(t, err) } @@ -994,7 +995,7 @@ func TestRestoreFromFullHistorySnapshotAndProcessEvents(t *testing.T) { require.NoError(t, err) waitForSnapshotToComplete(ss) - snapshotFileHashAfterReloadAt2000AndEventReplayTo3000, err = fsutil.Md5Hash(ss.ZipFilePath()) + snapshotFileHashAfterReloadAt2000AndEventReplayTo3000, err = Md5Hash(ss.UnpublishedSnapshotDataDirectory()) require.NoError(t, err) cancelFn() } @@ -1097,7 +1098,7 @@ func TestRestoreFromFullHistorySnapshotWithIndexesAndOrderTriggersAndProcessEven require.NoError(t, err) waitForSnapshotToComplete(ss) - snapshotFileHashAfterReloadAt2000AndEventReplayTo3000, err = fsutil.Md5Hash(ss.ZipFilePath()) + snapshotFileHashAfterReloadAt2000AndEventReplayTo3000, err = Md5Hash(ss.UnpublishedSnapshotDataDirectory()) require.NoError(t, err) cancelFn() } @@ -1464,6 +1465,11 @@ func getDatabaseDataSummary(ctx context.Context, connConfig sqlstore.ConnectionC "trades_candle_1_minute": "market_id, period_start", "trades_candle_5_minutes": "market_id, period_start", "trades_candle_6_hours": "market_id, period_start", + "trades_candle_30_minutes": "market_id, period_start", + "trades_candle_4_hours": "market_id, period_start", + "trades_candle_8_hours": "market_id, period_start", + "trades_candle_12_hours": "market_id, period_start", + "trades_candle_7_days": "market_id, period_start", } caggSummaries := map[string]tableDataSummary{} @@ -1548,7 +1554,7 @@ func waitForSnapshotToComplete(sf segment.Unpublished) { for { time.Sleep(10 * time.Millisecond) // wait for snapshot current file - _, err := os.Stat(sf.ZipFilePath()) + _, err := os.Stat(sf.UnpublishedSnapshotDataDirectory()) if err != nil { if errors.Is(err, os.ErrNotExist) { continue @@ -1730,3 +1736,31 @@ func newTestEventSourceWithProtocolUpdateMessage() *TestEventSource { } return evtSource } + +func Md5Hash(dir string) (string, error) { + hash := md5.New() + filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + + if info.IsDir() { + return nil + } + + file, err := os.Open(path) + if err != nil { + return err + } + defer file.Close() + + _, err = io.Copy(hash, file) + if err != nil { + return err + } + + return nil + }) + + return hex.EncodeToString(hash.Sum(nil)), nil +} diff --git a/datanode/networkhistory/snapshot/database_meta_data.go b/datanode/networkhistory/snapshot/database_meta_data.go index 5ee22ca89d..b70888a392 100644 --- a/datanode/networkhistory/snapshot/database_meta_data.go +++ b/datanode/networkhistory/snapshot/database_meta_data.go @@ -23,12 +23,12 @@ import ( "strings" "time" - "github.com/jackc/pgx/v4" - "github.com/pressly/goose/v3" - "code.vegaprotocol.io/vega/datanode/sqlstore" + "github.com/georgysavva/scany/pgxscan" + "github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4/pgxpool" + "github.com/pressly/goose/v3" "github.com/shopspring/decimal" ) diff --git a/datanode/networkhistory/snapshot/service.go b/datanode/networkhistory/snapshot/service.go index 576d6538b4..f81ae8f8bb 100644 --- a/datanode/networkhistory/snapshot/service.go +++ b/datanode/networkhistory/snapshot/service.go @@ -22,11 +22,11 @@ import ( "os" "path/filepath" - "github.com/jackc/pgx/v4/pgxpool" - "code.vegaprotocol.io/vega/datanode/networkhistory/segment" "code.vegaprotocol.io/vega/datanode/networkhistory/snapshot/mutex" "code.vegaprotocol.io/vega/logging" + + "github.com/jackc/pgx/v4/pgxpool" ) type HistoryStore interface { diff --git a/datanode/networkhistory/snapshot/service_create_snapshot.go b/datanode/networkhistory/snapshot/service_create_snapshot.go index a89ab6406b..b4d46bb300 100644 --- a/datanode/networkhistory/snapshot/service_create_snapshot.go +++ b/datanode/networkhistory/snapshot/service_create_snapshot.go @@ -16,7 +16,6 @@ package snapshot import ( - "archive/zip" "context" "errors" "fmt" @@ -26,16 +25,16 @@ import ( "sort" "time" + "code.vegaprotocol.io/vega/datanode/metrics" "code.vegaprotocol.io/vega/datanode/networkhistory/segment" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/libs/fs" vio "code.vegaprotocol.io/vega/libs/io" - "github.com/georgysavva/scany/pgxscan" - "golang.org/x/exp/maps" - - "code.vegaprotocol.io/vega/datanode/metrics" "code.vegaprotocol.io/vega/logging" + + "github.com/georgysavva/scany/pgxscan" "github.com/jackc/pgx/v4" + "golang.org/x/exp/maps" ) var ( @@ -227,30 +226,32 @@ func (b *Service) snapshotData(ctx context.Context, tx pgx.Tx, dbMetaData Databa start := time.Now() b.log.Infof("copying all table data....") - f, err := os.Create(seg.ZipFilePath()) + currentStateDir := path.Join(seg.UnpublishedSnapshotDataDirectory(), "currentstate") + historyStateDir := path.Join(seg.UnpublishedSnapshotDataDirectory(), "history") + + err := os.MkdirAll(currentStateDir, os.ModePerm) if err != nil { - return fmt.Errorf("failed to create file:%w", err) + return fmt.Errorf("failed to create current state directory:%w", err) } - countWriter := vio.NewCountWriter(f) - zipWriter := zip.NewWriter(countWriter) - defer zipWriter.Close() + err = os.MkdirAll(historyStateDir, os.ModePerm) + if err != nil { + return fmt.Errorf("failed to create history state directory:%w", err) + } // Write Current State currentSQL := currentStateCopySQL(dbMetaData) - currentRowsCopied, err := copyTableData(ctx, tx, currentSQL, zipWriter) + currentRowsCopied, currentStateBytesCopied, err := copyTablesData(ctx, tx, currentSQL, currentStateDir) if err != nil { return fmt.Errorf("failed to copy current state table data:%w", err) } - compressedCurrentStateByteCount := countWriter.Count() // Write History historySQL := historyCopySQL(dbMetaData, seg) - historyRowsCopied, err := copyTableData(ctx, tx, historySQL, zipWriter) + historyRowsCopied, historyBytesCopied, err := copyTablesData(ctx, tx, historySQL, historyStateDir) if err != nil { return fmt.Errorf("failed to copy history table data:%w", err) } - compressedHistoryByteCount := countWriter.Count() - compressedCurrentStateByteCount err = tx.Commit(ctx) if err != nil { @@ -258,16 +259,16 @@ func (b *Service) snapshotData(ctx context.Context, tx pgx.Tx, dbMetaData Databa } metrics.SetLastSnapshotRowcount(float64(currentRowsCopied + historyRowsCopied)) - metrics.SetLastSnapshotCurrentStateBytes(float64(compressedCurrentStateByteCount)) - metrics.SetLastSnapshotHistoryBytes(float64(compressedHistoryByteCount)) + metrics.SetLastSnapshotCurrentStateBytes(float64(currentStateBytesCopied)) + metrics.SetLastSnapshotHistoryBytes(float64(historyBytesCopied)) metrics.SetLastSnapshotSeconds(time.Since(start).Seconds()) b.log.Info("finished creating snapshot for chain", logging.String("chain", seg.ChainID), logging.Int64("from height", seg.HeightFrom), logging.Int64("to height", seg.HeightTo), logging.Duration("time taken", time.Since(start)), logging.Int64("rows copied", currentRowsCopied+historyRowsCopied), - logging.Int64("compressed current state data size", compressedCurrentStateByteCount), - logging.Int64("compressed history data size", compressedHistoryByteCount), + logging.Int64("current state data size", currentStateBytesCopied), + logging.Int64("history data size", historyBytesCopied), ) return nil @@ -309,27 +310,36 @@ func historyCopySQL(dbMetaData DatabaseMetadata, segment interface{ GetFromHeigh return copySQL } -func copyTableData(ctx context.Context, tx pgx.Tx, copySQL []TableCopySql, zipWriter *zip.Writer) (int64, error) { +func copyTablesData(ctx context.Context, tx pgx.Tx, copySQL []TableCopySql, toDir string) (int64, int64, error) { var totalRowsCopied int64 + var totalBytesCopied int64 for _, tableSql := range copySQL { - dirName := "currentstate" - if tableSql.metaData.Hypertable { - dirName = "history" - } - - fileWriter, err := zipWriter.Create(path.Join(dirName, tableSql.metaData.Name)) - if err != nil { - return 0, fmt.Errorf("failed to create file in zip:%w", err) - } - - numRowsCopied, err := executeCopy(ctx, tx, tableSql, fileWriter) + filePath := path.Join(toDir, tableSql.metaData.Name) + numRowsCopied, bytesCopied, err := writeTableToDataFile(ctx, tx, filePath, tableSql) if err != nil { - return 0, fmt.Errorf("failed to execute copy: %w", err) + return 0, 0, fmt.Errorf("failed to write table %s to file %s:%w", tableSql.metaData.Name, filePath, err) } totalRowsCopied += numRowsCopied + totalBytesCopied += bytesCopied + } + + return totalRowsCopied, totalBytesCopied, nil +} + +func writeTableToDataFile(ctx context.Context, tx pgx.Tx, filePath string, tableSql TableCopySql) (int64, int64, error) { + file, err := os.Create(filePath) + if err != nil { + return 0, 0, fmt.Errorf("failed to create file %s:%w", filePath, err) } + defer file.Close() - return totalRowsCopied, nil + fileWriter := vio.NewCountWriter(file) + + numRowsCopied, err := executeCopy(ctx, tx, tableSql, fileWriter) + if err != nil { + return 0, 0, fmt.Errorf("failed to execute copy: %w", err) + } + return numRowsCopied, fileWriter.Count(), nil } func executeCopy(ctx context.Context, tx pgx.Tx, tableSql TableCopySql, w io.Writer) (int64, error) { @@ -355,8 +365,8 @@ func (b *Service) GetUnpublishedSnapshots() ([]segment.Unpublished, error) { segments := []segment.Unpublished{} chainID := "" for _, file := range files { - if !file.IsDir() { - baseSegment, err := segment.NewFromZipFileName(file.Name()) + if file.IsDir() { + baseSegment, err := segment.NewFromSnapshotDataDirectory(file.Name()) if err != nil { continue } diff --git a/datanode/networkhistory/snapshot/service_create_snapshot_test.go b/datanode/networkhistory/snapshot/service_create_snapshot_test.go index 812cf84ed5..a887102467 100644 --- a/datanode/networkhistory/snapshot/service_create_snapshot_test.go +++ b/datanode/networkhistory/snapshot/service_create_snapshot_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/networkhistory/snapshot" "code.vegaprotocol.io/vega/logging" + "github.com/stretchr/testify/assert" ) @@ -32,14 +33,14 @@ func TestGetHistorySnapshots(t *testing.T) { panic(err) } - os.Create(filepath.Join(snapshotsDir, "testnet-fde111-42-0-1000.zip")) - os.Create(filepath.Join(snapshotsDir, "testnet-fde111-42-1001-2000.zip")) - os.Create(filepath.Join(snapshotsDir, "testnet-fde111-42-3001-4000.zip")) - os.Create(filepath.Join(snapshotsDir, "testnet-fde111-42-4001-5000.zip")) - os.Create(filepath.Join(snapshotsDir, "testnet-fde111-42-5001-6000.zip")) - os.Create(filepath.Join(snapshotsDir, "testnet-fde111-42-6001-7000.zip")) + os.MkdirAll(filepath.Join(snapshotsDir, "testnet-fde111-42-0-1000"), os.ModePerm) + os.MkdirAll(filepath.Join(snapshotsDir, "testnet-fde111-42-1001-2000"), os.ModePerm) + os.MkdirAll(filepath.Join(snapshotsDir, "testnet-fde111-42-3001-4000"), os.ModePerm) + os.MkdirAll(filepath.Join(snapshotsDir, "testnet-fde111-42-4001-5000"), os.ModePerm) + os.MkdirAll(filepath.Join(snapshotsDir, "testnet-fde111-42-5001-6000"), os.ModePerm) + os.MkdirAll(filepath.Join(snapshotsDir, "testnet-fde111-42-6001-7000"), os.ModePerm) os.Create(filepath.Join(snapshotsDir, "testnet-fde111-8000.snapshotinprogress")) - os.Create(filepath.Join(snapshotsDir, "testnet-fde111-42-7001-8000.zip")) + os.MkdirAll(filepath.Join(snapshotsDir, "testnet-fde111-42-7001-8000"), os.ModePerm) ss, err := service.GetUnpublishedSnapshots() assert.NoError(t, err) diff --git a/datanode/networkhistory/snapshot/service_load_snapshot.go b/datanode/networkhistory/snapshot/service_load_snapshot.go index e16451b403..7e6a568813 100644 --- a/datanode/networkhistory/snapshot/service_load_snapshot.go +++ b/datanode/networkhistory/snapshot/service_load_snapshot.go @@ -24,19 +24,16 @@ import ( "sort" "time" - "code.vegaprotocol.io/vega/logging" - - "go.uber.org/zap" - - "github.com/jackc/pgtype" - "github.com/klauspost/compress/zip" - "code.vegaprotocol.io/vega/datanode/networkhistory/segment" "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/logging" "github.com/georgysavva/scany/pgxscan" + "github.com/jackc/pgtype" "github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4/pgxpool" + "github.com/klauspost/compress/zip" + "go.uber.org/zap" ) type LoadResult struct { diff --git a/datanode/networkhistory/store/index.go b/datanode/networkhistory/store/index.go index 97ea807467..e18c764e60 100644 --- a/datanode/networkhistory/store/index.go +++ b/datanode/networkhistory/store/index.go @@ -24,12 +24,11 @@ import ( "sort" "code.vegaprotocol.io/vega/datanode/networkhistory/segment" + "code.vegaprotocol.io/vega/logging" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/opt" "github.com/syndtr/goleveldb/leveldb/util" - - "code.vegaprotocol.io/vega/logging" ) var ErrIndexEntryNotFound = errors.New("index entry not found") diff --git a/datanode/networkhistory/store/index_test.go b/datanode/networkhistory/store/index_test.go index fb63049774..b49f47595a 100644 --- a/datanode/networkhistory/store/index_test.go +++ b/datanode/networkhistory/store/index_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/networkhistory/segment" "code.vegaprotocol.io/vega/datanode/networkhistory/store" "code.vegaprotocol.io/vega/logging" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/datanode/networkhistory/store/store.go b/datanode/networkhistory/store/store.go index 36fd94bc0a..b3275619c3 100644 --- a/datanode/networkhistory/store/store.go +++ b/datanode/networkhistory/store/store.go @@ -23,7 +23,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "os" "path/filepath" "sort" @@ -39,12 +38,13 @@ import ( "github.com/dustin/go-humanize" icore "github.com/ipfs/boxo/coreiface" "github.com/ipfs/go-cid" - files "github.com/ipfs/go-ipfs-files" + files "github.com/ipfs/go-libipfs/files" ipfslogging "github.com/ipfs/go-log" "github.com/ipfs/interface-go-ipfs-core/path" "github.com/ipfs/kubo/config" serialize "github.com/ipfs/kubo/config/serialize" "github.com/ipfs/kubo/core" + "github.com/ipfs/kubo/core/bootstrap" "github.com/ipfs/kubo/core/coreapi" "github.com/ipfs/kubo/core/corehttp" "github.com/ipfs/kubo/core/corerepo" @@ -168,8 +168,7 @@ func New(ctx context.Context, log *logging.Logger, chainID string, cfg Config, n } p.log.Debugf("ipfs swarm port:%d", cfg.SwarmPort) - ipfsCfg, err := createIpfsNodeConfiguration(p.log, p.identity, cfg.BootstrapPeers, - cfg.SwarmPort) + ipfsCfg, err := createIpfsNodeConfiguration(p.log, p.identity, cfg.SwarmPort) p.log.Debugf("ipfs bootstrap peers:%v", ipfsCfg.Bootstrap) @@ -189,13 +188,21 @@ func New(ctx context.Context, log *logging.Logger, chainID string, cfg Config, n } p.ipfsAPI, err = coreapi.NewCoreAPI(p.ipfsNode) - if err != nil { return nil, fmt.Errorf("failed to create ipfs api:%w", err) } + peers, err := config.ParseBootstrapPeers(cfg.BootstrapPeers) + if err != nil { + return nil, fmt.Errorf("failed to parse bootstrap peers: %w", err) + } + + if err = p.ipfsNode.Bootstrap(bootstrap.BootstrapConfigWithPeers(peers)); err != nil { + return nil, fmt.Errorf("failed to bootstrap peers: %w", err) + } + if err = setupMetrics(p.ipfsNode); err != nil { - return nil, fmt.Errorf("failed to setup metrics:%w", err) + return nil, fmt.Errorf("failed to setup metrics: %w", err) } return p, nil @@ -326,7 +333,7 @@ func (p *Store) AddSnapshotData(ctx context.Context, s segment.Unpublished) (err p.log.Infof("adding history %s", historyID) defer func() { - _ = os.RemoveAll(s.ZipFilePath()) + _ = os.RemoveAll(s.UnpublishedSnapshotDataDirectory()) }() previousHistorySegmentID, err := p.GetPreviousHistorySegmentID(s.HeightFrom) @@ -341,7 +348,7 @@ func (p *Store) AddSnapshotData(ctx context.Context, s segment.Unpublished) (err PreviousHistorySegmentID: previousHistorySegmentID, } - contentID, err := p.addHistorySegment(ctx, s.ZipFilePath(), metaData) + contentID, err := p.addHistorySegment(ctx, s.UnpublishedSnapshotDataDirectory(), metaData) if err != nil { return fmt.Errorf("failed to add file:%w", err) } @@ -430,7 +437,7 @@ func (p *Store) GetPreviousHistorySegmentID(fromHeight int64) (string, error) { } func (p *Store) addHistorySegment(ctx context.Context, zipFilePath string, metadata segment.MetaData) (cid.Cid, error) { - newZipFile, err := p.rewriteZipWithMetadata(zipFilePath, metadata) + newZipFile, err := p.zipSegmentDataWithMetadata(zipFilePath, metadata) defer os.Remove(newZipFile) if err != nil { return cid.Cid{}, fmt.Errorf("rewriting zip to include metadata:%w", err) @@ -450,9 +457,9 @@ func (p *Store) addHistorySegment(ctx context.Context, zipFilePath string, metad return contentID, nil } -func (p *Store) rewriteZipWithMetadata(oldZip string, metadata segment.MetaData) (string, error) { +func (p *Store) zipSegmentDataWithMetadata(segmentDataDir string, metadata segment.MetaData) (string, error) { // Create a temporary zip file for including the metadata JSON file - tmpfile, err := ioutil.TempFile("", metadata.ZipFileName()) + tmpfile, err := os.CreateTemp("", metadata.ZipFileName()) if err != nil { return "", fmt.Errorf("failed add history segment; unable to create temp file:%w", err) } @@ -477,33 +484,57 @@ func (p *Store) rewriteZipWithMetadata(oldZip string, metadata segment.MetaData) return "", fmt.Errorf("failed to write metadata.json:%w", err) } - zipReader, err := zip.OpenReader(oldZip) + zipSegmentData(segmentDataDir, zipWriter) + + return tmpfile.Name(), nil +} + +func zipSegmentData(segmentDataDir string, zipWriter *zip.Writer) error { + // See comment below about why we use this time + modifiedTime, err := time.Parse(time.DateTime, "1979-11-30 00:00:00") if err != nil { - return "", fmt.Errorf("failed to open zip file:%w", err) + return err } - // Copy the contents of the existing zip file to the new zip file - for _, f := range zipReader.File { - fr, err := f.Open() + return filepath.Walk(segmentDataDir, func(path string, info os.FileInfo, _ error) error { + if info.IsDir() { + return nil + } + + zipBasePath, err := filepath.Rel(segmentDataDir, path) if err != nil { - return "", fmt.Errorf("error reading reading file from zip archive: %w", err) + return err } - defer fr.Close() - // Create a new file header based on the existing file header and write it to the new zip file - fw, err := zipWriter.CreateHeader(&f.FileHeader) + // The previous method of rewriting the zip file to include the metadata.json resulted in the Modified and + // ModifiedDate header fields being set to the values below due to code in the archive/zip/Reader.go and + // archive/zip/Writer.go which relates to legacy ms dos fields. To ensure that segments have the same IPFS + // content ID as they would have had when the zip was rewritten it is necessary to set these fields on the + // zip headers created directly from the uncompressed files. + header := zip.FileHeader{ + Name: zipBasePath, + Method: zip.Deflate, + Modified: modifiedTime, + ModifiedDate: 65406, + } + fw, err := zipWriter.CreateHeader(&header) if err != nil { - return "", fmt.Errorf("error creating file header: %w", err) + return fmt.Errorf("error creating file header: %w", err) } - // Copy the contents of the existing file to the new file - _, err = io.Copy(fw, fr) + file, err := os.Open(path) if err != nil { - return "", fmt.Errorf("error copying data from zip file: %w", err) + return fmt.Errorf("failed to open segment data file: %w", err) } - } + defer file.Close() - return tmpfile.Name(), nil + _, err = io.Copy(fw, file) + if err != nil { + return err + } + + return nil + }) } func (p *Store) GetSegmentForHeight(toHeight int64) (segment.Full, error) { @@ -721,7 +752,7 @@ func (p *Store) StagedContiguousHistory(ctx context.Context, chunk segment.Conti return staged, nil } -func createIpfsNodeConfiguration(log *logging.Logger, identity config.Identity, bootstrapPeers []string, swarmPort int) (*config.Config, error) { +func createIpfsNodeConfiguration(log *logging.Logger, identity config.Identity, swarmPort int) (*config.Config, error) { cfg, err := config.InitWithIdentity(identity) // Don't try and do local node discovery with mDNS; we're probably on the internet if running @@ -729,7 +760,7 @@ func createIpfsNodeConfiguration(log *logging.Logger, identity config.Identity, cfg.Discovery.MDNS.Enabled = false if err != nil { - return nil, fmt.Errorf("failed to initiliase ipfs config:%w", err) + return nil, fmt.Errorf("failed to initialise ipfs config:%w", err) } const ipfsConfigDefaultSwarmPort = "4001" @@ -742,8 +773,7 @@ func createIpfsNodeConfiguration(log *logging.Logger, identity config.Identity, } cfg.Addresses.Swarm = updatedSwarmAddrs - cfg.Bootstrap = bootstrapPeers - + cfg.Bootstrap = []string{} // we'll provide these later, but we empty them here so we don't get the default set prettyCfgJSON, _ := json.MarshalIndent(cfg, "", " ") log.Debugf("IPFS Node Config:\n%s", prettyCfgJSON) diff --git a/datanode/networkhistory/store/store_test.go b/datanode/networkhistory/store/store_test.go index c979a829db..ad07124d43 100644 --- a/datanode/networkhistory/store/store_test.go +++ b/datanode/networkhistory/store/store_test.go @@ -129,7 +129,7 @@ func addTestData(t *testing.T, chainID string, snapshotsDir string, s *store.Sto err = zipWriter.Close() require.NoError(t, err) - err = os.WriteFile(segment.ZipFilePath(), buf.Bytes(), fs.ModePerm) + err = os.WriteFile(segment.UnpublishedSnapshotDataDirectory(), buf.Bytes(), fs.ModePerm) require.NoError(t, err) err = s.AddSnapshotData(context.Background(), segment) diff --git a/datanode/ratelimit/naughtystep.go b/datanode/ratelimit/naughtystep.go index 3cc0acc7b6..2965cb39d7 100644 --- a/datanode/ratelimit/naughtystep.go +++ b/datanode/ratelimit/naughtystep.go @@ -20,6 +20,7 @@ import ( "time" "code.vegaprotocol.io/vega/logging" + "github.com/didip/tollbooth/v7" "github.com/didip/tollbooth/v7/limiter" "go.uber.org/zap" diff --git a/datanode/ratelimit/ratelimit.go b/datanode/ratelimit/ratelimit.go index feed869043..6d32cb5ef8 100644 --- a/datanode/ratelimit/ratelimit.go +++ b/datanode/ratelimit/ratelimit.go @@ -24,6 +24,9 @@ import ( "sync/atomic" "time" + "code.vegaprotocol.io/vega/datanode/contextutil" + "code.vegaprotocol.io/vega/logging" + "github.com/didip/tollbooth/v7" "github.com/didip/tollbooth/v7/libstring" "github.com/didip/tollbooth/v7/limiter" @@ -32,9 +35,6 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" - - "code.vegaprotocol.io/vega/datanode/contextutil" - "code.vegaprotocol.io/vega/logging" ) var ( diff --git a/datanode/ratelimit/ratelimit_test.go b/datanode/ratelimit/ratelimit_test.go index c4df5257cc..30ed4b1789 100644 --- a/datanode/ratelimit/ratelimit_test.go +++ b/datanode/ratelimit/ratelimit_test.go @@ -22,9 +22,9 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "code.vegaprotocol.io/vega/logging" + + "github.com/stretchr/testify/assert" ) func TestRateLimit_HTTPMiddleware(t *testing.T) { diff --git a/datanode/service/accounts.go b/datanode/service/accounts.go index fa6cab9eb7..04a7d861e2 100644 --- a/datanode/service/accounts.go +++ b/datanode/service/accounts.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( diff --git a/datanode/service/chain.go b/datanode/service/chain.go index 5f1e12a1e2..974227df2c 100644 --- a/datanode/service/chain.go +++ b/datanode/service/chain.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( diff --git a/datanode/service/chain_test.go b/datanode/service/chain_test.go index 85cb5c3de2..b5d021f8bf 100644 --- a/datanode/service/chain_test.go +++ b/datanode/service/chain_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service_test import ( @@ -32,12 +20,12 @@ import ( "errors" "testing" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/service" "code.vegaprotocol.io/vega/datanode/service/mocks" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" ) func TestChainService(t *testing.T) { diff --git a/datanode/service/config.go b/datanode/service/config.go index 868e6775f1..757c1e608b 100644 --- a/datanode/service/config.go +++ b/datanode/service/config.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( diff --git a/datanode/service/delegations.go b/datanode/service/delegations.go index aa156f020c..b59b2c7d44 100644 --- a/datanode/service/delegations.go +++ b/datanode/service/delegations.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( diff --git a/datanode/service/ethereum_key_rotation.go b/datanode/service/ethereum_key_rotation.go index 45ce2b1a27..bb57dd0b10 100644 --- a/datanode/service/ethereum_key_rotation.go +++ b/datanode/service/ethereum_key_rotation.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( diff --git a/datanode/service/governance.go b/datanode/service/governance.go index 5b2d4d957b..45324f2333 100644 --- a/datanode/service/governance.go +++ b/datanode/service/governance.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( @@ -38,6 +26,7 @@ import ( type ProposalStore interface { Add(ctx context.Context, p entities.Proposal) error GetByID(ctx context.Context, id string) (entities.Proposal, error) + GetByIDWithoutBatch(ctx context.Context, id string) (entities.Proposal, error) GetByReference(ctx context.Context, ref string) (entities.Proposal, error) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Proposal, error) Get(ctx context.Context, inState *entities.ProposalState, partyIDStr *string, proposalType *entities.ProposalType, @@ -88,6 +77,10 @@ func (g *Governance) GetProposalByID(ctx context.Context, id string) (entities.P return g.pStore.GetByID(ctx, id) } +func (g *Governance) GetProposalByIDWithoutBatch(ctx context.Context, id string) (entities.Proposal, error) { + return g.pStore.GetByIDWithoutBatch(ctx, id) +} + func (g *Governance) GetProposalsByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Proposal, error) { return g.pStore.GetByTxHash(ctx, txHash) } diff --git a/datanode/service/ledger.go b/datanode/service/ledger.go index 395bd15cce..12feef825d 100644 --- a/datanode/service/ledger.go +++ b/datanode/service/ledger.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( diff --git a/datanode/service/market.go b/datanode/service/market.go index fbe8b8e475..56586c7434 100644 --- a/datanode/service/market.go +++ b/datanode/service/market.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( diff --git a/datanode/service/market_data.go b/datanode/service/market_data.go index b2d5ac12fd..d2bacc3db0 100644 --- a/datanode/service/market_data.go +++ b/datanode/service/market_data.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( diff --git a/datanode/service/market_data_test.go b/datanode/service/market_data_test.go index 1d6697b85c..77d2197375 100644 --- a/datanode/service/market_data_test.go +++ b/datanode/service/market_data_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service_test import ( @@ -35,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/service" "code.vegaprotocol.io/vega/datanode/service/mocks" "code.vegaprotocol.io/vega/logging" + "github.com/golang/mock/gomock" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" diff --git a/datanode/service/market_depth.go b/datanode/service/market_depth.go index e06a385711..ce9d2db354 100644 --- a/datanode/service/market_depth.go +++ b/datanode/service/market_depth.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( diff --git a/datanode/service/market_depth_test.go b/datanode/service/market_depth_test.go index b74feec9e6..9db8b4ae83 100644 --- a/datanode/service/market_depth_test.go +++ b/datanode/service/market_depth_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service_test import ( @@ -38,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/datanode/service/mocks" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" + "github.com/golang/mock/gomock" "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" diff --git a/datanode/service/order.go b/datanode/service/order.go index d76bfe1b05..fb006b8a15 100644 --- a/datanode/service/order.go +++ b/datanode/service/order.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( diff --git a/datanode/service/position.go b/datanode/service/position.go index d0d521a855..ccea16eea4 100644 --- a/datanode/service/position.go +++ b/datanode/service/position.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( diff --git a/datanode/service/position_test.go b/datanode/service/position_test.go index b53219933c..7fb583085a 100644 --- a/datanode/service/position_test.go +++ b/datanode/service/position_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service_test import ( @@ -36,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/datanode/service" "code.vegaprotocol.io/vega/datanode/service/mocks" "code.vegaprotocol.io/vega/logging" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" ) diff --git a/datanode/service/rewards.go b/datanode/service/rewards.go index 97c97fe0e3..c068857e48 100644 --- a/datanode/service/rewards.go +++ b/datanode/service/rewards.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( @@ -38,7 +26,7 @@ type rewardStore interface { Add(ctx context.Context, r entities.Reward) error GetAll(ctx context.Context) ([]entities.Reward, error) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Reward, error) - GetByCursor(ctx context.Context, partyID *string, assetID *string, fromEpoch, toEpoch *uint64, p entities.CursorPagination) ([]entities.Reward, entities.PageInfo, error) + GetByCursor(ctx context.Context, partyID *string, assetID *string, fromEpoch, toEpoch *uint64, p entities.CursorPagination, teamID, gameID *string) ([]entities.Reward, entities.PageInfo, error) GetSummaries(ctx context.Context, partyID *string, assetID *string) ([]entities.RewardSummary, error) GetEpochSummaries(ctx context.Context, filter entities.RewardSummaryFilter, p entities.CursorPagination) ([]entities.EpochRewardSummary, entities.PageInfo, error) } @@ -69,8 +57,8 @@ func (r *Reward) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]ent return r.store.GetByTxHash(ctx, txHash) } -func (r *Reward) GetByCursor(ctx context.Context, partyID, assetID *string, fromEpoch, toEpoch *uint64, p entities.CursorPagination) ([]entities.Reward, entities.PageInfo, error) { - return r.store.GetByCursor(ctx, partyID, assetID, fromEpoch, toEpoch, p) +func (r *Reward) GetByCursor(ctx context.Context, partyID, assetID *string, fromEpoch, toEpoch *uint64, p entities.CursorPagination, teamID, gameID *string) ([]entities.Reward, entities.PageInfo, error) { + return r.store.GetByCursor(ctx, partyID, assetID, fromEpoch, toEpoch, p, teamID, gameID) } func (r *Reward) GetSummaries(ctx context.Context, partyID *string, assetID *string) ([]entities.RewardSummary, error) { diff --git a/datanode/service/risk.go b/datanode/service/risk.go index 4c5d3de0de..214447e7c4 100644 --- a/datanode/service/risk.go +++ b/datanode/service/risk.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( diff --git a/datanode/service/stop_orders.go b/datanode/service/stop_orders.go index e2f61cc397..6a2439f65f 100644 --- a/datanode/service/stop_orders.go +++ b/datanode/service/stop_orders.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( diff --git a/datanode/service/stubs.go b/datanode/service/stubs.go index 2f8c4c3aa8..37fcbb893e 100644 --- a/datanode/service/stubs.go +++ b/datanode/service/stubs.go @@ -13,22 +13,11 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/datanode/sqlsubscribers" ) type ( @@ -72,6 +61,11 @@ type ( PartyVestingBalances struct { *sqlstore.PartyVestingBalance } + TransactionResults struct { + *sqlsubscribers.TransactionResults + } + Games struct{ *sqlstore.Games } + MarginModes struct{ *sqlstore.MarginModes } ) type ( @@ -206,3 +200,15 @@ func NewPartyLockedBalances(store *sqlstore.PartyLockedBalance) *PartyLockedBala func NewPartyVestingBalances(store *sqlstore.PartyVestingBalance) *PartyVestingBalances { return &PartyVestingBalances{PartyVestingBalance: store} } + +func NewTransactionResults(subscriber *sqlsubscribers.TransactionResults) *TransactionResults { + return &TransactionResults{TransactionResults: subscriber} +} + +func NewGames(store *sqlstore.Games) *Games { + return &Games{Games: store} +} + +func NewMarginModes(store *sqlstore.MarginModes) *MarginModes { + return &MarginModes{MarginModes: store} +} diff --git a/datanode/service/trade.go b/datanode/service/trade.go index 3922827318..c0acd184c2 100644 --- a/datanode/service/trade.go +++ b/datanode/service/trade.go @@ -13,27 +13,14 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package service import ( "context" - "code.vegaprotocol.io/vega/libs/slice" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/utils" + "code.vegaprotocol.io/vega/libs/slice" "code.vegaprotocol.io/vega/logging" ) diff --git a/datanode/sqlstore/accounts.go b/datanode/sqlstore/accounts.go index 32a76a6e62..fbffc4fefc 100644 --- a/datanode/sqlstore/accounts.go +++ b/datanode/sqlstore/accounts.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -34,12 +22,12 @@ import ( "fmt" "sync" - "github.com/georgysavva/scany/pgxscan" - "github.com/jackc/pgx/v4" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + + "github.com/georgysavva/scany/pgxscan" + "github.com/jackc/pgx/v4" ) var accountOrdering = TableOrdering{ diff --git a/datanode/sqlstore/accounts_filter.go b/datanode/sqlstore/accounts_filter.go index 191f66c27f..cf35a835f0 100644 --- a/datanode/sqlstore/accounts_filter.go +++ b/datanode/sqlstore/accounts_filter.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( diff --git a/datanode/sqlstore/accounts_helpers_for_test.go b/datanode/sqlstore/accounts_helpers_for_test.go new file mode 100644 index 0000000000..88b1e82925 --- /dev/null +++ b/datanode/sqlstore/accounts_helpers_for_test.go @@ -0,0 +1,76 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package sqlstore_test + +import ( + "context" + "testing" + "time" + + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/protos/vega" + + "github.com/stretchr/testify/require" +) + +type AccountOption func(*testing.T, *entities.Account) + +func CreateAccount(t *testing.T, ctx context.Context, store *sqlstore.Accounts, block entities.Block, options ...AccountOption) *entities.Account { + t.Helper() + + account := NewAccount(t, block, options...) + + require.NoError(t, store.Obtain(ctx, account)) + + return account +} + +func NewAccount(t *testing.T, block entities.Block, options ...AccountOption) *entities.Account { + t.Helper() + + // Postgres only stores timestamps in microsecond resolution. + // Without truncating, the timestamp will mismatch in test assertions. + blockTimeMs := block.VegaTime.Truncate(time.Microsecond) + + account := &entities.Account{ + ID: entities.AccountID(GenerateID()), + PartyID: entities.PartyID(GenerateID()), + AssetID: entities.AssetID(GenerateID()), + Type: vega.AccountType_ACCOUNT_TYPE_GENERAL, + VegaTime: blockTimeMs, + } + + for _, option := range options { + option(t, account) + } + + return account +} + +func AccountForAsset(asset *entities.Asset) AccountOption { + return func(t *testing.T, account *entities.Account) { + t.Helper() + account.AssetID = asset.ID + } +} + +func AccountWithType(accountType vega.AccountType) AccountOption { + return func(t *testing.T, account *entities.Account) { + t.Helper() + account.Type = accountType + } +} diff --git a/datanode/sqlstore/accounts_test.go b/datanode/sqlstore/accounts_test.go index 5979ede0aa..2bd7969158 100644 --- a/datanode/sqlstore/accounts_test.go +++ b/datanode/sqlstore/accounts_test.go @@ -13,32 +13,20 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( "encoding/hex" "testing" - "github.com/shopspring/decimal" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" + + "github.com/shopspring/decimal" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestAccount(t *testing.T) { diff --git a/datanode/sqlstore/asserstions_for_test.go b/datanode/sqlstore/asserstions_for_test.go new file mode 100644 index 0000000000..9e445724fb --- /dev/null +++ b/datanode/sqlstore/asserstions_for_test.go @@ -0,0 +1,36 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package sqlstore_test + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +// RequireAllDifferent requires that none of the objects are equal. +// This is useful to ensure the objects used in tests are actually different +// when expecting one or another. +// It's mainly made to ensure the tests are dealing with meaningful setup. +func RequireAllDifferent(t *testing.T, objs ...any) { + t.Helper() + + for i := range objs { + for j := i + 1; j < len(objs); j++ { + require.NotEqual(t, objs[i], objs[j]) + } + } +} diff --git a/datanode/sqlstore/assets.go b/datanode/sqlstore/assets.go index 0f1ad19eb2..d5e59083c9 100644 --- a/datanode/sqlstore/assets.go +++ b/datanode/sqlstore/assets.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -35,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/assets_helpers_for_test.go b/datanode/sqlstore/assets_helpers_for_test.go new file mode 100644 index 0000000000..f073190194 --- /dev/null +++ b/datanode/sqlstore/assets_helpers_for_test.go @@ -0,0 +1,59 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package sqlstore_test + +import ( + "context" + "testing" + "time" + + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" + + "github.com/shopspring/decimal" + "github.com/stretchr/testify/require" +) + +func CreateAsset(t *testing.T, ctx context.Context, store *sqlstore.Assets, block entities.Block) *entities.Asset { + t.Helper() + + asset := NewAsset(t, block) + + require.NoError(t, store.Add(ctx, *asset)) + + return asset +} + +func NewAsset(t *testing.T, block entities.Block) *entities.Asset { + t.Helper() + + // Postgres only stores timestamps in microsecond resolution. + // Without truncating, the timestamp will mismatch in test assertions. + blockTimeMs := block.VegaTime.Truncate(time.Microsecond) + + asset := &entities.Asset{ + ID: entities.AssetID(GenerateID()), + Name: "TestAssetName", + Symbol: "TAN", + Decimals: 1, + Quantum: decimal.NewFromInt(1), + Source: "TS", + ERC20Contract: "ET", + VegaTime: blockTimeMs, + } + + return asset +} diff --git a/datanode/sqlstore/assets_test.go b/datanode/sqlstore/assets_test.go index 2ca3f2b83d..fdf64371a0 100644 --- a/datanode/sqlstore/assets_test.go +++ b/datanode/sqlstore/assets_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -34,7 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" + "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -47,7 +35,7 @@ func addTestAsset(t *testing.T, ctx context.Context, as *sqlstore.Assets, block // Make an asset testAssetCount++ quantum, _ := decimal.NewFromString("10") - assetID := helpers.GenerateID() + assetID := GenerateID() if len(idPrefix) > 0 && idPrefix[0] != "" { assetID = fmt.Sprintf("%s%02d", idPrefix[0], testAssetCount) diff --git a/datanode/sqlstore/balances.go b/datanode/sqlstore/balances.go index 125cc71ffb..ce19817990 100644 --- a/datanode/sqlstore/balances.go +++ b/datanode/sqlstore/balances.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( diff --git a/datanode/sqlstore/balances_test.go b/datanode/sqlstore/balances_test.go index 3366510b2c..9c7aff0e82 100644 --- a/datanode/sqlstore/balances_test.go +++ b/datanode/sqlstore/balances_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" + "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/shopspring/decimal" diff --git a/datanode/sqlstore/batcher_list.go b/datanode/sqlstore/batcher_list.go index 096b6ee20f..d8793e4994 100644 --- a/datanode/sqlstore/batcher_list.go +++ b/datanode/sqlstore/batcher_list.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( diff --git a/datanode/sqlstore/batcher_map.go b/datanode/sqlstore/batcher_map.go index 241adf7e6d..921eac5d66 100644 --- a/datanode/sqlstore/batcher_map.go +++ b/datanode/sqlstore/batcher_map.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( diff --git a/datanode/sqlstore/blocks.go b/datanode/sqlstore/blocks.go index f2aedc6aa3..0fcef7065d 100644 --- a/datanode/sqlstore/blocks.go +++ b/datanode/sqlstore/blocks.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -36,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + "github.com/georgysavva/scany/pgxscan" "github.com/jackc/pgx/v4" ) diff --git a/datanode/sqlstore/blocks_test.go b/datanode/sqlstore/blocks_test.go index cb871812f1..7bd40fa140 100644 --- a/datanode/sqlstore/blocks_test.go +++ b/datanode/sqlstore/blocks_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -33,10 +21,11 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) type testBlockSource struct { @@ -62,22 +51,20 @@ func addTestBlockForTime(t *testing.T, ctx context.Context, bs *sqlstore.Blocks, func addTestBlockForHeightAndTime(t *testing.T, ctx context.Context, bs *sqlstore.Blocks, height int64, vegaTime time.Time) entities.Block { t.Helper() - // Make a block + hash, err := hex.DecodeString("deadbeef") - assert.NoError(t, err) + require.NoError(t, err) // Postgres only stores timestamps in microsecond resolution - block1 := entities.Block{ + block := entities.Block{ VegaTime: vegaTime.Truncate(time.Microsecond), Height: height, Hash: hash, } - // Add it to the database - err = bs.Add(ctx, block1) - assert.NoError(t, err) + require.NoError(t, bs.Add(ctx, block)) - return block1 + return block } func TestBlock(t *testing.T) { diff --git a/datanode/sqlstore/candles.go b/datanode/sqlstore/candles.go index 6989202142..98beeb5de0 100644 --- a/datanode/sqlstore/candles.go +++ b/datanode/sqlstore/candles.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -35,15 +23,13 @@ import ( "time" "code.vegaprotocol.io/vega/datanode/candlesv2" + "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" "code.vegaprotocol.io/vega/libs/crypto" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "github.com/shopspring/decimal" - "github.com/georgysavva/scany/pgxscan" - - "code.vegaprotocol.io/vega/datanode/entities" + "github.com/shopspring/decimal" ) const ( @@ -82,6 +68,79 @@ func NewCandles(ctx context.Context, connectionSource *ConnectionSource, config } } +func (cs *Candles) getCandlesSubquery(ctx context.Context, descriptor candleDescriptor, from, to *time.Time, args []interface{}) (string, []interface{}, error) { + // We have to use the time_bucket_gapfill function to fill in the gaps in the data that is generated by the continuous aggregations + // https://docs.timescale.com/api/latest/hyperfunctions/gapfilling/time_bucket_gapfill/ + // Unfortunately this function cannot be used when creating the continuous aggregations as it is not supported, so instead we have to + // ensure we pass the interval corresponding to the view we are querying. + // We could use locf function to carry forward the value from the previous candle, but this would be wrong, it would be better to zero the + // values out and have the user carry the last close value forward for open, high, low and close when there is a gap. + // We only carry forward the last_update_in_period value to indicate when we last received a trade that would have updated the candle. + // It doesn't matter what aggregation function we use as long as we're using the view corresponding to the interval, there should + // only ever be 1 row to aggregate. + + interval := descriptor.interval + if interval == "block" { + interval = "1 minute" + } + + groupBy := true + query := fmt.Sprintf(`SELECT + time_bucket_gapfill('%s', period_start) as period_start, + first(open) as open, + first(close) as close, + first(high) as high, + first(low) as low, + first(volume) as volume, + first(notional) as notional, + locf(first(last_update_in_period)) as last_update_in_period + FROM %s WHERE market_id = $1`, + interval, descriptor.view) + + // As a result of having to use the time_bucket_gapfill function we have to provide and start and finish date to the query. + // The documentation suggests using the where clause for better performance as the query planner can use it to optimise performance + candlesDateRange := struct { + StartDate *time.Time + EndDate *time.Time + }{} + + if from == nil || to == nil { + datesQuery := fmt.Sprintf("select min(period_start) as start_date, max(period_start) as end_date from %s where market_id = $1", descriptor.view) + marketID := entities.MarketID(descriptor.market) + err := pgxscan.Get(ctx, cs.Connection, &candlesDateRange, datesQuery, marketID) + if err != nil { + return "", args, fmt.Errorf("querying candles date range: %w", err) + } + } + + // These can only be nil if there is no candle data so there's no gaps to fill and just return an empty row set + if candlesDateRange.StartDate == nil && candlesDateRange.EndDate == nil { + query = fmt.Sprintf("select period_start, open, close, high, low, volume, notional, last_update_in_period from %s where market_id = $1", + descriptor.view) + groupBy = false + } + + if from != nil { + query = fmt.Sprintf("%s AND period_start >= %s", query, nextBindVar(&args, from)) + } else if candlesDateRange.StartDate != nil { + query = fmt.Sprintf("%s AND period_start >= %s", query, nextBindVar(&args, *candlesDateRange.StartDate)) + } + + if to != nil { + query = fmt.Sprintf("%s AND period_start < %s", query, nextBindVar(&args, to)) + } else if candlesDateRange.EndDate != nil { + // as no end time has been specified, we want the end time to be inclusive rather than exclusive + // otherwise we will always miss the last candle when the user does not specify an end time. + query = fmt.Sprintf("%s AND period_start <= %s", query, nextBindVar(&args, candlesDateRange.EndDate)) + } + + if groupBy { + query = fmt.Sprintf("%s GROUP BY time_bucket_gapfill('%s', period_start)", query, interval) + } + + return query, args, nil +} + // GetCandleDataForTimeSpan gets the candles for a given interval, from and to are optional. func (cs *Candles) GetCandleDataForTimeSpan(ctx context.Context, candleID string, from *time.Time, to *time.Time, p entities.CursorPagination) ([]entities.Candle, entities.PageInfo, error, @@ -104,9 +163,6 @@ func (cs *Candles) GetCandleDataForTimeSpan(ctx context.Context, candleID string var candles []entities.Candle - query := fmt.Sprintf("SELECT period_start, open, close, high, low, volume, notional, last_update_in_period FROM %s WHERE market_id = $1", - descriptor.view) - marketAsBytes, err := hex.DecodeString(descriptor.market) if err != nil { return nil, pageInfo, fmt.Errorf("invalid market:%w", err) @@ -114,19 +170,30 @@ func (cs *Candles) GetCandleDataForTimeSpan(ctx context.Context, candleID string args := []interface{}{marketAsBytes} - if from != nil { - query = fmt.Sprintf("%s AND period_start >= %s", query, nextBindVar(&args, from)) + subQuery, args, err := cs.getCandlesSubquery(ctx, descriptor, from, to, args) + if err != nil { + return nil, pageInfo, fmt.Errorf("gap fill query failure: %w", err) } - if to != nil { - query = fmt.Sprintf("%s AND period_start < %s", query, nextBindVar(&args, to)) - } + // We don't want to add the subquery yet because the where clause in it will confuse the pagination query builder + query := `select period_start, + coalesce(open, 0) as open, + coalesce(close, 0) as close, + coalesce(high, 0) as high, + coalesce(low, 0) as low, + coalesce(volume, 0) as volume, + coalesce(notional, 0) as notional, + coalesce(last_update_in_period, period_start) as last_update_in_period + from gap_filled_candles` query, args, err = PaginateQuery[entities.CandleCursor](query, args, candleOrdering, p) if err != nil { return nil, pageInfo, err } + // now that we have the paged query, we can add in the subquery + query = fmt.Sprintf("with gap_filled_candles as (%s) %s", subQuery, query) + defer metrics.StartSQLQuery("Candles", "GetCandleDataForTimeSpan")() err = pgxscan.Select(ctx, cs.Connection, &candles, query, args...) if err != nil { diff --git a/datanode/sqlstore/candles_test.go b/datanode/sqlstore/candles_test.go index b11ba09e6f..aea21a6d72 100644 --- a/datanode/sqlstore/candles_test.go +++ b/datanode/sqlstore/candles_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -34,18 +22,14 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/datanode/candlesv2" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" - + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" types "code.vegaprotocol.io/vega/protos/vega" "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" - - "code.vegaprotocol.io/vega/datanode/entities" - "code.vegaprotocol.io/vega/datanode/sqlstore" + "github.com/stretchr/testify/require" ) const ( @@ -69,7 +53,7 @@ func TestGetExistingCandles(t *testing.T) { t.Fatalf("failed to get candles for market:%s", err) } - defaultCandles := "block,1 minute,5 minutes,15 minutes,1 hour,6 hours,1 day" + defaultCandles := "block,1 minute,5 minutes,15 minutes,30 minutes,1 hour,4 hours,6 hours,8 hours,12 hours,1 day,7 days" intervals := strings.Split(defaultCandles, ",") assert.Equal(t, len(intervals), len(candles)) @@ -153,7 +137,7 @@ func TestNotional(t *testing.T) { } assert.Equal(t, uint64(40), candles[0].Notional) - assert.Equal(t, uint64(160), candles[1].Notional) + assert.Equal(t, uint64(160), candles[len(candles)-1].Notional) } func TestCandlesGetForEmptyInterval(t *testing.T) { @@ -186,15 +170,26 @@ func TestCandlesGetForEmptyInterval(t *testing.T) { t.Fatalf("failed to get candles:%s", err) } - assert.Equal(t, 2, len(candles)) + assert.Equal(t, 11, len(candles)) // 11 now because we are filling in the gaps firstCandle := createCandle(startTime, startTime.Add(3*time.Microsecond), 1, 2, 2, 1, 20, 30) assert.Equal(t, firstCandle, candles[0]) + // Fill gaps should carry over the last candle's prices + gapPeriodStart := firstCandle.PeriodStart.Add(1 * time.Minute) + + assert.Equal(t, gapPeriodStart, candles[1].PeriodStart) + assert.True(t, decimal.Zero.Equal(candles[1].Open)) + assert.True(t, decimal.Zero.Equal(candles[1].High)) + assert.True(t, decimal.Zero.Equal(candles[1].Low)) + assert.True(t, decimal.Zero.Equal(candles[1].Close)) + assert.Equal(t, uint64(0), candles[1].Volume) + assert.Equal(t, uint64(0), candles[1].Notional) + assert.True(t, firstCandle.LastUpdateInPeriod.Equal(candles[1].LastUpdateInPeriod)) secondCandle := createCandle(startTime.Add(10*time.Minute), startTime.Add(10*time.Minute).Add(5*time.Microsecond), 3, 4, 4, 3, 40, 140) - assert.Equal(t, secondCandle, candles[1]) + assert.Equal(t, secondCandle, candles[len(candles)-1]) } func TestCandlesGetLatest(t *testing.T) { @@ -257,7 +252,6 @@ func testInterval(t *testing.T, ctx context.Context, tradeDataStartTime time.Tim intervalDur := time.Duration(intervalSeconds) * time.Second pagination, _ := entities.NewCursorPagination(nil, nil, nil, nil, false) - // entities.OffsetPagination{} _, candleID, _ := candleStore.GetCandleIDForIntervalAndMarket(ctx, interval, testMarket) candles, _, err := candleStore.GetCandleDataForTimeSpan(ctx, candleID, fromTime, toTime, pagination) @@ -371,15 +365,15 @@ func createTestTrade(t *testing.T, price int, size int, block entities.Block, se t.Helper() proto := &types.Trade{ Type: types.Trade_TYPE_DEFAULT, - Id: helpers.GenerateID(), + Id: GenerateID(), Price: strconv.Itoa(price), Size: uint64(size), MarketId: testMarket, - Buyer: helpers.GenerateID(), - Seller: helpers.GenerateID(), + Buyer: GenerateID(), + Seller: GenerateID(), Aggressor: types.Side_SIDE_SELL, - BuyOrder: helpers.GenerateID(), - SellOrder: helpers.GenerateID(), + BuyOrder: GenerateID(), + SellOrder: GenerateID(), } trade, err := entities.TradeFromProto(proto, generateTxHash(), block.VegaTime, uint64(seqNum)) @@ -554,3 +548,48 @@ func TestCandlesCursorPagination(t *testing.T) { }, pageInfo) }) } + +func TestCandlesBlockInterval(t *testing.T) { + ctx := tempTransaction(t) + + candleStore := sqlstore.NewCandles(ctx, connectionSource, candlesv2.NewDefaultConfig().CandleStore) + + tradeStore := sqlstore.NewTrades(connectionSource) + + startTime := time.Unix(StartTime, 0) + insertCandlesTestData(t, ctx, tradeStore, startTime, totalBlocks, tradesPerBlock, startPrice, priceIncrement, size, time.Minute) + + candles, err := candleStore.GetCandlesForMarket(ctx, testMarket) + require.NoError(t, err) + first := int32(10) + pagination, err := entities.NewCursorPagination(&first, nil, nil, nil, false) + require.NoError(t, err) + + candleData, _, err := candleStore.GetCandleDataForTimeSpan(ctx, candles["block"], nil, + nil, pagination) + if err != nil { + t.Fatalf("failed to get candles with pagination:%s", err) + } + + assert.Equal(t, 10, len(candleData)) +} + +func TestCandlesFillBeforeFirstCandle(t *testing.T) { + ctx := tempTransaction(t) + + candleStore := sqlstore.NewCandles(ctx, connectionSource, candlesv2.NewDefaultConfig().CandleStore) + + candles, err := candleStore.GetCandlesForMarket(ctx, testMarket) + require.NoError(t, err) + first := int32(10) + pagination, err := entities.NewCursorPagination(&first, nil, nil, nil, false) + require.NoError(t, err) + + candleData, _, err := candleStore.GetCandleDataForTimeSpan(ctx, candles["block"], nil, + nil, pagination) + if err != nil { + t.Fatalf("failed to get candles with pagination:%s", err) + } + + assert.Equal(t, 0, len(candleData)) +} diff --git a/datanode/sqlstore/chain.go b/datanode/sqlstore/chain.go index 35edff60e8..8aa0b7b736 100644 --- a/datanode/sqlstore/chain.go +++ b/datanode/sqlstore/chain.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -32,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + "github.com/georgysavva/scany/pgxscan" "github.com/jackc/pgconn" ) diff --git a/datanode/sqlstore/chain_test.go b/datanode/sqlstore/chain_test.go index 46378914aa..2fafd330c5 100644 --- a/datanode/sqlstore/chain_test.go +++ b/datanode/sqlstore/chain_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -32,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + "github.com/stretchr/testify/assert" ) diff --git a/datanode/sqlstore/checkpoints.go b/datanode/sqlstore/checkpoints.go index fc4de3bdf8..4ecf31ba90 100644 --- a/datanode/sqlstore/checkpoints.go +++ b/datanode/sqlstore/checkpoints.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/checkpoints_test.go b/datanode/sqlstore/checkpoints_test.go index c9d4cc10ef..817a360d14 100644 --- a/datanode/sqlstore/checkpoints_test.go +++ b/datanode/sqlstore/checkpoints_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -35,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/datanode/sqlstore/config.go b/datanode/sqlstore/config.go index f19e779863..592ef955a6 100644 --- a/datanode/sqlstore/config.go +++ b/datanode/sqlstore/config.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( "fmt" "time" - "github.com/jackc/pgx/v4/pgxpool" - "code.vegaprotocol.io/vega/datanode/config/encoding" "code.vegaprotocol.io/vega/logging" + + "github.com/jackc/pgx/v4/pgxpool" ) type RetentionPeriod string diff --git a/datanode/sqlstore/connection_source.go b/datanode/sqlstore/connection_source.go index d9b8226ec5..25ef6218be 100644 --- a/datanode/sqlstore/connection_source.go +++ b/datanode/sqlstore/connection_source.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( diff --git a/datanode/sqlstore/cursor.go b/datanode/sqlstore/cursor.go index a5e1c3a99c..9b7733354f 100644 --- a/datanode/sqlstore/cursor.go +++ b/datanode/sqlstore/cursor.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( diff --git a/datanode/sqlstore/cursor_test.go b/datanode/sqlstore/cursor_test.go index c3eb3991c0..a81206e527 100644 --- a/datanode/sqlstore/cursor_test.go +++ b/datanode/sqlstore/cursor_test.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( "testing" "time" + "code.vegaprotocol.io/vega/datanode/sqlstore" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "code.vegaprotocol.io/vega/datanode/sqlstore" ) func TestCursorPredicate(t *testing.T) { diff --git a/datanode/sqlstore/delegations.go b/datanode/sqlstore/delegations.go index 6e7771622d..a3be367c48 100644 --- a/datanode/sqlstore/delegations.go +++ b/datanode/sqlstore/delegations.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -35,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/delegations_test.go b/datanode/sqlstore/delegations_test.go index fe606a0164..f0363d3466 100644 --- a/datanode/sqlstore/delegations_test.go +++ b/datanode/sqlstore/delegations_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -34,7 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" + "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/shopspring/decimal" @@ -90,8 +78,8 @@ func TestDelegations(t *testing.T) { ns := sqlstore.NewNode(connectionSource) block := addTestBlock(t, ctx, bs) - node1 := addTestNode(t, ctx, ns, block, helpers.GenerateID()) - node2 := addTestNode(t, ctx, ns, block, helpers.GenerateID()) + node1 := addTestNode(t, ctx, ns, block, GenerateID()) + node2 := addTestNode(t, ctx, ns, block, GenerateID()) node1ID := node1.ID.String() node2ID := node2.ID.String() @@ -640,8 +628,8 @@ func setupPaginatedDelegationsTests(t *testing.T, ctx context.Context) (*sqlstor block := addTestBlockForTime(t, ctx, bs, blockTime) nodes := []entities.Node{ - addTestNode(t, ctx, ns, block, helpers.GenerateID()), - addTestNode(t, ctx, ns, block, helpers.GenerateID()), + addTestNode(t, ctx, ns, block, GenerateID()), + addTestNode(t, ctx, ns, block, GenerateID()), } parties := []entities.Party{ diff --git a/datanode/sqlstore/deposits.go b/datanode/sqlstore/deposits.go index 1687568bb8..9c01e9c347 100644 --- a/datanode/sqlstore/deposits.go +++ b/datanode/sqlstore/deposits.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/deposits_test.go b/datanode/sqlstore/deposits_test.go index d5434a38df..d209d62619 100644 --- a/datanode/sqlstore/deposits_test.go +++ b/datanode/sqlstore/deposits_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -37,9 +25,9 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/protos/vega" + "github.com/georgysavva/scany/pgxscan" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -348,7 +336,7 @@ func addDeposits(ctx context.Context, t *testing.T, bs *sqlstore.Blocks, ds *sql for i := 0; i < 10; i++ { source.getNextBlock(t, ctx) depositProto := getTestDeposit(fmt.Sprintf("deadbeef%02d", i+1), testID, testID, - strconv.FormatInt(amount, 10), helpers.GenerateID(), vegaTime.UnixNano()) + strconv.FormatInt(amount, 10), GenerateID(), vegaTime.UnixNano()) deposit, err := entities.DepositFromProto(depositProto, generateTxHash(), vegaTime) require.NoError(t, err, "Converting deposit proto to database entity") err = ds.Upsert(ctx, deposit) diff --git a/datanode/sqlstore/epoch_test.go b/datanode/sqlstore/epoch_test.go index 3cd9dfbbf2..9413fa2d60 100644 --- a/datanode/sqlstore/epoch_test.go +++ b/datanode/sqlstore/epoch_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -32,11 +20,11 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func addTestEpoch(t *testing.T, ctx context.Context, es *sqlstore.Epochs, @@ -119,5 +107,9 @@ func TestEpochs(t *testing.T) { actual, err := es.GetByBlock(ctx, uint64(block2.Height)) require.NoError(t, err) assert.Equal(t, epoch2b, actual) + + actual, err = es.GetByBlock(ctx, uint64(block3.Height)) + require.NoError(t, err) + assert.Equal(t, epoch3, actual) }) } diff --git a/datanode/sqlstore/epochs.go b/datanode/sqlstore/epochs.go index 290e97e3a7..d7ebfcd6ad 100644 --- a/datanode/sqlstore/epochs.go +++ b/datanode/sqlstore/epochs.go @@ -13,27 +13,15 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( "context" - "github.com/georgysavva/scany/pgxscan" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + + "github.com/georgysavva/scany/pgxscan" ) type Epochs struct { @@ -95,7 +83,8 @@ func (es *Epochs) GetByBlock(ctx context.Context, height uint64) (entities.Epoch query := `WITH epochs_current AS (SELECT DISTINCT ON (id) * FROM epochs ORDER BY id, vega_time DESC) SELECT e.id, e.start_time, e.expire_time, e.end_time, e.tx_hash, e.vega_time, bs.height first_block, be.height last_block FROM epochs_current AS e LEFT JOIN blocks bs on e.start_time = bs.vega_time - LEFT JOIN blocks be on e.end_time = be.vega_time WHERE bs.height <= $1 AND be.height > $1;` + LEFT JOIN blocks be on e.end_time = be.vega_time + WHERE bs.height <= $1 AND (be.height > $1 or be.height is NULL);` epoch := entities.Epoch{} return epoch, es.wrapE(pgxscan.Get(ctx, es.Connection, &epoch, query, height)) diff --git a/datanode/sqlstore/erc20_multisig_added_test.go b/datanode/sqlstore/erc20_multisig_added_test.go index 3be6a243df..80131b910e 100644 --- a/datanode/sqlstore/erc20_multisig_added_test.go +++ b/datanode/sqlstore/erc20_multisig_added_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -37,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/datanode/sqlstore" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/datanode/sqlstore/erc20_multisig_event.go b/datanode/sqlstore/erc20_multisig_event.go index aa1bc792ad..363f8edb87 100644 --- a/datanode/sqlstore/erc20_multisig_event.go +++ b/datanode/sqlstore/erc20_multisig_event.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -35,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/ethereum_key_rotations.go b/datanode/sqlstore/ethereum_key_rotations.go index 1bcaaf5264..73368263b6 100644 --- a/datanode/sqlstore/ethereum_key_rotations.go +++ b/datanode/sqlstore/ethereum_key_rotations.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -33,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/ethereum_key_rotations_test.go b/datanode/sqlstore/ethereum_key_rotations_test.go index 71516c223f..4333d56bb7 100644 --- a/datanode/sqlstore/ethereum_key_rotations_test.go +++ b/datanode/sqlstore/ethereum_key_rotations_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/datanode/sqlstore/fees_stats.go b/datanode/sqlstore/fees_stats.go index 957674733a..d166faca93 100644 --- a/datanode/sqlstore/fees_stats.go +++ b/datanode/sqlstore/fees_stats.go @@ -22,33 +22,26 @@ import ( "strings" "time" - "golang.org/x/exp/maps" - + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/metrics" "code.vegaprotocol.io/vega/libs/num" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" "github.com/georgysavva/scany/pgxscan" - - "code.vegaprotocol.io/vega/datanode/metrics" - - "code.vegaprotocol.io/vega/datanode/entities" + "golang.org/x/exp/maps" ) -var ( - ErrFromEpochIsRequiredWhenToEpochSpecified = errors.New("filter from-epoch is required when to-epoch is specified") - - feesStatsByPartyColumn = []string{ - "market_id", - "asset_id", - "party_id", - "epoch_seq", - "total_rewards_received", - "referees_discount_applied", - "volume_discount_applied", - "total_maker_fees_received", - "vega_time", - } -) +var feesStatsByPartyColumn = []string{ + "market_id", + "asset_id", + "party_id", + "epoch_seq", + "total_rewards_received", + "referees_discount_applied", + "volume_discount_applied", + "total_maker_fees_received", + "vega_time", +} type FeesStats struct { *ConnectionSource @@ -129,9 +122,6 @@ func (rfs *FeesStats) StatsForParty(ctx context.Context, partyID entities.PartyI where = append(where, fmt.Sprintf("asset_id = %s", nextBindVar(&args, *assetID))) } - if fromEpoch == nil && toEpoch != nil { - return nil, ErrFromEpochIsRequiredWhenToEpochSpecified - } if fromEpoch == nil && toEpoch == nil { where = append(where, "epoch_seq = (SELECT MAX(epoch_seq) FROM fees_stats)") } diff --git a/datanode/sqlstore/fees_stats_test.go b/datanode/sqlstore/fees_stats_test.go index 60f3c05991..aa029c2005 100644 --- a/datanode/sqlstore/fees_stats_test.go +++ b/datanode/sqlstore/fees_stats_test.go @@ -20,19 +20,15 @@ import ( "testing" "time" + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" "code.vegaprotocol.io/vega/libs/ptr" - eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - "github.com/stretchr/testify/assert" - "github.com/georgysavva/scany/pgxscan" - + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "code.vegaprotocol.io/vega/datanode/entities" - "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" ) func TestFeesStats_AddFeesStats(t *testing.T) { @@ -306,7 +302,21 @@ func testGetFeesStatsForParty(t *testing.T) { ctx := tempTransaction(t) _ = setupFeesStats(t, ctx, stores.fs) - want := []entities.FeesStatsForParty{ + got, err := stores.fs.StatsForParty(ctx, "cafedaad01", ptr.From(entities.AssetID("deadbaad01")), ptr.From(uint64(1)), ptr.From(uint64(2))) + require.NoError(t, err) + assert.Equal(t, []entities.FeesStatsForParty{ + { + AssetID: entities.AssetID("deadbaad01"), + TotalRewardsReceived: "4200000", + RefereesDiscountApplied: "0", + VolumeDiscountApplied: "0", + TotalMakerFeesReceived: "0", + }, + }, got) + + got, err = stores.fs.StatsForParty(ctx, "cafedaad01", ptr.From(entities.AssetID("deadbaad01")), ptr.From(uint64(2)), nil) + require.NoError(t, err) + assert.Equal(t, []entities.FeesStatsForParty{ { AssetID: entities.AssetID("deadbaad01"), TotalRewardsReceived: "4600000", @@ -314,10 +324,31 @@ func testGetFeesStatsForParty(t *testing.T) { VolumeDiscountApplied: "0", TotalMakerFeesReceived: "0", }, - } - got, err := stores.fs.StatsForParty(ctx, "cafedaad01", ptr.From(entities.AssetID("deadbaad01")), ptr.From(uint64(2)), ptr.From(uint64(3))) + }, got) + + got, err = stores.fs.StatsForParty(ctx, "cafedaad01", ptr.From(entities.AssetID("deadbaad01")), nil, ptr.From(uint64(2))) require.NoError(t, err) - assert.Equal(t, want, got) + assert.Equal(t, []entities.FeesStatsForParty{ + { + AssetID: entities.AssetID("deadbaad01"), + TotalRewardsReceived: "4200000", + RefereesDiscountApplied: "0", + VolumeDiscountApplied: "0", + TotalMakerFeesReceived: "0", + }, + }, got) + + got, err = stores.fs.StatsForParty(ctx, "cafedaad01", ptr.From(entities.AssetID("deadbaad01")), nil, nil) + require.NoError(t, err) + assert.Equal(t, []entities.FeesStatsForParty{ + { + AssetID: entities.AssetID("deadbaad01"), + TotalRewardsReceived: "2400000", + RefereesDiscountApplied: "0", + VolumeDiscountApplied: "0", + TotalMakerFeesReceived: "0", + }, + }, got) } func setupFeesStats(t *testing.T, ctx context.Context, fs *sqlstore.FeesStats) []entities.FeesStats { diff --git a/datanode/sqlstore/funding_payments.go b/datanode/sqlstore/funding_payments.go index 49e4824fba..df00ea8c3f 100644 --- a/datanode/sqlstore/funding_payments.go +++ b/datanode/sqlstore/funding_payments.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/funding_payments_test.go b/datanode/sqlstore/funding_payments_test.go index f71876cc3c..d662d874b1 100644 --- a/datanode/sqlstore/funding_payments_test.go +++ b/datanode/sqlstore/funding_payments_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" + "github.com/stretchr/testify/assert" ) diff --git a/datanode/sqlstore/funding_period.go b/datanode/sqlstore/funding_period.go index 38aa9f5dd8..235d1bdc06 100644 --- a/datanode/sqlstore/funding_period.go +++ b/datanode/sqlstore/funding_period.go @@ -19,11 +19,11 @@ import ( "context" "fmt" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "github.com/georgysavva/scany/pgxscan" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + + "github.com/georgysavva/scany/pgxscan" ) type FundingPeriods struct { diff --git a/datanode/sqlstore/funding_period_test.go b/datanode/sqlstore/funding_period_test.go index 6e36481344..e95e6e7f05 100644 --- a/datanode/sqlstore/funding_period_test.go +++ b/datanode/sqlstore/funding_period_test.go @@ -21,15 +21,14 @@ import ( "testing" "time" - "code.vegaprotocol.io/vega/libs/ptr" - - "github.com/georgysavva/scany/pgxscan" - "github.com/stretchr/testify/assert" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/ptr" + + "github.com/georgysavva/scany/pgxscan" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/datanode/sqlstore/games.go b/datanode/sqlstore/games.go new file mode 100644 index 0000000000..beb56aa9e5 --- /dev/null +++ b/datanode/sqlstore/games.go @@ -0,0 +1,351 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package sqlstore + +import ( + "context" + "encoding/hex" + "fmt" + "sort" + "strings" + "time" + + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/libs/num" + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "code.vegaprotocol.io/vega/protos/vega" + + "github.com/georgysavva/scany/pgxscan" + "github.com/shopspring/decimal" +) + +type Games struct { + *ConnectionSource +} + +var gameOrdering = TableOrdering{ + ColumnOrdering{Name: "epoch_id", Sorting: ASC}, + ColumnOrdering{Name: "game_id", Sorting: DESC}, +} + +func NewGames(connectionSource *ConnectionSource) *Games { + return &Games{ + ConnectionSource: connectionSource, + } +} + +type GameReward struct { + PartyID entities.PartyID + AssetID entities.AssetID + MarketID entities.MarketID + EpochID int64 + Amount decimal.Decimal + QuantumAmount decimal.Decimal + PercentOfTotal float64 + RewardType string + Timestamp time.Time + TxHash entities.TxHash + VegaTime time.Time + SeqNum uint64 + LockedUntilEpochID int64 + GameID []byte + DispatchStrategy vega.DispatchStrategy + TeamID entities.TeamID + MemberRank *int64 + TeamRank *int64 + TotalRewards num.Decimal + TotalRewardsQuantum num.Decimal + TeamTotalRewards *num.Decimal + TeamTotalRewardsQuantum *num.Decimal + EntityScope string +} + +func (g *Games) ListGames(ctx context.Context, gameID *string, entityScope *vega.EntityScope, epochFrom, epochTo *uint64, + pagination entities.CursorPagination, +) ([]entities.Game, entities.PageInfo, error) { + var pageInfo entities.PageInfo + + var gameRewards []GameReward + + // because we have to build the games data from the rewards data, paging backwards adds more complexity + // therefore we aren't going to support it for now as the games data API is high priority + if pagination.HasBackward() { + return nil, pageInfo, fmt.Errorf("backward pagination is not currently supported") + } + + query, args, err := g.buildGamesQuery(gameID, entityScope, epochFrom, epochTo, pagination) + if err != nil { + return nil, pageInfo, err + } + + if err := pgxscan.Select(ctx, g.Connection, &gameRewards, query, args...); err != nil { + return nil, pageInfo, err + } + + games, err := parseGameRewards(gameRewards) + if err != nil { + return nil, pageInfo, err + } + + games, pageInfo = entities.PageEntities[*v2.GameEdge](games, pagination) + + return games, pageInfo, nil +} + +func (g *Games) parseEpochs(from, to *uint64) (uint64, uint64) { + var eFrom, eTo uint64 + if from != nil || to != nil { + // no more than 30 epochs for performance sake + if from != nil && to == nil { + eFrom, eTo = *from, *from+30-1 + } else if from == nil && to != nil { + eTo, eFrom = *to, *to-30+1 + } else if from != nil && to != nil { + eFrom, eTo = *from, *to + if eTo-eFrom > 30 { + eFrom = eTo - 30 + 1 + } + } + } + return eFrom, eTo +} + +func (g *Games) buildPagingQuery(selectTable string, gameID *string, entityScope *vega.EntityScope, epochFrom, epochTo uint64, + pagination entities.CursorPagination, +) (string, []interface{}, error) { + selectQuery := fmt.Sprintf(`select distinct game_id, epoch_id from %s`, selectTable) + var where []string + var args []interface{} + + if epochFrom > 0 && epochTo > 0 { + where = append(where, fmt.Sprintf("epoch_id >= %s AND epoch_id <= %s", + nextBindVar(&args, epochFrom), nextBindVar(&args, epochTo))) + } + + if gameID != nil { + where = append(where, fmt.Sprintf("game_id = %s", nextBindVar(&args, entities.GameID(*gameID)))) + } + + if entityScope != nil { + where = append(where, fmt.Sprintf("entity_scope = %s", nextBindVar(&args, entityScope.String()))) + } + + whereClause := "" + if len(where) > 0 { + whereClause = "WHERE " + strings.Join(where, " AND ") + } + + query := fmt.Sprintf("%s %s", selectQuery, whereClause) + return PaginateQuery[entities.GameCursor](query, args, gameOrdering, pagination) +} + +func (g *Games) buildGamesQuery(gameID *string, entityScope *vega.EntityScope, epochFrom, epochTo *uint64, + pagination entities.CursorPagination, +) (string, []interface{}, error) { + // Games are intrinsically created by a recurring transfer with a game ID + // Rewards are paid out to participants of a game and the game ID is recorded on the reward + // We need to query the rewards and build the games data from that. + // If we page on the reward data, we may not have a complete data set for the game. Therefore we need to only page/filter on the distinct game IDs per epoch + // and then use that data to query the corresponding rewards data we need for the API to return. + + eFrom, eTo := g.parseEpochs(epochFrom, epochTo) + // The select table query determines if we should just be querying the games data for the most current epoch or all epochs + selectTable := g.getSelectTable(eFrom, eTo) + // The page query determines which games/epochs should be included in the result set for pagination + // For example, if we have 100 games, and we want to page on the first 10, we would need to know which games to include rewards for + // The number of rewards we may get back in order to build the data will be much more than just 10 records. + pageQuery, args, err := g.buildPagingQuery(selectTable, gameID, entityScope, eFrom, eTo, pagination) + if err != nil { + return "", nil, err + } + + query := fmt.Sprintf("select s.* from %s s join (%s) as p on s.game_id = p.game_id and s.epoch_id = p.epoch_id order by s.epoch_id desc, s.game_id", selectTable, pageQuery) + + return query, args, nil +} + +func (g *Games) getSelectTable(from, to uint64) string { + if from == 0 && to == 0 { + return `game_stats_current` + } + return `game_stats` +} + +func parseGameRewards(rewards []GameReward) ([]entities.Game, error) { + if len(rewards) <= 0 { + return []entities.Game{}, nil + } + + type gameKey struct { + EpochID uint64 + GameID entities.GameID + } + games := make(map[gameKey]entities.Game) + lastGameID := entities.GameID("") + lastEpochID := int64(0) + participants := uint64(0) + + gameIndividuals := make(map[gameKey][]entities.GameEntity) + teamMembers := make(map[gameKey]map[entities.TeamID][]*entities.IndividualGameEntity) + teamRanks := make(map[gameKey]map[entities.TeamID]uint64) + + var game entities.Game + var gk gameKey + + // first go through all the rewards and build the participation stats + // if the reward is for a team participant, i.e. there is a team ID then the participant will be added to the teamMembers map + // otherwise we add it to the gameIndividuals map + for i := range rewards { + gID := hex.EncodeToString(rewards[i].GameID) + currentGameID := entities.GameID(gID) + currentEpochID := rewards[i].EpochID + gk = gameKey{ + EpochID: uint64(currentEpochID), + GameID: currentGameID, + } + + if currentGameID != lastGameID || currentEpochID != lastEpochID { + // add the game to the map of games + lastKey := gameKey{ + EpochID: uint64(lastEpochID), + GameID: lastGameID, + } + if lastGameID != "" && lastEpochID != 0 { + game.Participants = participants + games[lastKey] = game + } + + game = entities.Game{ + ID: currentGameID, + Epoch: uint64(currentEpochID), + Participants: participants, + Entities: []entities.GameEntity{}, + RewardAssetID: rewards[i].AssetID, + } + + lastGameID = currentGameID + lastEpochID = currentEpochID + participants = 0 + games[gk] = game + } + + rewardEarned, _ := num.UintFromDecimal(rewards[i].Amount) + totalRewardsEarned, _ := num.UintFromDecimal(rewards[i].TotalRewards) + rewardEarnedQuantum, _ := num.UintFromDecimal(rewards[i].QuantumAmount) + totalRewardsEarnedQuantum, _ := num.UintFromDecimal(rewards[i].TotalRewardsQuantum) + + var rank uint64 + if rewards[i].MemberRank != nil { + rank = uint64(*rewards[i].MemberRank) + } + + individual := entities.IndividualGameEntity{ + Individual: rewards[i].PartyID.String(), + Rank: rank, + Volume: num.DecimalZero(), + RewardMetric: rewards[i].DispatchStrategy.Metric, + RewardEarned: rewardEarned, + TotalRewardsEarned: totalRewardsEarned, + RewardEarnedQuantum: rewardEarnedQuantum, + TotalRewardsEarnedQuantum: totalRewardsEarnedQuantum, + } + + if rewards[i].TeamID != "" { + currentTeamID := rewards[i].TeamID + if teamMembers[gk] == nil { + teamMembers[gk] = make(map[entities.TeamID][]*entities.IndividualGameEntity) + } + teamMembers[gk][currentTeamID] = append(teamMembers[gk][currentTeamID], &individual) + if rewards[i].TeamRank == nil { + return nil, fmt.Errorf("team rank is nil for team %s", currentTeamID) + } + + if teamRanks[gk] == nil { + teamRanks[gk] = make(map[entities.TeamID]uint64) + } + + teamRanks[gk][currentTeamID] = uint64(*rewards[i].TeamRank) + } else { + gameIndividuals[gk] = append(gameIndividuals[gk], &individual) + } + participants++ + } + + game.Participants = participants + games[gk] = game + + results := make([]entities.Game, 0, len(games)) + // now that we have the participation involvement, we can use that to build the game entities for each game. + for key, game := range games { + if teamMembers[key] != nil { + for teamID, individuals := range teamMembers[key] { + sort.Slice(individuals, func(i, j int) bool { + return individuals[i].Rank < individuals[j].Rank || (individuals[i].Rank == individuals[j].Rank && individuals[i].Individual < individuals[j].Individual) + }) + team := entities.TeamGameParticipation{ + TeamID: teamID, + MembersParticipating: individuals, + } + + teamVolume := num.DecimalZero() + teamRewardEarned := num.NewUint(0) + teamTotalRewardsEarned := num.NewUint(0) + teamRewardEarnedQuantum := num.NewUint(0) + teamTotalRewardsEarnedQuantum := num.NewUint(0) + rewardMetric := vega.DispatchMetric_DISPATCH_METRIC_UNSPECIFIED + for _, individual := range individuals { + if rewardMetric == vega.DispatchMetric_DISPATCH_METRIC_UNSPECIFIED { + rewardMetric = individual.RewardMetric + } + teamVolume = teamVolume.Add(individual.Volume) + teamRewardEarned = teamRewardEarned.Add(teamRewardEarned, individual.RewardEarned) + teamTotalRewardsEarned = teamTotalRewardsEarned.Add(teamTotalRewardsEarned, individual.TotalRewardsEarned) + teamRewardEarnedQuantum = teamRewardEarnedQuantum.Add(teamRewardEarnedQuantum, individual.RewardEarnedQuantum) + teamTotalRewardsEarnedQuantum = teamTotalRewardsEarnedQuantum.Add(teamTotalRewardsEarnedQuantum, individual.TotalRewardsEarnedQuantum) + } + game.Entities = append(game.Entities, &entities.TeamGameEntity{ + Team: team, + Rank: teamRanks[key][teamID], + Volume: teamVolume, + RewardMetric: rewardMetric, + RewardEarned: teamRewardEarned, + TotalRewardsEarned: teamTotalRewardsEarned, + RewardEarnedQuantum: teamRewardEarnedQuantum, + TotalRewardsEarnedQuantum: teamTotalRewardsEarnedQuantum, + }) + } + sort.Slice(game.Entities, func(i, j int) bool { + return game.Entities[i].(*entities.TeamGameEntity).Rank < game.Entities[j].(*entities.TeamGameEntity).Rank || + (game.Entities[i].(*entities.TeamGameEntity).Rank == game.Entities[j].(*entities.TeamGameEntity).Rank && + game.Entities[i].(*entities.TeamGameEntity).Team.TeamID < game.Entities[j].(*entities.TeamGameEntity).Team.TeamID) + }) + } + if gameIndividuals[key] != nil { + game.Entities = append(game.Entities, gameIndividuals[key]...) + sort.Slice(game.Entities, func(i, j int) bool { + return game.Entities[i].(*entities.IndividualGameEntity).Rank < game.Entities[j].(*entities.IndividualGameEntity).Rank || + (game.Entities[i].(*entities.IndividualGameEntity).Rank == game.Entities[j].(*entities.IndividualGameEntity).Rank && + game.Entities[i].(*entities.IndividualGameEntity).Individual < game.Entities[j].(*entities.IndividualGameEntity).Individual) + }) + } + results = append(results, game) + } + sort.Slice(results, func(i, j int) bool { + return results[i].Epoch > results[j].Epoch || + (results[i].Epoch == results[j].Epoch && results[i].ID < results[j].ID) + }) + return results, nil +} diff --git a/datanode/sqlstore/games_test.go b/datanode/sqlstore/games_test.go new file mode 100644 index 0000000000..5584c313ab --- /dev/null +++ b/datanode/sqlstore/games_test.go @@ -0,0 +1,700 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package sqlstore_test + +import ( + "context" + "math/rand" + "sort" + "testing" + "time" + + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/ptr" + "code.vegaprotocol.io/vega/libs/slice" + "code.vegaprotocol.io/vega/protos/vega" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +type gameStores struct { + blocks *sqlstore.Blocks + assets *sqlstore.Assets + accounts *sqlstore.Accounts + transfers *sqlstore.Transfers + rewards *sqlstore.Rewards + parties *sqlstore.Parties + games *sqlstore.Games + teams *sqlstore.Teams +} + +func TestListGames(t *testing.T) { + ctx := tempTransaction(t) + stores := setupGamesTest(t, ctx) + startingBlock := addTestBlockForTime(t, ctx, stores.blocks, time.Now()) + gamesData, gameIDs, _, _ := setupGamesData(ctx, t, stores, startingBlock, 50) + src := rand.NewSource(time.Now().UnixNano()) + r := rand.New(src) + t.Run("Should list all games data if no filter is given", func(t *testing.T) { + t.Run("and return all data for the most recent epoch if no epoch is given", func(t *testing.T) { + want := filterForEpochs(50, 50, gamesData) + t.Run("if no pagination is given", func(t *testing.T) { + got, _, err := stores.games.ListGames(ctx, nil, nil, nil, nil, entities.CursorPagination{}) + assert.NoError(t, err) + assert.Equal(t, want, got) + }) + + t.Run("if first page is requested", func(t *testing.T) { + first := int32(2) + pagination, err := entities.NewCursorPagination(&first, nil, nil, nil, true) + require.NoError(t, err) + got, pageInfo, err := stores.games.ListGames(ctx, nil, nil, nil, nil, pagination) + assert.NoError(t, err) + want := want[:2] + assert.Equal(t, want, got) + assert.Equal(t, entities.PageInfo{ + HasNextPage: true, + HasPreviousPage: false, + StartCursor: want[0].Cursor().Encode(), + EndCursor: want[1].Cursor().Encode(), + }, pageInfo) + }) + + t.Run("if first page after cursor is requested", func(t *testing.T) { + first := int32(2) + after := gamesData[1].Cursor().Encode() + pagination, err := entities.NewCursorPagination(&first, &after, nil, nil, true) + require.NoError(t, err) + got, pageInfo, err := stores.games.ListGames(ctx, nil, nil, nil, nil, pagination) + assert.NoError(t, err) + want := want[2:4] + assert.Equal(t, want, got) + assert.Equal(t, entities.PageInfo{ + HasNextPage: true, + HasPreviousPage: true, + StartCursor: want[0].Cursor().Encode(), + EndCursor: want[1].Cursor().Encode(), + }, pageInfo) + }) + + t.Run("if last page is requested", func(t *testing.T) { + last := int32(2) + pagination, err := entities.NewCursorPagination(nil, nil, &last, nil, true) + require.NoError(t, err) + _, _, err = stores.games.ListGames(ctx, nil, nil, nil, nil, pagination) + assert.Error(t, err) + }) + + t.Run("if last page before cursor is requested", func(t *testing.T) { + last := int32(2) + before := gamesData[2].Cursor().Encode() + pagination, err := entities.NewCursorPagination(nil, nil, &last, &before, true) + require.NoError(t, err) + _, _, err = stores.games.ListGames(ctx, nil, nil, nil, nil, pagination) + assert.Error(t, err) + }) + }) + t.Run("and return data from the start to most recent epoch if no end epoch is given", func(t *testing.T) { + t.Run("when start is less than 30 epochs before most recent", func(t *testing.T) { + epochFrom := uint64(1) + epochTo := uint64(20) + got, _, err := stores.games.ListGames(ctx, nil, nil, ptr.From(epochFrom), ptr.From(epochTo), entities.CursorPagination{}) + require.NoError(t, err) + want := filterForEpochs(1, 20, gamesData) + require.Equal(t, len(want), len(got)) + assert.Equal(t, want, got) + }) + t.Run("when start is more than 30 epochs before most recent", func(t *testing.T) { + want := filterForEpochs(1, 30, gamesData) + epochFrom := uint64(1) + got, _, err := stores.games.ListGames(ctx, nil, nil, ptr.From(epochFrom), nil, entities.CursorPagination{}) + require.NoError(t, err) + require.Equal(t, len(want), len(got)) + assert.Equal(t, want, got) + }) + }) + t.Run("and return all data from 30 previous epochs to given end epoch", func(t *testing.T) { + t.Run("if no start epoch given", func(t *testing.T) { + epochTo := uint64(40) + got, _, err := stores.games.ListGames(ctx, nil, nil, nil, ptr.From(epochTo), entities.CursorPagination{}) + require.NoError(t, err) + want := filterForEpochs(11, 40, gamesData) + require.Equal(t, len(want), len(got)) + assert.Equal(t, want, got) + }) + t.Run("if start is more than 30 epochs before end", func(t *testing.T) { + epochFrom := uint64(1) + epochTo := uint64(40) + got, _, err := stores.games.ListGames(ctx, nil, nil, ptr.From(epochFrom), ptr.From(epochTo), entities.CursorPagination{}) + require.NoError(t, err) + want := filterForEpochs(11, 40, gamesData) + require.Equal(t, len(want), len(got)) + assert.Equal(t, want, got) + }) + }) + }) + t.Run("Should list a game's stats if gameID is provided", func(t *testing.T) { + t.Run("and return data from the most recent epoch if no epoch is given", func(t *testing.T) { + i := r.Intn(len(gameIDs)) + gameID := gameIDs[i] + want := filterForGameID(filterForEpochs(50, 50, gamesData), gameID) + got, _, err := stores.games.ListGames(ctx, ptr.From(gameID), nil, nil, nil, entities.CursorPagination{}) + require.NoError(t, err) + require.Equal(t, len(want), len(got)) + assert.Equal(t, want, got) + }) + t.Run("and return data for the 30 epochs up to the given end epoch", func(t *testing.T) { + i := r.Intn(len(gameIDs)) + gameID := gameIDs[i] + want := filterForGameID(filterForEpochs(11, 40, gamesData), gameID) + epochTo := uint64(40) + got, _, err := stores.games.ListGames(ctx, ptr.From(gameID), nil, nil, ptr.From(epochTo), entities.CursorPagination{}) + require.NoError(t, err) + require.Equal(t, len(want), len(got)) + assert.Equal(t, want, got) + }) + t.Run("and return data between the given start and end epochs", func(t *testing.T) { + i := r.Intn(len(gameIDs)) + gameID := gameIDs[i] + want := filterForGameID(filterForEpochs(21, 40, gamesData), gameID) + epochFrom := uint64(21) + epochTo := uint64(40) + got, _, err := stores.games.ListGames(ctx, ptr.From(gameID), nil, ptr.From(epochFrom), ptr.From(epochTo), entities.CursorPagination{}) + require.NoError(t, err) + require.Equal(t, len(want), len(got)) + assert.Equal(t, want, got) + }) + }) + t.Run("Should list games for a specific entity type if specified", func(t *testing.T) { + t.Run("and return data for the most recent epoch if no epoch is given", func(t *testing.T) { + t.Run("when entity scope is teams", func(t *testing.T) { + entityScope := vega.EntityScope_ENTITY_SCOPE_TEAMS + want := filterForEntityScope(filterForEpochs(50, 50, gamesData), entityScope) + got, _, err := stores.games.ListGames(ctx, nil, ptr.From(entityScope), nil, nil, entities.CursorPagination{}) + require.NoError(t, err) + require.Equal(t, len(want), len(got)) + assert.Equal(t, want, got) + }) + t.Run("when entity scope is individuals", func(t *testing.T) { + entityScope := vega.EntityScope_ENTITY_SCOPE_INDIVIDUALS + want := filterForEntityScope(filterForEpochs(50, 50, gamesData), entityScope) + got, _, err := stores.games.ListGames(ctx, nil, ptr.From(entityScope), nil, nil, entities.CursorPagination{}) + require.NoError(t, err) + require.Equal(t, len(want), len(got)) + assert.Equal(t, want, got) + }) + }) + t.Run("and return data for the 30 epochs up to the given end epoch", func(t *testing.T) { + t.Run("when entity scope is teams", func(t *testing.T) { + entityScope := vega.EntityScope_ENTITY_SCOPE_TEAMS + want := filterForEntityScope(filterForEpochs(11, 40, gamesData), entityScope) + epochTo := uint64(40) + got, _, err := stores.games.ListGames(ctx, nil, ptr.From(entityScope), nil, ptr.From(epochTo), entities.CursorPagination{}) + require.NoError(t, err) + require.Equal(t, len(want), len(got)) + for i, w := range want { + for j, e := range w.Entities { + wt := e.(*entities.TeamGameEntity) + gt := got[i].Entities[j].(*entities.TeamGameEntity) + assert.Equalf(t, wt.Team.TeamID, gt.Team.TeamID, "TeamID mismatch, game index: %d, entity index: %d", i, j) + for k, m := range wt.Team.MembersParticipating { + assert.Equalf(t, m.Individual, gt.Team.MembersParticipating[k].Individual, "Individual mismatch, game index: %d, entity index: %d, member index: %d", i, j, k) + assert.Equal(t, m.Rank, gt.Team.MembersParticipating[k].Rank, "Rank mismatch, game index: %d, entity index: %d, member index: %d", i, j, k) + } + assert.Equal(t, wt.Rank, gt.Rank, "Rank mismatch, game index: %d, entity index: %d", i, j) + } + } + assert.Equal(t, want, got) + }) + t.Run("when entity scope is individuals", func(t *testing.T) { + entityScope := vega.EntityScope_ENTITY_SCOPE_INDIVIDUALS + want := filterForEntityScope(filterForEpochs(11, 40, gamesData), entityScope) + epochTo := uint64(40) + got, _, err := stores.games.ListGames(ctx, nil, ptr.From(entityScope), nil, ptr.From(epochTo), entities.CursorPagination{}) + require.NoError(t, err) + require.Equal(t, len(want), len(got)) + assert.Equal(t, want, got) + }) + }) + t.Run("and return data between the given start and end epochs", func(t *testing.T) { + t.Run("when entity scope is teams", func(t *testing.T) { + entityScope := vega.EntityScope_ENTITY_SCOPE_TEAMS + want := filterForEntityScope(filterForEpochs(21, 40, gamesData), entityScope) + epochFrom := uint64(21) + epochTo := uint64(40) + got, _, err := stores.games.ListGames(ctx, nil, ptr.From(entityScope), ptr.From(epochFrom), ptr.From(epochTo), entities.CursorPagination{}) + require.NoError(t, err) + require.Equal(t, len(want), len(got)) + assert.Equal(t, want, got) + }) + t.Run("when entity scope is individuals", func(t *testing.T) { + entityScope := vega.EntityScope_ENTITY_SCOPE_INDIVIDUALS + want := filterForEntityScope(filterForEpochs(21, 40, gamesData), entityScope) + epochFrom := uint64(21) + epochTo := uint64(40) + got, _, err := stores.games.ListGames(ctx, nil, ptr.From(entityScope), ptr.From(epochFrom), ptr.From(epochTo), entities.CursorPagination{}) + require.NoError(t, err) + require.Equal(t, len(want), len(got)) + assert.Equal(t, want, got) + }) + }) + }) +} + +func setupGamesTest(t *testing.T, ctx context.Context) gameStores { + t.Helper() + return gameStores{ + blocks: sqlstore.NewBlocks(connectionSource), + assets: sqlstore.NewAssets(connectionSource), + accounts: sqlstore.NewAccounts(connectionSource), + transfers: sqlstore.NewTransfers(connectionSource), + rewards: sqlstore.NewRewards(ctx, connectionSource), + parties: sqlstore.NewParties(connectionSource), + games: sqlstore.NewGames(connectionSource), + teams: sqlstore.NewTeams(connectionSource), + } +} + +type gameDataKey struct { + ID string + Epoch int64 +} + +func setupResultsStore(t *testing.T, gameIDs []string, epochCount int64) map[gameDataKey]entities.Game { + t.Helper() + + store := make(map[gameDataKey]entities.Game) + for _, id := range gameIDs { + for epoch := int64(1); epoch <= epochCount; epoch++ { + key := gameDataKey{ + ID: id, + Epoch: epoch, + } + store[key] = entities.Game{ + ID: entities.GameID(id), + Epoch: uint64(epoch), + } + } + } + + return store +} + +func setupGamesData(ctx context.Context, t *testing.T, stores gameStores, block entities.Block, epochCount int64) ( + []entities.Game, []string, map[gameDataKey][]entities.Reward, map[string][]entities.Party, +) { + t.Helper() + + gameCount := 5 + teamCount := 3 + individualCount := 5 + + gameIDs := getGameIDs(t, gameCount) + gameEntities := setupResultsStore(t, gameIDs, epochCount) + teams := getTeams(t, ctx, stores, block, teamCount) + individuals := getIndividuals(t, ctx, stores, block, individualCount) + gameAssets := make(map[string]*entities.Asset) + gameEntityScopes := make(map[string]vega.EntityScope) + + i := 0 + for _, gameID := range gameIDs { + gID := entities.GameID(gameID) + asset := CreateAsset(t, ctx, stores.assets, block) + fromAccount := CreateAccount(t, ctx, stores.accounts, block, AccountForAsset(asset)) + toAccount := CreateAccount(t, ctx, stores.accounts, block, AccountWithType(vega.AccountType_ACCOUNT_TYPE_GLOBAL_REWARD), AccountForAsset(asset)) + // create the recurring transfers that are games + var recurringTransfer eventspb.RecurringTransfer + if i%2 == 0 { + recurringTransfer = eventspb.RecurringTransfer{ + StartEpoch: 1, + Factor: "0.1", + DispatchStrategy: &vega.DispatchStrategy{ + AssetForMetric: asset.ID.String(), + Metric: vega.DispatchMetric_DISPATCH_METRIC_MAKER_FEES_PAID, + EntityScope: vega.EntityScope_ENTITY_SCOPE_TEAMS, + DistributionStrategy: vega.DistributionStrategy_DISTRIBUTION_STRATEGY_PRO_RATA, + }, + } + gameEntityScopes[gameID] = vega.EntityScope_ENTITY_SCOPE_TEAMS + } else { + recurringTransfer = eventspb.RecurringTransfer{ + StartEpoch: 1, + Factor: "0.1", + DispatchStrategy: &vega.DispatchStrategy{ + AssetForMetric: asset.ID.String(), + Metric: vega.DispatchMetric_DISPATCH_METRIC_MAKER_FEES_PAID, + EntityScope: vega.EntityScope_ENTITY_SCOPE_INDIVIDUALS, + IndividualScope: vega.IndividualScope_INDIVIDUAL_SCOPE_ALL, + DistributionStrategy: vega.DistributionStrategy_DISTRIBUTION_STRATEGY_PRO_RATA, + }, + } + gameEntityScopes[gameID] = vega.EntityScope_ENTITY_SCOPE_INDIVIDUALS + } + transfer := NewTransfer(t, ctx, stores.accounts, block, + TransferWithAsset(asset), + TransferFromToAccounts(fromAccount, toAccount), + TransferAsRecurring(&recurringTransfer), + TransferWithGameID(ptr.From(gID.String())), + ) + + err := stores.transfers.Upsert(ctx, transfer) + require.NoError(t, err) + gameAssets[gameID] = asset + i++ + } + + rewards := make(map[gameDataKey][]entities.Reward) + src := rand.NewSource(time.Now().UnixNano()) + r := rand.New(src) + + teamTotalRewards := make(map[gameDataKey]map[string]*num.Uint) + teamMemberTotalRewards := make(map[gameDataKey]map[string]map[string]*num.Uint) + individualTotalRewards := make(map[gameDataKey]map[string]*num.Uint) + + for epoch := int64(1); epoch <= epochCount; epoch++ { + block = addTestBlockForTime(t, ctx, stores.blocks, block.VegaTime.Add(time.Minute)) + seqNum := uint64(1) + for _, gameID := range gameIDs { + // create the rewards for the games + // we want to create the rewards for each participant in the game + participants := uint64(0) + market := entities.MarketID(GenerateID()) + teamEntities := make([]entities.GameEntity, 0) + individualEntities := make([]entities.GameEntity, 0) + gID := entities.GameID(gameID) + asset := gameAssets[gameID] + gk := gameDataKey{ + ID: gameID, + Epoch: epoch, + } + pk := gameDataKey{ + ID: gameID, + Epoch: epoch - 1, + } + if gameEntityScopes[gameID] == vega.EntityScope_ENTITY_SCOPE_TEAMS { + if teamTotalRewards[gk] == nil { + teamTotalRewards[gk] = make(map[string]*num.Uint) + } + if teamMemberTotalRewards[gk] == nil { + teamMemberTotalRewards[gk] = make(map[string]map[string]*num.Uint) + } + for team, members := range teams { + if teamMemberTotalRewards[gk][team] == nil { + teamMemberTotalRewards[gk][team] = make(map[string]*num.Uint) + // carry forward the previous totals + if teamMemberTotalRewards[pk] != nil && teamMemberTotalRewards[pk][team] != nil { + for k, v := range teamMemberTotalRewards[pk][team] { + teamMemberTotalRewards[gk][team][k] = v.Clone() + } + } + } + teamRewards := num.NewUint(0) + teamVolume := num.DecimalZero() + memberEntities := make([]*entities.IndividualGameEntity, 0) + for _, member := range members { + amount := num.DecimalFromInt64(r.Int63n(1000)) + reward := addTestReward(t, ctx, stores.rewards, member, *asset, market, epoch, "", block.VegaTime, block, seqNum, amount, generateTxHash(), &gID) + reward.TeamID = ptr.From(entities.TeamID(team)) + rewards[gk] = append(rewards[gk], reward) + rewardEarned, _ := num.UintFromDecimal(amount) + individualEntity := entities.IndividualGameEntity{ + Individual: member.ID.String(), + Rank: 0, + Volume: num.DecimalZero(), + RewardMetric: vega.DispatchMetric_DISPATCH_METRIC_MAKER_FEES_PAID, + RewardEarned: rewardEarned, + RewardEarnedQuantum: rewardEarned, + } + teamRewards = teamRewards.Add(teamRewards, individualEntity.RewardEarned) + teamVolume = teamVolume.Add(individualEntity.Volume) + if _, ok := teamMemberTotalRewards[pk][team][member.ID.String()]; !ok { + teamMemberTotalRewards[gk][team][member.ID.String()] = num.NewUint(0) + } else { + // carry forward the previous totals + teamMemberTotalRewards[gk][team][member.ID.String()] = teamMemberTotalRewards[pk][team][member.ID.String()].Clone() + } + teamMemberTotalRewards[gk][team][member.ID.String()] = teamMemberTotalRewards[gk][team][member.ID.String()]. + Add(teamMemberTotalRewards[gk][team][member.ID.String()], individualEntity.RewardEarned) + individualEntity.TotalRewardsEarned = teamMemberTotalRewards[gk][team][member.ID.String()] + individualEntity.TotalRewardsEarnedQuantum = teamMemberTotalRewards[gk][team][member.ID.String()] + memberEntities = append(memberEntities, &individualEntity) + participants++ + seqNum++ + } + // Rank the individual members of the team participating in the game + sort.Slice(memberEntities, func(i, j int) bool { + return memberEntities[i].TotalRewardsEarned.GT(memberEntities[j].TotalRewardsEarned) + }) + // now assign the individual member ranks + for i := range memberEntities { + memberEntities[i].Rank = uint64(i + 1) + } + teamEntity := entities.TeamGameEntity{ + Team: entities.TeamGameParticipation{ + TeamID: entities.TeamID(team), + MembersParticipating: memberEntities, + }, + Rank: 0, + Volume: teamVolume, + RewardMetric: vega.DispatchMetric_DISPATCH_METRIC_MAKER_FEES_PAID, + RewardEarned: teamRewards, + RewardEarnedQuantum: teamRewards, + } + if teamTotalRewards[gk][team] == nil { + if teamTotalRewards[pk] == nil || teamTotalRewards[pk][team] == nil { + teamTotalRewards[gk][team] = num.NewUint(0) + } else { + teamTotalRewards[gk][team] = teamTotalRewards[pk][team].Clone() + } + } + teamTotalRewards[gk][team] = teamTotalRewards[gk][team].Add(teamTotalRewards[gk][team], teamRewards) + teamEntity.TotalRewardsEarned = teamTotalRewards[gk][team] + teamEntity.TotalRewardsEarnedQuantum = teamTotalRewards[gk][team] + teamEntities = append(teamEntities, &teamEntity) + } + // now let's order the team totals and set the ranks for each team + teamRanking := rankEntity(teamTotalRewards[gk]) + for _, ge := range teamEntities { + te := ge.(*entities.TeamGameEntity) + memberRankings := rankEntity(teamMemberTotalRewards[gk][te.Team.TeamID.String()]) + te.Rank = teamRanking[te.Team.TeamID.String()] + for _, m := range te.Team.MembersParticipating { + m.Rank = memberRankings[m.Individual] + } + // now that the team members have been ranked, we need to order the team members by rank + sort.Slice(te.Team.MembersParticipating, func(i, j int) bool { + return te.Team.MembersParticipating[i].Rank < te.Team.MembersParticipating[j].Rank || (te.Team.MembersParticipating[i].Rank == te.Team.MembersParticipating[j].Rank && + te.Team.MembersParticipating[i].Individual < te.Team.MembersParticipating[j].Individual) + }) + } + + // now that we have the ranks for the teams ranked, we need to order the team entities by rank + sort.Slice(teamEntities, func(i, j int) bool { + return teamEntities[i].(*entities.TeamGameEntity).Rank < teamEntities[j].(*entities.TeamGameEntity).Rank || (teamEntities[i].(*entities.TeamGameEntity).Rank == teamEntities[j].(*entities.TeamGameEntity).Rank && + teamEntities[i].(*entities.TeamGameEntity).Team.TeamID.String() < teamEntities[j].(*entities.TeamGameEntity).Team.TeamID.String()) + }) + + gameEntity := gameEntities[gk] + gameEntity.Participants = participants + gameEntity.Entities = teamEntities + gameEntity.RewardAssetID = asset.ID + + gameEntities[gk] = gameEntity + } else { + if individualTotalRewards[gk] == nil { + individualTotalRewards[gk] = make(map[string]*num.Uint) + if individualTotalRewards[pk] != nil { + // carry forward the previous totals for the individuals + for k, v := range individualTotalRewards[pk] { + individualTotalRewards[gk][k] = v.Clone() + } + } + } + for i, individual := range individuals { + amount := num.DecimalFromInt64(r.Int63n(1000)) + reward := addTestReward(t, ctx, stores.rewards, individual, *asset, market, epoch, "", block.VegaTime, block, seqNum, amount, generateTxHash(), &gID) + rewards[gk] = append(rewards[gk], reward) + rewardEarned, _ := num.UintFromDecimal(amount) + individualEntity := entities.IndividualGameEntity{ + Individual: individual.ID.String(), + Rank: uint64(i + 1), + Volume: num.DecimalZero(), + RewardMetric: vega.DispatchMetric_DISPATCH_METRIC_MAKER_FEES_PAID, + RewardEarned: rewardEarned, + RewardEarnedQuantum: rewardEarned, + } + individualEntities = append(individualEntities, &individualEntity) + seqNum++ + participants++ + if _, ok := individualTotalRewards[gk][individual.ID.String()]; !ok { + individualTotalRewards[gk][individual.ID.String()] = num.NewUint(0) + } else { + // carry forward the previous totals + individualTotalRewards[gk][individual.ID.String()] = individualTotalRewards[pk][individual.ID.String()].Clone() + } + individualTotalRewards[gk][individual.ID.String()]. + Add(individualTotalRewards[gk][individual.ID.String()], individualEntity.RewardEarned) + individualEntity.TotalRewardsEarned = individualTotalRewards[gk][individual.ID.String()] + individualEntity.TotalRewardsEarnedQuantum = individualTotalRewards[gk][individual.ID.String()] + } + individualRanking := rankEntity(individualTotalRewards[gk]) + for _, ge := range individualEntities { + ie := ge.(*entities.IndividualGameEntity) + ie.Rank = individualRanking[ie.Individual] + } + sort.Slice(individualEntities, func(i, j int) bool { + return individualEntities[i].(*entities.IndividualGameEntity).Rank < individualEntities[j].(*entities.IndividualGameEntity).Rank || (individualEntities[i].(*entities.IndividualGameEntity).Rank == individualEntities[j].(*entities.IndividualGameEntity).Rank && + individualEntities[i].(*entities.IndividualGameEntity).Individual < individualEntities[j].(*entities.IndividualGameEntity).Individual) + }) + + gameEntity := gameEntities[gk] + gameEntity.Participants = participants + gameEntity.Entities = individualEntities + gameEntity.RewardAssetID = asset.ID + + gameEntities[gk] = gameEntity + } + } + } + + results := make([]entities.Game, 0, len(gameEntities)) + for _, game := range gameEntities { + results = append(results, game) + } + + return orderResults(results), gameIDs, rewards, teams +} + +func orderResults(results []entities.Game) []entities.Game { + sort.Slice(results, func(i, j int) bool { + return results[i].Epoch > results[j].Epoch || + (results[i].Epoch == results[j].Epoch && results[i].ID.String() < results[j].ID.String()) + }) + return results +} + +func filterForEpochs(start, end int64, gamesData []entities.Game) []entities.Game { + validEpochs := make([]int64, end-start+1) + for i := range validEpochs { + validEpochs[i] = start + int64(i) + } + filtered := make([]entities.Game, 0) + for _, game := range gamesData { + if slice.Contains(validEpochs, int64(game.Epoch)) { + filtered = append(filtered, game) + } + } + // ensure we are correctly ordered + return orderResults(filtered) +} + +func filterForGameID(gamesData []entities.Game, gameID string) []entities.Game { + filtered := make([]entities.Game, 0) + for _, game := range gamesData { + if game.ID.String() == gameID { + filtered = append(filtered, game) + } + } + return orderResults(filtered) +} + +func filterForEntityScope(gamesData []entities.Game, entityScope vega.EntityScope) []entities.Game { + filtered := make([]entities.Game, 0) + for _, game := range gamesData { + if len(game.Entities) == 0 { + continue + } + switch game.Entities[0].(type) { + case *entities.TeamGameEntity: + if entityScope == vega.EntityScope_ENTITY_SCOPE_TEAMS { + filtered = append(filtered, game) + } + case *entities.IndividualGameEntity: + if entityScope == vega.EntityScope_ENTITY_SCOPE_INDIVIDUALS { + filtered = append(filtered, game) + } + } + } + return orderResults(filtered) +} + +func getGameIDs(t *testing.T, count int) []string { + t.Helper() + ids := make([]string, count) + for i := 0; i < count; i++ { + ids[i] = GenerateID() + } + return ids +} + +func getTeams(t *testing.T, ctx context.Context, stores gameStores, block entities.Block, count int) map[string][]entities.Party { + t.Helper() + teams := make(map[string][]entities.Party) + for i := 0; i < count; i++ { + teamID := entities.TeamID(GenerateID()) + referrer := entities.PartyID(GenerateID()) + team := entities.Team{ + ID: teamID, + Referrer: referrer, + Name: "", + TeamURL: nil, + AvatarURL: nil, + Closed: false, + CreatedAt: block.VegaTime, + CreatedAtEpoch: 0, + VegaTime: block.VegaTime, + } + err := stores.teams.AddTeam(ctx, &team) + require.NoError(t, err) + + members := make([]entities.Party, count) + for j := 0; j < count; j++ { + members[j] = addTestParty(t, ctx, stores.parties, block) + referee := entities.TeamMember{ + TeamID: teamID, + PartyID: members[j].ID, + JoinedAt: block.VegaTime, + JoinedAtEpoch: 0, + VegaTime: block.VegaTime, + } + err := stores.teams.RefereeJoinedTeam(ctx, &referee) + require.NoError(t, err) + } + teams[teamID.String()] = members + } + return teams +} + +func getIndividuals(t *testing.T, ctx context.Context, stores gameStores, block entities.Block, count int) []entities.Party { + t.Helper() + individuals := make([]entities.Party, count) + for i := 0; i < count; i++ { + individuals[i] = addTestParty(t, ctx, stores.parties, block) + } + return individuals +} + +func rankEntity(entities map[string]*num.Uint) map[string]uint64 { + type entityRank struct { + ID string + Total *num.Uint + } + entityRanks := make([]entityRank, 0, len(entities)) + for k, v := range entities { + entityRanks = append(entityRanks, entityRank{ + ID: k, + Total: v, + }) + } + sort.Slice(entityRanks, func(i, j int) bool { + return entityRanks[i].Total.GT(entityRanks[j].Total) || (entityRanks[i].Total.EQ(entityRanks[j].Total) && entityRanks[i].ID < entityRanks[j].ID) + }) + // now that we have the totals ordered, we can assign ranks + ranks := make(map[string]uint64) + for i, e := range entityRanks { + if i > 0 && e.Total.EQ(entityRanks[i-1].Total) { + // if the totals are the same, they should have the same rank + ranks[e.ID] = ranks[entityRanks[i-1].ID] + continue + } + ranks[e.ID] = uint64(i + 1) + } + return ranks +} diff --git a/datanode/sqlstore/helpers/accounts.go b/datanode/sqlstore/helpers/accounts.go index 17372b3e3f..df7f74265f 100644 --- a/datanode/sqlstore/helpers/accounts.go +++ b/datanode/sqlstore/helpers/accounts.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + "github.com/stretchr/testify/require" ) diff --git a/datanode/sqlstore/helpers/helpers.go b/datanode/sqlstore/helpers/helpers.go index 6ebb00af02..f4b057c0be 100644 --- a/datanode/sqlstore/helpers/helpers.go +++ b/datanode/sqlstore/helpers/helpers.go @@ -16,7 +16,6 @@ package helpers import ( - "code.vegaprotocol.io/vega/datanode/entities" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" ) @@ -24,8 +23,3 @@ import ( func GenerateID() string { return vgcrypto.RandomHash() } - -func DefaultNoPagination() entities.CursorPagination { - pagination, _ := entities.NewCursorPagination(nil, nil, nil, nil, true) - return pagination -} diff --git a/datanode/sqlstore/helpers/markets.go b/datanode/sqlstore/helpers/markets.go index e121131cae..955cde6960 100644 --- a/datanode/sqlstore/helpers/markets.go +++ b/datanode/sqlstore/helpers/markets.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + "github.com/stretchr/testify/require" ) diff --git a/datanode/sqlstore/helpers_for_test.go b/datanode/sqlstore/helpers_for_test.go new file mode 100644 index 0000000000..1d8957c78d --- /dev/null +++ b/datanode/sqlstore/helpers_for_test.go @@ -0,0 +1,29 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package sqlstore_test + +import ( + "code.vegaprotocol.io/vega/datanode/entities" + vgcrypto "code.vegaprotocol.io/vega/libs/crypto" +) + +func GenerateID() string { + return vgcrypto.RandomHash() +} + +func generateTxHash() entities.TxHash { + return entities.TxHash(GenerateID()) +} diff --git a/datanode/sqlstore/key_rotations.go b/datanode/sqlstore/key_rotations.go index 3345e26d3b..29dc0fcf04 100644 --- a/datanode/sqlstore/key_rotations.go +++ b/datanode/sqlstore/key_rotations.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/key_rotations_test.go b/datanode/sqlstore/key_rotations_test.go index 685f02f282..d50d8a77a6 100644 --- a/datanode/sqlstore/key_rotations_test.go +++ b/datanode/sqlstore/key_rotations_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/datanode/sqlstore/ledger.go b/datanode/sqlstore/ledger.go index bdbe7929a2..eb4e2d5105 100644 --- a/datanode/sqlstore/ledger.go +++ b/datanode/sqlstore/ledger.go @@ -13,40 +13,26 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( "context" "fmt" "io" + "strings" "time" - "code.vegaprotocol.io/vega/libs/ptr" - - "github.com/georgysavva/scany/pgxscan" - "github.com/shopspring/decimal" - - "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + + "github.com/georgysavva/scany/pgxscan" ) var aggregateLedgerEntriesOrdering = TableOrdering{ - ColumnOrdering{Name: "ledger_entry_time", Sorting: ASC}, + ColumnOrdering{Name: "vega_time", Sorting: ASC}, } const ( @@ -146,8 +132,8 @@ func (ls *Ledger) validateDateRange(dateRange entities.DateRange) entities.DateR return dateRange } -// This query requests and sums number of the ledger entries of a given subset of accounts, specified via the 'filter' argument. -// It returns a timeseries (implemented as a list of AggregateLedgerEntry structs), with a row for every time +// Query requests and sums number of the ledger entries of a given subset of accounts, specified via the 'filter' argument. +// It returns a time-series (implemented as a list of AggregateLedgerEntry structs), with a row for every time // the summed ledger entries of the set of specified accounts changes. // Listed queries should be limited to a single party from each side only. If no or more than one parties are provided // for sending and receiving accounts - the query returns error. @@ -163,36 +149,69 @@ func (ls *Ledger) Query( dateRange entities.DateRange, pagination entities.CursorPagination, ) (*[]entities.AggregatedLedgerEntry, entities.PageInfo, error) { - var pageInfo entities.PageInfo + defer metrics.StartSQLQuery("Ledger", "Query")() - dynamicQuery, whereQuery, args, err := ls.prepareQuery(filter, ls.validateDateRange(dateRange)) - if err != nil { - return nil, pageInfo, err - } + var ( + pageInfo entities.PageInfo + entries []entities.AggregatedLedgerEntry + args []interface{} + whereClauses []string + ) - pageQuery, args, err := PaginateQuery[entities.AggregatedLedgerEntriesCursor]( - whereQuery, args, aggregateLedgerEntriesOrdering, pagination) - if err != nil { - return nil, pageInfo, err + dateRange = ls.validateDateRange(dateRange) + + // If filtering by the transfer id, we skip any other filters. + if filter.TransferID != "" { + transfersDBQuery := transfersFilterToDBQuery(filter.TransferID, &args) + whereClauses = []string{transfersDBQuery} + } else { + if err := filterLedgerEntriesQuery(filter, &args, &whereClauses); err != nil { + return nil, pageInfo, fmt.Errorf("invalid filters: %w", err) + } + + if dateRange.Start != nil { + whereClauses = append(whereClauses, fmt.Sprintf("ledger.ledger_entry_time >= %s", nextBindVar(&args, dateRange.Start.Format(time.RFC3339)))) + } + + if dateRange.End != nil { + whereClauses = append(whereClauses, fmt.Sprintf("ledger.ledger_entry_time < %s", nextBindVar(&args, dateRange.End.Format(time.RFC3339)))) + } } - query := fmt.Sprintf("%s %s", dynamicQuery, pageQuery) + query := fmt.Sprintf(`SELECT + ledger.quantity AS quantity, + ledger.type AS transfer_type, + ledger.account_from_balance AS from_account_balance, + ledger.account_to_balance AS to_account_balance, + account_from.asset_id AS asset_id, + account_from.party_id AS from_account_party_id, + account_from.market_id AS from_account_market_id, + account_from.type AS from_account_type, + account_to.party_id AS to_account_party_id, + account_to.market_id AS to_account_market_id, + account_to.type AS to_account_type, + ledger.ledger_entry_time AS vega_time, + ledger.transfer_id AS transfer_id + FROM ledger + INNER JOIN accounts AS account_from + ON ledger.account_from_id=account_from.id + INNER JOIN accounts AS account_to + ON ledger.account_to_id=account_to.id + WHERE %s`, strings.Join(whereClauses, " AND "), + ) - defer metrics.StartSQLQuery("Ledger", "Query")() - rows, err := ls.Connection.Query(ctx, query, args...) + query, args, err := PaginateQuery[entities.AggregatedLedgerEntriesCursor](query, args, aggregateLedgerEntriesOrdering, pagination) if err != nil { - return nil, pageInfo, fmt.Errorf("querying ledger entries: %w", err) + return nil, pageInfo, err } - defer rows.Close() - var results []ledgerEntriesScanned - if err = pgxscan.ScanAll(&results, rows); err != nil { - return nil, pageInfo, fmt.Errorf("scanning ledger entries: %w", err) + if err := pgxscan.Select(ctx, ls.Connection, &entries, query, args...); err != nil { + return nil, pageInfo, err } - ledgerEntries := parseScanned(results) - res, pageInfo := entities.PageEntities[*v2.AggregatedLedgerEntriesEdge](ledgerEntries, pagination) - return &res, pageInfo, nil + entries, pageInfo = entities.PageEntities[*v2.AggregatedLedgerEntriesEdge](entries, pagination) + + return &entries, pageInfo, nil } func (ls *Ledger) Export( @@ -223,11 +242,11 @@ func (ls *Ledger) Export( ELSE 0 END AS effect, l.type AS transfer_type, - encode(fa.asset_id, 'hex') AS asset_id, - encode(fa.market_id, 'hex') AS account_from_market_id, + ENCODE(fa.asset_id, 'hex') AS asset_id, + ENCODE(fa.market_id, 'hex') AS account_from_market_id, CASE WHEN fa.party_id='\x03' THEN 'network' - ELSE encode(fa.party_id, 'hex') + ELSE ENCODE(fa.party_id, 'hex') END AS account_from_party_id, CASE WHEN fa.type=0 THEN 'UNSPECIFIED' @@ -258,12 +277,13 @@ func (ls *Ledger) Export( WHEN fa.type=26 THEN 'REWARD_RETURN_VOLATILITY' WHEN fa.type=27 THEN 'REWARD_VALIDATOR_RANKING' WHEN fa.type=28 THEN 'PENDING_FEE_REFERRAL_REWARD' + WHEN fa.type=29 THEN 'ORDER_MARGIN' ELSE 'UNKNOWN' END AS account_from_account_type, l.account_from_balance AS account_from_balance, - encode(ta.market_id, 'hex') AS account_to_market_id, + ENCODE(ta.market_id, 'hex') AS account_to_market_id, CASE WHEN ta.party_id='\x03' THEN 'network' - ELSE encode(ta.party_id, 'hex') + ELSE ENCODE(ta.party_id, 'hex') END AS account_to_party_id, CASE WHEN ta.type=0 THEN 'UNSPECIFIED' @@ -284,16 +304,17 @@ func (ls *Ledger) Export( WHEN ta.type=16 THEN 'REWARD_LP_RECEIVED_FEES' WHEN ta.type=17 THEN 'REWARD_MARKET_PROPOSERS' WHEN ta.type=18 THEN 'HOLDING' - WHEN fa.type=19 THEN 'LP_LIQUIDITY_FEES' - WHEN fa.type=20 THEN 'LIQUIDITY_FEES_BONUS_DISTRIBUTION' - WHEN fa.type=21 THEN 'NETWORK_TREASURY' - WHEN fa.type=22 THEN 'VESTING_REWARDS' - WHEN fa.type=23 THEN 'VESTED_REWARDS' - WHEN fa.type=24 THEN 'REWARD_AVERAGE_POSITION' - WHEN fa.type=25 THEN 'REWARD_RELATIVE_RETURN' - WHEN fa.type=26 THEN 'REWARD_RETURN_VOLATILITY' - WHEN fa.type=27 THEN 'REWARD_VALIDATOR_RANKING' - WHEN fa.type=28 THEN 'PENDING_FEE_REFERRAL_REWARD' + WHEN ta.type=19 THEN 'LP_LIQUIDITY_FEES' + WHEN ta.type=20 THEN 'LIQUIDITY_FEES_BONUS_DISTRIBUTION' + WHEN ta.type=21 THEN 'NETWORK_TREASURY' + WHEN ta.type=22 THEN 'VESTING_REWARDS' + WHEN ta.type=23 THEN 'VESTED_REWARDS' + WHEN ta.type=24 THEN 'REWARD_AVERAGE_POSITION' + WHEN ta.type=25 THEN 'REWARD_RELATIVE_RETURN' + WHEN ta.type=26 THEN 'REWARD_RETURN_VOLATILITY' + WHEN ta.type=27 THEN 'REWARD_VALIDATOR_RANKING' + WHEN ta.type=28 THEN 'PENDING_FEE_REFERRAL_REWARD' + WHEN ta.type=29 THEN 'ORDER_MARGIN' ELSE 'UNKNOWN' END AS account_to_account_type, l.account_to_balance AS account_to_balance FROM @@ -331,163 +352,3 @@ func (ls *Ledger) Export( ls.log.Debug("copy to CSV", logging.Int64("rows affected", tag.RowsAffected())) return nil } - -func (*Ledger) prepareQuery(filter *entities.LedgerEntryFilter, dateRange entities.DateRange) (string, string, []any, error) { - filterQueries, args, err := filterLedgerEntriesQuery(filter) - if err != nil { - return "", "", nil, fmt.Errorf("filtering ledger entries: %w", err) - } - - whereDate := "" - if dateRange.Start != nil { - whereDate = fmt.Sprintf("WHERE ledger_entry_time >= %s", nextBindVar(&args, dateRange.Start.Format(time.RFC3339))) - } - - if dateRange.End != nil { - if whereDate != "" { - whereDate = fmt.Sprintf("%s AND", whereDate) - } else { - whereDate = "WHERE " - } - whereDate = fmt.Sprintf("%s ledger_entry_time < %s", whereDate, nextBindVar(&args, dateRange.End.Format(time.RFC3339))) - } - - dynamicQuery := createDynamicQuery(filterQueries, filter.CloseOnAccountFilters) - - whereQuery := fmt.Sprintf(`SELECT - vega_time, quantity, transfer_type, asset_id, - account_from_market_id, account_from_party_id, account_from_account_type, - account_to_market_id, account_to_party_id, account_to_account_type, - account_from_balance, account_to_balance - FROM entries - %s`, whereDate) - return dynamicQuery, whereQuery, args, nil -} - -// ledgerEntriesScanned is a local type used as a mediator between pgxscan scanner -// and the AggregatedLedgerEntries types. -// Needed to manually transfer to needed data types that are not accepted by the scanner. -type ledgerEntriesScanned struct { - VegaTime time.Time - Quantity decimal.Decimal - TransferType entities.LedgerMovementType - AssetID entities.AssetID - - AccountFromPartyID entities.PartyID - AccountToPartyID entities.PartyID - AccountFromAccountType types.AccountType - AccountToAccountType types.AccountType - - AccountFromMarketID entities.MarketID - AccountToMarketID entities.MarketID - AccountFromBalance decimal.Decimal - AccountToBalance decimal.Decimal -} - -func parseScanned(scanned []ledgerEntriesScanned) []entities.AggregatedLedgerEntry { - ledgerEntries := []entities.AggregatedLedgerEntry{} - if len(scanned) > 0 { - for i := range scanned { - ledgerEntries = append(ledgerEntries, entities.AggregatedLedgerEntry{ - VegaTime: scanned[i].VegaTime, - Quantity: scanned[i].Quantity, - AssetID: &scanned[i].AssetID, - FromAccountPartyID: &scanned[i].AccountFromPartyID, - ToAccountPartyID: &scanned[i].AccountToPartyID, - FromAccountType: &scanned[i].AccountFromAccountType, - ToAccountType: &scanned[i].AccountToAccountType, - FromAccountMarketID: &scanned[i].AccountFromMarketID, - ToAccountMarketID: &scanned[i].AccountToMarketID, - FromAccountBalance: scanned[i].AccountFromBalance, - ToAccountBalance: scanned[i].AccountToBalance, - }) - - tt := scanned[i].TransferType - ledgerEntries[i].TransferType = &tt - } - } - - return ledgerEntries -} - -// createDynamicQuery creates a dynamic query depending on the query cases: -// - lising all ledger entries without filtering -// - listing ledger entries with filtering on the sending account -// - listing ledger entries with filtering on the receiving account -// - listing ledger entries with filtering on the sending AND receiving account -// - listing ledger entries with filtering on the transfer type (on top of above filters or as a standalone option) -func createDynamicQuery(filterQueries [3]string, closeOnAccountFilters entities.CloseOnLimitOperation) string { - whereClause := "" - - tableNameFromAccountQuery := "ledger_entries_from_account_filter" - query := ` - %s AS ( - SELECT - ledger.vega_time AS vega_time, ledger.quantity, ledger.type AS transfer_type, - ledger.account_from_id, ledger.account_to_id, - ledger.account_from_balance, ledger.account_to_balance, - account_from.asset_id AS asset_id, - account_from.party_id AS account_from_party_id, - account_from.market_id AS account_from_market_id, - account_from.type AS account_from_account_type, - account_to.party_id AS account_to_party_id, - account_to.market_id AS account_to_market_id, - account_to.type AS account_to_account_type, - ledger.ledger_entry_time - FROM ledger - INNER JOIN accounts AS account_from - ON ledger.account_from_id=account_from.id - INNER JOIN accounts AS account_to - ON ledger.account_to_id=account_to.id), - - entries AS ( - SELECT vega_time, quantity, transfer_type, asset_id, - account_from_market_id, account_from_party_id, account_from_account_type, - account_to_market_id, account_to_party_id, account_to_account_type, - account_from_balance, account_to_balance, ledger_entry_time - FROM %s - %s - ) - ` - - tableNameToAccountQuery := "ledger_entries_to_account_filter" - tableNameCloseOnFilterQuery := "ledger_entries_closed_on_account_filters" - tableNameOpenOnFilterQuery := "ledger_entries_open_on_account_filters" - tableNameTransferType := "ledger_entries_transfer_type_filter" - - tableName := "" - - if filterQueries[0] != "" { - tableName = tableNameFromAccountQuery - whereClause = fmt.Sprintf("WHERE %s", filterQueries[0]) - - if filterQueries[1] != "" { - if closeOnAccountFilters { - tableName = tableNameCloseOnFilterQuery - whereClause = fmt.Sprintf("WHERE (%s) AND (%s)", filterQueries[0], filterQueries[1]) - } else { - tableName = tableNameOpenOnFilterQuery - whereClause = fmt.Sprintf("WHERE ((%s) OR (%s))", filterQueries[0], filterQueries[1]) - } - } - } else { - if filterQueries[1] != "" { - tableName = tableNameToAccountQuery - whereClause = fmt.Sprintf("WHERE %s", filterQueries[1]) - } - } - - if filterQueries[2] != "" { - tableName = tableNameTransferType - if whereClause != "" { - whereClause = fmt.Sprintf("%s AND (%s)", whereClause, filterQueries[2]) - } else { - whereClause = fmt.Sprintf("WHERE %s", filterQueries[2]) - } - } - - query = fmt.Sprintf(query, tableName, tableName, whereClause) - query = fmt.Sprintf(`WITH %s`, query) - - return query -} diff --git a/datanode/sqlstore/ledger_test.go b/datanode/sqlstore/ledger_test.go index d6bdf3bdf7..92557fec72 100644 --- a/datanode/sqlstore/ledger_test.go +++ b/datanode/sqlstore/ledger_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -36,7 +24,9 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -63,8 +53,15 @@ func addTestLedgerEntry(t *testing.T, ledger *sqlstore.Ledger, transferType entities.LedgerMovementType, fromAccountBalance, toAccountBalance int64, txHash entities.TxHash, + transferID *string, ) entities.LedgerEntry { t.Helper() + + var tID entities.TransferID + if transferID != nil { + tID = entities.TransferID(*transferID) + } + ledgerEntry := entities.LedgerEntry{ FromAccountID: fromAccount.ID, ToAccountID: toAccount.ID, @@ -75,6 +72,7 @@ func addTestLedgerEntry(t *testing.T, ledger *sqlstore.Ledger, FromAccountBalance: decimal.NewFromInt(fromAccountBalance), ToAccountBalance: decimal.NewFromInt(toAccountBalance), TxHash: txHash, + TransferID: tID, } err := ledger.Add(ledgerEntry) @@ -220,20 +218,20 @@ func TestLedger(t *testing.T) { */ var ledgerEntries []entities.LedgerEntry - ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[0], accounts[1], blocks[1], int64(15), entities.LedgerMovementTypeBondSlashing, int64(500), int64(115), txHashFromString("ledger_entry_1"))) - ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[2], accounts[3], blocks[2], int64(10), entities.LedgerMovementTypeBondSlashing, int64(170), int64(17890), txHashFromString("ledger_entry_2"))) - ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[4], accounts[5], blocks[3], int64(25), entities.LedgerMovementTypeBondSlashing, int64(1700), int64(2590), txHashFromString("ledger_entry_3"))) - ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[6], accounts[7], blocks[4], int64(80), entities.LedgerMovementTypeBondSlashing, int64(2310), int64(17000), txHashFromString("ledger_entry_4"))) - ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[8], accounts[9], blocks[5], int64(1), entities.LedgerMovementTypeDeposit, int64(120), int64(900), txHashFromString("ledger_entry_5"))) - ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[10], accounts[11], blocks[6], int64(40), entities.LedgerMovementTypeDeposit, int64(1500), int64(5680), txHashFromString("ledger_entry_6"))) - ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[14], accounts[16], blocks[7], int64(12), entities.LedgerMovementTypeDeposit, int64(5000), int64(9100), txHashFromString("ledger_entry_7"))) - ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[17], accounts[15], blocks[8], int64(14), entities.LedgerMovementTypeDeposit, int64(180), int64(1410), txHashFromString("ledger_entry_8"))) - ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[21], accounts[15], blocks[9], int64(28), entities.LedgerMovementTypeDeposit, int64(2180), int64(1438), txHashFromString("ledger_entry_9"))) - ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[5], accounts[11], blocks[10], int64(3), entities.LedgerMovementTypeRewardPayout, int64(2587), int64(5683), txHashFromString("ledger_entry_10"))) - ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[5], accounts[10], blocks[11], int64(5), entities.LedgerMovementTypeRewardPayout, int64(2582), int64(1510), txHashFromString("ledger_entry_11"))) - ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[6], accounts[7], blocks[12], int64(9), entities.LedgerMovementTypeRewardPayout, int64(2301), int64(17009), txHashFromString("ledger_entry_12"))) - ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[6], accounts[7], blocks[13], int64(41), entities.LedgerMovementTypeRewardPayout, int64(2260), int64(17050), txHashFromString("ledger_entry_13"))) - _ = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[4], accounts[11], blocks[13], int64(72), entities.LedgerMovementTypeRewardPayout, int64(2188), int64(17122), txHashFromString("ledger_entry_14"))) + ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[0], accounts[1], blocks[1], int64(15), entities.LedgerMovementTypeBondSlashing, int64(500), int64(115), txHashFromString("ledger_entry_1"), ptr.From("deadbeef01"))) + ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[2], accounts[3], blocks[2], int64(10), entities.LedgerMovementTypeBondSlashing, int64(170), int64(17890), txHashFromString("ledger_entry_2"), nil)) + ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[4], accounts[5], blocks[3], int64(25), entities.LedgerMovementTypeBondSlashing, int64(1700), int64(2590), txHashFromString("ledger_entry_3"), nil)) + ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[6], accounts[7], blocks[4], int64(80), entities.LedgerMovementTypeBondSlashing, int64(2310), int64(17000), txHashFromString("ledger_entry_4"), nil)) + ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[8], accounts[9], blocks[5], int64(1), entities.LedgerMovementTypeDeposit, int64(120), int64(900), txHashFromString("ledger_entry_5"), nil)) + ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[10], accounts[11], blocks[6], int64(40), entities.LedgerMovementTypeDeposit, int64(1500), int64(5680), txHashFromString("ledger_entry_6"), nil)) + ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[14], accounts[16], blocks[7], int64(12), entities.LedgerMovementTypeDeposit, int64(5000), int64(9100), txHashFromString("ledger_entry_7"), nil)) + ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[17], accounts[15], blocks[8], int64(14), entities.LedgerMovementTypeDeposit, int64(180), int64(1410), txHashFromString("ledger_entry_8"), nil)) + ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[21], accounts[15], blocks[9], int64(28), entities.LedgerMovementTypeDeposit, int64(2180), int64(1438), txHashFromString("ledger_entry_9"), nil)) + ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[5], accounts[11], blocks[10], int64(3), entities.LedgerMovementTypeRewardPayout, int64(2587), int64(5683), txHashFromString("ledger_entry_10"), nil)) + ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[5], accounts[10], blocks[11], int64(5), entities.LedgerMovementTypeRewardPayout, int64(2582), int64(1510), txHashFromString("ledger_entry_11"), nil)) + ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[6], accounts[7], blocks[12], int64(9), entities.LedgerMovementTypeRewardPayout, int64(2301), int64(17009), txHashFromString("ledger_entry_12"), nil)) + ledgerEntries = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[6], accounts[7], blocks[13], int64(41), entities.LedgerMovementTypeRewardPayout, int64(2260), int64(17050), txHashFromString("ledger_entry_13"), nil)) + _ = append(ledgerEntries, addTestLedgerEntry(t, ledgerStore, accounts[4], accounts[11], blocks[13], int64(72), entities.LedgerMovementTypeRewardPayout, int64(2188), int64(17122), txHashFromString("ledger_entry_14"), nil)) tStart := time.Now().Add(-5 * 24 * time.Hour) tEnd := time.Now() @@ -241,20 +239,20 @@ func TestLedger(t *testing.T) { t.Run("get all ledger records", func(t *testing.T) { // Account store should be empty to begin with ledgerEntries, err := ledgerStore.GetAll(ctx) - assert.NoError(t, err) + require.NoError(t, err) assert.Empty(t, ledgerEntries) }) _, err := ledgerStore.Flush(ctx) - assert.NoError(t, err) + require.NoError(t, err) t.Run("get by tx hash", func(t *testing.T) { fetchedEntries, err := ledgerStore.GetByTxHash(ctx, ledgerEntries[0].TxHash) - assert.NoError(t, err) + require.NoError(t, err) ledgerEntryEqual(t, ledgerEntries[0], fetchedEntries[0]) fetchedEntries2, err := ledgerStore.GetByTxHash(ctx, ledgerEntries[2].TxHash) - assert.NoError(t, err) + require.NoError(t, err) ledgerEntryEqual(t, ledgerEntries[2], fetchedEntries2[0]) }) @@ -279,7 +277,7 @@ func TestLedger(t *testing.T) { t.Run("query ledger entries with filters", func(t *testing.T) { t.Run("by fromAccount filter", func(t *testing.T) { - // Set filters for FromAccount and AcountTo IDs + // Set filters for FromAccount and AccountTo IDs filter := &entities.LedgerEntryFilter{ FromAccountFilter: entities.AccountFilter{ AssetID: asset1.ID, @@ -305,7 +303,7 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // Output entries for accounts positions: // 0 assert.NotNil(t, entries) @@ -318,35 +316,35 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // Output entries for accounts positions: // 6->7, 6->7, 6->7 assert.NotNil(t, entries) assert.Equal(t, 3, len(*entries)) for _, e := range *entries { - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) if e.Quantity.Abs().String() == strconv.Itoa(80) { - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeBondSlashing) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeBondSlashing) assert.Equal(t, strconv.Itoa(2310), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17000), e.ToAccountBalance.Abs().String()) } if e.Quantity.Abs().String() == strconv.Itoa(9) { - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) assert.Equal(t, strconv.Itoa(2301), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17009), e.ToAccountBalance.Abs().String()) } if e.Quantity.Abs().String() == strconv.Itoa(41) { - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) assert.Equal(t, strconv.Itoa(2260), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17050), e.ToAccountBalance.Abs().String()) } - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[4].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[4].ID) } filter.FromAccountFilter.PartyIDs = append(filter.FromAccountFilter.PartyIDs, parties[4].ID) @@ -393,34 +391,94 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // Output entries for accounts positions: // 6->7, 6->7, 6->7 assert.NotNil(t, entries) assert.Equal(t, 3, len(*entries)) for _, e := range *entries { - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) if e.Quantity.Abs().String() == strconv.Itoa(80) { - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeBondSlashing) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeBondSlashing) assert.Equal(t, strconv.Itoa(2310), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17000), e.ToAccountBalance.Abs().String()) } if e.Quantity.Abs().String() == strconv.Itoa(9) { - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) assert.Equal(t, strconv.Itoa(2301), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17009), e.ToAccountBalance.Abs().String()) } if e.Quantity.Abs().String() == strconv.Itoa(41) { - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) assert.Equal(t, strconv.Itoa(2260), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17050), e.ToAccountBalance.Abs().String()) } - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[4].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[4].ID) + } + + filter.ToAccountFilter.AccountTypes = []vega.AccountType{vega.AccountType_ACCOUNT_TYPE_GENERAL, vega.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY} + + entries, _, err = ledgerStore.Query(ctx, + filter, + entities.DateRange{Start: &tStart, End: &tEnd}, + entities.CursorPagination{}, + ) + + require.NoError(t, err) + // Output entries for accounts positions: + // None + assert.NotNil(t, entries) + assert.Equal(t, 0, len(*entries)) + }) + + t.Run("by toAccount filter with cursor", func(t *testing.T) { + // Set filters for FromAccount and AcountTo IDs + filter := &entities.LedgerEntryFilter{ + FromAccountFilter: entities.AccountFilter{}, + ToAccountFilter: entities.AccountFilter{ + AssetID: asset2.ID, + PartyIDs: []entities.PartyID{parties[3].ID}, + }, + } + + first := int32(2) + + cursor, err := entities.NewCursorPagination(&first, nil, nil, nil, false) + require.NoError(t, err) + + entries, _, err := ledgerStore.Query(ctx, + filter, + entities.DateRange{Start: &tStart, End: &tEnd}, + cursor, + ) + + require.NoError(t, err) + // Output entries for accounts positions: + // 6->7, 6->7, 6->7 + assert.NotNil(t, entries) + assert.Equal(t, 2, len(*entries)) + for _, e := range *entries { + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + if e.Quantity.Abs().String() == strconv.Itoa(80) { + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeBondSlashing) + assert.Equal(t, strconv.Itoa(2310), e.FromAccountBalance.Abs().String()) + assert.Equal(t, strconv.Itoa(17000), e.ToAccountBalance.Abs().String()) + } + + if e.Quantity.Abs().String() == strconv.Itoa(9) { + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, strconv.Itoa(2301), e.FromAccountBalance.Abs().String()) + assert.Equal(t, strconv.Itoa(17009), e.ToAccountBalance.Abs().String()) + } + + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[4].ID) } filter.ToAccountFilter.AccountTypes = []vega.AccountType{vega.AccountType_ACCOUNT_TYPE_GENERAL, vega.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY} @@ -431,7 +489,7 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // Output entries for accounts positions: // None assert.NotNil(t, entries) @@ -468,30 +526,30 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // Output entries for accounts positions: // 0->1, 2->3 assert.NotNil(t, entries) assert.Equal(t, 2, len(*entries)) for _, e := range *entries { - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeBondSlashing) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeBondSlashing) if e.Quantity.Abs().String() == strconv.Itoa(15) { - assert.Equal(t, *e.FromAccountPartyID, parties[0].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[0].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[0].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[1].ID) + assert.Equal(t, e.FromAccountPartyID, parties[0].ID) + assert.Equal(t, e.ToAccountPartyID, parties[0].ID) + assert.Equal(t, e.FromAccountMarketID, markets[0].ID) + assert.Equal(t, e.ToAccountMarketID, markets[1].ID) assert.Equal(t, strconv.Itoa(500), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(115), e.ToAccountBalance.Abs().String()) } if e.Quantity.Abs().String() == strconv.Itoa(10) { - assert.Equal(t, *e.FromAccountPartyID, parties[1].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[1].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[1].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[2].ID) + assert.Equal(t, e.FromAccountPartyID, parties[1].ID) + assert.Equal(t, e.ToAccountPartyID, parties[1].ID) + assert.Equal(t, e.FromAccountMarketID, markets[1].ID) + assert.Equal(t, e.ToAccountMarketID, markets[2].ID) assert.Equal(t, strconv.Itoa(170), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17890), e.ToAccountBalance.Abs().String()) } @@ -504,30 +562,30 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // Output entries for accounts positions: // 0->1, 2->3 assert.NotNil(t, entries) assert.Equal(t, 2, len(*entries)) for _, e := range *entries { - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeBondSlashing) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeBondSlashing) if e.Quantity.Abs().String() == strconv.Itoa(15) { - assert.Equal(t, *e.FromAccountPartyID, parties[0].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[0].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[0].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[1].ID) + assert.Equal(t, e.FromAccountPartyID, parties[0].ID) + assert.Equal(t, e.ToAccountPartyID, parties[0].ID) + assert.Equal(t, e.FromAccountMarketID, markets[0].ID) + assert.Equal(t, e.ToAccountMarketID, markets[1].ID) assert.Equal(t, strconv.Itoa(500), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(115), e.ToAccountBalance.Abs().String()) } if e.Quantity.Abs().String() == strconv.Itoa(10) { - assert.Equal(t, *e.FromAccountPartyID, parties[1].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[1].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[1].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[2].ID) + assert.Equal(t, e.FromAccountPartyID, parties[1].ID) + assert.Equal(t, e.ToAccountPartyID, parties[1].ID) + assert.Equal(t, e.FromAccountMarketID, markets[1].ID) + assert.Equal(t, e.ToAccountMarketID, markets[2].ID) assert.Equal(t, strconv.Itoa(170), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17890), e.ToAccountBalance.Abs().String()) } @@ -562,21 +620,21 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // Output entries for accounts positions -> should output transfers for asset2 only: // 10->11 assert.NotNil(t, entries) assert.Equal(t, 1, len(*entries)) for _, e := range *entries { assert.Equal(t, e.Quantity.Abs().String(), strconv.Itoa(40)) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeDeposit) - - assert.Equal(t, *e.FromAccountPartyID, parties[5].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[5].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[6].ID) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeDeposit) + + assert.Equal(t, e.FromAccountPartyID, parties[5].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountMarketID, markets[5].ID) + assert.Equal(t, e.ToAccountMarketID, markets[6].ID) assert.Equal(t, strconv.Itoa(1500), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(5680), e.ToAccountBalance.Abs().String()) } @@ -589,7 +647,7 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // Output entries for accounts positions: // None assert.NotNil(t, entries) @@ -604,21 +662,21 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // Output entries for accounts positions: // 14->16 assert.NotNil(t, entries) assert.Equal(t, 1, len(*entries)) for _, e := range *entries { assert.Equal(t, e.Quantity.Abs().String(), strconv.Itoa(12)) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeDeposit) - - assert.Equal(t, *e.FromAccountPartyID, parties[7].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[8].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[7].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[8].ID) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeDeposit) + + assert.Equal(t, e.FromAccountPartyID, parties[7].ID) + assert.Equal(t, e.ToAccountPartyID, parties[8].ID) + assert.Equal(t, e.FromAccountMarketID, markets[7].ID) + assert.Equal(t, e.ToAccountMarketID, markets[8].ID) assert.Equal(t, strconv.Itoa(5000), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(9100), e.ToAccountBalance.Abs().String()) } @@ -647,45 +705,45 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // Output entries for accounts positions -> should output transfers for asset3 only: // 14->16, 17->15, 21->15 assert.NotNil(t, entries) assert.Equal(t, 3, len(*entries)) for _, e := range *entries { if e.Quantity.Abs().String() == strconv.Itoa(12) { - assert.Equal(t, *e.FromAccountPartyID, parties[7].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[8].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[7].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[8].ID) + assert.Equal(t, e.FromAccountPartyID, parties[7].ID) + assert.Equal(t, e.ToAccountPartyID, parties[8].ID) + assert.Equal(t, e.FromAccountMarketID, markets[7].ID) + assert.Equal(t, e.ToAccountMarketID, markets[8].ID) assert.Equal(t, strconv.Itoa(5000), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(9100), e.ToAccountBalance.Abs().String()) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY) } if e.Quantity.Abs().String() == strconv.Itoa(14) { - assert.Equal(t, *e.FromAccountPartyID, parties[8].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[7].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[9].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[8].ID) + assert.Equal(t, e.FromAccountPartyID, parties[8].ID) + assert.Equal(t, e.ToAccountPartyID, parties[7].ID) + assert.Equal(t, e.FromAccountMarketID, markets[9].ID) + assert.Equal(t, e.ToAccountMarketID, markets[8].ID) assert.Equal(t, strconv.Itoa(180), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(1410), e.ToAccountBalance.Abs().String()) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY) } if e.Quantity.Abs().String() == strconv.Itoa(28) { - assert.Equal(t, *e.FromAccountPartyID, parties[10].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[7].ID) + assert.Equal(t, e.FromAccountPartyID, parties[10].ID) + assert.Equal(t, e.ToAccountPartyID, parties[7].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[9].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[8].ID) + assert.Equal(t, e.FromAccountMarketID, markets[9].ID) + assert.Equal(t, e.ToAccountMarketID, markets[8].ID) assert.Equal(t, strconv.Itoa(2180), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(1438), e.ToAccountBalance.Abs().String()) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) } - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeDeposit) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_FEES_LIQUIDITY) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeDeposit) } // closed on account filters @@ -696,7 +754,7 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // Output entries for accounts positions: // None assert.NotNil(t, entries) @@ -713,13 +771,41 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // Output entries for accounts positions: // 0 assert.NotNil(t, entries) assert.Equal(t, 0, len(*entries)) }) + t.Run("by transferType only", func(t *testing.T) { + // open on account filters + // Set filters for FromAccount and AcountTo IDs + filter := &entities.LedgerEntryFilter{ + TransferTypes: []entities.LedgerMovementType{ + entities.LedgerMovementTypeDeposit, + }, + } + + _, _, err := ledgerStore.Query(ctx, + filter, + entities.DateRange{Start: &tStart, End: &tEnd}, + entities.CursorPagination{}, + ) + + assert.Error(t, err) + + // closed on account filters + filter.CloseOnAccountFilters = true + _, _, err = ledgerStore.Query(ctx, + filter, + entities.DateRange{Start: &tStart, End: &tEnd}, + entities.CursorPagination{}, + ) + + assert.Error(t, err) + }) + t.Run("test open/closing with different account and transfer types", func(t *testing.T) { filter := &entities.LedgerEntryFilter{ FromAccountFilter: entities.AccountFilter{ @@ -739,42 +825,42 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // 4->5, 5->10, 5->11, 4->11 assert.NotNil(t, entries) assert.Equal(t, 3, len(*entries)) for _, e := range *entries { if e.Quantity.Abs().String() == strconv.Itoa(3) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[6].ID) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[6].ID) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } if e.Quantity.Abs().String() == strconv.Itoa(5) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[5].ID) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[5].ID) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } if e.Quantity.Abs().String() == strconv.Itoa(72) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[2].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[6].ID) + assert.Equal(t, e.FromAccountMarketID, markets[2].ID) + assert.Equal(t, e.ToAccountMarketID, markets[6].ID) assert.Equal(t, strconv.Itoa(2188), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17122), e.ToAccountBalance.Abs().String()) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } } @@ -785,45 +871,45 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // Output entries for accounts positions -> should output transfers for asset3 only: // 5->10, 5->11, 4->11 assert.NotNil(t, entries) assert.Equal(t, 3, len(*entries)) for _, e := range *entries { if e.Quantity.Abs().String() == strconv.Itoa(3) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[6].ID) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[6].ID) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } if e.Quantity.Abs().String() == strconv.Itoa(5) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[5].ID) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[5].ID) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } if e.Quantity.Abs().String() == strconv.Itoa(72) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[2].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[6].ID) + assert.Equal(t, e.FromAccountMarketID, markets[2].ID) + assert.Equal(t, e.ToAccountMarketID, markets[6].ID) assert.Equal(t, strconv.Itoa(2188), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17122), e.ToAccountBalance.Abs().String()) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } filter = &entities.LedgerEntryFilter{ @@ -844,42 +930,42 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // 4->5, 5->10, 5->11, 4->11 assert.NotNil(t, entries) assert.Equal(t, 3, len(*entries)) for _, e := range *entries { if e.Quantity.Abs().String() == strconv.Itoa(3) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[6].ID) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[6].ID) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } if e.Quantity.Abs().String() == strconv.Itoa(5) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[5].ID) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[5].ID) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } if e.Quantity.Abs().String() == strconv.Itoa(72) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[2].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[6].ID) + assert.Equal(t, e.FromAccountMarketID, markets[2].ID) + assert.Equal(t, e.ToAccountMarketID, markets[6].ID) assert.Equal(t, strconv.Itoa(2188), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17122), e.ToAccountBalance.Abs().String()) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } } @@ -902,7 +988,7 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, entries) assert.Equal(t, 0, len(*entries)) @@ -925,7 +1011,7 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // List transfers: // accounts 5->11 - 3 - ACCOUNT_TYPE_INSURANCE ACCOUNT_TYPE_GENERAL // accounts 5->10 - 5 - ACCOUNT_TYPE_INSURANCE ACCOUNT_TYPE_GENERAL @@ -935,53 +1021,53 @@ func TestLedger(t *testing.T) { assert.Equal(t, 4, len(*entries)) for _, e := range *entries { if e.Quantity.Abs().String() == strconv.Itoa(3) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[6].ID) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[6].ID) assert.Equal(t, strconv.Itoa(2587), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(5683), e.ToAccountBalance.Abs().String()) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } if e.Quantity.Abs().String() == strconv.Itoa(5) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[5].ID) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[5].ID) assert.Equal(t, strconv.Itoa(2582), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(1510), e.ToAccountBalance.Abs().String()) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } if e.Quantity.Abs().String() == strconv.Itoa(72) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[2].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[6].ID) + assert.Equal(t, e.FromAccountMarketID, markets[2].ID) + assert.Equal(t, e.ToAccountMarketID, markets[6].ID) assert.Equal(t, strconv.Itoa(2188), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17122), e.ToAccountBalance.Abs().String()) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } if e.Quantity.Abs().String() == strconv.Itoa(25) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[2].ID) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[2].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[2].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[3].ID) + assert.Equal(t, e.FromAccountMarketID, markets[2].ID) + assert.Equal(t, e.ToAccountMarketID, markets[3].ID) assert.Equal(t, strconv.Itoa(1700), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(2590), e.ToAccountBalance.Abs().String()) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeBondSlashing) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeBondSlashing) } } @@ -1006,7 +1092,7 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // List transfers: // 0 assert.NotNil(t, entries) @@ -1032,42 +1118,42 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // 4->5, 5->10, 5->11, 4->11 assert.NotNil(t, entries) assert.Equal(t, 3, len(*entries)) for _, e := range *entries { if e.Quantity.Abs().String() == strconv.Itoa(3) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[6].ID) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[6].ID) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } if e.Quantity.Abs().String() == strconv.Itoa(5) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[5].ID) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[5].ID) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } if e.Quantity.Abs().String() == strconv.Itoa(72) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[2].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[6].ID) + assert.Equal(t, e.FromAccountMarketID, markets[2].ID) + assert.Equal(t, e.ToAccountMarketID, markets[6].ID) assert.Equal(t, strconv.Itoa(2188), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17122), e.ToAccountBalance.Abs().String()) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } } @@ -1093,57 +1179,79 @@ func TestLedger(t *testing.T) { entities.CursorPagination{}, ) - assert.NoError(t, err) + require.NoError(t, err) // 4->5, 5->10, 5->11, 4->11 assert.NotNil(t, entries) assert.Equal(t, 4, len(*entries)) for _, e := range *entries { if e.Quantity.Abs().String() == strconv.Itoa(3) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[6].ID) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[6].ID) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } if e.Quantity.Abs().String() == strconv.Itoa(5) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[3].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[5].ID) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountMarketID, markets[3].ID) + assert.Equal(t, e.ToAccountMarketID, markets[5].ID) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } if e.Quantity.Abs().String() == strconv.Itoa(25) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[2].ID) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[2].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[2].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[3].ID) + assert.Equal(t, e.FromAccountMarketID, markets[2].ID) + assert.Equal(t, e.ToAccountMarketID, markets[3].ID) assert.Equal(t, strconv.Itoa(1700), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(2590), e.ToAccountBalance.Abs().String()) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeBondSlashing) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeBondSlashing) } if e.Quantity.Abs().String() == strconv.Itoa(72) { - assert.Equal(t, *e.FromAccountPartyID, parties[2].ID) - assert.Equal(t, *e.ToAccountPartyID, parties[5].ID) + assert.Equal(t, e.FromAccountPartyID, parties[2].ID) + assert.Equal(t, e.ToAccountPartyID, parties[5].ID) - assert.Equal(t, *e.FromAccountMarketID, markets[2].ID) - assert.Equal(t, *e.ToAccountMarketID, markets[6].ID) + assert.Equal(t, e.FromAccountMarketID, markets[2].ID) + assert.Equal(t, e.ToAccountMarketID, markets[6].ID) assert.Equal(t, strconv.Itoa(2188), e.FromAccountBalance.Abs().String()) assert.Equal(t, strconv.Itoa(17122), e.ToAccountBalance.Abs().String()) - assert.Equal(t, *e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) - assert.Equal(t, *e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) - assert.Equal(t, *e.TransferType, entities.LedgerMovementTypeRewardPayout) + assert.Equal(t, e.FromAccountType, vega.AccountType_ACCOUNT_TYPE_INSURANCE) + assert.Equal(t, e.ToAccountType, vega.AccountType_ACCOUNT_TYPE_GENERAL) + assert.Equal(t, e.TransferType, entities.LedgerMovementTypeRewardPayout) } } }) + + t.Run("by transfer id filter", func(t *testing.T) { + filter := &entities.LedgerEntryFilter{ + TransferID: "deadbeef01", + } + + entries, _, err := ledgerStore.Query(ctx, + filter, + entities.DateRange{Start: &tStart, End: &tEnd}, + entities.CursorPagination{}, + ) + require.NoError(t, err) + assert.NotNil(t, entries) + + got := *entries + want := ledgerEntries[0] + assert.Len(t, got, 1) + + assert.Equal(t, want.VegaTime, got[0].VegaTime) + assert.Equal(t, want.FromAccountBalance, got[0].FromAccountBalance) + assert.Equal(t, want.ToAccountBalance, got[0].ToAccountBalance) + }) }) } diff --git a/datanode/sqlstore/ledgerentry_filter.go b/datanode/sqlstore/ledgerentry_filter.go index 46d6276bb6..e6b0d275cf 100644 --- a/datanode/sqlstore/ledgerentry_filter.go +++ b/datanode/sqlstore/ledgerentry_filter.go @@ -18,79 +18,81 @@ package sqlstore import ( "errors" "fmt" + "strings" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/protos/vega" + + "golang.org/x/exp/maps" ) var ( ErrLedgerEntryFilterForParty = errors.New("filtering ledger entries should be limited to a single party") - ErrLedgerEntryExportForParty = errors.New("exporting ledger entries should be limited to a single party") ) // Return an SQL query string and corresponding bind arguments to return // ledger entries rows resulting from different filter options. -func filterLedgerEntriesQuery(filter *entities.LedgerEntryFilter) ([3]string, []interface{}, error) { - err := handlePartiesFiltering(filter) - if err != nil { - return [3]string{}, nil, err +func filterLedgerEntriesQuery(filter *entities.LedgerEntryFilter, args *[]interface{}, whereClauses *[]string) error { + if err := handlePartiesFiltering(filter); err != nil { + return err } - var args []interface{} - filterQueries := [3]string{} - - // FromAccount filter - fromAccountDBQuery, nargs, err := accountFilterToDBQuery(filter.FromAccountFilter, &args, "account_from_") + fromAccountDBQuery, err := accountFilterToDBQuery(filter.FromAccountFilter, args, "account_from.") if err != nil { - return [3]string{}, nil, fmt.Errorf("error parsing fromAccount filter values: %w", err) + return fmt.Errorf("invalid fromAccount filters: %w", err) } - args = *nargs - // ToAccount filter - toAccountDBQuery, nargs, err := accountFilterToDBQuery(filter.ToAccountFilter, &args, "account_to_") + toAccountDBQuery, err := accountFilterToDBQuery(filter.ToAccountFilter, args, "account_to.") if err != nil { - return [3]string{}, nil, fmt.Errorf("error parsing fromAccount filter values: %w", err) + return fmt.Errorf("invalid toAccount filters: %w", err) } - args = *nargs - // TransferTypeFilters - accountTransferTypeDBQuery := transferTypeFilterToDBQuery(filter.TransferTypes, &args) + accountTransferTypeDBQuery := transferTypeFilterToDBQuery(filter.TransferTypes) - filterQueries[0] = fromAccountDBQuery - filterQueries[1] = toAccountDBQuery - filterQueries[2] = accountTransferTypeDBQuery + if fromAccountDBQuery != "" { + if toAccountDBQuery != "" { + if filter.CloseOnAccountFilters { + *whereClauses = append(*whereClauses, fromAccountDBQuery, toAccountDBQuery) + } else { + *whereClauses = append(*whereClauses, fmt.Sprintf("((%s) OR (%s))", fromAccountDBQuery, toAccountDBQuery)) + } + } else { + *whereClauses = append(*whereClauses, fromAccountDBQuery) + } + } else if toAccountDBQuery != "" { + *whereClauses = append(*whereClauses, toAccountDBQuery) + } - return filterQueries, args, nil + if accountTransferTypeDBQuery != "" { + *whereClauses = append(*whereClauses, accountTransferTypeDBQuery) + } + + return nil } // accountFilterToDBQuery creates a DB query section string from the given account filter values. -func accountFilterToDBQuery(af entities.AccountFilter, args *[]interface{}, prefix string) (string, *[]interface{}, error) { - var ( - singleAccountFilter string - err error - ) +func accountFilterToDBQuery(af entities.AccountFilter, args *[]interface{}, prefix string) (string, error) { + var err error + + whereClauses := []string{} // Asset filtering if af.AssetID.String() != "" { assetIDAsBytes, err := af.AssetID.Bytes() if err != nil { - return "", nil, fmt.Errorf("invalid asset id: %w", err) + return "", fmt.Errorf("invalid asset id: %w", err) } - singleAccountFilter = fmt.Sprintf("%sasset_id=%s", singleAccountFilter, nextBindVar(args, assetIDAsBytes)) + whereClauses = append(whereClauses, fmt.Sprintf("account_from.asset_id=%s", nextBindVar(args, assetIDAsBytes))) } // Party filtering if len(af.PartyIDs) == 1 { partyIDAsBytes, err := af.PartyIDs[0].Bytes() if err != nil { - return "", nil, fmt.Errorf("invalid party id: %w", err) - } - if singleAccountFilter != "" { - singleAccountFilter = fmt.Sprintf(`%s AND %sparty_id=%s`, singleAccountFilter, prefix, nextBindVar(args, partyIDAsBytes)) - } else { - singleAccountFilter = fmt.Sprintf(`%sparty_id=%s`, prefix, nextBindVar(args, partyIDAsBytes)) + return "", fmt.Errorf("invalid party id: %w", err) } + whereClauses = append(whereClauses, fmt.Sprintf(`%sparty_id=%s`, prefix, nextBindVar(args, partyIDAsBytes))) } // Market filtering @@ -99,29 +101,19 @@ func accountFilterToDBQuery(af entities.AccountFilter, args *[]interface{}, pref for i, market := range af.MarketIDs { marketIds[i], err = market.Bytes() if err != nil { - return "", nil, fmt.Errorf("invalid market id: %w", err) + return "", fmt.Errorf("invalid market id: %w", err) } } - if singleAccountFilter != "" { - singleAccountFilter = fmt.Sprintf(`%s AND %smarket_id=ANY(%s)`, singleAccountFilter, prefix, nextBindVar(args, marketIds)) - } else { - singleAccountFilter = fmt.Sprintf(`%smarket_id=ANY(%s)`, prefix, nextBindVar(args, marketIds)) - } + whereClauses = append(whereClauses, fmt.Sprintf("%smarket_id=ANY(%s)", prefix, nextBindVar(args, marketIds))) } // Account types filtering if len(af.AccountTypes) > 0 { - acTypes := getUniqueAccountTypes(af.AccountTypes) - - if singleAccountFilter != "" { - singleAccountFilter = fmt.Sprintf(`%s AND %saccount_type=ANY(%s)`, singleAccountFilter, prefix, nextBindVar(args, acTypes)) - } else { - singleAccountFilter = fmt.Sprintf(`%saccount_type=ANY(%s)`, prefix, nextBindVar(args, acTypes)) - } + whereClauses = append(whereClauses, fmt.Sprintf(`%stype=ANY(%s)`, prefix, nextBindVar(args, getUniqueAccountTypes(af.AccountTypes)))) } - return singleAccountFilter, args, nil + return strings.Join(whereClauses, " AND "), nil } func getUniqueAccountTypes(accountTypes []vega.AccountType) []vega.AccountType { @@ -139,34 +131,38 @@ func getUniqueAccountTypes(accountTypes []vega.AccountType) []vega.AccountType { return accountTypesList } -func transferTypeFilterToDBQuery(transferTypeFilter []entities.LedgerMovementType, args *[]interface{}) string { - transferTypeFilterString := "" - if len(transferTypeFilter) > 0 { - transferTypesMap := map[entities.LedgerMovementType]struct{}{} +func transferTypeFilterToDBQuery(transferTypeFilter []entities.LedgerMovementType) string { + if len(transferTypeFilter) == 0 { + return "" + } - for _, transferType := range transferTypeFilter { - _, ok := transferTypesMap[transferType] - if ok { - continue - } - transferTypesMap[transferType] = struct{}{} + transferTypesMap := map[entities.LedgerMovementType]string{} + for _, transferType := range transferTypeFilter { + if _, alreadyRegistered := transferTypesMap[transferType]; alreadyRegistered { + continue + } + value, valid := vega.TransferType_name[int32(transferType)] + if !valid { + continue } - for v := range transferTypesMap { - _, ok := vega.TransferType_name[int32(v)] - if !ok { - continue - } + transferTypesMap[transferType] = "'" + value + "'" + } - if transferTypeFilterString == "" { - transferTypeFilterString = fmt.Sprintf(`%stransfer_type=%s`, transferTypeFilterString, nextBindVar(args, v)) - } else { - transferTypeFilterString = fmt.Sprintf(`%s OR transfer_type=%s`, transferTypeFilterString, nextBindVar(args, v)) - } - } + if len(transferTypesMap) == 0 { + return "" + } + + return "ledger.type IN (" + strings.Join(maps.Values(transferTypesMap), ", ") + ")" +} + +func transfersFilterToDBQuery(transfersFilter entities.TransferID, args *[]interface{}) string { + if transfersFilter == "" { + return "" } - return transferTypeFilterString + transfersFilterString := fmt.Sprintf(`ledger.transfer_id=%s`, nextBindVar(args, transfersFilter)) + return transfersFilterString } func handlePartiesFiltering(filter *entities.LedgerEntryFilter) error { @@ -185,7 +181,7 @@ func handlePartiesFiltering(filter *entities.LedgerEntryFilter) error { partyIDTo = filter.ToAccountFilter.PartyIDs[0] } - if partyIDFrom == "" && partyIDTo == "" { + if partyIDFrom == "" && partyIDTo == "" && filter.TransferID == "" { return ErrLedgerEntryFilterForParty } diff --git a/datanode/sqlstore/liquidity_provision.go b/datanode/sqlstore/liquidity_provision.go index 01cdcb430a..bbb8aeda26 100644 --- a/datanode/sqlstore/liquidity_provision.go +++ b/datanode/sqlstore/liquidity_provision.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -32,13 +20,13 @@ import ( "errors" "fmt" - "code.vegaprotocol.io/vega/protos/vega" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" "code.vegaprotocol.io/vega/datanode/utils" "code.vegaprotocol.io/vega/logging" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "code.vegaprotocol.io/vega/protos/vega" + "github.com/georgysavva/scany/pgxscan" "github.com/jackc/pgx/v4" ) diff --git a/datanode/sqlstore/liquidity_provision_test.go b/datanode/sqlstore/liquidity_provision_test.go index 61f842d9d0..f66d1474b9 100644 --- a/datanode/sqlstore/liquidity_provision_test.go +++ b/datanode/sqlstore/liquidity_provision_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -33,14 +21,12 @@ import ( "testing" "time" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" - - "code.vegaprotocol.io/vega/libs/ptr" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/protos/vega" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -1083,6 +1069,7 @@ func addLiquidityProvisionsMultiProvider(ctx context.Context, t *testing.T, bs * TxHash: generateTxHash(), SeqNum: 0, Market: entities.MarketID("cafed00d"), + MarkPriceType: "COMPOSITE_PRICE_TYPE_LAST_TRADE", }, { MarketTradingMode: "TRADING_MODE_CONTINUOUS", @@ -1093,6 +1080,7 @@ func addLiquidityProvisionsMultiProvider(ctx context.Context, t *testing.T, bs * TxHash: generateTxHash(), SeqNum: 0, Market: entities.MarketID("cafedaad"), + MarkPriceType: "COMPOSITE_PRICE_TYPE_LAST_TRADE", }, } @@ -1102,7 +1090,7 @@ func addLiquidityProvisionsMultiProvider(ctx context.Context, t *testing.T, bs * addTestBlockForTime(t, ctx, bs, vegaTime) lp := &vega.LiquidityProvision{ - Id: helpers.GenerateID(), + Id: GenerateID(), PartyId: provider.PartyID, CreatedAt: vegaTime.UnixNano(), UpdatedAt: vegaTime.UnixNano(), diff --git a/datanode/sqlstore/margin_level_test.go b/datanode/sqlstore/margin_level_test.go index c6e5cc0122..0ad8a73691 100644 --- a/datanode/sqlstore/margin_level_test.go +++ b/datanode/sqlstore/margin_level_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -35,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -176,10 +165,13 @@ func getMarginLevelWithMaintenanceProto(maintenanceMargin, partyID, marketID str SearchLevel: "1000", InitialMargin: "1000", CollateralReleaseLevel: "1000", + OrderMargin: "0", PartyId: partyID, MarketId: marketID, Asset: testAssetID, Timestamp: timestamp, + MarginMode: vega.MarginMode_MARGIN_MODE_CROSS_MARGIN, + MarginFactor: "0", } } diff --git a/datanode/sqlstore/margin_levels.go b/datanode/sqlstore/margin_levels.go index e810462d72..f108b07a0c 100644 --- a/datanode/sqlstore/margin_levels.go +++ b/datanode/sqlstore/margin_levels.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) @@ -52,7 +41,7 @@ type MarginLevels struct { } const ( - sqlMarginLevelColumns = `account_id,timestamp,maintenance_margin,search_level,initial_margin,collateral_release_level,tx_hash,vega_time` + sqlMarginLevelColumns = `account_id,order_margin_account_id,timestamp,maintenance_margin,search_level,initial_margin,collateral_release_level,order_margin,tx_hash,vega_time,margin_mode,margin_factor` ) func NewMarginLevels(connectionSource *ConnectionSource) *MarginLevels { diff --git a/datanode/sqlstore/margin_modes.go b/datanode/sqlstore/margin_modes.go new file mode 100644 index 0000000000..49fa061ed5 --- /dev/null +++ b/datanode/sqlstore/margin_modes.go @@ -0,0 +1,111 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package sqlstore + +import ( + "context" + "fmt" + "strings" + + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/metrics" + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + + "github.com/georgysavva/scany/pgxscan" +) + +var listPartyMarginModesOrdering = TableOrdering{ + ColumnOrdering{Name: "market_id", Sorting: ASC}, + ColumnOrdering{Name: "party_id", Sorting: ASC}, +} + +type ListPartyMarginModesFilters struct { + MarketID *entities.MarketID + PartyID *entities.PartyID +} + +type MarginModes struct { + *ConnectionSource +} + +func (t *MarginModes) UpdatePartyMarginMode(ctx context.Context, update entities.PartyMarginMode) error { + defer metrics.StartSQLQuery("MarginModes", "UpdatePartyMarginMode")() + if _, err := t.Connection.Exec( + ctx, + `INSERT INTO party_margin_modes(market_id, party_id, margin_mode, margin_factor, min_theoretical_margin_factor, max_theoretical_leverage, at_epoch) + VALUES ($1, $2, $3, $4, $5, $6, $7) + ON CONFLICT (market_id, party_id) DO UPDATE SET + margin_mode = excluded.margin_mode, + margin_factor = excluded.margin_factor, + min_theoretical_margin_factor = excluded.min_theoretical_margin_factor, + max_theoretical_leverage = excluded.max_theoretical_leverage, + at_epoch = excluded.at_epoch`, + update.MarketID, + update.PartyID, + update.MarginMode, + update.MarginFactor, + update.MinTheoreticalMarginFactor, + update.MaxTheoreticalLeverage, + update.AtEpoch, + ); err != nil { + return err + } + + return nil +} + +func (t *MarginModes) ListPartyMarginModes(ctx context.Context, pagination entities.CursorPagination, filters ListPartyMarginModesFilters) ([]entities.PartyMarginMode, entities.PageInfo, error) { + defer metrics.StartSQLQuery("MarginModes", "ListPartyMarginModes")() + + var ( + modes []entities.PartyMarginMode + args []interface{} + pageInfo entities.PageInfo + ) + + query := `SELECT * FROM party_margin_modes` + + whereClauses := []string{} + if filters.MarketID != nil { + whereClauses = append(whereClauses, fmt.Sprintf("market_id = %s", nextBindVar(&args, *filters.MarketID))) + } + if filters.PartyID != nil { + whereClauses = append(whereClauses, fmt.Sprintf("party_id = %s", nextBindVar(&args, *filters.PartyID))) + } + + if len(whereClauses) > 0 { + query += " WHERE " + strings.Join(whereClauses, " AND ") + } + + query, args, err := PaginateQuery[entities.PartyMarginModeCursor](query, args, listPartyMarginModesOrdering, pagination) + if err != nil { + return nil, pageInfo, err + } + + if err := pgxscan.Select(ctx, t.Connection, &modes, query, args...); err != nil { + return nil, pageInfo, err + } + + modes, pageInfo = entities.PageEntities[*v2.PartyMarginModeEdge](modes, pagination) + + return modes, pageInfo, nil +} + +func NewMarginModes(connectionSource *ConnectionSource) *MarginModes { + return &MarginModes{ + ConnectionSource: connectionSource, + } +} diff --git a/datanode/sqlstore/margin_modes_test.go b/datanode/sqlstore/margin_modes_test.go new file mode 100644 index 0000000000..b28f233b58 --- /dev/null +++ b/datanode/sqlstore/margin_modes_test.go @@ -0,0 +1,191 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package sqlstore_test + +import ( + "encoding/json" + "strings" + "testing" + + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/ptr" + vegapb "code.vegaprotocol.io/vega/protos/vega" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "golang.org/x/exp/slices" +) + +func TestMarginModesStore(t *testing.T) { + ctx := tempTransaction(t) + + marginModesStore := sqlstore.NewMarginModes(connectionSource) + + market1 := entities.MarketID(GenerateID()) + market2 := entities.MarketID(GenerateID()) + party1 := entities.PartyID(GenerateID()) + party2 := entities.PartyID(GenerateID()) + + marginMode11 := entities.PartyMarginMode{ + MarketID: market1, + PartyID: party1, + MarginMode: vegapb.MarginMode_MARGIN_MODE_CROSS_MARGIN, + AtEpoch: 5, + } + marginMode12 := entities.PartyMarginMode{ + MarketID: market1, + PartyID: party2, + MarginMode: vegapb.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + MarginFactor: ptr.From(num.DecimalFromFloat(1.20)), + MinTheoreticalMarginFactor: ptr.From(num.DecimalFromFloat(1.21)), + MaxTheoreticalLeverage: ptr.From(num.DecimalFromFloat(1.22)), + AtEpoch: 6, + } + marginMode21 := entities.PartyMarginMode{ + MarketID: market2, + PartyID: party1, + MarginMode: vegapb.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + MarginFactor: ptr.From(num.DecimalFromFloat(2.10)), + MinTheoreticalMarginFactor: ptr.From(num.DecimalFromFloat(2.11)), + MaxTheoreticalLeverage: ptr.From(num.DecimalFromFloat(2.12)), + AtEpoch: 10, + } + marginMode22 := entities.PartyMarginMode{ + MarketID: market2, + PartyID: party2, + MarginMode: vegapb.MarginMode_MARGIN_MODE_CROSS_MARGIN, + AtEpoch: 12, + } + + t.Run("Inserting brand new market/party combination", func(t *testing.T) { + expectedMarginModes := []entities.PartyMarginMode{marginMode11, marginMode12, marginMode21, marginMode22} + sortMarginModes(&expectedMarginModes) + + for _, mode := range expectedMarginModes { + require.NoError(t, marginModesStore.UpdatePartyMarginMode(ctx, mode)) + } + + foundMarginModes, _, err := marginModesStore.ListPartyMarginModes(ctx, entities.DefaultCursorPagination(false), sqlstore.ListPartyMarginModesFilters{}) + require.NoError(t, err) + expectedStatsJson, _ := json.Marshal(expectedMarginModes) + statsJson, _ := json.Marshal(foundMarginModes) + assert.JSONEq(t, string(expectedStatsJson), string(statsJson)) + }) + + marginMode11 = entities.PartyMarginMode{ + MarketID: market1, + PartyID: party1, + MarginMode: vegapb.MarginMode_MARGIN_MODE_ISOLATED_MARGIN, + MarginFactor: ptr.From(num.DecimalFromFloat(3.10)), + MinTheoreticalMarginFactor: ptr.From(num.DecimalFromFloat(3.11)), + MaxTheoreticalLeverage: ptr.From(num.DecimalFromFloat(3.12)), + AtEpoch: 6, + } + + t.Run("Inserting brand new market/party combination", func(t *testing.T) { + require.NoError(t, marginModesStore.UpdatePartyMarginMode(ctx, marginMode11)) + + expectedMarginModes := []entities.PartyMarginMode{marginMode11, marginMode12, marginMode21, marginMode22} + sortMarginModes(&expectedMarginModes) + + foundMarginModes, _, err := marginModesStore.ListPartyMarginModes(ctx, + entities.DefaultCursorPagination(false), + sqlstore.ListPartyMarginModesFilters{}, + ) + require.NoError(t, err) + expectedStatsJson, _ := json.Marshal(expectedMarginModes) + statsJson, _ := json.Marshal(foundMarginModes) + assert.JSONEq(t, string(expectedStatsJson), string(statsJson)) + }) + + t.Run("Inserting an update on an existing combination", func(t *testing.T) { + expectedMarginModes := []entities.PartyMarginMode{marginMode11, marginMode12, marginMode21, marginMode22} + sortMarginModes(&expectedMarginModes) + + for _, mode := range expectedMarginModes { + require.NoError(t, marginModesStore.UpdatePartyMarginMode(ctx, mode)) + } + + foundMarginModes, _, err := marginModesStore.ListPartyMarginModes(ctx, + entities.DefaultCursorPagination(false), + sqlstore.ListPartyMarginModesFilters{}, + ) + require.NoError(t, err) + expectedStatsJson, _ := json.Marshal(expectedMarginModes) + statsJson, _ := json.Marshal(foundMarginModes) + assert.JSONEq(t, string(expectedStatsJson), string(statsJson)) + }) + + t.Run("Listing a margin mode for party", func(t *testing.T) { + expectedMarginModes := []entities.PartyMarginMode{marginMode11, marginMode21} + sortMarginModes(&expectedMarginModes) + + foundMarginModes, _, err := marginModesStore.ListPartyMarginModes(ctx, + entities.DefaultCursorPagination(false), + sqlstore.ListPartyMarginModesFilters{ + PartyID: ptr.From(party1), + }, + ) + require.NoError(t, err) + expectedStatsJson, _ := json.Marshal(expectedMarginModes) + statsJson, _ := json.Marshal(foundMarginModes) + assert.JSONEq(t, string(expectedStatsJson), string(statsJson)) + }) + + t.Run("Listing a margin mode for market", func(t *testing.T) { + expectedMarginModes := []entities.PartyMarginMode{marginMode11, marginMode12} + sortMarginModes(&expectedMarginModes) + + foundMarginModes, _, err := marginModesStore.ListPartyMarginModes(ctx, + entities.DefaultCursorPagination(false), + sqlstore.ListPartyMarginModesFilters{ + MarketID: ptr.From(market1), + }, + ) + require.NoError(t, err) + expectedStatsJson, _ := json.Marshal(expectedMarginModes) + statsJson, _ := json.Marshal(foundMarginModes) + assert.JSONEq(t, string(expectedStatsJson), string(statsJson)) + }) + + t.Run("Listing a margin mode for market and party", func(t *testing.T) { + expectedMarginModes := []entities.PartyMarginMode{marginMode11} + sortMarginModes(&expectedMarginModes) + + foundMarginModes, _, err := marginModesStore.ListPartyMarginModes(ctx, + entities.DefaultCursorPagination(false), + sqlstore.ListPartyMarginModesFilters{ + PartyID: ptr.From(party1), + MarketID: ptr.From(market1), + }, + ) + require.NoError(t, err) + expectedStatsJson, _ := json.Marshal(expectedMarginModes) + statsJson, _ := json.Marshal(foundMarginModes) + assert.JSONEq(t, string(expectedStatsJson), string(statsJson)) + }) +} + +func sortMarginModes(modes *[]entities.PartyMarginMode) { + slices.SortStableFunc(*modes, func(a, b entities.PartyMarginMode) int { + if a.MarketID == b.MarketID { + return strings.Compare(a.PartyID.String(), b.PartyID.String()) + } + return strings.Compare(a.MarketID.String(), b.MarketID.String()) + }) +} diff --git a/datanode/sqlstore/market_data.go b/datanode/sqlstore/market_data.go index a5ed01a08a..2928e19f8f 100644 --- a/datanode/sqlstore/market_data.go +++ b/datanode/sqlstore/market_data.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -35,8 +23,10 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" "github.com/jackc/pgx/v4" ) @@ -61,7 +51,7 @@ const selectMarketDataColumns = `synthetic_time, tx_hash, vega_time, seq_num, market_trading_mode, auction_trigger, extension_trigger, target_stake, supplied_stake, price_monitoring_bounds, market_value_proxy, liquidity_provider_fee_shares, market_state, next_mark_to_market, coalesce(market_growth, 0) as market_growth, - coalesce(last_traded_price, 0) as last_traded_price, product_data, liquidity_provider_sla` + coalesce(last_traded_price, 0) as last_traded_price, product_data, liquidity_provider_sla, next_network_closeout, mark_price_type, mark_price_state` func NewMarketData(connectionSource *ConnectionSource) *MarketData { return &MarketData{ @@ -75,7 +65,7 @@ func NewMarketData(connectionSource *ConnectionSource) *MarketData { "market_trading_mode", "auction_trigger", "extension_trigger", "target_stake", "supplied_stake", "price_monitoring_bounds", "market_value_proxy", "liquidity_provider_fee_shares", "market_state", "next_mark_to_market", "market_growth", "last_traded_price", "product_data", - "liquidity_provider_sla", + "liquidity_provider_sla", "next_network_closeout", "mark_price_type", "mark_price_state", }, } } @@ -97,7 +87,8 @@ func (md *MarketData) Flush(ctx context.Context) ([]*entities.MarketData, error) data.AuctionStart, data.IndicativePrice, data.IndicativeVolume, data.MarketTradingMode, data.AuctionTrigger, data.ExtensionTrigger, data.TargetStake, data.SuppliedStake, data.PriceMonitoringBounds, data.MarketValueProxy, data.LiquidityProviderFeeShares, data.MarketState, - data.NextMarkToMarket, data.MarketGrowth, data.LastTradedPrice, data.ProductData, data.LiquidityProviderSLA, + data.NextMarkToMarket, data.MarketGrowth, data.LastTradedPrice, + data.ProductData, data.LiquidityProviderSLA, data.NextNetworkCloseout, data.MarkPriceType, data.MarkPriceState, }) } defer metrics.StartSQLQuery("MarketData", "Flush")() @@ -127,7 +118,6 @@ func (md *MarketData) GetMarketDataByID(ctx context.Context, marketID string) (e var marketData entities.MarketData query := fmt.Sprintf("select %s from current_market_data where market = $1", selectMarketDataColumns) - return marketData, md.wrapE(pgxscan.Get(ctx, md.Connection, &marketData, query, entities.MarketID(marketID))) } @@ -187,6 +177,11 @@ func (md *MarketData) getHistoricMarketData(ctx context.Context, marketID string default: query = fmt.Sprintf(`%s where market = %s`, selectStatement, nextBindVar(&args, market)) + // We want to restrict to just the last price update so we can override the pagination and force it to return just the 1 result + first := ptr.From(int32(1)) + if pagination, err = entities.NewCursorPagination(first, nil, nil, nil, true); err != nil { + return nil, pageInfo, err + } } query, args, err = PaginateQuery[entities.MarketDataCursor](query, args, marketdataOrdering, pagination) diff --git a/datanode/sqlstore/market_data_test.go b/datanode/sqlstore/market_data_test.go index ae1bba88fa..4864b32eb3 100644 --- a/datanode/sqlstore/market_data_test.go +++ b/datanode/sqlstore/market_data_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -41,14 +29,12 @@ import ( "testing" "time" + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" - "code.vegaprotocol.io/vega/protos/vega" - "code.vegaprotocol.io/vega/datanode/entities" - "code.vegaprotocol.io/vega/datanode/sqlstore" - "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -116,6 +102,7 @@ func shouldInsertAValidMarketDataRecord(t *testing.T) { MarketState: "STATE_ACTIVE", AuctionTrigger: "AUCTION_TRIGGER_LIQUIDITY", ExtensionTrigger: "AUCTION_TRIGGER_UNSPECIFIED", + MarkPriceType: "COMPOSITE_PRICE_TYPE_UNSPECIFIED", PriceMonitoringBounds: []*vega.PriceMonitoringBounds{ { MinValidPrice: "1", @@ -172,6 +159,7 @@ func getLatestMarketData(t *testing.T) { MarketState: "STATE_ACTIVE", AuctionTrigger: "AUCTION_TRIGGER_LIQUIDITY", ExtensionTrigger: "AUCTION_TRIGGER_UNSPECIFIED", + MarkPriceType: "COMPOSITE_PRICE_TYPE_LAST_TRADE", TargetStake: mustParseDecimal(t, "67499499622"), SuppliedStake: mustParseDecimal(t, "50000000000"), PriceMonitoringBounds: []*vega.PriceMonitoringBounds{ @@ -197,12 +185,22 @@ func getLatestMarketData(t *testing.T) { }, MarketGrowth: num.DecimalZero(), LastTradedPrice: mustParseDecimal(t, "999992588"), - ProductData: nil, + ProductData: &entities.ProductData{ + ProductData: &vega.ProductData{ + Data: &vega.ProductData_PerpetualData{ + PerpetualData: &vega.PerpetualData{ + InternalCompositePrice: "100", + NextInternalCompositePriceCalc: 200, + InternalCompositePriceType: vega.CompositePriceType_COMPOSITE_PRICE_TYPE_LAST_TRADE, + }, + }, + }, + }, } got, err := store.GetMarketDataByID(ctx, "8cc0e020c0bc2f9eba77749d81ecec8283283b85941722c2cb88318aaf8b8cd8") - assert.NoError(t, err) + require.NoError(t, err) - assert.Truef(t, want.Equal(got), "want: %#v\ngot: %#v\n", want, got) + require.Truef(t, want.Equal(got), "want: %#v\ngot: %#v\n", want, got) } func getAllForMarketBetweenDates(t *testing.T) { @@ -861,9 +859,10 @@ func TestGetAllMarketData(t *testing.T) { store, err := setupMarketData(t, ctx) require.NoError(t, err) market := "8cc0e020c0bc2f9eba77749d81ecec8283283b85941722c2cb88318aaf8b8cd8" + startDate := time.Date(2022, 2, 11, 0, 0, 0, 0, time.UTC) t.Run("should return all results if no cursor pagination is provided", func(t *testing.T) { - got, pageInfo, err := store.GetHistoricMarketData(ctx, market, nil, nil, entities.CursorPagination{}) + got, pageInfo, err := store.GetHistoricMarketData(ctx, market, &startDate, nil, entities.CursorPagination{}) assert.NoError(t, err) assert.Equal(t, 184, len(got)) wantStartCursor := entities.NewCursor(entities.MarketDataCursor{ @@ -884,7 +883,7 @@ func TestGetAllMarketData(t *testing.T) { first := int32(10) pagination, err := entities.NewCursorPagination(&first, nil, nil, nil, false) require.NoError(t, err) - got, pageInfo, err := store.GetHistoricMarketData(ctx, market, nil, nil, pagination) + got, pageInfo, err := store.GetHistoricMarketData(ctx, market, &startDate, nil, pagination) assert.NoError(t, err) assert.Equal(t, 10, len(got)) assert.Equal(t, entities.PageInfo{ @@ -898,6 +897,24 @@ func TestGetAllMarketData(t *testing.T) { }.String()).Encode(), }, pageInfo) }) + + t.Run("should return the most recent record if no dates and no cursor pagination is provided", func(t *testing.T) { + got, pageInfo, err := store.GetHistoricMarketData(ctx, market, nil, nil, entities.CursorPagination{}) + assert.NoError(t, err) + assert.Equal(t, 1, len(got)) + wantStartCursor := entities.NewCursor(entities.MarketDataCursor{ + SyntheticTime: time.Date(2022, 0o2, 11, 10, 0o5, 41, 183000, time.UTC).Local(), + }.String()).Encode() + wantEndCursor := entities.NewCursor(entities.MarketDataCursor{ + SyntheticTime: time.Date(2022, 0o2, 11, 10, 0o5, 41, 183000, time.UTC).Local(), + }.String()).Encode() + assert.Equal(t, entities.PageInfo{ + HasNextPage: true, + HasPreviousPage: false, + StartCursor: wantStartCursor, + EndCursor: wantEndCursor, + }, pageInfo) + }) } func setupMarketData(t *testing.T, ctx context.Context) (*sqlstore.MarketData, error) { @@ -1070,6 +1087,17 @@ func csvToMarketData(t *testing.T, line []string, seqNum int) *entities.MarketDa SyntheticTime: syntheticTime, MarketGrowth: mustParseDecimal(t, line[csvColumnMarketGrowth]), LastTradedPrice: mustParseDecimal(t, line[csvColumnLastTradedPrice]), - ProductData: nil, + ProductData: &entities.ProductData{ + ProductData: &vega.ProductData{ + Data: &vega.ProductData_PerpetualData{ + PerpetualData: &vega.PerpetualData{ + InternalCompositePrice: "100", + NextInternalCompositePriceCalc: 200, + InternalCompositePriceType: vega.CompositePriceType_COMPOSITE_PRICE_TYPE_LAST_TRADE, + }, + }, + }, + }, + MarkPriceType: "COMPOSITE_PRICE_TYPE_LAST_TRADE", } } diff --git a/datanode/sqlstore/markets.go b/datanode/sqlstore/markets.go index db7cdd30ba..137ccbb1c3 100644 --- a/datanode/sqlstore/markets.go +++ b/datanode/sqlstore/markets.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -37,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" "golang.org/x/exp/maps" ) @@ -106,7 +95,7 @@ const ( sqlMarketsColumns = `id, tx_hash, vega_time, instrument_id, tradable_instrument, decimal_places, fees, opening_auction, price_monitoring_settings, liquidity_monitoring_parameters, trading_mode, state, market_timestamps, position_decimal_places, lp_price_range, linear_slippage_factor, quadratic_slippage_factor, - parent_market_id, insurance_pool_fraction, liquidity_sla_parameters` + parent_market_id, insurance_pool_fraction, liquidity_sla_parameters, liquidation_strategy, mark_price_configuration` ) func NewMarkets(connectionSource *ConnectionSource) *Markets { @@ -119,7 +108,7 @@ func NewMarkets(connectionSource *ConnectionSource) *Markets { func (m *Markets) Upsert(ctx context.Context, market *entities.Market) error { query := fmt.Sprintf(`insert into markets(%s) -values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20) +values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22) on conflict (id, vega_time) do update set instrument_id=EXCLUDED.instrument_id, @@ -139,14 +128,17 @@ set parent_market_id=EXCLUDED.parent_market_id, insurance_pool_fraction=EXCLUDED.insurance_pool_fraction, tx_hash=EXCLUDED.tx_hash, - liquidity_sla_parameters=EXCLUDED.liquidity_sla_parameters;`, sqlMarketsColumns) + liquidity_sla_parameters=EXCLUDED.liquidity_sla_parameters, + liquidation_strategy=EXCLUDED.liquidation_strategy, + mark_price_configuration=EXCLUDED.mark_price_configuration;`, sqlMarketsColumns) defer metrics.StartSQLQuery("Markets", "Upsert")() if _, err := m.Connection.Exec(ctx, query, market.ID, market.TxHash, market.VegaTime, market.InstrumentID, market.TradableInstrument, market.DecimalPlaces, market.Fees, market.OpeningAuction, market.PriceMonitoringSettings, market.LiquidityMonitoringParameters, market.TradingMode, market.State, market.MarketTimestamps, market.PositionDecimalPlaces, market.LpPriceRange, market.LinearSlippageFactor, market.QuadraticSlippageFactor, market.ParentMarketID, market.InsurancePoolFraction, - market.LiquiditySLAParameters); err != nil { + market.LiquiditySLAParameters, market.LiquidationStrategy, + market.MarkPriceConfiguration); err != nil { err = fmt.Errorf("could not insert market into database: %w", err) return err } @@ -173,7 +165,7 @@ func getSelect() string { select mc.id, mc.tx_hash, mc.vega_time, mc.instrument_id, mc.tradable_instrument, mc.decimal_places, mc.fees, mc.opening_auction, mc.price_monitoring_settings, mc.liquidity_monitoring_parameters, mc.trading_mode, mc.state, mc.market_timestamps, mc.position_decimal_places, mc.lp_price_range, mc.linear_slippage_factor, mc.quadratic_slippage_factor, - mc.parent_market_id, mc.insurance_pool_fraction, ml.market_id as successor_market_id, mc.liquidity_sla_parameters + mc.parent_market_id, mc.insurance_pool_fraction, ml.market_id as successor_market_id, mc.liquidity_sla_parameters, mc.liquidation_strategy, mc.mark_price_configuration from markets_current mc left join lineage ml on mc.id = ml.parent_market_id ` diff --git a/datanode/sqlstore/markets_test.go b/datanode/sqlstore/markets_test.go index 849244f8a9..552a198a55 100644 --- a/datanode/sqlstore/markets_test.go +++ b/datanode/sqlstore/markets_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -32,15 +20,13 @@ import ( "testing" "time" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" - dstypes "code.vegaprotocol.io/vega/core/datasource/common" - "code.vegaprotocol.io/vega/libs/num" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/protos/vega" v1 "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/georgysavva/scany/pgxscan" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -227,7 +213,6 @@ func shouldInsertAValidMarketRecord(t *testing.T) { block := addTestBlock(t, ctx, bs) marketProto := getTestFutureMarket(true) - marketProto.LiquidityMonitoringParameters.TriggeringRatio = "0.3" market, err := entities.NewMarketFromProto(marketProto, generateTxHash(), block.VegaTime) require.NoError(t, err, "Converting market proto to database entity") @@ -262,6 +247,26 @@ func shouldUpdateAValidMarketRecord(t *testing.T) { var block entities.Block var marketProto *vega.Market + t.Run("should insert a valid market record to the database with liquidation strategy", func(t *testing.T) { + block = addTestBlock(t, ctx, bs) + marketProto = getTestFutureMarketWithLiquidationStrategy(false) + + market, err := entities.NewMarketFromProto(marketProto, generateTxHash(), block.VegaTime) + require.NoError(t, err, "Converting market proto to database entity") + + err = md.Upsert(ctx, market) + require.NoError(t, err, "Saving market entity to database") + + var got entities.Market + err = pgxscan.Get(ctx, conn, &got, `select * from markets where id = $1 and vega_time = $2`, market.ID, market.VegaTime) + assert.NoError(t, err) + assert.Equal(t, "TEST_INSTRUMENT", market.InstrumentID) + assert.NotNil(t, got.LiquidationStrategy) + + assert.Equal(t, marketProto.TradableInstrument, got.TradableInstrument.ToProto()) + assert.Equal(t, marketProto.LiquidationStrategy, got.LiquidationStrategy.IntoProto()) + }) + t.Run("should insert a valid market record to the database", func(t *testing.T) { block = addTestBlock(t, ctx, bs) marketProto = getTestFutureMarket(false) @@ -312,7 +317,7 @@ func shouldUpdateAValidMarketRecord(t *testing.T) { err = conn.QueryRow(ctx, `select count(*) from markets`).Scan(&rowCount) require.NoError(t, err) - assert.Equal(t, 2, rowCount) + assert.Equal(t, 3, rowCount) var gotFirstBlock, gotSecondBlock entities.Market @@ -466,7 +471,7 @@ func getTestPerpetualMarket() *vega.Market { func getTestMarket() *vega.Market { return &vega.Market{ - Id: helpers.GenerateID(), + Id: GenerateID(), TradableInstrument: &vega.TradableInstrument{ Instrument: &vega.Instrument{ Id: "Crypto/BTCUSD/Futures/Dec19", @@ -504,6 +509,9 @@ func getTestMarket() *vega.Market { InfrastructureFee: "", LiquidityFee: "", }, + LiquidityFeeSettings: &vega.LiquidityFeeSettings{ + Method: vega.LiquidityFeeSettings_METHOD_MARGINAL_COST, + }, }, OpeningAuction: &vega.AuctionDuration{ Duration: 0, @@ -525,8 +533,6 @@ func getTestMarket() *vega.Market { TimeWindow: 0, ScalingFactor: 0, }, - TriggeringRatio: "0", - AuctionExtension: 0, }, TradingMode: vega.Market_TRADING_MODE_CONTINUOUS, State: vega.Market_STATE_ACTIVE, @@ -543,6 +549,17 @@ func getTestMarket() *vega.Market { } } +func getTestFutureMarketWithLiquidationStrategy(termInt bool) *vega.Market { + mkt := getTestFutureMarket(termInt) + mkt.LiquidationStrategy = &vega.LiquidationStrategy{ + DisposalTimeStep: 10, + DisposalFraction: "0.1", + FullDisposalSize: 20, + MaxFractionConsumed: "0.01", + } + return mkt +} + func getTestFutureMarket(termInt bool) *vega.Market { term := &vega.DataSourceSpec{ Id: "", @@ -644,6 +661,9 @@ func getTestFutureMarket(termInt bool) *vega.Market { InfrastructureFee: "", LiquidityFee: "", }, + LiquidityFeeSettings: &vega.LiquidityFeeSettings{ + Method: vega.LiquidityFeeSettings_METHOD_MARGINAL_COST, + }, }, OpeningAuction: &vega.AuctionDuration{ Duration: 0, @@ -665,8 +685,6 @@ func getTestFutureMarket(termInt bool) *vega.Market { TimeWindow: 0, ScalingFactor: 0, }, - TriggeringRatio: "0", - AuctionExtension: 0, }, TradingMode: vega.Market_TRADING_MODE_CONTINUOUS, State: vega.Market_STATE_ACTIVE, @@ -1500,6 +1518,13 @@ func setupSuccessorMarkets(t *testing.T, ctx context.Context) (*sqlstore.Markets ps := sqlstore.NewProposals(connectionSource) ts := sqlstore.NewParties(connectionSource) + emptyLS := &vega.LiquidationStrategy{ + DisposalTimeStep: 0, + DisposalFraction: "0", + FullDisposalSize: 0, + MaxFractionConsumed: "0", + } + liquidationStrat := entities.LiquidationStrategyFromProto(emptyLS) parentMarket := entities.Market{ ID: entities.MarketID("deadbeef01"), InstrumentID: "deadbeef01", @@ -1512,6 +1537,7 @@ func setupSuccessorMarkets(t *testing.T, ctx context.Context) (*sqlstore.Markets PerformanceHysteresisEpochs: 0, SlaCompetitionFactor: num.NewDecimalFromFloat(0), }, + LiquidationStrategy: liquidationStrat, } successorMarketA := entities.Market{ @@ -1527,6 +1553,7 @@ func setupSuccessorMarkets(t *testing.T, ctx context.Context) (*sqlstore.Markets PerformanceHysteresisEpochs: 0, SlaCompetitionFactor: num.NewDecimalFromFloat(0), }, + LiquidationStrategy: liquidationStrat, } parentMarket.SuccessorMarketID = successorMarketA.ID @@ -1544,6 +1571,7 @@ func setupSuccessorMarkets(t *testing.T, ctx context.Context) (*sqlstore.Markets PerformanceHysteresisEpochs: 0, SlaCompetitionFactor: num.NewDecimalFromFloat(0), }, + LiquidationStrategy: liquidationStrat, } parentMarket2 := entities.Market{ @@ -1558,6 +1586,7 @@ func setupSuccessorMarkets(t *testing.T, ctx context.Context) (*sqlstore.Markets PerformanceHysteresisEpochs: 0, SlaCompetitionFactor: num.NewDecimalFromFloat(0), }, + LiquidationStrategy: liquidationStrat, } successorMarketA.SuccessorMarketID = successorMarketB.ID @@ -1586,8 +1615,12 @@ func setupSuccessorMarkets(t *testing.T, ctx context.Context) (*sqlstore.Markets block: source.getNextBlock(t, ctx), state: entities.ProposalStateEnacted, rationale: entities.ProposalRationale{ProposalRationale: &vega.ProposalRationale{Title: "myurl1.com", Description: "mydescription1"}}, - terms: entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{Change: &vega.ProposalTerms_NewMarket{NewMarket: &vega.NewMarket{}}}}, - reason: entities.ProposalErrorUnspecified, + terms: entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{Change: &vega.ProposalTerms_NewMarket{NewMarket: &vega.NewMarket{ + Changes: &vega.NewMarketConfiguration{ + LiquidationStrategy: emptyLS, + }, + }}}}, + reason: entities.ProposalErrorUnspecified, }, { id: "deadbeef02", @@ -1602,6 +1635,7 @@ func setupSuccessorMarkets(t *testing.T, ctx context.Context) (*sqlstore.Markets ParentMarketId: "deadbeef01", InsurancePoolFraction: "1.0", }, + LiquidationStrategy: emptyLS, }, }}}}, reason: entities.ProposalErrorUnspecified, @@ -1619,6 +1653,7 @@ func setupSuccessorMarkets(t *testing.T, ctx context.Context) (*sqlstore.Markets ParentMarketId: "deadbeef01", InsurancePoolFraction: "1.0", }, + LiquidationStrategy: emptyLS, }, }}}}, reason: entities.ProposalErrorParticipationThresholdNotReached, @@ -1636,6 +1671,7 @@ func setupSuccessorMarkets(t *testing.T, ctx context.Context) (*sqlstore.Markets ParentMarketId: "deadbeef02", InsurancePoolFraction: "1.0", }, + LiquidationStrategy: emptyLS, }, }}}}, reason: entities.ProposalErrorUnspecified, @@ -1653,6 +1689,7 @@ func setupSuccessorMarkets(t *testing.T, ctx context.Context) (*sqlstore.Markets ParentMarketId: "deadbeef02", InsurancePoolFraction: "1.0", }, + LiquidationStrategy: emptyLS, }, }}}}, reason: entities.ProposalErrorParticipationThresholdNotReached, @@ -1662,7 +1699,7 @@ func setupSuccessorMarkets(t *testing.T, ctx context.Context) (*sqlstore.Markets props := []entities.Proposal{} for _, p := range proposals { p := addTestProposal(t, ctx, ps, p.id, p.party, p.reference, p.block, p.state, - p.rationale, p.terms, p.reason) + p.rationale, p.terms, p.reason, nil, entities.BatchProposalTerms{}) props = append(props, p) } diff --git a/datanode/sqlstore/migrations/0055-0067_moved_to_0069-0080.txt b/datanode/sqlstore/migrations/0055-0067_moved_to_0069-0080.txt new file mode 100644 index 0000000000..b531d119f4 --- /dev/null +++ b/datanode/sqlstore/migrations/0055-0067_moved_to_0069-0080.txt @@ -0,0 +1,2 @@ +The scripts numbered 0055-0067 were moved to 0069-0080 respectively +as 0068 was released in a patch without renumbering. diff --git a/datanode/sqlstore/migrations/0068_stop_order_reject_reason_not_allowed_during_auction.sql b/datanode/sqlstore/migrations/0068_stop_order_reject_reason_not_allowed_during_auction.sql new file mode 100644 index 0000000000..f0a1484284 --- /dev/null +++ b/datanode/sqlstore/migrations/0068_stop_order_reject_reason_not_allowed_during_auction.sql @@ -0,0 +1,7 @@ +-- +goose Up + +ALTER TYPE stop_order_rejection_reason ADD VALUE IF NOT EXISTS 'REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION'; + +-- +goose Down + +-- Do nothing, if it already exists it won't matter and won't be recreated by the up migration. diff --git a/datanode/sqlstore/migrations/0069_add_transfer_id_to_ledger_entry.sql b/datanode/sqlstore/migrations/0069_add_transfer_id_to_ledger_entry.sql new file mode 100644 index 0000000000..9f03e65a21 --- /dev/null +++ b/datanode/sqlstore/migrations/0069_add_transfer_id_to_ledger_entry.sql @@ -0,0 +1,7 @@ +-- +goose Up + +alter table ledger add column if not exists transfer_id bytea null; + +-- +goose Down + +alter table ledger drop column if exists transfer_id; diff --git a/datanode/sqlstore/migrations/0070_add_liquidation_strategy.sql b/datanode/sqlstore/migrations/0070_add_liquidation_strategy.sql new file mode 100644 index 0000000000..e2d6729d74 --- /dev/null +++ b/datanode/sqlstore/migrations/0070_add_liquidation_strategy.sql @@ -0,0 +1,75 @@ +-- +goose Up + +ALTER TABLE markets ADD COLUMN IF NOT EXISTS liquidation_strategy jsonb; + +ALTER TABLE markets_current ADD COLUMN IF NOT EXISTS liquidation_strategy jsonb; + +-- +goose StatementBegin +CREATE OR REPLACE FUNCTION update_current_markets() + RETURNS TRIGGER + LANGUAGE PLPGSQL AS +$$ +BEGIN +INSERT INTO markets_current(id,tx_hash,vega_time,instrument_id,tradable_instrument,decimal_places,fees,opening_auction,price_monitoring_settings,liquidity_monitoring_parameters,trading_mode,state,market_timestamps,position_decimal_places,lp_price_range, linear_slippage_factor, quadratic_slippage_factor, parent_market_id, insurance_pool_fraction, liquidity_sla_parameters, liquidation_strategy) +VALUES (NEW.id,NEW.tx_hash,NEW.vega_time,NEW.instrument_id,NEW.tradable_instrument,NEW.decimal_places,NEW.fees,NEW.opening_auction,NEW.price_monitoring_settings,NEW.liquidity_monitoring_parameters,NEW.trading_mode,NEW.state,NEW.market_timestamps,NEW.position_decimal_places,NEW.lp_price_range, NEW.linear_slippage_factor, NEW.quadratic_slippage_factor, NEW.parent_market_id, NEW.insurance_pool_fraction, NEW.liquidity_sla_parameters, NEW.liquidation_strategy) + ON CONFLICT(id) DO UPDATE SET + tx_hash=EXCLUDED.tx_hash, + instrument_id=EXCLUDED.instrument_id, + tradable_instrument=EXCLUDED.tradable_instrument, + decimal_places=EXCLUDED.decimal_places, + fees=EXCLUDED.fees, + opening_auction=EXCLUDED.opening_auction, + price_monitoring_settings=EXCLUDED.price_monitoring_settings, + liquidity_monitoring_parameters=EXCLUDED.liquidity_monitoring_parameters, + trading_mode=EXCLUDED.trading_mode, + state=EXCLUDED.state, + market_timestamps=EXCLUDED.market_timestamps, + position_decimal_places=EXCLUDED.position_decimal_places, + lp_price_range=EXCLUDED.lp_price_range, + linear_slippage_factor=EXCLUDED.linear_slippage_factor, + quadratic_slippage_factor=EXCLUDED.quadratic_slippage_factor, + vega_time=EXCLUDED.vega_time, + parent_market_id=EXCLUDED.parent_market_id, + insurance_pool_fraction=EXCLUDED.insurance_pool_fraction, + liquidity_sla_parameters=EXCLUDED.liquidity_sla_parameters, + liquidation_strategy=EXCLUDED.liquidation_strategy; +RETURN NULL; +END; +$$; +-- +goose StatementEnd + + +-- +goose Down + +-- +goose StatementBegin +CREATE OR REPLACE FUNCTION update_current_markets() + RETURNS TRIGGER + LANGUAGE PLPGSQL AS +$$ +BEGIN +INSERT INTO markets_current(id,tx_hash,vega_time,instrument_id,tradable_instrument,decimal_places,fees,opening_auction,price_monitoring_settings,liquidity_monitoring_parameters,trading_mode,state,market_timestamps,position_decimal_places,lp_price_range, linear_slippage_factor, quadratic_slippage_factor, parent_market_id, insurance_pool_fraction, liquidity_sla_parameters) +VALUES (NEW.id,NEW.tx_hash,NEW.vega_time,NEW.instrument_id,NEW.tradable_instrument,NEW.decimal_places,NEW.fees,NEW.opening_auction,NEW.price_monitoring_settings,NEW.liquidity_monitoring_parameters,NEW.trading_mode,NEW.state,NEW.market_timestamps,NEW.position_decimal_places,NEW.lp_price_range, NEW.linear_slippage_factor, NEW.quadratic_slippage_factor, NEW.parent_market_id, NEW.insurance_pool_fraction, NEW.liquidity_sla_parameters) + ON CONFLICT(id) DO UPDATE SET + tx_hash=EXCLUDED.tx_hash, + instrument_id=EXCLUDED.instrument_id, + tradable_instrument=EXCLUDED.tradable_instrument, + decimal_places=EXCLUDED.decimal_places, + fees=EXCLUDED.fees, + opening_auction=EXCLUDED.opening_auction, + price_monitoring_settings=EXCLUDED.price_monitoring_settings, + liquidity_monitoring_parameters=EXCLUDED.liquidity_monitoring_parameters, + trading_mode=EXCLUDED.trading_mode, + state=EXCLUDED.state, + market_timestamps=EXCLUDED.market_timestamps, + position_decimal_places=EXCLUDED.position_decimal_places, + lp_price_range=EXCLUDED.lp_price_range, + linear_slippage_factor=EXCLUDED.linear_slippage_factor, + quadratic_slippage_factor=EXCLUDED.quadratic_slippage_factor, + vega_time=EXCLUDED.vega_time, + parent_market_id=EXCLUDED.parent_market_id, + insurance_pool_fraction=EXCLUDED.insurance_pool_fraction, + liquidity_sla_parameters=EXCLUDED.liquidity_sla_parameters; +RETURN NULL; +END; +$$; +-- +goose StatementEnd diff --git a/datanode/sqlstore/migrations/0071_fix_for_10052.sql b/datanode/sqlstore/migrations/0071_fix_for_10052.sql new file mode 100644 index 0000000000..3feab9e613 --- /dev/null +++ b/datanode/sqlstore/migrations/0071_fix_for_10052.sql @@ -0,0 +1,23 @@ +-- +goose Up + +-- +goose StatementBegin +do $$ +begin + if not exists (select * from timescaledb_information.hypertables where hypertable_name = 'fees_stats_by_party') then + perform create_hypertable('fees_stats_by_party', 'vega_time', chunk_time_interval => INTERVAL '1 day', migrate_data => true); + end if; +end $$; +-- +goose StatementEnd + +-- +goose StatementBegin +do $$ +begin + if not exists (select * from timescaledb_information.hypertables where hypertable_name = 'paid_liquidity_fees') then + perform create_hypertable('paid_liquidity_fees', 'vega_time', chunk_time_interval => INTERVAL '1 day', migrate_data => true); + end if; +end $$; +-- +goose StatementEnd + +-- +goose Down + +-- nothing to do, we're not going to convert it back diff --git a/datanode/sqlstore/migrations/0072_transfers_fees_discount.sql b/datanode/sqlstore/migrations/0072_transfers_fees_discount.sql new file mode 100644 index 0000000000..71431ab23e --- /dev/null +++ b/datanode/sqlstore/migrations/0072_transfers_fees_discount.sql @@ -0,0 +1,23 @@ +-- +goose Up + +ALTER TABLE IF EXISTS transfer_fees ADD COLUMN discount_applied HUGEINT DEFAULT (0); + +-- transfer_fees_discount table contains the per party, per party available transaction fee discount. +CREATE TABLE IF NOT EXISTS transfer_fees_discount ( + party_id bytea NOT NULL, + asset_id bytea NOT NULL, + amount HUGEINT NOT NULL, + epoch_seq BIGINT NOT NULL, + vega_time TIMESTAMP WITH time zone NOT NULL, + PRIMARY KEY (party_id, asset_id, vega_time) +); + +select create_hypertable('transfer_fees_discount', 'vega_time', chunk_time_interval => INTERVAL '1 day'); +CREATE INDEX transfer_fees_discount_party_id_idx ON transfer_fees_discount(party_id); +CREATE INDEX transfer_fees_discount_asset_id_idx ON transfer_fees_discount(asset_id); + +-- +goose Down +ALTER TABLE transfer_fees DROP COLUMN discount_applied; +DROP INDEX transfer_fees_discount_party_id_idx; +DROP INDEX transfer_fees_discount_asset_id_idx; +DROP TABLE IF EXISTS transfer_fees_discount; diff --git a/datanode/sqlstore/migrations/0073_add_quantum_amount_in_rewards.sql b/datanode/sqlstore/migrations/0073_add_quantum_amount_in_rewards.sql new file mode 100644 index 0000000000..31a61f2604 --- /dev/null +++ b/datanode/sqlstore/migrations/0073_add_quantum_amount_in_rewards.sql @@ -0,0 +1,25 @@ +-- +goose Up + +alter table rewards + add column if not exists quantum_amount HUGEINT null; + +-- +goose StatementBegin +-- This computes the quantum_amount for old data. +do +$$ + begin + update rewards + set quantum_amount = (select assets_current.quantum * rewards.amount from assets_current where assets_current.id = rewards.asset_id); + + alter table rewards + alter column quantum_amount set not null; + + end +$$; +-- +goose StatementEnd + + +-- +goose Down + +alter table rewards + drop column if exists quantum_amount; diff --git a/datanode/sqlstore/migrations/0074_game_details_api.sql b/datanode/sqlstore/migrations/0074_game_details_api.sql new file mode 100644 index 0000000000..d4f9cf60ce --- /dev/null +++ b/datanode/sqlstore/migrations/0074_game_details_api.sql @@ -0,0 +1,187 @@ +-- +goose Up + +alter table transfers add column if not exists game_id bytea null; +alter table rewards add column if not exists game_id bytea null; + +-- Make sure we refresh the view to account for the new column +create or replace view transfers_current as +( + SELECT DISTINCT ON (id, from_account_id, to_account_id) * FROM transfers ORDER BY id, from_account_id, to_account_id, vega_time DESC +); + +create table game_reward_totals ( + game_id bytea not null, + party_id bytea not null, + asset_id bytea not null, + market_id bytea not null, + epoch_id bigint not null, + team_id bytea not null, -- participant may take part in a game as a team member or as an individual depending on the entity scope of the game + total_rewards hugeint not null, + primary key (game_id, party_id, asset_id, market_id, epoch_id, team_id) +); + +-- +goose StatementBegin +create or replace function insert_game_reward_totals() +returns trigger + language plpgsql + as $$ + declare party_team_id bytea; +begin + with current_team_members as ( + select distinct on (party_id) * + from team_members + order by party_id, joined_at_epoch desc + ) + select team_id into party_team_id from current_team_members where party_id = new.party_id; + + update game_reward_totals + set team_id = coalesce(party_team_id, '\x') + where game_id = new.game_id and party_id = new.party_id + and asset_id = new.asset_id and market_id = new.market_id + and epoch_id = new.epoch_id; + + return null; +end; +$$; +-- +goose StatementEnd + +-- we don't know the team_id of the party when the reward is emitted by core +-- so we need to look it up from the team_members table and insert it into the game_reward_totals table +-- when we insert a new total reward for a party +create trigger insert_game_reward_totals after insert on game_reward_totals + for each row execute procedure insert_game_reward_totals(); + +create or replace view game_team_rankings as +with team_games as ( + -- get the games where the entity scope is individuals + select distinct game_id from transfers + where dispatch_strategy ->> 'entity_scope' = '2' + and game_id is not null +), team_totals as ( + select t.game_id, t.asset_id, t.epoch_id, t.team_id, sum(t.total_rewards) as total_rewards + from game_reward_totals t + join team_games g on t.game_id = g.game_id + where t.team_id != '\x' + group by t.game_id, t.asset_id, t.epoch_id, t.team_id +) +select game_id, epoch_id, team_id, total_rewards, rank() over (partition by game_id, epoch_id order by total_rewards desc) as rank +from team_totals; + +create or replace view game_team_member_rankings as +with team_games as ( + -- get the games where the entity scope is individuals + select distinct game_id from transfers + where dispatch_strategy ->> 'entity_scope' = '2' + and game_id is not null +), team_totals as ( + select t.game_id, t.asset_id, t.team_id, t.party_id, t.epoch_id, sum(t.total_rewards) as total_rewards + from game_reward_totals t + join team_games g on t.game_id = g.game_id + where t.team_id != '\x' + group by t.game_id, t.asset_id, t.team_id, t.party_id, t.epoch_id +) +select game_id, epoch_id, team_id, party_id, total_rewards, rank() over (partition by game_id, epoch_id, team_id order by total_rewards desc) as rank +from team_totals; + +create or replace view game_individual_rankings as +with individual_games as ( + -- get the games where the entity scope is individuals + select game_id from transfers + where dispatch_strategy ->> 'entity_scope' = '1' + and game_id is not null +), individual_totals as ( + -- calculate the total rewards for each individual in each individual entity scoped game + select t.game_id, t.epoch_id, t.asset_id, t.party_id, sum(t.total_rewards) as total_rewards + from game_reward_totals t + join individual_games i on t.game_id = i.game_id + group by t.game_id, t.epoch_id, t.asset_id, t.party_id +) +-- rank the individuals for each game at each epoch +select game_id, epoch_id, party_id, total_rewards, rank() over (partition by game_id, epoch_id order by total_rewards desc) as rank +from individual_totals; + +create or replace view game_stats as +with game_epochs as ( + select distinct game_id, epoch_id + from rewards + where game_id is not null +), game_rewards as ( + select r.*, t.dispatch_strategy, tm.team_id, tmr.rank as member_rank, tr.rank as team_rank, tmr.total_rewards, tr.total_rewards as team_total_rewards, 'ENTITY_SCOPE_TEAMS' as entity_scope + from rewards r + join game_epochs ge on r.game_id = ge.game_id and r.epoch_id = ge.epoch_id + join transfers t on r.game_id = t.game_id and t.transfer_type = 'Recurring' + join team_members tm on r.party_id = tm.party_id + left join game_team_rankings tr on r.game_id = tr.game_id and r.epoch_id = tr.epoch_id and tm.team_id = tr.team_id + left join game_team_member_rankings tmr on r.game_id = tmr.game_id and r.epoch_id = tmr.epoch_id and tm.team_id = tmr.team_id and r.party_id = tmr.party_id + where dispatch_strategy->>'entity_scope' = '2' + union all + select r.*, t.dispatch_strategy, null as team_id, tmr.rank as member_rank, null as team_rank, tmr.total_rewards, null as team_total_rewards,'ENTITY_SCOPE_INDIVIDUALS' as entity_scope + from rewards r + join game_epochs ge on r.game_id = ge.game_id and r.epoch_id = ge.epoch_id + join transfers t on r.game_id = t.game_id and t.transfer_type = 'Recurring' + left join game_individual_rankings tmr on r.game_id = tmr.game_id and r.epoch_id = tmr.epoch_id and r.party_id = tmr.party_id + where dispatch_strategy->>'entity_scope' = '1' +) +select * +from game_rewards +; + +create or replace view game_stats_current as +with game_epochs as ( + select game_id, max(epoch_id) as epoch_id + from rewards + where game_id is not null + group by game_id +), game_rewards as ( + select r.*, t.dispatch_strategy, tm.team_id, tmr.rank as member_rank, tr.rank as team_rank, tmr.total_rewards, 'ENTITY_SCOPE_TEAMS' as entity_scope + from rewards r + join game_epochs ge on r.game_id = ge.game_id and r.epoch_id = ge.epoch_id + join transfers t on r.game_id = t.game_id and t.transfer_type = 'Recurring' + join team_members tm on r.party_id = tm.party_id + left join game_team_rankings tr on r.game_id = tr.game_id and r.epoch_id = tr.epoch_id and tm.team_id = tr.team_id + left join game_team_member_rankings tmr on r.game_id = tmr.game_id and r.epoch_id = tmr.epoch_id and tm.team_id = tmr.team_id and r.party_id = tmr.party_id + where dispatch_strategy->>'entity_scope' = '2' + union all + select r.*, t.dispatch_strategy, null as team_id, tmr.rank as member_rank, null as team_rank, tmr.total_rewards, 'ENTITY_SCOPE_INDIVIDUALS' as entity_scope + from rewards r + join game_epochs ge on r.game_id = ge.game_id and r.epoch_id = ge.epoch_id + join transfers t on r.game_id = t.game_id and t.transfer_type = 'Recurring' + left join game_individual_rankings tmr on r.game_id = tmr.game_id and r.epoch_id = tmr.epoch_id and r.party_id = tmr.party_id + where dispatch_strategy->>'entity_scope' = '1' +) +select * +from game_rewards +; + +create or replace view current_game_reward_totals as ( + with current_game_epochs as ( + select game_id, max(epoch_id) as epoch_id + from game_reward_totals + group by game_id + ) + select grt.* + from game_reward_totals grt + join current_game_epochs cge on grt.game_id = cge.game_id and grt.epoch_id = cge.epoch_id +); + +-- +goose Down +drop view if exists current_game_reward_totals; +drop view if exists game_stats_current; +drop view if exists game_stats; +drop view if exists game_individual_rankings; +drop view if exists game_team_member_rankings; +drop view if exists game_team_rankings; +drop view if exists transfers_current; + +drop trigger if exists insert_game_reward_totals on game_reward_totals; +drop function if exists insert_game_reward_totals; +drop table if exists game_reward_totals; + +alter table transfers drop column if exists game_id; +alter table rewards drop column if exists game_id; + +-- Make sure we refresh the view to account for the new column +create view transfers_current as +( + SELECT DISTINCT ON (id, from_account_id, to_account_id) * FROM transfers ORDER BY id, from_account_id, to_account_id, vega_time DESC +); diff --git a/datanode/sqlstore/migrations/0075_additional_candle_intervals.sql b/datanode/sqlstore/migrations/0075_additional_candle_intervals.sql new file mode 100644 index 0000000000..3be58c00b3 --- /dev/null +++ b/datanode/sqlstore/migrations/0075_additional_candle_intervals.sql @@ -0,0 +1,114 @@ +-- +goose Up + +CREATE MATERIALIZED VIEW trades_candle_30_minutes + WITH (timescaledb.continuous) AS +SELECT market_id, time_bucket('30 minute', synthetic_time) AS period_start, + first(price, synthetic_time) AS open, + last(price, synthetic_time) AS close, + max(price) AS high, + min(price) AS low, + sum(size) AS volume, + sum(size * price) as notional, + last(synthetic_time, + synthetic_time) AS last_update_in_period +FROM trades +GROUP BY market_id, period_start WITH NO DATA; + +-- start_offset is set to a day, as data is append only this does not impact the processing time and ensures +-- that the CAGG data will be correct on recovery in the event of a transient outage ( < 1 day ) +SELECT add_continuous_aggregate_policy('trades_candle_30_minutes', start_offset => INTERVAL '1 day', end_offset => INTERVAL '30 minutes', schedule_interval => INTERVAL '30 minutes'); + +CREATE MATERIALIZED VIEW trades_candle_4_hours + WITH (timescaledb.continuous) AS +SELECT market_id, time_bucket('4 hours', synthetic_time) AS period_start, + first(price, synthetic_time) AS open, + last(price, synthetic_time) AS close, + max(price) AS high, + min(price) AS low, + sum(size) AS volume, + sum(size * price) as notional, + last(synthetic_time, + synthetic_time) AS last_update_in_period +FROM trades +GROUP BY market_id, period_start WITH NO DATA; + +-- start_offset is set to a day, as data is append only this does not impact the processing time and ensures +-- that the CAGG data will be correct on recovery in the event of a transient outage ( < 1 day ) +SELECT add_continuous_aggregate_policy('trades_candle_4_hours', start_offset => INTERVAL '1 day', end_offset => INTERVAL '4 hours', schedule_interval => INTERVAL '4 hours'); + +CREATE MATERIALIZED VIEW trades_candle_8_hours + WITH (timescaledb.continuous) AS +SELECT market_id, time_bucket('8 hours', synthetic_time) AS period_start, + first(price, synthetic_time) AS open, + last(price, synthetic_time) AS close, + max(price) AS high, + min(price) AS low, + sum(size) AS volume, + sum(size * price) as notional, + last(synthetic_time, + synthetic_time) AS last_update_in_period +FROM trades +GROUP BY market_id, period_start WITH NO DATA; + +-- start_offset is set to a day, as data is append only this does not impact the processing time and ensures +-- that the CAGG data will be correct on recovery in the event of a transient outage ( < 1 day ) +SELECT add_continuous_aggregate_policy('trades_candle_8_hours', start_offset => INTERVAL '1 day', end_offset => INTERVAL '8 hours', schedule_interval => INTERVAL '8 hours'); + +CREATE MATERIALIZED VIEW trades_candle_12_hours + WITH (timescaledb.continuous) AS +SELECT market_id, time_bucket('12 hours', synthetic_time) AS period_start, + first(price, synthetic_time) AS open, + last(price, synthetic_time) AS close, + max(price) AS high, + min(price) AS low, + sum(size) AS volume, + sum(size * price) as notional, + last(synthetic_time, + synthetic_time) AS last_update_in_period +FROM trades +GROUP BY market_id, period_start WITH NO DATA; + +-- start_offset is set to a day, as data is append only this does not impact the processing time and ensures +-- that the CAGG data will be correct on recovery in the event of a transient outage ( < 1 day ) +SELECT add_continuous_aggregate_policy('trades_candle_12_hours', start_offset => INTERVAL '2 days', end_offset => INTERVAL '12 hours', schedule_interval => INTERVAL '12 hours'); + +CREATE MATERIALIZED VIEW trades_candle_7_days + WITH (timescaledb.continuous) AS +SELECT market_id, time_bucket('7 days', synthetic_time) AS period_start, + first(price, synthetic_time) AS open, + last(price, synthetic_time) AS close, + max(price) AS high, + min(price) AS low, + sum(size) AS volume, + sum(size * price) as notional, + last(synthetic_time, + synthetic_time) AS last_update_in_period +FROM trades +GROUP BY market_id, period_start WITH NO DATA; + +-- start_offset is set to a day, as data is append only this does not impact the processing time and ensures +-- that the CAGG data will be correct on recovery in the event of a transient outage ( < 1 day ) +SELECT add_continuous_aggregate_policy('trades_candle_7_days', start_offset => INTERVAL '21 days', end_offset => INTERVAL '7 days', schedule_interval => INTERVAL '7 days'); + + + +-- +goose Down +SELECT remove_continuous_aggregate_policy('trades_candle_7_days', true); + +DROP MATERIALIZED VIEW trades_candle_7_days; + +SELECT remove_continuous_aggregate_policy('trades_candle_12_hours', true); + +DROP MATERIALIZED VIEW trades_candle_12_hours; + +SELECT remove_continuous_aggregate_policy('trades_candle_8_hours', true); + +DROP MATERIALIZED VIEW trades_candle_8_hours; + +SELECT remove_continuous_aggregate_policy('trades_candle_4_hours', true); + +DROP MATERIALIZED VIEW trades_candle_4_hours; + +SELECT remove_continuous_aggregate_policy('trades_candle_30_minutes', true); + +DROP MATERIALIZED VIEW trades_candle_30_minutes; diff --git a/datanode/sqlstore/migrations/0076_teams_stats.sql b/datanode/sqlstore/migrations/0076_teams_stats.sql new file mode 100644 index 0000000000..35f6458c47 --- /dev/null +++ b/datanode/sqlstore/migrations/0076_teams_stats.sql @@ -0,0 +1,77 @@ +-- +goose Up +CREATE TABLE IF NOT EXISTS teams_stats +( + team_id BYTEA NOT NULL, + party_id BYTEA NOT NULL, + at_epoch BIGINT NOT NULL, + total_quantum_volume HUGEINT NOT NULL, + total_quantum_reward NUMERIC(1000, 16) NOT NULL, + games_played JSONB NOT NULL, + PRIMARY KEY (team_id, party_id, at_epoch) +); + +CREATE INDEX idx_teams_stats_at_epoch ON teams_stats (at_epoch DESC); + +-- +goose StatementBegin +CREATE OR REPLACE FUNCTION update_teams_stats() + RETURNS + TRIGGER + LANGUAGE plpgsql +AS +$$ +DECLARE + party_team_id BYTEA; + additional_game_id JSONB; +BEGIN + -- Exclude any reward that is not associated to a game, as we only account for + -- game rewards in teams. + IF new.game_id IS NULL THEN + RETURN NULL; + END IF; + + WITH + current_team_members AS ( + SELECT DISTINCT + ON (party_id) * + FROM team_members + ORDER BY + party_id, + joined_at_epoch DESC + ) + SELECT team_id + INTO party_team_id + FROM current_team_members + WHERE party_id = new.party_id; + + -- If the party does not belong to a team, no reporting needs to be done. + IF party_team_id IS NULL THEN + RETURN NULL; + END IF; + + additional_game_id = JSONB_BUILD_OBJECT(new.game_id, TRUE); + + INSERT INTO + teams_stats (team_id, party_id, at_epoch, total_quantum_volume, total_quantum_reward, games_played) + VALUES + (party_team_id, new.party_id, new.epoch_id, 0, new.quantum_amount, additional_game_id) + ON CONFLICT (team_id, party_id, at_epoch) DO UPDATE + SET total_quantum_reward = teams_stats.total_quantum_reward + new.quantum_amount, + games_played = teams_stats.games_played || additional_game_id; + RETURN NULL; +END; +$$; +-- +goose StatementEnd + +CREATE TRIGGER update_teams_stats + AFTER INSERT + ON rewards + FOR EACH ROW +EXECUTE FUNCTION update_teams_stats(); + +-- +goose Down + +DROP TRIGGER IF EXISTS update_teams_stats ON rewards; + +DROP FUNCTION IF EXISTS update_teams_stats; + +DROP TABLE IF EXISTS teams_stats; diff --git a/datanode/sqlstore/migrations/0077_isolated_margin.sql b/datanode/sqlstore/migrations/0077_isolated_margin.sql new file mode 100644 index 0000000000..58b6d71561 --- /dev/null +++ b/datanode/sqlstore/migrations/0077_isolated_margin.sql @@ -0,0 +1,137 @@ +-- +goose Up + +-- +goose StatementBegin +DO +$$ +BEGIN + IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'margin_mode_type') THEN + CREATE TYPE margin_mode_type as enum('MARGIN_MODE_UNSPECIFIED', 'MARGIN_MODE_CROSS_MARGIN', 'MARGIN_MODE_ISOLATED_MARGIN'); + END IF; +END; +$$ +LANGUAGE plpgsql; +-- +goose StatementEnd + +alter table margin_levels + add column if not exists margin_mode margin_mode_type not null default ('MARGIN_MODE_CROSS_MARGIN'), + add column if not exists margin_factor NUMERIC not null default (0), + add column if not exists order_margin HUGEINT not null default (0), + add column if not exists order_margin_account_id bytea; + +alter table current_margin_levels + add column if not exists margin_mode margin_mode_type not null default ('MARGIN_MODE_CROSS_MARGIN'), + add column if not exists margin_factor NUMERIC not null default (0), + add column if not exists order_margin HUGEINT not null default (0), + add column if not exists order_margin_account_id bytea; + +-- +goose StatementBegin +drop trigger if exists update_current_margin_levels on margin_levels; +CREATE OR REPLACE FUNCTION update_current_margin_levels() + RETURNS TRIGGER + LANGUAGE PLPGSQL AS +$$ +BEGIN +INSERT INTO current_margin_levels(account_id, + order_margin_account_id, + timestamp, + maintenance_margin, + search_level, + initial_margin, + collateral_release_level, + order_margin, + tx_hash, + vega_time, + margin_mode, + margin_factor) VALUES(NEW.account_id, + NEW.order_margin_account_id, + NEW.timestamp, + NEW.maintenance_margin, + NEW.search_level, + NEW.initial_margin, + NEW.collateral_release_level, + NEW.order_margin, + NEW.tx_hash, + NEW.vega_time, + NEW.margin_mode, + NEW.margin_factor) + ON CONFLICT(account_id) DO UPDATE SET + order_margin_account_id=EXCLUDED.order_margin_account_id, + timestamp=EXCLUDED.timestamp, + maintenance_margin=EXCLUDED.maintenance_margin, + search_level=EXCLUDED.search_level, + initial_margin=EXCLUDED.initial_margin, + collateral_release_level=EXCLUDED.collateral_release_level, + order_margin=EXCLUDED.order_margin, + tx_hash=EXCLUDED.tx_hash, + vega_time=EXCLUDED.vega_time, + margin_mode=EXCLUDED.margin_mode, + margin_factor=EXCLUDED.margin_factor; + + +RETURN NULL; +END; +$$; +-- +goose StatementEnd + +CREATE TRIGGER update_current_margin_levels AFTER INSERT ON margin_levels FOR EACH ROW EXECUTE function update_current_margin_levels(); + +DROP VIEW all_margin_levels; +DROP MATERIALIZED VIEW conflated_margin_levels; + + +CREATE MATERIALIZED VIEW conflated_margin_levels + WITH (timescaledb.continuous, timescaledb.materialized_only = true) AS +SELECT account_id, + order_margin_account_id, + time_bucket('1 minute', vega_time) AS bucket, + last(maintenance_margin, vega_time) AS maintenance_margin, + last(search_level, vega_time) AS search_level, + last(initial_margin, vega_time) AS initial_margin, + last(collateral_release_level, vega_time) AS collateral_release_level, + last(order_margin, vega_time) AS order_margin, + last(timestamp, vega_time) AS timestamp, + last(tx_hash, vega_time) AS tx_hash, + last(vega_time, vega_time) AS vega_time, + last(margin_mode, vega_time) AS margin_mode, + last(margin_factor, vega_time) AS margin_factor +FROM margin_levels +GROUP BY account_id, order_margin_account_id, bucket WITH NO DATA; + +-- start_offset is set to a day, as data is append only this does not impact the processing time and ensures +-- that the CAGG data will be correct on recovery in the event of a transient outage ( < 1 day ) +SELECT add_continuous_aggregate_policy('conflated_margin_levels', start_offset => INTERVAL '1 day', + end_offset => INTERVAL '1 minute', schedule_interval => INTERVAL '1 minute'); + +CREATE VIEW all_margin_levels AS +( +SELECT margin_levels.account_id, + margin_levels.order_margin_account_id, + margin_levels."timestamp", + margin_levels.maintenance_margin, + margin_levels.search_level, + margin_levels.initial_margin, + margin_levels.collateral_release_level, + margin_levels.order_margin, + margin_levels.tx_hash, + margin_levels.vega_time, + margin_levels.margin_mode, + margin_levels.margin_factor +FROM margin_levels +UNION ALL +SELECT conflated_margin_levels.account_id, + conflated_margin_levels.order_margin_account_id, + conflated_margin_levels."timestamp", + conflated_margin_levels.maintenance_margin, + conflated_margin_levels.search_level, + conflated_margin_levels.initial_margin, + conflated_margin_levels.collateral_release_level, + conflated_margin_levels.order_margin, + conflated_margin_levels.tx_hash, + conflated_margin_levels.vega_time, + conflated_margin_levels.margin_mode, + conflated_margin_levels.margin_factor +FROM conflated_margin_levels +WHERE conflated_margin_levels.vega_time < (SELECT coalesce(min(margin_levels.vega_time), 'infinity') FROM margin_levels)); + +-- +goose Down +-- nothing to do, we're not going to convert it back diff --git a/datanode/sqlstore/migrations/0078_market_data_next_network_closeout.sql b/datanode/sqlstore/migrations/0078_market_data_next_network_closeout.sql new file mode 100644 index 0000000000..9f03454456 --- /dev/null +++ b/datanode/sqlstore/migrations/0078_market_data_next_network_closeout.sql @@ -0,0 +1,85 @@ +-- +goose Up + +alter table market_data add column if not exists next_network_closeout timestamp with time zone not null default ('1970-01-01 00:00:00Z'); +alter table current_market_data add column if not exists next_network_closeout timestamp with time zone not null default ('1970-01-01 00:00:00Z'); + +-- +goose StatementBegin +CREATE OR REPLACE FUNCTION update_current_market_data() + RETURNS TRIGGER + LANGUAGE PLPGSQL AS +$$ +BEGIN +INSERT INTO current_market_data(synthetic_time,tx_hash,vega_time,seq_num,market,mark_price,best_bid_price,best_bid_volume, + best_offer_price,best_offer_volume,best_static_bid_price,best_static_bid_volume, + best_static_offer_price,best_static_offer_volume,mid_price,static_mid_price,open_interest, + auction_end,auction_start,indicative_price,indicative_volume,market_trading_mode, + auction_trigger,extension_trigger,target_stake,supplied_stake,price_monitoring_bounds, + market_value_proxy,liquidity_provider_fee_shares,market_state,next_mark_to_market, market_growth, last_traded_price, product_data, liquidity_provider_sla, next_network_closeout) +VALUES(NEW.synthetic_time, NEW.tx_hash, NEW.vega_time, NEW.seq_num, NEW.market, + NEW.mark_price, NEW.best_bid_price, NEW.best_bid_volume, NEW.best_offer_price, + NEW.best_offer_volume, NEW.best_static_bid_price, NEW.best_static_bid_volume, + NEW.best_static_offer_price, NEW.best_static_offer_volume, NEW.mid_price, + NEW.static_mid_price, NEW.open_interest, NEW.auction_end, NEW.auction_start, + NEW.indicative_price, NEW.indicative_volume, NEW.market_trading_mode, + NEW.auction_trigger, NEW.extension_trigger, NEW.target_stake, NEW.supplied_stake, + NEW.price_monitoring_bounds, NEW.market_value_proxy, + NEW.liquidity_provider_fee_shares, NEW.market_state, NEW.next_mark_to_market, NEW.market_growth, NEW.last_traded_price, NEW.product_data, NEW.liquidity_provider_sla, NEW.next_network_closeout) + ON CONFLICT(market) DO UPDATE SET + synthetic_time=EXCLUDED.synthetic_time,tx_hash=EXCLUDED.tx_hash,vega_time=EXCLUDED.vega_time,seq_num=EXCLUDED.seq_num,market=EXCLUDED.market,mark_price=EXCLUDED.mark_price, + best_bid_price=EXCLUDED.best_bid_price,best_bid_volume=EXCLUDED.best_bid_volume,best_offer_price=EXCLUDED.best_offer_price,best_offer_volume=EXCLUDED.best_offer_volume, + best_static_bid_price=EXCLUDED.best_static_bid_price,best_static_bid_volume=EXCLUDED.best_static_bid_volume,best_static_offer_price=EXCLUDED.best_static_offer_price, + best_static_offer_volume=EXCLUDED.best_static_offer_volume,mid_price=EXCLUDED.mid_price,static_mid_price=EXCLUDED.static_mid_price,open_interest=EXCLUDED.open_interest, + auction_end=EXCLUDED.auction_end,auction_start=EXCLUDED.auction_start,indicative_price=EXCLUDED.indicative_price,indicative_volume=EXCLUDED.indicative_volume, + market_trading_mode=EXCLUDED.market_trading_mode,auction_trigger=EXCLUDED.auction_trigger,extension_trigger=EXCLUDED.extension_trigger,target_stake=EXCLUDED.target_stake, + supplied_stake=EXCLUDED.supplied_stake,price_monitoring_bounds=EXCLUDED.price_monitoring_bounds, + market_value_proxy=EXCLUDED.market_value_proxy,liquidity_provider_fee_shares=EXCLUDED.liquidity_provider_fee_shares,market_state=EXCLUDED.market_state, + next_mark_to_market=EXCLUDED.next_mark_to_market,market_growth=EXCLUDED.market_growth,last_traded_price=EXCLUDED.last_traded_price, + product_data=EXCLUDED.product_data,liquidity_provider_sla=EXCLUDED.liquidity_provider_sla,next_network_closeout=EXCLUDED.next_network_closeout; + +RETURN NULL; +END; +$$; +-- +goose StatementEnd + +-- +goose Down + + +alter table current_market_data drop column if exists next_network_closeout; +alter table market_data drop column if exists next_network_closeout; + +-- +goose StatementBegin +CREATE OR REPLACE FUNCTION update_current_market_data() + RETURNS TRIGGER + LANGUAGE PLPGSQL AS +$$ +BEGIN +INSERT INTO current_market_data(synthetic_time,tx_hash,vega_time,seq_num,market,mark_price,best_bid_price,best_bid_volume, + best_offer_price,best_offer_volume,best_static_bid_price,best_static_bid_volume, + best_static_offer_price,best_static_offer_volume,mid_price,static_mid_price,open_interest, + auction_end,auction_start,indicative_price,indicative_volume,market_trading_mode, + auction_trigger,extension_trigger,target_stake,supplied_stake,price_monitoring_bounds, + market_value_proxy,liquidity_provider_fee_shares,market_state,next_mark_to_market, market_growth, last_traded_price, product_data, liquidity_provider_sla) +VALUES(NEW.synthetic_time, NEW.tx_hash, NEW.vega_time, NEW.seq_num, NEW.market, + NEW.mark_price, NEW.best_bid_price, NEW.best_bid_volume, NEW.best_offer_price, + NEW.best_offer_volume, NEW.best_static_bid_price, NEW.best_static_bid_volume, + NEW.best_static_offer_price, NEW.best_static_offer_volume, NEW.mid_price, + NEW.static_mid_price, NEW.open_interest, NEW.auction_end, NEW.auction_start, + NEW.indicative_price, NEW.indicative_volume, NEW.market_trading_mode, + NEW.auction_trigger, NEW.extension_trigger, NEW.target_stake, NEW.supplied_stake, + NEW.price_monitoring_bounds, NEW.market_value_proxy, + NEW.liquidity_provider_fee_shares, NEW.market_state, NEW.next_mark_to_market, NEW.market_growth, NEW.last_traded_price, NEW.product_data, NEW.liquidity_provider_sla) + ON CONFLICT(market) DO UPDATE SET + synthetic_time=EXCLUDED.synthetic_time,tx_hash=EXCLUDED.tx_hash,vega_time=EXCLUDED.vega_time,seq_num=EXCLUDED.seq_num,market=EXCLUDED.market,mark_price=EXCLUDED.mark_price, + best_bid_price=EXCLUDED.best_bid_price,best_bid_volume=EXCLUDED.best_bid_volume,best_offer_price=EXCLUDED.best_offer_price,best_offer_volume=EXCLUDED.best_offer_volume, + best_static_bid_price=EXCLUDED.best_static_bid_price,best_static_bid_volume=EXCLUDED.best_static_bid_volume,best_static_offer_price=EXCLUDED.best_static_offer_price, + best_static_offer_volume=EXCLUDED.best_static_offer_volume,mid_price=EXCLUDED.mid_price,static_mid_price=EXCLUDED.static_mid_price,open_interest=EXCLUDED.open_interest, + auction_end=EXCLUDED.auction_end,auction_start=EXCLUDED.auction_start,indicative_price=EXCLUDED.indicative_price,indicative_volume=EXCLUDED.indicative_volume, + market_trading_mode=EXCLUDED.market_trading_mode,auction_trigger=EXCLUDED.auction_trigger,extension_trigger=EXCLUDED.extension_trigger,target_stake=EXCLUDED.target_stake, + supplied_stake=EXCLUDED.supplied_stake,price_monitoring_bounds=EXCLUDED.price_monitoring_bounds, + market_value_proxy=EXCLUDED.market_value_proxy,liquidity_provider_fee_shares=EXCLUDED.liquidity_provider_fee_shares,market_state=EXCLUDED.market_state, + next_mark_to_market=EXCLUDED.next_mark_to_market,market_growth=EXCLUDED.market_growth,last_traded_price=EXCLUDED.last_traded_price,product_data=EXCLUDED.product_data,liquidity_provider_sla=EXCLUDED.liquidity_provider_sla; + +RETURN NULL; +END; +$$; +-- +goose StatementEnd diff --git a/datanode/sqlstore/migrations/0079_stop_orders_linked_to_order_or_position.sql b/datanode/sqlstore/migrations/0079_stop_orders_linked_to_order_or_position.sql new file mode 100644 index 0000000000..5131ce64e1 --- /dev/null +++ b/datanode/sqlstore/migrations/0079_stop_orders_linked_to_order_or_position.sql @@ -0,0 +1,11 @@ +-- +goose Up + +alter table stop_orders + add column if not exists size_override_setting int not null default 0, + add column if not exists size_override_value varchar null; + +-- +goose Down + +alter table stop_orders + drop column if exists size_override_setting, + drop column if exists size_override_value; diff --git a/datanode/sqlstore/migrations/0080_batch_proposals.sql b/datanode/sqlstore/migrations/0080_batch_proposals.sql new file mode 100644 index 0000000000..a7efed8db5 --- /dev/null +++ b/datanode/sqlstore/migrations/0080_batch_proposals.sql @@ -0,0 +1,39 @@ +-- +goose Up + +ALTER TABLE proposals + ADD COLUMN batch_id BYTEA, + ADD COLUMN batch_terms JSONB DEFAULT '{}' NOT NULL, + ALTER COLUMN terms DROP NOT NULL; + +CREATE INDEX ON proposals (batch_id); +ALTER TYPE proposal_error ADD VALUE IF NOT EXISTS 'PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED'; +ALTER TYPE proposal_error ADD VALUE IF NOT EXISTS 'PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED'; + +CREATE OR REPLACE VIEW proposals_current AS ( + SELECT DISTINCT ON (id) * FROM proposals ORDER BY id, vega_time DESC +); + +ALTER TABLE votes ADD COLUMN per_market_equity_like_share_weight JSONB; + +CREATE OR REPLACE VIEW votes_current AS ( + SELECT DISTINCT ON (proposal_id, party_id) * FROM votes ORDER BY proposal_id, party_id, vega_time DESC +); + +-- +goose Down + +DROP INDEX IF EXISTS proposals_idx_batch_id; +DROP VIEW proposals_current; +ALTER TABLE proposals + DROP COLUMN IF EXISTS batch_id, + DROP COLUMN IF EXISTS batch_terms; + +CREATE OR REPLACE VIEW proposals_current AS ( + SELECT DISTINCT ON (id) * FROM proposals ORDER BY id, vega_time DESC +); + +DROP VIEW votes_current; +ALTER TABLE votes DROP COLUMN per_market_equity_like_share_weight; + +CREATE OR REPLACE VIEW votes_current AS ( + SELECT DISTINCT ON (proposal_id, party_id) * FROM votes ORDER BY proposal_id, party_id, vega_time DESC +); diff --git a/datanode/sqlstore/migrations/0081_margin_modes.sql b/datanode/sqlstore/migrations/0081_margin_modes.sql new file mode 100644 index 0000000000..dba6b27dcc --- /dev/null +++ b/datanode/sqlstore/migrations/0081_margin_modes.sql @@ -0,0 +1,16 @@ +-- +goose Up +CREATE TABLE IF NOT EXISTS party_margin_modes +( + market_id BYTEA NOT NULL, + party_id BYTEA NOT NULL, + at_epoch BIGINT NOT NULL, + margin_mode INTEGER NOT NULL, + margin_factor NUMERIC(1000, 16) NULL, + min_theoretical_margin_factor NUMERIC(1000, 16) NULL, + max_theoretical_leverage NUMERIC(1000, 16) NULL, + PRIMARY KEY (market_id, party_id) +); + +-- +goose Down + +DROP TABLE IF EXISTS party_margin_modes; diff --git a/datanode/sqlstore/migrations/0082_teams_allow_list.sql b/datanode/sqlstore/migrations/0082_teams_allow_list.sql new file mode 100644 index 0000000000..3f607b157f --- /dev/null +++ b/datanode/sqlstore/migrations/0082_teams_allow_list.sql @@ -0,0 +1,8 @@ +-- +goose Up +ALTER TABLE teams + ADD COLUMN IF NOT EXISTS allow_list JSONB; + +-- +goose Down + +ALTER TABLE teams + DROP COLUMN IF EXISTS allow_list; diff --git a/datanode/sqlstore/migrations/0083_mark_price.sql b/datanode/sqlstore/migrations/0083_mark_price.sql new file mode 100644 index 0000000000..694167e0f0 --- /dev/null +++ b/datanode/sqlstore/migrations/0083_mark_price.sql @@ -0,0 +1,109 @@ +-- +goose Up +create type composite_price_type as enum('COMPOSITE_PRICE_TYPE_UNSPECIFIED','COMPOSITE_PRICE_TYPE_WEIGHTED','COMPOSITE_PRICE_TYPE_MEDIAN','COMPOSITE_PRICE_TYPE_LAST_TRADE'); +alter table market_data add column if not exists mark_price_type composite_price_type not null default('COMPOSITE_PRICE_TYPE_LAST_TRADE'); +alter table current_market_data add column if not exists mark_price_type composite_price_type; + +update current_market_data set mark_price_type = 'COMPOSITE_PRICE_TYPE_LAST_TRADE'; + +alter table current_market_data alter mark_price_type set not null; + +-- +goose StatementBegin +UPDATE proposals +SET terms = jsonb_set( + terms, + '{terms, updateMarket, changes}', + terms #> '{terms, updateMarket, changes}' || '{"markPriceConfiguration": {"decayWeight": "0", "decayPower": 0, "cashAmount":"0","compositePriceType":"COMPOSITE_PRICE_TYPE_LAST_TRADE"}}' +) +WHERE terms @> '{"terms": {"updateMarket": {}}}'; + +UPDATE proposals +SET terms = jsonb_set( + terms, + '{terms, newMarket, changes}', + terms #> '{terms, newMarket, changes}' || '{"markPriceConfiguration": {"decayWeight": "0", "decayPower": 0, "cashAmount":"0","compositePriceType":"COMPOSITE_PRICE_TYPE_LAST_TRADE"}}' +) +WHERE terms @> '{"terms": {"newMarket": {}}}'; + + + +CREATE OR REPLACE FUNCTION update_current_market_data() + RETURNS TRIGGER + LANGUAGE PLPGSQL AS +$$ +BEGIN +INSERT INTO current_market_data(synthetic_time,tx_hash,vega_time,seq_num,market,mark_price,mark_price_type,best_bid_price,best_bid_volume, + best_offer_price,best_offer_volume,best_static_bid_price,best_static_bid_volume, + best_static_offer_price,best_static_offer_volume,mid_price,static_mid_price,open_interest, + auction_end,auction_start,indicative_price,indicative_volume,market_trading_mode, + auction_trigger,extension_trigger,target_stake,supplied_stake,price_monitoring_bounds, + market_value_proxy,liquidity_provider_fee_shares,market_state,next_mark_to_market, market_growth, last_traded_price, product_data, liquidity_provider_sla, next_network_closeout) +VALUES(NEW.synthetic_time, NEW.tx_hash, NEW.vega_time, NEW.seq_num, NEW.market, + NEW.mark_price, NEW.mark_price_type, NEW.best_bid_price, NEW.best_bid_volume, NEW.best_offer_price, + NEW.best_offer_volume, NEW.best_static_bid_price, NEW.best_static_bid_volume, + NEW.best_static_offer_price, NEW.best_static_offer_volume, NEW.mid_price, + NEW.static_mid_price, NEW.open_interest, NEW.auction_end, NEW.auction_start, + NEW.indicative_price, NEW.indicative_volume, NEW.market_trading_mode, + NEW.auction_trigger, NEW.extension_trigger, NEW.target_stake, NEW.supplied_stake, + NEW.price_monitoring_bounds, NEW.market_value_proxy, + NEW.liquidity_provider_fee_shares, NEW.market_state, NEW.next_mark_to_market, NEW.market_growth, NEW.last_traded_price, NEW.product_data, NEW.liquidity_provider_sla, NEW.next_network_closeout) + ON CONFLICT(market) DO UPDATE SET + synthetic_time=EXCLUDED.synthetic_time,tx_hash=EXCLUDED.tx_hash,vega_time=EXCLUDED.vega_time,seq_num=EXCLUDED.seq_num,market=EXCLUDED.market,mark_price=EXCLUDED.mark_price, + mark_price_type=EXCLUDED.mark_price_type, + best_bid_price=EXCLUDED.best_bid_price,best_bid_volume=EXCLUDED.best_bid_volume,best_offer_price=EXCLUDED.best_offer_price,best_offer_volume=EXCLUDED.best_offer_volume, + best_static_bid_price=EXCLUDED.best_static_bid_price,best_static_bid_volume=EXCLUDED.best_static_bid_volume,best_static_offer_price=EXCLUDED.best_static_offer_price, + best_static_offer_volume=EXCLUDED.best_static_offer_volume,mid_price=EXCLUDED.mid_price,static_mid_price=EXCLUDED.static_mid_price,open_interest=EXCLUDED.open_interest, + auction_end=EXCLUDED.auction_end,auction_start=EXCLUDED.auction_start,indicative_price=EXCLUDED.indicative_price,indicative_volume=EXCLUDED.indicative_volume, + market_trading_mode=EXCLUDED.market_trading_mode,auction_trigger=EXCLUDED.auction_trigger,extension_trigger=EXCLUDED.extension_trigger,target_stake=EXCLUDED.target_stake, + supplied_stake=EXCLUDED.supplied_stake,price_monitoring_bounds=EXCLUDED.price_monitoring_bounds, + market_value_proxy=EXCLUDED.market_value_proxy,liquidity_provider_fee_shares=EXCLUDED.liquidity_provider_fee_shares,market_state=EXCLUDED.market_state, + next_mark_to_market=EXCLUDED.next_mark_to_market,market_growth=EXCLUDED.market_growth,last_traded_price=EXCLUDED.last_traded_price, + product_data=EXCLUDED.product_data,liquidity_provider_sla=EXCLUDED.liquidity_provider_sla,next_network_closeout=EXCLUDED.next_network_closeout; + +RETURN NULL; +END; +$$; +-- +goose StatementEnd + +-- +goose Down + +alter table current_market_data drop column if exists mark_price_type; +alter table market_data drop column if exists mark_price_type; +drop type composite_price_type; + +-- +goose StatementBegin +CREATE OR REPLACE FUNCTION update_current_market_data() + RETURNS TRIGGER + LANGUAGE PLPGSQL AS +$$ +BEGIN +INSERT INTO current_market_data(synthetic_time,tx_hash,vega_time,seq_num,market,mark_price,best_bid_price,best_bid_volume, + best_offer_price,best_offer_volume,best_static_bid_price,best_static_bid_volume, + best_static_offer_price,best_static_offer_volume,mid_price,static_mid_price,open_interest, + auction_end,auction_start,indicative_price,indicative_volume,market_trading_mode, + auction_trigger,extension_trigger,target_stake,supplied_stake,price_monitoring_bounds, + market_value_proxy,liquidity_provider_fee_shares,market_state,next_mark_to_market, market_growth, last_traded_price, product_data, liquidity_provider_sla, next_network_closeout) +VALUES(NEW.synthetic_time, NEW.tx_hash, NEW.vega_time, NEW.seq_num, NEW.market, + NEW.mark_price, NEW.best_bid_price, NEW.best_bid_volume, NEW.best_offer_price, + NEW.best_offer_volume, NEW.best_static_bid_price, NEW.best_static_bid_volume, + NEW.best_static_offer_price, NEW.best_static_offer_volume, NEW.mid_price, + NEW.static_mid_price, NEW.open_interest, NEW.auction_end, NEW.auction_start, + NEW.indicative_price, NEW.indicative_volume, NEW.market_trading_mode, + NEW.auction_trigger, NEW.extension_trigger, NEW.target_stake, NEW.supplied_stake, + NEW.price_monitoring_bounds, NEW.market_value_proxy, + NEW.liquidity_provider_fee_shares, NEW.market_state, NEW.next_mark_to_market, NEW.market_growth, NEW.last_traded_price, NEW.product_data, NEW.liquidity_provider_sla, NEW.next_network_closeout) + ON CONFLICT(market) DO UPDATE SET + synthetic_time=EXCLUDED.synthetic_time,tx_hash=EXCLUDED.tx_hash,vega_time=EXCLUDED.vega_time,seq_num=EXCLUDED.seq_num,market=EXCLUDED.market,mark_price=EXCLUDED.mark_price, + best_bid_price=EXCLUDED.best_bid_price,best_bid_volume=EXCLUDED.best_bid_volume,best_offer_price=EXCLUDED.best_offer_price,best_offer_volume=EXCLUDED.best_offer_volume, + best_static_bid_price=EXCLUDED.best_static_bid_price,best_static_bid_volume=EXCLUDED.best_static_bid_volume,best_static_offer_price=EXCLUDED.best_static_offer_price, + best_static_offer_volume=EXCLUDED.best_static_offer_volume,mid_price=EXCLUDED.mid_price,static_mid_price=EXCLUDED.static_mid_price,open_interest=EXCLUDED.open_interest, + auction_end=EXCLUDED.auction_end,auction_start=EXCLUDED.auction_start,indicative_price=EXCLUDED.indicative_price,indicative_volume=EXCLUDED.indicative_volume, + market_trading_mode=EXCLUDED.market_trading_mode,auction_trigger=EXCLUDED.auction_trigger,extension_trigger=EXCLUDED.extension_trigger,target_stake=EXCLUDED.target_stake, + supplied_stake=EXCLUDED.supplied_stake,price_monitoring_bounds=EXCLUDED.price_monitoring_bounds, + market_value_proxy=EXCLUDED.market_value_proxy,liquidity_provider_fee_shares=EXCLUDED.liquidity_provider_fee_shares,market_state=EXCLUDED.market_state, + next_mark_to_market=EXCLUDED.next_mark_to_market,market_growth=EXCLUDED.market_growth,last_traded_price=EXCLUDED.last_traded_price, + product_data=EXCLUDED.product_data,liquidity_provider_sla=EXCLUDED.liquidity_provider_sla,next_network_closeout=EXCLUDED.next_network_closeout; + +RETURN NULL; +END; +$$; +-- +goose StatementEnd diff --git a/datanode/sqlstore/migrations/0084_add_mark_price_config_to_market.sql b/datanode/sqlstore/migrations/0084_add_mark_price_config_to_market.sql new file mode 100644 index 0000000000..9a7e7f9670 --- /dev/null +++ b/datanode/sqlstore/migrations/0084_add_mark_price_config_to_market.sql @@ -0,0 +1,77 @@ +-- +goose Up + +ALTER TABLE markets ADD COLUMN IF NOT EXISTS mark_price_configuration jsonb; + +ALTER TABLE markets_current ADD COLUMN IF NOT EXISTS mark_price_configuration jsonb; + +-- +goose StatementBegin +CREATE OR REPLACE FUNCTION update_current_markets() + RETURNS TRIGGER + LANGUAGE PLPGSQL AS +$$ +BEGIN +INSERT INTO markets_current(id,tx_hash,vega_time,instrument_id,tradable_instrument,decimal_places,fees,opening_auction,price_monitoring_settings,liquidity_monitoring_parameters,trading_mode,state,market_timestamps,position_decimal_places,lp_price_range, linear_slippage_factor, quadratic_slippage_factor, parent_market_id, insurance_pool_fraction, liquidity_sla_parameters, liquidation_strategy, mark_price_configuration) +VALUES (NEW.id,NEW.tx_hash,NEW.vega_time,NEW.instrument_id,NEW.tradable_instrument,NEW.decimal_places,NEW.fees,NEW.opening_auction,NEW.price_monitoring_settings,NEW.liquidity_monitoring_parameters,NEW.trading_mode,NEW.state,NEW.market_timestamps,NEW.position_decimal_places,NEW.lp_price_range, NEW.linear_slippage_factor, NEW.quadratic_slippage_factor, NEW.parent_market_id, NEW.insurance_pool_fraction, NEW.liquidity_sla_parameters, NEW.liquidation_strategy, NEW.mark_price_configuration) + ON CONFLICT(id) DO UPDATE SET + tx_hash=EXCLUDED.tx_hash, + instrument_id=EXCLUDED.instrument_id, + tradable_instrument=EXCLUDED.tradable_instrument, + decimal_places=EXCLUDED.decimal_places, + fees=EXCLUDED.fees, + opening_auction=EXCLUDED.opening_auction, + price_monitoring_settings=EXCLUDED.price_monitoring_settings, + liquidity_monitoring_parameters=EXCLUDED.liquidity_monitoring_parameters, + trading_mode=EXCLUDED.trading_mode, + state=EXCLUDED.state, + market_timestamps=EXCLUDED.market_timestamps, + position_decimal_places=EXCLUDED.position_decimal_places, + lp_price_range=EXCLUDED.lp_price_range, + linear_slippage_factor=EXCLUDED.linear_slippage_factor, + quadratic_slippage_factor=EXCLUDED.quadratic_slippage_factor, + vega_time=EXCLUDED.vega_time, + parent_market_id=EXCLUDED.parent_market_id, + insurance_pool_fraction=EXCLUDED.insurance_pool_fraction, + liquidity_sla_parameters=EXCLUDED.liquidity_sla_parameters, + liquidation_strategy=EXCLUDED.liquidation_strategy, + mark_price_configuration=EXCLUDED.mark_price_configuration; +RETURN NULL; +END; +$$; +-- +goose StatementEnd + + +-- +goose Down + +-- +goose StatementBegin +CREATE OR REPLACE FUNCTION update_current_markets() + RETURNS TRIGGER + LANGUAGE PLPGSQL AS +$$ +BEGIN +INSERT INTO markets_current(id,tx_hash,vega_time,instrument_id,tradable_instrument,decimal_places,fees,opening_auction,price_monitoring_settings,liquidity_monitoring_parameters,trading_mode,state,market_timestamps,position_decimal_places,lp_price_range, linear_slippage_factor, quadratic_slippage_factor, parent_market_id, insurance_pool_fraction, liquidity_sla_parameters, liquidation_strategy) +VALUES (NEW.id,NEW.tx_hash,NEW.vega_time,NEW.instrument_id,NEW.tradable_instrument,NEW.decimal_places,NEW.fees,NEW.opening_auction,NEW.price_monitoring_settings,NEW.liquidity_monitoring_parameters,NEW.trading_mode,NEW.state,NEW.market_timestamps,NEW.position_decimal_places,NEW.lp_price_range, NEW.linear_slippage_factor, NEW.quadratic_slippage_factor, NEW.parent_market_id, NEW.insurance_pool_fraction, NEW.liquidity_sla_parameters, NEW.liquidation_strategy) + ON CONFLICT(id) DO UPDATE SET + tx_hash=EXCLUDED.tx_hash, + instrument_id=EXCLUDED.instrument_id, + tradable_instrument=EXCLUDED.tradable_instrument, + decimal_places=EXCLUDED.decimal_places, + fees=EXCLUDED.fees, + opening_auction=EXCLUDED.opening_auction, + price_monitoring_settings=EXCLUDED.price_monitoring_settings, + liquidity_monitoring_parameters=EXCLUDED.liquidity_monitoring_parameters, + trading_mode=EXCLUDED.trading_mode, + state=EXCLUDED.state, + market_timestamps=EXCLUDED.market_timestamps, + position_decimal_places=EXCLUDED.position_decimal_places, + lp_price_range=EXCLUDED.lp_price_range, + linear_slippage_factor=EXCLUDED.linear_slippage_factor, + quadratic_slippage_factor=EXCLUDED.quadratic_slippage_factor, + vega_time=EXCLUDED.vega_time, + parent_market_id=EXCLUDED.parent_market_id, + insurance_pool_fraction=EXCLUDED.insurance_pool_fraction, + liquidity_sla_parameters=EXCLUDED.liquidity_sla_parameters, + liquidation_strategy=EXCLUDED.liquidation_strategy; +RETURN NULL; +END; +$$; +-- +goose StatementEnd diff --git a/datanode/sqlstore/migrations/0085_stop_order_reject_reason_oco_expiry_times_much_not_be_the_same.sql b/datanode/sqlstore/migrations/0085_stop_order_reject_reason_oco_expiry_times_much_not_be_the_same.sql new file mode 100644 index 0000000000..38cfad6956 --- /dev/null +++ b/datanode/sqlstore/migrations/0085_stop_order_reject_reason_oco_expiry_times_much_not_be_the_same.sql @@ -0,0 +1,7 @@ +-- +goose Up + +ALTER TYPE stop_order_rejection_reason ADD VALUE IF NOT EXISTS 'REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES'; + +-- +goose Down + +-- Do nothing, if it already exists it won't matter and won't be recreated by the up migration. diff --git a/datanode/sqlstore/migrations/0086_party_profile.sql b/datanode/sqlstore/migrations/0086_party_profile.sql new file mode 100644 index 0000000000..a5a72786f6 --- /dev/null +++ b/datanode/sqlstore/migrations/0086_party_profile.sql @@ -0,0 +1,17 @@ +-- +goose Up + +ALTER TABLE parties + ADD COLUMN IF NOT EXISTS alias VARCHAR(32) NOT NULL DEFAULT ''; + +ALTER TABLE parties + ADD COLUMN IF NOT EXISTS metadata JSONB; + +UPDATE parties SET alias = 'network' WHERE id = '\x03'; + +-- +goose Down + +ALTER TABLE parties + DROP COLUMN IF EXISTS alias; + +ALTER TABLE parties + DROP COLUMN IF EXISTS metadata; diff --git a/datanode/sqlstore/migrations/0087_current_referees.sql b/datanode/sqlstore/migrations/0087_current_referees.sql new file mode 100644 index 0000000000..e7dd37d06c --- /dev/null +++ b/datanode/sqlstore/migrations/0087_current_referees.sql @@ -0,0 +1,27 @@ +-- +goose Up + +CREATE UNIQUE INDEX referral_set_referees_pkey_update ON referral_set_referees(referral_set_id, referee, at_epoch); + +ALTER TABLE referral_set_referees DROP CONSTRAINT referral_set_referees_pkey; + +ALTER TABLE referral_set_referees + ADD CONSTRAINT referral_set_referees_pkey PRIMARY KEY USING INDEX referral_set_referees_pkey_update; + +CREATE VIEW current_referral_set_referees AS +SELECT DISTINCT ON (referee) * +FROM referral_set_referees +ORDER BY + referee, + at_epoch DESC; + +-- +goose Down + +DROP VIEW IF EXISTS current_referral_set_referees; + +CREATE UNIQUE INDEX referral_set_referees_pkey_update ON referral_set_referees(referral_set_id, referee); + +ALTER TABLE referral_set_referees DROP CONSTRAINT referral_set_referees_pkey; + +ALTER TABLE referral_set_referees + ADD CONSTRAINT referral_set_referees_pkey PRIMARY KEY USING INDEX referral_set_referees_pkey_update; + diff --git a/datanode/sqlstore/migrations/0088_update_game_stats.sql b/datanode/sqlstore/migrations/0088_update_game_stats.sql new file mode 100644 index 0000000000..e30c945bfb --- /dev/null +++ b/datanode/sqlstore/migrations/0088_update_game_stats.sql @@ -0,0 +1,197 @@ +-- +goose Up + +create or replace view game_stats as +with + game_epochs as ( + select distinct + game_id, epoch_id + from rewards + where + game_id is not null + ), + dispatch_strategies AS ( + SELECT DISTINCT + ON (game_id) game_id, dispatch_strategy + FROM transfers + WHERE + transfer_type = 'Recurring' + ORDER BY game_id, vega_time DESC + ), + game_rewards as ( + select + r.*, t.dispatch_strategy, tm.team_id, tmr.rank as member_rank, tr.rank as team_rank, tmr.total_rewards, tr.total_rewards as team_total_rewards, 'ENTITY_SCOPE_TEAMS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + JOIN dispatch_strategies t ON r.game_id = t.game_id + AND t.dispatch_strategy ->> 'entity_scope' = '2' + join team_members tm on r.party_id = tm.party_id + left join game_team_rankings tr on r.game_id = tr.game_id + and r.epoch_id = tr.epoch_id + and tm.team_id = tr.team_id + left join game_team_member_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and tm.team_id = tmr.team_id + and r.party_id = tmr.party_id + union all + select + r.*, t.dispatch_strategy, null as team_id, tmr.rank as member_rank, null as team_rank, tmr.total_rewards, null as team_total_rewards, 'ENTITY_SCOPE_INDIVIDUALS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + JOIN dispatch_strategies t ON r.game_id = t.game_id + AND t.dispatch_strategy ->> 'entity_scope' = '1' + left join game_individual_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and r.party_id = tmr.party_id + ) +select * +from game_rewards; + +create or replace view game_stats_current as +with + game_epochs as ( + select game_id, max(epoch_id) as epoch_id + from rewards + where + game_id is not null + group by + game_id + ), + dispatch_strategies AS ( + SELECT DISTINCT + ON (game_id) game_id, dispatch_strategy + FROM transfers + WHERE + transfer_type = 'Recurring' + ORDER BY game_id, vega_time DESC + ), + game_rewards as ( + select + r.*, t.dispatch_strategy, tm.team_id, tmr.rank as member_rank, tr.rank as team_rank, tmr.total_rewards, 'ENTITY_SCOPE_TEAMS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + JOIN dispatch_strategies t ON r.game_id = t.game_id + AND t.dispatch_strategy ->> 'entity_scope' = '2' + join team_members tm on r.party_id = tm.party_id + left join game_team_rankings tr on r.game_id = tr.game_id + and r.epoch_id = tr.epoch_id + and tm.team_id = tr.team_id + left join game_team_member_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and tm.team_id = tmr.team_id + and r.party_id = tmr.party_id + union all + select + r.*, t.dispatch_strategy, null as team_id, tmr.rank as member_rank, null as team_rank, tmr.total_rewards, 'ENTITY_SCOPE_INDIVIDUALS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + JOIN dispatch_strategies t ON r.game_id = t.game_id + AND t.dispatch_strategy ->> 'entity_scope' = '1' + left join game_individual_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and r.party_id = tmr.party_id + ) +select * +from game_rewards; + +-- +goose Down + +create or replace view game_stats as +with + game_epochs as ( + select distinct + game_id, epoch_id + from rewards + where + game_id is not null + ), + game_rewards as ( + select + r.*, t.dispatch_strategy, tm.team_id, tmr.rank as member_rank, tr.rank as team_rank, tmr.total_rewards, tr.total_rewards as team_total_rewards, 'ENTITY_SCOPE_TEAMS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + join transfers t on r.game_id = t.game_id + and t.transfer_type = 'Recurring' + join team_members tm on r.party_id = tm.party_id + left join game_team_rankings tr on r.game_id = tr.game_id + and r.epoch_id = tr.epoch_id + and tm.team_id = tr.team_id + left join game_team_member_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and tm.team_id = tmr.team_id + and r.party_id = tmr.party_id + where + dispatch_strategy ->> 'entity_scope' = '2' + union all + select + r.*, t.dispatch_strategy, null as team_id, tmr.rank as member_rank, null as team_rank, tmr.total_rewards, null as team_total_rewards, 'ENTITY_SCOPE_INDIVIDUALS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + join transfers t on r.game_id = t.game_id + and t.transfer_type = 'Recurring' + left join game_individual_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and r.party_id = tmr.party_id + where + dispatch_strategy ->> 'entity_scope' = '1' + ) +select * +from game_rewards; + +create or replace view game_stats_current as +with + game_epochs as ( + select game_id, max(epoch_id) as epoch_id + from rewards + where + game_id is not null + group by + game_id + ), + game_rewards as ( + select + r.*, t.dispatch_strategy, tm.team_id, tmr.rank as member_rank, tr.rank as team_rank, tmr.total_rewards, 'ENTITY_SCOPE_TEAMS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + join transfers t on r.game_id = t.game_id + and t.transfer_type = 'Recurring' + join team_members tm on r.party_id = tm.party_id + left join game_team_rankings tr on r.game_id = tr.game_id + and r.epoch_id = tr.epoch_id + and tm.team_id = tr.team_id + left join game_team_member_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and tm.team_id = tmr.team_id + and r.party_id = tmr.party_id + where + dispatch_strategy ->> 'entity_scope' = '2' + union all + select + r.*, t.dispatch_strategy, null as team_id, tmr.rank as member_rank, null as team_rank, tmr.total_rewards, 'ENTITY_SCOPE_INDIVIDUALS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + join transfers t on r.game_id = t.game_id + and t.transfer_type = 'Recurring' + left join game_individual_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and r.party_id = tmr.party_id + where + dispatch_strategy ->> 'entity_scope' = '1' + ) +select * +from game_rewards; \ No newline at end of file diff --git a/datanode/sqlstore/migrations/0089_mark_price_state.sql b/datanode/sqlstore/migrations/0089_mark_price_state.sql new file mode 100644 index 0000000000..2e26885a29 --- /dev/null +++ b/datanode/sqlstore/migrations/0089_mark_price_state.sql @@ -0,0 +1,86 @@ +-- +goose Up +alter table market_data add column if not exists mark_price_state JSONB; +alter table current_market_data add column if not exists mark_price_state JSONB; + +-- +goose StatementBegin +CREATE OR REPLACE FUNCTION update_current_market_data() + RETURNS TRIGGER + LANGUAGE PLPGSQL AS +$$ +BEGIN +INSERT INTO current_market_data(synthetic_time,tx_hash,vega_time,seq_num,market,mark_price,mark_price_type,best_bid_price,best_bid_volume, + best_offer_price,best_offer_volume,best_static_bid_price,best_static_bid_volume, + best_static_offer_price,best_static_offer_volume,mid_price,static_mid_price,open_interest, + auction_end,auction_start,indicative_price,indicative_volume,market_trading_mode, + auction_trigger,extension_trigger,target_stake,supplied_stake,price_monitoring_bounds, + market_value_proxy,liquidity_provider_fee_shares,market_state,next_mark_to_market, market_growth, last_traded_price, product_data, liquidity_provider_sla, next_network_closeout, mark_price_state) +VALUES(NEW.synthetic_time, NEW.tx_hash, NEW.vega_time, NEW.seq_num, NEW.market, + NEW.mark_price, NEW.mark_price_type, NEW.best_bid_price, NEW.best_bid_volume, NEW.best_offer_price, + NEW.best_offer_volume, NEW.best_static_bid_price, NEW.best_static_bid_volume, + NEW.best_static_offer_price, NEW.best_static_offer_volume, NEW.mid_price, + NEW.static_mid_price, NEW.open_interest, NEW.auction_end, NEW.auction_start, + NEW.indicative_price, NEW.indicative_volume, NEW.market_trading_mode, + NEW.auction_trigger, NEW.extension_trigger, NEW.target_stake, NEW.supplied_stake, + NEW.price_monitoring_bounds, NEW.market_value_proxy, + NEW.liquidity_provider_fee_shares, NEW.market_state, NEW.next_mark_to_market, NEW.market_growth, NEW.last_traded_price, NEW.product_data, NEW.liquidity_provider_sla, NEW.next_network_closeout, NEW.mark_price_state) + ON CONFLICT(market) DO UPDATE SET + synthetic_time=EXCLUDED.synthetic_time,tx_hash=EXCLUDED.tx_hash,vega_time=EXCLUDED.vega_time,seq_num=EXCLUDED.seq_num,market=EXCLUDED.market,mark_price=EXCLUDED.mark_price, + mark_price_type=EXCLUDED.mark_price_type, + best_bid_price=EXCLUDED.best_bid_price,best_bid_volume=EXCLUDED.best_bid_volume,best_offer_price=EXCLUDED.best_offer_price,best_offer_volume=EXCLUDED.best_offer_volume, + best_static_bid_price=EXCLUDED.best_static_bid_price,best_static_bid_volume=EXCLUDED.best_static_bid_volume,best_static_offer_price=EXCLUDED.best_static_offer_price, + best_static_offer_volume=EXCLUDED.best_static_offer_volume,mid_price=EXCLUDED.mid_price,static_mid_price=EXCLUDED.static_mid_price,open_interest=EXCLUDED.open_interest, + auction_end=EXCLUDED.auction_end,auction_start=EXCLUDED.auction_start,indicative_price=EXCLUDED.indicative_price,indicative_volume=EXCLUDED.indicative_volume, + market_trading_mode=EXCLUDED.market_trading_mode,auction_trigger=EXCLUDED.auction_trigger,extension_trigger=EXCLUDED.extension_trigger,target_stake=EXCLUDED.target_stake, + supplied_stake=EXCLUDED.supplied_stake,price_monitoring_bounds=EXCLUDED.price_monitoring_bounds, + market_value_proxy=EXCLUDED.market_value_proxy,liquidity_provider_fee_shares=EXCLUDED.liquidity_provider_fee_shares,market_state=EXCLUDED.market_state, + next_mark_to_market=EXCLUDED.next_mark_to_market,market_growth=EXCLUDED.market_growth,last_traded_price=EXCLUDED.last_traded_price, + product_data=EXCLUDED.product_data,liquidity_provider_sla=EXCLUDED.liquidity_provider_sla,next_network_closeout=EXCLUDED.next_network_closeout, + mark_price_state=EXCLUDED.mark_price_state; + +RETURN NULL; +END; +$$; +-- +goose StatementEnd + +-- +goose Down +alter table current_market_data drop column if exists mark_price_state; +alter table market_data drop column if exists mark_price_state; + +-- +goose StatementBegin +CREATE OR REPLACE FUNCTION update_current_market_data() + RETURNS TRIGGER + LANGUAGE PLPGSQL AS +$$ +BEGIN +INSERT INTO current_market_data(synthetic_time,tx_hash,vega_time,seq_num,market,mark_price,mark_price_type,best_bid_price,best_bid_volume, + best_offer_price,best_offer_volume,best_static_bid_price,best_static_bid_volume, + best_static_offer_price,best_static_offer_volume,mid_price,static_mid_price,open_interest, + auction_end,auction_start,indicative_price,indicative_volume,market_trading_mode, + auction_trigger,extension_trigger,target_stake,supplied_stake,price_monitoring_bounds, + market_value_proxy,liquidity_provider_fee_shares,market_state,next_mark_to_market, market_growth, last_traded_price, product_data, liquidity_provider_sla, next_network_closeout) +VALUES(NEW.synthetic_time, NEW.tx_hash, NEW.vega_time, NEW.seq_num, NEW.market, + NEW.mark_price, NEW.mark_price_type, NEW.best_bid_price, NEW.best_bid_volume, NEW.best_offer_price, + NEW.best_offer_volume, NEW.best_static_bid_price, NEW.best_static_bid_volume, + NEW.best_static_offer_price, NEW.best_static_offer_volume, NEW.mid_price, + NEW.static_mid_price, NEW.open_interest, NEW.auction_end, NEW.auction_start, + NEW.indicative_price, NEW.indicative_volume, NEW.market_trading_mode, + NEW.auction_trigger, NEW.extension_trigger, NEW.target_stake, NEW.supplied_stake, + NEW.price_monitoring_bounds, NEW.market_value_proxy, + NEW.liquidity_provider_fee_shares, NEW.market_state, NEW.next_mark_to_market, NEW.market_growth, NEW.last_traded_price, NEW.product_data, NEW.liquidity_provider_sla, NEW.next_network_closeout) + ON CONFLICT(market) DO UPDATE SET + synthetic_time=EXCLUDED.synthetic_time,tx_hash=EXCLUDED.tx_hash,vega_time=EXCLUDED.vega_time,seq_num=EXCLUDED.seq_num,market=EXCLUDED.market,mark_price=EXCLUDED.mark_price, + mark_price_type=EXCLUDED.mark_price_type, + best_bid_price=EXCLUDED.best_bid_price,best_bid_volume=EXCLUDED.best_bid_volume,best_offer_price=EXCLUDED.best_offer_price,best_offer_volume=EXCLUDED.best_offer_volume, + best_static_bid_price=EXCLUDED.best_static_bid_price,best_static_bid_volume=EXCLUDED.best_static_bid_volume,best_static_offer_price=EXCLUDED.best_static_offer_price, + best_static_offer_volume=EXCLUDED.best_static_offer_volume,mid_price=EXCLUDED.mid_price,static_mid_price=EXCLUDED.static_mid_price,open_interest=EXCLUDED.open_interest, + auction_end=EXCLUDED.auction_end,auction_start=EXCLUDED.auction_start,indicative_price=EXCLUDED.indicative_price,indicative_volume=EXCLUDED.indicative_volume, + market_trading_mode=EXCLUDED.market_trading_mode,auction_trigger=EXCLUDED.auction_trigger,extension_trigger=EXCLUDED.extension_trigger,target_stake=EXCLUDED.target_stake, + supplied_stake=EXCLUDED.supplied_stake,price_monitoring_bounds=EXCLUDED.price_monitoring_bounds, + market_value_proxy=EXCLUDED.market_value_proxy,liquidity_provider_fee_shares=EXCLUDED.liquidity_provider_fee_shares,market_state=EXCLUDED.market_state, + next_mark_to_market=EXCLUDED.next_mark_to_market,market_growth=EXCLUDED.market_growth,last_traded_price=EXCLUDED.last_traded_price, + product_data=EXCLUDED.product_data,liquidity_provider_sla=EXCLUDED.liquidity_provider_sla,next_network_closeout=EXCLUDED.next_network_closeout; + +RETURN NULL; +END; +$$; +-- +goose StatementEnd diff --git a/datanode/sqlstore/migrations/0090_games_stats_add_quantum.sql b/datanode/sqlstore/migrations/0090_games_stats_add_quantum.sql new file mode 100644 index 0000000000..318cd4f9ad --- /dev/null +++ b/datanode/sqlstore/migrations/0090_games_stats_add_quantum.sql @@ -0,0 +1,384 @@ +-- +goose Up +alter table game_reward_totals + add column if not exists total_rewards_quantum hugeint not null default 0; + +-- Postgres is throwing hissy fits when we try to replace these views so we are forced to drop them +-- and then recreate them the way we want them + +-- as game_stats and game_stats_current has a dependency on game_team_rankings, we have to drop them +-- first or we won't be able to drop game_team_rankings +drop view if exists game_stats; +drop view if exists game_stats_current; +drop view if exists game_team_rankings; + +-- we need to drop these two as they have a dependency on game_team_rankings +create view game_team_rankings as +with team_games as ( + -- get the games where the entity scope is individuals + select distinct game_id from transfers + where dispatch_strategy ->> 'entity_scope' = '2' + and game_id is not null +), team_totals as ( + select t.game_id, + t.asset_id, + t.epoch_id, + t.team_id, + sum(t.total_rewards) as total_rewards, + sum(t.total_rewards_quantum) as total_rewards_quantum + from game_reward_totals t + join team_games g on t.game_id = g.game_id + where t.team_id != '\x' + group by t.game_id, t.asset_id, t.epoch_id, t.team_id +) + select game_id, + epoch_id, + team_id, + total_rewards, + total_rewards_quantum, + rank() over ( + partition by game_id, epoch_id order by total_rewards_quantum desc + ) as rank + from team_totals; + +drop view if exists game_team_member_rankings; +create view game_team_member_rankings as +with team_games as ( + -- get the games where the entity scope is individuals + select distinct game_id from transfers + where dispatch_strategy ->> 'entity_scope' = '2' + and game_id is not null +), team_totals as ( + select t.game_id, t.asset_id, t.team_id, t.party_id, t.epoch_id, sum(t.total_rewards) as total_rewards, sum(t.total_rewards_quantum) as total_rewards_quantum + from game_reward_totals t + join team_games g on t.game_id = g.game_id + where t.team_id != '\x' + group by t.game_id, t.asset_id, t.team_id, t.party_id, t.epoch_id +) + select game_id, + epoch_id, + team_id, + party_id, + total_rewards, + total_rewards_quantum, + rank() over ( + partition by game_id, epoch_id, team_id order by total_rewards_quantum desc + ) as rank + from team_totals; + +drop view if exists game_individual_rankings; +create view game_individual_rankings as +with individual_games as ( + -- get the games where the entity scope is individuals + select game_id from transfers + where dispatch_strategy ->> 'entity_scope' = '1' + and game_id is not null +), individual_totals as ( + -- calculate the total rewards for each individual in each individual entity scoped game + select t.game_id, t.epoch_id, t.asset_id, t.party_id, sum(t.total_rewards) as total_rewards, sum(total_rewards_quantum) as total_rewards_quantum + from game_reward_totals t + join individual_games i on t.game_id = i.game_id + group by t.game_id, t.epoch_id, t.asset_id, t.party_id +), individual_rankings as ( +-- rank the individuals for each game at each epoch + select game_id, + epoch_id, + party_id, + total_rewards_quantum, + rank() over ( + partition by game_id, epoch_id order by total_rewards_quantum desc + ) as rank + from individual_totals +) + select it.game_id, + it.epoch_id, + it.party_id, + it.total_rewards, + ir.total_rewards_quantum, + ir.rank + from individual_totals it + join individual_rankings ir on it.game_id = ir.game_id and it.epoch_id = ir.epoch_id and it.party_id = ir.party_id; + +create view game_stats as +with + game_epochs as ( + select distinct + game_id, epoch_id + from rewards + where + game_id is not null + ), + dispatch_strategies AS ( + SELECT DISTINCT + ON (game_id) game_id, dispatch_strategy + FROM transfers + WHERE + transfer_type = 'Recurring' + ORDER BY game_id, vega_time DESC + ), + game_rewards as ( + select + r.*, t.dispatch_strategy, tm.team_id, tmr.rank as member_rank, tr.rank as team_rank, tmr.total_rewards, tmr.total_rewards_quantum, + tr.total_rewards as team_total_rewards, tr.total_rewards_quantum as team_total_rewards_quantum, 'ENTITY_SCOPE_TEAMS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + JOIN dispatch_strategies t ON r.game_id = t.game_id + AND t.dispatch_strategy ->> 'entity_scope' = '2' + join team_members tm on r.party_id = tm.party_id + left join game_team_rankings tr on r.game_id = tr.game_id + and r.epoch_id = tr.epoch_id + and tm.team_id = tr.team_id + left join game_team_member_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and tm.team_id = tmr.team_id + and r.party_id = tmr.party_id + union all + select + r.*, t.dispatch_strategy, null as team_id, tmr.rank as member_rank, null as team_rank, tmr.total_rewards, tmr.total_rewards_quantum, + null as team_total_rewards, null as team_total_rewards_quantum, 'ENTITY_SCOPE_INDIVIDUALS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + JOIN dispatch_strategies t ON r.game_id = t.game_id + AND t.dispatch_strategy ->> 'entity_scope' = '1' + left join game_individual_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and r.party_id = tmr.party_id + ) +select * +from game_rewards; + +create view game_stats_current as +with + game_epochs as ( + select game_id, max(epoch_id) as epoch_id + from rewards + where + game_id is not null + group by + game_id + ), + dispatch_strategies AS ( + SELECT DISTINCT + ON (game_id) game_id, dispatch_strategy + FROM transfers + WHERE + transfer_type = 'Recurring' + ORDER BY game_id, vega_time DESC + ), + game_rewards as ( + select + r.*, t.dispatch_strategy, tm.team_id, tmr.rank as member_rank, tr.rank as team_rank, tmr.total_rewards, tmr.total_rewards_quantum, + tr.total_rewards as team_total_rewards, tr.total_rewards_quantum as team_total_rewards_quantum, 'ENTITY_SCOPE_TEAMS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + JOIN dispatch_strategies t ON r.game_id = t.game_id + AND t.dispatch_strategy ->> 'entity_scope' = '2' + join team_members tm on r.party_id = tm.party_id + left join game_team_rankings tr on r.game_id = tr.game_id + and r.epoch_id = tr.epoch_id + and tm.team_id = tr.team_id + left join game_team_member_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and tm.team_id = tmr.team_id + and r.party_id = tmr.party_id + union all + select + r.*, t.dispatch_strategy, null as team_id, tmr.rank as member_rank, null as team_rank, tmr.total_rewards, tmr.total_rewards_quantum, + null as team_total_rewards, null as team_total_rewards_quantum, 'ENTITY_SCOPE_INDIVIDUALS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + JOIN dispatch_strategies t ON r.game_id = t.game_id + AND t.dispatch_strategy ->> 'entity_scope' = '1' + left join game_individual_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and r.party_id = tmr.party_id + ) +select * +from game_rewards; + +create or replace view current_game_reward_totals as ( + with current_game_epochs as ( + select game_id, max(epoch_id) as epoch_id + from game_reward_totals + group by game_id + ) + select grt.* + from game_reward_totals grt + join current_game_epochs cge on grt.game_id = cge.game_id and grt.epoch_id = cge.epoch_id +); + +-- +goose Down + +drop view if exists game_stats; +drop view if exists game_stats_current; +drop view if exists game_team_rankings; + +create view game_team_rankings as +with team_games as ( + -- get the games where the entity scope is individuals + select distinct game_id from transfers + where dispatch_strategy ->> 'entity_scope' = '2' + and game_id is not null +), team_totals as ( + select t.game_id, t.asset_id, t.epoch_id, t.team_id, sum(t.total_rewards) as total_rewards + from game_reward_totals t + join team_games g on t.game_id = g.game_id + where t.team_id != '\x' + group by t.game_id, t.asset_id, t.epoch_id, t.team_id +) +select game_id, epoch_id, team_id, total_rewards, rank() over (partition by game_id, epoch_id order by total_rewards desc) as rank +from team_totals; + +drop view if exists game_team_member_rankings; +create view game_team_member_rankings as +with team_games as ( + -- get the games where the entity scope is individuals + select distinct game_id from transfers + where dispatch_strategy ->> 'entity_scope' = '2' + and game_id is not null +), team_totals as ( + select t.game_id, t.asset_id, t.team_id, t.party_id, t.epoch_id, sum(t.total_rewards) as total_rewards + from game_reward_totals t + join team_games g on t.game_id = g.game_id + where t.team_id != '\x' + group by t.game_id, t.asset_id, t.team_id, t.party_id, t.epoch_id +) +select game_id, epoch_id, team_id, party_id, total_rewards, rank() over (partition by game_id, epoch_id, team_id order by total_rewards desc) as rank +from team_totals; + +drop view if exists game_individual_rankings; +create view game_individual_rankings as +with individual_games as ( + -- get the games where the entity scope is individuals + select game_id from transfers + where dispatch_strategy ->> 'entity_scope' = '1' + and game_id is not null +), individual_totals as ( + -- calculate the total rewards for each individual in each individual entity scoped game + select t.game_id, t.epoch_id, t.asset_id, t.party_id, sum(t.total_rewards) as total_rewards + from game_reward_totals t + join individual_games i on t.game_id = i.game_id + group by t.game_id, t.epoch_id, t.asset_id, t.party_id +) +-- rank the individuals for each game at each epoch +select game_id, epoch_id, party_id, total_rewards, rank() over (partition by game_id, epoch_id order by total_rewards desc) as rank +from individual_totals; + +create view game_stats as +with + game_epochs as ( + select distinct + game_id, epoch_id + from rewards + where + game_id is not null + ), + dispatch_strategies AS ( + SELECT DISTINCT + ON (game_id) game_id, dispatch_strategy + FROM transfers + WHERE + transfer_type = 'Recurring' + ORDER BY game_id, vega_time DESC + ), + game_rewards as ( + select + r.*, t.dispatch_strategy, tm.team_id, tmr.rank as member_rank, tr.rank as team_rank, tmr.total_rewards, tr.total_rewards as team_total_rewards, 'ENTITY_SCOPE_TEAMS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + JOIN dispatch_strategies t ON r.game_id = t.game_id + AND t.dispatch_strategy ->> 'entity_scope' = '2' + join team_members tm on r.party_id = tm.party_id + left join game_team_rankings tr on r.game_id = tr.game_id + and r.epoch_id = tr.epoch_id + and tm.team_id = tr.team_id + left join game_team_member_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and tm.team_id = tmr.team_id + and r.party_id = tmr.party_id + union all + select + r.*, t.dispatch_strategy, null as team_id, tmr.rank as member_rank, null as team_rank, tmr.total_rewards, null as team_total_rewards, 'ENTITY_SCOPE_INDIVIDUALS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + JOIN dispatch_strategies t ON r.game_id = t.game_id + AND t.dispatch_strategy ->> 'entity_scope' = '1' + left join game_individual_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and r.party_id = tmr.party_id + ) +select * +from game_rewards; + +create view game_stats_current as +with + game_epochs as ( + select game_id, max(epoch_id) as epoch_id + from rewards + where + game_id is not null + group by + game_id + ), + dispatch_strategies AS ( + SELECT DISTINCT + ON (game_id) game_id, dispatch_strategy + FROM transfers + WHERE + transfer_type = 'Recurring' + ORDER BY game_id, vega_time DESC + ), + game_rewards as ( + select + r.*, t.dispatch_strategy, tm.team_id, tmr.rank as member_rank, tr.rank as team_rank, tmr.total_rewards, 'ENTITY_SCOPE_TEAMS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + JOIN dispatch_strategies t ON r.game_id = t.game_id + AND t.dispatch_strategy ->> 'entity_scope' = '2' + join team_members tm on r.party_id = tm.party_id + left join game_team_rankings tr on r.game_id = tr.game_id + and r.epoch_id = tr.epoch_id + and tm.team_id = tr.team_id + left join game_team_member_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and tm.team_id = tmr.team_id + and r.party_id = tmr.party_id + union all + select + r.*, t.dispatch_strategy, null as team_id, tmr.rank as member_rank, null as team_rank, tmr.total_rewards, 'ENTITY_SCOPE_INDIVIDUALS' as entity_scope + from + rewards r + join game_epochs ge on r.game_id = ge.game_id + and r.epoch_id = ge.epoch_id + JOIN dispatch_strategies t ON r.game_id = t.game_id + AND t.dispatch_strategy ->> 'entity_scope' = '1' + left join game_individual_rankings tmr on r.game_id = tmr.game_id + and r.epoch_id = tmr.epoch_id + and r.party_id = tmr.party_id + ) +select * +from game_rewards; + +create or replace view current_game_reward_totals as ( + with current_game_epochs as ( + select game_id, max(epoch_id) as epoch_id + from game_reward_totals + group by game_id + ) + select grt.* + from game_reward_totals grt + join current_game_epochs cge on grt.game_id = cge.game_id and grt.epoch_id = cge.epoch_id +); diff --git a/datanode/sqlstore/network_limits.go b/datanode/sqlstore/network_limits.go index fee57c834c..b1f9a95411 100644 --- a/datanode/sqlstore/network_limits.go +++ b/datanode/sqlstore/network_limits.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -32,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/network_limits_test.go b/datanode/sqlstore/network_limits_test.go index 99c05a61c9..255a3d7b77 100644 --- a/datanode/sqlstore/network_limits_test.go +++ b/datanode/sqlstore/network_limits_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -33,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/datanode/sqlstore/network_parameters.go b/datanode/sqlstore/network_parameters.go index e1574ac971..8292b9b781 100644 --- a/datanode/sqlstore/network_parameters.go +++ b/datanode/sqlstore/network_parameters.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -35,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/network_parameters_test.go b/datanode/sqlstore/network_parameters_test.go index 195ce5e3a3..a42a90c160 100644 --- a/datanode/sqlstore/network_parameters_test.go +++ b/datanode/sqlstore/network_parameters_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -35,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/datanode/sqlstore/node.go b/datanode/sqlstore/node.go index 514c0112ed..015849dd6e 100644 --- a/datanode/sqlstore/node.go +++ b/datanode/sqlstore/node.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -36,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/datanode/metrics" "code.vegaprotocol.io/vega/logging" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/node_test.go b/datanode/sqlstore/node_test.go index 27e395f01a..430bfc2737 100644 --- a/datanode/sqlstore/node_test.go +++ b/datanode/sqlstore/node_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -34,7 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" + "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -44,7 +32,7 @@ func addTestNode(t *testing.T, ctx context.Context, ps *sqlstore.Node, block ent t.Helper() node := entities.Node{ ID: entities.NodeID(id), - PubKey: entities.VegaPublicKey(helpers.GenerateID()), + PubKey: entities.VegaPublicKey(GenerateID()), TmPubKey: entities.TendermintPublicKey(generateTendermintPublicKey()), EthereumAddress: entities.EthereumAddress(generateEthereumAddress()), VegaTime: block.VegaTime, @@ -87,13 +75,13 @@ func TestUpdateNodePubKey(t *testing.T) { block := addTestBlock(t, ctx, bs) now := time.Now() - node1 := addTestNode(t, ctx, ns, block, helpers.GenerateID()) + node1 := addTestNode(t, ctx, ns, block, GenerateID()) addNodeAnnounced(t, ctx, ns, node1.ID, true, 0, now) kr := entities.KeyRotation{ NodeID: node1.ID, OldPubKey: node1.PubKey, - NewPubKey: entities.VegaPublicKey(helpers.GenerateID()), + NewPubKey: entities.VegaPublicKey(GenerateID()), VegaTime: block.VegaTime, } @@ -112,7 +100,7 @@ func TestGetNodes(t *testing.T) { block := addTestBlock(t, ctx, bs) now := time.Now() - node1 := addTestNode(t, ctx, ns, block, helpers.GenerateID()) + node1 := addTestNode(t, ctx, ns, block, GenerateID()) addNodeAnnounced(t, ctx, ns, node1.ID, true, 0, now) addNodeAnnounced(t, ctx, ns, node1.ID, false, 7, now) addRankingScore(t, ctx, ns, node1, @@ -161,8 +149,8 @@ func TestNodeGetByTxHash(t *testing.T) { block := addTestBlock(t, ctx, bs) now := time.Now() - node1 := addTestNode(t, ctx, ns, block, helpers.GenerateID()) - node2 := addTestNode(t, ctx, ns, block, helpers.GenerateID()) + node1 := addTestNode(t, ctx, ns, block, GenerateID()) + node2 := addTestNode(t, ctx, ns, block, GenerateID()) addNodeAnnounced(t, ctx, ns, node1.ID, true, 0, now) addNodeAnnounced(t, ctx, ns, node2.ID, false, 7, now) addNodeAnnounced(t, ctx, ns, node2.ID, false, 9, now) @@ -185,8 +173,8 @@ func TestGetNodesJoiningAndLeaving(t *testing.T) { ns := sqlstore.NewNode(connectionSource) block := addTestBlock(t, ctx, bs) - node1 := addTestNode(t, ctx, ns, block, helpers.GenerateID()) - node2 := addTestNode(t, ctx, ns, block, helpers.GenerateID()) + node1 := addTestNode(t, ctx, ns, block, GenerateID()) + node2 := addTestNode(t, ctx, ns, block, GenerateID()) // The node1 will exist int the epochs [2,3] and [6,7] exists := map[int]bool{2: true, 3: true, 6: true, 7: true} @@ -220,8 +208,8 @@ func TestGetNodeData(t *testing.T) { block := addTestBlock(t, ctx, bs) party1 := addTestParty(t, ctx, ps, block) - node1 := addTestNode(t, ctx, ns, block, helpers.GenerateID()) - node2 := addTestNode(t, ctx, ns, block, helpers.GenerateID()) + node1 := addTestNode(t, ctx, ns, block, GenerateID()) + node2 := addTestNode(t, ctx, ns, block, GenerateID()) addTestDelegation(t, ctx, ds, party1, node1, 3, block, 0) addTestDelegation(t, ctx, ds, party1, node1, 4, block, 1) @@ -539,7 +527,7 @@ func TestNode_AddRankingScoreInSameEpoch(t *testing.T) { ns := sqlstore.NewNode(connectionSource) block := addTestBlock(t, ctx, bs) - node1 := addTestNode(t, ctx, ns, block, helpers.GenerateID()) + node1 := addTestNode(t, ctx, ns, block, GenerateID()) // node1 goes from pending -> ersatz -> tendermint // then gets demoted straight to pending with a zero perf score diff --git a/datanode/sqlstore/notary.go b/datanode/sqlstore/notary.go index aa069c7a44..6f69661158 100644 --- a/datanode/sqlstore/notary.go +++ b/datanode/sqlstore/notary.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/notary_test.go b/datanode/sqlstore/notary_test.go index 04bb68beae..24e179bcf2 100644 --- a/datanode/sqlstore/notary_test.go +++ b/datanode/sqlstore/notary_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -35,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" v1 "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/datanode/sqlstore/oracle_data.go b/datanode/sqlstore/oracle_data.go index 9da08efcb8..c5f136f3eb 100644 --- a/datanode/sqlstore/oracle_data.go +++ b/datanode/sqlstore/oracle_data.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/oracle_data_test.go b/datanode/sqlstore/oracle_data_test.go index c37e2c36f2..264c693378 100644 --- a/datanode/sqlstore/oracle_data_test.go +++ b/datanode/sqlstore/oracle_data_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -37,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/datanode/sqlstore" vegapb "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/datanode/sqlstore/oracle_spec.go b/datanode/sqlstore/oracle_spec.go index e49a70bc16..005497a22c 100644 --- a/datanode/sqlstore/oracle_spec.go +++ b/datanode/sqlstore/oracle_spec.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/oracle_spec_test.go b/datanode/sqlstore/oracle_spec_test.go index 6cf56a4d91..cf10d1e022 100644 --- a/datanode/sqlstore/oracle_spec_test.go +++ b/datanode/sqlstore/oracle_spec_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -36,11 +24,10 @@ import ( dstypes "code.vegaprotocol.io/vega/core/datasource/common" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" - "code.vegaprotocol.io/vega/protos/vega" vegapb "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/structpb" @@ -440,7 +427,7 @@ func createOracleSpecPaginationTestData(t *testing.T, ctx context.Context, bs *s block := addTestBlockForTime(t, ctx, bs, time.Now().Truncate(time.Second)) for i := 0; i < 10; i++ { - pubKey := dstypes.CreateSignerFromString(helpers.GenerateID(), dstypes.SignerTypePubKey) + pubKey := dstypes.CreateSignerFromString(GenerateID(), dstypes.SignerTypePubKey) spec := entities.OracleSpec{ ExternalDataSourceSpec: &entities.ExternalDataSourceSpec{ diff --git a/datanode/sqlstore/orders.go b/datanode/sqlstore/orders.go index 453f10d0a3..38c696ca4a 100644 --- a/datanode/sqlstore/orders.go +++ b/datanode/sqlstore/orders.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -33,13 +21,13 @@ import ( "fmt" "strings" - "github.com/georgysavva/scany/pgxscan" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/logging" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + + "github.com/georgysavva/scany/pgxscan" ) const ( diff --git a/datanode/sqlstore/orders_test.go b/datanode/sqlstore/orders_test.go index b6368ea47f..fc3d835a48 100644 --- a/datanode/sqlstore/orders_test.go +++ b/datanode/sqlstore/orders_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -35,16 +23,16 @@ import ( "testing" "time" - "github.com/shopspring/decimal" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" "code.vegaprotocol.io/vega/libs/ptr" "code.vegaprotocol.io/vega/protos/vega" + + "github.com/shopspring/decimal" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func addTestOrder(t *testing.T, os *sqlstore.Orders, id entities.OrderID, block entities.Block, party entities.Party, market entities.Market, reference string, @@ -139,7 +127,7 @@ func TestOrders(t *testing.T) { } order := addTestOrder(t, os, - entities.OrderID(helpers.GenerateID()), + entities.OrderID(GenerateID()), block, parties[i%3], markets[i%2], @@ -242,7 +230,7 @@ func TestOrders(t *testing.T) { }) t.Run("GetOrderNotFound", func(t *testing.T) { - notAnOrderID := entities.OrderID(helpers.GenerateID()) + notAnOrderID := entities.OrderID(GenerateID()) fetchedOrder, err := os.GetOrder(ctx, notAnOrderID.String(), nil) require.Error(t, err) assert.Equal(t, entities.ErrNotFound, err) @@ -299,7 +287,7 @@ func generateOrderIDs(t *testing.T, numIDs int) []entities.OrderID { t.Helper() orderIDs := make([]entities.OrderID, numIDs) for i := 0; i < numIDs; i++ { - orderIDs[i] = entities.OrderID(helpers.GenerateID()) + orderIDs[i] = entities.OrderID(GenerateID()) } return orderIDs diff --git a/datanode/sqlstore/paid_liquidity_fee_stats.go b/datanode/sqlstore/paid_liquidity_fee_stats.go index 9639abbbae..6291e4ad5d 100644 --- a/datanode/sqlstore/paid_liquidity_fee_stats.go +++ b/datanode/sqlstore/paid_liquidity_fee_stats.go @@ -20,12 +20,11 @@ import ( "fmt" "strings" - "github.com/georgysavva/scany/pgxscan" - + "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "code.vegaprotocol.io/vega/datanode/entities" + "github.com/georgysavva/scany/pgxscan" ) type PaidLiquidityFeesStats struct { diff --git a/datanode/sqlstore/paid_liquidity_fee_stats_test.go b/datanode/sqlstore/paid_liquidity_fee_stats_test.go index 134c597b5b..cdd42ed290 100644 --- a/datanode/sqlstore/paid_liquidity_fee_stats_test.go +++ b/datanode/sqlstore/paid_liquidity_fee_stats_test.go @@ -20,18 +20,15 @@ import ( "testing" "time" - eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - - "github.com/stretchr/testify/assert" - - "github.com/georgysavva/scany/pgxscan" - "code.vegaprotocol.io/vega/datanode/entities" + vgtesting "code.vegaprotocol.io/vega/datanode/libs/testing" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" - "github.com/stretchr/testify/require" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - vgtesting "code.vegaprotocol.io/vega/datanode/libs/testing" + "github.com/georgysavva/scany/pgxscan" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestPaidLiquidityFeesStats_Add(t *testing.T) { diff --git a/datanode/sqlstore/parties.go b/datanode/sqlstore/parties.go index ac1a32540b..a37b216c6a 100644 --- a/datanode/sqlstore/parties.go +++ b/datanode/sqlstore/parties.go @@ -13,35 +13,29 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( "context" "fmt" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) -var partiesOrdering = TableOrdering{ - ColumnOrdering{Name: "vega_time", Sorting: ASC}, - ColumnOrdering{Name: "id", Sorting: ASC}, -} +var ( + partiesOrdering = TableOrdering{ + ColumnOrdering{Name: "vega_time", Sorting: ASC}, + ColumnOrdering{Name: "id", Sorting: ASC}, + } + + partiesProfilesOrdering = TableOrdering{ + ColumnOrdering{Name: "id", Sorting: ASC}, + } +) type Parties struct { *ConnectionSource @@ -59,8 +53,8 @@ func NewParties(connectionSource *ConnectionSource) *Parties { func (ps *Parties) Initialise(ctx context.Context) { defer metrics.StartSQLQuery("Parties", "Initialise")() _, err := ps.Connection.Exec(ctx, - `INSERT INTO parties(id, tx_hash) VALUES ($1, $2) ON CONFLICT (id) DO NOTHING`, - entities.PartyID("network"), entities.TxHash("01")) + `INSERT INTO parties(id, tx_hash, alias) VALUES ($1, $2, $3) ON CONFLICT (id) DO NOTHING`, + entities.PartyID("network"), entities.TxHash("01"), "network") if err != nil { panic(fmt.Errorf("unable to add built-in network party: %w", err)) } @@ -79,6 +73,54 @@ func (ps *Parties) Add(ctx context.Context, p entities.Party) error { return err } +func (ps *Parties) UpdateProfile(ctx context.Context, p *entities.PartyProfile) error { + defer metrics.StartSQLQuery("Parties", "Add")() + _, err := ps.Connection.Exec(ctx, + `UPDATE parties SET alias = $1, metadata = $2 WHERE id = $3`, + p.Alias, + p.Metadata, + p.PartyID, + ) + return err +} + +func (ps *Parties) ListProfiles(ctx context.Context, ids []string, pagination entities.CursorPagination) ([]entities.PartyProfile, entities.PageInfo, error) { + defer metrics.StartSQLQuery("Parties", "ListProfiles")() + + profiles := make([]entities.PartyProfile, 0) + args := make([]interface{}, 0) + + whereClause := "" + if len(ids) > 0 { + partyIDs := make([][]byte, len(ids)) + for i, id := range ids { + partyID := entities.PartyID(id) + partyIDBytes, err := partyID.Bytes() + if err != nil { + return nil, entities.PageInfo{}, fmt.Errorf("invalid party ID found: %w", err) + } + partyIDs[i] = partyIDBytes + } + whereClause = fmt.Sprintf(" where id = ANY(%s)", nextBindVar(&args, partyIDs)) + } + + query := `SELECT id AS party_id, alias, metadata FROM parties` + whereClause + + var pageInfo entities.PageInfo + + query, args, err := PaginateQuery[entities.PartyProfile](query, args, partiesProfilesOrdering, pagination) + if err != nil { + return nil, pageInfo, err + } + + if err := pgxscan.Select(ctx, ps.Connection, &profiles, query, args...); err != nil { + return nil, pageInfo, err + } + + profiles, pageInfo = entities.PageEntities[*v2.PartyProfileEdge](profiles, pagination) + return profiles, pageInfo, nil +} + func (ps *Parties) GetByID(ctx context.Context, id string) (entities.Party, error) { a := entities.Party{} defer metrics.StartSQLQuery("Parties", "GetByID")() @@ -134,12 +176,9 @@ func (ps *Parties) GetAllPaged(ctx context.Context, partyID string, pagination e FROM parties ` - var ( - pageInfo entities.PageInfo - err error - ) + var pageInfo entities.PageInfo - query, args, err = PaginateQuery[entities.Party](query, args, partiesOrdering, pagination) + query, args, err := PaginateQuery[entities.Party](query, args, partiesOrdering, pagination) if err != nil { return nil, pageInfo, err } diff --git a/datanode/sqlstore/parties_test.go b/datanode/sqlstore/parties_test.go index 448bb8ca6d..c4be6ef0de 100644 --- a/datanode/sqlstore/parties_test.go +++ b/datanode/sqlstore/parties_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -34,7 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -42,7 +30,7 @@ import ( func addTestParty(t *testing.T, ctx context.Context, ps *sqlstore.Parties, block entities.Block) entities.Party { t.Helper() party := entities.Party{ - ID: entities.PartyID(helpers.GenerateID()), + ID: entities.PartyID(GenerateID()), VegaTime: &block.VegaTime, TxHash: generateTxHash(), } diff --git a/datanode/sqlstore/party_activity_streak.go b/datanode/sqlstore/party_activity_streak.go index 6495746693..564b6d826a 100644 --- a/datanode/sqlstore/party_activity_streak.go +++ b/datanode/sqlstore/party_activity_streak.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/party_activity_streak_test.go b/datanode/sqlstore/party_activity_streak_test.go index 1438e7b344..fb0d059845 100644 --- a/datanode/sqlstore/party_activity_streak_test.go +++ b/datanode/sqlstore/party_activity_streak_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/libs/ptr" + "github.com/stretchr/testify/assert" ) diff --git a/datanode/sqlstore/party_locked_balance.go b/datanode/sqlstore/party_locked_balance.go index dd9452e277..c8296213f4 100644 --- a/datanode/sqlstore/party_locked_balance.go +++ b/datanode/sqlstore/party_locked_balance.go @@ -1,13 +1,28 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + package sqlstore import ( "context" "fmt" - "github.com/georgysavva/scany/pgxscan" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + + "github.com/georgysavva/scany/pgxscan" ) type PartyLockedBalance struct { @@ -27,7 +42,7 @@ func (plb *PartyLockedBalance) Prune( defer metrics.StartSQLQuery("PartyLockedBalance", "Prune")() _, err := plb.Connection.Exec( ctx, - "DELETE FROM party_locked_balances_current WHERE until_epoch < $1", + "DELETE FROM party_locked_balances_current WHERE until_epoch <= $1", currentEpoch, ) diff --git a/datanode/sqlstore/party_locked_balance_test.go b/datanode/sqlstore/party_locked_balance_test.go index b75d759856..97c9c494f5 100644 --- a/datanode/sqlstore/party_locked_balance_test.go +++ b/datanode/sqlstore/party_locked_balance_test.go @@ -1,3 +1,18 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + package sqlstore_test import ( @@ -9,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" + "github.com/georgysavva/scany/pgxscan" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/datanode/sqlstore/party_vesting_balance.go b/datanode/sqlstore/party_vesting_balance.go index b0e7c52b7d..c4f7b389f5 100644 --- a/datanode/sqlstore/party_vesting_balance.go +++ b/datanode/sqlstore/party_vesting_balance.go @@ -1,13 +1,28 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + package sqlstore import ( "context" "fmt" - "github.com/georgysavva/scany/pgxscan" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + + "github.com/georgysavva/scany/pgxscan" ) type PartyVestingBalance struct { diff --git a/datanode/sqlstore/party_vesting_balance_test.go b/datanode/sqlstore/party_vesting_balance_test.go index 3d21513706..be50be84d3 100644 --- a/datanode/sqlstore/party_vesting_balance_test.go +++ b/datanode/sqlstore/party_vesting_balance_test.go @@ -1,3 +1,18 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + package sqlstore_test import ( @@ -5,12 +20,12 @@ import ( "testing" "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/libs/num" + "github.com/georgysavva/scany/pgxscan" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "code.vegaprotocol.io/vega/datanode/sqlstore" ) func setupPartyVestingBalanceTest(t *testing.T) (*sqlstore.Blocks, *sqlstore.PartyVestingBalance) { diff --git a/datanode/sqlstore/positions.go b/datanode/sqlstore/positions.go index 1a45a38edb..6ee956e81e 100644 --- a/datanode/sqlstore/positions.go +++ b/datanode/sqlstore/positions.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( diff --git a/datanode/sqlstore/positions_test.go b/datanode/sqlstore/positions_test.go index 78994653a9..a2a739b8f2 100644 --- a/datanode/sqlstore/positions_test.go +++ b/datanode/sqlstore/positions_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -35,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/shopspring/decimal" diff --git a/datanode/sqlstore/proposals.go b/datanode/sqlstore/proposals.go index e0be7fb36f..2854061145 100644 --- a/datanode/sqlstore/proposals.go +++ b/datanode/sqlstore/proposals.go @@ -13,31 +13,20 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( "context" "fmt" + "sort" "strings" - "github.com/georgysavva/scany/pgxscan" - "github.com/jackc/pgx/v4" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + + "github.com/georgysavva/scany/pgxscan" + "github.com/jackc/pgx/v4" ) type Proposals struct { @@ -61,10 +50,12 @@ func (ps *Proposals) Add(ctx context.Context, p entities.Proposal) error { _, err := ps.Connection.Exec(ctx, `INSERT INTO proposals( id, + batch_id, reference, party_id, state, terms, + batch_terms, rationale, reason, error_details, @@ -75,7 +66,7 @@ func (ps *Proposals) Add(ctx context.Context, p entities.Proposal) error { required_lp_majority, required_lp_participation, tx_hash) - VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17) ON CONFLICT (id, vega_time) DO UPDATE SET reference = EXCLUDED.reference, party_id = EXCLUDED.party_id, @@ -88,23 +79,99 @@ func (ps *Proposals) Add(ctx context.Context, p entities.Proposal) error { tx_hash = EXCLUDED.tx_hash ; `, - p.ID, p.Reference, p.PartyID, p.State, p.Terms, p.Rationale, p.Reason, p.ErrorDetails, p.ProposalTime, p.VegaTime, p.RequiredMajority, p.RequiredParticipation, p.RequiredLPMajority, p.RequiredLPParticipation, p.TxHash) + p.ID, p.BatchID, p.Reference, p.PartyID, p.State, p.Terms, p.BatchTerms, p.Rationale, p.Reason, + p.ErrorDetails, p.ProposalTime, p.VegaTime, p.RequiredMajority, p.RequiredParticipation, + p.RequiredLPMajority, p.RequiredLPParticipation, p.TxHash) return err } +func (ps *Proposals) getProposalsInBatch(ctx context.Context, batchID string) ([]entities.Proposal, error) { + var proposals []entities.Proposal + query := `SELECT * FROM proposals_current WHERE batch_id=$1` + + rows, err := ps.Connection.Query(ctx, query, entities.ProposalID(batchID)) + if err != nil { + return proposals, fmt.Errorf("querying proposals: %w", err) + } + defer rows.Close() + + if err = pgxscan.ScanAll(&proposals, rows); err != nil { + return proposals, fmt.Errorf("parsing proposals: %w", err) + } + + sort.Slice(proposals, func(i, j int) bool { + return proposals[i].Terms.EnactmentTimestamp < proposals[j].Terms.EnactmentTimestamp + }) + + return proposals, nil +} + +// extendOrGetBatchProposal fetching sub proposals in case of batch proposal +// or fetches the whole batch if sub proposal is requested. +// If none of the above applies then proposal is returned without change. +func (ps *Proposals) extendOrGetBatchProposal(ctx context.Context, p entities.Proposal) (entities.Proposal, error) { + // if proposal is part of batch fetch to whole batch + if p.BelongsToBatch() { + return ps.GetByID(ctx, p.BatchID.String()) + } + + // if it's batch fetch the sub proposals + if p.IsBatch() { + pps, err := ps.getProposalsInBatch(ctx, p.ID.String()) + if err != nil { + return p, ps.wrapE(err) + } + p.Proposals = pps + } + + return p, nil +} + func (ps *Proposals) GetByID(ctx context.Context, id string) (entities.Proposal, error) { defer metrics.StartSQLQuery("Proposals", "GetByID")() var p entities.Proposal query := `SELECT * FROM proposals_current WHERE id=$1` - return p, ps.wrapE(pgxscan.Get(ctx, ps.Connection, &p, query, entities.ProposalID(id))) + if err := pgxscan.Get(ctx, ps.Connection, &p, query, entities.ProposalID(id)); err != nil { + return p, ps.wrapE(pgxscan.Get(ctx, ps.Connection, &p, query, entities.ProposalID(id))) + } + + p, err := ps.extendOrGetBatchProposal(ctx, p) + if err != nil { + return p, err + } + + return p, nil +} + +// GetByIDWithoutBatch returns a proposal without extending single proposal by fetching batch proposal. +func (ps *Proposals) GetByIDWithoutBatch(ctx context.Context, id string) (entities.Proposal, error) { + defer metrics.StartSQLQuery("Proposals", "GetByIDWithoutBatch")() + var p entities.Proposal + query := `SELECT * FROM proposals_current WHERE id=$1` + + if err := pgxscan.Get(ctx, ps.Connection, &p, query, entities.ProposalID(id)); err != nil { + return p, ps.wrapE(pgxscan.Get(ctx, ps.Connection, &p, query, entities.ProposalID(id))) + } + + return p, nil } func (ps *Proposals) GetByReference(ctx context.Context, ref string) (entities.Proposal, error) { defer metrics.StartSQLQuery("Proposals", "GetByReference")() var p entities.Proposal query := `SELECT * FROM proposals_current WHERE reference=$1 LIMIT 1` - return p, ps.wrapE(pgxscan.Get(ctx, ps.Connection, &p, query, ref)) + + if err := pgxscan.Get(ctx, ps.Connection, &p, query, ref); err != nil { + return p, ps.wrapE(err) + } + + p, err := ps.extendOrGetBatchProposal(ctx, p) + if err != nil { + return p, err + } + + return p, nil } func (ps *Proposals) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Proposal, error) { @@ -117,6 +184,15 @@ func (ps *Proposals) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([ return nil, ps.wrapE(err) } + for i, p := range proposals { + p, err := ps.extendOrGetBatchProposal(ctx, p) + if err != nil { + return proposals, err + } + + proposals[i] = p + } + return proposals, nil } @@ -319,10 +395,14 @@ func (ps *Proposals) Get(ctx context.Context, } defer metrics.StartSQLQuery("Proposals", "Get")() - results := ps.Connection.SendBatch(ctx, batch) + // copy the store connection because we may need to make recursive calls when processing the from the batch + // causing the underlying connection to be busy and unusable + batchConn := ps.Connection + results := batchConn.SendBatch(ctx, batch) defer results.Close() proposals := make([]entities.Proposal, 0) + fetchedBatches := map[entities.ProposalID]struct{}{} for { rows, err := results.Query() @@ -330,12 +410,34 @@ func (ps *Proposals) Get(ctx context.Context, break } - var props []entities.Proposal - - if err := pgxscan.ScanAll(&props, rows); err != nil { + var matchedProps []entities.Proposal + if err := pgxscan.ScanAll(&matchedProps, rows); err != nil { return nil, pageInfo, fmt.Errorf("querying proposals: %w", err) } + rows.Close() + + var props []entities.Proposal + for _, p := range matchedProps { + var batchID entities.ProposalID + if p.BelongsToBatch() { + batchID = p.BatchID + } else if p.IsBatch() { + batchID = p.ID + } + + if _, ok := fetchedBatches[batchID]; ok { + continue + } + + p, err := ps.extendOrGetBatchProposal(ctx, p) + if err != nil { + return nil, pageInfo, err + } + props = append(props, p) + fetchedBatches[p.ID] = struct{}{} + } + if pageForward { proposals = append(proposals, props...) } else { diff --git a/datanode/sqlstore/proposals_test.go b/datanode/sqlstore/proposals_test.go index a5d4215d6c..4b42a8148b 100644 --- a/datanode/sqlstore/proposals_test.go +++ b/datanode/sqlstore/proposals_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -34,18 +22,21 @@ import ( "time" dstypes "code.vegaprotocol.io/vega/core/datasource/common" + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/protos/vega" datav1 "code.vegaprotocol.io/vega/protos/vega/data/v1" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" +) - "code.vegaprotocol.io/vega/datanode/entities" - "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" - "code.vegaprotocol.io/vega/libs/num" - "code.vegaprotocol.io/vega/protos/vega" +var ( + testProposals []entities.Proposal + proposalTestParties []entities.Party ) func addTestProposal( @@ -60,13 +51,23 @@ func addTestProposal( rationale entities.ProposalRationale, terms entities.ProposalTerms, reason entities.ProposalError, + batchID *string, + batchTerms entities.BatchProposalTerms, ) entities.Proposal { t.Helper() + + var batchProposalID entities.ProposalID + if batchID != nil { + batchProposalID = entities.ProposalID(*batchID) + } + p := entities.Proposal{ ID: entities.ProposalID(id), + BatchID: batchProposalID, PartyID: party.ID, Reference: reference, Terms: terms, + BatchTerms: batchTerms, State: state, VegaTime: block.VegaTime, ProposalTime: block.VegaTime, @@ -89,7 +90,17 @@ func proposalLessThan(x, y entities.Proposal) bool { func assertProposalsMatch(t *testing.T, expected, actual []entities.Proposal) { t.Helper() sortProposals := cmpopts.SortSlices(proposalLessThan) - ignoreProtoState := cmpopts.IgnoreUnexported(vega.ProposalTerms{}, vega.ProposalRationale{}, vega.NewMarket{}, vega.NewAsset{}) + ignoreProtoState := cmpopts.IgnoreUnexported( + vega.ProposalTerms{}, + vega.BatchProposalTerms{}, + vega.BatchProposalTermsChange{}, + vega.ProposalRationale{}, + vega.NewMarket{}, + vega.NewAsset{}, + vega.UpdateAsset{}, + vega.NewMarketConfiguration{}, + vega.SuccessorConfiguration{}, + ) assert.Empty(t, cmp.Diff(actual, expected, sortProposals, ignoreProtoState)) } @@ -97,9 +108,12 @@ func assertProposalMatch(t *testing.T, expected, actual entities.Proposal) { t.Helper() ignoreProtoState := cmpopts.IgnoreUnexported( vega.ProposalTerms{}, + vega.BatchProposalTerms{}, + vega.BatchProposalTermsChange{}, vega.ProposalRationale{}, vega.NewMarket{}, vega.NewAsset{}, + vega.UpdateAsset{}, vega.NewMarketConfiguration{}, vega.SuccessorConfiguration{}, ) @@ -120,13 +134,13 @@ func TestProposals(t *testing.T) { rationale2 := entities.ProposalRationale{ProposalRationale: &vega.ProposalRationale{Title: "myurl2.com", Description: "desc"}} terms1 := entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{Change: &vega.ProposalTerms_NewMarket{NewMarket: &vega.NewMarket{}}}} terms2 := entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{Change: &vega.ProposalTerms_NewAsset{NewAsset: &vega.NewAsset{}}}} - id1 := helpers.GenerateID() - id2 := helpers.GenerateID() + id1 := GenerateID() + id2 := GenerateID() - reference1 := helpers.GenerateID() - reference2 := helpers.GenerateID() - prop1 := addTestProposal(t, ctx, propStore, id1, party1, reference1, block1, entities.ProposalStateEnacted, rationale1, terms1, entities.ProposalErrorUnspecified) - prop2 := addTestProposal(t, ctx, propStore, id2, party2, reference2, block1, entities.ProposalStateEnacted, rationale2, terms2, entities.ProposalErrorUnspecified) + reference1 := GenerateID() + reference2 := GenerateID() + prop1 := addTestProposal(t, ctx, propStore, id1, party1, reference1, block1, entities.ProposalStateEnacted, rationale1, terms1, entities.ProposalErrorUnspecified, nil, entities.BatchProposalTerms{}) + prop2 := addTestProposal(t, ctx, propStore, id2, party2, reference2, block1, entities.ProposalStateEnacted, rationale2, terms2, entities.ProposalErrorUnspecified, nil, entities.BatchProposalTerms{}) party1ID := party1.ID.String() prop1ID := prop1.ID.String() @@ -182,7 +196,162 @@ func TestProposals(t *testing.T) { t.Run("Add with proposal error", func(t *testing.T) { propError := entities.ProposalInvalidPerpetualProduct - expected := addTestProposal(t, ctx, propStore, helpers.GenerateID(), party1, reference1, block1, entities.ProposalStateEnacted, rationale1, terms1, propError) + expected := addTestProposal(t, ctx, propStore, GenerateID(), party1, reference1, block1, entities.ProposalStateEnacted, rationale1, terms1, propError, nil, entities.BatchProposalTerms{}) + actual, err := propStore.GetByID(ctx, string(expected.ID)) + require.NoError(t, err) + assert.Equal(t, expected.Reason, actual.Reason) + }) +} + +func newBatchProposalProposal() entities.BatchProposalTerms { + return entities.BatchProposalTerms{ + BatchProposalTerms: &vega.BatchProposalTerms{ + ClosingTimestamp: 10, + Changes: []*vega.BatchProposalTermsChange{ + { + EnactmentTimestamp: 20, + Change: &vega.BatchProposalTermsChange_NewMarket{NewMarket: &vega.NewMarket{}}, + }, + { + EnactmentTimestamp: 30, + Change: &vega.BatchProposalTermsChange_UpdateAsset{UpdateAsset: &vega.UpdateAsset{}}, + }, + }, + }, + } +} + +func TestBatchProposals(t *testing.T) { + ctx := context.Background() + // We cannot use the tempTransaction for this test due to the fact that the connection gets blocked when + // we recursively look for proposals that belong in a batch. The use of the transaction prevents another connection being + // taken from the connection pool, and causes a conn is busy error, we therefore just use a background context for these + // tests, and make sure we clean up after ourselves instead of rolling back the transaction. + defer cleanupTestProposals(t) + + partyStore := sqlstore.NewParties(connectionSource) + propStore := sqlstore.NewProposals(connectionSource) + blockStore := sqlstore.NewBlocks(connectionSource) + block1 := addTestBlock(t, ctx, blockStore) + + party1 := addTestParty(t, ctx, partyStore, block1) + party2 := addTestParty(t, ctx, partyStore, block1) + rationale1 := entities.ProposalRationale{ProposalRationale: &vega.ProposalRationale{Title: "myurl1.com", Description: "desc"}} + rationale2 := entities.ProposalRationale{ProposalRationale: &vega.ProposalRationale{Title: "myurl2.com", Description: "desc"}} + terms1 := newBatchProposalProposal() + terms2 := newBatchProposalProposal() + id1 := GenerateID() + id2 := GenerateID() + subId1 := GenerateID() + subId2 := GenerateID() + subId3 := GenerateID() + subId4 := GenerateID() + + now := time.Now() + + reference1 := GenerateID() + reference2 := GenerateID() + reference3 := GenerateID() + reference4 := GenerateID() + reference5 := GenerateID() + reference6 := GenerateID() + prop1 := addTestProposal(t, ctx, propStore, id1, party1, reference1, block1, entities.ProposalStateEnacted, rationale1, + entities.ProposalTerms{}, entities.ProposalErrorUnspecified, nil, terms1) + prop1.Proposals = append(prop1.Proposals, + addTestProposal(t, ctx, propStore, subId1, party2, reference3, block1, entities.ProposalStateEnacted, rationale2, + entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{EnactmentTimestamp: now.Unix(), Change: &vega.ProposalTerms_NewMarket{NewMarket: &vega.NewMarket{}}}}, + entities.ProposalErrorUnspecified, &id1, entities.BatchProposalTerms{}, + ), + addTestProposal(t, ctx, propStore, subId2, party2, reference4, block1, entities.ProposalStateEnacted, rationale2, + entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{EnactmentTimestamp: now.Add(time.Second).Unix(), Change: &vega.ProposalTerms_UpdateAsset{UpdateAsset: &vega.UpdateAsset{}}}}, + entities.ProposalErrorUnspecified, &id1, entities.BatchProposalTerms{}, + ), + ) + + prop2 := addTestProposal(t, ctx, propStore, id2, party2, reference2, block1, entities.ProposalStateEnacted, rationale2, + entities.ProposalTerms{}, entities.ProposalErrorUnspecified, nil, terms2) + prop2.Proposals = append(prop2.Proposals, + addTestProposal( + t, ctx, propStore, subId3, party2, reference5, block1, entities.ProposalStateEnacted, rationale2, + entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{EnactmentTimestamp: now.Unix(), Change: &vega.ProposalTerms_NewMarket{NewMarket: &vega.NewMarket{}}}}, + entities.ProposalErrorUnspecified, &id2, entities.BatchProposalTerms{}, + ), + addTestProposal( + t, ctx, propStore, subId4, party2, reference6, block1, entities.ProposalStateEnacted, rationale2, + entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{EnactmentTimestamp: now.Add(time.Second).Unix(), Change: &vega.ProposalTerms_UpdateAsset{UpdateAsset: &vega.UpdateAsset{}}}}, + entities.ProposalErrorUnspecified, &id2, entities.BatchProposalTerms{}, + ), + ) + + party1ID := party1.ID.String() + prop1ID := prop1.ID.String() + propType := &entities.ProposalTypeNewMarket + + t.Run("GetById batch", func(t *testing.T) { + expected := prop1 + actual, err := propStore.GetByID(ctx, prop1ID) + require.NoError(t, err) + assertProposalMatch(t, expected, actual) + }) + + t.Run("GetById proposal from batch returns the whole batch", func(t *testing.T) { + expected := prop1 + actual, err := propStore.GetByID(ctx, string(expected.Proposals[0].ID)) + require.NoError(t, err) + assertProposalMatch(t, expected, actual) + }) + + t.Run("GetByTxHash", func(t *testing.T) { + expected := prop1 + actual, err := propStore.GetByTxHash(ctx, expected.TxHash) + require.NoError(t, err) + assertProposalMatch(t, expected, actual[0]) + + expected = prop2 + actual, err = propStore.GetByTxHash(ctx, expected.TxHash) + require.NoError(t, err) + assertProposalMatch(t, expected, actual[0]) + }) + + t.Run("GetByReference batch", func(t *testing.T) { + expected := prop2 + actual, err := propStore.GetByReference(ctx, expected.Reference) + require.NoError(t, err) + assertProposalMatch(t, expected, actual) + }) + + t.Run("GetByReference proposal from batch returns the whole batch", func(t *testing.T) { + expected := prop2 + actual, err := propStore.GetByReference(ctx, expected.Proposals[0].Reference) + require.NoError(t, err) + assertProposalMatch(t, expected, actual) + }) + + t.Run("GetInState", func(t *testing.T) { + enacted := entities.ProposalStateEnacted + expected := []entities.Proposal{prop1, prop2} + actual, _, err := propStore.Get(ctx, &enacted, nil, nil, entities.CursorPagination{}) + require.NoError(t, err) + assertProposalsMatch(t, expected, actual) + }) + + t.Run("GetByParty", func(t *testing.T) { + expected := []entities.Proposal{prop1} + actual, _, err := propStore.Get(ctx, nil, &party1ID, nil, entities.CursorPagination{}) + require.NoError(t, err) + assertProposalsMatch(t, expected, actual) + }) + + t.Run("GetByType", func(t *testing.T) { + expected := []entities.Proposal{prop1, prop2} + actual, _, err := propStore.Get(ctx, nil, nil, propType, entities.CursorPagination{}) + require.NoError(t, err) + assertProposalsMatch(t, expected, actual) + }) + + t.Run("Add with proposal error", func(t *testing.T) { + propError := entities.ProposalInvalidPerpetualProduct + expected := addTestProposal(t, ctx, propStore, GenerateID(), party1, reference1, block1, entities.ProposalStateEnacted, rationale1, entities.ProposalTerms{}, propError, nil, terms1) actual, err := propStore.GetByID(ctx, string(expected.ID)) require.NoError(t, err) assert.Equal(t, expected.Reason, actual.Reason) @@ -190,6 +359,15 @@ func TestProposals(t *testing.T) { } func TestProposalCursorPagination(t *testing.T) { + ctx := context.Background() + ps := sqlstore.NewProposals(connectionSource) + testProposals, proposalTestParties = createPaginationTestProposals(t, ctx, ps) + // We cannot use the tempTransaction for this test due to the fact that the connection gets blocked when + // we recursively look for proposals that belong in a batch. The use of the transaction prevents another connection being + // taken from the connection pool, and causes a conn is busy error, we therefore just use a background context for these + // tests, and make sure we clean up after ourselves instead of rolling back the transaction. + defer cleanupTestProposals(t) + t.Run("should return all proposals when no paging is provided", testProposalCursorPaginationNoPagination) t.Run("should return only the first page of proposals when first is provided", testProposalCursorPaginationWithFirst) t.Run("should return only the requested page of proposals when first and after is provided", testProposalCursorPaginationWithFirstAndAfter) @@ -219,10 +397,8 @@ func TestProposalCursorPagination(t *testing.T) { } func testProposalCursorPaginationNoPagination(t *testing.T) { - ctx := tempTransaction(t) - + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, _ := createPaginationTestProposals(t, ctx, ps) pagination, err := entities.NewCursorPagination(nil, nil, nil, nil, false) require.NoError(t, err) @@ -230,41 +406,40 @@ func testProposalCursorPaginationNoPagination(t *testing.T) { require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[0], - proposals[10], - proposals[1], - proposals[11], - proposals[2], - proposals[12], - proposals[8], - proposals[18], - proposals[3], - proposals[13], - proposals[4], - proposals[14], - proposals[5], - proposals[15], - proposals[6], - proposals[16], - proposals[7], - proposals[17], - proposals[9], - proposals[19], + testProposals[0], + testProposals[10], + testProposals[1], + testProposals[11], + testProposals[2], + testProposals[12], + testProposals[8], + testProposals[18], + testProposals[3], + testProposals[13], + testProposals[4], + testProposals[14], + testProposals[5], + testProposals[15], + testProposals[6], + testProposals[16], + testProposals[7], + testProposals[17], + testProposals[9], + testProposals[19], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: false, HasPreviousPage: false, - StartCursor: proposals[0].Cursor().Encode(), - EndCursor: proposals[19].Cursor().Encode(), + StartCursor: testProposals[0].Cursor().Encode(), + EndCursor: testProposals[19].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithFirst(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, _ := createPaginationTestProposals(t, ctx, ps) first := int32(3) pagination, err := entities.NewCursorPagination(&first, nil, nil, nil, false) require.NoError(t, err) @@ -273,26 +448,25 @@ func testProposalCursorPaginationWithFirst(t *testing.T) { require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[0], - proposals[10], - proposals[1], + testProposals[0], + testProposals[10], + testProposals[1], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: true, HasPreviousPage: false, - StartCursor: proposals[0].Cursor().Encode(), - EndCursor: proposals[1].Cursor().Encode(), + StartCursor: testProposals[0].Cursor().Encode(), + EndCursor: testProposals[1].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithFirstAndAfter(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, _ := createPaginationTestProposals(t, ctx, ps) first := int32(8) - after := proposals[1].Cursor().Encode() + after := testProposals[1].Cursor().Encode() pagination, err := entities.NewCursorPagination(&first, &after, nil, nil, false) require.NoError(t, err) @@ -300,29 +474,28 @@ func testProposalCursorPaginationWithFirstAndAfter(t *testing.T) { require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[11], - proposals[2], - proposals[12], - proposals[8], - proposals[18], - proposals[3], - proposals[13], - proposals[4], + testProposals[11], + testProposals[2], + testProposals[12], + testProposals[8], + testProposals[18], + testProposals[3], + testProposals[13], + testProposals[4], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: true, HasPreviousPage: true, - StartCursor: proposals[11].Cursor().Encode(), - EndCursor: proposals[4].Cursor().Encode(), + StartCursor: testProposals[11].Cursor().Encode(), + EndCursor: testProposals[4].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithLast(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, _ := createPaginationTestProposals(t, ctx, ps) last := int32(3) pagination, err := entities.NewCursorPagination(nil, nil, &last, nil, false) require.NoError(t, err) @@ -331,26 +504,25 @@ func testProposalCursorPaginationWithLast(t *testing.T) { require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[17], - proposals[9], - proposals[19], + testProposals[17], + testProposals[9], + testProposals[19], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: false, HasPreviousPage: true, - StartCursor: proposals[17].Cursor().Encode(), - EndCursor: proposals[19].Cursor().Encode(), + StartCursor: testProposals[17].Cursor().Encode(), + EndCursor: testProposals[19].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithLastAndBefore(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, _ := createPaginationTestProposals(t, ctx, ps) last := int32(8) - before := proposals[5].Cursor().Encode() + before := testProposals[5].Cursor().Encode() pagination, err := entities.NewCursorPagination(nil, nil, &last, &before, false) require.NoError(t, err) @@ -358,29 +530,28 @@ func testProposalCursorPaginationWithLastAndBefore(t *testing.T) { require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[2], - proposals[12], - proposals[8], - proposals[18], - proposals[3], - proposals[13], - proposals[4], - proposals[14], + testProposals[2], + testProposals[12], + testProposals[8], + testProposals[18], + testProposals[3], + testProposals[13], + testProposals[4], + testProposals[14], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: true, HasPreviousPage: true, - StartCursor: proposals[2].Cursor().Encode(), - EndCursor: proposals[14].Cursor().Encode(), + StartCursor: testProposals[2].Cursor().Encode(), + EndCursor: testProposals[14].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationNoPaginationNewestFirst(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, _ := createPaginationTestProposals(t, ctx, ps) pagination, err := entities.NewCursorPagination(nil, nil, nil, nil, true) require.NoError(t, err) @@ -388,41 +559,40 @@ func testProposalCursorPaginationNoPaginationNewestFirst(t *testing.T) { require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[18], - proposals[8], - proposals[12], - proposals[2], - proposals[11], - proposals[1], - proposals[10], - proposals[0], - proposals[19], - proposals[9], - proposals[17], - proposals[7], - proposals[16], - proposals[6], - proposals[15], - proposals[5], - proposals[14], - proposals[4], - proposals[13], - proposals[3], + testProposals[18], + testProposals[8], + testProposals[12], + testProposals[2], + testProposals[11], + testProposals[1], + testProposals[10], + testProposals[0], + testProposals[19], + testProposals[9], + testProposals[17], + testProposals[7], + testProposals[16], + testProposals[6], + testProposals[15], + testProposals[5], + testProposals[14], + testProposals[4], + testProposals[13], + testProposals[3], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: false, HasPreviousPage: false, - StartCursor: proposals[18].Cursor().Encode(), - EndCursor: proposals[3].Cursor().Encode(), + StartCursor: testProposals[18].Cursor().Encode(), + EndCursor: testProposals[3].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithFirstNewestFirst(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, _ := createPaginationTestProposals(t, ctx, ps) first := int32(3) pagination, err := entities.NewCursorPagination(&first, nil, nil, nil, true) require.NoError(t, err) @@ -431,26 +601,25 @@ func testProposalCursorPaginationWithFirstNewestFirst(t *testing.T) { require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[18], - proposals[8], - proposals[12], + testProposals[18], + testProposals[8], + testProposals[12], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: true, HasPreviousPage: false, - StartCursor: proposals[18].Cursor().Encode(), - EndCursor: proposals[12].Cursor().Encode(), + StartCursor: testProposals[18].Cursor().Encode(), + EndCursor: testProposals[12].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithFirstAndAfterNewestFirst(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, _ := createPaginationTestProposals(t, ctx, ps) first := int32(8) - after := proposals[12].Cursor().Encode() + after := testProposals[12].Cursor().Encode() pagination, err := entities.NewCursorPagination(&first, &after, nil, nil, true) require.NoError(t, err) @@ -458,29 +627,28 @@ func testProposalCursorPaginationWithFirstAndAfterNewestFirst(t *testing.T) { require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[2], - proposals[11], - proposals[1], - proposals[10], - proposals[0], - proposals[19], - proposals[9], - proposals[17], + testProposals[2], + testProposals[11], + testProposals[1], + testProposals[10], + testProposals[0], + testProposals[19], + testProposals[9], + testProposals[17], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: true, HasPreviousPage: true, - StartCursor: proposals[2].Cursor().Encode(), - EndCursor: proposals[17].Cursor().Encode(), + StartCursor: testProposals[2].Cursor().Encode(), + EndCursor: testProposals[17].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithLastNewestFirst(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, _ := createPaginationTestProposals(t, ctx, ps) last := int32(3) pagination, err := entities.NewCursorPagination(nil, nil, &last, nil, true) require.NoError(t, err) @@ -489,26 +657,25 @@ func testProposalCursorPaginationWithLastNewestFirst(t *testing.T) { require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[4], - proposals[13], - proposals[3], + testProposals[4], + testProposals[13], + testProposals[3], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: false, HasPreviousPage: true, - StartCursor: proposals[4].Cursor().Encode(), - EndCursor: proposals[3].Cursor().Encode(), + StartCursor: testProposals[4].Cursor().Encode(), + EndCursor: testProposals[3].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithLastAndBeforeNewestFirst(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, _ := createPaginationTestProposals(t, ctx, ps) last := int32(8) - before := proposals[16].Cursor().Encode() + before := testProposals[16].Cursor().Encode() pagination, err := entities.NewCursorPagination(nil, nil, &last, &before, true) require.NoError(t, err) @@ -516,324 +683,313 @@ func testProposalCursorPaginationWithLastAndBeforeNewestFirst(t *testing.T) { require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[11], - proposals[1], - proposals[10], - proposals[0], - proposals[19], - proposals[9], - proposals[17], - proposals[7], + testProposals[11], + testProposals[1], + testProposals[10], + testProposals[0], + testProposals[19], + testProposals[9], + testProposals[17], + testProposals[7], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: true, HasPreviousPage: true, - StartCursor: proposals[11].Cursor().Encode(), - EndCursor: proposals[7].Cursor().Encode(), + StartCursor: testProposals[11].Cursor().Encode(), + EndCursor: testProposals[7].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationNoPaginationByParty(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, parties := createPaginationTestProposals(t, ctx, ps) pagination, err := entities.NewCursorPagination(nil, nil, nil, nil, false) require.NoError(t, err) - partyID := parties[0].ID.String() + partyID := proposalTestParties[0].ID.String() got, pageInfo, err := ps.Get(ctx, nil, &partyID, nil, pagination) require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[0], - proposals[1], - proposals[2], - proposals[8], - proposals[3], - proposals[4], - proposals[5], - proposals[6], - proposals[7], - proposals[9], + testProposals[0], + testProposals[1], + testProposals[2], + testProposals[8], + testProposals[3], + testProposals[4], + testProposals[5], + testProposals[6], + testProposals[7], + testProposals[9], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: false, HasPreviousPage: false, - StartCursor: proposals[0].Cursor().Encode(), - EndCursor: proposals[9].Cursor().Encode(), + StartCursor: testProposals[0].Cursor().Encode(), + EndCursor: testProposals[9].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithFirstByParty(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, parties := createPaginationTestProposals(t, ctx, ps) first := int32(3) pagination, err := entities.NewCursorPagination(&first, nil, nil, nil, false) require.NoError(t, err) - partyID := parties[0].ID.String() + partyID := proposalTestParties[0].ID.String() got, pageInfo, err := ps.Get(ctx, nil, &partyID, nil, pagination) require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[0], - proposals[1], - proposals[2], + testProposals[0], + testProposals[1], + testProposals[2], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: true, HasPreviousPage: false, - StartCursor: proposals[0].Cursor().Encode(), - EndCursor: proposals[2].Cursor().Encode(), + StartCursor: testProposals[0].Cursor().Encode(), + EndCursor: testProposals[2].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithFirstAndAfterByParty(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, parties := createPaginationTestProposals(t, ctx, ps) first := int32(3) - after := proposals[2].Cursor().Encode() + after := testProposals[2].Cursor().Encode() pagination, err := entities.NewCursorPagination(&first, &after, nil, nil, false) require.NoError(t, err) - partyID := parties[0].ID.String() + partyID := proposalTestParties[0].ID.String() got, pageInfo, err := ps.Get(ctx, nil, &partyID, nil, pagination) require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[8], - proposals[3], - proposals[4], + testProposals[8], + testProposals[3], + testProposals[4], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: true, HasPreviousPage: true, - StartCursor: proposals[8].Cursor().Encode(), - EndCursor: proposals[4].Cursor().Encode(), + StartCursor: testProposals[8].Cursor().Encode(), + EndCursor: testProposals[4].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithLastByParty(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, parties := createPaginationTestProposals(t, ctx, ps) last := int32(3) pagination, err := entities.NewCursorPagination(nil, nil, &last, nil, false) require.NoError(t, err) - partyID := parties[0].ID.String() + partyID := proposalTestParties[0].ID.String() got, pageInfo, err := ps.Get(ctx, nil, &partyID, nil, pagination) require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[6], - proposals[7], - proposals[9], + testProposals[6], + testProposals[7], + testProposals[9], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: false, HasPreviousPage: true, - StartCursor: proposals[6].Cursor().Encode(), - EndCursor: proposals[9].Cursor().Encode(), + StartCursor: testProposals[6].Cursor().Encode(), + EndCursor: testProposals[9].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithLastAndBeforeByParty(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, parties := createPaginationTestProposals(t, ctx, ps) last := int32(5) - before := proposals[6].Cursor().Encode() + before := testProposals[6].Cursor().Encode() pagination, err := entities.NewCursorPagination(nil, nil, &last, &before, false) require.NoError(t, err) - partyID := parties[0].ID.String() + partyID := proposalTestParties[0].ID.String() got, pageInfo, err := ps.Get(ctx, nil, &partyID, nil, pagination) require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[2], - proposals[8], - proposals[3], - proposals[4], - proposals[5], + testProposals[2], + testProposals[8], + testProposals[3], + testProposals[4], + testProposals[5], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: true, HasPreviousPage: true, - StartCursor: proposals[2].Cursor().Encode(), - EndCursor: proposals[5].Cursor().Encode(), + StartCursor: testProposals[2].Cursor().Encode(), + EndCursor: testProposals[5].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationNoPaginationByPartyNewestFirst(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, parties := createPaginationTestProposals(t, ctx, ps) pagination, err := entities.NewCursorPagination(nil, nil, nil, nil, true) require.NoError(t, err) - partyID := parties[0].ID.String() + partyID := proposalTestParties[0].ID.String() got, pageInfo, err := ps.Get(ctx, nil, &partyID, nil, pagination) require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[8], - proposals[2], - proposals[1], - proposals[0], - proposals[9], - proposals[7], - proposals[6], - proposals[5], - proposals[4], - proposals[3], + testProposals[8], + testProposals[2], + testProposals[1], + testProposals[0], + testProposals[9], + testProposals[7], + testProposals[6], + testProposals[5], + testProposals[4], + testProposals[3], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: false, HasPreviousPage: false, - StartCursor: proposals[8].Cursor().Encode(), - EndCursor: proposals[3].Cursor().Encode(), + StartCursor: testProposals[8].Cursor().Encode(), + EndCursor: testProposals[3].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithFirstByPartyNewestFirst(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, parties := createPaginationTestProposals(t, ctx, ps) first := int32(3) pagination, err := entities.NewCursorPagination(&first, nil, nil, nil, true) require.NoError(t, err) - partyID := parties[0].ID.String() + partyID := proposalTestParties[0].ID.String() got, pageInfo, err := ps.Get(ctx, nil, &partyID, nil, pagination) require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[8], - proposals[2], - proposals[1], + testProposals[8], + testProposals[2], + testProposals[1], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: true, HasPreviousPage: false, - StartCursor: proposals[8].Cursor().Encode(), - EndCursor: proposals[1].Cursor().Encode(), + StartCursor: testProposals[8].Cursor().Encode(), + EndCursor: testProposals[1].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithFirstAndAfterByPartyNewestFirst(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, parties := createPaginationTestProposals(t, ctx, ps) first := int32(3) - after := proposals[1].Cursor().Encode() + after := testProposals[1].Cursor().Encode() pagination, err := entities.NewCursorPagination(&first, &after, nil, nil, true) require.NoError(t, err) - partyID := parties[0].ID.String() + partyID := proposalTestParties[0].ID.String() got, pageInfo, err := ps.Get(ctx, nil, &partyID, nil, pagination) require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[0], - proposals[9], - proposals[7], + testProposals[0], + testProposals[9], + testProposals[7], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: true, HasPreviousPage: true, - StartCursor: proposals[0].Cursor().Encode(), - EndCursor: proposals[7].Cursor().Encode(), + StartCursor: testProposals[0].Cursor().Encode(), + EndCursor: testProposals[7].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithLastByPartyNewestFirst(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, parties := createPaginationTestProposals(t, ctx, ps) last := int32(3) pagination, err := entities.NewCursorPagination(nil, nil, &last, nil, true) require.NoError(t, err) - partyID := parties[0].ID.String() + partyID := proposalTestParties[0].ID.String() got, pageInfo, err := ps.Get(ctx, nil, &partyID, nil, pagination) require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[5], - proposals[4], - proposals[3], + testProposals[5], + testProposals[4], + testProposals[3], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: false, HasPreviousPage: true, - StartCursor: proposals[5].Cursor().Encode(), - EndCursor: proposals[3].Cursor().Encode(), + StartCursor: testProposals[5].Cursor().Encode(), + EndCursor: testProposals[3].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationWithLastAndBeforeByPartyNewestFirst(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, parties := createPaginationTestProposals(t, ctx, ps) last := int32(5) - before := proposals[5].Cursor().Encode() + before := testProposals[5].Cursor().Encode() pagination, err := entities.NewCursorPagination(nil, nil, &last, &before, true) require.NoError(t, err) - partyID := parties[0].ID.String() + partyID := proposalTestParties[0].ID.String() got, pageInfo, err := ps.Get(ctx, nil, &partyID, nil, pagination) require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[1], - proposals[0], - proposals[9], - proposals[7], - proposals[6], + testProposals[1], + testProposals[0], + testProposals[9], + testProposals[7], + testProposals[6], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: true, HasPreviousPage: true, - StartCursor: proposals[1].Cursor().Encode(), - EndCursor: proposals[6].Cursor().Encode(), + StartCursor: testProposals[1].Cursor().Encode(), + EndCursor: testProposals[6].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationOpenOnly(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, _ := createPaginationTestProposals(t, ctx, ps) pagination, err := entities.NewCursorPagination(nil, nil, nil, nil, false) require.NoError(t, err) @@ -842,29 +998,28 @@ func testProposalCursorPaginationOpenOnly(t *testing.T) { require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[0], - proposals[10], - proposals[1], - proposals[11], - proposals[2], - proposals[12], - proposals[8], - proposals[18], + testProposals[0], + testProposals[10], + testProposals[1], + testProposals[11], + testProposals[2], + testProposals[12], + testProposals[8], + testProposals[18], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: false, HasPreviousPage: false, - StartCursor: proposals[0].Cursor().Encode(), - EndCursor: proposals[18].Cursor().Encode(), + StartCursor: testProposals[0].Cursor().Encode(), + EndCursor: testProposals[18].Cursor().Encode(), }, pageInfo) } func testProposalCursorPaginationGivenState(t *testing.T) { - ctx := tempTransaction(t) + ctx := context.Background() ps := sqlstore.NewProposals(connectionSource) - proposals, _ := createPaginationTestProposals(t, ctx, ps) pagination, err := entities.NewCursorPagination(nil, nil, nil, nil, false) require.NoError(t, err) @@ -874,19 +1029,19 @@ func testProposalCursorPaginationGivenState(t *testing.T) { require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[3], - proposals[13], - proposals[6], - proposals[16], - proposals[9], - proposals[19], + testProposals[3], + testProposals[13], + testProposals[6], + testProposals[16], + testProposals[9], + testProposals[19], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: false, HasPreviousPage: false, - StartCursor: proposals[3].Cursor().Encode(), - EndCursor: proposals[19].Cursor().Encode(), + StartCursor: testProposals[3].Cursor().Encode(), + EndCursor: testProposals[19].Cursor().Encode(), }, pageInfo) }) @@ -896,17 +1051,17 @@ func testProposalCursorPaginationGivenState(t *testing.T) { require.NoError(t, err) // Proposals should be listed in order of their status, then time, then id want := []entities.Proposal{ - proposals[4], - proposals[14], - proposals[5], - proposals[15], + testProposals[4], + testProposals[14], + testProposals[5], + testProposals[15], } assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ HasNextPage: false, HasPreviousPage: false, - StartCursor: proposals[4].Cursor().Encode(), - EndCursor: proposals[15].Cursor().Encode(), + StartCursor: testProposals[4].Cursor().Encode(), + EndCursor: testProposals[15].Cursor().Encode(), }, pageInfo) }) } @@ -916,7 +1071,7 @@ func createPaginationTestProposals(t *testing.T, ctx context.Context, pps *sqlst ps := sqlstore.NewParties(connectionSource) bs := sqlstore.NewBlocks(connectionSource) - proposals := make([]entities.Proposal, 20) + testProposals := make([]entities.Proposal, 20) blockTime := time.Date(2022, 7, 15, 8, 0, 0, 0, time.Local) block := addTestBlockForTime(t, ctx, bs, blockTime) @@ -954,12 +1109,23 @@ func createPaginationTestProposals(t *testing.T, ctx context.Context, pps *sqlst terms1 := entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{Change: &vega.ProposalTerms_NewMarket{NewMarket: &vega.NewMarket{}}}} terms2 := entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{Change: &vega.ProposalTerms_NewAsset{NewAsset: &vega.NewAsset{}}}} - proposals[i] = addTestProposal(t, ctx, pps, id1, parties[0], ref1, block, states[i], rationale1, terms1, entities.ProposalErrorUnspecified) - proposals[i+10] = addTestProposal(t, ctx, pps, id2, parties[1], ref2, block2, states[i], rationale2, terms2, entities.ProposalErrorUnspecified) + testProposals[i] = addTestProposal(t, ctx, pps, id1, parties[0], ref1, block, states[i], rationale1, terms1, entities.ProposalErrorUnspecified, nil, entities.BatchProposalTerms{}) + testProposals[i+10] = addTestProposal(t, ctx, pps, id2, parties[1], ref2, block2, states[i], rationale2, terms2, entities.ProposalErrorUnspecified, nil, entities.BatchProposalTerms{}) i++ } - return proposals, parties + return testProposals, parties +} + +func cleanupTestProposals(t *testing.T) { + t.Helper() + // Remove the proposals, then the parties and then the blocks + _, err := connectionSource.Connection.Exec(context.Background(), `TRUNCATE TABLE proposals`) + require.NoError(t, err) + _, err = connectionSource.Connection.Exec(context.Background(), `TRUNCATE TABLE parties`) + require.NoError(t, err) + _, err = connectionSource.Connection.Exec(context.Background(), `TRUNCATE TABLE blocks`) + require.NoError(t, err) } func TestProposeSuccessorMarket(t *testing.T) { @@ -1004,13 +1170,13 @@ func TestProposeSuccessorMarket(t *testing.T) { }, }, }}}} - id1 := helpers.GenerateID() - id2 := helpers.GenerateID() + id1 := GenerateID() + id2 := GenerateID() - reference1 := helpers.GenerateID() - reference2 := helpers.GenerateID() - prop1 := addTestProposal(t, ctx, propStore, id1, party1, reference1, block1, entities.ProposalStateEnacted, rationale1, terms1, entities.ProposalErrorUnspecified) - prop2 := addTestProposal(t, ctx, propStore, id2, party1, reference2, block1, entities.ProposalStateRejected, rationale2, terms2, entities.ProposalErrorInvalidSuccessorMarket) + reference1 := GenerateID() + reference2 := GenerateID() + prop1 := addTestProposal(t, ctx, propStore, id1, party1, reference1, block1, entities.ProposalStateEnacted, rationale1, terms1, entities.ProposalErrorUnspecified, nil, entities.BatchProposalTerms{}) + prop2 := addTestProposal(t, ctx, propStore, id2, party1, reference2, block1, entities.ProposalStateRejected, rationale2, terms2, entities.ProposalErrorInvalidSuccessorMarket, nil, entities.BatchProposalTerms{}) t.Run("GetByID", func(t *testing.T) { want := prop1 @@ -1027,8 +1193,8 @@ func TestProposeSuccessorMarket(t *testing.T) { func getNewProposal(partyID string) *vega.Proposal { return &vega.Proposal{ - Id: helpers.GenerateID(), - Reference: helpers.GenerateID(), + Id: GenerateID(), + Reference: GenerateID(), PartyId: partyID, State: vega.Proposal_STATE_OPEN, Timestamp: time.Now().UnixNano(), diff --git a/datanode/sqlstore/protocol_upgrade_proposal_test.go b/datanode/sqlstore/protocol_upgrade_proposal_test.go index 3a3f3c3cb9..f9e61fd79d 100644 --- a/datanode/sqlstore/protocol_upgrade_proposal_test.go +++ b/datanode/sqlstore/protocol_upgrade_proposal_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/datanode/sqlstore/protocol_upgrade_proposals.go b/datanode/sqlstore/protocol_upgrade_proposals.go index e3a09a7132..c6b4176351 100644 --- a/datanode/sqlstore/protocol_upgrade_proposals.go +++ b/datanode/sqlstore/protocol_upgrade_proposals.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -35,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/referral_programs.go b/datanode/sqlstore/referral_programs.go index 8070e0031c..e1d34f8c95 100644 --- a/datanode/sqlstore/referral_programs.go +++ b/datanode/sqlstore/referral_programs.go @@ -19,11 +19,10 @@ import ( "context" "time" - "github.com/georgysavva/scany/pgxscan" - + "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" - "code.vegaprotocol.io/vega/datanode/entities" + "github.com/georgysavva/scany/pgxscan" ) type ReferralPrograms struct { diff --git a/datanode/sqlstore/referral_programs_test.go b/datanode/sqlstore/referral_programs_test.go index 8b427905be..96377f9a5c 100644 --- a/datanode/sqlstore/referral_programs_test.go +++ b/datanode/sqlstore/referral_programs_test.go @@ -19,16 +19,14 @@ import ( "testing" "time" - "github.com/georgysavva/scany/pgxscan" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" - - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/georgysavva/scany/pgxscan" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func setupReferralProgramTest(t *testing.T) (*sqlstore.Blocks, *sqlstore.ReferralPrograms) { @@ -55,7 +53,7 @@ func TestReferralPrograms_AddReferralProgram(t *testing.T) { { Program: &vega.ReferralProgram{ Version: 1, - Id: helpers.GenerateID(), + Id: GenerateID(), BenefitTiers: []*vega.BenefitTier{ { MinimumRunningNotionalTakerVolume: "1000", @@ -87,7 +85,7 @@ func TestReferralPrograms_AddReferralProgram(t *testing.T) { { Program: &vega.ReferralProgram{ Version: 1, - Id: helpers.GenerateID(), + Id: GenerateID(), BenefitTiers: []*vega.BenefitTier{ { MinimumRunningNotionalTakerVolume: "2000", @@ -148,7 +146,7 @@ func getReferralEvents(t *testing.T, endTime time.Time) (*eventspb.ReferralProgr started := eventspb.ReferralProgramStarted{ Program: &vega.ReferralProgram{ Version: 1, - Id: helpers.GenerateID(), + Id: GenerateID(), BenefitTiers: []*vega.BenefitTier{ { MinimumRunningNotionalTakerVolume: "1000", diff --git a/datanode/sqlstore/referral_sets.go b/datanode/sqlstore/referral_sets.go index 01af1291f8..1adf699316 100644 --- a/datanode/sqlstore/referral_sets.go +++ b/datanode/sqlstore/referral_sets.go @@ -20,13 +20,12 @@ import ( "fmt" "strings" - "github.com/georgysavva/scany/pgxscan" - + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - "code.vegaprotocol.io/vega/datanode/entities" - "code.vegaprotocol.io/vega/datanode/metrics" + "github.com/georgysavva/scany/pgxscan" ) type ReferralSets struct { @@ -66,7 +65,7 @@ func (rs *ReferralSets) AddReferralSet(ctx context.Context, referralSet *entitie defer metrics.StartSQLQuery("ReferralSets", "AddReferralSet")() _, err := rs.Connection.Exec( ctx, - "INSERT INTO referral_sets(id, referrer, created_at, updated_at, vega_time) values ($1, $2, $3, $4, $5)", + "INSERT INTO referral_sets(id, referrer, created_at, updated_at, vega_time) VALUES ($1, $2, $3, $4, $5)", referralSet.ID, referralSet.Referrer, referralSet.CreatedAt, @@ -81,7 +80,7 @@ func (rs *ReferralSets) RefereeJoinedReferralSet(ctx context.Context, referee *e defer metrics.StartSQLQuery("ReferralSets", "AddReferralSetReferee")() _, err := rs.Connection.Exec( ctx, - "INSERT INTO referral_set_referees(referral_set_id, referee, joined_at, at_epoch, vega_time) values ($1, $2, $3, $4, $5)", + "INSERT INTO referral_set_referees(referral_set_id, referee, joined_at, at_epoch, vega_time) VALUES ($1, $2, $3, $4, $5)", referee.ReferralSetID, referee.Referee, referee.JoinedAt, @@ -103,17 +102,24 @@ func (rs *ReferralSets) ListReferralSets(ctx context.Context, referralSetID *ent pageInfo entities.PageInfo ) - query := `SELECT DISTINCT rs.id as id, rs.referrer as referrer, rs.created_at as created_at, rs.updated_at as updated_at, rs.vega_time as vega_time - FROM referral_sets rs - LEFT JOIN referral_set_referees r on rs.id = r.referral_set_id` // LEFT JOIN because a referral set may not have any referees joined yet. + query := `WITH + referees_stats AS ( + SELECT referral_set_id, COUNT(DISTINCT referee) AS total_referees + FROM current_referral_set_referees + GROUP BY + referral_set_id + ) +SELECT referral_sets.*, COALESCE(referees_stats.total_referees, 0) + 1 AS total_members -- plus the referrer +FROM referral_sets + LEFT JOIN referees_stats ON referral_sets.id = referees_stats.referral_set_id` // we only allow one of the following to be used as the filter if referralSetID != nil { - query = fmt.Sprintf("%s where rs.id = %s", query, nextBindVar(&args, referralSetID)) + query = fmt.Sprintf("%s WHERE referral_sets.id = %s", query, nextBindVar(&args, referralSetID)) } else if referrer != nil { - query = fmt.Sprintf("%s where rs.referrer = %s", query, nextBindVar(&args, referrer)) + query = fmt.Sprintf("%s WHERE referral_sets.referrer = %s", query, nextBindVar(&args, referrer)) } else if referee != nil { - query = fmt.Sprintf("%s where r.referee = %s", query, nextBindVar(&args, referee)) + query = fmt.Sprintf("%s INNER JOIN current_referral_set_referees ON current_referral_set_referees.referee = %s AND referral_sets.id = current_referral_set_referees.referral_set_id", query, nextBindVar(&args, referee)) } query, args, err = PaginateQuery[entities.ReferralSetCursor](query, args, referralSetOrdering, pagination) @@ -151,7 +157,7 @@ func (rs *ReferralSets) AddReferralSetStats(ctx context.Context, stats *entities reward_factor, rewards_multiplier, rewards_factor_multiplier) - values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)`, + VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)`, stats.SetID, stats.AtEpoch, stats.WasEligible, @@ -182,12 +188,12 @@ func (rs *ReferralSets) GetReferralSetStats(ctx context.Context, setID *entities referral_set_running_notional_taker_volume, referrer_taker_volume, reward_factor, - referee_stats->>'party_id' as party_id, - referee_stats->>'discount_factor' as discount_factor, - referee_stats->>'epoch_notional_taker_volume' as epoch_notional_taker_volume, + referee_stats->>'party_id' AS party_id, + referee_stats->>'discount_factor' AS discount_factor, + referee_stats->>'epoch_notional_taker_volume' AS epoch_notional_taker_volume, rewards_multiplier, rewards_factor_multiplier - FROM referral_set_stats, jsonb_array_elements(referees_stats) AS referee_stats` + FROM referral_set_stats, JSONB_ARRAY_ELEMENTS(referees_stats) AS referee_stats` whereClauses := []string{} @@ -278,13 +284,13 @@ func (rs *ReferralSets) ListReferralSetReferees(ctx context.Context, referralSet func getSelectQuery(aggregationEpochs uint32) string { return fmt.Sprintf(` -with epoch_range as (select coalesce(max(id) - %d, 0) as start_epoch, coalesce(max(id), 0) as end_epoch +with epoch_range as (select GREATEST(max(id) - %d, 0) as start_epoch, GREATEST(max(id), 0) as end_epoch from epochs where end_time is not null ), ref_period_volume (party, period_volume) as ( select decode(ref_stats->>'party_id', 'hex'), sum((ref_stats->>'epoch_notional_taker_volume')::numeric) as period_volume from referral_set_stats, jsonb_array_elements(referees_stats) as ref_stats, epoch_range - where at_epoch >= epoch_range.start_epoch and at_epoch <= epoch_range.end_epoch + where at_epoch > epoch_range.start_epoch and at_epoch <= epoch_range.end_epoch and jsonb_typeof(referees_stats) != 'null' group by ref_stats->>'party_id' ), ref_period_rewards (party, period_rewards) as ( @@ -293,12 +299,12 @@ with epoch_range as (select coalesce(max(id) - %d, 0) as start_epoch, coalesce(m jsonb_array_elements(referrer_rewards_generated) as ref_rewards, jsonb_array_elements(ref_rewards->'generated_reward') as gen_rewards, epoch_range - where epoch_seq >= epoch_range.start_epoch and epoch_seq <= epoch_range.end_epoch + where epoch_seq > epoch_range.start_epoch and epoch_seq <= epoch_range.end_epoch and jsonb_typeof(referrer_rewards_generated) != 'null' group by gen_rewards->>'party' ) SELECT rf.referral_set_id, rf.referee, rf.joined_at, rf.at_epoch, rf.vega_time, coalesce(pv.period_volume, 0) period_volume, coalesce(pr.period_rewards, 0) period_rewards_paid -from referral_set_referees rf +from current_referral_set_referees rf join referral_sets rs on rf.referral_set_id = rs.id left join ref_period_volume pv on rf.referee = pv.party left join ref_period_rewards pr on rf.referee = pr.party diff --git a/datanode/sqlstore/referral_sets_test.go b/datanode/sqlstore/referral_sets_test.go index e8b9f646fd..07d09482f7 100644 --- a/datanode/sqlstore/referral_sets_test.go +++ b/datanode/sqlstore/referral_sets_test.go @@ -21,24 +21,20 @@ import ( "math/rand" "sort" "strconv" + "strings" "testing" "time" - "code.vegaprotocol.io/vega/libs/num" - - "golang.org/x/exp/slices" - + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" + "code.vegaprotocol.io/vega/libs/num" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" "github.com/georgysavva/scany/pgxscan" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "code.vegaprotocol.io/vega/datanode/entities" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" - - "code.vegaprotocol.io/vega/datanode/sqlstore" + "golang.org/x/exp/slices" ) func setupReferralSetsTest(t *testing.T) (*sqlstore.Blocks, *sqlstore.Parties, *sqlstore.ReferralSets) { @@ -58,7 +54,7 @@ func TestReferralSets_AddReferralSet(t *testing.T) { referrer := addTestParty(t, ctx, ps, block) set := entities.ReferralSet{ - ID: entities.ReferralSetID(helpers.GenerateID()), + ID: entities.ReferralSetID(GenerateID()), Referrer: referrer.ID, CreatedAt: block.VegaTime, UpdatedAt: block.VegaTime, @@ -91,7 +87,7 @@ func TestReferralSets_RefereeJoinedReferralSet(t *testing.T) { referee := addTestParty(t, ctx, ps, block) set := entities.ReferralSet{ - ID: entities.ReferralSetID(helpers.GenerateID()), + ID: entities.ReferralSetID(GenerateID()), Referrer: referrer.ID, CreatedAt: block.VegaTime, UpdatedAt: block.VegaTime, @@ -126,27 +122,31 @@ func TestReferralSets_RefereeJoinedReferralSet(t *testing.T) { }) } -func setupReferralSetsAndReferees(t *testing.T, ctx context.Context, bs *sqlstore.Blocks, ps *sqlstore.Parties, rs *sqlstore.ReferralSets) ( +func setupReferralSetsAndReferees(t *testing.T, ctx context.Context, bs *sqlstore.Blocks, ps *sqlstore.Parties, rs *sqlstore.ReferralSets, createStats bool) ( []entities.ReferralSet, map[string][]entities.ReferralSetRefereeStats, ) { t.Helper() sets := make([]entities.ReferralSet, 0) referees := make(map[string][]entities.ReferralSetRefereeStats, 0) + es := sqlstore.NewEpochs(connectionSource) + fs := sqlstore.NewFeesStats(connectionSource) for i := 0; i < 10; i++ { block := addTestBlockForTime(t, ctx, bs, time.Now().Add(time.Duration(i-10)*time.Minute)) + endTime := block.VegaTime.Add(time.Minute) + addTestEpoch(t, ctx, es, int64(i), block.VegaTime, endTime, &endTime, block) referrer := addTestParty(t, ctx, ps, block) set := entities.ReferralSet{ - ID: entities.ReferralSetID(helpers.GenerateID()), - Referrer: referrer.ID, - CreatedAt: block.VegaTime, - UpdatedAt: block.VegaTime, - VegaTime: block.VegaTime, + ID: entities.ReferralSetID(GenerateID()), + Referrer: referrer.ID, + TotalMembers: 1, + CreatedAt: block.VegaTime, + UpdatedAt: block.VegaTime, + VegaTime: block.VegaTime, } err := rs.AddReferralSet(ctx, &set) require.NoError(t, err) - sets = append(sets, set) setID := set.ID.String() referees[setID] = make([]entities.ReferralSetRefereeStats, 0) @@ -162,14 +162,67 @@ func setupReferralSetsAndReferees(t *testing.T, ctx context.Context, bs *sqlstor AtEpoch: uint64(block.Height), VegaTime: block.VegaTime, }, - PeriodVolume: num.DecimalFromInt64(0), - PeriodRewardsPaid: num.DecimalFromInt64(0), + PeriodVolume: num.DecimalFromInt64(10), + PeriodRewardsPaid: num.DecimalFromInt64(10), } err := rs.RefereeJoinedReferralSet(ctx, &setReferee.ReferralSetReferee) require.NoError(t, err) + + set.TotalMembers += 1 + referees[setID] = append(referees[setID], setReferee) + if createStats { + // Add some stats for the referral sets + stats := entities.ReferralSetStats{ + SetID: set.ID, + AtEpoch: uint64(block.Height), + WasEligible: true, + ReferralSetRunningNotionalTakerVolume: "10", + ReferrerTakerVolume: "10", + RefereesStats: []*eventspb.RefereeStats{ + { + PartyId: referee.ID.String(), + DiscountFactor: "10", + EpochNotionalTakerVolume: "10", + }, + }, + VegaTime: block.VegaTime, + RewardFactor: "1", + RewardsMultiplier: "1", + RewardsFactorMultiplier: "1", + } + require.NoError(t, rs.AddReferralSetStats(ctx, &stats)) + feeStats := entities.FeesStats{ + MarketID: "deadbeef01", + AssetID: "cafed00d01", + EpochSeq: uint64(block.Height), + TotalRewardsReceived: []*eventspb.PartyAmount{ + { + Party: referee.ID.String(), + Amount: "10", + QuantumAmount: "10", + }, + }, + ReferrerRewardsGenerated: []*eventspb.ReferrerRewardsGenerated{ + { + Referrer: "deadd00d01", + GeneratedReward: []*eventspb.PartyAmount{ + { + Party: referee.ID.String(), + Amount: "10", + QuantumAmount: "10", + }, + }, + }, + }, + VegaTime: block.VegaTime, + } + require.NoError(t, fs.AddFeesStats(ctx, &feeStats)) + } } + + sets = append(sets, set) } sort.Slice(sets, func(i, j int) bool { @@ -192,10 +245,10 @@ func TestReferralSets_ListReferralSets(t *testing.T) { bs, ps, rs := setupReferralSetsTest(t) ctx := tempTransaction(t) - sets, referees := setupReferralSetsAndReferees(t, ctx, bs, ps, rs) + sets, referees := setupReferralSetsAndReferees(t, ctx, bs, ps, rs, true) t.Run("Should return all referral sets", func(t *testing.T) { - got, pageInfo, err := rs.ListReferralSets(ctx, nil, nil, nil, helpers.DefaultNoPagination()) + got, pageInfo, err := rs.ListReferralSets(ctx, nil, nil, nil, entities.DefaultCursorPagination(true)) require.NoError(t, err) want := sets[:] assert.Equal(t, want, got) @@ -333,7 +386,7 @@ func TestReferralSets_ListReferralSetReferees(t *testing.T) { bs, ps, rs := setupReferralSetsTest(t) ctx := tempTransaction(t) - sets, referees := setupReferralSetsAndReferees(t, ctx, bs, ps, rs) + sets, referees := setupReferralSetsAndReferees(t, ctx, bs, ps, rs, true) src := rand.New(rand.NewSource(time.Now().UnixNano())) r := rand.New(src) set := sets[r.Intn(len(sets))] @@ -342,7 +395,7 @@ func TestReferralSets_ListReferralSetReferees(t *testing.T) { t.Run("Should return all referees in a set if no pagination", func(t *testing.T) { want := refs[:] - got, pageInfo, err := rs.ListReferralSetReferees(ctx, &set.ID, nil, nil, helpers.DefaultNoPagination(), 30) + got, pageInfo, err := rs.ListReferralSetReferees(ctx, &set.ID, nil, nil, entities.DefaultCursorPagination(true), 30) require.NoError(t, err) assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ @@ -355,7 +408,7 @@ func TestReferralSets_ListReferralSetReferees(t *testing.T) { t.Run("Should return all referees in a set by referrer if no pagination", func(t *testing.T) { want := refs[:] - got, pageInfo, err := rs.ListReferralSetReferees(ctx, nil, &set.Referrer, nil, helpers.DefaultNoPagination(), 30) + got, pageInfo, err := rs.ListReferralSetReferees(ctx, nil, &set.Referrer, nil, entities.DefaultCursorPagination(true), 30) require.NoError(t, err) assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ @@ -369,7 +422,7 @@ func TestReferralSets_ListReferralSetReferees(t *testing.T) { t.Run("Should return referee in a set", func(t *testing.T) { want := []entities.ReferralSetRefereeStats{refs[r.Intn(len(refs))]} - got, pageInfo, err := rs.ListReferralSetReferees(ctx, nil, nil, &want[0].Referee, helpers.DefaultNoPagination(), 30) + got, pageInfo, err := rs.ListReferralSetReferees(ctx, nil, nil, &want[0].Referee, entities.DefaultCursorPagination(true), 30) require.NoError(t, err) assert.Equal(t, want, got) assert.Equal(t, entities.PageInfo{ @@ -472,9 +525,9 @@ func TestReferralSets_ListReferralSetReferees(t *testing.T) { func TestReferralSets_AddReferralSetStats(t *testing.T) { bs, ps, rs := setupReferralSetsTest(t) - ctx := context.Background() + ctx := tempTransaction(t) - sets, referees := setupReferralSetsAndReferees(t, ctx, bs, ps, rs) + sets, referees := setupReferralSetsAndReferees(t, ctx, bs, ps, rs, false) src := rand.New(rand.NewSource(time.Now().UnixNano())) r := rand.New(src) set := sets[r.Intn(len(sets))] @@ -502,7 +555,7 @@ func TestReferralSets_AddReferralSetStats(t *testing.T) { require.NoError(t, err) var got entities.ReferralSetStats - err = pgxscan.Get(ctx, connectionSource.Connection, &got, "SELECT * FROM referral_set_stats WHERE set_id = $1 and at_epoch = $2", set.ID, epoch) + err = pgxscan.Get(ctx, connectionSource.Connection, &got, "SELECT * FROM referral_set_stats WHERE set_id = $1 AND at_epoch = $2", set.ID, epoch) require.NoError(t, err) assert.Equal(t, stats, got) }) @@ -525,7 +578,7 @@ func TestReferralSets_AddReferralSetStats(t *testing.T) { err := rs.AddReferralSetStats(ctx, &stats) require.NoError(t, err) var got entities.ReferralSetStats - err = pgxscan.Get(ctx, connectionSource.Connection, &got, "SELECT * FROM referral_set_stats WHERE set_id = $1 and at_epoch = $2", set.ID, epoch) + err = pgxscan.Get(ctx, connectionSource.Connection, &got, "SELECT * FROM referral_set_stats WHERE set_id = $1 AND at_epoch = $2", set.ID, epoch) require.NoError(t, err) assert.Equal(t, stats, got) @@ -676,20 +729,28 @@ func flattenReferralSetStatsForEpoch(flattenStats []entities.FlattenReferralSetS } } - slices.SortStableFunc(lastStats, func(a, b entities.FlattenReferralSetStats) bool { + slices.SortStableFunc(lastStats, func(a, b entities.FlattenReferralSetStats) int { if a.AtEpoch == b.AtEpoch { if a.SetID == b.SetID { - return a.PartyID < b.PartyID + return strings.Compare(a.PartyID, b.PartyID) } - return a.SetID < b.SetID + return strings.Compare(string(a.SetID), string(b.SetID)) } - - return a.AtEpoch > b.AtEpoch + return -compareUint64(a.AtEpoch, b.AtEpoch) }) return lastStats } +func compareUint64(a, b uint64) int { + if a < b { + return -1 + } else if a > b { + return 1 + } + return 0 +} + func flattenReferralSetStatsForParty(flattenStats []entities.FlattenReferralSetStats, party string) []entities.FlattenReferralSetStats { lastStats := []entities.FlattenReferralSetStats{} @@ -699,15 +760,15 @@ func flattenReferralSetStatsForParty(flattenStats []entities.FlattenReferralSetS } } - slices.SortStableFunc(lastStats, func(a, b entities.FlattenReferralSetStats) bool { + slices.SortStableFunc(lastStats, func(a, b entities.FlattenReferralSetStats) int { if a.AtEpoch == b.AtEpoch { if a.SetID == b.SetID { - return a.PartyID < b.PartyID + return strings.Compare(a.PartyID, b.PartyID) } - return a.SetID < b.SetID + return strings.Compare(string(a.SetID), string(b.SetID)) } - return a.AtEpoch > b.AtEpoch + return -compareUint64(a.AtEpoch, b.AtEpoch) }) return lastStats diff --git a/datanode/sqlstore/rewards.go b/datanode/sqlstore/rewards.go index 9835360701..04d372ebf1 100644 --- a/datanode/sqlstore/rewards.go +++ b/datanode/sqlstore/rewards.go @@ -13,47 +13,64 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( "context" + "encoding/hex" "fmt" "strings" - - "github.com/georgysavva/scany/pgxscan" + "time" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/ptr" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + + "github.com/georgysavva/scany/pgxscan" + "github.com/shopspring/decimal" ) type Rewards struct { *ConnectionSource + runningTotals map[entities.GameID]map[entities.PartyID]decimal.Decimal + runningTotalsQuantum map[entities.GameID]map[entities.PartyID]decimal.Decimal } var rewardsOrdering = TableOrdering{ ColumnOrdering{Name: "epoch_id", Sorting: ASC}, } -func NewRewards(connectionSource *ConnectionSource) *Rewards { +func NewRewards(ctx context.Context, connectionSource *ConnectionSource) *Rewards { r := &Rewards{ ConnectionSource: connectionSource, } + r.runningTotals = make(map[entities.GameID]map[entities.PartyID]decimal.Decimal) + r.runningTotalsQuantum = make(map[entities.GameID]map[entities.PartyID]decimal.Decimal) + r.fetchRunningTotals(ctx) return r } +func (rs *Rewards) fetchRunningTotals(ctx context.Context) { + query := `SELECT * FROM current_game_reward_totals` + var totals []entities.RewardTotals + err := pgxscan.Select(ctx, rs.Connection, &totals, query) + if err != nil && !pgxscan.NotFound(err) { + panic(fmt.Errorf("could not retrieve game reward totals: %w", err)) + } + for _, total := range totals { + if _, ok := rs.runningTotals[total.GameID]; !ok { + rs.runningTotals[total.GameID] = make(map[entities.PartyID]decimal.Decimal) + } + if _, ok := rs.runningTotalsQuantum[total.GameID]; !ok { + rs.runningTotalsQuantum[total.GameID] = make(map[entities.PartyID]decimal.Decimal) + } + rs.runningTotals[total.GameID][total.PartyID] = total.TotalRewards + rs.runningTotalsQuantum[total.GameID][total.PartyID] = total.TotalRewardsQuantum + } +} + func (rs *Rewards) Add(ctx context.Context, r entities.Reward) error { defer metrics.StartSQLQuery("Rewards", "Add")() _, err := rs.Connection.Exec(ctx, @@ -64,37 +81,97 @@ func (rs *Rewards) Add(ctx context.Context, r entities.Reward) error { reward_type, epoch_id, amount, + quantum_amount, percent_of_total, timestamp, tx_hash, vega_time, seq_num, - locked_until_epoch_id + locked_until_epoch_id, + game_id ) - VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12);`, - r.PartyID, r.AssetID, r.MarketID, r.RewardType, r.EpochID, r.Amount, r.PercentOfTotal, r.Timestamp, r.TxHash, - r.VegaTime, r.SeqNum, r.LockedUntilEpochID) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14);`, + r.PartyID, r.AssetID, r.MarketID, r.RewardType, r.EpochID, r.Amount, r.QuantumAmount, r.PercentOfTotal, r.Timestamp, r.TxHash, + r.VegaTime, r.SeqNum, r.LockedUntilEpochID, r.GameID) + + if r.GameID != nil && *r.GameID != "" { + gID := *r.GameID + if _, ok := rs.runningTotals[gID]; !ok { + rs.runningTotals[gID] = make(map[entities.PartyID]decimal.Decimal) + rs.runningTotals[gID][r.PartyID] = num.DecimalZero() + } + if _, ok := rs.runningTotalsQuantum[gID]; !ok { + rs.runningTotalsQuantum[gID] = make(map[entities.PartyID]decimal.Decimal) + rs.runningTotalsQuantum[gID][r.PartyID] = num.DecimalZero() + } + + rs.runningTotals[gID][r.PartyID] = rs.runningTotals[gID][r.PartyID].Add(r.Amount) + rs.runningTotalsQuantum[gID][r.PartyID] = rs.runningTotalsQuantum[gID][r.PartyID].Add(r.QuantumAmount) + + defer metrics.StartSQLQuery("GameRewardTotals", "Add")() + _, err = rs.Connection.Exec(ctx, `INSERT INTO game_reward_totals( + game_id, + party_id, + asset_id, + market_id, + epoch_id, + team_id, + total_rewards, + total_rewards_quantum + ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8);`, + r.GameID, + r.PartyID, + r.AssetID, + r.MarketID, + r.EpochID, + entities.TeamID(""), + rs.runningTotals[gID][r.PartyID], + rs.runningTotalsQuantum[gID][r.PartyID]) + } return err } +// scany does not like deserializing byte arrays to strings so if an ID +// needs to be nillable, we need to scan it into a temporary struct that will +// define the ID field as a byte array and then parse the value accordingly. +type scannedRewards struct { + PartyID entities.PartyID + AssetID entities.AssetID + MarketID entities.MarketID + EpochID int64 + Amount decimal.Decimal + QuantumAmount decimal.Decimal + PercentOfTotal float64 + RewardType string + Timestamp time.Time + TxHash entities.TxHash + VegaTime time.Time + SeqNum uint64 + LockedUntilEpochID int64 + GameID []byte + TeamID []byte +} + func (rs *Rewards) GetAll(ctx context.Context) ([]entities.Reward, error) { defer metrics.StartSQLQuery("Rewards", "GetAll")() - rewards := []entities.Reward{} - err := pgxscan.Select(ctx, rs.Connection, &rewards, ` - SELECT * from rewards;`) - return rewards, err + scanned := []scannedRewards{} + err := pgxscan.Select(ctx, rs.Connection, &scanned, `SELECT * FROM rewards;`) + if err != nil { + return nil, err + } + return parseScannedRewards(scanned), nil } func (rs *Rewards) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([]entities.Reward, error) { defer metrics.StartSQLQuery("Rewards", "GetByTxHash")() - var rewards []entities.Reward - err := pgxscan.Select(ctx, rs.Connection, &rewards, `SELECT * FROM rewards WHERE tx_hash = $1`, txHash) + scanned := []scannedRewards{} + err := pgxscan.Select(ctx, rs.Connection, &scanned, `SELECT * FROM rewards WHERE tx_hash = $1`, txHash) if err != nil { return nil, err } - return rewards, nil + return parseScannedRewards(scanned), nil } func (rs *Rewards) GetByCursor(ctx context.Context, @@ -103,22 +180,30 @@ func (rs *Rewards) GetByCursor(ctx context.Context, fromEpoch *uint64, toEpoch *uint64, pagination entities.CursorPagination, + teamIDHex, gameIDHex *string, ) ([]entities.Reward, entities.PageInfo, error) { var pageInfo entities.PageInfo - query := `SELECT * from rewards` + query := ` + WITH cte_rewards AS ( + SELECT r.*, grt.team_id + FROM rewards r + LEFT JOIN game_reward_totals grt ON r.game_id = grt.game_id AND r.party_id = grt.party_id and r.epoch_id = grt.epoch_id + ) + SELECT * from cte_rewards` args := []interface{}{} - query, args = addRewardWhereClause(query, args, partyIDHex, assetIDHex, fromEpoch, toEpoch) + query, args = addRewardWhereClause(query, args, partyIDHex, assetIDHex, teamIDHex, gameIDHex, fromEpoch, toEpoch) query, args, err := PaginateQuery[entities.RewardCursor](query, args, rewardsOrdering, pagination) if err != nil { return nil, pageInfo, err } - rewards := []entities.Reward{} - if err := pgxscan.Select(ctx, rs.Connection, &rewards, query, args...); err != nil { + scanned := []scannedRewards{} + if err := pgxscan.Select(ctx, rs.Connection, &scanned, query, args...); err != nil { return nil, entities.PageInfo{}, fmt.Errorf("querying rewards: %w", err) } + rewards := parseScannedRewards(scanned) rewards, pageInfo = entities.PageEntities[*v2.RewardEdge](rewards, pagination) return rewards, pageInfo, nil } @@ -126,9 +211,9 @@ func (rs *Rewards) GetByCursor(ctx context.Context, func (rs *Rewards) GetSummaries(ctx context.Context, partyIDHex *string, assetIDHex *string, ) ([]entities.RewardSummary, error) { - query := `SELECT party_id, asset_id, sum(amount) as amount FROM rewards` + query := `SELECT party_id, asset_id, SUM(amount) AS amount FROM rewards` args := []interface{}{} - query, args = addRewardWhereClause(query, args, partyIDHex, assetIDHex, nil, nil) + query, args = addRewardWhereClause(query, args, partyIDHex, assetIDHex, nil, nil, nil, nil) query = fmt.Sprintf("%s GROUP BY party_id, asset_id", query) summaries := []entities.RewardSummary{} @@ -146,7 +231,7 @@ func (rs *Rewards) GetEpochSummaries(ctx context.Context, pagination entities.CursorPagination, ) ([]entities.EpochRewardSummary, entities.PageInfo, error) { var pageInfo entities.PageInfo - query := `SELECT epoch_id, asset_id, market_id, reward_type, sum(amount) as amount FROM rewards ` + query := `SELECT epoch_id, asset_id, market_id, reward_type, SUM(amount) AS amount FROM rewards ` where, args, err := FilterRewardsQuery(filter) if err != nil { return nil, pageInfo, err @@ -172,7 +257,7 @@ func (rs *Rewards) GetEpochSummaries(ctx context.Context, // -------------------------------------------- Utility Methods -func addRewardWhereClause(query string, args []interface{}, partyIDHex, assetIDHex *string, fromEpoch, toEpoch *uint64) (string, []interface{}) { +func addRewardWhereClause(query string, args []interface{}, partyIDHex, assetIDHex, teamIDHex, gameIDHex *string, fromEpoch, toEpoch *uint64) (string, []interface{}) { predicates := []string{} if partyIDHex != nil && *partyIDHex != "" { @@ -185,6 +270,16 @@ func addRewardWhereClause(query string, args []interface{}, partyIDHex, assetIDH predicates = append(predicates, fmt.Sprintf("asset_id = %s", nextBindVar(&args, assetID))) } + if teamIDHex != nil && *teamIDHex != "" { + teamID := entities.TeamID(*teamIDHex) + predicates = append(predicates, fmt.Sprintf("team_id = %s", nextBindVar(&args, teamID))) + } + + if gameIDHex != nil && *gameIDHex != "" { + gameID := entities.GameID(*gameIDHex) + predicates = append(predicates, fmt.Sprintf("game_id = %s", nextBindVar(&args, gameID))) + } + if fromEpoch != nil { predicates = append(predicates, fmt.Sprintf("epoch_id >= %s", nextBindVar(&args, *fromEpoch))) } @@ -244,3 +339,41 @@ func FilterRewardsQuery(filter entities.RewardSummaryFilter) (string, []any, err } return " WHERE " + strings.Join(conditions, " AND "), args, nil } + +func parseScannedRewards(scanned []scannedRewards) []entities.Reward { + rewards := make([]entities.Reward, len(scanned)) + for i, s := range scanned { + var gID *entities.GameID + var teamID *entities.TeamID + if s.GameID != nil { + id := hex.EncodeToString(s.GameID) + if id != "" { + gID = ptr.From(entities.GameID(id)) + } + } + if s.TeamID != nil { + id := hex.EncodeToString(s.TeamID) + if id != "" { + teamID = ptr.From(entities.TeamID(id)) + } + } + rewards[i] = entities.Reward{ + PartyID: s.PartyID, + AssetID: s.AssetID, + MarketID: s.MarketID, + EpochID: s.EpochID, + Amount: s.Amount, + QuantumAmount: s.QuantumAmount, + PercentOfTotal: s.PercentOfTotal, + RewardType: s.RewardType, + Timestamp: s.Timestamp, + TxHash: s.TxHash, + VegaTime: s.VegaTime, + SeqNum: s.SeqNum, + LockedUntilEpochID: s.LockedUntilEpochID, + GameID: gID, + TeamID: teamID, + } + } + return rewards +} diff --git a/datanode/sqlstore/rewards_test.go b/datanode/sqlstore/rewards_test.go index 7a58ddd8d8..5fe42dddf8 100644 --- a/datanode/sqlstore/rewards_test.go +++ b/datanode/sqlstore/rewards_test.go @@ -13,37 +13,28 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( "context" "encoding/hex" "fmt" + "math/rand" "reflect" "testing" "time" + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/libs/num" + "code.vegaprotocol.io/vega/libs/ptr" + + "github.com/georgysavva/scany/pgxscan" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "code.vegaprotocol.io/vega/datanode/entities" - "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/libs/num" ) func addTestReward(t *testing.T, @@ -59,6 +50,7 @@ func addTestReward(t *testing.T, seqNum uint64, amount num.Decimal, txHash entities.TxHash, + gameID *entities.GameID, ) entities.Reward { t.Helper() r := entities.Reward{ @@ -68,14 +60,15 @@ func addTestReward(t *testing.T, RewardType: rewardType, EpochID: epochID, Amount: amount, + QuantumAmount: amount, PercentOfTotal: 0.2, Timestamp: timestamp.Truncate(time.Microsecond), VegaTime: block.VegaTime, SeqNum: seqNum, TxHash: txHash, + GameID: gameID, } - err := rs.Add(ctx, r) - require.NoError(t, err) + require.NoError(t, rs.Add(ctx, r)) return r } @@ -102,7 +95,7 @@ func TestRewards(t *testing.T) { ps := sqlstore.NewParties(connectionSource) as := sqlstore.NewAssets(connectionSource) - rs := sqlstore.NewRewards(connectionSource) + rs := sqlstore.NewRewards(ctx, connectionSource) bs := sqlstore.NewBlocks(connectionSource) block := addTestBlock(t, ctx, bs) @@ -119,11 +112,11 @@ func TestRewards(t *testing.T) { now := time.Now() amount := num.DecimalFromInt64(100) - reward1 := addTestReward(t, ctx, rs, party1, asset1, market1, 1, "RewardMakerPaidFees", now, block, 1, amount, generateTxHash()) - reward2 := addTestReward(t, ctx, rs, party1, asset2, market1, 2, "RewardMakerReceivedFees", now, block, 2, amount, generateTxHash()) - reward3 := addTestReward(t, ctx, rs, party2, asset1, market2, 3, "GlobalReward", now, block, 3, amount, generateTxHash()) - reward4 := addTestReward(t, ctx, rs, party2, asset2, market2, 4, "GlobalReward", now, block, 4, amount, generateTxHash()) - reward5 := addTestReward(t, ctx, rs, party2, asset2, market2, 5, "GlobalReward", now, block, 5, amount, generateTxHash()) + reward1 := addTestReward(t, ctx, rs, party1, asset1, market1, 1, "RewardMakerPaidFees", now, block, 1, amount, generateTxHash(), nil) + reward2 := addTestReward(t, ctx, rs, party1, asset2, market1, 2, "RewardMakerReceivedFees", now, block, 2, amount, generateTxHash(), nil) + reward3 := addTestReward(t, ctx, rs, party2, asset1, market2, 3, "GlobalReward", now, block, 3, amount, generateTxHash(), nil) + reward4 := addTestReward(t, ctx, rs, party2, asset2, market2, 4, "GlobalReward", now, block, 4, amount, generateTxHash(), nil) + reward5 := addTestReward(t, ctx, rs, party2, asset2, market2, 5, "GlobalReward", now, block, 5, amount, generateTxHash(), nil) t.Run("GetAll", func(t *testing.T) { expected := []entities.Reward{reward1, reward2, reward3, reward4, reward5} @@ -156,7 +149,7 @@ func TestEpochRewardSummary(t *testing.T) { ps := sqlstore.NewParties(connectionSource) as := sqlstore.NewAssets(connectionSource) - rs := sqlstore.NewRewards(connectionSource) + rs := sqlstore.NewRewards(ctx, connectionSource) bs := sqlstore.NewBlocks(connectionSource) block := addTestBlock(t, ctx, bs) @@ -171,56 +164,56 @@ func TestEpochRewardSummary(t *testing.T) { now := time.Now() // rewards for epoch1 - addTestReward(t, ctx, rs, party1, asset1, market1, 1, "RewardMakerPaidFees", now, block, 1, num.DecimalFromInt64(100), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset1, market1, 1, "RewardMakerPaidFees", now, block, 2, num.DecimalFromInt64(200), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset1, market1, 1, "RewardMakerPaidFees", now, block, 3, num.DecimalFromInt64(300), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset1, market2, 1, "RewardMakerPaidFees", now, block, 4, num.DecimalFromInt64(110), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset1, market2, 1, "RewardMakerPaidFees", now, block, 5, num.DecimalFromInt64(220), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset1, market2, 1, "RewardMakerPaidFees", now, block, 6, num.DecimalFromInt64(330), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset2, market1, 1, "RewardMakerPaidFees", now, block, 7, num.DecimalFromInt64(400), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset2, market1, 1, "RewardMakerPaidFees", now, block, 8, num.DecimalFromInt64(500), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset2, market1, 1, "RewardMakerPaidFees", now, block, 9, num.DecimalFromInt64(600), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset2, market2, 1, "RewardMakerPaidFees", now, block, 10, num.DecimalFromInt64(410), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset2, market2, 1, "RewardMakerPaidFees", now, block, 11, num.DecimalFromInt64(520), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset2, market2, 1, "RewardMakerPaidFees", now, block, 12, num.DecimalFromInt64(630), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset1, market1, 1, "RewardMakerReceivedFees", now, block, 13, num.DecimalFromInt64(1000), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset1, market1, 1, "RewardMakerReceivedFees", now, block, 14, num.DecimalFromInt64(2000), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset1, market1, 1, "RewardMakerReceivedFees", now, block, 15, num.DecimalFromInt64(3000), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset1, market2, 1, "GlobalReward", now, block, 16, num.DecimalFromInt64(1100), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset1, market2, 1, "GlobalReward", now, block, 17, num.DecimalFromInt64(2200), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset1, market2, 1, "GlobalReward", now, block, 18, num.DecimalFromInt64(3300), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset2, market1, 1, "RewardMakerReceivedFees", now, block, 19, num.DecimalFromInt64(4000), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset2, market1, 1, "RewardMakerReceivedFees", now, block, 20, num.DecimalFromInt64(5000), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset2, market1, 1, "RewardMakerReceivedFees", now, block, 21, num.DecimalFromInt64(6000), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset2, market2, 1, "GlobalReward", now, block, 22, num.DecimalFromInt64(4100), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset2, market2, 1, "GlobalReward", now, block, 23, num.DecimalFromInt64(5200), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset2, market2, 1, "GlobalReward", now, block, 24, num.DecimalFromInt64(6300), generateTxHash()) + addTestReward(t, ctx, rs, party1, asset1, market1, 1, "RewardMakerPaidFees", now, block, 1, num.DecimalFromInt64(100), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset1, market1, 1, "RewardMakerPaidFees", now, block, 2, num.DecimalFromInt64(200), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset1, market1, 1, "RewardMakerPaidFees", now, block, 3, num.DecimalFromInt64(300), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset1, market2, 1, "RewardMakerPaidFees", now, block, 4, num.DecimalFromInt64(110), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset1, market2, 1, "RewardMakerPaidFees", now, block, 5, num.DecimalFromInt64(220), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset1, market2, 1, "RewardMakerPaidFees", now, block, 6, num.DecimalFromInt64(330), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset2, market1, 1, "RewardMakerPaidFees", now, block, 7, num.DecimalFromInt64(400), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset2, market1, 1, "RewardMakerPaidFees", now, block, 8, num.DecimalFromInt64(500), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset2, market1, 1, "RewardMakerPaidFees", now, block, 9, num.DecimalFromInt64(600), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset2, market2, 1, "RewardMakerPaidFees", now, block, 10, num.DecimalFromInt64(410), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset2, market2, 1, "RewardMakerPaidFees", now, block, 11, num.DecimalFromInt64(520), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset2, market2, 1, "RewardMakerPaidFees", now, block, 12, num.DecimalFromInt64(630), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset1, market1, 1, "RewardMakerReceivedFees", now, block, 13, num.DecimalFromInt64(1000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset1, market1, 1, "RewardMakerReceivedFees", now, block, 14, num.DecimalFromInt64(2000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset1, market1, 1, "RewardMakerReceivedFees", now, block, 15, num.DecimalFromInt64(3000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset1, market2, 1, "GlobalReward", now, block, 16, num.DecimalFromInt64(1100), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset1, market2, 1, "GlobalReward", now, block, 17, num.DecimalFromInt64(2200), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset1, market2, 1, "GlobalReward", now, block, 18, num.DecimalFromInt64(3300), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset2, market1, 1, "RewardMakerReceivedFees", now, block, 19, num.DecimalFromInt64(4000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset2, market1, 1, "RewardMakerReceivedFees", now, block, 20, num.DecimalFromInt64(5000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset2, market1, 1, "RewardMakerReceivedFees", now, block, 21, num.DecimalFromInt64(6000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset2, market2, 1, "GlobalReward", now, block, 22, num.DecimalFromInt64(4100), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset2, market2, 1, "GlobalReward", now, block, 23, num.DecimalFromInt64(5200), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset2, market2, 1, "GlobalReward", now, block, 24, num.DecimalFromInt64(6300), generateTxHash(), nil) // rewards for epoch2 - addTestReward(t, ctx, rs, party1, asset1, market1, 2, "RewardMakerPaidFees", now, block, 25, num.DecimalFromInt64(10000), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset1, market1, 2, "RewardMakerPaidFees", now, block, 26, num.DecimalFromInt64(20000), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset1, market1, 2, "RewardMakerPaidFees", now, block, 27, num.DecimalFromInt64(30000), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset1, market2, 2, "RewardMakerPaidFees", now, block, 28, num.DecimalFromInt64(11000), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset1, market2, 2, "RewardMakerPaidFees", now, block, 29, num.DecimalFromInt64(22000), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset1, market2, 2, "RewardMakerPaidFees", now, block, 30, num.DecimalFromInt64(33000), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset2, market1, 2, "RewardMakerPaidFees", now, block, 31, num.DecimalFromInt64(40000), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset2, market1, 2, "RewardMakerPaidFees", now, block, 32, num.DecimalFromInt64(50000), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset2, market1, 2, "RewardMakerPaidFees", now, block, 33, num.DecimalFromInt64(60000), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset2, market2, 2, "RewardMakerPaidFees", now, block, 34, num.DecimalFromInt64(41000), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset2, market2, 2, "RewardMakerPaidFees", now, block, 35, num.DecimalFromInt64(52000), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset2, market2, 2, "RewardMakerPaidFees", now, block, 36, num.DecimalFromInt64(63000), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset1, market1, 2, "RewardMakerReceivedFees", now, block, 37, num.DecimalFromInt64(100000), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset1, market1, 2, "RewardMakerReceivedFees", now, block, 38, num.DecimalFromInt64(200000), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset1, market1, 2, "RewardMakerReceivedFees", now, block, 39, num.DecimalFromInt64(300000), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset1, market2, 2, "GlobalReward", now, block, 40, num.DecimalFromInt64(110000), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset1, market2, 2, "GlobalReward", now, block, 41, num.DecimalFromInt64(220000), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset1, market2, 2, "GlobalReward", now, block, 42, num.DecimalFromInt64(330000), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset2, market1, 2, "RewardMakerReceivedFees", now, block, 43, num.DecimalFromInt64(400000), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset2, market1, 2, "RewardMakerReceivedFees", now, block, 44, num.DecimalFromInt64(500000), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset2, market1, 2, "RewardMakerReceivedFees", now, block, 45, num.DecimalFromInt64(600000), generateTxHash()) - addTestReward(t, ctx, rs, party1, asset2, market2, 2, "GlobalReward", now, block, 46, num.DecimalFromInt64(410000), generateTxHash()) - addTestReward(t, ctx, rs, party2, asset2, market2, 2, "GlobalReward", now, block, 47, num.DecimalFromInt64(520000), generateTxHash()) - addTestReward(t, ctx, rs, party3, asset2, market2, 2, "GlobalReward", now, block, 48, num.DecimalFromInt64(630000), generateTxHash()) + addTestReward(t, ctx, rs, party1, asset1, market1, 2, "RewardMakerPaidFees", now, block, 25, num.DecimalFromInt64(10000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset1, market1, 2, "RewardMakerPaidFees", now, block, 26, num.DecimalFromInt64(20000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset1, market1, 2, "RewardMakerPaidFees", now, block, 27, num.DecimalFromInt64(30000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset1, market2, 2, "RewardMakerPaidFees", now, block, 28, num.DecimalFromInt64(11000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset1, market2, 2, "RewardMakerPaidFees", now, block, 29, num.DecimalFromInt64(22000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset1, market2, 2, "RewardMakerPaidFees", now, block, 30, num.DecimalFromInt64(33000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset2, market1, 2, "RewardMakerPaidFees", now, block, 31, num.DecimalFromInt64(40000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset2, market1, 2, "RewardMakerPaidFees", now, block, 32, num.DecimalFromInt64(50000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset2, market1, 2, "RewardMakerPaidFees", now, block, 33, num.DecimalFromInt64(60000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset2, market2, 2, "RewardMakerPaidFees", now, block, 34, num.DecimalFromInt64(41000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset2, market2, 2, "RewardMakerPaidFees", now, block, 35, num.DecimalFromInt64(52000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset2, market2, 2, "RewardMakerPaidFees", now, block, 36, num.DecimalFromInt64(63000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset1, market1, 2, "RewardMakerReceivedFees", now, block, 37, num.DecimalFromInt64(100000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset1, market1, 2, "RewardMakerReceivedFees", now, block, 38, num.DecimalFromInt64(200000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset1, market1, 2, "RewardMakerReceivedFees", now, block, 39, num.DecimalFromInt64(300000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset1, market2, 2, "GlobalReward", now, block, 40, num.DecimalFromInt64(110000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset1, market2, 2, "GlobalReward", now, block, 41, num.DecimalFromInt64(220000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset1, market2, 2, "GlobalReward", now, block, 42, num.DecimalFromInt64(330000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset2, market1, 2, "RewardMakerReceivedFees", now, block, 43, num.DecimalFromInt64(400000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset2, market1, 2, "RewardMakerReceivedFees", now, block, 44, num.DecimalFromInt64(500000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset2, market1, 2, "RewardMakerReceivedFees", now, block, 45, num.DecimalFromInt64(600000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party1, asset2, market2, 2, "GlobalReward", now, block, 46, num.DecimalFromInt64(410000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party2, asset2, market2, 2, "GlobalReward", now, block, 47, num.DecimalFromInt64(520000), generateTxHash(), nil) + addTestReward(t, ctx, rs, party3, asset2, market2, 2, "GlobalReward", now, block, 48, num.DecimalFromInt64(630000), generateTxHash(), nil) first := int32(1000) pagination, _ := entities.NewCursorPagination(&first, nil, nil, nil, false) @@ -331,10 +324,10 @@ func verifyRewardsForEpoch(t *testing.T, summaries []entities.EpochRewardSummary } } -func setupRewardsTest(t *testing.T) (*sqlstore.Blocks, *sqlstore.Rewards, *sqlstore.Parties, *sqlstore.Assets) { +func setupRewardsTest(t *testing.T, ctx context.Context) (*sqlstore.Blocks, *sqlstore.Rewards, *sqlstore.Parties, *sqlstore.Assets) { t.Helper() bs := sqlstore.NewBlocks(connectionSource) - rs := sqlstore.NewRewards(connectionSource) + rs := sqlstore.NewRewards(ctx, connectionSource) ps := sqlstore.NewParties(connectionSource) as := sqlstore.NewAssets(connectionSource) @@ -488,8 +481,8 @@ func TestRewardsPagination(t *testing.T) { } func testRewardsCursorPaginationNoPagination(t *testing.T) { - bs, rs, ps, as := setupRewardsTest(t) ctx := tempTransaction(t) + bs, rs, ps, as := setupRewardsTest(t, ctx) populateTestRewards(ctx, t, bs, ps, as, rs) pagination, err := entities.NewCursorPagination(nil, nil, nil, nil, false) @@ -497,7 +490,7 @@ func testRewardsCursorPaginationNoPagination(t *testing.T) { partyID := "89c701d1ae2819263e45538d0b25022988bc2508a02c654462d22e0afb626a7d" assetID := "8aa92225c32adb54e527fcb1aee2930cbadb4df6f068ab2c2d667eb057ef00fa" - got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination) + got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination, nil, nil) assert.NoError(t, err) assert.Equal(t, 10, len(got)) assert.Equal(t, int64(637), got[0].EpochID) @@ -511,8 +504,8 @@ func testRewardsCursorPaginationNoPagination(t *testing.T) { } func testRewardsCursorPaginationFirstPage(t *testing.T) { - bs, rs, ps, as := setupRewardsTest(t) ctx := tempTransaction(t) + bs, rs, ps, as := setupRewardsTest(t, ctx) populateTestRewards(ctx, t, bs, ps, as, rs) first := int32(3) @@ -521,7 +514,7 @@ func testRewardsCursorPaginationFirstPage(t *testing.T) { partyID := "89c701d1ae2819263e45538d0b25022988bc2508a02c654462d22e0afb626a7d" assetID := "8aa92225c32adb54e527fcb1aee2930cbadb4df6f068ab2c2d667eb057ef00fa" - got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination) + got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination, nil, nil) assert.NoError(t, err) assert.Equal(t, 3, len(got)) assert.Equal(t, int64(637), got[0].EpochID) @@ -535,8 +528,8 @@ func testRewardsCursorPaginationFirstPage(t *testing.T) { } func testRewardsCursorPaginationLastPage(t *testing.T) { - bs, rs, ps, as := setupRewardsTest(t) ctx := tempTransaction(t) + bs, rs, ps, as := setupRewardsTest(t, ctx) populateTestRewards(ctx, t, bs, ps, as, rs) last := int32(3) @@ -545,7 +538,7 @@ func testRewardsCursorPaginationLastPage(t *testing.T) { partyID := "89c701d1ae2819263e45538d0b25022988bc2508a02c654462d22e0afb626a7d" assetID := "8aa92225c32adb54e527fcb1aee2930cbadb4df6f068ab2c2d667eb057ef00fa" - got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination) + got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination, nil, nil) assert.NoError(t, err) assert.Equal(t, 3, len(got)) assert.Equal(t, int64(757), got[0].EpochID) @@ -559,8 +552,8 @@ func testRewardsCursorPaginationLastPage(t *testing.T) { } func testRewardsCursorPaginationFirstPageAfter(t *testing.T) { - bs, rs, ps, as := setupRewardsTest(t) ctx := tempTransaction(t) + bs, rs, ps, as := setupRewardsTest(t, ctx) populateTestRewards(ctx, t, bs, ps, as, rs) partyID := "89c701d1ae2819263e45538d0b25022988bc2508a02c654462d22e0afb626a7d" @@ -571,7 +564,7 @@ func testRewardsCursorPaginationFirstPageAfter(t *testing.T) { pagination, err := entities.NewCursorPagination(&first, &after, nil, nil, false) require.NoError(t, err) - got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination) + got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination, nil, nil) assert.NoError(t, err) assert.Equal(t, 3, len(got)) assert.Equal(t, int64(737), got[0].EpochID) @@ -585,8 +578,8 @@ func testRewardsCursorPaginationFirstPageAfter(t *testing.T) { } func testRewardsCursorPaginationLastPageBefore(t *testing.T) { - bs, rs, ps, as := setupRewardsTest(t) ctx := tempTransaction(t) + bs, rs, ps, as := setupRewardsTest(t, ctx) populateTestRewards(ctx, t, bs, ps, as, rs) partyID := "89c701d1ae2819263e45538d0b25022988bc2508a02c654462d22e0afb626a7d" @@ -596,7 +589,7 @@ func testRewardsCursorPaginationLastPageBefore(t *testing.T) { before := entities.NewCursor(entities.RewardCursor{PartyID: partyID, AssetID: assetID, EpochID: 757}.String()).Encode() pagination, err := entities.NewCursorPagination(nil, nil, &last, &before, false) require.NoError(t, err) - got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination) + got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination, nil, nil) assert.NoError(t, err) assert.Equal(t, 3, len(got)) assert.Equal(t, int64(741), got[0].EpochID) @@ -610,8 +603,8 @@ func testRewardsCursorPaginationLastPageBefore(t *testing.T) { } func testRewardsCursorPaginationNoPaginationNewestFirst(t *testing.T) { - bs, rs, ps, as := setupRewardsTest(t) ctx := tempTransaction(t) + bs, rs, ps, as := setupRewardsTest(t, ctx) populateTestRewards(ctx, t, bs, ps, as, rs) pagination, err := entities.NewCursorPagination(nil, nil, nil, nil, true) @@ -619,7 +612,7 @@ func testRewardsCursorPaginationNoPaginationNewestFirst(t *testing.T) { partyID := "89c701d1ae2819263e45538d0b25022988bc2508a02c654462d22e0afb626a7d" assetID := "8aa92225c32adb54e527fcb1aee2930cbadb4df6f068ab2c2d667eb057ef00fa" - got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination) + got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination, nil, nil) assert.NoError(t, err) assert.Equal(t, 10, len(got)) assert.Equal(t, int64(1027), got[0].EpochID) @@ -633,8 +626,8 @@ func testRewardsCursorPaginationNoPaginationNewestFirst(t *testing.T) { } func testRewardsCursorPaginationFirstPageNewestFirst(t *testing.T) { - bs, rs, ps, as := setupRewardsTest(t) ctx := tempTransaction(t) + bs, rs, ps, as := setupRewardsTest(t, ctx) populateTestRewards(ctx, t, bs, ps, as, rs) first := int32(3) @@ -643,7 +636,7 @@ func testRewardsCursorPaginationFirstPageNewestFirst(t *testing.T) { partyID := "89c701d1ae2819263e45538d0b25022988bc2508a02c654462d22e0afb626a7d" assetID := "8aa92225c32adb54e527fcb1aee2930cbadb4df6f068ab2c2d667eb057ef00fa" - got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination) + got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination, nil, nil) assert.NoError(t, err) assert.Equal(t, 3, len(got)) assert.Equal(t, int64(1027), got[0].EpochID) @@ -657,8 +650,8 @@ func testRewardsCursorPaginationFirstPageNewestFirst(t *testing.T) { } func testRewardsCursorPaginationLastPageNewestFirst(t *testing.T) { - bs, rs, ps, as := setupRewardsTest(t) ctx := tempTransaction(t) + bs, rs, ps, as := setupRewardsTest(t, ctx) populateTestRewards(ctx, t, bs, ps, as, rs) last := int32(3) @@ -667,7 +660,7 @@ func testRewardsCursorPaginationLastPageNewestFirst(t *testing.T) { partyID := "89c701d1ae2819263e45538d0b25022988bc2508a02c654462d22e0afb626a7d" assetID := "8aa92225c32adb54e527fcb1aee2930cbadb4df6f068ab2c2d667eb057ef00fa" - got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination) + got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination, nil, nil) assert.NoError(t, err) assert.Equal(t, 3, len(got)) assert.Equal(t, int64(643), got[0].EpochID) @@ -681,8 +674,8 @@ func testRewardsCursorPaginationLastPageNewestFirst(t *testing.T) { } func testRewardsCursorPaginationFirstPageAfterNewestFirst(t *testing.T) { - bs, rs, ps, as := setupRewardsTest(t) ctx := tempTransaction(t) + bs, rs, ps, as := setupRewardsTest(t, ctx) populateTestRewards(ctx, t, bs, ps, as, rs) partyID := "89c701d1ae2819263e45538d0b25022988bc2508a02c654462d22e0afb626a7d" @@ -693,7 +686,7 @@ func testRewardsCursorPaginationFirstPageAfterNewestFirst(t *testing.T) { pagination, err := entities.NewCursorPagination(&first, &after, nil, nil, true) require.NoError(t, err) - got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination) + got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination, nil, nil) assert.NoError(t, err) assert.Equal(t, 3, len(got)) assert.Equal(t, int64(747), got[0].EpochID) @@ -707,8 +700,8 @@ func testRewardsCursorPaginationFirstPageAfterNewestFirst(t *testing.T) { } func testRewardsCursorPaginationLastPageBeforeNewestFirst(t *testing.T) { - bs, rs, ps, as := setupRewardsTest(t) ctx := tempTransaction(t) + bs, rs, ps, as := setupRewardsTest(t, ctx) populateTestRewards(ctx, t, bs, ps, as, rs) partyID := "89c701d1ae2819263e45538d0b25022988bc2508a02c654462d22e0afb626a7d" @@ -718,7 +711,7 @@ func testRewardsCursorPaginationLastPageBeforeNewestFirst(t *testing.T) { before := entities.NewCursor(entities.RewardCursor{PartyID: partyID, AssetID: assetID, EpochID: 643}.String()).Encode() pagination, err := entities.NewCursorPagination(nil, nil, &last, &before, true) require.NoError(t, err) - got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination) + got, pageInfo, err := rs.GetByCursor(ctx, &partyID, &assetID, nil, nil, pagination, nil, nil) assert.NoError(t, err) assert.Equal(t, 3, len(got)) assert.Equal(t, int64(744), got[0].EpochID) @@ -750,16 +743,16 @@ func Test_FilterRewardsQuery(t *testing.T) { inFilter: entities.RewardSummaryFilter{ AssetIDs: []entities.AssetID{"8aa92225c32adb54e527fcb1aee2930cbadb4df6f068ab2c2d667eb057ef00fa"}, MarketIDs: []entities.MarketID{"deadbeef"}, - FromEpoch: toPtr(uint64(123)), - ToEpoch: toPtr(uint64(124)), + FromEpoch: ptr.From(uint64(123)), + ToEpoch: ptr.From(uint64(124)), }, }, wantQuery: ` WHERE asset_id = ANY($1) AND market_id = ANY($2) AND epoch_id >= $3 AND epoch_id <= $4`, wantArgs: []any{ "8aa92225c32adb54e527fcb1aee2930cbadb4df6f068ab2c2d667eb057ef00fa", "deadbeef", - toPtr(uint64(123)), - toPtr(uint64(124)), + ptr.From(uint64(123)), + ptr.From(uint64(124)), }, wantErr: assert.NoError, }, { @@ -802,12 +795,12 @@ func Test_FilterRewardsQuery(t *testing.T) { args: args{ table: "test", inFilter: entities.RewardSummaryFilter{ - FromEpoch: toPtr(uint64(123)), + FromEpoch: ptr.From(uint64(123)), }, }, wantQuery: ` WHERE epoch_id >= $1`, wantArgs: []any{ - toPtr(uint64(123)), + ptr.From(uint64(123)), }, wantErr: assert.NoError, }, { @@ -815,12 +808,12 @@ func Test_FilterRewardsQuery(t *testing.T) { args: args{ table: "test", inFilter: entities.RewardSummaryFilter{ - ToEpoch: toPtr(uint64(123)), + ToEpoch: ptr.From(uint64(123)), }, }, wantQuery: ` WHERE epoch_id <= $1`, wantArgs: []any{ - toPtr(uint64(123)), + ptr.From(uint64(123)), }, wantErr: assert.NoError, }, { @@ -828,14 +821,14 @@ func Test_FilterRewardsQuery(t *testing.T) { args: args{ table: "test", inFilter: entities.RewardSummaryFilter{ - FromEpoch: toPtr(uint64(123)), - ToEpoch: toPtr(uint64(124)), + FromEpoch: ptr.From(uint64(123)), + ToEpoch: ptr.From(uint64(124)), }, }, wantQuery: ` WHERE epoch_id >= $1 AND epoch_id <= $2`, wantArgs: []any{ - toPtr(uint64(123)), - toPtr(uint64(124)), + ptr.From(uint64(123)), + ptr.From(uint64(124)), }, wantErr: assert.NoError, }, { @@ -844,13 +837,13 @@ func Test_FilterRewardsQuery(t *testing.T) { table: "test", inFilter: entities.RewardSummaryFilter{ AssetIDs: []entities.AssetID{"8aa92225c32adb54e527fcb1aee2930cbadb4df6f068ab2c2d667eb057ef00fa"}, - FromEpoch: toPtr(uint64(123)), + FromEpoch: ptr.From(uint64(123)), }, }, wantQuery: ` WHERE asset_id = ANY($1) AND epoch_id >= $2`, wantArgs: []any{ "8aa92225c32adb54e527fcb1aee2930cbadb4df6f068ab2c2d667eb057ef00fa", - toPtr(uint64(123)), + ptr.From(uint64(123)), }, wantErr: assert.NoError, }, @@ -871,3 +864,370 @@ func Test_FilterRewardsQuery(t *testing.T) { }) } } + +func TestRewardsGameTotals(t *testing.T) { + ctx := tempTransaction(t) + // teams + teams := []entities.Team{ + { + ID: "deadd00d01", + Referrer: "beefbeef01", + Name: "aaaa", + TeamURL: nil, + AvatarURL: nil, + Closed: false, + CreatedAt: time.Now(), + CreatedAtEpoch: 0, + VegaTime: time.Now(), + }, + { + ID: "deadd00d02", + Referrer: "beefbeef02", + Name: "bbbb", + TeamURL: nil, + AvatarURL: nil, + Closed: false, + CreatedAt: time.Now(), + CreatedAtEpoch: 0, + VegaTime: time.Now(), + }, + { + ID: "deadd00d03", + Referrer: "beefbeef03", + Name: "cccc", + TeamURL: nil, + AvatarURL: nil, + Closed: false, + CreatedAt: time.Now(), + CreatedAtEpoch: 0, + VegaTime: time.Now(), + }, + } + for _, team := range teams { + _, err := connectionSource.Connection.Exec(ctx, + `INSERT INTO teams (id, referrer, name, team_url, avatar_url, closed, created_at_epoch, created_at, vega_time) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)`, + team.ID, team.Referrer, team.Name, team.TeamURL, team.AvatarURL, team.Closed, team.CreatedAtEpoch, team.CreatedAt, team.VegaTime) + require.NoError(t, err) + } + // team members data + teamMembers := []entities.TeamMember{ + { + TeamID: "deadd00d01", + PartyID: "deadbeef01", + JoinedAt: time.Now(), + JoinedAtEpoch: 0, + VegaTime: time.Now(), + }, + { + TeamID: "deadd00d02", + PartyID: "deadbeef02", + JoinedAt: time.Now(), + JoinedAtEpoch: 0, + VegaTime: time.Now(), + }, + { + TeamID: "deadd00d03", + PartyID: "deadbeef03", + JoinedAt: time.Now(), + JoinedAtEpoch: 0, + VegaTime: time.Now(), + }, + } + for _, member := range teamMembers { + _, err := connectionSource.Connection.Exec(ctx, + `INSERT INTO team_members (team_id, party_id, joined_at_epoch, joined_at, vega_time) + VALUES ($1, $2, $3, $4, $5)`, + member.TeamID, member.PartyID, member.JoinedAtEpoch, member.JoinedAt, member.VegaTime) + require.NoError(t, err) + } + // populate the game reward totals with some test data + existingTotals := []entities.RewardTotals{ + { + GameID: "deadbeef01", + PartyID: "cafedaad01", + AssetID: "deadbaad01", + MarketID: "beefcafe01", + EpochID: 1, + TeamID: "deadd00d01", + TotalRewards: decimal.NewFromFloat(1000), + TotalRewardsQuantum: decimal.NewFromFloat(1000), + }, + { + GameID: "deadbeef02", + PartyID: "cafedaad02", + AssetID: "deadbaad02", + MarketID: "beefcafe02", + EpochID: 1, + TeamID: "deadd00d02", + TotalRewards: decimal.NewFromFloat(2000), + TotalRewardsQuantum: decimal.NewFromFloat(2000), + }, + { + GameID: "deadbeef03", + PartyID: "cafedaad03", + AssetID: "deadbaad03", + MarketID: "beefcafe03", + EpochID: 1, + TeamID: "deadd00d03", + TotalRewards: decimal.NewFromFloat(3000), + TotalRewardsQuantum: decimal.NewFromFloat(3000), + }, + } + for _, total := range existingTotals { + _, err := connectionSource.Connection.Exec(ctx, + `INSERT INTO game_reward_totals (game_id, party_id, asset_id, market_id, epoch_id, team_id, total_rewards, total_rewards_quantum) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8)`, + total.GameID, total.PartyID, total.AssetID, total.MarketID, total.EpochID, total.TeamID, total.TotalRewards, total.TotalRewardsQuantum) + require.NoError(t, err) + } + + ts := time.Now() + ts2 := ts.Add(time.Minute) + // add rewards + rewardsToAdd := []entities.Reward{ + { + PartyID: "cafedaad01", + AssetID: "deadbaad01", + MarketID: "beefcafe01", + EpochID: 2, + Amount: decimal.NewFromFloat(1000), + QuantumAmount: decimal.NewFromFloat(1000), + PercentOfTotal: 0, + RewardType: "ACCOUNT_TYPE_UNSPECIFIED", + Timestamp: ts, + TxHash: "", + VegaTime: ts, + SeqNum: 1, + LockedUntilEpochID: 30, + GameID: ptr.From(entities.GameID("deadbeef01")), + }, + { + PartyID: "cafedaad02", + AssetID: "deadbaad02", + MarketID: "beefcafe02", + EpochID: 2, + Amount: decimal.NewFromFloat(1000), + QuantumAmount: decimal.NewFromFloat(1000), + PercentOfTotal: 0, + RewardType: "ACCOUNT_TYPE_UNSPECIFIED", + Timestamp: ts, + TxHash: "", + VegaTime: ts, + SeqNum: 2, + LockedUntilEpochID: 30, + GameID: ptr.From(entities.GameID("deadbeef02")), + }, + { + PartyID: "cafedaad03", + AssetID: "deadbaad03", + MarketID: "beefcafe03", + EpochID: 2, + Amount: decimal.NewFromFloat(1000), + QuantumAmount: decimal.NewFromFloat(1000), + PercentOfTotal: 0, + RewardType: "ACCOUNT_TYPE_UNSPECIFIED", + Timestamp: ts, + TxHash: "", + VegaTime: ts, + SeqNum: 3, + LockedUntilEpochID: 30, + GameID: ptr.From(entities.GameID("deadbeef03")), + }, + { + PartyID: "cafedaad01", + AssetID: "deadbaad01", + MarketID: "beefcafe01", + EpochID: 3, + Amount: decimal.NewFromFloat(1000), + QuantumAmount: decimal.NewFromFloat(1000), + PercentOfTotal: 0, + RewardType: "ACCOUNT_TYPE_UNSPECIFIED", + Timestamp: ts2, + TxHash: "", + VegaTime: ts2, + SeqNum: 1, + LockedUntilEpochID: 30, + GameID: ptr.From(entities.GameID("deadbeef01")), + }, + { + PartyID: "cafedaad02", + AssetID: "deadbaad02", + MarketID: "beefcafe02", + EpochID: 3, + Amount: decimal.NewFromFloat(1000), + QuantumAmount: decimal.NewFromFloat(1000), + PercentOfTotal: 0, + RewardType: "ACCOUNT_TYPE_UNSPECIFIED", + Timestamp: ts2, + TxHash: "", + VegaTime: ts2, + SeqNum: 2, + LockedUntilEpochID: 30, + GameID: ptr.From(entities.GameID("deadbeef02")), + }, + { + PartyID: "cafedaad03", + AssetID: "deadbaad03", + MarketID: "beefcafe03", + EpochID: 3, + Amount: decimal.NewFromFloat(1000), + QuantumAmount: decimal.NewFromFloat(1000), + PercentOfTotal: 0, + RewardType: "ACCOUNT_TYPE_UNSPECIFIED", + Timestamp: ts2, + TxHash: "", + VegaTime: ts2, + SeqNum: 3, + LockedUntilEpochID: 30, + GameID: ptr.From(entities.GameID("deadbeef03")), + }, + } + + rs := sqlstore.NewRewards(ctx, connectionSource) + for _, r := range rewardsToAdd { + require.NoError(t, rs.Add(ctx, r)) + } + + // Now make sure the totals are updated and correct + testCases := []struct { + game_id entities.GameID + party_id entities.PartyID + epoch_id int64 + want decimal.Decimal + }{ + { + game_id: "deadbeef01", + party_id: "cafedaad01", + epoch_id: 2, + want: decimal.NewFromFloat(2000), + }, + { + game_id: "deadbeef01", + party_id: "cafedaad01", + epoch_id: 3, + want: decimal.NewFromFloat(3000), + }, + { + game_id: "deadbeef02", + party_id: "cafedaad02", + epoch_id: 2, + want: decimal.NewFromFloat(3000), + }, + { + game_id: "deadbeef02", + party_id: "cafedaad02", + epoch_id: 3, + want: decimal.NewFromFloat(4000), + }, + } + for _, tc := range testCases { + var totals []entities.RewardTotals + require.NoError(t, pgxscan.Select(ctx, connectionSource.Connection, &totals, + `SELECT * FROM game_reward_totals WHERE game_id = $1 AND party_id = $2 AND epoch_id = $3`, + tc.game_id, tc.party_id, tc.epoch_id)) + assert.Equal(t, 1, len(totals)) + assert.True(t, tc.want.Equal(totals[0].TotalRewards), "totals don't match, got: %s, want: %s", totals[0].TotalRewards, tc.want) + assert.True(t, tc.want.Equal(totals[0].TotalRewardsQuantum), "totals don't match, got: %s, want: %s", totals[0].TotalRewardsQuantum, tc.want) + } +} + +func filterRewardsByParty(rewards []entities.Reward, partyID entities.PartyID) []entities.Reward { + filtered := make([]entities.Reward, 0) + for _, r := range rewards { + if r.PartyID == partyID { + filtered = append(filtered, r) + } + } + + return filtered +} + +func filterRewardsByTeam(rewards []entities.Reward, teamID entities.TeamID) []entities.Reward { + filtered := make([]entities.Reward, 0) + for _, r := range rewards { + if r.TeamID != nil && *r.TeamID == teamID { + filtered = append(filtered, r) + } + } + + return filtered +} + +func filterRewardsByGame(rewards []entities.Reward, gameID entities.GameID) []entities.Reward { + filtered := make([]entities.Reward, 0) + for _, r := range rewards { + if *r.GameID == gameID { + filtered = append(filtered, r) + } + } + + return filtered +} + +func TestRewardFilterByTeamIDAndGameID(t *testing.T) { + // going to use the games setup because we need to make sure the rewards have game and associated team data too. + ctx := tempTransaction(t) + stores := setupGamesTest(t, ctx) + startingBlock := addTestBlockForTime(t, ctx, stores.blocks, time.Now()) + _, gameIDs, gameRewards, teams := setupGamesData(ctx, t, stores, startingBlock, 50) + rewards := make([]entities.Reward, 0) + src := rand.NewSource(time.Now().UnixNano()) + r := rand.New(src) + // setup, get the unique individuals and from all the rewards + individuals := make(map[entities.PartyID]struct{}) + for _, gr := range gameRewards { + for _, r := range gr { + rewards = append(rewards, r) + individuals[r.PartyID] = struct{}{} + } + } + + t.Run("Should return rewards for all teams the party has been a member of if no team ID is provided", func(t *testing.T) { + // create a list of parties so we can pick one at random + parties := make([]entities.PartyID, 0) + for p := range individuals { + parties = append(parties, p) + } + // pick a random party + i := r.Intn(len(parties)) + partyID := parties[i] + page := entities.DefaultCursorPagination(true) + // get the rewards for that party + got, _, err := stores.rewards.GetByCursor(ctx, ptr.From(partyID.String()), nil, nil, nil, page, nil, nil) + require.NoError(t, err) + want := filterRewardsByParty(rewards, partyID) + // we don't care about the ordering as other tests already validate that, we just want to make sure we have all the rewards for the party + assert.ElementsMatchf(t, want, got, "got: %v, want: %v", got, want) + }) + + t.Run("Should return rewards for the specified team if a team ID is provided", func(t *testing.T) { + allTeams := make(map[string]struct{}) + for team := range teams { + allTeams[team] = struct{}{} + } + teamIDs := make([]string, 0) + for team := range allTeams { + teamIDs = append(teamIDs, team) + } + i := r.Intn(len(teamIDs)) + teamID := teamIDs[i] + i = r.Intn(len(teams[teamID])) + party := teams[teamID][i] + page := entities.DefaultCursorPagination(true) + got, _, err := stores.rewards.GetByCursor(ctx, ptr.From(party.ID.String()), nil, nil, nil, page, ptr.From(teamID), nil) + require.NoError(t, err) + want := filterRewardsByParty(filterRewardsByTeam(rewards, entities.TeamID(teamID)), party.ID) + assert.ElementsMatchf(t, want, got, "got: %v, want: %v", got, want) + }) + + t.Run("Should return rewards for the specified game if a game ID is provided", func(t *testing.T) { + i := r.Intn(len(gameIDs)) + gameID := gameIDs[i] + page := entities.DefaultCursorPagination(true) + got, _, err := stores.rewards.GetByCursor(ctx, nil, nil, nil, nil, page, nil, ptr.From(gameID)) + require.NoError(t, err) + want := filterRewardsByGame(rewards, entities.GameID(gameID)) + assert.ElementsMatchf(t, want, got, "got: %v, want: %v", got, want) + }) +} diff --git a/datanode/sqlstore/risk_factor.go b/datanode/sqlstore/risk_factor.go index 9e6598d04e..74a8bf5522 100644 --- a/datanode/sqlstore/risk_factor.go +++ b/datanode/sqlstore/risk_factor.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -33,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/risk_factor_test.go b/datanode/sqlstore/risk_factor_test.go index adbf9cd94d..b8aa45a7e0 100644 --- a/datanode/sqlstore/risk_factor_test.go +++ b/datanode/sqlstore/risk_factor_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/protos/vega" + "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/datanode/sqlstore/snapshot_data.go b/datanode/sqlstore/snapshot_data.go index 5bd05b6b8b..20264f5b19 100644 --- a/datanode/sqlstore/snapshot_data.go +++ b/datanode/sqlstore/snapshot_data.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -33,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/snapshot_data_test.go b/datanode/sqlstore/snapshot_data_test.go index f13d7e551f..4e7458c666 100644 --- a/datanode/sqlstore/snapshot_data_test.go +++ b/datanode/sqlstore/snapshot_data_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + "github.com/stretchr/testify/require" ) diff --git a/datanode/sqlstore/sqlstore.go b/datanode/sqlstore/sqlstore.go index 5645f467b8..c19d4cbdc6 100644 --- a/datanode/sqlstore/sqlstore.go +++ b/datanode/sqlstore/sqlstore.go @@ -13,19 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited - -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -37,21 +24,18 @@ import ( "io/fs" "time" - "go.uber.org/zap" - "code.vegaprotocol.io/vega/datanode/entities" - - "github.com/jackc/pgx/v4/pgxpool" + "code.vegaprotocol.io/vega/logging" + "code.vegaprotocol.io/vega/paths" embeddedpostgres "github.com/fergusstrange/embedded-postgres" "github.com/jackc/pgx/v4" + "github.com/jackc/pgx/v4/pgxpool" "github.com/jackc/pgx/v4/stdlib" "github.com/pkg/errors" "github.com/pressly/goose/v3" "github.com/shopspring/decimal" - - "code.vegaprotocol.io/vega/logging" - "code.vegaprotocol.io/vega/paths" + "go.uber.org/zap" ) var ErrBadID = errors.New("bad id (must be hex string)") @@ -77,9 +61,14 @@ var defaultRetentionPolicies = map[RetentionPeriod][]RetentionPolicy{ {HypertableOrCaggName: "trades_candle_1_minute", DataRetentionPeriod: "1 month"}, {HypertableOrCaggName: "trades_candle_5_minutes", DataRetentionPeriod: "1 month"}, {HypertableOrCaggName: "trades_candle_15_minutes", DataRetentionPeriod: "1 month"}, + {HypertableOrCaggName: "trades_candle_30_minutes", DataRetentionPeriod: "2 months"}, {HypertableOrCaggName: "trades_candle_1_hour", DataRetentionPeriod: "1 year"}, + {HypertableOrCaggName: "trades_candle_4_hours", DataRetentionPeriod: "1 year"}, {HypertableOrCaggName: "trades_candle_6_hours", DataRetentionPeriod: "1 year"}, + {HypertableOrCaggName: "trades_candle_8_hours", DataRetentionPeriod: "1 year"}, + {HypertableOrCaggName: "trades_candle_12_hours", DataRetentionPeriod: "1 year"}, {HypertableOrCaggName: "trades_candle_1_day", DataRetentionPeriod: "1 year"}, + {HypertableOrCaggName: "trades_candle_7_days", DataRetentionPeriod: "10 years"}, {HypertableOrCaggName: "market_data", DataRetentionPeriod: "7 days"}, {HypertableOrCaggName: "margin_levels", DataRetentionPeriod: "7 days"}, {HypertableOrCaggName: "conflated_margin_levels", DataRetentionPeriod: "1 year"}, @@ -107,6 +96,9 @@ var defaultRetentionPolicies = map[RetentionPeriod][]RetentionPolicy{ {HypertableOrCaggName: "party_locked_balances", DataRetentionPeriod: "1 year"}, {HypertableOrCaggName: "party_vesting_balances", DataRetentionPeriod: "1 year"}, {HypertableOrCaggName: "party_vesting_stats", DataRetentionPeriod: "1 year"}, + {HypertableOrCaggName: "fees_stats_by_party", DataRetentionPeriod: "1 year"}, + {HypertableOrCaggName: "paid_liquidity_fees", DataRetentionPeriod: "1 year"}, + {HypertableOrCaggName: "transfer_fees_discount", DataRetentionPeriod: "1 year"}, }, RetentionPeriodArchive: { {HypertableOrCaggName: "*", DataRetentionPeriod: string(RetentionPeriodArchive)}, @@ -391,10 +383,10 @@ const oneDayAsSeconds = 60 * 60 * 24 func getRetentionEntities(db *sql.DB) ([]string, error) { rows, err := db.Query(` select view_name as table_name -from timescaledb_information.continuous_aggregates +from timescaledb_information.continuous_aggregates WHERE hypertable_schema='public' union all select hypertable_name -from timescaledb_information.hypertables +from timescaledb_information.hypertables WHERE hypertable_schema='public'; `) if err != nil { return nil, err diff --git a/datanode/sqlstore/sqlstore_test.go b/datanode/sqlstore/sqlstore_test.go index 5c4cfa5d3d..35c0080108 100644 --- a/datanode/sqlstore/sqlstore_test.go +++ b/datanode/sqlstore/sqlstore_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -39,19 +27,16 @@ import ( "strconv" "testing" - "github.com/stretchr/testify/require" - - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" "code.vegaprotocol.io/vega/datanode/utils/databasetest" + + "github.com/stretchr/testify/require" ) var ( - config sqlstore.Config connectionSource *sqlstore.ConnectionSource testDBPort int - testDBSocketDir string + testConfig sqlstore.Config ) func TestMain(m *testing.M) { @@ -66,16 +51,11 @@ func TestMain(m *testing.M) { postgresLog *bytes.Buffer, ) { testDBPort = cfg.ConnectionConfig.Port - testDBSocketDir = cfg.ConnectionConfig.SocketDir connectionSource = source - config = cfg + testConfig = cfg }, postgresRuntimePath, sqlstore.EmbedMigrations) } -func generateTxHash() entities.TxHash { - return entities.TxHash(helpers.GenerateID()) -} - func generateEthereumAddress() string { randomString := strconv.FormatInt(rand.Int63(), 10) hash := sha256.Sum256([]byte(randomString)) diff --git a/datanode/sqlstore/stake_linking.go b/datanode/sqlstore/stake_linking.go index e80637ae92..44a2c80920 100644 --- a/datanode/sqlstore/stake_linking.go +++ b/datanode/sqlstore/stake_linking.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -37,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/logging" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" "github.com/shopspring/decimal" ) diff --git a/datanode/sqlstore/stake_linking_test.go b/datanode/sqlstore/stake_linking_test.go index dcd2bb6299..3ebd4b5354 100644 --- a/datanode/sqlstore/stake_linking_test.go +++ b/datanode/sqlstore/stake_linking_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -35,9 +23,9 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" "code.vegaprotocol.io/vega/libs/num" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -424,7 +412,7 @@ func addStakeLinking(t *testing.T, ctx context.Context, ls *sqlstore.StakeLinkin Amount: decimal.NewFromFloat(1), StakeLinkingStatus: entities.StakeLinkingStatusAccepted, FinalizedAt: block.VegaTime, - ForeignTxHash: helpers.GenerateID(), + ForeignTxHash: GenerateID(), LogIndex: logIndex, EthereumAddress: "0xfe179560b9d0cc44c5fea54c2167c1cee7ccfcabf294752a4f43fb64ddffda85", VegaTime: block.VegaTime, diff --git a/datanode/sqlstore/stop_orders.go b/datanode/sqlstore/stop_orders.go index d3af95ea34..dee6b2fed4 100644 --- a/datanode/sqlstore/stop_orders.go +++ b/datanode/sqlstore/stop_orders.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -32,14 +20,12 @@ import ( "fmt" "strings" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/metrics" "code.vegaprotocol.io/vega/libs/ptr" + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" "github.com/georgysavva/scany/pgxscan" - - "code.vegaprotocol.io/vega/datanode/entities" - "code.vegaprotocol.io/vega/datanode/metrics" ) type StopOrders struct { diff --git a/datanode/sqlstore/stop_orders_test.go b/datanode/sqlstore/stop_orders_test.go index c5b0b53922..0cc10c9f8a 100644 --- a/datanode/sqlstore/stop_orders_test.go +++ b/datanode/sqlstore/stop_orders_test.go @@ -16,24 +16,20 @@ package sqlstore_test import ( - "context" "fmt" "sort" "testing" "time" - "github.com/georgysavva/scany/pgxscan" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" - - commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" "code.vegaprotocol.io/vega/libs/ptr" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "github.com/georgysavva/scany/pgxscan" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) type testStopOrderInputs struct { @@ -112,7 +108,7 @@ func TestStopOrders_Add(t *testing.T) { for _, p := range parties { for _, m := range markets { inputs = append(inputs, testStopOrderInputs{ - orderID: helpers.GenerateID(), + orderID: GenerateID(), vegaTime: b.VegaTime, createdAt: b.VegaTime, triggerPrice: "100", @@ -166,7 +162,7 @@ func TestStopOrders_Get(t *testing.T) { markets := helpers.GenerateMarkets(t, ctx, 1, block, ms) - orderID := helpers.GenerateID() + orderID := GenerateID() stopOrders := generateTestStopOrders(t, []testStopOrderInputs{ { orderID: orderID, @@ -217,10 +213,7 @@ func TestStopOrders_ListStopOrders(t *testing.T) { ps := sqlstore.NewParties(connectionSource) ms := sqlstore.NewMarkets(connectionSource) - // ctx := tempTransaction(t) - // - - ctx := context.Background() + ctx := tempTransaction(t) blocks := []entities.Block{ addTestBlock(t, ctx, bs), diff --git a/datanode/sqlstore/teams.go b/datanode/sqlstore/teams.go index 20c54ae03b..a58010ff3b 100644 --- a/datanode/sqlstore/teams.go +++ b/datanode/sqlstore/teams.go @@ -18,26 +18,138 @@ package sqlstore import ( "context" "fmt" + "strings" + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/metrics" + "code.vegaprotocol.io/vega/libs/num" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" "github.com/georgysavva/scany/pgxscan" +) - "code.vegaprotocol.io/vega/datanode/metrics" - - "code.vegaprotocol.io/vega/datanode/entities" +const ( + listTeamsStatsQuery = `WITH + -- This CTE retrieves the all teams statistics reported for the last N epochs. + eligible_stats AS ( + SELECT * + FROM teams_stats + WHERE at_epoch > ( + SELECT MAX(at_epoch) - $1 + FROM teams_stats + ) %s + ), + team_numbers AS ( + SELECT t.team_id, + SUM(total_quantum_reward) AS total_quantum_rewards, + JSONB_AGG(JSONB_BUILD_OBJECT('epoch', at_epoch, 'total', total_quantum_reward) ORDER BY at_epoch, total_quantum_reward) AS quantum_rewards, + SUM(total_quantum_volume) AS total_quantum_volumes, + JSONB_AGG(JSONB_BUILD_OBJECT('epoch', at_epoch, 'total', total_quantum_volume) ORDER BY at_epoch, total_quantum_volume) AS quantum_volumes + FROM eligible_stats t + GROUP BY + t.team_id + ), + team_games AS ( + SELECT team_id, + COALESCE(ARRAY_LENGTH(ARRAY_REMOVE(ARRAY_AGG(DISTINCT game_played), NULL), 1), 0) AS count, + COALESCE(JSONB_AGG(DISTINCT game_played::BYTEA ORDER BY game_played::BYTEA) + FILTER (WHERE game_played <> 'null' ), '[]'::JSONB) AS LIST + FROM eligible_stats stats + LEFT JOIN LATERAL JSONB_OBJECT_KEYS(stats.games_played) AS game_played ON TRUE + GROUP BY + team_id + ) +SELECT tn.team_id AS team_id, + tn.total_quantum_rewards AS total_quantum_rewards, + tn.quantum_rewards AS quantum_rewards, + tn.total_quantum_volumes AS total_quantum_volumes, + tn.quantum_volumes AS quantum_volumes, + mg.list AS games_played, + mg.count AS total_games_played +FROM team_numbers tn + LEFT JOIN team_games mg ON tn.team_id = mg.team_id +` + + listTeamMembersStatsQuery = `WITH + -- This CTE retrieves the all teams statistics reported for the last N epochs. + eligible_stats AS ( + SELECT * + FROM teams_stats + WHERE at_epoch > ( + SELECT MAX(at_epoch) - $1 + FROM teams_stats + ) AND team_id = $2 %s + ), + members_numbers AS ( + SELECT team_id, + party_id, + SUM(total_quantum_reward) AS total_quantum_rewards, + JSONB_AGG(JSONB_BUILD_OBJECT('epoch', at_epoch, 'total', total_quantum_reward) ORDER BY at_epoch, total_quantum_reward) AS quantum_rewards, + SUM(total_quantum_volume) AS total_quantum_volumes, + JSONB_AGG(JSONB_BUILD_OBJECT('epoch', at_epoch, 'total', total_quantum_volume) ORDER BY at_epoch, total_quantum_volume) AS quantum_volumes + FROM eligible_stats + GROUP BY + team_id, + party_id + ), + members_games AS ( + SELECT team_id, + party_id, + COALESCE(ARRAY_LENGTH(ARRAY_REMOVE(ARRAY_AGG(DISTINCT game_played), NULL), 1), 0) AS count, + COALESCE(JSONB_AGG(DISTINCT game_played::BYTEA ORDER BY game_played::BYTEA) + FILTER ( WHERE game_played <> 'null' ), '[]'::JSONB) AS list + FROM eligible_stats stats + LEFT JOIN LATERAL JSONB_OBJECT_KEYS(stats.games_played) AS game_played ON TRUE + GROUP BY + team_id, + party_id + ) +SELECT mn.party_id AS party_id, + mn.total_quantum_rewards AS total_quantum_rewards, + mn.quantum_rewards AS quantum_rewards, + mn.total_quantum_volumes AS total_quantum_volumes, + mn.quantum_volumes AS quantum_volumes, + mg.list AS games_played, + mg.count AS total_games_played +FROM members_numbers mn + LEFT JOIN members_games mg ON mn.team_id = mg.team_id AND mn.party_id = mg.party_id` + + upsertTeamsStats = `INSERT INTO teams_stats(team_id, party_id, at_epoch, total_quantum_volume, total_quantum_reward, games_played) +VALUES + %s +ON CONFLICT (team_id, party_id, at_epoch) DO UPDATE + SET total_quantum_volume = excluded.total_quantum_volume + ` ) type ( Teams struct { *ConnectionSource } + + ListTeamsStatisticsFilters struct { + TeamID *entities.TeamID + AggregationEpochs uint64 + } + + ListTeamMembersStatisticsFilters struct { + TeamID entities.TeamID + PartyID *entities.PartyID + AggregationEpochs uint64 + } ) var ( teamsOrdering = TableOrdering{ ColumnOrdering{Name: "created_at", Sorting: ASC}, } + teamsStatsOrdering = TableOrdering{ + ColumnOrdering{Name: "team_id", Sorting: ASC}, + } + teamMembersStatsOrdering = TableOrdering{ + ColumnOrdering{Name: "party_id", Sorting: ASC}, + } refereesOrdering = TableOrdering{ ColumnOrdering{Name: "party_id", Sorting: ASC}, } @@ -54,15 +166,21 @@ func NewTeams(connectionSource *ConnectionSource) *Teams { func (t *Teams) AddTeam(ctx context.Context, team *entities.Team) error { defer metrics.StartSQLQuery("Teams", "AddTeam")() + + if team.AllowList == nil { + team.AllowList = []string{} + } + if _, err := t.Connection.Exec( ctx, - "INSERT INTO teams(id, referrer, name, team_url, avatar_url, closed, created_at, created_at_epoch, vega_time) values ($1, $2, $3, $4, $5, $6, $7, $8, $9)", + "INSERT INTO teams(id, referrer, name, team_url, avatar_url, closed, allow_list, created_at, created_at_epoch, vega_time) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)", team.ID, team.Referrer, team.Name, team.TeamURL, team.AvatarURL, team.Closed, + team.AllowList, team.CreatedAt, team.CreatedAtEpoch, team.VegaTime, @@ -72,7 +190,7 @@ func (t *Teams) AddTeam(ctx context.Context, team *entities.Team) error { if _, err := t.Connection.Exec( ctx, - "INSERT INTO team_members(team_id, party_id, joined_at_epoch, joined_at, vega_time) values ($1, $2, $3, $4, $5)", + "INSERT INTO team_members(team_id, party_id, joined_at_epoch, joined_at, vega_time) VALUES ($1, $2, $3, $4, $5)", team.ID, team.Referrer, team.CreatedAtEpoch, @@ -87,17 +205,24 @@ func (t *Teams) AddTeam(ctx context.Context, team *entities.Team) error { func (t *Teams) UpdateTeam(ctx context.Context, team *entities.TeamUpdated) error { defer metrics.StartSQLQuery("Teams", "UpdateTeam")() + + if team.AllowList == nil { + team.AllowList = []string{} + } + ct, err := t.Connection.Exec(ctx, `UPDATE teams SET name = $1, team_url = $2, avatar_url = $3, - closed = $4 - where id = $5`, + closed = $4, + allow_list = $5 + WHERE id = $6`, team.Name, team.TeamURL, team.AvatarURL, team.Closed, + team.AllowList, team.ID, ) @@ -110,7 +235,7 @@ func (t *Teams) UpdateTeam(ctx context.Context, team *entities.TeamUpdated) erro func (t *Teams) RefereeJoinedTeam(ctx context.Context, referee *entities.TeamMember) error { defer metrics.StartSQLQuery("Teams", "RefereeJoinedTeam")() _, err := t.Connection.Exec(ctx, - `INSERT INTO team_members(team_id, party_id, joined_at, joined_at_epoch, vega_time) values ($1, $2, $3, $4, $5)`, + `INSERT INTO team_members(team_id, party_id, joined_at, joined_at_epoch, vega_time) VALUES ($1, $2, $3, $4, $5)`, referee.TeamID, referee.PartyID, referee.JoinedAt, @@ -125,7 +250,7 @@ func (t *Teams) RefereeSwitchedTeam(ctx context.Context, referee *entities.Refer defer metrics.StartSQLQuery("Teams", "RefereeJoinedTeam")() _, err := t.Connection.Exec(ctx, - `INSERT INTO team_members(team_id, party_id, joined_at, joined_at_epoch, vega_time) values ($1, $2, $3, $4, $5)`, + `INSERT INTO team_members(team_id, party_id, joined_at, joined_at_epoch, vega_time) VALUES ($1, $2, $3, $4, $5)`, referee.ToTeamID, referee.PartyID, referee.SwitchedAt, @@ -136,6 +261,41 @@ func (t *Teams) RefereeSwitchedTeam(ctx context.Context, referee *entities.Refer return err } +func (t *Teams) TeamsStatsUpdated(ctx context.Context, evt *eventspb.TeamsStatsUpdated) error { + defer metrics.StartSQLQuery("Teams", "TeamsStatsUpdated")() + + var args []interface{} + + values := []string{} + for _, teamStats := range evt.Stats { + for _, memberStats := range teamStats.MembersStats { + notionalVolume, hasErr := num.UintFromString(memberStats.NotionalVolume, 10) + if hasErr { + notionalVolume = num.UintZero() + } + + values = append(values, fmt.Sprintf("(%s, %s, %s, %s, 0, '{}'::JSONB)", + nextBindVar(&args, entities.TeamID(teamStats.TeamId)), + nextBindVar(&args, entities.PartyID(memberStats.PartyId)), + nextBindVar(&args, evt.AtEpoch), + nextBindVar(&args, notionalVolume)), + ) + } + } + + if len(values) == 0 { + return nil + } + + query := fmt.Sprintf(upsertTeamsStats, strings.Join(values, ",")) + _, err := t.Connection.Exec(ctx, query, args...) + if err != nil { + return fmt.Errorf("could not insert team stats update: %w", err) + } + + return nil +} + func (t *Teams) GetTeam(ctx context.Context, teamID entities.TeamID, partyID entities.PartyID) (*entities.Team, error) { defer metrics.StartSQLQuery("Teams", "GetTeam")() @@ -147,14 +307,26 @@ func (t *Teams) GetTeam(ctx context.Context, teamID entities.TeamID, partyID ent var args []interface{} - var query string - + query := `WITH + members_stats AS ( + SELECT team_id, COUNT(DISTINCT party_id) AS total_members + FROM current_team_members + GROUP BY + team_id + ) +SELECT teams.*, members_stats.total_members +FROM teams + LEFT JOIN members_stats on teams.id = members_stats.team_id %s` + + var where string if teamID != "" { - query = fmt.Sprintf("select * from teams where id = %s", nextBindVar(&args, teamID)) + where = fmt.Sprintf("WHERE teams.id = %s", nextBindVar(&args, teamID)) } else if partyID != "" { - query = fmt.Sprintf("select t.* from teams t left join current_team_members ctm on t.id = ctm.team_id where ctm.party_id = %s", nextBindVar(&args, partyID)) + where = fmt.Sprintf("INNER JOIN current_team_members ON current_team_members.party_id = %s AND teams.id = current_team_members.team_id", nextBindVar(&args, partyID)) } + query = fmt.Sprintf(query, where) + if err := pgxscan.Get(ctx, t.Connection, &team, query, args...); err != nil { return nil, err } @@ -171,7 +343,16 @@ func (t *Teams) ListTeams(ctx context.Context, pagination entities.CursorPaginat pageInfo entities.PageInfo ) - query := `SELECT * FROM teams` + query := `WITH + members_stats AS ( + SELECT team_id, COUNT(DISTINCT party_id) AS total_members + FROM current_team_members + GROUP BY + team_id + ) +SELECT teams.*, members_stats.total_members +FROM teams + LEFT JOIN members_stats on teams.id = members_stats.team_id` query, args, err := PaginateQuery[entities.TeamCursor](query, args, teamsOrdering, pagination) if err != nil { @@ -187,6 +368,88 @@ func (t *Teams) ListTeams(ctx context.Context, pagination entities.CursorPaginat return teams, pageInfo, nil } +func (t *Teams) ListTeamsStatistics(ctx context.Context, pagination entities.CursorPagination, filters ListTeamsStatisticsFilters) ([]entities.TeamsStatistics, entities.PageInfo, error) { + defer metrics.StartSQLQuery("Teams", "ListTeamsStatistics")() + + var ( + teamsStats []entities.TeamsStatistics + pageInfo entities.PageInfo + ) + + query := listTeamsStatsQuery + args := []any{filters.AggregationEpochs} + + if filters.TeamID != nil { + query = fmt.Sprintf(query, fmt.Sprintf(`AND team_id = %s`, nextBindVar(&args, *filters.TeamID))) + } else { + query = fmt.Sprintf(query, "") + } + + query, args, err := PaginateQuery[entities.TeamsStatisticsCursor](query, args, teamsStatsOrdering, pagination) + if err != nil { + return nil, pageInfo, err + } + + if err := pgxscan.Select(ctx, t.Connection, &teamsStats, query, args...); err != nil { + return nil, pageInfo, err + } + + teamsStats, pageInfo = entities.PageEntities[*v2.TeamStatisticsEdge](teamsStats, pagination) + + // Deserializing the GameID array as a PostgreSQL array is not correctly + // interpreted by the scanny library. So, we have to use the JSONB array which + // convert the bytea as strings. This leaves the prefix `\\x` on the game ID. + // As a result, we have to manually clean up of the ID. + for i := range teamsStats { + for j := range teamsStats[i].GamesPlayed { + teamsStats[i].GamesPlayed[j] = entities.GameID(strings.TrimLeft(teamsStats[i].GamesPlayed[j].String(), "\\x")) + } + } + + return teamsStats, pageInfo, nil +} + +func (t *Teams) ListTeamMembersStatistics(ctx context.Context, pagination entities.CursorPagination, filters ListTeamMembersStatisticsFilters) ([]entities.TeamMembersStatistics, entities.PageInfo, error) { + defer metrics.StartSQLQuery("Teams", "ListTeamMembersStatistics")() + + var ( + membersStats []entities.TeamMembersStatistics + pageInfo entities.PageInfo + ) + + query := listTeamMembersStatsQuery + args := []any{filters.AggregationEpochs, filters.TeamID} + + if filters.PartyID != nil { + query = fmt.Sprintf(query, fmt.Sprintf(`AND party_id = %s`, nextBindVar(&args, *filters.PartyID))) + } else { + query = fmt.Sprintf(query, "") + } + + query, args, err := PaginateQuery[entities.TeamMemberStatisticsCursor](query, args, teamMembersStatsOrdering, pagination) + if err != nil { + return nil, pageInfo, err + } + + if err := pgxscan.Select(ctx, t.Connection, &membersStats, query, args...); err != nil { + return nil, pageInfo, err + } + + membersStats, pageInfo = entities.PageEntities[*v2.TeamMemberStatisticsEdge](membersStats, pagination) + + // Deserializing the GameID array as a PostgreSQL array is not correctly + // interpreted by the scanny library. So, we have to use the JSONB array which + // convert the bytea as strings. This leaves the prefix `\\x` on the game ID. + // As a result, we have to manually clean up of the ID. + for i := range membersStats { + for j := range membersStats[i].GamesPlayed { + membersStats[i].GamesPlayed[j] = entities.GameID(strings.TrimLeft(membersStats[i].GamesPlayed[j].String(), "\\x")) + } + } + + return membersStats, pageInfo, nil +} + func (t *Teams) ListReferees(ctx context.Context, teamID entities.TeamID, pagination entities.CursorPagination) ([]entities.TeamMember, entities.PageInfo, error) { defer metrics.StartSQLQuery("Teams", "ListReferees")() var ( @@ -199,10 +462,10 @@ func (t *Teams) ListReferees(ctx context.Context, teamID entities.TeamID, pagina return nil, pageInfo, fmt.Errorf("teamID must be provided") } - query := `select ctm.* - from current_team_members ctm - left join teams t on t.id = ctm.team_id - where ctm.party_id != t.referrer and ctm.team_id = %s` + query := `SELECT ctm.* + FROM current_team_members ctm + LEFT JOIN teams t ON t.id = ctm.team_id + WHERE ctm.party_id != t.referrer AND ctm.team_id = %s` query = fmt.Sprintf(query, nextBindVar(&args, teamID)) diff --git a/datanode/sqlstore/teams_helper_for_test.go b/datanode/sqlstore/teams_helper_for_test.go index 69268d0f38..a483f4fdb4 100644 --- a/datanode/sqlstore/teams_helper_for_test.go +++ b/datanode/sqlstore/teams_helper_for_test.go @@ -18,12 +18,13 @@ package sqlstore_test import ( "context" "fmt" + "strings" "testing" "time" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" + "github.com/stretchr/testify/require" "golang.org/x/exp/maps" "golang.org/x/exp/slices" @@ -49,9 +50,10 @@ func setupTeams(t *testing.T, ctx context.Context, bs *sqlstore.Blocks, ps *sqls block := addTestBlock(t, ctx, bs) referrer := addTestParty(t, ctx, ps, block) team := entities.Team{ - ID: entities.TeamID(helpers.GenerateID()), + ID: entities.TeamID(GenerateID()), Referrer: referrer.ID, Name: fmt.Sprintf("Test Team %02d", i+1), + TotalMembers: 1, // The referrer. CreatedAt: block.VegaTime, CreatedAtEpoch: 1, VegaTime: block.VegaTime, @@ -70,7 +72,7 @@ func setupTeams(t *testing.T, ctx context.Context, bs *sqlstore.Blocks, ps *sqls time.Sleep(10 * time.Millisecond) } - for _, team := range teams { + for iTeam, team := range teams { block := addTestBlock(t, ctx, bs) for i := 0; i < 10; i++ { referee := addTestParty(t, ctx, ps, block) @@ -84,21 +86,26 @@ func setupTeams(t *testing.T, ctx context.Context, bs *sqlstore.Blocks, ps *sqls err := ts.RefereeJoinedTeam(ctx, &teamReferee) require.NoError(t, err) teamsHistory = append(teamsHistory, teamReferee) + + team.TotalMembers += 1 + teams[iTeam] = team } time.Sleep(10 * time.Millisecond) } switchingReferee := teamsHistory[len(teams)].PartyID - for i, team := range teams { + for i, toTeam := range teams { if i == 0 { continue } + fromTeam := teams[i-1] + block := addTestBlock(t, ctx, bs) switchTeam := entities.RefereeTeamSwitch{ - FromTeamID: teams[i-1].ID, - ToTeamID: team.ID, + FromTeamID: fromTeam.ID, + ToTeamID: toTeam.ID, PartyID: switchingReferee, SwitchedAtEpoch: uint64(3 + i), SwitchedAt: block.VegaTime, @@ -108,15 +115,42 @@ func setupTeams(t *testing.T, ctx context.Context, bs *sqlstore.Blocks, ps *sqls require.NoError(t, ts.RefereeSwitchedTeam(ctx, &switchTeam)) teamsHistory = append(teamsHistory, entities.TeamMember{ - TeamID: team.ID, + TeamID: toTeam.ID, PartyID: switchingReferee, JoinedAtEpoch: uint64(3 + i), JoinedAt: block.VegaTime, VegaTime: block.VegaTime, }) + + fromTeam.TotalMembers -= 1 + teams[i-1] = fromTeam + + toTeam.TotalMembers += 1 + teams[i] = toTeam + time.Sleep(10 * time.Millisecond) } + block := addTestBlock(t, ctx, bs) + for i, team := range teams { + if i%2 != 0 { + continue + } + + teamDup := team + teamDup.Closed = true + teamDup.AllowList = []string{GenerateID(), GenerateID()} + teams[i] = teamDup + + require.NoError(t, ts.UpdateTeam(ctx, &entities.TeamUpdated{ + ID: teamDup.ID, + Name: teamDup.Name, + Closed: teamDup.Closed, + AllowList: teamDup.AllowList, + VegaTime: block.VegaTime, + })) + } + return teams, teamsHistory } @@ -132,8 +166,8 @@ func historyForReferee(teamsHistory []entities.TeamMember, party entities.PartyI }) } } - slices.SortStableFunc(refereeHistory, func(a, b entities.TeamMemberHistory) bool { - return a.JoinedAtEpoch < b.JoinedAtEpoch + slices.SortStableFunc(refereeHistory, func(a, b entities.TeamMemberHistory) int { + return compareUint64(a.JoinedAtEpoch, b.JoinedAtEpoch) }) return refereeHistory @@ -149,8 +183,8 @@ func currentRefereesForTeam(teamsHistory []entities.TeamMember, teamID entities. } } - slices.SortStableFunc(currentTeamReferees, func(a, b entities.TeamMember) bool { - return a.PartyID < b.PartyID + slices.SortStableFunc(currentTeamReferees, func(a, b entities.TeamMember) int { + return strings.Compare(string(a.PartyID), string(b.PartyID)) }) return currentTeamReferees diff --git a/datanode/sqlstore/teams_test.go b/datanode/sqlstore/teams_test.go index 2b3621481b..823349b669 100644 --- a/datanode/sqlstore/teams_test.go +++ b/datanode/sqlstore/teams_test.go @@ -16,19 +16,26 @@ package sqlstore_test import ( + "encoding/json" + "fmt" "math/rand" "sort" + "strings" "testing" - - eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - "github.com/stretchr/testify/assert" - "golang.org/x/exp/slices" + "time" "code.vegaprotocol.io/vega/datanode/entities" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" + "code.vegaprotocol.io/vega/datanode/sqlstore" + vgcrypto "code.vegaprotocol.io/vega/libs/crypto" + "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/ptr" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/georgysavva/scany/pgxscan" + "github.com/shopspring/decimal" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "golang.org/x/exp/slices" ) func TestTeams_AddTeams(t *testing.T) { @@ -39,7 +46,7 @@ func TestTeams_AddTeams(t *testing.T) { referrer := addTestParty(t, ctx, ps, block) team := entities.Team{ - ID: entities.TeamID(helpers.GenerateID()), + ID: entities.TeamID(GenerateID()), Referrer: referrer.ID, Name: "Test Team", TeamURL: nil, @@ -48,6 +55,7 @@ func TestTeams_AddTeams(t *testing.T) { CreatedAtEpoch: 1, VegaTime: block.VegaTime, Closed: true, + AllowList: []string{GenerateID(), GenerateID()}, } t.Run("Should add a new if it does not already exist", func(t *testing.T) { @@ -76,7 +84,7 @@ func TestTeams_UpdateTeam(t *testing.T) { referrer := addTestParty(t, ctx, ps, block) team := entities.Team{ - ID: entities.TeamID(helpers.GenerateID()), + ID: entities.TeamID(GenerateID()), Referrer: referrer.ID, Name: "Test Team", TeamURL: nil, @@ -84,6 +92,7 @@ func TestTeams_UpdateTeam(t *testing.T) { CreatedAt: block.VegaTime, VegaTime: block.VegaTime, Closed: true, + AllowList: []string{GenerateID(), GenerateID()}, } err := ts.AddTeam(ctx, &team) @@ -98,6 +107,8 @@ func TestTeams_UpdateTeam(t *testing.T) { TeamURL: ptr.From("https://surely-you-cant-be-serio.us"), AvatarURL: ptr.From("https://dont-call-me-shirl.ee"), VegaTime: nextBlock.VegaTime, + Closed: true, + AllowList: []string{GenerateID(), GenerateID()}, } err := ts.UpdateTeam(ctx, &updateTeam) @@ -109,9 +120,10 @@ func TestTeams_UpdateTeam(t *testing.T) { Name: team.Name, TeamURL: updateTeam.TeamURL, AvatarURL: updateTeam.AvatarURL, + Closed: updateTeam.Closed, + AllowList: updateTeam.AllowList, CreatedAt: team.CreatedAt, VegaTime: team.VegaTime, - Closed: updateTeam.Closed, } var got entities.Team @@ -126,7 +138,7 @@ func TestTeams_UpdateTeam(t *testing.T) { nextBlock := addTestBlock(t, ctx, bs) updateTeam := entities.TeamUpdated{ - ID: entities.TeamID(helpers.GenerateID()), + ID: entities.TeamID(GenerateID()), Name: team.Name, TeamURL: ptr.From("https://surely-you-cant-be-serio.us"), AvatarURL: ptr.From("https://dont-call-me-shirl.ee"), @@ -152,7 +164,7 @@ func testTeamsShouldAddReferee(t *testing.T) { referrer := addTestParty(t, ctx, ps, block) team := entities.Team{ - ID: entities.TeamID(helpers.GenerateID()), + ID: entities.TeamID(GenerateID()), Referrer: referrer.ID, Name: "Test Team", TeamURL: nil, @@ -188,7 +200,7 @@ func testTeamsShouldShowJoinedTeamAsCurrentTeam(t *testing.T) { referrer2 := addTestParty(t, ctx, ps, block) team1 := entities.Team{ - ID: entities.TeamID(helpers.GenerateID()), + ID: entities.TeamID(GenerateID()), Referrer: referrer1.ID, Name: "Test Team 1", TeamURL: nil, @@ -200,7 +212,7 @@ func testTeamsShouldShowJoinedTeamAsCurrentTeam(t *testing.T) { require.NoError(t, ts.AddTeam(ctx, &team1)) team2 := entities.Team{ - ID: entities.TeamID(helpers.GenerateID()), + ID: entities.TeamID(GenerateID()), Referrer: referrer2.ID, Name: "Test Team 2", TeamURL: nil, @@ -253,7 +265,7 @@ func testTeamsShouldShowLastJoinedTeamAsCurrentTeam(t *testing.T) { referrer2 := addTestParty(t, ctx, ps, block) team1 := entities.Team{ - ID: entities.TeamID(helpers.GenerateID()), + ID: entities.TeamID(GenerateID()), Referrer: referrer1.ID, Name: "Test Team 1", TeamURL: nil, @@ -265,7 +277,7 @@ func testTeamsShouldShowLastJoinedTeamAsCurrentTeam(t *testing.T) { require.NoError(t, ts.AddTeam(ctx, &team1)) team2 := entities.Team{ - ID: entities.TeamID(helpers.GenerateID()), + ID: entities.TeamID(GenerateID()), Referrer: referrer2.ID, Name: "Test Team 2", TeamURL: nil, @@ -672,8 +684,8 @@ func testShouldReturnPageOfRefereeHistoryIfNoPaginationProvidedNewestFirst(t *te require.NoError(t, err) refereeHistory := historyForReferee(teamsHistory, referee.PartyID) - slices.SortStableFunc(refereeHistory, func(a, b entities.TeamMemberHistory) bool { - return a.JoinedAtEpoch > b.JoinedAtEpoch + slices.SortStableFunc(refereeHistory, func(a, b entities.TeamMemberHistory) int { + return -compareUint64(a.JoinedAtEpoch, b.JoinedAtEpoch) }) assert.Equal(t, refereeHistory, got) @@ -768,3 +780,477 @@ func testShouldReturnPageOfRefereeHistoryGivenPagination(t *testing.T) { }, pageInfo) }) } + +func TestListTeamStatistics(t *testing.T) { + ctx := tempTransaction(t) + + teamsStore := sqlstore.NewTeams(connectionSource) + blocksStore := sqlstore.NewBlocks(connectionSource) + rewardsStore := sqlstore.NewRewards(ctx, connectionSource) + + member11 := entities.PartyID(GenerateID()) + member12 := entities.PartyID(GenerateID()) + member21 := entities.PartyID(GenerateID()) + member22 := entities.PartyID(GenerateID()) + member31 := entities.PartyID(GenerateID()) + member32 := entities.PartyID(GenerateID()) + member41 := entities.PartyID(GenerateID()) + member42 := entities.PartyID(GenerateID()) + + team1 := entities.TeamID(GenerateID()) + team2 := entities.TeamID(GenerateID()) + team3 := entities.TeamID(GenerateID()) + team4 := entities.TeamID(GenerateID()) + + teams := map[entities.TeamID][]entities.PartyID{ + team1: {member11, member12}, + team2: {member21, member22}, + team3: {member31, member32}, + team4: {member41, member42}, + } + + teamIDs := []entities.TeamID{team1, team2, team3, team4} + gameIDs := []entities.GameID{ + entities.GameID("11" + GenerateID()), + entities.GameID("22" + GenerateID()), + entities.GameID("33" + GenerateID()), + entities.GameID("44" + GenerateID()), + } + + startTime := time.Now() + + for team, members := range teams { + require.NoError(t, teamsStore.AddTeam(ctx, &entities.Team{ + ID: team, + Referrer: entities.PartyID(GenerateID()), + Name: "Name", + Closed: false, + CreatedAt: startTime, + CreatedAtEpoch: 1, + VegaTime: startTime, + })) + + for _, member := range members { + require.NoError(t, teamsStore.RefereeJoinedTeam(ctx, &entities.TeamMember{ + TeamID: team, + PartyID: member, + JoinedAt: startTime, + JoinedAtEpoch: 1, + VegaTime: startTime, + })) + } + } + + for epoch := int64(1); epoch < 4; epoch++ { + blockTime := startTime.Add(time.Duration(epoch) * time.Minute).Truncate(time.Microsecond) + block := entities.Block{ + VegaTime: blockTime, + Height: epoch, + Hash: []byte(vgcrypto.RandomHash()), + } + require.NoError(t, blocksStore.Add(ctx, block)) + + j := 0 + evt := &eventspb.TeamsStatsUpdated{ + AtEpoch: uint64(epoch), + } + for _, teamID := range teamIDs { + membersStats := []*eventspb.TeamMemberStats{} + + for i, member := range teams[teamID] { + membersStats = append(membersStats, &eventspb.TeamMemberStats{ + PartyId: string(member), + NotionalVolume: fmt.Sprintf("%d", i+j), + }) + } + // Add some notional volume. + // It's done before the rewards as this is what will happen in the core as the + // MarketActivityTracker will send teams stats before the reward engine sends the + // the reward payout. + evt.Stats = append(evt.Stats, &eventspb.TeamStats{ + TeamId: string(teamID), + MembersStats: membersStats, + }) + + j += 1 + } + require.NoError(t, teamsStore.TeamsStatsUpdated(ctx, evt)) + + seqNum := uint64(0) + for teamIdx, teamID := range teamIDs { + for _, member := range teams[teamID] { + seqNum += 1 + + require.NoError(t, rewardsStore.Add(ctx, entities.Reward{ + PartyID: member, + AssetID: entities.AssetID(GenerateID()), + MarketID: entities.MarketID(GenerateID()), + EpochID: epoch, + Amount: decimal.NewFromInt(int64(seqNum)), + QuantumAmount: decimal.NewFromInt(epoch + int64(seqNum)), + PercentOfTotal: 0.1 * float64(epoch), + RewardType: "NICE_BOY", + Timestamp: blockTime, + TxHash: generateTxHash(), + VegaTime: blockTime, + SeqNum: seqNum, + LockedUntilEpochID: epoch, + GameID: ptr.From(gameIDs[teamIdx]), + })) + } + } + + // Add non-game rewards to ensure we only account for game rewards. + for _, teamID := range teamIDs { + for _, member := range teams[teamID] { + seqNum += 1 + + require.NoError(t, rewardsStore.Add(ctx, entities.Reward{ + PartyID: member, + AssetID: entities.AssetID(GenerateID()), + MarketID: entities.MarketID(GenerateID()), + EpochID: epoch, + Amount: decimal.NewFromInt(int64(seqNum)), + QuantumAmount: decimal.NewFromInt(epoch + int64(seqNum)), + PercentOfTotal: 0.1 * float64(epoch), + RewardType: "NICE_BOY", + Timestamp: blockTime, + TxHash: generateTxHash(), + VegaTime: blockTime.Add(time.Second), + SeqNum: seqNum, + LockedUntilEpochID: epoch, + })) + } + } + } + + t.Run("Getting all stats from the last 2 epochs", func(t *testing.T) { + stats, _, err := teamsStore.ListTeamsStatistics(ctx, entities.DefaultCursorPagination(false), sqlstore.ListTeamsStatisticsFilters{ + AggregationEpochs: 2, + }) + + require.NoError(t, err) + expectedStats := []entities.TeamsStatistics{ + { + TeamID: team1, + TotalQuantumRewards: decimal.NewFromInt(16), + QuantumRewards: []entities.QuantumRewardsPerEpoch{ + { + Epoch: 2, + Total: decimal.NewFromInt(3), + }, { + Epoch: 2, + Total: decimal.NewFromInt(4), + }, { + Epoch: 3, + Total: decimal.NewFromInt(4), + }, { + Epoch: 3, + Total: decimal.NewFromInt(5), + }, + }, + TotalQuantumVolumes: num.NewUint(2), + QuantumVolumes: []entities.QuantumVolumesPerEpoch{ + { + Epoch: 2, + Total: num.NewUint(0), + }, { + Epoch: 2, + Total: num.NewUint(1), + }, { + Epoch: 3, + Total: num.NewUint(0), + }, { + Epoch: 3, + Total: num.NewUint(1), + }, + }, + TotalGamesPlayed: 1, + GamesPlayed: []entities.GameID{gameIDs[0]}, + }, + { + TeamID: team2, + TotalQuantumRewards: decimal.NewFromInt(24), + QuantumRewards: []entities.QuantumRewardsPerEpoch{ + { + Epoch: 2, + Total: decimal.NewFromInt(5), + }, { + Epoch: 2, + Total: decimal.NewFromInt(6), + }, { + Epoch: 3, + Total: decimal.NewFromInt(6), + }, { + Epoch: 3, + Total: decimal.NewFromInt(7), + }, + }, + TotalQuantumVolumes: num.NewUint(6), + QuantumVolumes: []entities.QuantumVolumesPerEpoch{ + { + Epoch: 2, + Total: num.NewUint(1), + }, { + Epoch: 2, + Total: num.NewUint(2), + }, { + Epoch: 3, + Total: num.NewUint(1), + }, { + Epoch: 3, + Total: num.NewUint(2), + }, + }, + TotalGamesPlayed: 1, + GamesPlayed: []entities.GameID{gameIDs[1]}, + }, + { + TeamID: team3, + TotalQuantumRewards: decimal.NewFromInt(32), + QuantumRewards: []entities.QuantumRewardsPerEpoch{ + { + Epoch: 2, + Total: decimal.NewFromInt(7), + }, { + Epoch: 2, + Total: decimal.NewFromInt(8), + }, { + Epoch: 3, + Total: decimal.NewFromInt(8), + }, { + Epoch: 3, + Total: decimal.NewFromInt(9), + }, + }, + TotalQuantumVolumes: num.NewUint(10), + QuantumVolumes: []entities.QuantumVolumesPerEpoch{ + { + Epoch: 2, + Total: num.NewUint(2), + }, { + Epoch: 2, + Total: num.NewUint(3), + }, { + Epoch: 3, + Total: num.NewUint(2), + }, { + Epoch: 3, + Total: num.NewUint(3), + }, + }, + TotalGamesPlayed: 1, + GamesPlayed: []entities.GameID{gameIDs[2]}, + }, + { + TeamID: team4, + TotalQuantumRewards: decimal.NewFromInt(40), + QuantumRewards: []entities.QuantumRewardsPerEpoch{ + { + Epoch: 2, + Total: decimal.NewFromInt(9), + }, { + Epoch: 2, + Total: decimal.NewFromInt(10), + }, { + Epoch: 3, + Total: decimal.NewFromInt(10), + }, { + Epoch: 3, + Total: decimal.NewFromInt(11), + }, + }, + TotalQuantumVolumes: num.NewUint(14), + QuantumVolumes: []entities.QuantumVolumesPerEpoch{ + { + Epoch: 2, + Total: num.NewUint(3), + }, { + Epoch: 2, + Total: num.NewUint(4), + }, { + Epoch: 3, + Total: num.NewUint(3), + }, { + Epoch: 3, + Total: num.NewUint(4), + }, + }, + TotalGamesPlayed: 1, + GamesPlayed: []entities.GameID{gameIDs[3]}, + }, + } + slices.SortStableFunc(expectedStats, func(a, b entities.TeamsStatistics) int { + return strings.Compare(string(a.TeamID), string(b.TeamID)) + }) + + // Ugly hack to bypass deep-equal limitation with assert.Equal(). + expectedStatsJson, _ := json.Marshal(expectedStats) + statsJson, _ := json.Marshal(stats) + assert.JSONEq(t, string(expectedStatsJson), string(statsJson)) + }) + + t.Run("Getting stats from a given team from the last 2 epochs", func(t *testing.T) { + stats, _, err := teamsStore.ListTeamsStatistics(ctx, entities.DefaultCursorPagination(false), sqlstore.ListTeamsStatisticsFilters{ + TeamID: ptr.From(entities.TeamID(team1.String())), + AggregationEpochs: 2, + }) + + require.NoError(t, err) + expectedStats := []entities.TeamsStatistics{ + { + TeamID: team1, + TotalQuantumRewards: decimal.NewFromInt(16), + QuantumRewards: []entities.QuantumRewardsPerEpoch{ + { + Epoch: 2, + Total: decimal.NewFromInt(3), + }, { + Epoch: 2, + Total: decimal.NewFromInt(4), + }, { + Epoch: 3, + Total: decimal.NewFromInt(4), + }, { + Epoch: 3, + Total: decimal.NewFromInt(5), + }, + }, + TotalQuantumVolumes: num.NewUint(2), + QuantumVolumes: []entities.QuantumVolumesPerEpoch{ + { + Epoch: 2, + Total: num.NewUint(0), + }, { + Epoch: 2, + Total: num.NewUint(1), + }, { + Epoch: 3, + Total: num.NewUint(0), + }, { + Epoch: 3, + Total: num.NewUint(1), + }, + }, + TotalGamesPlayed: 1, + GamesPlayed: []entities.GameID{gameIDs[0]}, + }, + } + + // Ugly hack to bypass deep-equal limitation with assert.Equal(). + expectedStatsJson, _ := json.Marshal(expectedStats) + statsJson, _ := json.Marshal(stats) + assert.JSONEq(t, string(expectedStatsJson), string(statsJson)) + }) + + t.Run("Getting all members stats from the last 2 epochs", func(t *testing.T) { + stats, _, err := teamsStore.ListTeamMembersStatistics(ctx, entities.DefaultCursorPagination(false), sqlstore.ListTeamMembersStatisticsFilters{ + TeamID: team2, + AggregationEpochs: 2, + }) + + require.NoError(t, err) + expectedStats := []entities.TeamMembersStatistics{ + { + PartyID: member21, + TotalQuantumRewards: decimal.NewFromInt(11), + QuantumRewards: []entities.QuantumRewardsPerEpoch{ + { + Epoch: 2, + Total: decimal.NewFromInt(5), + }, { + Epoch: 3, + Total: decimal.NewFromInt(6), + }, + }, + TotalQuantumVolumes: num.NewUint(2), + QuantumVolumes: []entities.QuantumVolumesPerEpoch{ + { + Epoch: 2, + Total: num.NewUint(1), + }, { + Epoch: 3, + Total: num.NewUint(1), + }, + }, + TotalGamesPlayed: 1, + GamesPlayed: []entities.GameID{gameIDs[1]}, + }, + { + PartyID: member22, + TotalQuantumRewards: decimal.NewFromInt(13), + QuantumRewards: []entities.QuantumRewardsPerEpoch{ + { + Epoch: 2, + Total: decimal.NewFromInt(6), + }, { + Epoch: 3, + Total: decimal.NewFromInt(7), + }, + }, + TotalQuantumVolumes: num.NewUint(4), + QuantumVolumes: []entities.QuantumVolumesPerEpoch{ + { + Epoch: 2, + Total: num.NewUint(2), + }, { + Epoch: 3, + Total: num.NewUint(2), + }, + }, + TotalGamesPlayed: 1, + GamesPlayed: []entities.GameID{gameIDs[1]}, + }, + } + slices.SortStableFunc(expectedStats, func(a, b entities.TeamMembersStatistics) int { + return strings.Compare(string(a.PartyID), string(b.PartyID)) + }) + + // Ugly hack to bypass deep-equal limitation with assert.Equal(). + expectedStatsJson, _ := json.Marshal(expectedStats) + statsJson, _ := json.Marshal(stats) + assert.JSONEq(t, string(expectedStatsJson), string(statsJson)) + }) + + t.Run("Getting stats from a given party from the last 2 epochs", func(t *testing.T) { + stats, _, err := teamsStore.ListTeamMembersStatistics(ctx, entities.DefaultCursorPagination(false), sqlstore.ListTeamMembersStatisticsFilters{ + TeamID: team2, + PartyID: ptr.From(member21), + AggregationEpochs: 2, + }) + + require.NoError(t, err) + expectedStats := []entities.TeamMembersStatistics{ + { + PartyID: member21, + TotalQuantumRewards: decimal.NewFromInt(11), + QuantumRewards: []entities.QuantumRewardsPerEpoch{ + { + Epoch: 2, + Total: decimal.NewFromInt(5), + }, { + Epoch: 3, + Total: decimal.NewFromInt(6), + }, + }, + TotalQuantumVolumes: num.NewUint(2), + QuantumVolumes: []entities.QuantumVolumesPerEpoch{ + { + Epoch: 2, + Total: num.NewUint(1), + }, { + Epoch: 3, + Total: num.NewUint(1), + }, + }, + TotalGamesPlayed: 1, + GamesPlayed: []entities.GameID{gameIDs[1]}, + }, + } + + // Ugly hack to bypass deep-equal limitation with assert.Equal(). + expectedStatsJson, _ := json.Marshal(expectedStats) + statsJson, _ := json.Marshal(stats) + assert.JSONEq(t, string(expectedStatsJson), string(statsJson)) + }) +} diff --git a/datanode/sqlstore/trades.go b/datanode/sqlstore/trades.go index 592fc34362..30e3e690b1 100644 --- a/datanode/sqlstore/trades.go +++ b/datanode/sqlstore/trades.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( diff --git a/datanode/sqlstore/trades_test.go b/datanode/sqlstore/trades_test.go index 37cd40f20f..8d1a5f2c5f 100644 --- a/datanode/sqlstore/trades_test.go +++ b/datanode/sqlstore/trades_test.go @@ -13,32 +13,22 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( "context" + "encoding/hex" "testing" "time" - types "code.vegaprotocol.io/vega/protos/vega" - "github.com/shopspring/decimal" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/libs/num" + types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) const ( @@ -235,6 +225,10 @@ func TestTrades_CursorPagination(t *testing.T) { t.Run("Should return the page of trades between dates for a given market when a first and after cursor is set", testTradesCursorPaginationBetweenDatesByMarketWithCursorForward) } +func TestTransferFeeDiscount(t *testing.T) { + t.Run("get current transfer fee discount", tesGetCurrentTransferFeeDiscount) +} + func setupTradesTest(t *testing.T) (*sqlstore.Blocks, *sqlstore.Trades) { t.Helper() bs := sqlstore.NewBlocks(connectionSource) @@ -1213,3 +1207,49 @@ func testTradesCursorPaginationBetweenDatesByMarketWithCursorForward(t *testing. assert.False(t, pageInfo.HasNextPage) assert.True(t, pageInfo.HasPreviousPage) } + +func tesGetCurrentTransferFeeDiscount(t *testing.T) { + ctx := tempTransaction(t) + + transfers := sqlstore.NewTransfers(connectionSource) + + vegaTime := time.Now().Truncate(time.Microsecond) + + partyID := entities.PartyID(hex.EncodeToString([]byte("party-1"))) + assetID := entities.AssetID(hex.EncodeToString([]byte("asset-1"))) + secondAssetID := entities.AssetID(hex.EncodeToString([]byte("asset-2"))) + + tfd := &entities.TransferFeesDiscount{ + PartyID: partyID, + AssetID: assetID, + Amount: num.DecimalFromInt64(500), + EpochSeq: 1, + VegaTime: vegaTime, + } + assert.NoError(t, transfers.UpsertFeesDiscount(ctx, tfd)) + discount, err := transfers.GetCurrentTransferFeeDiscount(ctx, partyID, assetID) + assert.NoError(t, err) + assert.Equal(t, tfd, discount) + + secondTfd := &entities.TransferFeesDiscount{ + PartyID: partyID, + AssetID: secondAssetID, + Amount: num.DecimalFromInt64(150), + EpochSeq: 1, + VegaTime: vegaTime, + } + assert.NoError(t, transfers.UpsertFeesDiscount(ctx, secondTfd)) + discount, err = transfers.GetCurrentTransferFeeDiscount(ctx, partyID, secondAssetID) + assert.NoError(t, err) + assert.Equal(t, secondTfd, discount) + + // update the amount for the same party and asset + vegaTime = vegaTime.Add(time.Second) + tfd.VegaTime = vegaTime + tfd.Amount = num.DecimalFromInt64(400) + assert.NoError(t, transfers.UpsertFeesDiscount(ctx, tfd)) + + discount, err = transfers.GetCurrentTransferFeeDiscount(ctx, partyID, assetID) + assert.NoError(t, err) + assert.Equal(t, tfd, discount) +} diff --git a/datanode/sqlstore/transfers.go b/datanode/sqlstore/transfers.go index da9ca761d3..3d080508f3 100644 --- a/datanode/sqlstore/transfers.go +++ b/datanode/sqlstore/transfers.go @@ -13,39 +13,36 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( "context" "errors" "fmt" + "strings" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" "github.com/jackc/pgx/v4" ) +var transfersOrdering = TableOrdering{ + ColumnOrdering{Name: "vega_time", Sorting: ASC}, + ColumnOrdering{Name: "id", Sorting: ASC}, +} + type Transfers struct { *ConnectionSource } -var transfersOrdering = TableOrdering{ - ColumnOrdering{Name: "vega_time", Sorting: ASC}, - ColumnOrdering{Name: "id", Sorting: ASC}, +type ListTransfersFilters struct { + FromEpoch *uint64 + ToEpoch *uint64 + Scope *entities.TransferScope + Status *entities.TransferStatus } func NewTransfers(connectionSource *ConnectionSource) *Transfers { @@ -56,7 +53,7 @@ func NewTransfers(connectionSource *ConnectionSource) *Transfers { func (t *Transfers) Upsert(ctx context.Context, transfer *entities.Transfer) error { defer metrics.StartSQLQuery("Transfers", "Upsert")() - query := `insert into transfers( + query := `INSERT INTO transfers( id, tx_hash, vega_time, @@ -72,32 +69,33 @@ func (t *Transfers) Upsert(ctx context.Context, transfer *entities.Transfer) err end_epoch, factor, dispatch_strategy, - reason + reason, + game_id ) - values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16) - on conflict (id, vega_time) do update - set - from_account_id=EXCLUDED.from_account_id, - to_account_id=EXCLUDED.to_account_id, - asset_id=EXCLUDED.asset_id, - amount=EXCLUDED.amount, - reference=EXCLUDED.reference, - status=EXCLUDED.status, - transfer_type=EXCLUDED.transfer_type, - deliver_on=EXCLUDED.deliver_on, - start_epoch=EXCLUDED.start_epoch, - end_epoch=EXCLUDED.end_epoch, - factor=EXCLUDED.factor, - dispatch_strategy=EXCLUDED.dispatch_strategy, - reason=EXCLUDED.reason, - tx_hash=EXCLUDED.tx_hash + VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17) + ON CONFLICT (id, vega_time) DO UPDATE + SET + from_account_id=excluded.from_account_id, + to_account_id=excluded.to_account_id, + asset_id=excluded.asset_id, + amount=excluded.amount, + reference=excluded.reference, + status=excluded.status, + transfer_type=excluded.transfer_type, + deliver_on=excluded.deliver_on, + start_epoch=excluded.start_epoch, + end_epoch=excluded.end_epoch, + factor=excluded.factor, + dispatch_strategy=excluded.dispatch_strategy, + reason=excluded.reason, + tx_hash=excluded.tx_hash, + game_id=excluded.game_id ;` if _, err := t.Connection.Exec(ctx, query, transfer.ID, transfer.TxHash, transfer.VegaTime, transfer.FromAccountID, transfer.ToAccountID, transfer.AssetID, transfer.Amount, transfer.Reference, transfer.Status, transfer.TransferType, - transfer.DeliverOn, transfer.StartEpoch, transfer.EndEpoch, transfer.Factor, transfer.DispatchStrategy, transfer.Reason); err != nil { - err = fmt.Errorf("could not insert transfer into database: %w", err) - return err + transfer.DeliverOn, transfer.StartEpoch, transfer.EndEpoch, transfer.Factor, transfer.DispatchStrategy, transfer.Reason, transfer.GameID); err != nil { + return fmt.Errorf("could not insert transfer into database: %w", err) } return nil @@ -109,51 +107,27 @@ func (t *Transfers) UpsertFees(ctx context.Context, tf *entities.TransferFees) e transfer_id, amount, epoch_seq, - vega_time - ) VALUES ($1, $2, $3, $4) ON CONFLICT (vega_time, transfer_id) DO NOTHING;` // conflicts may occur on checkpoint restore. - if _, err := t.Connection.Exec(ctx, query, tf.TransferID, tf.Amount, tf.EpochSeq, tf.VegaTime); err != nil { + vega_time, + discount_applied + ) VALUES ($1, $2, $3, $4, $5) ON CONFLICT (vega_time, transfer_id) DO NOTHING;` // conflicts may occur on checkpoint restore. + if _, err := t.Connection.Exec(ctx, query, tf.TransferID, tf.Amount, tf.EpochSeq, tf.VegaTime, tf.DiscountApplied); err != nil { return err } return nil } -func (t *Transfers) getTransferDetails(ctx context.Context, transfers []entities.Transfer) ([]entities.TransferDetails, error) { - details := make([]entities.TransferDetails, 0, len(transfers)) - query := `SELECT * FROM transfer_fees WHERE transfer_id = $1` - for _, tr := range transfers { - detail := entities.TransferDetails{ - Transfer: tr, - } - rows, err := t.Connection.Query(ctx, query, tr.ID) - if errors.Is(err, pgx.ErrNoRows) { - details = append(details, detail) - if rows != nil { - rows.Close() - } - continue - } - if err != nil { - return nil, t.wrapE(err) - } - if err := pgxscan.ScanAll(&detail.Fees, rows); err != nil { - return nil, t.wrapE(err) - } - rows.Close() - details = append(details, detail) +func (t *Transfers) GetTransfersToOrFromParty(ctx context.Context, pagination entities.CursorPagination, filters ListTransfersFilters, partyID entities.PartyID) ([]entities.TransferDetails, entities.PageInfo, error) { + defer metrics.StartSQLQuery("Transfers", "GetTransfersToOrFromParty")() + + where := []string{ + "(transfers_current.from_account_id in (select id from accounts where accounts.party_id=$1) or transfers_current.to_account_id in (select id from accounts where accounts.party_id=$1))", } - return details, nil -} -func (t *Transfers) GetTransfersToOrFromParty(ctx context.Context, partyID entities.PartyID, pagination entities.CursorPagination) ([]entities.TransferDetails, - entities.PageInfo, error, -) { - defer metrics.StartSQLQuery("Transfers", "GetTransfersToOrFromParty")() - transfers, pageInfo, err := t.getTransfers(ctx, pagination, - "where transfers_current.from_account_id in (select id from accounts where accounts.party_id=$1)"+ - " or transfers_current.to_account_id in (select id from accounts where accounts.party_id=$1)", partyID) + transfers, pageInfo, err := t.getCurrentTransfers(ctx, pagination, filters, where, []any{partyID}) if err != nil { - return nil, entities.PageInfo{}, fmt.Errorf("getting transfers to or from party:%w", err) + return nil, entities.PageInfo{}, fmt.Errorf("could not get transfers to or from party: %w", err) } + details, err := t.getTransferDetails(ctx, transfers) if err != nil { return nil, entities.PageInfo{}, err @@ -162,31 +136,16 @@ func (t *Transfers) GetTransfersToOrFromParty(ctx context.Context, partyID entit return details, pageInfo, nil } -func (t *Transfers) GetTransfersFromParty(ctx context.Context, partyID entities.PartyID, pagination entities.CursorPagination) ([]entities.TransferDetails, - entities.PageInfo, error, -) { +func (t *Transfers) GetTransfersFromParty(ctx context.Context, pagination entities.CursorPagination, filters ListTransfersFilters, partyID entities.PartyID) ([]entities.TransferDetails, entities.PageInfo, error) { defer metrics.StartSQLQuery("Transfers", "GetTransfersFromParty")() - transfers, pageInfo, err := t.getTransfers(ctx, pagination, - "where transfers_current.from_account_id in (select id from accounts where accounts.party_id=$1)", partyID) - if err != nil { - return nil, entities.PageInfo{}, fmt.Errorf("getting transfers from party:%w", err) - } - details, err := t.getTransferDetails(ctx, transfers) - if err != nil { - return nil, entities.PageInfo{}, err - } - return details, pageInfo, nil -} + where := []string{ + "transfers_current.from_account_id in (select id from accounts where accounts.party_id=$1)", + } -func (t *Transfers) GetTransfersToParty(ctx context.Context, partyID entities.PartyID, pagination entities.CursorPagination) ([]entities.TransferDetails, entities.PageInfo, - error, -) { - defer metrics.StartSQLQuery("Transfers", "GetTransfersToParty")() - transfers, pageInfo, err := t.getTransfers(ctx, pagination, - "where transfers_current.to_account_id in (select id from accounts where accounts.party_id=$1)", partyID) + transfers, pageInfo, err := t.getCurrentTransfers(ctx, pagination, filters, where, []any{partyID}) if err != nil { - return nil, entities.PageInfo{}, fmt.Errorf("getting transfers to party:%w", err) + return nil, entities.PageInfo{}, fmt.Errorf("could not get transfers from party: %w", err) } details, err := t.getTransferDetails(ctx, transfers) if err != nil { @@ -196,30 +155,18 @@ func (t *Transfers) GetTransfersToParty(ctx context.Context, partyID entities.Pa return details, pageInfo, nil } -func (t *Transfers) GetTransfersFromAccount(ctx context.Context, accountID entities.AccountID, pagination entities.CursorPagination) ([]entities.TransferDetails, - entities.PageInfo, error, -) { - defer metrics.StartSQLQuery("Transfers", "GetTransfersFromAccount")() - transfers, pageInfo, err := t.getTransfers(ctx, pagination, "WHERE from_account_id = $1", accountID) - if err != nil { - return nil, entities.PageInfo{}, fmt.Errorf("getting transfers from account:%w", err) - } - details, err := t.getTransferDetails(ctx, transfers) - if err != nil { - return nil, entities.PageInfo{}, err - } +func (t *Transfers) GetTransfersToParty(ctx context.Context, pagination entities.CursorPagination, filters ListTransfersFilters, partyID entities.PartyID) ([]entities.TransferDetails, entities.PageInfo, error) { + defer metrics.StartSQLQuery("Transfers", "GetTransfersToParty")() - return details, pageInfo, nil -} + where := []string{ + "transfers_current.to_account_id in (select id from accounts where accounts.party_id=$1)", + } -func (t *Transfers) GetTransfersToAccount(ctx context.Context, accountID entities.AccountID, pagination entities.CursorPagination) ([]entities.TransferDetails, - entities.PageInfo, error, -) { - defer metrics.StartSQLQuery("Transfers", "GetTransfersToAccount")() - transfers, pageInfo, err := t.getTransfers(ctx, pagination, "WHERE to_account_id = $1", accountID) + transfers, pageInfo, err := t.getCurrentTransfers(ctx, pagination, filters, where, []any{partyID}) if err != nil { - return nil, entities.PageInfo{}, fmt.Errorf("getting transfers to account:%w", err) + return nil, entities.PageInfo{}, fmt.Errorf("could not get transfers to party: %w", err) } + details, err := t.getTransferDetails(ctx, transfers) if err != nil { return nil, entities.PageInfo{}, err @@ -228,14 +175,14 @@ func (t *Transfers) GetTransfersToAccount(ctx context.Context, accountID entitie return details, pageInfo, nil } -func (t *Transfers) GetAll(ctx context.Context, pagination entities.CursorPagination) ([]entities.TransferDetails, - entities.PageInfo, error, -) { +func (t *Transfers) GetAll(ctx context.Context, pagination entities.CursorPagination, filters ListTransfersFilters) ([]entities.TransferDetails, entities.PageInfo, error) { defer metrics.StartSQLQuery("Transfers", "GetAll")() - transfers, pageInfo, err := t.getTransfers(ctx, pagination, "") + + transfers, pageInfo, err := t.getCurrentTransfers(ctx, pagination, filters, nil, nil) if err != nil { return nil, entities.PageInfo{}, err } + details, err := t.getTransferDetails(ctx, transfers) if err != nil { return nil, entities.PageInfo{}, err @@ -247,11 +194,10 @@ func (t *Transfers) GetByTxHash(ctx context.Context, txHash entities.TxHash) ([] defer metrics.StartSQLQuery("Transfers", "GetByTxHash")() var transfers []entities.Transfer - query := "SELECT * FROM transfers WHERE tx_hash = $1" + query := "SELECT * FROM transfers WHERE tx_hash = $1 ORDER BY id" - err := pgxscan.Select(ctx, t.Connection, &transfers, query, txHash) - if err != nil { - return nil, fmt.Errorf("getting transfers:%w", err) + if err := pgxscan.Select(ctx, t.Connection, &transfers, query, txHash); err != nil { + return nil, fmt.Errorf("could not get transfers by transaction hash: %w", err) } return transfers, nil } @@ -268,98 +214,188 @@ func (t *Transfers) GetByID(ctx context.Context, id string) (entities.TransferDe if err != nil || len(details) == 0 { return entities.TransferDetails{}, err } + return details[0], nil } -func (t *Transfers) getTransfers(ctx context.Context, pagination entities.CursorPagination, where string, args ...interface{}) ([]entities.Transfer, - entities.PageInfo, error, -) { - var ( - pageInfo entities.PageInfo - err error - ) +func (t *Transfers) GetAllRewards(ctx context.Context, pagination entities.CursorPagination, filters ListTransfersFilters) ([]entities.TransferDetails, entities.PageInfo, error) { + defer metrics.StartSQLQuery("Transfers", "GetAllRewards")() - query := "select * from transfers_current " + where - query, args, err = PaginateQuery[entities.TransferCursor](query, args, transfersOrdering, pagination) - if err != nil { - return nil, pageInfo, err + where := []string{ + "dispatch_strategy->>'metric' <> '0'", } - var transfers []entities.Transfer - err = pgxscan.Select(ctx, t.Connection, &transfers, query, args...) + args := []any{entities.Recurring, entities.GovernanceRecurring} + + transfers, pageInfo, err := t.getRecurringTransfers(ctx, pagination, filters, where, args) if err != nil { - return nil, pageInfo, fmt.Errorf("getting transfers:%w", err) + return nil, entities.PageInfo{}, fmt.Errorf("could not get recurring transfers: %w", err) } - transfers, pageInfo = entities.PageEntities[*v2.TransferEdge](transfers, pagination) + details, err := t.getTransferDetails(ctx, transfers) + if err != nil { + return nil, entities.PageInfo{}, err + } - return transfers, pageInfo, nil + return details, pageInfo, nil } -func (t *Transfers) GetAllRewards(ctx context.Context, pagination entities.CursorPagination) ([]entities.TransferDetails, entities.PageInfo, error) { - defer metrics.StartSQLQuery("Transfers", "GetAllRewards")() - var ( - pageInfo entities.PageInfo - err error - transfers []entities.Transfer - ) - query := `WITH recurring_transfers AS ( - SELECT * - FROM transfers_current - WHERE jsonb_typeof(dispatch_strategy) != 'null' AND transfer_type IN ($1, $2) -) -SELECT * -FROM recurring_transfers -WHERE dispatch_strategy->>'metric' <> '0'` - params := []any{entities.Recurring, entities.GovernanceRecurring} - query, params, err = PaginateQuery[entities.TransferCursor](query, params, transfersOrdering, pagination) - if err != nil { - return nil, pageInfo, err +func (t *Transfers) GetRewardTransfersFromParty(ctx context.Context, pagination entities.CursorPagination, filters ListTransfersFilters, partyID entities.PartyID) ([]entities.TransferDetails, entities.PageInfo, error) { + defer metrics.StartSQLQuery("Transfers", "GetRewardTransfersFromParty")() + + where := []string{ + "from_account_id IN (SELECT id FROM accounts WHERE accounts.party_id = $3)", + "dispatch_strategy->>'metric' <> '0'", } - if err = pgxscan.Select(ctx, t.Connection, &transfers, query, params...); err != nil { - return nil, pageInfo, fmt.Errorf("getting reward transfers: %w", err) + + args := []any{entities.Recurring, entities.GovernanceRecurring, partyID} + + transfers, pageInfo, err := t.getRecurringTransfers(ctx, pagination, filters, where, args) + if err != nil { + return nil, entities.PageInfo{}, fmt.Errorf("could not get recurring transfers: %w", err) } - transfers, pageInfo = entities.PageEntities[*v2.TransferEdge](transfers, pagination) + details, err := t.getTransferDetails(ctx, transfers) - if err != nil || len(details) == 0 { - return nil, pageInfo, err + if err != nil { + return nil, entities.PageInfo{}, err } return details, pageInfo, nil } -func (t *Transfers) GetRewardTransfersFromParty(ctx context.Context, partyID entities.PartyID, pagination entities.CursorPagination) ([]entities.TransferDetails, - entities.PageInfo, error, -) { - defer metrics.StartSQLQuery("Transfers", "GetRewardTransfersFromParty")() - var ( - pageInfo entities.PageInfo - err error - transfers []entities.Transfer - ) +func (t *Transfers) UpsertFeesDiscount(ctx context.Context, tfd *entities.TransferFeesDiscount) error { + defer metrics.StartSQLQuery("Transfers", "UpsertFeesDiscount")() + query := `INSERT INTO transfer_fees_discount( + party_id, + asset_id, + amount, + epoch_seq, + vega_time + ) VALUES ($1, $2, $3, $4, $5) ON CONFLICT (vega_time, party_id, asset_id) DO NOTHING ;` // conflicts may occur on checkpoint restore. + if _, err := t.Connection.Exec(ctx, query, tfd.PartyID, tfd.AssetID, tfd.Amount, tfd.EpochSeq, tfd.VegaTime); err != nil { + return err + } + return nil +} + +func (t *Transfers) GetCurrentTransferFeeDiscount( + ctx context.Context, + partyID entities.PartyID, + assetID entities.AssetID, +) (*entities.TransferFeesDiscount, error) { + defer metrics.StartSQLQuery("Transfers", "GetCurrentTransferFeeDiscount")() + + var tfd entities.TransferFeesDiscount + query := `SELECT * FROM transfer_fees_discount + WHERE party_id = $1 AND asset_id = $2 + ORDER BY vega_time DESC LIMIT 1` + + if err := pgxscan.Get(ctx, t.Connection, &tfd, query, partyID, assetID); err != nil { + return &entities.TransferFeesDiscount{}, t.wrapE(err) + } + + return &tfd, nil +} + +func (t *Transfers) getCurrentTransfers(ctx context.Context, pagination entities.CursorPagination, filters ListTransfersFilters, where []string, args []any) ([]entities.Transfer, entities.PageInfo, error) { + whereStr, args := t.buildWhereClause(filters, where, args) + query := "SELECT * FROM transfers_current " + whereStr + + return t.selectTransfers(ctx, pagination, query, args) +} + +func (t *Transfers) getRecurringTransfers(ctx context.Context, pagination entities.CursorPagination, filters ListTransfersFilters, where []string, args []any) ([]entities.Transfer, entities.PageInfo, error) { + whereStr, args := t.buildWhereClause(filters, where, args) + query := `WITH recurring_transfers AS ( - SELECT * - FROM transfers_current - WHERE jsonb_typeof(dispatch_strategy) != 'null' AND transfer_type IN ($1, $2) + SELECT tc.* FROM transfers_current as tc + JOIN accounts as a on tc.to_account_id = a.id + WHERE transfer_type IN ($1, $2) + AND (a.type = 12 OR jsonb_typeof(tc.dispatch_strategy) != 'null') ) SELECT * FROM recurring_transfers -WHERE from_account_id IN (SELECT id FROM accounts WHERE accounts.party_id = $3) -AND dispatch_strategy->>'metric' <> '0'` - params := []any{entities.Recurring, entities.GovernanceRecurring, partyID} +` + whereStr + + return t.selectTransfers(ctx, pagination, query, args) +} + +func (t *Transfers) buildWhereClause(filters ListTransfersFilters, where []string, args []any) (string, []any) { + if filters.Scope != nil { + where = append(where, "jsonb_typeof(dispatch_strategy) != 'null'") + switch *filters.Scope { + case entities.TransferScopeIndividual: + where = append(where, "dispatch_strategy ? 'individual_scope'") + case entities.TransferScopeTeam: + where = append(where, "dispatch_strategy ? 'team_scope'") + } + } + + if filters.Status != nil { + where = append(where, fmt.Sprintf("status = %s", nextBindVar(&args, *filters.Status))) + } + + if filters.FromEpoch != nil { + where = append(where, fmt.Sprintf("(start_epoch >= %s or end_epoch >= %s)", + nextBindVar(&args, *filters.FromEpoch), + nextBindVar(&args, *filters.FromEpoch), + )) + } - query, params, err = PaginateQuery[entities.TransferCursor](query, params, transfersOrdering, pagination) + if filters.ToEpoch != nil { + where = append(where, fmt.Sprintf("(start_epoch <= %s or end_epoch <= %s)", + nextBindVar(&args, *filters.ToEpoch), + nextBindVar(&args, *filters.ToEpoch), + )) + } + + whereStr := "" + if len(where) > 0 { + whereStr = "where " + strings.Join(where, " and ") + } + return whereStr, args +} + +func (t *Transfers) selectTransfers(ctx context.Context, pagination entities.CursorPagination, query string, args []any) ([]entities.Transfer, entities.PageInfo, error) { + query, args, err := PaginateQuery[entities.TransferCursor](query, args, transfersOrdering, pagination) if err != nil { - return nil, pageInfo, err + return nil, entities.PageInfo{}, err } - if err = pgxscan.Select(ctx, t.Connection, &transfers, query, params...); err != nil { - return nil, pageInfo, fmt.Errorf("getting party reward transfers: %w", err) + var transfers []entities.Transfer + err = pgxscan.Select(ctx, t.Connection, &transfers, query, args...) + if err != nil { + return nil, entities.PageInfo{}, fmt.Errorf("could not get transfers: %w", err) } - transfers, pageInfo = entities.PageEntities[*v2.TransferEdge](transfers, pagination) - details, err := t.getTransferDetails(ctx, transfers) - if err != nil || len(details) == 0 { - return nil, pageInfo, err + + transfers, pageInfo := entities.PageEntities[*v2.TransferEdge](transfers, pagination) + + return transfers, pageInfo, nil +} + +func (t *Transfers) getTransferDetails(ctx context.Context, transfers []entities.Transfer) ([]entities.TransferDetails, error) { + details := make([]entities.TransferDetails, 0, len(transfers)) + query := `SELECT * FROM transfer_fees WHERE transfer_id = $1` + for _, tr := range transfers { + detail := entities.TransferDetails{ + Transfer: tr, + } + rows, err := t.Connection.Query(ctx, query, tr.ID) + if errors.Is(err, pgx.ErrNoRows) { + details = append(details, detail) + if rows != nil { + rows.Close() + } + continue + } + if err != nil { + return nil, t.wrapE(err) + } + if err := pgxscan.ScanAll(&detail.Fees, rows); err != nil { + return nil, t.wrapE(err) + } + rows.Close() + details = append(details, detail) } - return details, pageInfo, nil + return details, nil } diff --git a/datanode/sqlstore/transfers_helpers_for_test.go b/datanode/sqlstore/transfers_helpers_for_test.go new file mode 100644 index 0000000000..e1e7c43792 --- /dev/null +++ b/datanode/sqlstore/transfers_helpers_for_test.go @@ -0,0 +1,166 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package sqlstore_test + +import ( + "context" + "testing" + "time" + + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" + vgtest "code.vegaprotocol.io/vega/libs/test" + vegapb "code.vegaprotocol.io/vega/protos/vega" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/shopspring/decimal" + "github.com/stretchr/testify/require" +) + +type TransferOption func(*testing.T, *eventspb.Transfer) + +func CreateTransfer(t *testing.T, ctx context.Context, transferStore *sqlstore.Transfers, accountsStore *sqlstore.Accounts, block entities.Block, options ...TransferOption) *entities.Transfer { + t.Helper() + + transfer := NewTransfer(t, ctx, accountsStore, block, options...) + + require.NoError(t, transferStore.Upsert(ctx, transfer)) + + fee := entities.TransferFees{ + TransferID: transfer.ID, + EpochSeq: 1, + Amount: decimal.NewFromInt(1), + DiscountApplied: decimal.NewFromInt(0), + VegaTime: transfer.VegaTime, + } + + require.NoError(t, transferStore.UpsertFees(ctx, &fee)) + fee.EpochSeq = 2 + fee.VegaTime = fee.VegaTime.Add(time.Second) + + require.NoError(t, transferStore.UpsertFees(ctx, &fee)) + + return transfer +} + +func NewTransfer(t *testing.T, ctx context.Context, accountsStore *sqlstore.Accounts, block entities.Block, options ...TransferOption) *entities.Transfer { + t.Helper() + + // Postgres only stores timestamps in microsecond resolution. + // Without truncating, the timestamp will mismatch in test assertions. + blockTimeMs := block.VegaTime.Truncate(time.Microsecond) + + transferEvent := &eventspb.Transfer{ + Id: GenerateID(), + From: GenerateID(), + FromAccountType: vegapb.AccountType_ACCOUNT_TYPE_GENERAL, + To: GenerateID(), + ToAccountType: vegapb.AccountType_ACCOUNT_TYPE_GENERAL, + Asset: GenerateID(), + Amount: vgtest.RandomPositiveU64AsString(), + Reference: GenerateID(), + Status: eventspb.Transfer_STATUS_PENDING, + Timestamp: blockTimeMs.UnixNano(), + } + + for _, option := range options { + option(t, transferEvent) + } + + if transferEvent.Kind == nil { + t.Fatal("transfer is missing a kind") + } + + transfer, err := entities.TransferFromProto(ctx, transferEvent, generateTxHash(), blockTimeMs, accountsStore) + require.NoError(t, err) + + return transfer +} + +func TransferWithID(id entities.TransferID) TransferOption { + return func(t *testing.T, transfer *eventspb.Transfer) { + t.Helper() + transfer.Id = id.String() + } +} + +func TransferWithStatus(status entities.TransferStatus) TransferOption { + return func(t *testing.T, transfer *eventspb.Transfer) { + t.Helper() + transfer.Status = eventspb.Transfer_Status(status) + } +} + +func TransferWithAsset(asset *entities.Asset) TransferOption { + return func(t *testing.T, transfer *eventspb.Transfer) { + t.Helper() + transfer.Asset = asset.ID.String() + } +} + +func TransferFromToAccounts(from, to *entities.Account) TransferOption { + return func(t *testing.T, transfer *eventspb.Transfer) { + t.Helper() + transfer.From = from.PartyID.String() + transfer.FromAccountType = from.Type + transfer.To = to.PartyID.String() + transfer.ToAccountType = to.Type + } +} + +func TransferAsRecurring(config *eventspb.RecurringTransfer) TransferOption { + return func(t *testing.T, transfer *eventspb.Transfer) { + t.Helper() + transfer.Kind = &eventspb.Transfer_Recurring{ + Recurring: config, + } + } +} + +func TransferAsRecurringGovernance(config eventspb.RecurringGovernanceTransfer) TransferOption { + return func(t *testing.T, transfer *eventspb.Transfer) { + t.Helper() + transfer.Kind = &eventspb.Transfer_RecurringGovernance{ + RecurringGovernance: &config, + } + } +} + +func TransferAsOneOff(config eventspb.OneOffTransfer) TransferOption { + return func(t *testing.T, transfer *eventspb.Transfer) { + t.Helper() + transfer.Kind = &eventspb.Transfer_OneOff{ + OneOff: &config, + } + } +} + +func TransferDetailsAsTransfers(t *testing.T, details []entities.TransferDetails) []entities.Transfer { + t.Helper() + + transfers := make([]entities.Transfer, 0, len(details)) + for i := range details { + transfers = append(transfers, details[i].Transfer) + } + return transfers +} + +func TransferWithGameID(gameID *string) TransferOption { + return func(t *testing.T, transfer *eventspb.Transfer) { + t.Helper() + transfer.GameId = gameID + } +} diff --git a/datanode/sqlstore/transfers_test.go b/datanode/sqlstore/transfers_test.go index be784b57bd..665160e5d5 100644 --- a/datanode/sqlstore/transfers_test.go +++ b/datanode/sqlstore/transfers_test.go @@ -13,885 +13,864 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( - "context" - "fmt" "testing" "time" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" "code.vegaprotocol.io/vega/libs/ptr" - "code.vegaprotocol.io/vega/protos/vega" + vegapb "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" - "github.com/shopspring/decimal" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) -func TestTransfers(t *testing.T) { - t.Run("Retrieve transfers to or from a party", testTransfersGetTransferToOrFromParty) - t.Run("Retrieve transfer to and from a party ", testTransfersGetTransfersByParty) - t.Run("Retrieve transfer to and from an account", testTransfersGetFromAccountAndGetToAccount) - t.Run("Retrieves latest transfer version after updates in different block", testTransfersUpdatesInDifferentBlocks) - t.Run("Retrieves latest transfer version after updates in different block", testTransfersUpdateInSameBlock) - t.Run("Test add and retrieve of one off transfer", testTransfersAddAndRetrieveOneOffTransfer) - t.Run("Test add and retrieve of recurring transfer", testTransfersAddAndRetrieveRecurringTransfer) - t.Run("Test get by tx hash", testGetByTxHash) -} +func TestGetTransferByID(t *testing.T) { + ctx := tempTransaction(t) -func TestTransfersPagination(t *testing.T) { - t.Run("should return all transfers if no pagination is specified", testTransferPaginationNoPagination) - t.Run("should return the first page of results if first is provided", testTransferPaginationFirst) - t.Run("should return the last page of results if last is provided", testTransferPaginationLast) - t.Run("should return the specified page of results if first and after are provided", testTransferPaginationFirstAfter) - t.Run("should return the specified page of results if last and before are provided", testTransferPaginationLastBefore) -} + blocksStore := sqlstore.NewBlocks(connectionSource) + assetsStore := sqlstore.NewAssets(connectionSource) + accountsStore := sqlstore.NewAccounts(connectionSource) + transfersStore := sqlstore.NewTransfers(connectionSource) -func TestRewardTransfers(t *testing.T) { - t.Run("Retrieve all reward transfers", testGetAllRewardTransfers) -} + block := addTestBlockForTime(t, ctx, blocksStore, time.Now()) -func TestTrasferByID(t *testing.T) { - ctx := tempTransaction(t) + asset := CreateAsset(t, ctx, assetsStore, block) - now := time.Now() - block := getTestBlock(t, ctx, now) - accounts := sqlstore.NewAccounts(connectionSource) - accountFrom, accountTo := getTestAccounts(t, ctx, accounts, block) - - transfers := sqlstore.NewTransfers(connectionSource) - id := "deadd0d0" - - reason := "test by id" - sourceTransferProto := &eventspb.Transfer{ - Id: id, - From: accountFrom.PartyID.String(), - FromAccountType: accountFrom.Type, - To: accountTo.PartyID.String(), - ToAccountType: accountTo.Type, - Asset: accountFrom.AssetID.String(), - Amount: "30", - Reference: "Ref1", - Status: eventspb.Transfer_STATUS_PENDING, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_Recurring{Recurring: &eventspb.RecurringTransfer{ - StartEpoch: 10, - EndEpoch: nil, - Factor: "0.1", - DispatchStrategy: &vega.DispatchStrategy{ - AssetForMetric: "deadd0d0", - Markets: []string{"beefdead", "feebaad"}, - Metric: vega.DispatchMetric_DISPATCH_METRIC_MARKET_VALUE, - }, - }}, - Reason: &reason, - } + account1 := CreateAccount(t, ctx, accountsStore, block, + AccountForAsset(asset), + ) + account2 := CreateAccount(t, ctx, accountsStore, block, + AccountWithType(vegapb.AccountType_ACCOUNT_TYPE_GLOBAL_REWARD), + AccountForAsset(asset), + ) - transfer, _ := entities.TransferFromProto(ctx, sourceTransferProto, generateTxHash(), block.VegaTime, accounts) - transfers.Upsert(ctx, transfer) - - sourceTransferProto2 := &eventspb.Transfer{ - Id: id, - From: accountFrom.PartyID.String(), - FromAccountType: accountFrom.Type, - To: accountTo.PartyID.String(), - ToAccountType: accountTo.Type, - Asset: accountFrom.AssetID.String(), - Amount: "30", - Reference: "Ref1", - Status: eventspb.Transfer_STATUS_DONE, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_Recurring{Recurring: &eventspb.RecurringTransfer{ + transfer := NewTransfer(t, ctx, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + TransferAsRecurring(&eventspb.RecurringTransfer{ StartEpoch: 10, EndEpoch: nil, Factor: "0.1", - }}, - } + }), + ) + + transferUpdateFromSameTx := NewTransfer(t, ctx, accountsStore, block, + TransferWithID(transfer.ID), + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 15, + EndEpoch: nil, + Factor: "0.15", + }), + ) + transferUpdateFromSameTx.TxHash = transfer.TxHash + + transferUpdateFromDifferentTx := NewTransfer(t, ctx, accountsStore, block, + TransferWithID(transfer.ID), + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 20, + EndEpoch: ptr.From(uint64(25)), + Factor: "0.2", + }), + ) + + // Ensure we have different transfers so the test is meaningful. + RequireAllDifferent(t, transfer, transferUpdateFromSameTx, transferUpdateFromDifferentTx) + + t.Run("Save transfers", func(t *testing.T) { + require.NoError(t, transfersStore.Upsert(ctx, transfer)) + require.NoError(t, transfersStore.Upsert(ctx, transferUpdateFromSameTx)) + require.NoError(t, transfersStore.Upsert(ctx, transferUpdateFromDifferentTx)) + }) + + t.Run("Retrieve the transfer by ID returns the latest version", func(t *testing.T) { + retrieved, err := transfersStore.GetByID(ctx, transfer.ID.String()) + require.NoError(t, err) + assert.Equal(t, *transferUpdateFromDifferentTx, retrieved.Transfer) + }) +} - transfer, _ = entities.TransferFromProto(ctx, sourceTransferProto2, generateTxHash(), block.VegaTime, accounts) - transfers.Upsert(ctx, transfer) +func TestGetTransfersByHash(t *testing.T) { + ctx := tempTransaction(t) - retrieved, err := transfers.GetByID(ctx, id) - if err != nil { - t.Fatalf("f%s", err) - } - retrievedTransferProto, _ := retrieved.Transfer.ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto2, retrievedTransferProto) + blocksStore := sqlstore.NewBlocks(connectionSource) + assetsStore := sqlstore.NewAssets(connectionSource) + accountsStore := sqlstore.NewAccounts(connectionSource) + transfersStore := sqlstore.NewTransfers(connectionSource) - retrievedByParty, _, err := transfers.GetTransfersToParty(ctx, accountTo.PartyID, entities.CursorPagination{}) - if err != nil { - t.Fatalf("f%s", err) - } - assert.Equal(t, 1, len(retrievedByParty)) - retrievedTransferProto, _ = retrievedByParty[0].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto2, retrievedTransferProto) -} + block1 := addTestBlockForTime(t, ctx, blocksStore, time.Now().Add(-2*time.Minute)) + block2 := addTestBlockForTime(t, ctx, blocksStore, time.Now().Add(-1*time.Minute)) -func testTransfersGetTransferToOrFromParty(t *testing.T) { - ctx := tempTransaction(t) + asset := CreateAsset(t, ctx, assetsStore, block1) + + account1 := CreateAccount(t, ctx, accountsStore, block1, + AccountForAsset(asset), + ) + account2 := CreateAccount(t, ctx, accountsStore, block1, + AccountWithType(vegapb.AccountType_ACCOUNT_TYPE_GLOBAL_REWARD), + AccountForAsset(asset), + ) - now := time.Now() - block := getTestBlock(t, ctx, now) - accounts := sqlstore.NewAccounts(connectionSource) - accountFrom, accountTo := getTestAccounts(t, ctx, accounts, block) - - transfers := sqlstore.NewTransfers(connectionSource) - - sourceTransferProto := &eventspb.Transfer{ - Id: "deadd0d0", - From: accountTo.PartyID.String(), - FromAccountType: accountTo.Type, - To: accountFrom.PartyID.String(), - ToAccountType: accountFrom.Type, - Asset: accountFrom.AssetID.String(), - Amount: "30", - Reference: "Ref1", - Status: eventspb.Transfer_STATUS_PENDING, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_Recurring{Recurring: &eventspb.RecurringTransfer{ + transfer1 := NewTransfer(t, ctx, accountsStore, block1, + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + TransferAsRecurring(&eventspb.RecurringTransfer{ StartEpoch: 10, EndEpoch: nil, Factor: "0.1", - DispatchStrategy: &vega.DispatchStrategy{ - AssetForMetric: "deadd0d0", - Markets: []string{"beefdead", "feebaad"}, - Metric: vega.DispatchMetric_DISPATCH_METRIC_MARKET_VALUE, - }, - }}, - } + }), + ) - transfer, err := entities.TransferFromProto(ctx, sourceTransferProto, generateTxHash(), block.VegaTime, accounts) - assert.NoError(t, err) - err = transfers.Upsert(ctx, transfer) - assert.NoError(t, err) - - sourceTransferProto2 := &eventspb.Transfer{ - Id: "deadd0d1", - From: accountFrom.PartyID.String(), - FromAccountType: accountFrom.Type, - To: accountTo.PartyID.String(), - ToAccountType: accountTo.Type, - Asset: accountFrom.AssetID.String(), - Amount: "30", - Reference: "Ref2", - Status: eventspb.Transfer_STATUS_DONE, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_Recurring{Recurring: &eventspb.RecurringTransfer{ + transfer2 := NewTransfer(t, ctx, accountsStore, block1, + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + TransferAsRecurring(&eventspb.RecurringTransfer{ StartEpoch: 10, EndEpoch: nil, Factor: "0.1", - }}, - } - - transfer, err = entities.TransferFromProto(ctx, sourceTransferProto2, generateTxHash(), block.VegaTime, accounts) - assert.NoError(t, err) - err = transfers.Upsert(ctx, transfer) - assert.NoError(t, err) - - retrieved, _, err := transfers.GetTransfersToOrFromParty(ctx, accountTo.PartyID, entities.CursorPagination{}) - if err != nil { - t.Fatalf("f%s", err) - } - assert.Equal(t, 2, len(retrieved)) - retrievedTransferProto, _ := retrieved[0].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto, retrievedTransferProto) - - retrievedTransferProto, _ = retrieved[1].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto2, retrievedTransferProto) + }), + ) + transfer2.TxHash = transfer1.TxHash + + transfer1UpdateFromSameTx := NewTransfer(t, ctx, accountsStore, block1, + TransferWithID(transfer1.ID), + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 15, + EndEpoch: nil, + Factor: "0.15", + }), + ) + transfer1UpdateFromSameTx.TxHash = transfer1.TxHash + + transfer1UpdateFromDifferentTx := NewTransfer(t, ctx, accountsStore, block2, + TransferWithID(transfer1.ID), + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 20, + EndEpoch: ptr.From(uint64(25)), + Factor: "0.2", + }), + ) + + // Ensure we have different transfers so the test is meaningful. + RequireAllDifferent(t, transfer1, transfer2, transfer1UpdateFromSameTx, transfer1UpdateFromDifferentTx) + + t.Run("Save transfers", func(t *testing.T) { + require.NoError(t, transfersStore.Upsert(ctx, transfer1)) + require.NoError(t, transfersStore.Upsert(ctx, transfer2)) + require.NoError(t, transfersStore.Upsert(ctx, transfer1UpdateFromSameTx)) + require.NoError(t, transfersStore.Upsert(ctx, transfer1UpdateFromDifferentTx)) + }) + + t.Run("Retrieve the transfer by hash returns all matching the hash", func(t *testing.T) { + retrieved, err := transfersStore.GetByTxHash(ctx, transfer1.TxHash) + require.NoError(t, err) + assert.ElementsMatch(t, + []entities.Transfer{*transfer2, *transfer1UpdateFromSameTx}, + retrieved, + ) + }) } -func testTransfersGetTransfersByParty(t *testing.T) { +func TestGetTransfersToOrFromParty(t *testing.T) { ctx := tempTransaction(t) - now := time.Now() - block := getTestBlock(t, ctx, now) - accounts := sqlstore.NewAccounts(connectionSource) - accountFrom, accountTo := getTestAccounts(t, ctx, accounts, block) - - transfers := sqlstore.NewTransfers(connectionSource) - - reason := "some terrible reason" - sourceTransferProto := &eventspb.Transfer{ - Id: "deadd0d0", - From: accountFrom.PartyID.String(), - FromAccountType: accountFrom.Type, - To: accountTo.PartyID.String(), - ToAccountType: accountTo.Type, - Asset: accountFrom.AssetID.String(), - Amount: "30", - Reference: "Ref1", - Status: eventspb.Transfer_STATUS_PENDING, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_Recurring{Recurring: &eventspb.RecurringTransfer{ - StartEpoch: 10, - EndEpoch: nil, + blocksStore := sqlstore.NewBlocks(connectionSource) + assetsStore := sqlstore.NewAssets(connectionSource) + accountsStore := sqlstore.NewAccounts(connectionSource) + transfersStore := sqlstore.NewTransfers(connectionSource) + + block := addTestBlockForTime(t, ctx, blocksStore, time.Now()) + + asset := CreateAsset(t, ctx, assetsStore, block) + + account1 := CreateAccount(t, ctx, accountsStore, block, + AccountForAsset(asset), + ) + account2 := CreateAccount(t, ctx, accountsStore, block, + AccountWithType(vegapb.AccountType_ACCOUNT_TYPE_GLOBAL_REWARD), + AccountForAsset(asset), + ) + account3 := CreateAccount(t, ctx, accountsStore, block, + AccountForAsset(asset), + ) + + transfer1 := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account2, account1), + TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 5, + EndEpoch: ptr.From(uint64(15)), Factor: "0.1", - DispatchStrategy: &vega.DispatchStrategy{ + DispatchStrategy: &vegapb.DispatchStrategy{ AssetForMetric: "deadd0d0", Markets: []string{"beefdead", "feebaad"}, - Metric: vega.DispatchMetric_DISPATCH_METRIC_MARKET_VALUE, + Metric: vegapb.DispatchMetric_DISPATCH_METRIC_MARKET_VALUE, }, - }}, - Reason: &reason, - } - - transfer, _ := entities.TransferFromProto(ctx, sourceTransferProto, generateTxHash(), block.VegaTime, accounts) - transfers.Upsert(ctx, transfer) - - sourceTransferProto2 := &eventspb.Transfer{ - Id: "deadd0d0", - From: accountFrom.PartyID.String(), - FromAccountType: accountFrom.Type, - To: accountTo.PartyID.String(), - ToAccountType: accountTo.Type, - Asset: accountFrom.AssetID.String(), - Amount: "30", - Reference: "Ref1", - Status: eventspb.Transfer_STATUS_DONE, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_Recurring{Recurring: &eventspb.RecurringTransfer{ + }), + ) + transfer2 := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + TransferAsRecurring(&eventspb.RecurringTransfer{ StartEpoch: 10, + EndEpoch: ptr.From(uint64(20)), + Factor: "0.1", + }), + ) + transfer3 := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account1, account3), + TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 25, EndEpoch: nil, Factor: "0.1", - }}, - } + }), + ) + transfer4 := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account3, account2), + TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 15, + EndEpoch: ptr.From(uint64(20)), + Factor: "0.1", + }), + ) - transfer, _ = entities.TransferFromProto(ctx, sourceTransferProto2, generateTxHash(), block.VegaTime, accounts) - transfers.Upsert(ctx, transfer) + t.Run("Retrieve all transfers from/to party", func(t *testing.T) { + retrieved, _, err := transfersStore.GetTransfersToOrFromParty(ctx, entities.DefaultCursorPagination(true), sqlstore.ListTransfersFilters{}, account2.PartyID) + require.NoError(t, err) + assert.ElementsMatch(t, + []entities.Transfer{*transfer1, *transfer2, *transfer4}, + TransferDetailsAsTransfers(t, retrieved), + ) + }) + + t.Run("Retrieve transfers from/to party with epoch range", func(t *testing.T) { + filters := sqlstore.ListTransfersFilters{ + FromEpoch: ptr.From(uint64(16)), + ToEpoch: ptr.From(uint64(20)), + } - retrieved, _, err := transfers.GetTransfersFromParty(ctx, accountFrom.PartyID, entities.CursorPagination{}) - if err != nil { - t.Fatalf("f%s", err) - } - assert.Equal(t, 1, len(retrieved)) - retrievedTransferProto, _ := retrieved[0].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto2, retrievedTransferProto) + retrievedFromAccount1, _, err := transfersStore.GetTransfersToOrFromParty(ctx, entities.DefaultCursorPagination(true), filters, account1.PartyID) + require.NoError(t, err) + assert.ElementsMatch(t, + []entities.Transfer{*transfer2}, + TransferDetailsAsTransfers(t, retrievedFromAccount1), + ) - retrieved, _, err = transfers.GetTransfersToParty(ctx, accountTo.PartyID, entities.CursorPagination{}) - if err != nil { - t.Fatalf("f%s", err) - } - assert.Equal(t, 1, len(retrieved)) - retrievedTransferProto, _ = retrieved[0].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto2, retrievedTransferProto) + retrievedFromAccount3, _, err := transfersStore.GetTransfersToOrFromParty(ctx, entities.DefaultCursorPagination(true), filters, account3.PartyID) + require.NoError(t, err) + assert.ElementsMatch(t, + []entities.Transfer{*transfer4}, + TransferDetailsAsTransfers(t, retrievedFromAccount3), + ) + }) + + t.Run("Retrieve transfers from/to party from epoch", func(t *testing.T) { + filters := sqlstore.ListTransfersFilters{ + FromEpoch: ptr.From(uint64(20)), + } + + retrievedFromAccount1, _, err := transfersStore.GetTransfersToOrFromParty(ctx, entities.DefaultCursorPagination(true), filters, account1.PartyID) + require.NoError(t, err) + assert.ElementsMatch(t, + []entities.Transfer{*transfer2, *transfer3}, + TransferDetailsAsTransfers(t, retrievedFromAccount1), + ) + + retrievedFromAccount3, _, err := transfersStore.GetTransfersToOrFromParty(ctx, entities.DefaultCursorPagination(true), filters, account3.PartyID) + require.NoError(t, err) + assert.ElementsMatch(t, + []entities.Transfer{*transfer3, *transfer4}, + TransferDetailsAsTransfers(t, retrievedFromAccount3), + ) + }) + + t.Run("Retrieve transfers from/to party to epoch", func(t *testing.T) { + filters := sqlstore.ListTransfersFilters{ + ToEpoch: ptr.From(uint64(10)), + } + + retrievedFromAccount1, _, err := transfersStore.GetTransfersToOrFromParty(ctx, entities.DefaultCursorPagination(true), filters, account1.PartyID) + require.NoError(t, err) + assert.ElementsMatch(t, + []entities.Transfer{*transfer1, *transfer2}, + TransferDetailsAsTransfers(t, retrievedFromAccount1), + ) + + retrievedFromAccount3, _, err := transfersStore.GetTransfersToOrFromParty(ctx, entities.DefaultCursorPagination(true), filters, account3.PartyID) + require.NoError(t, err) + assert.Empty(t, retrievedFromAccount3) + }) } -func testTransfersGetFromAccountAndGetToAccount(t *testing.T) { +func TestGetTransfersByParty(t *testing.T) { ctx := tempTransaction(t) - now := time.Now() - block := getTestBlock(t, ctx, now) - accounts := sqlstore.NewAccounts(connectionSource) - accountFrom, accountTo := getTestAccounts(t, ctx, accounts, block) - - transfers := sqlstore.NewTransfers(connectionSource) - - sourceTransferProto1 := &eventspb.Transfer{ - Id: "deadd0d0", - From: accountFrom.PartyID.String(), - FromAccountType: accountFrom.Type, - To: accountTo.PartyID.String(), - ToAccountType: accountTo.Type, - Asset: accountFrom.AssetID.String(), - Amount: "30", - Reference: "Ref1", - Status: eventspb.Transfer_STATUS_PENDING, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_Recurring{Recurring: &eventspb.RecurringTransfer{ + blocksStore := sqlstore.NewBlocks(connectionSource) + assetsStore := sqlstore.NewAssets(connectionSource) + accountsStore := sqlstore.NewAccounts(connectionSource) + transfersStore := sqlstore.NewTransfers(connectionSource) + + block := addTestBlockForTime(t, ctx, blocksStore, time.Now()) + + asset := CreateAsset(t, ctx, assetsStore, block) + + account1 := CreateAccount(t, ctx, accountsStore, block, + AccountForAsset(asset), + ) + account2 := CreateAccount(t, ctx, accountsStore, block, + AccountWithType(vegapb.AccountType_ACCOUNT_TYPE_GLOBAL_REWARD), + AccountForAsset(asset), + ) + + transfer1 := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 5, + EndEpoch: ptr.From(uint64(15)), + Factor: "0.1", + }), + ) + transfer2 := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account2, account1), + TransferAsRecurring(&eventspb.RecurringTransfer{ StartEpoch: 10, - EndEpoch: nil, + EndEpoch: ptr.From(uint64(17)), Factor: "0.1", - }}, - } + }), + ) + transfer3 := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account2, account1), + TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 15, + EndEpoch: ptr.From(uint64(20)), + Factor: "0.1", + }), + ) + transfer4 := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 15, + EndEpoch: ptr.From(uint64(20)), + Factor: "0.1", + }), + ) - transfer, _ := entities.TransferFromProto(ctx, sourceTransferProto1, generateTxHash(), block.VegaTime, accounts) - transfers.Upsert(ctx, transfer) - - sourceTransferProto2 := &eventspb.Transfer{ - Id: "deadd0d1", - From: accountTo.PartyID.String(), - FromAccountType: accountTo.Type, - To: accountFrom.PartyID.String(), - ToAccountType: accountFrom.Type, - Asset: accountTo.AssetID.String(), - Amount: "50", - Reference: "Ref2", - Status: eventspb.Transfer_STATUS_PENDING, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_Recurring{Recurring: &eventspb.RecurringTransfer{ - StartEpoch: 45, - EndEpoch: toPtr(uint64(56)), - Factor: "3.12", - }}, - } + t.Run("Retrieve transfers from party", func(t *testing.T) { + retrieved, _, err := transfersStore.GetTransfersFromParty(ctx, entities.DefaultCursorPagination(true), sqlstore.ListTransfersFilters{}, account1.PartyID) - transfer, _ = entities.TransferFromProto(ctx, sourceTransferProto2, generateTxHash(), block.VegaTime, accounts) - transfers.Upsert(ctx, transfer) + require.NoError(t, err) + assert.ElementsMatch(t, + []entities.Transfer{*transfer1, *transfer4}, + TransferDetailsAsTransfers(t, retrieved), + ) + }) + + t.Run("Retrieve transfers from party with epoch range", func(t *testing.T) { + filters := sqlstore.ListTransfersFilters{ + FromEpoch: ptr.From(uint64(5)), + ToEpoch: ptr.From(uint64(10)), + } - retrieved, _, _ := transfers.GetAll(ctx, entities.CursorPagination{}) - assert.Equal(t, 2, len(retrieved)) + retrieved, _, err := transfersStore.GetTransfersFromParty(ctx, entities.DefaultCursorPagination(true), filters, account1.PartyID) - retrieved, _, _ = transfers.GetTransfersFromAccount(ctx, accountFrom.ID, entities.CursorPagination{}) - assert.Equal(t, 1, len(retrieved)) - retrievedTransferProto, _ := retrieved[0].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto1, retrievedTransferProto) + require.NoError(t, err) + assert.ElementsMatch(t, + []entities.Transfer{*transfer1}, + TransferDetailsAsTransfers(t, retrieved), + ) + }) + + t.Run("Retrieve transfers from party from epoch", func(t *testing.T) { + filters := sqlstore.ListTransfersFilters{ + FromEpoch: ptr.From(uint64(17)), + } - retrieved, _, _ = transfers.GetTransfersToAccount(ctx, accountTo.ID, entities.CursorPagination{}) - assert.Equal(t, 1, len(retrieved)) - retrievedTransferProto, _ = retrieved[0].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto1, retrievedTransferProto) + retrieved, _, err := transfersStore.GetTransfersFromParty(ctx, entities.DefaultCursorPagination(true), filters, account1.PartyID) + require.NoError(t, err) - retrieved, _, _ = transfers.GetTransfersFromAccount(ctx, accountTo.ID, entities.CursorPagination{}) - assert.Equal(t, 1, len(retrieved)) - retrievedTransferProto, _ = retrieved[0].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto2, retrievedTransferProto) + assert.ElementsMatch(t, + []entities.Transfer{*transfer4}, + TransferDetailsAsTransfers(t, retrieved), + ) + }) - retrieved, _, _ = transfers.GetTransfersToAccount(ctx, accountFrom.ID, entities.CursorPagination{}) - assert.Equal(t, 1, len(retrieved)) - retrievedTransferProto, _ = retrieved[0].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto2, retrievedTransferProto) -} + t.Run("Retrieve transfers from party to epoch", func(t *testing.T) { + filters := sqlstore.ListTransfersFilters{ + ToEpoch: ptr.From(uint64(13)), + } -func testTransfersUpdatesInDifferentBlocks(t *testing.T) { - ctx := tempTransaction(t) + retrieved, _, err := transfersStore.GetTransfersFromParty(ctx, entities.DefaultCursorPagination(true), filters, account1.PartyID) + require.NoError(t, err) - now := time.Now() - block := getTestBlock(t, ctx, now) - accounts := sqlstore.NewAccounts(connectionSource) - accountFrom, accountTo := getTestAccounts(t, ctx, accounts, block) - - transfers := sqlstore.NewTransfers(connectionSource) - - deliverOn := block.VegaTime.Add(1 * time.Hour) - - sourceTransferProto := &eventspb.Transfer{ - Id: "deadd0d0", - From: accountFrom.PartyID.String(), - FromAccountType: accountFrom.Type, - To: accountTo.PartyID.String(), - ToAccountType: accountTo.Type, - Asset: accountFrom.AssetID.String(), - Amount: "30", - Reference: "Ref1", - Status: eventspb.Transfer_STATUS_PENDING, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_OneOff{OneOff: &eventspb.OneOffTransfer{DeliverOn: deliverOn.UnixNano()}}, - } + assert.ElementsMatch(t, + []entities.Transfer{*transfer1}, + TransferDetailsAsTransfers(t, retrieved), + ) + }) - transfer, _ := entities.TransferFromProto(ctx, sourceTransferProto, generateTxHash(), block.VegaTime, accounts) - transfers.Upsert(ctx, transfer) - - block = getTestBlock(t, ctx, block.VegaTime.Add(1*time.Microsecond)) - deliverOn = deliverOn.Add(1 * time.Minute) - sourceTransferProto = &eventspb.Transfer{ - Id: "deadd0d0", - From: accountFrom.PartyID.String(), - FromAccountType: accountFrom.Type, - To: accountTo.PartyID.String(), - ToAccountType: accountTo.Type, - Asset: accountFrom.AssetID.String(), - Amount: "40", - Reference: "Ref2", - Status: eventspb.Transfer_STATUS_DONE, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_OneOff{OneOff: &eventspb.OneOffTransfer{DeliverOn: deliverOn.UnixNano()}}, - } - transfer, _ = entities.TransferFromProto(ctx, sourceTransferProto, generateTxHash(), block.VegaTime, accounts) - transfers.Upsert(ctx, transfer) + t.Run("Retrieve transfers to party", func(t *testing.T) { + retrieved, _, err := transfersStore.GetTransfersToParty(ctx, entities.DefaultCursorPagination(true), sqlstore.ListTransfersFilters{}, account1.PartyID) - retrieved, _, _ := transfers.GetAll(ctx, entities.CursorPagination{}) - assert.Equal(t, 1, len(retrieved)) - retrievedTransferProto, _ := retrieved[0].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto, retrievedTransferProto) -} + require.NoError(t, err) + assert.ElementsMatch(t, + []entities.Transfer{*transfer2, *transfer3}, + TransferDetailsAsTransfers(t, retrieved), + ) + }) + + t.Run("Retrieve transfers to party with epoch range", func(t *testing.T) { + filters := sqlstore.ListTransfersFilters{ + FromEpoch: ptr.From(uint64(5)), + ToEpoch: ptr.From(uint64(10)), + } -func testTransfersUpdateInSameBlock(t *testing.T) { - ctx := tempTransaction(t) + retrieved, _, err := transfersStore.GetTransfersToParty(ctx, entities.DefaultCursorPagination(true), filters, account1.PartyID) - now := time.Now() - block := getTestBlock(t, ctx, now) - accounts := sqlstore.NewAccounts(connectionSource) - accountFrom, accountTo := getTestAccounts(t, ctx, accounts, block) - - transfers := sqlstore.NewTransfers(connectionSource) - - deliverOn := block.VegaTime.Add(1 * time.Hour) - - sourceTransferProto := &eventspb.Transfer{ - Id: "deadd0d0", - From: accountFrom.PartyID.String(), - FromAccountType: accountFrom.Type, - To: accountTo.PartyID.String(), - ToAccountType: accountTo.Type, - Asset: accountFrom.AssetID.String(), - Amount: "30", - Reference: "Ref1", - Status: eventspb.Transfer_STATUS_PENDING, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_OneOff{OneOff: &eventspb.OneOffTransfer{DeliverOn: deliverOn.UnixNano()}}, - } + require.NoError(t, err) + assert.ElementsMatch(t, + []entities.Transfer{*transfer2}, + TransferDetailsAsTransfers(t, retrieved), + ) + }) + + t.Run("Retrieve transfers to party from epoch", func(t *testing.T) { + filters := sqlstore.ListTransfersFilters{ + FromEpoch: ptr.From(uint64(18)), + } - transfer, _ := entities.TransferFromProto(ctx, sourceTransferProto, generateTxHash(), block.VegaTime, accounts) - transfers.Upsert(ctx, transfer) - - deliverOn = deliverOn.Add(1 * time.Minute) - sourceTransferProto = &eventspb.Transfer{ - Id: "deadd0d0", - From: accountFrom.PartyID.String(), - FromAccountType: accountFrom.Type, - To: accountTo.PartyID.String(), - ToAccountType: accountTo.Type, - Asset: accountFrom.AssetID.String(), - Amount: "40", - Reference: "Ref2", - Status: eventspb.Transfer_STATUS_DONE, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_OneOff{OneOff: &eventspb.OneOffTransfer{DeliverOn: deliverOn.UnixNano()}}, - } - transfer, _ = entities.TransferFromProto(ctx, sourceTransferProto, generateTxHash(), block.VegaTime, accounts) - transfers.Upsert(ctx, transfer) + retrieved, _, err := transfersStore.GetTransfersToParty(ctx, entities.DefaultCursorPagination(true), filters, account1.PartyID) + require.NoError(t, err) - retrieved, _, _ := transfers.GetAll(ctx, entities.CursorPagination{}) - assert.Equal(t, 1, len(retrieved)) - retrievedTransferProto, _ := retrieved[0].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto, retrievedTransferProto) -} + assert.ElementsMatch(t, + []entities.Transfer{*transfer3}, + TransferDetailsAsTransfers(t, retrieved), + ) + }) -func testTransfersAddAndRetrieveOneOffTransfer(t *testing.T) { - ctx := tempTransaction(t) + t.Run("Retrieve transfers to party to epoch", func(t *testing.T) { + filters := sqlstore.ListTransfersFilters{ + ToEpoch: ptr.From(uint64(13)), + } - now := time.Now() - block := getTestBlock(t, ctx, now) - accounts := sqlstore.NewAccounts(connectionSource) - accountFrom, accountTo := getTestAccounts(t, ctx, accounts, block) - - transfers := sqlstore.NewTransfers(connectionSource) - - deliverOn := block.VegaTime.Add(1 * time.Hour) - - sourceTransferProto := &eventspb.Transfer{ - Id: "deadd0d0", - From: accountFrom.PartyID.String(), - FromAccountType: accountFrom.Type, - To: accountTo.PartyID.String(), - ToAccountType: accountTo.Type, - Asset: accountFrom.AssetID.String(), - Amount: "30", - Reference: "Ref1", - Status: eventspb.Transfer_STATUS_PENDING, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_OneOff{OneOff: &eventspb.OneOffTransfer{DeliverOn: deliverOn.UnixNano()}}, - } + retrieved, _, err := transfersStore.GetTransfersToParty(ctx, entities.DefaultCursorPagination(true), filters, account1.PartyID) + require.NoError(t, err) - transfer, _ := entities.TransferFromProto(ctx, sourceTransferProto, generateTxHash(), block.VegaTime, accounts) - transfers.Upsert(ctx, transfer) - retrieved, _, _ := transfers.GetAll(ctx, entities.CursorPagination{}) - assert.Equal(t, 1, len(retrieved)) - retrievedTransferProto, _ := retrieved[0].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto, retrievedTransferProto) + assert.ElementsMatch(t, + []entities.Transfer{*transfer2}, + TransferDetailsAsTransfers(t, retrieved), + ) + }) } -func testTransfersAddAndRetrieveRecurringTransfer(t *testing.T) { +func TestGetAllTransfers(t *testing.T) { ctx := tempTransaction(t) - now := time.Now() - block := getTestBlock(t, ctx, now) - accounts := sqlstore.NewAccounts(connectionSource) - accountFrom, accountTo := getTestAccounts(t, ctx, accounts, block) - - transfers := sqlstore.NewTransfers(connectionSource) - - sourceTransferProto := &eventspb.Transfer{ - Id: "deadd0d0", - From: accountFrom.PartyID.String(), - FromAccountType: accountFrom.Type, - To: accountTo.PartyID.String(), - ToAccountType: accountTo.Type, - Asset: accountFrom.AssetID.String(), - Amount: "30", - Reference: "Ref1", - Status: eventspb.Transfer_STATUS_PENDING, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_Recurring{Recurring: &eventspb.RecurringTransfer{ + blocksStore := sqlstore.NewBlocks(connectionSource) + assetsStore := sqlstore.NewAssets(connectionSource) + accountsStore := sqlstore.NewAccounts(connectionSource) + transfersStore := sqlstore.NewTransfers(connectionSource) + + block := addTestBlockForTime(t, ctx, blocksStore, time.Now()) + + asset := CreateAsset(t, ctx, assetsStore, block) + + account1 := CreateAccount(t, ctx, accountsStore, block, + AccountForAsset(asset), + ) + account2 := CreateAccount(t, ctx, accountsStore, block, + AccountWithType(vegapb.AccountType_ACCOUNT_TYPE_GLOBAL_REWARD), + AccountForAsset(asset), + ) + account3 := CreateAccount(t, ctx, accountsStore, block, + AccountForAsset(asset), + ) + + transfer1 := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account2, account1), + TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 5, + EndEpoch: ptr.From(uint64(15)), + Factor: "0.1", + DispatchStrategy: &vegapb.DispatchStrategy{ + AssetForMetric: "deadd0d0", + Metric: vegapb.DispatchMetric_DISPATCH_METRIC_MARKET_VALUE, + Markets: []string{"beefdead", "feebaad"}, + IndividualScope: vegapb.IndividualScope_INDIVIDUAL_SCOPE_IN_TEAM, + }, + }), + ) + transfer2 := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + TransferWithStatus(entities.TransferStatusDone), + TransferAsRecurring(&eventspb.RecurringTransfer{ StartEpoch: 10, + EndEpoch: ptr.From(uint64(20)), + Factor: "0.1", + }), + ) + transfer3 := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account1, account3), + TransferWithStatus(entities.TransferStatusCancelled), + TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 25, EndEpoch: nil, Factor: "0.1", - DispatchStrategy: &vega.DispatchStrategy{ - AssetForMetric: "asset", - Metric: vega.DispatchMetric_DISPATCH_METRIC_AVERAGE_POSITION, - Markets: []string{"m1", "m2"}, - EntityScope: vega.EntityScope_ENTITY_SCOPE_INDIVIDUALS, - IndividualScope: vega.IndividualScope_INDIVIDUAL_SCOPE_ALL, - StakingRequirement: "1000", - NotionalTimeWeightedAveragePositionRequirement: "2000", - WindowLength: 2, - LockPeriod: 3, - DistributionStrategy: vega.DistributionStrategy_DISTRIBUTION_STRATEGY_PRO_RATA, + DispatchStrategy: &vegapb.DispatchStrategy{ + TeamScope: []string{ + "beefdeadfeebaad", + }, }, - }}, - } + }), + ) - transfer, _ := entities.TransferFromProto(ctx, sourceTransferProto, generateTxHash(), block.VegaTime, accounts) - transfers.Upsert(ctx, transfer) + t.Run("Retrieve all transfers", func(t *testing.T) { + retrieved, _, err := transfersStore.GetAll(ctx, entities.DefaultCursorPagination(true), sqlstore.ListTransfersFilters{}) + require.NoError(t, err) + assert.ElementsMatch(t, + []entities.Transfer{*transfer1, *transfer2, *transfer3}, + TransferDetailsAsTransfers(t, retrieved), + ) + }) + + t.Run("Retrieve transfers with epoch range", func(t *testing.T) { + filters := sqlstore.ListTransfersFilters{ + FromEpoch: ptr.From(uint64(16)), + ToEpoch: ptr.From(uint64(28)), + } - retrieved, _, _ := transfers.GetAll(ctx, entities.CursorPagination{}) - assert.Equal(t, 1, len(retrieved)) - retrievedTransferProto, _ := retrieved[0].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto, retrievedTransferProto) -} + retrieved, _, err := transfersStore.GetAll(ctx, entities.DefaultCursorPagination(true), filters) + require.NoError(t, err) -func testGetByTxHash(t *testing.T) { - ctx := tempTransaction(t) + assert.ElementsMatch(t, + []entities.Transfer{*transfer2, *transfer3}, + TransferDetailsAsTransfers(t, retrieved), + ) + }) - now := time.Now() - block := getTestBlock(t, ctx, now) - accounts := sqlstore.NewAccounts(connectionSource) - accountFrom, accountTo := getTestAccounts(t, ctx, accounts, block) - - transfers := sqlstore.NewTransfers(connectionSource) - - sourceTransferProto := &eventspb.Transfer{ - Id: "deadd1d1", - From: accountFrom.PartyID.String(), - FromAccountType: accountFrom.Type, - To: accountTo.PartyID.String(), - ToAccountType: accountTo.Type, - Asset: accountFrom.AssetID.String(), - Amount: "25", - Reference: "Ref1", - Status: eventspb.Transfer_STATUS_PENDING, - Timestamp: block.VegaTime.UnixNano(), - Kind: &eventspb.Transfer_Recurring{Recurring: &eventspb.RecurringTransfer{ - StartEpoch: 10, - EndEpoch: nil, - Factor: "0.1", - }}, - } + t.Run("Retrieve all transfers from epoch", func(t *testing.T) { + filters := sqlstore.ListTransfersFilters{ + FromEpoch: ptr.From(uint64(20)), + } - txHash := txHashFromString("transfer_hash") + retrieved, _, err := transfersStore.GetAll(ctx, entities.DefaultCursorPagination(true), filters) + require.NoError(t, err) - transfer, _ := entities.TransferFromProto(ctx, sourceTransferProto, txHash, block.VegaTime, accounts) - transfers.Upsert(ctx, transfer) + assert.ElementsMatch(t, + []entities.Transfer{*transfer2, *transfer3}, + TransferDetailsAsTransfers(t, retrieved), + ) + }) - retrieved, err := transfers.GetByTxHash(ctx, txHash) - assert.NoError(t, err) - assert.Equal(t, 1, len(retrieved)) - retrievedTransferProto, _ := retrieved[0].ToProto(ctx, accounts) - assert.Equal(t, sourceTransferProto, retrievedTransferProto) -} + t.Run("Retrieve transfers to epoch", func(t *testing.T) { + filters := sqlstore.ListTransfersFilters{ + ToEpoch: ptr.From(uint64(10)), + } -func getTestBlock(t *testing.T, ctx context.Context, testTime time.Time) entities.Block { - t.Helper() - blocks := sqlstore.NewBlocks(connectionSource) - vegaTime := time.UnixMicro(testTime.UnixMicro()) - block := addTestBlockForTime(t, ctx, blocks, vegaTime) - return block -} + retrieved, _, err := transfersStore.GetAll(ctx, entities.DefaultCursorPagination(true), filters) + require.NoError(t, err) -func getTestAccounts(t *testing.T, ctx context.Context, accounts *sqlstore.Accounts, block entities.Block) (accountFrom entities.Account, - accountTo entities.Account, -) { - t.Helper() - assets := sqlstore.NewAssets(connectionSource) - - testAssetID := entities.AssetID(helpers.GenerateID()) - testAsset := entities.Asset{ - ID: testAssetID, - Name: "testAssetName", - Symbol: "tan", - Decimals: 1, - Quantum: decimal.NewFromInt(1), - Source: "TS", - ERC20Contract: "ET", - VegaTime: block.VegaTime, - } + assert.ElementsMatch(t, + []entities.Transfer{*transfer1, *transfer2}, + TransferDetailsAsTransfers(t, retrieved), + ) + }) + + t.Run("Retrieve transfers by status", func(t *testing.T) { + matrix := map[entities.TransferStatus][]entities.Transfer{ + entities.TransferStatusPending: {*transfer1}, + entities.TransferStatusCancelled: {*transfer3}, + entities.TransferStatusRejected: {}, + } - err := assets.Add(ctx, testAsset) - if err != nil { - t.Fatalf("failed to add test asset:%s", err) - } + for status, expected := range matrix { + filters := sqlstore.ListTransfersFilters{ + Status: ptr.From(status), + } - accountFrom = entities.Account{ - PartyID: entities.PartyID(helpers.GenerateID()), - AssetID: testAssetID, - Type: vega.AccountType_ACCOUNT_TYPE_GLOBAL_REWARD, - VegaTime: block.VegaTime, - } - err = accounts.Obtain(ctx, &accountFrom) - if err != nil { - t.Fatalf("failed to obtain from account:%s", err) - } + retrieved, _, err := transfersStore.GetAll(ctx, entities.DefaultCursorPagination(true), filters) + require.NoError(t, err) + assert.Equal(t, expected, TransferDetailsAsTransfers(t, retrieved)) + } + }) - accountTo = entities.Account{ - PartyID: entities.PartyID(helpers.GenerateID()), - AssetID: testAssetID, + t.Run("Retrieve transfers by scope", func(t *testing.T) { + matrix := map[entities.TransferScope][]entities.Transfer{ + entities.TransferScopeIndividual: {*transfer1}, + entities.TransferScopeTeam: {*transfer3}, + } - Type: vega.AccountType_ACCOUNT_TYPE_GENERAL, - VegaTime: block.VegaTime, - } - err = accounts.Obtain(ctx, &accountTo) - if err != nil { - t.Fatalf("failed to obtain to account:%s", err) - } + for scope, expected := range matrix { + filters := sqlstore.ListTransfersFilters{ + Scope: ptr.From(scope), + } - return accountFrom, accountTo + retrieved, _, err := transfersStore.GetAll(ctx, entities.DefaultCursorPagination(true), filters) + require.NoError(t, err) + assert.Equal(t, expected, TransferDetailsAsTransfers(t, retrieved)) + } + }) } -func testTransferPaginationNoPagination(t *testing.T) { +func TestGetAllTransfersWithPagination(t *testing.T) { ctx := tempTransaction(t) - bs := sqlstore.NewBlocks(connectionSource) - transfers := sqlstore.NewTransfers(connectionSource) - - testTransfers := addTransfers(ctx, t, bs, transfers) - - pagination, err := entities.NewCursorPagination(nil, nil, nil, nil, false) - require.NoError(t, err) - got, pageInfo, err := transfers.GetAll(ctx, pagination) - - require.NoError(t, err) - assert.Equal(t, testTransfers, got) - assert.False(t, pageInfo.HasPreviousPage) - assert.False(t, pageInfo.HasNextPage) - assert.Equal(t, entities.NewCursor(entities.TransferCursor{ - VegaTime: testTransfers[0].VegaTime, - ID: testTransfers[0].ID, - }.String()).Encode(), pageInfo.StartCursor) - assert.Equal(t, entities.NewCursor(entities.TransferCursor{ - VegaTime: testTransfers[9].VegaTime, - ID: testTransfers[9].ID, - }.String()).Encode(), pageInfo.EndCursor) -} + blocksStore := sqlstore.NewBlocks(connectionSource) + assetsStore := sqlstore.NewAssets(connectionSource) + accountsStore := sqlstore.NewAccounts(connectionSource) + transfersStore := sqlstore.NewTransfers(connectionSource) -func testTransferPaginationFirst(t *testing.T) { - ctx := tempTransaction(t) + block := addTestBlockForTime(t, ctx, blocksStore, time.Now()) - bs := sqlstore.NewBlocks(connectionSource) - transfers := sqlstore.NewTransfers(connectionSource) - - testTransfers := addTransfers(ctx, t, bs, transfers) - - first := int32(3) - pagination, err := entities.NewCursorPagination(&first, nil, nil, nil, false) - require.NoError(t, err) - got, pageInfo, err := transfers.GetAll(ctx, pagination) - - require.NoError(t, err) - want := testTransfers[:3] - assert.Equal(t, want, got) - assert.False(t, pageInfo.HasPreviousPage) - assert.True(t, pageInfo.HasNextPage) - assert.Equal(t, entities.NewCursor(entities.TransferCursor{ - VegaTime: testTransfers[0].VegaTime, - ID: testTransfers[0].ID, - }.String()).Encode(), pageInfo.StartCursor) - assert.Equal(t, entities.NewCursor(entities.TransferCursor{ - VegaTime: testTransfers[2].VegaTime, - ID: testTransfers[2].ID, - }.String()).Encode(), pageInfo.EndCursor) -} + asset := CreateAsset(t, ctx, assetsStore, block) -func testTransferPaginationLast(t *testing.T) { - ctx := tempTransaction(t) + account1 := CreateAccount(t, ctx, accountsStore, block, + AccountForAsset(asset), + ) + account2 := CreateAccount(t, ctx, accountsStore, block, + AccountWithType(vegapb.AccountType_ACCOUNT_TYPE_GLOBAL_REWARD), + AccountForAsset(asset), + ) - bs := sqlstore.NewBlocks(connectionSource) - transfers := sqlstore.NewTransfers(connectionSource) - testTransfers := addTransfers(ctx, t, bs, transfers) - - last := int32(3) - pagination, err := entities.NewCursorPagination(nil, nil, &last, nil, false) - require.NoError(t, err) - got, pageInfo, err := transfers.GetAll(ctx, pagination) - - require.NoError(t, err) - want := testTransfers[7:] - assert.Equal(t, want, got) - assert.True(t, pageInfo.HasPreviousPage) - assert.False(t, pageInfo.HasNextPage) - assert.Equal(t, entities.NewCursor(entities.TransferCursor{ - VegaTime: testTransfers[7].VegaTime, - ID: testTransfers[7].ID, - }.String()).Encode(), pageInfo.StartCursor) - assert.Equal(t, entities.NewCursor(entities.TransferCursor{ - VegaTime: testTransfers[9].VegaTime, - ID: testTransfers[9].ID, - }.String()).Encode(), pageInfo.EndCursor) -} + transfers := make([]entities.Transfer, 0, 10) + for i := 0; i < 10; i++ { + block := addTestBlockForTime(t, ctx, blocksStore, time.Now().Add(time.Duration(i)*time.Second)) + transfer := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 5, + EndEpoch: ptr.From(uint64(15)), + Factor: "0.1", + }), + ) + transfers = append(transfers, *transfer) + } -func testTransferPaginationFirstAfter(t *testing.T) { - ctx := tempTransaction(t) + noFilters := sqlstore.ListTransfersFilters{} - bs := sqlstore.NewBlocks(connectionSource) - transfers := sqlstore.NewTransfers(connectionSource) - testTransfers := addTransfers(ctx, t, bs, transfers) - - first := int32(3) - after := testTransfers[2].Cursor().Encode() - pagination, err := entities.NewCursorPagination(&first, &after, nil, nil, false) - require.NoError(t, err) - got, pageInfo, err := transfers.GetAll(ctx, pagination) - - require.NoError(t, err) - want := testTransfers[3:6] - assert.Equal(t, want, got) - assert.True(t, pageInfo.HasPreviousPage) - assert.True(t, pageInfo.HasNextPage) - assert.Equal(t, entities.NewCursor(entities.TransferCursor{ - VegaTime: testTransfers[3].VegaTime, - ID: testTransfers[3].ID, - }.String()).Encode(), pageInfo.StartCursor) - assert.Equal(t, entities.NewCursor(entities.TransferCursor{ - VegaTime: testTransfers[5].VegaTime, - ID: testTransfers[5].ID, - }.String()).Encode(), pageInfo.EndCursor) -} + t.Run("Paginate with oldest first", func(t *testing.T) { + pagination, err := entities.NewCursorPagination(nil, nil, nil, nil, false) + require.NoError(t, err) -func testTransferPaginationLastBefore(t *testing.T) { - ctx := tempTransaction(t) + retrieved, pageInfo, err := transfersStore.GetAll(ctx, pagination, noFilters) + require.NoError(t, err) + assert.Equal(t, transfers, TransferDetailsAsTransfers(t, retrieved)) + assert.Equal(t, entities.PageInfo{ + HasNextPage: false, + HasPreviousPage: false, + StartCursor: transfers[0].Cursor().Encode(), + EndCursor: transfers[9].Cursor().Encode(), + }, pageInfo) + }) + + t.Run("Paginate first 3 transfers", func(t *testing.T) { + first := int32(3) + pagination, err := entities.NewCursorPagination(&first, nil, nil, nil, false) + require.NoError(t, err) - bs := sqlstore.NewBlocks(connectionSource) - transfers := sqlstore.NewTransfers(connectionSource) - testTransfers := addTransfers(ctx, t, bs, transfers) - - last := int32(3) - before := entities.NewCursor(entities.TransferCursor{ - VegaTime: testTransfers[7].VegaTime, - ID: testTransfers[7].ID, - }.String()).Encode() - pagination, err := entities.NewCursorPagination(nil, nil, &last, &before, false) - require.NoError(t, err) - got, pageInfo, err := transfers.GetAll(ctx, pagination) - - require.NoError(t, err) - want := testTransfers[4:7] - assert.Equal(t, want, got) - assert.True(t, pageInfo.HasPreviousPage) - assert.True(t, pageInfo.HasNextPage) - assert.Equal(t, entities.NewCursor(entities.TransferCursor{ - VegaTime: testTransfers[4].VegaTime, - ID: testTransfers[4].ID, - }.String()).Encode(), pageInfo.StartCursor) - assert.Equal(t, entities.NewCursor(entities.TransferCursor{ - VegaTime: testTransfers[6].VegaTime, - ID: testTransfers[6].ID, - }.String()).Encode(), pageInfo.EndCursor) + retrieved, pageInfo, err := transfersStore.GetAll(ctx, pagination, noFilters) + require.NoError(t, err) + assert.Equal(t, transfers[:3], TransferDetailsAsTransfers(t, retrieved)) + assert.Equal(t, entities.PageInfo{ + HasNextPage: true, + HasPreviousPage: false, + StartCursor: transfers[0].Cursor().Encode(), + EndCursor: transfers[2].Cursor().Encode(), + }, pageInfo) + }) + + t.Run("Paginate last 3 transfers", func(t *testing.T) { + last := int32(3) + pagination, err := entities.NewCursorPagination(nil, nil, &last, nil, false) + require.NoError(t, err) + + retrieved, pageInfo, err := transfersStore.GetAll(ctx, pagination, noFilters) + require.NoError(t, err) + assert.Equal(t, transfers[7:], TransferDetailsAsTransfers(t, retrieved)) + assert.Equal(t, entities.PageInfo{ + HasNextPage: false, + HasPreviousPage: true, + StartCursor: transfers[7].Cursor().Encode(), + EndCursor: transfers[9].Cursor().Encode(), + }, pageInfo) + }) + + t.Run("Paginate first 3 transfers after third one", func(t *testing.T) { + first := int32(3) + after := transfers[2].Cursor().Encode() + pagination, err := entities.NewCursorPagination(&first, &after, nil, nil, false) + require.NoError(t, err) + + retrieved, pageInfo, err := transfersStore.GetAll(ctx, pagination, noFilters) + require.NoError(t, err) + assert.Equal(t, transfers[3:6], TransferDetailsAsTransfers(t, retrieved)) + assert.Equal(t, entities.PageInfo{ + HasNextPage: true, + HasPreviousPage: true, + StartCursor: transfers[3].Cursor().Encode(), + EndCursor: transfers[5].Cursor().Encode(), + }, pageInfo) + }) + + t.Run("Paginate last 3 transfers before seventh one", func(t *testing.T) { + last := int32(3) + before := transfers[7].Cursor().Encode() + pagination, err := entities.NewCursorPagination(nil, nil, &last, &before, false) + require.NoError(t, err) + + retrieved, pageInfo, err := transfersStore.GetAll(ctx, pagination, noFilters) + require.NoError(t, err) + assert.Equal(t, transfers[4:7], TransferDetailsAsTransfers(t, retrieved)) + assert.Equal(t, entities.PageInfo{ + HasNextPage: true, + HasPreviousPage: true, + StartCursor: transfers[4].Cursor().Encode(), + EndCursor: transfers[6].Cursor().Encode(), + }, pageInfo) + }) } -func testGetAllRewardTransfers(t *testing.T) { +func TestGetAllRewardTransfers(t *testing.T) { ctx := tempTransaction(t) - bs := sqlstore.NewBlocks(connectionSource) - transfers := sqlstore.NewTransfers(connectionSource) - testTransfers := addTransfers(ctx, t, bs, transfers) - rewardTransfers := addRewardTransfers(ctx, t, bs, transfers) - // all, including reward transfers - got, _, err := transfers.GetAll(ctx, entities.DefaultCursorPagination(true)) - require.NoError(t, err) - require.Equal(t, len(testTransfers)+len(rewardTransfers), len(got)) - // now only get reward transfers - got, _, err = transfers.GetAllRewards(ctx, entities.DefaultCursorPagination(true)) - require.NoError(t, err) - require.Equal(t, len(rewardTransfers), len(got)) -} + blocksStore := sqlstore.NewBlocks(connectionSource) + assetsStore := sqlstore.NewAssets(connectionSource) + accountsStore := sqlstore.NewAccounts(connectionSource) + transfersStore := sqlstore.NewTransfers(connectionSource) -func addTransfers(ctx context.Context, t *testing.T, bs *sqlstore.Blocks, transferStore *sqlstore.Transfers) []entities.TransferDetails { - t.Helper() vegaTime := time.Now().Truncate(time.Microsecond) - block := addTestBlockForTime(t, ctx, bs, vegaTime) - accounts := sqlstore.NewAccounts(connectionSource) - accountFrom, accountTo := getTestAccounts(t, ctx, accounts, block) - transfers := make([]entities.TransferDetails, 0, 10) + block := addTestBlockForTime(t, ctx, blocksStore, vegaTime) + + asset := CreateAsset(t, ctx, assetsStore, block) + + account1 := CreateAccount(t, ctx, accountsStore, block, + AccountForAsset(asset), + ) + account2 := CreateAccount(t, ctx, accountsStore, block, + AccountWithType(vegapb.AccountType_ACCOUNT_TYPE_GLOBAL_REWARD), + AccountForAsset(asset), + ) + + allTransfers := make([]entities.Transfer, 0, 20) + for i := 0; i < 10; i++ { + vegaTime = vegaTime.Add(time.Second) + block := addTestBlockForTime(t, ctx, blocksStore, vegaTime) + + transfer := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + TransferAsOneOff(eventspb.OneOffTransfer{ + DeliverOn: vegaTime.UnixNano(), + }), + ) + allTransfers = append(allTransfers, *transfer) + } + + rewardTransfers := make([]entities.Transfer, 0, 10) for i := 0; i < 10; i++ { vegaTime = vegaTime.Add(time.Second) - addTestBlockForTime(t, ctx, bs, vegaTime) - - amount, _ := decimal.NewFromString("10") - transfer := entities.Transfer{ - ID: entities.TransferID(fmt.Sprintf("deadbeef%02d", i+1)), - VegaTime: vegaTime, - FromAccountID: accountFrom.ID, - ToAccountID: accountTo.ID, - AssetID: entities.AssetID(""), - Amount: amount, - Reference: "", - Status: 0, - TransferType: 0, - DeliverOn: nil, - StartEpoch: nil, - EndEpoch: nil, - Factor: nil, - DispatchStrategy: nil, + block := addTestBlockForTime(t, ctx, blocksStore, vegaTime) + + var kindOption TransferOption + var statusOption TransferOption + if i%2 == 0 { + kindOption = TransferAsRecurringGovernance(eventspb.RecurringGovernanceTransfer{ + StartEpoch: 15, + EndEpoch: nil, + DispatchStrategy: &vegapb.DispatchStrategy{ + Metric: vegapb.DispatchMetric_DISPATCH_METRIC_RELATIVE_RETURN, + LockPeriod: uint64((i % 7) + 1), + IndividualScope: vegapb.IndividualScope_INDIVIDUAL_SCOPE_ALL, + }, + }) + statusOption = TransferWithStatus(entities.TransferStatusDone) + } else { + kindOption = TransferAsRecurring(&eventspb.RecurringTransfer{ + StartEpoch: 15, + EndEpoch: nil, + Factor: "0.15", + DispatchStrategy: &vegapb.DispatchStrategy{ + Metric: vegapb.DispatchMetric_DISPATCH_METRIC_VALIDATOR_RANKING, + LockPeriod: uint64((i % 7) + 1), + TeamScope: []string{"deadfbeefc0ffeed00d"}, + }, + }) + + statusOption = TransferWithStatus(entities.TransferStatusPending) } - err := transferStore.Upsert(ctx, &transfer) - require.NoError(t, err) - transfers = append(transfers, entities.TransferDetails{Transfer: transfer}) + transfer := CreateTransfer(t, ctx, transfersStore, accountsStore, block, + TransferWithAsset(asset), + TransferFromToAccounts(account1, account2), + kindOption, + statusOption, + ) + rewardTransfers = append(rewardTransfers, *transfer) + allTransfers = append(allTransfers, *transfer) } - return transfers -} + noFilters := sqlstore.ListTransfersFilters{} -func addRewardTransfers(ctx context.Context, t *testing.T, bs *sqlstore.Blocks, transferStore *sqlstore.Transfers) []entities.TransferDetails { - t.Helper() - vegaTime := time.Now().Truncate(time.Microsecond) - block := addTestBlockForTime(t, ctx, bs, vegaTime) - accounts := sqlstore.NewAccounts(connectionSource) - accountFrom, accountTo := getTestAccounts(t, ctx, accounts, block) + t.Run("Get all transfers", func(t *testing.T) { + retrieved, _, err := transfersStore.GetAll(ctx, entities.DefaultCursorPagination(false), noFilters) + require.NoError(t, err) + assert.Equal(t, allTransfers, TransferDetailsAsTransfers(t, retrieved)) + }) - transfers := make([]entities.TransferDetails, 0, 10) - for i := 0; i < 10; i++ { - vegaTime = vegaTime.Add(time.Second) - addTestBlockForTime(t, ctx, bs, vegaTime) - - amount, _ := decimal.NewFromString("10") - transfer := entities.Transfer{ - ID: entities.TransferID(fmt.Sprintf("abadcafe%02d", i+1)), - VegaTime: vegaTime, - FromAccountID: accountFrom.ID, - ToAccountID: accountTo.ID, - AssetID: entities.AssetID(""), - Amount: amount, - Reference: "", - Status: entities.TransferStatusPending, - TransferType: entities.Recurring, - DeliverOn: nil, - StartEpoch: ptr.From(uint64(i + 1)), - EndEpoch: nil, - Factor: nil, - DispatchStrategy: &vega.DispatchStrategy{ - Metric: vega.DispatchMetric_DISPATCH_METRIC_VALIDATOR_RANKING, - LockPeriod: uint64((i % 7) + 1), - }, - } - if (i % 2) == 0 { - transfer.TransferType = entities.GovernanceRecurring + t.Run("Get only reward transfers", func(t *testing.T) { + retrieved, _, err := transfersStore.GetAllRewards(ctx, entities.DefaultCursorPagination(false), noFilters) + require.NoError(t, err) + assert.Equal(t, rewardTransfers, TransferDetailsAsTransfers(t, retrieved)) + }) + + t.Run("Retrieve transfers by status pending", func(t *testing.T) { + filters := sqlstore.ListTransfersFilters{ + Status: ptr.From(entities.TransferStatusDone), } - err := transferStore.Upsert(ctx, &transfer) + retrieved, _, err := transfersStore.GetAllRewards(ctx, entities.DefaultCursorPagination(false), filters) require.NoError(t, err) - transfers = append(transfers, entities.TransferDetails{Transfer: transfer}) - } + assert.Equal(t, + []entities.Transfer{rewardTransfers[0], rewardTransfers[2], rewardTransfers[4], rewardTransfers[6], rewardTransfers[8]}, + TransferDetailsAsTransfers(t, retrieved)) + }) + + t.Run("Retrieve transfers by scope", func(t *testing.T) { + matrix := map[entities.TransferScope][]entities.Transfer{ + entities.TransferScopeIndividual: {rewardTransfers[0], rewardTransfers[2], rewardTransfers[4], rewardTransfers[6], rewardTransfers[8]}, + entities.TransferScopeTeam: {rewardTransfers[1], rewardTransfers[3], rewardTransfers[5], rewardTransfers[7], rewardTransfers[9]}, + } - return transfers -} + for scope, expected := range matrix { + filters := sqlstore.ListTransfersFilters{ + Scope: ptr.From(scope), + } -func toPtr[T any](t T) *T { - return &t + retrieved, _, err := transfersStore.GetAllRewards(ctx, entities.DefaultCursorPagination(false), filters) + require.NoError(t, err) + assert.Equal(t, expected, TransferDetailsAsTransfers(t, retrieved)) + } + }) } diff --git a/datanode/sqlstore/utils.go b/datanode/sqlstore/utils.go index e51c222c5a..f0cddbc093 100644 --- a/datanode/sqlstore/utils.go +++ b/datanode/sqlstore/utils.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -34,6 +22,7 @@ import ( "strings" "code.vegaprotocol.io/vega/datanode/entities" + "github.com/georgysavva/scany/dbscan" ) @@ -41,9 +30,9 @@ import ( // to the 'args' slice and returns a string '$N' referring to the index // of the value in args. For example: // -// var args []interface{} -// query = "select * from foo where id=" + nextBindVar(&args, 100) -// db.Query(query, args...) +// var args []interface{} +// query = "select * from foo where id=" + nextBindVar(&args, 100) +// db.Query(query, args...) func nextBindVar(args *[]interface{}, value interface{}) string { *args = append(*args, value) return "$" + strconv.Itoa(len(*args)) diff --git a/datanode/sqlstore/vesting_stats.go b/datanode/sqlstore/vesting_stats.go index 1091d9f6e3..94897ec4cb 100644 --- a/datanode/sqlstore/vesting_stats.go +++ b/datanode/sqlstore/vesting_stats.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/vesting_stats_test.go b/datanode/sqlstore/vesting_stats_test.go index a0082c33ca..b57c359e9b 100644 --- a/datanode/sqlstore/vesting_stats_test.go +++ b/datanode/sqlstore/vesting_stats_test.go @@ -1,13 +1,28 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + package sqlstore_test import ( - "context" "testing" "time" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -28,10 +43,12 @@ func TestVestingStats(t *testing.T) { party2 = "a696300fec90755c90e2489af68fe2dfede5744184711ea3acde0ca55ae19585" ) + ctx := tempTransaction(t) + t.Run("return error if do not exists", func(t *testing.T) { - _, err := vs.GetByPartyID(context.Background(), party1) + _, err := vs.GetByPartyID(ctx, party1) require.EqualError(t, err, "no resource corresponding to this id") - _, err = vs.GetByPartyID(context.Background(), party2) + _, err = vs.GetByPartyID(ctx, party2) require.EqualError(t, err, "no resource corresponding to this id") }) @@ -59,12 +76,12 @@ func TestVestingStats(t *testing.T) { }, } - assert.NoError(t, vs.Add(context.Background(), &w)) + assert.NoError(t, vs.Add(ctx, &w)) - pvs1, err := vs.GetByPartyID(context.Background(), party1) + pvs1, err := vs.GetByPartyID(ctx, party1) require.NoError(t, err) require.Equal(t, *w.PartyVestingStats[0], pvs1) - pvs2, err := vs.GetByPartyID(context.Background(), party2) + pvs2, err := vs.GetByPartyID(ctx, party2) require.NoError(t, err) require.Equal(t, *w.PartyVestingStats[1], pvs2) }) @@ -93,12 +110,12 @@ func TestVestingStats(t *testing.T) { }, } - assert.NoError(t, vs.Add(context.Background(), &w)) + assert.NoError(t, vs.Add(ctx, &w)) - pvs1, err := vs.GetByPartyID(context.Background(), party1) + pvs1, err := vs.GetByPartyID(ctx, party1) require.NoError(t, err) require.Equal(t, *w.PartyVestingStats[0], pvs1) - pvs2, err := vs.GetByPartyID(context.Background(), party2) + pvs2, err := vs.GetByPartyID(ctx, party2) require.NoError(t, err) require.Equal(t, *w.PartyVestingStats[1], pvs2) }) diff --git a/datanode/sqlstore/volume_discount_program.go b/datanode/sqlstore/volume_discount_program.go index 31a498f3f7..b2db663768 100644 --- a/datanode/sqlstore/volume_discount_program.go +++ b/datanode/sqlstore/volume_discount_program.go @@ -19,10 +19,10 @@ import ( "context" "time" - "github.com/georgysavva/scany/pgxscan" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + + "github.com/georgysavva/scany/pgxscan" ) type VolumeDiscountPrograms struct { diff --git a/datanode/sqlstore/volume_discount_programs_test.go b/datanode/sqlstore/volume_discount_programs_test.go index 1d3f11318e..8fb3d6403b 100644 --- a/datanode/sqlstore/volume_discount_programs_test.go +++ b/datanode/sqlstore/volume_discount_programs_test.go @@ -19,15 +19,14 @@ import ( "testing" "time" - "github.com/georgysavva/scany/pgxscan" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/georgysavva/scany/pgxscan" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func setupVolumeDiscountProgramTest(t *testing.T) (*sqlstore.Blocks, *sqlstore.VolumeDiscountPrograms) { @@ -54,7 +53,7 @@ func TestVolumeDiscountPrograms_AddVolumeDiscountProgram(t *testing.T) { { Program: &vega.VolumeDiscountProgram{ Version: 1, - Id: helpers.GenerateID(), + Id: GenerateID(), BenefitTiers: []*vega.VolumeBenefitTier{ { MinimumRunningNotionalTakerVolume: "1000", @@ -72,7 +71,7 @@ func TestVolumeDiscountPrograms_AddVolumeDiscountProgram(t *testing.T) { { Program: &vega.VolumeDiscountProgram{ Version: 1, - Id: helpers.GenerateID(), + Id: GenerateID(), BenefitTiers: []*vega.VolumeBenefitTier{ { MinimumRunningNotionalTakerVolume: "2000", @@ -118,7 +117,7 @@ func getVolumeDiscountEvents(t *testing.T, endTime time.Time) (*eventspb.VolumeD started := eventspb.VolumeDiscountProgramStarted{ Program: &vega.VolumeDiscountProgram{ Version: 1, - Id: helpers.GenerateID(), + Id: GenerateID(), BenefitTiers: []*vega.VolumeBenefitTier{ { MinimumRunningNotionalTakerVolume: "1000", @@ -139,7 +138,7 @@ func getVolumeDiscountEvents(t *testing.T, endTime time.Time) (*eventspb.VolumeD updated := eventspb.VolumeDiscountProgramUpdated{ Program: &vega.VolumeDiscountProgram{ Version: 2, - Id: helpers.GenerateID(), + Id: GenerateID(), BenefitTiers: []*vega.VolumeBenefitTier{ { MinimumRunningNotionalTakerVolume: "2000", diff --git a/datanode/sqlstore/volume_discount_stats.go b/datanode/sqlstore/volume_discount_stats.go index faf791e1d4..20a3c8df32 100644 --- a/datanode/sqlstore/volume_discount_stats.go +++ b/datanode/sqlstore/volume_discount_stats.go @@ -20,11 +20,11 @@ import ( "fmt" "strings" - "github.com/georgysavva/scany/pgxscan" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + + "github.com/georgysavva/scany/pgxscan" ) var volumeDiscountStatsOrdering = TableOrdering{ diff --git a/datanode/sqlstore/volume_discount_stats_test.go b/datanode/sqlstore/volume_discount_stats_test.go index c3271ef11d..960b589b39 100644 --- a/datanode/sqlstore/volume_discount_stats_test.go +++ b/datanode/sqlstore/volume_discount_stats_test.go @@ -20,17 +20,18 @@ import ( "fmt" "math/rand" "strconv" + "strings" "testing" "time" + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/georgysavva/scany/pgxscan" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/exp/slices" - - "code.vegaprotocol.io/vega/datanode/entities" - "code.vegaprotocol.io/vega/datanode/sqlstore" - eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" ) func TestVolumeDiscountStats_AddVolumeDiscountStats(t *testing.T) { @@ -85,8 +86,8 @@ func TestVolumeDiscountStats_GetVolumeDiscountStats(t *testing.T) { ps := sqlstore.NewParties(connectionSource) vds := sqlstore.NewVolumeDiscountStats(connectionSource) - parties := make([]entities.Party, 0, 5) - for i := 0; i < 5; i++ { + parties := make([]entities.Party, 0, 6) + for i := 0; i < 6; i++ { block := addTestBlockForTime(t, ctx, bs, time.Now().Add(time.Duration(i-10)*time.Minute)) parties = append(parties, addTestParty(t, ctx, ps, block)) } @@ -197,12 +198,12 @@ func flattenVolumeDiscountStatsForEpoch(flattenStats []entities.FlattenVolumeDis } } - slices.SortStableFunc(lastStats, func(a, b entities.FlattenVolumeDiscountStats) bool { + slices.SortStableFunc(lastStats, func(a, b entities.FlattenVolumeDiscountStats) int { if a.AtEpoch == b.AtEpoch { - return a.PartyID < b.PartyID + return strings.Compare(a.PartyID, b.PartyID) } - return a.AtEpoch < b.AtEpoch + return compareUint64(a.AtEpoch, b.AtEpoch) }) return lastStats @@ -217,12 +218,12 @@ func flattenVolumeDiscountStatsForParty(flattenStats []entities.FlattenVolumeDis } } - slices.SortStableFunc(lastStats, func(a, b entities.FlattenVolumeDiscountStats) bool { + slices.SortStableFunc(lastStats, func(a, b entities.FlattenVolumeDiscountStats) int { if a.AtEpoch == b.AtEpoch { - return a.PartyID < b.PartyID + return strings.Compare(a.PartyID, b.PartyID) } - return a.AtEpoch > b.AtEpoch + return -compareUint64(a.AtEpoch, b.AtEpoch) }) return lastStats @@ -231,8 +232,8 @@ func flattenVolumeDiscountStatsForParty(flattenStats []entities.FlattenVolumeDis func setupPartyVolumeDiscountStats(t *testing.T, ctx context.Context, ps *sqlstore.Parties, bs *sqlstore.Blocks) []*eventspb.PartyVolumeDiscountStats { t.Helper() - parties := make([]entities.Party, 0, 5) - for i := 0; i < 5; i++ { + parties := make([]entities.Party, 0, 6) + for i := 0; i < 6; i++ { block := addTestBlockForTime(t, ctx, bs, time.Now().Add(time.Duration(i-10)*time.Minute)) parties = append(parties, addTestParty(t, ctx, ps, block)) } @@ -249,8 +250,17 @@ func setupPartyVolumeDiscountStats(t *testing.T, ctx context.Context, ps *sqlsto func setupPartyVolumeDiscountStatsMod(t *testing.T, parties []entities.Party, f func(i int, party entities.Party) *eventspb.PartyVolumeDiscountStats) []*eventspb.PartyVolumeDiscountStats { t.Helper() - partiesStats := make([]*eventspb.PartyVolumeDiscountStats, 0, 5) + partiesStats := make([]*eventspb.PartyVolumeDiscountStats, 0, 6) for i, p := range parties { + // make the last party an unqualified party + if i == len(parties)-1 { + partiesStats = append(partiesStats, &eventspb.PartyVolumeDiscountStats{ + PartyId: p.ID.String(), + DiscountFactor: "0", + RunningVolume: "99", + }) + continue + } partiesStats = append(partiesStats, f(i, p)) } diff --git a/datanode/sqlstore/votes.go b/datanode/sqlstore/votes.go index fb5eb26a7e..f588afcd45 100644 --- a/datanode/sqlstore/votes.go +++ b/datanode/sqlstore/votes.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -32,10 +20,10 @@ import ( "fmt" "strings" - v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" - "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" + v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) @@ -66,18 +54,20 @@ func (vs *Votes) Add(ctx context.Context, v entities.Vote) error { initial_time, total_governance_token_balance, total_governance_token_weight, - total_equity_like_share_weight + total_equity_like_share_weight, + per_market_equity_like_share_weight ) - VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) ON CONFLICT (proposal_id, party_id, vega_time) DO UPDATE SET value = EXCLUDED.value, total_governance_token_balance =EXCLUDED.total_governance_token_balance, total_governance_token_weight = EXCLUDED.total_governance_token_weight, total_equity_like_share_weight = EXCLUDED.total_equity_like_share_weight, + per_market_equity_like_share_weight = EXCLUDED.per_market_equity_like_share_weight, tx_hash = EXCLUDED.tx_hash; `, v.ProposalID, v.PartyID, v.Value, v.TxHash, v.VegaTime, v.InitialTime, - v.TotalGovernanceTokenBalance, v.TotalGovernanceTokenWeight, v.TotalEquityLikeShareWeight) + v.TotalGovernanceTokenBalance, v.TotalGovernanceTokenWeight, v.TotalEquityLikeShareWeight, v.PerMarketEquityLikeShareWeight) return err } diff --git a/datanode/sqlstore/votes_test.go b/datanode/sqlstore/votes_test.go index 7f43fc7266..2a71b44b0c 100644 --- a/datanode/sqlstore/votes_test.go +++ b/datanode/sqlstore/votes_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -34,16 +22,15 @@ import ( "testing" "time" + "code.vegaprotocol.io/vega/datanode/entities" + "code.vegaprotocol.io/vega/datanode/sqlstore" + "code.vegaprotocol.io/vega/protos/vega" + "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "code.vegaprotocol.io/vega/datanode/entities" - "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" - "code.vegaprotocol.io/vega/protos/vega" ) func addTestVote(t *testing.T, @@ -96,8 +83,8 @@ func TestVotes(t *testing.T) { party1 := addTestParty(t, ctx, partyStore, block1) party2 := addTestParty(t, ctx, partyStore, block1) - prop1 := addTestProposal(t, ctx, propStore, helpers.GenerateID(), party1, helpers.GenerateID(), block1, entities.ProposalStateEnacted, entities.ProposalRationale{ProposalRationale: &vega.ProposalRationale{Title: "myurl1.com", Description: "desc"}}, entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{Change: &vega.ProposalTerms_NewMarket{}}}, entities.ProposalErrorUnspecified) - prop2 := addTestProposal(t, ctx, propStore, helpers.GenerateID(), party1, helpers.GenerateID(), block1, entities.ProposalStateEnacted, entities.ProposalRationale{ProposalRationale: &vega.ProposalRationale{Title: "myurl2.com", Description: "desc"}}, entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{Change: &vega.ProposalTerms_NewMarket{}}}, entities.ProposalErrorUnspecified) + prop1 := addTestProposal(t, ctx, propStore, GenerateID(), party1, GenerateID(), block1, entities.ProposalStateEnacted, entities.ProposalRationale{ProposalRationale: &vega.ProposalRationale{Title: "myurl1.com", Description: "desc"}}, entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{Change: &vega.ProposalTerms_NewMarket{}}}, entities.ProposalErrorUnspecified, nil, entities.BatchProposalTerms{}) + prop2 := addTestProposal(t, ctx, propStore, GenerateID(), party1, GenerateID(), block1, entities.ProposalStateEnacted, entities.ProposalRationale{ProposalRationale: &vega.ProposalRationale{Title: "myurl2.com", Description: "desc"}}, entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{Change: &vega.ProposalTerms_NewMarket{}}}, entities.ProposalErrorUnspecified, nil, entities.BatchProposalTerms{}) party1ID := party1.ID.String() prop1ID := prop1.ID.String() @@ -195,14 +182,15 @@ func setupPaginationTestVotes(t *testing.T, ctx context.Context) (*sqlstore.Vote prop := addTestProposal(t, ctx, propStore, - helpers.GenerateID(), + GenerateID(), party, - helpers.GenerateID(), + GenerateID(), block, entities.ProposalStateEnacted, entities.ProposalRationale{ProposalRationale: &vega.ProposalRationale{Title: fmt.Sprintf("myurl%02d.com", i+1), Description: "desc"}}, entities.ProposalTerms{ProposalTerms: &vega.ProposalTerms{Change: &vega.ProposalTerms_NewMarket{}}}, entities.ProposalErrorUnspecified, + nil, entities.BatchProposalTerms{}, ) voteValue := entities.VoteValueYes diff --git a/datanode/sqlstore/withdrawals.go b/datanode/sqlstore/withdrawals.go index 511a972709..7273733484 100644 --- a/datanode/sqlstore/withdrawals.go +++ b/datanode/sqlstore/withdrawals.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore import ( @@ -34,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/metrics" v2 "code.vegaprotocol.io/vega/protos/data-node/api/v2" + "github.com/georgysavva/scany/pgxscan" ) diff --git a/datanode/sqlstore/withdrawals_test.go b/datanode/sqlstore/withdrawals_test.go index a281d7539d..1f23a2ff87 100644 --- a/datanode/sqlstore/withdrawals_test.go +++ b/datanode/sqlstore/withdrawals_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlstore_test import ( @@ -36,8 +24,8 @@ import ( "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlstore" - "code.vegaprotocol.io/vega/datanode/sqlstore/helpers" "code.vegaprotocol.io/vega/protos/vega" + "github.com/georgysavva/scany/pgxscan" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -342,7 +330,7 @@ func addWithdrawals(ctx context.Context, t *testing.T, bs *sqlstore.Blocks, ws * addTestBlockForTime(t, ctx, bs, vegaTime) withdrawalProto := getTestWithdrawal(fmt.Sprintf("deadbeef%02d", i+1), testID, testID, - strconv.FormatInt(amount, 10), helpers.GenerateID(), vegaTime) + strconv.FormatInt(amount, 10), GenerateID(), vegaTime) withdrawal, err := entities.WithdrawalFromProto(withdrawalProto, generateTxHash(), vegaTime) require.NoError(t, err, "Converting withdrawal proto to database entity") err = ws.Upsert(ctx, withdrawal) diff --git a/datanode/sqlsubscribers/account.go b/datanode/sqlsubscribers/account.go index 0604164f15..68e27efcb5 100644 --- a/datanode/sqlsubscribers/account.go +++ b/datanode/sqlsubscribers/account.go @@ -13,30 +13,18 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" "time" - "github.com/pkg/errors" - "github.com/shopspring/decimal" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" + "github.com/shopspring/decimal" ) type AccountEvent interface { diff --git a/datanode/sqlsubscribers/asset.go b/datanode/sqlsubscribers/asset.go index 582c956324..5cf9bcb115 100644 --- a/datanode/sqlsubscribers/asset.go +++ b/datanode/sqlsubscribers/asset.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( @@ -33,12 +21,11 @@ import ( "math" "time" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/protos/vega" + "github.com/pkg/errors" "github.com/shopspring/decimal" ) diff --git a/datanode/sqlsubscribers/checkpoint.go b/datanode/sqlsubscribers/checkpoint.go index 502cf03a2c..3d36ca5c70 100644 --- a/datanode/sqlsubscribers/checkpoint.go +++ b/datanode/sqlsubscribers/checkpoint.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" ) type CheckpointEvent interface { diff --git a/datanode/sqlsubscribers/delegations.go b/datanode/sqlsubscribers/delegations.go index 4a587f4107..aa452cdcb7 100644 --- a/datanode/sqlsubscribers/delegations.go +++ b/datanode/sqlsubscribers/delegations.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" ) type DelegationBalanceEvent interface { diff --git a/datanode/sqlsubscribers/deposits.go b/datanode/sqlsubscribers/deposits.go index 940aa0c34d..ae226f8567 100644 --- a/datanode/sqlsubscribers/deposits.go +++ b/datanode/sqlsubscribers/deposits.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" ) type DepositEvent interface { diff --git a/datanode/sqlsubscribers/deposits_test.go b/datanode/sqlsubscribers/deposits_test.go index 3f0cc34e09..36ab741d8a 100644 --- a/datanode/sqlsubscribers/deposits_test.go +++ b/datanode/sqlsubscribers/deposits_test.go @@ -13,31 +13,19 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers_test import ( "context" "testing" - "github.com/golang/mock/gomock" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/sqlsubscribers" "code.vegaprotocol.io/vega/datanode/sqlsubscribers/mocks" "code.vegaprotocol.io/vega/libs/num" + + "github.com/golang/mock/gomock" ) func TestDeposit_Push(t *testing.T) { diff --git a/datanode/sqlsubscribers/epoch.go b/datanode/sqlsubscribers/epoch.go index cfa35295ed..3ea6c6f3aa 100644 --- a/datanode/sqlsubscribers/epoch.go +++ b/datanode/sqlsubscribers/epoch.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" ) type EpochUpdateEvent interface { diff --git a/datanode/sqlsubscribers/erc20_multisig_event.go b/datanode/sqlsubscribers/erc20_multisig_event.go index 8d936960da..6bd9043662 100644 --- a/datanode/sqlsubscribers/erc20_multisig_event.go +++ b/datanode/sqlsubscribers/erc20_multisig_event.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" ) type ERC20MultiSigSignerAddedEvent interface { diff --git a/datanode/sqlsubscribers/ethereum_key_rotation.go b/datanode/sqlsubscribers/ethereum_key_rotation.go index b2a1a50a7c..a138df0549 100644 --- a/datanode/sqlsubscribers/ethereum_key_rotation.go +++ b/datanode/sqlsubscribers/ethereum_key_rotation.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" ) type EthereumKeyRotationEvent interface { diff --git a/datanode/sqlsubscribers/funding_payments.go b/datanode/sqlsubscribers/funding_payments.go index 3806fcd618..e662b4e5c4 100644 --- a/datanode/sqlsubscribers/funding_payments.go +++ b/datanode/sqlsubscribers/funding_payments.go @@ -13,29 +13,17 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" "time" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" ) type FundingPaymentsEvent interface { diff --git a/datanode/sqlsubscribers/funding_period.go b/datanode/sqlsubscribers/funding_period.go index 5394526923..adb250e7d0 100644 --- a/datanode/sqlsubscribers/funding_period.go +++ b/datanode/sqlsubscribers/funding_period.go @@ -18,12 +18,11 @@ package sqlsubscribers import ( "context" + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" "github.com/pkg/errors" - - "code.vegaprotocol.io/vega/core/events" - "code.vegaprotocol.io/vega/datanode/entities" ) type ( diff --git a/datanode/sqlsubscribers/key_rotation.go b/datanode/sqlsubscribers/key_rotation.go index 374f08ef4d..58e783eba9 100644 --- a/datanode/sqlsubscribers/key_rotation.go +++ b/datanode/sqlsubscribers/key_rotation.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" ) type KeyRotationEvent interface { diff --git a/datanode/sqlsubscribers/ledger_movement.go b/datanode/sqlsubscribers/ledger_movement.go index 477a88ead9..60af7b1903 100644 --- a/datanode/sqlsubscribers/ledger_movement.go +++ b/datanode/sqlsubscribers/ledger_movement.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( @@ -47,7 +35,7 @@ type Ledger interface { Flush(ctx context.Context) error } -type TransferResponseEvent interface { +type LedgerMovementEvents interface { events.Event LedgerMovements() []*vega.LedgerMovement } @@ -75,10 +63,10 @@ func (t *TransferResponse) Flush(ctx context.Context) error { } func (t *TransferResponse) Push(ctx context.Context, evt events.Event) error { - return t.consume(ctx, evt.(TransferResponseEvent)) + return t.consume(ctx, evt.(LedgerMovementEvents)) } -func (t *TransferResponse) consume(ctx context.Context, e TransferResponseEvent) error { +func (t *TransferResponse) consume(ctx context.Context, e LedgerMovementEvents) error { var errs strings.Builder for _, tr := range e.LedgerMovements() { t.ledger.AddTransferResponse(tr) @@ -122,6 +110,11 @@ func (t *TransferResponse) addLedgerEntry(ctx context.Context, vle *vega.LedgerE return errors.Wrap(err, "parsing ToAccountBalance string") } + var transferID entities.TransferID + if vle.TransferId != nil { + transferID = entities.TransferID(*vle.TransferId) + } + le := entities.LedgerEntry{ FromAccountID: fromAcc.ID, ToAccountID: toAcc.ID, @@ -132,6 +125,7 @@ func (t *TransferResponse) addLedgerEntry(ctx context.Context, vle *vega.LedgerE Type: entities.LedgerMovementType(vle.Type), FromAccountBalance: fromAccountBalance, ToAccountBalance: toAccountBalance, + TransferID: transferID, } err = t.ledger.AddLedgerEntry(le) diff --git a/datanode/sqlsubscribers/liquidity_provision.go b/datanode/sqlsubscribers/liquidity_provision.go index 9d8567612e..16bea82cb3 100644 --- a/datanode/sqlsubscribers/liquidity_provision.go +++ b/datanode/sqlsubscribers/liquidity_provision.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" ) type LiquidityProvisionEvent interface { diff --git a/datanode/sqlsubscribers/liquidity_provision_test.go b/datanode/sqlsubscribers/liquidity_provision_test.go index 568bf0b71e..2c4c7f7d3a 100644 --- a/datanode/sqlsubscribers/liquidity_provision_test.go +++ b/datanode/sqlsubscribers/liquidity_provision_test.go @@ -13,30 +13,18 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers_test import ( "context" "testing" - "github.com/golang/mock/gomock" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/sqlsubscribers" "code.vegaprotocol.io/vega/datanode/sqlsubscribers/mocks" + + "github.com/golang/mock/gomock" ) func TestLiquidityProvision_Push(t *testing.T) { diff --git a/datanode/sqlsubscribers/margin_levels.go b/datanode/sqlsubscribers/margin_levels.go index 0628d6e641..27083518e0 100644 --- a/datanode/sqlsubscribers/margin_levels.go +++ b/datanode/sqlsubscribers/margin_levels.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" ) type MarginLevelsEvent interface { diff --git a/datanode/sqlsubscribers/margin_levels_test.go b/datanode/sqlsubscribers/margin_levels_test.go index 8dae4e1a4e..045ed918d7 100644 --- a/datanode/sqlsubscribers/margin_levels_test.go +++ b/datanode/sqlsubscribers/margin_levels_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers_test import ( @@ -32,14 +20,14 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlsubscribers" "code.vegaprotocol.io/vega/datanode/sqlsubscribers/mocks" "code.vegaprotocol.io/vega/libs/num" + + "github.com/golang/mock/gomock" ) func TestMarginLevels_Push(t *testing.T) { @@ -58,6 +46,7 @@ func TestMarginLevels_Push(t *testing.T) { SearchLevel: num.NewUint(1000), InitialMargin: num.NewUint(1000), CollateralReleaseLevel: num.NewUint(1000), + OrderMargin: num.UintZero(), Party: "DEADBEEF", MarketID: "DEADBEEF", Asset: "DEADBEEF", diff --git a/datanode/sqlsubscribers/margin_mode_events.go b/datanode/sqlsubscribers/margin_mode_events.go new file mode 100644 index 0000000000..2f697ac075 --- /dev/null +++ b/datanode/sqlsubscribers/margin_mode_events.go @@ -0,0 +1,26 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package sqlsubscribers + +import ( + "code.vegaprotocol.io/vega/core/events" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" +) + +type PartyMarginModeUpdatedEvent interface { + events.Event + PartyMarginModeUpdated() *eventspb.PartyMarginModeUpdated +} diff --git a/datanode/sqlsubscribers/margin_modes.go b/datanode/sqlsubscribers/margin_modes.go new file mode 100644 index 0000000000..8561142639 --- /dev/null +++ b/datanode/sqlsubscribers/margin_modes.go @@ -0,0 +1,60 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package sqlsubscribers + +import ( + "context" + + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/datanode/entities" + + "github.com/pkg/errors" +) + +type MarginModeStore interface { + UpdatePartyMarginMode(ctx context.Context, update entities.PartyMarginMode) error +} + +type MarginModes struct { + subscriber + store MarginModeStore +} + +func (t *MarginModes) Types() []events.Type { + return []events.Type{ + events.PartyMarginModeUpdatedEvent, + } +} + +func (t *MarginModes) Push(ctx context.Context, evt events.Event) error { + switch e := evt.(type) { + case PartyMarginModeUpdatedEvent: + return t.consumePartyMarginModeUpdatedEvent(ctx, e) + default: + return nil + } +} + +func (t *MarginModes) consumePartyMarginModeUpdatedEvent(ctx context.Context, e PartyMarginModeUpdatedEvent) error { + mode := entities.PartyMarginModeFromProto(e.PartyMarginModeUpdated()) + return errors.Wrap(t.store.UpdatePartyMarginMode(ctx, mode), "update party margin mode") +} + +func NewMarginModes(store MarginModeStore) *MarginModes { + return &MarginModes{ + store: store, + } +} diff --git a/datanode/sqlsubscribers/market_created.go b/datanode/sqlsubscribers/market_created.go index badabb1816..6f8613c52f 100644 --- a/datanode/sqlsubscribers/market_created.go +++ b/datanode/sqlsubscribers/market_created.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( diff --git a/datanode/sqlsubscribers/market_created_test.go b/datanode/sqlsubscribers/market_created_test.go index 721df1e678..15f4aacc3c 100644 --- a/datanode/sqlsubscribers/market_created_test.go +++ b/datanode/sqlsubscribers/market_created_test.go @@ -13,26 +13,12 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers_test import ( "context" "testing" - "github.com/golang/mock/gomock" - "code.vegaprotocol.io/vega/core/datasource" dstypes "code.vegaprotocol.io/vega/core/datasource/common" "code.vegaprotocol.io/vega/core/datasource/external/signedoracle" @@ -41,8 +27,10 @@ import ( "code.vegaprotocol.io/vega/datanode/sqlsubscribers" "code.vegaprotocol.io/vega/datanode/sqlsubscribers/mocks" "code.vegaprotocol.io/vega/libs/num" - + "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + + "github.com/golang/mock/gomock" ) func Test_MarketCreated_Push(t *testing.T) { @@ -158,6 +146,9 @@ func getTestMarket(termInt bool) types.Market { InfrastructureFee: num.DecimalZero(), LiquidityFee: num.DecimalZero(), }, + LiquidityFeeSettings: &types.LiquidityFeeSettings{ + Method: vega.LiquidityFeeSettings_METHOD_MARGINAL_COST, + }, }, OpeningAuction: nil, PriceMonitoringSettings: &types.PriceMonitoringSettings{ @@ -177,8 +168,6 @@ func getTestMarket(termInt bool) types.Market { TimeWindow: 0, ScalingFactor: num.DecimalZero(), }, - TriggeringRatio: num.DecimalZero(), - AuctionExtension: 0, }, TradingMode: 0, State: 0, diff --git a/datanode/sqlsubscribers/market_data.go b/datanode/sqlsubscribers/market_data.go index 41d10a1de7..25dc704752 100644 --- a/datanode/sqlsubscribers/market_data.go +++ b/datanode/sqlsubscribers/market_data.go @@ -13,29 +13,17 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" "time" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" ) type MarketDataEvent interface { diff --git a/datanode/sqlsubscribers/market_data_test.go b/datanode/sqlsubscribers/market_data_test.go index 8028eac4d2..1c8be51360 100644 --- a/datanode/sqlsubscribers/market_data_test.go +++ b/datanode/sqlsubscribers/market_data_test.go @@ -13,29 +13,17 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" "testing" - "github.com/golang/mock/gomock" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/sqlsubscribers/mocks" + + "github.com/golang/mock/gomock" ) func Test_MarketData_Push(t *testing.T) { diff --git a/datanode/sqlsubscribers/market_updated.go b/datanode/sqlsubscribers/market_updated.go index a9780fe213..87568c9056 100644 --- a/datanode/sqlsubscribers/market_updated.go +++ b/datanode/sqlsubscribers/market_updated.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( diff --git a/datanode/sqlsubscribers/market_updated_test.go b/datanode/sqlsubscribers/market_updated_test.go index 707b7a1967..20d425449f 100644 --- a/datanode/sqlsubscribers/market_updated_test.go +++ b/datanode/sqlsubscribers/market_updated_test.go @@ -13,29 +13,17 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers_test import ( "context" "testing" - "github.com/golang/mock/gomock" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/sqlsubscribers" "code.vegaprotocol.io/vega/datanode/sqlsubscribers/mocks" + + "github.com/golang/mock/gomock" ) func Test_MarketUpdated_Push(t *testing.T) { diff --git a/datanode/sqlsubscribers/mocks/mocks.go b/datanode/sqlsubscribers/mocks/mocks.go index 28538d0327..9b5bce1221 100644 --- a/datanode/sqlsubscribers/mocks/mocks.go +++ b/datanode/sqlsubscribers/mocks/mocks.go @@ -102,6 +102,20 @@ func (mr *MockTransferStoreMockRecorder) UpsertFees(arg0, arg1 interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertFees", reflect.TypeOf((*MockTransferStore)(nil).UpsertFees), arg0, arg1) } +// UpsertFeesDiscount mocks base method. +func (m *MockTransferStore) UpsertFeesDiscount(arg0 context.Context, arg1 *entities.TransferFeesDiscount) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpsertFeesDiscount", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpsertFeesDiscount indicates an expected call of UpsertFeesDiscount. +func (mr *MockTransferStoreMockRecorder) UpsertFeesDiscount(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertFeesDiscount", reflect.TypeOf((*MockTransferStore)(nil).UpsertFeesDiscount), arg0, arg1) +} + // MockWithdrawalStore is a mock of WithdrawalStore interface. type MockWithdrawalStore struct { ctrl *gomock.Controller diff --git a/datanode/sqlsubscribers/network_limits.go b/datanode/sqlsubscribers/network_limits.go index d1841a80ef..d43ff8e322 100644 --- a/datanode/sqlsubscribers/network_limits.go +++ b/datanode/sqlsubscribers/network_limits.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" ) type NetworkLimitsEvent interface { diff --git a/datanode/sqlsubscribers/network_parameters.go b/datanode/sqlsubscribers/network_parameters.go index 368da4515d..e7ed8c012d 100644 --- a/datanode/sqlsubscribers/network_parameters.go +++ b/datanode/sqlsubscribers/network_parameters.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" ) type NetworkParameterEvent interface { diff --git a/datanode/sqlsubscribers/node.go b/datanode/sqlsubscribers/node.go index 96d717cf7e..dac8e750c6 100644 --- a/datanode/sqlsubscribers/node.go +++ b/datanode/sqlsubscribers/node.go @@ -13,29 +13,17 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" "time" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" ) type ValidatorUpdateEvent interface { diff --git a/datanode/sqlsubscribers/notary.go b/datanode/sqlsubscribers/notary.go index 675623bb67..03692c130e 100644 --- a/datanode/sqlsubscribers/notary.go +++ b/datanode/sqlsubscribers/notary.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( diff --git a/datanode/sqlsubscribers/notary_test.go b/datanode/sqlsubscribers/notary_test.go index cf6f646651..9963df562f 100644 --- a/datanode/sqlsubscribers/notary_test.go +++ b/datanode/sqlsubscribers/notary_test.go @@ -13,32 +13,20 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers_test import ( "context" "testing" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/sqlsubscribers" "code.vegaprotocol.io/vega/datanode/sqlsubscribers/mocks" vegapb "code.vegaprotocol.io/vega/protos/vega" v1 "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" ) func TestNotary_Push(t *testing.T) { diff --git a/datanode/sqlsubscribers/oracle_data.go b/datanode/sqlsubscribers/oracle_data.go index 027b1d40cb..5c81778765 100644 --- a/datanode/sqlsubscribers/oracle_data.go +++ b/datanode/sqlsubscribers/oracle_data.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" vegapb "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" ) type OracleDataEvent interface { diff --git a/datanode/sqlsubscribers/oracle_data_test.go b/datanode/sqlsubscribers/oracle_data_test.go index 41fb092817..b2c318ff37 100644 --- a/datanode/sqlsubscribers/oracle_data_test.go +++ b/datanode/sqlsubscribers/oracle_data_test.go @@ -13,31 +13,19 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers_test import ( "context" "testing" - "github.com/golang/mock/gomock" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/sqlsubscribers" "code.vegaprotocol.io/vega/datanode/sqlsubscribers/mocks" vegapb "code.vegaprotocol.io/vega/protos/vega" datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" + + "github.com/golang/mock/gomock" ) func TestOracleData_Push(t *testing.T) { diff --git a/datanode/sqlsubscribers/oracle_spec.go b/datanode/sqlsubscribers/oracle_spec.go index 45d7e52f8f..438e238135 100644 --- a/datanode/sqlsubscribers/oracle_spec.go +++ b/datanode/sqlsubscribers/oracle_spec.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" vegapb "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" ) type OracleSpecEvent interface { diff --git a/datanode/sqlsubscribers/oracle_spec_test.go b/datanode/sqlsubscribers/oracle_spec_test.go index b3461d4baf..3824060fa3 100644 --- a/datanode/sqlsubscribers/oracle_spec_test.go +++ b/datanode/sqlsubscribers/oracle_spec_test.go @@ -13,30 +13,18 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers_test import ( "context" "testing" - "github.com/golang/mock/gomock" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/sqlsubscribers" "code.vegaprotocol.io/vega/datanode/sqlsubscribers/mocks" vegapb "code.vegaprotocol.io/vega/protos/vega" + + "github.com/golang/mock/gomock" ) func TestOracleSpec_Push(t *testing.T) { diff --git a/datanode/sqlsubscribers/order.go b/datanode/sqlsubscribers/order.go index de093ec24a..abad0f8314 100644 --- a/datanode/sqlsubscribers/order.go +++ b/datanode/sqlsubscribers/order.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( diff --git a/datanode/sqlsubscribers/party.go b/datanode/sqlsubscribers/party.go index 18a71d7522..8566a78a23 100644 --- a/datanode/sqlsubscribers/party.go +++ b/datanode/sqlsubscribers/party.go @@ -13,28 +13,17 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/entities" + eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" ) type PartyEvent interface { @@ -42,8 +31,14 @@ type PartyEvent interface { Party() types.Party } +type PartyProfileUpdatedEvent interface { + events.Event + PartyProfileUpdated() *eventspb.PartyProfileUpdated +} + type PartyStore interface { Add(context.Context, entities.Party) error + UpdateProfile(ctx context.Context, updated *entities.PartyProfile) error } type Party struct { @@ -59,18 +54,32 @@ func NewParty(store PartyStore) *Party { } func (ps *Party) Types() []events.Type { - return []events.Type{events.PartyEvent} + return []events.Type{events.PartyEvent, events.PartyProfileUpdatedEvent} } func (ps *Party) Push(ctx context.Context, evt events.Event) error { - return ps.consume(ctx, evt.(PartyEvent)) + switch e := evt.(type) { + case PartyEvent: + return ps.consumeNewParty(ctx, e) + case PartyProfileUpdatedEvent: + return ps.consumePartyProfileUpdated(ctx, e) + default: + return nil + } } -func (ps *Party) consume(ctx context.Context, event PartyEvent) error { +func (ps *Party) consumeNewParty(ctx context.Context, event PartyEvent) error { pp := event.Party().IntoProto() p := entities.PartyFromProto(pp, entities.TxHash(event.TxHash())) vt := ps.vegaTime p.VegaTime = &vt - return errors.Wrap(ps.store.Add(ctx, p), "error adding party:%w") + return errors.Wrap(ps.store.Add(ctx, p), "adding party") +} + +func (ps *Party) consumePartyProfileUpdated(ctx context.Context, e PartyProfileUpdatedEvent) error { + updateEvent := e.PartyProfileUpdated() + updated := entities.PartyProfileFromProto(updateEvent.UpdatedProfile) + + return errors.Wrap(ps.store.UpdateProfile(ctx, updated), "updating party profile") } diff --git a/datanode/sqlsubscribers/party_activity_streak.go b/datanode/sqlsubscribers/party_activity_streak.go index 55616b8cf6..0803200940 100644 --- a/datanode/sqlsubscribers/party_activity_streak.go +++ b/datanode/sqlsubscribers/party_activity_streak.go @@ -18,12 +18,11 @@ package sqlsubscribers import ( "context" + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" "github.com/pkg/errors" - - "code.vegaprotocol.io/vega/core/events" - "code.vegaprotocol.io/vega/datanode/entities" ) type ( diff --git a/datanode/sqlsubscribers/position.go b/datanode/sqlsubscribers/position.go index a3f7f63313..3aec8274b5 100644 --- a/datanode/sqlsubscribers/position.go +++ b/datanode/sqlsubscribers/position.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( @@ -32,13 +20,14 @@ import ( "fmt" "sync" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" ) type fundingPaymentsEvent interface { @@ -234,6 +223,12 @@ func (p *Position) handleTradeEvent(ctx context.Context, event tradeEvent) error if !ok { return fmt.Errorf("failed to get market scaling factor for market %s", trade.MarketId) } + if trade.Type == types.TradeTypeNetworkCloseOutBad { + pos := p.getNetworkPosition(ctx, trade.MarketId) + seller := trade.Seller == types.NetworkParty + pos.UpdateWithTrade(trade, seller, sf) + return p.updatePosition(ctx, pos) + } buyer, seller := p.getPositionsByTrade(ctx, trade) buyer.UpdateWithTrade(trade, false, sf) // this can't really result in an error... @@ -307,6 +302,19 @@ func (p *Position) getPositionsByTrade(ctx context.Context, trade vega.Trade) (b return buyer, seller } +func (p *Position) getNetworkPosition(ctx context.Context, market string) entities.Position { + mID := entities.MarketID(market) + pID := entities.PartyID(types.NetworkParty) + pos, err := p.store.GetByMarketAndParty(ctx, mID.String(), pID.String()) + if errors.Is(err, entities.ErrNotFound) { + return entities.NewEmptyPosition(mID, pID) + } + if err != nil { + panic("unable to query existing positions") + } + return pos +} + func (p *Position) getPosition(ctx context.Context, e positionEventBase) entities.Position { mID := entities.MarketID(e.MarketID()) pID := entities.PartyID(e.PartyID()) @@ -326,6 +334,12 @@ func (p *Position) getPosition(ctx context.Context, e positionEventBase) entitie } func (p *Position) updatePosition(ctx context.Context, pos entities.Position) error { + if pos.PartyID == entities.PartyID(types.NetworkParty) { + pos.PendingRealisedPnl = num.DecimalZero() + pos.RealisedPnl = num.DecimalZero() + pos.PendingUnrealisedPnl = num.DecimalZero() + pos.UnrealisedPnl = num.DecimalZero() + } pos.VegaTime = p.vegaTime err := p.store.Add(ctx, pos) diff --git a/datanode/sqlsubscribers/positions_test.go b/datanode/sqlsubscribers/positions_test.go index 5dc2842bd4..052061016f 100644 --- a/datanode/sqlsubscribers/positions_test.go +++ b/datanode/sqlsubscribers/positions_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers_test // No race condition checks on these tests, the channels are buffered to avoid actual issues @@ -34,14 +22,14 @@ import ( "context" "testing" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/datanode/sqlsubscribers" "code.vegaprotocol.io/vega/datanode/sqlsubscribers/mocks" "code.vegaprotocol.io/vega/libs/num" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" ) type expect struct { diff --git a/datanode/sqlsubscribers/proposal.go b/datanode/sqlsubscribers/proposal.go index 1bb1ed3947..9d858c765b 100644 --- a/datanode/sqlsubscribers/proposal.go +++ b/datanode/sqlsubscribers/proposal.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" ) type ProposalEvent interface { diff --git a/datanode/sqlsubscribers/protocol_upgrade_proposal.go b/datanode/sqlsubscribers/protocol_upgrade_proposal.go index 19e36e9349..87e8e49b9f 100644 --- a/datanode/sqlsubscribers/protocol_upgrade_proposal.go +++ b/datanode/sqlsubscribers/protocol_upgrade_proposal.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( diff --git a/datanode/sqlsubscribers/rewards.go b/datanode/sqlsubscribers/rewards.go index 9adc090903..694a800174 100644 --- a/datanode/sqlsubscribers/rewards.go +++ b/datanode/sqlsubscribers/rewards.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" ) type RewardPayoutEvent interface { diff --git a/datanode/sqlsubscribers/risk_factors.go b/datanode/sqlsubscribers/risk_factors.go index 578b0bed4e..4fef5d7fdc 100644 --- a/datanode/sqlsubscribers/risk_factors.go +++ b/datanode/sqlsubscribers/risk_factors.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" ) type RiskFactorEvent interface { diff --git a/datanode/sqlsubscribers/risk_factors_test.go b/datanode/sqlsubscribers/risk_factors_test.go index f6c1d9106d..abcb198134 100644 --- a/datanode/sqlsubscribers/risk_factors_test.go +++ b/datanode/sqlsubscribers/risk_factors_test.go @@ -13,31 +13,19 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers_test import ( "context" "testing" - "github.com/golang/mock/gomock" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/sqlsubscribers" "code.vegaprotocol.io/vega/datanode/sqlsubscribers/mocks" "code.vegaprotocol.io/vega/libs/num" + + "github.com/golang/mock/gomock" ) func TestRiskFactor_Push(t *testing.T) { diff --git a/datanode/sqlsubscribers/snapshot_data.go b/datanode/sqlsubscribers/snapshot_data.go index 6dd0df043a..6d1ca126d5 100644 --- a/datanode/sqlsubscribers/snapshot_data.go +++ b/datanode/sqlsubscribers/snapshot_data.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( diff --git a/datanode/sqlsubscribers/stake_linking.go b/datanode/sqlsubscribers/stake_linking.go index 34cdbcf242..315583f484 100644 --- a/datanode/sqlsubscribers/stake_linking.go +++ b/datanode/sqlsubscribers/stake_linking.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" ) type StakeLinkingEvent interface { diff --git a/datanode/sqlsubscribers/stake_linking_test.go b/datanode/sqlsubscribers/stake_linking_test.go index ec201dae9c..d2e499bc03 100644 --- a/datanode/sqlsubscribers/stake_linking_test.go +++ b/datanode/sqlsubscribers/stake_linking_test.go @@ -13,30 +13,18 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers_test import ( "context" "testing" - "github.com/golang/mock/gomock" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/sqlsubscribers" "code.vegaprotocol.io/vega/datanode/sqlsubscribers/mocks" + + "github.com/golang/mock/gomock" ) func TestStakeLinking_Push(t *testing.T) { diff --git a/datanode/sqlsubscribers/stop_orders.go b/datanode/sqlsubscribers/stop_orders.go index e73749958c..cddb71f698 100644 --- a/datanode/sqlsubscribers/stop_orders.go +++ b/datanode/sqlsubscribers/stop_orders.go @@ -18,12 +18,11 @@ package sqlsubscribers import ( "context" + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/datanode/entities" pbevents "code.vegaprotocol.io/vega/protos/vega/events/v1" "github.com/pkg/errors" - - "code.vegaprotocol.io/vega/core/events" - "code.vegaprotocol.io/vega/datanode/entities" ) type ( diff --git a/datanode/sqlsubscribers/subscriber.go b/datanode/sqlsubscribers/subscriber.go index 0c39cd8d9c..a3c2dba187 100644 --- a/datanode/sqlsubscribers/subscriber.go +++ b/datanode/sqlsubscribers/subscriber.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( diff --git a/datanode/sqlsubscribers/teams.go b/datanode/sqlsubscribers/teams.go index 57220b517e..c3a197fb75 100644 --- a/datanode/sqlsubscribers/teams.go +++ b/datanode/sqlsubscribers/teams.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/pkg/errors" ) @@ -45,11 +46,17 @@ type ( RefereeSwitchedTeam() *eventspb.RefereeSwitchedTeam } + TeamsStatsUpdated interface { + events.Event + TeamsStatsUpdated() *eventspb.TeamsStatsUpdated + } + TeamStore interface { AddTeam(ctx context.Context, team *entities.Team) error UpdateTeam(ctx context.Context, team *entities.TeamUpdated) error RefereeJoinedTeam(ctx context.Context, referee *entities.TeamMember) error RefereeSwitchedTeam(ctx context.Context, referee *entities.RefereeTeamSwitch) error + TeamsStatsUpdated(ctx context.Context, stats *eventspb.TeamsStatsUpdated) error } Teams struct { @@ -70,6 +77,7 @@ func (t *Teams) Types() []events.Type { events.TeamUpdatedEvent, events.RefereeJoinedTeamEvent, events.RefereeSwitchedTeamEvent, + events.TeamsStatsUpdatedEvent, } } @@ -83,6 +91,8 @@ func (t *Teams) Push(ctx context.Context, evt events.Event) error { return t.consumeRefereeJoinedTeamEvent(ctx, e) case RefereeSwitchedTeam: return t.consumeRefereeSwitchedTeamEvent(ctx, e) + case TeamsStatsUpdated: + return t.consumeTeamsStatsUpdatedEvent(ctx, e) default: return nil } @@ -111,3 +121,7 @@ func (t *Teams) consumeRefereeSwitchedTeamEvent(ctx context.Context, e RefereeSw switched := entities.TeamRefereeHistoryFromProto(switchedEvt, t.vegaTime) return errors.Wrap(t.store.RefereeSwitchedTeam(ctx, switched), "updating referee history") } + +func (t *Teams) consumeTeamsStatsUpdatedEvent(ctx context.Context, e TeamsStatsUpdated) error { + return errors.Wrap(t.store.TeamsStatsUpdated(ctx, e.TeamsStatsUpdated()), "teams stats updated") +} diff --git a/datanode/sqlsubscribers/trades.go b/datanode/sqlsubscribers/trades.go index 88e2042abf..dc5ceaf497 100644 --- a/datanode/sqlsubscribers/trades.go +++ b/datanode/sqlsubscribers/trades.go @@ -13,29 +13,17 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" "time" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" types "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" ) type TradeEvent interface { diff --git a/datanode/sqlsubscribers/trades_test.go b/datanode/sqlsubscribers/trades_test.go index 44de5da7cc..26ad23d923 100644 --- a/datanode/sqlsubscribers/trades_test.go +++ b/datanode/sqlsubscribers/trades_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( @@ -32,12 +20,12 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/libs/num" + + "github.com/stretchr/testify/assert" ) func TestSubscriberSequenceNumber(t *testing.T) { diff --git a/datanode/sqlsubscribers/transaction_results.go b/datanode/sqlsubscribers/transaction_results.go new file mode 100644 index 0000000000..fb822c814f --- /dev/null +++ b/datanode/sqlsubscribers/transaction_results.go @@ -0,0 +1,70 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package sqlsubscribers + +import ( + "context" + + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/datanode/utils" + "code.vegaprotocol.io/vega/libs/slice" + "code.vegaprotocol.io/vega/logging" +) + +type TransactionResultEvent interface { + events.Event + TransactionResult() events.TransactionResult +} + +type TransactionResults struct { + subscriber + observer utils.Observer[events.TransactionResult] +} + +func NewTransactionResults(log *logging.Logger) *TransactionResults { + return &TransactionResults{ + observer: utils.NewObserver[events.TransactionResult]("transaction_result", log, 5, 5), + } +} + +func (tr *TransactionResults) Push(ctx context.Context, evt events.Event) error { + switch e := evt.(type) { + case TransactionResultEvent: + tr.observer.Notify([]events.TransactionResult{e.TransactionResult()}) + return nil + default: + return nil + } +} + +func (tr *TransactionResults) Types() []events.Type { + return []events.Type{events.TransactionResultEvent} +} + +func (tr *TransactionResults) Observe(ctx context.Context, retries int, + partyIDs []string, hashes []string, status *bool, +) (transactions <-chan []events.TransactionResult, ref uint64) { + ch, ref := tr.observer.Observe(ctx, + retries, + func(tre events.TransactionResult) bool { + partiesOk := len(partyIDs) == 0 || slice.Contains(partyIDs, tre.PartyID()) + hashesOk := len(hashes) == 0 || slice.Contains(hashes, tre.Hash()) + statusOK := status == nil || *status == tre.Status() + + return partiesOk && hashesOk && statusOK + }) + return ch, ref +} diff --git a/datanode/sqlsubscribers/transaction_results_test.go b/datanode/sqlsubscribers/transaction_results_test.go new file mode 100644 index 0000000000..caf02b5530 --- /dev/null +++ b/datanode/sqlsubscribers/transaction_results_test.go @@ -0,0 +1,147 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package sqlsubscribers_test + +import ( + "context" + "fmt" + "sync" + "testing" + + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/datanode/sqlsubscribers" + "code.vegaprotocol.io/vega/logging" + commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + + "github.com/stretchr/testify/assert" +) + +func TestTransactionResults(t *testing.T) { + logger := logging.NewTestLogger() + + ctx := context.Background() + + subscriber := sqlsubscribers.NewTransactionResults(logger) + + expectedEvents := generateTestTransactionResultEvents(5, 5) + + var wg sync.WaitGroup + // expect all events + success events + failed events + 2 per party events + 1 specific hash event + wg.Add(len(expectedEvents)*2 + 3) + + // all events + subChan, ref := subscriber.Observe(ctx, 2, []string{""}, []string{""}, nil) + assert.Equal(t, uint64(1), ref) + go func() { + for events := range subChan { + for range events { + wg.Done() + } + } + }() + + // success events + success := true + successSubChan, ref := subscriber.Observe(ctx, 2, []string{""}, []string{""}, &success) + assert.Equal(t, uint64(2), ref) + go func() { + for events := range successSubChan { + for range events { + wg.Done() + } + } + }() + + // failed events + failure := false + failureSubChan, ref := subscriber.Observe(ctx, 2, []string{""}, []string{""}, &failure) + assert.Equal(t, uint64(3), ref) + go func() { + for events := range failureSubChan { + for range events { + wg.Done() + } + } + }() + + // 2 per party events + partySubChan, ref := subscriber.Observe(ctx, 2, []string{"party-2"}, []string{""}, nil) + assert.Equal(t, uint64(4), ref) + go func() { + for events := range partySubChan { + for range events { + wg.Done() + } + } + }() + + // 1 specific hash event + hashSubChan, ref := subscriber.Observe(ctx, 2, []string{""}, []string{"hash-6"}, nil) + assert.Equal(t, uint64(5), ref) + go func() { + for events := range hashSubChan { + for range events { + wg.Done() + } + } + }() + + for _, event := range expectedEvents { + subscriber.Push(context.Background(), event) + } + + wg.Done() +} + +func generateTestTransactionResultEvents(successCount, failureCount int) []*events.TransactionResult { + out := make([]*events.TransactionResult, 0, successCount+failureCount) + + for i := 0; i < successCount; i++ { + out = append(out, + events.NewTransactionResultEventSuccess( + context.Background(), + fmt.Sprintf("hash-%d", i), + fmt.Sprintf("party-%d", i), + &commandspb.LiquidityProvisionSubmission{ + MarketId: fmt.Sprintf("market-%d", i), + CommitmentAmount: "100", + Fee: "1", + Reference: fmt.Sprintf("lp-%d", i), + }, + ), + ) + } + + for i := 0; i < failureCount; i++ { + nth := i + successCount + out = append(out, + events.NewTransactionResultEventFailure( + context.Background(), + fmt.Sprintf("hash-%d", nth), + fmt.Sprintf("party-%d", i), + fmt.Errorf("error-%d", i), + &commandspb.LiquidityProvisionSubmission{ + MarketId: fmt.Sprintf("market-%d", i), + CommitmentAmount: "100", + Fee: "1", + Reference: fmt.Sprintf("lp-%d", i), + }, + ), + ) + } + + return out +} diff --git a/datanode/sqlsubscribers/transfers.go b/datanode/sqlsubscribers/transfers.go index 8b0cd2006e..eb63259b7c 100644 --- a/datanode/sqlsubscribers/transfers.go +++ b/datanode/sqlsubscribers/transfers.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/pkg/errors" ) type TransferEvent interface { @@ -47,9 +35,15 @@ type TransferFeesEvent interface { TransferFees() eventspb.TransferFees } +type TransferFeesDiscountUpdateEvent interface { + events.Event + TransferFeesDiscount() eventspb.TransferFeesDiscount +} + type TransferStore interface { Upsert(ctx context.Context, transfer *entities.Transfer) error UpsertFees(ctx context.Context, tf *entities.TransferFees) error + UpsertFeesDiscount(ctx context.Context, tfd *entities.TransferFeesDiscount) error } type AccountSource interface { @@ -74,6 +68,7 @@ func (rf *Transfer) Types() []events.Type { return []events.Type{ events.TransferEvent, events.TransferFeesEvent, + events.TransferFeesDiscountUpdatedEvent, } } @@ -83,6 +78,8 @@ func (rf *Transfer) Push(ctx context.Context, evt events.Event) error { return rf.consume(ctx, te) case TransferFeesEvent: return rf.handleFees(ctx, te) + case TransferFeesDiscountUpdateEvent: + return rf.handleDiscount(ctx, te) } return errors.New("unsupported event") } @@ -102,3 +99,9 @@ func (rf *Transfer) handleFees(ctx context.Context, e TransferFeesEvent) error { rec := entities.TransferFeesFromProto(&tf, rf.vegaTime) return errors.Wrap(rf.store.UpsertFees(ctx, rec), "inserting transfer fee into SQL store failed") } + +func (rf *Transfer) handleDiscount(ctx context.Context, e TransferFeesDiscountUpdateEvent) error { + tf := e.TransferFeesDiscount() + discount := entities.TransferFeesDiscountFromProto(&tf, rf.vegaTime) + return errors.Wrap(rf.store.UpsertFeesDiscount(ctx, discount), "inserting transfer fee discount update into SQL store failed") +} diff --git a/datanode/sqlsubscribers/vesting_stats_updated.go b/datanode/sqlsubscribers/vesting_stats_updated.go index 495c0baef0..889bdb7c6a 100644 --- a/datanode/sqlsubscribers/vesting_stats_updated.go +++ b/datanode/sqlsubscribers/vesting_stats_updated.go @@ -18,12 +18,11 @@ package sqlsubscribers import ( "context" + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" "github.com/pkg/errors" - - "code.vegaprotocol.io/vega/core/events" - "code.vegaprotocol.io/vega/datanode/entities" ) type ( diff --git a/datanode/sqlsubscribers/volume_discount_stats_updated.go b/datanode/sqlsubscribers/volume_discount_stats_updated.go index a3fd418e84..15750f40d1 100644 --- a/datanode/sqlsubscribers/volume_discount_stats_updated.go +++ b/datanode/sqlsubscribers/volume_discount_stats_updated.go @@ -18,12 +18,11 @@ package sqlsubscribers import ( "context" + "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/datanode/entities" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" "github.com/pkg/errors" - - "code.vegaprotocol.io/vega/core/events" - "code.vegaprotocol.io/vega/datanode/entities" ) type ( diff --git a/datanode/sqlsubscribers/vote.go b/datanode/sqlsubscribers/vote.go index 722c9a33bd..98d338db04 100644 --- a/datanode/sqlsubscribers/vote.go +++ b/datanode/sqlsubscribers/vote.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" ) type VoteEvent interface { diff --git a/datanode/sqlsubscribers/withdrawals.go b/datanode/sqlsubscribers/withdrawals.go index 86392709e7..19f8d7e14d 100644 --- a/datanode/sqlsubscribers/withdrawals.go +++ b/datanode/sqlsubscribers/withdrawals.go @@ -13,28 +13,16 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers import ( "context" - "github.com/pkg/errors" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/datanode/entities" "code.vegaprotocol.io/vega/protos/vega" + + "github.com/pkg/errors" ) type WithdrawalEvent interface { diff --git a/datanode/sqlsubscribers/withdrawals_test.go b/datanode/sqlsubscribers/withdrawals_test.go index d28302bbae..7aed2d7229 100644 --- a/datanode/sqlsubscribers/withdrawals_test.go +++ b/datanode/sqlsubscribers/withdrawals_test.go @@ -13,31 +13,19 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package sqlsubscribers_test import ( "context" "testing" - "github.com/golang/mock/gomock" - "code.vegaprotocol.io/vega/core/events" "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/datanode/sqlsubscribers" "code.vegaprotocol.io/vega/datanode/sqlsubscribers/mocks" "code.vegaprotocol.io/vega/libs/num" + + "github.com/golang/mock/gomock" ) func TestWithdrawal_Push(t *testing.T) { diff --git a/datanode/utils/databasetest/setup.go b/datanode/utils/databasetest/setup.go index d898eee2cd..d9f8fe7d5b 100644 --- a/datanode/utils/databasetest/setup.go +++ b/datanode/utils/databasetest/setup.go @@ -28,11 +28,11 @@ import ( "testing" "time" - "github.com/cenkalti/backoff/v4" - "github.com/jackc/pgx/v4" - "code.vegaprotocol.io/vega/datanode/sqlstore" "code.vegaprotocol.io/vega/logging" + + "github.com/cenkalti/backoff/v4" + "github.com/jackc/pgx/v4" ) var ( diff --git a/datanode/utils/observer.go b/datanode/utils/observer.go index 2b256b473e..673d37c462 100644 --- a/datanode/utils/observer.go +++ b/datanode/utils/observer.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package utils import ( diff --git a/datanode/utils/observer_test.go b/datanode/utils/observer_test.go index 631fe5d9f7..42e3a1a38e 100644 --- a/datanode/utils/observer_test.go +++ b/datanode/utils/observer_test.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package utils_test import ( @@ -32,12 +20,12 @@ import ( "testing" "time" + "code.vegaprotocol.io/vega/datanode/utils" + "code.vegaprotocol.io/vega/logging" + "github.com/stretchr/testify/assert" "go.uber.org/zap" logObserver "go.uber.org/zap/zaptest/observer" - - "code.vegaprotocol.io/vega/datanode/utils" - "code.vegaprotocol.io/vega/logging" ) func newRecordedLogger() (*logging.Logger, *logObserver.ObservedLogs) { diff --git a/datanode/vegatime/time.go b/datanode/vegatime/time.go index 1eb4b866bd..751605a3b3 100644 --- a/datanode/vegatime/time.go +++ b/datanode/vegatime/time.go @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package vegatime import ( diff --git a/doc.go b/doc.go index 420790e242..17feb3d0a8 100644 --- a/doc.go +++ b/doc.go @@ -1,14 +1,18 @@ -// Copyright (c) 2022 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // -// Use of this software is governed by the Business Source License included -// in the LICENSE file and at https://www.mariadb.com/bsl11. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. // -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. // -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // Package vega contains the implementation of the trading core. + package vega diff --git a/docker/data-node.dockerfile b/docker/data-node.dockerfile index a46e19efb1..26318c8fa2 100644 --- a/docker/data-node.dockerfile +++ b/docker/data-node.dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20.8-alpine3.18 AS builder +FROM golang:1.21.5-alpine3.18 AS builder RUN apk add --no-cache git ENV CGO_ENABLED=0 WORKDIR /src diff --git a/docker/vega.dockerfile b/docker/vega.dockerfile index 87b8039315..b6bed74b31 100644 --- a/docker/vega.dockerfile +++ b/docker/vega.dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20.8-alpine3.18 AS builder +FROM golang:1.21.5-alpine3.18 AS builder RUN apk add --no-cache git ENV CGO_ENABLED=0 WORKDIR /src diff --git a/docker/vegawallet.dockerfile b/docker/vegawallet.dockerfile index 5095e47647..37bb3056e2 100644 --- a/docker/vegawallet.dockerfile +++ b/docker/vegawallet.dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20.8-alpine3.18 AS builder +FROM golang:1.21.5-alpine3.18 AS builder RUN apk add --no-cache git WORKDIR /src ADD . . diff --git a/go.mod b/go.mod index 269143e00e..7cee40450b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module code.vegaprotocol.io/vega -go 1.20 +go 1.21 + +toolchain go1.21.5 require ( code.vegaprotocol.io/quant v0.2.5 @@ -9,8 +11,8 @@ require ( github.com/cosmos/iavl v0.20.0 github.com/cucumber/godog v0.12.5 github.com/ethereum/go-ethereum v1.11.6 - github.com/fatih/color v1.13.0 - github.com/fsnotify/fsnotify v1.6.0 + github.com/fatih/color v1.15.0 + github.com/fsnotify/fsnotify v1.7.0 github.com/golang/mock v1.6.1-0.20220512030613-73266f9366fc github.com/golang/protobuf v1.5.3 github.com/google/btree v1.1.2 @@ -18,25 +20,25 @@ require ( github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c github.com/imdario/mergo v0.3.13 github.com/jessevdk/go-flags v1.4.0 - github.com/jinzhu/copier v0.2.8 + github.com/jinzhu/copier v0.3.5 github.com/julienschmidt/httprouter v1.3.0 - github.com/mattn/go-isatty v0.0.18 + github.com/mattn/go-isatty v0.0.19 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.14.0 - github.com/rs/cors v1.8.2 + github.com/prometheus/client_golang v1.16.0 + github.com/rs/cors v1.8.3 github.com/satori/go.uuid v1.2.0 github.com/shopspring/decimal v1.3.1 - github.com/spf13/afero v1.8.2 // indirect - github.com/spf13/cobra v1.6.1 + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.4 github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a go.elastic.co/apm/module/apmhttp v1.8.0 go.nanomsg.org/mangos/v3 v3.2.1 - go.uber.org/zap v1.24.0 - golang.org/x/crypto v0.14.0 - google.golang.org/grpc v1.56.3 - google.golang.org/protobuf v1.30.0 + go.uber.org/zap v1.25.0 + golang.org/x/crypto v0.18.0 + google.golang.org/grpc v1.60.0 + google.golang.org/protobuf v1.31.0 ) require ( @@ -46,7 +48,8 @@ require ( github.com/PaesslerAG/jsonpath v0.1.1 github.com/adrg/xdg v0.4.0 github.com/blang/semver/v4 v4.0.0 - github.com/cenkalti/backoff/v4 v4.2.0 + github.com/cenkalti/backoff/v4 v4.2.1 + github.com/cometbft/cometbft v0.38.5 github.com/cometbft/cometbft-db v0.7.0 github.com/cucumber/messages-go/v16 v16.0.1 github.com/dgraph-io/badger/v2 v2.2007.4 @@ -57,42 +60,43 @@ require ( github.com/fergusstrange/embedded-postgres v1.17.0 github.com/fullstorydev/grpcui v1.3.0 github.com/georgysavva/scany v1.0.0 - github.com/google/go-cmp v0.5.9 + github.com/google/go-cmp v0.6.0 github.com/google/go-github/v50 v50.0.0 github.com/gorilla/websocket v1.5.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.9.0 + github.com/hashicorp/golang-lru/v2 v2.0.7 github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf - github.com/ipfs/boxo v0.8.1 + github.com/ipfs/boxo v0.13.1 github.com/ipfs/go-cid v0.4.1 - github.com/ipfs/go-ipfs-files v0.3.0 + github.com/ipfs/go-libipfs v0.7.0 github.com/ipfs/go-log v1.0.5 github.com/ipfs/interface-go-ipfs-core v0.11.0 - github.com/ipfs/kubo v0.20.0 + github.com/ipfs/kubo v0.23.0 github.com/jackc/pgconn v1.13.0 github.com/jackc/pgtype v1.12.0 github.com/jackc/pgx/v4 v4.17.2 - github.com/klauspost/compress v1.16.4 - github.com/libp2p/go-libp2p v0.27.8 + github.com/klauspost/compress v1.17.0 + github.com/libp2p/go-libp2p v0.31.0 github.com/machinebox/graphql v0.2.2 github.com/mitchellh/mapstructure v1.5.0 github.com/muesli/cancelreader v0.2.2 github.com/muesli/termenv v0.11.0 - github.com/multiformats/go-multiaddr v0.9.0 - github.com/oasisprotocol/curve25519-voi v0.0.0-20220317090546-adb2f9614b17 + github.com/multiformats/go-multiaddr v0.11.0 + github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 github.com/pressly/goose/v3 v3.6.1 github.com/sirupsen/logrus v1.9.0 github.com/soheilhy/cmux v0.1.4 - github.com/tendermint/tendermint v0.35.9 github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 github.com/tyler-smith/go-bip39 v1.1.0 github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa github.com/vegaprotocol/go-slip10 v0.1.0 github.com/vektah/gqlparser/v2 v2.5.1 github.com/wk8/go-ordered-map/v2 v2.0.0 - golang.org/x/sync v0.1.0 - golang.org/x/sys v0.13.0 - golang.org/x/term v0.13.0 + golang.org/x/sync v0.5.0 + golang.org/x/sys v0.16.0 + golang.org/x/term v0.16.0 + google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 gopkg.in/natefinch/lumberjack.v2 v2.0.0 ) @@ -100,10 +104,9 @@ require ( bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc // indirect contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect - github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect + github.com/Jorropo/jsync v1.0.1 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect - github.com/Workiva/go-datastructures v1.0.53 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect @@ -115,10 +118,9 @@ require ( github.com/cockroachdb/redact v1.1.3 // indirect github.com/containerd/cgroups v1.1.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect - github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect + github.com/cosmos/gogoproto v1.4.11 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 // indirect - github.com/creachadair/taskgroup v0.3.2 // indirect github.com/cskr/pubsub v1.0.2 // indirect github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect @@ -135,61 +137,62 @@ require ( github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/getsentry/sentry-go v0.18.0 // indirect github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-pkgz/expirable-cache v0.1.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gofrs/flock v0.8.1 // indirect + github.com/golang/glog v1.1.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gopacket v1.1.19 // indirect - github.com/google/pprof v0.0.0-20230405160723-4a4c7d95572b // indirect - github.com/gtank/merlin v0.1.1 // indirect - github.com/gtank/ristretto255 v0.1.2 // indirect + github.com/google/pprof v0.0.0-20230821062121-407c9e7a662f // indirect github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/golang-lru/v2 v2.0.2 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/huin/goupnp v1.1.0 // indirect + github.com/huin/goupnp v1.2.0 // indirect github.com/ipfs/bbloom v0.0.4 // indirect github.com/ipfs/go-bitfield v1.1.0 // indirect github.com/ipfs/go-block-format v0.1.2 // indirect + github.com/ipfs/go-blockservice v0.5.0 // indirect github.com/ipfs/go-cidutil v0.1.0 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect - github.com/ipfs/go-delegated-routing v0.8.0 // indirect github.com/ipfs/go-ds-badger v0.3.0 // indirect github.com/ipfs/go-ds-flatfs v0.5.1 // indirect github.com/ipfs/go-ds-leveldb v0.5.0 // indirect github.com/ipfs/go-ds-measure v0.2.0 // indirect github.com/ipfs/go-fs-lock v0.0.7 // indirect - github.com/ipfs/go-graphsync v0.14.4 // indirect + github.com/ipfs/go-graphsync v0.15.1 // indirect github.com/ipfs/go-ipfs-blockstore v1.3.0 // indirect - github.com/ipfs/go-ipfs-cmds v0.9.0 // indirect + github.com/ipfs/go-ipfs-cmds v0.10.0 // indirect github.com/ipfs/go-ipfs-delay v0.0.1 // indirect github.com/ipfs/go-ipfs-ds-help v1.1.0 // indirect + github.com/ipfs/go-ipfs-exchange-interface v0.2.0 // indirect github.com/ipfs/go-ipfs-pq v0.0.3 // indirect github.com/ipfs/go-ipfs-redirects-file v0.1.1 // indirect - github.com/ipfs/go-ipfs-util v0.0.2 // indirect + github.com/ipfs/go-ipfs-util v0.0.3 // indirect github.com/ipfs/go-ipld-cbor v0.0.6 // indirect - github.com/ipfs/go-ipld-format v0.4.0 // indirect + github.com/ipfs/go-ipld-format v0.5.0 // indirect github.com/ipfs/go-ipld-git v0.1.1 // indirect - github.com/ipfs/go-ipld-legacy v0.1.1 // indirect - github.com/ipfs/go-libipfs v0.7.0 // indirect + github.com/ipfs/go-ipld-legacy v0.2.1 // indirect github.com/ipfs/go-log/v2 v2.5.1 // indirect + github.com/ipfs/go-merkledag v0.11.0 // indirect github.com/ipfs/go-metrics-interface v0.0.1 // indirect github.com/ipfs/go-path v0.3.1 // indirect github.com/ipfs/go-peertaskqueue v0.8.1 // indirect - github.com/ipfs/go-unixfsnode v1.6.0 // indirect - github.com/ipld/edelweiss v0.2.0 // indirect + github.com/ipfs/go-unixfsnode v1.8.1 // indirect + github.com/ipfs/go-verifcid v0.0.2 // indirect + github.com/ipld/go-car v0.5.0 // indirect + github.com/ipld/go-car/v2 v2.10.2-0.20230622090957-499d0c909d33 // indirect github.com/ipld/go-codec-dagpb v1.6.0 // indirect - github.com/ipld/go-ipld-prime v0.20.0 // indirect + github.com/ipld/go-ipld-prime v0.21.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect - github.com/klauspost/cpuid/v2 v2.2.4 // indirect + github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/koron/go-ssdp v0.0.4 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -199,28 +202,27 @@ require ( github.com/libp2p/go-libp2p-asn-util v0.3.0 // indirect github.com/libp2p/go-libp2p-gostream v0.6.0 // indirect github.com/libp2p/go-libp2p-http v0.5.0 // indirect - github.com/libp2p/go-libp2p-kad-dht v0.23.0 // indirect - github.com/libp2p/go-libp2p-kbucket v0.5.0 // indirect + github.com/libp2p/go-libp2p-kad-dht v0.24.4 // indirect + github.com/libp2p/go-libp2p-kbucket v0.6.3 // indirect github.com/libp2p/go-libp2p-pubsub v0.9.3 // indirect github.com/libp2p/go-libp2p-pubsub-router v0.6.0 // indirect github.com/libp2p/go-libp2p-record v0.2.0 // indirect - github.com/libp2p/go-libp2p-routing-helpers v0.6.2 // indirect + github.com/libp2p/go-libp2p-routing-helpers v0.7.3 // indirect github.com/libp2p/go-libp2p-xor v0.1.0 // indirect github.com/libp2p/go-mplex v0.7.0 // indirect github.com/libp2p/go-msgio v0.3.0 // indirect - github.com/libp2p/go-nat v0.1.0 // indirect + github.com/libp2p/go-nat v0.2.0 // indirect github.com/libp2p/go-netroute v0.2.1 // indirect - github.com/libp2p/go-reuseport v0.2.0 // indirect - github.com/libp2p/go-yamux/v4 v4.0.0 // indirect + github.com/libp2p/go-reuseport v0.4.0 // indirect + github.com/libp2p/go-yamux/v4 v4.0.1 // indirect github.com/libp2p/zeroconf/v2 v2.2.0 // indirect github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect github.com/matryer/is v1.4.0 // indirect github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect - github.com/miekg/dns v1.1.53 // indirect + github.com/miekg/dns v1.1.55 // indirect github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect - github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect - github.com/minio/sha256-simd v1.0.0 // indirect + github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect @@ -228,31 +230,35 @@ require ( github.com/multiformats/go-multiaddr-dns v0.3.1 // indirect github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect github.com/multiformats/go-multibase v0.2.0 // indirect - github.com/multiformats/go-multicodec v0.8.1 // indirect - github.com/multiformats/go-multihash v0.2.1 // indirect + github.com/multiformats/go-multicodec v0.9.0 // indirect + github.com/multiformats/go-multihash v0.2.3 // indirect github.com/multiformats/go-multistream v0.4.1 // indirect github.com/multiformats/go-varint v0.0.7 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/onsi/ginkgo/v2 v2.9.2 // indirect - github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect + github.com/onsi/ginkgo/v2 v2.11.0 // indirect + github.com/opencontainers/runtime-spec v1.1.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/openzipkin/zipkin-go v0.4.1 // indirect + github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 // indirect github.com/polydawn/refmt v0.89.0 // indirect github.com/prometheus/statsd_exporter v0.22.7 // indirect github.com/quic-go/qpack v0.4.0 // indirect - github.com/quic-go/qtls-go1-19 v0.3.3 // indirect - github.com/quic-go/qtls-go1-20 v0.2.3 // indirect - github.com/quic-go/quic-go v0.33.0 // indirect - github.com/quic-go/webtransport-go v0.5.2 // indirect + github.com/quic-go/qtls-go1-20 v0.3.3 // indirect + github.com/quic-go/quic-go v0.38.1 // indirect + github.com/quic-go/webtransport-go v0.5.3 // indirect github.com/raulk/go-watchdog v1.3.0 // indirect - github.com/rogpeppe/go-internal v1.9.0 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/samber/lo v1.36.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/status-im/keycard-go v0.2.0 // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/ucarion/urlpath v0.0.0-20200424170820-7ccc79b76bbb // indirect github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc // indirect + github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 // indirect github.com/whyrusleeping/cbor-gen v0.0.0-20230126041949-52956bd4c9aa // indirect github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect @@ -260,46 +266,46 @@ require ( github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0 // indirect - go.opentelemetry.io/otel v1.14.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 // indirect + go.opentelemetry.io/otel v1.16.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.16.0 // indirect go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 // indirect go.opentelemetry.io/otel/exporters/zipkin v1.14.0 // indirect - go.opentelemetry.io/otel/metric v0.37.0 // indirect - go.opentelemetry.io/otel/sdk v1.14.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect + go.opentelemetry.io/otel/metric v1.16.0 // indirect + go.opentelemetry.io/otel/sdk v1.16.0 // indirect + go.opentelemetry.io/otel/trace v1.16.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect - go.uber.org/dig v1.16.1 // indirect - go.uber.org/fx v1.19.2 // indirect + go.uber.org/dig v1.17.0 // indirect + go.uber.org/fx v1.20.0 // indirect go4.org v0.0.0-20230225012048-214862532bf5 // indirect - golang.org/x/oauth2 v0.7.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/appengine v1.6.7 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect google.golang.org/grpc/examples v0.0.0-20220922155644-a238cebacde4 // indirect gopkg.in/square/go-jose.v2 v2.5.1 // indirect - lukechampine.com/blake3 v1.1.7 // indirect - nhooyr.io/websocket v1.8.7 // indirect + lukechampine.com/blake3 v1.2.1 // indirect ) require ( github.com/StackExchange/wmi v1.2.1 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/armon/go-radix v1.0.0 // indirect - github.com/benbjohnson/clock v1.3.0 // indirect + github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.2.1 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/cucumber/gherkin-go/v19 v19.0.3 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect - github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de // indirect - github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/dgraph-io/ristretto v0.1.1 // indirect + github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 github.com/elastic/go-licenser v0.3.1 // indirect github.com/elastic/go-sysinfo v1.1.1 // indirect @@ -308,17 +314,17 @@ require ( github.com/go-kit/kit v0.12.0 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.1 // indirect - github.com/gofrs/uuid v4.3.0+incompatible // indirect + github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/uuid v1.3.0 + github.com/google/uuid v1.4.0 github.com/gorilla/mux v1.8.0 github.com/gorilla/rpc v1.2.0 github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-memdb v1.3.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect @@ -328,47 +334,45 @@ require ( github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 // indirect - github.com/lib/pq v1.10.6 // indirect + github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/minio/highwayhash v1.0.2 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.5 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/santhosh-tekuri/jsonschema v1.2.4 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/viper v1.13.0 + github.com/spf13/cast v1.6.0 // indirect + github.com/spf13/viper v1.18.1 github.com/stretchr/objx v0.5.0 // indirect - github.com/subosito/gotenv v1.4.1 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/tklauser/numcpus v0.4.0 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect go.elastic.co/apm v1.12.0 // indirect go.elastic.co/fastjson v1.1.0 // indirect go.etcd.io/bbolt v1.3.6 // indirect - go.uber.org/atomic v1.10.0 + go.uber.org/atomic v1.11.0 go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 + golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect - golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.7.0 // indirect - gonum.org/v1/gonum v0.12.0 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.16.0 // indirect + gonum.org/v1/gonum v0.13.0 // indirect + google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 @@ -381,6 +385,4 @@ replace ( github.com/fergusstrange/embedded-postgres => github.com/vegaprotocol/embedded-postgres v1.13.1-0.20221123183204-2e7a2feee5bb github.com/muesli/cancelreader => github.com/vegaprotocol/cancelreader v0.0.0-20230724130739-6f2217a69449 github.com/shopspring/decimal => github.com/vegaprotocol/decimal v1.3.1-uint256 - github.com/tendermint/tendermint => github.com/vegaprotocol/cometbft v0.34.29-patch.1 - github.com/tendermint/tm-db => github.com/cometbft/cometbft-db v0.6.7 ) diff --git a/go.sum b/go.sum index d1152e8aa6..3144025761 100644 --- a/go.sum +++ b/go.sum @@ -7,7 +7,6 @@ cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgo cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -18,9 +17,6 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -39,7 +35,6 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= code.vegaprotocol.io/quant v0.2.5 h1:8h+TTHdz1LCO4oGXt8mbowXszd8CQP1MHlJOkthUp1E= code.vegaprotocol.io/quant v0.2.5/go.mod h1:HEzOoPKj8OIP49r9AZYeo5281M5ygeGWxopwvt8k6Es= contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= @@ -56,25 +51,29 @@ github.com/99designs/gqlgen v0.17.20/go.mod h1:Mja2HI23kWT1VRH09hvWshFgOzKswpO20 github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 h1:cTp8I5+VIoKjsnZuH8vjyaysT/ses3EvZeaV/1UkF2M= github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= -github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Jorropo/jsync v1.0.1 h1:6HgRolFZnsdfzRUj+ImB9og1JYOxQoReSywkHOGSaUU= +github.com/Jorropo/jsync v1.0.1/go.mod h1:jCOZj3vrBCri3bSU3ErUYvevKlnbssrXeCivybS5ABQ= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PaesslerAG/gval v1.0.0 h1:GEKnRwkWDdf9dOmKcNrar9EA1bz1z9DqPIO1+iLzhd8= @@ -88,9 +87,9 @@ github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9 github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= -github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= -github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= @@ -126,8 +125,9 @@ github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= +github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -144,10 +144,11 @@ github.com/btcsuite/btcd v0.23.3 h1:4KH/JKy9WiCd+iUS9Mu0Zp7Dnj17TGdKrg9xc/FGj24= github.com/btcsuite/btcd v0.23.3/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= -github.com/btcsuite/btcd/btcec/v2 v2.2.1 h1:xP60mv8fvp+0khmrN0zTdPC3cNm24rfeE6lh2R/Yv3E= -github.com/btcsuite/btcd/btcec/v2 v2.2.1/go.mod h1:9/CSmJxmuvqzX9Wh2fXMWToLOHhPd11lSPuIupwTkI8= +github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= +github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= -github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= @@ -159,12 +160,13 @@ github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7 github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/ceramicnetwork/go-dag-jose v0.1.0 h1:yJ/HVlfKpnD3LdYP03AHyTvbm3BpPiz2oZiOeReJRdU= github.com/ceramicnetwork/go-dag-jose v0.1.0/go.mod h1:qYA1nYt0X8u4XoMAVoOV3upUVKtrxy/I670Dg5F0wjI= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -179,7 +181,6 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -202,6 +203,8 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lg github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= +github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= +github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= @@ -210,6 +213,7 @@ github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTF github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -223,20 +227,18 @@ github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+ github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= +github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= -github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= -github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= @@ -250,17 +252,19 @@ github.com/cucumber/messages-go/v16 v16.0.0/go.mod h1:EJcyR5Mm5ZuDsKJnT2N9KRnBK3 github.com/cucumber/messages-go/v16 v16.0.1 h1:fvkpwsLgnIm0qugftrw2YwNlio+ABe2Iu94Ap8GMYIY= github.com/cucumber/messages-go/v16 v16.0.1/go.mod h1:EJcyR5Mm5ZuDsKJnT2N9KRnBK30BGjtYotDKpwQ0v6g= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgraph-io/badger v1.6.2 h1:mNw0qs90GVgGGWylh0umH5iag1j6n/PeJtNvL6KY/x8= @@ -268,19 +272,22 @@ github.com/dgraph-io/badger v1.6.2/go.mod h1:JW2yswe3V058sS0kZ2h/AXeDSqFjxnZcRrV github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de h1:t0UHb5vdojIDUqktM6+xJAfScFBsVpXZmqC9dsgJmeA= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1 h1:CaO/zOnF8VvUfEbhRatPcwKVWamvbYd8tQGRWacE9kU= github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/didip/tollbooth/v7 v7.0.1 h1:TkT4sBKoQoHQFPf7blQ54iHrZiTDnr8TceU+MulVAog= github.com/didip/tollbooth/v7 v7.0.1/go.mod h1:VZhDSGl5bDSPj4wPsih3PFa4Uh9Ghv8hgacaTm5PRT4= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= @@ -306,7 +313,6 @@ github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FM github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= @@ -318,35 +324,41 @@ github.com/ethereum/go-ethereum v1.11.6/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSo github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 h1:BBso6MBKW8ncyZLv37o+KNyy0HrrHgfnOaGQC2qvN+A= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= +github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= +github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flynn/noise v1.0.0 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ= github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fullstorydev/grpcui v1.3.0 h1:U65JbxWpUqoHvM+XggUZaFaSQalvvGv5tH/c5yE8mV4= github.com/fullstorydev/grpcui v1.3.0/go.mod h1:JfJ69sgNoY9+tki7Q8Ew6bo185S8Z679zqWV2B7paTk= github.com/fullstorydev/grpcurl v1.8.6 h1:WylAwnPauJIofYSHqqMTC1eEfUIzqzevXyogBxnQquo= @@ -364,15 +376,12 @@ github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkN github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= @@ -392,11 +401,12 @@ github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2C github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= 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-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= @@ -405,13 +415,6 @@ github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-pkgz/expirable-cache v0.1.0 h1:3bw0m8vlTK8qlwz5KXuygNBTkiKRTPrAGXU0Ej2AC1g= github.com/go-pkgz/expirable-cache v0.1.0/go.mod h1:GTrEl0X+q0mPNqN6dtcQXksACnzCBQ5k/k1SwXJsZKs= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= -github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= @@ -420,13 +423,9 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg78 github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= @@ -435,8 +434,8 @@ github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= -github.com/gofrs/uuid v4.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= +github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -450,10 +449,12 @@ github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= +github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= +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/groupcache v0.0.0-20190129154638-5b532d6fd5ef/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= @@ -511,8 +512,8 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-github/v50 v50.0.0 h1:gdO1AeuSZZK4iYWwVbjni7zg8PIQhp7QfmPunr016Jk= github.com/google/go-github/v50 v50.0.0/go.mod h1:Ev4Tre8QoKiolvbpOSG3FIi4Mlon3S2Nt9W5JYqKiwA= @@ -520,12 +521,10 @@ github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -535,25 +534,22 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= -github.com/google/pprof v0.0.0-20230405160723-4a4c7d95572b h1:Qcx5LM0fSiks9uCyFZwDBUasd3lxd1RM0GYpL+Li5o4= -github.com/google/pprof v0.0.0-20230405160723-4a4c7d95572b/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= +github.com/google/pprof v0.0.0-20230821062121-407c9e7a662f h1:pDhu5sgp8yJlEF/g6osliIIpF9K4F5jvkULXa4daRDQ= +github.com/google/pprof v0.0.0-20230821062121-407c9e7a662f/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c h1:7lF+Vz0LqiRidnzC1Oq86fpX1q/iEv2KJdrCtttYjT4= +github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -572,11 +568,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFb github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.9.0 h1:SLkFeyLhrg86Ny5Wme4MGGace7EHfgsb07uWX/QUGEQ= github.com/grpc-ecosystem/grpc-gateway/v2 v2.9.0/go.mod h1:z5aB5opCfWSoAzCrC18hMgjy4oWJ2dPXkn+f3kqTHxI= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= -github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= -github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e h1:3YKHER4nmd7b5qy5t0GWDTwSn4OyRgfAXSmo6VnryBY= @@ -587,6 +578,7 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -605,6 +597,7 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -612,8 +605,8 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru/v2 v2.0.2 h1:Dwmkdr5Nc/oBiXgJS3CDHNhJtIHkuZ3DZF5twqnfBdU= -github.com/hashicorp/golang-lru/v2 v2.0.2/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -626,10 +619,8 @@ github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25 github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c h1:DZfsyhDK1hnSS5lH8l+JggqzEleHteTYfutAiVlSUM8= github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= -github.com/huin/goupnp v1.1.0 h1:gEe0Dp/lZmPZiDFzJJaOfUpOvv2MKUkoBX8lDrn9vKU= -github.com/huin/goupnp v1.1.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/huin/goupnp v1.2.0 h1:uOKW26NG1hsSSbXIZ1IR7XP9Gjd1U8pnLaCMgntmkmY= +github.com/huin/goupnp v1.2.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -638,23 +629,25 @@ github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf h1:FtEj8sfIcaaBfAKrE1Cwb61YDtYq9JxChK1c7AKce7s= github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf/go.mod h1:yrqSXGoD/4EKfF26AOGzscPOgTTJcyAwM2rpixWT+t4= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/boxo v0.8.1 h1:3DkKBCK+3rdEB5t77WDShUXXhktYwH99mkAsgajsKrU= -github.com/ipfs/boxo v0.8.1/go.mod h1:xJ2hVb4La5WyD7GvKYE0lq2g1rmQZoCD2K4WNrV6aZI= +github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI= +github.com/ipfs/boxo v0.13.1/go.mod h1:btrtHy0lmO1ODMECbbEY1pxNtrLilvKSYLoGQt1yYCk= github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA= github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU= +github.com/ipfs/go-bitswap v0.11.0 h1:j1WVvhDX1yhG32NTC9xfxnqycqYIlhzEzLXG/cU1HyQ= +github.com/ipfs/go-bitswap v0.11.0/go.mod h1:05aE8H3XOU+LXpTedeAS0OZpcO1WFsj5niYQH9a1Tmk= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= github.com/ipfs/go-block-format v0.0.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk= github.com/ipfs/go-block-format v0.1.2 h1:GAjkfhVx1f4YTODS6Esrj1wt2HhrtwTnhEr+DyPUaJo= github.com/ipfs/go-block-format v0.1.2/go.mod h1:mACVcrxarQKstUU3Yf/RdwbC4DzPV6++rO2a3d+a/KE= github.com/ipfs/go-blockservice v0.5.0 h1:B2mwhhhVQl2ntW2EIpaWPwSCxSuqr5fFA93Ms4bYLEY= +github.com/ipfs/go-blockservice v0.5.0/go.mod h1:W6brZ5k20AehbmERplmERn8o2Ni3ZZubvAxaIUeaT6w= github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= github.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj6+M= github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= @@ -669,8 +662,6 @@ github.com/ipfs/go-datastore v0.1.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRV github.com/ipfs/go-datastore v0.5.0/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= github.com/ipfs/go-datastore v0.6.0 h1:JKyz+Gvz1QEZw0LsX1IBn+JFCJQH4SJVFtM4uWU0Myk= github.com/ipfs/go-datastore v0.6.0/go.mod h1:rt5M3nNbSO/8q1t4LNkLyUwRs8HupMeN/8O4Vn9YAT8= -github.com/ipfs/go-delegated-routing v0.8.0 h1:faiRi4k8YioTxU2x7+pnrLQjR7jIQhGWN2JvCwcQ/aU= -github.com/ipfs/go-delegated-routing v0.8.0/go.mod h1:18Dds6ZoNTsff9S/7R49Nh2t2YNXIIKR/RLQmBZdjjY= github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ds-badger v0.0.7/go.mod h1:qt0/fWzZDoPW6jpQeqUjR5kBfhDNB65jd9YlmAvpQBk= @@ -685,41 +676,48 @@ github.com/ipfs/go-ds-measure v0.2.0 h1:sG4goQe0KDTccHMyT45CY1XyUbxe5VwTKpg2LjAp github.com/ipfs/go-ds-measure v0.2.0/go.mod h1:SEUD/rE2PwRa4IQEC5FuNAmjJCyYObZr9UvVh8V3JxE= github.com/ipfs/go-fs-lock v0.0.7 h1:6BR3dajORFrFTkb5EpCUFIAypsoxpGpDSVUdFwzgL9U= github.com/ipfs/go-fs-lock v0.0.7/go.mod h1:Js8ka+FNYmgQRLrRXzU3CB/+Csr1BwrRilEcvYrHhhc= -github.com/ipfs/go-graphsync v0.14.4 h1:ysazATpwsIjYtYEZH5CdD/HRaonCJd4pASUtnzESewk= -github.com/ipfs/go-graphsync v0.14.4/go.mod h1:yT0AfjFgicOoWdAlUJ96tQ5AkuGI4r1taIQX/aHbBQo= +github.com/ipfs/go-graphsync v0.15.1 h1:7v4VfRQ/8pKzPuE0wHeMaWhKu8D/RlezIrzvGWIBtHQ= +github.com/ipfs/go-graphsync v0.15.1/go.mod h1:eUIYS0OKkdBbG4vHhfGkY3lZ7h1G5Dlwd+HxTCe18vA= github.com/ipfs/go-ipfs-blockstore v1.3.0 h1:m2EXaWgwTzAfsmt5UdJ7Is6l4gJcaM/A12XwJyvYvMM= github.com/ipfs/go-ipfs-blockstore v1.3.0/go.mod h1:KgtZyc9fq+P2xJUiCAzbRdhhqJHvsw8u2Dlqy2MyRTE= github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ= +github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-chunker v0.0.5 h1:ojCf7HV/m+uS2vhUGWcogIIxiO5ubl5O57Q7NapWLY8= -github.com/ipfs/go-ipfs-cmds v0.9.0 h1:K0VcXg1l1k6aY6sHnoxYcyimyJQbcV1ueXuWgThmK9Q= -github.com/ipfs/go-ipfs-cmds v0.9.0/go.mod h1:SBFHK8WNwC416QWH9Vz1Ql42SSMAOqKpaHUMBu3jpLo= +github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8= +github.com/ipfs/go-ipfs-cmds v0.10.0 h1:ZB4+RgYaH4UARfJY0uLKl5UXgApqnRjKbuCiJVcErYk= +github.com/ipfs/go-ipfs-cmds v0.10.0/go.mod h1:sX5d7jkCft9XLPnkgEfXY0z2UBOB5g6fh/obBS0enJE= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ= github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-ds-help v1.1.0 h1:yLE2w9RAsl31LtfMt91tRZcrx+e61O5mDxFRR994w4Q= github.com/ipfs/go-ipfs-ds-help v1.1.0/go.mod h1:YR5+6EaebOhfcqVCyqemItCLthrpVNot+rsOU/5IatU= github.com/ipfs/go-ipfs-exchange-interface v0.2.0 h1:8lMSJmKogZYNo2jjhUs0izT+dck05pqUw4mWNW9Pw6Y= +github.com/ipfs/go-ipfs-exchange-interface v0.2.0/go.mod h1:z6+RhJuDQbqKguVyslSOuVDhqF9JtTrO3eptSAiW2/Y= github.com/ipfs/go-ipfs-exchange-offline v0.3.0 h1:c/Dg8GDPzixGd0MC8Jh6mjOwU57uYokgWRFidfvEkuA= +github.com/ipfs/go-ipfs-exchange-offline v0.3.0/go.mod h1:MOdJ9DChbb5u37M1IcbrRB02e++Z7521fMxqCNRrz9s= github.com/ipfs/go-ipfs-files v0.3.0 h1:fallckyc5PYjuMEitPNrjRfpwl7YFt69heCOUhsbGxQ= github.com/ipfs/go-ipfs-files v0.3.0/go.mod h1:xAUtYMwB+iu/dtf6+muHNSFQCJG2dSiStR2P6sn9tIM= github.com/ipfs/go-ipfs-posinfo v0.0.1 h1:Esoxj+1JgSjX0+ylc0hUmJCOv6V2vFoZiETLR6OtpRs= +github.com/ipfs/go-ipfs-posinfo v0.0.1/go.mod h1:SwyeVP+jCwiDu0C313l/8jg6ZxM0qqtlt2a0vILTc1A= github.com/ipfs/go-ipfs-pq v0.0.3 h1:YpoHVJB+jzK15mr/xsWC574tyDLkezVrDNeaalQBsTE= github.com/ipfs/go-ipfs-pq v0.0.3/go.mod h1:btNw5hsHBpRcSSgZtiNm/SLj5gYIZ18AKtv3kERkRb4= github.com/ipfs/go-ipfs-redirects-file v0.1.1 h1:Io++k0Vf/wK+tfnhEh63Yte1oQK5VGT2hIEYpD0Rzx8= github.com/ipfs/go-ipfs-redirects-file v0.1.1/go.mod h1:tAwRjCV0RjLTjH8DR/AU7VYvfQECg+lpUy2Mdzv7gyk= +github.com/ipfs/go-ipfs-routing v0.3.0 h1:9W/W3N+g+y4ZDeffSgqhgo7BsBSJwPMcyssET9OWevc= +github.com/ipfs/go-ipfs-routing v0.3.0/go.mod h1:dKqtTFIql7e1zYsEuWLyuOU+E0WJWW8JjbTPLParDWo= github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= -github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= +github.com/ipfs/go-ipfs-util v0.0.3 h1:2RFdGez6bu2ZlZdI+rWfIdbQb1KudQp3VGwPtdNCmE0= +github.com/ipfs/go-ipfs-util v0.0.3/go.mod h1:LHzG1a0Ig4G+iZ26UUOMjHd+lfM84LZCrn17xAKWBvs= github.com/ipfs/go-ipld-cbor v0.0.6 h1:pYuWHyvSpIsOOLw4Jy7NbBkCyzLDcl64Bf/LZW7eBQ0= github.com/ipfs/go-ipld-cbor v0.0.6/go.mod h1:ssdxxaLJPXH7OjF5V4NSjBbcfh+evoR4ukuru0oPXMA= github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= -github.com/ipfs/go-ipld-format v0.2.0/go.mod h1:3l3C1uKoadTPbeNfrDi+xMInYKlx2Cvg1BuydPSdzQs= -github.com/ipfs/go-ipld-format v0.4.0 h1:yqJSaJftjmjc9jEOFYlpkwOLVKv68OD27jFLlSghBlQ= -github.com/ipfs/go-ipld-format v0.4.0/go.mod h1:co/SdBE8h99968X0hViiw1MNlh6fvxxnHpvVLnH7jSM= +github.com/ipfs/go-ipld-format v0.5.0 h1:WyEle9K96MSrvr47zZHKKcDxJ/vlpET6PSiQsAFO+Ds= +github.com/ipfs/go-ipld-format v0.5.0/go.mod h1:ImdZqJQaEouMjCvqCe0ORUS+uoBmf7Hf+EO/jh+nk3M= github.com/ipfs/go-ipld-git v0.1.1 h1:TWGnZjS0htmEmlMFEkA3ogrNCqWjIxwr16x1OsdhG+Y= github.com/ipfs/go-ipld-git v0.1.1/go.mod h1:+VyMqF5lMcJh4rwEppV0e6g4nCCHXThLYYDpKUkJubI= -github.com/ipfs/go-ipld-legacy v0.1.1 h1:BvD8PEuqwBHLTKqlGFTHSwrwFOMkVESEvwIYwR2cdcc= -github.com/ipfs/go-ipld-legacy v0.1.1/go.mod h1:8AyKFCjgRPsQFf15ZQgDB8Din4DML/fOmKZkkFkrIEg= +github.com/ipfs/go-ipld-legacy v0.2.1 h1:mDFtrBpmU7b//LzLSypVrXsD8QxkEWxu5qVxN99/+tk= +github.com/ipfs/go-ipld-legacy v0.2.1/go.mod h1:782MOUghNzMO2DER0FlBR94mllfdCJCkTtDtPM51otM= github.com/ipfs/go-libipfs v0.7.0 h1:Mi54WJTODaOL2/ZSm5loi3SwI3jI2OuFWUrQIkJ5cpM= github.com/ipfs/go-libipfs v0.7.0/go.mod h1:KsIf/03CqhICzyRGyGo68tooiBE2iFbI/rXW7FhAYr0= github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= @@ -732,7 +730,8 @@ github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Ax github.com/ipfs/go-log/v2 v2.3.0/go.mod h1:QqGoj30OTpnKaG/LKTGTxoP2mmQtjVMEnK72gynbe/g= github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= -github.com/ipfs/go-merkledag v0.10.0 h1:IUQhj/kzTZfam4e+LnaEpoiZ9vZF6ldimVlby+6OXL4= +github.com/ipfs/go-merkledag v0.11.0 h1:DgzwK5hprESOzS4O1t/wi6JDpyVQdvm9Bs59N/jqfBY= +github.com/ipfs/go-merkledag v0.11.0/go.mod h1:Q4f/1ezvBiJV0YCIXvt51W/9/kqJGH4I1LsA7+djsM4= github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= github.com/ipfs/go-path v0.3.1 h1:wkeaCWE/NTuuPGlEkLTsED5UkzfKYZpxaFFPgk8ZVLE= @@ -740,25 +739,27 @@ github.com/ipfs/go-path v0.3.1/go.mod h1:eNLsxJEEMxn/CDzUJ6wuNl+6No6tEUhOZcPKsZs github.com/ipfs/go-peertaskqueue v0.8.1 h1:YhxAs1+wxb5jk7RvS0LHdyiILpNmRIRnZVztekOF0pg= github.com/ipfs/go-peertaskqueue v0.8.1/go.mod h1:Oxxd3eaK279FxeydSPPVGHzbwVeHjatZ2GA8XD+KbPU= github.com/ipfs/go-unixfs v0.4.5 h1:wj8JhxvV1G6CD7swACwSKYa+NgtdWC1RUit+gFnymDU= -github.com/ipfs/go-unixfsnode v1.6.0 h1:JOSA02yaLylRNi2rlB4ldPr5VcZhcnaIVj5zNLcOjDo= -github.com/ipfs/go-unixfsnode v1.6.0/go.mod h1:PVfoyZkX1B34qzT3vJO4nsLUpRCyhnMuHBznRcXirlk= +github.com/ipfs/go-unixfs v0.4.5/go.mod h1:BIznJNvt/gEx/ooRMI4Us9K8+qeGO7vx1ohnbk8gjFg= +github.com/ipfs/go-unixfsnode v1.8.1 h1:nEWQl2XL+Zoyh6u0OMzNI8mUeCKLyRgg65WDbTm/oNU= +github.com/ipfs/go-unixfsnode v1.8.1/go.mod h1:HxRu9HYHOjK6HUqFBAi++7DVoWAHn0o4v/nZ/VA+0g8= github.com/ipfs/go-verifcid v0.0.2 h1:XPnUv0XmdH+ZIhLGKg6U2vaPaRDXb9urMyNVCE7uvTs= +github.com/ipfs/go-verifcid v0.0.2/go.mod h1:40cD9x1y4OWnFXbLNJYRe7MpNvWlMn3LZAG5Wb4xnPU= github.com/ipfs/interface-go-ipfs-core v0.11.0 h1:n1tplrwsz7oZXkpkZM5a3MDBxksMfSQ103ej4e+l7NA= github.com/ipfs/interface-go-ipfs-core v0.11.0/go.mod h1:xmnoccUXY7N/Q8AIx0vFqgW926/FAZ8+do/1NTEHKsU= -github.com/ipfs/kubo v0.20.0 h1:bnURAj3pBcz4Mu5Z3OrWNvXl22/Y2xGKIJcStc9jGOA= -github.com/ipfs/kubo v0.20.0/go.mod h1:f9gTqR5sgz4VoAm6ZJsaFu7SivVZPRrOHtrDdI9Brow= -github.com/ipld/edelweiss v0.2.0 h1:KfAZBP8eeJtrLxLhi7r3N0cBCo7JmwSRhOJp3WSpNjk= -github.com/ipld/edelweiss v0.2.0/go.mod h1:FJAzJRCep4iI8FOFlRriN9n0b7OuX3T/S9++NpBDmA4= +github.com/ipfs/kubo v0.23.0 h1:Hc2yRlE7m6OPmrhP3g/aWOBfs8+IzPXUmZMHMSAvNlY= +github.com/ipfs/kubo v0.23.0/go.mod h1:Z2kk6sTjXmRX7eZGVjBG6RDP2Cy/QPwA40XJt2PR0j0= github.com/ipld/go-car v0.5.0 h1:kcCEa3CvYMs0iE5BzD5sV7O2EwMiCIp3uF8tA6APQT8= -github.com/ipld/go-car/v2 v2.9.1-0.20230325062757-fff0e4397a3d h1:22g+x1tgWSXK34i25qjs+afr7basaneEkHaglBshd2g= +github.com/ipld/go-car v0.5.0/go.mod h1:ppiN5GWpjOZU9PgpAZ9HbZd9ZgSpwPMr48fGRJOWmvE= +github.com/ipld/go-car/v2 v2.10.2-0.20230622090957-499d0c909d33 h1:0OZwzSYWIuiKEOXd/2vm5cMcEmmGLFn+1h6lHELCm3s= +github.com/ipld/go-car/v2 v2.10.2-0.20230622090957-499d0c909d33/go.mod h1:sQEkXVM3csejlb1kCCb+vQ/pWBKX9QtvsrysMQjOgOg= github.com/ipld/go-codec-dagpb v1.6.0 h1:9nYazfyu9B1p3NAgfVdpRco3Fs2nFC72DqVsMj6rOcc= github.com/ipld/go-codec-dagpb v1.6.0/go.mod h1:ANzFhfP2uMJxRBr8CE+WQWs5UsNa0pYtmKZ+agnUw9s= -github.com/ipld/go-ipld-prime v0.9.1-0.20210324083106-dc342a9917db/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8= github.com/ipld/go-ipld-prime v0.11.0/go.mod h1:+WIAkokurHmZ/KwzDOMUuoeJgaRQktHtEaLglS3ZeV8= github.com/ipld/go-ipld-prime v0.14.1/go.mod h1:QcE4Y9n/ZZr8Ijg5bGPT0GqYWgZ1704nH0RDcQtgTP0= -github.com/ipld/go-ipld-prime v0.20.0 h1:Ud3VwE9ClxpO2LkCYP7vWPc0Fo+dYdYzgxUJZ3uRG4g= -github.com/ipld/go-ipld-prime v0.20.0/go.mod h1:PzqZ/ZR981eKbgdr3y2DJYeD/8bgMawdGVlJDE8kK+M= +github.com/ipld/go-ipld-prime v0.21.0 h1:n4JmcpOlPDIxBcY037SVfpd1G+Sj1nKZah0m6QH9C2E= +github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOanyMctpPjsvxQ= github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20230102063945-1a409dc236dd h1:gMlw/MhNr2Wtp5RwGdsW23cs+yCuj9k2ON7i9MiJlRo= +github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20230102063945-1a409dc236dd/go.mod h1:wZ8hH8UxeryOs4kJEJaiui/s00hDSbE37OKsL47g+Sw= github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= @@ -832,6 +833,7 @@ github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+ github.com/jbenet/go-cienv v0.1.0 h1:Vc/s0QbQtoxX8MwwSLWWh+xNNZvM3Lw7NsTcHrvvhMc= github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c h1:uUx61FiAa1GI6ZmVd2wf2vULeQZIKG66eybjNXKYCz4= +github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c/go.mod h1:sdx1xVM9UuLw1tXnhJWN3piypTUO3vCIHYmG15KE/dU= github.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABoLk/+KKHggpk= github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= @@ -849,8 +851,8 @@ github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuT github.com/jhump/protoreflect v1.11.1-0.20220215191356-c1d18a52a21d/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98= github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= -github.com/jinzhu/copier v0.2.8 h1:N8MbL5niMwE3P4dOwurJixz5rMkKfujmMRFmAanSzWE= -github.com/jinzhu/copier v0.2.8/go.mod h1:24xnZezI2Yqac9J61UC6/dG/k76ttpq0DdJI3QmUvro= +github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= +github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= @@ -865,7 +867,6 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -885,6 +886,7 @@ github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2 github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -893,22 +895,19 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.4 h1:91KN02FnsOYhuunwU4ssRe8lc2JosWmizWa91B5v1PU= -github.com/klauspost/compress v1.16.4/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= +github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= -github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= +github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= github.com/koron/go-ssdp v0.0.4 h1:1IDwrghSKYM7yLf7XCzbByg2sJ/JcNOZRXS2jczTwz0= github.com/koron/go-ssdp v0.0.4/go.mod h1:oDXq+E5IL5q0U8uSBcoAXzTzInwy5lEgC91HoKtbmZk= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -923,10 +922,9 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -934,8 +932,8 @@ github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= -github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= @@ -948,8 +946,8 @@ github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZ github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= -github.com/libp2p/go-libp2p v0.27.8 h1:IX5x/4yKwyPQeVS2AXHZ3J4YATM9oHBGH1gBc23jBAI= -github.com/libp2p/go-libp2p v0.27.8/go.mod h1:eCFFtd0s5i/EVKR7+5Ki8bM7qwkNW3TPTTSSW9sz8NE= +github.com/libp2p/go-libp2p v0.31.0 h1:LFShhP8F6xthWiBBq3euxbKjZsoRajVEyBS9snfHxYg= +github.com/libp2p/go-libp2p v0.31.0/go.mod h1:W/FEK1c/t04PbRH3fA9i5oucu5YcgrG0JVoBWT1B7Eg= github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= @@ -958,11 +956,11 @@ github.com/libp2p/go-libp2p-gostream v0.6.0 h1:QfAiWeQRce6pqnYfmIVWJFXNdDyfiR/qk github.com/libp2p/go-libp2p-gostream v0.6.0/go.mod h1:Nywu0gYZwfj7Jc91PQvbGU8dIpqbQQkjWgDuOrFaRdA= github.com/libp2p/go-libp2p-http v0.5.0 h1:+x0AbLaUuLBArHubbbNRTsgWz0RjNTy6DJLOxQ3/QBc= github.com/libp2p/go-libp2p-http v0.5.0/go.mod h1:glh87nZ35XCQyFsdzZps6+F4HYI6DctVFY5u1fehwSg= -github.com/libp2p/go-libp2p-kad-dht v0.23.0 h1:sxE6LxLopp79eLeV695n7+c77V/Vn4AMF28AdM/XFqM= -github.com/libp2p/go-libp2p-kad-dht v0.23.0/go.mod h1:oO5N308VT2msnQI6qi5M61wzPmJYg7Tr9e16m5n7uDU= +github.com/libp2p/go-libp2p-kad-dht v0.24.4 h1:ktNiJe7ffsJ1wX3ULpMCwXts99mPqGFSE/Qn1i8pErQ= +github.com/libp2p/go-libp2p-kad-dht v0.24.4/go.mod h1:ybWBJ5Fbvz9sSLkNtXt+2+bK0JB8+tRPvhBbRGHegRU= github.com/libp2p/go-libp2p-kbucket v0.3.1/go.mod h1:oyjT5O7tS9CQurok++ERgc46YLwEpuGoFq9ubvoUOio= -github.com/libp2p/go-libp2p-kbucket v0.5.0 h1:g/7tVm8ACHDxH29BGrpsQlnNeu+6OF1A9bno/4/U1oA= -github.com/libp2p/go-libp2p-kbucket v0.5.0/go.mod h1:zGzGCpQd78b5BNTDGHNDLaTt9aDK/A02xeZp9QeFC4U= +github.com/libp2p/go-libp2p-kbucket v0.6.3 h1:p507271wWzpy2f1XxPzCQG9NiN6R6lHL9GiSErbQQo0= +github.com/libp2p/go-libp2p-kbucket v0.6.3/go.mod h1:RCseT7AH6eJWxxk2ol03xtP9pEHetYSPXOaJnOiD8i0= github.com/libp2p/go-libp2p-peerstore v0.1.4/go.mod h1:+4BDbDiiKf4PzpANZDAT+knVdLxvqh7hXOujessqdzs= github.com/libp2p/go-libp2p-pubsub v0.9.3 h1:ihcz9oIBMaCK9kcx+yHWm3mLAFBMAUsM4ux42aikDxo= github.com/libp2p/go-libp2p-pubsub v0.9.3/go.mod h1:RYA7aM9jIic5VV47WXu4GkcRxRhrdElWf8xtyli+Dzc= @@ -970,9 +968,10 @@ github.com/libp2p/go-libp2p-pubsub-router v0.6.0 h1:D30iKdlqDt5ZmLEYhHELCMRj8b4s github.com/libp2p/go-libp2p-pubsub-router v0.6.0/go.mod h1:FY/q0/RBTKsLA7l4vqC2cbRbOvyDotg8PJQ7j8FDudE= github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= -github.com/libp2p/go-libp2p-routing-helpers v0.6.2 h1:u6SWfX+3LoqqTAFxWVl79RkcIDE3Zsay5d+JohlEBaE= -github.com/libp2p/go-libp2p-routing-helpers v0.6.2/go.mod h1:R289GUxUMzRXIbWGSuUUTPrlVJZ3Y/pPz495+qgXJX8= +github.com/libp2p/go-libp2p-routing-helpers v0.7.3 h1:u1LGzAMVRK9Nqq5aYDVOiq/HaB93U9WWczBzGyAC5ZY= +github.com/libp2p/go-libp2p-routing-helpers v0.7.3/go.mod h1:cN4mJAD/7zfPKXBcs9ze31JGYAZgzdABEm+q/hkswb8= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= +github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= github.com/libp2p/go-libp2p-xor v0.1.0 h1:hhQwT4uGrBcuAkUGXADuPltalOdpf9aag9kaYNT2tLA= github.com/libp2p/go-libp2p-xor v0.1.0/go.mod h1:LSTM5yRnjGZbWNTA/hRwq2gGFrvRIbQJscoIL/u6InY= github.com/libp2p/go-mplex v0.7.0 h1:BDhFZdlk5tbr0oyFq/xv/NPGfjbnrsDam1EvutpBDbY= @@ -980,18 +979,16 @@ github.com/libp2p/go-mplex v0.7.0/go.mod h1:rW8ThnRcYWft/Jb2jeORBmPd6xuG3dGxWN/W github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= github.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM= -github.com/libp2p/go-nat v0.1.0 h1:MfVsH6DLcpa04Xr+p8hmVRG4juse0s3J8HyNWYHffXg= -github.com/libp2p/go-nat v0.1.0/go.mod h1:X7teVkwRHNInVNWQiO/tAiAVRwSr5zoRz4YSTC3uRBM= -github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= +github.com/libp2p/go-nat v0.2.0 h1:Tyz+bUFAYqGyJ/ppPPymMGbIgNRH+WqC5QrT5fKrrGk= +github.com/libp2p/go-nat v0.2.0/go.mod h1:3MJr+GRpRkyT65EpVPBstXLvOlAPzUVlG6Pwg9ohLJk= github.com/libp2p/go-netroute v0.2.1 h1:V8kVrpD8GK0Riv15/7VN6RbUQ3URNZVosw7H2v9tksU= github.com/libp2p/go-netroute v0.2.1/go.mod h1:hraioZr0fhBjG0ZRXJJ6Zj2IVEVNx6tDTFQfSmcq7mQ= github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/libp2p/go-reuseport v0.2.0 h1:18PRvIMlpY6ZK85nIAicSBuXXvrYoSw3dsBAR7zc560= -github.com/libp2p/go-reuseport v0.2.0/go.mod h1:bvVho6eLMm6Bz5hmU0LYN3ixd3nPPvtIlaURZZgOY4k= -github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= -github.com/libp2p/go-yamux/v4 v4.0.0 h1:+Y80dV2Yx/kv7Y7JKu0LECyVdMXm1VUoko+VQ9rBfZQ= -github.com/libp2p/go-yamux/v4 v4.0.0/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5wwmtQP1YB4= +github.com/libp2p/go-reuseport v0.4.0 h1:nR5KU7hD0WxXCJbmw7r2rhRYruNRl2koHw8fQscQm2s= +github.com/libp2p/go-reuseport v0.4.0/go.mod h1:ZtI03j/wO5hZVDFo2jKywN6bYKWLOy8Se6DrI2E1cLU= +github.com/libp2p/go-yamux/v4 v4.0.1 h1:FfDR4S1wj6Bw2Pqbc8Uz7pCxeRBPbwsBbEdfwiCypkQ= +github.com/libp2p/go-yamux/v4 v4.0.1/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5wwmtQP1YB4= github.com/libp2p/zeroconf/v2 v2.2.0 h1:Cup06Jv6u81HLhIj1KasuNM/RHHrJ8T7wOTS4+Tv53Q= github.com/libp2p/zeroconf/v2 v2.2.0/go.mod h1:fuJqLnUwZTshS3U/bMRJ3+ow/v9oid1n0DmyYyNO1Xs= github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= @@ -1002,8 +999,8 @@ github.com/machinebox/graphql v0.2.2 h1:dWKpJligYKhYKO5A2gvNhkJdQMNZeChZYyBbrZkB github.com/machinebox/graphql v0.2.2/go.mod h1:F+kbVMHuwrQ5tYgU9JXlnskM8nOaFxCAEolaQybkjWA= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd h1:br0buuQ854V8u83wA0rVZ8ttrq5CpaPZdvrK0LP2lOk= @@ -1017,7 +1014,6 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -1032,8 +1028,8 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= -github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= @@ -1051,25 +1047,23 @@ github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/le github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/miekg/dns v1.1.53 h1:ZBkuHr5dxHtB1caEOlZTLPo7D3L3TWckgUUs/RHfDxw= -github.com/miekg/dns v1.1.53/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= +github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= +github.com/miekg/dns v1.1.55/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= github.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c h1:bzE/A84HN25pxAuk9Eej1Kz9OUelF97nAc82bDquQI8= github.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c/go.mod h1:0SQS9kMwD2VsyFEB++InYyBJroV/FRmBgcydeSUcJms= github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b h1:z78hV3sbSMAUoyUMM0I83AUIT6Hu17AWfgjzIbtrYFc= github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b/go.mod h1:lxPUiZwKoFL8DUUmalo2yJJUCxbPKtm8OKfqr2/FTNU= github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc h1:PTfri+PuQmWDqERdnNMiD9ZejrlswWrCpBEZgWOiTrc= github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc/go.mod h1:cGKTAVKx4SxOuR/czcZ/E2RSJ3sfHs8FpHhQ5CWMf9s= -github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= +github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= +github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -1083,12 +1077,11 @@ github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= @@ -1107,8 +1100,8 @@ github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a github.com/multiformats/go-multiaddr v0.1.0/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= -github.com/multiformats/go-multiaddr v0.9.0 h1:3h4V1LHIk5w4hJHekMKWALPXErDfz/sggzwC/NcqbDQ= -github.com/multiformats/go-multiaddr v0.9.0/go.mod h1:mI67Lb1EeTOYb8GQfL/7wpIZwc46ElrvzhYnoJOmTT0= +github.com/multiformats/go-multiaddr v0.11.0 h1:XqGyJ8ufbCE0HmTDwx2kPdsrQ36AGPZNZX6s6xfJH10= +github.com/multiformats/go-multiaddr v0.11.0/go.mod h1:gWUm0QLR4thQ6+ZF6SXUw8YjtwQSPapICM+NmCkxHSM= github.com/multiformats/go-multiaddr-dns v0.3.0/go.mod h1:mNzQ4eTGDg0ll1N9jKPOUogZPoJ30W8a7zk66FQPpdQ= github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= @@ -1120,8 +1113,8 @@ github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPw github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= github.com/multiformats/go-multicodec v0.3.0/go.mod h1:qGGaQmioCDh+TeFOnxrbU0DaIPw8yFgAZgFG0V7p1qQ= -github.com/multiformats/go-multicodec v0.8.1 h1:ycepHwavHafh3grIbR1jIXnKCsFm0fqsfEOsJ8NtKE8= -github.com/multiformats/go-multicodec v0.8.1/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= +github.com/multiformats/go-multicodec v0.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg= +github.com/multiformats/go-multicodec v0.9.0/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= @@ -1129,8 +1122,8 @@ github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUj github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.0.15/go.mod h1:D6aZrWNLFTV/ynMpKsNtB40mJzmCl4jb1alC0OvHiHg= github.com/multiformats/go-multihash v0.1.0/go.mod h1:RJlXsxt6vHGaia+S8We0ErjhojtKzPP2AH4+kYM7k84= -github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108= -github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= +github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U= +github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= github.com/multiformats/go-multistream v0.4.1 h1:rFy0Iiyn3YT0asivDUIR05leAdwZq3de4741sbiSdfo= github.com/multiformats/go-multistream v0.4.1/go.mod h1:Mz5eykRVAjJWckE2U78c6xqdtyNUEhKSM0Lwar2p77Q= github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= @@ -1150,8 +1143,8 @@ github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oasisprotocol/curve25519-voi v0.0.0-20220317090546-adb2f9614b17 h1:pxR+aWfo+famermIZvD+SiDQ3qmF7Iy2VPZuEsKTMtA= -github.com/oasisprotocol/curve25519-voi v0.0.0-20220317090546-adb2f9614b17/go.mod h1:WUcXjUd98qaCVFb6j8Xc87MsKeMCXDu9Nk8JRJ9SeC8= +github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae h1:FatpGJD2jmJfhZiFDElaC0QhZUDQnxUeAwTGkfAHN3I= +github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= @@ -1164,20 +1157,24 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= -github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts= +github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= +github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= +github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc= +github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= +github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= @@ -1186,18 +1183,17 @@ github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTm github.com/openzipkin/zipkin-go v0.4.1 h1:kNd/ST2yLLWhaWrkgchya40TJabe8Hioj9udfPcEO5A= github.com/openzipkin/zipkin-go v0.4.1/go.mod h1:qY0VqDSN1pOBN94dBc6w2GJlWLiovAyg7Qt6/I9HecM= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 h1:1/WtZae0yGtPq+TI6+Tv1WTxkukpXeMlviSxvL7SRgk= +github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9/go.mod h1:x3N5drFsm2uilKKuuYo6LdyD8vZAW55sH/9w+pbo1sw= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -1208,11 +1204,10 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.89.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4= github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw= @@ -1228,14 +1223,14 @@ github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -1245,8 +1240,8 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1257,26 +1252,25 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/qtls-go1-19 v0.3.3 h1:wznEHvJwd+2X3PqftRha0SUKmGsnb6dfArMhy9PeJVE= -github.com/quic-go/qtls-go1-19 v0.3.3/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI= -github.com/quic-go/qtls-go1-20 v0.2.3 h1:m575dovXn1y2ATOb1XrRFcrv0F+EQmlowTkoraNkDPI= -github.com/quic-go/qtls-go1-20 v0.2.3/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM= -github.com/quic-go/quic-go v0.33.0 h1:ItNoTDN/Fm/zBlq769lLJc8ECe9gYaW40veHCCco7y0= -github.com/quic-go/quic-go v0.33.0/go.mod h1:YMuhaAV9/jIu0XclDXwZPAsP/2Kgr5yMYhe9oxhhOFA= -github.com/quic-go/webtransport-go v0.5.2 h1:GA6Bl6oZY+g/flt00Pnu0XtivSD8vukOu3lYhJjnGEk= -github.com/quic-go/webtransport-go v0.5.2/go.mod h1:OhmmgJIzTTqXK5xvtuX0oBpLV2GkLWNDA+UeTGJXErU= +github.com/quic-go/qtls-go1-20 v0.3.3 h1:17/glZSLI9P9fDAeyCHBFSWSqJcwx1byhLwP5eUIDCM= +github.com/quic-go/qtls-go1-20 v0.3.3/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= +github.com/quic-go/quic-go v0.38.1 h1:M36YWA5dEhEeT+slOu/SwMEucbYd0YFidxG3KlGPZaE= +github.com/quic-go/quic-go v0.38.1/go.mod h1:ijnZM7JsFIkp4cRyjxJNIzdSfCLmUMg9wdyhGmg+SN4= +github.com/quic-go/webtransport-go v0.5.3 h1:5XMlzemqB4qmOlgIus5zB45AcZ2kCgCy2EptUrfOPWU= +github.com/quic-go/webtransport-go v0.5.3/go.mod h1:OhmmgJIzTTqXK5xvtuX0oBpLV2GkLWNDA+UeTGJXErU= github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk= github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtDqv66NfsMU= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -1284,10 +1278,11 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= -github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= +github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= @@ -1299,6 +1294,10 @@ github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfF github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samber/lo v1.36.0 h1:4LaOxH1mHnbDGhTVE0i1z8v/lWaQW8AIfOD3HU4mSaw= github.com/samber/lo v1.36.0/go.mod h1:HLeWcJRRyLKp3+/XBJvOrerCQn9mhdKMHyd7IRlgeQ8= github.com/santhosh-tekuri/jsonschema v1.2.4 h1:hNhW8e7t+H1vgY+1QeEQpveR6D4+OwKPXCfD2aieJis= @@ -1312,6 +1311,7 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= @@ -1356,31 +1356,31 @@ github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qt github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= -github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= -github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= +github.com/spf13/viper v1.18.1 h1:rmuU42rScKWlhhJDyXZRKJQHXFX02chSVW1IvkPGiVM= +github.com/spf13/viper v1.18.1/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= @@ -1400,12 +1400,12 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a h1:1ur3QoCqvE5fl+nylMaIr9PVV1w343YRDtsy+Rwu7XI= @@ -1414,8 +1414,9 @@ github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cb github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M= -github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= +github.com/thoas/go-funk v0.9.1/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= +github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= @@ -1423,7 +1424,6 @@ github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hM github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= -github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c h1:u6SKchux2yDvFQnDHS3lPnIRmfVJ5Sxy3ao2SIdysLQ= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= @@ -1431,11 +1431,9 @@ github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3C github.com/ucarion/urlpath v0.0.0-20200424170820-7ccc79b76bbb h1:Ywfo8sUltxogBpFuMOFRrrSifO788kAFxmvVw31PtQQ= github.com/ucarion/urlpath v0.0.0-20200424170820-7ccc79b76bbb/go.mod h1:ikPs9bRWicNw3S7XpJ8sK/smGwU9WcSVU3dy9qahYBM= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.8.1/go.mod h1:Z41J9TPoffeoqP0Iza0YbAhGvymRdZAd2uPmZ5JxRdY= @@ -1449,8 +1447,6 @@ github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+ github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vegaprotocol/cancelreader v0.0.0-20230724130739-6f2217a69449 h1:X2/RVmrBNProT5+53SnPJvCAicmHmxrTGwtbnercH3Q= github.com/vegaprotocol/cancelreader v0.0.0-20230724130739-6f2217a69449/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= -github.com/vegaprotocol/cometbft v0.34.29-patch.1 h1:cagbEi+E+0qObyYyI3XcmHfQD4S6qlwKAxK6PDtNEpc= -github.com/vegaprotocol/cometbft v0.34.29-patch.1/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= github.com/vegaprotocol/decimal v1.3.1-uint256 h1:Aj//9joGGuz+dAKo6W/r9Rt1HUXYrjH7oerdCg1q/So= github.com/vegaprotocol/decimal v1.3.1-uint256/go.mod h1:+mRbjtsnpvm5Qw6aiLEf3I6SHICNB4nhMTmH9y8hMtg= github.com/vegaprotocol/embedded-postgres v1.13.1-0.20221123183204-2e7a2feee5bb h1:c7l0ESzXbIbr7ykEjWki6+aG+77gAJua3ETrAxd50HI= @@ -1464,7 +1460,8 @@ github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMI github.com/wangjia184/sortedset v0.0.0-20160527075905-f5d03557ba30/go.mod h1:YkocrP2K2tcw938x9gCOmT5G5eCD6jsTz0SZuyAqwIE= github.com/warpfork/go-testmark v0.3.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= github.com/warpfork/go-testmark v0.9.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= -github.com/warpfork/go-testmark v0.11.0 h1:J6LnV8KpceDvo7spaNU4+DauH2n1x+6RaO2rJrmpQ9U= +github.com/warpfork/go-testmark v0.12.1 h1:rMgCpJfwy1sJ50x0M0NgyphxYYPMOODIJHhsXyEHU0s= +github.com/warpfork/go-testmark v0.12.1/go.mod h1:kHwy7wfvGSPh1rQJYKayD4AbtNaeyZdcGi9tNJTaa5Y= github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSDJfjId/PEGEShv6ugrt4kYsC5UIDaQ= @@ -1472,6 +1469,7 @@ github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvS github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc h1:BCPnHtcboadS0DvysUuJXZ4lWVv5Bh5i7+tbIyi+ck4= github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 h1:5HZfQkwe0mIfyDmc1Em5GqlNRzcdtlv4HTNmdpt7XH0= +github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11/go.mod h1:Wlo/SzPmxVp6vXpGt/zaXhHH0fn4IxgqZc82aKg6bpQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20230126041949-52956bd4c9aa h1:EyA027ZAkuaCLoxVX4r1TZMPy1d31fM6hbfQ4OU4I5o= github.com/whyrusleeping/cbor-gen v0.0.0-20230126041949-52956bd4c9aa/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= @@ -1528,34 +1526,33 @@ go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -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/contrib/instrumentation/net/http/otelhttp v0.40.0 h1:lE9EJyw3/JhrjWH/hEy9FptnalDQgj7vpbgC2KCCCxE= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0/go.mod h1:pcQ3MM3SWvrA71U4GDqv9UFDJ3HQsW7y5ZO3tDTlUdI= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 h1:pginetY7+onl4qN1vl0xW/V/v6OBZ0vVdH+esuJgvmM= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0/go.mod h1:XiYsayHc36K3EByOO6nbAXnAWbrUxdjUROCEeeROOH8= +go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= +go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= go.opentelemetry.io/otel/exporters/jaeger v1.14.0 h1:CjbUNd4iN2hHmWekmOqZ+zSCU+dzZppG8XsV+A3oc8Q= go.opentelemetry.io/otel/exporters/jaeger v1.14.0/go.mod h1:4Ay9kk5vELRrbg5z4cpP9EtmQRFap2Wb0woPG4lujZA= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 h1:/fXHZHGvro6MVqV34fJzDhi7sHGpX3Ej/Qjmfn003ho= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0/go.mod h1:UFG7EBMRdXyFstOwH028U0sVf+AvukSGhF0g8+dmNG8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 h1:TKf2uAs2ueguzLaxOCBXNpHxfO/aC7PAdDsSH0IbeRQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0/go.mod h1:HrbCVv40OOLTABmOn1ZWty6CHXkU8DK/Urc43tHug70= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0/go.mod h1:JgXSGah17croqhJfhByOLVY719k1emAXC8MVhCIJlRs= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 h1:ap+y8RXX3Mu9apKVtOkM6WSFESLM8K3wNQyOU8sWHcc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0/go.mod h1:5w41DY6S9gZrbjuq6Y+753e96WfPha5IcsOSZTtullM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0 h1:3jAYbRHQAqzLjd9I4tzxwJ8Pk/N6AqBcF6m1ZHrxG94= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0/go.mod h1:+N7zNjIJv4K+DeX67XXET0P+eIciESgaFDBqh+ZJFS4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.16.0 h1:iqjq9LAB8aK++sKVcELezzn655JnBNdsDhghU4G/So8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.16.0/go.mod h1:hGXzO5bhhSHZnKvrDaXB82Y9DRFour0Nz/KrBh7reWw= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 h1:sEL90JjOO/4yhquXl5zTAkLLsZ5+MycAgX99SDsxGc8= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0/go.mod h1:oCslUcizYdpKYyS9e8srZEqM6BB8fq41VJBjLAE6z1w= go.opentelemetry.io/otel/exporters/zipkin v1.14.0 h1:reEVE1upBF9tcujgvSqLJS0SrI7JQPaTKP4s4rymnSs= go.opentelemetry.io/otel/exporters/zipkin v1.14.0/go.mod h1:RcjvOAcvhzcufQP8aHmzRw1gE9g/VEZufDdo2w+s4sk= -go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs= -go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= +go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= +go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= +go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= @@ -1564,14 +1561,15 @@ 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= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/dig v1.16.1 h1:+alNIBsl0qfY0j6epRubp/9obgtrObRAc5aD+6jbWY8= -go.uber.org/dig v1.16.1/go.mod h1:557JTAUZT5bUK0SvCwikmLPPtdQhfvLYtO5tJgQSbnk= -go.uber.org/fx v1.19.2 h1:SyFgYQFr1Wl0AYstE8vyYIzP4bFz2URrScjwC4cwUvY= -go.uber.org/fx v1.19.2/go.mod h1:43G1VcqSzbIv77y00p1DRAsyZS8WdzuYdhZXmEUkMyQ= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/dig v1.17.0 h1:5Chju+tUvcC+N7N6EV08BJz41UZuO3BmHcN4A287ZLI= +go.uber.org/dig v1.17.0/go.mod h1:rTxpf7l5I0eBTlE6/9RL+lDybC7WFwY2QH55ZSjy1mU= +go.uber.org/fx v1.20.0 h1:ZMC/pnRvhsthOZh9MZjMq5U8Or3mA9zBSPaLnzs3ihQ= +go.uber.org/fx v1.20.0/go.mod h1:qCUj0btiR3/JnanEr1TYEePfSw6o/4qYJscgvzQ5Ub0= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= @@ -1585,8 +1583,8 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= +go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= go4.org v0.0.0-20230225012048-214862532bf5 h1:nifaUDeh+rPaBCMPMQHZmvJf+QdpLFnuQPwx+LxVmtc= @@ -1607,7 +1605,6 @@ golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1615,15 +1612,12 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1638,8 +1632,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb h1:c0vyKkb6yr3KR7jEfJaOSv4lG7xPkbN6r52aJz1d8a8= +golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1671,18 +1665,15 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1722,10 +1713,7 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= @@ -1742,8 +1730,8 @@ golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1751,15 +1739,11 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= 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= @@ -1774,8 +1758,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1791,11 +1775,9 @@ golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1837,16 +1819,11 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1854,7 +1831,6 @@ golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426080607-c94f62235c83/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1871,22 +1847,21 @@ golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1896,15 +1871,17 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1966,23 +1943,15 @@ golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= +golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1995,8 +1964,8 @@ golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNq gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.1/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= -gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o= -gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= +gonum.org/v1/gonum v0.13.0 h1:a0T3bh+7fhRyqeNbiC3qVHYmkiQgit3wnNan/2c0HMM= +gonum.org/v1/gonum v0.13.0/go.mod h1:/WPYRckkfWrhWefxyYTfrTtQR0KH4iyHNuzxqXAKyAU= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= @@ -2019,9 +1988,6 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2030,8 +1996,8 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -2068,17 +2034,14 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= @@ -2095,18 +2058,15 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -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.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= -google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.60.0 h1:6FQAR0kM31P6MRdeluor2w2gPaS4SVNrD/DNTxrQ15k= +google.golang.org/grpc v1.60.0/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= google.golang.org/grpc/examples v0.0.0-20220922155644-a238cebacde4 h1:amnFevWTnUHeTiu5q2q/2zSKDvMYFT7gDHYj1MrAnzE= google.golang.org/grpc/examples v0.0.0-20220922155644-a238cebacde4/go.mod h1:gxndsbNG1n4TZcHGgsYEfVGnTxqfEdfiDv6/DADXX9o= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -2125,8 +2085,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2187,20 +2147,28 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= -lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= -lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= +lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI= +lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= lukechampine.com/uint128 v1.1.1 h1:pnxCASz787iMf+02ssImqk6OLt+Z5QHMoZyUXR4z6JU= +lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.36.0 h1:0kmRkTmqNidmu3c7BNDSdVHCxXCkWLmWmCIVX4LUboo= +modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= modernc.org/ccgo/v3 v3.16.6 h1:3l18poV+iUemQ98O3X5OMr97LOqlzis+ytivU4NqGhA= +modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= modernc.org/libc v1.16.7 h1:qzQtHhsZNpVPpeCu+aMIQldXeV1P0vRhSqCL0nOIJOA= +modernc.org/libc v1.16.7/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= modernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8= +modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/memory v1.1.1 h1:bDOL0DIDLQv7bWhP3gMvIrnoFw+Eo6F7a2QK9HPDiFU= +modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= modernc.org/opt v0.1.1 h1:/0RX92k9vwVeDXj+Xn23DKp2VJubL7k8qNffND6qn3A= +modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/sqlite v1.17.3 h1:iE+coC5g17LtByDYDWKpR6m2Z9022YrSh3bumwOnIrI= +modernc.org/sqlite v1.17.3/go.mod h1:10hPVYar9C0kfXuTWGz8s0XtB8uAGymUy51ZzStYe3k= modernc.org/strutil v1.1.1 h1:xv+J1BXY3Opl2ALrBwyfEikFAj8pmqcpnfmuwUwcozs= +modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= -nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= -nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= pgregory.net/rapid v0.4.7 h1:MTNRktPuv5FNqOO151TM9mDTa+XHcX6ypYeISDVD14g= pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/libs/broker/subscriber.go b/libs/broker/subscriber.go index e5378c13d9..b741c1b4bc 100644 --- a/libs/broker/subscriber.go +++ b/libs/broker/subscriber.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/close/closer.go b/libs/close/closer.go index d57f44b297..17ff64fad6 100644 --- a/libs/close/closer.go +++ b/libs/close/closer.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/config/dbconnection.go b/libs/config/dbconnection.go index 052785dc73..a2d57e20e7 100644 --- a/libs/config/dbconnection.go +++ b/libs/config/dbconnection.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -20,6 +20,7 @@ import ( "strconv" "code.vegaprotocol.io/vega/libs/config/encoding" + "github.com/jackc/pgx/v4/pgxpool" ) diff --git a/libs/config/encoding/encoding.go b/libs/config/encoding/encoding.go index cf21f26b75..50e69f99b6 100644 --- a/libs/config/encoding/encoding.go +++ b/libs/config/encoding/encoding.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -21,6 +21,7 @@ import ( "time" "code.vegaprotocol.io/vega/logging" + "github.com/inhies/go-bytesize" ) diff --git a/libs/context/context.go b/libs/context/context.go index 6915ed5991..a28426e3c5 100644 --- a/libs/context/context.go +++ b/libs/context/context.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -77,12 +77,12 @@ func TraceIDFromContext(ctx context.Context) (context.Context, string) { return ctx, stID } -func BlockHeightFromContext(ctx context.Context) (int64, error) { +func BlockHeightFromContext(ctx context.Context) (uint64, error) { hv := ctx.Value(blockHeightKey) if hv == nil { return 0, ErrBlockHeightMissing } - h, ok := hv.(int64) + h, ok := hv.(uint64) if !ok { return 0, ErrBlockHeightMissing } @@ -123,7 +123,7 @@ func WithTraceID(ctx context.Context, tID string) context.Context { return context.WithValue(ctx, traceIDKey, tID) } -func WithBlockHeight(ctx context.Context, h int64) context.Context { +func WithBlockHeight(ctx context.Context, h uint64) context.Context { return context.WithValue(ctx, blockHeightKey, h) } @@ -145,6 +145,17 @@ func WithSnapshotInfo(ctx context.Context, version string, upgrade bool) context return context.WithValue(ctx, snapshotKey, snapshotInfo{version: version, upgrade: upgrade}) } +// InProgressSnapshotRestore returns whether the data in the contexts tells us that a +// snapshot restore is in progress. +func InProgressSnapshotRestore(ctx context.Context) bool { + v := ctx.Value(snapshotKey) + if v == nil { + return false + } + _, ok := v.(snapshotInfo) + return ok +} + // InProgressUpgradeFrom returns whether the data in the contexts tells us that the // node is restoring from a snapshot taken for a protocol-upgrade by the given version. func InProgressUpgradeFrom(ctx context.Context, from string) bool { diff --git a/libs/context/context_test.go b/libs/context/context_test.go index 657845baa2..5b222088c3 100644 --- a/libs/context/context_test.go +++ b/libs/context/context_test.go @@ -1,14 +1,17 @@ -// Copyright (c) 2022 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // -// Use of this software is governed by the Business Source License included -// in the LICENSE.VEGA file and at https://www.mariadb.com/bsl11. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. // -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. // -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package context_test @@ -25,12 +28,15 @@ func TestRestoreDataInContext(t *testing.T) { ctx := vgcontext.WithSnapshotInfo(context.Background(), "v0.74.0", true) assert.True(t, vgcontext.InProgressUpgradeFrom(ctx, "v0.74.0")) assert.False(t, vgcontext.InProgressUpgradeFrom(ctx, "v0.74.1")) + assert.True(t, vgcontext.InProgressSnapshotRestore(ctx)) ctx = vgcontext.WithSnapshotInfo(context.Background(), "v0.74.0", false) assert.False(t, vgcontext.InProgressUpgradeFrom(ctx, "v0.74.0")) assert.False(t, vgcontext.InProgressUpgradeFrom(ctx, "v0.74.1")) + assert.True(t, vgcontext.InProgressSnapshotRestore(ctx)) ctx = context.Background() assert.False(t, vgcontext.InProgressUpgradeFrom(ctx, "v0.74.0")) assert.False(t, vgcontext.InProgressUpgradeFrom(ctx, "v0.74.1")) + assert.False(t, vgcontext.InProgressSnapshotRestore(ctx)) } diff --git a/libs/crypto/encryption.go b/libs/crypto/encryption.go index 0160102280..967b8e0223 100644 --- a/libs/crypto/encryption.go +++ b/libs/crypto/encryption.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/crypto/encryption_test.go b/libs/crypto/encryption_test.go index 532579de6e..abfe867d6a 100644 --- a/libs/crypto/encryption_test.go +++ b/libs/crypto/encryption_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/crypto/ethereum.go b/libs/crypto/ethereum.go index 27c4cdb82f..52081f2144 100644 --- a/libs/crypto/ethereum.go +++ b/libs/crypto/ethereum.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/crypto/hash.go b/libs/crypto/hash.go index b9119f6f6d..146065e039 100644 --- a/libs/crypto/hash.go +++ b/libs/crypto/hash.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/crypto/hash_test.go b/libs/crypto/hash_test.go index ec3a2bd725..6d1c65e3a2 100644 --- a/libs/crypto/hash_test.go +++ b/libs/crypto/hash_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/crypto/nonce.go b/libs/crypto/nonce.go index d7fc627e9c..d2328042bd 100644 --- a/libs/crypto/nonce.go +++ b/libs/crypto/nonce.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/crypto/proof_of_work.go b/libs/crypto/proof_of_work.go index 591d451f5b..cb2640c9da 100644 --- a/libs/crypto/proof_of_work.go +++ b/libs/crypto/proof_of_work.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/crypto/proof_of_work_test.go b/libs/crypto/proof_of_work_test.go index b752773151..c31a892667 100644 --- a/libs/crypto/proof_of_work_test.go +++ b/libs/crypto/proof_of_work_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -20,6 +20,7 @@ import ( "testing" "code.vegaprotocol.io/vega/libs/crypto" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/libs/crypto/public_key.go b/libs/crypto/public_key.go index 91ce6720d3..d762431ca3 100644 --- a/libs/crypto/public_key.go +++ b/libs/crypto/public_key.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/crypto/signature/signature.go b/libs/crypto/signature/signature.go index 9a52dbfa39..f35a3a644e 100644 --- a/libs/crypto/signature/signature.go +++ b/libs/crypto/signature/signature.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/encoding/encoding.go b/libs/encoding/encoding.go index 9ae6986aac..6f0687381e 100644 --- a/libs/encoding/encoding.go +++ b/libs/encoding/encoding.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/errors/errors.go b/libs/errors/errors.go index aec56682fa..6125fbf9d0 100644 --- a/libs/errors/errors.go +++ b/libs/errors/errors.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/fmt/print.go b/libs/fmt/print.go index 52f7cf424c..878561e0c6 100644 --- a/libs/fmt/print.go +++ b/libs/fmt/print.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/fs/fs.go b/libs/fs/fs.go index 1a7e4d8de7..74d7a3ef72 100644 --- a/libs/fs/fs.go +++ b/libs/fs/fs.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/fs/fs_test.go b/libs/fs/fs_test.go index 3a87248bc6..b44699365f 100644 --- a/libs/fs/fs_test.go +++ b/libs/fs/fs_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/http/cors.go b/libs/http/cors.go index 1d829e128b..c1973d9dc6 100644 --- a/libs/http/cors.go +++ b/libs/http/cors.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/http/cors_test.go b/libs/http/cors_test.go index abedb3ace9..ad20e83012 100644 --- a/libs/http/cors_test.go +++ b/libs/http/cors_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/http/rate_limit.go b/libs/http/rate_limit.go index 347d7176fc..01bf169b91 100644 --- a/libs/http/rate_limit.go +++ b/libs/http/rate_limit.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/http/rate_limit_test.go b/libs/http/rate_limit_test.go index 4e74064fbe..87fd14202e 100644 --- a/libs/http/rate_limit_test.go +++ b/libs/http/rate_limit_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/http/remoteaddr.go b/libs/http/remoteaddr.go index 2cc1c7f7a0..b42d46dfde 100644 --- a/libs/http/remoteaddr.go +++ b/libs/http/remoteaddr.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/io/countwriter.go b/libs/io/countwriter.go index 927bd84609..39163edfa8 100644 --- a/libs/io/countwriter.go +++ b/libs/io/countwriter.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/job/runner.go b/libs/job/runner.go index 5f8a09c9bd..427c00de8e 100644 --- a/libs/job/runner.go +++ b/libs/job/runner.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/json/json.go b/libs/json/json.go index b30b7d6ca3..b203ed6fc4 100644 --- a/libs/json/json.go +++ b/libs/json/json.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/jsonrpc/api.go b/libs/jsonrpc/api.go index 85d737ae9f..012437943b 100644 --- a/libs/jsonrpc/api.go +++ b/libs/jsonrpc/api.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/jsonrpc/command.go b/libs/jsonrpc/command.go index 0186a3cf0b..80c0e54999 100644 --- a/libs/jsonrpc/command.go +++ b/libs/jsonrpc/command.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/jsonrpc/dispatcher.go b/libs/jsonrpc/dispatcher.go index df68353556..e1794028bb 100644 --- a/libs/jsonrpc/dispatcher.go +++ b/libs/jsonrpc/dispatcher.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/jsonrpc/dispatcher_test.go b/libs/jsonrpc/dispatcher_test.go index 7308a08fe2..9b13fc31e0 100644 --- a/libs/jsonrpc/dispatcher_test.go +++ b/libs/jsonrpc/dispatcher_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/libs/jsonrpc" "code.vegaprotocol.io/vega/libs/jsonrpc/mocks" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/libs/jsonrpc/request.go b/libs/jsonrpc/request.go index 91961e4b87..71b986bd7f 100644 --- a/libs/jsonrpc/request.go +++ b/libs/jsonrpc/request.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/jsonrpc/response.go b/libs/jsonrpc/response.go index 036fdb593f..4a6f894173 100644 --- a/libs/jsonrpc/response.go +++ b/libs/jsonrpc/response.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/memory/memory.go b/libs/memory/memory.go index 33c6dd337e..972bbc028d 100644 --- a/libs/memory/memory.go +++ b/libs/memory/memory.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/net/pipe/addr.go b/libs/net/pipe/addr.go index df02254f92..12cf950da9 100644 --- a/libs/net/pipe/addr.go +++ b/libs/net/pipe/addr.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/net/pipe/pipe.go b/libs/net/pipe/pipe.go index 13c0eb581f..99211a4045 100644 --- a/libs/net/pipe/pipe.go +++ b/libs/net/pipe/pipe.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/num/compare.go b/libs/num/compare.go index 1559793de4..af9ec849bd 100644 --- a/libs/num/compare.go +++ b/libs/num/compare.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/num/decimal.go b/libs/num/decimal.go index 37e2c1c6ba..8ab3132657 100644 --- a/libs/num/decimal.go +++ b/libs/num/decimal.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/num/int.go b/libs/num/int.go index f6da8bcdb0..b86412bc8c 100644 --- a/libs/num/int.go +++ b/libs/num/int.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/num/int_test.go b/libs/num/int_test.go index 403f8ff5d6..6b52d90398 100644 --- a/libs/num/int_test.go +++ b/libs/num/int_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -20,6 +20,7 @@ import ( "testing" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" ) diff --git a/libs/num/numeric.go b/libs/num/numeric.go index c3b0c3377a..604a31b953 100644 --- a/libs/num/numeric.go +++ b/libs/num/numeric.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/num/numeric_test.go b/libs/num/numeric_test.go index 79ef098de4..8edb9926d5 100644 --- a/libs/num/numeric_test.go +++ b/libs/num/numeric_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -19,6 +19,7 @@ import ( "testing" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/libs/num/uint.go b/libs/num/uint.go index 9d707ca108..4e0863f6f0 100644 --- a/libs/num/uint.go +++ b/libs/num/uint.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -16,8 +16,11 @@ package num import ( + "database/sql/driver" + "errors" "fmt" "math/big" + "sort" "github.com/holiman/uint256" ) @@ -142,6 +145,52 @@ func UintFromUint64(ui uint64) *Uint { return u } +// UnmarshalJSON implements the json.Unmarshaler interface. +func (u *Uint) UnmarshalJSON(numericBytes []byte) error { + if string(numericBytes) == "null" { + return nil + } + + str, err := unquoteIfQuoted(numericBytes) + if err != nil { + return fmt.Errorf("error decoding string '%s': %s", numericBytes, err) + } + + numeric, overflown := UintFromString(str, 10) + if overflown { + return errors.New("overflowing value") + } + *u = *numeric + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (u Uint) MarshalJSON() ([]byte, error) { + return []byte(u.String()), nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. As a string representation +// is already used when encoding to text, this method stores that string as []byte. +func (u *Uint) UnmarshalBinary(data []byte) error { + u.u.SetBytes(data) + return nil +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface. +func (u Uint) MarshalBinary() (data []byte, err error) { + return u.u.Bytes(), nil +} + +// Scan implements the sql.Scanner interface for database deserialization. +func (u *Uint) Scan(value interface{}) error { + return u.u.Scan(value) +} + +// Value implements the driver.Valuer interface for database serialization. +func (u Uint) Value() (driver.Value, error) { + return u.String(), nil +} + // ToDecimal returns the value of the Uint as a Decimal. func (u *Uint) ToDecimal() Decimal { return DecimalFromUint(u) @@ -484,3 +533,49 @@ func UintToString(u *Uint) string { } return "0" } + +// Median calculates the median of the slice of uints. +// it is assumed that no nils are allowed, no zeros are allowed. +func Median(nums []*Uint) *Uint { + if nums == nil { + return nil + } + numsCopy := make([]*Uint, 0, len(nums)) + for _, u := range nums { + if u != nil && !u.IsZero() { + numsCopy = append(numsCopy, u.Clone()) + } + } + sort.Slice(numsCopy, func(i, j int) bool { + return numsCopy[i].LT(numsCopy[j]) + }) + if len(numsCopy) == 0 { + return nil + } + + mid := len(numsCopy) / 2 + if len(numsCopy)%2 == 1 { + return numsCopy[mid] + } + return UintZero().Div(Sum(numsCopy[mid], numsCopy[mid-1]), NewUint(2)) +} + +func unquoteIfQuoted(value interface{}) (string, error) { + var bytes []byte + + switch v := value.(type) { + case string: + bytes = []byte(v) + case []byte: + bytes = v + default: + return "", fmt.Errorf("could not convert value '%+v' to byte array of type '%T'", + value, value) + } + + // If the amount is quoted, strip the quotes + if len(bytes) > 2 && bytes[0] == '"' && bytes[len(bytes)-1] == '"' { + bytes = bytes[1 : len(bytes)-1] + } + return string(bytes), nil +} diff --git a/libs/num/uint_test.go b/libs/num/uint_test.go index e9624b678c..15854d941d 100644 --- a/libs/num/uint_test.go +++ b/libs/num/uint_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -21,7 +21,9 @@ import ( "testing" "code.vegaprotocol.io/vega/libs/num" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestUint256Constructors(t *testing.T) { @@ -45,6 +47,47 @@ func TestUint256Constructors(t *testing.T) { }) } +func TestUint256Serialization(t *testing.T) { + t.Run("JSON", func(t *testing.T) { + origin := "123456789123456789123456789" + n, _ := num.UintFromString(origin, 10) + + // Serialize. + serialized, err := n.MarshalJSON() + require.NoError(t, err) + + // Deserialize. + require.NoError(t, n.UnmarshalJSON(serialized)) + assert.Equal(t, origin, n.String()) + }) + + t.Run("Binary", func(t *testing.T) { + origin := "123456789123456789123456789" + n, _ := num.UintFromString(origin, 10) + + // Serialize. + serialized, err := n.MarshalBinary() + require.NoError(t, err) + + // Deserialize. + require.NoError(t, n.UnmarshalBinary(serialized)) + assert.Equal(t, origin, n.String()) + }) + + t.Run("Database", func(t *testing.T) { + origin := "123456789123456789123456789" + n, _ := num.UintFromString(origin, 10) + + // Serialize. + serialized, err := n.Value() + require.NoError(t, err) + + // Deserialize. + require.NoError(t, n.Scan(serialized)) + assert.Equal(t, origin, n.String()) + }) +} + func TestUint256Clone(t *testing.T) { var ( expect1 uint64 = 42 @@ -194,3 +237,10 @@ func TestDeltaI(t *testing.T) { r2 := num.UintZero().DeltaI(n2.Clone(), n1.Clone()) assert.Equal(t, "15", r2.String()) } + +func TestMedian(t *testing.T) { + require.Nil(t, num.Median(nil)) + require.Equal(t, "10", num.Median([]*num.Uint{num.NewUint(10)}).String()) + require.Equal(t, "10", num.Median([]*num.Uint{num.NewUint(10), num.NewUint(5), num.NewUint(17)}).String()) + require.Equal(t, "11", num.Median([]*num.Uint{num.NewUint(10), num.NewUint(5), num.NewUint(12), num.NewUint(17)}).String()) +} diff --git a/libs/num/wrapped.go b/libs/num/wrapped.go index a0ec484c4c..3143599fdc 100644 --- a/libs/num/wrapped.go +++ b/libs/num/wrapped.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/os/tty.go b/libs/os/tty.go index 6303b7e1d5..88e8dd49f2 100644 --- a/libs/os/tty.go +++ b/libs/os/tty.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/pprof/pprof.go b/libs/pprof/pprof.go index 2ec6907b4c..c694835c00 100644 --- a/libs/pprof/pprof.go +++ b/libs/pprof/pprof.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -18,21 +18,22 @@ package pprof import ( "fmt" "net/http" - "time" - - // import pprof globally because it's used to init the package - // and this comment is mostly here as well in order to make - // golint very many much happy. - _ "net/http/pprof" "os" "path/filepath" "runtime" "runtime/pprof" + "time" "code.vegaprotocol.io/vega/libs/config/encoding" vgfs "code.vegaprotocol.io/vega/libs/fs" "code.vegaprotocol.io/vega/logging" + "github.com/felixge/fgprof" + + // import pprof globally because it's used to init the package + // and this comment is mostly here as well in order to make + // golint very many much happy. + _ "net/http/pprof" ) const ( diff --git a/libs/proto/proto.go b/libs/proto/proto.go index 4e45cfb027..08b9f9adc1 100644 --- a/libs/proto/proto.go +++ b/libs/proto/proto.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/ptr/ptr.go b/libs/ptr/ptr.go index 60437aa84a..3032f94587 100644 --- a/libs/ptr/ptr.go +++ b/libs/ptr/ptr.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/rand/init.go b/libs/rand/init.go index 58ff33665f..03fd691b4a 100644 --- a/libs/rand/init.go +++ b/libs/rand/init.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/rand/nonce.go b/libs/rand/nonce.go index 6218ff8a13..dc0be2d9fb 100644 --- a/libs/rand/nonce.go +++ b/libs/rand/nonce.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/rand/nonce_test.go b/libs/rand/nonce_test.go index a8edf51fe2..354fd77b5a 100644 --- a/libs/rand/nonce_test.go +++ b/libs/rand/nonce_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/rand/rand.go b/libs/rand/rand.go index 57c46745bb..6d97f371a4 100644 --- a/libs/rand/rand.go +++ b/libs/rand/rand.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/rand/rand_test.go b/libs/rand/rand_test.go index 923e3d3697..bcbc77e1b7 100644 --- a/libs/rand/rand_test.go +++ b/libs/rand/rand_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/reflect/reflect.go b/libs/reflect/reflect.go index a4256bf51a..49fd8b4e52 100644 --- a/libs/reflect/reflect.go +++ b/libs/reflect/reflect.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/slice/slice.go b/libs/slice/slice.go index 95654383a2..3e5eea1770 100644 --- a/libs/slice/slice.go +++ b/libs/slice/slice.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/stringer/stringer.go b/libs/stringer/stringer.go index 78082d3afc..c2e3fefa08 100644 --- a/libs/stringer/stringer.go +++ b/libs/stringer/stringer.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -16,33 +16,26 @@ package stringer import ( + "fmt" "reflect" - "strconv" - - "code.vegaprotocol.io/vega/libs/num" ) type Stringer interface { String() string } -func ReflectPointerToString(obj Stringer) string { - if obj == nil || reflect.ValueOf(obj).Kind() == reflect.Ptr && reflect.ValueOf(obj).IsNil() { +func ObjToString(v Stringer) string { + if v == nil || reflect.ValueOf(v).Kind() == reflect.Ptr && reflect.ValueOf(v).IsNil() { return "nil" } - return obj.String() -} -func UintPointerToString(obj *num.Uint) string { - if obj == nil { - return "nil" - } - return obj.String() + return v.String() } -func Int64PointerToString(n *int64) string { - if n == nil { +func PtrToString[T any](v *T) string { + if v == nil { return "nil" } - return strconv.FormatInt(*n, 10) + + return fmt.Sprintf("%v", *v) } diff --git a/libs/stringer/stringer_test.go b/libs/stringer/stringer_test.go index c2be619eb2..1e23ea4a8d 100644 --- a/libs/stringer/stringer_test.go +++ b/libs/stringer/stringer_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -20,10 +20,11 @@ import ( "code.vegaprotocol.io/vega/libs/num" "code.vegaprotocol.io/vega/libs/stringer" + "github.com/stretchr/testify/assert" ) -func TestReflectPointerToString(t *testing.T) { +func TestToString(t *testing.T) { tcs := []struct { name string stringer stringer.Stringer @@ -39,7 +40,7 @@ func TestReflectPointerToString(t *testing.T) { expected: "nil", }, { name: "with existing struct", - stringer: dummyStringer{}, + stringer: &dummyStringer{}, expected: "stringer", }, } @@ -47,7 +48,7 @@ func TestReflectPointerToString(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(tt *testing.T) { // when - str := stringer.ReflectPointerToString(tc.stringer) + str := stringer.ObjToString(tc.stringer) // then assert.Equal(tt, tc.expected, str) @@ -55,7 +56,7 @@ func TestReflectPointerToString(t *testing.T) { } } -func TestUintPointerToString(t *testing.T) { +func TestPtrToString(t *testing.T) { tcs := []struct { name string num *num.Uint @@ -75,7 +76,7 @@ func TestUintPointerToString(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(tt *testing.T) { // when - str := stringer.UintPointerToString(tc.num) + str := stringer.PtrToString(tc.num) // then assert.Equal(tt, tc.expected, str) @@ -106,7 +107,7 @@ func TestInt64PointerToString(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(tt *testing.T) { // when - str := stringer.Int64PointerToString(tc.num) + str := stringer.PtrToString(tc.num) // then assert.Equal(tt, tc.expected, str) diff --git a/libs/subscribers/base.go b/libs/subscribers/base.go index 9ac07a187b..222b0b3316 100644 --- a/libs/subscribers/base.go +++ b/libs/subscribers/base.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package subscribers import ( diff --git a/libs/subscribers/service.go b/libs/subscribers/service.go index b66b6f9784..920e0a335e 100644 --- a/libs/subscribers/service.go +++ b/libs/subscribers/service.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -13,27 +13,14 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package subscribers import ( "context" "time" - "code.vegaprotocol.io/vega/libs/broker" - "code.vegaprotocol.io/vega/core/events" + "code.vegaprotocol.io/vega/libs/broker" "code.vegaprotocol.io/vega/logging" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" ) diff --git a/libs/subscribers/service_test.go b/libs/subscribers/service_test.go index 6c151d2fba..c51cc6e805 100644 --- a/libs/subscribers/service_test.go +++ b/libs/subscribers/service_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -19,12 +19,12 @@ import ( "context" "testing" - "code.vegaprotocol.io/vega/libs/subscribers/mocks" - "code.vegaprotocol.io/vega/core/events" dtypes "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/subscribers/mocks" "code.vegaprotocol.io/vega/logging" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" ) diff --git a/libs/subscribers/stream_subscriber.go b/libs/subscribers/stream_subscriber.go index 36a4b8b039..f8ba64545a 100644 --- a/libs/subscribers/stream_subscriber.go +++ b/libs/subscribers/stream_subscriber.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - package subscribers import ( diff --git a/libs/subscribers/stream_subscriber_test.go b/libs/subscribers/stream_subscriber_test.go index 4820355191..209a30ccc0 100644 --- a/libs/subscribers/stream_subscriber_test.go +++ b/libs/subscribers/stream_subscriber_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -13,18 +13,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Copyright (c) 2022 Gobalsky Labs Limited -// -// Use of this software is governed by the Business Source License included -// in the LICENSE.DATANODE file and at https://www.mariadb.com/bsl11. -// -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. -// -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. - //go:build !race // +build !race @@ -35,10 +23,9 @@ import ( "sync" "testing" - "code.vegaprotocol.io/vega/libs/subscribers" - "code.vegaprotocol.io/vega/core/events" dtypes "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/libs/subscribers" types "code.vegaprotocol.io/vega/protos/vega" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" diff --git a/libs/term/tty.go b/libs/term/tty.go index 7a2afb2b53..0bbdd45507 100644 --- a/libs/term/tty.go +++ b/libs/term/tty.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/test/asserts.go b/libs/test/asserts.go index 3f73a4ddf4..c5e5537e71 100644 --- a/libs/test/asserts.go +++ b/libs/test/asserts.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/test/helpers.go b/libs/test/helpers.go index 371e3e8f16..de27560e31 100644 --- a/libs/test/helpers.go +++ b/libs/test/helpers.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/test/random.go b/libs/test/random.go index 2520ae113d..a640ebbfa5 100644 --- a/libs/test/random.go +++ b/libs/test/random.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/test/wrapper.go b/libs/test/wrapper.go index bf5b9d2c9d..61cb43c667 100644 --- a/libs/test/wrapper.go +++ b/libs/test/wrapper.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -25,7 +25,7 @@ import ( func VegaContext(chainId string, blockHeight int64) context.Context { return vgcontext.WithChainID( vgcontext.WithTraceID( - vgcontext.WithBlockHeight(context.Background(), blockHeight), + vgcontext.WithBlockHeight(context.Background(), uint64(blockHeight)), vgcrypto.RandomHash(), ), chainId) diff --git a/libs/testing/helpers.go b/libs/testing/helpers.go index 5f0a48f016..c40ef0346d 100644 --- a/libs/testing/helpers.go +++ b/libs/testing/helpers.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/tm/keys.go b/libs/tm/keys.go index 4070fbba25..0e16c5a6ec 100644 --- a/libs/tm/keys.go +++ b/libs/tm/keys.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -18,7 +18,7 @@ package tm import ( "encoding/base64" - tmcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" + tmcrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" ) func PubKeyToString(pubKey tmcrypto.PublicKey) string { diff --git a/libs/version/github.go b/libs/version/github.go index 13c5d0a481..dfc7c0106a 100644 --- a/libs/version/github.go +++ b/libs/version/github.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/version/version.go b/libs/version/version.go index c8eaf17b98..2b6bf94743 100644 --- a/libs/version/version.go +++ b/libs/version/version.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/version/version_test.go b/libs/version/version_test.go index 9f7736aa1c..311fbbfbbe 100644 --- a/libs/version/version_test.go +++ b/libs/version/version_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -19,6 +19,7 @@ import ( "testing" "code.vegaprotocol.io/vega/libs/version" + "github.com/blang/semver/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/libs/zap/builder.go b/libs/zap/builder.go index 42f779565e..7169934141 100644 --- a/libs/zap/builder.go +++ b/libs/zap/builder.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/zap/config.go b/libs/zap/config.go index bbef445762..2d70f147e3 100644 --- a/libs/zap/config.go +++ b/libs/zap/config.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -22,6 +22,7 @@ import ( "time" vgfs "code.vegaprotocol.io/vega/libs/fs" + "go.uber.org/zap" "go.uber.org/zap/zapcore" ) diff --git a/libs/zap/config_unix.go b/libs/zap/config_unix.go index 5d1c0ad081..c66d4389f7 100644 --- a/libs/zap/config_unix.go +++ b/libs/zap/config_unix.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/zap/config_windows.go b/libs/zap/config_windows.go index 5a72ce9398..a7269a0700 100644 --- a/libs/zap/config_windows.go +++ b/libs/zap/config_windows.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/zap/level.go b/libs/zap/level.go index c2f3a75662..f2180280f4 100644 --- a/libs/zap/level.go +++ b/libs/zap/level.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/libs/zap/sync.go b/libs/zap/sync.go index c11d732ed9..98d4a1f137 100644 --- a/libs/zap/sync.go +++ b/libs/zap/sync.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/logging/config.go b/logging/config.go index b5415098d1..c8baeb80df 100644 --- a/logging/config.go +++ b/logging/config.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/logging/fields.go b/logging/fields.go index 01bce47c36..550a91b3fe 100644 --- a/logging/fields.go +++ b/logging/fields.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -22,8 +22,8 @@ import ( ptypes "code.vegaprotocol.io/vega/protos/vega" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" - "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common" "go.uber.org/zap" ) @@ -296,6 +296,10 @@ func PartyID(id string) zap.Field { return zap.String("party", id) } +func ProposalBatchID(id string) zap.Field { + return zap.String("proposal-batch-id", id) +} + func ProposalID(id string) zap.Field { return zap.String("proposal-id", id) } diff --git a/logging/log.go b/logging/log.go index c0b038b552..e5050c3f53 100644 --- a/logging/log.go +++ b/logging/log.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/paths/custom.go b/paths/custom.go index e1405a8927..77673b75af 100644 --- a/paths/custom.go +++ b/paths/custom.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/paths/custom_test.go b/paths/custom_test.go index 77f5023695..8d85a9c96d 100644 --- a/paths/custom_test.go +++ b/paths/custom_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/paths/default.go b/paths/default.go index a340eaf940..1044c39341 100644 --- a/paths/default.go +++ b/paths/default.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/paths/doc.go b/paths/doc.go index 1f479be00a..24a4a74b86 100644 --- a/paths/doc.go +++ b/paths/doc.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/paths/file.go b/paths/file.go index 1226542e57..74bd80d12f 100644 --- a/paths/file.go +++ b/paths/file.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/paths/file_test.go b/paths/file_test.go index 9cf8e88de8..4679ed22ac 100644 --- a/paths/file_test.go +++ b/paths/file_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -21,9 +21,9 @@ import ( vgtest "code.vegaprotocol.io/vega/libs/test" "code.vegaprotocol.io/vega/paths" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestFileHelpers(t *testing.T) { diff --git a/paths/interface.go b/paths/interface.go index c6483e1f43..b709bc1c60 100644 --- a/paths/interface.go +++ b/paths/interface.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/paths/interface_test.go b/paths/interface_test.go index 7064bfe7f8..9f865b71be 100644 --- a/paths/interface_test.go +++ b/paths/interface_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/paths/paths.go b/paths/paths.go index 9ecf4806aa..c67edf157c 100644 --- a/paths/paths.go +++ b/paths/paths.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/paths/paths_test.go b/paths/paths_test.go index 9c28f6cf9b..bf77831cdb 100644 --- a/paths/paths_test.go +++ b/paths/paths_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/protos/blockexplorer/api/v1/blockexplorer.pb.go b/protos/blockexplorer/api/v1/blockexplorer.pb.go index f8c036efd3..9abc927da4 100644 --- a/protos/blockexplorer/api/v1/blockexplorer.pb.go +++ b/protos/blockexplorer/api/v1/blockexplorer.pb.go @@ -220,14 +220,9 @@ type ListTransactionsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Number of transactions to be returned from the blockchain. - // This is deprecated, use first and last instead. - // - // Deprecated: Do not use. - Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` - // Optional cursor to paginate the request + // Cursor to paginate the request. It can be used in conjunction with the `after` cursor. Before *string `protobuf:"bytes,2,opt,name=before,proto3,oneof" json:"before,omitempty"` - // Optional cursor to paginate the request + // Cursor to paginate the request. It can be used in conjunction with the `before` cursor. After *string `protobuf:"bytes,3,opt,name=after,proto3,oneof" json:"after,omitempty"` // Filters to apply to the request Filters map[string]string `protobuf:"bytes,4,rep,name=filters,proto3" json:"filters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` @@ -237,11 +232,17 @@ type ListTransactionsRequest struct { ExcludeCmdTypes []string `protobuf:"bytes,6,rep,name=exclude_cmd_types,json=excludeCmdTypes,proto3" json:"exclude_cmd_types,omitempty"` // Party IDs filter, can be sender or receiver Parties []string `protobuf:"bytes,7,rep,name=parties,proto3" json:"parties,omitempty"` - // Number of transactions to be returned from the blockchain. Use in conjunction with the `after` cursor to paginate forwards. - // On its own, this will return the first `first` transactions. + // Number of transactions to be returned from the blockchain. + // Use in conjunction with the `after` cursor to paginate forwards. Paginating forwards means toward the most recent + // transactions. + // It cannot be used in conjunction with the `before` cursor. + // On its own, this will return the `first` most recent transactions. First uint32 `protobuf:"varint,8,opt,name=first,proto3" json:"first,omitempty"` - // Number of transactions to be returned from the blockchain. Use in conjunction with the `before` cursor to paginate backwards. - // On its own, this will return the last `last` transactions. + // Number of transactions to be returned from the blockchain. + // Use in conjunction with the `before` cursor to paginate backwards. Paginating forwards means toward the least recent + // transactions. + // It cannot be used in conjunction with the `after` cursor. + // On its own, this will return the `last` oldest transactions. Last uint32 `protobuf:"varint,9,opt,name=last,proto3" json:"last,omitempty"` } @@ -277,14 +278,6 @@ func (*ListTransactionsRequest) Descriptor() ([]byte, []int) { return file_blockexplorer_api_v1_blockexplorer_proto_rawDescGZIP(), []int{4} } -// Deprecated: Do not use. -func (x *ListTransactionsRequest) GetLimit() uint32 { - if x != nil { - return x.Limit - } - return 0 -} - func (x *ListTransactionsRequest) GetBefore() string { if x != nil && x.Before != nil { return *x.Before @@ -577,97 +570,95 @@ var file_blockexplorer_api_v1_blockexplorer_proto_rawDesc = []byte{ 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x9f, 0x03, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x69, 0x6f, 0x6e, 0x22, 0x8b, 0x03, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x18, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x62, 0x65, 0x66, - 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x62, 0x65, 0x66, - 0x6f, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x88, 0x01, - 0x01, 0x12, 0x54, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, - 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6d, 0x64, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6d, 0x64, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x63, 0x6d, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x43, 0x6d, 0x64, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, - 0x72, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, - 0x6c, 0x61, 0x73, 0x74, 0x1a, 0x3a, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0x61, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, - 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc9, 0x03, 0x0a, 0x0b, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x39, 0x0a, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x35, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x03, 0x70, 0x6f, 0x77, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, - 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x03, 0x70, 0x6f, 0x77, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x32, 0xc9, 0x02, 0x0a, 0x14, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x78, - 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, - 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2b, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x10, + 0x1b, 0x0a, 0x06, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x06, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x61, + 0x66, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x2d, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2e, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x4d, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x2e, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x63, 0x6d, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x08, 0x63, 0x6d, 0x64, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x63, 0x6d, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x43, 0x6d, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x1a, 0x3a, 0x0a, 0x0c, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, + 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x01, 0x10, + 0x02, 0x22, 0x61, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, + 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, + 0x72, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc9, 0x03, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, + 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, + 0x72, 0x73, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, + 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x39, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, + 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x35, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x03, 0x70, 0x6f, 0x77, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, + 0x6b, 0x52, 0x03, 0x70, 0x6f, 0x77, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x32, 0xc9, 0x02, 0x0a, 0x14, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, + 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x0e, 0x47, 0x65, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0x78, 0x5a, 0x35, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, - 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x92, 0x41, 0x3e, 0x12, 0x23, 0x0a, 0x18, - 0x56, 0x65, 0x67, 0x61, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x6f, - 0x72, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, 0x73, 0x32, 0x07, 0x76, 0x30, 0x2e, 0x37, 0x33, 0x2e, - 0x30, 0x1a, 0x13, 0x6c, 0x62, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x78, 0x79, 0x7a, 0x2a, 0x02, 0x01, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, + 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, + 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x78, 0x5a, 0x35, + 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, + 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x92, 0x41, 0x3e, 0x12, 0x23, 0x0a, 0x18, 0x56, 0x65, 0x67, 0x61, + 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x20, + 0x41, 0x50, 0x49, 0x73, 0x32, 0x07, 0x76, 0x30, 0x2e, 0x37, 0x34, 0x2e, 0x30, 0x1a, 0x13, 0x6c, + 0x62, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x78, + 0x79, 0x7a, 0x2a, 0x02, 0x01, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/protos/blockexplorer/api/v1/blockexplorer_grpc.pb.go b/protos/blockexplorer/api/v1/blockexplorer_grpc.pb.go index 59b33c493c..734a6b4521 100644 --- a/protos/blockexplorer/api/v1/blockexplorer_grpc.pb.go +++ b/protos/blockexplorer/api/v1/blockexplorer_grpc.pb.go @@ -28,7 +28,7 @@ type BlockExplorerServiceClient interface { GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) // List transactions // - // List transactions from the Vega blockchain + // List transactions from the Vega blockchain from the newest to the oldest transactions. ListTransactions(ctx context.Context, in *ListTransactionsRequest, opts ...grpc.CallOption) (*ListTransactionsResponse, error) // Info // @@ -82,7 +82,7 @@ type BlockExplorerServiceServer interface { GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) // List transactions // - // List transactions from the Vega blockchain + // List transactions from the Vega blockchain from the newest to the oldest transactions. ListTransactions(context.Context, *ListTransactionsRequest) (*ListTransactionsResponse, error) // Info // diff --git a/protos/data-node/api/v2/trading_data.pb.go b/protos/data-node/api/v2/trading_data.pb.go index a0e9dbaccf..733c3217a6 100644 --- a/protos/data-node/api/v2/trading_data.pb.go +++ b/protos/data-node/api/v2/trading_data.pb.go @@ -279,6 +279,58 @@ func (Table) EnumDescriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{3} } +// Defines the types of a dispatch strategy's scope the API can filter on. +type ListTransfersRequest_Scope int32 + +const ( + ListTransfersRequest_SCOPE_UNSPECIFIED ListTransfersRequest_Scope = 0 + // Matches transfers that have dispatch strategy scope of individual set. + ListTransfersRequest_SCOPE_INDIVIDUAL ListTransfersRequest_Scope = 1 + // Matches transfers that have dispatch strategy scope of team set. + ListTransfersRequest_SCOPE_TEAM ListTransfersRequest_Scope = 2 +) + +// Enum value maps for ListTransfersRequest_Scope. +var ( + ListTransfersRequest_Scope_name = map[int32]string{ + 0: "SCOPE_UNSPECIFIED", + 1: "SCOPE_INDIVIDUAL", + 2: "SCOPE_TEAM", + } + ListTransfersRequest_Scope_value = map[string]int32{ + "SCOPE_UNSPECIFIED": 0, + "SCOPE_INDIVIDUAL": 1, + "SCOPE_TEAM": 2, + } +) + +func (x ListTransfersRequest_Scope) Enum() *ListTransfersRequest_Scope { + p := new(ListTransfersRequest_Scope) + *p = x + return p +} + +func (x ListTransfersRequest_Scope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListTransfersRequest_Scope) Descriptor() protoreflect.EnumDescriptor { + return file_data_node_api_v2_trading_data_proto_enumTypes[4].Descriptor() +} + +func (ListTransfersRequest_Scope) Type() protoreflect.EnumType { + return &file_data_node_api_v2_trading_data_proto_enumTypes[4] +} + +func (x ListTransfersRequest_Scope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListTransfersRequest_Scope.Descriptor instead. +func (ListTransfersRequest_Scope) EnumDescriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{77, 0} +} + // Filter for the types of governance proposals to view type ListGovernanceDataRequest_Type int32 @@ -363,11 +415,11 @@ func (x ListGovernanceDataRequest_Type) String() string { } func (ListGovernanceDataRequest_Type) Descriptor() protoreflect.EnumDescriptor { - return file_data_node_api_v2_trading_data_proto_enumTypes[4].Descriptor() + return file_data_node_api_v2_trading_data_proto_enumTypes[5].Descriptor() } func (ListGovernanceDataRequest_Type) Type() protoreflect.EnumType { - return &file_data_node_api_v2_trading_data_proto_enumTypes[4] + return &file_data_node_api_v2_trading_data_proto_enumTypes[5] } func (x ListGovernanceDataRequest_Type) Number() protoreflect.EnumNumber { @@ -376,7 +428,7 @@ func (x ListGovernanceDataRequest_Type) Number() protoreflect.EnumNumber { // Deprecated: Use ListGovernanceDataRequest_Type.Descriptor instead. func (ListGovernanceDataRequest_Type) EnumDescriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{216, 0} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{220, 0} } // All data returned from the API is ordered in a well-defined manner. @@ -3287,6 +3339,8 @@ type LedgerEntryFilter struct { ToAccountFilter *AccountFilter `protobuf:"bytes,3,opt,name=to_account_filter,json=toAccountFilter,proto3" json:"to_account_filter,omitempty"` // List of transfer types that is used for filtering sender and receiver accounts. TransferTypes []vega.TransferType `protobuf:"varint,5,rep,packed,name=transfer_types,json=transferTypes,proto3,enum=vega.TransferType" json:"transfer_types,omitempty"` + // List ledger entries that are associated with a specific transfer ID. If provided, all other filters are ignored + TransferId *string `protobuf:"bytes,6,opt,name=transfer_id,json=transferId,proto3,oneof" json:"transfer_id,omitempty"` } func (x *LedgerEntryFilter) Reset() { @@ -3349,6 +3403,13 @@ func (x *LedgerEntryFilter) GetTransferTypes() []vega.TransferType { return nil } +func (x *LedgerEntryFilter) GetTransferId() string { + if x != nil && x.TransferId != nil { + return *x.TransferId + } + return "" +} + // Represents an aggregated view of ledger entry data, sender and receiver accounts, // details and balances for both sides after the transfer has been made type AggregatedLedgerEntry struct { @@ -5215,6 +5276,14 @@ type ListTransfersRequest struct { Pagination *Pagination `protobuf:"bytes,3,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` // Restrict transfers to those related to reward transfers. IsReward *bool `protobuf:"varint,4,opt,name=is_reward,json=isReward,proto3,oneof" json:"is_reward,omitempty"` + // Epoch to filter from (included). If omitted, the range goes from the oldest epoch to the `to epoch`. + FromEpoch *uint64 `protobuf:"varint,5,opt,name=from_epoch,json=fromEpoch,proto3,oneof" json:"from_epoch,omitempty"` + // Epoch to filter to (included). If omitted, the range goes from `from epoch` to the most recent epoch. + ToEpoch *uint64 `protobuf:"varint,6,opt,name=to_epoch,json=toEpoch,proto3,oneof" json:"to_epoch,omitempty"` + // Status to filter on. + Status *v1.Transfer_Status `protobuf:"varint,7,opt,name=status,proto3,enum=vega.events.v1.Transfer_Status,oneof" json:"status,omitempty"` + // Dispatch strategy's scope to filter for. + Scope *ListTransfersRequest_Scope `protobuf:"varint,8,opt,name=scope,proto3,enum=datanode.api.v2.ListTransfersRequest_Scope,oneof" json:"scope,omitempty"` } func (x *ListTransfersRequest) Reset() { @@ -5277,6 +5346,34 @@ func (x *ListTransfersRequest) GetIsReward() bool { return false } +func (x *ListTransfersRequest) GetFromEpoch() uint64 { + if x != nil && x.FromEpoch != nil { + return *x.FromEpoch + } + return 0 +} + +func (x *ListTransfersRequest) GetToEpoch() uint64 { + if x != nil && x.ToEpoch != nil { + return *x.ToEpoch + } + return 0 +} + +func (x *ListTransfersRequest) GetStatus() v1.Transfer_Status { + if x != nil && x.Status != nil { + return *x.Status + } + return v1.Transfer_Status(0) +} + +func (x *ListTransfersRequest) GetScope() ListTransfersRequest_Scope { + if x != nil && x.Scope != nil { + return *x.Scope + } + return ListTransfersRequest_SCOPE_UNSPECIFIED +} + // Response that is received when listing transfers type ListTransfersResponse struct { state protoimpl.MessageState @@ -5554,10 +5651,8 @@ type GetTransferResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Transfer requested by ID. - Transfer *v1.Transfer `protobuf:"bytes,1,opt,name=transfer,proto3" json:"transfer,omitempty"` - // Fees paid for this transfer. - Fees []*v1.TransferFees `protobuf:"bytes,2,rep,name=fees,proto3" json:"fees,omitempty"` + // Transfer and its fees requested by ID. + TransferNode *TransferNode `protobuf:"bytes,1,opt,name=transfer_node,json=transferNode,proto3" json:"transfer_node,omitempty"` } func (x *GetTransferResponse) Reset() { @@ -5592,16 +5687,9 @@ func (*GetTransferResponse) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{83} } -func (x *GetTransferResponse) GetTransfer() *v1.Transfer { - if x != nil { - return x.Transfer - } - return nil -} - -func (x *GetTransferResponse) GetFees() []*v1.TransferFees { +func (x *GetTransferResponse) GetTransferNode() *TransferNode { if x != nil { - return x.Fees + return x.TransferNode } return nil } @@ -9768,20 +9856,21 @@ func (x *PartyConnection) GetPageInfo() *PageInfo { return nil } -// Order data with the corresponding cursor. -type OrderEdge struct { +// Request to list profiles by party ID. +type ListPartiesProfilesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Data associated with an order submitted to a Vega node. - Node *vega.Order `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // Cursor that can be used to fetch further pages. - Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` + // Restrict the returned profiles to only the given party IDs. If not set, + // all parties' profiles will be returned. + Parties []string `protobuf:"bytes,1,rep,name=parties,proto3" json:"parties,omitempty"` + // Pagination control. + Pagination *Pagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *OrderEdge) Reset() { - *x = OrderEdge{} +func (x *ListPartiesProfilesRequest) Reset() { + *x = ListPartiesProfilesRequest{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[155] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9789,13 +9878,13 @@ func (x *OrderEdge) Reset() { } } -func (x *OrderEdge) String() string { +func (x *ListPartiesProfilesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*OrderEdge) ProtoMessage() {} +func (*ListPartiesProfilesRequest) ProtoMessage() {} -func (x *OrderEdge) ProtoReflect() protoreflect.Message { +func (x *ListPartiesProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[155] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9807,41 +9896,37 @@ func (x *OrderEdge) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use OrderEdge.ProtoReflect.Descriptor instead. -func (*OrderEdge) Descriptor() ([]byte, []int) { +// Deprecated: Use ListPartiesProfilesRequest.ProtoReflect.Descriptor instead. +func (*ListPartiesProfilesRequest) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{155} } -func (x *OrderEdge) GetNode() *vega.Order { +func (x *ListPartiesProfilesRequest) GetParties() []string { if x != nil { - return x.Node + return x.Parties } return nil } -func (x *OrderEdge) GetCursor() string { +func (x *ListPartiesProfilesRequest) GetPagination() *Pagination { if x != nil { - return x.Cursor + return x.Pagination } - return "" + return nil } -// Request for listing margin levels -type ListMarginLevelsRequest struct { +// Response from listing parties' profiles. +type ListPartiesProfilesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Party ID for which to list the margin levels - PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` - // Market ID for which to list the margin levels - MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - // Pagination control - Pagination *Pagination `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Page of profile data and corresponding page information. + Profiles *PartiesProfilesConnection `protobuf:"bytes,1,opt,name=profiles,proto3" json:"profiles,omitempty"` } -func (x *ListMarginLevelsRequest) Reset() { - *x = ListMarginLevelsRequest{} +func (x *ListPartiesProfilesResponse) Reset() { + *x = ListPartiesProfilesResponse{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[156] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9849,13 +9934,13 @@ func (x *ListMarginLevelsRequest) Reset() { } } -func (x *ListMarginLevelsRequest) String() string { +func (x *ListPartiesProfilesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListMarginLevelsRequest) ProtoMessage() {} +func (*ListPartiesProfilesResponse) ProtoMessage() {} -func (x *ListMarginLevelsRequest) ProtoReflect() protoreflect.Message { +func (x *ListPartiesProfilesResponse) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[156] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9867,44 +9952,32 @@ func (x *ListMarginLevelsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListMarginLevelsRequest.ProtoReflect.Descriptor instead. -func (*ListMarginLevelsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListPartiesProfilesResponse.ProtoReflect.Descriptor instead. +func (*ListPartiesProfilesResponse) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{156} } -func (x *ListMarginLevelsRequest) GetPartyId() string { - if x != nil { - return x.PartyId - } - return "" -} - -func (x *ListMarginLevelsRequest) GetMarketId() string { - if x != nil { - return x.MarketId - } - return "" -} - -func (x *ListMarginLevelsRequest) GetPagination() *Pagination { +func (x *ListPartiesProfilesResponse) GetProfiles() *PartiesProfilesConnection { if x != nil { - return x.Pagination + return x.Profiles } return nil } -// Response from listing margin levels -type ListMarginLevelsResponse struct { +// Party's profile data with the corresponding cursor. +type PartyProfileEdge struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of margin levels data and corresponding page information. - MarginLevels *MarginConnection `protobuf:"bytes,1,opt,name=margin_levels,json=marginLevels,proto3" json:"margin_levels,omitempty"` + // Data associated with a party's profile. + Node *vega.PartyProfile `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // Cursor that can be used to fetch further pages. + Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` } -func (x *ListMarginLevelsResponse) Reset() { - *x = ListMarginLevelsResponse{} +func (x *PartyProfileEdge) Reset() { + *x = PartyProfileEdge{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[157] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9912,13 +9985,13 @@ func (x *ListMarginLevelsResponse) Reset() { } } -func (x *ListMarginLevelsResponse) String() string { +func (x *PartyProfileEdge) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListMarginLevelsResponse) ProtoMessage() {} +func (*PartyProfileEdge) ProtoMessage() {} -func (x *ListMarginLevelsResponse) ProtoReflect() protoreflect.Message { +func (x *PartyProfileEdge) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[157] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9930,34 +10003,39 @@ func (x *ListMarginLevelsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListMarginLevelsResponse.ProtoReflect.Descriptor instead. -func (*ListMarginLevelsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use PartyProfileEdge.ProtoReflect.Descriptor instead. +func (*PartyProfileEdge) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{157} } -func (x *ListMarginLevelsResponse) GetMarginLevels() *MarginConnection { +func (x *PartyProfileEdge) GetNode() *vega.PartyProfile { if x != nil { - return x.MarginLevels + return x.Node } return nil } -// Request to subscribe to a stream of MarginLevels data. -// If a party ID is provided, the stream will contain margin levels for that party only. -// Optionally, the list can be additionally filtered by market -type ObserveMarginLevelsRequest struct { +func (x *PartyProfileEdge) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +// Page of profile data per party and corresponding page information. +type PartiesProfilesConnection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Restrict margin level updates to those relating to the given party. - PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` - // Restrict margin level updates to those relating to the given market. - MarketId *string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3,oneof" json:"market_id,omitempty"` + // Page of profiles and their corresponding cursors. + Edges []*PartyProfileEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` + // Page information that is used for fetching further pages. + PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` } -func (x *ObserveMarginLevelsRequest) Reset() { - *x = ObserveMarginLevelsRequest{} +func (x *PartiesProfilesConnection) Reset() { + *x = PartiesProfilesConnection{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[158] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9965,13 +10043,13 @@ func (x *ObserveMarginLevelsRequest) Reset() { } } -func (x *ObserveMarginLevelsRequest) String() string { +func (x *PartiesProfilesConnection) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ObserveMarginLevelsRequest) ProtoMessage() {} +func (*PartiesProfilesConnection) ProtoMessage() {} -func (x *ObserveMarginLevelsRequest) ProtoReflect() protoreflect.Message { +func (x *PartiesProfilesConnection) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[158] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9983,37 +10061,39 @@ func (x *ObserveMarginLevelsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ObserveMarginLevelsRequest.ProtoReflect.Descriptor instead. -func (*ObserveMarginLevelsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use PartiesProfilesConnection.ProtoReflect.Descriptor instead. +func (*PartiesProfilesConnection) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{158} } -func (x *ObserveMarginLevelsRequest) GetPartyId() string { +func (x *PartiesProfilesConnection) GetEdges() []*PartyProfileEdge { if x != nil { - return x.PartyId + return x.Edges } - return "" + return nil } -func (x *ObserveMarginLevelsRequest) GetMarketId() string { - if x != nil && x.MarketId != nil { - return *x.MarketId +func (x *PartiesProfilesConnection) GetPageInfo() *PageInfo { + if x != nil { + return x.PageInfo } - return "" + return nil } -// Response from subscribing to margin levels data -type ObserveMarginLevelsResponse struct { +// Order data with the corresponding cursor. +type OrderEdge struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Margin levels data that match the subscription request filters. - MarginLevels *vega.MarginLevels `protobuf:"bytes,1,opt,name=margin_levels,json=marginLevels,proto3" json:"margin_levels,omitempty"` + // Data associated with an order submitted to a Vega node. + Node *vega.Order `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // Cursor that can be used to fetch further pages. + Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` } -func (x *ObserveMarginLevelsResponse) Reset() { - *x = ObserveMarginLevelsResponse{} +func (x *OrderEdge) Reset() { + *x = OrderEdge{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[159] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10021,13 +10101,13 @@ func (x *ObserveMarginLevelsResponse) Reset() { } } -func (x *ObserveMarginLevelsResponse) String() string { +func (x *OrderEdge) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ObserveMarginLevelsResponse) ProtoMessage() {} +func (*OrderEdge) ProtoMessage() {} -func (x *ObserveMarginLevelsResponse) ProtoReflect() protoreflect.Message { +func (x *OrderEdge) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[159] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10039,32 +10119,41 @@ func (x *ObserveMarginLevelsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ObserveMarginLevelsResponse.ProtoReflect.Descriptor instead. -func (*ObserveMarginLevelsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use OrderEdge.ProtoReflect.Descriptor instead. +func (*OrderEdge) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{159} } -func (x *ObserveMarginLevelsResponse) GetMarginLevels() *vega.MarginLevels { +func (x *OrderEdge) GetNode() *vega.Order { if x != nil { - return x.MarginLevels + return x.Node } return nil } -// Page of orders data and corresponding page information. -type OrderConnection struct { +func (x *OrderEdge) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +// Request for listing margin levels +type ListMarginLevelsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of orders and their corresponding cursors. - Edges []*OrderEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` - // Page information that is used for fetching further pages. - PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` + // Party ID for which to list the margin levels + PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + // Market ID for which to list the margin levels + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Pagination control + Pagination *Pagination `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *OrderConnection) Reset() { - *x = OrderConnection{} +func (x *ListMarginLevelsRequest) Reset() { + *x = ListMarginLevelsRequest{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[160] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10072,13 +10161,13 @@ func (x *OrderConnection) Reset() { } } -func (x *OrderConnection) String() string { +func (x *ListMarginLevelsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*OrderConnection) ProtoMessage() {} +func (*ListMarginLevelsRequest) ProtoMessage() {} -func (x *OrderConnection) ProtoReflect() protoreflect.Message { +func (x *ListMarginLevelsRequest) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[160] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10090,39 +10179,44 @@ func (x *OrderConnection) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use OrderConnection.ProtoReflect.Descriptor instead. -func (*OrderConnection) Descriptor() ([]byte, []int) { +// Deprecated: Use ListMarginLevelsRequest.ProtoReflect.Descriptor instead. +func (*ListMarginLevelsRequest) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{160} } -func (x *OrderConnection) GetEdges() []*OrderEdge { +func (x *ListMarginLevelsRequest) GetPartyId() string { if x != nil { - return x.Edges + return x.PartyId } - return nil + return "" } -func (x *OrderConnection) GetPageInfo() *PageInfo { +func (x *ListMarginLevelsRequest) GetMarketId() string { if x != nil { - return x.PageInfo + return x.MarketId + } + return "" +} + +func (x *ListMarginLevelsRequest) GetPagination() *Pagination { + if x != nil { + return x.Pagination } return nil } -// Margin data with the corresponding cursor. -type MarginEdge struct { +// Response from listing margin levels +type ListMarginLevelsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Margin levels data that satisfy a list margin levels request. - Node *vega.MarginLevels `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // Cursor that can be used to fetch further pages. - Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` + // Page of margin levels data and corresponding page information. + MarginLevels *MarginConnection `protobuf:"bytes,1,opt,name=margin_levels,json=marginLevels,proto3" json:"margin_levels,omitempty"` } -func (x *MarginEdge) Reset() { - *x = MarginEdge{} +func (x *ListMarginLevelsResponse) Reset() { + *x = ListMarginLevelsResponse{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[161] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10130,13 +10224,13 @@ func (x *MarginEdge) Reset() { } } -func (x *MarginEdge) String() string { +func (x *ListMarginLevelsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MarginEdge) ProtoMessage() {} +func (*ListMarginLevelsResponse) ProtoMessage() {} -func (x *MarginEdge) ProtoReflect() protoreflect.Message { +func (x *ListMarginLevelsResponse) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[161] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10148,39 +10242,34 @@ func (x *MarginEdge) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MarginEdge.ProtoReflect.Descriptor instead. -func (*MarginEdge) Descriptor() ([]byte, []int) { +// Deprecated: Use ListMarginLevelsResponse.ProtoReflect.Descriptor instead. +func (*ListMarginLevelsResponse) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{161} } -func (x *MarginEdge) GetNode() *vega.MarginLevels { +func (x *ListMarginLevelsResponse) GetMarginLevels() *MarginConnection { if x != nil { - return x.Node + return x.MarginLevels } return nil } -func (x *MarginEdge) GetCursor() string { - if x != nil { - return x.Cursor - } - return "" -} - -// Page of margins data and corresponding page information. -type MarginConnection struct { +// Request to subscribe to a stream of MarginLevels data. +// If a party ID is provided, the stream will contain margin levels for that party only. +// Optionally, the list can be additionally filtered by market +type ObserveMarginLevelsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of margins data and their corresponding cursors. - Edges []*MarginEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` - // Page information that is used for fetching further pages. - PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` + // Restrict margin level updates to those relating to the given party. + PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + // Restrict margin level updates to those relating to the given market. + MarketId *string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3,oneof" json:"market_id,omitempty"` } -func (x *MarginConnection) Reset() { - *x = MarginConnection{} +func (x *ObserveMarginLevelsRequest) Reset() { + *x = ObserveMarginLevelsRequest{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[162] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10188,13 +10277,13 @@ func (x *MarginConnection) Reset() { } } -func (x *MarginConnection) String() string { +func (x *ObserveMarginLevelsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MarginConnection) ProtoMessage() {} +func (*ObserveMarginLevelsRequest) ProtoMessage() {} -func (x *MarginConnection) ProtoReflect() protoreflect.Message { +func (x *ObserveMarginLevelsRequest) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[162] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10206,45 +10295,37 @@ func (x *MarginConnection) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MarginConnection.ProtoReflect.Descriptor instead. -func (*MarginConnection) Descriptor() ([]byte, []int) { +// Deprecated: Use ObserveMarginLevelsRequest.ProtoReflect.Descriptor instead. +func (*ObserveMarginLevelsRequest) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{162} } -func (x *MarginConnection) GetEdges() []*MarginEdge { +func (x *ObserveMarginLevelsRequest) GetPartyId() string { if x != nil { - return x.Edges + return x.PartyId } - return nil + return "" } -func (x *MarginConnection) GetPageInfo() *PageInfo { - if x != nil { - return x.PageInfo +func (x *ObserveMarginLevelsRequest) GetMarketId() string { + if x != nil && x.MarketId != nil { + return *x.MarketId } - return nil + return "" } -// Request to get reward details for a party -type ListRewardsRequest struct { +// Response from subscribing to margin levels data +type ObserveMarginLevelsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Restrict rewards data to those that were received by the given party. - PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` - // Restrict rewards data to those that were paid with the given asset ID. - AssetId *string `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3,oneof" json:"asset_id,omitempty"` - // Pagination control. - Pagination *Pagination `protobuf:"bytes,3,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` - // Restrict rewards data to those that were paid after and including the given epoch ID. - FromEpoch *uint64 `protobuf:"varint,4,opt,name=from_epoch,json=fromEpoch,proto3,oneof" json:"from_epoch,omitempty"` - // Restrict rewards data to those that were paid up to and including the given epoch ID. - ToEpoch *uint64 `protobuf:"varint,5,opt,name=to_epoch,json=toEpoch,proto3,oneof" json:"to_epoch,omitempty"` + // Margin levels data that match the subscription request filters. + MarginLevels *vega.MarginLevels `protobuf:"bytes,1,opt,name=margin_levels,json=marginLevels,proto3" json:"margin_levels,omitempty"` } -func (x *ListRewardsRequest) Reset() { - *x = ListRewardsRequest{} +func (x *ObserveMarginLevelsResponse) Reset() { + *x = ObserveMarginLevelsResponse{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[163] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10252,13 +10333,13 @@ func (x *ListRewardsRequest) Reset() { } } -func (x *ListRewardsRequest) String() string { +func (x *ObserveMarginLevelsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListRewardsRequest) ProtoMessage() {} +func (*ObserveMarginLevelsResponse) ProtoMessage() {} -func (x *ListRewardsRequest) ProtoReflect() protoreflect.Message { +func (x *ObserveMarginLevelsResponse) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[163] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10270,58 +10351,32 @@ func (x *ListRewardsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListRewardsRequest.ProtoReflect.Descriptor instead. -func (*ListRewardsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ObserveMarginLevelsResponse.ProtoReflect.Descriptor instead. +func (*ObserveMarginLevelsResponse) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{163} } -func (x *ListRewardsRequest) GetPartyId() string { - if x != nil { - return x.PartyId - } - return "" -} - -func (x *ListRewardsRequest) GetAssetId() string { - if x != nil && x.AssetId != nil { - return *x.AssetId - } - return "" -} - -func (x *ListRewardsRequest) GetPagination() *Pagination { +func (x *ObserveMarginLevelsResponse) GetMarginLevels() *vega.MarginLevels { if x != nil { - return x.Pagination + return x.MarginLevels } return nil } -func (x *ListRewardsRequest) GetFromEpoch() uint64 { - if x != nil && x.FromEpoch != nil { - return *x.FromEpoch - } - return 0 -} - -func (x *ListRewardsRequest) GetToEpoch() uint64 { - if x != nil && x.ToEpoch != nil { - return *x.ToEpoch - } - return 0 -} - -// Response for listing reward details for a single party -type ListRewardsResponse struct { +// Page of orders data and corresponding page information. +type OrderConnection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of rewards data and corresponding page information. - Rewards *RewardsConnection `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards,omitempty"` + // Page of orders and their corresponding cursors. + Edges []*OrderEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` + // Page information that is used for fetching further pages. + PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` } -func (x *ListRewardsResponse) Reset() { - *x = ListRewardsResponse{} +func (x *OrderConnection) Reset() { + *x = OrderConnection{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[164] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10329,13 +10384,13 @@ func (x *ListRewardsResponse) Reset() { } } -func (x *ListRewardsResponse) String() string { +func (x *OrderConnection) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListRewardsResponse) ProtoMessage() {} +func (*OrderConnection) ProtoMessage() {} -func (x *ListRewardsResponse) ProtoReflect() protoreflect.Message { +func (x *OrderConnection) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[164] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10347,32 +10402,39 @@ func (x *ListRewardsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListRewardsResponse.ProtoReflect.Descriptor instead. -func (*ListRewardsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use OrderConnection.ProtoReflect.Descriptor instead. +func (*OrderConnection) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{164} } -func (x *ListRewardsResponse) GetRewards() *RewardsConnection { +func (x *OrderConnection) GetEdges() []*OrderEdge { if x != nil { - return x.Rewards + return x.Edges } return nil } -// Rewards data with the corresponding cursor. -type RewardEdge struct { +func (x *OrderConnection) GetPageInfo() *PageInfo { + if x != nil { + return x.PageInfo + } + return nil +} + +// Margin data with the corresponding cursor. +type MarginEdge struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Details for a single reward payment. - Node *vega.Reward `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // Margin levels data that satisfy a list margin levels request. + Node *vega.MarginLevels `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // Cursor that can be used to fetch further pages. Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` } -func (x *RewardEdge) Reset() { - *x = RewardEdge{} +func (x *MarginEdge) Reset() { + *x = MarginEdge{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[165] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10380,13 +10442,13 @@ func (x *RewardEdge) Reset() { } } -func (x *RewardEdge) String() string { +func (x *MarginEdge) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RewardEdge) ProtoMessage() {} +func (*MarginEdge) ProtoMessage() {} -func (x *RewardEdge) ProtoReflect() protoreflect.Message { +func (x *MarginEdge) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[165] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10398,39 +10460,39 @@ func (x *RewardEdge) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RewardEdge.ProtoReflect.Descriptor instead. -func (*RewardEdge) Descriptor() ([]byte, []int) { +// Deprecated: Use MarginEdge.ProtoReflect.Descriptor instead. +func (*MarginEdge) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{165} } -func (x *RewardEdge) GetNode() *vega.Reward { +func (x *MarginEdge) GetNode() *vega.MarginLevels { if x != nil { return x.Node } return nil } -func (x *RewardEdge) GetCursor() string { +func (x *MarginEdge) GetCursor() string { if x != nil { return x.Cursor } return "" } -// Page of rewards data and corresponding page information. -type RewardsConnection struct { +// Page of margins data and corresponding page information. +type MarginConnection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of rewards data items and their corresponding cursors. - Edges []*RewardEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` + // Page of margins data and their corresponding cursors. + Edges []*MarginEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` // Page information that is used for fetching further pages. PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` } -func (x *RewardsConnection) Reset() { - *x = RewardsConnection{} +func (x *MarginConnection) Reset() { + *x = MarginConnection{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[166] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10438,13 +10500,13 @@ func (x *RewardsConnection) Reset() { } } -func (x *RewardsConnection) String() string { +func (x *MarginConnection) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RewardsConnection) ProtoMessage() {} +func (*MarginConnection) ProtoMessage() {} -func (x *RewardsConnection) ProtoReflect() protoreflect.Message { +func (x *MarginConnection) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[166] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10456,19 +10518,19 @@ func (x *RewardsConnection) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RewardsConnection.ProtoReflect.Descriptor instead. -func (*RewardsConnection) Descriptor() ([]byte, []int) { +// Deprecated: Use MarginConnection.ProtoReflect.Descriptor instead. +func (*MarginConnection) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{166} } -func (x *RewardsConnection) GetEdges() []*RewardEdge { +func (x *MarginConnection) GetEdges() []*MarginEdge { if x != nil { return x.Edges } return nil } -func (x *RewardsConnection) GetPageInfo() *PageInfo { +func (x *MarginConnection) GetPageInfo() *PageInfo { if x != nil { return x.PageInfo } @@ -10476,21 +10538,29 @@ func (x *RewardsConnection) GetPageInfo() *PageInfo { } // Request to get reward details for a party -type ListRewardSummariesRequest struct { +type ListRewardsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Restrict the reward summary to rewards paid to the given parties. - PartyId *string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3,oneof" json:"party_id,omitempty"` - // Restrict the reward summary to rewards paid in the given assets. + // Restrict rewards data to those that were received by the given party. + PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + // Restrict rewards data to those that were paid with the given asset ID. AssetId *string `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3,oneof" json:"asset_id,omitempty"` - // Pagination controls. + // Pagination control. Pagination *Pagination `protobuf:"bytes,3,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` + // Restrict rewards data to those that were paid after and including the given epoch ID. + FromEpoch *uint64 `protobuf:"varint,4,opt,name=from_epoch,json=fromEpoch,proto3,oneof" json:"from_epoch,omitempty"` + // Restrict rewards data to those that were paid up to and including the given epoch ID. + ToEpoch *uint64 `protobuf:"varint,5,opt,name=to_epoch,json=toEpoch,proto3,oneof" json:"to_epoch,omitempty"` + // Filter for rewards paid if the party is a member of the given team + TeamId *string `protobuf:"bytes,6,opt,name=team_id,json=teamId,proto3,oneof" json:"team_id,omitempty"` + // Filter for rewards paid if the party participated in the given game + GameId *string `protobuf:"bytes,7,opt,name=game_id,json=gameId,proto3,oneof" json:"game_id,omitempty"` } -func (x *ListRewardSummariesRequest) Reset() { - *x = ListRewardSummariesRequest{} +func (x *ListRewardsRequest) Reset() { + *x = ListRewardsRequest{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[167] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10498,13 +10568,13 @@ func (x *ListRewardSummariesRequest) Reset() { } } -func (x *ListRewardSummariesRequest) String() string { +func (x *ListRewardsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListRewardSummariesRequest) ProtoMessage() {} +func (*ListRewardsRequest) ProtoMessage() {} -func (x *ListRewardSummariesRequest) ProtoReflect() protoreflect.Message { +func (x *ListRewardsRequest) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[167] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10516,44 +10586,72 @@ func (x *ListRewardSummariesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListRewardSummariesRequest.ProtoReflect.Descriptor instead. -func (*ListRewardSummariesRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListRewardsRequest.ProtoReflect.Descriptor instead. +func (*ListRewardsRequest) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{167} } -func (x *ListRewardSummariesRequest) GetPartyId() string { - if x != nil && x.PartyId != nil { - return *x.PartyId +func (x *ListRewardsRequest) GetPartyId() string { + if x != nil { + return x.PartyId } return "" } -func (x *ListRewardSummariesRequest) GetAssetId() string { +func (x *ListRewardsRequest) GetAssetId() string { if x != nil && x.AssetId != nil { return *x.AssetId } return "" } -func (x *ListRewardSummariesRequest) GetPagination() *Pagination { +func (x *ListRewardsRequest) GetPagination() *Pagination { if x != nil { return x.Pagination } return nil } -// Response from listing reward details in for a single party -type ListRewardSummariesResponse struct { +func (x *ListRewardsRequest) GetFromEpoch() uint64 { + if x != nil && x.FromEpoch != nil { + return *x.FromEpoch + } + return 0 +} + +func (x *ListRewardsRequest) GetToEpoch() uint64 { + if x != nil && x.ToEpoch != nil { + return *x.ToEpoch + } + return 0 +} + +func (x *ListRewardsRequest) GetTeamId() string { + if x != nil && x.TeamId != nil { + return *x.TeamId + } + return "" +} + +func (x *ListRewardsRequest) GetGameId() string { + if x != nil && x.GameId != nil { + return *x.GameId + } + return "" +} + +// Response for listing reward details for a single party +type ListRewardsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of rewards details data and corresponding page information. - Summaries []*vega.RewardSummary `protobuf:"bytes,1,rep,name=summaries,proto3" json:"summaries,omitempty"` + // Page of rewards data and corresponding page information. + Rewards *RewardsConnection `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards,omitempty"` } -func (x *ListRewardSummariesResponse) Reset() { - *x = ListRewardSummariesResponse{} +func (x *ListRewardsResponse) Reset() { + *x = ListRewardsResponse{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[168] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10561,13 +10659,13 @@ func (x *ListRewardSummariesResponse) Reset() { } } -func (x *ListRewardSummariesResponse) String() string { +func (x *ListRewardsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListRewardSummariesResponse) ProtoMessage() {} +func (*ListRewardsResponse) ProtoMessage() {} -func (x *ListRewardSummariesResponse) ProtoReflect() protoreflect.Message { +func (x *ListRewardsResponse) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[168] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10579,36 +10677,32 @@ func (x *ListRewardSummariesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListRewardSummariesResponse.ProtoReflect.Descriptor instead. -func (*ListRewardSummariesResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListRewardsResponse.ProtoReflect.Descriptor instead. +func (*ListRewardsResponse) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{168} } -func (x *ListRewardSummariesResponse) GetSummaries() []*vega.RewardSummary { +func (x *ListRewardsResponse) GetRewards() *RewardsConnection { if x != nil { - return x.Summaries + return x.Rewards } return nil } -// Filter to restrict the results returned by the ListEpochRewardSummaries -type RewardSummaryFilter struct { +// Rewards data with the corresponding cursor. +type RewardEdge struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Restrict reward summaries to those connected to the assets in the given list. - AssetIds []string `protobuf:"bytes,1,rep,name=asset_ids,json=assetIds,proto3" json:"asset_ids,omitempty"` - // Restrict reward summaries to those connected to the markets in the given list. - MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` - // Restrict rewards summaries to those that were paid after and including the given epoch ID. - FromEpoch *uint64 `protobuf:"varint,3,opt,name=from_epoch,json=fromEpoch,proto3,oneof" json:"from_epoch,omitempty"` - // Restrict rewards summaries to those that were paid up to and including the given epoch ID. - ToEpoch *uint64 `protobuf:"varint,4,opt,name=to_epoch,json=toEpoch,proto3,oneof" json:"to_epoch,omitempty"` + // Details for a single reward payment. + Node *vega.Reward `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // Cursor that can be used to fetch further pages. + Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` } -func (x *RewardSummaryFilter) Reset() { - *x = RewardSummaryFilter{} +func (x *RewardEdge) Reset() { + *x = RewardEdge{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[169] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10616,13 +10710,13 @@ func (x *RewardSummaryFilter) Reset() { } } -func (x *RewardSummaryFilter) String() string { +func (x *RewardEdge) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RewardSummaryFilter) ProtoMessage() {} +func (*RewardEdge) ProtoMessage() {} -func (x *RewardSummaryFilter) ProtoReflect() protoreflect.Message { +func (x *RewardEdge) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[169] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10634,53 +10728,39 @@ func (x *RewardSummaryFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RewardSummaryFilter.ProtoReflect.Descriptor instead. -func (*RewardSummaryFilter) Descriptor() ([]byte, []int) { +// Deprecated: Use RewardEdge.ProtoReflect.Descriptor instead. +func (*RewardEdge) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{169} } -func (x *RewardSummaryFilter) GetAssetIds() []string { +func (x *RewardEdge) GetNode() *vega.Reward { if x != nil { - return x.AssetIds + return x.Node } return nil } -func (x *RewardSummaryFilter) GetMarketIds() []string { +func (x *RewardEdge) GetCursor() string { if x != nil { - return x.MarketIds - } - return nil -} - -func (x *RewardSummaryFilter) GetFromEpoch() uint64 { - if x != nil && x.FromEpoch != nil { - return *x.FromEpoch - } - return 0 -} - -func (x *RewardSummaryFilter) GetToEpoch() uint64 { - if x != nil && x.ToEpoch != nil { - return *x.ToEpoch + return x.Cursor } - return 0 + return "" } -// Request to get summary of reward per epoch for a given range of epochs -type ListEpochRewardSummariesRequest struct { +// Page of rewards data and corresponding page information. +type RewardsConnection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Limit the results considered according to the filter supplied. - Filter *RewardSummaryFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` - // Optional pagination information to limit the data that is returned. - Pagination *Pagination `protobuf:"bytes,4,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` + // Page of rewards data items and their corresponding cursors. + Edges []*RewardEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` + // Page information that is used for fetching further pages. + PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` } -func (x *ListEpochRewardSummariesRequest) Reset() { - *x = ListEpochRewardSummariesRequest{} +func (x *RewardsConnection) Reset() { + *x = RewardsConnection{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[170] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10688,13 +10768,13 @@ func (x *ListEpochRewardSummariesRequest) Reset() { } } -func (x *ListEpochRewardSummariesRequest) String() string { +func (x *RewardsConnection) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListEpochRewardSummariesRequest) ProtoMessage() {} +func (*RewardsConnection) ProtoMessage() {} -func (x *ListEpochRewardSummariesRequest) ProtoReflect() protoreflect.Message { +func (x *RewardsConnection) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[170] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10706,37 +10786,41 @@ func (x *ListEpochRewardSummariesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListEpochRewardSummariesRequest.ProtoReflect.Descriptor instead. -func (*ListEpochRewardSummariesRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use RewardsConnection.ProtoReflect.Descriptor instead. +func (*RewardsConnection) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{170} } -func (x *ListEpochRewardSummariesRequest) GetFilter() *RewardSummaryFilter { +func (x *RewardsConnection) GetEdges() []*RewardEdge { if x != nil { - return x.Filter + return x.Edges } return nil } -func (x *ListEpochRewardSummariesRequest) GetPagination() *Pagination { +func (x *RewardsConnection) GetPageInfo() *PageInfo { if x != nil { - return x.Pagination + return x.PageInfo } return nil } -// Return message with reward details in for a single party -type ListEpochRewardSummariesResponse struct { +// Request to get reward details for a party +type ListRewardSummariesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of rewards details for a single party and corresponding page information. - Summaries *EpochRewardSummaryConnection `protobuf:"bytes,1,opt,name=summaries,proto3" json:"summaries,omitempty"` + // Restrict the reward summary to rewards paid to the given parties. + PartyId *string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3,oneof" json:"party_id,omitempty"` + // Restrict the reward summary to rewards paid in the given assets. + AssetId *string `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3,oneof" json:"asset_id,omitempty"` + // Pagination controls. + Pagination *Pagination `protobuf:"bytes,3,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` } -func (x *ListEpochRewardSummariesResponse) Reset() { - *x = ListEpochRewardSummariesResponse{} +func (x *ListRewardSummariesRequest) Reset() { + *x = ListRewardSummariesRequest{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[171] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10744,13 +10828,13 @@ func (x *ListEpochRewardSummariesResponse) Reset() { } } -func (x *ListEpochRewardSummariesResponse) String() string { +func (x *ListRewardSummariesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListEpochRewardSummariesResponse) ProtoMessage() {} +func (*ListRewardSummariesRequest) ProtoMessage() {} -func (x *ListEpochRewardSummariesResponse) ProtoReflect() protoreflect.Message { +func (x *ListRewardSummariesRequest) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[171] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10762,32 +10846,44 @@ func (x *ListEpochRewardSummariesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListEpochRewardSummariesResponse.ProtoReflect.Descriptor instead. -func (*ListEpochRewardSummariesResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListRewardSummariesRequest.ProtoReflect.Descriptor instead. +func (*ListRewardSummariesRequest) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{171} } -func (x *ListEpochRewardSummariesResponse) GetSummaries() *EpochRewardSummaryConnection { +func (x *ListRewardSummariesRequest) GetPartyId() string { + if x != nil && x.PartyId != nil { + return *x.PartyId + } + return "" +} + +func (x *ListRewardSummariesRequest) GetAssetId() string { + if x != nil && x.AssetId != nil { + return *x.AssetId + } + return "" +} + +func (x *ListRewardSummariesRequest) GetPagination() *Pagination { if x != nil { - return x.Summaries + return x.Pagination } return nil } -// Page of rewards summary data for epoch and corresponding page information -type EpochRewardSummaryConnection struct { +// Response from listing reward details in for a single party +type ListRewardSummariesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of rewards summary data for epochs and their corresponding cursors. - Edges []*EpochRewardSummaryEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` - // Page information that is used for fetching further pages. - PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` + // Page of rewards details data and corresponding page information. + Summaries []*vega.RewardSummary `protobuf:"bytes,1,rep,name=summaries,proto3" json:"summaries,omitempty"` } -func (x *EpochRewardSummaryConnection) Reset() { - *x = EpochRewardSummaryConnection{} +func (x *ListRewardSummariesResponse) Reset() { + *x = ListRewardSummariesResponse{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[172] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10795,13 +10891,13 @@ func (x *EpochRewardSummaryConnection) Reset() { } } -func (x *EpochRewardSummaryConnection) String() string { +func (x *ListRewardSummariesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EpochRewardSummaryConnection) ProtoMessage() {} +func (*ListRewardSummariesResponse) ProtoMessage() {} -func (x *EpochRewardSummaryConnection) ProtoReflect() protoreflect.Message { +func (x *ListRewardSummariesResponse) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[172] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10813,39 +10909,36 @@ func (x *EpochRewardSummaryConnection) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EpochRewardSummaryConnection.ProtoReflect.Descriptor instead. -func (*EpochRewardSummaryConnection) Descriptor() ([]byte, []int) { +// Deprecated: Use ListRewardSummariesResponse.ProtoReflect.Descriptor instead. +func (*ListRewardSummariesResponse) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{172} } -func (x *EpochRewardSummaryConnection) GetEdges() []*EpochRewardSummaryEdge { - if x != nil { - return x.Edges - } - return nil -} - -func (x *EpochRewardSummaryConnection) GetPageInfo() *PageInfo { +func (x *ListRewardSummariesResponse) GetSummaries() []*vega.RewardSummary { if x != nil { - return x.PageInfo + return x.Summaries } return nil } -// Rewards summary data for epoch with the corresponding cursor. -type EpochRewardSummaryEdge struct { +// Filter to restrict the results returned by the ListEpochRewardSummaries +type RewardSummaryFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Rewards summary data for epoch. - Node *vega.EpochRewardSummary `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // Cursor that can be used to fetch further pages. - Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` + // Restrict reward summaries to those connected to the assets in the given list. + AssetIds []string `protobuf:"bytes,1,rep,name=asset_ids,json=assetIds,proto3" json:"asset_ids,omitempty"` + // Restrict reward summaries to those connected to the markets in the given list. + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // Restrict rewards summaries to those that were paid after and including the given epoch ID. + FromEpoch *uint64 `protobuf:"varint,3,opt,name=from_epoch,json=fromEpoch,proto3,oneof" json:"from_epoch,omitempty"` + // Restrict rewards summaries to those that were paid up to and including the given epoch ID. + ToEpoch *uint64 `protobuf:"varint,4,opt,name=to_epoch,json=toEpoch,proto3,oneof" json:"to_epoch,omitempty"` } -func (x *EpochRewardSummaryEdge) Reset() { - *x = EpochRewardSummaryEdge{} +func (x *RewardSummaryFilter) Reset() { + *x = RewardSummaryFilter{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[173] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10853,13 +10946,13 @@ func (x *EpochRewardSummaryEdge) Reset() { } } -func (x *EpochRewardSummaryEdge) String() string { +func (x *RewardSummaryFilter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EpochRewardSummaryEdge) ProtoMessage() {} +func (*RewardSummaryFilter) ProtoMessage() {} -func (x *EpochRewardSummaryEdge) ProtoReflect() protoreflect.Message { +func (x *RewardSummaryFilter) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[173] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10871,39 +10964,53 @@ func (x *EpochRewardSummaryEdge) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EpochRewardSummaryEdge.ProtoReflect.Descriptor instead. -func (*EpochRewardSummaryEdge) Descriptor() ([]byte, []int) { +// Deprecated: Use RewardSummaryFilter.ProtoReflect.Descriptor instead. +func (*RewardSummaryFilter) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{173} } -func (x *EpochRewardSummaryEdge) GetNode() *vega.EpochRewardSummary { +func (x *RewardSummaryFilter) GetAssetIds() []string { if x != nil { - return x.Node + return x.AssetIds } return nil } -func (x *EpochRewardSummaryEdge) GetCursor() string { +func (x *RewardSummaryFilter) GetMarketIds() []string { if x != nil { - return x.Cursor + return x.MarketIds } - return "" + return nil } -// Request sent for subscribing to rewards -type ObserveRewardsRequest struct { +func (x *RewardSummaryFilter) GetFromEpoch() uint64 { + if x != nil && x.FromEpoch != nil { + return *x.FromEpoch + } + return 0 +} + +func (x *RewardSummaryFilter) GetToEpoch() uint64 { + if x != nil && x.ToEpoch != nil { + return *x.ToEpoch + } + return 0 +} + +// Request to get summary of reward per epoch for a given range of epochs +type ListEpochRewardSummariesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Asset ID to get rewards data for, if provided. - AssetId *string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3,oneof" json:"asset_id,omitempty"` - // Party ID to get rewards data for, if provided. - PartyId *string `protobuf:"bytes,2,opt,name=party_id,json=partyId,proto3,oneof" json:"party_id,omitempty"` + // Limit the results considered according to the filter supplied. + Filter *RewardSummaryFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional pagination information to limit the data that is returned. + Pagination *Pagination `protobuf:"bytes,4,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` } -func (x *ObserveRewardsRequest) Reset() { - *x = ObserveRewardsRequest{} +func (x *ListEpochRewardSummariesRequest) Reset() { + *x = ListEpochRewardSummariesRequest{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[174] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10911,13 +11018,13 @@ func (x *ObserveRewardsRequest) Reset() { } } -func (x *ObserveRewardsRequest) String() string { +func (x *ListEpochRewardSummariesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ObserveRewardsRequest) ProtoMessage() {} +func (*ListEpochRewardSummariesRequest) ProtoMessage() {} -func (x *ObserveRewardsRequest) ProtoReflect() protoreflect.Message { +func (x *ListEpochRewardSummariesRequest) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[174] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10929,37 +11036,37 @@ func (x *ObserveRewardsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ObserveRewardsRequest.ProtoReflect.Descriptor instead. -func (*ObserveRewardsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListEpochRewardSummariesRequest.ProtoReflect.Descriptor instead. +func (*ListEpochRewardSummariesRequest) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{174} } -func (x *ObserveRewardsRequest) GetAssetId() string { - if x != nil && x.AssetId != nil { - return *x.AssetId +func (x *ListEpochRewardSummariesRequest) GetFilter() *RewardSummaryFilter { + if x != nil { + return x.Filter } - return "" + return nil } -func (x *ObserveRewardsRequest) GetPartyId() string { - if x != nil && x.PartyId != nil { - return *x.PartyId +func (x *ListEpochRewardSummariesRequest) GetPagination() *Pagination { + if x != nil { + return x.Pagination } - return "" + return nil } -// Response that is received from subscribing to rewards data -type ObserveRewardsResponse struct { +// Return message with reward details in for a single party +type ListEpochRewardSummariesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Rewards data received. - Reward *vega.Reward `protobuf:"bytes,1,opt,name=reward,proto3" json:"reward,omitempty"` + // Page of rewards details for a single party and corresponding page information. + Summaries *EpochRewardSummaryConnection `protobuf:"bytes,1,opt,name=summaries,proto3" json:"summaries,omitempty"` } -func (x *ObserveRewardsResponse) Reset() { - *x = ObserveRewardsResponse{} +func (x *ListEpochRewardSummariesResponse) Reset() { + *x = ListEpochRewardSummariesResponse{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[175] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10967,13 +11074,13 @@ func (x *ObserveRewardsResponse) Reset() { } } -func (x *ObserveRewardsResponse) String() string { +func (x *ListEpochRewardSummariesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ObserveRewardsResponse) ProtoMessage() {} +func (*ListEpochRewardSummariesResponse) ProtoMessage() {} -func (x *ObserveRewardsResponse) ProtoReflect() protoreflect.Message { +func (x *ListEpochRewardSummariesResponse) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[175] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10985,30 +11092,32 @@ func (x *ObserveRewardsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ObserveRewardsResponse.ProtoReflect.Descriptor instead. -func (*ObserveRewardsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListEpochRewardSummariesResponse.ProtoReflect.Descriptor instead. +func (*ListEpochRewardSummariesResponse) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{175} } -func (x *ObserveRewardsResponse) GetReward() *vega.Reward { +func (x *ListEpochRewardSummariesResponse) GetSummaries() *EpochRewardSummaryConnection { if x != nil { - return x.Reward + return x.Summaries } return nil } -// Request to get data about a specific deposit by ID -type GetDepositRequest struct { +// Page of rewards summary data for epoch and corresponding page information +type EpochRewardSummaryConnection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deposit ID to return data for. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Page of rewards summary data for epochs and their corresponding cursors. + Edges []*EpochRewardSummaryEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` + // Page information that is used for fetching further pages. + PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` } -func (x *GetDepositRequest) Reset() { - *x = GetDepositRequest{} +func (x *EpochRewardSummaryConnection) Reset() { + *x = EpochRewardSummaryConnection{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[176] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -11016,13 +11125,13 @@ func (x *GetDepositRequest) Reset() { } } -func (x *GetDepositRequest) String() string { +func (x *EpochRewardSummaryConnection) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetDepositRequest) ProtoMessage() {} +func (*EpochRewardSummaryConnection) ProtoMessage() {} -func (x *GetDepositRequest) ProtoReflect() protoreflect.Message { +func (x *EpochRewardSummaryConnection) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[176] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -11034,30 +11143,39 @@ func (x *GetDepositRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetDepositRequest.ProtoReflect.Descriptor instead. -func (*GetDepositRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use EpochRewardSummaryConnection.ProtoReflect.Descriptor instead. +func (*EpochRewardSummaryConnection) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{176} } -func (x *GetDepositRequest) GetId() string { +func (x *EpochRewardSummaryConnection) GetEdges() []*EpochRewardSummaryEdge { if x != nil { - return x.Id + return x.Edges } - return "" + return nil } -// Response that is received from getting deposit data -type GetDepositResponse struct { +func (x *EpochRewardSummaryConnection) GetPageInfo() *PageInfo { + if x != nil { + return x.PageInfo + } + return nil +} + +// Rewards summary data for epoch with the corresponding cursor. +type EpochRewardSummaryEdge struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deposit matching the ID from the request. - Deposit *vega.Deposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` + // Rewards summary data for epoch. + Node *vega.EpochRewardSummary `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // Cursor that can be used to fetch further pages. + Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` } -func (x *GetDepositResponse) Reset() { - *x = GetDepositResponse{} +func (x *EpochRewardSummaryEdge) Reset() { + *x = EpochRewardSummaryEdge{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[177] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -11065,13 +11183,13 @@ func (x *GetDepositResponse) Reset() { } } -func (x *GetDepositResponse) String() string { +func (x *EpochRewardSummaryEdge) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetDepositResponse) ProtoMessage() {} +func (*EpochRewardSummaryEdge) ProtoMessage() {} -func (x *GetDepositResponse) ProtoReflect() protoreflect.Message { +func (x *EpochRewardSummaryEdge) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[177] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -11083,34 +11201,39 @@ func (x *GetDepositResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetDepositResponse.ProtoReflect.Descriptor instead. -func (*GetDepositResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use EpochRewardSummaryEdge.ProtoReflect.Descriptor instead. +func (*EpochRewardSummaryEdge) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{177} } -func (x *GetDepositResponse) GetDeposit() *vega.Deposit { +func (x *EpochRewardSummaryEdge) GetNode() *vega.EpochRewardSummary { if x != nil { - return x.Deposit + return x.Node } return nil } -// Request to list all deposits for a given party -type ListDepositsRequest struct { +func (x *EpochRewardSummaryEdge) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +// Request sent for subscribing to rewards +type ObserveRewardsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Restrict deposits to those made by the given party ID. - PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` - // Pagination controls. - Pagination *Pagination `protobuf:"bytes,2,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` - // Date range of the requested data, if provided. - DateRange *DateRange `protobuf:"bytes,3,opt,name=date_range,json=dateRange,proto3,oneof" json:"date_range,omitempty"` + // Asset ID to get rewards data for, if provided. + AssetId *string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3,oneof" json:"asset_id,omitempty"` + // Party ID to get rewards data for, if provided. + PartyId *string `protobuf:"bytes,2,opt,name=party_id,json=partyId,proto3,oneof" json:"party_id,omitempty"` } -func (x *ListDepositsRequest) Reset() { - *x = ListDepositsRequest{} +func (x *ObserveRewardsRequest) Reset() { + *x = ObserveRewardsRequest{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[178] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -11118,13 +11241,13 @@ func (x *ListDepositsRequest) Reset() { } } -func (x *ListDepositsRequest) String() string { +func (x *ObserveRewardsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListDepositsRequest) ProtoMessage() {} +func (*ObserveRewardsRequest) ProtoMessage() {} -func (x *ListDepositsRequest) ProtoReflect() protoreflect.Message { +func (x *ObserveRewardsRequest) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[178] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -11136,44 +11259,37 @@ func (x *ListDepositsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListDepositsRequest.ProtoReflect.Descriptor instead. -func (*ListDepositsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ObserveRewardsRequest.ProtoReflect.Descriptor instead. +func (*ObserveRewardsRequest) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{178} } -func (x *ListDepositsRequest) GetPartyId() string { - if x != nil { - return x.PartyId +func (x *ObserveRewardsRequest) GetAssetId() string { + if x != nil && x.AssetId != nil { + return *x.AssetId } return "" } -func (x *ListDepositsRequest) GetPagination() *Pagination { - if x != nil { - return x.Pagination - } - return nil -} - -func (x *ListDepositsRequest) GetDateRange() *DateRange { - if x != nil { - return x.DateRange +func (x *ObserveRewardsRequest) GetPartyId() string { + if x != nil && x.PartyId != nil { + return *x.PartyId } - return nil + return "" } -// Response from listing deposits -type ListDepositsResponse struct { +// Response that is received from subscribing to rewards data +type ObserveRewardsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of deposits data and corresponding page information. - Deposits *DepositsConnection `protobuf:"bytes,1,opt,name=deposits,proto3" json:"deposits,omitempty"` + // Rewards data received. + Reward *vega.Reward `protobuf:"bytes,1,opt,name=reward,proto3" json:"reward,omitempty"` } -func (x *ListDepositsResponse) Reset() { - *x = ListDepositsResponse{} +func (x *ObserveRewardsResponse) Reset() { + *x = ObserveRewardsResponse{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[179] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -11181,13 +11297,13 @@ func (x *ListDepositsResponse) Reset() { } } -func (x *ListDepositsResponse) String() string { +func (x *ObserveRewardsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListDepositsResponse) ProtoMessage() {} +func (*ObserveRewardsResponse) ProtoMessage() {} -func (x *ListDepositsResponse) ProtoReflect() protoreflect.Message { +func (x *ObserveRewardsResponse) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[179] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -11199,32 +11315,30 @@ func (x *ListDepositsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListDepositsResponse.ProtoReflect.Descriptor instead. -func (*ListDepositsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ObserveRewardsResponse.ProtoReflect.Descriptor instead. +func (*ObserveRewardsResponse) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{179} } -func (x *ListDepositsResponse) GetDeposits() *DepositsConnection { +func (x *ObserveRewardsResponse) GetReward() *vega.Reward { if x != nil { - return x.Deposits + return x.Reward } return nil } -// Deposits data with the corresponding cursor. -type DepositEdge struct { +// Request to get data about a specific deposit by ID +type GetDepositRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Data associated with a single deposit made on the Vega network. - Node *vega.Deposit `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // Cursor that can be used to fetch further pages. - Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` + // Deposit ID to return data for. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (x *DepositEdge) Reset() { - *x = DepositEdge{} +func (x *GetDepositRequest) Reset() { + *x = GetDepositRequest{} if protoimpl.UnsafeEnabled { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[180] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -11232,13 +11346,13 @@ func (x *DepositEdge) Reset() { } } -func (x *DepositEdge) String() string { +func (x *GetDepositRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DepositEdge) ProtoMessage() {} +func (*GetDepositRequest) ProtoMessage() {} -func (x *DepositEdge) ProtoReflect() protoreflect.Message { +func (x *GetDepositRequest) ProtoReflect() protoreflect.Message { mi := &file_data_node_api_v2_trading_data_proto_msgTypes[180] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -11250,12 +11364,228 @@ func (x *DepositEdge) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DepositEdge.ProtoReflect.Descriptor instead. -func (*DepositEdge) Descriptor() ([]byte, []int) { +// Deprecated: Use GetDepositRequest.ProtoReflect.Descriptor instead. +func (*GetDepositRequest) Descriptor() ([]byte, []int) { return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{180} } -func (x *DepositEdge) GetNode() *vega.Deposit { +func (x *GetDepositRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Response that is received from getting deposit data +type GetDepositResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deposit matching the ID from the request. + Deposit *vega.Deposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` +} + +func (x *GetDepositResponse) Reset() { + *x = GetDepositResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[181] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDepositResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDepositResponse) ProtoMessage() {} + +func (x *GetDepositResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[181] + 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 GetDepositResponse.ProtoReflect.Descriptor instead. +func (*GetDepositResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{181} +} + +func (x *GetDepositResponse) GetDeposit() *vega.Deposit { + if x != nil { + return x.Deposit + } + return nil +} + +// Request to list all deposits for a given party +type ListDepositsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Restrict deposits to those made by the given party ID. + PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + // Pagination controls. + Pagination *Pagination `protobuf:"bytes,2,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` + // Date range of the requested data, if provided. + DateRange *DateRange `protobuf:"bytes,3,opt,name=date_range,json=dateRange,proto3,oneof" json:"date_range,omitempty"` +} + +func (x *ListDepositsRequest) Reset() { + *x = ListDepositsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[182] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDepositsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDepositsRequest) ProtoMessage() {} + +func (x *ListDepositsRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[182] + 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 ListDepositsRequest.ProtoReflect.Descriptor instead. +func (*ListDepositsRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{182} +} + +func (x *ListDepositsRequest) GetPartyId() string { + if x != nil { + return x.PartyId + } + return "" +} + +func (x *ListDepositsRequest) GetPagination() *Pagination { + if x != nil { + return x.Pagination + } + return nil +} + +func (x *ListDepositsRequest) GetDateRange() *DateRange { + if x != nil { + return x.DateRange + } + return nil +} + +// Response from listing deposits +type ListDepositsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Page of deposits data and corresponding page information. + Deposits *DepositsConnection `protobuf:"bytes,1,opt,name=deposits,proto3" json:"deposits,omitempty"` +} + +func (x *ListDepositsResponse) Reset() { + *x = ListDepositsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[183] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDepositsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDepositsResponse) ProtoMessage() {} + +func (x *ListDepositsResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[183] + 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 ListDepositsResponse.ProtoReflect.Descriptor instead. +func (*ListDepositsResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{183} +} + +func (x *ListDepositsResponse) GetDeposits() *DepositsConnection { + if x != nil { + return x.Deposits + } + return nil +} + +// Deposits data with the corresponding cursor. +type DepositEdge struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Data associated with a single deposit made on the Vega network. + Node *vega.Deposit `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // Cursor that can be used to fetch further pages. + Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` +} + +func (x *DepositEdge) Reset() { + *x = DepositEdge{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[184] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DepositEdge) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DepositEdge) ProtoMessage() {} + +func (x *DepositEdge) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[184] + 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 DepositEdge.ProtoReflect.Descriptor instead. +func (*DepositEdge) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{184} +} + +func (x *DepositEdge) GetNode() *vega.Deposit { if x != nil { return x.Node } @@ -11284,7 +11614,7 @@ type DepositsConnection struct { func (x *DepositsConnection) Reset() { *x = DepositsConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[181] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[185] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11297,7 +11627,7 @@ func (x *DepositsConnection) String() string { func (*DepositsConnection) ProtoMessage() {} func (x *DepositsConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[181] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[185] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11310,7 +11640,7 @@ func (x *DepositsConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use DepositsConnection.ProtoReflect.Descriptor instead. func (*DepositsConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{181} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{185} } func (x *DepositsConnection) GetEdges() []*DepositEdge { @@ -11340,7 +11670,7 @@ type GetWithdrawalRequest struct { func (x *GetWithdrawalRequest) Reset() { *x = GetWithdrawalRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[182] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[186] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11353,7 +11683,7 @@ func (x *GetWithdrawalRequest) String() string { func (*GetWithdrawalRequest) ProtoMessage() {} func (x *GetWithdrawalRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[182] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[186] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11366,7 +11696,7 @@ func (x *GetWithdrawalRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWithdrawalRequest.ProtoReflect.Descriptor instead. func (*GetWithdrawalRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{182} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{186} } func (x *GetWithdrawalRequest) GetId() string { @@ -11389,7 +11719,7 @@ type GetWithdrawalResponse struct { func (x *GetWithdrawalResponse) Reset() { *x = GetWithdrawalResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[183] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[187] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11402,7 +11732,7 @@ func (x *GetWithdrawalResponse) String() string { func (*GetWithdrawalResponse) ProtoMessage() {} func (x *GetWithdrawalResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[183] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[187] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11415,7 +11745,7 @@ func (x *GetWithdrawalResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWithdrawalResponse.ProtoReflect.Descriptor instead. func (*GetWithdrawalResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{183} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{187} } func (x *GetWithdrawalResponse) GetWithdrawal() *vega.Withdrawal { @@ -11442,7 +11772,7 @@ type ListWithdrawalsRequest struct { func (x *ListWithdrawalsRequest) Reset() { *x = ListWithdrawalsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[184] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[188] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11455,7 +11785,7 @@ func (x *ListWithdrawalsRequest) String() string { func (*ListWithdrawalsRequest) ProtoMessage() {} func (x *ListWithdrawalsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[184] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[188] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11468,7 +11798,7 @@ func (x *ListWithdrawalsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListWithdrawalsRequest.ProtoReflect.Descriptor instead. func (*ListWithdrawalsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{184} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{188} } func (x *ListWithdrawalsRequest) GetPartyId() string { @@ -11505,7 +11835,7 @@ type ListWithdrawalsResponse struct { func (x *ListWithdrawalsResponse) Reset() { *x = ListWithdrawalsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[185] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[189] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11518,7 +11848,7 @@ func (x *ListWithdrawalsResponse) String() string { func (*ListWithdrawalsResponse) ProtoMessage() {} func (x *ListWithdrawalsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[185] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[189] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11531,7 +11861,7 @@ func (x *ListWithdrawalsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListWithdrawalsResponse.ProtoReflect.Descriptor instead. func (*ListWithdrawalsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{185} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{189} } func (x *ListWithdrawalsResponse) GetWithdrawals() *WithdrawalsConnection { @@ -11556,7 +11886,7 @@ type WithdrawalEdge struct { func (x *WithdrawalEdge) Reset() { *x = WithdrawalEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[186] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[190] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11569,7 +11899,7 @@ func (x *WithdrawalEdge) String() string { func (*WithdrawalEdge) ProtoMessage() {} func (x *WithdrawalEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[186] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[190] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11582,7 +11912,7 @@ func (x *WithdrawalEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use WithdrawalEdge.ProtoReflect.Descriptor instead. func (*WithdrawalEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{186} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{190} } func (x *WithdrawalEdge) GetNode() *vega.Withdrawal { @@ -11614,7 +11944,7 @@ type WithdrawalsConnection struct { func (x *WithdrawalsConnection) Reset() { *x = WithdrawalsConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[187] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[191] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11627,7 +11957,7 @@ func (x *WithdrawalsConnection) String() string { func (*WithdrawalsConnection) ProtoMessage() {} func (x *WithdrawalsConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[187] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[191] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11640,7 +11970,7 @@ func (x *WithdrawalsConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use WithdrawalsConnection.ProtoReflect.Descriptor instead. func (*WithdrawalsConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{187} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{191} } func (x *WithdrawalsConnection) GetEdges() []*WithdrawalEdge { @@ -11670,7 +12000,7 @@ type GetAssetRequest struct { func (x *GetAssetRequest) Reset() { *x = GetAssetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[188] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[192] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11683,7 +12013,7 @@ func (x *GetAssetRequest) String() string { func (*GetAssetRequest) ProtoMessage() {} func (x *GetAssetRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[188] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[192] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11696,7 +12026,7 @@ func (x *GetAssetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAssetRequest.ProtoReflect.Descriptor instead. func (*GetAssetRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{188} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{192} } func (x *GetAssetRequest) GetAssetId() string { @@ -11719,7 +12049,7 @@ type GetAssetResponse struct { func (x *GetAssetResponse) Reset() { *x = GetAssetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[189] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[193] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11732,7 +12062,7 @@ func (x *GetAssetResponse) String() string { func (*GetAssetResponse) ProtoMessage() {} func (x *GetAssetResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[189] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[193] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11745,7 +12075,7 @@ func (x *GetAssetResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAssetResponse.ProtoReflect.Descriptor instead. func (*GetAssetResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{189} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{193} } func (x *GetAssetResponse) GetAsset() *vega.Asset { @@ -11770,7 +12100,7 @@ type ListAssetsRequest struct { func (x *ListAssetsRequest) Reset() { *x = ListAssetsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[190] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[194] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11783,7 +12113,7 @@ func (x *ListAssetsRequest) String() string { func (*ListAssetsRequest) ProtoMessage() {} func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[190] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[194] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11796,7 +12126,7 @@ func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAssetsRequest.ProtoReflect.Descriptor instead. func (*ListAssetsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{190} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{194} } func (x *ListAssetsRequest) GetAssetId() string { @@ -11826,7 +12156,7 @@ type ListAssetsResponse struct { func (x *ListAssetsResponse) Reset() { *x = ListAssetsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[191] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[195] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11839,7 +12169,7 @@ func (x *ListAssetsResponse) String() string { func (*ListAssetsResponse) ProtoMessage() {} func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[191] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[195] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11852,7 +12182,7 @@ func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAssetsResponse.ProtoReflect.Descriptor instead. func (*ListAssetsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{191} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{195} } func (x *ListAssetsResponse) GetAssets() *AssetsConnection { @@ -11877,7 +12207,7 @@ type AssetEdge struct { func (x *AssetEdge) Reset() { *x = AssetEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[192] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[196] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11890,7 +12220,7 @@ func (x *AssetEdge) String() string { func (*AssetEdge) ProtoMessage() {} func (x *AssetEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[192] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[196] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11903,7 +12233,7 @@ func (x *AssetEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use AssetEdge.ProtoReflect.Descriptor instead. func (*AssetEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{192} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{196} } func (x *AssetEdge) GetNode() *vega.Asset { @@ -11935,7 +12265,7 @@ type AssetsConnection struct { func (x *AssetsConnection) Reset() { *x = AssetsConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[193] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[197] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11948,7 +12278,7 @@ func (x *AssetsConnection) String() string { func (*AssetsConnection) ProtoMessage() {} func (x *AssetsConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[193] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[197] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11961,7 +12291,7 @@ func (x *AssetsConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use AssetsConnection.ProtoReflect.Descriptor instead. func (*AssetsConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{193} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{197} } func (x *AssetsConnection) GetEdges() []*AssetEdge { @@ -11999,7 +12329,7 @@ type ListLiquidityProvisionsRequest struct { func (x *ListLiquidityProvisionsRequest) Reset() { *x = ListLiquidityProvisionsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[194] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[198] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12012,7 +12342,7 @@ func (x *ListLiquidityProvisionsRequest) String() string { func (*ListLiquidityProvisionsRequest) ProtoMessage() {} func (x *ListLiquidityProvisionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[194] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[198] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12025,7 +12355,7 @@ func (x *ListLiquidityProvisionsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListLiquidityProvisionsRequest.ProtoReflect.Descriptor instead. func (*ListLiquidityProvisionsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{194} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{198} } func (x *ListLiquidityProvisionsRequest) GetMarketId() string { @@ -12084,7 +12414,7 @@ type ListAllLiquidityProvisionsRequest struct { func (x *ListAllLiquidityProvisionsRequest) Reset() { *x = ListAllLiquidityProvisionsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[195] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[199] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12097,7 +12427,7 @@ func (x *ListAllLiquidityProvisionsRequest) String() string { func (*ListAllLiquidityProvisionsRequest) ProtoMessage() {} func (x *ListAllLiquidityProvisionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[195] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[199] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12110,7 +12440,7 @@ func (x *ListAllLiquidityProvisionsRequest) ProtoReflect() protoreflect.Message // Deprecated: Use ListAllLiquidityProvisionsRequest.ProtoReflect.Descriptor instead. func (*ListAllLiquidityProvisionsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{195} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{199} } func (x *ListAllLiquidityProvisionsRequest) GetMarketId() string { @@ -12161,7 +12491,7 @@ type ListLiquidityProvisionsResponse struct { func (x *ListLiquidityProvisionsResponse) Reset() { *x = ListLiquidityProvisionsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[196] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[200] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12174,7 +12504,7 @@ func (x *ListLiquidityProvisionsResponse) String() string { func (*ListLiquidityProvisionsResponse) ProtoMessage() {} func (x *ListLiquidityProvisionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[196] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[200] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12187,7 +12517,7 @@ func (x *ListLiquidityProvisionsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListLiquidityProvisionsResponse.ProtoReflect.Descriptor instead. func (*ListLiquidityProvisionsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{196} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{200} } func (x *ListLiquidityProvisionsResponse) GetLiquidityProvisions() *LiquidityProvisionsConnection { @@ -12210,7 +12540,7 @@ type ListAllLiquidityProvisionsResponse struct { func (x *ListAllLiquidityProvisionsResponse) Reset() { *x = ListAllLiquidityProvisionsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[197] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[201] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12223,7 +12553,7 @@ func (x *ListAllLiquidityProvisionsResponse) String() string { func (*ListAllLiquidityProvisionsResponse) ProtoMessage() {} func (x *ListAllLiquidityProvisionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[197] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[201] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12236,7 +12566,7 @@ func (x *ListAllLiquidityProvisionsResponse) ProtoReflect() protoreflect.Message // Deprecated: Use ListAllLiquidityProvisionsResponse.ProtoReflect.Descriptor instead. func (*ListAllLiquidityProvisionsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{197} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{201} } func (x *ListAllLiquidityProvisionsResponse) GetLiquidityProvisions() *LiquidityProvisionsWithPendingConnection { @@ -12263,7 +12593,7 @@ type LiquidityProvision struct { func (x *LiquidityProvision) Reset() { *x = LiquidityProvision{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[198] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[202] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12276,7 +12606,7 @@ func (x *LiquidityProvision) String() string { func (*LiquidityProvision) ProtoMessage() {} func (x *LiquidityProvision) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[198] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[202] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12289,7 +12619,7 @@ func (x *LiquidityProvision) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityProvision.ProtoReflect.Descriptor instead. func (*LiquidityProvision) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{198} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{202} } func (x *LiquidityProvision) GetCurrent() *vega.LiquidityProvision { @@ -12321,7 +12651,7 @@ type LiquidityProvisionsEdge struct { func (x *LiquidityProvisionsEdge) Reset() { *x = LiquidityProvisionsEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[199] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[203] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12334,7 +12664,7 @@ func (x *LiquidityProvisionsEdge) String() string { func (*LiquidityProvisionsEdge) ProtoMessage() {} func (x *LiquidityProvisionsEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[199] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[203] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12347,7 +12677,7 @@ func (x *LiquidityProvisionsEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityProvisionsEdge.ProtoReflect.Descriptor instead. func (*LiquidityProvisionsEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{199} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{203} } func (x *LiquidityProvisionsEdge) GetNode() *vega.LiquidityProvision { @@ -12379,7 +12709,7 @@ type LiquidityProvisionWithPendingEdge struct { func (x *LiquidityProvisionWithPendingEdge) Reset() { *x = LiquidityProvisionWithPendingEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[200] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[204] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12392,7 +12722,7 @@ func (x *LiquidityProvisionWithPendingEdge) String() string { func (*LiquidityProvisionWithPendingEdge) ProtoMessage() {} func (x *LiquidityProvisionWithPendingEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[200] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[204] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12405,7 +12735,7 @@ func (x *LiquidityProvisionWithPendingEdge) ProtoReflect() protoreflect.Message // Deprecated: Use LiquidityProvisionWithPendingEdge.ProtoReflect.Descriptor instead. func (*LiquidityProvisionWithPendingEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{200} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{204} } func (x *LiquidityProvisionWithPendingEdge) GetNode() *LiquidityProvision { @@ -12437,7 +12767,7 @@ type LiquidityProvisionsConnection struct { func (x *LiquidityProvisionsConnection) Reset() { *x = LiquidityProvisionsConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[201] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[205] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12450,7 +12780,7 @@ func (x *LiquidityProvisionsConnection) String() string { func (*LiquidityProvisionsConnection) ProtoMessage() {} func (x *LiquidityProvisionsConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[201] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[205] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12463,7 +12793,7 @@ func (x *LiquidityProvisionsConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityProvisionsConnection.ProtoReflect.Descriptor instead. func (*LiquidityProvisionsConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{201} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{205} } func (x *LiquidityProvisionsConnection) GetEdges() []*LiquidityProvisionsEdge { @@ -12495,7 +12825,7 @@ type LiquidityProvisionsWithPendingConnection struct { func (x *LiquidityProvisionsWithPendingConnection) Reset() { *x = LiquidityProvisionsWithPendingConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[202] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[206] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12508,7 +12838,7 @@ func (x *LiquidityProvisionsWithPendingConnection) String() string { func (*LiquidityProvisionsWithPendingConnection) ProtoMessage() {} func (x *LiquidityProvisionsWithPendingConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[202] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[206] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12521,7 +12851,7 @@ func (x *LiquidityProvisionsWithPendingConnection) ProtoReflect() protoreflect.M // Deprecated: Use LiquidityProvisionsWithPendingConnection.ProtoReflect.Descriptor instead. func (*LiquidityProvisionsWithPendingConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{202} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{206} } func (x *LiquidityProvisionsWithPendingConnection) GetEdges() []*LiquidityProvisionWithPendingEdge { @@ -12553,7 +12883,7 @@ type ObserveLiquidityProvisionsRequest struct { func (x *ObserveLiquidityProvisionsRequest) Reset() { *x = ObserveLiquidityProvisionsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[203] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[207] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12566,7 +12896,7 @@ func (x *ObserveLiquidityProvisionsRequest) String() string { func (*ObserveLiquidityProvisionsRequest) ProtoMessage() {} func (x *ObserveLiquidityProvisionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[203] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[207] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12579,7 +12909,7 @@ func (x *ObserveLiquidityProvisionsRequest) ProtoReflect() protoreflect.Message // Deprecated: Use ObserveLiquidityProvisionsRequest.ProtoReflect.Descriptor instead. func (*ObserveLiquidityProvisionsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{203} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{207} } func (x *ObserveLiquidityProvisionsRequest) GetMarketId() string { @@ -12608,7 +12938,7 @@ type ObserveLiquidityProvisionsResponse struct { func (x *ObserveLiquidityProvisionsResponse) Reset() { *x = ObserveLiquidityProvisionsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[204] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[208] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12621,7 +12951,7 @@ func (x *ObserveLiquidityProvisionsResponse) String() string { func (*ObserveLiquidityProvisionsResponse) ProtoMessage() {} func (x *ObserveLiquidityProvisionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[204] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[208] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12634,7 +12964,7 @@ func (x *ObserveLiquidityProvisionsResponse) ProtoReflect() protoreflect.Message // Deprecated: Use ObserveLiquidityProvisionsResponse.ProtoReflect.Descriptor instead. func (*ObserveLiquidityProvisionsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{204} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{208} } func (x *ObserveLiquidityProvisionsResponse) GetLiquidityProvisions() []*vega.LiquidityProvision { @@ -12662,7 +12992,7 @@ type ListLiquidityProvidersRequest struct { func (x *ListLiquidityProvidersRequest) Reset() { *x = ListLiquidityProvidersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[205] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[209] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12675,7 +13005,7 @@ func (x *ListLiquidityProvidersRequest) String() string { func (*ListLiquidityProvidersRequest) ProtoMessage() {} func (x *ListLiquidityProvidersRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[205] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[209] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12688,7 +13018,7 @@ func (x *ListLiquidityProvidersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListLiquidityProvidersRequest.ProtoReflect.Descriptor instead. func (*ListLiquidityProvidersRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{205} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{209} } func (x *ListLiquidityProvidersRequest) GetMarketId() string { @@ -12732,7 +13062,7 @@ type LiquidityProvider struct { func (x *LiquidityProvider) Reset() { *x = LiquidityProvider{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[206] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[210] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12745,7 +13075,7 @@ func (x *LiquidityProvider) String() string { func (*LiquidityProvider) ProtoMessage() {} func (x *LiquidityProvider) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[206] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[210] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12758,7 +13088,7 @@ func (x *LiquidityProvider) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityProvider.ProtoReflect.Descriptor instead. func (*LiquidityProvider) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{206} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{210} } func (x *LiquidityProvider) GetPartyId() string { @@ -12804,7 +13134,7 @@ type LiquidityProviderEdge struct { func (x *LiquidityProviderEdge) Reset() { *x = LiquidityProviderEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[207] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[211] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12817,7 +13147,7 @@ func (x *LiquidityProviderEdge) String() string { func (*LiquidityProviderEdge) ProtoMessage() {} func (x *LiquidityProviderEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[207] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[211] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12830,7 +13160,7 @@ func (x *LiquidityProviderEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityProviderEdge.ProtoReflect.Descriptor instead. func (*LiquidityProviderEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{207} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{211} } func (x *LiquidityProviderEdge) GetNode() *LiquidityProvider { @@ -12862,7 +13192,7 @@ type LiquidityProviderConnection struct { func (x *LiquidityProviderConnection) Reset() { *x = LiquidityProviderConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[208] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[212] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12875,7 +13205,7 @@ func (x *LiquidityProviderConnection) String() string { func (*LiquidityProviderConnection) ProtoMessage() {} func (x *LiquidityProviderConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[208] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[212] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12888,7 +13218,7 @@ func (x *LiquidityProviderConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityProviderConnection.ProtoReflect.Descriptor instead. func (*LiquidityProviderConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{208} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{212} } func (x *LiquidityProviderConnection) GetEdges() []*LiquidityProviderEdge { @@ -12918,7 +13248,7 @@ type ListLiquidityProvidersResponse struct { func (x *ListLiquidityProvidersResponse) Reset() { *x = ListLiquidityProvidersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[209] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[213] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12931,7 +13261,7 @@ func (x *ListLiquidityProvidersResponse) String() string { func (*ListLiquidityProvidersResponse) ProtoMessage() {} func (x *ListLiquidityProvidersResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[209] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[213] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12944,7 +13274,7 @@ func (x *ListLiquidityProvidersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListLiquidityProvidersResponse.ProtoReflect.Descriptor instead. func (*ListLiquidityProvidersResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{209} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{213} } func (x *ListLiquidityProvidersResponse) GetLiquidityProviders() *LiquidityProviderConnection { @@ -12975,7 +13305,7 @@ type ListPaidLiquidityFeesRequest struct { func (x *ListPaidLiquidityFeesRequest) Reset() { *x = ListPaidLiquidityFeesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[210] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[214] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12988,7 +13318,7 @@ func (x *ListPaidLiquidityFeesRequest) String() string { func (*ListPaidLiquidityFeesRequest) ProtoMessage() {} func (x *ListPaidLiquidityFeesRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[210] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[214] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13001,7 +13331,7 @@ func (x *ListPaidLiquidityFeesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPaidLiquidityFeesRequest.ProtoReflect.Descriptor instead. func (*ListPaidLiquidityFeesRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{210} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{214} } func (x *ListPaidLiquidityFeesRequest) GetMarketId() string { @@ -13052,7 +13382,7 @@ type ListPaidLiquidityFeesResponse struct { func (x *ListPaidLiquidityFeesResponse) Reset() { *x = ListPaidLiquidityFeesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[211] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[215] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13065,7 +13395,7 @@ func (x *ListPaidLiquidityFeesResponse) String() string { func (*ListPaidLiquidityFeesResponse) ProtoMessage() {} func (x *ListPaidLiquidityFeesResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[211] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[215] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13078,7 +13408,7 @@ func (x *ListPaidLiquidityFeesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPaidLiquidityFeesResponse.ProtoReflect.Descriptor instead. func (*ListPaidLiquidityFeesResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{211} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{215} } func (x *ListPaidLiquidityFeesResponse) GetPaidLiquidityFees() *PaidLiquidityFeesConnection { @@ -13103,7 +13433,7 @@ type PaidLiquidityFeesEdge struct { func (x *PaidLiquidityFeesEdge) Reset() { *x = PaidLiquidityFeesEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[212] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[216] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13116,7 +13446,7 @@ func (x *PaidLiquidityFeesEdge) String() string { func (*PaidLiquidityFeesEdge) ProtoMessage() {} func (x *PaidLiquidityFeesEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[212] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[216] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13129,7 +13459,7 @@ func (x *PaidLiquidityFeesEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use PaidLiquidityFeesEdge.ProtoReflect.Descriptor instead. func (*PaidLiquidityFeesEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{212} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{216} } func (x *PaidLiquidityFeesEdge) GetNode() *v1.PaidLiquidityFeesStats { @@ -13161,7 +13491,7 @@ type PaidLiquidityFeesConnection struct { func (x *PaidLiquidityFeesConnection) Reset() { *x = PaidLiquidityFeesConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[213] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[217] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13174,7 +13504,7 @@ func (x *PaidLiquidityFeesConnection) String() string { func (*PaidLiquidityFeesConnection) ProtoMessage() {} func (x *PaidLiquidityFeesConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[213] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[217] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13187,7 +13517,7 @@ func (x *PaidLiquidityFeesConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use PaidLiquidityFeesConnection.ProtoReflect.Descriptor instead. func (*PaidLiquidityFeesConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{213} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{217} } func (x *PaidLiquidityFeesConnection) GetEdges() []*PaidLiquidityFeesEdge { @@ -13219,7 +13549,7 @@ type GetGovernanceDataRequest struct { func (x *GetGovernanceDataRequest) Reset() { *x = GetGovernanceDataRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[214] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[218] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13232,7 +13562,7 @@ func (x *GetGovernanceDataRequest) String() string { func (*GetGovernanceDataRequest) ProtoMessage() {} func (x *GetGovernanceDataRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[214] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[218] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13245,7 +13575,7 @@ func (x *GetGovernanceDataRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetGovernanceDataRequest.ProtoReflect.Descriptor instead. func (*GetGovernanceDataRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{214} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{218} } func (x *GetGovernanceDataRequest) GetProposalId() string { @@ -13275,7 +13605,7 @@ type GetGovernanceDataResponse struct { func (x *GetGovernanceDataResponse) Reset() { *x = GetGovernanceDataResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[215] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[219] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13288,7 +13618,7 @@ func (x *GetGovernanceDataResponse) String() string { func (*GetGovernanceDataResponse) ProtoMessage() {} func (x *GetGovernanceDataResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[215] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[219] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13301,7 +13631,7 @@ func (x *GetGovernanceDataResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetGovernanceDataResponse.ProtoReflect.Descriptor instead. func (*GetGovernanceDataResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{215} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{219} } func (x *GetGovernanceDataResponse) GetData() *vega.GovernanceData { @@ -13332,7 +13662,7 @@ type ListGovernanceDataRequest struct { func (x *ListGovernanceDataRequest) Reset() { *x = ListGovernanceDataRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[216] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[220] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13345,7 +13675,7 @@ func (x *ListGovernanceDataRequest) String() string { func (*ListGovernanceDataRequest) ProtoMessage() {} func (x *ListGovernanceDataRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[216] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[220] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13358,7 +13688,7 @@ func (x *ListGovernanceDataRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListGovernanceDataRequest.ProtoReflect.Descriptor instead. func (*ListGovernanceDataRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{216} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{220} } func (x *ListGovernanceDataRequest) GetProposalState() vega.Proposal_State { @@ -13409,7 +13739,7 @@ type ListGovernanceDataResponse struct { func (x *ListGovernanceDataResponse) Reset() { *x = ListGovernanceDataResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[217] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[221] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13422,7 +13752,7 @@ func (x *ListGovernanceDataResponse) String() string { func (*ListGovernanceDataResponse) ProtoMessage() {} func (x *ListGovernanceDataResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[217] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[221] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13435,7 +13765,7 @@ func (x *ListGovernanceDataResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListGovernanceDataResponse.ProtoReflect.Descriptor instead. func (*ListGovernanceDataResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{217} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{221} } func (x *ListGovernanceDataResponse) GetConnection() *GovernanceDataConnection { @@ -13460,7 +13790,7 @@ type GovernanceDataEdge struct { func (x *GovernanceDataEdge) Reset() { *x = GovernanceDataEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[218] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[222] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13473,7 +13803,7 @@ func (x *GovernanceDataEdge) String() string { func (*GovernanceDataEdge) ProtoMessage() {} func (x *GovernanceDataEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[218] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[222] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13486,7 +13816,7 @@ func (x *GovernanceDataEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use GovernanceDataEdge.ProtoReflect.Descriptor instead. func (*GovernanceDataEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{218} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{222} } func (x *GovernanceDataEdge) GetNode() *vega.GovernanceData { @@ -13518,7 +13848,7 @@ type GovernanceDataConnection struct { func (x *GovernanceDataConnection) Reset() { *x = GovernanceDataConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[219] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[223] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13531,7 +13861,7 @@ func (x *GovernanceDataConnection) String() string { func (*GovernanceDataConnection) ProtoMessage() {} func (x *GovernanceDataConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[219] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[223] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13544,7 +13874,7 @@ func (x *GovernanceDataConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use GovernanceDataConnection.ProtoReflect.Descriptor instead. func (*GovernanceDataConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{219} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{223} } func (x *GovernanceDataConnection) GetEdges() []*GovernanceDataEdge { @@ -13574,7 +13904,7 @@ type ObserveGovernanceRequest struct { func (x *ObserveGovernanceRequest) Reset() { *x = ObserveGovernanceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[220] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[224] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13587,7 +13917,7 @@ func (x *ObserveGovernanceRequest) String() string { func (*ObserveGovernanceRequest) ProtoMessage() {} func (x *ObserveGovernanceRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[220] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[224] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13600,7 +13930,7 @@ func (x *ObserveGovernanceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ObserveGovernanceRequest.ProtoReflect.Descriptor instead. func (*ObserveGovernanceRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{220} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{224} } func (x *ObserveGovernanceRequest) GetPartyId() string { @@ -13623,7 +13953,7 @@ type ObserveGovernanceResponse struct { func (x *ObserveGovernanceResponse) Reset() { *x = ObserveGovernanceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[221] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[225] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13636,7 +13966,7 @@ func (x *ObserveGovernanceResponse) String() string { func (*ObserveGovernanceResponse) ProtoMessage() {} func (x *ObserveGovernanceResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[221] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[225] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13649,7 +13979,7 @@ func (x *ObserveGovernanceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ObserveGovernanceResponse.ProtoReflect.Descriptor instead. func (*ObserveGovernanceResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{221} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{225} } func (x *ObserveGovernanceResponse) GetData() *vega.GovernanceData { @@ -13678,7 +14008,7 @@ type ListDelegationsRequest struct { func (x *ListDelegationsRequest) Reset() { *x = ListDelegationsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[222] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[226] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13691,7 +14021,7 @@ func (x *ListDelegationsRequest) String() string { func (*ListDelegationsRequest) ProtoMessage() {} func (x *ListDelegationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[222] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[226] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13704,7 +14034,7 @@ func (x *ListDelegationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListDelegationsRequest.ProtoReflect.Descriptor instead. func (*ListDelegationsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{222} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{226} } func (x *ListDelegationsRequest) GetPartyId() string { @@ -13748,7 +14078,7 @@ type ListDelegationsResponse struct { func (x *ListDelegationsResponse) Reset() { *x = ListDelegationsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[223] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[227] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13761,7 +14091,7 @@ func (x *ListDelegationsResponse) String() string { func (*ListDelegationsResponse) ProtoMessage() {} func (x *ListDelegationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[223] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[227] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13774,7 +14104,7 @@ func (x *ListDelegationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListDelegationsResponse.ProtoReflect.Descriptor instead. func (*ListDelegationsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{223} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{227} } func (x *ListDelegationsResponse) GetDelegations() *DelegationsConnection { @@ -13799,7 +14129,7 @@ type DelegationEdge struct { func (x *DelegationEdge) Reset() { *x = DelegationEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[224] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[228] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13812,7 +14142,7 @@ func (x *DelegationEdge) String() string { func (*DelegationEdge) ProtoMessage() {} func (x *DelegationEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[224] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[228] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13825,7 +14155,7 @@ func (x *DelegationEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use DelegationEdge.ProtoReflect.Descriptor instead. func (*DelegationEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{224} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{228} } func (x *DelegationEdge) GetNode() *vega.Delegation { @@ -13857,7 +14187,7 @@ type DelegationsConnection struct { func (x *DelegationsConnection) Reset() { *x = DelegationsConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[225] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[229] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13870,7 +14200,7 @@ func (x *DelegationsConnection) String() string { func (*DelegationsConnection) ProtoMessage() {} func (x *DelegationsConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[225] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[229] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13883,7 +14213,7 @@ func (x *DelegationsConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use DelegationsConnection.ProtoReflect.Descriptor instead. func (*DelegationsConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{225} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{229} } func (x *DelegationsConnection) GetEdges() []*DelegationEdge { @@ -13915,7 +14245,7 @@ type ObserveDelegationsRequest struct { func (x *ObserveDelegationsRequest) Reset() { *x = ObserveDelegationsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[226] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[230] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13928,7 +14258,7 @@ func (x *ObserveDelegationsRequest) String() string { func (*ObserveDelegationsRequest) ProtoMessage() {} func (x *ObserveDelegationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[226] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[230] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13941,7 +14271,7 @@ func (x *ObserveDelegationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ObserveDelegationsRequest.ProtoReflect.Descriptor instead. func (*ObserveDelegationsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{226} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{230} } func (x *ObserveDelegationsRequest) GetPartyId() string { @@ -13971,7 +14301,7 @@ type ObserveDelegationsResponse struct { func (x *ObserveDelegationsResponse) Reset() { *x = ObserveDelegationsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[227] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[231] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -13984,7 +14314,7 @@ func (x *ObserveDelegationsResponse) String() string { func (*ObserveDelegationsResponse) ProtoMessage() {} func (x *ObserveDelegationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[227] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[231] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -13997,7 +14327,7 @@ func (x *ObserveDelegationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ObserveDelegationsResponse.ProtoReflect.Descriptor instead. func (*ObserveDelegationsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{227} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{231} } func (x *ObserveDelegationsResponse) GetDelegation() *vega.Delegation { @@ -14036,7 +14366,7 @@ type NodeBasic struct { func (x *NodeBasic) Reset() { *x = NodeBasic{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[228] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[232] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14049,7 +14379,7 @@ func (x *NodeBasic) String() string { func (*NodeBasic) ProtoMessage() {} func (x *NodeBasic) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[228] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[232] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14062,7 +14392,7 @@ func (x *NodeBasic) ProtoReflect() protoreflect.Message { // Deprecated: Use NodeBasic.ProtoReflect.Descriptor instead. func (*NodeBasic) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{228} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{232} } func (x *NodeBasic) GetId() string { @@ -14138,7 +14468,7 @@ type GetNetworkDataRequest struct { func (x *GetNetworkDataRequest) Reset() { *x = GetNetworkDataRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[229] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[233] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14151,7 +14481,7 @@ func (x *GetNetworkDataRequest) String() string { func (*GetNetworkDataRequest) ProtoMessage() {} func (x *GetNetworkDataRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[229] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[233] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14164,7 +14494,7 @@ func (x *GetNetworkDataRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetNetworkDataRequest.ProtoReflect.Descriptor instead. func (*GetNetworkDataRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{229} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{233} } // Response from getting network data @@ -14180,7 +14510,7 @@ type GetNetworkDataResponse struct { func (x *GetNetworkDataResponse) Reset() { *x = GetNetworkDataResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[230] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[234] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14193,7 +14523,7 @@ func (x *GetNetworkDataResponse) String() string { func (*GetNetworkDataResponse) ProtoMessage() {} func (x *GetNetworkDataResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[230] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[234] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14206,7 +14536,7 @@ func (x *GetNetworkDataResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetNetworkDataResponse.ProtoReflect.Descriptor instead. func (*GetNetworkDataResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{230} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{234} } func (x *GetNetworkDataResponse) GetNodeData() *vega.NodeData { @@ -14229,7 +14559,7 @@ type GetNodeRequest struct { func (x *GetNodeRequest) Reset() { *x = GetNodeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[231] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[235] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14242,7 +14572,7 @@ func (x *GetNodeRequest) String() string { func (*GetNodeRequest) ProtoMessage() {} func (x *GetNodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[231] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[235] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14255,7 +14585,7 @@ func (x *GetNodeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetNodeRequest.ProtoReflect.Descriptor instead. func (*GetNodeRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{231} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{235} } func (x *GetNodeRequest) GetId() string { @@ -14278,7 +14608,7 @@ type GetNodeResponse struct { func (x *GetNodeResponse) Reset() { *x = GetNodeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[232] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[236] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14291,7 +14621,7 @@ func (x *GetNodeResponse) String() string { func (*GetNodeResponse) ProtoMessage() {} func (x *GetNodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[232] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[236] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14304,7 +14634,7 @@ func (x *GetNodeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetNodeResponse.ProtoReflect.Descriptor instead. func (*GetNodeResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{232} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{236} } func (x *GetNodeResponse) GetNode() *vega.Node { @@ -14329,7 +14659,7 @@ type ListNodesRequest struct { func (x *ListNodesRequest) Reset() { *x = ListNodesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[233] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[237] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14342,7 +14672,7 @@ func (x *ListNodesRequest) String() string { func (*ListNodesRequest) ProtoMessage() {} func (x *ListNodesRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[233] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[237] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14355,7 +14685,7 @@ func (x *ListNodesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListNodesRequest.ProtoReflect.Descriptor instead. func (*ListNodesRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{233} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{237} } func (x *ListNodesRequest) GetEpochSeq() uint64 { @@ -14385,7 +14715,7 @@ type ListNodesResponse struct { func (x *ListNodesResponse) Reset() { *x = ListNodesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[234] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[238] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14398,7 +14728,7 @@ func (x *ListNodesResponse) String() string { func (*ListNodesResponse) ProtoMessage() {} func (x *ListNodesResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[234] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[238] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14411,7 +14741,7 @@ func (x *ListNodesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListNodesResponse.ProtoReflect.Descriptor instead. func (*ListNodesResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{234} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{238} } func (x *ListNodesResponse) GetNodes() *NodesConnection { @@ -14436,7 +14766,7 @@ type NodeEdge struct { func (x *NodeEdge) Reset() { *x = NodeEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[235] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[239] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14449,7 +14779,7 @@ func (x *NodeEdge) String() string { func (*NodeEdge) ProtoMessage() {} func (x *NodeEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[235] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[239] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14462,7 +14792,7 @@ func (x *NodeEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use NodeEdge.ProtoReflect.Descriptor instead. func (*NodeEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{235} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{239} } func (x *NodeEdge) GetNode() *vega.Node { @@ -14494,7 +14824,7 @@ type NodesConnection struct { func (x *NodesConnection) Reset() { *x = NodesConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[236] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[240] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14507,7 +14837,7 @@ func (x *NodesConnection) String() string { func (*NodesConnection) ProtoMessage() {} func (x *NodesConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[236] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[240] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14520,7 +14850,7 @@ func (x *NodesConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use NodesConnection.ProtoReflect.Descriptor instead. func (*NodesConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{236} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{240} } func (x *NodesConnection) GetEdges() []*NodeEdge { @@ -14552,7 +14882,7 @@ type ListNodeSignaturesRequest struct { func (x *ListNodeSignaturesRequest) Reset() { *x = ListNodeSignaturesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[237] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[241] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14565,7 +14895,7 @@ func (x *ListNodeSignaturesRequest) String() string { func (*ListNodeSignaturesRequest) ProtoMessage() {} func (x *ListNodeSignaturesRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[237] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[241] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14578,7 +14908,7 @@ func (x *ListNodeSignaturesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListNodeSignaturesRequest.ProtoReflect.Descriptor instead. func (*ListNodeSignaturesRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{237} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{241} } func (x *ListNodeSignaturesRequest) GetId() string { @@ -14608,7 +14938,7 @@ type ListNodeSignaturesResponse struct { func (x *ListNodeSignaturesResponse) Reset() { *x = ListNodeSignaturesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[238] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[242] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14621,7 +14951,7 @@ func (x *ListNodeSignaturesResponse) String() string { func (*ListNodeSignaturesResponse) ProtoMessage() {} func (x *ListNodeSignaturesResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[238] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[242] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14634,7 +14964,7 @@ func (x *ListNodeSignaturesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListNodeSignaturesResponse.ProtoReflect.Descriptor instead. func (*ListNodeSignaturesResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{238} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{242} } func (x *ListNodeSignaturesResponse) GetSignatures() *NodeSignaturesConnection { @@ -14659,7 +14989,7 @@ type NodeSignatureEdge struct { func (x *NodeSignatureEdge) Reset() { *x = NodeSignatureEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[239] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[243] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14672,7 +15002,7 @@ func (x *NodeSignatureEdge) String() string { func (*NodeSignatureEdge) ProtoMessage() {} func (x *NodeSignatureEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[239] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[243] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14685,7 +15015,7 @@ func (x *NodeSignatureEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use NodeSignatureEdge.ProtoReflect.Descriptor instead. func (*NodeSignatureEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{239} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{243} } func (x *NodeSignatureEdge) GetNode() *v11.NodeSignature { @@ -14717,7 +15047,7 @@ type NodeSignaturesConnection struct { func (x *NodeSignaturesConnection) Reset() { *x = NodeSignaturesConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[240] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[244] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14730,7 +15060,7 @@ func (x *NodeSignaturesConnection) String() string { func (*NodeSignaturesConnection) ProtoMessage() {} func (x *NodeSignaturesConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[240] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[244] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14743,7 +15073,7 @@ func (x *NodeSignaturesConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use NodeSignaturesConnection.ProtoReflect.Descriptor instead. func (*NodeSignaturesConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{240} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{244} } func (x *NodeSignaturesConnection) GetEdges() []*NodeSignatureEdge { @@ -14777,7 +15107,7 @@ type GetEpochRequest struct { func (x *GetEpochRequest) Reset() { *x = GetEpochRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[241] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[245] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14790,7 +15120,7 @@ func (x *GetEpochRequest) String() string { func (*GetEpochRequest) ProtoMessage() {} func (x *GetEpochRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[241] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[245] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14803,7 +15133,7 @@ func (x *GetEpochRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetEpochRequest.ProtoReflect.Descriptor instead. func (*GetEpochRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{241} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{245} } func (x *GetEpochRequest) GetId() uint64 { @@ -14834,7 +15164,7 @@ type GetEpochResponse struct { func (x *GetEpochResponse) Reset() { *x = GetEpochResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[242] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[246] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14847,7 +15177,7 @@ func (x *GetEpochResponse) String() string { func (*GetEpochResponse) ProtoMessage() {} func (x *GetEpochResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[242] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[246] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14860,7 +15190,7 @@ func (x *GetEpochResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetEpochResponse.ProtoReflect.Descriptor instead. func (*GetEpochResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{242} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{246} } func (x *GetEpochResponse) GetEpoch() *vega.Epoch { @@ -14887,7 +15217,7 @@ type EstimateFeeRequest struct { func (x *EstimateFeeRequest) Reset() { *x = EstimateFeeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[243] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[247] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14900,7 +15230,7 @@ func (x *EstimateFeeRequest) String() string { func (*EstimateFeeRequest) ProtoMessage() {} func (x *EstimateFeeRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[243] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[247] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14913,7 +15243,7 @@ func (x *EstimateFeeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EstimateFeeRequest.ProtoReflect.Descriptor instead. func (*EstimateFeeRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{243} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{247} } func (x *EstimateFeeRequest) GetMarketId() string { @@ -14950,7 +15280,7 @@ type EstimateFeeResponse struct { func (x *EstimateFeeResponse) Reset() { *x = EstimateFeeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[244] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[248] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14963,7 +15293,7 @@ func (x *EstimateFeeResponse) String() string { func (*EstimateFeeResponse) ProtoMessage() {} func (x *EstimateFeeResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[244] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[248] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14976,7 +15306,7 @@ func (x *EstimateFeeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EstimateFeeResponse.ProtoReflect.Descriptor instead. func (*EstimateFeeResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{244} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{248} } func (x *EstimateFeeResponse) GetFee() *vega.Fee { @@ -15011,7 +15341,7 @@ type EstimateMarginRequest struct { func (x *EstimateMarginRequest) Reset() { *x = EstimateMarginRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[245] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[249] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15024,7 +15354,7 @@ func (x *EstimateMarginRequest) String() string { func (*EstimateMarginRequest) ProtoMessage() {} func (x *EstimateMarginRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[245] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[249] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15037,7 +15367,7 @@ func (x *EstimateMarginRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EstimateMarginRequest.ProtoReflect.Descriptor instead. func (*EstimateMarginRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{245} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{249} } func (x *EstimateMarginRequest) GetMarketId() string { @@ -15097,7 +15427,7 @@ type EstimateMarginResponse struct { func (x *EstimateMarginResponse) Reset() { *x = EstimateMarginResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[246] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[250] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15110,7 +15440,7 @@ func (x *EstimateMarginResponse) String() string { func (*EstimateMarginResponse) ProtoMessage() {} func (x *EstimateMarginResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[246] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[250] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15123,7 +15453,7 @@ func (x *EstimateMarginResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EstimateMarginResponse.ProtoReflect.Descriptor instead. func (*EstimateMarginResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{246} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{250} } func (x *EstimateMarginResponse) GetMarginLevels() *vega.MarginLevels { @@ -15146,7 +15476,7 @@ type ListNetworkParametersRequest struct { func (x *ListNetworkParametersRequest) Reset() { *x = ListNetworkParametersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[247] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[251] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15159,7 +15489,7 @@ func (x *ListNetworkParametersRequest) String() string { func (*ListNetworkParametersRequest) ProtoMessage() {} func (x *ListNetworkParametersRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[247] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[251] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15172,7 +15502,7 @@ func (x *ListNetworkParametersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListNetworkParametersRequest.ProtoReflect.Descriptor instead. func (*ListNetworkParametersRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{247} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{251} } func (x *ListNetworkParametersRequest) GetPagination() *Pagination { @@ -15195,7 +15525,7 @@ type ListNetworkParametersResponse struct { func (x *ListNetworkParametersResponse) Reset() { *x = ListNetworkParametersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[248] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[252] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15208,7 +15538,7 @@ func (x *ListNetworkParametersResponse) String() string { func (*ListNetworkParametersResponse) ProtoMessage() {} func (x *ListNetworkParametersResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[248] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[252] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15221,7 +15551,7 @@ func (x *ListNetworkParametersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListNetworkParametersResponse.ProtoReflect.Descriptor instead. func (*ListNetworkParametersResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{248} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{252} } func (x *ListNetworkParametersResponse) GetNetworkParameters() *NetworkParameterConnection { @@ -15244,7 +15574,7 @@ type GetNetworkParameterRequest struct { func (x *GetNetworkParameterRequest) Reset() { *x = GetNetworkParameterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[249] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[253] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15257,7 +15587,7 @@ func (x *GetNetworkParameterRequest) String() string { func (*GetNetworkParameterRequest) ProtoMessage() {} func (x *GetNetworkParameterRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[249] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[253] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15270,7 +15600,7 @@ func (x *GetNetworkParameterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetNetworkParameterRequest.ProtoReflect.Descriptor instead. func (*GetNetworkParameterRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{249} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{253} } func (x *GetNetworkParameterRequest) GetKey() string { @@ -15293,7 +15623,7 @@ type GetNetworkParameterResponse struct { func (x *GetNetworkParameterResponse) Reset() { *x = GetNetworkParameterResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[250] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[254] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15306,7 +15636,7 @@ func (x *GetNetworkParameterResponse) String() string { func (*GetNetworkParameterResponse) ProtoMessage() {} func (x *GetNetworkParameterResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[250] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[254] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15319,7 +15649,7 @@ func (x *GetNetworkParameterResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetNetworkParameterResponse.ProtoReflect.Descriptor instead. func (*GetNetworkParameterResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{250} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{254} } func (x *GetNetworkParameterResponse) GetNetworkParameter() *vega.NetworkParameter { @@ -15344,7 +15674,7 @@ type NetworkParameterEdge struct { func (x *NetworkParameterEdge) Reset() { *x = NetworkParameterEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[251] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[255] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15357,7 +15687,7 @@ func (x *NetworkParameterEdge) String() string { func (*NetworkParameterEdge) ProtoMessage() {} func (x *NetworkParameterEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[251] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[255] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15370,7 +15700,7 @@ func (x *NetworkParameterEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use NetworkParameterEdge.ProtoReflect.Descriptor instead. func (*NetworkParameterEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{251} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{255} } func (x *NetworkParameterEdge) GetNode() *vega.NetworkParameter { @@ -15402,7 +15732,7 @@ type NetworkParameterConnection struct { func (x *NetworkParameterConnection) Reset() { *x = NetworkParameterConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[252] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[256] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15415,7 +15745,7 @@ func (x *NetworkParameterConnection) String() string { func (*NetworkParameterConnection) ProtoMessage() {} func (x *NetworkParameterConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[252] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[256] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15428,7 +15758,7 @@ func (x *NetworkParameterConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use NetworkParameterConnection.ProtoReflect.Descriptor instead. func (*NetworkParameterConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{252} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{256} } func (x *NetworkParameterConnection) GetEdges() []*NetworkParameterEdge { @@ -15462,7 +15792,7 @@ type Checkpoint struct { func (x *Checkpoint) Reset() { *x = Checkpoint{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[253] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[257] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15475,7 +15805,7 @@ func (x *Checkpoint) String() string { func (*Checkpoint) ProtoMessage() {} func (x *Checkpoint) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[253] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[257] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15488,7 +15818,7 @@ func (x *Checkpoint) ProtoReflect() protoreflect.Message { // Deprecated: Use Checkpoint.ProtoReflect.Descriptor instead. func (*Checkpoint) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{253} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{257} } func (x *Checkpoint) GetHash() string { @@ -15525,7 +15855,7 @@ type ListCheckpointsRequest struct { func (x *ListCheckpointsRequest) Reset() { *x = ListCheckpointsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[254] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[258] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15538,7 +15868,7 @@ func (x *ListCheckpointsRequest) String() string { func (*ListCheckpointsRequest) ProtoMessage() {} func (x *ListCheckpointsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[254] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[258] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15551,7 +15881,7 @@ func (x *ListCheckpointsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListCheckpointsRequest.ProtoReflect.Descriptor instead. func (*ListCheckpointsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{254} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{258} } func (x *ListCheckpointsRequest) GetPagination() *Pagination { @@ -15574,7 +15904,7 @@ type ListCheckpointsResponse struct { func (x *ListCheckpointsResponse) Reset() { *x = ListCheckpointsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[255] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[259] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15587,7 +15917,7 @@ func (x *ListCheckpointsResponse) String() string { func (*ListCheckpointsResponse) ProtoMessage() {} func (x *ListCheckpointsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[255] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[259] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15600,7 +15930,7 @@ func (x *ListCheckpointsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListCheckpointsResponse.ProtoReflect.Descriptor instead. func (*ListCheckpointsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{255} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{259} } func (x *ListCheckpointsResponse) GetCheckpoints() *CheckpointsConnection { @@ -15625,7 +15955,7 @@ type CheckpointEdge struct { func (x *CheckpointEdge) Reset() { *x = CheckpointEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[256] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[260] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15638,7 +15968,7 @@ func (x *CheckpointEdge) String() string { func (*CheckpointEdge) ProtoMessage() {} func (x *CheckpointEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[256] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[260] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15651,7 +15981,7 @@ func (x *CheckpointEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckpointEdge.ProtoReflect.Descriptor instead. func (*CheckpointEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{256} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{260} } func (x *CheckpointEdge) GetNode() *Checkpoint { @@ -15683,7 +16013,7 @@ type CheckpointsConnection struct { func (x *CheckpointsConnection) Reset() { *x = CheckpointsConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[257] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[261] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15696,7 +16026,7 @@ func (x *CheckpointsConnection) String() string { func (*CheckpointsConnection) ProtoMessage() {} func (x *CheckpointsConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[257] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[261] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15709,7 +16039,7 @@ func (x *CheckpointsConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckpointsConnection.ProtoReflect.Descriptor instead. func (*CheckpointsConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{257} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{261} } func (x *CheckpointsConnection) GetEdges() []*CheckpointEdge { @@ -15741,7 +16071,7 @@ type GetStakeRequest struct { func (x *GetStakeRequest) Reset() { *x = GetStakeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[258] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[262] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15754,7 +16084,7 @@ func (x *GetStakeRequest) String() string { func (*GetStakeRequest) ProtoMessage() {} func (x *GetStakeRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[258] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[262] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15767,7 +16097,7 @@ func (x *GetStakeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStakeRequest.ProtoReflect.Descriptor instead. func (*GetStakeRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{258} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{262} } func (x *GetStakeRequest) GetPartyId() string { @@ -15799,7 +16129,7 @@ type GetStakeResponse struct { func (x *GetStakeResponse) Reset() { *x = GetStakeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[259] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[263] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15812,7 +16142,7 @@ func (x *GetStakeResponse) String() string { func (*GetStakeResponse) ProtoMessage() {} func (x *GetStakeResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[259] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[263] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15825,7 +16155,7 @@ func (x *GetStakeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStakeResponse.ProtoReflect.Descriptor instead. func (*GetStakeResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{259} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{263} } func (x *GetStakeResponse) GetCurrentStakeAvailable() string { @@ -15857,7 +16187,7 @@ type StakeLinkingEdge struct { func (x *StakeLinkingEdge) Reset() { *x = StakeLinkingEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[260] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[264] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15870,7 +16200,7 @@ func (x *StakeLinkingEdge) String() string { func (*StakeLinkingEdge) ProtoMessage() {} func (x *StakeLinkingEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[260] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[264] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15883,7 +16213,7 @@ func (x *StakeLinkingEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use StakeLinkingEdge.ProtoReflect.Descriptor instead. func (*StakeLinkingEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{260} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{264} } func (x *StakeLinkingEdge) GetNode() *v1.StakeLinking { @@ -15915,7 +16245,7 @@ type StakesConnection struct { func (x *StakesConnection) Reset() { *x = StakesConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[261] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[265] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15928,7 +16258,7 @@ func (x *StakesConnection) String() string { func (*StakesConnection) ProtoMessage() {} func (x *StakesConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[261] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[265] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15941,7 +16271,7 @@ func (x *StakesConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use StakesConnection.ProtoReflect.Descriptor instead. func (*StakesConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{261} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{265} } func (x *StakesConnection) GetEdges() []*StakeLinkingEdge { @@ -15971,7 +16301,7 @@ type GetRiskFactorsRequest struct { func (x *GetRiskFactorsRequest) Reset() { *x = GetRiskFactorsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[262] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[266] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15984,7 +16314,7 @@ func (x *GetRiskFactorsRequest) String() string { func (*GetRiskFactorsRequest) ProtoMessage() {} func (x *GetRiskFactorsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[262] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[266] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15997,7 +16327,7 @@ func (x *GetRiskFactorsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRiskFactorsRequest.ProtoReflect.Descriptor instead. func (*GetRiskFactorsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{262} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{266} } func (x *GetRiskFactorsRequest) GetMarketId() string { @@ -16020,7 +16350,7 @@ type GetRiskFactorsResponse struct { func (x *GetRiskFactorsResponse) Reset() { *x = GetRiskFactorsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[263] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[267] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16033,7 +16363,7 @@ func (x *GetRiskFactorsResponse) String() string { func (*GetRiskFactorsResponse) ProtoMessage() {} func (x *GetRiskFactorsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[263] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[267] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16046,7 +16376,7 @@ func (x *GetRiskFactorsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRiskFactorsResponse.ProtoReflect.Descriptor instead. func (*GetRiskFactorsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{263} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{267} } func (x *GetRiskFactorsResponse) GetRiskFactor() *vega.RiskFactor { @@ -16081,7 +16411,7 @@ type ObserveEventBusRequest struct { func (x *ObserveEventBusRequest) Reset() { *x = ObserveEventBusRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[264] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[268] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16094,7 +16424,7 @@ func (x *ObserveEventBusRequest) String() string { func (*ObserveEventBusRequest) ProtoMessage() {} func (x *ObserveEventBusRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[264] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[268] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16107,7 +16437,7 @@ func (x *ObserveEventBusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ObserveEventBusRequest.ProtoReflect.Descriptor instead. func (*ObserveEventBusRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{264} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{268} } func (x *ObserveEventBusRequest) GetType() []v1.BusEventType { @@ -16151,7 +16481,7 @@ type ObserveEventBusResponse struct { func (x *ObserveEventBusResponse) Reset() { *x = ObserveEventBusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[265] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[269] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16164,7 +16494,7 @@ func (x *ObserveEventBusResponse) String() string { func (*ObserveEventBusResponse) ProtoMessage() {} func (x *ObserveEventBusResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[265] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[269] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16177,7 +16507,7 @@ func (x *ObserveEventBusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ObserveEventBusResponse.ProtoReflect.Descriptor instead. func (*ObserveEventBusResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{265} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{269} } func (x *ObserveEventBusResponse) GetEvents() []*v1.BusEvent { @@ -16197,7 +16527,7 @@ type ObserveLedgerMovementsRequest struct { func (x *ObserveLedgerMovementsRequest) Reset() { *x = ObserveLedgerMovementsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[266] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[270] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16210,7 +16540,7 @@ func (x *ObserveLedgerMovementsRequest) String() string { func (*ObserveLedgerMovementsRequest) ProtoMessage() {} func (x *ObserveLedgerMovementsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[266] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[270] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16223,7 +16553,7 @@ func (x *ObserveLedgerMovementsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ObserveLedgerMovementsRequest.ProtoReflect.Descriptor instead. func (*ObserveLedgerMovementsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{266} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{270} } // Response from ledger movements subscription @@ -16239,7 +16569,7 @@ type ObserveLedgerMovementsResponse struct { func (x *ObserveLedgerMovementsResponse) Reset() { *x = ObserveLedgerMovementsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[267] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[271] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16252,7 +16582,7 @@ func (x *ObserveLedgerMovementsResponse) String() string { func (*ObserveLedgerMovementsResponse) ProtoMessage() {} func (x *ObserveLedgerMovementsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[267] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[271] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16265,7 +16595,7 @@ func (x *ObserveLedgerMovementsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ObserveLedgerMovementsResponse.ProtoReflect.Descriptor instead. func (*ObserveLedgerMovementsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{267} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{271} } func (x *ObserveLedgerMovementsResponse) GetLedgerMovement() *vega.LedgerMovement { @@ -16290,7 +16620,7 @@ type ListKeyRotationsRequest struct { func (x *ListKeyRotationsRequest) Reset() { *x = ListKeyRotationsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[268] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[272] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16303,7 +16633,7 @@ func (x *ListKeyRotationsRequest) String() string { func (*ListKeyRotationsRequest) ProtoMessage() {} func (x *ListKeyRotationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[268] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[272] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16316,7 +16646,7 @@ func (x *ListKeyRotationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListKeyRotationsRequest.ProtoReflect.Descriptor instead. func (*ListKeyRotationsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{268} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{272} } func (x *ListKeyRotationsRequest) GetNodeId() string { @@ -16346,7 +16676,7 @@ type ListKeyRotationsResponse struct { func (x *ListKeyRotationsResponse) Reset() { *x = ListKeyRotationsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[269] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[273] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16359,7 +16689,7 @@ func (x *ListKeyRotationsResponse) String() string { func (*ListKeyRotationsResponse) ProtoMessage() {} func (x *ListKeyRotationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[269] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[273] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16372,7 +16702,7 @@ func (x *ListKeyRotationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListKeyRotationsResponse.ProtoReflect.Descriptor instead. func (*ListKeyRotationsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{269} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{273} } func (x *ListKeyRotationsResponse) GetRotations() *KeyRotationConnection { @@ -16397,7 +16727,7 @@ type KeyRotationEdge struct { func (x *KeyRotationEdge) Reset() { *x = KeyRotationEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[270] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[274] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16410,7 +16740,7 @@ func (x *KeyRotationEdge) String() string { func (*KeyRotationEdge) ProtoMessage() {} func (x *KeyRotationEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[270] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[274] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16423,7 +16753,7 @@ func (x *KeyRotationEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyRotationEdge.ProtoReflect.Descriptor instead. func (*KeyRotationEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{270} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{274} } func (x *KeyRotationEdge) GetNode() *v1.KeyRotation { @@ -16455,7 +16785,7 @@ type KeyRotationConnection struct { func (x *KeyRotationConnection) Reset() { *x = KeyRotationConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[271] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[275] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16468,7 +16798,7 @@ func (x *KeyRotationConnection) String() string { func (*KeyRotationConnection) ProtoMessage() {} func (x *KeyRotationConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[271] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[275] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16481,7 +16811,7 @@ func (x *KeyRotationConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyRotationConnection.ProtoReflect.Descriptor instead. func (*KeyRotationConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{271} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{275} } func (x *KeyRotationConnection) GetEdges() []*KeyRotationEdge { @@ -16513,7 +16843,7 @@ type ListEthereumKeyRotationsRequest struct { func (x *ListEthereumKeyRotationsRequest) Reset() { *x = ListEthereumKeyRotationsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[272] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[276] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16526,7 +16856,7 @@ func (x *ListEthereumKeyRotationsRequest) String() string { func (*ListEthereumKeyRotationsRequest) ProtoMessage() {} func (x *ListEthereumKeyRotationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[272] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[276] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16539,7 +16869,7 @@ func (x *ListEthereumKeyRotationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListEthereumKeyRotationsRequest.ProtoReflect.Descriptor instead. func (*ListEthereumKeyRotationsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{272} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{276} } func (x *ListEthereumKeyRotationsRequest) GetNodeId() string { @@ -16569,7 +16899,7 @@ type ListEthereumKeyRotationsResponse struct { func (x *ListEthereumKeyRotationsResponse) Reset() { *x = ListEthereumKeyRotationsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[273] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[277] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16582,7 +16912,7 @@ func (x *ListEthereumKeyRotationsResponse) String() string { func (*ListEthereumKeyRotationsResponse) ProtoMessage() {} func (x *ListEthereumKeyRotationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[273] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[277] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16595,7 +16925,7 @@ func (x *ListEthereumKeyRotationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListEthereumKeyRotationsResponse.ProtoReflect.Descriptor instead. func (*ListEthereumKeyRotationsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{273} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{277} } func (x *ListEthereumKeyRotationsResponse) GetKeyRotations() *EthereumKeyRotationsConnection { @@ -16620,7 +16950,7 @@ type EthereumKeyRotationsConnection struct { func (x *EthereumKeyRotationsConnection) Reset() { *x = EthereumKeyRotationsConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[274] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[278] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16633,7 +16963,7 @@ func (x *EthereumKeyRotationsConnection) String() string { func (*EthereumKeyRotationsConnection) ProtoMessage() {} func (x *EthereumKeyRotationsConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[274] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[278] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16646,7 +16976,7 @@ func (x *EthereumKeyRotationsConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use EthereumKeyRotationsConnection.ProtoReflect.Descriptor instead. func (*EthereumKeyRotationsConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{274} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{278} } func (x *EthereumKeyRotationsConnection) GetEdges() []*EthereumKeyRotationEdge { @@ -16678,7 +17008,7 @@ type EthereumKeyRotationEdge struct { func (x *EthereumKeyRotationEdge) Reset() { *x = EthereumKeyRotationEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[275] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[279] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16691,7 +17021,7 @@ func (x *EthereumKeyRotationEdge) String() string { func (*EthereumKeyRotationEdge) ProtoMessage() {} func (x *EthereumKeyRotationEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[275] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[279] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16704,7 +17034,7 @@ func (x *EthereumKeyRotationEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use EthereumKeyRotationEdge.ProtoReflect.Descriptor instead. func (*EthereumKeyRotationEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{275} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{279} } func (x *EthereumKeyRotationEdge) GetNode() *v1.EthereumKeyRotation { @@ -16731,7 +17061,7 @@ type GetVegaTimeRequest struct { func (x *GetVegaTimeRequest) Reset() { *x = GetVegaTimeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[276] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[280] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16744,7 +17074,7 @@ func (x *GetVegaTimeRequest) String() string { func (*GetVegaTimeRequest) ProtoMessage() {} func (x *GetVegaTimeRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[276] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[280] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16757,7 +17087,7 @@ func (x *GetVegaTimeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetVegaTimeRequest.ProtoReflect.Descriptor instead. func (*GetVegaTimeRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{276} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{280} } // Response for the current consensus coordinated time on the Vega network, referred to as "VegaTime" @@ -16774,7 +17104,7 @@ type GetVegaTimeResponse struct { func (x *GetVegaTimeResponse) Reset() { *x = GetVegaTimeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[277] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[281] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16787,7 +17117,7 @@ func (x *GetVegaTimeResponse) String() string { func (*GetVegaTimeResponse) ProtoMessage() {} func (x *GetVegaTimeResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[277] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[281] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16800,7 +17130,7 @@ func (x *GetVegaTimeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetVegaTimeResponse.ProtoReflect.Descriptor instead. func (*GetVegaTimeResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{277} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{281} } func (x *GetVegaTimeResponse) GetTimestamp() int64 { @@ -16826,7 +17156,7 @@ type DateRange struct { func (x *DateRange) Reset() { *x = DateRange{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[278] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[282] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16839,7 +17169,7 @@ func (x *DateRange) String() string { func (*DateRange) ProtoMessage() {} func (x *DateRange) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[278] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[282] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16852,7 +17182,7 @@ func (x *DateRange) ProtoReflect() protoreflect.Message { // Deprecated: Use DateRange.ProtoReflect.Descriptor instead. func (*DateRange) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{278} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{282} } func (x *DateRange) GetStartTimestamp() int64 { @@ -16879,7 +17209,7 @@ type GetProtocolUpgradeStatusRequest struct { func (x *GetProtocolUpgradeStatusRequest) Reset() { *x = GetProtocolUpgradeStatusRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[279] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[283] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16892,7 +17222,7 @@ func (x *GetProtocolUpgradeStatusRequest) String() string { func (*GetProtocolUpgradeStatusRequest) ProtoMessage() {} func (x *GetProtocolUpgradeStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[279] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[283] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16905,7 +17235,7 @@ func (x *GetProtocolUpgradeStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProtocolUpgradeStatusRequest.ProtoReflect.Descriptor instead. func (*GetProtocolUpgradeStatusRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{279} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{283} } // Response from getting protocol upgrade status @@ -16921,7 +17251,7 @@ type GetProtocolUpgradeStatusResponse struct { func (x *GetProtocolUpgradeStatusResponse) Reset() { *x = GetProtocolUpgradeStatusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[280] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[284] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16934,7 +17264,7 @@ func (x *GetProtocolUpgradeStatusResponse) String() string { func (*GetProtocolUpgradeStatusResponse) ProtoMessage() {} func (x *GetProtocolUpgradeStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[280] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[284] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16947,7 +17277,7 @@ func (x *GetProtocolUpgradeStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProtocolUpgradeStatusResponse.ProtoReflect.Descriptor instead. func (*GetProtocolUpgradeStatusResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{280} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{284} } func (x *GetProtocolUpgradeStatusResponse) GetReady() bool { @@ -16974,7 +17304,7 @@ type ListProtocolUpgradeProposalsRequest struct { func (x *ListProtocolUpgradeProposalsRequest) Reset() { *x = ListProtocolUpgradeProposalsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[281] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[285] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16987,7 +17317,7 @@ func (x *ListProtocolUpgradeProposalsRequest) String() string { func (*ListProtocolUpgradeProposalsRequest) ProtoMessage() {} func (x *ListProtocolUpgradeProposalsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[281] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[285] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17000,7 +17330,7 @@ func (x *ListProtocolUpgradeProposalsRequest) ProtoReflect() protoreflect.Messag // Deprecated: Use ListProtocolUpgradeProposalsRequest.ProtoReflect.Descriptor instead. func (*ListProtocolUpgradeProposalsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{281} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{285} } func (x *ListProtocolUpgradeProposalsRequest) GetStatus() v1.ProtocolUpgradeProposalStatus { @@ -17037,7 +17367,7 @@ type ListProtocolUpgradeProposalsResponse struct { func (x *ListProtocolUpgradeProposalsResponse) Reset() { *x = ListProtocolUpgradeProposalsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[282] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[286] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17050,7 +17380,7 @@ func (x *ListProtocolUpgradeProposalsResponse) String() string { func (*ListProtocolUpgradeProposalsResponse) ProtoMessage() {} func (x *ListProtocolUpgradeProposalsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[282] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[286] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17063,7 +17393,7 @@ func (x *ListProtocolUpgradeProposalsResponse) ProtoReflect() protoreflect.Messa // Deprecated: Use ListProtocolUpgradeProposalsResponse.ProtoReflect.Descriptor instead. func (*ListProtocolUpgradeProposalsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{282} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{286} } func (x *ListProtocolUpgradeProposalsResponse) GetProtocolUpgradeProposals() *ProtocolUpgradeProposalConnection { @@ -17088,7 +17418,7 @@ type ProtocolUpgradeProposalConnection struct { func (x *ProtocolUpgradeProposalConnection) Reset() { *x = ProtocolUpgradeProposalConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[283] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[287] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17101,7 +17431,7 @@ func (x *ProtocolUpgradeProposalConnection) String() string { func (*ProtocolUpgradeProposalConnection) ProtoMessage() {} func (x *ProtocolUpgradeProposalConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[283] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[287] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17114,7 +17444,7 @@ func (x *ProtocolUpgradeProposalConnection) ProtoReflect() protoreflect.Message // Deprecated: Use ProtocolUpgradeProposalConnection.ProtoReflect.Descriptor instead. func (*ProtocolUpgradeProposalConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{283} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{287} } func (x *ProtocolUpgradeProposalConnection) GetEdges() []*ProtocolUpgradeProposalEdge { @@ -17146,7 +17476,7 @@ type ProtocolUpgradeProposalEdge struct { func (x *ProtocolUpgradeProposalEdge) Reset() { *x = ProtocolUpgradeProposalEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[284] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[288] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17159,7 +17489,7 @@ func (x *ProtocolUpgradeProposalEdge) String() string { func (*ProtocolUpgradeProposalEdge) ProtoMessage() {} func (x *ProtocolUpgradeProposalEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[284] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[288] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17172,7 +17502,7 @@ func (x *ProtocolUpgradeProposalEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtocolUpgradeProposalEdge.ProtoReflect.Descriptor instead. func (*ProtocolUpgradeProposalEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{284} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{288} } func (x *ProtocolUpgradeProposalEdge) GetNode() *v1.ProtocolUpgradeEvent { @@ -17202,7 +17532,7 @@ type ListCoreSnapshotsRequest struct { func (x *ListCoreSnapshotsRequest) Reset() { *x = ListCoreSnapshotsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[285] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[289] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17215,7 +17545,7 @@ func (x *ListCoreSnapshotsRequest) String() string { func (*ListCoreSnapshotsRequest) ProtoMessage() {} func (x *ListCoreSnapshotsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[285] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[289] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17228,7 +17558,7 @@ func (x *ListCoreSnapshotsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListCoreSnapshotsRequest.ProtoReflect.Descriptor instead. func (*ListCoreSnapshotsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{285} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{289} } func (x *ListCoreSnapshotsRequest) GetPagination() *Pagination { @@ -17251,7 +17581,7 @@ type ListCoreSnapshotsResponse struct { func (x *ListCoreSnapshotsResponse) Reset() { *x = ListCoreSnapshotsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[286] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[290] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17264,7 +17594,7 @@ func (x *ListCoreSnapshotsResponse) String() string { func (*ListCoreSnapshotsResponse) ProtoMessage() {} func (x *ListCoreSnapshotsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[286] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[290] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17277,7 +17607,7 @@ func (x *ListCoreSnapshotsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListCoreSnapshotsResponse.ProtoReflect.Descriptor instead. func (*ListCoreSnapshotsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{286} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{290} } func (x *ListCoreSnapshotsResponse) GetCoreSnapshots() *CoreSnapshotConnection { @@ -17302,7 +17632,7 @@ type CoreSnapshotConnection struct { func (x *CoreSnapshotConnection) Reset() { *x = CoreSnapshotConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[287] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[291] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17315,7 +17645,7 @@ func (x *CoreSnapshotConnection) String() string { func (*CoreSnapshotConnection) ProtoMessage() {} func (x *CoreSnapshotConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[287] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[291] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17328,7 +17658,7 @@ func (x *CoreSnapshotConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use CoreSnapshotConnection.ProtoReflect.Descriptor instead. func (*CoreSnapshotConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{287} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{291} } func (x *CoreSnapshotConnection) GetEdges() []*CoreSnapshotEdge { @@ -17360,7 +17690,7 @@ type CoreSnapshotEdge struct { func (x *CoreSnapshotEdge) Reset() { *x = CoreSnapshotEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[288] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[292] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17373,7 +17703,7 @@ func (x *CoreSnapshotEdge) String() string { func (*CoreSnapshotEdge) ProtoMessage() {} func (x *CoreSnapshotEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[288] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[292] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17386,7 +17716,7 @@ func (x *CoreSnapshotEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use CoreSnapshotEdge.ProtoReflect.Descriptor instead. func (*CoreSnapshotEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{288} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{292} } func (x *CoreSnapshotEdge) GetNode() *v1.CoreSnapshotData { @@ -17426,7 +17756,7 @@ type HistorySegment struct { func (x *HistorySegment) Reset() { *x = HistorySegment{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[289] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[293] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17439,7 +17769,7 @@ func (x *HistorySegment) String() string { func (*HistorySegment) ProtoMessage() {} func (x *HistorySegment) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[289] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[293] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17452,7 +17782,7 @@ func (x *HistorySegment) ProtoReflect() protoreflect.Message { // Deprecated: Use HistorySegment.ProtoReflect.Descriptor instead. func (*HistorySegment) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{289} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{293} } func (x *HistorySegment) GetFromHeight() int64 { @@ -17507,7 +17837,7 @@ type GetMostRecentNetworkHistorySegmentRequest struct { func (x *GetMostRecentNetworkHistorySegmentRequest) Reset() { *x = GetMostRecentNetworkHistorySegmentRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[290] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[294] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17520,7 +17850,7 @@ func (x *GetMostRecentNetworkHistorySegmentRequest) String() string { func (*GetMostRecentNetworkHistorySegmentRequest) ProtoMessage() {} func (x *GetMostRecentNetworkHistorySegmentRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[290] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[294] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17533,7 +17863,7 @@ func (x *GetMostRecentNetworkHistorySegmentRequest) ProtoReflect() protoreflect. // Deprecated: Use GetMostRecentNetworkHistorySegmentRequest.ProtoReflect.Descriptor instead. func (*GetMostRecentNetworkHistorySegmentRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{290} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{294} } // Response from getting most recent history segment @@ -17551,7 +17881,7 @@ type GetMostRecentNetworkHistorySegmentResponse struct { func (x *GetMostRecentNetworkHistorySegmentResponse) Reset() { *x = GetMostRecentNetworkHistorySegmentResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[291] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[295] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17564,7 +17894,7 @@ func (x *GetMostRecentNetworkHistorySegmentResponse) String() string { func (*GetMostRecentNetworkHistorySegmentResponse) ProtoMessage() {} func (x *GetMostRecentNetworkHistorySegmentResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[291] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[295] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17577,7 +17907,7 @@ func (x *GetMostRecentNetworkHistorySegmentResponse) ProtoReflect() protoreflect // Deprecated: Use GetMostRecentNetworkHistorySegmentResponse.ProtoReflect.Descriptor instead. func (*GetMostRecentNetworkHistorySegmentResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{291} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{295} } func (x *GetMostRecentNetworkHistorySegmentResponse) GetSegment() *HistorySegment { @@ -17604,7 +17934,7 @@ type ListAllNetworkHistorySegmentsRequest struct { func (x *ListAllNetworkHistorySegmentsRequest) Reset() { *x = ListAllNetworkHistorySegmentsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[292] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[296] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17617,7 +17947,7 @@ func (x *ListAllNetworkHistorySegmentsRequest) String() string { func (*ListAllNetworkHistorySegmentsRequest) ProtoMessage() {} func (x *ListAllNetworkHistorySegmentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[292] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[296] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17630,7 +17960,7 @@ func (x *ListAllNetworkHistorySegmentsRequest) ProtoReflect() protoreflect.Messa // Deprecated: Use ListAllNetworkHistorySegmentsRequest.ProtoReflect.Descriptor instead. func (*ListAllNetworkHistorySegmentsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{292} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{296} } // Response with a list of all the nodes history segments @@ -17646,7 +17976,7 @@ type ListAllNetworkHistorySegmentsResponse struct { func (x *ListAllNetworkHistorySegmentsResponse) Reset() { *x = ListAllNetworkHistorySegmentsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[293] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[297] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17659,7 +17989,7 @@ func (x *ListAllNetworkHistorySegmentsResponse) String() string { func (*ListAllNetworkHistorySegmentsResponse) ProtoMessage() {} func (x *ListAllNetworkHistorySegmentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[293] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[297] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17672,7 +18002,7 @@ func (x *ListAllNetworkHistorySegmentsResponse) ProtoReflect() protoreflect.Mess // Deprecated: Use ListAllNetworkHistorySegmentsResponse.ProtoReflect.Descriptor instead. func (*ListAllNetworkHistorySegmentsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{293} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{297} } func (x *ListAllNetworkHistorySegmentsResponse) GetSegments() []*HistorySegment { @@ -17692,7 +18022,7 @@ type GetActiveNetworkHistoryPeerAddressesRequest struct { func (x *GetActiveNetworkHistoryPeerAddressesRequest) Reset() { *x = GetActiveNetworkHistoryPeerAddressesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[294] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[298] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17705,7 +18035,7 @@ func (x *GetActiveNetworkHistoryPeerAddressesRequest) String() string { func (*GetActiveNetworkHistoryPeerAddressesRequest) ProtoMessage() {} func (x *GetActiveNetworkHistoryPeerAddressesRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[294] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[298] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17718,7 +18048,7 @@ func (x *GetActiveNetworkHistoryPeerAddressesRequest) ProtoReflect() protoreflec // Deprecated: Use GetActiveNetworkHistoryPeerAddressesRequest.ProtoReflect.Descriptor instead. func (*GetActiveNetworkHistoryPeerAddressesRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{294} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{298} } // Response containing the addresses of active network history peers @@ -17734,7 +18064,7 @@ type GetActiveNetworkHistoryPeerAddressesResponse struct { func (x *GetActiveNetworkHistoryPeerAddressesResponse) Reset() { *x = GetActiveNetworkHistoryPeerAddressesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[295] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[299] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17747,7 +18077,7 @@ func (x *GetActiveNetworkHistoryPeerAddressesResponse) String() string { func (*GetActiveNetworkHistoryPeerAddressesResponse) ProtoMessage() {} func (x *GetActiveNetworkHistoryPeerAddressesResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[295] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[299] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17760,7 +18090,7 @@ func (x *GetActiveNetworkHistoryPeerAddressesResponse) ProtoReflect() protorefle // Deprecated: Use GetActiveNetworkHistoryPeerAddressesResponse.ProtoReflect.Descriptor instead. func (*GetActiveNetworkHistoryPeerAddressesResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{295} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{299} } func (x *GetActiveNetworkHistoryPeerAddressesResponse) GetIpAddresses() []string { @@ -17780,7 +18110,7 @@ type GetNetworkHistoryStatusRequest struct { func (x *GetNetworkHistoryStatusRequest) Reset() { *x = GetNetworkHistoryStatusRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[296] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[300] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17793,7 +18123,7 @@ func (x *GetNetworkHistoryStatusRequest) String() string { func (*GetNetworkHistoryStatusRequest) ProtoMessage() {} func (x *GetNetworkHistoryStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[296] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[300] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17806,7 +18136,7 @@ func (x *GetNetworkHistoryStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetNetworkHistoryStatusRequest.ProtoReflect.Descriptor instead. func (*GetNetworkHistoryStatusRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{296} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{300} } // Response containing the status of network history @@ -17828,7 +18158,7 @@ type GetNetworkHistoryStatusResponse struct { func (x *GetNetworkHistoryStatusResponse) Reset() { *x = GetNetworkHistoryStatusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[297] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[301] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17841,7 +18171,7 @@ func (x *GetNetworkHistoryStatusResponse) String() string { func (*GetNetworkHistoryStatusResponse) ProtoMessage() {} func (x *GetNetworkHistoryStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[297] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[301] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17854,7 +18184,7 @@ func (x *GetNetworkHistoryStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetNetworkHistoryStatusResponse.ProtoReflect.Descriptor instead. func (*GetNetworkHistoryStatusResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{297} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{301} } func (x *GetNetworkHistoryStatusResponse) GetIpfsAddress() string { @@ -17895,7 +18225,7 @@ type GetNetworkHistoryBootstrapPeersRequest struct { func (x *GetNetworkHistoryBootstrapPeersRequest) Reset() { *x = GetNetworkHistoryBootstrapPeersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[298] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[302] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17908,7 +18238,7 @@ func (x *GetNetworkHistoryBootstrapPeersRequest) String() string { func (*GetNetworkHistoryBootstrapPeersRequest) ProtoMessage() {} func (x *GetNetworkHistoryBootstrapPeersRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[298] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[302] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17921,7 +18251,7 @@ func (x *GetNetworkHistoryBootstrapPeersRequest) ProtoReflect() protoreflect.Mes // Deprecated: Use GetNetworkHistoryBootstrapPeersRequest.ProtoReflect.Descriptor instead. func (*GetNetworkHistoryBootstrapPeersRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{298} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{302} } // Response containing the nodes network history bootstrap peers @@ -17937,7 +18267,7 @@ type GetNetworkHistoryBootstrapPeersResponse struct { func (x *GetNetworkHistoryBootstrapPeersResponse) Reset() { *x = GetNetworkHistoryBootstrapPeersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[299] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[303] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17950,7 +18280,7 @@ func (x *GetNetworkHistoryBootstrapPeersResponse) String() string { func (*GetNetworkHistoryBootstrapPeersResponse) ProtoMessage() {} func (x *GetNetworkHistoryBootstrapPeersResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[299] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[303] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17963,7 +18293,7 @@ func (x *GetNetworkHistoryBootstrapPeersResponse) ProtoReflect() protoreflect.Me // Deprecated: Use GetNetworkHistoryBootstrapPeersResponse.ProtoReflect.Descriptor instead. func (*GetNetworkHistoryBootstrapPeersResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{299} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{303} } func (x *GetNetworkHistoryBootstrapPeersResponse) GetBootstrapPeers() []string { @@ -17994,7 +18324,7 @@ type ExportNetworkHistoryRequest struct { func (x *ExportNetworkHistoryRequest) Reset() { *x = ExportNetworkHistoryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[300] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[304] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18007,7 +18337,7 @@ func (x *ExportNetworkHistoryRequest) String() string { func (*ExportNetworkHistoryRequest) ProtoMessage() {} func (x *ExportNetworkHistoryRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[300] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[304] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18020,7 +18350,7 @@ func (x *ExportNetworkHistoryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExportNetworkHistoryRequest.ProtoReflect.Descriptor instead. func (*ExportNetworkHistoryRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{300} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{304} } func (x *ExportNetworkHistoryRequest) GetFromBlock() int64 { @@ -18057,7 +18387,7 @@ type ListEntitiesRequest struct { func (x *ListEntitiesRequest) Reset() { *x = ListEntitiesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[301] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[305] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18070,7 +18400,7 @@ func (x *ListEntitiesRequest) String() string { func (*ListEntitiesRequest) ProtoMessage() {} func (x *ListEntitiesRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[301] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[305] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18083,7 +18413,7 @@ func (x *ListEntitiesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListEntitiesRequest.ProtoReflect.Descriptor instead. func (*ListEntitiesRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{301} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{305} } func (x *ListEntitiesRequest) GetTransactionHash() string { @@ -18132,7 +18462,7 @@ type ListEntitiesResponse struct { func (x *ListEntitiesResponse) Reset() { *x = ListEntitiesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[302] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[306] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18145,7 +18475,7 @@ func (x *ListEntitiesResponse) String() string { func (*ListEntitiesResponse) ProtoMessage() {} func (x *ListEntitiesResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[302] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[306] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18158,7 +18488,7 @@ func (x *ListEntitiesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListEntitiesResponse.ProtoReflect.Descriptor instead. func (*ListEntitiesResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{302} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{306} } func (x *ListEntitiesResponse) GetAccounts() []*vega.Account { @@ -18372,7 +18702,7 @@ type GetPartyActivityStreakRequest struct { func (x *GetPartyActivityStreakRequest) Reset() { *x = GetPartyActivityStreakRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[303] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[307] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18385,7 +18715,7 @@ func (x *GetPartyActivityStreakRequest) String() string { func (*GetPartyActivityStreakRequest) ProtoMessage() {} func (x *GetPartyActivityStreakRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[303] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[307] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18398,7 +18728,7 @@ func (x *GetPartyActivityStreakRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPartyActivityStreakRequest.ProtoReflect.Descriptor instead. func (*GetPartyActivityStreakRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{303} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{307} } func (x *GetPartyActivityStreakRequest) GetPartyId() string { @@ -18428,7 +18758,7 @@ type GetPartyActivityStreakResponse struct { func (x *GetPartyActivityStreakResponse) Reset() { *x = GetPartyActivityStreakResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[304] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[308] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18441,7 +18771,7 @@ func (x *GetPartyActivityStreakResponse) String() string { func (*GetPartyActivityStreakResponse) ProtoMessage() {} func (x *GetPartyActivityStreakResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[304] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[308] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18454,7 +18784,7 @@ func (x *GetPartyActivityStreakResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPartyActivityStreakResponse.ProtoReflect.Descriptor instead. func (*GetPartyActivityStreakResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{304} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{308} } func (x *GetPartyActivityStreakResponse) GetActivityStreak() *v1.PartyActivityStreak { @@ -18485,7 +18815,7 @@ type FundingPayment struct { func (x *FundingPayment) Reset() { *x = FundingPayment{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[305] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[309] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18498,7 +18828,7 @@ func (x *FundingPayment) String() string { func (*FundingPayment) ProtoMessage() {} func (x *FundingPayment) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[305] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[309] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18511,7 +18841,7 @@ func (x *FundingPayment) ProtoReflect() protoreflect.Message { // Deprecated: Use FundingPayment.ProtoReflect.Descriptor instead. func (*FundingPayment) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{305} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{309} } func (x *FundingPayment) GetPartyId() string { @@ -18566,7 +18896,7 @@ type ListFundingPaymentsRequest struct { func (x *ListFundingPaymentsRequest) Reset() { *x = ListFundingPaymentsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[306] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[310] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18579,7 +18909,7 @@ func (x *ListFundingPaymentsRequest) String() string { func (*ListFundingPaymentsRequest) ProtoMessage() {} func (x *ListFundingPaymentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[306] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[310] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18592,7 +18922,7 @@ func (x *ListFundingPaymentsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListFundingPaymentsRequest.ProtoReflect.Descriptor instead. func (*ListFundingPaymentsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{306} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{310} } func (x *ListFundingPaymentsRequest) GetPartyId() string { @@ -18631,7 +18961,7 @@ type FundingPaymentEdge struct { func (x *FundingPaymentEdge) Reset() { *x = FundingPaymentEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[307] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[311] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18644,7 +18974,7 @@ func (x *FundingPaymentEdge) String() string { func (*FundingPaymentEdge) ProtoMessage() {} func (x *FundingPaymentEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[307] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[311] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18657,7 +18987,7 @@ func (x *FundingPaymentEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use FundingPaymentEdge.ProtoReflect.Descriptor instead. func (*FundingPaymentEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{307} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{311} } func (x *FundingPaymentEdge) GetNode() *FundingPayment { @@ -18689,7 +19019,7 @@ type FundingPaymentConnection struct { func (x *FundingPaymentConnection) Reset() { *x = FundingPaymentConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[308] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[312] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18702,7 +19032,7 @@ func (x *FundingPaymentConnection) String() string { func (*FundingPaymentConnection) ProtoMessage() {} func (x *FundingPaymentConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[308] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[312] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18715,7 +19045,7 @@ func (x *FundingPaymentConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use FundingPaymentConnection.ProtoReflect.Descriptor instead. func (*FundingPaymentConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{308} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{312} } func (x *FundingPaymentConnection) GetEdges() []*FundingPaymentEdge { @@ -18745,7 +19075,7 @@ type ListFundingPaymentsResponse struct { func (x *ListFundingPaymentsResponse) Reset() { *x = ListFundingPaymentsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[309] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[313] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18758,7 +19088,7 @@ func (x *ListFundingPaymentsResponse) String() string { func (*ListFundingPaymentsResponse) ProtoMessage() {} func (x *ListFundingPaymentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[309] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[313] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18771,7 +19101,7 @@ func (x *ListFundingPaymentsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListFundingPaymentsResponse.ProtoReflect.Descriptor instead. func (*ListFundingPaymentsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{309} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{313} } func (x *ListFundingPaymentsResponse) GetFundingPayments() *FundingPaymentConnection { @@ -18798,7 +19128,7 @@ type ListFundingPeriodsRequest struct { func (x *ListFundingPeriodsRequest) Reset() { *x = ListFundingPeriodsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[310] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[314] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18811,7 +19141,7 @@ func (x *ListFundingPeriodsRequest) String() string { func (*ListFundingPeriodsRequest) ProtoMessage() {} func (x *ListFundingPeriodsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[310] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[314] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18824,7 +19154,7 @@ func (x *ListFundingPeriodsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListFundingPeriodsRequest.ProtoReflect.Descriptor instead. func (*ListFundingPeriodsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{310} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{314} } func (x *ListFundingPeriodsRequest) GetMarketId() string { @@ -18863,7 +19193,7 @@ type FundingPeriodEdge struct { func (x *FundingPeriodEdge) Reset() { *x = FundingPeriodEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[311] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[315] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18876,7 +19206,7 @@ func (x *FundingPeriodEdge) String() string { func (*FundingPeriodEdge) ProtoMessage() {} func (x *FundingPeriodEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[311] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[315] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18889,7 +19219,7 @@ func (x *FundingPeriodEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use FundingPeriodEdge.ProtoReflect.Descriptor instead. func (*FundingPeriodEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{311} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{315} } func (x *FundingPeriodEdge) GetNode() *v1.FundingPeriod { @@ -18921,7 +19251,7 @@ type FundingPeriodConnection struct { func (x *FundingPeriodConnection) Reset() { *x = FundingPeriodConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[312] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[316] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18934,7 +19264,7 @@ func (x *FundingPeriodConnection) String() string { func (*FundingPeriodConnection) ProtoMessage() {} func (x *FundingPeriodConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[312] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[316] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18947,7 +19277,7 @@ func (x *FundingPeriodConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use FundingPeriodConnection.ProtoReflect.Descriptor instead. func (*FundingPeriodConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{312} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{316} } func (x *FundingPeriodConnection) GetEdges() []*FundingPeriodEdge { @@ -18977,7 +19307,7 @@ type ListFundingPeriodsResponse struct { func (x *ListFundingPeriodsResponse) Reset() { *x = ListFundingPeriodsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[313] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[317] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18990,7 +19320,7 @@ func (x *ListFundingPeriodsResponse) String() string { func (*ListFundingPeriodsResponse) ProtoMessage() {} func (x *ListFundingPeriodsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[313] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[317] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19003,7 +19333,7 @@ func (x *ListFundingPeriodsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListFundingPeriodsResponse.ProtoReflect.Descriptor instead. func (*ListFundingPeriodsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{313} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{317} } func (x *ListFundingPeriodsResponse) GetFundingPeriods() *FundingPeriodConnection { @@ -19033,7 +19363,7 @@ type ListFundingPeriodDataPointsRequest struct { func (x *ListFundingPeriodDataPointsRequest) Reset() { *x = ListFundingPeriodDataPointsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[314] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[318] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19046,7 +19376,7 @@ func (x *ListFundingPeriodDataPointsRequest) String() string { func (*ListFundingPeriodDataPointsRequest) ProtoMessage() {} func (x *ListFundingPeriodDataPointsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[314] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[318] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19059,7 +19389,7 @@ func (x *ListFundingPeriodDataPointsRequest) ProtoReflect() protoreflect.Message // Deprecated: Use ListFundingPeriodDataPointsRequest.ProtoReflect.Descriptor instead. func (*ListFundingPeriodDataPointsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{314} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{318} } func (x *ListFundingPeriodDataPointsRequest) GetMarketId() string { @@ -19112,7 +19442,7 @@ type FundingPeriodDataPointEdge struct { func (x *FundingPeriodDataPointEdge) Reset() { *x = FundingPeriodDataPointEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[315] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[319] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19125,7 +19455,7 @@ func (x *FundingPeriodDataPointEdge) String() string { func (*FundingPeriodDataPointEdge) ProtoMessage() {} func (x *FundingPeriodDataPointEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[315] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[319] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19138,7 +19468,7 @@ func (x *FundingPeriodDataPointEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use FundingPeriodDataPointEdge.ProtoReflect.Descriptor instead. func (*FundingPeriodDataPointEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{315} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{319} } func (x *FundingPeriodDataPointEdge) GetNode() *v1.FundingPeriodDataPoint { @@ -19170,7 +19500,7 @@ type FundingPeriodDataPointConnection struct { func (x *FundingPeriodDataPointConnection) Reset() { *x = FundingPeriodDataPointConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[316] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[320] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19183,7 +19513,7 @@ func (x *FundingPeriodDataPointConnection) String() string { func (*FundingPeriodDataPointConnection) ProtoMessage() {} func (x *FundingPeriodDataPointConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[316] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[320] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19196,7 +19526,7 @@ func (x *FundingPeriodDataPointConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use FundingPeriodDataPointConnection.ProtoReflect.Descriptor instead. func (*FundingPeriodDataPointConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{316} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{320} } func (x *FundingPeriodDataPointConnection) GetEdges() []*FundingPeriodDataPointEdge { @@ -19226,7 +19556,7 @@ type ListFundingPeriodDataPointsResponse struct { func (x *ListFundingPeriodDataPointsResponse) Reset() { *x = ListFundingPeriodDataPointsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[317] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[321] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19239,7 +19569,7 @@ func (x *ListFundingPeriodDataPointsResponse) String() string { func (*ListFundingPeriodDataPointsResponse) ProtoMessage() {} func (x *ListFundingPeriodDataPointsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[317] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[321] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19252,7 +19582,7 @@ func (x *ListFundingPeriodDataPointsResponse) ProtoReflect() protoreflect.Messag // Deprecated: Use ListFundingPeriodDataPointsResponse.ProtoReflect.Descriptor instead. func (*ListFundingPeriodDataPointsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{317} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{321} } func (x *ListFundingPeriodDataPointsResponse) GetFundingPeriodDataPoints() *FundingPeriodDataPointConnection { @@ -19272,7 +19602,7 @@ type PingRequest struct { func (x *PingRequest) Reset() { *x = PingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[318] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[322] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19285,7 +19615,7 @@ func (x *PingRequest) String() string { func (*PingRequest) ProtoMessage() {} func (x *PingRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[318] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[322] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19298,7 +19628,7 @@ func (x *PingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. func (*PingRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{318} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{322} } // Ping response from the data node @@ -19311,7 +19641,7 @@ type PingResponse struct { func (x *PingResponse) Reset() { *x = PingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[319] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[323] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19324,7 +19654,7 @@ func (x *PingResponse) String() string { func (*PingResponse) ProtoMessage() {} func (x *PingResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[319] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[323] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19337,7 +19667,7 @@ func (x *PingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. func (*PingResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{319} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{323} } // Basic description of an order. @@ -19360,7 +19690,7 @@ type OrderInfo struct { func (x *OrderInfo) Reset() { *x = OrderInfo{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[320] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[324] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19373,7 +19703,7 @@ func (x *OrderInfo) String() string { func (*OrderInfo) ProtoMessage() {} func (x *OrderInfo) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[320] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[324] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19386,7 +19716,7 @@ func (x *OrderInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderInfo.ProtoReflect.Descriptor instead. func (*OrderInfo) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{320} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{324} } func (x *OrderInfo) GetSide() vega.Side { @@ -19417,7 +19747,7 @@ func (x *OrderInfo) GetIsMarketOrder() bool { return false } -// Request for the estimate of the margin level and, if available collateral is provided, liquidation price for the specified position. +// Request for the estimated margin level, margin account balance change, and liquidation price for the specified position. type EstimatePositionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -19428,19 +19758,31 @@ type EstimatePositionRequest struct { // Open volume. This field is a signed integer scaled to the market's position decimal places. // A negative number denotes a short position. OpenVolume int64 `protobuf:"varint,2,opt,name=open_volume,json=openVolume,proto3" json:"open_volume,omitempty"` + // Average entry price corresponding to the open volume. The price is an unsigned integer. For example `123456` is a correctly + // formatted price of `1.23456` assuming market configured to 5 decimal places. + AverageEntryPrice string `protobuf:"bytes,3,opt,name=average_entry_price,json=averageEntryPrice,proto3" json:"average_entry_price,omitempty"` // Open and/or hypothetical orders. - Orders []*OrderInfo `protobuf:"bytes,3,rep,name=orders,proto3" json:"orders,omitempty"` - // Collateral available for the position. If provided then response will contain the liquidation price estimate. - // Collateral available needs to be provided scaled to asset decimal places. Liquidation price returned is scaled to asset decimal places by default. - CollateralAvailable *string `protobuf:"bytes,4,opt,name=collateral_available,json=collateralAvailable,proto3,oneof" json:"collateral_available,omitempty"` + Orders []*OrderInfo `protobuf:"bytes,4,rep,name=orders,proto3" json:"orders,omitempty"` + // Margin account balance. Needs to be provided scaled to asset decimal places. + MarginAccountBalance string `protobuf:"bytes,5,opt,name=margin_account_balance,json=marginAccountBalance,proto3" json:"margin_account_balance,omitempty"` + // General account balance. Needs to be provided scaled to asset decimal places. + GeneralAccountBalance string `protobuf:"bytes,6,opt,name=general_account_balance,json=generalAccountBalance,proto3" json:"general_account_balance,omitempty"` + // Order margin account balance. Needs to be provided scaled to asset decimal places. + OrderMarginAccountBalance string `protobuf:"bytes,7,opt,name=order_margin_account_balance,json=orderMarginAccountBalance,proto3" json:"order_margin_account_balance,omitempty"` + // Margin mode for the party, cross margin or isolated margin. + MarginMode vega.MarginMode `protobuf:"varint,8,opt,name=margin_mode,json=marginMode,proto3,enum=vega.MarginMode" json:"margin_mode,omitempty"` + // Margin factor to be used along with isolated margin mode + MarginFactor *string `protobuf:"bytes,9,opt,name=margin_factor,json=marginFactor,proto3,oneof" json:"margin_factor,omitempty"` + // Whether the estimated position margin increase should be included in available collateral for liquidation price calculation in isolated margin mode. + IncludeRequiredPositionMarginInAvailableCollateral *bool `protobuf:"varint,10,opt,name=include_required_position_margin_in_available_collateral,json=includeRequiredPositionMarginInAvailableCollateral,proto3,oneof" json:"include_required_position_margin_in_available_collateral,omitempty"` // Whether the liquidation price estimates should be scaled to market decimal places or by asset decimal places. If not set, asset decimal places are used. - ScaleLiquidationPriceToMarketDecimals *bool `protobuf:"varint,5,opt,name=scale_liquidation_price_to_market_decimals,json=scaleLiquidationPriceToMarketDecimals,proto3,oneof" json:"scale_liquidation_price_to_market_decimals,omitempty"` + ScaleLiquidationPriceToMarketDecimals *bool `protobuf:"varint,11,opt,name=scale_liquidation_price_to_market_decimals,json=scaleLiquidationPriceToMarketDecimals,proto3,oneof" json:"scale_liquidation_price_to_market_decimals,omitempty"` } func (x *EstimatePositionRequest) Reset() { *x = EstimatePositionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[321] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[325] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19453,7 +19795,7 @@ func (x *EstimatePositionRequest) String() string { func (*EstimatePositionRequest) ProtoMessage() {} func (x *EstimatePositionRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[321] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[325] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19466,7 +19808,7 @@ func (x *EstimatePositionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EstimatePositionRequest.ProtoReflect.Descriptor instead. func (*EstimatePositionRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{321} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{325} } func (x *EstimatePositionRequest) GetMarketId() string { @@ -19483,6 +19825,13 @@ func (x *EstimatePositionRequest) GetOpenVolume() int64 { return 0 } +func (x *EstimatePositionRequest) GetAverageEntryPrice() string { + if x != nil { + return x.AverageEntryPrice + } + return "" +} + func (x *EstimatePositionRequest) GetOrders() []*OrderInfo { if x != nil { return x.Orders @@ -19490,13 +19839,48 @@ func (x *EstimatePositionRequest) GetOrders() []*OrderInfo { return nil } -func (x *EstimatePositionRequest) GetCollateralAvailable() string { - if x != nil && x.CollateralAvailable != nil { - return *x.CollateralAvailable +func (x *EstimatePositionRequest) GetMarginAccountBalance() string { + if x != nil { + return x.MarginAccountBalance + } + return "" +} + +func (x *EstimatePositionRequest) GetGeneralAccountBalance() string { + if x != nil { + return x.GeneralAccountBalance + } + return "" +} + +func (x *EstimatePositionRequest) GetOrderMarginAccountBalance() string { + if x != nil { + return x.OrderMarginAccountBalance + } + return "" +} + +func (x *EstimatePositionRequest) GetMarginMode() vega.MarginMode { + if x != nil { + return x.MarginMode + } + return vega.MarginMode(0) +} + +func (x *EstimatePositionRequest) GetMarginFactor() string { + if x != nil && x.MarginFactor != nil { + return *x.MarginFactor } return "" } +func (x *EstimatePositionRequest) GetIncludeRequiredPositionMarginInAvailableCollateral() bool { + if x != nil && x.IncludeRequiredPositionMarginInAvailableCollateral != nil { + return *x.IncludeRequiredPositionMarginInAvailableCollateral + } + return false +} + func (x *EstimatePositionRequest) GetScaleLiquidationPriceToMarketDecimals() bool { if x != nil && x.ScaleLiquidationPriceToMarketDecimals != nil { return *x.ScaleLiquidationPriceToMarketDecimals @@ -19504,7 +19888,7 @@ func (x *EstimatePositionRequest) GetScaleLiquidationPriceToMarketDecimals() boo return false } -// Response for the estimate of the margin level and, if available collateral was provided in the request, liquidation price for the specified position. +// Response for the estimated margin level, margin account balance change, and liquidation price for the specified position. type EstimatePositionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -19512,14 +19896,16 @@ type EstimatePositionResponse struct { // Margin level range estimate for the specified position. Margin *MarginEstimate `protobuf:"bytes,1,opt,name=margin,proto3" json:"margin,omitempty"` + // Estimated margin account balance increase. + CollateralIncreaseEstimate *CollateralIncreaseEstimate `protobuf:"bytes,2,opt,name=collateral_increase_estimate,json=collateralIncreaseEstimate,proto3" json:"collateral_increase_estimate,omitempty"` // Liquidation price range estimate for the specified position. Only populated if available collateral was specified in the request. - Liquidation *LiquidationEstimate `protobuf:"bytes,2,opt,name=liquidation,proto3" json:"liquidation,omitempty"` + Liquidation *LiquidationEstimate `protobuf:"bytes,3,opt,name=liquidation,proto3" json:"liquidation,omitempty"` } func (x *EstimatePositionResponse) Reset() { *x = EstimatePositionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[322] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[326] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19532,7 +19918,7 @@ func (x *EstimatePositionResponse) String() string { func (*EstimatePositionResponse) ProtoMessage() {} func (x *EstimatePositionResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[322] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[326] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19545,7 +19931,7 @@ func (x *EstimatePositionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EstimatePositionResponse.ProtoReflect.Descriptor instead. func (*EstimatePositionResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{322} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{326} } func (x *EstimatePositionResponse) GetMargin() *MarginEstimate { @@ -19555,6 +19941,13 @@ func (x *EstimatePositionResponse) GetMargin() *MarginEstimate { return nil } +func (x *EstimatePositionResponse) GetCollateralIncreaseEstimate() *CollateralIncreaseEstimate { + if x != nil { + return x.CollateralIncreaseEstimate + } + return nil +} + func (x *EstimatePositionResponse) GetLiquidation() *LiquidationEstimate { if x != nil { return x.Liquidation @@ -19562,6 +19955,64 @@ func (x *EstimatePositionResponse) GetLiquidation() *LiquidationEstimate { return nil } +// Estimates the additional funds needed to support the specified position +type CollateralIncreaseEstimate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Estimate assuming slippage cap is applied + WorstCase string `protobuf:"bytes,1,opt,name=worst_case,json=worstCase,proto3" json:"worst_case,omitempty"` + // Estimate assuming no slippage + BestCase string `protobuf:"bytes,2,opt,name=best_case,json=bestCase,proto3" json:"best_case,omitempty"` +} + +func (x *CollateralIncreaseEstimate) Reset() { + *x = CollateralIncreaseEstimate{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[327] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CollateralIncreaseEstimate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CollateralIncreaseEstimate) ProtoMessage() {} + +func (x *CollateralIncreaseEstimate) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[327] + 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 CollateralIncreaseEstimate.ProtoReflect.Descriptor instead. +func (*CollateralIncreaseEstimate) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{327} +} + +func (x *CollateralIncreaseEstimate) GetWorstCase() string { + if x != nil { + return x.WorstCase + } + return "" +} + +func (x *CollateralIncreaseEstimate) GetBestCase() string { + if x != nil { + return x.BestCase + } + return "" +} + // Margin level estimate for both worst and best case possible. type MarginEstimate struct { state protoimpl.MessageState @@ -19577,7 +20028,7 @@ type MarginEstimate struct { func (x *MarginEstimate) Reset() { *x = MarginEstimate{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[323] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[328] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19590,7 +20041,7 @@ func (x *MarginEstimate) String() string { func (*MarginEstimate) ProtoMessage() {} func (x *MarginEstimate) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[323] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[328] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19603,7 +20054,7 @@ func (x *MarginEstimate) ProtoReflect() protoreflect.Message { // Deprecated: Use MarginEstimate.ProtoReflect.Descriptor instead. func (*MarginEstimate) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{323} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{328} } func (x *MarginEstimate) GetWorstCase() *vega.MarginLevels { @@ -19635,7 +20086,7 @@ type LiquidationEstimate struct { func (x *LiquidationEstimate) Reset() { *x = LiquidationEstimate{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[324] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[329] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19648,7 +20099,7 @@ func (x *LiquidationEstimate) String() string { func (*LiquidationEstimate) ProtoMessage() {} func (x *LiquidationEstimate) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[324] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[329] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19661,7 +20112,7 @@ func (x *LiquidationEstimate) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidationEstimate.ProtoReflect.Descriptor instead. func (*LiquidationEstimate) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{324} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{329} } func (x *LiquidationEstimate) GetWorstCase() *LiquidationPrice { @@ -19695,7 +20146,7 @@ type LiquidationPrice struct { func (x *LiquidationPrice) Reset() { *x = LiquidationPrice{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[325] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[330] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19708,7 +20159,7 @@ func (x *LiquidationPrice) String() string { func (*LiquidationPrice) ProtoMessage() {} func (x *LiquidationPrice) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[325] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[330] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19721,7 +20172,7 @@ func (x *LiquidationPrice) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidationPrice.ProtoReflect.Descriptor instead. func (*LiquidationPrice) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{325} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{330} } func (x *LiquidationPrice) GetOpenVolumeOnly() string { @@ -19755,7 +20206,7 @@ type GetCurrentReferralProgramRequest struct { func (x *GetCurrentReferralProgramRequest) Reset() { *x = GetCurrentReferralProgramRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[326] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[331] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19768,7 +20219,7 @@ func (x *GetCurrentReferralProgramRequest) String() string { func (*GetCurrentReferralProgramRequest) ProtoMessage() {} func (x *GetCurrentReferralProgramRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[326] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[331] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19781,7 +20232,7 @@ func (x *GetCurrentReferralProgramRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCurrentReferralProgramRequest.ProtoReflect.Descriptor instead. func (*GetCurrentReferralProgramRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{326} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{331} } // Response containing the current referral program @@ -19797,7 +20248,7 @@ type GetCurrentReferralProgramResponse struct { func (x *GetCurrentReferralProgramResponse) Reset() { *x = GetCurrentReferralProgramResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[327] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[332] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19810,7 +20261,7 @@ func (x *GetCurrentReferralProgramResponse) String() string { func (*GetCurrentReferralProgramResponse) ProtoMessage() {} func (x *GetCurrentReferralProgramResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[327] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[332] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19823,7 +20274,7 @@ func (x *GetCurrentReferralProgramResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetCurrentReferralProgramResponse.ProtoReflect.Descriptor instead. func (*GetCurrentReferralProgramResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{327} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{332} } func (x *GetCurrentReferralProgramResponse) GetCurrentReferralProgram() *ReferralProgram { @@ -19862,7 +20313,7 @@ type ReferralProgram struct { func (x *ReferralProgram) Reset() { *x = ReferralProgram{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[328] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[333] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19875,7 +20326,7 @@ func (x *ReferralProgram) String() string { func (*ReferralProgram) ProtoMessage() {} func (x *ReferralProgram) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[328] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[333] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19888,7 +20339,7 @@ func (x *ReferralProgram) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralProgram.ProtoReflect.Descriptor instead. func (*ReferralProgram) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{328} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{333} } func (x *ReferralProgram) GetVersion() uint64 { @@ -19954,12 +20405,14 @@ type ReferralSet struct { CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Timestamp, in Unix nanoseconds, when the set was updated. UpdatedAt int64 `protobuf:"varint,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + // Current number of members in the referral set. + TotalMembers uint64 `protobuf:"varint,5,opt,name=total_members,json=totalMembers,proto3" json:"total_members,omitempty"` } func (x *ReferralSet) Reset() { *x = ReferralSet{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[329] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[334] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19972,7 +20425,7 @@ func (x *ReferralSet) String() string { func (*ReferralSet) ProtoMessage() {} func (x *ReferralSet) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[329] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[334] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19985,7 +20438,7 @@ func (x *ReferralSet) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralSet.ProtoReflect.Descriptor instead. func (*ReferralSet) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{329} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{334} } func (x *ReferralSet) GetId() string { @@ -20016,6 +20469,13 @@ func (x *ReferralSet) GetUpdatedAt() int64 { return 0 } +func (x *ReferralSet) GetTotalMembers() uint64 { + if x != nil { + return x.TotalMembers + } + return 0 +} + // Referral set data with the corresponding cursor. type ReferralSetEdge struct { state protoimpl.MessageState @@ -20031,7 +20491,7 @@ type ReferralSetEdge struct { func (x *ReferralSetEdge) Reset() { *x = ReferralSetEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[330] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[335] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20044,7 +20504,7 @@ func (x *ReferralSetEdge) String() string { func (*ReferralSetEdge) ProtoMessage() {} func (x *ReferralSetEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[330] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[335] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20057,7 +20517,7 @@ func (x *ReferralSetEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralSetEdge.ProtoReflect.Descriptor instead. func (*ReferralSetEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{330} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{335} } func (x *ReferralSetEdge) GetNode() *ReferralSet { @@ -20089,7 +20549,7 @@ type ReferralSetConnection struct { func (x *ReferralSetConnection) Reset() { *x = ReferralSetConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[331] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[336] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20102,7 +20562,7 @@ func (x *ReferralSetConnection) String() string { func (*ReferralSetConnection) ProtoMessage() {} func (x *ReferralSetConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[331] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[336] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20115,7 +20575,7 @@ func (x *ReferralSetConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralSetConnection.ProtoReflect.Descriptor instead. func (*ReferralSetConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{331} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{336} } func (x *ReferralSetConnection) GetEdges() []*ReferralSetEdge { @@ -20151,7 +20611,7 @@ type ListReferralSetsRequest struct { func (x *ListReferralSetsRequest) Reset() { *x = ListReferralSetsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[332] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[337] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20164,7 +20624,7 @@ func (x *ListReferralSetsRequest) String() string { func (*ListReferralSetsRequest) ProtoMessage() {} func (x *ListReferralSetsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[332] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[337] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20177,7 +20637,7 @@ func (x *ListReferralSetsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListReferralSetsRequest.ProtoReflect.Descriptor instead. func (*ListReferralSetsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{332} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{337} } func (x *ListReferralSetsRequest) GetReferralSetId() string { @@ -20221,7 +20681,7 @@ type ListReferralSetsResponse struct { func (x *ListReferralSetsResponse) Reset() { *x = ListReferralSetsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[333] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[338] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20234,7 +20694,7 @@ func (x *ListReferralSetsResponse) String() string { func (*ListReferralSetsResponse) ProtoMessage() {} func (x *ListReferralSetsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[333] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[338] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20247,7 +20707,7 @@ func (x *ListReferralSetsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListReferralSetsResponse.ProtoReflect.Descriptor instead. func (*ListReferralSetsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{333} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{338} } func (x *ListReferralSetsResponse) GetReferralSets() *ReferralSetConnection { @@ -20280,7 +20740,7 @@ type ReferralSetReferee struct { func (x *ReferralSetReferee) Reset() { *x = ReferralSetReferee{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[334] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[339] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20293,7 +20753,7 @@ func (x *ReferralSetReferee) String() string { func (*ReferralSetReferee) ProtoMessage() {} func (x *ReferralSetReferee) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[334] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[339] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20306,7 +20766,7 @@ func (x *ReferralSetReferee) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralSetReferee.ProtoReflect.Descriptor instead. func (*ReferralSetReferee) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{334} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{339} } func (x *ReferralSetReferee) GetReferralSetId() string { @@ -20366,7 +20826,7 @@ type ReferralSetRefereeEdge struct { func (x *ReferralSetRefereeEdge) Reset() { *x = ReferralSetRefereeEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[335] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[340] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20379,7 +20839,7 @@ func (x *ReferralSetRefereeEdge) String() string { func (*ReferralSetRefereeEdge) ProtoMessage() {} func (x *ReferralSetRefereeEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[335] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[340] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20392,7 +20852,7 @@ func (x *ReferralSetRefereeEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralSetRefereeEdge.ProtoReflect.Descriptor instead. func (*ReferralSetRefereeEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{335} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{340} } func (x *ReferralSetRefereeEdge) GetNode() *ReferralSetReferee { @@ -20424,7 +20884,7 @@ type ReferralSetRefereeConnection struct { func (x *ReferralSetRefereeConnection) Reset() { *x = ReferralSetRefereeConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[336] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[341] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20437,7 +20897,7 @@ func (x *ReferralSetRefereeConnection) String() string { func (*ReferralSetRefereeConnection) ProtoMessage() {} func (x *ReferralSetRefereeConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[336] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[341] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20450,7 +20910,7 @@ func (x *ReferralSetRefereeConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralSetRefereeConnection.ProtoReflect.Descriptor instead. func (*ReferralSetRefereeConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{336} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{341} } func (x *ReferralSetRefereeConnection) GetEdges() []*ReferralSetRefereeEdge { @@ -20488,7 +20948,7 @@ type ListReferralSetRefereesRequest struct { func (x *ListReferralSetRefereesRequest) Reset() { *x = ListReferralSetRefereesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[337] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[342] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20501,7 +20961,7 @@ func (x *ListReferralSetRefereesRequest) String() string { func (*ListReferralSetRefereesRequest) ProtoMessage() {} func (x *ListReferralSetRefereesRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[337] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[342] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20514,7 +20974,7 @@ func (x *ListReferralSetRefereesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListReferralSetRefereesRequest.ProtoReflect.Descriptor instead. func (*ListReferralSetRefereesRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{337} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{342} } func (x *ListReferralSetRefereesRequest) GetReferralSetId() string { @@ -20565,7 +21025,7 @@ type ListReferralSetRefereesResponse struct { func (x *ListReferralSetRefereesResponse) Reset() { *x = ListReferralSetRefereesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[338] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[343] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20578,7 +21038,7 @@ func (x *ListReferralSetRefereesResponse) String() string { func (*ListReferralSetRefereesResponse) ProtoMessage() {} func (x *ListReferralSetRefereesResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[338] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[343] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20591,7 +21051,7 @@ func (x *ListReferralSetRefereesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListReferralSetRefereesResponse.ProtoReflect.Descriptor instead. func (*ListReferralSetRefereesResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{338} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{343} } func (x *ListReferralSetRefereesResponse) GetReferralSetReferees() *ReferralSetRefereeConnection { @@ -20611,7 +21071,7 @@ type GetReferralSetStatsRequest struct { ReferralSetId *string `protobuf:"bytes,1,opt,name=referral_set_id,json=referralSetId,proto3,oneof" json:"referral_set_id,omitempty"` // Epoch to get referral set statistics for. If not set, the last complete epoch is used. AtEpoch *uint64 `protobuf:"varint,2,opt,name=at_epoch,json=atEpoch,proto3,oneof" json:"at_epoch,omitempty"` - // Restrict referral set statisitcs to those for the given referee. + // Restrict referral set statistics to those for the given referee. Referee *string `protobuf:"bytes,3,opt,name=referee,proto3,oneof" json:"referee,omitempty"` // Pagination controls. Pagination *Pagination `protobuf:"bytes,4,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` @@ -20620,7 +21080,7 @@ type GetReferralSetStatsRequest struct { func (x *GetReferralSetStatsRequest) Reset() { *x = GetReferralSetStatsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[339] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[344] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20633,7 +21093,7 @@ func (x *GetReferralSetStatsRequest) String() string { func (*GetReferralSetStatsRequest) ProtoMessage() {} func (x *GetReferralSetStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[339] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[344] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20646,7 +21106,7 @@ func (x *GetReferralSetStatsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetReferralSetStatsRequest.ProtoReflect.Descriptor instead. func (*GetReferralSetStatsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{339} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{344} } func (x *GetReferralSetStatsRequest) GetReferralSetId() string { @@ -20690,7 +21150,7 @@ type GetReferralSetStatsResponse struct { func (x *GetReferralSetStatsResponse) Reset() { *x = GetReferralSetStatsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[340] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[345] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20703,7 +21163,7 @@ func (x *GetReferralSetStatsResponse) String() string { func (*GetReferralSetStatsResponse) ProtoMessage() {} func (x *GetReferralSetStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[340] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[345] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20716,7 +21176,7 @@ func (x *GetReferralSetStatsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetReferralSetStatsResponse.ProtoReflect.Descriptor instead. func (*GetReferralSetStatsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{340} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{345} } func (x *GetReferralSetStatsResponse) GetStats() *ReferralSetStatsConnection { @@ -20741,7 +21201,7 @@ type ReferralSetStatsConnection struct { func (x *ReferralSetStatsConnection) Reset() { *x = ReferralSetStatsConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[341] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[346] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20754,7 +21214,7 @@ func (x *ReferralSetStatsConnection) String() string { func (*ReferralSetStatsConnection) ProtoMessage() {} func (x *ReferralSetStatsConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[341] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[346] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20767,7 +21227,7 @@ func (x *ReferralSetStatsConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralSetStatsConnection.ProtoReflect.Descriptor instead. func (*ReferralSetStatsConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{341} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{346} } func (x *ReferralSetStatsConnection) GetEdges() []*ReferralSetStatsEdge { @@ -20799,7 +21259,7 @@ type ReferralSetStatsEdge struct { func (x *ReferralSetStatsEdge) Reset() { *x = ReferralSetStatsEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[342] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[347] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20812,7 +21272,7 @@ func (x *ReferralSetStatsEdge) String() string { func (*ReferralSetStatsEdge) ProtoMessage() {} func (x *ReferralSetStatsEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[342] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[347] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20825,7 +21285,7 @@ func (x *ReferralSetStatsEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralSetStatsEdge.ProtoReflect.Descriptor instead. func (*ReferralSetStatsEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{342} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{347} } func (x *ReferralSetStatsEdge) GetNode() *ReferralSetStats { @@ -20874,7 +21334,7 @@ type ReferralSetStats struct { func (x *ReferralSetStats) Reset() { *x = ReferralSetStats{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[343] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[348] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20887,7 +21347,7 @@ func (x *ReferralSetStats) String() string { func (*ReferralSetStats) ProtoMessage() {} func (x *ReferralSetStats) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[343] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[348] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20900,7 +21360,7 @@ func (x *ReferralSetStats) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralSetStats.ProtoReflect.Descriptor instead. func (*ReferralSetStats) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{343} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{348} } func (x *ReferralSetStats) GetAtEpoch() uint64 { @@ -20991,16 +21451,22 @@ type Team struct { AvatarUrl *string `protobuf:"bytes,5,opt,name=avatar_url,json=avatarUrl,proto3,oneof" json:"avatar_url,omitempty"` // Timestamp in Unix nanoseconds when the team was created. CreatedAt int64 `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - // Whether or not the team is closed to new party members. + // Whether or not the team is closed to new party members. When closed, only parties specified in the allow list can + // join the team. Closed bool `protobuf:"varint,7,opt,name=closed,proto3" json:"closed,omitempty"` // Epoch at which the team was created. CreatedAtEpoch uint64 `protobuf:"varint,8,opt,name=created_at_epoch,json=createdAtEpoch,proto3" json:"created_at_epoch,omitempty"` + // List of public keys that are allowed to join the team. + // Only applicable to closed teams. + AllowList []string `protobuf:"bytes,9,rep,name=allow_list,json=allowList,proto3" json:"allow_list,omitempty"` + // Current number of members in the team. + TotalMembers uint64 `protobuf:"varint,10,opt,name=total_members,json=totalMembers,proto3" json:"total_members,omitempty"` } func (x *Team) Reset() { *x = Team{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[344] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[349] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21013,7 +21479,7 @@ func (x *Team) String() string { func (*Team) ProtoMessage() {} func (x *Team) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[344] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[349] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21026,7 +21492,7 @@ func (x *Team) ProtoReflect() protoreflect.Message { // Deprecated: Use Team.ProtoReflect.Descriptor instead. func (*Team) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{344} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{349} } func (x *Team) GetTeamId() string { @@ -21085,6 +21551,20 @@ func (x *Team) GetCreatedAtEpoch() uint64 { return 0 } +func (x *Team) GetAllowList() []string { + if x != nil { + return x.AllowList + } + return nil +} + +func (x *Team) GetTotalMembers() uint64 { + if x != nil { + return x.TotalMembers + } + return 0 +} + // Team data item with the corresponding cursor. type TeamEdge struct { state protoimpl.MessageState @@ -21100,7 +21580,7 @@ type TeamEdge struct { func (x *TeamEdge) Reset() { *x = TeamEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[345] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[350] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21113,7 +21593,7 @@ func (x *TeamEdge) String() string { func (*TeamEdge) ProtoMessage() {} func (x *TeamEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[345] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[350] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21126,7 +21606,7 @@ func (x *TeamEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use TeamEdge.ProtoReflect.Descriptor instead. func (*TeamEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{345} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{350} } func (x *TeamEdge) GetNode() *Team { @@ -21158,7 +21638,7 @@ type TeamConnection struct { func (x *TeamConnection) Reset() { *x = TeamConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[346] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[351] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21171,7 +21651,7 @@ func (x *TeamConnection) String() string { func (*TeamConnection) ProtoMessage() {} func (x *TeamConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[346] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[351] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21184,7 +21664,7 @@ func (x *TeamConnection) ProtoReflect() protoreflect.Message { // Deprecated: Use TeamConnection.ProtoReflect.Descriptor instead. func (*TeamConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{346} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{351} } func (x *TeamConnection) GetEdges() []*TeamEdge { @@ -21218,7 +21698,7 @@ type ListTeamsRequest struct { func (x *ListTeamsRequest) Reset() { *x = ListTeamsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[347] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[352] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21231,7 +21711,7 @@ func (x *ListTeamsRequest) String() string { func (*ListTeamsRequest) ProtoMessage() {} func (x *ListTeamsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[347] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[352] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21244,7 +21724,7 @@ func (x *ListTeamsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListTeamsRequest.ProtoReflect.Descriptor instead. func (*ListTeamsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{347} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{352} } func (x *ListTeamsRequest) GetTeamId() string { @@ -21281,7 +21761,7 @@ type ListTeamsResponse struct { func (x *ListTeamsResponse) Reset() { *x = ListTeamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[348] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[353] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21294,7 +21774,7 @@ func (x *ListTeamsResponse) String() string { func (*ListTeamsResponse) ProtoMessage() {} func (x *ListTeamsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[348] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[353] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21307,7 +21787,7 @@ func (x *ListTeamsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListTeamsResponse.ProtoReflect.Descriptor instead. func (*ListTeamsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{348} + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{353} } func (x *ListTeamsResponse) GetTeams() *TeamConnection { @@ -21317,35 +21797,38 @@ func (x *ListTeamsResponse) GetTeams() *TeamConnection { return nil } -// Request that is sent when listing the referees for a given team. -type ListTeamRefereesRequest struct { +// Request to list all teams' statistics. +type ListTeamsStatisticsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Team ID to list referees for. - TeamId string `protobuf:"bytes,1,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` + // Restrict team statistics to those with the given team ID. + TeamId *string `protobuf:"bytes,1,opt,name=team_id,json=teamId,proto3,oneof" json:"team_id,omitempty"` + // Defines the number of past epochs to aggregate data from. By default, it takes + // the last 10 epochs. + AggregationEpochs *uint64 `protobuf:"varint,2,opt,name=aggregation_epochs,json=aggregationEpochs,proto3,oneof" json:"aggregation_epochs,omitempty"` // Pagination controls. - Pagination *Pagination `protobuf:"bytes,2,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` + Pagination *Pagination `protobuf:"bytes,3,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` } -func (x *ListTeamRefereesRequest) Reset() { - *x = ListTeamRefereesRequest{} +func (x *ListTeamsStatisticsRequest) Reset() { + *x = ListTeamsStatisticsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[349] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[354] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ListTeamRefereesRequest) String() string { +func (x *ListTeamsStatisticsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListTeamRefereesRequest) ProtoMessage() {} +func (*ListTeamsStatisticsRequest) ProtoMessage() {} -func (x *ListTeamRefereesRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[349] +func (x *ListTeamsStatisticsRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[354] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21356,58 +21839,59 @@ func (x *ListTeamRefereesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListTeamRefereesRequest.ProtoReflect.Descriptor instead. -func (*ListTeamRefereesRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{349} +// Deprecated: Use ListTeamsStatisticsRequest.ProtoReflect.Descriptor instead. +func (*ListTeamsStatisticsRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{354} } -func (x *ListTeamRefereesRequest) GetTeamId() string { - if x != nil { - return x.TeamId +func (x *ListTeamsStatisticsRequest) GetTeamId() string { + if x != nil && x.TeamId != nil { + return *x.TeamId } return "" } -func (x *ListTeamRefereesRequest) GetPagination() *Pagination { +func (x *ListTeamsStatisticsRequest) GetAggregationEpochs() uint64 { + if x != nil && x.AggregationEpochs != nil { + return *x.AggregationEpochs + } + return 0 +} + +func (x *ListTeamsStatisticsRequest) GetPagination() *Pagination { if x != nil { return x.Pagination } return nil } -// A team's referee info -type TeamReferee struct { +// Response for the list teams' statistics request containing the statistics. +type ListTeamsStatisticsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // ID of the team the referee joined. - TeamId string `protobuf:"bytes,1,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` - // Party that joined the team. - Referee string `protobuf:"bytes,2,opt,name=referee,proto3" json:"referee,omitempty"` - // Timestamp in Unix nanoseconds when the party joined the team. - JoinedAt int64 `protobuf:"varint,3,opt,name=joined_at,json=joinedAt,proto3" json:"joined_at,omitempty"` - // Epoch at which the party joined the team. - JoinedAtEpoch uint64 `protobuf:"varint,4,opt,name=joined_at_epoch,json=joinedAtEpoch,proto3" json:"joined_at_epoch,omitempty"` + // Page of teams' statistics data and corresponding page information. + Statistics *TeamsStatisticsConnection `protobuf:"bytes,1,opt,name=statistics,proto3" json:"statistics,omitempty"` } -func (x *TeamReferee) Reset() { - *x = TeamReferee{} +func (x *ListTeamsStatisticsResponse) Reset() { + *x = ListTeamsStatisticsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[350] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[355] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TeamReferee) String() string { +func (x *ListTeamsStatisticsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TeamReferee) ProtoMessage() {} +func (*ListTeamsStatisticsResponse) ProtoMessage() {} -func (x *TeamReferee) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[350] +func (x *ListTeamsStatisticsResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[355] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21418,68 +21902,105 @@ func (x *TeamReferee) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TeamReferee.ProtoReflect.Descriptor instead. -func (*TeamReferee) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{350} +// Deprecated: Use ListTeamsStatisticsResponse.ProtoReflect.Descriptor instead. +func (*ListTeamsStatisticsResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{355} } -func (x *TeamReferee) GetTeamId() string { +func (x *ListTeamsStatisticsResponse) GetStatistics() *TeamsStatisticsConnection { if x != nil { - return x.TeamId + return x.Statistics } - return "" + return nil } -func (x *TeamReferee) GetReferee() string { - if x != nil { - return x.Referee +// Page of teams' statistics and corresponding page information. +type TeamsStatisticsConnection struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Page of team data and their corresponding cursors. + Edges []*TeamStatisticsEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` + // Page information that is used for fetching further pages. + PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` +} + +func (x *TeamsStatisticsConnection) Reset() { + *x = TeamsStatisticsConnection{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[356] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -func (x *TeamReferee) GetJoinedAt() int64 { +func (x *TeamsStatisticsConnection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TeamsStatisticsConnection) ProtoMessage() {} + +func (x *TeamsStatisticsConnection) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[356] + 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 TeamsStatisticsConnection.ProtoReflect.Descriptor instead. +func (*TeamsStatisticsConnection) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{356} +} + +func (x *TeamsStatisticsConnection) GetEdges() []*TeamStatisticsEdge { if x != nil { - return x.JoinedAt + return x.Edges } - return 0 + return nil } -func (x *TeamReferee) GetJoinedAtEpoch() uint64 { +func (x *TeamsStatisticsConnection) GetPageInfo() *PageInfo { if x != nil { - return x.JoinedAtEpoch + return x.PageInfo } - return 0 + return nil } -// Team referee data item with the corresponding cursor. -type TeamRefereeEdge struct { +// Team data item with the corresponding cursor. +type TeamStatisticsEdge struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Team referee data. - Node *TeamReferee `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // Team's statistics data. + Node *TeamStatistics `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // Cursor that can be used to fetch further pages. Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` } -func (x *TeamRefereeEdge) Reset() { - *x = TeamRefereeEdge{} +func (x *TeamStatisticsEdge) Reset() { + *x = TeamStatisticsEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[351] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[357] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TeamRefereeEdge) String() string { +func (x *TeamStatisticsEdge) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TeamRefereeEdge) ProtoMessage() {} +func (*TeamStatisticsEdge) ProtoMessage() {} -func (x *TeamRefereeEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[351] +func (x *TeamStatisticsEdge) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[357] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21490,54 +22011,68 @@ func (x *TeamRefereeEdge) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TeamRefereeEdge.ProtoReflect.Descriptor instead. -func (*TeamRefereeEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{351} +// Deprecated: Use TeamStatisticsEdge.ProtoReflect.Descriptor instead. +func (*TeamStatisticsEdge) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{357} } -func (x *TeamRefereeEdge) GetNode() *TeamReferee { +func (x *TeamStatisticsEdge) GetNode() *TeamStatistics { if x != nil { return x.Node } return nil } -func (x *TeamRefereeEdge) GetCursor() string { +func (x *TeamStatisticsEdge) GetCursor() string { if x != nil { return x.Cursor } return "" } -// Page of team referee data and corresponding page information. -type TeamRefereeConnection struct { +// Team's statistics record containing the team information. +type TeamStatistics struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of team referee data and their corresponding cursors. - Edges []*TeamRefereeEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` - // Page information that is used for fetching further pages. - PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` -} - -func (x *TeamRefereeConnection) Reset() { - *x = TeamRefereeConnection{} + // Team ID the statistics are related to. + TeamId string `protobuf:"bytes,1,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` + // Total of volume accumulated over the requested epoch period, expressed in + // quantum value. + TotalQuantumVolume string `protobuf:"bytes,2,opt,name=total_quantum_volume,json=totalQuantumVolume,proto3" json:"total_quantum_volume,omitempty"` + // Total of rewards accumulated over the requested epoch period, expressed in + // quantum value. + TotalQuantumRewards string `protobuf:"bytes,3,opt,name=total_quantum_rewards,json=totalQuantumRewards,proto3" json:"total_quantum_rewards,omitempty"` + // List of rewards over the requested epoch period, expressed in quantum + // value for each epoch. + QuantumRewards []*QuantumRewardsPerEpoch `protobuf:"bytes,4,rep,name=quantum_rewards,json=quantumRewards,proto3" json:"quantum_rewards,omitempty"` + // Total of games played. + TotalGamesPlayed uint64 `protobuf:"varint,5,opt,name=total_games_played,json=totalGamesPlayed,proto3" json:"total_games_played,omitempty"` + // List of games played over the requested epoch period. + GamesPlayed []string `protobuf:"bytes,6,rep,name=games_played,json=gamesPlayed,proto3" json:"games_played,omitempty"` + // List of volumes over the requested epoch period, expressed in quantum + // value for each epoch. + QuantumVolumes []*QuantumVolumesPerEpoch `protobuf:"bytes,7,rep,name=quantum_volumes,json=quantumVolumes,proto3" json:"quantum_volumes,omitempty"` +} + +func (x *TeamStatistics) Reset() { + *x = TeamStatistics{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[352] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[358] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TeamRefereeConnection) String() string { +func (x *TeamStatistics) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TeamRefereeConnection) ProtoMessage() {} +func (*TeamStatistics) ProtoMessage() {} -func (x *TeamRefereeConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[352] +func (x *TeamStatistics) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[358] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21548,52 +22083,88 @@ func (x *TeamRefereeConnection) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TeamRefereeConnection.ProtoReflect.Descriptor instead. -func (*TeamRefereeConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{352} +// Deprecated: Use TeamStatistics.ProtoReflect.Descriptor instead. +func (*TeamStatistics) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{358} } -func (x *TeamRefereeConnection) GetEdges() []*TeamRefereeEdge { +func (x *TeamStatistics) GetTeamId() string { if x != nil { - return x.Edges + return x.TeamId + } + return "" +} + +func (x *TeamStatistics) GetTotalQuantumVolume() string { + if x != nil { + return x.TotalQuantumVolume + } + return "" +} + +func (x *TeamStatistics) GetTotalQuantumRewards() string { + if x != nil { + return x.TotalQuantumRewards + } + return "" +} + +func (x *TeamStatistics) GetQuantumRewards() []*QuantumRewardsPerEpoch { + if x != nil { + return x.QuantumRewards } return nil } -func (x *TeamRefereeConnection) GetPageInfo() *PageInfo { +func (x *TeamStatistics) GetTotalGamesPlayed() uint64 { if x != nil { - return x.PageInfo + return x.TotalGamesPlayed + } + return 0 +} + +func (x *TeamStatistics) GetGamesPlayed() []string { + if x != nil { + return x.GamesPlayed } return nil } -// Response that is sent when listing the referees for a given team. -type ListTeamRefereesResponse struct { +func (x *TeamStatistics) GetQuantumVolumes() []*QuantumVolumesPerEpoch { + if x != nil { + return x.QuantumVolumes + } + return nil +} + +type QuantumRewardsPerEpoch struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of team referee data and corresponding page information. - TeamReferees *TeamRefereeConnection `protobuf:"bytes,1,opt,name=team_referees,json=teamReferees,proto3" json:"team_referees,omitempty"` + // Epoch for which this information is valid. + Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` + // Total rewards accumulated over the epoch period, expressed in quantum value. + TotalQuantumRewards string `protobuf:"bytes,2,opt,name=total_quantum_rewards,json=totalQuantumRewards,proto3" json:"total_quantum_rewards,omitempty"` } -func (x *ListTeamRefereesResponse) Reset() { - *x = ListTeamRefereesResponse{} +func (x *QuantumRewardsPerEpoch) Reset() { + *x = QuantumRewardsPerEpoch{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[353] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[359] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ListTeamRefereesResponse) String() string { +func (x *QuantumRewardsPerEpoch) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListTeamRefereesResponse) ProtoMessage() {} +func (*QuantumRewardsPerEpoch) ProtoMessage() {} -func (x *ListTeamRefereesResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[353] +func (x *QuantumRewardsPerEpoch) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[359] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21604,49 +22175,53 @@ func (x *ListTeamRefereesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListTeamRefereesResponse.ProtoReflect.Descriptor instead. -func (*ListTeamRefereesResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{353} +// Deprecated: Use QuantumRewardsPerEpoch.ProtoReflect.Descriptor instead. +func (*QuantumRewardsPerEpoch) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{359} } -func (x *ListTeamRefereesResponse) GetTeamReferees() *TeamRefereeConnection { +func (x *QuantumRewardsPerEpoch) GetEpoch() uint64 { if x != nil { - return x.TeamReferees + return x.Epoch } - return nil + return 0 } -// A referee's team change information -type TeamRefereeHistory struct { +func (x *QuantumRewardsPerEpoch) GetTotalQuantumRewards() string { + if x != nil { + return x.TotalQuantumRewards + } + return "" +} + +type QuantumVolumesPerEpoch struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // ID of the team the referee joined. - TeamId string `protobuf:"bytes,1,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` - // Timestamp in Unix nanoseconds when the party joined the team. - JoinedAt int64 `protobuf:"varint,2,opt,name=joined_at,json=joinedAt,proto3" json:"joined_at,omitempty"` - // Epoch at which the party joined the team. - JoinedAtEpoch uint64 `protobuf:"varint,3,opt,name=joined_at_epoch,json=joinedAtEpoch,proto3" json:"joined_at_epoch,omitempty"` + // Epoch for which this information is valid. + Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` + // Total volumes accumulated over the epoch period, expressed in quantum value. + TotalQuantumVolumes string `protobuf:"bytes,2,opt,name=total_quantum_volumes,json=totalQuantumVolumes,proto3" json:"total_quantum_volumes,omitempty"` } -func (x *TeamRefereeHistory) Reset() { - *x = TeamRefereeHistory{} +func (x *QuantumVolumesPerEpoch) Reset() { + *x = QuantumVolumesPerEpoch{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[354] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[360] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TeamRefereeHistory) String() string { +func (x *QuantumVolumesPerEpoch) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TeamRefereeHistory) ProtoMessage() {} +func (*QuantumVolumesPerEpoch) ProtoMessage() {} -func (x *TeamRefereeHistory) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[354] +func (x *QuantumVolumesPerEpoch) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[360] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21657,61 +22232,59 @@ func (x *TeamRefereeHistory) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TeamRefereeHistory.ProtoReflect.Descriptor instead. -func (*TeamRefereeHistory) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{354} -} - -func (x *TeamRefereeHistory) GetTeamId() string { - if x != nil { - return x.TeamId - } - return "" +// Deprecated: Use QuantumVolumesPerEpoch.ProtoReflect.Descriptor instead. +func (*QuantumVolumesPerEpoch) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{360} } -func (x *TeamRefereeHistory) GetJoinedAt() int64 { +func (x *QuantumVolumesPerEpoch) GetEpoch() uint64 { if x != nil { - return x.JoinedAt + return x.Epoch } return 0 } -func (x *TeamRefereeHistory) GetJoinedAtEpoch() uint64 { +func (x *QuantumVolumesPerEpoch) GetTotalQuantumVolumes() string { if x != nil { - return x.JoinedAtEpoch + return x.TotalQuantumVolumes } - return 0 + return "" } -// Team referee history data item with the corresponding cursor. -type TeamRefereeHistoryEdge struct { +// Request to list all team members' statistics. +type ListTeamMembersStatisticsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Team referee data. - Node *TeamRefereeHistory `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // Cursor that can be used to fetch further pages. - Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` + // Restrict team statistics to those with the given team ID. + TeamId string `protobuf:"bytes,1,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` + // Restrict team members' statistics to those with the given party ID. + PartyId *string `protobuf:"bytes,2,opt,name=party_id,json=partyId,proto3,oneof" json:"party_id,omitempty"` + // Defines the number of past epochs to aggregate data from. By default, it takes + // the last 10 epochs. + AggregationEpochs *uint64 `protobuf:"varint,3,opt,name=aggregation_epochs,json=aggregationEpochs,proto3,oneof" json:"aggregation_epochs,omitempty"` + // Pagination controls. + Pagination *Pagination `protobuf:"bytes,4,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` } -func (x *TeamRefereeHistoryEdge) Reset() { - *x = TeamRefereeHistoryEdge{} +func (x *ListTeamMembersStatisticsRequest) Reset() { + *x = ListTeamMembersStatisticsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[355] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[361] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TeamRefereeHistoryEdge) String() string { +func (x *ListTeamMembersStatisticsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TeamRefereeHistoryEdge) ProtoMessage() {} +func (*ListTeamMembersStatisticsRequest) ProtoMessage() {} -func (x *TeamRefereeHistoryEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[355] +func (x *ListTeamMembersStatisticsRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[361] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21722,54 +22295,66 @@ func (x *TeamRefereeHistoryEdge) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TeamRefereeHistoryEdge.ProtoReflect.Descriptor instead. -func (*TeamRefereeHistoryEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{355} +// Deprecated: Use ListTeamMembersStatisticsRequest.ProtoReflect.Descriptor instead. +func (*ListTeamMembersStatisticsRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{361} } -func (x *TeamRefereeHistoryEdge) GetNode() *TeamRefereeHistory { +func (x *ListTeamMembersStatisticsRequest) GetTeamId() string { if x != nil { - return x.Node + return x.TeamId } - return nil + return "" } -func (x *TeamRefereeHistoryEdge) GetCursor() string { - if x != nil { - return x.Cursor +func (x *ListTeamMembersStatisticsRequest) GetPartyId() string { + if x != nil && x.PartyId != nil { + return *x.PartyId } return "" } -// Page of history data about a referee's team membership and corresponding page information. -type TeamRefereeHistoryConnection struct { +func (x *ListTeamMembersStatisticsRequest) GetAggregationEpochs() uint64 { + if x != nil && x.AggregationEpochs != nil { + return *x.AggregationEpochs + } + return 0 +} + +func (x *ListTeamMembersStatisticsRequest) GetPagination() *Pagination { + if x != nil { + return x.Pagination + } + return nil +} + +// Response for the list team members' statistics request containing the statistics. +type ListTeamMembersStatisticsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of team referee history data and their corresponding cursors. - Edges []*TeamRefereeHistoryEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` - // Page information that is used for fetching further pages. - PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` + // Page of team members' statistics data and corresponding page information. + Statistics *TeamMembersStatisticsConnection `protobuf:"bytes,1,opt,name=statistics,proto3" json:"statistics,omitempty"` } -func (x *TeamRefereeHistoryConnection) Reset() { - *x = TeamRefereeHistoryConnection{} +func (x *ListTeamMembersStatisticsResponse) Reset() { + *x = ListTeamMembersStatisticsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[356] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[362] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TeamRefereeHistoryConnection) String() string { +func (x *ListTeamMembersStatisticsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TeamRefereeHistoryConnection) ProtoMessage() {} +func (*ListTeamMembersStatisticsResponse) ProtoMessage() {} -func (x *TeamRefereeHistoryConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[356] +func (x *ListTeamMembersStatisticsResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[362] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21780,54 +22365,47 @@ func (x *TeamRefereeHistoryConnection) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TeamRefereeHistoryConnection.ProtoReflect.Descriptor instead. -func (*TeamRefereeHistoryConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{356} -} - -func (x *TeamRefereeHistoryConnection) GetEdges() []*TeamRefereeHistoryEdge { - if x != nil { - return x.Edges - } - return nil +// Deprecated: Use ListTeamMembersStatisticsResponse.ProtoReflect.Descriptor instead. +func (*ListTeamMembersStatisticsResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{362} } -func (x *TeamRefereeHistoryConnection) GetPageInfo() *PageInfo { +func (x *ListTeamMembersStatisticsResponse) GetStatistics() *TeamMembersStatisticsConnection { if x != nil { - return x.PageInfo + return x.Statistics } return nil } -// Request that is sent when listing the referee history for a given team. -type ListTeamRefereeHistoryRequest struct { +// Page of team members' statistics and corresponding page information. +type TeamMembersStatisticsConnection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Party ID to list referee history for. - Referee string `protobuf:"bytes,1,opt,name=referee,proto3" json:"referee,omitempty"` - // Pagination controls. - Pagination *Pagination `protobuf:"bytes,2,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` + // Page of team member data and their corresponding cursors. + Edges []*TeamMemberStatisticsEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` + // Page information that is used for fetching further pages. + PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` } -func (x *ListTeamRefereeHistoryRequest) Reset() { - *x = ListTeamRefereeHistoryRequest{} +func (x *TeamMembersStatisticsConnection) Reset() { + *x = TeamMembersStatisticsConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[357] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[363] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ListTeamRefereeHistoryRequest) String() string { +func (x *TeamMembersStatisticsConnection) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListTeamRefereeHistoryRequest) ProtoMessage() {} +func (*TeamMembersStatisticsConnection) ProtoMessage() {} -func (x *ListTeamRefereeHistoryRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[357] +func (x *TeamMembersStatisticsConnection) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[363] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21838,52 +22416,54 @@ func (x *ListTeamRefereeHistoryRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListTeamRefereeHistoryRequest.ProtoReflect.Descriptor instead. -func (*ListTeamRefereeHistoryRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{357} +// Deprecated: Use TeamMembersStatisticsConnection.ProtoReflect.Descriptor instead. +func (*TeamMembersStatisticsConnection) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{363} } -func (x *ListTeamRefereeHistoryRequest) GetReferee() string { +func (x *TeamMembersStatisticsConnection) GetEdges() []*TeamMemberStatisticsEdge { if x != nil { - return x.Referee + return x.Edges } - return "" + return nil } -func (x *ListTeamRefereeHistoryRequest) GetPagination() *Pagination { +func (x *TeamMembersStatisticsConnection) GetPageInfo() *PageInfo { if x != nil { - return x.Pagination + return x.PageInfo } return nil } -// Response that is sent when listing the referee history for a given team. -type ListTeamRefereeHistoryResponse struct { +// Team member data item with the corresponding cursor. +type TeamMemberStatisticsEdge struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of team referee history data and corresponding page information. - TeamRefereeHistory *TeamRefereeHistoryConnection `protobuf:"bytes,1,opt,name=team_referee_history,json=teamRefereeHistory,proto3" json:"team_referee_history,omitempty"` + // Team member's statistics data. + Node *TeamMemberStatistics `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // Cursor that can be used to fetch further pages. + Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` } -func (x *ListTeamRefereeHistoryResponse) Reset() { - *x = ListTeamRefereeHistoryResponse{} +func (x *TeamMemberStatisticsEdge) Reset() { + *x = TeamMemberStatisticsEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[358] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[364] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ListTeamRefereeHistoryResponse) String() string { +func (x *TeamMemberStatisticsEdge) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListTeamRefereeHistoryResponse) ProtoMessage() {} +func (*TeamMemberStatisticsEdge) ProtoMessage() {} -func (x *ListTeamRefereeHistoryResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[358] +func (x *TeamMemberStatisticsEdge) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[364] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21894,51 +22474,68 @@ func (x *ListTeamRefereeHistoryResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListTeamRefereeHistoryResponse.ProtoReflect.Descriptor instead. -func (*ListTeamRefereeHistoryResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{358} +// Deprecated: Use TeamMemberStatisticsEdge.ProtoReflect.Descriptor instead. +func (*TeamMemberStatisticsEdge) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{364} } -func (x *ListTeamRefereeHistoryResponse) GetTeamRefereeHistory() *TeamRefereeHistoryConnection { +func (x *TeamMemberStatisticsEdge) GetNode() *TeamMemberStatistics { if x != nil { - return x.TeamRefereeHistory + return x.Node } return nil } -// Request that is sent to retrieve fees statistics. -type GetFeesStatsRequest struct { +func (x *TeamMemberStatisticsEdge) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +// Team member's statistics record containing the team member's information. +type TeamMemberStatistics struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Restrict fee statistics to those related for the given market. - MarketId *string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3,oneof" json:"market_id,omitempty"` - // Restrict fee statistics to those related for the given asset. - AssetId *string `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3,oneof" json:"asset_id,omitempty"` - // Epoch to get referral fee statistics for. If not set, the last complete epoch is used. - EpochSeq *uint64 `protobuf:"varint,3,opt,name=epoch_seq,json=epochSeq,proto3,oneof" json:"epoch_seq,omitempty"` - // Restrict fee statistics to those for the given party. - PartyId *string `protobuf:"bytes,4,opt,name=party_id,json=partyId,proto3,oneof" json:"party_id,omitempty"` -} - -func (x *GetFeesStatsRequest) Reset() { - *x = GetFeesStatsRequest{} + // Party ID the statistics are related to. + PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + // Total of volume accumulated over the requested epoch period, expressed in + // quantum value. + TotalQuantumVolume string `protobuf:"bytes,2,opt,name=total_quantum_volume,json=totalQuantumVolume,proto3" json:"total_quantum_volume,omitempty"` + // Total of rewards accumulated over the requested epoch period, expressed in + // quantum value. + TotalQuantumRewards string `protobuf:"bytes,3,opt,name=total_quantum_rewards,json=totalQuantumRewards,proto3" json:"total_quantum_rewards,omitempty"` + // List of rewards over the requested epoch period, expressed in quantum + // value for each epoch. + QuantumRewards []*QuantumRewardsPerEpoch `protobuf:"bytes,4,rep,name=quantum_rewards,json=quantumRewards,proto3" json:"quantum_rewards,omitempty"` + // Total number of games played. + TotalGamesPlayed uint64 `protobuf:"varint,5,opt,name=total_games_played,json=totalGamesPlayed,proto3" json:"total_games_played,omitempty"` + // List of games played over the requested epoch period. + GamesPlayed []string `protobuf:"bytes,6,rep,name=games_played,json=gamesPlayed,proto3" json:"games_played,omitempty"` + // List of volumes over the requested epoch period, expressed in quantum + // value for each epoch. + QuantumVolumes []*QuantumVolumesPerEpoch `protobuf:"bytes,7,rep,name=quantum_volumes,json=quantumVolumes,proto3" json:"quantum_volumes,omitempty"` +} + +func (x *TeamMemberStatistics) Reset() { + *x = TeamMemberStatistics{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[359] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[365] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetFeesStatsRequest) String() string { +func (x *TeamMemberStatistics) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetFeesStatsRequest) ProtoMessage() {} +func (*TeamMemberStatistics) ProtoMessage() {} -func (x *GetFeesStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[359] +func (x *TeamMemberStatistics) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[365] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21949,66 +22546,89 @@ func (x *GetFeesStatsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetFeesStatsRequest.ProtoReflect.Descriptor instead. -func (*GetFeesStatsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{359} +// Deprecated: Use TeamMemberStatistics.ProtoReflect.Descriptor instead. +func (*TeamMemberStatistics) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{365} } -func (x *GetFeesStatsRequest) GetMarketId() string { - if x != nil && x.MarketId != nil { - return *x.MarketId +func (x *TeamMemberStatistics) GetPartyId() string { + if x != nil { + return x.PartyId } return "" } -func (x *GetFeesStatsRequest) GetAssetId() string { - if x != nil && x.AssetId != nil { - return *x.AssetId +func (x *TeamMemberStatistics) GetTotalQuantumVolume() string { + if x != nil { + return x.TotalQuantumVolume } return "" } -func (x *GetFeesStatsRequest) GetEpochSeq() uint64 { - if x != nil && x.EpochSeq != nil { - return *x.EpochSeq +func (x *TeamMemberStatistics) GetTotalQuantumRewards() string { + if x != nil { + return x.TotalQuantumRewards + } + return "" +} + +func (x *TeamMemberStatistics) GetQuantumRewards() []*QuantumRewardsPerEpoch { + if x != nil { + return x.QuantumRewards + } + return nil +} + +func (x *TeamMemberStatistics) GetTotalGamesPlayed() uint64 { + if x != nil { + return x.TotalGamesPlayed } return 0 } -func (x *GetFeesStatsRequest) GetPartyId() string { - if x != nil && x.PartyId != nil { - return *x.PartyId +func (x *TeamMemberStatistics) GetGamesPlayed() []string { + if x != nil { + return x.GamesPlayed } - return "" + return nil } -// Response that is sent when requesting fees statistics. -type GetFeesStatsResponse struct { +func (x *TeamMemberStatistics) GetQuantumVolumes() []*QuantumVolumesPerEpoch { + if x != nil { + return x.QuantumVolumes + } + return nil +} + +// Request that is sent when listing the referees for a given team. +type ListTeamRefereesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Fees statistics for the given request. - FeesStats *v1.FeesStats `protobuf:"bytes,1,opt,name=fees_stats,json=feesStats,proto3" json:"fees_stats,omitempty"` + // Team ID to list referees for. + TeamId string `protobuf:"bytes,1,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` + // Pagination controls. + Pagination *Pagination `protobuf:"bytes,2,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` } -func (x *GetFeesStatsResponse) Reset() { - *x = GetFeesStatsResponse{} +func (x *ListTeamRefereesRequest) Reset() { + *x = ListTeamRefereesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[360] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[366] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetFeesStatsResponse) String() string { +func (x *ListTeamRefereesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetFeesStatsResponse) ProtoMessage() {} +func (*ListTeamRefereesRequest) ProtoMessage() {} -func (x *GetFeesStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[360] +func (x *ListTeamRefereesRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[366] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22019,51 +22639,58 @@ func (x *GetFeesStatsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetFeesStatsResponse.ProtoReflect.Descriptor instead. -func (*GetFeesStatsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{360} +// Deprecated: Use ListTeamRefereesRequest.ProtoReflect.Descriptor instead. +func (*ListTeamRefereesRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{366} } -func (x *GetFeesStatsResponse) GetFeesStats() *v1.FeesStats { +func (x *ListTeamRefereesRequest) GetTeamId() string { if x != nil { - return x.FeesStats + return x.TeamId + } + return "" +} + +func (x *ListTeamRefereesRequest) GetPagination() *Pagination { + if x != nil { + return x.Pagination } return nil } -// Request that is sent to retrieve fees statistics for a given party. -type GetFeesStatsForPartyRequest struct { +// A team's referee info +type TeamReferee struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Restrict fees statistics to those for the given party. - PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` - // Restrict fees statistics to those related to the given asset. - AssetId *string `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3,oneof" json:"asset_id,omitempty"` - // Epoch to filter from (included). If omitted, `to epoch` must not be set. If both omitted, the most recent epoch's data is returned. - FromEpoch *uint64 `protobuf:"varint,3,opt,name=from_epoch,json=fromEpoch,proto3,oneof" json:"from_epoch,omitempty"` - // Epoch to filter to (included). If omitted, the range goes from `from epoch` to the most recent epoch. - ToEpoch *uint64 `protobuf:"varint,4,opt,name=to_epoch,json=toEpoch,proto3,oneof" json:"to_epoch,omitempty"` + // ID of the team the referee joined. + TeamId string `protobuf:"bytes,1,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` + // Party that joined the team. + Referee string `protobuf:"bytes,2,opt,name=referee,proto3" json:"referee,omitempty"` + // Timestamp in Unix nanoseconds when the party joined the team. + JoinedAt int64 `protobuf:"varint,3,opt,name=joined_at,json=joinedAt,proto3" json:"joined_at,omitempty"` + // Epoch at which the party joined the team. + JoinedAtEpoch uint64 `protobuf:"varint,4,opt,name=joined_at_epoch,json=joinedAtEpoch,proto3" json:"joined_at_epoch,omitempty"` } -func (x *GetFeesStatsForPartyRequest) Reset() { - *x = GetFeesStatsForPartyRequest{} +func (x *TeamReferee) Reset() { + *x = TeamReferee{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[361] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[367] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetFeesStatsForPartyRequest) String() string { +func (x *TeamReferee) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetFeesStatsForPartyRequest) ProtoMessage() {} +func (*TeamReferee) ProtoMessage() {} -func (x *GetFeesStatsForPartyRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[361] +func (x *TeamReferee) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[367] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22074,66 +22701,68 @@ func (x *GetFeesStatsForPartyRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetFeesStatsForPartyRequest.ProtoReflect.Descriptor instead. -func (*GetFeesStatsForPartyRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{361} +// Deprecated: Use TeamReferee.ProtoReflect.Descriptor instead. +func (*TeamReferee) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{367} } -func (x *GetFeesStatsForPartyRequest) GetPartyId() string { +func (x *TeamReferee) GetTeamId() string { if x != nil { - return x.PartyId + return x.TeamId } return "" } -func (x *GetFeesStatsForPartyRequest) GetAssetId() string { - if x != nil && x.AssetId != nil { - return *x.AssetId +func (x *TeamReferee) GetReferee() string { + if x != nil { + return x.Referee } return "" } -func (x *GetFeesStatsForPartyRequest) GetFromEpoch() uint64 { - if x != nil && x.FromEpoch != nil { - return *x.FromEpoch +func (x *TeamReferee) GetJoinedAt() int64 { + if x != nil { + return x.JoinedAt } return 0 } -func (x *GetFeesStatsForPartyRequest) GetToEpoch() uint64 { - if x != nil && x.ToEpoch != nil { - return *x.ToEpoch +func (x *TeamReferee) GetJoinedAtEpoch() uint64 { + if x != nil { + return x.JoinedAtEpoch } return 0 } -// Response that is sent when requesting fees statistics for a given party. -type GetFeesStatsForPartyResponse struct { +// Team referee data item with the corresponding cursor. +type TeamRefereeEdge struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Fees statistics for the given request. - FeesStatsForParty []*FeesStatsForParty `protobuf:"bytes,1,rep,name=fees_stats_for_party,json=feesStatsForParty,proto3" json:"fees_stats_for_party,omitempty"` + // Team referee data. + Node *TeamReferee `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // Cursor that can be used to fetch further pages. + Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` } -func (x *GetFeesStatsForPartyResponse) Reset() { - *x = GetFeesStatsForPartyResponse{} +func (x *TeamRefereeEdge) Reset() { + *x = TeamRefereeEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[362] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[368] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetFeesStatsForPartyResponse) String() string { +func (x *TeamRefereeEdge) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetFeesStatsForPartyResponse) ProtoMessage() {} +func (*TeamRefereeEdge) ProtoMessage() {} -func (x *GetFeesStatsForPartyResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[362] +func (x *TeamRefereeEdge) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[368] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22144,42 +22773,54 @@ func (x *GetFeesStatsForPartyResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetFeesStatsForPartyResponse.ProtoReflect.Descriptor instead. -func (*GetFeesStatsForPartyResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{362} +// Deprecated: Use TeamRefereeEdge.ProtoReflect.Descriptor instead. +func (*TeamRefereeEdge) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{368} } -func (x *GetFeesStatsForPartyResponse) GetFeesStatsForParty() []*FeesStatsForParty { +func (x *TeamRefereeEdge) GetNode() *TeamReferee { if x != nil { - return x.FeesStatsForParty + return x.Node } return nil } -// Request to get the current referral program -type GetCurrentVolumeDiscountProgramRequest struct { +func (x *TeamRefereeEdge) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +// Page of team referee data and corresponding page information. +type TeamRefereeConnection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Page of team referee data and their corresponding cursors. + Edges []*TeamRefereeEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` + // Page information that is used for fetching further pages. + PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` } -func (x *GetCurrentVolumeDiscountProgramRequest) Reset() { - *x = GetCurrentVolumeDiscountProgramRequest{} +func (x *TeamRefereeConnection) Reset() { + *x = TeamRefereeConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[363] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[369] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetCurrentVolumeDiscountProgramRequest) String() string { +func (x *TeamRefereeConnection) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetCurrentVolumeDiscountProgramRequest) ProtoMessage() {} +func (*TeamRefereeConnection) ProtoMessage() {} -func (x *GetCurrentVolumeDiscountProgramRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[363] +func (x *TeamRefereeConnection) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[369] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22190,38 +22831,52 @@ func (x *GetCurrentVolumeDiscountProgramRequest) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use GetCurrentVolumeDiscountProgramRequest.ProtoReflect.Descriptor instead. -func (*GetCurrentVolumeDiscountProgramRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{363} +// Deprecated: Use TeamRefereeConnection.ProtoReflect.Descriptor instead. +func (*TeamRefereeConnection) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{369} } -// Response containing the current referral program -type GetCurrentVolumeDiscountProgramResponse struct { +func (x *TeamRefereeConnection) GetEdges() []*TeamRefereeEdge { + if x != nil { + return x.Edges + } + return nil +} + +func (x *TeamRefereeConnection) GetPageInfo() *PageInfo { + if x != nil { + return x.PageInfo + } + return nil +} + +// Response that is sent when listing the referees for a given team. +type ListTeamRefereesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Volume discount program currently activated on the network. - CurrentVolumeDiscountProgram *VolumeDiscountProgram `protobuf:"bytes,1,opt,name=current_volume_discount_program,json=currentVolumeDiscountProgram,proto3" json:"current_volume_discount_program,omitempty"` + // Page of team referee data and corresponding page information. + TeamReferees *TeamRefereeConnection `protobuf:"bytes,1,opt,name=team_referees,json=teamReferees,proto3" json:"team_referees,omitempty"` } -func (x *GetCurrentVolumeDiscountProgramResponse) Reset() { - *x = GetCurrentVolumeDiscountProgramResponse{} +func (x *ListTeamRefereesResponse) Reset() { + *x = ListTeamRefereesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[364] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[370] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetCurrentVolumeDiscountProgramResponse) String() string { +func (x *ListTeamRefereesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetCurrentVolumeDiscountProgramResponse) ProtoMessage() {} +func (*ListTeamRefereesResponse) ProtoMessage() {} -func (x *GetCurrentVolumeDiscountProgramResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[364] +func (x *ListTeamRefereesResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[370] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22232,49 +22887,49 @@ func (x *GetCurrentVolumeDiscountProgramResponse) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use GetCurrentVolumeDiscountProgramResponse.ProtoReflect.Descriptor instead. -func (*GetCurrentVolumeDiscountProgramResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{364} +// Deprecated: Use ListTeamRefereesResponse.ProtoReflect.Descriptor instead. +func (*ListTeamRefereesResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{370} } -func (x *GetCurrentVolumeDiscountProgramResponse) GetCurrentVolumeDiscountProgram() *VolumeDiscountProgram { +func (x *ListTeamRefereesResponse) GetTeamReferees() *TeamRefereeConnection { if x != nil { - return x.CurrentVolumeDiscountProgram + return x.TeamReferees } return nil } -// Request to get the volume discount statistics for a given epoch. -type GetVolumeDiscountStatsRequest struct { +// A referee's team change information +type TeamRefereeHistory struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Epoch to get volume discount statistics for. If not set, last epoch is used. - AtEpoch *uint64 `protobuf:"varint,1,opt,name=at_epoch,json=atEpoch,proto3,oneof" json:"at_epoch,omitempty"` - // Restrict volume discount statistics to those for the given party. - PartyId *string `protobuf:"bytes,2,opt,name=party_id,json=partyId,proto3,oneof" json:"party_id,omitempty"` - // Pagination controls. - Pagination *Pagination `protobuf:"bytes,3,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` + // ID of the team the referee joined. + TeamId string `protobuf:"bytes,1,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` + // Timestamp in Unix nanoseconds when the party joined the team. + JoinedAt int64 `protobuf:"varint,2,opt,name=joined_at,json=joinedAt,proto3" json:"joined_at,omitempty"` + // Epoch at which the party joined the team. + JoinedAtEpoch uint64 `protobuf:"varint,3,opt,name=joined_at_epoch,json=joinedAtEpoch,proto3" json:"joined_at_epoch,omitempty"` } -func (x *GetVolumeDiscountStatsRequest) Reset() { - *x = GetVolumeDiscountStatsRequest{} +func (x *TeamRefereeHistory) Reset() { + *x = TeamRefereeHistory{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[365] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[371] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetVolumeDiscountStatsRequest) String() string { +func (x *TeamRefereeHistory) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetVolumeDiscountStatsRequest) ProtoMessage() {} +func (*TeamRefereeHistory) ProtoMessage() {} -func (x *GetVolumeDiscountStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[365] +func (x *TeamRefereeHistory) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[371] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22285,59 +22940,61 @@ func (x *GetVolumeDiscountStatsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetVolumeDiscountStatsRequest.ProtoReflect.Descriptor instead. -func (*GetVolumeDiscountStatsRequest) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{365} +// Deprecated: Use TeamRefereeHistory.ProtoReflect.Descriptor instead. +func (*TeamRefereeHistory) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{371} } -func (x *GetVolumeDiscountStatsRequest) GetAtEpoch() uint64 { - if x != nil && x.AtEpoch != nil { - return *x.AtEpoch +func (x *TeamRefereeHistory) GetTeamId() string { + if x != nil { + return x.TeamId } - return 0 + return "" } -func (x *GetVolumeDiscountStatsRequest) GetPartyId() string { - if x != nil && x.PartyId != nil { - return *x.PartyId +func (x *TeamRefereeHistory) GetJoinedAt() int64 { + if x != nil { + return x.JoinedAt } - return "" + return 0 } -func (x *GetVolumeDiscountStatsRequest) GetPagination() *Pagination { +func (x *TeamRefereeHistory) GetJoinedAtEpoch() uint64 { if x != nil { - return x.Pagination + return x.JoinedAtEpoch } - return nil + return 0 } -// Response containing the volume discount statistics for the given epoch. -type GetVolumeDiscountStatsResponse struct { +// Team referee history data item with the corresponding cursor. +type TeamRefereeHistoryEdge struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Volume discount statistics for an epoch. - Stats *VolumeDiscountStatsConnection `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"` + // Team referee data. + Node *TeamRefereeHistory `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // Cursor that can be used to fetch further pages. + Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` } -func (x *GetVolumeDiscountStatsResponse) Reset() { - *x = GetVolumeDiscountStatsResponse{} +func (x *TeamRefereeHistoryEdge) Reset() { + *x = TeamRefereeHistoryEdge{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[366] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[372] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetVolumeDiscountStatsResponse) String() string { +func (x *TeamRefereeHistoryEdge) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetVolumeDiscountStatsResponse) ProtoMessage() {} +func (*TeamRefereeHistoryEdge) ProtoMessage() {} -func (x *GetVolumeDiscountStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[366] +func (x *TeamRefereeHistoryEdge) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[372] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22348,47 +23005,54 @@ func (x *GetVolumeDiscountStatsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetVolumeDiscountStatsResponse.ProtoReflect.Descriptor instead. -func (*GetVolumeDiscountStatsResponse) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{366} +// Deprecated: Use TeamRefereeHistoryEdge.ProtoReflect.Descriptor instead. +func (*TeamRefereeHistoryEdge) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{372} } -func (x *GetVolumeDiscountStatsResponse) GetStats() *VolumeDiscountStatsConnection { +func (x *TeamRefereeHistoryEdge) GetNode() *TeamRefereeHistory { if x != nil { - return x.Stats + return x.Node } return nil } -// Page of volume discount stats data and corresponding page information. -type VolumeDiscountStatsConnection struct { +func (x *TeamRefereeHistoryEdge) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +// Page of history data about a referee's team membership and corresponding page information. +type TeamRefereeHistoryConnection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Page of volume discount statistics data and their corresponding cursors. - Edges []*VolumeDiscountStatsEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` + // Page of team referee history data and their corresponding cursors. + Edges []*TeamRefereeHistoryEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` // Page information that is used for fetching further pages. PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` } -func (x *VolumeDiscountStatsConnection) Reset() { - *x = VolumeDiscountStatsConnection{} +func (x *TeamRefereeHistoryConnection) Reset() { + *x = TeamRefereeHistoryConnection{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[367] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[373] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VolumeDiscountStatsConnection) String() string { +func (x *TeamRefereeHistoryConnection) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VolumeDiscountStatsConnection) ProtoMessage() {} +func (*TeamRefereeHistoryConnection) ProtoMessage() {} -func (x *VolumeDiscountStatsConnection) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[367] +func (x *TeamRefereeHistoryConnection) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[373] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22399,54 +23063,54 @@ func (x *VolumeDiscountStatsConnection) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use VolumeDiscountStatsConnection.ProtoReflect.Descriptor instead. -func (*VolumeDiscountStatsConnection) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{367} +// Deprecated: Use TeamRefereeHistoryConnection.ProtoReflect.Descriptor instead. +func (*TeamRefereeHistoryConnection) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{373} } -func (x *VolumeDiscountStatsConnection) GetEdges() []*VolumeDiscountStatsEdge { +func (x *TeamRefereeHistoryConnection) GetEdges() []*TeamRefereeHistoryEdge { if x != nil { return x.Edges } return nil } -func (x *VolumeDiscountStatsConnection) GetPageInfo() *PageInfo { +func (x *TeamRefereeHistoryConnection) GetPageInfo() *PageInfo { if x != nil { return x.PageInfo } return nil } -// Volume discount stats data with the corresponding cursor. -type VolumeDiscountStatsEdge struct { +// Request that is sent when listing the referee history for a given team. +type ListTeamRefereeHistoryRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Volume discount stats data. - Node *VolumeDiscountStats `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // Cursor that can be used to fetch further pages. - Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` + // Party ID to list referee history for. + Referee string `protobuf:"bytes,1,opt,name=referee,proto3" json:"referee,omitempty"` + // Pagination controls. + Pagination *Pagination `protobuf:"bytes,2,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` } -func (x *VolumeDiscountStatsEdge) Reset() { - *x = VolumeDiscountStatsEdge{} +func (x *ListTeamRefereeHistoryRequest) Reset() { + *x = ListTeamRefereeHistoryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[368] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[374] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VolumeDiscountStatsEdge) String() string { +func (x *ListTeamRefereeHistoryRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VolumeDiscountStatsEdge) ProtoMessage() {} +func (*ListTeamRefereeHistoryRequest) ProtoMessage() {} -func (x *VolumeDiscountStatsEdge) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[368] +func (x *ListTeamRefereeHistoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[374] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22457,58 +23121,52 @@ func (x *VolumeDiscountStatsEdge) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use VolumeDiscountStatsEdge.ProtoReflect.Descriptor instead. -func (*VolumeDiscountStatsEdge) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{368} +// Deprecated: Use ListTeamRefereeHistoryRequest.ProtoReflect.Descriptor instead. +func (*ListTeamRefereeHistoryRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{374} } -func (x *VolumeDiscountStatsEdge) GetNode() *VolumeDiscountStats { +func (x *ListTeamRefereeHistoryRequest) GetReferee() string { if x != nil { - return x.Node + return x.Referee } - return nil + return "" } -func (x *VolumeDiscountStatsEdge) GetCursor() string { +func (x *ListTeamRefereeHistoryRequest) GetPagination() *Pagination { if x != nil { - return x.Cursor + return x.Pagination } - return "" + return nil } -// Volume discount statistics for a given epoch for all parties. -type VolumeDiscountStats struct { +// Response that is sent when listing the referee history for a given team. +type ListTeamRefereeHistoryResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Epoch at which the statistics apply. - AtEpoch uint64 `protobuf:"varint,1,opt,name=at_epoch,json=atEpoch,proto3" json:"at_epoch,omitempty"` - // Party ID for which the statistics apply. - PartyId string `protobuf:"bytes,2,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` - // Discount factor applied given the party's running volume. - DiscountFactor string `protobuf:"bytes,3,opt,name=discount_factor,json=discountFactor,proto3" json:"discount_factor,omitempty"` - // The party's running volume. - RunningVolume string `protobuf:"bytes,4,opt,name=running_volume,json=runningVolume,proto3" json:"running_volume,omitempty"` + // Page of team referee history data and corresponding page information. + TeamRefereeHistory *TeamRefereeHistoryConnection `protobuf:"bytes,1,opt,name=team_referee_history,json=teamRefereeHistory,proto3" json:"team_referee_history,omitempty"` } -func (x *VolumeDiscountStats) Reset() { - *x = VolumeDiscountStats{} +func (x *ListTeamRefereeHistoryResponse) Reset() { + *x = ListTeamRefereeHistoryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[369] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[375] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VolumeDiscountStats) String() string { +func (x *ListTeamRefereeHistoryResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VolumeDiscountStats) ProtoMessage() {} +func (*ListTeamRefereeHistoryResponse) ProtoMessage() {} -func (x *VolumeDiscountStats) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[369] +func (x *ListTeamRefereeHistoryResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[375] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22519,79 +23177,51 @@ func (x *VolumeDiscountStats) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use VolumeDiscountStats.ProtoReflect.Descriptor instead. -func (*VolumeDiscountStats) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{369} -} - -func (x *VolumeDiscountStats) GetAtEpoch() uint64 { - if x != nil { - return x.AtEpoch - } - return 0 -} - -func (x *VolumeDiscountStats) GetPartyId() string { - if x != nil { - return x.PartyId - } - return "" -} - -func (x *VolumeDiscountStats) GetDiscountFactor() string { - if x != nil { - return x.DiscountFactor - } - return "" +// Deprecated: Use ListTeamRefereeHistoryResponse.ProtoReflect.Descriptor instead. +func (*ListTeamRefereeHistoryResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{375} } -func (x *VolumeDiscountStats) GetRunningVolume() string { +func (x *ListTeamRefereeHistoryResponse) GetTeamRefereeHistory() *TeamRefereeHistoryConnection { if x != nil { - return x.RunningVolume + return x.TeamRefereeHistory } - return "" + return nil } -// Volume discount program details. -type VolumeDiscountProgram struct { +// Request that is sent to retrieve fees statistics. +type GetFeesStatsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Incremental version of the program. It is incremented after each program - // update. - Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - // Unique ID generated from the proposal that created this program. - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - // Defined benefit tiers ordered by increasing discounts. Determines the level of - // benefit a party can expect based on performance criteria. - BenefitTiers []*vega.VolumeBenefitTier `protobuf:"bytes,3,rep,name=benefit_tiers,json=benefitTiers,proto3" json:"benefit_tiers,omitempty"` - // Timestamp in Unix nanoseconds, after which when the current epoch - // ends, the program will end and benefits will be disabled. - EndOfProgramTimestamp int64 `protobuf:"varint,4,opt,name=end_of_program_timestamp,json=endOfProgramTimestamp,proto3" json:"end_of_program_timestamp,omitempty"` - // Number of epochs over which a volume discount statistics' running volume is evaluated. - WindowLength uint64 `protobuf:"varint,5,opt,name=window_length,json=windowLength,proto3" json:"window_length,omitempty"` - // Timestamp in Unix nanoseconds, at which the program ended. - EndedAt *int64 `protobuf:"varint,6,opt,name=ended_at,json=endedAt,proto3,oneof" json:"ended_at,omitempty"` + // Restrict fee statistics to those related for the given market. + MarketId *string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3,oneof" json:"market_id,omitempty"` + // Restrict fee statistics to those related for the given asset. + AssetId *string `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3,oneof" json:"asset_id,omitempty"` + // Epoch to get referral fee statistics for. If not set, the last complete epoch is used. + EpochSeq *uint64 `protobuf:"varint,3,opt,name=epoch_seq,json=epochSeq,proto3,oneof" json:"epoch_seq,omitempty"` + // Restrict fee statistics to those for the given party. + PartyId *string `protobuf:"bytes,4,opt,name=party_id,json=partyId,proto3,oneof" json:"party_id,omitempty"` } -func (x *VolumeDiscountProgram) Reset() { - *x = VolumeDiscountProgram{} +func (x *GetFeesStatsRequest) Reset() { + *x = GetFeesStatsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[370] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[376] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VolumeDiscountProgram) String() string { +func (x *GetFeesStatsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VolumeDiscountProgram) ProtoMessage() {} +func (*GetFeesStatsRequest) ProtoMessage() {} -func (x *VolumeDiscountProgram) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[370] +func (x *GetFeesStatsRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[376] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22602,87 +23232,66 @@ func (x *VolumeDiscountProgram) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use VolumeDiscountProgram.ProtoReflect.Descriptor instead. -func (*VolumeDiscountProgram) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{370} -} - -func (x *VolumeDiscountProgram) GetVersion() uint64 { - if x != nil { - return x.Version - } - return 0 +// Deprecated: Use GetFeesStatsRequest.ProtoReflect.Descriptor instead. +func (*GetFeesStatsRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{376} } -func (x *VolumeDiscountProgram) GetId() string { - if x != nil { - return x.Id +func (x *GetFeesStatsRequest) GetMarketId() string { + if x != nil && x.MarketId != nil { + return *x.MarketId } return "" } -func (x *VolumeDiscountProgram) GetBenefitTiers() []*vega.VolumeBenefitTier { - if x != nil { - return x.BenefitTiers - } - return nil -} - -func (x *VolumeDiscountProgram) GetEndOfProgramTimestamp() int64 { - if x != nil { - return x.EndOfProgramTimestamp +func (x *GetFeesStatsRequest) GetAssetId() string { + if x != nil && x.AssetId != nil { + return *x.AssetId } - return 0 + return "" } -func (x *VolumeDiscountProgram) GetWindowLength() uint64 { - if x != nil { - return x.WindowLength +func (x *GetFeesStatsRequest) GetEpochSeq() uint64 { + if x != nil && x.EpochSeq != nil { + return *x.EpochSeq } return 0 } -func (x *VolumeDiscountProgram) GetEndedAt() int64 { - if x != nil && x.EndedAt != nil { - return *x.EndedAt +func (x *GetFeesStatsRequest) GetPartyId() string { + if x != nil && x.PartyId != nil { + return *x.PartyId } - return 0 + return "" } -type FeesStatsForParty struct { +// Response that is sent when requesting fees statistics. +type GetFeesStatsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Settlement asset of the market. - AssetId string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` - // Total referral rewards received by referrer of the referral set. - TotalRewardsReceived string `protobuf:"bytes,2,opt,name=total_rewards_received,json=totalRewardsReceived,proto3" json:"total_rewards_received,omitempty"` - // Total referral discounts applied to referee fees. - RefereesDiscountApplied string `protobuf:"bytes,3,opt,name=referees_discount_applied,json=refereesDiscountApplied,proto3" json:"referees_discount_applied,omitempty"` - // Total volume discounts applied to referee fees. - VolumeDiscountApplied string `protobuf:"bytes,4,opt,name=volume_discount_applied,json=volumeDiscountApplied,proto3" json:"volume_discount_applied,omitempty"` - // Total maker fees received by the maker side. - TotalMakerFeesReceived string `protobuf:"bytes,5,opt,name=total_maker_fees_received,json=totalMakerFeesReceived,proto3" json:"total_maker_fees_received,omitempty"` + // Fees statistics for the given request. + FeesStats *v1.FeesStats `protobuf:"bytes,1,opt,name=fees_stats,json=feesStats,proto3" json:"fees_stats,omitempty"` } -func (x *FeesStatsForParty) Reset() { - *x = FeesStatsForParty{} +func (x *GetFeesStatsResponse) Reset() { + *x = GetFeesStatsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[371] + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[377] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FeesStatsForParty) String() string { +func (x *GetFeesStatsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FeesStatsForParty) ProtoMessage() {} +func (*GetFeesStatsResponse) ProtoMessage() {} -func (x *FeesStatsForParty) ProtoReflect() protoreflect.Message { - mi := &file_data_node_api_v2_trading_data_proto_msgTypes[371] +func (x *GetFeesStatsResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[377] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22693,95 +23302,2225 @@ func (x *FeesStatsForParty) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FeesStatsForParty.ProtoReflect.Descriptor instead. -func (*FeesStatsForParty) Descriptor() ([]byte, []int) { - return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{371} +// Deprecated: Use GetFeesStatsResponse.ProtoReflect.Descriptor instead. +func (*GetFeesStatsResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{377} } -func (x *FeesStatsForParty) GetAssetId() string { +func (x *GetFeesStatsResponse) GetFeesStats() *v1.FeesStats { if x != nil { - return x.AssetId + return x.FeesStats } - return "" + return nil } -func (x *FeesStatsForParty) GetTotalRewardsReceived() string { +// Request that is sent to retrieve fees statistics for a given party. +type GetFeesStatsForPartyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Restrict fees statistics to those for the given party. + PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + // Restrict fees statistics to those related to the given asset. + AssetId *string `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3,oneof" json:"asset_id,omitempty"` + // Epoch to filter from (included). If omitted, the range goes from the oldest epoch to the `to epoch`. + FromEpoch *uint64 `protobuf:"varint,3,opt,name=from_epoch,json=fromEpoch,proto3,oneof" json:"from_epoch,omitempty"` + // Epoch to filter to (included). If omitted, the range goes from `from epoch` to the most recent epoch. + ToEpoch *uint64 `protobuf:"varint,4,opt,name=to_epoch,json=toEpoch,proto3,oneof" json:"to_epoch,omitempty"` +} + +func (x *GetFeesStatsForPartyRequest) Reset() { + *x = GetFeesStatsForPartyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[378] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFeesStatsForPartyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFeesStatsForPartyRequest) ProtoMessage() {} + +func (x *GetFeesStatsForPartyRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[378] + 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 GetFeesStatsForPartyRequest.ProtoReflect.Descriptor instead. +func (*GetFeesStatsForPartyRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{378} +} + +func (x *GetFeesStatsForPartyRequest) GetPartyId() string { if x != nil { - return x.TotalRewardsReceived + return x.PartyId } return "" } -func (x *FeesStatsForParty) GetRefereesDiscountApplied() string { - if x != nil { - return x.RefereesDiscountApplied +func (x *GetFeesStatsForPartyRequest) GetAssetId() string { + if x != nil && x.AssetId != nil { + return *x.AssetId } return "" } -func (x *FeesStatsForParty) GetVolumeDiscountApplied() string { +func (x *GetFeesStatsForPartyRequest) GetFromEpoch() uint64 { + if x != nil && x.FromEpoch != nil { + return *x.FromEpoch + } + return 0 +} + +func (x *GetFeesStatsForPartyRequest) GetToEpoch() uint64 { + if x != nil && x.ToEpoch != nil { + return *x.ToEpoch + } + return 0 +} + +// Response that is sent when requesting fees statistics for a given party. +type GetFeesStatsForPartyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Fees statistics for the given request. + FeesStatsForParty []*FeesStatsForParty `protobuf:"bytes,1,rep,name=fees_stats_for_party,json=feesStatsForParty,proto3" json:"fees_stats_for_party,omitempty"` +} + +func (x *GetFeesStatsForPartyResponse) Reset() { + *x = GetFeesStatsForPartyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[379] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFeesStatsForPartyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFeesStatsForPartyResponse) ProtoMessage() {} + +func (x *GetFeesStatsForPartyResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[379] + 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 GetFeesStatsForPartyResponse.ProtoReflect.Descriptor instead. +func (*GetFeesStatsForPartyResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{379} +} + +func (x *GetFeesStatsForPartyResponse) GetFeesStatsForParty() []*FeesStatsForParty { if x != nil { - return x.VolumeDiscountApplied + return x.FeesStatsForParty } - return "" + return nil } -func (x *FeesStatsForParty) GetTotalMakerFeesReceived() string { +// Request to get the current referral program +type GetCurrentVolumeDiscountProgramRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetCurrentVolumeDiscountProgramRequest) Reset() { + *x = GetCurrentVolumeDiscountProgramRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[380] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCurrentVolumeDiscountProgramRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCurrentVolumeDiscountProgramRequest) ProtoMessage() {} + +func (x *GetCurrentVolumeDiscountProgramRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[380] + 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 GetCurrentVolumeDiscountProgramRequest.ProtoReflect.Descriptor instead. +func (*GetCurrentVolumeDiscountProgramRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{380} +} + +// Response containing the current referral program +type GetCurrentVolumeDiscountProgramResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume discount program currently activated on the network. + CurrentVolumeDiscountProgram *VolumeDiscountProgram `protobuf:"bytes,1,opt,name=current_volume_discount_program,json=currentVolumeDiscountProgram,proto3" json:"current_volume_discount_program,omitempty"` +} + +func (x *GetCurrentVolumeDiscountProgramResponse) Reset() { + *x = GetCurrentVolumeDiscountProgramResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[381] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCurrentVolumeDiscountProgramResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCurrentVolumeDiscountProgramResponse) ProtoMessage() {} + +func (x *GetCurrentVolumeDiscountProgramResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[381] + 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 GetCurrentVolumeDiscountProgramResponse.ProtoReflect.Descriptor instead. +func (*GetCurrentVolumeDiscountProgramResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{381} +} + +func (x *GetCurrentVolumeDiscountProgramResponse) GetCurrentVolumeDiscountProgram() *VolumeDiscountProgram { if x != nil { - return x.TotalMakerFeesReceived + return x.CurrentVolumeDiscountProgram } - return "" + return nil } -var File_data_node_api_v2_trading_data_proto protoreflect.FileDescriptor +// Request to get the volume discount statistics for a given epoch. +type GetVolumeDiscountStatsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -var file_data_node_api_v2_trading_data_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x32, 0x2f, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x11, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1b, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, - 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x76, - 0x65, 0x67, 0x61, 0x2f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x6f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x76, 0x65, 0x67, - 0x61, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x01, 0x0a, - 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x05, 0x66, - 0x69, 0x72, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x05, 0x66, 0x69, - 0x72, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x88, 0x01, - 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, - 0x02, 0x52, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x62, 0x65, - 0x66, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x06, 0x62, 0x65, - 0x66, 0x6f, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x65, 0x73, - 0x74, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, - 0x0b, 0x6e, 0x65, 0x77, 0x65, 0x73, 0x74, 0x46, 0x69, 0x72, 0x73, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x66, - 0x74, 0x65, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6e, 0x65, 0x77, 0x65, - 0x73, 0x74, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x08, 0x50, 0x61, 0x67, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6e, 0x65, 0x78, - 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, - 0x73, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x68, 0x61, 0x73, - 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x61, 0x73, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, - 0x73, 0x50, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x63, - 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x5f, - 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, - 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x3e, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x50, 0x61, - 0x72, 0x74, 0x79, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, + // Epoch to get volume discount statistics for. If not set, last epoch is used. + AtEpoch *uint64 `protobuf:"varint,1,opt,name=at_epoch,json=atEpoch,proto3,oneof" json:"at_epoch,omitempty"` + // Restrict volume discount statistics to those for the given party. + PartyId *string `protobuf:"bytes,2,opt,name=party_id,json=partyId,proto3,oneof" json:"party_id,omitempty"` + // Pagination controls. + Pagination *Pagination `protobuf:"bytes,3,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` +} + +func (x *GetVolumeDiscountStatsRequest) Reset() { + *x = GetVolumeDiscountStatsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[382] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVolumeDiscountStatsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVolumeDiscountStatsRequest) ProtoMessage() {} + +func (x *GetVolumeDiscountStatsRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[382] + 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 GetVolumeDiscountStatsRequest.ProtoReflect.Descriptor instead. +func (*GetVolumeDiscountStatsRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{382} +} + +func (x *GetVolumeDiscountStatsRequest) GetAtEpoch() uint64 { + if x != nil && x.AtEpoch != nil { + return *x.AtEpoch + } + return 0 +} + +func (x *GetVolumeDiscountStatsRequest) GetPartyId() string { + if x != nil && x.PartyId != nil { + return *x.PartyId + } + return "" +} + +func (x *GetVolumeDiscountStatsRequest) GetPagination() *Pagination { + if x != nil { + return x.Pagination + } + return nil +} + +// Response containing the volume discount statistics for the given epoch. +type GetVolumeDiscountStatsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume discount statistics for an epoch. + Stats *VolumeDiscountStatsConnection `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"` +} + +func (x *GetVolumeDiscountStatsResponse) Reset() { + *x = GetVolumeDiscountStatsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[383] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVolumeDiscountStatsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVolumeDiscountStatsResponse) ProtoMessage() {} + +func (x *GetVolumeDiscountStatsResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[383] + 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 GetVolumeDiscountStatsResponse.ProtoReflect.Descriptor instead. +func (*GetVolumeDiscountStatsResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{383} +} + +func (x *GetVolumeDiscountStatsResponse) GetStats() *VolumeDiscountStatsConnection { + if x != nil { + return x.Stats + } + return nil +} + +// Page of volume discount stats data and corresponding page information. +type VolumeDiscountStatsConnection struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Page of volume discount statistics data and their corresponding cursors. + Edges []*VolumeDiscountStatsEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` + // Page information that is used for fetching further pages. + PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` +} + +func (x *VolumeDiscountStatsConnection) Reset() { + *x = VolumeDiscountStatsConnection{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[384] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VolumeDiscountStatsConnection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeDiscountStatsConnection) ProtoMessage() {} + +func (x *VolumeDiscountStatsConnection) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[384] + 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 VolumeDiscountStatsConnection.ProtoReflect.Descriptor instead. +func (*VolumeDiscountStatsConnection) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{384} +} + +func (x *VolumeDiscountStatsConnection) GetEdges() []*VolumeDiscountStatsEdge { + if x != nil { + return x.Edges + } + return nil +} + +func (x *VolumeDiscountStatsConnection) GetPageInfo() *PageInfo { + if x != nil { + return x.PageInfo + } + return nil +} + +// Volume discount stats data with the corresponding cursor. +type VolumeDiscountStatsEdge struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume discount stats data. + Node *VolumeDiscountStats `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // Cursor that can be used to fetch further pages. + Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` +} + +func (x *VolumeDiscountStatsEdge) Reset() { + *x = VolumeDiscountStatsEdge{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[385] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VolumeDiscountStatsEdge) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeDiscountStatsEdge) ProtoMessage() {} + +func (x *VolumeDiscountStatsEdge) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[385] + 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 VolumeDiscountStatsEdge.ProtoReflect.Descriptor instead. +func (*VolumeDiscountStatsEdge) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{385} +} + +func (x *VolumeDiscountStatsEdge) GetNode() *VolumeDiscountStats { + if x != nil { + return x.Node + } + return nil +} + +func (x *VolumeDiscountStatsEdge) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +// Volume discount statistics for a given epoch for all parties. +type VolumeDiscountStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Epoch at which the statistics apply. + AtEpoch uint64 `protobuf:"varint,1,opt,name=at_epoch,json=atEpoch,proto3" json:"at_epoch,omitempty"` + // Party ID for which the statistics apply. + PartyId string `protobuf:"bytes,2,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + // Discount factor applied given the party's running volume. + DiscountFactor string `protobuf:"bytes,3,opt,name=discount_factor,json=discountFactor,proto3" json:"discount_factor,omitempty"` + // The party's running volume. + RunningVolume string `protobuf:"bytes,4,opt,name=running_volume,json=runningVolume,proto3" json:"running_volume,omitempty"` +} + +func (x *VolumeDiscountStats) Reset() { + *x = VolumeDiscountStats{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[386] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VolumeDiscountStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeDiscountStats) ProtoMessage() {} + +func (x *VolumeDiscountStats) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[386] + 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 VolumeDiscountStats.ProtoReflect.Descriptor instead. +func (*VolumeDiscountStats) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{386} +} + +func (x *VolumeDiscountStats) GetAtEpoch() uint64 { + if x != nil { + return x.AtEpoch + } + return 0 +} + +func (x *VolumeDiscountStats) GetPartyId() string { + if x != nil { + return x.PartyId + } + return "" +} + +func (x *VolumeDiscountStats) GetDiscountFactor() string { + if x != nil { + return x.DiscountFactor + } + return "" +} + +func (x *VolumeDiscountStats) GetRunningVolume() string { + if x != nil { + return x.RunningVolume + } + return "" +} + +// Volume discount program details. +type VolumeDiscountProgram struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Incremental version of the program. It is incremented after each program + // update. + Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + // Unique ID generated from the proposal that created this program. + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + // Defined benefit tiers ordered by increasing discounts. Determines the level of + // benefit a party can expect based on performance criteria. + BenefitTiers []*vega.VolumeBenefitTier `protobuf:"bytes,3,rep,name=benefit_tiers,json=benefitTiers,proto3" json:"benefit_tiers,omitempty"` + // Timestamp in Unix nanoseconds, after which when the current epoch + // ends, the program will end and benefits will be disabled. + EndOfProgramTimestamp int64 `protobuf:"varint,4,opt,name=end_of_program_timestamp,json=endOfProgramTimestamp,proto3" json:"end_of_program_timestamp,omitempty"` + // Number of epochs over which a volume discount statistics' running volume is evaluated. + WindowLength uint64 `protobuf:"varint,5,opt,name=window_length,json=windowLength,proto3" json:"window_length,omitempty"` + // Timestamp in Unix nanoseconds, at which the program ended. + EndedAt *int64 `protobuf:"varint,6,opt,name=ended_at,json=endedAt,proto3,oneof" json:"ended_at,omitempty"` +} + +func (x *VolumeDiscountProgram) Reset() { + *x = VolumeDiscountProgram{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[387] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VolumeDiscountProgram) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeDiscountProgram) ProtoMessage() {} + +func (x *VolumeDiscountProgram) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[387] + 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 VolumeDiscountProgram.ProtoReflect.Descriptor instead. +func (*VolumeDiscountProgram) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{387} +} + +func (x *VolumeDiscountProgram) GetVersion() uint64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *VolumeDiscountProgram) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *VolumeDiscountProgram) GetBenefitTiers() []*vega.VolumeBenefitTier { + if x != nil { + return x.BenefitTiers + } + return nil +} + +func (x *VolumeDiscountProgram) GetEndOfProgramTimestamp() int64 { + if x != nil { + return x.EndOfProgramTimestamp + } + return 0 +} + +func (x *VolumeDiscountProgram) GetWindowLength() uint64 { + if x != nil { + return x.WindowLength + } + return 0 +} + +func (x *VolumeDiscountProgram) GetEndedAt() int64 { + if x != nil && x.EndedAt != nil { + return *x.EndedAt + } + return 0 +} + +type FeesStatsForParty struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Settlement asset of the market. + AssetId string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` + // Total referral rewards received by referrer of the referral set. + TotalRewardsReceived string `protobuf:"bytes,2,opt,name=total_rewards_received,json=totalRewardsReceived,proto3" json:"total_rewards_received,omitempty"` + // Total referral discounts applied to referee fees. + RefereesDiscountApplied string `protobuf:"bytes,3,opt,name=referees_discount_applied,json=refereesDiscountApplied,proto3" json:"referees_discount_applied,omitempty"` + // Total volume discounts applied to referee fees. + VolumeDiscountApplied string `protobuf:"bytes,4,opt,name=volume_discount_applied,json=volumeDiscountApplied,proto3" json:"volume_discount_applied,omitempty"` + // Total maker fees received by the maker side. + TotalMakerFeesReceived string `protobuf:"bytes,5,opt,name=total_maker_fees_received,json=totalMakerFeesReceived,proto3" json:"total_maker_fees_received,omitempty"` +} + +func (x *FeesStatsForParty) Reset() { + *x = FeesStatsForParty{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[388] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FeesStatsForParty) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeesStatsForParty) ProtoMessage() {} + +func (x *FeesStatsForParty) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[388] + 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 FeesStatsForParty.ProtoReflect.Descriptor instead. +func (*FeesStatsForParty) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{388} +} + +func (x *FeesStatsForParty) GetAssetId() string { + if x != nil { + return x.AssetId + } + return "" +} + +func (x *FeesStatsForParty) GetTotalRewardsReceived() string { + if x != nil { + return x.TotalRewardsReceived + } + return "" +} + +func (x *FeesStatsForParty) GetRefereesDiscountApplied() string { + if x != nil { + return x.RefereesDiscountApplied + } + return "" +} + +func (x *FeesStatsForParty) GetVolumeDiscountApplied() string { + if x != nil { + return x.VolumeDiscountApplied + } + return "" +} + +func (x *FeesStatsForParty) GetTotalMakerFeesReceived() string { + if x != nil { + return x.TotalMakerFeesReceived + } + return "" +} + +// Request to subscribe to a stream of users' transaction results +type ObserveTransactionResultsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Restrict the transaction results streamed to those made by the given parties. + PartyIds []string `protobuf:"bytes,1,rep,name=party_ids,json=partyIds,proto3" json:"party_ids,omitempty"` + // Restrict the transaction results streamed to those with given hashes. + Hashes []string `protobuf:"bytes,2,rep,name=hashes,proto3" json:"hashes,omitempty"` + // Restrict the transaction results streamed to those with given status true/false (success/failure). + Status *bool `protobuf:"varint,3,opt,name=status,proto3,oneof" json:"status,omitempty"` +} + +func (x *ObserveTransactionResultsRequest) Reset() { + *x = ObserveTransactionResultsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[389] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObserveTransactionResultsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObserveTransactionResultsRequest) ProtoMessage() {} + +func (x *ObserveTransactionResultsRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[389] + 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 ObserveTransactionResultsRequest.ProtoReflect.Descriptor instead. +func (*ObserveTransactionResultsRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{389} +} + +func (x *ObserveTransactionResultsRequest) GetPartyIds() []string { + if x != nil { + return x.PartyIds + } + return nil +} + +func (x *ObserveTransactionResultsRequest) GetHashes() []string { + if x != nil { + return x.Hashes + } + return nil +} + +func (x *ObserveTransactionResultsRequest) GetStatus() bool { + if x != nil && x.Status != nil { + return *x.Status + } + return false +} + +// Stream of transaction results +type ObserveTransactionResultsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of 0 or more transaction results. + TransactionResults []*v1.TransactionResult `protobuf:"bytes,1,rep,name=transaction_results,json=transactionResults,proto3" json:"transaction_results,omitempty"` +} + +func (x *ObserveTransactionResultsResponse) Reset() { + *x = ObserveTransactionResultsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[390] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObserveTransactionResultsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObserveTransactionResultsResponse) ProtoMessage() {} + +func (x *ObserveTransactionResultsResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[390] + 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 ObserveTransactionResultsResponse.ProtoReflect.Descriptor instead. +func (*ObserveTransactionResultsResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{390} +} + +func (x *ObserveTransactionResultsResponse) GetTransactionResults() []*v1.TransactionResult { + if x != nil { + return x.TransactionResults + } + return nil +} + +// Request an estimation of transfer fee and discount +type EstimateTransferFeeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Sender's ID. + FromAccount string `protobuf:"bytes,1,opt,name=from_account,json=fromAccount,proto3" json:"from_account,omitempty"` + // Type of account sent from. + FromAccountType vega.AccountType `protobuf:"varint,2,opt,name=from_account_type,json=fromAccountType,proto3,enum=vega.AccountType" json:"from_account_type,omitempty"` + // Receiver's ID. + ToAccount string `protobuf:"bytes,3,opt,name=to_account,json=toAccount,proto3" json:"to_account,omitempty"` + // Amount to be transferred. + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + // Asset ID for the asset associated with the transaction. + AssetId string `protobuf:"bytes,5,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` +} + +func (x *EstimateTransferFeeRequest) Reset() { + *x = EstimateTransferFeeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[391] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EstimateTransferFeeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EstimateTransferFeeRequest) ProtoMessage() {} + +func (x *EstimateTransferFeeRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[391] + 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 EstimateTransferFeeRequest.ProtoReflect.Descriptor instead. +func (*EstimateTransferFeeRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{391} +} + +func (x *EstimateTransferFeeRequest) GetFromAccount() string { + if x != nil { + return x.FromAccount + } + return "" +} + +func (x *EstimateTransferFeeRequest) GetFromAccountType() vega.AccountType { + if x != nil { + return x.FromAccountType + } + return vega.AccountType(0) +} + +func (x *EstimateTransferFeeRequest) GetToAccount() string { + if x != nil { + return x.ToAccount + } + return "" +} + +func (x *EstimateTransferFeeRequest) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *EstimateTransferFeeRequest) GetAssetId() string { + if x != nil { + return x.AssetId + } + return "" +} + +// Results of estimation of transfer fee and the fee discount +type EstimateTransferFeeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Estimated fee for the transfer. + Fee string `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty"` + // Discount applied to the fee. + Discount string `protobuf:"bytes,2,opt,name=discount,proto3" json:"discount,omitempty"` +} + +func (x *EstimateTransferFeeResponse) Reset() { + *x = EstimateTransferFeeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[392] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EstimateTransferFeeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EstimateTransferFeeResponse) ProtoMessage() {} + +func (x *EstimateTransferFeeResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[392] + 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 EstimateTransferFeeResponse.ProtoReflect.Descriptor instead. +func (*EstimateTransferFeeResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{392} +} + +func (x *EstimateTransferFeeResponse) GetFee() string { + if x != nil { + return x.Fee + } + return "" +} + +func (x *EstimateTransferFeeResponse) GetDiscount() string { + if x != nil { + return x.Discount + } + return "" +} + +// Get total transfer fee discount available +type GetTotalTransferFeeDiscountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of party eligible for the discount. + PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + // ID of asset to associated with the discount. + AssetId string `protobuf:"bytes,5,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` +} + +func (x *GetTotalTransferFeeDiscountRequest) Reset() { + *x = GetTotalTransferFeeDiscountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[393] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTotalTransferFeeDiscountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTotalTransferFeeDiscountRequest) ProtoMessage() {} + +func (x *GetTotalTransferFeeDiscountRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[393] + 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 GetTotalTransferFeeDiscountRequest.ProtoReflect.Descriptor instead. +func (*GetTotalTransferFeeDiscountRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{393} +} + +func (x *GetTotalTransferFeeDiscountRequest) GetPartyId() string { + if x != nil { + return x.PartyId + } + return "" +} + +func (x *GetTotalTransferFeeDiscountRequest) GetAssetId() string { + if x != nil { + return x.AssetId + } + return "" +} + +// Returns total transfer fee discount available +type GetTotalTransferFeeDiscountResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Total per party per asset discount available. + TotalDiscount string `protobuf:"bytes,2,opt,name=total_discount,json=totalDiscount,proto3" json:"total_discount,omitempty"` +} + +func (x *GetTotalTransferFeeDiscountResponse) Reset() { + *x = GetTotalTransferFeeDiscountResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[394] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTotalTransferFeeDiscountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTotalTransferFeeDiscountResponse) ProtoMessage() {} + +func (x *GetTotalTransferFeeDiscountResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[394] + 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 GetTotalTransferFeeDiscountResponse.ProtoReflect.Descriptor instead. +func (*GetTotalTransferFeeDiscountResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{394} +} + +func (x *GetTotalTransferFeeDiscountResponse) GetTotalDiscount() string { + if x != nil { + return x.TotalDiscount + } + return "" +} + +// Request to retrieve games data. +type ListGamesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Game ID to filter for. + GameId *string `protobuf:"bytes,1,opt,name=game_id,json=gameId,proto3,oneof" json:"game_id,omitempty"` + // First epoch to retrieve game data from. If not provided, defaults to the last epoch minus 30, + // or the first epoch available if not enough epochs have passed. + EpochFrom *uint64 `protobuf:"varint,2,opt,name=epoch_from,json=epochFrom,proto3,oneof" json:"epoch_from,omitempty"` + // Last epoch to retrieve game data to (inclusive). If not provided, defaults to the last epoch. + EpochTo *uint64 `protobuf:"varint,3,opt,name=epoch_to,json=epochTo,proto3,oneof" json:"epoch_to,omitempty"` + // Entity scope to filter games for, i.e. team games or individual games only + EntityScope *vega.EntityScope `protobuf:"varint,4,opt,name=entity_scope,json=entityScope,proto3,enum=vega.EntityScope,oneof" json:"entity_scope,omitempty"` + // Pagination controls. + Pagination *Pagination `protobuf:"bytes,5,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` +} + +func (x *ListGamesRequest) Reset() { + *x = ListGamesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[395] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGamesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGamesRequest) ProtoMessage() {} + +func (x *ListGamesRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[395] + 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 ListGamesRequest.ProtoReflect.Descriptor instead. +func (*ListGamesRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{395} +} + +func (x *ListGamesRequest) GetGameId() string { + if x != nil && x.GameId != nil { + return *x.GameId + } + return "" +} + +func (x *ListGamesRequest) GetEpochFrom() uint64 { + if x != nil && x.EpochFrom != nil { + return *x.EpochFrom + } + return 0 +} + +func (x *ListGamesRequest) GetEpochTo() uint64 { + if x != nil && x.EpochTo != nil { + return *x.EpochTo + } + return 0 +} + +func (x *ListGamesRequest) GetEntityScope() vega.EntityScope { + if x != nil && x.EntityScope != nil { + return *x.EntityScope + } + return vega.EntityScope(0) +} + +func (x *ListGamesRequest) GetPagination() *Pagination { + if x != nil { + return x.Pagination + } + return nil +} + +// Response containing games data. +type ListGamesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Page of games data and corresponding page information. + Games *GamesConnection `protobuf:"bytes,1,opt,name=games,proto3" json:"games,omitempty"` +} + +func (x *ListGamesResponse) Reset() { + *x = ListGamesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[396] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGamesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGamesResponse) ProtoMessage() {} + +func (x *ListGamesResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[396] + 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 ListGamesResponse.ProtoReflect.Descriptor instead. +func (*ListGamesResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{396} +} + +func (x *ListGamesResponse) GetGames() *GamesConnection { + if x != nil { + return x.Games + } + return nil +} + +// Page of games data and corresponding page information. +type GamesConnection struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Page of games data and their corresponding cursors. + Edges []*GameEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` + // Page information that is used for fetching further pages. + PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` +} + +func (x *GamesConnection) Reset() { + *x = GamesConnection{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[397] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GamesConnection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GamesConnection) ProtoMessage() {} + +func (x *GamesConnection) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[397] + 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 GamesConnection.ProtoReflect.Descriptor instead. +func (*GamesConnection) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{397} +} + +func (x *GamesConnection) GetEdges() []*GameEdge { + if x != nil { + return x.Edges + } + return nil +} + +func (x *GamesConnection) GetPageInfo() *PageInfo { + if x != nil { + return x.PageInfo + } + return nil +} + +// Game information and corresponding cursor. +type GameEdge struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Game data. + Node *Game `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // Cursor that can be used to fetch further pages. + Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` +} + +func (x *GameEdge) Reset() { + *x = GameEdge{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[398] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GameEdge) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GameEdge) ProtoMessage() {} + +func (x *GameEdge) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[398] + 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 GameEdge.ProtoReflect.Descriptor instead. +func (*GameEdge) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{398} +} + +func (x *GameEdge) GetNode() *Game { + if x != nil { + return x.Node + } + return nil +} + +func (x *GameEdge) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +// Data relating to a game. +type Game struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique ID of the game + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Epoch at which the last game metrics were captured. + Epoch uint64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"` + // The number of participants in the game. + Participants uint64 `protobuf:"varint,3,opt,name=participants,proto3" json:"participants,omitempty"` + // Entities participating in a game and their corresponding metrics. + // + // Types that are assignable to Entities: + // + // *Game_Team + // *Game_Individual + Entities isGame_Entities `protobuf_oneof:"entities"` + // ID of the asset rewarded for involvement in the game. + RewardAssetId string `protobuf:"bytes,6,opt,name=reward_asset_id,json=rewardAssetId,proto3" json:"reward_asset_id,omitempty"` +} + +func (x *Game) Reset() { + *x = Game{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[399] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Game) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Game) ProtoMessage() {} + +func (x *Game) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[399] + 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 Game.ProtoReflect.Descriptor instead. +func (*Game) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{399} +} + +func (x *Game) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Game) GetEpoch() uint64 { + if x != nil { + return x.Epoch + } + return 0 +} + +func (x *Game) GetParticipants() uint64 { + if x != nil { + return x.Participants + } + return 0 +} + +func (m *Game) GetEntities() isGame_Entities { + if m != nil { + return m.Entities + } + return nil +} + +func (x *Game) GetTeam() *TeamGameEntities { + if x, ok := x.GetEntities().(*Game_Team); ok { + return x.Team + } + return nil +} + +func (x *Game) GetIndividual() *IndividualGameEntities { + if x, ok := x.GetEntities().(*Game_Individual); ok { + return x.Individual + } + return nil +} + +func (x *Game) GetRewardAssetId() string { + if x != nil { + return x.RewardAssetId + } + return "" +} + +type isGame_Entities interface { + isGame_Entities() +} + +type Game_Team struct { + // Team entities that are participating in the game + Team *TeamGameEntities `protobuf:"bytes,4,opt,name=team,proto3,oneof"` +} + +type Game_Individual struct { + // Individual entities that are participating in the game + Individual *IndividualGameEntities `protobuf:"bytes,5,opt,name=individual,proto3,oneof"` +} + +func (*Game_Team) isGame_Entities() {} + +func (*Game_Individual) isGame_Entities() {} + +// List of teams that are participating in a game +type TeamGameEntities struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of teams, the participant members of a team, and the metrics associated with each participant. + Team []*TeamGameEntity `protobuf:"bytes,1,rep,name=team,proto3" json:"team,omitempty"` +} + +func (x *TeamGameEntities) Reset() { + *x = TeamGameEntities{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[400] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TeamGameEntities) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TeamGameEntities) ProtoMessage() {} + +func (x *TeamGameEntities) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[400] + 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 TeamGameEntities.ProtoReflect.Descriptor instead. +func (*TeamGameEntities) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{400} +} + +func (x *TeamGameEntities) GetTeam() []*TeamGameEntity { + if x != nil { + return x.Team + } + return nil +} + +// List of individuals that are participating in a game +type IndividualGameEntities struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of individual party IDs, and the metrics associated with each participant. + Individual []*IndividualGameEntity `protobuf:"bytes,1,rep,name=individual,proto3" json:"individual,omitempty"` +} + +func (x *IndividualGameEntities) Reset() { + *x = IndividualGameEntities{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[401] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IndividualGameEntities) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IndividualGameEntities) ProtoMessage() {} + +func (x *IndividualGameEntities) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[401] + 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 IndividualGameEntities.ProtoReflect.Descriptor instead. +func (*IndividualGameEntities) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{401} +} + +func (x *IndividualGameEntities) GetIndividual() []*IndividualGameEntity { + if x != nil { + return x.Individual + } + return nil +} + +// Data relating to a team participating in a game. +type TeamGameEntity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Team participation breakdown + Team *TeamGameParticipation `protobuf:"bytes,1,opt,name=team,proto3" json:"team,omitempty"` + // Rank of the team in the game + Rank uint64 `protobuf:"varint,2,opt,name=rank,proto3" json:"rank,omitempty"` + // Volume traded by the team + Volume string `protobuf:"bytes,3,opt,name=volume,proto3" json:"volume,omitempty"` + // Reward metric applied to the team + RewardMetric vega.DispatchMetric `protobuf:"varint,4,opt,name=reward_metric,json=rewardMetric,proto3,enum=vega.DispatchMetric" json:"reward_metric,omitempty"` + // Reward earned by the team + RewardEarned string `protobuf:"bytes,5,opt,name=reward_earned,json=rewardEarned,proto3" json:"reward_earned,omitempty"` + // Total rewards earned by the individual for the team + TotalRewardsEarned string `protobuf:"bytes,6,opt,name=total_rewards_earned,json=totalRewardsEarned,proto3" json:"total_rewards_earned,omitempty"` + // Rewards earned by the team in quantum value + RewardEarnedQuantum string `protobuf:"bytes,7,opt,name=reward_earned_quantum,json=rewardEarnedQuantum,proto3" json:"reward_earned_quantum,omitempty"` + // Total rewards earned by the team in quantum value + TotalRewardsEarnedQuantum string `protobuf:"bytes,8,opt,name=total_rewards_earned_quantum,json=totalRewardsEarnedQuantum,proto3" json:"total_rewards_earned_quantum,omitempty"` +} + +func (x *TeamGameEntity) Reset() { + *x = TeamGameEntity{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[402] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TeamGameEntity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TeamGameEntity) ProtoMessage() {} + +func (x *TeamGameEntity) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[402] + 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 TeamGameEntity.ProtoReflect.Descriptor instead. +func (*TeamGameEntity) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{402} +} + +func (x *TeamGameEntity) GetTeam() *TeamGameParticipation { + if x != nil { + return x.Team + } + return nil +} + +func (x *TeamGameEntity) GetRank() uint64 { + if x != nil { + return x.Rank + } + return 0 +} + +func (x *TeamGameEntity) GetVolume() string { + if x != nil { + return x.Volume + } + return "" +} + +func (x *TeamGameEntity) GetRewardMetric() vega.DispatchMetric { + if x != nil { + return x.RewardMetric + } + return vega.DispatchMetric(0) +} + +func (x *TeamGameEntity) GetRewardEarned() string { + if x != nil { + return x.RewardEarned + } + return "" +} + +func (x *TeamGameEntity) GetTotalRewardsEarned() string { + if x != nil { + return x.TotalRewardsEarned + } + return "" +} + +func (x *TeamGameEntity) GetRewardEarnedQuantum() string { + if x != nil { + return x.RewardEarnedQuantum + } + return "" +} + +func (x *TeamGameEntity) GetTotalRewardsEarnedQuantum() string { + if x != nil { + return x.TotalRewardsEarnedQuantum + } + return "" +} + +// Breakdown of a team's participation in a game. +type TeamGameParticipation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the team participating + TeamId string `protobuf:"bytes,1,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` + // Individual team member metrics for their participation in the game + MembersParticipating []*IndividualGameEntity `protobuf:"bytes,2,rep,name=members_participating,json=membersParticipating,proto3" json:"members_participating,omitempty"` +} + +func (x *TeamGameParticipation) Reset() { + *x = TeamGameParticipation{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[403] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TeamGameParticipation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TeamGameParticipation) ProtoMessage() {} + +func (x *TeamGameParticipation) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[403] + 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 TeamGameParticipation.ProtoReflect.Descriptor instead. +func (*TeamGameParticipation) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{403} +} + +func (x *TeamGameParticipation) GetTeamId() string { + if x != nil { + return x.TeamId + } + return "" +} + +func (x *TeamGameParticipation) GetMembersParticipating() []*IndividualGameEntity { + if x != nil { + return x.MembersParticipating + } + return nil +} + +// Data relating to an individual participating in a game. +// This can be used for both team members who are participating in a team game, +// or individuals participating in an individual entity game. +type IndividualGameEntity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Party ID of the individual participating + Individual string `protobuf:"bytes,1,opt,name=individual,proto3" json:"individual,omitempty"` + // Rank of the individual either in the game or within their team. + Rank uint64 `protobuf:"varint,2,opt,name=rank,proto3" json:"rank,omitempty"` + // Volume traded by the individual + Volume string `protobuf:"bytes,3,opt,name=volume,proto3" json:"volume,omitempty"` + // Reward metric applied to the individual + RewardMetric vega.DispatchMetric `protobuf:"varint,4,opt,name=reward_metric,json=rewardMetric,proto3,enum=vega.DispatchMetric" json:"reward_metric,omitempty"` + // Reward earned by the individual during the epoch + RewardEarned string `protobuf:"bytes,5,opt,name=reward_earned,json=rewardEarned,proto3" json:"reward_earned,omitempty"` + // Total rewards earned by the individual for the game + TotalRewardsEarned string `protobuf:"bytes,6,opt,name=total_rewards_earned,json=totalRewardsEarned,proto3" json:"total_rewards_earned,omitempty"` + // Rewards earned by the individual in quantum value + RewardEarnedQuantum string `protobuf:"bytes,7,opt,name=reward_earned_quantum,json=rewardEarnedQuantum,proto3" json:"reward_earned_quantum,omitempty"` + // Total rewards earned by the individual in quantum value + TotalRewardsEarnedQuantum string `protobuf:"bytes,8,opt,name=total_rewards_earned_quantum,json=totalRewardsEarnedQuantum,proto3" json:"total_rewards_earned_quantum,omitempty"` +} + +func (x *IndividualGameEntity) Reset() { + *x = IndividualGameEntity{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[404] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IndividualGameEntity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IndividualGameEntity) ProtoMessage() {} + +func (x *IndividualGameEntity) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[404] + 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 IndividualGameEntity.ProtoReflect.Descriptor instead. +func (*IndividualGameEntity) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{404} +} + +func (x *IndividualGameEntity) GetIndividual() string { + if x != nil { + return x.Individual + } + return "" +} + +func (x *IndividualGameEntity) GetRank() uint64 { + if x != nil { + return x.Rank + } + return 0 +} + +func (x *IndividualGameEntity) GetVolume() string { + if x != nil { + return x.Volume + } + return "" +} + +func (x *IndividualGameEntity) GetRewardMetric() vega.DispatchMetric { + if x != nil { + return x.RewardMetric + } + return vega.DispatchMetric(0) +} + +func (x *IndividualGameEntity) GetRewardEarned() string { + if x != nil { + return x.RewardEarned + } + return "" +} + +func (x *IndividualGameEntity) GetTotalRewardsEarned() string { + if x != nil { + return x.TotalRewardsEarned + } + return "" +} + +func (x *IndividualGameEntity) GetRewardEarnedQuantum() string { + if x != nil { + return x.RewardEarnedQuantum + } + return "" +} + +func (x *IndividualGameEntity) GetTotalRewardsEarnedQuantum() string { + if x != nil { + return x.TotalRewardsEarnedQuantum + } + return "" +} + +// Request to retrieve party margin modes. +type ListPartyMarginModesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Market ID to filter for. + MarketId *string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3,oneof" json:"market_id,omitempty"` + // Party ID to filter for. + PartyId *string `protobuf:"bytes,2,opt,name=party_id,json=partyId,proto3,oneof" json:"party_id,omitempty"` + // Pagination controls. + Pagination *Pagination `protobuf:"bytes,5,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` +} + +func (x *ListPartyMarginModesRequest) Reset() { + *x = ListPartyMarginModesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[405] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPartyMarginModesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPartyMarginModesRequest) ProtoMessage() {} + +func (x *ListPartyMarginModesRequest) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[405] + 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 ListPartyMarginModesRequest.ProtoReflect.Descriptor instead. +func (*ListPartyMarginModesRequest) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{405} +} + +func (x *ListPartyMarginModesRequest) GetMarketId() string { + if x != nil && x.MarketId != nil { + return *x.MarketId + } + return "" +} + +func (x *ListPartyMarginModesRequest) GetPartyId() string { + if x != nil && x.PartyId != nil { + return *x.PartyId + } + return "" +} + +func (x *ListPartyMarginModesRequest) GetPagination() *Pagination { + if x != nil { + return x.Pagination + } + return nil +} + +// Response containing party margin modes. +type ListPartyMarginModesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Page of party margin modes data and corresponding page information. + PartyMarginModes *PartyMarginModesConnection `protobuf:"bytes,1,opt,name=party_margin_modes,json=partyMarginModes,proto3" json:"party_margin_modes,omitempty"` +} + +func (x *ListPartyMarginModesResponse) Reset() { + *x = ListPartyMarginModesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[406] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPartyMarginModesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPartyMarginModesResponse) ProtoMessage() {} + +func (x *ListPartyMarginModesResponse) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[406] + 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 ListPartyMarginModesResponse.ProtoReflect.Descriptor instead. +func (*ListPartyMarginModesResponse) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{406} +} + +func (x *ListPartyMarginModesResponse) GetPartyMarginModes() *PartyMarginModesConnection { + if x != nil { + return x.PartyMarginModes + } + return nil +} + +// Page of party margin modes data and corresponding page information. +type PartyMarginModesConnection struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Page of party margin modes data and their corresponding cursors. + Edges []*PartyMarginModeEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` + // Page information that is used for fetching further pages. + PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` +} + +func (x *PartyMarginModesConnection) Reset() { + *x = PartyMarginModesConnection{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[407] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PartyMarginModesConnection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PartyMarginModesConnection) ProtoMessage() {} + +func (x *PartyMarginModesConnection) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[407] + 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 PartyMarginModesConnection.ProtoReflect.Descriptor instead. +func (*PartyMarginModesConnection) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{407} +} + +func (x *PartyMarginModesConnection) GetEdges() []*PartyMarginModeEdge { + if x != nil { + return x.Edges + } + return nil +} + +func (x *PartyMarginModesConnection) GetPageInfo() *PageInfo { + if x != nil { + return x.PageInfo + } + return nil +} + +// Party margin mode information and corresponding cursor. +type PartyMarginModeEdge struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Party margin mode data. + Node *PartyMarginMode `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // Cursor that can be used to fetch further pages. + Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` +} + +func (x *PartyMarginModeEdge) Reset() { + *x = PartyMarginModeEdge{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[408] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PartyMarginModeEdge) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PartyMarginModeEdge) ProtoMessage() {} + +func (x *PartyMarginModeEdge) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[408] + 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 PartyMarginModeEdge.ProtoReflect.Descriptor instead. +func (*PartyMarginModeEdge) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{408} +} + +func (x *PartyMarginModeEdge) GetNode() *PartyMarginMode { + if x != nil { + return x.Node + } + return nil +} + +func (x *PartyMarginModeEdge) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +// Margin mode selected for the given party and market. +type PartyMarginMode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique ID of the market. + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Unique ID of the party. + PartyId string `protobuf:"bytes,2,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + // Selected margin mode. + MarginMode vega.MarginMode `protobuf:"varint,3,opt,name=margin_mode,json=marginMode,proto3,enum=vega.MarginMode" json:"margin_mode,omitempty"` + // Margin factor for the market. Isolated mode only. + MarginFactor *string `protobuf:"bytes,4,opt,name=margin_factor,json=marginFactor,proto3,oneof" json:"margin_factor,omitempty"` + // Minimum theoretical margin factor for the market. Isolated mode only. + MinTheoreticalMarginFactor *string `protobuf:"bytes,5,opt,name=min_theoretical_margin_factor,json=minTheoreticalMarginFactor,proto3,oneof" json:"min_theoretical_margin_factor,omitempty"` + // Maximum theoretical leverage for the market. Isolated mode only. + MaxTheoreticalLeverage *string `protobuf:"bytes,6,opt,name=max_theoretical_leverage,json=maxTheoreticalLeverage,proto3,oneof" json:"max_theoretical_leverage,omitempty"` + // Epoch at which the update happened. + AtEpoch uint64 `protobuf:"varint,7,opt,name=at_epoch,json=atEpoch,proto3" json:"at_epoch,omitempty"` +} + +func (x *PartyMarginMode) Reset() { + *x = PartyMarginMode{} + if protoimpl.UnsafeEnabled { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[409] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PartyMarginMode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PartyMarginMode) ProtoMessage() {} + +func (x *PartyMarginMode) ProtoReflect() protoreflect.Message { + mi := &file_data_node_api_v2_trading_data_proto_msgTypes[409] + 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 PartyMarginMode.ProtoReflect.Descriptor instead. +func (*PartyMarginMode) Descriptor() ([]byte, []int) { + return file_data_node_api_v2_trading_data_proto_rawDescGZIP(), []int{409} +} + +func (x *PartyMarginMode) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *PartyMarginMode) GetPartyId() string { + if x != nil { + return x.PartyId + } + return "" +} + +func (x *PartyMarginMode) GetMarginMode() vega.MarginMode { + if x != nil { + return x.MarginMode + } + return vega.MarginMode(0) +} + +func (x *PartyMarginMode) GetMarginFactor() string { + if x != nil && x.MarginFactor != nil { + return *x.MarginFactor + } + return "" +} + +func (x *PartyMarginMode) GetMinTheoreticalMarginFactor() string { + if x != nil && x.MinTheoreticalMarginFactor != nil { + return *x.MinTheoreticalMarginFactor + } + return "" +} + +func (x *PartyMarginMode) GetMaxTheoreticalLeverage() string { + if x != nil && x.MaxTheoreticalLeverage != nil { + return *x.MaxTheoreticalLeverage + } + return "" +} + +func (x *PartyMarginMode) GetAtEpoch() uint64 { + if x != nil { + return x.AtEpoch + } + return 0 +} + +var File_data_node_api_v2_trading_data_proto protoreflect.FileDescriptor + +var file_data_node_api_v2_trading_data_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x32, 0x2f, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x11, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1b, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x76, + 0x65, 0x67, 0x61, 0x2f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x76, 0x65, 0x67, + 0x61, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x01, 0x0a, + 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x05, 0x66, + 0x69, 0x72, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x05, 0x66, 0x69, + 0x72, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, + 0x02, 0x52, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x62, 0x65, + 0x66, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x06, 0x62, 0x65, + 0x66, 0x6f, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x65, 0x73, + 0x74, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, + 0x0b, 0x6e, 0x65, 0x77, 0x65, 0x73, 0x74, 0x46, 0x69, 0x72, 0x73, 0x74, 0x88, 0x01, 0x01, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x66, + 0x74, 0x65, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6e, 0x65, 0x77, 0x65, + 0x73, 0x74, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x08, 0x50, 0x61, 0x67, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61, + 0x73, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x68, 0x61, 0x73, + 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x61, 0x73, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x50, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x63, + 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x5f, + 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, + 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x3e, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x50, 0x61, + 0x72, 0x74, 0x79, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x22, 0xb7, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x50, @@ -23132,7 +25871,7 @@ var file_data_node_api_v2_trading_data_proto_rawDesc = []byte{ 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa3, 0x02, 0x0a, 0x11, 0x4c, 0x65, 0x64, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd9, 0x02, 0x0a, 0x11, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x18, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, @@ -23150,2342 +25889,2442 @@ var file_data_node_api_v2_trading_data_proto_rawDesc = []byte{ 0x74, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0xd9, - 0x05, 0x0a, 0x15, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x64, - 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x12, 0x37, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x11, 0x66, - 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x66, 0x72, 0x6f, 0x6d, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x0f, 0x74, 0x6f, - 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x74, 0x6f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x15, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x12, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, - 0x13, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x10, 0x74, 0x6f, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, - 0x01, 0x12, 0x38, 0x0a, 0x16, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x03, 0x52, 0x13, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x14, 0x74, - 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x11, 0x74, 0x6f, 0x41, + 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x24, + 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x49, + 0x64, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x22, 0xd9, 0x05, 0x0a, 0x15, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x64, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, + 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x37, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x3d, 0x0a, 0x11, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0f, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x39, 0x0a, 0x0f, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x74, 0x6f, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x15, 0x66, + 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x12, 0x66, 0x72, + 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x13, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x02, 0x52, 0x10, 0x74, 0x6f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, + 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x16, 0x66, 0x72, 0x6f, 0x6d, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x13, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, - 0x01, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x74, 0x6f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x18, - 0x0a, 0x16, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x74, 0x6f, 0x5f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, - 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x17, 0x0a, 0x15, 0x5f, - 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0xf6, 0x01, 0x0a, 0x18, 0x4c, - 0x69, 0x73, 0x74, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x65, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x01, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x1a, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, - 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, - 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x48, 0x01, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, - 0x76, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0e, - 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x64, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, - 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x71, 0x0a, 0x1b, 0x41, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x45, 0x64, 0x67, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x64, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6e, 0x6f, - 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x9f, 0x01, 0x0a, 0x21, 0x41, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, - 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x42, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x64, 0x67, - 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, - 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xf3, 0x01, 0x0a, - 0x19, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, - 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x48, 0x01, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, - 0x67, 0x65, 0x22, 0x66, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x48, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x42, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xac, 0x02, 0x0a, 0x18, 0x47, - 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, - 0x38, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0e, 0x32, 0x1d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x01, 0x12, 0x34, 0x0a, 0x14, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x04, 0x52, 0x11, 0x74, 0x6f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x72, 0x6f, 0x6d, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x6f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x16, + 0x0a, 0x14, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, + 0x22, 0xf6, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x01, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x65, 0x0a, 0x19, 0x47, 0x65, 0x74, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x1a, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, + 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x01, 0x52, 0x09, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x76, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x64, + 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0e, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, + 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x71, 0x0a, + 0x1b, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x45, 0x64, 0x67, 0x65, 0x12, 0x3a, 0x0a, 0x04, + 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, + 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, + 0x22, 0x9f, 0x01, 0x0a, 0x21, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x64, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x45, + 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0xf3, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x36, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x01, 0x52, 0x09, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x66, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, - 0x22, 0x67, 0x0a, 0x15, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x6e, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x93, 0x01, 0x0a, 0x1b, 0x41, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x05, 0x65, 0x64, 0x67, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x45, 0x64, 0x67, 0x65, - 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, + 0x22, 0xac, 0x02, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x62, + 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x12, + 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x48, 0x01, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, + 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, + 0x65, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x08, + 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x67, 0x0a, 0x15, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, + 0x36, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, + 0x93, 0x01, 0x0a, 0x1b, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x3c, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x9e, 0x01, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x73, 0x12, + 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x36, + 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0xa1, 0x02, 0x0a, 0x11, 0x41, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, + 0x03, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, + 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x0b, + 0x0a, 0x09, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3b, 0x0a, 0x1a, 0x4f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x22, 0x53, 0x0a, 0x1b, 0x4f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, + 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x22, 0x42, 0x0a, 0x21, + 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, + 0x70, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, + 0x22, 0x55, 0x0a, 0x22, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x3a, 0x0a, 0x19, 0x4f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x49, 0x64, 0x73, 0x22, 0x4f, 0x0a, 0x1a, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x31, 0x0a, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x22, 0x70, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, + 0x70, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x78, + 0x44, 0x65, 0x70, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x78, + 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x22, 0xda, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x52, 0x03, 0x62, 0x75, 0x79, 0x12, 0x24, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x6c, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x12, 0x2a, + 0x0a, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, + 0x09, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x22, 0x1d, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x53, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x33, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x44, 0x61, 0x74, 0x61, 0x22, 0x3f, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x22, 0x99, 0x02, 0x0a, 0x1f, 0x47, + 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, + 0x64, 0x12, 0x2c, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x12, + 0x28, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, + 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x6a, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, + 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x22, 0x4e, 0x0a, 0x0e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x45, 0x64, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, + 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, + 0x6f, 0x72, 0x22, 0x85, 0x01, 0x0a, 0x14, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x65, + 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, + 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xc2, 0x04, 0x0a, 0x14, 0x4c, + 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x88, 0x01, 0x01, + 0x12, 0x40, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x08, 0x69, 0x73, 0x52, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x09, 0x66, 0x72, + 0x6f, 0x6d, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x6f, + 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x07, + 0x74, 0x6f, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x05, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x48, 0x06, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x88, 0x01, 0x01, + 0x22, 0x44, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x43, 0x4f, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x14, 0x0a, 0x10, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x44, 0x49, 0x56, 0x49, + 0x44, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, + 0x54, 0x45, 0x41, 0x4d, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, + 0x79, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x0d, + 0x0a, 0x0b, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x0b, 0x0a, + 0x09, 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, + 0x5a, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x22, 0x76, 0x0a, 0x0c, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x65, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x52, 0x04, 0x66, + 0x65, 0x65, 0x73, 0x22, 0x59, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x45, + 0x64, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x81, + 0x01, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x45, + 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0x3b, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, + 0x41, 0x01, 0x02, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x49, 0x64, 0x22, + 0x59, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x47, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x22, 0x3f, + 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, + 0x4d, 0x0a, 0x12, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x43, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x75, + 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, + 0x15, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, + 0x64, 0x52, 0x12, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x43, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x49, 0x64, 0x22, 0xc3, 0x01, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x61, 0x73, + 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x67, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x69, 0x67, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x6c, + 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x77, 0x12, 0x12, 0x0a, + 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6f, 0x70, 0x65, + 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0x3d, 0x0a, 0x18, 0x4f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, + 0x52, 0x08, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x19, 0x4f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x52, 0x06, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xdb, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x63, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x66, + 0x72, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x0c, + 0x74, 0x6f, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0b, 0x74, 0x6f, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, + 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x59, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3f, 0x0a, 0x07, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x73, 0x22, 0x51, 0x0a, 0x0a, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, + 0x2b, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, + 0x72, 0x73, 0x6f, 0x72, 0x22, 0x81, 0x01, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, + 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, + 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xc6, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, + 0x74, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, + 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, + 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, + 0x69, 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, + 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x4a, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x42, 0x0a, + 0x08, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, + 0x6f, 0x74, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, + 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, + 0x72, 0x22, 0x79, 0x0a, 0x0e, 0x56, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, + 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x78, 0x0a, 0x13, + 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x36, 0x0a, 0x14, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, + 0x0a, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x22, 0xbd, + 0x01, 0x0a, 0x2a, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, + 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, + 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, + 0x71, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7c, + 0x0a, 0x2b, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, + 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, + 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x74, 0x0a, 0x1c, + 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x45, 0x64, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x04, + 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, + 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, + 0x64, 0x64, 0x65, 0x64, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, + 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, + 0x6f, 0x72, 0x22, 0x81, 0x01, 0x0a, 0x22, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x6e, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, + 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0xa7, 0x01, 0x0a, 0x22, 0x45, 0x52, 0x43, 0x32, 0x30, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, + 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, + 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, + 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x64, 0x67, + 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0xce, 0x01, 0x0a, 0x1e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, + 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, + 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, + 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, + 0x71, 0x22, 0xbf, 0x01, 0x0a, 0x2c, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, - 0x9e, 0x01, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x36, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, - 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x22, 0xa1, 0x02, 0x0a, 0x11, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x42, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1e, - 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, - 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x20, - 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, - 0x12, 0x39, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x03, 0x52, 0x0b, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x22, 0x3b, 0x0a, 0x1a, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x80, 0x01, 0x0a, 0x2d, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, 0x32, + 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, + 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x62, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x78, 0x0a, 0x1e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x64, 0x45, 0x64, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x64, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, + 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, + 0x22, 0x85, 0x01, 0x0a, 0x24, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, + 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x42, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, 0x45, 0x0a, 0x04, 0x6e, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0xab, 0x01, 0x0a, 0x24, 0x45, 0x52, 0x43, + 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x4b, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x35, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, + 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, + 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xd0, 0x01, 0x0a, 0x20, 0x45, 0x52, 0x43, 0x32, 0x30, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, + 0x6c, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1e, 0x0a, 0x0a, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x22, 0x41, 0x0a, 0x1e, 0x47, 0x65, 0x74, + 0x45, 0x52, 0x43, 0x32, 0x30, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, + 0x41, 0x01, 0x02, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0x9e, 0x01, 0x0a, + 0x1f, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x67, 0x61, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x0a, + 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0x4c, 0x0a, + 0x23, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, + 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0xe8, 0x01, 0x0a, 0x24, + 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x5f, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x76, 0x65, 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x69, 0x66, 0x65, 0x74, + 0x69, 0x6d, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0x4e, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, + 0x32, 0x30, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, + 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0d, 0x77, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x61, 0x6c, 0x49, 0x64, 0x22, 0xde, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x45, 0x52, + 0x43, 0x32, 0x30, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x41, 0x70, 0x70, + 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1e, + 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, + 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x38, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, 0x61, + 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, + 0x64, 0x22, 0x39, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x74, 0x72, 0x61, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x22, 0x8c, 0x02, 0x0a, + 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x73, 0x22, 0x53, 0x0a, 0x1b, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x34, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x22, 0x42, 0x0a, 0x21, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x22, 0x55, 0x0a, 0x22, 0x4f, 0x62, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, - 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, - 0x70, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x22, 0x3a, 0x0a, 0x19, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x22, 0x4f, 0x0a, - 0x1a, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0b, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x22, 0x70, - 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, - 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, - 0x22, 0xda, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x22, - 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x03, 0x62, - 0x75, 0x79, 0x12, 0x24, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x52, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x12, 0x2a, 0x0a, 0x0a, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, - 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x1d, 0x0a, - 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x53, 0x0a, 0x1c, - 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x0c, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x61, 0x74, - 0x61, 0x22, 0x3f, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x49, 0x64, 0x22, 0x50, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x31, 0x0a, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x22, 0x99, 0x02, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, - 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, - 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x0f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x6e, 0x64, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x01, 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x6e, - 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, - 0x22, 0x6a, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, - 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x64, + 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1b, + 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x73, 0x12, 0x40, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, + 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x01, 0x52, + 0x09, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x4e, 0x0a, 0x12, 0x4c, + 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x38, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x22, 0x7b, 0x0a, 0x0f, 0x54, + 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, + 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, + 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x44, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x64, + 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, + 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x52, + 0x0a, 0x14, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, + 0x64, 0x73, 0x22, 0x3c, 0x0a, 0x15, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x54, 0x72, 0x61, + 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x74, + 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, + 0x22, 0x42, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x0e, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0c, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, + 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x52, 0x0a, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, + 0x22, 0x69, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x17, 0x4c, + 0x69, 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, + 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0e, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x60, 0x0a, 0x16, 0x4c, 0x69, + 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x22, 0x4e, 0x0a, 0x0e, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x45, 0x64, 0x67, 0x65, 0x12, 0x24, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0a, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0x4e, 0x0a, 0x0e, + 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x45, 0x64, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, + 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x85, 0x01, 0x0a, - 0x14, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, - 0x61, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, - 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x81, 0x02, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, - 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x20, - 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x02, 0x52, 0x08, 0x69, 0x73, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x88, 0x01, 0x01, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, - 0x73, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x5a, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x41, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x73, 0x22, 0x76, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x65, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x52, 0x04, 0x66, 0x65, 0x65, 0x73, 0x22, 0x59, 0x0a, 0x0c, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x04, - 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x81, 0x01, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, - 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, - 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x3b, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x25, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0a, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x49, 0x64, 0x22, 0x7d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x34, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x08, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x65, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, - 0x73, 0x52, 0x04, 0x66, 0x65, 0x65, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x47, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, - 0x0a, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x73, 0x52, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x22, 0x3f, 0x0a, 0x1a, 0x4c, - 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, - 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x4d, 0x0a, 0x12, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1b, - 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x75, 0x0a, 0x1b, 0x4c, - 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x15, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x52, 0x12, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x49, 0x64, 0x22, 0xc3, 0x01, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x67, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x68, 0x69, 0x67, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x77, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6f, 0x70, - 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, - 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0x3d, 0x0a, 0x18, 0x4f, 0x62, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x63, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x19, 0x4f, 0x62, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x63, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xdb, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x21, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x66, 0x72, 0x6f, 0x6d, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0b, 0x74, 0x6f, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x40, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, - 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x04, 0x08, - 0x04, 0x10, 0x05, 0x22, 0x59, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, - 0x07, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x51, - 0x0a, 0x0a, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x04, - 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, - 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, - 0x72, 0x22, 0x81, 0x01, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x05, 0x65, 0x64, - 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x86, 0x01, 0x0a, + 0x15, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xc6, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, - 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, - 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x88, 0x01, 0x01, - 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x48, 0x02, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, - 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, - 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x42, - 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4a, - 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x42, 0x0a, 0x08, 0x56, 0x6f, - 0x74, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, - 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x79, - 0x0a, 0x0e, 0x56, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, - 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x78, 0x0a, 0x13, 0x4f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, - 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x5f, 0x69, 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x5f, 0x69, 0x64, 0x22, 0x36, 0x0a, 0x14, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x56, 0x6f, - 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x76, - 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x2a, - 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, - 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, - 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, - 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x12, 0x3b, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, 0x2b, 0x4c, - 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, - 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x07, 0x62, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x52, - 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x74, 0x0a, 0x1c, 0x45, 0x52, 0x43, - 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x41, 0x64, 0x64, 0x65, 0x64, 0x45, 0x64, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x04, 0x6e, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, - 0x64, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, - 0x81, 0x01, 0x0a, 0x22, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, - 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, - 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, - 0x73, 0x6f, 0x72, 0x22, 0xa7, 0x01, 0x0a, 0x22, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x05, 0x65, 0x64, - 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x52, 0x43, 0x32, - 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, - 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x4e, 0x0a, 0x0e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x45, 0x64, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, + 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x85, 0x01, 0x0a, 0x14, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, + 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xce, 0x01, - 0x0a, 0x1e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, - 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x22, 0xbf, - 0x01, 0x0a, 0x2c, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, - 0x73, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x53, 0x65, 0x71, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x80, 0x01, 0x0a, 0x2d, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x73, 0x22, 0x78, 0x0a, 0x1e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x64, 0x45, 0x64, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, - 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x52, - 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x85, 0x01, - 0x0a, 0x24, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, 0x45, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, + 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x35, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x06, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x22, + 0xa7, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x01, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x22, 0x52, 0x0a, 0x13, 0x4c, 0x69, 0x73, + 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3b, 0x0a, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x22, 0x46, 0x0a, + 0x0a, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x6e, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, - 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0xab, 0x01, 0x0a, 0x24, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, - 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, + 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x7d, 0x0a, 0x10, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x05, 0x65, 0x64, 0x67, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xaf, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x75, + 0x6c, 0x6c, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, - 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x22, 0xd0, 0x01, 0x0a, 0x20, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x6c, 0x64, 0x5f, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6c, - 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, - 0x74, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, - 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x22, 0x41, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, - 0x32, 0x30, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, - 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0x9e, 0x01, 0x0a, 0x1f, 0x47, 0x65, - 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, - 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x67, 0x61, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0x4c, 0x0a, 0x23, 0x47, 0x65, - 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x25, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0a, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0xe8, 0x01, 0x0a, 0x24, 0x47, 0x65, 0x74, - 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x67, - 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x25, - 0x0a, 0x0e, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x22, 0x4e, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x57, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, - 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0d, 0x77, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, - 0x6c, 0x49, 0x64, 0x22, 0xde, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, - 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x04, - 0x08, 0x03, 0x10, 0x04, 0x22, 0x38, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, - 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x39, - 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, - 0x64, 0x65, 0x52, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x22, 0x8c, 0x02, 0x0a, 0x11, 0x4c, 0x69, - 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1b, - 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, - 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x73, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x01, 0x52, 0x09, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x4e, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, - 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x22, 0x7b, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x64, - 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x05, 0x65, - 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, - 0x64, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, - 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x44, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x64, 0x65, 0x45, 0x64, - 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x52, 0x0a, 0x14, 0x4f, - 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, - 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x73, 0x22, - 0x3c, 0x0a, 0x15, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x22, 0x42, 0x0a, - 0x14, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x0e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, - 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, - 0x41, 0x01, 0x02, 0x52, 0x0c, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x49, - 0x64, 0x22, 0x4a, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, - 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0b, 0x6f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, - 0x63, 0x52, 0x0a, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x22, 0x69, 0x0a, - 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, - 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x22, 0xa6, - 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0e, 0x6f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x0c, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x49, 0x64, - 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x60, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, - 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0x4e, 0x0a, 0x0e, 0x4f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x45, 0x64, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x6e, 0x6f, 0x64, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x86, 0x01, 0x0a, 0x15, 0x4f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x45, + 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6b, 0x0a, 0x0f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, + 0x32, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, + 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x73, 0x22, 0x63, 0x0a, 0x13, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x6e, 0x6f, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8f, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, + 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x77, 0x0a, 0x1c, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x11, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x10, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x22, 0x32, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x61, + 0x72, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x70, + 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x22, 0x6c, + 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, + 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x51, 0x0a, 0x13, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, + 0x44, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x79, 0x45, 0x64, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x04, + 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, + 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x7b, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x74, 0x79, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x22, 0x4e, 0x0a, 0x0e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x45, 0x64, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, - 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, - 0x6f, 0x72, 0x22, 0x85, 0x01, 0x0a, 0x14, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x65, - 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, - 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x35, 0x0a, 0x10, 0x47, 0x65, - 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, - 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, - 0x64, 0x22, 0x39, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x22, 0xa7, 0x01, 0x0a, - 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x5f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, - 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, - 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, - 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x22, 0x52, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, - 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x66, 0x6f, 0x22, 0x73, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x22, 0x46, 0x0a, 0x0a, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, + 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x65, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x52, + 0x0a, 0x10, 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x64, + 0x67, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, - 0x6f, 0x72, 0x22, 0x7d, 0x0a, 0x10, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x64, + 0x6f, 0x72, 0x22, 0x8c, 0x01, 0x0a, 0x19, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x37, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x22, 0xaf, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x12, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x6b, 0x0a, 0x0f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x32, 0x0a, 0x09, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, - 0x22, 0x63, 0x0a, 0x13, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, - 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, - 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8f, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, + 0x6f, 0x22, 0x44, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x12, 0x1f, + 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8e, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1b, + 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x62, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, + 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x22, 0x67, 0x0a, 0x1a, + 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x56, 0x0a, 0x1b, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, + 0x0c, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x22, 0x7b, 0x0a, + 0x0f, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x30, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, + 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x4c, 0x0a, 0x0a, 0x4d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x45, 0x64, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x7d, 0x0a, 0x10, 0x4d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x05, + 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x77, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x11, 0x73, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, - 0x22, 0x32, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x70, 0x61, 0x72, - 0x74, 0x79, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, - 0x61, 0x72, 0x74, 0x79, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x22, 0x6c, 0x0a, 0x12, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x51, 0x0a, 0x13, 0x4c, 0x69, 0x73, - 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3a, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x44, 0x0a, 0x09, - 0x50, 0x61, 0x72, 0x74, 0x79, 0x45, 0x64, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x6e, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, - 0x61, 0x72, 0x74, 0x79, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, - 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, - 0x6f, 0x72, 0x22, 0x7b, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x45, 0x64, 0x67, 0x65, - 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, - 0x44, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x04, - 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, - 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8e, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, - 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xe1, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x62, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, - 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x76, - 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, 0x72, 0x67, - 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6d, 0x61, - 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x22, 0x67, 0x0a, 0x1a, 0x4f, 0x62, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x22, 0x56, 0x0a, 0x1b, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, - 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x76, - 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x0c, 0x6d, - 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x22, 0x7b, 0x0a, 0x0f, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, - 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, + 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x66, + 0x72, 0x6f, 0x6d, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x02, 0x52, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, + 0x1e, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x03, 0x52, 0x07, 0x74, 0x6f, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, + 0x1c, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x04, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, + 0x07, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, + 0x52, 0x06, 0x67, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x66, 0x72, 0x6f, 0x6d, + 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x42, + 0x0a, 0x0a, 0x08, 0x5f, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x53, 0x0a, 0x13, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x22, 0x46, 0x0a, 0x0a, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x64, 0x67, 0x65, 0x12, 0x20, + 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x7e, 0x0a, 0x11, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, + 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, - 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x4c, 0x0a, 0x0a, 0x4d, 0x61, 0x72, 0x67, - 0x69, 0x6e, 0x45, 0x64, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, - 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x7d, 0x0a, 0x10, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x05, 0x65, 0x64, - 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, 0x72, 0x67, - 0x69, 0x6e, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, - 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x8d, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x73, 0x73, + 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xc7, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x66, 0x72, 0x6f, - 0x6d, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, - 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, - 0x08, 0x74, 0x6f, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x03, 0x52, 0x07, 0x74, 0x6f, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, - 0x09, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x66, 0x72, - 0x6f, 0x6d, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x6f, 0x5f, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x53, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, - 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x46, 0x0a, 0x0a, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x45, 0x64, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, - 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, - 0x6f, 0x72, 0x22, 0x7e, 0x0a, 0x11, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, - 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, - 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x22, 0xc7, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, - 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, - 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, - 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, - 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x1b, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x73, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, - 0x61, 0x72, 0x79, 0x52, 0x09, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x22, 0xb1, - 0x01, 0x0a, 0x13, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, - 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, - 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x65, 0x70, 0x6f, - 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x07, 0x74, 0x6f, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x70, 0x6f, - 0x63, 0x68, 0x22, 0xb0, 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x73, 0x75, 0x6d, - 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x31, 0x0a, 0x09, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x09, 0x73, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x69, 0x65, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, + 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x09, + 0x66, 0x72, 0x6f, 0x6d, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, + 0x74, 0x6f, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, + 0x52, 0x07, 0x74, 0x6f, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x74, 0x6f, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0xb0, 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x73, + 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0x0a, 0x20, 0x4c, + 0x69, 0x73, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4b, 0x0a, 0x09, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x09, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x22, 0x95, 0x01, 0x0a, + 0x1c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, + 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x73, 0x75, 0x6d, - 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x22, 0x95, 0x01, 0x0a, 0x1c, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x64, 0x67, 0x65, 0x52, - 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5e, - 0x0a, 0x16, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, - 0x6d, 0x61, 0x72, 0x79, 0x45, 0x64, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x71, - 0x0a, 0x15, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x70, 0x61, 0x72, - 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, - 0x64, 0x22, 0x3e, 0x0a, 0x16, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x06, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x22, 0x29, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3d, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x27, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0xd0, 0x01, 0x0a, 0x13, - 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x40, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, - 0x12, 0x3e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x48, 0x01, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, - 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x57, - 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x22, 0x48, 0x0a, 0x0b, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x45, 0x64, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, - 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, - 0x72, 0x22, 0x80, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, + 0x79, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x2c, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x02, + 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5e, 0x0a, 0x16, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x64, 0x67, 0x65, 0x12, 0x2c, + 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, + 0x72, 0x73, 0x6f, 0x72, 0x22, 0x71, 0x0a, 0x15, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, + 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, + 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, + 0x09, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, + 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x22, 0x3e, 0x0a, 0x16, 0x4f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x24, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, + 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x29, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x49, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0a, 0x77, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, - 0x6c, 0x52, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x22, 0xd3, 0x01, - 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x65, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x01, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x22, 0x63, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, - 0x0a, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, - 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x77, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x22, 0x4e, 0x0a, 0x0e, 0x57, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x64, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x6e, 0x6f, - 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x86, 0x01, 0x0a, 0x15, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x64, - 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, + 0x69, 0x64, 0x22, 0x3d, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x22, 0xd0, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, + 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x01, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x22, 0x57, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x08, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x22, 0x48, 0x0a, + 0x0b, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x45, 0x64, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x04, + 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x80, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, + 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, + 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x2c, 0x0a, 0x14, 0x47, 0x65, + 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x14, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, + 0xe2, 0x41, 0x01, 0x02, 0x52, 0x02, 0x69, 0x64, 0x22, 0x49, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x30, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x61, 0x6c, 0x22, 0xd3, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0a, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x01, 0x52, 0x09, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x63, 0x0a, 0x17, 0x4c, 0x69, 0x73, + 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x22, 0x4e, + 0x0a, 0x0e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x45, 0x64, 0x67, 0x65, + 0x12, 0x24, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, + 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x86, + 0x01, 0x0a, 0x15, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x61, 0x6c, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, + 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x32, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, + 0x01, 0x02, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x10, 0x47, + 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x21, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x05, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, - 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x22, 0x32, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x22, 0x91, 0x01, 0x0a, - 0x11, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x88, - 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x4f, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x22, 0x44, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x12, 0x1f, - 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x7c, 0x0a, 0x10, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x05, 0x65, - 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, - 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xa1, 0x02, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, - 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, - 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x04, 0x6c, - 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x04, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa4, 0x02, 0x0a, 0x21, 0x4c, 0x69, - 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, - 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, - 0x01, 0x12, 0x21, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x04, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, - 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, - 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6c, 0x69, 0x76, - 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x84, 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4f, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, 0x44, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x45, 0x64, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, + 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x7c, 0x0a, + 0x10, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x30, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, + 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xa1, 0x02, 0x0a, 0x1e, + 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, + 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, + 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, + 0x12, 0x21, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x04, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0c, + 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6c, 0x69, 0x76, 0x65, + 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0xa4, 0x02, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x09, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6c, 0x69, + 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x76, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x04, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x84, 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x6c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x92, 0x01, + 0x0a, 0x22, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x22, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x6c, 0x6c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, - 0x0a, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x57, 0x69, 0x74, 0x68, 0x50, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x57, 0x69, 0x74, 0x68, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8d, 0x01, 0x0a, - 0x12, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x88, 0x01, 0x01, - 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x5f, 0x0a, 0x17, - 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x45, 0x64, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x74, 0x0a, - 0x21, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x64, - 0x67, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, + 0x6e, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, + 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x07, 0x70, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x22, 0x5f, 0x0a, 0x17, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x64, 0x67, 0x65, 0x12, 0x2c, 0x0a, + 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, - 0x73, 0x6f, 0x72, 0x22, 0x97, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, - 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xac, 0x01, - 0x0a, 0x28, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x57, 0x69, 0x74, 0x68, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x05, 0x65, 0x64, - 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, - 0x74, 0x68, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, - 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x80, 0x01, 0x0a, - 0x21, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, - 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, - 0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, - 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x22, - 0x71, 0x0a, 0x22, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0xcd, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x12, 0x3c, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x46, 0x65, 0x65, 0x53, - 0x68, 0x61, 0x72, 0x65, 0x52, 0x08, 0x66, 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x2c, - 0x0a, 0x03, 0x73, 0x6c, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x53, 0x4c, 0x41, 0x52, 0x03, 0x73, 0x6c, 0x61, 0x22, 0x67, 0x0a, 0x15, - 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x45, 0x64, 0x67, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, - 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x93, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, - 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x7f, 0x0a, 0x1e, 0x4c, - 0x69, 0x73, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, - 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x22, 0x99, 0x02, 0x0a, - 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, - 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x1e, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x01, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x20, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x48, 0x02, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x88, 0x01, - 0x01, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x73, 0x12, 0x40, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x03, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0b, - 0x0a, 0x09, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7d, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, - 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x13, 0x70, 0x61, 0x69, - 0x64, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x70, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x22, 0x6b, 0x0a, 0x15, 0x50, 0x61, 0x69, 0x64, 0x4c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x45, 0x64, 0x67, 0x65, - 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, - 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, - 0x72, 0x73, 0x6f, 0x72, 0x22, 0x93, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, - 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x81, 0x01, 0x0a, 0x18, 0x47, - 0x65, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, - 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x45, - 0x0a, 0x19, 0x47, 0x65, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xcb, 0x06, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6f, - 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x59, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x01, 0x52, - 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x2f, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, - 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0f, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, - 0x01, 0x12, 0x32, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, - 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x04, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x22, 0x88, 0x03, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, - 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x57, - 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, - 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, - 0x4b, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x53, 0x10, 0x04, 0x12, 0x12, - 0x0a, 0x0e, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x57, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, - 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x57, 0x5f, 0x46, - 0x52, 0x45, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x10, - 0x07, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x57, 0x5f, 0x53, 0x50, - 0x4f, 0x54, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x08, 0x12, 0x1b, 0x0a, 0x17, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x50, 0x4f, 0x54, 0x5f, - 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x09, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4e, 0x45, 0x57, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x10, 0x0a, 0x12, - 0x18, 0x0a, 0x14, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x54, - 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x10, 0x0b, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, - 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x10, 0x0d, 0x12, 0x27, 0x0a, 0x23, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, - 0x44, 0x49, 0x53, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, - 0x10, 0x0e, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x15, 0x0a, - 0x13, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x67, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, - 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, - 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x56, 0x0a, 0x12, - 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x45, 0x64, - 0x67, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, - 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, - 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8d, 0x01, 0x0a, 0x18, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, - 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x39, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, - 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x47, 0x0a, 0x18, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x47, - 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, - 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x22, 0x45, 0x0a, - 0x19, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0xed, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x1c, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, - 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x02, 0x52, 0x07, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x03, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, - 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, - 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x70, 0x6f, - 0x63, 0x68, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x63, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x48, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4e, 0x0a, 0x0e, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x64, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x6f, 0x64, + 0x73, 0x6f, 0x72, 0x22, 0x74, 0x0a, 0x21, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x50, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x45, 0x64, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x86, 0x01, 0x0a, 0x15, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x97, 0x01, 0x0a, 0x1d, 0x4c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x05, 0x65, + 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x28, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x57, 0x69, 0x74, 0x68, 0x50, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x48, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x32, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x22, 0x72, 0x0a, 0x19, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x1c, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, - 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x4e, 0x0a, 0x1a, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91, 0x02, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x42, - 0x61, 0x73, 0x69, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, - 0x0a, 0x74, 0x6d, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x74, 0x6d, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x75, - 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x72, - 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, - 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, - 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x45, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, - 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x0e, 0x47, 0x65, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, - 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, - 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, - 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x66, 0x6f, 0x22, 0x80, 0x01, 0x0a, 0x21, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x5f, 0x69, 0x64, 0x22, 0x71, 0x0a, 0x22, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x14, 0x6c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xcd, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, + 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, + 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, + 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0c, - 0x0a, 0x0a, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x42, 0x0d, 0x0a, 0x0b, - 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x0a, 0x11, 0x4c, - 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x36, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x42, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, - 0x45, 0x64, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, - 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x7a, 0x0a, 0x0f, - 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2f, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, + 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x19, + 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x68, + 0x61, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x46, 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x08, 0x66, 0x65, 0x65, 0x53, + 0x68, 0x61, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x03, 0x73, 0x6c, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x4c, 0x41, 0x52, 0x03, 0x73, + 0x6c, 0x61, 0x22, 0x67, 0x0a, 0x15, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x6e, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x04, 0x6e, + 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x93, 0x01, 0x0a, 0x1b, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x05, 0x65, + 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x45, 0x64, + 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x7f, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, + 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x73, 0x22, 0x99, 0x02, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x69, 0x64, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, + 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, + 0x68, 0x53, 0x65, 0x71, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x49, 0x64, 0x73, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x03, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x42, + 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7d, + 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5c, 0x0a, 0x13, 0x70, 0x61, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x79, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, + 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x70, 0x61, 0x69, 0x64, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x22, 0x6b, 0x0a, + 0x15, 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, + 0x65, 0x73, 0x45, 0x64, 0x67, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x04, 0x6e, 0x6f, + 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x93, 0x01, 0x0a, 0x1b, 0x50, + 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x05, 0x65, 0x64, + 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x69, 0x64, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x45, 0x64, 0x67, + 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0x81, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, + 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, + 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x22, 0x45, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, + 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xcb, 0x06, 0x0a, 0x19, + 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x59, 0x0a, 0x0d, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, + 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x48, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, + 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x02, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, + 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x04, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x22, 0x88, 0x03, + 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x57, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x02, 0x12, + 0x16, 0x0a, 0x12, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x4d, + 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, + 0x52, 0x53, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x57, + 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4e, 0x45, 0x57, 0x5f, 0x46, 0x52, 0x45, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x10, 0x06, + 0x12, 0x15, 0x0a, 0x11, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, + 0x41, 0x53, 0x53, 0x45, 0x54, 0x10, 0x07, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x4e, 0x45, 0x57, 0x5f, 0x53, 0x50, 0x4f, 0x54, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, + 0x08, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, + 0x5f, 0x53, 0x50, 0x4f, 0x54, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x09, 0x12, 0x15, + 0x0a, 0x11, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x57, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, + 0x46, 0x45, 0x52, 0x10, 0x0a, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x41, + 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x10, 0x0b, 0x12, + 0x1c, 0x0a, 0x18, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x4d, + 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x0c, 0x12, 0x20, 0x0a, + 0x1c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x46, + 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x10, 0x0d, 0x12, + 0x27, 0x0a, 0x23, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x56, + 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x50, + 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x10, 0x0e, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x14, 0x0a, + 0x12, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x5f, 0x69, 0x64, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x67, 0x0a, 0x1a, 0x4c, 0x69, 0x73, + 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x6f, + 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x56, 0x0a, 0x12, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x45, 0x64, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x47, 0x6f, + 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6e, 0x6f, + 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8d, 0x01, 0x0a, 0x18, 0x47, + 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, + 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, + 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x47, 0x0a, 0x18, 0x4f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x5f, 0x69, 0x64, 0x22, 0x45, 0x0a, 0x19, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x47, 0x6f, + 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xed, 0x01, 0x0a, 0x16, 0x4c, + 0x69, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x07, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x03, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, + 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0b, + 0x0a, 0x09, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x63, 0x0a, 0x17, 0x4c, 0x69, + 0x73, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0x4e, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x64, 0x67, + 0x65, 0x12, 0x24, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, + 0x86, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x64, 0x67, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, - 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x82, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, 0x40, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x72, 0x0a, 0x19, 0x4f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, + 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x4e, 0x0a, 0x1a, + 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0a, 0x64, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91, 0x02, 0x0a, + 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, + 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, + 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x0a, 0x74, 0x6d, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6d, 0x50, 0x75, 0x62, 0x4b, 0x65, + 0x79, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x19, 0x0a, 0x08, + 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, + 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, + 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x45, 0x0a, 0x16, 0x47, 0x65, 0x74, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x22, 0x26, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x14, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, + 0xe2, 0x41, 0x01, 0x02, 0x52, 0x02, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x6e, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x10, + 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x20, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x88, + 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, + 0x65, 0x71, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x4b, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x42, + 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x6f, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, + 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, + 0x6f, 0x72, 0x22, 0x7a, 0x0a, 0x0f, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, + 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x82, + 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x67, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x11, + 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x45, 0x64, 0x67, + 0x65, 0x12, 0x33, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8c, + 0x01, 0x0a, 0x18, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x05, 0x65, + 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x64, + 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, + 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x52, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x02, + 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x88, 0x01, 0x01, + 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x22, 0x35, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x70, 0x6f, 0x63, + 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x6d, 0x0a, 0x12, 0x45, 0x73, 0x74, 0x69, + 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, + 0x64, 0x12, 0x1a, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x18, 0x0a, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x04, 0xe2, 0x41, 0x01, + 0x02, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x32, 0x0a, 0x13, 0x45, 0x73, 0x74, 0x69, 0x6d, + 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, + 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x46, 0x65, 0x65, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0xe7, 0x01, 0x0a, 0x15, + 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, + 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x73, 0x69, 0x64, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, + 0x69, 0x64, 0x65, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, 0x12, + 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x42, + 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x04, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x55, 0x0a, 0x16, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, + 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x37, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x6f, 0x0a, 0x1c, + 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, - 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x67, 0x0a, - 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x11, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, - 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8c, 0x01, 0x0a, 0x18, 0x4e, 0x6f, 0x64, - 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, + 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7b, 0x0a, + 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, + 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x34, 0x0a, 0x1a, 0x47, 0x65, + 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x22, 0x62, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x43, 0x0a, 0x11, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x52, 0x10, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x22, 0x5a, 0x0a, 0x14, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x04, + 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, + 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, + 0x22, 0x91, 0x01, 0x0a, 0x1a, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x3b, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5a, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x22, 0x69, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x63, 0x0a, 0x17, 0x4c, + 0x69, 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x22, 0x59, 0x0a, 0x0e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x45, 0x64, + 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6e, + 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x86, 0x01, 0x0a, 0x15, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, + 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x10, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x36, 0x0a, 0x17, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x15, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, + 0x73, 0x22, 0x5c, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, + 0x67, 0x45, 0x64, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, + 0x67, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, + 0x83, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, + 0x6e, 0x67, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x3a, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x69, 0x73, 0x6b, + 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, + 0x64, 0x22, 0x4b, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0b, 0x72, + 0x69, 0x73, 0x6b, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x52, 0x0a, 0x72, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xa1, + 0x01, 0x0a, 0x16, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x69, + 0x7a, 0x65, 0x22, 0x4b, 0x0a, 0x17, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, + 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, + 0x1f, 0x0a, 0x1d, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, + 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x5f, 0x0a, 0x1e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x76, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x0e, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x22, 0x94, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, + 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, + 0x08, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x60, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, + 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x09, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x09, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5a, 0x0a, 0x0f, 0x4b, 0x65, + 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x64, 0x67, 0x65, 0x12, 0x2f, 0x0a, + 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, + 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x87, 0x01, 0x0a, 0x15, 0x4b, 0x65, 0x79, 0x52, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x36, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x64, 0x67, + 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0x9c, 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, + 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x78, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, + 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0d, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6b, 0x65, 0x79, + 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x1e, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x05, + 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x6a, 0x0a, 0x17, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x64, 0x67, 0x65, 0x12, + 0x37, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, + 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, + 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x65, 0x67, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x33, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x65, 0x67, + 0x61, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x89, 0x01, 0x0a, 0x09, + 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, + 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, + 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x21, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x38, 0x0a, 0x20, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, + 0x65, 0x61, 0x64, 0x79, 0x22, 0x83, 0x02, 0x0a, 0x23, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x72, + 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x42, 0x79, 0x88, 0x01, 0x01, 0x12, 0x40, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x02, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, + 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x98, 0x01, 0x0a, 0x24, 0x4c, + 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, + 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x9f, 0x01, 0x0a, 0x21, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x05, 0x65, + 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x52, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, - 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, - 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x35, 0x0a, 0x10, 0x47, - 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x21, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, - 0x63, 0x68, 0x22, 0x6d, 0x0a, 0x12, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, - 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x05, 0x70, - 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, - 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x73, 0x69, 0x7a, - 0x65, 0x22, 0x32, 0x0a, 0x13, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x46, 0x65, 0x65, - 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0xe7, 0x01, 0x0a, 0x15, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, - 0x74, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x42, 0x04, 0xe2, - 0x41, 0x01, 0x02, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, - 0x1a, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, - 0xe2, 0x41, 0x01, 0x02, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, - 0x55, 0x0a, 0x16, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x6d, 0x61, 0x72, - 0x67, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x73, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x6f, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7b, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x11, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x22, 0x34, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x16, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x62, 0x0a, 0x1b, 0x47, 0x65, - 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x11, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x10, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x22, 0x5a, - 0x0a, 0x14, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x04, 0x6e, 0x6f, - 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x91, 0x01, 0x0a, 0x1a, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x05, 0x65, 0x64, 0x67, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x45, 0x64, 0x67, 0x65, 0x52, - 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5a, - 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x07, 0x61, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x69, 0x0a, 0x16, 0x4c, 0x69, - 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x6f, 0x0a, 0x1b, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x45, 0x64, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x6b, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, + 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x63, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x48, 0x0a, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x0e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x45, 0x64, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x04, - 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, - 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x86, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x35, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6b, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x72, + 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0e, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x72, + 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, + 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, + 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x83, - 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, - 0x65, 0x12, 0x48, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x69, - 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x5c, 0x0a, 0x10, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x64, 0x67, 0x65, 0x12, - 0x30, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x6e, 0x6f, 0x64, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x83, 0x01, 0x0a, 0x10, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, - 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x64, 0x67, 0x65, - 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, - 0x3a, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, - 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x16, 0x47, - 0x65, 0x74, 0x52, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0b, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x66, 0x61, - 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x72, 0x69, - 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xa1, 0x01, 0x0a, 0x16, 0x4f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0e, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x4b, 0x0a, 0x17, - 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5f, 0x0a, 0x1e, 0x4f, 0x62, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0f, - 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x65, 0x64, - 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x6c, 0x65, 0x64, - 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x17, - 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, - 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x60, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, - 0x0a, 0x09, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5a, 0x0a, 0x0f, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x64, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x60, + 0x0a, 0x10, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x45, 0x64, + 0x67, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, - 0x22, 0x87, 0x01, 0x0a, 0x15, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x05, 0x65, 0x64, - 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4b, 0x65, 0x79, 0x52, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, - 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x9c, 0x01, 0x0a, 0x1f, 0x4c, - 0x69, 0x73, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x22, 0x81, 0x02, 0x0a, 0x0e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x6f, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x68, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x3d, 0x0a, 0x1b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x29, + 0x0a, 0x10, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x29, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x73, 0x74, 0x52, + 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x8d, 0x01, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x63, + 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x39, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x73, + 0x77, 0x61, 0x72, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x77, 0x61, 0x72, 0x6d, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x65, + 0x64, 0x22, 0x26, 0x0a, 0x24, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x64, 0x0a, 0x25, 0x4c, 0x69, 0x73, + 0x74, 0x41, 0x6c, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, + 0x2d, 0x0a, 0x2b, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x65, 0x65, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, + 0x0a, 0x2c, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x65, 0x65, 0x72, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0xb0, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x70, 0x66, 0x73, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, + 0x70, 0x66, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, + 0x61, 0x72, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x77, 0x61, 0x72, 0x6d, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x77, 0x61, 0x72, 0x6d, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x73, 0x77, 0x61, 0x72, 0x6d, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x65, 0x64, 0x12, 0x27, 0x0a, + 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x50, 0x65, 0x65, 0x72, 0x73, 0x22, 0x28, 0x0a, 0x26, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x6f, 0x6f, 0x74, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x52, 0x0a, 0x27, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x65, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x62, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, + 0x65, 0x65, 0x72, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x1b, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x6f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2c, + 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x46, 0x0a, 0x13, + 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, + 0x41, 0x01, 0x02, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x61, 0x73, 0x68, 0x22, 0xad, 0x0d, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, + 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x0a, + 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, 0x0e, 0x6c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x0f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x0e, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, + 0x36, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x09, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, + 0x74, 0x65, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x7e, 0x0a, 0x24, 0x65, 0x72, 0x63, + 0x32, 0x30, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, + 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x1f, 0x65, 0x72, 0x63, 0x32, 0x30, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, + 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x26, 0x65, 0x72, + 0x63, 0x32, 0x30, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x52, 0x43, + 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x21, 0x65, + 0x72, 0x63, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, + 0x12, 0x23, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x06, 0x74, + 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0c, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0b, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x6f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x0a, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, + 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x61, + 0x72, 0x74, 0x79, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0d, + 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x0f, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x29, 0x0a, + 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x08, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x77, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, + 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x06, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x12, 0x4b, 0x0a, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, + 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x0b, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x30, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x61, 0x73, 0x69, 0x63, 0x52, 0x05, 0x6e, 0x6f, 0x64, + 0x65, 0x73, 0x12, 0x48, 0x0a, 0x0f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, + 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0e, 0x6e, 0x6f, + 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x12, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x52, 0x11, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0d, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x59, 0x0a, 0x16, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x1b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, + 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x62, 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x1c, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x18, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x73, 0x22, 0x65, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x70, + 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x6e, 0x0a, 0x1e, 0x47, + 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, + 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6b, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, + 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x52, 0x0e, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x22, 0xac, 0x01, 0x0a, 0x0e, + 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x10, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x53, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xbe, 0x01, 0x0a, 0x1a, 0x4c, + 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, + 0x02, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0a, - 0x0a, 0x08, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x0a, 0x20, 0x4c, 0x69, 0x73, - 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, - 0x0d, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, - 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x1e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x64, 0x67, 0x65, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0c, + 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x61, 0x0a, 0x12, 0x46, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x64, 0x67, + 0x65, 0x12, 0x33, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8d, + 0x01, 0x0a, 0x18, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x05, 0x65, + 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x75, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x6a, - 0x0a, 0x17, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x64, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6e, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x6f, - 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, - 0x74, 0x56, 0x65, 0x67, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x33, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x65, 0x67, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x89, 0x01, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0e, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, - 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, - 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x22, 0x21, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x38, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x83, - 0x02, 0x0a, 0x23, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, - 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x62, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, - 0x76, 0x65, 0x64, 0x42, 0x79, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, - 0x65, 0x64, 0x5f, 0x62, 0x79, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x98, 0x01, 0x0a, 0x24, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, - 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x32, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, - 0x9f, 0x01, 0x0a, 0x21, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x64, - 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, - 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x22, 0x6f, 0x0a, 0x1b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x64, 0x67, 0x65, - 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, - 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, - 0x6f, 0x72, 0x22, 0x6b, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, - 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x6b, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0e, - 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, - 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x22, 0x89, 0x01, 0x0a, - 0x16, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, - 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, - 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x60, 0x0a, 0x10, 0x43, 0x6f, 0x72, 0x65, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x45, 0x64, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x04, - 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x72, 0x65, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6e, 0x6f, - 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x81, 0x02, 0x0a, 0x0e, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, - 0x0a, 0x09, 0x74, 0x6f, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x74, 0x6f, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x68, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x1b, 0x70, 0x72, 0x65, - 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, - 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, - 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x61, 0x74, 0x61, - 0x62, 0x61, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x2b, - 0x0a, 0x29, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x8d, 0x01, 0x0a, 0x2a, - 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x73, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x69, - 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x73, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x77, 0x61, 0x72, 0x6d, 0x5f, 0x6b, - 0x65, 0x79, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, - 0x77, 0x61, 0x72, 0x6d, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x65, 0x64, 0x22, 0x26, 0x0a, 0x24, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x64, 0x0a, 0x25, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, - 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x2d, 0x0a, 0x2b, 0x47, 0x65, 0x74, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x50, 0x65, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x2c, 0x47, 0x65, 0x74, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x50, 0x65, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x70, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, - 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x47, - 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xb0, 0x01, - 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x70, 0x66, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x70, 0x66, 0x73, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x72, 0x6d, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x77, 0x61, 0x72, 0x6d, 0x4b, 0x65, - 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x77, 0x61, 0x72, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, - 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x77, 0x61, 0x72, 0x6d, - 0x4b, 0x65, 0x79, 0x53, 0x65, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x73, - 0x22, 0x28, 0x0a, 0x26, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, - 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x65, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x52, 0x0a, 0x27, 0x47, 0x65, - 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, - 0x61, 0x70, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, - 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x65, 0x65, 0x72, 0x73, 0x22, 0x85, - 0x01, 0x0a, 0x1b, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x19, 0x0a, - 0x08, 0x74, 0x6f, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x07, 0x74, 0x6f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2c, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, - 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x46, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, - 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, - 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x22, 0xad, - 0x0d, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, - 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, 0x0e, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x5f, - 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, - 0x48, 0x0a, 0x0f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x62, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x73, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x05, 0x76, 0x6f, - 0x74, 0x65, 0x73, 0x12, 0x7e, 0x0a, 0x24, 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x6d, 0x75, 0x6c, - 0x74, 0x69, 0x5f, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, - 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x52, 0x1f, 0x65, 0x72, 0x63, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, - 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x26, 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x5f, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x72, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x09, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x21, 0x65, 0x72, 0x63, 0x32, 0x30, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x74, 0x72, - 0x61, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, - 0x33, 0x0a, 0x0c, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, - 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, - 0x70, 0x65, 0x63, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x6f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, - 0x25, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x07, 0x70, - 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, - 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x73, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x12, - 0x26, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x07, - 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x29, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, - 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x57, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x14, 0x6c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x6e, 0x6f, - 0x64, 0x65, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x42, 0x61, 0x73, 0x69, 0x63, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x0f, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x19, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x11, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, - 0x0d, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1a, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0c, 0x6b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x59, 0x0a, 0x16, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x5f, - 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, - 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x62, 0x0a, 0x1a, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x18, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, - 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x65, - 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, - 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, - 0x12, 0x19, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x00, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x6e, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, - 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x69, 0x74, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6b, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6b, 0x22, 0xac, 0x01, 0x0a, 0x0e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x66, 0x75, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x65, 0x71, 0x12, 0x1c, - 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xbe, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x70, 0x61, 0x72, - 0x74, 0x79, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x61, 0x0a, 0x12, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x64, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x73, + 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, + 0x10, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x22, 0xde, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5e, 0x0a, 0x11, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x45, 0x64, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x6e, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, + 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8b, 0x01, 0x0a, 0x17, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x38, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x45, + 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0x6f, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x51, 0x0a, 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x75, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8d, 0x01, 0x0a, 0x18, 0x46, 0x75, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, - 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, - 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x73, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, - 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x10, 0x66, 0x75, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x66, 0x75, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xde, 0x01, - 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, - 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3e, - 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, - 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x40, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, - 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x42, - 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5e, - 0x0a, 0x11, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x45, - 0x64, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8b, - 0x01, 0x0a, 0x17, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x05, 0x65, 0x64, - 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x73, 0x22, 0xdd, 0x02, 0x0a, 0x22, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, + 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3e, 0x0a, + 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, + 0x09, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x01, 0x52, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x73, 0x65, 0x71, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x03, 0x73, 0x65, 0x71, 0x88, 0x01, 0x01, + 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x03, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, + 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, + 0x5f, 0x73, 0x65, 0x71, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x70, 0x0a, 0x1a, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, + 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x45, 0x64, 0x67, + 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, + 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x9d, 0x01, 0x0a, 0x20, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x05, 0x65, 0x64, + 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x75, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, - 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x6f, 0x0a, 0x1a, - 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x66, 0x75, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x66, - 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x22, 0xdd, 0x02, - 0x0a, 0x22, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, - 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x2e, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x01, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x48, 0x02, 0x52, 0x03, 0x73, 0x65, 0x71, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x03, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, - 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x73, 0x65, 0x71, 0x42, 0x0d, - 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x70, 0x0a, - 0x1a, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, - 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x45, 0x64, 0x67, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, - 0x74, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, - 0x9d, 0x01, 0x0a, 0x20, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x45, 0x64, 0x67, 0x65, - 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, - 0x95, 0x01, 0x0a, 0x23, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x1a, 0x66, 0x75, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x75, + 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x95, 0x01, 0x0a, 0x23, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, - 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x17, - 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, - 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x52, 0x04, - 0x73, 0x69, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, - 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x72, - 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0d, 0x69, 0x73, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x22, 0xf7, 0x02, 0x0a, 0x17, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, - 0x25, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x6e, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x14, 0x63, 0x6f, - 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x13, 0x63, 0x6f, 0x6c, 0x6c, - 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x5e, 0x0a, 0x2a, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x6f, - 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x25, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x4c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x54, - 0x6f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x88, - 0x01, 0x01, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, - 0x6c, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x2d, 0x0a, 0x2b, 0x5f, - 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x22, 0x9b, 0x01, 0x0a, 0x18, 0x45, - 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, - 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, + 0x1a, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x17, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x0d, 0x0a, + 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, + 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9f, 0x01, 0x0a, + 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x04, 0x73, 0x69, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x53, 0x69, 0x64, 0x65, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, + 0x12, 0x1a, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x09, + 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, + 0x12, 0x2c, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, + 0x0d, 0x69, 0x73, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0xca, + 0x06, 0x0a, 0x17, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, + 0x41, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, + 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x13, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x11, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x3a, + 0x0a, 0x16, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, + 0xe2, 0x41, 0x01, 0x02, 0x52, 0x14, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x17, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, + 0x02, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x1c, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, + 0xe2, 0x41, 0x01, 0x02, 0x52, 0x19, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, + 0x37, 0x0a, 0x0b, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0a, 0x6d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, + 0x01, 0x01, 0x12, 0x79, 0x0a, 0x38, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x32, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x61, 0x72, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x5e, 0x0a, + 0x2a, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x02, 0x52, 0x25, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x54, 0x6f, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, + 0x0e, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, + 0x3b, 0x0a, 0x39, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x42, 0x2d, 0x0a, 0x2b, + 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x22, 0x8a, 0x02, 0x0a, 0x18, + 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x12, 0x6d, 0x0a, 0x1c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, + 0x65, 0x72, 0x61, 0x6c, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x45, 0x73, 0x74, 0x69, + 0x6d, 0x61, 0x74, 0x65, 0x52, 0x1a, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, + 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x6c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x74, 0x0a, 0x0e, 0x4d, 0x61, 0x72, 0x67, - 0x69, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x77, 0x6f, - 0x72, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x73, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x12, 0x2f, 0x0a, - 0x09, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x73, 0x52, 0x08, 0x62, 0x65, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x22, 0x97, - 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x73, - 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x12, 0x40, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x73, 0x74, 0x5f, - 0x63, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x09, 0x77, - 0x6f, 0x72, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x09, 0x62, 0x65, 0x73, 0x74, - 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x08, - 0x62, 0x65, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, - 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x56, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, - 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x69, 0x6e, 0x67, 0x53, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0x22, 0x0a, - 0x20, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x7f, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x18, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x16, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x22, 0xb6, 0x02, 0x0a, 0x0f, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x36, 0x0a, 0x0d, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x65, 0x72, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x42, - 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x52, 0x0c, 0x62, 0x65, 0x6e, 0x65, - 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x65, 0x6e, 0x64, 0x5f, - 0x6f, 0x66, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x65, 0x6e, 0x64, 0x4f, - 0x66, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x36, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x65, 0x72, - 0x52, 0x0c, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x65, 0x72, 0x73, 0x12, 0x1e, - 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x00, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0b, - 0x0a, 0x09, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x77, 0x0a, 0x0b, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0x5b, 0x0a, 0x0f, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, + 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x58, 0x0a, 0x1a, 0x43, 0x6f, 0x6c, 0x6c, + 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x45, 0x73, + 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x73, 0x74, 0x5f, + 0x63, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x73, + 0x74, 0x43, 0x61, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x61, + 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x65, 0x73, 0x74, 0x43, 0x61, + 0x73, 0x65, 0x22, 0x74, 0x0a, 0x0e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x45, 0x73, 0x74, 0x69, + 0x6d, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x73, 0x74, 0x5f, 0x63, 0x61, + 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x09, 0x77, 0x6f, + 0x72, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x62, 0x65, 0x73, 0x74, 0x5f, + 0x63, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x08, + 0x62, 0x65, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, + 0x12, 0x40, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x73, 0x74, 0x43, 0x61, + 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x09, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x08, 0x62, 0x65, 0x73, 0x74, 0x43, 0x61, + 0x73, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x5f, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4f, 0x6e, 0x6c, + 0x79, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x62, + 0x75, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x12, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x13, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x6c, + 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0x22, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7f, 0x0a, 0x21, 0x47, + 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, + 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x5a, 0x0a, 0x18, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x52, 0x16, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x22, 0xb6, 0x02, 0x0a, + 0x0f, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0d, 0x62, 0x65, + 0x6e, 0x65, 0x66, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, + 0x54, 0x69, 0x65, 0x72, 0x52, 0x0c, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, + 0x72, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x61, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x77, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x12, 0x36, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x65, 0x72, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x65, 0x72, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x54, 0x69, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x07, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x6e, 0x64, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, + 0x61, 0x6c, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, + 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x22, 0x5b, 0x0a, 0x0f, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, @@ -25657,7 +28496,7 @@ var file_data_node_api_v2_trading_data_proto_rawDesc = []byte{ 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, - 0x90, 0x02, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, + 0xd4, 0x02, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x12, 0x12, 0x0a, @@ -25672,38 +28511,181 @@ var file_data_node_api_v2_trading_data_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, - 0x75, 0x72, 0x6c, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, - 0x72, 0x6c, 0x22, 0x4d, 0x0a, 0x08, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x12, 0x29, - 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, + 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, + 0x6c, 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, + 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x76, 0x61, 0x74, + 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x4d, 0x0a, 0x08, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x64, + 0x67, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, + 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x79, 0x0a, 0x0e, 0x54, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x64, 0x67, + 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0xba, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, + 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x0d, + 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, + 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x22, 0xe2, 0x01, 0x0a, 0x1a, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x74, 0x65, 0x61, + 0x6d, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x12, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x48, 0x01, 0x52, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, + 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x42, + 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x69, + 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, + 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, + 0x69, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x19, 0x54, 0x65, + 0x61, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, + 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x61, 0x0a, 0x12, 0x54, 0x65, + 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x45, 0x64, 0x67, 0x65, + 0x12, 0x33, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, + 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x84, 0x03, + 0x0a, 0x0e, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, + 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x51, 0x75, + 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, + 0x50, 0x0a, 0x0f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x61, 0x6e, 0x74, + 0x75, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x65, 0x72, 0x45, 0x70, 0x6f, 0x63, + 0x68, 0x52, 0x0e, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x67, 0x61, 0x6d, 0x65, 0x73, + 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x12, + 0x21, 0x0a, 0x0c, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x64, 0x12, 0x50, 0x0a, 0x0f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, + 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x52, 0x0e, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x73, 0x22, 0x62, 0x0a, 0x16, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x65, 0x72, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x71, 0x75, + 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x75, + 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x62, 0x0a, 0x16, 0x51, 0x75, 0x61, 0x6e, + 0x74, 0x75, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x51, 0x75, + 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x22, 0x84, 0x02, 0x0a, + 0x20, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x12, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x88, 0x01, 0x01, 0x12, 0x40, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x02, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, + 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x15, 0x0a, + 0x13, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x75, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, - 0x65, 0x61, 0x6d, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, - 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, - 0x72, 0x22, 0x79, 0x0a, 0x0e, 0x54, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, - 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xba, 0x01, 0x0a, - 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x01, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x48, 0x02, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, - 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, - 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x11, 0x4c, 0x69, 0x73, - 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, - 0x0a, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x1f, 0x54, + 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, + 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x54, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, - 0x74, 0x65, 0x61, 0x6d, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, + 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x73, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, + 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x6d, 0x0a, 0x18, 0x54, 0x65, 0x61, 0x6d, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x45, + 0x64, 0x67, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8c, 0x03, 0x0a, 0x14, 0x54, 0x65, 0x61, 0x6d, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, + 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x76, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x51, + 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x15, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x12, 0x50, 0x0a, 0x0f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x61, 0x6e, + 0x74, 0x75, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x65, 0x72, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x52, 0x0e, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x67, 0x61, 0x6d, 0x65, + 0x73, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, + 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x64, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x0f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x76, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x51, + 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, + 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x0e, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, @@ -25912,956 +28894,1249 @@ var file_data_node_api_v2_trading_data_proto_rawDesc = []byte{ 0x39, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, - 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x2a, 0xaa, 0x01, 0x0a, 0x10, 0x4c, - 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, - 0x22, 0x0a, 0x1e, 0x4c, 0x45, 0x44, 0x47, 0x45, 0x52, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, - 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x26, 0x0a, 0x22, 0x4c, 0x45, 0x44, 0x47, 0x45, 0x52, 0x5f, 0x45, 0x4e, - 0x54, 0x52, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, - 0x54, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x49, 0x44, 0x10, 0x01, 0x12, 0x24, 0x0a, 0x20, 0x4c, - 0x45, 0x44, 0x47, 0x45, 0x52, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, - 0x44, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x49, 0x44, 0x10, - 0x02, 0x12, 0x24, 0x0a, 0x20, 0x4c, 0x45, 0x44, 0x47, 0x45, 0x52, 0x5f, 0x45, 0x4e, 0x54, 0x52, - 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x03, 0x2a, 0xb0, 0x01, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x43, 0x43, 0x4f, - 0x55, 0x4e, 0x54, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x43, 0x43, 0x4f, 0x55, - 0x4e, 0x54, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x49, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, - 0x16, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x50, - 0x41, 0x52, 0x54, 0x59, 0x5f, 0x49, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x43, - 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, - 0x5f, 0x49, 0x44, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, - 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x49, 0x44, - 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x46, 0x49, - 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x05, 0x2a, 0xad, 0x01, 0x0a, 0x11, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x44, 0x49, 0x52, - 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, - 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x46, 0x45, 0x52, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x52, - 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x4f, 0x10, 0x02, 0x12, 0x2a, - 0x0a, 0x26, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x4f, - 0x5f, 0x4f, 0x52, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x10, 0x03, 0x2a, 0xde, 0x02, 0x0a, 0x05, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, - 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, - 0x15, 0x0a, 0x11, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x50, 0x4f, - 0x49, 0x4e, 0x54, 0x53, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, - 0x44, 0x45, 0x4c, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x03, 0x12, 0x10, 0x0a, - 0x0c, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x4c, 0x45, 0x44, 0x47, 0x45, 0x52, 0x10, 0x04, 0x12, - 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x53, 0x10, - 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x45, - 0x53, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x4d, 0x41, 0x52, - 0x4b, 0x45, 0x54, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, - 0x42, 0x4c, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, - 0x53, 0x10, 0x08, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x50, 0x4f, 0x53, - 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x09, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x42, 0x4c, - 0x45, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, - 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x41, 0x42, 0x4c, - 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x53, 0x10, 0x0b, 0x12, 0x12, 0x0a, 0x0e, 0x54, - 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x53, 0x10, 0x0c, 0x12, - 0x15, 0x0a, 0x11, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, - 0x57, 0x41, 0x4c, 0x53, 0x10, 0x0d, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, - 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x41, 0x42, 0x4c, - 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x53, 0x10, 0x0f, 0x32, 0x86, 0x6e, 0x0a, 0x12, - 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x0d, 0x92, 0x41, 0x0a, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x75, - 0x0a, 0x0f, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x92, 0x41, 0x0a, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x30, 0x01, 0x12, 0x5a, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, + 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, 0x7f, 0x0a, 0x20, 0x4f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, + 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x68, 0x61, 0x73, + 0x68, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x77, 0x0a, 0x21, 0x4f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x52, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x22, 0xd0, 0x01, 0x0a, 0x1a, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, + 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x11, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x1b, 0x45, 0x73, 0x74, 0x69, 0x6d, + 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x5a, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, + 0x22, 0x4c, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb9, + 0x02, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x07, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x67, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x46, 0x72, + 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x74, + 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x07, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x54, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x48, 0x03, + 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x04, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, + 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0d, + 0x0a, 0x0b, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x42, 0x0b, 0x0a, + 0x09, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x74, 0x6f, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x0a, 0x11, 0x4c, 0x69, + 0x73, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x36, 0x0a, 0x05, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x05, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x7a, 0x0a, 0x0f, 0x47, 0x61, 0x6d, 0x65, 0x73, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x64, + 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x61, 0x6d, 0x65, + 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x22, 0x4d, 0x0a, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, + 0x29, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x61, + 0x47, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, + 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, + 0x6f, 0x72, 0x22, 0x88, 0x02, 0x0a, 0x04, 0x47, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, + 0x68, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, + 0x70, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x49, + 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x47, + 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x69, + 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, + 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x47, 0x0a, + 0x10, 0x54, 0x65, 0x61, 0x6d, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x33, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x5f, 0x0a, 0x16, 0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, + 0x64, 0x75, 0x61, 0x6c, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x12, 0x45, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, + 0x6c, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x69, 0x6e, 0x64, + 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x22, 0xff, 0x02, 0x0a, 0x0e, 0x54, 0x65, 0x61, 0x6d, + 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x65, + 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x47, + 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, + 0x0c, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x23, 0x0a, + 0x0d, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x61, 0x72, 0x6e, + 0x65, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x5f, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x45, 0x61, + 0x72, 0x6e, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x65, + 0x61, 0x72, 0x6e, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x61, 0x72, 0x6e, 0x65, + 0x64, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x12, 0x3f, 0x0a, 0x1c, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, + 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x45, 0x61, 0x72, 0x6e, + 0x65, 0x64, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x22, 0x8c, 0x01, 0x0a, 0x15, 0x54, 0x65, + 0x61, 0x6d, 0x47, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x15, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, + 0x61, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x92, 0x41, 0x12, 0x0a, - 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x5c, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x20, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x62, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x22, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x12, 0x77, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x52, 0x14, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, + 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x22, 0xe9, 0x02, 0x0a, 0x14, 0x49, 0x6e, 0x64, + 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, + 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x39, 0x0a, + 0x0d, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, + 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0c, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x5f, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x12, 0x30, 0x0a, + 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x65, + 0x61, 0x72, 0x6e, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x45, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x12, + 0x32, 0x0a, 0x15, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, + 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x51, 0x75, 0x61, 0x6e, + 0x74, 0x75, 0x6d, 0x12, 0x3f, 0x0a, 0x1c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x5f, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x61, 0x6e, + 0x74, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x45, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x51, 0x75, 0x61, + 0x6e, 0x74, 0x75, 0x6d, 0x22, 0xcb, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, + 0x74, 0x79, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x79, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4d, + 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x59, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, + 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x90, 0x01, + 0x0a, 0x1a, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, + 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x05, + 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, + 0x72, 0x74, 0x79, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x45, 0x64, 0x67, + 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0x63, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, + 0x6f, 0x64, 0x65, 0x45, 0x64, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4d, 0x61, 0x72, + 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, + 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x99, 0x03, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4d, + 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, + 0x64, 0x12, 0x31, 0x0a, 0x0b, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6d, + 0x61, 0x72, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x46, + 0x0a, 0x1d, 0x6d, 0x69, 0x6e, 0x5f, 0x74, 0x68, 0x65, 0x6f, 0x72, 0x65, 0x74, 0x69, 0x63, 0x61, + 0x6c, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x1a, 0x6d, 0x69, 0x6e, 0x54, 0x68, 0x65, 0x6f, + 0x72, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x68, + 0x65, 0x6f, 0x72, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, + 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x54, + 0x68, 0x65, 0x6f, 0x72, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, + 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, + 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, + 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x42, 0x20, 0x0a, 0x1e, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x74, 0x68, 0x65, 0x6f, 0x72, + 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x68, 0x65, + 0x6f, 0x72, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, + 0x65, 0x2a, 0xaa, 0x01, 0x0a, 0x10, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x22, 0x0a, 0x1e, 0x4c, 0x45, 0x44, 0x47, 0x45, 0x52, + 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x26, 0x0a, 0x22, 0x4c, 0x45, + 0x44, 0x47, 0x45, 0x52, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, + 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x49, 0x44, + 0x10, 0x01, 0x12, 0x24, 0x0a, 0x20, 0x4c, 0x45, 0x44, 0x47, 0x45, 0x52, 0x5f, 0x45, 0x4e, 0x54, + 0x52, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, + 0x5f, 0x54, 0x4f, 0x5f, 0x49, 0x44, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x4c, 0x45, 0x44, 0x47, + 0x45, 0x52, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, + 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x03, 0x2a, 0xb0, + 0x01, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, + 0x1d, 0x0a, 0x19, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, + 0x0a, 0x10, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, + 0x49, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, + 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x59, 0x5f, 0x49, 0x44, 0x10, 0x02, + 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x46, 0x49, 0x45, 0x4c, + 0x44, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x49, 0x44, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, + 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x4d, 0x41, + 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x49, 0x44, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x43, + 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, + 0x05, 0x2a, 0xad, 0x01, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x52, 0x41, 0x4e, 0x53, + 0x46, 0x45, 0x52, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x54, + 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x10, + 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x44, 0x49, + 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, + 0x5f, 0x54, 0x4f, 0x10, 0x02, 0x12, 0x2a, 0x0a, 0x26, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, + 0x52, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x4e, + 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x4f, 0x5f, 0x4f, 0x52, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x10, + 0x03, 0x2a, 0xde, 0x02, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x54, + 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x42, 0x41, 0x4c, 0x41, + 0x4e, 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, + 0x43, 0x48, 0x45, 0x43, 0x4b, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x53, 0x10, 0x02, 0x12, 0x15, 0x0a, + 0x11, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x53, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x4c, 0x45, + 0x44, 0x47, 0x45, 0x52, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x53, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x42, 0x4c, + 0x45, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x45, 0x53, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, + 0x42, 0x4c, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, + 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, + 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x53, 0x10, 0x08, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x41, + 0x42, 0x4c, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x09, 0x12, + 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, + 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x0a, 0x12, + 0x11, 0x0a, 0x0d, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x53, + 0x10, 0x0b, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x44, 0x45, 0x50, 0x4f, + 0x53, 0x49, 0x54, 0x53, 0x10, 0x0c, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, + 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x41, 0x4c, 0x53, 0x10, 0x0d, 0x12, 0x10, 0x0a, + 0x0c, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x10, 0x0e, 0x12, + 0x11, 0x0a, 0x0d, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x53, + 0x10, 0x0f, 0x32, 0xab, 0x76, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x0c, 0x4c, 0x69, 0x73, + 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x92, 0x41, 0x0a, 0x0a, 0x08, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x75, 0x0a, 0x0f, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x92, 0x41, 0x0a, + 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x30, 0x01, 0x12, 0x5a, 0x0a, 0x04, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x15, 0x92, 0x41, 0x12, 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x62, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x6d, 0x0a, 0x0d, - 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x25, 0x2e, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, + 0x41, 0x08, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x77, 0x0a, 0x11, 0x4c, 0x69, + 0x73, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x73, 0x12, 0x6d, 0x0a, 0x0d, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x30, 0x01, 0x12, 0x68, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x6e, 0x0a, 0x0e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x26, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, + 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x71, 0x0a, 0x0d, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, - 0x08, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x30, 0x01, 0x12, 0x68, 0x0a, 0x0c, 0x47, - 0x65, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x24, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x6e, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, - 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, - 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x71, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x88, 0x02, + 0x01, 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x77, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x88, 0x02, 0x01, 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x77, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x79, 0x0a, 0x10, 0x4f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x79, 0x0a, 0x10, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, 0x41, 0x0b, 0x0a, - 0x09, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x30, 0x01, 0x12, 0x7f, 0x0a, 0x11, - 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, - 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, + 0x73, 0x30, 0x01, 0x12, 0x7f, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, + 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x13, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x20, 0x65, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x12, 0x6f, 0x0a, 0x13, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, + 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x13, + 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x20, 0x65, 0x6e, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x30, 0x01, 0x12, 0x7c, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x92, 0x41, 0x0a, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x12, 0x7e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, + 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, + 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x74, 0x65, + 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x4c, - 0x65, 0x64, 0x67, 0x65, 0x72, 0x20, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x6f, 0x0a, - 0x13, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, 0x64, - 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, - 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x13, 0x92, 0x41, 0x10, 0x0a, 0x0e, 0x4c, 0x65, - 0x64, 0x67, 0x65, 0x72, 0x20, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x30, 0x01, 0x12, 0x7c, - 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x92, - 0x41, 0x0a, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x7e, 0x0a, 0x13, - 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, - 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x81, 0x01, 0x0a, - 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x74, 0x65, - 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, - 0x12, 0x81, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4c, + 0x69, 0x73, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, + 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, + 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x13, + 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, + 0x70, 0x74, 0x68, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, + 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x30, 0x01, 0x12, 0x95, + 0x01, 0x0a, 0x1a, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x32, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, + 0x70, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x33, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x13, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, 0x12, 0x2b, 0x2e, 0x64, + 0x6b, 0x65, 0x74, 0x73, 0x30, 0x01, 0x12, 0x7d, 0x0a, 0x12, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, - 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, 0x70, - 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, 0x52, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x30, 0x01, 0x12, 0x8d, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, + 0x49, 0x44, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x73, 0x30, 0x01, 0x12, 0x95, 0x01, 0x0a, 0x1a, 0x4f, 0x62, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x32, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x65, 0x70, 0x74, 0x68, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x30, 0x01, 0x12, - 0x7d, 0x0a, 0x12, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, - 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x30, 0x01, 0x12, 0x8d, - 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, - 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, 0x44, 0x12, 0x30, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, - 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x6e, - 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, - 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x6e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, - 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x68, - 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x23, 0x2e, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x75, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, - 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, - 0x6f, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, - 0x12, 0x7a, 0x0a, 0x11, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x43, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x43, + 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x68, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x0e, 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, + 0x75, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x6f, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, - 0x09, 0x0a, 0x07, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x30, 0x01, 0x12, 0x7e, 0x0a, 0x13, - 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, - 0x92, 0x41, 0x09, 0x0a, 0x07, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x63, 0x0a, 0x09, - 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x0f, 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, - 0x65, 0x12, 0x6e, 0x0a, 0x0c, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x56, 0x6f, 0x74, 0x65, - 0x73, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, + 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x7a, 0x0a, 0x11, 0x4f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x29, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, - 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x30, - 0x01, 0x12, 0xb3, 0x01, 0x0a, 0x23, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, - 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x3b, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, - 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x45, 0x52, 0x43, 0x32, 0x30, - 0x20, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0xb9, 0x01, 0x0a, 0x25, 0x4c, 0x69, 0x73, 0x74, - 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, - 0x73, 0x12, 0x3d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x3e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x65, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x73, 0x30, 0x01, 0x12, 0x7e, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x43, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x73, 0x12, 0x63, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x73, + 0x12, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x47, 0x6f, + 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x6e, 0x0a, 0x0c, 0x4f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x47, 0x6f, 0x76, 0x65, + 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x30, 0x01, 0x12, 0xb3, 0x01, 0x0a, 0x23, 0x4c, 0x69, 0x73, + 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, + 0x12, 0x3b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, + 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x92, 0x41, 0x0e, + 0x0a, 0x0c, 0x45, 0x52, 0x43, 0x32, 0x30, 0x20, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0xb9, + 0x01, 0x0a, 0x25, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x11, 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x45, 0x52, 0x43, 0x32, 0x30, 0x20, 0x62, 0x72, 0x69, - 0x64, 0x67, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, - 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, - 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x30, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x11, 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x45, 0x52, 0x43, 0x32, 0x30, 0x20, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, - 0x32, 0x30, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, - 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x34, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, + 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x52, + 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x45, 0x52, + 0x43, 0x32, 0x30, 0x20, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, - 0x30, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, - 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x11, 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x45, 0x52, 0x43, 0x32, 0x30, 0x20, - 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x45, 0x52, - 0x43, 0x32, 0x30, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x41, 0x70, 0x70, - 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x32, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, - 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x45, - 0x52, 0x43, 0x32, 0x30, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x41, 0x70, - 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, - 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x45, 0x52, 0x43, 0x32, 0x30, 0x20, 0x62, 0x72, 0x69, 0x64, 0x67, - 0x65, 0x12, 0x68, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, - 0x65, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, - 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, - 0x92, 0x41, 0x08, 0x0a, 0x06, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x62, 0x0a, 0x0a, 0x4c, - 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, - 0x6d, 0x0a, 0x0d, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, - 0x12, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x30, 0x01, 0x12, 0x71, - 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, - 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, - 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x12, 0x77, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, - 0x70, 0x65, 0x63, 0x73, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x44, 0x61, - 0x74, 0x61, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x74, 0x0a, 0x0e, 0x4c, 0x69, - 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x92, - 0x41, 0x0e, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x12, 0x60, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x21, 0x2e, + 0x30, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, + 0x32, 0x30, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x92, 0x41, 0x0e, 0x0a, 0x0c, + 0x45, 0x52, 0x43, 0x32, 0x30, 0x20, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0x9e, 0x01, 0x0a, + 0x1c, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x34, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x73, 0x12, 0x66, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x73, 0x12, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, - 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x4c, - 0x69, 0x73, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, - 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x5d, - 0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x12, 0x20, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, + 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x65, + 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x75, 0x6e, 0x64, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x92, 0x41, 0x0e, 0x0a, + 0x0c, 0x45, 0x52, 0x43, 0x32, 0x30, 0x20, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0x98, 0x01, + 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x32, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x66, 0x0a, - 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x50, 0x61, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x7b, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x72, - 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, - 0x92, 0x41, 0x0f, 0x0a, 0x0d, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x20, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x73, 0x12, 0x86, 0x01, 0x0a, 0x13, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, - 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, + 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x33, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x52, 0x43, 0x32, 0x30, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x45, 0x52, 0x43, 0x32, + 0x30, 0x20, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0x68, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4c, + 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, + 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x54, 0x72, 0x61, 0x64, + 0x65, 0x73, 0x12, 0x62, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, + 0x12, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x6d, 0x0a, 0x0d, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x92, 0x41, 0x0f, 0x0a, 0x0d, 0x4d, 0x61, 0x72, 0x67, - 0x69, 0x6e, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x30, 0x01, 0x12, 0x66, 0x0a, 0x0b, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x23, 0x2e, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x54, 0x72, 0x61, + 0x64, 0x65, 0x73, 0x30, 0x01, 0x12, 0x71, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, + 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x77, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, + 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x12, 0x27, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, + 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x12, 0x74, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x20, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x60, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, + 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x66, 0x0a, 0x0b, 0x4c, 0x69, 0x73, + 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x12, 0x7e, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, + 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x5d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, + 0x79, 0x12, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x50, 0x61, 0x72, + 0x74, 0x69, 0x65, 0x73, 0x12, 0x66, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, + 0x92, 0x41, 0x09, 0x0a, 0x07, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x7e, 0x0a, 0x13, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, + 0x92, 0x41, 0x09, 0x0a, 0x07, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x74, 0x0a, 0x10, + 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, + 0x12, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x74, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x12, 0x7f, 0x0a, 0x13, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, + 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x30, 0x01, 0x12, 0x66, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x12, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x70, 0x6f, 0x63, - 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, - 0x12, 0x30, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x12, 0x62, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x12, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, - 0x06, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x68, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x12, 0x6b, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x61, 0x6c, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x57, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x71, - 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, - 0x73, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x74, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, + 0x41, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x7e, 0x0a, 0x13, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, + 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, + 0x41, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x18, + 0x4c, 0x69, 0x73, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x12, 0x5c, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x20, 0x2e, + 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, + 0x41, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x62, 0x0a, 0x0a, 0x47, + 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, - 0x62, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x22, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x30, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x11, 0x88, 0x02, 0x01, 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x95, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, - 0x6c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4c, 0x69, + 0x68, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, + 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, + 0x08, 0x0a, 0x06, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x6b, 0x0a, 0x0d, 0x47, 0x65, 0x74, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x71, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, + 0x08, 0x0a, 0x06, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x5c, 0x0a, 0x08, 0x47, 0x65, 0x74, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, + 0x06, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x62, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, + 0x92, 0x41, 0x08, 0x0a, 0x06, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x17, + 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x6c, 0x6c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, - 0x41, 0x0b, 0x0a, 0x09, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x97, 0x01, - 0x0a, 0x1a, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x88, 0x02, 0x01, 0x92, + 0x41, 0x0b, 0x0a, 0x09, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x95, 0x01, + 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, - 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x30, 0x01, 0x12, 0x89, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, - 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x12, 0x86, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x69, 0x64, - 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x12, 0x2d, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x97, 0x01, 0x0a, 0x1a, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, + 0x41, 0x0b, 0x0a, 0x09, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x30, 0x01, 0x12, + 0x89, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, 0x41, 0x0b, + 0x0a, 0x09, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x86, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x64, + 0x79, 0x46, 0x65, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x69, 0x64, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x69, 0x64, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x12, 0x7b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, + 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x47, + 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, + 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x0f, 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, + 0x65, 0x12, 0x7e, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, + 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6f, + 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, + 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x0f, 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, + 0x65, 0x12, 0x7d, 0x0a, 0x11, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x47, 0x6f, 0x76, 0x65, + 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x47, 0x6f, 0x76, 0x65, 0x72, + 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x92, + 0x41, 0x0c, 0x0a, 0x0a, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x30, 0x01, + 0x12, 0x72, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x46, 0x65, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, 0x41, - 0x0b, 0x0a, 0x09, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x7b, 0x0a, 0x11, - 0x47, 0x65, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x47, - 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x12, 0x4c, 0x69, 0x73, - 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x47, - 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x7d, 0x0a, 0x11, 0x4f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x29, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x92, 0x41, 0x0c, 0x0a, 0x0a, 0x47, 0x6f, 0x76, 0x65, - 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x30, 0x01, 0x12, 0x72, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, - 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x6f, 0x0a, 0x0e, - 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, + 0x69, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x6f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x5a, 0x0a, - 0x07, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, - 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x60, 0x0a, 0x09, 0x4c, 0x69, 0x73, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, - 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x80, 0x01, 0x0a, 0x12, - 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x5a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x12, 0x60, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x92, 0x41, 0x0e, - 0x0a, 0x0c, 0x45, 0x52, 0x43, 0x32, 0x30, 0x20, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0x5d, - 0x0a, 0x08, 0x47, 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, - 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x65, 0x0a, - 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x23, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, - 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x6e, 0x0a, 0x0e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, - 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, - 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x12, 0x80, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x11, 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x45, 0x52, 0x43, 0x32, 0x30, 0x20, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0x5d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x12, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x65, 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, + 0x65, 0x46, 0x65, 0x65, 0x12, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, + 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x73, 0x74, 0x69, + 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x71, 0x0a, 0x0e, + 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x77, 0x0a, 0x10, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, - 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, - 0x41, 0x0b, 0x0a, 0x09, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x84, 0x01, - 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x7e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, + 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x0e, 0x88, 0x02, 0x01, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, + 0x77, 0x0a, 0x10, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x72, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, - 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x5d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x12, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x6f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x69, - 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, - 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x75, 0x0a, 0x0f, 0x4f, 0x62, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x73, 0x12, 0x27, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x42, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, - 0x92, 0x41, 0x08, 0x0a, 0x06, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x28, 0x01, 0x30, 0x01, 0x12, - 0x92, 0x01, 0x0a, 0x16, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x64, 0x67, 0x65, - 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x92, 0x41, 0x12, - 0x0a, 0x10, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x20, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x30, 0x01, 0x12, 0x75, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, - 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, - 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x8d, 0x01, 0x0a, 0x18, - 0x4c, 0x69, 0x73, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, + 0x72, 0x73, 0x12, 0x2d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, + 0x7e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, + 0x72, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x12, 0x5d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, + 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x12, 0x6f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x69, 0x73, 0x6b, 0x46, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x12, 0x75, 0x0a, 0x0f, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x42, 0x75, 0x73, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x28, 0x01, 0x30, 0x01, 0x12, 0x92, 0x01, 0x0a, 0x16, 0x4f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x4c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x92, 0x41, 0x12, 0x0a, 0x10, 0x4c, 0x65, 0x64, + 0x67, 0x65, 0x72, 0x20, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x30, 0x01, 0x12, + 0x75, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x8d, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, - 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x66, 0x0a, 0x0b, 0x47, - 0x65, 0x74, 0x56, 0x65, 0x67, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x2e, 0x64, 0x61, 0x74, + 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x66, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x56, 0x65, 0x67, + 0x61, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x67, 0x61, 0x54, + 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, - 0x56, 0x65, 0x67, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x67, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x12, 0x8d, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x30, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, - 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x12, 0x99, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x73, 0x12, 0x34, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x56, 0x65, 0x67, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x8d, + 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x30, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, - 0x78, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x72, 0x65, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x99, + 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, + 0x34, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, + 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x78, 0x0a, 0x11, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, + 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, - 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0xb3, 0x01, 0x0a, 0x22, 0x47, 0x65, + 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x12, 0xb3, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x73, 0x74, + 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x3a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, - 0x65, 0x74, 0x4d, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x92, 0x41, 0x11, 0x0a, 0x0f, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, - 0xa4, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x35, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x6c, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x14, 0x92, 0x41, 0x11, 0x0a, 0x0f, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x68, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0xb9, 0x01, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x73, + 0x74, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x92, 0x41, 0x11, 0x0a, 0x0f, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x20, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0xa4, 0x01, 0x0a, 0x1d, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x35, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x92, 0x41, 0x11, + 0x0a, 0x0f, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x79, 0x12, 0xb9, 0x01, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x65, 0x65, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x3c, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x50, 0x65, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x50, 0x65, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, - 0x3c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x65, 0x65, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x65, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x92, 0x41, + 0x72, 0x79, 0x50, 0x65, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x92, 0x41, 0x11, 0x0a, 0x0f, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x92, 0x01, + 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x92, 0x41, 0x11, 0x0a, 0x0f, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x68, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x12, 0x92, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2f, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x30, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x14, 0x92, 0x41, 0x11, 0x0a, 0x0f, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, - 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0xaa, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x6f, 0x6f, - 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x37, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, - 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x72, 0x79, 0x12, 0xaa, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, - 0x92, 0x41, 0x11, 0x0a, 0x0f, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x68, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x12, 0x6a, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, - 0x74, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x0d, 0x92, 0x41, 0x0a, 0x0a, 0x08, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, - 0x12, 0x7b, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x96, 0x01, - 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x33, 0x2e, + 0x70, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x37, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x38, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x65, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x92, 0x41, 0x11, 0x0a, 0x0f, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, + 0x6a, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x92, 0x41, + 0x0a, 0x0a, 0x08, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x12, 0x7b, 0x0a, 0x12, 0x4c, + 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x73, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x7e, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x2e, + 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, + 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, + 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x33, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x90, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x61, - 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6b, 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x15, 0x92, 0x41, 0x12, 0x0a, 0x10, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, - 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x99, 0x01, 0x0a, 0x19, 0x47, 0x65, - 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, - 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, - 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, - 0x92, 0x41, 0x12, 0x0a, 0x10, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x20, 0x70, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x7e, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, - 0x61, 0x6c, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, - 0x92, 0x41, 0x12, 0x0a, 0x10, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x20, 0x70, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x93, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, - 0x73, 0x12, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, - 0x53, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, - 0x6c, 0x53, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x92, 0x41, 0x12, 0x0a, 0x10, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x72, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x87, 0x01, 0x0a, 0x13, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, - 0x6c, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, - 0x92, 0x41, 0x12, 0x0a, 0x10, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x20, 0x70, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x5e, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, - 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0a, 0x92, 0x41, 0x07, 0x0a, 0x05, - 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x73, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, - 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x12, 0x7e, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x12, 0x90, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x12, 0x2e, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x92, + 0x41, 0x12, 0x0a, 0x10, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x12, 0x99, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x61, 0x6d, 0x12, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x92, 0x41, 0x12, 0x0a, 0x10, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x12, 0x7e, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, + 0x53, 0x65, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x92, 0x41, 0x12, 0x0a, 0x10, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x12, 0x93, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, + 0x6c, 0x53, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x15, 0x92, 0x41, 0x12, 0x0a, 0x10, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x20, 0x70, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x87, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2b, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x92, 0x41, 0x12, 0x0a, 0x10, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x12, 0x5e, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0a, 0x92, 0x41, 0x07, 0x0a, 0x05, 0x54, 0x65, 0x61, 0x6d, 0x73, + 0x12, 0x7c, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, + 0x61, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x0a, 0x92, 0x41, 0x07, 0x0a, 0x05, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x8e, + 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x31, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x32, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x0a, 0x92, 0x41, 0x07, 0x0a, 0x05, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, + 0x73, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0a, - 0x92, 0x41, 0x07, 0x0a, 0x05, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x16, 0x4c, - 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x48, 0x69, - 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0a, 0x92, 0x41, 0x07, 0x0a, 0x05, 0x54, 0x65, 0x61, - 0x6d, 0x73, 0x12, 0x66, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x65, - 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x09, 0x92, 0x41, 0x06, 0x0a, 0x04, 0x46, 0x65, 0x65, 0x73, 0x12, 0x7e, 0x0a, 0x14, 0x47, 0x65, - 0x74, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x50, 0x61, 0x72, - 0x74, 0x79, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0a, 0x92, 0x41, 0x07, 0x0a, 0x05, 0x54, + 0x65, 0x61, 0x6d, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, + 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, + 0x2e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x0a, 0x92, 0x41, 0x07, 0x0a, 0x05, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x66, 0x0a, 0x0c, + 0x47, 0x65, 0x74, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, + 0x65, 0x74, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x46, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x46, - 0x6f, 0x72, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x09, 0x92, 0x41, 0x06, 0x0a, 0x04, 0x46, 0x65, 0x65, 0x73, 0x12, 0xb2, 0x01, 0x0a, 0x1f, 0x47, - 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x37, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1c, 0x92, 0x41, 0x19, 0x0a, 0x17, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x20, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, - 0x97, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x61, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x09, 0x92, 0x41, 0x06, 0x0a, 0x04, + 0x46, 0x65, 0x65, 0x73, 0x12, 0x7e, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x46, 0x65, 0x65, 0x73, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x74, 0x79, 0x12, 0x2c, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, + 0x65, 0x74, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x50, 0x61, + 0x72, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x92, 0x41, 0x19, + 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x74, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x09, 0x92, 0x41, 0x06, 0x0a, 0x04, + 0x46, 0x65, 0x65, 0x73, 0x12, 0xb2, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x37, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x38, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x92, 0x41, 0x19, 0x0a, 0x17, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x90, 0x01, 0x0a, 0x19, 0x47, 0x65, - 0x74, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, - 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, - 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, - 0x92, 0x41, 0x09, 0x0a, 0x07, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x81, 0x01, 0x0a, - 0x14, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, - 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x12, 0x72, 0x0a, 0x14, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, - 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x14, 0x92, 0x41, - 0x11, 0x0a, 0x0f, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x68, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x30, 0x01, 0x12, 0x4e, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x09, 0x92, 0x41, 0x06, 0x0a, 0x04, - 0x4d, 0x69, 0x73, 0x63, 0x42, 0xc6, 0x01, 0x5a, 0x31, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, - 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x6e, - 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x92, 0x41, 0x8f, 0x01, 0x12, 0x1e, - 0x0a, 0x13, 0x56, 0x65, 0x67, 0x61, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6e, 0x6f, 0x64, 0x65, - 0x20, 0x41, 0x50, 0x49, 0x73, 0x32, 0x07, 0x76, 0x30, 0x2e, 0x37, 0x33, 0x2e, 0x30, 0x1a, 0x1c, - 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x65, 0x73, 0x74, - 0x6e, 0x65, 0x74, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x78, 0x79, 0x7a, 0x2a, 0x02, 0x01, 0x02, - 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, - 0x6f, 0x6e, 0x52, 0x39, 0x0a, 0x03, 0x35, 0x30, 0x30, 0x12, 0x32, 0x0a, 0x18, 0x41, 0x6e, 0x20, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x97, 0x01, 0x0a, 0x16, 0x47, 0x65, + 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x92, 0x41, 0x19, 0x0a, 0x17, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x67, + 0x72, 0x61, 0x6d, 0x12, 0x90, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x56, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x12, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, 0x09, 0x0a, 0x07, 0x56, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x61, + 0x72, 0x74, 0x79, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, + 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0x41, + 0x09, 0x0a, 0x07, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x9e, 0x01, 0x0a, 0x19, 0x4f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x31, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x18, 0x92, 0x41, 0x15, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x30, 0x01, 0x12, 0x80, 0x01, 0x0a, 0x13, + 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x46, 0x65, 0x65, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, + 0x92, 0x41, 0x0b, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x98, + 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x46, 0x65, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x92, 0x41, 0x0b, 0x0a, 0x09, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x5e, 0x0a, 0x09, 0x4c, 0x69, 0x73, + 0x74, 0x47, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x61, 0x6d, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x47, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0a, 0x92, + 0x41, 0x07, 0x0a, 0x05, 0x47, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, + 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x0b, 0x92, 0x41, 0x08, 0x0a, 0x06, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x72, 0x0a, 0x14, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x14, 0x92, 0x41, 0x11, 0x0a, 0x0f, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x30, 0x01, + 0x12, 0x4e, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x09, 0x92, 0x41, 0x06, 0x0a, 0x04, 0x4d, 0x69, 0x73, 0x63, + 0x42, 0xc6, 0x01, 0x5a, 0x31, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x92, 0x41, 0x8f, 0x01, 0x12, 0x1e, 0x0a, 0x13, 0x56, 0x65, + 0x67, 0x61, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x41, 0x50, 0x49, + 0x73, 0x32, 0x07, 0x76, 0x30, 0x2e, 0x37, 0x34, 0x2e, 0x30, 0x1a, 0x1c, 0x68, 0x74, 0x74, 0x70, + 0x73, 0x3a, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x78, 0x79, 0x7a, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x39, + 0x0a, 0x03, 0x35, 0x30, 0x30, 0x12, 0x32, 0x0a, 0x18, 0x41, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -26876,1095 +30151,1200 @@ func file_data_node_api_v2_trading_data_proto_rawDescGZIP() []byte { return file_data_node_api_v2_trading_data_proto_rawDescData } -var file_data_node_api_v2_trading_data_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_data_node_api_v2_trading_data_proto_msgTypes = make([]protoimpl.MessageInfo, 372) +var file_data_node_api_v2_trading_data_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_data_node_api_v2_trading_data_proto_msgTypes = make([]protoimpl.MessageInfo, 410) var file_data_node_api_v2_trading_data_proto_goTypes = []interface{}{ (LedgerEntryField)(0), // 0: datanode.api.v2.LedgerEntryField (AccountField)(0), // 1: datanode.api.v2.AccountField (TransferDirection)(0), // 2: datanode.api.v2.TransferDirection (Table)(0), // 3: datanode.api.v2.Table - (ListGovernanceDataRequest_Type)(0), // 4: datanode.api.v2.ListGovernanceDataRequest.Type - (*Pagination)(nil), // 5: datanode.api.v2.Pagination - (*PageInfo)(nil), // 6: datanode.api.v2.PageInfo - (*GetPartyVestingStatsRequest)(nil), // 7: datanode.api.v2.GetPartyVestingStatsRequest - (*GetPartyVestingStatsResponse)(nil), // 8: datanode.api.v2.GetPartyVestingStatsResponse - (*GetVestingBalancesSummaryRequest)(nil), // 9: datanode.api.v2.GetVestingBalancesSummaryRequest - (*GetVestingBalancesSummaryResponse)(nil), // 10: datanode.api.v2.GetVestingBalancesSummaryResponse - (*AccountBalance)(nil), // 11: datanode.api.v2.AccountBalance - (*ListAccountsRequest)(nil), // 12: datanode.api.v2.ListAccountsRequest - (*ListAccountsResponse)(nil), // 13: datanode.api.v2.ListAccountsResponse - (*AccountsConnection)(nil), // 14: datanode.api.v2.AccountsConnection - (*AccountEdge)(nil), // 15: datanode.api.v2.AccountEdge - (*ObserveAccountsRequest)(nil), // 16: datanode.api.v2.ObserveAccountsRequest - (*ObserveAccountsResponse)(nil), // 17: datanode.api.v2.ObserveAccountsResponse - (*AccountSnapshotPage)(nil), // 18: datanode.api.v2.AccountSnapshotPage - (*AccountUpdates)(nil), // 19: datanode.api.v2.AccountUpdates - (*InfoRequest)(nil), // 20: datanode.api.v2.InfoRequest - (*InfoResponse)(nil), // 21: datanode.api.v2.InfoResponse - (*GetOrderRequest)(nil), // 22: datanode.api.v2.GetOrderRequest - (*GetOrderResponse)(nil), // 23: datanode.api.v2.GetOrderResponse - (*OrderFilter)(nil), // 24: datanode.api.v2.OrderFilter - (*ListOrdersRequest)(nil), // 25: datanode.api.v2.ListOrdersRequest - (*ListOrdersResponse)(nil), // 26: datanode.api.v2.ListOrdersResponse - (*ListOrderVersionsRequest)(nil), // 27: datanode.api.v2.ListOrderVersionsRequest - (*ListOrderVersionsResponse)(nil), // 28: datanode.api.v2.ListOrderVersionsResponse - (*ObserveOrdersRequest)(nil), // 29: datanode.api.v2.ObserveOrdersRequest - (*ObserveOrdersResponse)(nil), // 30: datanode.api.v2.ObserveOrdersResponse - (*OrderSnapshotPage)(nil), // 31: datanode.api.v2.OrderSnapshotPage - (*OrderUpdates)(nil), // 32: datanode.api.v2.OrderUpdates - (*GetStopOrderRequest)(nil), // 33: datanode.api.v2.GetStopOrderRequest - (*GetStopOrderResponse)(nil), // 34: datanode.api.v2.GetStopOrderResponse - (*ListStopOrdersRequest)(nil), // 35: datanode.api.v2.ListStopOrdersRequest - (*StopOrderFilter)(nil), // 36: datanode.api.v2.StopOrderFilter - (*StopOrderEdge)(nil), // 37: datanode.api.v2.StopOrderEdge - (*StopOrderConnection)(nil), // 38: datanode.api.v2.StopOrderConnection - (*ListStopOrdersResponse)(nil), // 39: datanode.api.v2.ListStopOrdersResponse - (*ListPositionsRequest)(nil), // 40: datanode.api.v2.ListPositionsRequest - (*ListPositionsResponse)(nil), // 41: datanode.api.v2.ListPositionsResponse - (*PositionsFilter)(nil), // 42: datanode.api.v2.PositionsFilter - (*ListAllPositionsRequest)(nil), // 43: datanode.api.v2.ListAllPositionsRequest - (*ListAllPositionsResponse)(nil), // 44: datanode.api.v2.ListAllPositionsResponse - (*PositionEdge)(nil), // 45: datanode.api.v2.PositionEdge - (*PositionConnection)(nil), // 46: datanode.api.v2.PositionConnection - (*ObservePositionsRequest)(nil), // 47: datanode.api.v2.ObservePositionsRequest - (*ObservePositionsResponse)(nil), // 48: datanode.api.v2.ObservePositionsResponse - (*PositionSnapshotPage)(nil), // 49: datanode.api.v2.PositionSnapshotPage - (*PositionUpdates)(nil), // 50: datanode.api.v2.PositionUpdates - (*LedgerEntryFilter)(nil), // 51: datanode.api.v2.LedgerEntryFilter - (*AggregatedLedgerEntry)(nil), // 52: datanode.api.v2.AggregatedLedgerEntry - (*ListLedgerEntriesRequest)(nil), // 53: datanode.api.v2.ListLedgerEntriesRequest - (*ExportLedgerEntriesRequest)(nil), // 54: datanode.api.v2.ExportLedgerEntriesRequest - (*ListLedgerEntriesResponse)(nil), // 55: datanode.api.v2.ListLedgerEntriesResponse - (*AggregatedLedgerEntriesEdge)(nil), // 56: datanode.api.v2.AggregatedLedgerEntriesEdge - (*AggregatedLedgerEntriesConnection)(nil), // 57: datanode.api.v2.AggregatedLedgerEntriesConnection - (*ListBalanceChangesRequest)(nil), // 58: datanode.api.v2.ListBalanceChangesRequest - (*ListBalanceChangesResponse)(nil), // 59: datanode.api.v2.ListBalanceChangesResponse - (*GetBalanceHistoryRequest)(nil), // 60: datanode.api.v2.GetBalanceHistoryRequest - (*GetBalanceHistoryResponse)(nil), // 61: datanode.api.v2.GetBalanceHistoryResponse - (*AggregatedBalanceEdge)(nil), // 62: datanode.api.v2.AggregatedBalanceEdge - (*AggregatedBalanceConnection)(nil), // 63: datanode.api.v2.AggregatedBalanceConnection - (*AccountFilter)(nil), // 64: datanode.api.v2.AccountFilter - (*AggregatedBalance)(nil), // 65: datanode.api.v2.AggregatedBalance - (*ObserveMarketsDepthRequest)(nil), // 66: datanode.api.v2.ObserveMarketsDepthRequest - (*ObserveMarketsDepthResponse)(nil), // 67: datanode.api.v2.ObserveMarketsDepthResponse - (*ObserveMarketsDepthUpdatesRequest)(nil), // 68: datanode.api.v2.ObserveMarketsDepthUpdatesRequest - (*ObserveMarketsDepthUpdatesResponse)(nil), // 69: datanode.api.v2.ObserveMarketsDepthUpdatesResponse - (*ObserveMarketsDataRequest)(nil), // 70: datanode.api.v2.ObserveMarketsDataRequest - (*ObserveMarketsDataResponse)(nil), // 71: datanode.api.v2.ObserveMarketsDataResponse - (*GetLatestMarketDepthRequest)(nil), // 72: datanode.api.v2.GetLatestMarketDepthRequest - (*GetLatestMarketDepthResponse)(nil), // 73: datanode.api.v2.GetLatestMarketDepthResponse - (*ListLatestMarketDataRequest)(nil), // 74: datanode.api.v2.ListLatestMarketDataRequest - (*ListLatestMarketDataResponse)(nil), // 75: datanode.api.v2.ListLatestMarketDataResponse - (*GetLatestMarketDataRequest)(nil), // 76: datanode.api.v2.GetLatestMarketDataRequest - (*GetLatestMarketDataResponse)(nil), // 77: datanode.api.v2.GetLatestMarketDataResponse - (*GetMarketDataHistoryByIDRequest)(nil), // 78: datanode.api.v2.GetMarketDataHistoryByIDRequest - (*GetMarketDataHistoryByIDResponse)(nil), // 79: datanode.api.v2.GetMarketDataHistoryByIDResponse - (*MarketDataEdge)(nil), // 80: datanode.api.v2.MarketDataEdge - (*MarketDataConnection)(nil), // 81: datanode.api.v2.MarketDataConnection - (*ListTransfersRequest)(nil), // 82: datanode.api.v2.ListTransfersRequest - (*ListTransfersResponse)(nil), // 83: datanode.api.v2.ListTransfersResponse - (*TransferNode)(nil), // 84: datanode.api.v2.TransferNode - (*TransferEdge)(nil), // 85: datanode.api.v2.TransferEdge - (*TransferConnection)(nil), // 86: datanode.api.v2.TransferConnection - (*GetTransferRequest)(nil), // 87: datanode.api.v2.GetTransferRequest - (*GetTransferResponse)(nil), // 88: datanode.api.v2.GetTransferResponse - (*GetNetworkLimitsRequest)(nil), // 89: datanode.api.v2.GetNetworkLimitsRequest - (*GetNetworkLimitsResponse)(nil), // 90: datanode.api.v2.GetNetworkLimitsResponse - (*ListCandleIntervalsRequest)(nil), // 91: datanode.api.v2.ListCandleIntervalsRequest - (*IntervalToCandleId)(nil), // 92: datanode.api.v2.IntervalToCandleId - (*ListCandleIntervalsResponse)(nil), // 93: datanode.api.v2.ListCandleIntervalsResponse - (*Candle)(nil), // 94: datanode.api.v2.Candle - (*ObserveCandleDataRequest)(nil), // 95: datanode.api.v2.ObserveCandleDataRequest - (*ObserveCandleDataResponse)(nil), // 96: datanode.api.v2.ObserveCandleDataResponse - (*ListCandleDataRequest)(nil), // 97: datanode.api.v2.ListCandleDataRequest - (*ListCandleDataResponse)(nil), // 98: datanode.api.v2.ListCandleDataResponse - (*CandleEdge)(nil), // 99: datanode.api.v2.CandleEdge - (*CandleDataConnection)(nil), // 100: datanode.api.v2.CandleDataConnection - (*ListVotesRequest)(nil), // 101: datanode.api.v2.ListVotesRequest - (*ListVotesResponse)(nil), // 102: datanode.api.v2.ListVotesResponse - (*VoteEdge)(nil), // 103: datanode.api.v2.VoteEdge - (*VoteConnection)(nil), // 104: datanode.api.v2.VoteConnection - (*ObserveVotesRequest)(nil), // 105: datanode.api.v2.ObserveVotesRequest - (*ObserveVotesResponse)(nil), // 106: datanode.api.v2.ObserveVotesResponse - (*ListERC20MultiSigSignerAddedBundlesRequest)(nil), // 107: datanode.api.v2.ListERC20MultiSigSignerAddedBundlesRequest - (*ListERC20MultiSigSignerAddedBundlesResponse)(nil), // 108: datanode.api.v2.ListERC20MultiSigSignerAddedBundlesResponse - (*ERC20MultiSigSignerAddedEdge)(nil), // 109: datanode.api.v2.ERC20MultiSigSignerAddedEdge - (*ERC20MultiSigSignerAddedBundleEdge)(nil), // 110: datanode.api.v2.ERC20MultiSigSignerAddedBundleEdge - (*ERC20MultiSigSignerAddedConnection)(nil), // 111: datanode.api.v2.ERC20MultiSigSignerAddedConnection - (*ERC20MultiSigSignerAddedBundle)(nil), // 112: datanode.api.v2.ERC20MultiSigSignerAddedBundle - (*ListERC20MultiSigSignerRemovedBundlesRequest)(nil), // 113: datanode.api.v2.ListERC20MultiSigSignerRemovedBundlesRequest - (*ListERC20MultiSigSignerRemovedBundlesResponse)(nil), // 114: datanode.api.v2.ListERC20MultiSigSignerRemovedBundlesResponse - (*ERC20MultiSigSignerRemovedEdge)(nil), // 115: datanode.api.v2.ERC20MultiSigSignerRemovedEdge - (*ERC20MultiSigSignerRemovedBundleEdge)(nil), // 116: datanode.api.v2.ERC20MultiSigSignerRemovedBundleEdge - (*ERC20MultiSigSignerRemovedConnection)(nil), // 117: datanode.api.v2.ERC20MultiSigSignerRemovedConnection - (*ERC20MultiSigSignerRemovedBundle)(nil), // 118: datanode.api.v2.ERC20MultiSigSignerRemovedBundle - (*GetERC20ListAssetBundleRequest)(nil), // 119: datanode.api.v2.GetERC20ListAssetBundleRequest - (*GetERC20ListAssetBundleResponse)(nil), // 120: datanode.api.v2.GetERC20ListAssetBundleResponse - (*GetERC20SetAssetLimitsBundleRequest)(nil), // 121: datanode.api.v2.GetERC20SetAssetLimitsBundleRequest - (*GetERC20SetAssetLimitsBundleResponse)(nil), // 122: datanode.api.v2.GetERC20SetAssetLimitsBundleResponse - (*GetERC20WithdrawalApprovalRequest)(nil), // 123: datanode.api.v2.GetERC20WithdrawalApprovalRequest - (*GetERC20WithdrawalApprovalResponse)(nil), // 124: datanode.api.v2.GetERC20WithdrawalApprovalResponse - (*GetLastTradeRequest)(nil), // 125: datanode.api.v2.GetLastTradeRequest - (*GetLastTradeResponse)(nil), // 126: datanode.api.v2.GetLastTradeResponse - (*ListTradesRequest)(nil), // 127: datanode.api.v2.ListTradesRequest - (*ListTradesResponse)(nil), // 128: datanode.api.v2.ListTradesResponse - (*TradeConnection)(nil), // 129: datanode.api.v2.TradeConnection - (*TradeEdge)(nil), // 130: datanode.api.v2.TradeEdge - (*ObserveTradesRequest)(nil), // 131: datanode.api.v2.ObserveTradesRequest - (*ObserveTradesResponse)(nil), // 132: datanode.api.v2.ObserveTradesResponse - (*GetOracleSpecRequest)(nil), // 133: datanode.api.v2.GetOracleSpecRequest - (*GetOracleSpecResponse)(nil), // 134: datanode.api.v2.GetOracleSpecResponse - (*ListOracleSpecsRequest)(nil), // 135: datanode.api.v2.ListOracleSpecsRequest - (*ListOracleSpecsResponse)(nil), // 136: datanode.api.v2.ListOracleSpecsResponse - (*ListOracleDataRequest)(nil), // 137: datanode.api.v2.ListOracleDataRequest - (*ListOracleDataResponse)(nil), // 138: datanode.api.v2.ListOracleDataResponse - (*OracleSpecEdge)(nil), // 139: datanode.api.v2.OracleSpecEdge - (*OracleSpecsConnection)(nil), // 140: datanode.api.v2.OracleSpecsConnection - (*OracleDataEdge)(nil), // 141: datanode.api.v2.OracleDataEdge - (*OracleDataConnection)(nil), // 142: datanode.api.v2.OracleDataConnection - (*GetMarketRequest)(nil), // 143: datanode.api.v2.GetMarketRequest - (*GetMarketResponse)(nil), // 144: datanode.api.v2.GetMarketResponse - (*ListMarketsRequest)(nil), // 145: datanode.api.v2.ListMarketsRequest - (*ListMarketsResponse)(nil), // 146: datanode.api.v2.ListMarketsResponse - (*MarketEdge)(nil), // 147: datanode.api.v2.MarketEdge - (*MarketConnection)(nil), // 148: datanode.api.v2.MarketConnection - (*ListSuccessorMarketsRequest)(nil), // 149: datanode.api.v2.ListSuccessorMarketsRequest - (*SuccessorMarket)(nil), // 150: datanode.api.v2.SuccessorMarket - (*SuccessorMarketEdge)(nil), // 151: datanode.api.v2.SuccessorMarketEdge - (*SuccessorMarketConnection)(nil), // 152: datanode.api.v2.SuccessorMarketConnection - (*ListSuccessorMarketsResponse)(nil), // 153: datanode.api.v2.ListSuccessorMarketsResponse - (*GetPartyRequest)(nil), // 154: datanode.api.v2.GetPartyRequest - (*GetPartyResponse)(nil), // 155: datanode.api.v2.GetPartyResponse - (*ListPartiesRequest)(nil), // 156: datanode.api.v2.ListPartiesRequest - (*ListPartiesResponse)(nil), // 157: datanode.api.v2.ListPartiesResponse - (*PartyEdge)(nil), // 158: datanode.api.v2.PartyEdge - (*PartyConnection)(nil), // 159: datanode.api.v2.PartyConnection - (*OrderEdge)(nil), // 160: datanode.api.v2.OrderEdge - (*ListMarginLevelsRequest)(nil), // 161: datanode.api.v2.ListMarginLevelsRequest - (*ListMarginLevelsResponse)(nil), // 162: datanode.api.v2.ListMarginLevelsResponse - (*ObserveMarginLevelsRequest)(nil), // 163: datanode.api.v2.ObserveMarginLevelsRequest - (*ObserveMarginLevelsResponse)(nil), // 164: datanode.api.v2.ObserveMarginLevelsResponse - (*OrderConnection)(nil), // 165: datanode.api.v2.OrderConnection - (*MarginEdge)(nil), // 166: datanode.api.v2.MarginEdge - (*MarginConnection)(nil), // 167: datanode.api.v2.MarginConnection - (*ListRewardsRequest)(nil), // 168: datanode.api.v2.ListRewardsRequest - (*ListRewardsResponse)(nil), // 169: datanode.api.v2.ListRewardsResponse - (*RewardEdge)(nil), // 170: datanode.api.v2.RewardEdge - (*RewardsConnection)(nil), // 171: datanode.api.v2.RewardsConnection - (*ListRewardSummariesRequest)(nil), // 172: datanode.api.v2.ListRewardSummariesRequest - (*ListRewardSummariesResponse)(nil), // 173: datanode.api.v2.ListRewardSummariesResponse - (*RewardSummaryFilter)(nil), // 174: datanode.api.v2.RewardSummaryFilter - (*ListEpochRewardSummariesRequest)(nil), // 175: datanode.api.v2.ListEpochRewardSummariesRequest - (*ListEpochRewardSummariesResponse)(nil), // 176: datanode.api.v2.ListEpochRewardSummariesResponse - (*EpochRewardSummaryConnection)(nil), // 177: datanode.api.v2.EpochRewardSummaryConnection - (*EpochRewardSummaryEdge)(nil), // 178: datanode.api.v2.EpochRewardSummaryEdge - (*ObserveRewardsRequest)(nil), // 179: datanode.api.v2.ObserveRewardsRequest - (*ObserveRewardsResponse)(nil), // 180: datanode.api.v2.ObserveRewardsResponse - (*GetDepositRequest)(nil), // 181: datanode.api.v2.GetDepositRequest - (*GetDepositResponse)(nil), // 182: datanode.api.v2.GetDepositResponse - (*ListDepositsRequest)(nil), // 183: datanode.api.v2.ListDepositsRequest - (*ListDepositsResponse)(nil), // 184: datanode.api.v2.ListDepositsResponse - (*DepositEdge)(nil), // 185: datanode.api.v2.DepositEdge - (*DepositsConnection)(nil), // 186: datanode.api.v2.DepositsConnection - (*GetWithdrawalRequest)(nil), // 187: datanode.api.v2.GetWithdrawalRequest - (*GetWithdrawalResponse)(nil), // 188: datanode.api.v2.GetWithdrawalResponse - (*ListWithdrawalsRequest)(nil), // 189: datanode.api.v2.ListWithdrawalsRequest - (*ListWithdrawalsResponse)(nil), // 190: datanode.api.v2.ListWithdrawalsResponse - (*WithdrawalEdge)(nil), // 191: datanode.api.v2.WithdrawalEdge - (*WithdrawalsConnection)(nil), // 192: datanode.api.v2.WithdrawalsConnection - (*GetAssetRequest)(nil), // 193: datanode.api.v2.GetAssetRequest - (*GetAssetResponse)(nil), // 194: datanode.api.v2.GetAssetResponse - (*ListAssetsRequest)(nil), // 195: datanode.api.v2.ListAssetsRequest - (*ListAssetsResponse)(nil), // 196: datanode.api.v2.ListAssetsResponse - (*AssetEdge)(nil), // 197: datanode.api.v2.AssetEdge - (*AssetsConnection)(nil), // 198: datanode.api.v2.AssetsConnection - (*ListLiquidityProvisionsRequest)(nil), // 199: datanode.api.v2.ListLiquidityProvisionsRequest - (*ListAllLiquidityProvisionsRequest)(nil), // 200: datanode.api.v2.ListAllLiquidityProvisionsRequest - (*ListLiquidityProvisionsResponse)(nil), // 201: datanode.api.v2.ListLiquidityProvisionsResponse - (*ListAllLiquidityProvisionsResponse)(nil), // 202: datanode.api.v2.ListAllLiquidityProvisionsResponse - (*LiquidityProvision)(nil), // 203: datanode.api.v2.LiquidityProvision - (*LiquidityProvisionsEdge)(nil), // 204: datanode.api.v2.LiquidityProvisionsEdge - (*LiquidityProvisionWithPendingEdge)(nil), // 205: datanode.api.v2.LiquidityProvisionWithPendingEdge - (*LiquidityProvisionsConnection)(nil), // 206: datanode.api.v2.LiquidityProvisionsConnection - (*LiquidityProvisionsWithPendingConnection)(nil), // 207: datanode.api.v2.LiquidityProvisionsWithPendingConnection - (*ObserveLiquidityProvisionsRequest)(nil), // 208: datanode.api.v2.ObserveLiquidityProvisionsRequest - (*ObserveLiquidityProvisionsResponse)(nil), // 209: datanode.api.v2.ObserveLiquidityProvisionsResponse - (*ListLiquidityProvidersRequest)(nil), // 210: datanode.api.v2.ListLiquidityProvidersRequest - (*LiquidityProvider)(nil), // 211: datanode.api.v2.LiquidityProvider - (*LiquidityProviderEdge)(nil), // 212: datanode.api.v2.LiquidityProviderEdge - (*LiquidityProviderConnection)(nil), // 213: datanode.api.v2.LiquidityProviderConnection - (*ListLiquidityProvidersResponse)(nil), // 214: datanode.api.v2.ListLiquidityProvidersResponse - (*ListPaidLiquidityFeesRequest)(nil), // 215: datanode.api.v2.ListPaidLiquidityFeesRequest - (*ListPaidLiquidityFeesResponse)(nil), // 216: datanode.api.v2.ListPaidLiquidityFeesResponse - (*PaidLiquidityFeesEdge)(nil), // 217: datanode.api.v2.PaidLiquidityFeesEdge - (*PaidLiquidityFeesConnection)(nil), // 218: datanode.api.v2.PaidLiquidityFeesConnection - (*GetGovernanceDataRequest)(nil), // 219: datanode.api.v2.GetGovernanceDataRequest - (*GetGovernanceDataResponse)(nil), // 220: datanode.api.v2.GetGovernanceDataResponse - (*ListGovernanceDataRequest)(nil), // 221: datanode.api.v2.ListGovernanceDataRequest - (*ListGovernanceDataResponse)(nil), // 222: datanode.api.v2.ListGovernanceDataResponse - (*GovernanceDataEdge)(nil), // 223: datanode.api.v2.GovernanceDataEdge - (*GovernanceDataConnection)(nil), // 224: datanode.api.v2.GovernanceDataConnection - (*ObserveGovernanceRequest)(nil), // 225: datanode.api.v2.ObserveGovernanceRequest - (*ObserveGovernanceResponse)(nil), // 226: datanode.api.v2.ObserveGovernanceResponse - (*ListDelegationsRequest)(nil), // 227: datanode.api.v2.ListDelegationsRequest - (*ListDelegationsResponse)(nil), // 228: datanode.api.v2.ListDelegationsResponse - (*DelegationEdge)(nil), // 229: datanode.api.v2.DelegationEdge - (*DelegationsConnection)(nil), // 230: datanode.api.v2.DelegationsConnection - (*ObserveDelegationsRequest)(nil), // 231: datanode.api.v2.ObserveDelegationsRequest - (*ObserveDelegationsResponse)(nil), // 232: datanode.api.v2.ObserveDelegationsResponse - (*NodeBasic)(nil), // 233: datanode.api.v2.NodeBasic - (*GetNetworkDataRequest)(nil), // 234: datanode.api.v2.GetNetworkDataRequest - (*GetNetworkDataResponse)(nil), // 235: datanode.api.v2.GetNetworkDataResponse - (*GetNodeRequest)(nil), // 236: datanode.api.v2.GetNodeRequest - (*GetNodeResponse)(nil), // 237: datanode.api.v2.GetNodeResponse - (*ListNodesRequest)(nil), // 238: datanode.api.v2.ListNodesRequest - (*ListNodesResponse)(nil), // 239: datanode.api.v2.ListNodesResponse - (*NodeEdge)(nil), // 240: datanode.api.v2.NodeEdge - (*NodesConnection)(nil), // 241: datanode.api.v2.NodesConnection - (*ListNodeSignaturesRequest)(nil), // 242: datanode.api.v2.ListNodeSignaturesRequest - (*ListNodeSignaturesResponse)(nil), // 243: datanode.api.v2.ListNodeSignaturesResponse - (*NodeSignatureEdge)(nil), // 244: datanode.api.v2.NodeSignatureEdge - (*NodeSignaturesConnection)(nil), // 245: datanode.api.v2.NodeSignaturesConnection - (*GetEpochRequest)(nil), // 246: datanode.api.v2.GetEpochRequest - (*GetEpochResponse)(nil), // 247: datanode.api.v2.GetEpochResponse - (*EstimateFeeRequest)(nil), // 248: datanode.api.v2.EstimateFeeRequest - (*EstimateFeeResponse)(nil), // 249: datanode.api.v2.EstimateFeeResponse - (*EstimateMarginRequest)(nil), // 250: datanode.api.v2.EstimateMarginRequest - (*EstimateMarginResponse)(nil), // 251: datanode.api.v2.EstimateMarginResponse - (*ListNetworkParametersRequest)(nil), // 252: datanode.api.v2.ListNetworkParametersRequest - (*ListNetworkParametersResponse)(nil), // 253: datanode.api.v2.ListNetworkParametersResponse - (*GetNetworkParameterRequest)(nil), // 254: datanode.api.v2.GetNetworkParameterRequest - (*GetNetworkParameterResponse)(nil), // 255: datanode.api.v2.GetNetworkParameterResponse - (*NetworkParameterEdge)(nil), // 256: datanode.api.v2.NetworkParameterEdge - (*NetworkParameterConnection)(nil), // 257: datanode.api.v2.NetworkParameterConnection - (*Checkpoint)(nil), // 258: datanode.api.v2.Checkpoint - (*ListCheckpointsRequest)(nil), // 259: datanode.api.v2.ListCheckpointsRequest - (*ListCheckpointsResponse)(nil), // 260: datanode.api.v2.ListCheckpointsResponse - (*CheckpointEdge)(nil), // 261: datanode.api.v2.CheckpointEdge - (*CheckpointsConnection)(nil), // 262: datanode.api.v2.CheckpointsConnection - (*GetStakeRequest)(nil), // 263: datanode.api.v2.GetStakeRequest - (*GetStakeResponse)(nil), // 264: datanode.api.v2.GetStakeResponse - (*StakeLinkingEdge)(nil), // 265: datanode.api.v2.StakeLinkingEdge - (*StakesConnection)(nil), // 266: datanode.api.v2.StakesConnection - (*GetRiskFactorsRequest)(nil), // 267: datanode.api.v2.GetRiskFactorsRequest - (*GetRiskFactorsResponse)(nil), // 268: datanode.api.v2.GetRiskFactorsResponse - (*ObserveEventBusRequest)(nil), // 269: datanode.api.v2.ObserveEventBusRequest - (*ObserveEventBusResponse)(nil), // 270: datanode.api.v2.ObserveEventBusResponse - (*ObserveLedgerMovementsRequest)(nil), // 271: datanode.api.v2.ObserveLedgerMovementsRequest - (*ObserveLedgerMovementsResponse)(nil), // 272: datanode.api.v2.ObserveLedgerMovementsResponse - (*ListKeyRotationsRequest)(nil), // 273: datanode.api.v2.ListKeyRotationsRequest - (*ListKeyRotationsResponse)(nil), // 274: datanode.api.v2.ListKeyRotationsResponse - (*KeyRotationEdge)(nil), // 275: datanode.api.v2.KeyRotationEdge - (*KeyRotationConnection)(nil), // 276: datanode.api.v2.KeyRotationConnection - (*ListEthereumKeyRotationsRequest)(nil), // 277: datanode.api.v2.ListEthereumKeyRotationsRequest - (*ListEthereumKeyRotationsResponse)(nil), // 278: datanode.api.v2.ListEthereumKeyRotationsResponse - (*EthereumKeyRotationsConnection)(nil), // 279: datanode.api.v2.EthereumKeyRotationsConnection - (*EthereumKeyRotationEdge)(nil), // 280: datanode.api.v2.EthereumKeyRotationEdge - (*GetVegaTimeRequest)(nil), // 281: datanode.api.v2.GetVegaTimeRequest - (*GetVegaTimeResponse)(nil), // 282: datanode.api.v2.GetVegaTimeResponse - (*DateRange)(nil), // 283: datanode.api.v2.DateRange - (*GetProtocolUpgradeStatusRequest)(nil), // 284: datanode.api.v2.GetProtocolUpgradeStatusRequest - (*GetProtocolUpgradeStatusResponse)(nil), // 285: datanode.api.v2.GetProtocolUpgradeStatusResponse - (*ListProtocolUpgradeProposalsRequest)(nil), // 286: datanode.api.v2.ListProtocolUpgradeProposalsRequest - (*ListProtocolUpgradeProposalsResponse)(nil), // 287: datanode.api.v2.ListProtocolUpgradeProposalsResponse - (*ProtocolUpgradeProposalConnection)(nil), // 288: datanode.api.v2.ProtocolUpgradeProposalConnection - (*ProtocolUpgradeProposalEdge)(nil), // 289: datanode.api.v2.ProtocolUpgradeProposalEdge - (*ListCoreSnapshotsRequest)(nil), // 290: datanode.api.v2.ListCoreSnapshotsRequest - (*ListCoreSnapshotsResponse)(nil), // 291: datanode.api.v2.ListCoreSnapshotsResponse - (*CoreSnapshotConnection)(nil), // 292: datanode.api.v2.CoreSnapshotConnection - (*CoreSnapshotEdge)(nil), // 293: datanode.api.v2.CoreSnapshotEdge - (*HistorySegment)(nil), // 294: datanode.api.v2.HistorySegment - (*GetMostRecentNetworkHistorySegmentRequest)(nil), // 295: datanode.api.v2.GetMostRecentNetworkHistorySegmentRequest - (*GetMostRecentNetworkHistorySegmentResponse)(nil), // 296: datanode.api.v2.GetMostRecentNetworkHistorySegmentResponse - (*ListAllNetworkHistorySegmentsRequest)(nil), // 297: datanode.api.v2.ListAllNetworkHistorySegmentsRequest - (*ListAllNetworkHistorySegmentsResponse)(nil), // 298: datanode.api.v2.ListAllNetworkHistorySegmentsResponse - (*GetActiveNetworkHistoryPeerAddressesRequest)(nil), // 299: datanode.api.v2.GetActiveNetworkHistoryPeerAddressesRequest - (*GetActiveNetworkHistoryPeerAddressesResponse)(nil), // 300: datanode.api.v2.GetActiveNetworkHistoryPeerAddressesResponse - (*GetNetworkHistoryStatusRequest)(nil), // 301: datanode.api.v2.GetNetworkHistoryStatusRequest - (*GetNetworkHistoryStatusResponse)(nil), // 302: datanode.api.v2.GetNetworkHistoryStatusResponse - (*GetNetworkHistoryBootstrapPeersRequest)(nil), // 303: datanode.api.v2.GetNetworkHistoryBootstrapPeersRequest - (*GetNetworkHistoryBootstrapPeersResponse)(nil), // 304: datanode.api.v2.GetNetworkHistoryBootstrapPeersResponse - (*ExportNetworkHistoryRequest)(nil), // 305: datanode.api.v2.ExportNetworkHistoryRequest - (*ListEntitiesRequest)(nil), // 306: datanode.api.v2.ListEntitiesRequest - (*ListEntitiesResponse)(nil), // 307: datanode.api.v2.ListEntitiesResponse - (*GetPartyActivityStreakRequest)(nil), // 308: datanode.api.v2.GetPartyActivityStreakRequest - (*GetPartyActivityStreakResponse)(nil), // 309: datanode.api.v2.GetPartyActivityStreakResponse - (*FundingPayment)(nil), // 310: datanode.api.v2.FundingPayment - (*ListFundingPaymentsRequest)(nil), // 311: datanode.api.v2.ListFundingPaymentsRequest - (*FundingPaymentEdge)(nil), // 312: datanode.api.v2.FundingPaymentEdge - (*FundingPaymentConnection)(nil), // 313: datanode.api.v2.FundingPaymentConnection - (*ListFundingPaymentsResponse)(nil), // 314: datanode.api.v2.ListFundingPaymentsResponse - (*ListFundingPeriodsRequest)(nil), // 315: datanode.api.v2.ListFundingPeriodsRequest - (*FundingPeriodEdge)(nil), // 316: datanode.api.v2.FundingPeriodEdge - (*FundingPeriodConnection)(nil), // 317: datanode.api.v2.FundingPeriodConnection - (*ListFundingPeriodsResponse)(nil), // 318: datanode.api.v2.ListFundingPeriodsResponse - (*ListFundingPeriodDataPointsRequest)(nil), // 319: datanode.api.v2.ListFundingPeriodDataPointsRequest - (*FundingPeriodDataPointEdge)(nil), // 320: datanode.api.v2.FundingPeriodDataPointEdge - (*FundingPeriodDataPointConnection)(nil), // 321: datanode.api.v2.FundingPeriodDataPointConnection - (*ListFundingPeriodDataPointsResponse)(nil), // 322: datanode.api.v2.ListFundingPeriodDataPointsResponse - (*PingRequest)(nil), // 323: datanode.api.v2.PingRequest - (*PingResponse)(nil), // 324: datanode.api.v2.PingResponse - (*OrderInfo)(nil), // 325: datanode.api.v2.OrderInfo - (*EstimatePositionRequest)(nil), // 326: datanode.api.v2.EstimatePositionRequest - (*EstimatePositionResponse)(nil), // 327: datanode.api.v2.EstimatePositionResponse - (*MarginEstimate)(nil), // 328: datanode.api.v2.MarginEstimate - (*LiquidationEstimate)(nil), // 329: datanode.api.v2.LiquidationEstimate - (*LiquidationPrice)(nil), // 330: datanode.api.v2.LiquidationPrice - (*GetCurrentReferralProgramRequest)(nil), // 331: datanode.api.v2.GetCurrentReferralProgramRequest - (*GetCurrentReferralProgramResponse)(nil), // 332: datanode.api.v2.GetCurrentReferralProgramResponse - (*ReferralProgram)(nil), // 333: datanode.api.v2.ReferralProgram - (*ReferralSet)(nil), // 334: datanode.api.v2.ReferralSet - (*ReferralSetEdge)(nil), // 335: datanode.api.v2.ReferralSetEdge - (*ReferralSetConnection)(nil), // 336: datanode.api.v2.ReferralSetConnection - (*ListReferralSetsRequest)(nil), // 337: datanode.api.v2.ListReferralSetsRequest - (*ListReferralSetsResponse)(nil), // 338: datanode.api.v2.ListReferralSetsResponse - (*ReferralSetReferee)(nil), // 339: datanode.api.v2.ReferralSetReferee - (*ReferralSetRefereeEdge)(nil), // 340: datanode.api.v2.ReferralSetRefereeEdge - (*ReferralSetRefereeConnection)(nil), // 341: datanode.api.v2.ReferralSetRefereeConnection - (*ListReferralSetRefereesRequest)(nil), // 342: datanode.api.v2.ListReferralSetRefereesRequest - (*ListReferralSetRefereesResponse)(nil), // 343: datanode.api.v2.ListReferralSetRefereesResponse - (*GetReferralSetStatsRequest)(nil), // 344: datanode.api.v2.GetReferralSetStatsRequest - (*GetReferralSetStatsResponse)(nil), // 345: datanode.api.v2.GetReferralSetStatsResponse - (*ReferralSetStatsConnection)(nil), // 346: datanode.api.v2.ReferralSetStatsConnection - (*ReferralSetStatsEdge)(nil), // 347: datanode.api.v2.ReferralSetStatsEdge - (*ReferralSetStats)(nil), // 348: datanode.api.v2.ReferralSetStats - (*Team)(nil), // 349: datanode.api.v2.Team - (*TeamEdge)(nil), // 350: datanode.api.v2.TeamEdge - (*TeamConnection)(nil), // 351: datanode.api.v2.TeamConnection - (*ListTeamsRequest)(nil), // 352: datanode.api.v2.ListTeamsRequest - (*ListTeamsResponse)(nil), // 353: datanode.api.v2.ListTeamsResponse - (*ListTeamRefereesRequest)(nil), // 354: datanode.api.v2.ListTeamRefereesRequest - (*TeamReferee)(nil), // 355: datanode.api.v2.TeamReferee - (*TeamRefereeEdge)(nil), // 356: datanode.api.v2.TeamRefereeEdge - (*TeamRefereeConnection)(nil), // 357: datanode.api.v2.TeamRefereeConnection - (*ListTeamRefereesResponse)(nil), // 358: datanode.api.v2.ListTeamRefereesResponse - (*TeamRefereeHistory)(nil), // 359: datanode.api.v2.TeamRefereeHistory - (*TeamRefereeHistoryEdge)(nil), // 360: datanode.api.v2.TeamRefereeHistoryEdge - (*TeamRefereeHistoryConnection)(nil), // 361: datanode.api.v2.TeamRefereeHistoryConnection - (*ListTeamRefereeHistoryRequest)(nil), // 362: datanode.api.v2.ListTeamRefereeHistoryRequest - (*ListTeamRefereeHistoryResponse)(nil), // 363: datanode.api.v2.ListTeamRefereeHistoryResponse - (*GetFeesStatsRequest)(nil), // 364: datanode.api.v2.GetFeesStatsRequest - (*GetFeesStatsResponse)(nil), // 365: datanode.api.v2.GetFeesStatsResponse - (*GetFeesStatsForPartyRequest)(nil), // 366: datanode.api.v2.GetFeesStatsForPartyRequest - (*GetFeesStatsForPartyResponse)(nil), // 367: datanode.api.v2.GetFeesStatsForPartyResponse - (*GetCurrentVolumeDiscountProgramRequest)(nil), // 368: datanode.api.v2.GetCurrentVolumeDiscountProgramRequest - (*GetCurrentVolumeDiscountProgramResponse)(nil), // 369: datanode.api.v2.GetCurrentVolumeDiscountProgramResponse - (*GetVolumeDiscountStatsRequest)(nil), // 370: datanode.api.v2.GetVolumeDiscountStatsRequest - (*GetVolumeDiscountStatsResponse)(nil), // 371: datanode.api.v2.GetVolumeDiscountStatsResponse - (*VolumeDiscountStatsConnection)(nil), // 372: datanode.api.v2.VolumeDiscountStatsConnection - (*VolumeDiscountStatsEdge)(nil), // 373: datanode.api.v2.VolumeDiscountStatsEdge - (*VolumeDiscountStats)(nil), // 374: datanode.api.v2.VolumeDiscountStats - (*VolumeDiscountProgram)(nil), // 375: datanode.api.v2.VolumeDiscountProgram - (*FeesStatsForParty)(nil), // 376: datanode.api.v2.FeesStatsForParty - (*v1.PartyLockedBalance)(nil), // 377: vega.events.v1.PartyLockedBalance - (*v1.PartyVestingBalance)(nil), // 378: vega.events.v1.PartyVestingBalance - (vega.AccountType)(0), // 379: vega.AccountType - (*vega.Order)(nil), // 380: vega.Order - (vega.Order_Status)(0), // 381: vega.Order.Status - (vega.Order_Type)(0), // 382: vega.Order.Type - (vega.Order_TimeInForce)(0), // 383: vega.Order.TimeInForce - (*v1.StopOrderEvent)(nil), // 384: vega.events.v1.StopOrderEvent - (vega.StopOrder_Status)(0), // 385: vega.StopOrder.Status - (vega.StopOrder_ExpiryStrategy)(0), // 386: vega.StopOrder.ExpiryStrategy - (*vega.Position)(nil), // 387: vega.Position - (vega.TransferType)(0), // 388: vega.TransferType - (*vega.MarketDepth)(nil), // 389: vega.MarketDepth - (*vega.MarketDepthUpdate)(nil), // 390: vega.MarketDepthUpdate - (*vega.MarketData)(nil), // 391: vega.MarketData - (*vega.PriceLevel)(nil), // 392: vega.PriceLevel - (*vega.Trade)(nil), // 393: vega.Trade - (*v1.Transfer)(nil), // 394: vega.events.v1.Transfer - (*v1.TransferFees)(nil), // 395: vega.events.v1.TransferFees - (*vega.NetworkLimits)(nil), // 396: vega.NetworkLimits - (*vega.Vote)(nil), // 397: vega.Vote - (*v1.ERC20MultiSigSignerAdded)(nil), // 398: vega.events.v1.ERC20MultiSigSignerAdded - (*v1.ERC20MultiSigSignerRemoved)(nil), // 399: vega.events.v1.ERC20MultiSigSignerRemoved - (*vega.OracleSpec)(nil), // 400: vega.OracleSpec - (*vega.OracleData)(nil), // 401: vega.OracleData - (*vega.Market)(nil), // 402: vega.Market - (*vega.GovernanceData)(nil), // 403: vega.GovernanceData - (*vega.Party)(nil), // 404: vega.Party - (*vega.MarginLevels)(nil), // 405: vega.MarginLevels - (*vega.Reward)(nil), // 406: vega.Reward - (*vega.RewardSummary)(nil), // 407: vega.RewardSummary - (*vega.EpochRewardSummary)(nil), // 408: vega.EpochRewardSummary - (*vega.Deposit)(nil), // 409: vega.Deposit - (*vega.Withdrawal)(nil), // 410: vega.Withdrawal - (*vega.Asset)(nil), // 411: vega.Asset - (*vega.LiquidityProvision)(nil), // 412: vega.LiquidityProvision - (*vega.LiquidityProviderFeeShare)(nil), // 413: vega.LiquidityProviderFeeShare - (*vega.LiquidityProviderSLA)(nil), // 414: vega.LiquidityProviderSLA - (*v1.PaidLiquidityFeesStats)(nil), // 415: vega.events.v1.PaidLiquidityFeesStats - (vega.Proposal_State)(0), // 416: vega.Proposal.State - (*vega.Delegation)(nil), // 417: vega.Delegation - (vega.NodeStatus)(0), // 418: vega.NodeStatus - (*vega.NodeData)(nil), // 419: vega.NodeData - (*vega.Node)(nil), // 420: vega.Node - (*v11.NodeSignature)(nil), // 421: vega.commands.v1.NodeSignature - (*vega.Epoch)(nil), // 422: vega.Epoch - (*vega.Fee)(nil), // 423: vega.Fee - (vega.Side)(0), // 424: vega.Side - (*vega.NetworkParameter)(nil), // 425: vega.NetworkParameter - (*v1.StakeLinking)(nil), // 426: vega.events.v1.StakeLinking - (*vega.RiskFactor)(nil), // 427: vega.RiskFactor - (v1.BusEventType)(0), // 428: vega.events.v1.BusEventType - (*v1.BusEvent)(nil), // 429: vega.events.v1.BusEvent - (*vega.LedgerMovement)(nil), // 430: vega.LedgerMovement - (*v1.KeyRotation)(nil), // 431: vega.events.v1.KeyRotation - (*v1.EthereumKeyRotation)(nil), // 432: vega.events.v1.EthereumKeyRotation - (v1.ProtocolUpgradeProposalStatus)(0), // 433: vega.events.v1.ProtocolUpgradeProposalStatus - (*v1.ProtocolUpgradeEvent)(nil), // 434: vega.events.v1.ProtocolUpgradeEvent - (*v1.CoreSnapshotData)(nil), // 435: vega.events.v1.CoreSnapshotData - (*vega.Account)(nil), // 436: vega.Account - (*vega.LedgerEntry)(nil), // 437: vega.LedgerEntry - (*vega.Proposal)(nil), // 438: vega.Proposal - (*v1.PartyActivityStreak)(nil), // 439: vega.events.v1.PartyActivityStreak - (*v1.FundingPeriod)(nil), // 440: vega.events.v1.FundingPeriod - (v1.FundingPeriodDataPoint_Source)(0), // 441: vega.events.v1.FundingPeriodDataPoint.Source - (*v1.FundingPeriodDataPoint)(nil), // 442: vega.events.v1.FundingPeriodDataPoint - (*vega.BenefitTier)(nil), // 443: vega.BenefitTier - (*vega.StakingTier)(nil), // 444: vega.StakingTier - (*v1.FeesStats)(nil), // 445: vega.events.v1.FeesStats - (*vega.VolumeBenefitTier)(nil), // 446: vega.VolumeBenefitTier - (*httpbody.HttpBody)(nil), // 447: google.api.HttpBody + (ListTransfersRequest_Scope)(0), // 4: datanode.api.v2.ListTransfersRequest.Scope + (ListGovernanceDataRequest_Type)(0), // 5: datanode.api.v2.ListGovernanceDataRequest.Type + (*Pagination)(nil), // 6: datanode.api.v2.Pagination + (*PageInfo)(nil), // 7: datanode.api.v2.PageInfo + (*GetPartyVestingStatsRequest)(nil), // 8: datanode.api.v2.GetPartyVestingStatsRequest + (*GetPartyVestingStatsResponse)(nil), // 9: datanode.api.v2.GetPartyVestingStatsResponse + (*GetVestingBalancesSummaryRequest)(nil), // 10: datanode.api.v2.GetVestingBalancesSummaryRequest + (*GetVestingBalancesSummaryResponse)(nil), // 11: datanode.api.v2.GetVestingBalancesSummaryResponse + (*AccountBalance)(nil), // 12: datanode.api.v2.AccountBalance + (*ListAccountsRequest)(nil), // 13: datanode.api.v2.ListAccountsRequest + (*ListAccountsResponse)(nil), // 14: datanode.api.v2.ListAccountsResponse + (*AccountsConnection)(nil), // 15: datanode.api.v2.AccountsConnection + (*AccountEdge)(nil), // 16: datanode.api.v2.AccountEdge + (*ObserveAccountsRequest)(nil), // 17: datanode.api.v2.ObserveAccountsRequest + (*ObserveAccountsResponse)(nil), // 18: datanode.api.v2.ObserveAccountsResponse + (*AccountSnapshotPage)(nil), // 19: datanode.api.v2.AccountSnapshotPage + (*AccountUpdates)(nil), // 20: datanode.api.v2.AccountUpdates + (*InfoRequest)(nil), // 21: datanode.api.v2.InfoRequest + (*InfoResponse)(nil), // 22: datanode.api.v2.InfoResponse + (*GetOrderRequest)(nil), // 23: datanode.api.v2.GetOrderRequest + (*GetOrderResponse)(nil), // 24: datanode.api.v2.GetOrderResponse + (*OrderFilter)(nil), // 25: datanode.api.v2.OrderFilter + (*ListOrdersRequest)(nil), // 26: datanode.api.v2.ListOrdersRequest + (*ListOrdersResponse)(nil), // 27: datanode.api.v2.ListOrdersResponse + (*ListOrderVersionsRequest)(nil), // 28: datanode.api.v2.ListOrderVersionsRequest + (*ListOrderVersionsResponse)(nil), // 29: datanode.api.v2.ListOrderVersionsResponse + (*ObserveOrdersRequest)(nil), // 30: datanode.api.v2.ObserveOrdersRequest + (*ObserveOrdersResponse)(nil), // 31: datanode.api.v2.ObserveOrdersResponse + (*OrderSnapshotPage)(nil), // 32: datanode.api.v2.OrderSnapshotPage + (*OrderUpdates)(nil), // 33: datanode.api.v2.OrderUpdates + (*GetStopOrderRequest)(nil), // 34: datanode.api.v2.GetStopOrderRequest + (*GetStopOrderResponse)(nil), // 35: datanode.api.v2.GetStopOrderResponse + (*ListStopOrdersRequest)(nil), // 36: datanode.api.v2.ListStopOrdersRequest + (*StopOrderFilter)(nil), // 37: datanode.api.v2.StopOrderFilter + (*StopOrderEdge)(nil), // 38: datanode.api.v2.StopOrderEdge + (*StopOrderConnection)(nil), // 39: datanode.api.v2.StopOrderConnection + (*ListStopOrdersResponse)(nil), // 40: datanode.api.v2.ListStopOrdersResponse + (*ListPositionsRequest)(nil), // 41: datanode.api.v2.ListPositionsRequest + (*ListPositionsResponse)(nil), // 42: datanode.api.v2.ListPositionsResponse + (*PositionsFilter)(nil), // 43: datanode.api.v2.PositionsFilter + (*ListAllPositionsRequest)(nil), // 44: datanode.api.v2.ListAllPositionsRequest + (*ListAllPositionsResponse)(nil), // 45: datanode.api.v2.ListAllPositionsResponse + (*PositionEdge)(nil), // 46: datanode.api.v2.PositionEdge + (*PositionConnection)(nil), // 47: datanode.api.v2.PositionConnection + (*ObservePositionsRequest)(nil), // 48: datanode.api.v2.ObservePositionsRequest + (*ObservePositionsResponse)(nil), // 49: datanode.api.v2.ObservePositionsResponse + (*PositionSnapshotPage)(nil), // 50: datanode.api.v2.PositionSnapshotPage + (*PositionUpdates)(nil), // 51: datanode.api.v2.PositionUpdates + (*LedgerEntryFilter)(nil), // 52: datanode.api.v2.LedgerEntryFilter + (*AggregatedLedgerEntry)(nil), // 53: datanode.api.v2.AggregatedLedgerEntry + (*ListLedgerEntriesRequest)(nil), // 54: datanode.api.v2.ListLedgerEntriesRequest + (*ExportLedgerEntriesRequest)(nil), // 55: datanode.api.v2.ExportLedgerEntriesRequest + (*ListLedgerEntriesResponse)(nil), // 56: datanode.api.v2.ListLedgerEntriesResponse + (*AggregatedLedgerEntriesEdge)(nil), // 57: datanode.api.v2.AggregatedLedgerEntriesEdge + (*AggregatedLedgerEntriesConnection)(nil), // 58: datanode.api.v2.AggregatedLedgerEntriesConnection + (*ListBalanceChangesRequest)(nil), // 59: datanode.api.v2.ListBalanceChangesRequest + (*ListBalanceChangesResponse)(nil), // 60: datanode.api.v2.ListBalanceChangesResponse + (*GetBalanceHistoryRequest)(nil), // 61: datanode.api.v2.GetBalanceHistoryRequest + (*GetBalanceHistoryResponse)(nil), // 62: datanode.api.v2.GetBalanceHistoryResponse + (*AggregatedBalanceEdge)(nil), // 63: datanode.api.v2.AggregatedBalanceEdge + (*AggregatedBalanceConnection)(nil), // 64: datanode.api.v2.AggregatedBalanceConnection + (*AccountFilter)(nil), // 65: datanode.api.v2.AccountFilter + (*AggregatedBalance)(nil), // 66: datanode.api.v2.AggregatedBalance + (*ObserveMarketsDepthRequest)(nil), // 67: datanode.api.v2.ObserveMarketsDepthRequest + (*ObserveMarketsDepthResponse)(nil), // 68: datanode.api.v2.ObserveMarketsDepthResponse + (*ObserveMarketsDepthUpdatesRequest)(nil), // 69: datanode.api.v2.ObserveMarketsDepthUpdatesRequest + (*ObserveMarketsDepthUpdatesResponse)(nil), // 70: datanode.api.v2.ObserveMarketsDepthUpdatesResponse + (*ObserveMarketsDataRequest)(nil), // 71: datanode.api.v2.ObserveMarketsDataRequest + (*ObserveMarketsDataResponse)(nil), // 72: datanode.api.v2.ObserveMarketsDataResponse + (*GetLatestMarketDepthRequest)(nil), // 73: datanode.api.v2.GetLatestMarketDepthRequest + (*GetLatestMarketDepthResponse)(nil), // 74: datanode.api.v2.GetLatestMarketDepthResponse + (*ListLatestMarketDataRequest)(nil), // 75: datanode.api.v2.ListLatestMarketDataRequest + (*ListLatestMarketDataResponse)(nil), // 76: datanode.api.v2.ListLatestMarketDataResponse + (*GetLatestMarketDataRequest)(nil), // 77: datanode.api.v2.GetLatestMarketDataRequest + (*GetLatestMarketDataResponse)(nil), // 78: datanode.api.v2.GetLatestMarketDataResponse + (*GetMarketDataHistoryByIDRequest)(nil), // 79: datanode.api.v2.GetMarketDataHistoryByIDRequest + (*GetMarketDataHistoryByIDResponse)(nil), // 80: datanode.api.v2.GetMarketDataHistoryByIDResponse + (*MarketDataEdge)(nil), // 81: datanode.api.v2.MarketDataEdge + (*MarketDataConnection)(nil), // 82: datanode.api.v2.MarketDataConnection + (*ListTransfersRequest)(nil), // 83: datanode.api.v2.ListTransfersRequest + (*ListTransfersResponse)(nil), // 84: datanode.api.v2.ListTransfersResponse + (*TransferNode)(nil), // 85: datanode.api.v2.TransferNode + (*TransferEdge)(nil), // 86: datanode.api.v2.TransferEdge + (*TransferConnection)(nil), // 87: datanode.api.v2.TransferConnection + (*GetTransferRequest)(nil), // 88: datanode.api.v2.GetTransferRequest + (*GetTransferResponse)(nil), // 89: datanode.api.v2.GetTransferResponse + (*GetNetworkLimitsRequest)(nil), // 90: datanode.api.v2.GetNetworkLimitsRequest + (*GetNetworkLimitsResponse)(nil), // 91: datanode.api.v2.GetNetworkLimitsResponse + (*ListCandleIntervalsRequest)(nil), // 92: datanode.api.v2.ListCandleIntervalsRequest + (*IntervalToCandleId)(nil), // 93: datanode.api.v2.IntervalToCandleId + (*ListCandleIntervalsResponse)(nil), // 94: datanode.api.v2.ListCandleIntervalsResponse + (*Candle)(nil), // 95: datanode.api.v2.Candle + (*ObserveCandleDataRequest)(nil), // 96: datanode.api.v2.ObserveCandleDataRequest + (*ObserveCandleDataResponse)(nil), // 97: datanode.api.v2.ObserveCandleDataResponse + (*ListCandleDataRequest)(nil), // 98: datanode.api.v2.ListCandleDataRequest + (*ListCandleDataResponse)(nil), // 99: datanode.api.v2.ListCandleDataResponse + (*CandleEdge)(nil), // 100: datanode.api.v2.CandleEdge + (*CandleDataConnection)(nil), // 101: datanode.api.v2.CandleDataConnection + (*ListVotesRequest)(nil), // 102: datanode.api.v2.ListVotesRequest + (*ListVotesResponse)(nil), // 103: datanode.api.v2.ListVotesResponse + (*VoteEdge)(nil), // 104: datanode.api.v2.VoteEdge + (*VoteConnection)(nil), // 105: datanode.api.v2.VoteConnection + (*ObserveVotesRequest)(nil), // 106: datanode.api.v2.ObserveVotesRequest + (*ObserveVotesResponse)(nil), // 107: datanode.api.v2.ObserveVotesResponse + (*ListERC20MultiSigSignerAddedBundlesRequest)(nil), // 108: datanode.api.v2.ListERC20MultiSigSignerAddedBundlesRequest + (*ListERC20MultiSigSignerAddedBundlesResponse)(nil), // 109: datanode.api.v2.ListERC20MultiSigSignerAddedBundlesResponse + (*ERC20MultiSigSignerAddedEdge)(nil), // 110: datanode.api.v2.ERC20MultiSigSignerAddedEdge + (*ERC20MultiSigSignerAddedBundleEdge)(nil), // 111: datanode.api.v2.ERC20MultiSigSignerAddedBundleEdge + (*ERC20MultiSigSignerAddedConnection)(nil), // 112: datanode.api.v2.ERC20MultiSigSignerAddedConnection + (*ERC20MultiSigSignerAddedBundle)(nil), // 113: datanode.api.v2.ERC20MultiSigSignerAddedBundle + (*ListERC20MultiSigSignerRemovedBundlesRequest)(nil), // 114: datanode.api.v2.ListERC20MultiSigSignerRemovedBundlesRequest + (*ListERC20MultiSigSignerRemovedBundlesResponse)(nil), // 115: datanode.api.v2.ListERC20MultiSigSignerRemovedBundlesResponse + (*ERC20MultiSigSignerRemovedEdge)(nil), // 116: datanode.api.v2.ERC20MultiSigSignerRemovedEdge + (*ERC20MultiSigSignerRemovedBundleEdge)(nil), // 117: datanode.api.v2.ERC20MultiSigSignerRemovedBundleEdge + (*ERC20MultiSigSignerRemovedConnection)(nil), // 118: datanode.api.v2.ERC20MultiSigSignerRemovedConnection + (*ERC20MultiSigSignerRemovedBundle)(nil), // 119: datanode.api.v2.ERC20MultiSigSignerRemovedBundle + (*GetERC20ListAssetBundleRequest)(nil), // 120: datanode.api.v2.GetERC20ListAssetBundleRequest + (*GetERC20ListAssetBundleResponse)(nil), // 121: datanode.api.v2.GetERC20ListAssetBundleResponse + (*GetERC20SetAssetLimitsBundleRequest)(nil), // 122: datanode.api.v2.GetERC20SetAssetLimitsBundleRequest + (*GetERC20SetAssetLimitsBundleResponse)(nil), // 123: datanode.api.v2.GetERC20SetAssetLimitsBundleResponse + (*GetERC20WithdrawalApprovalRequest)(nil), // 124: datanode.api.v2.GetERC20WithdrawalApprovalRequest + (*GetERC20WithdrawalApprovalResponse)(nil), // 125: datanode.api.v2.GetERC20WithdrawalApprovalResponse + (*GetLastTradeRequest)(nil), // 126: datanode.api.v2.GetLastTradeRequest + (*GetLastTradeResponse)(nil), // 127: datanode.api.v2.GetLastTradeResponse + (*ListTradesRequest)(nil), // 128: datanode.api.v2.ListTradesRequest + (*ListTradesResponse)(nil), // 129: datanode.api.v2.ListTradesResponse + (*TradeConnection)(nil), // 130: datanode.api.v2.TradeConnection + (*TradeEdge)(nil), // 131: datanode.api.v2.TradeEdge + (*ObserveTradesRequest)(nil), // 132: datanode.api.v2.ObserveTradesRequest + (*ObserveTradesResponse)(nil), // 133: datanode.api.v2.ObserveTradesResponse + (*GetOracleSpecRequest)(nil), // 134: datanode.api.v2.GetOracleSpecRequest + (*GetOracleSpecResponse)(nil), // 135: datanode.api.v2.GetOracleSpecResponse + (*ListOracleSpecsRequest)(nil), // 136: datanode.api.v2.ListOracleSpecsRequest + (*ListOracleSpecsResponse)(nil), // 137: datanode.api.v2.ListOracleSpecsResponse + (*ListOracleDataRequest)(nil), // 138: datanode.api.v2.ListOracleDataRequest + (*ListOracleDataResponse)(nil), // 139: datanode.api.v2.ListOracleDataResponse + (*OracleSpecEdge)(nil), // 140: datanode.api.v2.OracleSpecEdge + (*OracleSpecsConnection)(nil), // 141: datanode.api.v2.OracleSpecsConnection + (*OracleDataEdge)(nil), // 142: datanode.api.v2.OracleDataEdge + (*OracleDataConnection)(nil), // 143: datanode.api.v2.OracleDataConnection + (*GetMarketRequest)(nil), // 144: datanode.api.v2.GetMarketRequest + (*GetMarketResponse)(nil), // 145: datanode.api.v2.GetMarketResponse + (*ListMarketsRequest)(nil), // 146: datanode.api.v2.ListMarketsRequest + (*ListMarketsResponse)(nil), // 147: datanode.api.v2.ListMarketsResponse + (*MarketEdge)(nil), // 148: datanode.api.v2.MarketEdge + (*MarketConnection)(nil), // 149: datanode.api.v2.MarketConnection + (*ListSuccessorMarketsRequest)(nil), // 150: datanode.api.v2.ListSuccessorMarketsRequest + (*SuccessorMarket)(nil), // 151: datanode.api.v2.SuccessorMarket + (*SuccessorMarketEdge)(nil), // 152: datanode.api.v2.SuccessorMarketEdge + (*SuccessorMarketConnection)(nil), // 153: datanode.api.v2.SuccessorMarketConnection + (*ListSuccessorMarketsResponse)(nil), // 154: datanode.api.v2.ListSuccessorMarketsResponse + (*GetPartyRequest)(nil), // 155: datanode.api.v2.GetPartyRequest + (*GetPartyResponse)(nil), // 156: datanode.api.v2.GetPartyResponse + (*ListPartiesRequest)(nil), // 157: datanode.api.v2.ListPartiesRequest + (*ListPartiesResponse)(nil), // 158: datanode.api.v2.ListPartiesResponse + (*PartyEdge)(nil), // 159: datanode.api.v2.PartyEdge + (*PartyConnection)(nil), // 160: datanode.api.v2.PartyConnection + (*ListPartiesProfilesRequest)(nil), // 161: datanode.api.v2.ListPartiesProfilesRequest + (*ListPartiesProfilesResponse)(nil), // 162: datanode.api.v2.ListPartiesProfilesResponse + (*PartyProfileEdge)(nil), // 163: datanode.api.v2.PartyProfileEdge + (*PartiesProfilesConnection)(nil), // 164: datanode.api.v2.PartiesProfilesConnection + (*OrderEdge)(nil), // 165: datanode.api.v2.OrderEdge + (*ListMarginLevelsRequest)(nil), // 166: datanode.api.v2.ListMarginLevelsRequest + (*ListMarginLevelsResponse)(nil), // 167: datanode.api.v2.ListMarginLevelsResponse + (*ObserveMarginLevelsRequest)(nil), // 168: datanode.api.v2.ObserveMarginLevelsRequest + (*ObserveMarginLevelsResponse)(nil), // 169: datanode.api.v2.ObserveMarginLevelsResponse + (*OrderConnection)(nil), // 170: datanode.api.v2.OrderConnection + (*MarginEdge)(nil), // 171: datanode.api.v2.MarginEdge + (*MarginConnection)(nil), // 172: datanode.api.v2.MarginConnection + (*ListRewardsRequest)(nil), // 173: datanode.api.v2.ListRewardsRequest + (*ListRewardsResponse)(nil), // 174: datanode.api.v2.ListRewardsResponse + (*RewardEdge)(nil), // 175: datanode.api.v2.RewardEdge + (*RewardsConnection)(nil), // 176: datanode.api.v2.RewardsConnection + (*ListRewardSummariesRequest)(nil), // 177: datanode.api.v2.ListRewardSummariesRequest + (*ListRewardSummariesResponse)(nil), // 178: datanode.api.v2.ListRewardSummariesResponse + (*RewardSummaryFilter)(nil), // 179: datanode.api.v2.RewardSummaryFilter + (*ListEpochRewardSummariesRequest)(nil), // 180: datanode.api.v2.ListEpochRewardSummariesRequest + (*ListEpochRewardSummariesResponse)(nil), // 181: datanode.api.v2.ListEpochRewardSummariesResponse + (*EpochRewardSummaryConnection)(nil), // 182: datanode.api.v2.EpochRewardSummaryConnection + (*EpochRewardSummaryEdge)(nil), // 183: datanode.api.v2.EpochRewardSummaryEdge + (*ObserveRewardsRequest)(nil), // 184: datanode.api.v2.ObserveRewardsRequest + (*ObserveRewardsResponse)(nil), // 185: datanode.api.v2.ObserveRewardsResponse + (*GetDepositRequest)(nil), // 186: datanode.api.v2.GetDepositRequest + (*GetDepositResponse)(nil), // 187: datanode.api.v2.GetDepositResponse + (*ListDepositsRequest)(nil), // 188: datanode.api.v2.ListDepositsRequest + (*ListDepositsResponse)(nil), // 189: datanode.api.v2.ListDepositsResponse + (*DepositEdge)(nil), // 190: datanode.api.v2.DepositEdge + (*DepositsConnection)(nil), // 191: datanode.api.v2.DepositsConnection + (*GetWithdrawalRequest)(nil), // 192: datanode.api.v2.GetWithdrawalRequest + (*GetWithdrawalResponse)(nil), // 193: datanode.api.v2.GetWithdrawalResponse + (*ListWithdrawalsRequest)(nil), // 194: datanode.api.v2.ListWithdrawalsRequest + (*ListWithdrawalsResponse)(nil), // 195: datanode.api.v2.ListWithdrawalsResponse + (*WithdrawalEdge)(nil), // 196: datanode.api.v2.WithdrawalEdge + (*WithdrawalsConnection)(nil), // 197: datanode.api.v2.WithdrawalsConnection + (*GetAssetRequest)(nil), // 198: datanode.api.v2.GetAssetRequest + (*GetAssetResponse)(nil), // 199: datanode.api.v2.GetAssetResponse + (*ListAssetsRequest)(nil), // 200: datanode.api.v2.ListAssetsRequest + (*ListAssetsResponse)(nil), // 201: datanode.api.v2.ListAssetsResponse + (*AssetEdge)(nil), // 202: datanode.api.v2.AssetEdge + (*AssetsConnection)(nil), // 203: datanode.api.v2.AssetsConnection + (*ListLiquidityProvisionsRequest)(nil), // 204: datanode.api.v2.ListLiquidityProvisionsRequest + (*ListAllLiquidityProvisionsRequest)(nil), // 205: datanode.api.v2.ListAllLiquidityProvisionsRequest + (*ListLiquidityProvisionsResponse)(nil), // 206: datanode.api.v2.ListLiquidityProvisionsResponse + (*ListAllLiquidityProvisionsResponse)(nil), // 207: datanode.api.v2.ListAllLiquidityProvisionsResponse + (*LiquidityProvision)(nil), // 208: datanode.api.v2.LiquidityProvision + (*LiquidityProvisionsEdge)(nil), // 209: datanode.api.v2.LiquidityProvisionsEdge + (*LiquidityProvisionWithPendingEdge)(nil), // 210: datanode.api.v2.LiquidityProvisionWithPendingEdge + (*LiquidityProvisionsConnection)(nil), // 211: datanode.api.v2.LiquidityProvisionsConnection + (*LiquidityProvisionsWithPendingConnection)(nil), // 212: datanode.api.v2.LiquidityProvisionsWithPendingConnection + (*ObserveLiquidityProvisionsRequest)(nil), // 213: datanode.api.v2.ObserveLiquidityProvisionsRequest + (*ObserveLiquidityProvisionsResponse)(nil), // 214: datanode.api.v2.ObserveLiquidityProvisionsResponse + (*ListLiquidityProvidersRequest)(nil), // 215: datanode.api.v2.ListLiquidityProvidersRequest + (*LiquidityProvider)(nil), // 216: datanode.api.v2.LiquidityProvider + (*LiquidityProviderEdge)(nil), // 217: datanode.api.v2.LiquidityProviderEdge + (*LiquidityProviderConnection)(nil), // 218: datanode.api.v2.LiquidityProviderConnection + (*ListLiquidityProvidersResponse)(nil), // 219: datanode.api.v2.ListLiquidityProvidersResponse + (*ListPaidLiquidityFeesRequest)(nil), // 220: datanode.api.v2.ListPaidLiquidityFeesRequest + (*ListPaidLiquidityFeesResponse)(nil), // 221: datanode.api.v2.ListPaidLiquidityFeesResponse + (*PaidLiquidityFeesEdge)(nil), // 222: datanode.api.v2.PaidLiquidityFeesEdge + (*PaidLiquidityFeesConnection)(nil), // 223: datanode.api.v2.PaidLiquidityFeesConnection + (*GetGovernanceDataRequest)(nil), // 224: datanode.api.v2.GetGovernanceDataRequest + (*GetGovernanceDataResponse)(nil), // 225: datanode.api.v2.GetGovernanceDataResponse + (*ListGovernanceDataRequest)(nil), // 226: datanode.api.v2.ListGovernanceDataRequest + (*ListGovernanceDataResponse)(nil), // 227: datanode.api.v2.ListGovernanceDataResponse + (*GovernanceDataEdge)(nil), // 228: datanode.api.v2.GovernanceDataEdge + (*GovernanceDataConnection)(nil), // 229: datanode.api.v2.GovernanceDataConnection + (*ObserveGovernanceRequest)(nil), // 230: datanode.api.v2.ObserveGovernanceRequest + (*ObserveGovernanceResponse)(nil), // 231: datanode.api.v2.ObserveGovernanceResponse + (*ListDelegationsRequest)(nil), // 232: datanode.api.v2.ListDelegationsRequest + (*ListDelegationsResponse)(nil), // 233: datanode.api.v2.ListDelegationsResponse + (*DelegationEdge)(nil), // 234: datanode.api.v2.DelegationEdge + (*DelegationsConnection)(nil), // 235: datanode.api.v2.DelegationsConnection + (*ObserveDelegationsRequest)(nil), // 236: datanode.api.v2.ObserveDelegationsRequest + (*ObserveDelegationsResponse)(nil), // 237: datanode.api.v2.ObserveDelegationsResponse + (*NodeBasic)(nil), // 238: datanode.api.v2.NodeBasic + (*GetNetworkDataRequest)(nil), // 239: datanode.api.v2.GetNetworkDataRequest + (*GetNetworkDataResponse)(nil), // 240: datanode.api.v2.GetNetworkDataResponse + (*GetNodeRequest)(nil), // 241: datanode.api.v2.GetNodeRequest + (*GetNodeResponse)(nil), // 242: datanode.api.v2.GetNodeResponse + (*ListNodesRequest)(nil), // 243: datanode.api.v2.ListNodesRequest + (*ListNodesResponse)(nil), // 244: datanode.api.v2.ListNodesResponse + (*NodeEdge)(nil), // 245: datanode.api.v2.NodeEdge + (*NodesConnection)(nil), // 246: datanode.api.v2.NodesConnection + (*ListNodeSignaturesRequest)(nil), // 247: datanode.api.v2.ListNodeSignaturesRequest + (*ListNodeSignaturesResponse)(nil), // 248: datanode.api.v2.ListNodeSignaturesResponse + (*NodeSignatureEdge)(nil), // 249: datanode.api.v2.NodeSignatureEdge + (*NodeSignaturesConnection)(nil), // 250: datanode.api.v2.NodeSignaturesConnection + (*GetEpochRequest)(nil), // 251: datanode.api.v2.GetEpochRequest + (*GetEpochResponse)(nil), // 252: datanode.api.v2.GetEpochResponse + (*EstimateFeeRequest)(nil), // 253: datanode.api.v2.EstimateFeeRequest + (*EstimateFeeResponse)(nil), // 254: datanode.api.v2.EstimateFeeResponse + (*EstimateMarginRequest)(nil), // 255: datanode.api.v2.EstimateMarginRequest + (*EstimateMarginResponse)(nil), // 256: datanode.api.v2.EstimateMarginResponse + (*ListNetworkParametersRequest)(nil), // 257: datanode.api.v2.ListNetworkParametersRequest + (*ListNetworkParametersResponse)(nil), // 258: datanode.api.v2.ListNetworkParametersResponse + (*GetNetworkParameterRequest)(nil), // 259: datanode.api.v2.GetNetworkParameterRequest + (*GetNetworkParameterResponse)(nil), // 260: datanode.api.v2.GetNetworkParameterResponse + (*NetworkParameterEdge)(nil), // 261: datanode.api.v2.NetworkParameterEdge + (*NetworkParameterConnection)(nil), // 262: datanode.api.v2.NetworkParameterConnection + (*Checkpoint)(nil), // 263: datanode.api.v2.Checkpoint + (*ListCheckpointsRequest)(nil), // 264: datanode.api.v2.ListCheckpointsRequest + (*ListCheckpointsResponse)(nil), // 265: datanode.api.v2.ListCheckpointsResponse + (*CheckpointEdge)(nil), // 266: datanode.api.v2.CheckpointEdge + (*CheckpointsConnection)(nil), // 267: datanode.api.v2.CheckpointsConnection + (*GetStakeRequest)(nil), // 268: datanode.api.v2.GetStakeRequest + (*GetStakeResponse)(nil), // 269: datanode.api.v2.GetStakeResponse + (*StakeLinkingEdge)(nil), // 270: datanode.api.v2.StakeLinkingEdge + (*StakesConnection)(nil), // 271: datanode.api.v2.StakesConnection + (*GetRiskFactorsRequest)(nil), // 272: datanode.api.v2.GetRiskFactorsRequest + (*GetRiskFactorsResponse)(nil), // 273: datanode.api.v2.GetRiskFactorsResponse + (*ObserveEventBusRequest)(nil), // 274: datanode.api.v2.ObserveEventBusRequest + (*ObserveEventBusResponse)(nil), // 275: datanode.api.v2.ObserveEventBusResponse + (*ObserveLedgerMovementsRequest)(nil), // 276: datanode.api.v2.ObserveLedgerMovementsRequest + (*ObserveLedgerMovementsResponse)(nil), // 277: datanode.api.v2.ObserveLedgerMovementsResponse + (*ListKeyRotationsRequest)(nil), // 278: datanode.api.v2.ListKeyRotationsRequest + (*ListKeyRotationsResponse)(nil), // 279: datanode.api.v2.ListKeyRotationsResponse + (*KeyRotationEdge)(nil), // 280: datanode.api.v2.KeyRotationEdge + (*KeyRotationConnection)(nil), // 281: datanode.api.v2.KeyRotationConnection + (*ListEthereumKeyRotationsRequest)(nil), // 282: datanode.api.v2.ListEthereumKeyRotationsRequest + (*ListEthereumKeyRotationsResponse)(nil), // 283: datanode.api.v2.ListEthereumKeyRotationsResponse + (*EthereumKeyRotationsConnection)(nil), // 284: datanode.api.v2.EthereumKeyRotationsConnection + (*EthereumKeyRotationEdge)(nil), // 285: datanode.api.v2.EthereumKeyRotationEdge + (*GetVegaTimeRequest)(nil), // 286: datanode.api.v2.GetVegaTimeRequest + (*GetVegaTimeResponse)(nil), // 287: datanode.api.v2.GetVegaTimeResponse + (*DateRange)(nil), // 288: datanode.api.v2.DateRange + (*GetProtocolUpgradeStatusRequest)(nil), // 289: datanode.api.v2.GetProtocolUpgradeStatusRequest + (*GetProtocolUpgradeStatusResponse)(nil), // 290: datanode.api.v2.GetProtocolUpgradeStatusResponse + (*ListProtocolUpgradeProposalsRequest)(nil), // 291: datanode.api.v2.ListProtocolUpgradeProposalsRequest + (*ListProtocolUpgradeProposalsResponse)(nil), // 292: datanode.api.v2.ListProtocolUpgradeProposalsResponse + (*ProtocolUpgradeProposalConnection)(nil), // 293: datanode.api.v2.ProtocolUpgradeProposalConnection + (*ProtocolUpgradeProposalEdge)(nil), // 294: datanode.api.v2.ProtocolUpgradeProposalEdge + (*ListCoreSnapshotsRequest)(nil), // 295: datanode.api.v2.ListCoreSnapshotsRequest + (*ListCoreSnapshotsResponse)(nil), // 296: datanode.api.v2.ListCoreSnapshotsResponse + (*CoreSnapshotConnection)(nil), // 297: datanode.api.v2.CoreSnapshotConnection + (*CoreSnapshotEdge)(nil), // 298: datanode.api.v2.CoreSnapshotEdge + (*HistorySegment)(nil), // 299: datanode.api.v2.HistorySegment + (*GetMostRecentNetworkHistorySegmentRequest)(nil), // 300: datanode.api.v2.GetMostRecentNetworkHistorySegmentRequest + (*GetMostRecentNetworkHistorySegmentResponse)(nil), // 301: datanode.api.v2.GetMostRecentNetworkHistorySegmentResponse + (*ListAllNetworkHistorySegmentsRequest)(nil), // 302: datanode.api.v2.ListAllNetworkHistorySegmentsRequest + (*ListAllNetworkHistorySegmentsResponse)(nil), // 303: datanode.api.v2.ListAllNetworkHistorySegmentsResponse + (*GetActiveNetworkHistoryPeerAddressesRequest)(nil), // 304: datanode.api.v2.GetActiveNetworkHistoryPeerAddressesRequest + (*GetActiveNetworkHistoryPeerAddressesResponse)(nil), // 305: datanode.api.v2.GetActiveNetworkHistoryPeerAddressesResponse + (*GetNetworkHistoryStatusRequest)(nil), // 306: datanode.api.v2.GetNetworkHistoryStatusRequest + (*GetNetworkHistoryStatusResponse)(nil), // 307: datanode.api.v2.GetNetworkHistoryStatusResponse + (*GetNetworkHistoryBootstrapPeersRequest)(nil), // 308: datanode.api.v2.GetNetworkHistoryBootstrapPeersRequest + (*GetNetworkHistoryBootstrapPeersResponse)(nil), // 309: datanode.api.v2.GetNetworkHistoryBootstrapPeersResponse + (*ExportNetworkHistoryRequest)(nil), // 310: datanode.api.v2.ExportNetworkHistoryRequest + (*ListEntitiesRequest)(nil), // 311: datanode.api.v2.ListEntitiesRequest + (*ListEntitiesResponse)(nil), // 312: datanode.api.v2.ListEntitiesResponse + (*GetPartyActivityStreakRequest)(nil), // 313: datanode.api.v2.GetPartyActivityStreakRequest + (*GetPartyActivityStreakResponse)(nil), // 314: datanode.api.v2.GetPartyActivityStreakResponse + (*FundingPayment)(nil), // 315: datanode.api.v2.FundingPayment + (*ListFundingPaymentsRequest)(nil), // 316: datanode.api.v2.ListFundingPaymentsRequest + (*FundingPaymentEdge)(nil), // 317: datanode.api.v2.FundingPaymentEdge + (*FundingPaymentConnection)(nil), // 318: datanode.api.v2.FundingPaymentConnection + (*ListFundingPaymentsResponse)(nil), // 319: datanode.api.v2.ListFundingPaymentsResponse + (*ListFundingPeriodsRequest)(nil), // 320: datanode.api.v2.ListFundingPeriodsRequest + (*FundingPeriodEdge)(nil), // 321: datanode.api.v2.FundingPeriodEdge + (*FundingPeriodConnection)(nil), // 322: datanode.api.v2.FundingPeriodConnection + (*ListFundingPeriodsResponse)(nil), // 323: datanode.api.v2.ListFundingPeriodsResponse + (*ListFundingPeriodDataPointsRequest)(nil), // 324: datanode.api.v2.ListFundingPeriodDataPointsRequest + (*FundingPeriodDataPointEdge)(nil), // 325: datanode.api.v2.FundingPeriodDataPointEdge + (*FundingPeriodDataPointConnection)(nil), // 326: datanode.api.v2.FundingPeriodDataPointConnection + (*ListFundingPeriodDataPointsResponse)(nil), // 327: datanode.api.v2.ListFundingPeriodDataPointsResponse + (*PingRequest)(nil), // 328: datanode.api.v2.PingRequest + (*PingResponse)(nil), // 329: datanode.api.v2.PingResponse + (*OrderInfo)(nil), // 330: datanode.api.v2.OrderInfo + (*EstimatePositionRequest)(nil), // 331: datanode.api.v2.EstimatePositionRequest + (*EstimatePositionResponse)(nil), // 332: datanode.api.v2.EstimatePositionResponse + (*CollateralIncreaseEstimate)(nil), // 333: datanode.api.v2.CollateralIncreaseEstimate + (*MarginEstimate)(nil), // 334: datanode.api.v2.MarginEstimate + (*LiquidationEstimate)(nil), // 335: datanode.api.v2.LiquidationEstimate + (*LiquidationPrice)(nil), // 336: datanode.api.v2.LiquidationPrice + (*GetCurrentReferralProgramRequest)(nil), // 337: datanode.api.v2.GetCurrentReferralProgramRequest + (*GetCurrentReferralProgramResponse)(nil), // 338: datanode.api.v2.GetCurrentReferralProgramResponse + (*ReferralProgram)(nil), // 339: datanode.api.v2.ReferralProgram + (*ReferralSet)(nil), // 340: datanode.api.v2.ReferralSet + (*ReferralSetEdge)(nil), // 341: datanode.api.v2.ReferralSetEdge + (*ReferralSetConnection)(nil), // 342: datanode.api.v2.ReferralSetConnection + (*ListReferralSetsRequest)(nil), // 343: datanode.api.v2.ListReferralSetsRequest + (*ListReferralSetsResponse)(nil), // 344: datanode.api.v2.ListReferralSetsResponse + (*ReferralSetReferee)(nil), // 345: datanode.api.v2.ReferralSetReferee + (*ReferralSetRefereeEdge)(nil), // 346: datanode.api.v2.ReferralSetRefereeEdge + (*ReferralSetRefereeConnection)(nil), // 347: datanode.api.v2.ReferralSetRefereeConnection + (*ListReferralSetRefereesRequest)(nil), // 348: datanode.api.v2.ListReferralSetRefereesRequest + (*ListReferralSetRefereesResponse)(nil), // 349: datanode.api.v2.ListReferralSetRefereesResponse + (*GetReferralSetStatsRequest)(nil), // 350: datanode.api.v2.GetReferralSetStatsRequest + (*GetReferralSetStatsResponse)(nil), // 351: datanode.api.v2.GetReferralSetStatsResponse + (*ReferralSetStatsConnection)(nil), // 352: datanode.api.v2.ReferralSetStatsConnection + (*ReferralSetStatsEdge)(nil), // 353: datanode.api.v2.ReferralSetStatsEdge + (*ReferralSetStats)(nil), // 354: datanode.api.v2.ReferralSetStats + (*Team)(nil), // 355: datanode.api.v2.Team + (*TeamEdge)(nil), // 356: datanode.api.v2.TeamEdge + (*TeamConnection)(nil), // 357: datanode.api.v2.TeamConnection + (*ListTeamsRequest)(nil), // 358: datanode.api.v2.ListTeamsRequest + (*ListTeamsResponse)(nil), // 359: datanode.api.v2.ListTeamsResponse + (*ListTeamsStatisticsRequest)(nil), // 360: datanode.api.v2.ListTeamsStatisticsRequest + (*ListTeamsStatisticsResponse)(nil), // 361: datanode.api.v2.ListTeamsStatisticsResponse + (*TeamsStatisticsConnection)(nil), // 362: datanode.api.v2.TeamsStatisticsConnection + (*TeamStatisticsEdge)(nil), // 363: datanode.api.v2.TeamStatisticsEdge + (*TeamStatistics)(nil), // 364: datanode.api.v2.TeamStatistics + (*QuantumRewardsPerEpoch)(nil), // 365: datanode.api.v2.QuantumRewardsPerEpoch + (*QuantumVolumesPerEpoch)(nil), // 366: datanode.api.v2.QuantumVolumesPerEpoch + (*ListTeamMembersStatisticsRequest)(nil), // 367: datanode.api.v2.ListTeamMembersStatisticsRequest + (*ListTeamMembersStatisticsResponse)(nil), // 368: datanode.api.v2.ListTeamMembersStatisticsResponse + (*TeamMembersStatisticsConnection)(nil), // 369: datanode.api.v2.TeamMembersStatisticsConnection + (*TeamMemberStatisticsEdge)(nil), // 370: datanode.api.v2.TeamMemberStatisticsEdge + (*TeamMemberStatistics)(nil), // 371: datanode.api.v2.TeamMemberStatistics + (*ListTeamRefereesRequest)(nil), // 372: datanode.api.v2.ListTeamRefereesRequest + (*TeamReferee)(nil), // 373: datanode.api.v2.TeamReferee + (*TeamRefereeEdge)(nil), // 374: datanode.api.v2.TeamRefereeEdge + (*TeamRefereeConnection)(nil), // 375: datanode.api.v2.TeamRefereeConnection + (*ListTeamRefereesResponse)(nil), // 376: datanode.api.v2.ListTeamRefereesResponse + (*TeamRefereeHistory)(nil), // 377: datanode.api.v2.TeamRefereeHistory + (*TeamRefereeHistoryEdge)(nil), // 378: datanode.api.v2.TeamRefereeHistoryEdge + (*TeamRefereeHistoryConnection)(nil), // 379: datanode.api.v2.TeamRefereeHistoryConnection + (*ListTeamRefereeHistoryRequest)(nil), // 380: datanode.api.v2.ListTeamRefereeHistoryRequest + (*ListTeamRefereeHistoryResponse)(nil), // 381: datanode.api.v2.ListTeamRefereeHistoryResponse + (*GetFeesStatsRequest)(nil), // 382: datanode.api.v2.GetFeesStatsRequest + (*GetFeesStatsResponse)(nil), // 383: datanode.api.v2.GetFeesStatsResponse + (*GetFeesStatsForPartyRequest)(nil), // 384: datanode.api.v2.GetFeesStatsForPartyRequest + (*GetFeesStatsForPartyResponse)(nil), // 385: datanode.api.v2.GetFeesStatsForPartyResponse + (*GetCurrentVolumeDiscountProgramRequest)(nil), // 386: datanode.api.v2.GetCurrentVolumeDiscountProgramRequest + (*GetCurrentVolumeDiscountProgramResponse)(nil), // 387: datanode.api.v2.GetCurrentVolumeDiscountProgramResponse + (*GetVolumeDiscountStatsRequest)(nil), // 388: datanode.api.v2.GetVolumeDiscountStatsRequest + (*GetVolumeDiscountStatsResponse)(nil), // 389: datanode.api.v2.GetVolumeDiscountStatsResponse + (*VolumeDiscountStatsConnection)(nil), // 390: datanode.api.v2.VolumeDiscountStatsConnection + (*VolumeDiscountStatsEdge)(nil), // 391: datanode.api.v2.VolumeDiscountStatsEdge + (*VolumeDiscountStats)(nil), // 392: datanode.api.v2.VolumeDiscountStats + (*VolumeDiscountProgram)(nil), // 393: datanode.api.v2.VolumeDiscountProgram + (*FeesStatsForParty)(nil), // 394: datanode.api.v2.FeesStatsForParty + (*ObserveTransactionResultsRequest)(nil), // 395: datanode.api.v2.ObserveTransactionResultsRequest + (*ObserveTransactionResultsResponse)(nil), // 396: datanode.api.v2.ObserveTransactionResultsResponse + (*EstimateTransferFeeRequest)(nil), // 397: datanode.api.v2.EstimateTransferFeeRequest + (*EstimateTransferFeeResponse)(nil), // 398: datanode.api.v2.EstimateTransferFeeResponse + (*GetTotalTransferFeeDiscountRequest)(nil), // 399: datanode.api.v2.GetTotalTransferFeeDiscountRequest + (*GetTotalTransferFeeDiscountResponse)(nil), // 400: datanode.api.v2.GetTotalTransferFeeDiscountResponse + (*ListGamesRequest)(nil), // 401: datanode.api.v2.ListGamesRequest + (*ListGamesResponse)(nil), // 402: datanode.api.v2.ListGamesResponse + (*GamesConnection)(nil), // 403: datanode.api.v2.GamesConnection + (*GameEdge)(nil), // 404: datanode.api.v2.GameEdge + (*Game)(nil), // 405: datanode.api.v2.Game + (*TeamGameEntities)(nil), // 406: datanode.api.v2.TeamGameEntities + (*IndividualGameEntities)(nil), // 407: datanode.api.v2.IndividualGameEntities + (*TeamGameEntity)(nil), // 408: datanode.api.v2.TeamGameEntity + (*TeamGameParticipation)(nil), // 409: datanode.api.v2.TeamGameParticipation + (*IndividualGameEntity)(nil), // 410: datanode.api.v2.IndividualGameEntity + (*ListPartyMarginModesRequest)(nil), // 411: datanode.api.v2.ListPartyMarginModesRequest + (*ListPartyMarginModesResponse)(nil), // 412: datanode.api.v2.ListPartyMarginModesResponse + (*PartyMarginModesConnection)(nil), // 413: datanode.api.v2.PartyMarginModesConnection + (*PartyMarginModeEdge)(nil), // 414: datanode.api.v2.PartyMarginModeEdge + (*PartyMarginMode)(nil), // 415: datanode.api.v2.PartyMarginMode + (*v1.PartyLockedBalance)(nil), // 416: vega.events.v1.PartyLockedBalance + (*v1.PartyVestingBalance)(nil), // 417: vega.events.v1.PartyVestingBalance + (vega.AccountType)(0), // 418: vega.AccountType + (*vega.Order)(nil), // 419: vega.Order + (vega.Order_Status)(0), // 420: vega.Order.Status + (vega.Order_Type)(0), // 421: vega.Order.Type + (vega.Order_TimeInForce)(0), // 422: vega.Order.TimeInForce + (*v1.StopOrderEvent)(nil), // 423: vega.events.v1.StopOrderEvent + (vega.StopOrder_Status)(0), // 424: vega.StopOrder.Status + (vega.StopOrder_ExpiryStrategy)(0), // 425: vega.StopOrder.ExpiryStrategy + (*vega.Position)(nil), // 426: vega.Position + (vega.TransferType)(0), // 427: vega.TransferType + (*vega.MarketDepth)(nil), // 428: vega.MarketDepth + (*vega.MarketDepthUpdate)(nil), // 429: vega.MarketDepthUpdate + (*vega.MarketData)(nil), // 430: vega.MarketData + (*vega.PriceLevel)(nil), // 431: vega.PriceLevel + (*vega.Trade)(nil), // 432: vega.Trade + (v1.Transfer_Status)(0), // 433: vega.events.v1.Transfer.Status + (*v1.Transfer)(nil), // 434: vega.events.v1.Transfer + (*v1.TransferFees)(nil), // 435: vega.events.v1.TransferFees + (*vega.NetworkLimits)(nil), // 436: vega.NetworkLimits + (*vega.Vote)(nil), // 437: vega.Vote + (*v1.ERC20MultiSigSignerAdded)(nil), // 438: vega.events.v1.ERC20MultiSigSignerAdded + (*v1.ERC20MultiSigSignerRemoved)(nil), // 439: vega.events.v1.ERC20MultiSigSignerRemoved + (*vega.OracleSpec)(nil), // 440: vega.OracleSpec + (*vega.OracleData)(nil), // 441: vega.OracleData + (*vega.Market)(nil), // 442: vega.Market + (*vega.GovernanceData)(nil), // 443: vega.GovernanceData + (*vega.Party)(nil), // 444: vega.Party + (*vega.PartyProfile)(nil), // 445: vega.PartyProfile + (*vega.MarginLevels)(nil), // 446: vega.MarginLevels + (*vega.Reward)(nil), // 447: vega.Reward + (*vega.RewardSummary)(nil), // 448: vega.RewardSummary + (*vega.EpochRewardSummary)(nil), // 449: vega.EpochRewardSummary + (*vega.Deposit)(nil), // 450: vega.Deposit + (*vega.Withdrawal)(nil), // 451: vega.Withdrawal + (*vega.Asset)(nil), // 452: vega.Asset + (*vega.LiquidityProvision)(nil), // 453: vega.LiquidityProvision + (*vega.LiquidityProviderFeeShare)(nil), // 454: vega.LiquidityProviderFeeShare + (*vega.LiquidityProviderSLA)(nil), // 455: vega.LiquidityProviderSLA + (*v1.PaidLiquidityFeesStats)(nil), // 456: vega.events.v1.PaidLiquidityFeesStats + (vega.Proposal_State)(0), // 457: vega.Proposal.State + (*vega.Delegation)(nil), // 458: vega.Delegation + (vega.NodeStatus)(0), // 459: vega.NodeStatus + (*vega.NodeData)(nil), // 460: vega.NodeData + (*vega.Node)(nil), // 461: vega.Node + (*v11.NodeSignature)(nil), // 462: vega.commands.v1.NodeSignature + (*vega.Epoch)(nil), // 463: vega.Epoch + (*vega.Fee)(nil), // 464: vega.Fee + (vega.Side)(0), // 465: vega.Side + (*vega.NetworkParameter)(nil), // 466: vega.NetworkParameter + (*v1.StakeLinking)(nil), // 467: vega.events.v1.StakeLinking + (*vega.RiskFactor)(nil), // 468: vega.RiskFactor + (v1.BusEventType)(0), // 469: vega.events.v1.BusEventType + (*v1.BusEvent)(nil), // 470: vega.events.v1.BusEvent + (*vega.LedgerMovement)(nil), // 471: vega.LedgerMovement + (*v1.KeyRotation)(nil), // 472: vega.events.v1.KeyRotation + (*v1.EthereumKeyRotation)(nil), // 473: vega.events.v1.EthereumKeyRotation + (v1.ProtocolUpgradeProposalStatus)(0), // 474: vega.events.v1.ProtocolUpgradeProposalStatus + (*v1.ProtocolUpgradeEvent)(nil), // 475: vega.events.v1.ProtocolUpgradeEvent + (*v1.CoreSnapshotData)(nil), // 476: vega.events.v1.CoreSnapshotData + (*vega.Account)(nil), // 477: vega.Account + (*vega.LedgerEntry)(nil), // 478: vega.LedgerEntry + (*vega.Proposal)(nil), // 479: vega.Proposal + (*v1.PartyActivityStreak)(nil), // 480: vega.events.v1.PartyActivityStreak + (*v1.FundingPeriod)(nil), // 481: vega.events.v1.FundingPeriod + (v1.FundingPeriodDataPoint_Source)(0), // 482: vega.events.v1.FundingPeriodDataPoint.Source + (*v1.FundingPeriodDataPoint)(nil), // 483: vega.events.v1.FundingPeriodDataPoint + (vega.MarginMode)(0), // 484: vega.MarginMode + (*vega.BenefitTier)(nil), // 485: vega.BenefitTier + (*vega.StakingTier)(nil), // 486: vega.StakingTier + (*v1.FeesStats)(nil), // 487: vega.events.v1.FeesStats + (*vega.VolumeBenefitTier)(nil), // 488: vega.VolumeBenefitTier + (*v1.TransactionResult)(nil), // 489: vega.events.v1.TransactionResult + (vega.EntityScope)(0), // 490: vega.EntityScope + (vega.DispatchMetric)(0), // 491: vega.DispatchMetric + (*httpbody.HttpBody)(nil), // 492: google.api.HttpBody } var file_data_node_api_v2_trading_data_proto_depIdxs = []int32{ - 377, // 0: datanode.api.v2.GetVestingBalancesSummaryResponse.locked_balances:type_name -> vega.events.v1.PartyLockedBalance - 378, // 1: datanode.api.v2.GetVestingBalancesSummaryResponse.vesting_balances:type_name -> vega.events.v1.PartyVestingBalance - 379, // 2: datanode.api.v2.AccountBalance.type:type_name -> vega.AccountType - 64, // 3: datanode.api.v2.ListAccountsRequest.filter:type_name -> datanode.api.v2.AccountFilter - 5, // 4: datanode.api.v2.ListAccountsRequest.pagination:type_name -> datanode.api.v2.Pagination - 14, // 5: datanode.api.v2.ListAccountsResponse.accounts:type_name -> datanode.api.v2.AccountsConnection - 15, // 6: datanode.api.v2.AccountsConnection.edges:type_name -> datanode.api.v2.AccountEdge - 6, // 7: datanode.api.v2.AccountsConnection.page_info:type_name -> datanode.api.v2.PageInfo - 11, // 8: datanode.api.v2.AccountEdge.node:type_name -> datanode.api.v2.AccountBalance - 379, // 9: datanode.api.v2.ObserveAccountsRequest.type:type_name -> vega.AccountType - 18, // 10: datanode.api.v2.ObserveAccountsResponse.snapshot:type_name -> datanode.api.v2.AccountSnapshotPage - 19, // 11: datanode.api.v2.ObserveAccountsResponse.updates:type_name -> datanode.api.v2.AccountUpdates - 11, // 12: datanode.api.v2.AccountSnapshotPage.accounts:type_name -> datanode.api.v2.AccountBalance - 11, // 13: datanode.api.v2.AccountUpdates.accounts:type_name -> datanode.api.v2.AccountBalance - 380, // 14: datanode.api.v2.GetOrderResponse.order:type_name -> vega.Order - 381, // 15: datanode.api.v2.OrderFilter.statuses:type_name -> vega.Order.Status - 382, // 16: datanode.api.v2.OrderFilter.types:type_name -> vega.Order.Type - 383, // 17: datanode.api.v2.OrderFilter.time_in_forces:type_name -> vega.Order.TimeInForce - 283, // 18: datanode.api.v2.OrderFilter.date_range:type_name -> datanode.api.v2.DateRange - 5, // 19: datanode.api.v2.ListOrdersRequest.pagination:type_name -> datanode.api.v2.Pagination - 24, // 20: datanode.api.v2.ListOrdersRequest.filter:type_name -> datanode.api.v2.OrderFilter - 165, // 21: datanode.api.v2.ListOrdersResponse.orders:type_name -> datanode.api.v2.OrderConnection - 5, // 22: datanode.api.v2.ListOrderVersionsRequest.pagination:type_name -> datanode.api.v2.Pagination - 165, // 23: datanode.api.v2.ListOrderVersionsResponse.orders:type_name -> datanode.api.v2.OrderConnection - 31, // 24: datanode.api.v2.ObserveOrdersResponse.snapshot:type_name -> datanode.api.v2.OrderSnapshotPage - 32, // 25: datanode.api.v2.ObserveOrdersResponse.updates:type_name -> datanode.api.v2.OrderUpdates - 380, // 26: datanode.api.v2.OrderSnapshotPage.orders:type_name -> vega.Order - 380, // 27: datanode.api.v2.OrderUpdates.orders:type_name -> vega.Order - 384, // 28: datanode.api.v2.GetStopOrderResponse.order:type_name -> vega.events.v1.StopOrderEvent - 5, // 29: datanode.api.v2.ListStopOrdersRequest.pagination:type_name -> datanode.api.v2.Pagination - 36, // 30: datanode.api.v2.ListStopOrdersRequest.filter:type_name -> datanode.api.v2.StopOrderFilter - 385, // 31: datanode.api.v2.StopOrderFilter.statuses:type_name -> vega.StopOrder.Status - 386, // 32: datanode.api.v2.StopOrderFilter.expiry_strategies:type_name -> vega.StopOrder.ExpiryStrategy - 283, // 33: datanode.api.v2.StopOrderFilter.date_range:type_name -> datanode.api.v2.DateRange - 384, // 34: datanode.api.v2.StopOrderEdge.node:type_name -> vega.events.v1.StopOrderEvent - 37, // 35: datanode.api.v2.StopOrderConnection.edges:type_name -> datanode.api.v2.StopOrderEdge - 6, // 36: datanode.api.v2.StopOrderConnection.page_info:type_name -> datanode.api.v2.PageInfo - 38, // 37: datanode.api.v2.ListStopOrdersResponse.orders:type_name -> datanode.api.v2.StopOrderConnection - 5, // 38: datanode.api.v2.ListPositionsRequest.pagination:type_name -> datanode.api.v2.Pagination - 46, // 39: datanode.api.v2.ListPositionsResponse.positions:type_name -> datanode.api.v2.PositionConnection - 42, // 40: datanode.api.v2.ListAllPositionsRequest.filter:type_name -> datanode.api.v2.PositionsFilter - 5, // 41: datanode.api.v2.ListAllPositionsRequest.pagination:type_name -> datanode.api.v2.Pagination - 46, // 42: datanode.api.v2.ListAllPositionsResponse.positions:type_name -> datanode.api.v2.PositionConnection - 387, // 43: datanode.api.v2.PositionEdge.node:type_name -> vega.Position - 45, // 44: datanode.api.v2.PositionConnection.edges:type_name -> datanode.api.v2.PositionEdge - 6, // 45: datanode.api.v2.PositionConnection.page_info:type_name -> datanode.api.v2.PageInfo - 49, // 46: datanode.api.v2.ObservePositionsResponse.snapshot:type_name -> datanode.api.v2.PositionSnapshotPage - 50, // 47: datanode.api.v2.ObservePositionsResponse.updates:type_name -> datanode.api.v2.PositionUpdates - 387, // 48: datanode.api.v2.PositionSnapshotPage.positions:type_name -> vega.Position - 387, // 49: datanode.api.v2.PositionUpdates.positions:type_name -> vega.Position - 64, // 50: datanode.api.v2.LedgerEntryFilter.from_account_filter:type_name -> datanode.api.v2.AccountFilter - 64, // 51: datanode.api.v2.LedgerEntryFilter.to_account_filter:type_name -> datanode.api.v2.AccountFilter - 388, // 52: datanode.api.v2.LedgerEntryFilter.transfer_types:type_name -> vega.TransferType - 388, // 53: datanode.api.v2.AggregatedLedgerEntry.transfer_type:type_name -> vega.TransferType - 379, // 54: datanode.api.v2.AggregatedLedgerEntry.from_account_type:type_name -> vega.AccountType - 379, // 55: datanode.api.v2.AggregatedLedgerEntry.to_account_type:type_name -> vega.AccountType - 51, // 56: datanode.api.v2.ListLedgerEntriesRequest.filter:type_name -> datanode.api.v2.LedgerEntryFilter - 5, // 57: datanode.api.v2.ListLedgerEntriesRequest.pagination:type_name -> datanode.api.v2.Pagination - 283, // 58: datanode.api.v2.ListLedgerEntriesRequest.date_range:type_name -> datanode.api.v2.DateRange - 283, // 59: datanode.api.v2.ExportLedgerEntriesRequest.date_range:type_name -> datanode.api.v2.DateRange - 57, // 60: datanode.api.v2.ListLedgerEntriesResponse.ledger_entries:type_name -> datanode.api.v2.AggregatedLedgerEntriesConnection - 52, // 61: datanode.api.v2.AggregatedLedgerEntriesEdge.node:type_name -> datanode.api.v2.AggregatedLedgerEntry - 56, // 62: datanode.api.v2.AggregatedLedgerEntriesConnection.edges:type_name -> datanode.api.v2.AggregatedLedgerEntriesEdge - 6, // 63: datanode.api.v2.AggregatedLedgerEntriesConnection.page_info:type_name -> datanode.api.v2.PageInfo - 64, // 64: datanode.api.v2.ListBalanceChangesRequest.filter:type_name -> datanode.api.v2.AccountFilter - 5, // 65: datanode.api.v2.ListBalanceChangesRequest.pagination:type_name -> datanode.api.v2.Pagination - 283, // 66: datanode.api.v2.ListBalanceChangesRequest.date_range:type_name -> datanode.api.v2.DateRange - 63, // 67: datanode.api.v2.ListBalanceChangesResponse.balances:type_name -> datanode.api.v2.AggregatedBalanceConnection - 64, // 68: datanode.api.v2.GetBalanceHistoryRequest.filter:type_name -> datanode.api.v2.AccountFilter + 416, // 0: datanode.api.v2.GetVestingBalancesSummaryResponse.locked_balances:type_name -> vega.events.v1.PartyLockedBalance + 417, // 1: datanode.api.v2.GetVestingBalancesSummaryResponse.vesting_balances:type_name -> vega.events.v1.PartyVestingBalance + 418, // 2: datanode.api.v2.AccountBalance.type:type_name -> vega.AccountType + 65, // 3: datanode.api.v2.ListAccountsRequest.filter:type_name -> datanode.api.v2.AccountFilter + 6, // 4: datanode.api.v2.ListAccountsRequest.pagination:type_name -> datanode.api.v2.Pagination + 15, // 5: datanode.api.v2.ListAccountsResponse.accounts:type_name -> datanode.api.v2.AccountsConnection + 16, // 6: datanode.api.v2.AccountsConnection.edges:type_name -> datanode.api.v2.AccountEdge + 7, // 7: datanode.api.v2.AccountsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 12, // 8: datanode.api.v2.AccountEdge.node:type_name -> datanode.api.v2.AccountBalance + 418, // 9: datanode.api.v2.ObserveAccountsRequest.type:type_name -> vega.AccountType + 19, // 10: datanode.api.v2.ObserveAccountsResponse.snapshot:type_name -> datanode.api.v2.AccountSnapshotPage + 20, // 11: datanode.api.v2.ObserveAccountsResponse.updates:type_name -> datanode.api.v2.AccountUpdates + 12, // 12: datanode.api.v2.AccountSnapshotPage.accounts:type_name -> datanode.api.v2.AccountBalance + 12, // 13: datanode.api.v2.AccountUpdates.accounts:type_name -> datanode.api.v2.AccountBalance + 419, // 14: datanode.api.v2.GetOrderResponse.order:type_name -> vega.Order + 420, // 15: datanode.api.v2.OrderFilter.statuses:type_name -> vega.Order.Status + 421, // 16: datanode.api.v2.OrderFilter.types:type_name -> vega.Order.Type + 422, // 17: datanode.api.v2.OrderFilter.time_in_forces:type_name -> vega.Order.TimeInForce + 288, // 18: datanode.api.v2.OrderFilter.date_range:type_name -> datanode.api.v2.DateRange + 6, // 19: datanode.api.v2.ListOrdersRequest.pagination:type_name -> datanode.api.v2.Pagination + 25, // 20: datanode.api.v2.ListOrdersRequest.filter:type_name -> datanode.api.v2.OrderFilter + 170, // 21: datanode.api.v2.ListOrdersResponse.orders:type_name -> datanode.api.v2.OrderConnection + 6, // 22: datanode.api.v2.ListOrderVersionsRequest.pagination:type_name -> datanode.api.v2.Pagination + 170, // 23: datanode.api.v2.ListOrderVersionsResponse.orders:type_name -> datanode.api.v2.OrderConnection + 32, // 24: datanode.api.v2.ObserveOrdersResponse.snapshot:type_name -> datanode.api.v2.OrderSnapshotPage + 33, // 25: datanode.api.v2.ObserveOrdersResponse.updates:type_name -> datanode.api.v2.OrderUpdates + 419, // 26: datanode.api.v2.OrderSnapshotPage.orders:type_name -> vega.Order + 419, // 27: datanode.api.v2.OrderUpdates.orders:type_name -> vega.Order + 423, // 28: datanode.api.v2.GetStopOrderResponse.order:type_name -> vega.events.v1.StopOrderEvent + 6, // 29: datanode.api.v2.ListStopOrdersRequest.pagination:type_name -> datanode.api.v2.Pagination + 37, // 30: datanode.api.v2.ListStopOrdersRequest.filter:type_name -> datanode.api.v2.StopOrderFilter + 424, // 31: datanode.api.v2.StopOrderFilter.statuses:type_name -> vega.StopOrder.Status + 425, // 32: datanode.api.v2.StopOrderFilter.expiry_strategies:type_name -> vega.StopOrder.ExpiryStrategy + 288, // 33: datanode.api.v2.StopOrderFilter.date_range:type_name -> datanode.api.v2.DateRange + 423, // 34: datanode.api.v2.StopOrderEdge.node:type_name -> vega.events.v1.StopOrderEvent + 38, // 35: datanode.api.v2.StopOrderConnection.edges:type_name -> datanode.api.v2.StopOrderEdge + 7, // 36: datanode.api.v2.StopOrderConnection.page_info:type_name -> datanode.api.v2.PageInfo + 39, // 37: datanode.api.v2.ListStopOrdersResponse.orders:type_name -> datanode.api.v2.StopOrderConnection + 6, // 38: datanode.api.v2.ListPositionsRequest.pagination:type_name -> datanode.api.v2.Pagination + 47, // 39: datanode.api.v2.ListPositionsResponse.positions:type_name -> datanode.api.v2.PositionConnection + 43, // 40: datanode.api.v2.ListAllPositionsRequest.filter:type_name -> datanode.api.v2.PositionsFilter + 6, // 41: datanode.api.v2.ListAllPositionsRequest.pagination:type_name -> datanode.api.v2.Pagination + 47, // 42: datanode.api.v2.ListAllPositionsResponse.positions:type_name -> datanode.api.v2.PositionConnection + 426, // 43: datanode.api.v2.PositionEdge.node:type_name -> vega.Position + 46, // 44: datanode.api.v2.PositionConnection.edges:type_name -> datanode.api.v2.PositionEdge + 7, // 45: datanode.api.v2.PositionConnection.page_info:type_name -> datanode.api.v2.PageInfo + 50, // 46: datanode.api.v2.ObservePositionsResponse.snapshot:type_name -> datanode.api.v2.PositionSnapshotPage + 51, // 47: datanode.api.v2.ObservePositionsResponse.updates:type_name -> datanode.api.v2.PositionUpdates + 426, // 48: datanode.api.v2.PositionSnapshotPage.positions:type_name -> vega.Position + 426, // 49: datanode.api.v2.PositionUpdates.positions:type_name -> vega.Position + 65, // 50: datanode.api.v2.LedgerEntryFilter.from_account_filter:type_name -> datanode.api.v2.AccountFilter + 65, // 51: datanode.api.v2.LedgerEntryFilter.to_account_filter:type_name -> datanode.api.v2.AccountFilter + 427, // 52: datanode.api.v2.LedgerEntryFilter.transfer_types:type_name -> vega.TransferType + 427, // 53: datanode.api.v2.AggregatedLedgerEntry.transfer_type:type_name -> vega.TransferType + 418, // 54: datanode.api.v2.AggregatedLedgerEntry.from_account_type:type_name -> vega.AccountType + 418, // 55: datanode.api.v2.AggregatedLedgerEntry.to_account_type:type_name -> vega.AccountType + 52, // 56: datanode.api.v2.ListLedgerEntriesRequest.filter:type_name -> datanode.api.v2.LedgerEntryFilter + 6, // 57: datanode.api.v2.ListLedgerEntriesRequest.pagination:type_name -> datanode.api.v2.Pagination + 288, // 58: datanode.api.v2.ListLedgerEntriesRequest.date_range:type_name -> datanode.api.v2.DateRange + 288, // 59: datanode.api.v2.ExportLedgerEntriesRequest.date_range:type_name -> datanode.api.v2.DateRange + 58, // 60: datanode.api.v2.ListLedgerEntriesResponse.ledger_entries:type_name -> datanode.api.v2.AggregatedLedgerEntriesConnection + 53, // 61: datanode.api.v2.AggregatedLedgerEntriesEdge.node:type_name -> datanode.api.v2.AggregatedLedgerEntry + 57, // 62: datanode.api.v2.AggregatedLedgerEntriesConnection.edges:type_name -> datanode.api.v2.AggregatedLedgerEntriesEdge + 7, // 63: datanode.api.v2.AggregatedLedgerEntriesConnection.page_info:type_name -> datanode.api.v2.PageInfo + 65, // 64: datanode.api.v2.ListBalanceChangesRequest.filter:type_name -> datanode.api.v2.AccountFilter + 6, // 65: datanode.api.v2.ListBalanceChangesRequest.pagination:type_name -> datanode.api.v2.Pagination + 288, // 66: datanode.api.v2.ListBalanceChangesRequest.date_range:type_name -> datanode.api.v2.DateRange + 64, // 67: datanode.api.v2.ListBalanceChangesResponse.balances:type_name -> datanode.api.v2.AggregatedBalanceConnection + 65, // 68: datanode.api.v2.GetBalanceHistoryRequest.filter:type_name -> datanode.api.v2.AccountFilter 1, // 69: datanode.api.v2.GetBalanceHistoryRequest.group_by:type_name -> datanode.api.v2.AccountField - 5, // 70: datanode.api.v2.GetBalanceHistoryRequest.pagination:type_name -> datanode.api.v2.Pagination - 283, // 71: datanode.api.v2.GetBalanceHistoryRequest.date_range:type_name -> datanode.api.v2.DateRange - 63, // 72: datanode.api.v2.GetBalanceHistoryResponse.balances:type_name -> datanode.api.v2.AggregatedBalanceConnection - 65, // 73: datanode.api.v2.AggregatedBalanceEdge.node:type_name -> datanode.api.v2.AggregatedBalance - 62, // 74: datanode.api.v2.AggregatedBalanceConnection.edges:type_name -> datanode.api.v2.AggregatedBalanceEdge - 6, // 75: datanode.api.v2.AggregatedBalanceConnection.page_info:type_name -> datanode.api.v2.PageInfo - 379, // 76: datanode.api.v2.AccountFilter.account_types:type_name -> vega.AccountType - 379, // 77: datanode.api.v2.AggregatedBalance.account_type:type_name -> vega.AccountType - 389, // 78: datanode.api.v2.ObserveMarketsDepthResponse.market_depth:type_name -> vega.MarketDepth - 390, // 79: datanode.api.v2.ObserveMarketsDepthUpdatesResponse.update:type_name -> vega.MarketDepthUpdate - 391, // 80: datanode.api.v2.ObserveMarketsDataResponse.market_data:type_name -> vega.MarketData - 392, // 81: datanode.api.v2.GetLatestMarketDepthResponse.buy:type_name -> vega.PriceLevel - 392, // 82: datanode.api.v2.GetLatestMarketDepthResponse.sell:type_name -> vega.PriceLevel - 393, // 83: datanode.api.v2.GetLatestMarketDepthResponse.last_trade:type_name -> vega.Trade - 391, // 84: datanode.api.v2.ListLatestMarketDataResponse.markets_data:type_name -> vega.MarketData - 391, // 85: datanode.api.v2.GetLatestMarketDataResponse.market_data:type_name -> vega.MarketData - 5, // 86: datanode.api.v2.GetMarketDataHistoryByIDRequest.pagination:type_name -> datanode.api.v2.Pagination - 81, // 87: datanode.api.v2.GetMarketDataHistoryByIDResponse.market_data:type_name -> datanode.api.v2.MarketDataConnection - 391, // 88: datanode.api.v2.MarketDataEdge.node:type_name -> vega.MarketData - 80, // 89: datanode.api.v2.MarketDataConnection.edges:type_name -> datanode.api.v2.MarketDataEdge - 6, // 90: datanode.api.v2.MarketDataConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 70: datanode.api.v2.GetBalanceHistoryRequest.pagination:type_name -> datanode.api.v2.Pagination + 288, // 71: datanode.api.v2.GetBalanceHistoryRequest.date_range:type_name -> datanode.api.v2.DateRange + 64, // 72: datanode.api.v2.GetBalanceHistoryResponse.balances:type_name -> datanode.api.v2.AggregatedBalanceConnection + 66, // 73: datanode.api.v2.AggregatedBalanceEdge.node:type_name -> datanode.api.v2.AggregatedBalance + 63, // 74: datanode.api.v2.AggregatedBalanceConnection.edges:type_name -> datanode.api.v2.AggregatedBalanceEdge + 7, // 75: datanode.api.v2.AggregatedBalanceConnection.page_info:type_name -> datanode.api.v2.PageInfo + 418, // 76: datanode.api.v2.AccountFilter.account_types:type_name -> vega.AccountType + 418, // 77: datanode.api.v2.AggregatedBalance.account_type:type_name -> vega.AccountType + 428, // 78: datanode.api.v2.ObserveMarketsDepthResponse.market_depth:type_name -> vega.MarketDepth + 429, // 79: datanode.api.v2.ObserveMarketsDepthUpdatesResponse.update:type_name -> vega.MarketDepthUpdate + 430, // 80: datanode.api.v2.ObserveMarketsDataResponse.market_data:type_name -> vega.MarketData + 431, // 81: datanode.api.v2.GetLatestMarketDepthResponse.buy:type_name -> vega.PriceLevel + 431, // 82: datanode.api.v2.GetLatestMarketDepthResponse.sell:type_name -> vega.PriceLevel + 432, // 83: datanode.api.v2.GetLatestMarketDepthResponse.last_trade:type_name -> vega.Trade + 430, // 84: datanode.api.v2.ListLatestMarketDataResponse.markets_data:type_name -> vega.MarketData + 430, // 85: datanode.api.v2.GetLatestMarketDataResponse.market_data:type_name -> vega.MarketData + 6, // 86: datanode.api.v2.GetMarketDataHistoryByIDRequest.pagination:type_name -> datanode.api.v2.Pagination + 82, // 87: datanode.api.v2.GetMarketDataHistoryByIDResponse.market_data:type_name -> datanode.api.v2.MarketDataConnection + 430, // 88: datanode.api.v2.MarketDataEdge.node:type_name -> vega.MarketData + 81, // 89: datanode.api.v2.MarketDataConnection.edges:type_name -> datanode.api.v2.MarketDataEdge + 7, // 90: datanode.api.v2.MarketDataConnection.page_info:type_name -> datanode.api.v2.PageInfo 2, // 91: datanode.api.v2.ListTransfersRequest.direction:type_name -> datanode.api.v2.TransferDirection - 5, // 92: datanode.api.v2.ListTransfersRequest.pagination:type_name -> datanode.api.v2.Pagination - 86, // 93: datanode.api.v2.ListTransfersResponse.transfers:type_name -> datanode.api.v2.TransferConnection - 394, // 94: datanode.api.v2.TransferNode.transfer:type_name -> vega.events.v1.Transfer - 395, // 95: datanode.api.v2.TransferNode.fees:type_name -> vega.events.v1.TransferFees - 84, // 96: datanode.api.v2.TransferEdge.node:type_name -> datanode.api.v2.TransferNode - 85, // 97: datanode.api.v2.TransferConnection.edges:type_name -> datanode.api.v2.TransferEdge - 6, // 98: datanode.api.v2.TransferConnection.page_info:type_name -> datanode.api.v2.PageInfo - 394, // 99: datanode.api.v2.GetTransferResponse.transfer:type_name -> vega.events.v1.Transfer - 395, // 100: datanode.api.v2.GetTransferResponse.fees:type_name -> vega.events.v1.TransferFees - 396, // 101: datanode.api.v2.GetNetworkLimitsResponse.limits:type_name -> vega.NetworkLimits - 92, // 102: datanode.api.v2.ListCandleIntervalsResponse.interval_to_candle_id:type_name -> datanode.api.v2.IntervalToCandleId - 94, // 103: datanode.api.v2.ObserveCandleDataResponse.candle:type_name -> datanode.api.v2.Candle - 5, // 104: datanode.api.v2.ListCandleDataRequest.pagination:type_name -> datanode.api.v2.Pagination - 100, // 105: datanode.api.v2.ListCandleDataResponse.candles:type_name -> datanode.api.v2.CandleDataConnection - 94, // 106: datanode.api.v2.CandleEdge.node:type_name -> datanode.api.v2.Candle - 99, // 107: datanode.api.v2.CandleDataConnection.edges:type_name -> datanode.api.v2.CandleEdge - 6, // 108: datanode.api.v2.CandleDataConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 109: datanode.api.v2.ListVotesRequest.pagination:type_name -> datanode.api.v2.Pagination - 104, // 110: datanode.api.v2.ListVotesResponse.votes:type_name -> datanode.api.v2.VoteConnection - 397, // 111: datanode.api.v2.VoteEdge.node:type_name -> vega.Vote - 103, // 112: datanode.api.v2.VoteConnection.edges:type_name -> datanode.api.v2.VoteEdge - 6, // 113: datanode.api.v2.VoteConnection.page_info:type_name -> datanode.api.v2.PageInfo - 397, // 114: datanode.api.v2.ObserveVotesResponse.vote:type_name -> vega.Vote - 5, // 115: datanode.api.v2.ListERC20MultiSigSignerAddedBundlesRequest.pagination:type_name -> datanode.api.v2.Pagination - 111, // 116: datanode.api.v2.ListERC20MultiSigSignerAddedBundlesResponse.bundles:type_name -> datanode.api.v2.ERC20MultiSigSignerAddedConnection - 398, // 117: datanode.api.v2.ERC20MultiSigSignerAddedEdge.node:type_name -> vega.events.v1.ERC20MultiSigSignerAdded - 112, // 118: datanode.api.v2.ERC20MultiSigSignerAddedBundleEdge.node:type_name -> datanode.api.v2.ERC20MultiSigSignerAddedBundle - 110, // 119: datanode.api.v2.ERC20MultiSigSignerAddedConnection.edges:type_name -> datanode.api.v2.ERC20MultiSigSignerAddedBundleEdge - 6, // 120: datanode.api.v2.ERC20MultiSigSignerAddedConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 121: datanode.api.v2.ListERC20MultiSigSignerRemovedBundlesRequest.pagination:type_name -> datanode.api.v2.Pagination - 117, // 122: datanode.api.v2.ListERC20MultiSigSignerRemovedBundlesResponse.bundles:type_name -> datanode.api.v2.ERC20MultiSigSignerRemovedConnection - 399, // 123: datanode.api.v2.ERC20MultiSigSignerRemovedEdge.node:type_name -> vega.events.v1.ERC20MultiSigSignerRemoved - 118, // 124: datanode.api.v2.ERC20MultiSigSignerRemovedBundleEdge.node:type_name -> datanode.api.v2.ERC20MultiSigSignerRemovedBundle - 116, // 125: datanode.api.v2.ERC20MultiSigSignerRemovedConnection.edges:type_name -> datanode.api.v2.ERC20MultiSigSignerRemovedBundleEdge - 6, // 126: datanode.api.v2.ERC20MultiSigSignerRemovedConnection.page_info:type_name -> datanode.api.v2.PageInfo - 393, // 127: datanode.api.v2.GetLastTradeResponse.trade:type_name -> vega.Trade - 5, // 128: datanode.api.v2.ListTradesRequest.pagination:type_name -> datanode.api.v2.Pagination - 283, // 129: datanode.api.v2.ListTradesRequest.date_range:type_name -> datanode.api.v2.DateRange - 129, // 130: datanode.api.v2.ListTradesResponse.trades:type_name -> datanode.api.v2.TradeConnection - 130, // 131: datanode.api.v2.TradeConnection.edges:type_name -> datanode.api.v2.TradeEdge - 6, // 132: datanode.api.v2.TradeConnection.page_info:type_name -> datanode.api.v2.PageInfo - 393, // 133: datanode.api.v2.TradeEdge.node:type_name -> vega.Trade - 393, // 134: datanode.api.v2.ObserveTradesResponse.trades:type_name -> vega.Trade - 400, // 135: datanode.api.v2.GetOracleSpecResponse.oracle_spec:type_name -> vega.OracleSpec - 5, // 136: datanode.api.v2.ListOracleSpecsRequest.pagination:type_name -> datanode.api.v2.Pagination - 140, // 137: datanode.api.v2.ListOracleSpecsResponse.oracle_specs:type_name -> datanode.api.v2.OracleSpecsConnection - 5, // 138: datanode.api.v2.ListOracleDataRequest.pagination:type_name -> datanode.api.v2.Pagination - 142, // 139: datanode.api.v2.ListOracleDataResponse.oracle_data:type_name -> datanode.api.v2.OracleDataConnection - 400, // 140: datanode.api.v2.OracleSpecEdge.node:type_name -> vega.OracleSpec - 139, // 141: datanode.api.v2.OracleSpecsConnection.edges:type_name -> datanode.api.v2.OracleSpecEdge - 6, // 142: datanode.api.v2.OracleSpecsConnection.page_info:type_name -> datanode.api.v2.PageInfo - 401, // 143: datanode.api.v2.OracleDataEdge.node:type_name -> vega.OracleData - 141, // 144: datanode.api.v2.OracleDataConnection.edges:type_name -> datanode.api.v2.OracleDataEdge - 6, // 145: datanode.api.v2.OracleDataConnection.page_info:type_name -> datanode.api.v2.PageInfo - 402, // 146: datanode.api.v2.GetMarketResponse.market:type_name -> vega.Market - 5, // 147: datanode.api.v2.ListMarketsRequest.pagination:type_name -> datanode.api.v2.Pagination - 148, // 148: datanode.api.v2.ListMarketsResponse.markets:type_name -> datanode.api.v2.MarketConnection - 402, // 149: datanode.api.v2.MarketEdge.node:type_name -> vega.Market - 147, // 150: datanode.api.v2.MarketConnection.edges:type_name -> datanode.api.v2.MarketEdge - 6, // 151: datanode.api.v2.MarketConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 152: datanode.api.v2.ListSuccessorMarketsRequest.pagination:type_name -> datanode.api.v2.Pagination - 402, // 153: datanode.api.v2.SuccessorMarket.market:type_name -> vega.Market - 403, // 154: datanode.api.v2.SuccessorMarket.proposals:type_name -> vega.GovernanceData - 150, // 155: datanode.api.v2.SuccessorMarketEdge.node:type_name -> datanode.api.v2.SuccessorMarket - 151, // 156: datanode.api.v2.SuccessorMarketConnection.edges:type_name -> datanode.api.v2.SuccessorMarketEdge - 6, // 157: datanode.api.v2.SuccessorMarketConnection.page_info:type_name -> datanode.api.v2.PageInfo - 152, // 158: datanode.api.v2.ListSuccessorMarketsResponse.successor_markets:type_name -> datanode.api.v2.SuccessorMarketConnection - 404, // 159: datanode.api.v2.GetPartyResponse.party:type_name -> vega.Party - 5, // 160: datanode.api.v2.ListPartiesRequest.pagination:type_name -> datanode.api.v2.Pagination - 159, // 161: datanode.api.v2.ListPartiesResponse.parties:type_name -> datanode.api.v2.PartyConnection - 404, // 162: datanode.api.v2.PartyEdge.node:type_name -> vega.Party - 158, // 163: datanode.api.v2.PartyConnection.edges:type_name -> datanode.api.v2.PartyEdge - 6, // 164: datanode.api.v2.PartyConnection.page_info:type_name -> datanode.api.v2.PageInfo - 380, // 165: datanode.api.v2.OrderEdge.node:type_name -> vega.Order - 5, // 166: datanode.api.v2.ListMarginLevelsRequest.pagination:type_name -> datanode.api.v2.Pagination - 167, // 167: datanode.api.v2.ListMarginLevelsResponse.margin_levels:type_name -> datanode.api.v2.MarginConnection - 405, // 168: datanode.api.v2.ObserveMarginLevelsResponse.margin_levels:type_name -> vega.MarginLevels - 160, // 169: datanode.api.v2.OrderConnection.edges:type_name -> datanode.api.v2.OrderEdge - 6, // 170: datanode.api.v2.OrderConnection.page_info:type_name -> datanode.api.v2.PageInfo - 405, // 171: datanode.api.v2.MarginEdge.node:type_name -> vega.MarginLevels - 166, // 172: datanode.api.v2.MarginConnection.edges:type_name -> datanode.api.v2.MarginEdge - 6, // 173: datanode.api.v2.MarginConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 174: datanode.api.v2.ListRewardsRequest.pagination:type_name -> datanode.api.v2.Pagination - 171, // 175: datanode.api.v2.ListRewardsResponse.rewards:type_name -> datanode.api.v2.RewardsConnection - 406, // 176: datanode.api.v2.RewardEdge.node:type_name -> vega.Reward - 170, // 177: datanode.api.v2.RewardsConnection.edges:type_name -> datanode.api.v2.RewardEdge - 6, // 178: datanode.api.v2.RewardsConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 179: datanode.api.v2.ListRewardSummariesRequest.pagination:type_name -> datanode.api.v2.Pagination - 407, // 180: datanode.api.v2.ListRewardSummariesResponse.summaries:type_name -> vega.RewardSummary - 174, // 181: datanode.api.v2.ListEpochRewardSummariesRequest.filter:type_name -> datanode.api.v2.RewardSummaryFilter - 5, // 182: datanode.api.v2.ListEpochRewardSummariesRequest.pagination:type_name -> datanode.api.v2.Pagination - 177, // 183: datanode.api.v2.ListEpochRewardSummariesResponse.summaries:type_name -> datanode.api.v2.EpochRewardSummaryConnection - 178, // 184: datanode.api.v2.EpochRewardSummaryConnection.edges:type_name -> datanode.api.v2.EpochRewardSummaryEdge - 6, // 185: datanode.api.v2.EpochRewardSummaryConnection.page_info:type_name -> datanode.api.v2.PageInfo - 408, // 186: datanode.api.v2.EpochRewardSummaryEdge.node:type_name -> vega.EpochRewardSummary - 406, // 187: datanode.api.v2.ObserveRewardsResponse.reward:type_name -> vega.Reward - 409, // 188: datanode.api.v2.GetDepositResponse.deposit:type_name -> vega.Deposit - 5, // 189: datanode.api.v2.ListDepositsRequest.pagination:type_name -> datanode.api.v2.Pagination - 283, // 190: datanode.api.v2.ListDepositsRequest.date_range:type_name -> datanode.api.v2.DateRange - 186, // 191: datanode.api.v2.ListDepositsResponse.deposits:type_name -> datanode.api.v2.DepositsConnection - 409, // 192: datanode.api.v2.DepositEdge.node:type_name -> vega.Deposit - 185, // 193: datanode.api.v2.DepositsConnection.edges:type_name -> datanode.api.v2.DepositEdge - 6, // 194: datanode.api.v2.DepositsConnection.page_info:type_name -> datanode.api.v2.PageInfo - 410, // 195: datanode.api.v2.GetWithdrawalResponse.withdrawal:type_name -> vega.Withdrawal - 5, // 196: datanode.api.v2.ListWithdrawalsRequest.pagination:type_name -> datanode.api.v2.Pagination - 283, // 197: datanode.api.v2.ListWithdrawalsRequest.date_range:type_name -> datanode.api.v2.DateRange - 192, // 198: datanode.api.v2.ListWithdrawalsResponse.withdrawals:type_name -> datanode.api.v2.WithdrawalsConnection - 410, // 199: datanode.api.v2.WithdrawalEdge.node:type_name -> vega.Withdrawal - 191, // 200: datanode.api.v2.WithdrawalsConnection.edges:type_name -> datanode.api.v2.WithdrawalEdge - 6, // 201: datanode.api.v2.WithdrawalsConnection.page_info:type_name -> datanode.api.v2.PageInfo - 411, // 202: datanode.api.v2.GetAssetResponse.asset:type_name -> vega.Asset - 5, // 203: datanode.api.v2.ListAssetsRequest.pagination:type_name -> datanode.api.v2.Pagination - 198, // 204: datanode.api.v2.ListAssetsResponse.assets:type_name -> datanode.api.v2.AssetsConnection - 411, // 205: datanode.api.v2.AssetEdge.node:type_name -> vega.Asset - 197, // 206: datanode.api.v2.AssetsConnection.edges:type_name -> datanode.api.v2.AssetEdge - 6, // 207: datanode.api.v2.AssetsConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 208: datanode.api.v2.ListLiquidityProvisionsRequest.pagination:type_name -> datanode.api.v2.Pagination - 5, // 209: datanode.api.v2.ListAllLiquidityProvisionsRequest.pagination:type_name -> datanode.api.v2.Pagination - 206, // 210: datanode.api.v2.ListLiquidityProvisionsResponse.liquidity_provisions:type_name -> datanode.api.v2.LiquidityProvisionsConnection - 207, // 211: datanode.api.v2.ListAllLiquidityProvisionsResponse.liquidity_provisions:type_name -> datanode.api.v2.LiquidityProvisionsWithPendingConnection - 412, // 212: datanode.api.v2.LiquidityProvision.current:type_name -> vega.LiquidityProvision - 412, // 213: datanode.api.v2.LiquidityProvision.pending:type_name -> vega.LiquidityProvision - 412, // 214: datanode.api.v2.LiquidityProvisionsEdge.node:type_name -> vega.LiquidityProvision - 203, // 215: datanode.api.v2.LiquidityProvisionWithPendingEdge.node:type_name -> datanode.api.v2.LiquidityProvision - 204, // 216: datanode.api.v2.LiquidityProvisionsConnection.edges:type_name -> datanode.api.v2.LiquidityProvisionsEdge - 6, // 217: datanode.api.v2.LiquidityProvisionsConnection.page_info:type_name -> datanode.api.v2.PageInfo - 205, // 218: datanode.api.v2.LiquidityProvisionsWithPendingConnection.edges:type_name -> datanode.api.v2.LiquidityProvisionWithPendingEdge - 6, // 219: datanode.api.v2.LiquidityProvisionsWithPendingConnection.page_info:type_name -> datanode.api.v2.PageInfo - 412, // 220: datanode.api.v2.ObserveLiquidityProvisionsResponse.liquidity_provisions:type_name -> vega.LiquidityProvision - 5, // 221: datanode.api.v2.ListLiquidityProvidersRequest.pagination:type_name -> datanode.api.v2.Pagination - 413, // 222: datanode.api.v2.LiquidityProvider.fee_share:type_name -> vega.LiquidityProviderFeeShare - 414, // 223: datanode.api.v2.LiquidityProvider.sla:type_name -> vega.LiquidityProviderSLA - 211, // 224: datanode.api.v2.LiquidityProviderEdge.node:type_name -> datanode.api.v2.LiquidityProvider - 212, // 225: datanode.api.v2.LiquidityProviderConnection.edges:type_name -> datanode.api.v2.LiquidityProviderEdge - 6, // 226: datanode.api.v2.LiquidityProviderConnection.page_info:type_name -> datanode.api.v2.PageInfo - 213, // 227: datanode.api.v2.ListLiquidityProvidersResponse.liquidity_providers:type_name -> datanode.api.v2.LiquidityProviderConnection - 5, // 228: datanode.api.v2.ListPaidLiquidityFeesRequest.pagination:type_name -> datanode.api.v2.Pagination - 218, // 229: datanode.api.v2.ListPaidLiquidityFeesResponse.paid_liquidity_fees:type_name -> datanode.api.v2.PaidLiquidityFeesConnection - 415, // 230: datanode.api.v2.PaidLiquidityFeesEdge.node:type_name -> vega.events.v1.PaidLiquidityFeesStats - 217, // 231: datanode.api.v2.PaidLiquidityFeesConnection.edges:type_name -> datanode.api.v2.PaidLiquidityFeesEdge - 6, // 232: datanode.api.v2.PaidLiquidityFeesConnection.page_info:type_name -> datanode.api.v2.PageInfo - 403, // 233: datanode.api.v2.GetGovernanceDataResponse.data:type_name -> vega.GovernanceData - 416, // 234: datanode.api.v2.ListGovernanceDataRequest.proposal_state:type_name -> vega.Proposal.State - 4, // 235: datanode.api.v2.ListGovernanceDataRequest.proposal_type:type_name -> datanode.api.v2.ListGovernanceDataRequest.Type - 5, // 236: datanode.api.v2.ListGovernanceDataRequest.pagination:type_name -> datanode.api.v2.Pagination - 224, // 237: datanode.api.v2.ListGovernanceDataResponse.connection:type_name -> datanode.api.v2.GovernanceDataConnection - 403, // 238: datanode.api.v2.GovernanceDataEdge.node:type_name -> vega.GovernanceData - 223, // 239: datanode.api.v2.GovernanceDataConnection.edges:type_name -> datanode.api.v2.GovernanceDataEdge - 6, // 240: datanode.api.v2.GovernanceDataConnection.page_info:type_name -> datanode.api.v2.PageInfo - 403, // 241: datanode.api.v2.ObserveGovernanceResponse.data:type_name -> vega.GovernanceData - 5, // 242: datanode.api.v2.ListDelegationsRequest.pagination:type_name -> datanode.api.v2.Pagination - 230, // 243: datanode.api.v2.ListDelegationsResponse.delegations:type_name -> datanode.api.v2.DelegationsConnection - 417, // 244: datanode.api.v2.DelegationEdge.node:type_name -> vega.Delegation - 229, // 245: datanode.api.v2.DelegationsConnection.edges:type_name -> datanode.api.v2.DelegationEdge - 6, // 246: datanode.api.v2.DelegationsConnection.page_info:type_name -> datanode.api.v2.PageInfo - 417, // 247: datanode.api.v2.ObserveDelegationsResponse.delegation:type_name -> vega.Delegation - 418, // 248: datanode.api.v2.NodeBasic.status:type_name -> vega.NodeStatus - 419, // 249: datanode.api.v2.GetNetworkDataResponse.node_data:type_name -> vega.NodeData - 420, // 250: datanode.api.v2.GetNodeResponse.node:type_name -> vega.Node - 5, // 251: datanode.api.v2.ListNodesRequest.pagination:type_name -> datanode.api.v2.Pagination - 241, // 252: datanode.api.v2.ListNodesResponse.nodes:type_name -> datanode.api.v2.NodesConnection - 420, // 253: datanode.api.v2.NodeEdge.node:type_name -> vega.Node - 240, // 254: datanode.api.v2.NodesConnection.edges:type_name -> datanode.api.v2.NodeEdge - 6, // 255: datanode.api.v2.NodesConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 256: datanode.api.v2.ListNodeSignaturesRequest.pagination:type_name -> datanode.api.v2.Pagination - 245, // 257: datanode.api.v2.ListNodeSignaturesResponse.signatures:type_name -> datanode.api.v2.NodeSignaturesConnection - 421, // 258: datanode.api.v2.NodeSignatureEdge.node:type_name -> vega.commands.v1.NodeSignature - 244, // 259: datanode.api.v2.NodeSignaturesConnection.edges:type_name -> datanode.api.v2.NodeSignatureEdge - 6, // 260: datanode.api.v2.NodeSignaturesConnection.page_info:type_name -> datanode.api.v2.PageInfo - 422, // 261: datanode.api.v2.GetEpochResponse.epoch:type_name -> vega.Epoch - 423, // 262: datanode.api.v2.EstimateFeeResponse.fee:type_name -> vega.Fee - 424, // 263: datanode.api.v2.EstimateMarginRequest.side:type_name -> vega.Side - 382, // 264: datanode.api.v2.EstimateMarginRequest.type:type_name -> vega.Order.Type - 405, // 265: datanode.api.v2.EstimateMarginResponse.margin_levels:type_name -> vega.MarginLevels - 5, // 266: datanode.api.v2.ListNetworkParametersRequest.pagination:type_name -> datanode.api.v2.Pagination - 257, // 267: datanode.api.v2.ListNetworkParametersResponse.network_parameters:type_name -> datanode.api.v2.NetworkParameterConnection - 425, // 268: datanode.api.v2.GetNetworkParameterResponse.network_parameter:type_name -> vega.NetworkParameter - 425, // 269: datanode.api.v2.NetworkParameterEdge.node:type_name -> vega.NetworkParameter - 256, // 270: datanode.api.v2.NetworkParameterConnection.edges:type_name -> datanode.api.v2.NetworkParameterEdge - 6, // 271: datanode.api.v2.NetworkParameterConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 272: datanode.api.v2.ListCheckpointsRequest.pagination:type_name -> datanode.api.v2.Pagination - 262, // 273: datanode.api.v2.ListCheckpointsResponse.checkpoints:type_name -> datanode.api.v2.CheckpointsConnection - 258, // 274: datanode.api.v2.CheckpointEdge.node:type_name -> datanode.api.v2.Checkpoint - 261, // 275: datanode.api.v2.CheckpointsConnection.edges:type_name -> datanode.api.v2.CheckpointEdge - 6, // 276: datanode.api.v2.CheckpointsConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 277: datanode.api.v2.GetStakeRequest.pagination:type_name -> datanode.api.v2.Pagination - 266, // 278: datanode.api.v2.GetStakeResponse.stake_linkings:type_name -> datanode.api.v2.StakesConnection - 426, // 279: datanode.api.v2.StakeLinkingEdge.node:type_name -> vega.events.v1.StakeLinking - 265, // 280: datanode.api.v2.StakesConnection.edges:type_name -> datanode.api.v2.StakeLinkingEdge - 6, // 281: datanode.api.v2.StakesConnection.page_info:type_name -> datanode.api.v2.PageInfo - 427, // 282: datanode.api.v2.GetRiskFactorsResponse.risk_factor:type_name -> vega.RiskFactor - 428, // 283: datanode.api.v2.ObserveEventBusRequest.type:type_name -> vega.events.v1.BusEventType - 429, // 284: datanode.api.v2.ObserveEventBusResponse.events:type_name -> vega.events.v1.BusEvent - 430, // 285: datanode.api.v2.ObserveLedgerMovementsResponse.ledger_movement:type_name -> vega.LedgerMovement - 5, // 286: datanode.api.v2.ListKeyRotationsRequest.pagination:type_name -> datanode.api.v2.Pagination - 276, // 287: datanode.api.v2.ListKeyRotationsResponse.rotations:type_name -> datanode.api.v2.KeyRotationConnection - 431, // 288: datanode.api.v2.KeyRotationEdge.node:type_name -> vega.events.v1.KeyRotation - 275, // 289: datanode.api.v2.KeyRotationConnection.edges:type_name -> datanode.api.v2.KeyRotationEdge - 6, // 290: datanode.api.v2.KeyRotationConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 291: datanode.api.v2.ListEthereumKeyRotationsRequest.pagination:type_name -> datanode.api.v2.Pagination - 279, // 292: datanode.api.v2.ListEthereumKeyRotationsResponse.key_rotations:type_name -> datanode.api.v2.EthereumKeyRotationsConnection - 280, // 293: datanode.api.v2.EthereumKeyRotationsConnection.edges:type_name -> datanode.api.v2.EthereumKeyRotationEdge - 6, // 294: datanode.api.v2.EthereumKeyRotationsConnection.page_info:type_name -> datanode.api.v2.PageInfo - 432, // 295: datanode.api.v2.EthereumKeyRotationEdge.node:type_name -> vega.events.v1.EthereumKeyRotation - 433, // 296: datanode.api.v2.ListProtocolUpgradeProposalsRequest.status:type_name -> vega.events.v1.ProtocolUpgradeProposalStatus - 5, // 297: datanode.api.v2.ListProtocolUpgradeProposalsRequest.pagination:type_name -> datanode.api.v2.Pagination - 288, // 298: datanode.api.v2.ListProtocolUpgradeProposalsResponse.protocol_upgrade_proposals:type_name -> datanode.api.v2.ProtocolUpgradeProposalConnection - 289, // 299: datanode.api.v2.ProtocolUpgradeProposalConnection.edges:type_name -> datanode.api.v2.ProtocolUpgradeProposalEdge - 6, // 300: datanode.api.v2.ProtocolUpgradeProposalConnection.page_info:type_name -> datanode.api.v2.PageInfo - 434, // 301: datanode.api.v2.ProtocolUpgradeProposalEdge.node:type_name -> vega.events.v1.ProtocolUpgradeEvent - 5, // 302: datanode.api.v2.ListCoreSnapshotsRequest.pagination:type_name -> datanode.api.v2.Pagination - 292, // 303: datanode.api.v2.ListCoreSnapshotsResponse.core_snapshots:type_name -> datanode.api.v2.CoreSnapshotConnection - 293, // 304: datanode.api.v2.CoreSnapshotConnection.edges:type_name -> datanode.api.v2.CoreSnapshotEdge - 6, // 305: datanode.api.v2.CoreSnapshotConnection.page_info:type_name -> datanode.api.v2.PageInfo - 435, // 306: datanode.api.v2.CoreSnapshotEdge.node:type_name -> vega.events.v1.CoreSnapshotData - 294, // 307: datanode.api.v2.GetMostRecentNetworkHistorySegmentResponse.segment:type_name -> datanode.api.v2.HistorySegment - 294, // 308: datanode.api.v2.ListAllNetworkHistorySegmentsResponse.segments:type_name -> datanode.api.v2.HistorySegment - 3, // 309: datanode.api.v2.ExportNetworkHistoryRequest.table:type_name -> datanode.api.v2.Table - 436, // 310: datanode.api.v2.ListEntitiesResponse.accounts:type_name -> vega.Account - 380, // 311: datanode.api.v2.ListEntitiesResponse.orders:type_name -> vega.Order - 387, // 312: datanode.api.v2.ListEntitiesResponse.positions:type_name -> vega.Position - 437, // 313: datanode.api.v2.ListEntitiesResponse.ledger_entries:type_name -> vega.LedgerEntry - 11, // 314: datanode.api.v2.ListEntitiesResponse.balance_changes:type_name -> datanode.api.v2.AccountBalance - 394, // 315: datanode.api.v2.ListEntitiesResponse.transfers:type_name -> vega.events.v1.Transfer - 397, // 316: datanode.api.v2.ListEntitiesResponse.votes:type_name -> vega.Vote - 112, // 317: datanode.api.v2.ListEntitiesResponse.erc20_multi_sig_signer_added_bundles:type_name -> datanode.api.v2.ERC20MultiSigSignerAddedBundle - 118, // 318: datanode.api.v2.ListEntitiesResponse.erc20_multi_sig_signer_removed_bundles:type_name -> datanode.api.v2.ERC20MultiSigSignerRemovedBundle - 393, // 319: datanode.api.v2.ListEntitiesResponse.trades:type_name -> vega.Trade - 400, // 320: datanode.api.v2.ListEntitiesResponse.oracle_specs:type_name -> vega.OracleSpec - 401, // 321: datanode.api.v2.ListEntitiesResponse.oracle_data:type_name -> vega.OracleData - 402, // 322: datanode.api.v2.ListEntitiesResponse.markets:type_name -> vega.Market - 404, // 323: datanode.api.v2.ListEntitiesResponse.parties:type_name -> vega.Party - 405, // 324: datanode.api.v2.ListEntitiesResponse.margin_levels:type_name -> vega.MarginLevels - 406, // 325: datanode.api.v2.ListEntitiesResponse.rewards:type_name -> vega.Reward - 409, // 326: datanode.api.v2.ListEntitiesResponse.deposits:type_name -> vega.Deposit - 410, // 327: datanode.api.v2.ListEntitiesResponse.withdrawals:type_name -> vega.Withdrawal - 411, // 328: datanode.api.v2.ListEntitiesResponse.assets:type_name -> vega.Asset - 412, // 329: datanode.api.v2.ListEntitiesResponse.liquidity_provisions:type_name -> vega.LiquidityProvision - 438, // 330: datanode.api.v2.ListEntitiesResponse.proposals:type_name -> vega.Proposal - 417, // 331: datanode.api.v2.ListEntitiesResponse.delegations:type_name -> vega.Delegation - 233, // 332: datanode.api.v2.ListEntitiesResponse.nodes:type_name -> datanode.api.v2.NodeBasic - 421, // 333: datanode.api.v2.ListEntitiesResponse.node_signatures:type_name -> vega.commands.v1.NodeSignature - 425, // 334: datanode.api.v2.ListEntitiesResponse.network_parameters:type_name -> vega.NetworkParameter - 431, // 335: datanode.api.v2.ListEntitiesResponse.key_rotations:type_name -> vega.events.v1.KeyRotation - 432, // 336: datanode.api.v2.ListEntitiesResponse.ethereum_key_rotations:type_name -> vega.events.v1.EthereumKeyRotation - 434, // 337: datanode.api.v2.ListEntitiesResponse.protocol_upgrade_proposals:type_name -> vega.events.v1.ProtocolUpgradeEvent - 439, // 338: datanode.api.v2.GetPartyActivityStreakResponse.activity_streak:type_name -> vega.events.v1.PartyActivityStreak - 5, // 339: datanode.api.v2.ListFundingPaymentsRequest.pagination:type_name -> datanode.api.v2.Pagination - 310, // 340: datanode.api.v2.FundingPaymentEdge.node:type_name -> datanode.api.v2.FundingPayment - 312, // 341: datanode.api.v2.FundingPaymentConnection.edges:type_name -> datanode.api.v2.FundingPaymentEdge - 6, // 342: datanode.api.v2.FundingPaymentConnection.page_info:type_name -> datanode.api.v2.PageInfo - 313, // 343: datanode.api.v2.ListFundingPaymentsResponse.funding_payments:type_name -> datanode.api.v2.FundingPaymentConnection - 283, // 344: datanode.api.v2.ListFundingPeriodsRequest.date_range:type_name -> datanode.api.v2.DateRange - 5, // 345: datanode.api.v2.ListFundingPeriodsRequest.pagination:type_name -> datanode.api.v2.Pagination - 440, // 346: datanode.api.v2.FundingPeriodEdge.node:type_name -> vega.events.v1.FundingPeriod - 316, // 347: datanode.api.v2.FundingPeriodConnection.edges:type_name -> datanode.api.v2.FundingPeriodEdge - 6, // 348: datanode.api.v2.FundingPeriodConnection.page_info:type_name -> datanode.api.v2.PageInfo - 317, // 349: datanode.api.v2.ListFundingPeriodsResponse.funding_periods:type_name -> datanode.api.v2.FundingPeriodConnection - 283, // 350: datanode.api.v2.ListFundingPeriodDataPointsRequest.date_range:type_name -> datanode.api.v2.DateRange - 441, // 351: datanode.api.v2.ListFundingPeriodDataPointsRequest.source:type_name -> vega.events.v1.FundingPeriodDataPoint.Source - 5, // 352: datanode.api.v2.ListFundingPeriodDataPointsRequest.pagination:type_name -> datanode.api.v2.Pagination - 442, // 353: datanode.api.v2.FundingPeriodDataPointEdge.node:type_name -> vega.events.v1.FundingPeriodDataPoint - 320, // 354: datanode.api.v2.FundingPeriodDataPointConnection.edges:type_name -> datanode.api.v2.FundingPeriodDataPointEdge - 6, // 355: datanode.api.v2.FundingPeriodDataPointConnection.page_info:type_name -> datanode.api.v2.PageInfo - 321, // 356: datanode.api.v2.ListFundingPeriodDataPointsResponse.funding_period_data_points:type_name -> datanode.api.v2.FundingPeriodDataPointConnection - 424, // 357: datanode.api.v2.OrderInfo.side:type_name -> vega.Side - 325, // 358: datanode.api.v2.EstimatePositionRequest.orders:type_name -> datanode.api.v2.OrderInfo - 328, // 359: datanode.api.v2.EstimatePositionResponse.margin:type_name -> datanode.api.v2.MarginEstimate - 329, // 360: datanode.api.v2.EstimatePositionResponse.liquidation:type_name -> datanode.api.v2.LiquidationEstimate - 405, // 361: datanode.api.v2.MarginEstimate.worst_case:type_name -> vega.MarginLevels - 405, // 362: datanode.api.v2.MarginEstimate.best_case:type_name -> vega.MarginLevels - 330, // 363: datanode.api.v2.LiquidationEstimate.worst_case:type_name -> datanode.api.v2.LiquidationPrice - 330, // 364: datanode.api.v2.LiquidationEstimate.best_case:type_name -> datanode.api.v2.LiquidationPrice - 333, // 365: datanode.api.v2.GetCurrentReferralProgramResponse.current_referral_program:type_name -> datanode.api.v2.ReferralProgram - 443, // 366: datanode.api.v2.ReferralProgram.benefit_tiers:type_name -> vega.BenefitTier - 444, // 367: datanode.api.v2.ReferralProgram.staking_tiers:type_name -> vega.StakingTier - 334, // 368: datanode.api.v2.ReferralSetEdge.node:type_name -> datanode.api.v2.ReferralSet - 335, // 369: datanode.api.v2.ReferralSetConnection.edges:type_name -> datanode.api.v2.ReferralSetEdge - 6, // 370: datanode.api.v2.ReferralSetConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 371: datanode.api.v2.ListReferralSetsRequest.pagination:type_name -> datanode.api.v2.Pagination - 336, // 372: datanode.api.v2.ListReferralSetsResponse.referral_sets:type_name -> datanode.api.v2.ReferralSetConnection - 339, // 373: datanode.api.v2.ReferralSetRefereeEdge.node:type_name -> datanode.api.v2.ReferralSetReferee - 340, // 374: datanode.api.v2.ReferralSetRefereeConnection.edges:type_name -> datanode.api.v2.ReferralSetRefereeEdge - 6, // 375: datanode.api.v2.ReferralSetRefereeConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 376: datanode.api.v2.ListReferralSetRefereesRequest.pagination:type_name -> datanode.api.v2.Pagination - 341, // 377: datanode.api.v2.ListReferralSetRefereesResponse.referral_set_referees:type_name -> datanode.api.v2.ReferralSetRefereeConnection - 5, // 378: datanode.api.v2.GetReferralSetStatsRequest.pagination:type_name -> datanode.api.v2.Pagination - 346, // 379: datanode.api.v2.GetReferralSetStatsResponse.stats:type_name -> datanode.api.v2.ReferralSetStatsConnection - 347, // 380: datanode.api.v2.ReferralSetStatsConnection.edges:type_name -> datanode.api.v2.ReferralSetStatsEdge - 6, // 381: datanode.api.v2.ReferralSetStatsConnection.page_info:type_name -> datanode.api.v2.PageInfo - 348, // 382: datanode.api.v2.ReferralSetStatsEdge.node:type_name -> datanode.api.v2.ReferralSetStats - 349, // 383: datanode.api.v2.TeamEdge.node:type_name -> datanode.api.v2.Team - 350, // 384: datanode.api.v2.TeamConnection.edges:type_name -> datanode.api.v2.TeamEdge - 6, // 385: datanode.api.v2.TeamConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 386: datanode.api.v2.ListTeamsRequest.pagination:type_name -> datanode.api.v2.Pagination - 351, // 387: datanode.api.v2.ListTeamsResponse.teams:type_name -> datanode.api.v2.TeamConnection - 5, // 388: datanode.api.v2.ListTeamRefereesRequest.pagination:type_name -> datanode.api.v2.Pagination - 355, // 389: datanode.api.v2.TeamRefereeEdge.node:type_name -> datanode.api.v2.TeamReferee - 356, // 390: datanode.api.v2.TeamRefereeConnection.edges:type_name -> datanode.api.v2.TeamRefereeEdge - 6, // 391: datanode.api.v2.TeamRefereeConnection.page_info:type_name -> datanode.api.v2.PageInfo - 357, // 392: datanode.api.v2.ListTeamRefereesResponse.team_referees:type_name -> datanode.api.v2.TeamRefereeConnection - 359, // 393: datanode.api.v2.TeamRefereeHistoryEdge.node:type_name -> datanode.api.v2.TeamRefereeHistory - 360, // 394: datanode.api.v2.TeamRefereeHistoryConnection.edges:type_name -> datanode.api.v2.TeamRefereeHistoryEdge - 6, // 395: datanode.api.v2.TeamRefereeHistoryConnection.page_info:type_name -> datanode.api.v2.PageInfo - 5, // 396: datanode.api.v2.ListTeamRefereeHistoryRequest.pagination:type_name -> datanode.api.v2.Pagination - 361, // 397: datanode.api.v2.ListTeamRefereeHistoryResponse.team_referee_history:type_name -> datanode.api.v2.TeamRefereeHistoryConnection - 445, // 398: datanode.api.v2.GetFeesStatsResponse.fees_stats:type_name -> vega.events.v1.FeesStats - 376, // 399: datanode.api.v2.GetFeesStatsForPartyResponse.fees_stats_for_party:type_name -> datanode.api.v2.FeesStatsForParty - 375, // 400: datanode.api.v2.GetCurrentVolumeDiscountProgramResponse.current_volume_discount_program:type_name -> datanode.api.v2.VolumeDiscountProgram - 5, // 401: datanode.api.v2.GetVolumeDiscountStatsRequest.pagination:type_name -> datanode.api.v2.Pagination - 372, // 402: datanode.api.v2.GetVolumeDiscountStatsResponse.stats:type_name -> datanode.api.v2.VolumeDiscountStatsConnection - 373, // 403: datanode.api.v2.VolumeDiscountStatsConnection.edges:type_name -> datanode.api.v2.VolumeDiscountStatsEdge - 6, // 404: datanode.api.v2.VolumeDiscountStatsConnection.page_info:type_name -> datanode.api.v2.PageInfo - 374, // 405: datanode.api.v2.VolumeDiscountStatsEdge.node:type_name -> datanode.api.v2.VolumeDiscountStats - 446, // 406: datanode.api.v2.VolumeDiscountProgram.benefit_tiers:type_name -> vega.VolumeBenefitTier - 12, // 407: datanode.api.v2.TradingDataService.ListAccounts:input_type -> datanode.api.v2.ListAccountsRequest - 16, // 408: datanode.api.v2.TradingDataService.ObserveAccounts:input_type -> datanode.api.v2.ObserveAccountsRequest - 20, // 409: datanode.api.v2.TradingDataService.Info:input_type -> datanode.api.v2.InfoRequest - 22, // 410: datanode.api.v2.TradingDataService.GetOrder:input_type -> datanode.api.v2.GetOrderRequest - 25, // 411: datanode.api.v2.TradingDataService.ListOrders:input_type -> datanode.api.v2.ListOrdersRequest - 27, // 412: datanode.api.v2.TradingDataService.ListOrderVersions:input_type -> datanode.api.v2.ListOrderVersionsRequest - 29, // 413: datanode.api.v2.TradingDataService.ObserveOrders:input_type -> datanode.api.v2.ObserveOrdersRequest - 33, // 414: datanode.api.v2.TradingDataService.GetStopOrder:input_type -> datanode.api.v2.GetStopOrderRequest - 35, // 415: datanode.api.v2.TradingDataService.ListStopOrders:input_type -> datanode.api.v2.ListStopOrdersRequest - 40, // 416: datanode.api.v2.TradingDataService.ListPositions:input_type -> datanode.api.v2.ListPositionsRequest - 43, // 417: datanode.api.v2.TradingDataService.ListAllPositions:input_type -> datanode.api.v2.ListAllPositionsRequest - 47, // 418: datanode.api.v2.TradingDataService.ObservePositions:input_type -> datanode.api.v2.ObservePositionsRequest - 53, // 419: datanode.api.v2.TradingDataService.ListLedgerEntries:input_type -> datanode.api.v2.ListLedgerEntriesRequest - 54, // 420: datanode.api.v2.TradingDataService.ExportLedgerEntries:input_type -> datanode.api.v2.ExportLedgerEntriesRequest - 58, // 421: datanode.api.v2.TradingDataService.ListBalanceChanges:input_type -> datanode.api.v2.ListBalanceChangesRequest - 76, // 422: datanode.api.v2.TradingDataService.GetLatestMarketData:input_type -> datanode.api.v2.GetLatestMarketDataRequest - 74, // 423: datanode.api.v2.TradingDataService.ListLatestMarketData:input_type -> datanode.api.v2.ListLatestMarketDataRequest - 72, // 424: datanode.api.v2.TradingDataService.GetLatestMarketDepth:input_type -> datanode.api.v2.GetLatestMarketDepthRequest - 66, // 425: datanode.api.v2.TradingDataService.ObserveMarketsDepth:input_type -> datanode.api.v2.ObserveMarketsDepthRequest - 68, // 426: datanode.api.v2.TradingDataService.ObserveMarketsDepthUpdates:input_type -> datanode.api.v2.ObserveMarketsDepthUpdatesRequest - 70, // 427: datanode.api.v2.TradingDataService.ObserveMarketsData:input_type -> datanode.api.v2.ObserveMarketsDataRequest - 78, // 428: datanode.api.v2.TradingDataService.GetMarketDataHistoryByID:input_type -> datanode.api.v2.GetMarketDataHistoryByIDRequest - 82, // 429: datanode.api.v2.TradingDataService.ListTransfers:input_type -> datanode.api.v2.ListTransfersRequest - 87, // 430: datanode.api.v2.TradingDataService.GetTransfer:input_type -> datanode.api.v2.GetTransferRequest - 89, // 431: datanode.api.v2.TradingDataService.GetNetworkLimits:input_type -> datanode.api.v2.GetNetworkLimitsRequest - 97, // 432: datanode.api.v2.TradingDataService.ListCandleData:input_type -> datanode.api.v2.ListCandleDataRequest - 95, // 433: datanode.api.v2.TradingDataService.ObserveCandleData:input_type -> datanode.api.v2.ObserveCandleDataRequest - 91, // 434: datanode.api.v2.TradingDataService.ListCandleIntervals:input_type -> datanode.api.v2.ListCandleIntervalsRequest - 101, // 435: datanode.api.v2.TradingDataService.ListVotes:input_type -> datanode.api.v2.ListVotesRequest - 105, // 436: datanode.api.v2.TradingDataService.ObserveVotes:input_type -> datanode.api.v2.ObserveVotesRequest - 107, // 437: datanode.api.v2.TradingDataService.ListERC20MultiSigSignerAddedBundles:input_type -> datanode.api.v2.ListERC20MultiSigSignerAddedBundlesRequest - 113, // 438: datanode.api.v2.TradingDataService.ListERC20MultiSigSignerRemovedBundles:input_type -> datanode.api.v2.ListERC20MultiSigSignerRemovedBundlesRequest - 119, // 439: datanode.api.v2.TradingDataService.GetERC20ListAssetBundle:input_type -> datanode.api.v2.GetERC20ListAssetBundleRequest - 121, // 440: datanode.api.v2.TradingDataService.GetERC20SetAssetLimitsBundle:input_type -> datanode.api.v2.GetERC20SetAssetLimitsBundleRequest - 123, // 441: datanode.api.v2.TradingDataService.GetERC20WithdrawalApproval:input_type -> datanode.api.v2.GetERC20WithdrawalApprovalRequest - 125, // 442: datanode.api.v2.TradingDataService.GetLastTrade:input_type -> datanode.api.v2.GetLastTradeRequest - 127, // 443: datanode.api.v2.TradingDataService.ListTrades:input_type -> datanode.api.v2.ListTradesRequest - 131, // 444: datanode.api.v2.TradingDataService.ObserveTrades:input_type -> datanode.api.v2.ObserveTradesRequest - 133, // 445: datanode.api.v2.TradingDataService.GetOracleSpec:input_type -> datanode.api.v2.GetOracleSpecRequest - 135, // 446: datanode.api.v2.TradingDataService.ListOracleSpecs:input_type -> datanode.api.v2.ListOracleSpecsRequest - 137, // 447: datanode.api.v2.TradingDataService.ListOracleData:input_type -> datanode.api.v2.ListOracleDataRequest - 143, // 448: datanode.api.v2.TradingDataService.GetMarket:input_type -> datanode.api.v2.GetMarketRequest - 145, // 449: datanode.api.v2.TradingDataService.ListMarkets:input_type -> datanode.api.v2.ListMarketsRequest - 149, // 450: datanode.api.v2.TradingDataService.ListSuccessorMarkets:input_type -> datanode.api.v2.ListSuccessorMarketsRequest - 154, // 451: datanode.api.v2.TradingDataService.GetParty:input_type -> datanode.api.v2.GetPartyRequest - 156, // 452: datanode.api.v2.TradingDataService.ListParties:input_type -> datanode.api.v2.ListPartiesRequest - 161, // 453: datanode.api.v2.TradingDataService.ListMarginLevels:input_type -> datanode.api.v2.ListMarginLevelsRequest - 163, // 454: datanode.api.v2.TradingDataService.ObserveMarginLevels:input_type -> datanode.api.v2.ObserveMarginLevelsRequest - 168, // 455: datanode.api.v2.TradingDataService.ListRewards:input_type -> datanode.api.v2.ListRewardsRequest - 172, // 456: datanode.api.v2.TradingDataService.ListRewardSummaries:input_type -> datanode.api.v2.ListRewardSummariesRequest - 175, // 457: datanode.api.v2.TradingDataService.ListEpochRewardSummaries:input_type -> datanode.api.v2.ListEpochRewardSummariesRequest - 181, // 458: datanode.api.v2.TradingDataService.GetDeposit:input_type -> datanode.api.v2.GetDepositRequest - 183, // 459: datanode.api.v2.TradingDataService.ListDeposits:input_type -> datanode.api.v2.ListDepositsRequest - 187, // 460: datanode.api.v2.TradingDataService.GetWithdrawal:input_type -> datanode.api.v2.GetWithdrawalRequest - 189, // 461: datanode.api.v2.TradingDataService.ListWithdrawals:input_type -> datanode.api.v2.ListWithdrawalsRequest - 193, // 462: datanode.api.v2.TradingDataService.GetAsset:input_type -> datanode.api.v2.GetAssetRequest - 195, // 463: datanode.api.v2.TradingDataService.ListAssets:input_type -> datanode.api.v2.ListAssetsRequest - 199, // 464: datanode.api.v2.TradingDataService.ListLiquidityProvisions:input_type -> datanode.api.v2.ListLiquidityProvisionsRequest - 200, // 465: datanode.api.v2.TradingDataService.ListAllLiquidityProvisions:input_type -> datanode.api.v2.ListAllLiquidityProvisionsRequest - 208, // 466: datanode.api.v2.TradingDataService.ObserveLiquidityProvisions:input_type -> datanode.api.v2.ObserveLiquidityProvisionsRequest - 210, // 467: datanode.api.v2.TradingDataService.ListLiquidityProviders:input_type -> datanode.api.v2.ListLiquidityProvidersRequest - 215, // 468: datanode.api.v2.TradingDataService.ListPaidLiquidityFees:input_type -> datanode.api.v2.ListPaidLiquidityFeesRequest - 219, // 469: datanode.api.v2.TradingDataService.GetGovernanceData:input_type -> datanode.api.v2.GetGovernanceDataRequest - 221, // 470: datanode.api.v2.TradingDataService.ListGovernanceData:input_type -> datanode.api.v2.ListGovernanceDataRequest - 225, // 471: datanode.api.v2.TradingDataService.ObserveGovernance:input_type -> datanode.api.v2.ObserveGovernanceRequest - 227, // 472: datanode.api.v2.TradingDataService.ListDelegations:input_type -> datanode.api.v2.ListDelegationsRequest - 234, // 473: datanode.api.v2.TradingDataService.GetNetworkData:input_type -> datanode.api.v2.GetNetworkDataRequest - 236, // 474: datanode.api.v2.TradingDataService.GetNode:input_type -> datanode.api.v2.GetNodeRequest - 238, // 475: datanode.api.v2.TradingDataService.ListNodes:input_type -> datanode.api.v2.ListNodesRequest - 242, // 476: datanode.api.v2.TradingDataService.ListNodeSignatures:input_type -> datanode.api.v2.ListNodeSignaturesRequest - 246, // 477: datanode.api.v2.TradingDataService.GetEpoch:input_type -> datanode.api.v2.GetEpochRequest - 248, // 478: datanode.api.v2.TradingDataService.EstimateFee:input_type -> datanode.api.v2.EstimateFeeRequest - 250, // 479: datanode.api.v2.TradingDataService.EstimateMargin:input_type -> datanode.api.v2.EstimateMarginRequest - 326, // 480: datanode.api.v2.TradingDataService.EstimatePosition:input_type -> datanode.api.v2.EstimatePositionRequest - 252, // 481: datanode.api.v2.TradingDataService.ListNetworkParameters:input_type -> datanode.api.v2.ListNetworkParametersRequest - 254, // 482: datanode.api.v2.TradingDataService.GetNetworkParameter:input_type -> datanode.api.v2.GetNetworkParameterRequest - 259, // 483: datanode.api.v2.TradingDataService.ListCheckpoints:input_type -> datanode.api.v2.ListCheckpointsRequest - 263, // 484: datanode.api.v2.TradingDataService.GetStake:input_type -> datanode.api.v2.GetStakeRequest - 267, // 485: datanode.api.v2.TradingDataService.GetRiskFactors:input_type -> datanode.api.v2.GetRiskFactorsRequest - 269, // 486: datanode.api.v2.TradingDataService.ObserveEventBus:input_type -> datanode.api.v2.ObserveEventBusRequest - 271, // 487: datanode.api.v2.TradingDataService.ObserveLedgerMovements:input_type -> datanode.api.v2.ObserveLedgerMovementsRequest - 273, // 488: datanode.api.v2.TradingDataService.ListKeyRotations:input_type -> datanode.api.v2.ListKeyRotationsRequest - 277, // 489: datanode.api.v2.TradingDataService.ListEthereumKeyRotations:input_type -> datanode.api.v2.ListEthereumKeyRotationsRequest - 281, // 490: datanode.api.v2.TradingDataService.GetVegaTime:input_type -> datanode.api.v2.GetVegaTimeRequest - 284, // 491: datanode.api.v2.TradingDataService.GetProtocolUpgradeStatus:input_type -> datanode.api.v2.GetProtocolUpgradeStatusRequest - 286, // 492: datanode.api.v2.TradingDataService.ListProtocolUpgradeProposals:input_type -> datanode.api.v2.ListProtocolUpgradeProposalsRequest - 290, // 493: datanode.api.v2.TradingDataService.ListCoreSnapshots:input_type -> datanode.api.v2.ListCoreSnapshotsRequest - 295, // 494: datanode.api.v2.TradingDataService.GetMostRecentNetworkHistorySegment:input_type -> datanode.api.v2.GetMostRecentNetworkHistorySegmentRequest - 297, // 495: datanode.api.v2.TradingDataService.ListAllNetworkHistorySegments:input_type -> datanode.api.v2.ListAllNetworkHistorySegmentsRequest - 299, // 496: datanode.api.v2.TradingDataService.GetActiveNetworkHistoryPeerAddresses:input_type -> datanode.api.v2.GetActiveNetworkHistoryPeerAddressesRequest - 301, // 497: datanode.api.v2.TradingDataService.GetNetworkHistoryStatus:input_type -> datanode.api.v2.GetNetworkHistoryStatusRequest - 303, // 498: datanode.api.v2.TradingDataService.GetNetworkHistoryBootstrapPeers:input_type -> datanode.api.v2.GetNetworkHistoryBootstrapPeersRequest - 306, // 499: datanode.api.v2.TradingDataService.ListEntities:input_type -> datanode.api.v2.ListEntitiesRequest - 315, // 500: datanode.api.v2.TradingDataService.ListFundingPeriods:input_type -> datanode.api.v2.ListFundingPeriodsRequest - 319, // 501: datanode.api.v2.TradingDataService.ListFundingPeriodDataPoints:input_type -> datanode.api.v2.ListFundingPeriodDataPointsRequest - 311, // 502: datanode.api.v2.TradingDataService.ListFundingPayments:input_type -> datanode.api.v2.ListFundingPaymentsRequest - 308, // 503: datanode.api.v2.TradingDataService.GetPartyActivityStreak:input_type -> datanode.api.v2.GetPartyActivityStreakRequest - 331, // 504: datanode.api.v2.TradingDataService.GetCurrentReferralProgram:input_type -> datanode.api.v2.GetCurrentReferralProgramRequest - 337, // 505: datanode.api.v2.TradingDataService.ListReferralSets:input_type -> datanode.api.v2.ListReferralSetsRequest - 342, // 506: datanode.api.v2.TradingDataService.ListReferralSetReferees:input_type -> datanode.api.v2.ListReferralSetRefereesRequest - 344, // 507: datanode.api.v2.TradingDataService.GetReferralSetStats:input_type -> datanode.api.v2.GetReferralSetStatsRequest - 352, // 508: datanode.api.v2.TradingDataService.ListTeams:input_type -> datanode.api.v2.ListTeamsRequest - 354, // 509: datanode.api.v2.TradingDataService.ListTeamReferees:input_type -> datanode.api.v2.ListTeamRefereesRequest - 362, // 510: datanode.api.v2.TradingDataService.ListTeamRefereeHistory:input_type -> datanode.api.v2.ListTeamRefereeHistoryRequest - 364, // 511: datanode.api.v2.TradingDataService.GetFeesStats:input_type -> datanode.api.v2.GetFeesStatsRequest - 366, // 512: datanode.api.v2.TradingDataService.GetFeesStatsForParty:input_type -> datanode.api.v2.GetFeesStatsForPartyRequest - 368, // 513: datanode.api.v2.TradingDataService.GetCurrentVolumeDiscountProgram:input_type -> datanode.api.v2.GetCurrentVolumeDiscountProgramRequest - 370, // 514: datanode.api.v2.TradingDataService.GetVolumeDiscountStats:input_type -> datanode.api.v2.GetVolumeDiscountStatsRequest - 9, // 515: datanode.api.v2.TradingDataService.GetVestingBalancesSummary:input_type -> datanode.api.v2.GetVestingBalancesSummaryRequest - 7, // 516: datanode.api.v2.TradingDataService.GetPartyVestingStats:input_type -> datanode.api.v2.GetPartyVestingStatsRequest - 305, // 517: datanode.api.v2.TradingDataService.ExportNetworkHistory:input_type -> datanode.api.v2.ExportNetworkHistoryRequest - 323, // 518: datanode.api.v2.TradingDataService.Ping:input_type -> datanode.api.v2.PingRequest - 13, // 519: datanode.api.v2.TradingDataService.ListAccounts:output_type -> datanode.api.v2.ListAccountsResponse - 17, // 520: datanode.api.v2.TradingDataService.ObserveAccounts:output_type -> datanode.api.v2.ObserveAccountsResponse - 21, // 521: datanode.api.v2.TradingDataService.Info:output_type -> datanode.api.v2.InfoResponse - 23, // 522: datanode.api.v2.TradingDataService.GetOrder:output_type -> datanode.api.v2.GetOrderResponse - 26, // 523: datanode.api.v2.TradingDataService.ListOrders:output_type -> datanode.api.v2.ListOrdersResponse - 28, // 524: datanode.api.v2.TradingDataService.ListOrderVersions:output_type -> datanode.api.v2.ListOrderVersionsResponse - 30, // 525: datanode.api.v2.TradingDataService.ObserveOrders:output_type -> datanode.api.v2.ObserveOrdersResponse - 34, // 526: datanode.api.v2.TradingDataService.GetStopOrder:output_type -> datanode.api.v2.GetStopOrderResponse - 39, // 527: datanode.api.v2.TradingDataService.ListStopOrders:output_type -> datanode.api.v2.ListStopOrdersResponse - 41, // 528: datanode.api.v2.TradingDataService.ListPositions:output_type -> datanode.api.v2.ListPositionsResponse - 44, // 529: datanode.api.v2.TradingDataService.ListAllPositions:output_type -> datanode.api.v2.ListAllPositionsResponse - 48, // 530: datanode.api.v2.TradingDataService.ObservePositions:output_type -> datanode.api.v2.ObservePositionsResponse - 55, // 531: datanode.api.v2.TradingDataService.ListLedgerEntries:output_type -> datanode.api.v2.ListLedgerEntriesResponse - 447, // 532: datanode.api.v2.TradingDataService.ExportLedgerEntries:output_type -> google.api.HttpBody - 59, // 533: datanode.api.v2.TradingDataService.ListBalanceChanges:output_type -> datanode.api.v2.ListBalanceChangesResponse - 77, // 534: datanode.api.v2.TradingDataService.GetLatestMarketData:output_type -> datanode.api.v2.GetLatestMarketDataResponse - 75, // 535: datanode.api.v2.TradingDataService.ListLatestMarketData:output_type -> datanode.api.v2.ListLatestMarketDataResponse - 73, // 536: datanode.api.v2.TradingDataService.GetLatestMarketDepth:output_type -> datanode.api.v2.GetLatestMarketDepthResponse - 67, // 537: datanode.api.v2.TradingDataService.ObserveMarketsDepth:output_type -> datanode.api.v2.ObserveMarketsDepthResponse - 69, // 538: datanode.api.v2.TradingDataService.ObserveMarketsDepthUpdates:output_type -> datanode.api.v2.ObserveMarketsDepthUpdatesResponse - 71, // 539: datanode.api.v2.TradingDataService.ObserveMarketsData:output_type -> datanode.api.v2.ObserveMarketsDataResponse - 79, // 540: datanode.api.v2.TradingDataService.GetMarketDataHistoryByID:output_type -> datanode.api.v2.GetMarketDataHistoryByIDResponse - 83, // 541: datanode.api.v2.TradingDataService.ListTransfers:output_type -> datanode.api.v2.ListTransfersResponse - 88, // 542: datanode.api.v2.TradingDataService.GetTransfer:output_type -> datanode.api.v2.GetTransferResponse - 90, // 543: datanode.api.v2.TradingDataService.GetNetworkLimits:output_type -> datanode.api.v2.GetNetworkLimitsResponse - 98, // 544: datanode.api.v2.TradingDataService.ListCandleData:output_type -> datanode.api.v2.ListCandleDataResponse - 96, // 545: datanode.api.v2.TradingDataService.ObserveCandleData:output_type -> datanode.api.v2.ObserveCandleDataResponse - 93, // 546: datanode.api.v2.TradingDataService.ListCandleIntervals:output_type -> datanode.api.v2.ListCandleIntervalsResponse - 102, // 547: datanode.api.v2.TradingDataService.ListVotes:output_type -> datanode.api.v2.ListVotesResponse - 106, // 548: datanode.api.v2.TradingDataService.ObserveVotes:output_type -> datanode.api.v2.ObserveVotesResponse - 108, // 549: datanode.api.v2.TradingDataService.ListERC20MultiSigSignerAddedBundles:output_type -> datanode.api.v2.ListERC20MultiSigSignerAddedBundlesResponse - 114, // 550: datanode.api.v2.TradingDataService.ListERC20MultiSigSignerRemovedBundles:output_type -> datanode.api.v2.ListERC20MultiSigSignerRemovedBundlesResponse - 120, // 551: datanode.api.v2.TradingDataService.GetERC20ListAssetBundle:output_type -> datanode.api.v2.GetERC20ListAssetBundleResponse - 122, // 552: datanode.api.v2.TradingDataService.GetERC20SetAssetLimitsBundle:output_type -> datanode.api.v2.GetERC20SetAssetLimitsBundleResponse - 124, // 553: datanode.api.v2.TradingDataService.GetERC20WithdrawalApproval:output_type -> datanode.api.v2.GetERC20WithdrawalApprovalResponse - 126, // 554: datanode.api.v2.TradingDataService.GetLastTrade:output_type -> datanode.api.v2.GetLastTradeResponse - 128, // 555: datanode.api.v2.TradingDataService.ListTrades:output_type -> datanode.api.v2.ListTradesResponse - 132, // 556: datanode.api.v2.TradingDataService.ObserveTrades:output_type -> datanode.api.v2.ObserveTradesResponse - 134, // 557: datanode.api.v2.TradingDataService.GetOracleSpec:output_type -> datanode.api.v2.GetOracleSpecResponse - 136, // 558: datanode.api.v2.TradingDataService.ListOracleSpecs:output_type -> datanode.api.v2.ListOracleSpecsResponse - 138, // 559: datanode.api.v2.TradingDataService.ListOracleData:output_type -> datanode.api.v2.ListOracleDataResponse - 144, // 560: datanode.api.v2.TradingDataService.GetMarket:output_type -> datanode.api.v2.GetMarketResponse - 146, // 561: datanode.api.v2.TradingDataService.ListMarkets:output_type -> datanode.api.v2.ListMarketsResponse - 153, // 562: datanode.api.v2.TradingDataService.ListSuccessorMarkets:output_type -> datanode.api.v2.ListSuccessorMarketsResponse - 155, // 563: datanode.api.v2.TradingDataService.GetParty:output_type -> datanode.api.v2.GetPartyResponse - 157, // 564: datanode.api.v2.TradingDataService.ListParties:output_type -> datanode.api.v2.ListPartiesResponse - 162, // 565: datanode.api.v2.TradingDataService.ListMarginLevels:output_type -> datanode.api.v2.ListMarginLevelsResponse - 164, // 566: datanode.api.v2.TradingDataService.ObserveMarginLevels:output_type -> datanode.api.v2.ObserveMarginLevelsResponse - 169, // 567: datanode.api.v2.TradingDataService.ListRewards:output_type -> datanode.api.v2.ListRewardsResponse - 173, // 568: datanode.api.v2.TradingDataService.ListRewardSummaries:output_type -> datanode.api.v2.ListRewardSummariesResponse - 176, // 569: datanode.api.v2.TradingDataService.ListEpochRewardSummaries:output_type -> datanode.api.v2.ListEpochRewardSummariesResponse - 182, // 570: datanode.api.v2.TradingDataService.GetDeposit:output_type -> datanode.api.v2.GetDepositResponse - 184, // 571: datanode.api.v2.TradingDataService.ListDeposits:output_type -> datanode.api.v2.ListDepositsResponse - 188, // 572: datanode.api.v2.TradingDataService.GetWithdrawal:output_type -> datanode.api.v2.GetWithdrawalResponse - 190, // 573: datanode.api.v2.TradingDataService.ListWithdrawals:output_type -> datanode.api.v2.ListWithdrawalsResponse - 194, // 574: datanode.api.v2.TradingDataService.GetAsset:output_type -> datanode.api.v2.GetAssetResponse - 196, // 575: datanode.api.v2.TradingDataService.ListAssets:output_type -> datanode.api.v2.ListAssetsResponse - 201, // 576: datanode.api.v2.TradingDataService.ListLiquidityProvisions:output_type -> datanode.api.v2.ListLiquidityProvisionsResponse - 202, // 577: datanode.api.v2.TradingDataService.ListAllLiquidityProvisions:output_type -> datanode.api.v2.ListAllLiquidityProvisionsResponse - 209, // 578: datanode.api.v2.TradingDataService.ObserveLiquidityProvisions:output_type -> datanode.api.v2.ObserveLiquidityProvisionsResponse - 214, // 579: datanode.api.v2.TradingDataService.ListLiquidityProviders:output_type -> datanode.api.v2.ListLiquidityProvidersResponse - 216, // 580: datanode.api.v2.TradingDataService.ListPaidLiquidityFees:output_type -> datanode.api.v2.ListPaidLiquidityFeesResponse - 220, // 581: datanode.api.v2.TradingDataService.GetGovernanceData:output_type -> datanode.api.v2.GetGovernanceDataResponse - 222, // 582: datanode.api.v2.TradingDataService.ListGovernanceData:output_type -> datanode.api.v2.ListGovernanceDataResponse - 226, // 583: datanode.api.v2.TradingDataService.ObserveGovernance:output_type -> datanode.api.v2.ObserveGovernanceResponse - 228, // 584: datanode.api.v2.TradingDataService.ListDelegations:output_type -> datanode.api.v2.ListDelegationsResponse - 235, // 585: datanode.api.v2.TradingDataService.GetNetworkData:output_type -> datanode.api.v2.GetNetworkDataResponse - 237, // 586: datanode.api.v2.TradingDataService.GetNode:output_type -> datanode.api.v2.GetNodeResponse - 239, // 587: datanode.api.v2.TradingDataService.ListNodes:output_type -> datanode.api.v2.ListNodesResponse - 243, // 588: datanode.api.v2.TradingDataService.ListNodeSignatures:output_type -> datanode.api.v2.ListNodeSignaturesResponse - 247, // 589: datanode.api.v2.TradingDataService.GetEpoch:output_type -> datanode.api.v2.GetEpochResponse - 249, // 590: datanode.api.v2.TradingDataService.EstimateFee:output_type -> datanode.api.v2.EstimateFeeResponse - 251, // 591: datanode.api.v2.TradingDataService.EstimateMargin:output_type -> datanode.api.v2.EstimateMarginResponse - 327, // 592: datanode.api.v2.TradingDataService.EstimatePosition:output_type -> datanode.api.v2.EstimatePositionResponse - 253, // 593: datanode.api.v2.TradingDataService.ListNetworkParameters:output_type -> datanode.api.v2.ListNetworkParametersResponse - 255, // 594: datanode.api.v2.TradingDataService.GetNetworkParameter:output_type -> datanode.api.v2.GetNetworkParameterResponse - 260, // 595: datanode.api.v2.TradingDataService.ListCheckpoints:output_type -> datanode.api.v2.ListCheckpointsResponse - 264, // 596: datanode.api.v2.TradingDataService.GetStake:output_type -> datanode.api.v2.GetStakeResponse - 268, // 597: datanode.api.v2.TradingDataService.GetRiskFactors:output_type -> datanode.api.v2.GetRiskFactorsResponse - 270, // 598: datanode.api.v2.TradingDataService.ObserveEventBus:output_type -> datanode.api.v2.ObserveEventBusResponse - 272, // 599: datanode.api.v2.TradingDataService.ObserveLedgerMovements:output_type -> datanode.api.v2.ObserveLedgerMovementsResponse - 274, // 600: datanode.api.v2.TradingDataService.ListKeyRotations:output_type -> datanode.api.v2.ListKeyRotationsResponse - 278, // 601: datanode.api.v2.TradingDataService.ListEthereumKeyRotations:output_type -> datanode.api.v2.ListEthereumKeyRotationsResponse - 282, // 602: datanode.api.v2.TradingDataService.GetVegaTime:output_type -> datanode.api.v2.GetVegaTimeResponse - 285, // 603: datanode.api.v2.TradingDataService.GetProtocolUpgradeStatus:output_type -> datanode.api.v2.GetProtocolUpgradeStatusResponse - 287, // 604: datanode.api.v2.TradingDataService.ListProtocolUpgradeProposals:output_type -> datanode.api.v2.ListProtocolUpgradeProposalsResponse - 291, // 605: datanode.api.v2.TradingDataService.ListCoreSnapshots:output_type -> datanode.api.v2.ListCoreSnapshotsResponse - 296, // 606: datanode.api.v2.TradingDataService.GetMostRecentNetworkHistorySegment:output_type -> datanode.api.v2.GetMostRecentNetworkHistorySegmentResponse - 298, // 607: datanode.api.v2.TradingDataService.ListAllNetworkHistorySegments:output_type -> datanode.api.v2.ListAllNetworkHistorySegmentsResponse - 300, // 608: datanode.api.v2.TradingDataService.GetActiveNetworkHistoryPeerAddresses:output_type -> datanode.api.v2.GetActiveNetworkHistoryPeerAddressesResponse - 302, // 609: datanode.api.v2.TradingDataService.GetNetworkHistoryStatus:output_type -> datanode.api.v2.GetNetworkHistoryStatusResponse - 304, // 610: datanode.api.v2.TradingDataService.GetNetworkHistoryBootstrapPeers:output_type -> datanode.api.v2.GetNetworkHistoryBootstrapPeersResponse - 307, // 611: datanode.api.v2.TradingDataService.ListEntities:output_type -> datanode.api.v2.ListEntitiesResponse - 318, // 612: datanode.api.v2.TradingDataService.ListFundingPeriods:output_type -> datanode.api.v2.ListFundingPeriodsResponse - 322, // 613: datanode.api.v2.TradingDataService.ListFundingPeriodDataPoints:output_type -> datanode.api.v2.ListFundingPeriodDataPointsResponse - 314, // 614: datanode.api.v2.TradingDataService.ListFundingPayments:output_type -> datanode.api.v2.ListFundingPaymentsResponse - 309, // 615: datanode.api.v2.TradingDataService.GetPartyActivityStreak:output_type -> datanode.api.v2.GetPartyActivityStreakResponse - 332, // 616: datanode.api.v2.TradingDataService.GetCurrentReferralProgram:output_type -> datanode.api.v2.GetCurrentReferralProgramResponse - 338, // 617: datanode.api.v2.TradingDataService.ListReferralSets:output_type -> datanode.api.v2.ListReferralSetsResponse - 343, // 618: datanode.api.v2.TradingDataService.ListReferralSetReferees:output_type -> datanode.api.v2.ListReferralSetRefereesResponse - 345, // 619: datanode.api.v2.TradingDataService.GetReferralSetStats:output_type -> datanode.api.v2.GetReferralSetStatsResponse - 353, // 620: datanode.api.v2.TradingDataService.ListTeams:output_type -> datanode.api.v2.ListTeamsResponse - 358, // 621: datanode.api.v2.TradingDataService.ListTeamReferees:output_type -> datanode.api.v2.ListTeamRefereesResponse - 363, // 622: datanode.api.v2.TradingDataService.ListTeamRefereeHistory:output_type -> datanode.api.v2.ListTeamRefereeHistoryResponse - 365, // 623: datanode.api.v2.TradingDataService.GetFeesStats:output_type -> datanode.api.v2.GetFeesStatsResponse - 367, // 624: datanode.api.v2.TradingDataService.GetFeesStatsForParty:output_type -> datanode.api.v2.GetFeesStatsForPartyResponse - 369, // 625: datanode.api.v2.TradingDataService.GetCurrentVolumeDiscountProgram:output_type -> datanode.api.v2.GetCurrentVolumeDiscountProgramResponse - 371, // 626: datanode.api.v2.TradingDataService.GetVolumeDiscountStats:output_type -> datanode.api.v2.GetVolumeDiscountStatsResponse - 10, // 627: datanode.api.v2.TradingDataService.GetVestingBalancesSummary:output_type -> datanode.api.v2.GetVestingBalancesSummaryResponse - 8, // 628: datanode.api.v2.TradingDataService.GetPartyVestingStats:output_type -> datanode.api.v2.GetPartyVestingStatsResponse - 447, // 629: datanode.api.v2.TradingDataService.ExportNetworkHistory:output_type -> google.api.HttpBody - 324, // 630: datanode.api.v2.TradingDataService.Ping:output_type -> datanode.api.v2.PingResponse - 519, // [519:631] is the sub-list for method output_type - 407, // [407:519] is the sub-list for method input_type - 407, // [407:407] is the sub-list for extension type_name - 407, // [407:407] is the sub-list for extension extendee - 0, // [0:407] is the sub-list for field type_name + 6, // 92: datanode.api.v2.ListTransfersRequest.pagination:type_name -> datanode.api.v2.Pagination + 433, // 93: datanode.api.v2.ListTransfersRequest.status:type_name -> vega.events.v1.Transfer.Status + 4, // 94: datanode.api.v2.ListTransfersRequest.scope:type_name -> datanode.api.v2.ListTransfersRequest.Scope + 87, // 95: datanode.api.v2.ListTransfersResponse.transfers:type_name -> datanode.api.v2.TransferConnection + 434, // 96: datanode.api.v2.TransferNode.transfer:type_name -> vega.events.v1.Transfer + 435, // 97: datanode.api.v2.TransferNode.fees:type_name -> vega.events.v1.TransferFees + 85, // 98: datanode.api.v2.TransferEdge.node:type_name -> datanode.api.v2.TransferNode + 86, // 99: datanode.api.v2.TransferConnection.edges:type_name -> datanode.api.v2.TransferEdge + 7, // 100: datanode.api.v2.TransferConnection.page_info:type_name -> datanode.api.v2.PageInfo + 85, // 101: datanode.api.v2.GetTransferResponse.transfer_node:type_name -> datanode.api.v2.TransferNode + 436, // 102: datanode.api.v2.GetNetworkLimitsResponse.limits:type_name -> vega.NetworkLimits + 93, // 103: datanode.api.v2.ListCandleIntervalsResponse.interval_to_candle_id:type_name -> datanode.api.v2.IntervalToCandleId + 95, // 104: datanode.api.v2.ObserveCandleDataResponse.candle:type_name -> datanode.api.v2.Candle + 6, // 105: datanode.api.v2.ListCandleDataRequest.pagination:type_name -> datanode.api.v2.Pagination + 101, // 106: datanode.api.v2.ListCandleDataResponse.candles:type_name -> datanode.api.v2.CandleDataConnection + 95, // 107: datanode.api.v2.CandleEdge.node:type_name -> datanode.api.v2.Candle + 100, // 108: datanode.api.v2.CandleDataConnection.edges:type_name -> datanode.api.v2.CandleEdge + 7, // 109: datanode.api.v2.CandleDataConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 110: datanode.api.v2.ListVotesRequest.pagination:type_name -> datanode.api.v2.Pagination + 105, // 111: datanode.api.v2.ListVotesResponse.votes:type_name -> datanode.api.v2.VoteConnection + 437, // 112: datanode.api.v2.VoteEdge.node:type_name -> vega.Vote + 104, // 113: datanode.api.v2.VoteConnection.edges:type_name -> datanode.api.v2.VoteEdge + 7, // 114: datanode.api.v2.VoteConnection.page_info:type_name -> datanode.api.v2.PageInfo + 437, // 115: datanode.api.v2.ObserveVotesResponse.vote:type_name -> vega.Vote + 6, // 116: datanode.api.v2.ListERC20MultiSigSignerAddedBundlesRequest.pagination:type_name -> datanode.api.v2.Pagination + 112, // 117: datanode.api.v2.ListERC20MultiSigSignerAddedBundlesResponse.bundles:type_name -> datanode.api.v2.ERC20MultiSigSignerAddedConnection + 438, // 118: datanode.api.v2.ERC20MultiSigSignerAddedEdge.node:type_name -> vega.events.v1.ERC20MultiSigSignerAdded + 113, // 119: datanode.api.v2.ERC20MultiSigSignerAddedBundleEdge.node:type_name -> datanode.api.v2.ERC20MultiSigSignerAddedBundle + 111, // 120: datanode.api.v2.ERC20MultiSigSignerAddedConnection.edges:type_name -> datanode.api.v2.ERC20MultiSigSignerAddedBundleEdge + 7, // 121: datanode.api.v2.ERC20MultiSigSignerAddedConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 122: datanode.api.v2.ListERC20MultiSigSignerRemovedBundlesRequest.pagination:type_name -> datanode.api.v2.Pagination + 118, // 123: datanode.api.v2.ListERC20MultiSigSignerRemovedBundlesResponse.bundles:type_name -> datanode.api.v2.ERC20MultiSigSignerRemovedConnection + 439, // 124: datanode.api.v2.ERC20MultiSigSignerRemovedEdge.node:type_name -> vega.events.v1.ERC20MultiSigSignerRemoved + 119, // 125: datanode.api.v2.ERC20MultiSigSignerRemovedBundleEdge.node:type_name -> datanode.api.v2.ERC20MultiSigSignerRemovedBundle + 117, // 126: datanode.api.v2.ERC20MultiSigSignerRemovedConnection.edges:type_name -> datanode.api.v2.ERC20MultiSigSignerRemovedBundleEdge + 7, // 127: datanode.api.v2.ERC20MultiSigSignerRemovedConnection.page_info:type_name -> datanode.api.v2.PageInfo + 432, // 128: datanode.api.v2.GetLastTradeResponse.trade:type_name -> vega.Trade + 6, // 129: datanode.api.v2.ListTradesRequest.pagination:type_name -> datanode.api.v2.Pagination + 288, // 130: datanode.api.v2.ListTradesRequest.date_range:type_name -> datanode.api.v2.DateRange + 130, // 131: datanode.api.v2.ListTradesResponse.trades:type_name -> datanode.api.v2.TradeConnection + 131, // 132: datanode.api.v2.TradeConnection.edges:type_name -> datanode.api.v2.TradeEdge + 7, // 133: datanode.api.v2.TradeConnection.page_info:type_name -> datanode.api.v2.PageInfo + 432, // 134: datanode.api.v2.TradeEdge.node:type_name -> vega.Trade + 432, // 135: datanode.api.v2.ObserveTradesResponse.trades:type_name -> vega.Trade + 440, // 136: datanode.api.v2.GetOracleSpecResponse.oracle_spec:type_name -> vega.OracleSpec + 6, // 137: datanode.api.v2.ListOracleSpecsRequest.pagination:type_name -> datanode.api.v2.Pagination + 141, // 138: datanode.api.v2.ListOracleSpecsResponse.oracle_specs:type_name -> datanode.api.v2.OracleSpecsConnection + 6, // 139: datanode.api.v2.ListOracleDataRequest.pagination:type_name -> datanode.api.v2.Pagination + 143, // 140: datanode.api.v2.ListOracleDataResponse.oracle_data:type_name -> datanode.api.v2.OracleDataConnection + 440, // 141: datanode.api.v2.OracleSpecEdge.node:type_name -> vega.OracleSpec + 140, // 142: datanode.api.v2.OracleSpecsConnection.edges:type_name -> datanode.api.v2.OracleSpecEdge + 7, // 143: datanode.api.v2.OracleSpecsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 441, // 144: datanode.api.v2.OracleDataEdge.node:type_name -> vega.OracleData + 142, // 145: datanode.api.v2.OracleDataConnection.edges:type_name -> datanode.api.v2.OracleDataEdge + 7, // 146: datanode.api.v2.OracleDataConnection.page_info:type_name -> datanode.api.v2.PageInfo + 442, // 147: datanode.api.v2.GetMarketResponse.market:type_name -> vega.Market + 6, // 148: datanode.api.v2.ListMarketsRequest.pagination:type_name -> datanode.api.v2.Pagination + 149, // 149: datanode.api.v2.ListMarketsResponse.markets:type_name -> datanode.api.v2.MarketConnection + 442, // 150: datanode.api.v2.MarketEdge.node:type_name -> vega.Market + 148, // 151: datanode.api.v2.MarketConnection.edges:type_name -> datanode.api.v2.MarketEdge + 7, // 152: datanode.api.v2.MarketConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 153: datanode.api.v2.ListSuccessorMarketsRequest.pagination:type_name -> datanode.api.v2.Pagination + 442, // 154: datanode.api.v2.SuccessorMarket.market:type_name -> vega.Market + 443, // 155: datanode.api.v2.SuccessorMarket.proposals:type_name -> vega.GovernanceData + 151, // 156: datanode.api.v2.SuccessorMarketEdge.node:type_name -> datanode.api.v2.SuccessorMarket + 152, // 157: datanode.api.v2.SuccessorMarketConnection.edges:type_name -> datanode.api.v2.SuccessorMarketEdge + 7, // 158: datanode.api.v2.SuccessorMarketConnection.page_info:type_name -> datanode.api.v2.PageInfo + 153, // 159: datanode.api.v2.ListSuccessorMarketsResponse.successor_markets:type_name -> datanode.api.v2.SuccessorMarketConnection + 444, // 160: datanode.api.v2.GetPartyResponse.party:type_name -> vega.Party + 6, // 161: datanode.api.v2.ListPartiesRequest.pagination:type_name -> datanode.api.v2.Pagination + 160, // 162: datanode.api.v2.ListPartiesResponse.parties:type_name -> datanode.api.v2.PartyConnection + 444, // 163: datanode.api.v2.PartyEdge.node:type_name -> vega.Party + 159, // 164: datanode.api.v2.PartyConnection.edges:type_name -> datanode.api.v2.PartyEdge + 7, // 165: datanode.api.v2.PartyConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 166: datanode.api.v2.ListPartiesProfilesRequest.pagination:type_name -> datanode.api.v2.Pagination + 164, // 167: datanode.api.v2.ListPartiesProfilesResponse.profiles:type_name -> datanode.api.v2.PartiesProfilesConnection + 445, // 168: datanode.api.v2.PartyProfileEdge.node:type_name -> vega.PartyProfile + 163, // 169: datanode.api.v2.PartiesProfilesConnection.edges:type_name -> datanode.api.v2.PartyProfileEdge + 7, // 170: datanode.api.v2.PartiesProfilesConnection.page_info:type_name -> datanode.api.v2.PageInfo + 419, // 171: datanode.api.v2.OrderEdge.node:type_name -> vega.Order + 6, // 172: datanode.api.v2.ListMarginLevelsRequest.pagination:type_name -> datanode.api.v2.Pagination + 172, // 173: datanode.api.v2.ListMarginLevelsResponse.margin_levels:type_name -> datanode.api.v2.MarginConnection + 446, // 174: datanode.api.v2.ObserveMarginLevelsResponse.margin_levels:type_name -> vega.MarginLevels + 165, // 175: datanode.api.v2.OrderConnection.edges:type_name -> datanode.api.v2.OrderEdge + 7, // 176: datanode.api.v2.OrderConnection.page_info:type_name -> datanode.api.v2.PageInfo + 446, // 177: datanode.api.v2.MarginEdge.node:type_name -> vega.MarginLevels + 171, // 178: datanode.api.v2.MarginConnection.edges:type_name -> datanode.api.v2.MarginEdge + 7, // 179: datanode.api.v2.MarginConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 180: datanode.api.v2.ListRewardsRequest.pagination:type_name -> datanode.api.v2.Pagination + 176, // 181: datanode.api.v2.ListRewardsResponse.rewards:type_name -> datanode.api.v2.RewardsConnection + 447, // 182: datanode.api.v2.RewardEdge.node:type_name -> vega.Reward + 175, // 183: datanode.api.v2.RewardsConnection.edges:type_name -> datanode.api.v2.RewardEdge + 7, // 184: datanode.api.v2.RewardsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 185: datanode.api.v2.ListRewardSummariesRequest.pagination:type_name -> datanode.api.v2.Pagination + 448, // 186: datanode.api.v2.ListRewardSummariesResponse.summaries:type_name -> vega.RewardSummary + 179, // 187: datanode.api.v2.ListEpochRewardSummariesRequest.filter:type_name -> datanode.api.v2.RewardSummaryFilter + 6, // 188: datanode.api.v2.ListEpochRewardSummariesRequest.pagination:type_name -> datanode.api.v2.Pagination + 182, // 189: datanode.api.v2.ListEpochRewardSummariesResponse.summaries:type_name -> datanode.api.v2.EpochRewardSummaryConnection + 183, // 190: datanode.api.v2.EpochRewardSummaryConnection.edges:type_name -> datanode.api.v2.EpochRewardSummaryEdge + 7, // 191: datanode.api.v2.EpochRewardSummaryConnection.page_info:type_name -> datanode.api.v2.PageInfo + 449, // 192: datanode.api.v2.EpochRewardSummaryEdge.node:type_name -> vega.EpochRewardSummary + 447, // 193: datanode.api.v2.ObserveRewardsResponse.reward:type_name -> vega.Reward + 450, // 194: datanode.api.v2.GetDepositResponse.deposit:type_name -> vega.Deposit + 6, // 195: datanode.api.v2.ListDepositsRequest.pagination:type_name -> datanode.api.v2.Pagination + 288, // 196: datanode.api.v2.ListDepositsRequest.date_range:type_name -> datanode.api.v2.DateRange + 191, // 197: datanode.api.v2.ListDepositsResponse.deposits:type_name -> datanode.api.v2.DepositsConnection + 450, // 198: datanode.api.v2.DepositEdge.node:type_name -> vega.Deposit + 190, // 199: datanode.api.v2.DepositsConnection.edges:type_name -> datanode.api.v2.DepositEdge + 7, // 200: datanode.api.v2.DepositsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 451, // 201: datanode.api.v2.GetWithdrawalResponse.withdrawal:type_name -> vega.Withdrawal + 6, // 202: datanode.api.v2.ListWithdrawalsRequest.pagination:type_name -> datanode.api.v2.Pagination + 288, // 203: datanode.api.v2.ListWithdrawalsRequest.date_range:type_name -> datanode.api.v2.DateRange + 197, // 204: datanode.api.v2.ListWithdrawalsResponse.withdrawals:type_name -> datanode.api.v2.WithdrawalsConnection + 451, // 205: datanode.api.v2.WithdrawalEdge.node:type_name -> vega.Withdrawal + 196, // 206: datanode.api.v2.WithdrawalsConnection.edges:type_name -> datanode.api.v2.WithdrawalEdge + 7, // 207: datanode.api.v2.WithdrawalsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 452, // 208: datanode.api.v2.GetAssetResponse.asset:type_name -> vega.Asset + 6, // 209: datanode.api.v2.ListAssetsRequest.pagination:type_name -> datanode.api.v2.Pagination + 203, // 210: datanode.api.v2.ListAssetsResponse.assets:type_name -> datanode.api.v2.AssetsConnection + 452, // 211: datanode.api.v2.AssetEdge.node:type_name -> vega.Asset + 202, // 212: datanode.api.v2.AssetsConnection.edges:type_name -> datanode.api.v2.AssetEdge + 7, // 213: datanode.api.v2.AssetsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 214: datanode.api.v2.ListLiquidityProvisionsRequest.pagination:type_name -> datanode.api.v2.Pagination + 6, // 215: datanode.api.v2.ListAllLiquidityProvisionsRequest.pagination:type_name -> datanode.api.v2.Pagination + 211, // 216: datanode.api.v2.ListLiquidityProvisionsResponse.liquidity_provisions:type_name -> datanode.api.v2.LiquidityProvisionsConnection + 212, // 217: datanode.api.v2.ListAllLiquidityProvisionsResponse.liquidity_provisions:type_name -> datanode.api.v2.LiquidityProvisionsWithPendingConnection + 453, // 218: datanode.api.v2.LiquidityProvision.current:type_name -> vega.LiquidityProvision + 453, // 219: datanode.api.v2.LiquidityProvision.pending:type_name -> vega.LiquidityProvision + 453, // 220: datanode.api.v2.LiquidityProvisionsEdge.node:type_name -> vega.LiquidityProvision + 208, // 221: datanode.api.v2.LiquidityProvisionWithPendingEdge.node:type_name -> datanode.api.v2.LiquidityProvision + 209, // 222: datanode.api.v2.LiquidityProvisionsConnection.edges:type_name -> datanode.api.v2.LiquidityProvisionsEdge + 7, // 223: datanode.api.v2.LiquidityProvisionsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 210, // 224: datanode.api.v2.LiquidityProvisionsWithPendingConnection.edges:type_name -> datanode.api.v2.LiquidityProvisionWithPendingEdge + 7, // 225: datanode.api.v2.LiquidityProvisionsWithPendingConnection.page_info:type_name -> datanode.api.v2.PageInfo + 453, // 226: datanode.api.v2.ObserveLiquidityProvisionsResponse.liquidity_provisions:type_name -> vega.LiquidityProvision + 6, // 227: datanode.api.v2.ListLiquidityProvidersRequest.pagination:type_name -> datanode.api.v2.Pagination + 454, // 228: datanode.api.v2.LiquidityProvider.fee_share:type_name -> vega.LiquidityProviderFeeShare + 455, // 229: datanode.api.v2.LiquidityProvider.sla:type_name -> vega.LiquidityProviderSLA + 216, // 230: datanode.api.v2.LiquidityProviderEdge.node:type_name -> datanode.api.v2.LiquidityProvider + 217, // 231: datanode.api.v2.LiquidityProviderConnection.edges:type_name -> datanode.api.v2.LiquidityProviderEdge + 7, // 232: datanode.api.v2.LiquidityProviderConnection.page_info:type_name -> datanode.api.v2.PageInfo + 218, // 233: datanode.api.v2.ListLiquidityProvidersResponse.liquidity_providers:type_name -> datanode.api.v2.LiquidityProviderConnection + 6, // 234: datanode.api.v2.ListPaidLiquidityFeesRequest.pagination:type_name -> datanode.api.v2.Pagination + 223, // 235: datanode.api.v2.ListPaidLiquidityFeesResponse.paid_liquidity_fees:type_name -> datanode.api.v2.PaidLiquidityFeesConnection + 456, // 236: datanode.api.v2.PaidLiquidityFeesEdge.node:type_name -> vega.events.v1.PaidLiquidityFeesStats + 222, // 237: datanode.api.v2.PaidLiquidityFeesConnection.edges:type_name -> datanode.api.v2.PaidLiquidityFeesEdge + 7, // 238: datanode.api.v2.PaidLiquidityFeesConnection.page_info:type_name -> datanode.api.v2.PageInfo + 443, // 239: datanode.api.v2.GetGovernanceDataResponse.data:type_name -> vega.GovernanceData + 457, // 240: datanode.api.v2.ListGovernanceDataRequest.proposal_state:type_name -> vega.Proposal.State + 5, // 241: datanode.api.v2.ListGovernanceDataRequest.proposal_type:type_name -> datanode.api.v2.ListGovernanceDataRequest.Type + 6, // 242: datanode.api.v2.ListGovernanceDataRequest.pagination:type_name -> datanode.api.v2.Pagination + 229, // 243: datanode.api.v2.ListGovernanceDataResponse.connection:type_name -> datanode.api.v2.GovernanceDataConnection + 443, // 244: datanode.api.v2.GovernanceDataEdge.node:type_name -> vega.GovernanceData + 228, // 245: datanode.api.v2.GovernanceDataConnection.edges:type_name -> datanode.api.v2.GovernanceDataEdge + 7, // 246: datanode.api.v2.GovernanceDataConnection.page_info:type_name -> datanode.api.v2.PageInfo + 443, // 247: datanode.api.v2.ObserveGovernanceResponse.data:type_name -> vega.GovernanceData + 6, // 248: datanode.api.v2.ListDelegationsRequest.pagination:type_name -> datanode.api.v2.Pagination + 235, // 249: datanode.api.v2.ListDelegationsResponse.delegations:type_name -> datanode.api.v2.DelegationsConnection + 458, // 250: datanode.api.v2.DelegationEdge.node:type_name -> vega.Delegation + 234, // 251: datanode.api.v2.DelegationsConnection.edges:type_name -> datanode.api.v2.DelegationEdge + 7, // 252: datanode.api.v2.DelegationsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 458, // 253: datanode.api.v2.ObserveDelegationsResponse.delegation:type_name -> vega.Delegation + 459, // 254: datanode.api.v2.NodeBasic.status:type_name -> vega.NodeStatus + 460, // 255: datanode.api.v2.GetNetworkDataResponse.node_data:type_name -> vega.NodeData + 461, // 256: datanode.api.v2.GetNodeResponse.node:type_name -> vega.Node + 6, // 257: datanode.api.v2.ListNodesRequest.pagination:type_name -> datanode.api.v2.Pagination + 246, // 258: datanode.api.v2.ListNodesResponse.nodes:type_name -> datanode.api.v2.NodesConnection + 461, // 259: datanode.api.v2.NodeEdge.node:type_name -> vega.Node + 245, // 260: datanode.api.v2.NodesConnection.edges:type_name -> datanode.api.v2.NodeEdge + 7, // 261: datanode.api.v2.NodesConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 262: datanode.api.v2.ListNodeSignaturesRequest.pagination:type_name -> datanode.api.v2.Pagination + 250, // 263: datanode.api.v2.ListNodeSignaturesResponse.signatures:type_name -> datanode.api.v2.NodeSignaturesConnection + 462, // 264: datanode.api.v2.NodeSignatureEdge.node:type_name -> vega.commands.v1.NodeSignature + 249, // 265: datanode.api.v2.NodeSignaturesConnection.edges:type_name -> datanode.api.v2.NodeSignatureEdge + 7, // 266: datanode.api.v2.NodeSignaturesConnection.page_info:type_name -> datanode.api.v2.PageInfo + 463, // 267: datanode.api.v2.GetEpochResponse.epoch:type_name -> vega.Epoch + 464, // 268: datanode.api.v2.EstimateFeeResponse.fee:type_name -> vega.Fee + 465, // 269: datanode.api.v2.EstimateMarginRequest.side:type_name -> vega.Side + 421, // 270: datanode.api.v2.EstimateMarginRequest.type:type_name -> vega.Order.Type + 446, // 271: datanode.api.v2.EstimateMarginResponse.margin_levels:type_name -> vega.MarginLevels + 6, // 272: datanode.api.v2.ListNetworkParametersRequest.pagination:type_name -> datanode.api.v2.Pagination + 262, // 273: datanode.api.v2.ListNetworkParametersResponse.network_parameters:type_name -> datanode.api.v2.NetworkParameterConnection + 466, // 274: datanode.api.v2.GetNetworkParameterResponse.network_parameter:type_name -> vega.NetworkParameter + 466, // 275: datanode.api.v2.NetworkParameterEdge.node:type_name -> vega.NetworkParameter + 261, // 276: datanode.api.v2.NetworkParameterConnection.edges:type_name -> datanode.api.v2.NetworkParameterEdge + 7, // 277: datanode.api.v2.NetworkParameterConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 278: datanode.api.v2.ListCheckpointsRequest.pagination:type_name -> datanode.api.v2.Pagination + 267, // 279: datanode.api.v2.ListCheckpointsResponse.checkpoints:type_name -> datanode.api.v2.CheckpointsConnection + 263, // 280: datanode.api.v2.CheckpointEdge.node:type_name -> datanode.api.v2.Checkpoint + 266, // 281: datanode.api.v2.CheckpointsConnection.edges:type_name -> datanode.api.v2.CheckpointEdge + 7, // 282: datanode.api.v2.CheckpointsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 283: datanode.api.v2.GetStakeRequest.pagination:type_name -> datanode.api.v2.Pagination + 271, // 284: datanode.api.v2.GetStakeResponse.stake_linkings:type_name -> datanode.api.v2.StakesConnection + 467, // 285: datanode.api.v2.StakeLinkingEdge.node:type_name -> vega.events.v1.StakeLinking + 270, // 286: datanode.api.v2.StakesConnection.edges:type_name -> datanode.api.v2.StakeLinkingEdge + 7, // 287: datanode.api.v2.StakesConnection.page_info:type_name -> datanode.api.v2.PageInfo + 468, // 288: datanode.api.v2.GetRiskFactorsResponse.risk_factor:type_name -> vega.RiskFactor + 469, // 289: datanode.api.v2.ObserveEventBusRequest.type:type_name -> vega.events.v1.BusEventType + 470, // 290: datanode.api.v2.ObserveEventBusResponse.events:type_name -> vega.events.v1.BusEvent + 471, // 291: datanode.api.v2.ObserveLedgerMovementsResponse.ledger_movement:type_name -> vega.LedgerMovement + 6, // 292: datanode.api.v2.ListKeyRotationsRequest.pagination:type_name -> datanode.api.v2.Pagination + 281, // 293: datanode.api.v2.ListKeyRotationsResponse.rotations:type_name -> datanode.api.v2.KeyRotationConnection + 472, // 294: datanode.api.v2.KeyRotationEdge.node:type_name -> vega.events.v1.KeyRotation + 280, // 295: datanode.api.v2.KeyRotationConnection.edges:type_name -> datanode.api.v2.KeyRotationEdge + 7, // 296: datanode.api.v2.KeyRotationConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 297: datanode.api.v2.ListEthereumKeyRotationsRequest.pagination:type_name -> datanode.api.v2.Pagination + 284, // 298: datanode.api.v2.ListEthereumKeyRotationsResponse.key_rotations:type_name -> datanode.api.v2.EthereumKeyRotationsConnection + 285, // 299: datanode.api.v2.EthereumKeyRotationsConnection.edges:type_name -> datanode.api.v2.EthereumKeyRotationEdge + 7, // 300: datanode.api.v2.EthereumKeyRotationsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 473, // 301: datanode.api.v2.EthereumKeyRotationEdge.node:type_name -> vega.events.v1.EthereumKeyRotation + 474, // 302: datanode.api.v2.ListProtocolUpgradeProposalsRequest.status:type_name -> vega.events.v1.ProtocolUpgradeProposalStatus + 6, // 303: datanode.api.v2.ListProtocolUpgradeProposalsRequest.pagination:type_name -> datanode.api.v2.Pagination + 293, // 304: datanode.api.v2.ListProtocolUpgradeProposalsResponse.protocol_upgrade_proposals:type_name -> datanode.api.v2.ProtocolUpgradeProposalConnection + 294, // 305: datanode.api.v2.ProtocolUpgradeProposalConnection.edges:type_name -> datanode.api.v2.ProtocolUpgradeProposalEdge + 7, // 306: datanode.api.v2.ProtocolUpgradeProposalConnection.page_info:type_name -> datanode.api.v2.PageInfo + 475, // 307: datanode.api.v2.ProtocolUpgradeProposalEdge.node:type_name -> vega.events.v1.ProtocolUpgradeEvent + 6, // 308: datanode.api.v2.ListCoreSnapshotsRequest.pagination:type_name -> datanode.api.v2.Pagination + 297, // 309: datanode.api.v2.ListCoreSnapshotsResponse.core_snapshots:type_name -> datanode.api.v2.CoreSnapshotConnection + 298, // 310: datanode.api.v2.CoreSnapshotConnection.edges:type_name -> datanode.api.v2.CoreSnapshotEdge + 7, // 311: datanode.api.v2.CoreSnapshotConnection.page_info:type_name -> datanode.api.v2.PageInfo + 476, // 312: datanode.api.v2.CoreSnapshotEdge.node:type_name -> vega.events.v1.CoreSnapshotData + 299, // 313: datanode.api.v2.GetMostRecentNetworkHistorySegmentResponse.segment:type_name -> datanode.api.v2.HistorySegment + 299, // 314: datanode.api.v2.ListAllNetworkHistorySegmentsResponse.segments:type_name -> datanode.api.v2.HistorySegment + 3, // 315: datanode.api.v2.ExportNetworkHistoryRequest.table:type_name -> datanode.api.v2.Table + 477, // 316: datanode.api.v2.ListEntitiesResponse.accounts:type_name -> vega.Account + 419, // 317: datanode.api.v2.ListEntitiesResponse.orders:type_name -> vega.Order + 426, // 318: datanode.api.v2.ListEntitiesResponse.positions:type_name -> vega.Position + 478, // 319: datanode.api.v2.ListEntitiesResponse.ledger_entries:type_name -> vega.LedgerEntry + 12, // 320: datanode.api.v2.ListEntitiesResponse.balance_changes:type_name -> datanode.api.v2.AccountBalance + 434, // 321: datanode.api.v2.ListEntitiesResponse.transfers:type_name -> vega.events.v1.Transfer + 437, // 322: datanode.api.v2.ListEntitiesResponse.votes:type_name -> vega.Vote + 113, // 323: datanode.api.v2.ListEntitiesResponse.erc20_multi_sig_signer_added_bundles:type_name -> datanode.api.v2.ERC20MultiSigSignerAddedBundle + 119, // 324: datanode.api.v2.ListEntitiesResponse.erc20_multi_sig_signer_removed_bundles:type_name -> datanode.api.v2.ERC20MultiSigSignerRemovedBundle + 432, // 325: datanode.api.v2.ListEntitiesResponse.trades:type_name -> vega.Trade + 440, // 326: datanode.api.v2.ListEntitiesResponse.oracle_specs:type_name -> vega.OracleSpec + 441, // 327: datanode.api.v2.ListEntitiesResponse.oracle_data:type_name -> vega.OracleData + 442, // 328: datanode.api.v2.ListEntitiesResponse.markets:type_name -> vega.Market + 444, // 329: datanode.api.v2.ListEntitiesResponse.parties:type_name -> vega.Party + 446, // 330: datanode.api.v2.ListEntitiesResponse.margin_levels:type_name -> vega.MarginLevels + 447, // 331: datanode.api.v2.ListEntitiesResponse.rewards:type_name -> vega.Reward + 450, // 332: datanode.api.v2.ListEntitiesResponse.deposits:type_name -> vega.Deposit + 451, // 333: datanode.api.v2.ListEntitiesResponse.withdrawals:type_name -> vega.Withdrawal + 452, // 334: datanode.api.v2.ListEntitiesResponse.assets:type_name -> vega.Asset + 453, // 335: datanode.api.v2.ListEntitiesResponse.liquidity_provisions:type_name -> vega.LiquidityProvision + 479, // 336: datanode.api.v2.ListEntitiesResponse.proposals:type_name -> vega.Proposal + 458, // 337: datanode.api.v2.ListEntitiesResponse.delegations:type_name -> vega.Delegation + 238, // 338: datanode.api.v2.ListEntitiesResponse.nodes:type_name -> datanode.api.v2.NodeBasic + 462, // 339: datanode.api.v2.ListEntitiesResponse.node_signatures:type_name -> vega.commands.v1.NodeSignature + 466, // 340: datanode.api.v2.ListEntitiesResponse.network_parameters:type_name -> vega.NetworkParameter + 472, // 341: datanode.api.v2.ListEntitiesResponse.key_rotations:type_name -> vega.events.v1.KeyRotation + 473, // 342: datanode.api.v2.ListEntitiesResponse.ethereum_key_rotations:type_name -> vega.events.v1.EthereumKeyRotation + 475, // 343: datanode.api.v2.ListEntitiesResponse.protocol_upgrade_proposals:type_name -> vega.events.v1.ProtocolUpgradeEvent + 480, // 344: datanode.api.v2.GetPartyActivityStreakResponse.activity_streak:type_name -> vega.events.v1.PartyActivityStreak + 6, // 345: datanode.api.v2.ListFundingPaymentsRequest.pagination:type_name -> datanode.api.v2.Pagination + 315, // 346: datanode.api.v2.FundingPaymentEdge.node:type_name -> datanode.api.v2.FundingPayment + 317, // 347: datanode.api.v2.FundingPaymentConnection.edges:type_name -> datanode.api.v2.FundingPaymentEdge + 7, // 348: datanode.api.v2.FundingPaymentConnection.page_info:type_name -> datanode.api.v2.PageInfo + 318, // 349: datanode.api.v2.ListFundingPaymentsResponse.funding_payments:type_name -> datanode.api.v2.FundingPaymentConnection + 288, // 350: datanode.api.v2.ListFundingPeriodsRequest.date_range:type_name -> datanode.api.v2.DateRange + 6, // 351: datanode.api.v2.ListFundingPeriodsRequest.pagination:type_name -> datanode.api.v2.Pagination + 481, // 352: datanode.api.v2.FundingPeriodEdge.node:type_name -> vega.events.v1.FundingPeriod + 321, // 353: datanode.api.v2.FundingPeriodConnection.edges:type_name -> datanode.api.v2.FundingPeriodEdge + 7, // 354: datanode.api.v2.FundingPeriodConnection.page_info:type_name -> datanode.api.v2.PageInfo + 322, // 355: datanode.api.v2.ListFundingPeriodsResponse.funding_periods:type_name -> datanode.api.v2.FundingPeriodConnection + 288, // 356: datanode.api.v2.ListFundingPeriodDataPointsRequest.date_range:type_name -> datanode.api.v2.DateRange + 482, // 357: datanode.api.v2.ListFundingPeriodDataPointsRequest.source:type_name -> vega.events.v1.FundingPeriodDataPoint.Source + 6, // 358: datanode.api.v2.ListFundingPeriodDataPointsRequest.pagination:type_name -> datanode.api.v2.Pagination + 483, // 359: datanode.api.v2.FundingPeriodDataPointEdge.node:type_name -> vega.events.v1.FundingPeriodDataPoint + 325, // 360: datanode.api.v2.FundingPeriodDataPointConnection.edges:type_name -> datanode.api.v2.FundingPeriodDataPointEdge + 7, // 361: datanode.api.v2.FundingPeriodDataPointConnection.page_info:type_name -> datanode.api.v2.PageInfo + 326, // 362: datanode.api.v2.ListFundingPeriodDataPointsResponse.funding_period_data_points:type_name -> datanode.api.v2.FundingPeriodDataPointConnection + 465, // 363: datanode.api.v2.OrderInfo.side:type_name -> vega.Side + 330, // 364: datanode.api.v2.EstimatePositionRequest.orders:type_name -> datanode.api.v2.OrderInfo + 484, // 365: datanode.api.v2.EstimatePositionRequest.margin_mode:type_name -> vega.MarginMode + 334, // 366: datanode.api.v2.EstimatePositionResponse.margin:type_name -> datanode.api.v2.MarginEstimate + 333, // 367: datanode.api.v2.EstimatePositionResponse.collateral_increase_estimate:type_name -> datanode.api.v2.CollateralIncreaseEstimate + 335, // 368: datanode.api.v2.EstimatePositionResponse.liquidation:type_name -> datanode.api.v2.LiquidationEstimate + 446, // 369: datanode.api.v2.MarginEstimate.worst_case:type_name -> vega.MarginLevels + 446, // 370: datanode.api.v2.MarginEstimate.best_case:type_name -> vega.MarginLevels + 336, // 371: datanode.api.v2.LiquidationEstimate.worst_case:type_name -> datanode.api.v2.LiquidationPrice + 336, // 372: datanode.api.v2.LiquidationEstimate.best_case:type_name -> datanode.api.v2.LiquidationPrice + 339, // 373: datanode.api.v2.GetCurrentReferralProgramResponse.current_referral_program:type_name -> datanode.api.v2.ReferralProgram + 485, // 374: datanode.api.v2.ReferralProgram.benefit_tiers:type_name -> vega.BenefitTier + 486, // 375: datanode.api.v2.ReferralProgram.staking_tiers:type_name -> vega.StakingTier + 340, // 376: datanode.api.v2.ReferralSetEdge.node:type_name -> datanode.api.v2.ReferralSet + 341, // 377: datanode.api.v2.ReferralSetConnection.edges:type_name -> datanode.api.v2.ReferralSetEdge + 7, // 378: datanode.api.v2.ReferralSetConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 379: datanode.api.v2.ListReferralSetsRequest.pagination:type_name -> datanode.api.v2.Pagination + 342, // 380: datanode.api.v2.ListReferralSetsResponse.referral_sets:type_name -> datanode.api.v2.ReferralSetConnection + 345, // 381: datanode.api.v2.ReferralSetRefereeEdge.node:type_name -> datanode.api.v2.ReferralSetReferee + 346, // 382: datanode.api.v2.ReferralSetRefereeConnection.edges:type_name -> datanode.api.v2.ReferralSetRefereeEdge + 7, // 383: datanode.api.v2.ReferralSetRefereeConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 384: datanode.api.v2.ListReferralSetRefereesRequest.pagination:type_name -> datanode.api.v2.Pagination + 347, // 385: datanode.api.v2.ListReferralSetRefereesResponse.referral_set_referees:type_name -> datanode.api.v2.ReferralSetRefereeConnection + 6, // 386: datanode.api.v2.GetReferralSetStatsRequest.pagination:type_name -> datanode.api.v2.Pagination + 352, // 387: datanode.api.v2.GetReferralSetStatsResponse.stats:type_name -> datanode.api.v2.ReferralSetStatsConnection + 353, // 388: datanode.api.v2.ReferralSetStatsConnection.edges:type_name -> datanode.api.v2.ReferralSetStatsEdge + 7, // 389: datanode.api.v2.ReferralSetStatsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 354, // 390: datanode.api.v2.ReferralSetStatsEdge.node:type_name -> datanode.api.v2.ReferralSetStats + 355, // 391: datanode.api.v2.TeamEdge.node:type_name -> datanode.api.v2.Team + 356, // 392: datanode.api.v2.TeamConnection.edges:type_name -> datanode.api.v2.TeamEdge + 7, // 393: datanode.api.v2.TeamConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 394: datanode.api.v2.ListTeamsRequest.pagination:type_name -> datanode.api.v2.Pagination + 357, // 395: datanode.api.v2.ListTeamsResponse.teams:type_name -> datanode.api.v2.TeamConnection + 6, // 396: datanode.api.v2.ListTeamsStatisticsRequest.pagination:type_name -> datanode.api.v2.Pagination + 362, // 397: datanode.api.v2.ListTeamsStatisticsResponse.statistics:type_name -> datanode.api.v2.TeamsStatisticsConnection + 363, // 398: datanode.api.v2.TeamsStatisticsConnection.edges:type_name -> datanode.api.v2.TeamStatisticsEdge + 7, // 399: datanode.api.v2.TeamsStatisticsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 364, // 400: datanode.api.v2.TeamStatisticsEdge.node:type_name -> datanode.api.v2.TeamStatistics + 365, // 401: datanode.api.v2.TeamStatistics.quantum_rewards:type_name -> datanode.api.v2.QuantumRewardsPerEpoch + 366, // 402: datanode.api.v2.TeamStatistics.quantum_volumes:type_name -> datanode.api.v2.QuantumVolumesPerEpoch + 6, // 403: datanode.api.v2.ListTeamMembersStatisticsRequest.pagination:type_name -> datanode.api.v2.Pagination + 369, // 404: datanode.api.v2.ListTeamMembersStatisticsResponse.statistics:type_name -> datanode.api.v2.TeamMembersStatisticsConnection + 370, // 405: datanode.api.v2.TeamMembersStatisticsConnection.edges:type_name -> datanode.api.v2.TeamMemberStatisticsEdge + 7, // 406: datanode.api.v2.TeamMembersStatisticsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 371, // 407: datanode.api.v2.TeamMemberStatisticsEdge.node:type_name -> datanode.api.v2.TeamMemberStatistics + 365, // 408: datanode.api.v2.TeamMemberStatistics.quantum_rewards:type_name -> datanode.api.v2.QuantumRewardsPerEpoch + 366, // 409: datanode.api.v2.TeamMemberStatistics.quantum_volumes:type_name -> datanode.api.v2.QuantumVolumesPerEpoch + 6, // 410: datanode.api.v2.ListTeamRefereesRequest.pagination:type_name -> datanode.api.v2.Pagination + 373, // 411: datanode.api.v2.TeamRefereeEdge.node:type_name -> datanode.api.v2.TeamReferee + 374, // 412: datanode.api.v2.TeamRefereeConnection.edges:type_name -> datanode.api.v2.TeamRefereeEdge + 7, // 413: datanode.api.v2.TeamRefereeConnection.page_info:type_name -> datanode.api.v2.PageInfo + 375, // 414: datanode.api.v2.ListTeamRefereesResponse.team_referees:type_name -> datanode.api.v2.TeamRefereeConnection + 377, // 415: datanode.api.v2.TeamRefereeHistoryEdge.node:type_name -> datanode.api.v2.TeamRefereeHistory + 378, // 416: datanode.api.v2.TeamRefereeHistoryConnection.edges:type_name -> datanode.api.v2.TeamRefereeHistoryEdge + 7, // 417: datanode.api.v2.TeamRefereeHistoryConnection.page_info:type_name -> datanode.api.v2.PageInfo + 6, // 418: datanode.api.v2.ListTeamRefereeHistoryRequest.pagination:type_name -> datanode.api.v2.Pagination + 379, // 419: datanode.api.v2.ListTeamRefereeHistoryResponse.team_referee_history:type_name -> datanode.api.v2.TeamRefereeHistoryConnection + 487, // 420: datanode.api.v2.GetFeesStatsResponse.fees_stats:type_name -> vega.events.v1.FeesStats + 394, // 421: datanode.api.v2.GetFeesStatsForPartyResponse.fees_stats_for_party:type_name -> datanode.api.v2.FeesStatsForParty + 393, // 422: datanode.api.v2.GetCurrentVolumeDiscountProgramResponse.current_volume_discount_program:type_name -> datanode.api.v2.VolumeDiscountProgram + 6, // 423: datanode.api.v2.GetVolumeDiscountStatsRequest.pagination:type_name -> datanode.api.v2.Pagination + 390, // 424: datanode.api.v2.GetVolumeDiscountStatsResponse.stats:type_name -> datanode.api.v2.VolumeDiscountStatsConnection + 391, // 425: datanode.api.v2.VolumeDiscountStatsConnection.edges:type_name -> datanode.api.v2.VolumeDiscountStatsEdge + 7, // 426: datanode.api.v2.VolumeDiscountStatsConnection.page_info:type_name -> datanode.api.v2.PageInfo + 392, // 427: datanode.api.v2.VolumeDiscountStatsEdge.node:type_name -> datanode.api.v2.VolumeDiscountStats + 488, // 428: datanode.api.v2.VolumeDiscountProgram.benefit_tiers:type_name -> vega.VolumeBenefitTier + 489, // 429: datanode.api.v2.ObserveTransactionResultsResponse.transaction_results:type_name -> vega.events.v1.TransactionResult + 418, // 430: datanode.api.v2.EstimateTransferFeeRequest.from_account_type:type_name -> vega.AccountType + 490, // 431: datanode.api.v2.ListGamesRequest.entity_scope:type_name -> vega.EntityScope + 6, // 432: datanode.api.v2.ListGamesRequest.pagination:type_name -> datanode.api.v2.Pagination + 403, // 433: datanode.api.v2.ListGamesResponse.games:type_name -> datanode.api.v2.GamesConnection + 404, // 434: datanode.api.v2.GamesConnection.edges:type_name -> datanode.api.v2.GameEdge + 7, // 435: datanode.api.v2.GamesConnection.page_info:type_name -> datanode.api.v2.PageInfo + 405, // 436: datanode.api.v2.GameEdge.node:type_name -> datanode.api.v2.Game + 406, // 437: datanode.api.v2.Game.team:type_name -> datanode.api.v2.TeamGameEntities + 407, // 438: datanode.api.v2.Game.individual:type_name -> datanode.api.v2.IndividualGameEntities + 408, // 439: datanode.api.v2.TeamGameEntities.team:type_name -> datanode.api.v2.TeamGameEntity + 410, // 440: datanode.api.v2.IndividualGameEntities.individual:type_name -> datanode.api.v2.IndividualGameEntity + 409, // 441: datanode.api.v2.TeamGameEntity.team:type_name -> datanode.api.v2.TeamGameParticipation + 491, // 442: datanode.api.v2.TeamGameEntity.reward_metric:type_name -> vega.DispatchMetric + 410, // 443: datanode.api.v2.TeamGameParticipation.members_participating:type_name -> datanode.api.v2.IndividualGameEntity + 491, // 444: datanode.api.v2.IndividualGameEntity.reward_metric:type_name -> vega.DispatchMetric + 6, // 445: datanode.api.v2.ListPartyMarginModesRequest.pagination:type_name -> datanode.api.v2.Pagination + 413, // 446: datanode.api.v2.ListPartyMarginModesResponse.party_margin_modes:type_name -> datanode.api.v2.PartyMarginModesConnection + 414, // 447: datanode.api.v2.PartyMarginModesConnection.edges:type_name -> datanode.api.v2.PartyMarginModeEdge + 7, // 448: datanode.api.v2.PartyMarginModesConnection.page_info:type_name -> datanode.api.v2.PageInfo + 415, // 449: datanode.api.v2.PartyMarginModeEdge.node:type_name -> datanode.api.v2.PartyMarginMode + 484, // 450: datanode.api.v2.PartyMarginMode.margin_mode:type_name -> vega.MarginMode + 13, // 451: datanode.api.v2.TradingDataService.ListAccounts:input_type -> datanode.api.v2.ListAccountsRequest + 17, // 452: datanode.api.v2.TradingDataService.ObserveAccounts:input_type -> datanode.api.v2.ObserveAccountsRequest + 21, // 453: datanode.api.v2.TradingDataService.Info:input_type -> datanode.api.v2.InfoRequest + 23, // 454: datanode.api.v2.TradingDataService.GetOrder:input_type -> datanode.api.v2.GetOrderRequest + 26, // 455: datanode.api.v2.TradingDataService.ListOrders:input_type -> datanode.api.v2.ListOrdersRequest + 28, // 456: datanode.api.v2.TradingDataService.ListOrderVersions:input_type -> datanode.api.v2.ListOrderVersionsRequest + 30, // 457: datanode.api.v2.TradingDataService.ObserveOrders:input_type -> datanode.api.v2.ObserveOrdersRequest + 34, // 458: datanode.api.v2.TradingDataService.GetStopOrder:input_type -> datanode.api.v2.GetStopOrderRequest + 36, // 459: datanode.api.v2.TradingDataService.ListStopOrders:input_type -> datanode.api.v2.ListStopOrdersRequest + 41, // 460: datanode.api.v2.TradingDataService.ListPositions:input_type -> datanode.api.v2.ListPositionsRequest + 44, // 461: datanode.api.v2.TradingDataService.ListAllPositions:input_type -> datanode.api.v2.ListAllPositionsRequest + 48, // 462: datanode.api.v2.TradingDataService.ObservePositions:input_type -> datanode.api.v2.ObservePositionsRequest + 54, // 463: datanode.api.v2.TradingDataService.ListLedgerEntries:input_type -> datanode.api.v2.ListLedgerEntriesRequest + 55, // 464: datanode.api.v2.TradingDataService.ExportLedgerEntries:input_type -> datanode.api.v2.ExportLedgerEntriesRequest + 59, // 465: datanode.api.v2.TradingDataService.ListBalanceChanges:input_type -> datanode.api.v2.ListBalanceChangesRequest + 77, // 466: datanode.api.v2.TradingDataService.GetLatestMarketData:input_type -> datanode.api.v2.GetLatestMarketDataRequest + 75, // 467: datanode.api.v2.TradingDataService.ListLatestMarketData:input_type -> datanode.api.v2.ListLatestMarketDataRequest + 73, // 468: datanode.api.v2.TradingDataService.GetLatestMarketDepth:input_type -> datanode.api.v2.GetLatestMarketDepthRequest + 67, // 469: datanode.api.v2.TradingDataService.ObserveMarketsDepth:input_type -> datanode.api.v2.ObserveMarketsDepthRequest + 69, // 470: datanode.api.v2.TradingDataService.ObserveMarketsDepthUpdates:input_type -> datanode.api.v2.ObserveMarketsDepthUpdatesRequest + 71, // 471: datanode.api.v2.TradingDataService.ObserveMarketsData:input_type -> datanode.api.v2.ObserveMarketsDataRequest + 79, // 472: datanode.api.v2.TradingDataService.GetMarketDataHistoryByID:input_type -> datanode.api.v2.GetMarketDataHistoryByIDRequest + 83, // 473: datanode.api.v2.TradingDataService.ListTransfers:input_type -> datanode.api.v2.ListTransfersRequest + 88, // 474: datanode.api.v2.TradingDataService.GetTransfer:input_type -> datanode.api.v2.GetTransferRequest + 90, // 475: datanode.api.v2.TradingDataService.GetNetworkLimits:input_type -> datanode.api.v2.GetNetworkLimitsRequest + 98, // 476: datanode.api.v2.TradingDataService.ListCandleData:input_type -> datanode.api.v2.ListCandleDataRequest + 96, // 477: datanode.api.v2.TradingDataService.ObserveCandleData:input_type -> datanode.api.v2.ObserveCandleDataRequest + 92, // 478: datanode.api.v2.TradingDataService.ListCandleIntervals:input_type -> datanode.api.v2.ListCandleIntervalsRequest + 102, // 479: datanode.api.v2.TradingDataService.ListVotes:input_type -> datanode.api.v2.ListVotesRequest + 106, // 480: datanode.api.v2.TradingDataService.ObserveVotes:input_type -> datanode.api.v2.ObserveVotesRequest + 108, // 481: datanode.api.v2.TradingDataService.ListERC20MultiSigSignerAddedBundles:input_type -> datanode.api.v2.ListERC20MultiSigSignerAddedBundlesRequest + 114, // 482: datanode.api.v2.TradingDataService.ListERC20MultiSigSignerRemovedBundles:input_type -> datanode.api.v2.ListERC20MultiSigSignerRemovedBundlesRequest + 120, // 483: datanode.api.v2.TradingDataService.GetERC20ListAssetBundle:input_type -> datanode.api.v2.GetERC20ListAssetBundleRequest + 122, // 484: datanode.api.v2.TradingDataService.GetERC20SetAssetLimitsBundle:input_type -> datanode.api.v2.GetERC20SetAssetLimitsBundleRequest + 124, // 485: datanode.api.v2.TradingDataService.GetERC20WithdrawalApproval:input_type -> datanode.api.v2.GetERC20WithdrawalApprovalRequest + 126, // 486: datanode.api.v2.TradingDataService.GetLastTrade:input_type -> datanode.api.v2.GetLastTradeRequest + 128, // 487: datanode.api.v2.TradingDataService.ListTrades:input_type -> datanode.api.v2.ListTradesRequest + 132, // 488: datanode.api.v2.TradingDataService.ObserveTrades:input_type -> datanode.api.v2.ObserveTradesRequest + 134, // 489: datanode.api.v2.TradingDataService.GetOracleSpec:input_type -> datanode.api.v2.GetOracleSpecRequest + 136, // 490: datanode.api.v2.TradingDataService.ListOracleSpecs:input_type -> datanode.api.v2.ListOracleSpecsRequest + 138, // 491: datanode.api.v2.TradingDataService.ListOracleData:input_type -> datanode.api.v2.ListOracleDataRequest + 144, // 492: datanode.api.v2.TradingDataService.GetMarket:input_type -> datanode.api.v2.GetMarketRequest + 146, // 493: datanode.api.v2.TradingDataService.ListMarkets:input_type -> datanode.api.v2.ListMarketsRequest + 150, // 494: datanode.api.v2.TradingDataService.ListSuccessorMarkets:input_type -> datanode.api.v2.ListSuccessorMarketsRequest + 155, // 495: datanode.api.v2.TradingDataService.GetParty:input_type -> datanode.api.v2.GetPartyRequest + 157, // 496: datanode.api.v2.TradingDataService.ListParties:input_type -> datanode.api.v2.ListPartiesRequest + 161, // 497: datanode.api.v2.TradingDataService.ListPartiesProfiles:input_type -> datanode.api.v2.ListPartiesProfilesRequest + 166, // 498: datanode.api.v2.TradingDataService.ListMarginLevels:input_type -> datanode.api.v2.ListMarginLevelsRequest + 168, // 499: datanode.api.v2.TradingDataService.ObserveMarginLevels:input_type -> datanode.api.v2.ObserveMarginLevelsRequest + 173, // 500: datanode.api.v2.TradingDataService.ListRewards:input_type -> datanode.api.v2.ListRewardsRequest + 177, // 501: datanode.api.v2.TradingDataService.ListRewardSummaries:input_type -> datanode.api.v2.ListRewardSummariesRequest + 180, // 502: datanode.api.v2.TradingDataService.ListEpochRewardSummaries:input_type -> datanode.api.v2.ListEpochRewardSummariesRequest + 186, // 503: datanode.api.v2.TradingDataService.GetDeposit:input_type -> datanode.api.v2.GetDepositRequest + 188, // 504: datanode.api.v2.TradingDataService.ListDeposits:input_type -> datanode.api.v2.ListDepositsRequest + 192, // 505: datanode.api.v2.TradingDataService.GetWithdrawal:input_type -> datanode.api.v2.GetWithdrawalRequest + 194, // 506: datanode.api.v2.TradingDataService.ListWithdrawals:input_type -> datanode.api.v2.ListWithdrawalsRequest + 198, // 507: datanode.api.v2.TradingDataService.GetAsset:input_type -> datanode.api.v2.GetAssetRequest + 200, // 508: datanode.api.v2.TradingDataService.ListAssets:input_type -> datanode.api.v2.ListAssetsRequest + 204, // 509: datanode.api.v2.TradingDataService.ListLiquidityProvisions:input_type -> datanode.api.v2.ListLiquidityProvisionsRequest + 205, // 510: datanode.api.v2.TradingDataService.ListAllLiquidityProvisions:input_type -> datanode.api.v2.ListAllLiquidityProvisionsRequest + 213, // 511: datanode.api.v2.TradingDataService.ObserveLiquidityProvisions:input_type -> datanode.api.v2.ObserveLiquidityProvisionsRequest + 215, // 512: datanode.api.v2.TradingDataService.ListLiquidityProviders:input_type -> datanode.api.v2.ListLiquidityProvidersRequest + 220, // 513: datanode.api.v2.TradingDataService.ListPaidLiquidityFees:input_type -> datanode.api.v2.ListPaidLiquidityFeesRequest + 224, // 514: datanode.api.v2.TradingDataService.GetGovernanceData:input_type -> datanode.api.v2.GetGovernanceDataRequest + 226, // 515: datanode.api.v2.TradingDataService.ListGovernanceData:input_type -> datanode.api.v2.ListGovernanceDataRequest + 230, // 516: datanode.api.v2.TradingDataService.ObserveGovernance:input_type -> datanode.api.v2.ObserveGovernanceRequest + 232, // 517: datanode.api.v2.TradingDataService.ListDelegations:input_type -> datanode.api.v2.ListDelegationsRequest + 239, // 518: datanode.api.v2.TradingDataService.GetNetworkData:input_type -> datanode.api.v2.GetNetworkDataRequest + 241, // 519: datanode.api.v2.TradingDataService.GetNode:input_type -> datanode.api.v2.GetNodeRequest + 243, // 520: datanode.api.v2.TradingDataService.ListNodes:input_type -> datanode.api.v2.ListNodesRequest + 247, // 521: datanode.api.v2.TradingDataService.ListNodeSignatures:input_type -> datanode.api.v2.ListNodeSignaturesRequest + 251, // 522: datanode.api.v2.TradingDataService.GetEpoch:input_type -> datanode.api.v2.GetEpochRequest + 253, // 523: datanode.api.v2.TradingDataService.EstimateFee:input_type -> datanode.api.v2.EstimateFeeRequest + 255, // 524: datanode.api.v2.TradingDataService.EstimateMargin:input_type -> datanode.api.v2.EstimateMarginRequest + 331, // 525: datanode.api.v2.TradingDataService.EstimatePosition:input_type -> datanode.api.v2.EstimatePositionRequest + 257, // 526: datanode.api.v2.TradingDataService.ListNetworkParameters:input_type -> datanode.api.v2.ListNetworkParametersRequest + 259, // 527: datanode.api.v2.TradingDataService.GetNetworkParameter:input_type -> datanode.api.v2.GetNetworkParameterRequest + 264, // 528: datanode.api.v2.TradingDataService.ListCheckpoints:input_type -> datanode.api.v2.ListCheckpointsRequest + 268, // 529: datanode.api.v2.TradingDataService.GetStake:input_type -> datanode.api.v2.GetStakeRequest + 272, // 530: datanode.api.v2.TradingDataService.GetRiskFactors:input_type -> datanode.api.v2.GetRiskFactorsRequest + 274, // 531: datanode.api.v2.TradingDataService.ObserveEventBus:input_type -> datanode.api.v2.ObserveEventBusRequest + 276, // 532: datanode.api.v2.TradingDataService.ObserveLedgerMovements:input_type -> datanode.api.v2.ObserveLedgerMovementsRequest + 278, // 533: datanode.api.v2.TradingDataService.ListKeyRotations:input_type -> datanode.api.v2.ListKeyRotationsRequest + 282, // 534: datanode.api.v2.TradingDataService.ListEthereumKeyRotations:input_type -> datanode.api.v2.ListEthereumKeyRotationsRequest + 286, // 535: datanode.api.v2.TradingDataService.GetVegaTime:input_type -> datanode.api.v2.GetVegaTimeRequest + 289, // 536: datanode.api.v2.TradingDataService.GetProtocolUpgradeStatus:input_type -> datanode.api.v2.GetProtocolUpgradeStatusRequest + 291, // 537: datanode.api.v2.TradingDataService.ListProtocolUpgradeProposals:input_type -> datanode.api.v2.ListProtocolUpgradeProposalsRequest + 295, // 538: datanode.api.v2.TradingDataService.ListCoreSnapshots:input_type -> datanode.api.v2.ListCoreSnapshotsRequest + 300, // 539: datanode.api.v2.TradingDataService.GetMostRecentNetworkHistorySegment:input_type -> datanode.api.v2.GetMostRecentNetworkHistorySegmentRequest + 302, // 540: datanode.api.v2.TradingDataService.ListAllNetworkHistorySegments:input_type -> datanode.api.v2.ListAllNetworkHistorySegmentsRequest + 304, // 541: datanode.api.v2.TradingDataService.GetActiveNetworkHistoryPeerAddresses:input_type -> datanode.api.v2.GetActiveNetworkHistoryPeerAddressesRequest + 306, // 542: datanode.api.v2.TradingDataService.GetNetworkHistoryStatus:input_type -> datanode.api.v2.GetNetworkHistoryStatusRequest + 308, // 543: datanode.api.v2.TradingDataService.GetNetworkHistoryBootstrapPeers:input_type -> datanode.api.v2.GetNetworkHistoryBootstrapPeersRequest + 311, // 544: datanode.api.v2.TradingDataService.ListEntities:input_type -> datanode.api.v2.ListEntitiesRequest + 320, // 545: datanode.api.v2.TradingDataService.ListFundingPeriods:input_type -> datanode.api.v2.ListFundingPeriodsRequest + 324, // 546: datanode.api.v2.TradingDataService.ListFundingPeriodDataPoints:input_type -> datanode.api.v2.ListFundingPeriodDataPointsRequest + 316, // 547: datanode.api.v2.TradingDataService.ListFundingPayments:input_type -> datanode.api.v2.ListFundingPaymentsRequest + 313, // 548: datanode.api.v2.TradingDataService.GetPartyActivityStreak:input_type -> datanode.api.v2.GetPartyActivityStreakRequest + 337, // 549: datanode.api.v2.TradingDataService.GetCurrentReferralProgram:input_type -> datanode.api.v2.GetCurrentReferralProgramRequest + 343, // 550: datanode.api.v2.TradingDataService.ListReferralSets:input_type -> datanode.api.v2.ListReferralSetsRequest + 348, // 551: datanode.api.v2.TradingDataService.ListReferralSetReferees:input_type -> datanode.api.v2.ListReferralSetRefereesRequest + 350, // 552: datanode.api.v2.TradingDataService.GetReferralSetStats:input_type -> datanode.api.v2.GetReferralSetStatsRequest + 358, // 553: datanode.api.v2.TradingDataService.ListTeams:input_type -> datanode.api.v2.ListTeamsRequest + 360, // 554: datanode.api.v2.TradingDataService.ListTeamsStatistics:input_type -> datanode.api.v2.ListTeamsStatisticsRequest + 367, // 555: datanode.api.v2.TradingDataService.ListTeamMembersStatistics:input_type -> datanode.api.v2.ListTeamMembersStatisticsRequest + 372, // 556: datanode.api.v2.TradingDataService.ListTeamReferees:input_type -> datanode.api.v2.ListTeamRefereesRequest + 380, // 557: datanode.api.v2.TradingDataService.ListTeamRefereeHistory:input_type -> datanode.api.v2.ListTeamRefereeHistoryRequest + 382, // 558: datanode.api.v2.TradingDataService.GetFeesStats:input_type -> datanode.api.v2.GetFeesStatsRequest + 384, // 559: datanode.api.v2.TradingDataService.GetFeesStatsForParty:input_type -> datanode.api.v2.GetFeesStatsForPartyRequest + 386, // 560: datanode.api.v2.TradingDataService.GetCurrentVolumeDiscountProgram:input_type -> datanode.api.v2.GetCurrentVolumeDiscountProgramRequest + 388, // 561: datanode.api.v2.TradingDataService.GetVolumeDiscountStats:input_type -> datanode.api.v2.GetVolumeDiscountStatsRequest + 10, // 562: datanode.api.v2.TradingDataService.GetVestingBalancesSummary:input_type -> datanode.api.v2.GetVestingBalancesSummaryRequest + 8, // 563: datanode.api.v2.TradingDataService.GetPartyVestingStats:input_type -> datanode.api.v2.GetPartyVestingStatsRequest + 395, // 564: datanode.api.v2.TradingDataService.ObserveTransactionResults:input_type -> datanode.api.v2.ObserveTransactionResultsRequest + 397, // 565: datanode.api.v2.TradingDataService.EstimateTransferFee:input_type -> datanode.api.v2.EstimateTransferFeeRequest + 399, // 566: datanode.api.v2.TradingDataService.GetTotalTransferFeeDiscount:input_type -> datanode.api.v2.GetTotalTransferFeeDiscountRequest + 401, // 567: datanode.api.v2.TradingDataService.ListGames:input_type -> datanode.api.v2.ListGamesRequest + 411, // 568: datanode.api.v2.TradingDataService.ListPartyMarginModes:input_type -> datanode.api.v2.ListPartyMarginModesRequest + 310, // 569: datanode.api.v2.TradingDataService.ExportNetworkHistory:input_type -> datanode.api.v2.ExportNetworkHistoryRequest + 328, // 570: datanode.api.v2.TradingDataService.Ping:input_type -> datanode.api.v2.PingRequest + 14, // 571: datanode.api.v2.TradingDataService.ListAccounts:output_type -> datanode.api.v2.ListAccountsResponse + 18, // 572: datanode.api.v2.TradingDataService.ObserveAccounts:output_type -> datanode.api.v2.ObserveAccountsResponse + 22, // 573: datanode.api.v2.TradingDataService.Info:output_type -> datanode.api.v2.InfoResponse + 24, // 574: datanode.api.v2.TradingDataService.GetOrder:output_type -> datanode.api.v2.GetOrderResponse + 27, // 575: datanode.api.v2.TradingDataService.ListOrders:output_type -> datanode.api.v2.ListOrdersResponse + 29, // 576: datanode.api.v2.TradingDataService.ListOrderVersions:output_type -> datanode.api.v2.ListOrderVersionsResponse + 31, // 577: datanode.api.v2.TradingDataService.ObserveOrders:output_type -> datanode.api.v2.ObserveOrdersResponse + 35, // 578: datanode.api.v2.TradingDataService.GetStopOrder:output_type -> datanode.api.v2.GetStopOrderResponse + 40, // 579: datanode.api.v2.TradingDataService.ListStopOrders:output_type -> datanode.api.v2.ListStopOrdersResponse + 42, // 580: datanode.api.v2.TradingDataService.ListPositions:output_type -> datanode.api.v2.ListPositionsResponse + 45, // 581: datanode.api.v2.TradingDataService.ListAllPositions:output_type -> datanode.api.v2.ListAllPositionsResponse + 49, // 582: datanode.api.v2.TradingDataService.ObservePositions:output_type -> datanode.api.v2.ObservePositionsResponse + 56, // 583: datanode.api.v2.TradingDataService.ListLedgerEntries:output_type -> datanode.api.v2.ListLedgerEntriesResponse + 492, // 584: datanode.api.v2.TradingDataService.ExportLedgerEntries:output_type -> google.api.HttpBody + 60, // 585: datanode.api.v2.TradingDataService.ListBalanceChanges:output_type -> datanode.api.v2.ListBalanceChangesResponse + 78, // 586: datanode.api.v2.TradingDataService.GetLatestMarketData:output_type -> datanode.api.v2.GetLatestMarketDataResponse + 76, // 587: datanode.api.v2.TradingDataService.ListLatestMarketData:output_type -> datanode.api.v2.ListLatestMarketDataResponse + 74, // 588: datanode.api.v2.TradingDataService.GetLatestMarketDepth:output_type -> datanode.api.v2.GetLatestMarketDepthResponse + 68, // 589: datanode.api.v2.TradingDataService.ObserveMarketsDepth:output_type -> datanode.api.v2.ObserveMarketsDepthResponse + 70, // 590: datanode.api.v2.TradingDataService.ObserveMarketsDepthUpdates:output_type -> datanode.api.v2.ObserveMarketsDepthUpdatesResponse + 72, // 591: datanode.api.v2.TradingDataService.ObserveMarketsData:output_type -> datanode.api.v2.ObserveMarketsDataResponse + 80, // 592: datanode.api.v2.TradingDataService.GetMarketDataHistoryByID:output_type -> datanode.api.v2.GetMarketDataHistoryByIDResponse + 84, // 593: datanode.api.v2.TradingDataService.ListTransfers:output_type -> datanode.api.v2.ListTransfersResponse + 89, // 594: datanode.api.v2.TradingDataService.GetTransfer:output_type -> datanode.api.v2.GetTransferResponse + 91, // 595: datanode.api.v2.TradingDataService.GetNetworkLimits:output_type -> datanode.api.v2.GetNetworkLimitsResponse + 99, // 596: datanode.api.v2.TradingDataService.ListCandleData:output_type -> datanode.api.v2.ListCandleDataResponse + 97, // 597: datanode.api.v2.TradingDataService.ObserveCandleData:output_type -> datanode.api.v2.ObserveCandleDataResponse + 94, // 598: datanode.api.v2.TradingDataService.ListCandleIntervals:output_type -> datanode.api.v2.ListCandleIntervalsResponse + 103, // 599: datanode.api.v2.TradingDataService.ListVotes:output_type -> datanode.api.v2.ListVotesResponse + 107, // 600: datanode.api.v2.TradingDataService.ObserveVotes:output_type -> datanode.api.v2.ObserveVotesResponse + 109, // 601: datanode.api.v2.TradingDataService.ListERC20MultiSigSignerAddedBundles:output_type -> datanode.api.v2.ListERC20MultiSigSignerAddedBundlesResponse + 115, // 602: datanode.api.v2.TradingDataService.ListERC20MultiSigSignerRemovedBundles:output_type -> datanode.api.v2.ListERC20MultiSigSignerRemovedBundlesResponse + 121, // 603: datanode.api.v2.TradingDataService.GetERC20ListAssetBundle:output_type -> datanode.api.v2.GetERC20ListAssetBundleResponse + 123, // 604: datanode.api.v2.TradingDataService.GetERC20SetAssetLimitsBundle:output_type -> datanode.api.v2.GetERC20SetAssetLimitsBundleResponse + 125, // 605: datanode.api.v2.TradingDataService.GetERC20WithdrawalApproval:output_type -> datanode.api.v2.GetERC20WithdrawalApprovalResponse + 127, // 606: datanode.api.v2.TradingDataService.GetLastTrade:output_type -> datanode.api.v2.GetLastTradeResponse + 129, // 607: datanode.api.v2.TradingDataService.ListTrades:output_type -> datanode.api.v2.ListTradesResponse + 133, // 608: datanode.api.v2.TradingDataService.ObserveTrades:output_type -> datanode.api.v2.ObserveTradesResponse + 135, // 609: datanode.api.v2.TradingDataService.GetOracleSpec:output_type -> datanode.api.v2.GetOracleSpecResponse + 137, // 610: datanode.api.v2.TradingDataService.ListOracleSpecs:output_type -> datanode.api.v2.ListOracleSpecsResponse + 139, // 611: datanode.api.v2.TradingDataService.ListOracleData:output_type -> datanode.api.v2.ListOracleDataResponse + 145, // 612: datanode.api.v2.TradingDataService.GetMarket:output_type -> datanode.api.v2.GetMarketResponse + 147, // 613: datanode.api.v2.TradingDataService.ListMarkets:output_type -> datanode.api.v2.ListMarketsResponse + 154, // 614: datanode.api.v2.TradingDataService.ListSuccessorMarkets:output_type -> datanode.api.v2.ListSuccessorMarketsResponse + 156, // 615: datanode.api.v2.TradingDataService.GetParty:output_type -> datanode.api.v2.GetPartyResponse + 158, // 616: datanode.api.v2.TradingDataService.ListParties:output_type -> datanode.api.v2.ListPartiesResponse + 162, // 617: datanode.api.v2.TradingDataService.ListPartiesProfiles:output_type -> datanode.api.v2.ListPartiesProfilesResponse + 167, // 618: datanode.api.v2.TradingDataService.ListMarginLevels:output_type -> datanode.api.v2.ListMarginLevelsResponse + 169, // 619: datanode.api.v2.TradingDataService.ObserveMarginLevels:output_type -> datanode.api.v2.ObserveMarginLevelsResponse + 174, // 620: datanode.api.v2.TradingDataService.ListRewards:output_type -> datanode.api.v2.ListRewardsResponse + 178, // 621: datanode.api.v2.TradingDataService.ListRewardSummaries:output_type -> datanode.api.v2.ListRewardSummariesResponse + 181, // 622: datanode.api.v2.TradingDataService.ListEpochRewardSummaries:output_type -> datanode.api.v2.ListEpochRewardSummariesResponse + 187, // 623: datanode.api.v2.TradingDataService.GetDeposit:output_type -> datanode.api.v2.GetDepositResponse + 189, // 624: datanode.api.v2.TradingDataService.ListDeposits:output_type -> datanode.api.v2.ListDepositsResponse + 193, // 625: datanode.api.v2.TradingDataService.GetWithdrawal:output_type -> datanode.api.v2.GetWithdrawalResponse + 195, // 626: datanode.api.v2.TradingDataService.ListWithdrawals:output_type -> datanode.api.v2.ListWithdrawalsResponse + 199, // 627: datanode.api.v2.TradingDataService.GetAsset:output_type -> datanode.api.v2.GetAssetResponse + 201, // 628: datanode.api.v2.TradingDataService.ListAssets:output_type -> datanode.api.v2.ListAssetsResponse + 206, // 629: datanode.api.v2.TradingDataService.ListLiquidityProvisions:output_type -> datanode.api.v2.ListLiquidityProvisionsResponse + 207, // 630: datanode.api.v2.TradingDataService.ListAllLiquidityProvisions:output_type -> datanode.api.v2.ListAllLiquidityProvisionsResponse + 214, // 631: datanode.api.v2.TradingDataService.ObserveLiquidityProvisions:output_type -> datanode.api.v2.ObserveLiquidityProvisionsResponse + 219, // 632: datanode.api.v2.TradingDataService.ListLiquidityProviders:output_type -> datanode.api.v2.ListLiquidityProvidersResponse + 221, // 633: datanode.api.v2.TradingDataService.ListPaidLiquidityFees:output_type -> datanode.api.v2.ListPaidLiquidityFeesResponse + 225, // 634: datanode.api.v2.TradingDataService.GetGovernanceData:output_type -> datanode.api.v2.GetGovernanceDataResponse + 227, // 635: datanode.api.v2.TradingDataService.ListGovernanceData:output_type -> datanode.api.v2.ListGovernanceDataResponse + 231, // 636: datanode.api.v2.TradingDataService.ObserveGovernance:output_type -> datanode.api.v2.ObserveGovernanceResponse + 233, // 637: datanode.api.v2.TradingDataService.ListDelegations:output_type -> datanode.api.v2.ListDelegationsResponse + 240, // 638: datanode.api.v2.TradingDataService.GetNetworkData:output_type -> datanode.api.v2.GetNetworkDataResponse + 242, // 639: datanode.api.v2.TradingDataService.GetNode:output_type -> datanode.api.v2.GetNodeResponse + 244, // 640: datanode.api.v2.TradingDataService.ListNodes:output_type -> datanode.api.v2.ListNodesResponse + 248, // 641: datanode.api.v2.TradingDataService.ListNodeSignatures:output_type -> datanode.api.v2.ListNodeSignaturesResponse + 252, // 642: datanode.api.v2.TradingDataService.GetEpoch:output_type -> datanode.api.v2.GetEpochResponse + 254, // 643: datanode.api.v2.TradingDataService.EstimateFee:output_type -> datanode.api.v2.EstimateFeeResponse + 256, // 644: datanode.api.v2.TradingDataService.EstimateMargin:output_type -> datanode.api.v2.EstimateMarginResponse + 332, // 645: datanode.api.v2.TradingDataService.EstimatePosition:output_type -> datanode.api.v2.EstimatePositionResponse + 258, // 646: datanode.api.v2.TradingDataService.ListNetworkParameters:output_type -> datanode.api.v2.ListNetworkParametersResponse + 260, // 647: datanode.api.v2.TradingDataService.GetNetworkParameter:output_type -> datanode.api.v2.GetNetworkParameterResponse + 265, // 648: datanode.api.v2.TradingDataService.ListCheckpoints:output_type -> datanode.api.v2.ListCheckpointsResponse + 269, // 649: datanode.api.v2.TradingDataService.GetStake:output_type -> datanode.api.v2.GetStakeResponse + 273, // 650: datanode.api.v2.TradingDataService.GetRiskFactors:output_type -> datanode.api.v2.GetRiskFactorsResponse + 275, // 651: datanode.api.v2.TradingDataService.ObserveEventBus:output_type -> datanode.api.v2.ObserveEventBusResponse + 277, // 652: datanode.api.v2.TradingDataService.ObserveLedgerMovements:output_type -> datanode.api.v2.ObserveLedgerMovementsResponse + 279, // 653: datanode.api.v2.TradingDataService.ListKeyRotations:output_type -> datanode.api.v2.ListKeyRotationsResponse + 283, // 654: datanode.api.v2.TradingDataService.ListEthereumKeyRotations:output_type -> datanode.api.v2.ListEthereumKeyRotationsResponse + 287, // 655: datanode.api.v2.TradingDataService.GetVegaTime:output_type -> datanode.api.v2.GetVegaTimeResponse + 290, // 656: datanode.api.v2.TradingDataService.GetProtocolUpgradeStatus:output_type -> datanode.api.v2.GetProtocolUpgradeStatusResponse + 292, // 657: datanode.api.v2.TradingDataService.ListProtocolUpgradeProposals:output_type -> datanode.api.v2.ListProtocolUpgradeProposalsResponse + 296, // 658: datanode.api.v2.TradingDataService.ListCoreSnapshots:output_type -> datanode.api.v2.ListCoreSnapshotsResponse + 301, // 659: datanode.api.v2.TradingDataService.GetMostRecentNetworkHistorySegment:output_type -> datanode.api.v2.GetMostRecentNetworkHistorySegmentResponse + 303, // 660: datanode.api.v2.TradingDataService.ListAllNetworkHistorySegments:output_type -> datanode.api.v2.ListAllNetworkHistorySegmentsResponse + 305, // 661: datanode.api.v2.TradingDataService.GetActiveNetworkHistoryPeerAddresses:output_type -> datanode.api.v2.GetActiveNetworkHistoryPeerAddressesResponse + 307, // 662: datanode.api.v2.TradingDataService.GetNetworkHistoryStatus:output_type -> datanode.api.v2.GetNetworkHistoryStatusResponse + 309, // 663: datanode.api.v2.TradingDataService.GetNetworkHistoryBootstrapPeers:output_type -> datanode.api.v2.GetNetworkHistoryBootstrapPeersResponse + 312, // 664: datanode.api.v2.TradingDataService.ListEntities:output_type -> datanode.api.v2.ListEntitiesResponse + 323, // 665: datanode.api.v2.TradingDataService.ListFundingPeriods:output_type -> datanode.api.v2.ListFundingPeriodsResponse + 327, // 666: datanode.api.v2.TradingDataService.ListFundingPeriodDataPoints:output_type -> datanode.api.v2.ListFundingPeriodDataPointsResponse + 319, // 667: datanode.api.v2.TradingDataService.ListFundingPayments:output_type -> datanode.api.v2.ListFundingPaymentsResponse + 314, // 668: datanode.api.v2.TradingDataService.GetPartyActivityStreak:output_type -> datanode.api.v2.GetPartyActivityStreakResponse + 338, // 669: datanode.api.v2.TradingDataService.GetCurrentReferralProgram:output_type -> datanode.api.v2.GetCurrentReferralProgramResponse + 344, // 670: datanode.api.v2.TradingDataService.ListReferralSets:output_type -> datanode.api.v2.ListReferralSetsResponse + 349, // 671: datanode.api.v2.TradingDataService.ListReferralSetReferees:output_type -> datanode.api.v2.ListReferralSetRefereesResponse + 351, // 672: datanode.api.v2.TradingDataService.GetReferralSetStats:output_type -> datanode.api.v2.GetReferralSetStatsResponse + 359, // 673: datanode.api.v2.TradingDataService.ListTeams:output_type -> datanode.api.v2.ListTeamsResponse + 361, // 674: datanode.api.v2.TradingDataService.ListTeamsStatistics:output_type -> datanode.api.v2.ListTeamsStatisticsResponse + 368, // 675: datanode.api.v2.TradingDataService.ListTeamMembersStatistics:output_type -> datanode.api.v2.ListTeamMembersStatisticsResponse + 376, // 676: datanode.api.v2.TradingDataService.ListTeamReferees:output_type -> datanode.api.v2.ListTeamRefereesResponse + 381, // 677: datanode.api.v2.TradingDataService.ListTeamRefereeHistory:output_type -> datanode.api.v2.ListTeamRefereeHistoryResponse + 383, // 678: datanode.api.v2.TradingDataService.GetFeesStats:output_type -> datanode.api.v2.GetFeesStatsResponse + 385, // 679: datanode.api.v2.TradingDataService.GetFeesStatsForParty:output_type -> datanode.api.v2.GetFeesStatsForPartyResponse + 387, // 680: datanode.api.v2.TradingDataService.GetCurrentVolumeDiscountProgram:output_type -> datanode.api.v2.GetCurrentVolumeDiscountProgramResponse + 389, // 681: datanode.api.v2.TradingDataService.GetVolumeDiscountStats:output_type -> datanode.api.v2.GetVolumeDiscountStatsResponse + 11, // 682: datanode.api.v2.TradingDataService.GetVestingBalancesSummary:output_type -> datanode.api.v2.GetVestingBalancesSummaryResponse + 9, // 683: datanode.api.v2.TradingDataService.GetPartyVestingStats:output_type -> datanode.api.v2.GetPartyVestingStatsResponse + 396, // 684: datanode.api.v2.TradingDataService.ObserveTransactionResults:output_type -> datanode.api.v2.ObserveTransactionResultsResponse + 398, // 685: datanode.api.v2.TradingDataService.EstimateTransferFee:output_type -> datanode.api.v2.EstimateTransferFeeResponse + 400, // 686: datanode.api.v2.TradingDataService.GetTotalTransferFeeDiscount:output_type -> datanode.api.v2.GetTotalTransferFeeDiscountResponse + 402, // 687: datanode.api.v2.TradingDataService.ListGames:output_type -> datanode.api.v2.ListGamesResponse + 412, // 688: datanode.api.v2.TradingDataService.ListPartyMarginModes:output_type -> datanode.api.v2.ListPartyMarginModesResponse + 492, // 689: datanode.api.v2.TradingDataService.ExportNetworkHistory:output_type -> google.api.HttpBody + 329, // 690: datanode.api.v2.TradingDataService.Ping:output_type -> datanode.api.v2.PingResponse + 571, // [571:691] is the sub-list for method output_type + 451, // [451:571] is the sub-list for method input_type + 451, // [451:451] is the sub-list for extension type_name + 451, // [451:451] is the sub-list for extension extendee + 0, // [0:451] is the sub-list for field type_name } func init() { file_data_node_api_v2_trading_data_proto_init() } @@ -27985,8 +31365,344 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PageInfo); i { + file_data_node_api_v2_trading_data_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PageInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPartyVestingStatsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPartyVestingStatsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVestingBalancesSummaryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVestingBalancesSummaryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountBalance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAccountsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAccountsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountsConnection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountEdge); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveAccountsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveAccountsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountSnapshotPage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountUpdates); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOrderRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOrderResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOrdersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOrdersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOrderVersionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOrderVersionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveOrdersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveOrdersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderSnapshotPage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderUpdates); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStopOrderRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStopOrderResponse); i { case 0: return &v.state case 1: @@ -27997,8 +31713,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPartyVestingStatsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListStopOrdersRequest); i { case 0: return &v.state case 1: @@ -28009,8 +31725,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPartyVestingStatsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopOrderFilter); i { case 0: return &v.state case 1: @@ -28021,8 +31737,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVestingBalancesSummaryRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopOrderEdge); i { case 0: return &v.state case 1: @@ -28033,8 +31749,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVestingBalancesSummaryResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopOrderConnection); i { case 0: return &v.state case 1: @@ -28045,8 +31761,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountBalance); i { + file_data_node_api_v2_trading_data_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListStopOrdersResponse); i { case 0: return &v.state case 1: @@ -28057,8 +31773,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAccountsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPositionsRequest); i { case 0: return &v.state case 1: @@ -28069,8 +31785,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAccountsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPositionsResponse); i { case 0: return &v.state case 1: @@ -28081,8 +31797,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountsConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PositionsFilter); i { case 0: return &v.state case 1: @@ -28093,8 +31809,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAllPositionsRequest); i { case 0: return &v.state case 1: @@ -28105,8 +31821,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveAccountsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAllPositionsResponse); i { case 0: return &v.state case 1: @@ -28117,8 +31833,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveAccountsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PositionEdge); i { case 0: return &v.state case 1: @@ -28129,8 +31845,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountSnapshotPage); i { + file_data_node_api_v2_trading_data_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PositionConnection); i { case 0: return &v.state case 1: @@ -28141,8 +31857,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountUpdates); i { + file_data_node_api_v2_trading_data_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObservePositionsRequest); i { case 0: return &v.state case 1: @@ -28153,8 +31869,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InfoRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObservePositionsResponse); i { case 0: return &v.state case 1: @@ -28165,8 +31881,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InfoResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PositionSnapshotPage); i { case 0: return &v.state case 1: @@ -28177,8 +31893,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrderRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PositionUpdates); i { case 0: return &v.state case 1: @@ -28189,8 +31905,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrderResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LedgerEntryFilter); i { case 0: return &v.state case 1: @@ -28201,8 +31917,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderFilter); i { + file_data_node_api_v2_trading_data_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AggregatedLedgerEntry); i { case 0: return &v.state case 1: @@ -28213,8 +31929,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListOrdersRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListLedgerEntriesRequest); i { case 0: return &v.state case 1: @@ -28225,8 +31941,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListOrdersResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportLedgerEntriesRequest); i { case 0: return &v.state case 1: @@ -28237,8 +31953,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListOrderVersionsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListLedgerEntriesResponse); i { case 0: return &v.state case 1: @@ -28249,8 +31965,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListOrderVersionsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AggregatedLedgerEntriesEdge); i { case 0: return &v.state case 1: @@ -28261,8 +31977,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveOrdersRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AggregatedLedgerEntriesConnection); i { case 0: return &v.state case 1: @@ -28273,8 +31989,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveOrdersResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListBalanceChangesRequest); i { case 0: return &v.state case 1: @@ -28285,8 +32001,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderSnapshotPage); i { + file_data_node_api_v2_trading_data_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListBalanceChangesResponse); i { case 0: return &v.state case 1: @@ -28297,8 +32013,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderUpdates); i { + file_data_node_api_v2_trading_data_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBalanceHistoryRequest); i { case 0: return &v.state case 1: @@ -28309,8 +32025,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStopOrderRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBalanceHistoryResponse); i { case 0: return &v.state case 1: @@ -28321,8 +32037,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStopOrderResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AggregatedBalanceEdge); i { case 0: return &v.state case 1: @@ -28333,8 +32049,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListStopOrdersRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AggregatedBalanceConnection); i { case 0: return &v.state case 1: @@ -28345,8 +32061,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopOrderFilter); i { + file_data_node_api_v2_trading_data_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountFilter); i { case 0: return &v.state case 1: @@ -28357,8 +32073,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopOrderEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AggregatedBalance); i { case 0: return &v.state case 1: @@ -28369,8 +32085,128 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopOrderConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveMarketsDepthRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveMarketsDepthResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveMarketsDepthUpdatesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveMarketsDepthUpdatesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveMarketsDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveMarketsDataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLatestMarketDepthRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLatestMarketDepthResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListLatestMarketDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListLatestMarketDataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_node_api_v2_trading_data_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLatestMarketDataRequest); i { case 0: return &v.state case 1: @@ -28381,8 +32217,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListStopOrdersResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLatestMarketDataResponse); i { case 0: return &v.state case 1: @@ -28393,8 +32229,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPositionsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMarketDataHistoryByIDRequest); i { case 0: return &v.state case 1: @@ -28405,8 +32241,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPositionsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMarketDataHistoryByIDResponse); i { case 0: return &v.state case 1: @@ -28417,8 +32253,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PositionsFilter); i { + file_data_node_api_v2_trading_data_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketDataEdge); i { case 0: return &v.state case 1: @@ -28429,8 +32265,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAllPositionsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketDataConnection); i { case 0: return &v.state case 1: @@ -28441,8 +32277,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAllPositionsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTransfersRequest); i { case 0: return &v.state case 1: @@ -28453,8 +32289,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PositionEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTransfersResponse); i { case 0: return &v.state case 1: @@ -28465,8 +32301,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PositionConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransferNode); i { case 0: return &v.state case 1: @@ -28477,8 +32313,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObservePositionsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransferEdge); i { case 0: return &v.state case 1: @@ -28489,8 +32325,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObservePositionsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransferConnection); i { case 0: return &v.state case 1: @@ -28501,8 +32337,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PositionSnapshotPage); i { + file_data_node_api_v2_trading_data_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTransferRequest); i { case 0: return &v.state case 1: @@ -28513,8 +32349,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PositionUpdates); i { + file_data_node_api_v2_trading_data_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTransferResponse); i { case 0: return &v.state case 1: @@ -28525,8 +32361,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LedgerEntryFilter); i { + file_data_node_api_v2_trading_data_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkLimitsRequest); i { case 0: return &v.state case 1: @@ -28537,8 +32373,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AggregatedLedgerEntry); i { + file_data_node_api_v2_trading_data_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkLimitsResponse); i { case 0: return &v.state case 1: @@ -28549,8 +32385,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListLedgerEntriesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCandleIntervalsRequest); i { case 0: return &v.state case 1: @@ -28561,8 +32397,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExportLedgerEntriesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IntervalToCandleId); i { case 0: return &v.state case 1: @@ -28573,8 +32409,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListLedgerEntriesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCandleIntervalsResponse); i { case 0: return &v.state case 1: @@ -28585,8 +32421,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AggregatedLedgerEntriesEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Candle); i { case 0: return &v.state case 1: @@ -28597,8 +32433,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AggregatedLedgerEntriesConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveCandleDataRequest); i { case 0: return &v.state case 1: @@ -28609,8 +32445,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListBalanceChangesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveCandleDataResponse); i { case 0: return &v.state case 1: @@ -28621,8 +32457,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListBalanceChangesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCandleDataRequest); i { case 0: return &v.state case 1: @@ -28633,8 +32469,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBalanceHistoryRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCandleDataResponse); i { case 0: return &v.state case 1: @@ -28645,8 +32481,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBalanceHistoryResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CandleEdge); i { case 0: return &v.state case 1: @@ -28657,8 +32493,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AggregatedBalanceEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CandleDataConnection); i { case 0: return &v.state case 1: @@ -28669,8 +32505,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AggregatedBalanceConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListVotesRequest); i { case 0: return &v.state case 1: @@ -28681,8 +32517,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountFilter); i { + file_data_node_api_v2_trading_data_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListVotesResponse); i { case 0: return &v.state case 1: @@ -28693,8 +32529,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AggregatedBalance); i { + file_data_node_api_v2_trading_data_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VoteEdge); i { case 0: return &v.state case 1: @@ -28705,8 +32541,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveMarketsDepthRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VoteConnection); i { case 0: return &v.state case 1: @@ -28717,8 +32553,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveMarketsDepthResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveVotesRequest); i { case 0: return &v.state case 1: @@ -28729,8 +32565,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveMarketsDepthUpdatesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveVotesResponse); i { case 0: return &v.state case 1: @@ -28741,8 +32577,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveMarketsDepthUpdatesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListERC20MultiSigSignerAddedBundlesRequest); i { case 0: return &v.state case 1: @@ -28753,8 +32589,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveMarketsDataRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListERC20MultiSigSignerAddedBundlesResponse); i { case 0: return &v.state case 1: @@ -28765,8 +32601,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveMarketsDataResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ERC20MultiSigSignerAddedEdge); i { case 0: return &v.state case 1: @@ -28777,8 +32613,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestMarketDepthRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ERC20MultiSigSignerAddedBundleEdge); i { case 0: return &v.state case 1: @@ -28789,8 +32625,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestMarketDepthResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ERC20MultiSigSignerAddedConnection); i { case 0: return &v.state case 1: @@ -28801,8 +32637,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListLatestMarketDataRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ERC20MultiSigSignerAddedBundle); i { case 0: return &v.state case 1: @@ -28813,8 +32649,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListLatestMarketDataResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListERC20MultiSigSignerRemovedBundlesRequest); i { case 0: return &v.state case 1: @@ -28825,8 +32661,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestMarketDataRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListERC20MultiSigSignerRemovedBundlesResponse); i { case 0: return &v.state case 1: @@ -28837,8 +32673,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestMarketDataResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ERC20MultiSigSignerRemovedEdge); i { case 0: return &v.state case 1: @@ -28849,8 +32685,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMarketDataHistoryByIDRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ERC20MultiSigSignerRemovedBundleEdge); i { case 0: return &v.state case 1: @@ -28861,8 +32697,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMarketDataHistoryByIDResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ERC20MultiSigSignerRemovedConnection); i { case 0: return &v.state case 1: @@ -28873,8 +32709,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarketDataEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ERC20MultiSigSignerRemovedBundle); i { case 0: return &v.state case 1: @@ -28885,8 +32721,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarketDataConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetERC20ListAssetBundleRequest); i { case 0: return &v.state case 1: @@ -28897,8 +32733,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTransfersRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetERC20ListAssetBundleResponse); i { case 0: return &v.state case 1: @@ -28909,8 +32745,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTransfersResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetERC20SetAssetLimitsBundleRequest); i { case 0: return &v.state case 1: @@ -28921,8 +32757,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransferNode); i { + file_data_node_api_v2_trading_data_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetERC20SetAssetLimitsBundleResponse); i { case 0: return &v.state case 1: @@ -28933,8 +32769,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransferEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetERC20WithdrawalApprovalRequest); i { case 0: return &v.state case 1: @@ -28945,8 +32781,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransferConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetERC20WithdrawalApprovalResponse); i { case 0: return &v.state case 1: @@ -28957,8 +32793,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTransferRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLastTradeRequest); i { case 0: return &v.state case 1: @@ -28969,8 +32805,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTransferResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLastTradeResponse); i { case 0: return &v.state case 1: @@ -28981,8 +32817,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetworkLimitsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTradesRequest); i { case 0: return &v.state case 1: @@ -28993,8 +32829,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetworkLimitsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTradesResponse); i { case 0: return &v.state case 1: @@ -29005,8 +32841,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListCandleIntervalsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TradeConnection); i { case 0: return &v.state case 1: @@ -29017,8 +32853,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IntervalToCandleId); i { + file_data_node_api_v2_trading_data_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TradeEdge); i { case 0: return &v.state case 1: @@ -29029,8 +32865,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListCandleIntervalsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveTradesRequest); i { case 0: return &v.state case 1: @@ -29041,8 +32877,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Candle); i { + file_data_node_api_v2_trading_data_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveTradesResponse); i { case 0: return &v.state case 1: @@ -29053,8 +32889,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveCandleDataRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOracleSpecRequest); i { case 0: return &v.state case 1: @@ -29065,8 +32901,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveCandleDataResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOracleSpecResponse); i { case 0: return &v.state case 1: @@ -29077,8 +32913,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListCandleDataRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOracleSpecsRequest); i { case 0: return &v.state case 1: @@ -29089,8 +32925,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListCandleDataResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOracleSpecsResponse); i { case 0: return &v.state case 1: @@ -29101,8 +32937,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CandleEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOracleDataRequest); i { case 0: return &v.state case 1: @@ -29113,8 +32949,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CandleDataConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOracleDataResponse); i { case 0: return &v.state case 1: @@ -29125,8 +32961,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListVotesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OracleSpecEdge); i { case 0: return &v.state case 1: @@ -29137,8 +32973,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListVotesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OracleSpecsConnection); i { case 0: return &v.state case 1: @@ -29149,8 +32985,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VoteEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OracleDataEdge); i { case 0: return &v.state case 1: @@ -29161,8 +32997,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VoteConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OracleDataConnection); i { case 0: return &v.state case 1: @@ -29173,8 +33009,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveVotesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMarketRequest); i { case 0: return &v.state case 1: @@ -29185,8 +33021,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveVotesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMarketResponse); i { case 0: return &v.state case 1: @@ -29197,8 +33033,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListERC20MultiSigSignerAddedBundlesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListMarketsRequest); i { case 0: return &v.state case 1: @@ -29209,8 +33045,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListERC20MultiSigSignerAddedBundlesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListMarketsResponse); i { case 0: return &v.state case 1: @@ -29221,8 +33057,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ERC20MultiSigSignerAddedEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketEdge); i { case 0: return &v.state case 1: @@ -29233,8 +33069,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ERC20MultiSigSignerAddedBundleEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketConnection); i { case 0: return &v.state case 1: @@ -29245,8 +33081,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ERC20MultiSigSignerAddedConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[144].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSuccessorMarketsRequest); i { case 0: return &v.state case 1: @@ -29257,8 +33093,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ERC20MultiSigSignerAddedBundle); i { + file_data_node_api_v2_trading_data_proto_msgTypes[145].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuccessorMarket); i { case 0: return &v.state case 1: @@ -29269,8 +33105,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListERC20MultiSigSignerRemovedBundlesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[146].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuccessorMarketEdge); i { case 0: return &v.state case 1: @@ -29281,8 +33117,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListERC20MultiSigSignerRemovedBundlesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuccessorMarketConnection); i { case 0: return &v.state case 1: @@ -29293,8 +33129,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ERC20MultiSigSignerRemovedEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSuccessorMarketsResponse); i { case 0: return &v.state case 1: @@ -29305,8 +33141,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ERC20MultiSigSignerRemovedBundleEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPartyRequest); i { case 0: return &v.state case 1: @@ -29317,8 +33153,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ERC20MultiSigSignerRemovedConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[150].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPartyResponse); i { case 0: return &v.state case 1: @@ -29329,8 +33165,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ERC20MultiSigSignerRemovedBundle); i { + file_data_node_api_v2_trading_data_proto_msgTypes[151].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPartiesRequest); i { case 0: return &v.state case 1: @@ -29341,8 +33177,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetERC20ListAssetBundleRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[152].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPartiesResponse); i { case 0: return &v.state case 1: @@ -29353,8 +33189,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetERC20ListAssetBundleResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[153].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartyEdge); i { case 0: return &v.state case 1: @@ -29365,8 +33201,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetERC20SetAssetLimitsBundleRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[154].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartyConnection); i { case 0: return &v.state case 1: @@ -29377,8 +33213,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetERC20SetAssetLimitsBundleResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[155].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPartiesProfilesRequest); i { case 0: return &v.state case 1: @@ -29389,8 +33225,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetERC20WithdrawalApprovalRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[156].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPartiesProfilesResponse); i { case 0: return &v.state case 1: @@ -29401,8 +33237,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetERC20WithdrawalApprovalResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[157].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartyProfileEdge); i { case 0: return &v.state case 1: @@ -29413,8 +33249,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLastTradeRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[158].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartiesProfilesConnection); i { case 0: return &v.state case 1: @@ -29425,8 +33261,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLastTradeResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[159].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderEdge); i { case 0: return &v.state case 1: @@ -29437,8 +33273,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTradesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[160].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListMarginLevelsRequest); i { case 0: return &v.state case 1: @@ -29449,8 +33285,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTradesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[161].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListMarginLevelsResponse); i { case 0: return &v.state case 1: @@ -29461,8 +33297,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TradeConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[162].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveMarginLevelsRequest); i { case 0: return &v.state case 1: @@ -29473,8 +33309,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TradeEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[163].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveMarginLevelsResponse); i { case 0: return &v.state case 1: @@ -29485,8 +33321,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveTradesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[164].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderConnection); i { case 0: return &v.state case 1: @@ -29497,8 +33333,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveTradesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[165].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarginEdge); i { case 0: return &v.state case 1: @@ -29509,8 +33345,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOracleSpecRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[166].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarginConnection); i { case 0: return &v.state case 1: @@ -29521,8 +33357,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOracleSpecResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[167].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRewardsRequest); i { case 0: return &v.state case 1: @@ -29533,8 +33369,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListOracleSpecsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[168].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRewardsResponse); i { case 0: return &v.state case 1: @@ -29545,8 +33381,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListOracleSpecsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[169].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RewardEdge); i { case 0: return &v.state case 1: @@ -29557,8 +33393,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListOracleDataRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[170].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RewardsConnection); i { case 0: return &v.state case 1: @@ -29569,8 +33405,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListOracleDataResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[171].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRewardSummariesRequest); i { case 0: return &v.state case 1: @@ -29581,8 +33417,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OracleSpecEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[172].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRewardSummariesResponse); i { case 0: return &v.state case 1: @@ -29593,8 +33429,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OracleSpecsConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[173].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RewardSummaryFilter); i { case 0: return &v.state case 1: @@ -29605,8 +33441,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OracleDataEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[174].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEpochRewardSummariesRequest); i { case 0: return &v.state case 1: @@ -29617,8 +33453,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OracleDataConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[175].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEpochRewardSummariesResponse); i { case 0: return &v.state case 1: @@ -29629,8 +33465,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMarketRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[176].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EpochRewardSummaryConnection); i { case 0: return &v.state case 1: @@ -29641,8 +33477,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMarketResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[177].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EpochRewardSummaryEdge); i { case 0: return &v.state case 1: @@ -29653,8 +33489,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMarketsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[178].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveRewardsRequest); i { case 0: return &v.state case 1: @@ -29665,8 +33501,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMarketsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[179].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveRewardsResponse); i { case 0: return &v.state case 1: @@ -29677,8 +33513,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarketEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[180].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDepositRequest); i { case 0: return &v.state case 1: @@ -29689,8 +33525,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarketConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[181].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDepositResponse); i { case 0: return &v.state case 1: @@ -29701,8 +33537,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[144].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSuccessorMarketsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[182].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDepositsRequest); i { case 0: return &v.state case 1: @@ -29713,8 +33549,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[145].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SuccessorMarket); i { + file_data_node_api_v2_trading_data_proto_msgTypes[183].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDepositsResponse); i { case 0: return &v.state case 1: @@ -29725,8 +33561,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[146].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SuccessorMarketEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[184].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DepositEdge); i { case 0: return &v.state case 1: @@ -29737,8 +33573,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SuccessorMarketConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[185].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DepositsConnection); i { case 0: return &v.state case 1: @@ -29749,8 +33585,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSuccessorMarketsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[186].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWithdrawalRequest); i { case 0: return &v.state case 1: @@ -29761,8 +33597,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPartyRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[187].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWithdrawalResponse); i { case 0: return &v.state case 1: @@ -29773,8 +33609,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[150].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPartyResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[188].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWithdrawalsRequest); i { case 0: return &v.state case 1: @@ -29785,8 +33621,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[151].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPartiesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[189].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWithdrawalsResponse); i { case 0: return &v.state case 1: @@ -29797,8 +33633,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[152].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPartiesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[190].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WithdrawalEdge); i { case 0: return &v.state case 1: @@ -29809,8 +33645,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[153].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[191].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WithdrawalsConnection); i { case 0: return &v.state case 1: @@ -29821,8 +33657,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[154].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[192].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAssetRequest); i { case 0: return &v.state case 1: @@ -29833,8 +33669,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[155].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[193].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAssetResponse); i { case 0: return &v.state case 1: @@ -29845,8 +33681,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[156].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMarginLevelsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[194].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAssetsRequest); i { case 0: return &v.state case 1: @@ -29857,8 +33693,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[157].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMarginLevelsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[195].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAssetsResponse); i { case 0: return &v.state case 1: @@ -29869,8 +33705,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[158].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveMarginLevelsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[196].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssetEdge); i { case 0: return &v.state case 1: @@ -29881,8 +33717,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[159].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveMarginLevelsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[197].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssetsConnection); i { case 0: return &v.state case 1: @@ -29893,8 +33729,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[160].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[198].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListLiquidityProvisionsRequest); i { case 0: return &v.state case 1: @@ -29905,8 +33741,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[161].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarginEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[199].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAllLiquidityProvisionsRequest); i { case 0: return &v.state case 1: @@ -29917,8 +33753,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[162].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarginConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[200].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListLiquidityProvisionsResponse); i { case 0: return &v.state case 1: @@ -29929,8 +33765,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[163].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRewardsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[201].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAllLiquidityProvisionsResponse); i { case 0: return &v.state case 1: @@ -29941,8 +33777,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[164].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRewardsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[202].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LiquidityProvision); i { case 0: return &v.state case 1: @@ -29953,8 +33789,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[165].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RewardEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[203].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LiquidityProvisionsEdge); i { case 0: return &v.state case 1: @@ -29965,8 +33801,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[166].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RewardsConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[204].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LiquidityProvisionWithPendingEdge); i { case 0: return &v.state case 1: @@ -29977,8 +33813,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[167].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRewardSummariesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[205].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LiquidityProvisionsConnection); i { case 0: return &v.state case 1: @@ -29989,8 +33825,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[168].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRewardSummariesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[206].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LiquidityProvisionsWithPendingConnection); i { case 0: return &v.state case 1: @@ -30001,8 +33837,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[169].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RewardSummaryFilter); i { + file_data_node_api_v2_trading_data_proto_msgTypes[207].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveLiquidityProvisionsRequest); i { case 0: return &v.state case 1: @@ -30013,8 +33849,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[170].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListEpochRewardSummariesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[208].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveLiquidityProvisionsResponse); i { case 0: return &v.state case 1: @@ -30025,8 +33861,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[171].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListEpochRewardSummariesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[209].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListLiquidityProvidersRequest); i { case 0: return &v.state case 1: @@ -30037,8 +33873,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[172].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EpochRewardSummaryConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[210].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LiquidityProvider); i { case 0: return &v.state case 1: @@ -30049,8 +33885,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[173].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EpochRewardSummaryEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[211].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LiquidityProviderEdge); i { case 0: return &v.state case 1: @@ -30061,8 +33897,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[174].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveRewardsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[212].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LiquidityProviderConnection); i { case 0: return &v.state case 1: @@ -30073,8 +33909,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[175].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveRewardsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[213].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListLiquidityProvidersResponse); i { case 0: return &v.state case 1: @@ -30085,8 +33921,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[176].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDepositRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[214].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPaidLiquidityFeesRequest); i { case 0: return &v.state case 1: @@ -30097,8 +33933,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[177].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDepositResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[215].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPaidLiquidityFeesResponse); i { case 0: return &v.state case 1: @@ -30109,8 +33945,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[178].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDepositsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[216].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PaidLiquidityFeesEdge); i { case 0: return &v.state case 1: @@ -30121,8 +33957,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[179].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDepositsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[217].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PaidLiquidityFeesConnection); i { case 0: return &v.state case 1: @@ -30133,8 +33969,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[180].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DepositEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[218].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGovernanceDataRequest); i { case 0: return &v.state case 1: @@ -30145,8 +33981,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[181].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DepositsConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[219].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGovernanceDataResponse); i { case 0: return &v.state case 1: @@ -30157,8 +33993,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[182].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWithdrawalRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[220].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGovernanceDataRequest); i { case 0: return &v.state case 1: @@ -30169,8 +34005,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[183].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWithdrawalResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[221].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGovernanceDataResponse); i { case 0: return &v.state case 1: @@ -30181,8 +34017,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[184].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWithdrawalsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[222].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GovernanceDataEdge); i { case 0: return &v.state case 1: @@ -30193,8 +34029,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[185].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWithdrawalsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[223].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GovernanceDataConnection); i { case 0: return &v.state case 1: @@ -30205,8 +34041,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[186].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawalEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[224].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveGovernanceRequest); i { case 0: return &v.state case 1: @@ -30217,8 +34053,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[187].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawalsConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[225].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveGovernanceResponse); i { case 0: return &v.state case 1: @@ -30229,8 +34065,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[188].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAssetRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[226].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDelegationsRequest); i { case 0: return &v.state case 1: @@ -30241,8 +34077,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[189].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAssetResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[227].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDelegationsResponse); i { case 0: return &v.state case 1: @@ -30253,8 +34089,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[190].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAssetsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[228].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DelegationEdge); i { case 0: return &v.state case 1: @@ -30265,8 +34101,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[191].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAssetsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[229].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DelegationsConnection); i { case 0: return &v.state case 1: @@ -30277,8 +34113,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[192].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssetEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[230].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveDelegationsRequest); i { case 0: return &v.state case 1: @@ -30289,8 +34125,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[193].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssetsConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[231].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveDelegationsResponse); i { case 0: return &v.state case 1: @@ -30301,8 +34137,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[194].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListLiquidityProvisionsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[232].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeBasic); i { case 0: return &v.state case 1: @@ -30313,8 +34149,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[195].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAllLiquidityProvisionsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[233].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkDataRequest); i { case 0: return &v.state case 1: @@ -30325,8 +34161,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[196].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListLiquidityProvisionsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[234].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkDataResponse); i { case 0: return &v.state case 1: @@ -30337,8 +34173,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[197].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAllLiquidityProvisionsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[235].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNodeRequest); i { case 0: return &v.state case 1: @@ -30349,8 +34185,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[198].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProvision); i { + file_data_node_api_v2_trading_data_proto_msgTypes[236].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNodeResponse); i { case 0: return &v.state case 1: @@ -30361,8 +34197,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[199].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProvisionsEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[237].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNodesRequest); i { case 0: return &v.state case 1: @@ -30373,8 +34209,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[200].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProvisionWithPendingEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[238].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNodesResponse); i { case 0: return &v.state case 1: @@ -30385,8 +34221,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[201].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProvisionsConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[239].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeEdge); i { case 0: return &v.state case 1: @@ -30397,8 +34233,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[202].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProvisionsWithPendingConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[240].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodesConnection); i { case 0: return &v.state case 1: @@ -30409,8 +34245,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[203].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveLiquidityProvisionsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[241].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNodeSignaturesRequest); i { case 0: return &v.state case 1: @@ -30421,8 +34257,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[204].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveLiquidityProvisionsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[242].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNodeSignaturesResponse); i { case 0: return &v.state case 1: @@ -30433,8 +34269,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[205].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListLiquidityProvidersRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[243].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeSignatureEdge); i { case 0: return &v.state case 1: @@ -30445,8 +34281,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[206].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProvider); i { + file_data_node_api_v2_trading_data_proto_msgTypes[244].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeSignaturesConnection); i { case 0: return &v.state case 1: @@ -30457,8 +34293,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[207].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProviderEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[245].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEpochRequest); i { case 0: return &v.state case 1: @@ -30469,8 +34305,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[208].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProviderConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[246].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEpochResponse); i { case 0: return &v.state case 1: @@ -30481,8 +34317,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[209].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListLiquidityProvidersResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[247].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EstimateFeeRequest); i { case 0: return &v.state case 1: @@ -30493,8 +34329,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[210].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPaidLiquidityFeesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[248].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EstimateFeeResponse); i { case 0: return &v.state case 1: @@ -30505,8 +34341,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[211].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPaidLiquidityFeesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[249].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EstimateMarginRequest); i { case 0: return &v.state case 1: @@ -30517,8 +34353,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[212].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PaidLiquidityFeesEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[250].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EstimateMarginResponse); i { case 0: return &v.state case 1: @@ -30529,8 +34365,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[213].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PaidLiquidityFeesConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[251].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNetworkParametersRequest); i { case 0: return &v.state case 1: @@ -30541,8 +34377,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[214].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGovernanceDataRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[252].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNetworkParametersResponse); i { case 0: return &v.state case 1: @@ -30553,8 +34389,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[215].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGovernanceDataResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[253].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkParameterRequest); i { case 0: return &v.state case 1: @@ -30565,8 +34401,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[216].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListGovernanceDataRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[254].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkParameterResponse); i { case 0: return &v.state case 1: @@ -30577,8 +34413,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[217].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListGovernanceDataResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[255].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetworkParameterEdge); i { case 0: return &v.state case 1: @@ -30589,8 +34425,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[218].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GovernanceDataEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[256].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetworkParameterConnection); i { case 0: return &v.state case 1: @@ -30601,8 +34437,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[219].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GovernanceDataConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[257].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Checkpoint); i { case 0: return &v.state case 1: @@ -30613,8 +34449,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[220].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveGovernanceRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[258].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCheckpointsRequest); i { case 0: return &v.state case 1: @@ -30625,8 +34461,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[221].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveGovernanceResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[259].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCheckpointsResponse); i { case 0: return &v.state case 1: @@ -30637,8 +34473,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[222].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDelegationsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[260].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckpointEdge); i { case 0: return &v.state case 1: @@ -30649,8 +34485,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[223].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDelegationsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[261].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckpointsConnection); i { case 0: return &v.state case 1: @@ -30661,8 +34497,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[224].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegationEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[262].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStakeRequest); i { case 0: return &v.state case 1: @@ -30673,8 +34509,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[225].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegationsConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[263].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStakeResponse); i { case 0: return &v.state case 1: @@ -30685,8 +34521,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[226].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveDelegationsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[264].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StakeLinkingEdge); i { case 0: return &v.state case 1: @@ -30697,8 +34533,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[227].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveDelegationsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[265].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StakesConnection); i { case 0: return &v.state case 1: @@ -30709,8 +34545,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[228].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeBasic); i { + file_data_node_api_v2_trading_data_proto_msgTypes[266].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRiskFactorsRequest); i { case 0: return &v.state case 1: @@ -30721,8 +34557,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[229].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetworkDataRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[267].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRiskFactorsResponse); i { case 0: return &v.state case 1: @@ -30733,8 +34569,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[230].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetworkDataResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[268].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveEventBusRequest); i { case 0: return &v.state case 1: @@ -30745,8 +34581,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[231].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[269].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveEventBusResponse); i { case 0: return &v.state case 1: @@ -30757,8 +34593,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[232].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[270].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveLedgerMovementsRequest); i { case 0: return &v.state case 1: @@ -30769,8 +34605,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[233].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[271].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveLedgerMovementsResponse); i { case 0: return &v.state case 1: @@ -30781,8 +34617,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[234].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[272].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListKeyRotationsRequest); i { case 0: return &v.state case 1: @@ -30793,8 +34629,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[235].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[273].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListKeyRotationsResponse); i { case 0: return &v.state case 1: @@ -30805,8 +34641,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[236].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodesConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[274].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyRotationEdge); i { case 0: return &v.state case 1: @@ -30817,8 +34653,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[237].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodeSignaturesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[275].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyRotationConnection); i { case 0: return &v.state case 1: @@ -30829,8 +34665,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[238].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodeSignaturesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[276].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEthereumKeyRotationsRequest); i { case 0: return &v.state case 1: @@ -30841,8 +34677,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[239].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeSignatureEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[277].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEthereumKeyRotationsResponse); i { case 0: return &v.state case 1: @@ -30853,8 +34689,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[240].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeSignaturesConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[278].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthereumKeyRotationsConnection); i { case 0: return &v.state case 1: @@ -30865,8 +34701,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[241].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEpochRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[279].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthereumKeyRotationEdge); i { case 0: return &v.state case 1: @@ -30877,8 +34713,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[242].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEpochResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[280].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVegaTimeRequest); i { case 0: return &v.state case 1: @@ -30889,8 +34725,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[243].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EstimateFeeRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[281].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVegaTimeResponse); i { case 0: return &v.state case 1: @@ -30901,8 +34737,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[244].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EstimateFeeResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[282].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DateRange); i { case 0: return &v.state case 1: @@ -30913,8 +34749,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[245].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EstimateMarginRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[283].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetProtocolUpgradeStatusRequest); i { case 0: return &v.state case 1: @@ -30925,8 +34761,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[246].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EstimateMarginResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[284].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetProtocolUpgradeStatusResponse); i { case 0: return &v.state case 1: @@ -30937,8 +34773,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[247].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNetworkParametersRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[285].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListProtocolUpgradeProposalsRequest); i { case 0: return &v.state case 1: @@ -30949,8 +34785,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[248].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNetworkParametersResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[286].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListProtocolUpgradeProposalsResponse); i { case 0: return &v.state case 1: @@ -30961,8 +34797,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[249].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetworkParameterRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[287].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProtocolUpgradeProposalConnection); i { case 0: return &v.state case 1: @@ -30973,8 +34809,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[250].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetworkParameterResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[288].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProtocolUpgradeProposalEdge); i { case 0: return &v.state case 1: @@ -30985,8 +34821,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[251].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NetworkParameterEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[289].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCoreSnapshotsRequest); i { case 0: return &v.state case 1: @@ -30997,8 +34833,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[252].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NetworkParameterConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[290].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCoreSnapshotsResponse); i { case 0: return &v.state case 1: @@ -31009,8 +34845,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[253].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Checkpoint); i { + file_data_node_api_v2_trading_data_proto_msgTypes[291].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CoreSnapshotConnection); i { case 0: return &v.state case 1: @@ -31021,8 +34857,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[254].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListCheckpointsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[292].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CoreSnapshotEdge); i { case 0: return &v.state case 1: @@ -31033,8 +34869,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[255].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListCheckpointsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[293].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HistorySegment); i { case 0: return &v.state case 1: @@ -31045,8 +34881,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[256].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckpointEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[294].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMostRecentNetworkHistorySegmentRequest); i { case 0: return &v.state case 1: @@ -31057,8 +34893,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[257].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckpointsConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[295].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMostRecentNetworkHistorySegmentResponse); i { case 0: return &v.state case 1: @@ -31069,8 +34905,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[258].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStakeRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[296].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAllNetworkHistorySegmentsRequest); i { case 0: return &v.state case 1: @@ -31081,8 +34917,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[259].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStakeResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[297].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAllNetworkHistorySegmentsResponse); i { case 0: return &v.state case 1: @@ -31093,8 +34929,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[260].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StakeLinkingEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[298].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetActiveNetworkHistoryPeerAddressesRequest); i { case 0: return &v.state case 1: @@ -31105,8 +34941,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[261].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StakesConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[299].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetActiveNetworkHistoryPeerAddressesResponse); i { case 0: return &v.state case 1: @@ -31117,8 +34953,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[262].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRiskFactorsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[300].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkHistoryStatusRequest); i { case 0: return &v.state case 1: @@ -31129,8 +34965,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[263].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRiskFactorsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[301].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkHistoryStatusResponse); i { case 0: return &v.state case 1: @@ -31141,8 +34977,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[264].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveEventBusRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[302].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkHistoryBootstrapPeersRequest); i { case 0: return &v.state case 1: @@ -31153,8 +34989,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[265].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveEventBusResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[303].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkHistoryBootstrapPeersResponse); i { case 0: return &v.state case 1: @@ -31165,8 +35001,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[266].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveLedgerMovementsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[304].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportNetworkHistoryRequest); i { case 0: return &v.state case 1: @@ -31177,8 +35013,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[267].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObserveLedgerMovementsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[305].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEntitiesRequest); i { case 0: return &v.state case 1: @@ -31189,8 +35025,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[268].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListKeyRotationsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[306].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEntitiesResponse); i { case 0: return &v.state case 1: @@ -31201,8 +35037,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[269].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListKeyRotationsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[307].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPartyActivityStreakRequest); i { case 0: return &v.state case 1: @@ -31213,8 +35049,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[270].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyRotationEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[308].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPartyActivityStreakResponse); i { case 0: return &v.state case 1: @@ -31225,8 +35061,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[271].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyRotationConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[309].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FundingPayment); i { case 0: return &v.state case 1: @@ -31237,8 +35073,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[272].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListEthereumKeyRotationsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[310].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFundingPaymentsRequest); i { case 0: return &v.state case 1: @@ -31249,8 +35085,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[273].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListEthereumKeyRotationsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[311].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FundingPaymentEdge); i { case 0: return &v.state case 1: @@ -31261,8 +35097,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[274].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthereumKeyRotationsConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[312].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FundingPaymentConnection); i { case 0: return &v.state case 1: @@ -31273,8 +35109,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[275].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthereumKeyRotationEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[313].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFundingPaymentsResponse); i { case 0: return &v.state case 1: @@ -31285,8 +35121,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[276].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVegaTimeRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[314].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFundingPeriodsRequest); i { case 0: return &v.state case 1: @@ -31297,8 +35133,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[277].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVegaTimeResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[315].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FundingPeriodEdge); i { case 0: return &v.state case 1: @@ -31309,8 +35145,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[278].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DateRange); i { + file_data_node_api_v2_trading_data_proto_msgTypes[316].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FundingPeriodConnection); i { case 0: return &v.state case 1: @@ -31321,8 +35157,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[279].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetProtocolUpgradeStatusRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[317].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFundingPeriodsResponse); i { case 0: return &v.state case 1: @@ -31333,8 +35169,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[280].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetProtocolUpgradeStatusResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[318].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFundingPeriodDataPointsRequest); i { case 0: return &v.state case 1: @@ -31345,8 +35181,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[281].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListProtocolUpgradeProposalsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[319].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FundingPeriodDataPointEdge); i { case 0: return &v.state case 1: @@ -31357,8 +35193,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[282].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListProtocolUpgradeProposalsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[320].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FundingPeriodDataPointConnection); i { case 0: return &v.state case 1: @@ -31369,8 +35205,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[283].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtocolUpgradeProposalConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[321].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFundingPeriodDataPointsResponse); i { case 0: return &v.state case 1: @@ -31381,8 +35217,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[284].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtocolUpgradeProposalEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[322].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingRequest); i { case 0: return &v.state case 1: @@ -31393,8 +35229,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[285].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListCoreSnapshotsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[323].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingResponse); i { case 0: return &v.state case 1: @@ -31405,8 +35241,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[286].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListCoreSnapshotsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[324].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderInfo); i { case 0: return &v.state case 1: @@ -31417,8 +35253,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[287].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CoreSnapshotConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[325].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EstimatePositionRequest); i { case 0: return &v.state case 1: @@ -31429,8 +35265,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[288].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CoreSnapshotEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[326].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EstimatePositionResponse); i { case 0: return &v.state case 1: @@ -31441,8 +35277,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[289].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HistorySegment); i { + file_data_node_api_v2_trading_data_proto_msgTypes[327].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CollateralIncreaseEstimate); i { case 0: return &v.state case 1: @@ -31452,9 +35288,9 @@ func file_data_node_api_v2_trading_data_proto_init() { default: return nil } - } - file_data_node_api_v2_trading_data_proto_msgTypes[290].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMostRecentNetworkHistorySegmentRequest); i { + } + file_data_node_api_v2_trading_data_proto_msgTypes[328].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarginEstimate); i { case 0: return &v.state case 1: @@ -31465,8 +35301,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[291].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMostRecentNetworkHistorySegmentResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[329].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LiquidationEstimate); i { case 0: return &v.state case 1: @@ -31477,8 +35313,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[292].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAllNetworkHistorySegmentsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[330].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LiquidationPrice); i { case 0: return &v.state case 1: @@ -31489,8 +35325,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[293].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAllNetworkHistorySegmentsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[331].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCurrentReferralProgramRequest); i { case 0: return &v.state case 1: @@ -31501,8 +35337,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[294].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetActiveNetworkHistoryPeerAddressesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[332].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCurrentReferralProgramResponse); i { case 0: return &v.state case 1: @@ -31513,8 +35349,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[295].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetActiveNetworkHistoryPeerAddressesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[333].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReferralProgram); i { case 0: return &v.state case 1: @@ -31525,8 +35361,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[296].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetworkHistoryStatusRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[334].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReferralSet); i { case 0: return &v.state case 1: @@ -31537,8 +35373,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[297].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetworkHistoryStatusResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[335].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReferralSetEdge); i { case 0: return &v.state case 1: @@ -31549,8 +35385,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[298].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetworkHistoryBootstrapPeersRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[336].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReferralSetConnection); i { case 0: return &v.state case 1: @@ -31561,8 +35397,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[299].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNetworkHistoryBootstrapPeersResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[337].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReferralSetsRequest); i { case 0: return &v.state case 1: @@ -31573,8 +35409,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[300].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExportNetworkHistoryRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[338].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReferralSetsResponse); i { case 0: return &v.state case 1: @@ -31585,8 +35421,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[301].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListEntitiesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[339].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReferralSetReferee); i { case 0: return &v.state case 1: @@ -31597,8 +35433,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[302].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListEntitiesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[340].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReferralSetRefereeEdge); i { case 0: return &v.state case 1: @@ -31609,8 +35445,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[303].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPartyActivityStreakRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[341].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReferralSetRefereeConnection); i { case 0: return &v.state case 1: @@ -31621,8 +35457,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[304].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPartyActivityStreakResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[342].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReferralSetRefereesRequest); i { case 0: return &v.state case 1: @@ -31633,8 +35469,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[305].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FundingPayment); i { + file_data_node_api_v2_trading_data_proto_msgTypes[343].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReferralSetRefereesResponse); i { case 0: return &v.state case 1: @@ -31645,8 +35481,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[306].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListFundingPaymentsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[344].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReferralSetStatsRequest); i { case 0: return &v.state case 1: @@ -31657,8 +35493,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[307].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FundingPaymentEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[345].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReferralSetStatsResponse); i { case 0: return &v.state case 1: @@ -31669,8 +35505,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[308].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FundingPaymentConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[346].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReferralSetStatsConnection); i { case 0: return &v.state case 1: @@ -31681,8 +35517,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[309].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListFundingPaymentsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[347].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReferralSetStatsEdge); i { case 0: return &v.state case 1: @@ -31693,8 +35529,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[310].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListFundingPeriodsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[348].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReferralSetStats); i { case 0: return &v.state case 1: @@ -31705,8 +35541,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[311].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FundingPeriodEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[349].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Team); i { case 0: return &v.state case 1: @@ -31717,8 +35553,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[312].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FundingPeriodConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[350].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamEdge); i { case 0: return &v.state case 1: @@ -31729,8 +35565,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[313].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListFundingPeriodsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[351].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamConnection); i { case 0: return &v.state case 1: @@ -31741,8 +35577,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[314].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListFundingPeriodDataPointsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[352].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTeamsRequest); i { case 0: return &v.state case 1: @@ -31753,8 +35589,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[315].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FundingPeriodDataPointEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[353].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTeamsResponse); i { case 0: return &v.state case 1: @@ -31765,8 +35601,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[316].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FundingPeriodDataPointConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[354].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTeamsStatisticsRequest); i { case 0: return &v.state case 1: @@ -31777,8 +35613,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[317].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListFundingPeriodDataPointsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[355].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTeamsStatisticsResponse); i { case 0: return &v.state case 1: @@ -31789,8 +35625,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[318].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[356].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamsStatisticsConnection); i { case 0: return &v.state case 1: @@ -31801,8 +35637,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[319].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[357].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamStatisticsEdge); i { case 0: return &v.state case 1: @@ -31813,8 +35649,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[320].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderInfo); i { + file_data_node_api_v2_trading_data_proto_msgTypes[358].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamStatistics); i { case 0: return &v.state case 1: @@ -31825,8 +35661,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[321].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EstimatePositionRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[359].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuantumRewardsPerEpoch); i { case 0: return &v.state case 1: @@ -31837,8 +35673,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[322].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EstimatePositionResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[360].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuantumVolumesPerEpoch); i { case 0: return &v.state case 1: @@ -31849,8 +35685,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[323].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarginEstimate); i { + file_data_node_api_v2_trading_data_proto_msgTypes[361].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTeamMembersStatisticsRequest); i { case 0: return &v.state case 1: @@ -31861,8 +35697,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[324].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidationEstimate); i { + file_data_node_api_v2_trading_data_proto_msgTypes[362].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTeamMembersStatisticsResponse); i { case 0: return &v.state case 1: @@ -31873,8 +35709,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[325].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidationPrice); i { + file_data_node_api_v2_trading_data_proto_msgTypes[363].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamMembersStatisticsConnection); i { case 0: return &v.state case 1: @@ -31885,8 +35721,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[326].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCurrentReferralProgramRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[364].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamMemberStatisticsEdge); i { case 0: return &v.state case 1: @@ -31897,8 +35733,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[327].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCurrentReferralProgramResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[365].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamMemberStatistics); i { case 0: return &v.state case 1: @@ -31909,8 +35745,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[328].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralProgram); i { + file_data_node_api_v2_trading_data_proto_msgTypes[366].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTeamRefereesRequest); i { case 0: return &v.state case 1: @@ -31921,8 +35757,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[329].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralSet); i { + file_data_node_api_v2_trading_data_proto_msgTypes[367].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamReferee); i { case 0: return &v.state case 1: @@ -31933,8 +35769,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[330].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralSetEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[368].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamRefereeEdge); i { case 0: return &v.state case 1: @@ -31945,8 +35781,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[331].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralSetConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[369].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamRefereeConnection); i { case 0: return &v.state case 1: @@ -31957,8 +35793,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[332].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListReferralSetsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[370].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTeamRefereesResponse); i { case 0: return &v.state case 1: @@ -31969,8 +35805,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[333].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListReferralSetsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[371].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamRefereeHistory); i { case 0: return &v.state case 1: @@ -31981,8 +35817,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[334].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralSetReferee); i { + file_data_node_api_v2_trading_data_proto_msgTypes[372].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamRefereeHistoryEdge); i { case 0: return &v.state case 1: @@ -31993,8 +35829,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[335].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralSetRefereeEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[373].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamRefereeHistoryConnection); i { case 0: return &v.state case 1: @@ -32005,8 +35841,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[336].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralSetRefereeConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[374].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTeamRefereeHistoryRequest); i { case 0: return &v.state case 1: @@ -32017,8 +35853,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[337].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListReferralSetRefereesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[375].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTeamRefereeHistoryResponse); i { case 0: return &v.state case 1: @@ -32029,8 +35865,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[338].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListReferralSetRefereesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[376].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFeesStatsRequest); i { case 0: return &v.state case 1: @@ -32041,8 +35877,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[339].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetReferralSetStatsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[377].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFeesStatsResponse); i { case 0: return &v.state case 1: @@ -32053,8 +35889,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[340].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetReferralSetStatsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[378].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFeesStatsForPartyRequest); i { case 0: return &v.state case 1: @@ -32065,8 +35901,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[341].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralSetStatsConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[379].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFeesStatsForPartyResponse); i { case 0: return &v.state case 1: @@ -32077,8 +35913,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[342].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralSetStatsEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[380].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCurrentVolumeDiscountProgramRequest); i { case 0: return &v.state case 1: @@ -32089,8 +35925,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[343].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralSetStats); i { + file_data_node_api_v2_trading_data_proto_msgTypes[381].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCurrentVolumeDiscountProgramResponse); i { case 0: return &v.state case 1: @@ -32101,8 +35937,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[344].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Team); i { + file_data_node_api_v2_trading_data_proto_msgTypes[382].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVolumeDiscountStatsRequest); i { case 0: return &v.state case 1: @@ -32113,8 +35949,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[345].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[383].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVolumeDiscountStatsResponse); i { case 0: return &v.state case 1: @@ -32125,8 +35961,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[346].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[384].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VolumeDiscountStatsConnection); i { case 0: return &v.state case 1: @@ -32137,8 +35973,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[347].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTeamsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[385].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VolumeDiscountStatsEdge); i { case 0: return &v.state case 1: @@ -32149,8 +35985,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[348].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTeamsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[386].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VolumeDiscountStats); i { case 0: return &v.state case 1: @@ -32161,8 +35997,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[349].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTeamRefereesRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[387].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VolumeDiscountProgram); i { case 0: return &v.state case 1: @@ -32173,8 +36009,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[350].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamReferee); i { + file_data_node_api_v2_trading_data_proto_msgTypes[388].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FeesStatsForParty); i { case 0: return &v.state case 1: @@ -32185,8 +36021,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[351].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamRefereeEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[389].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveTransactionResultsRequest); i { case 0: return &v.state case 1: @@ -32197,8 +36033,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[352].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamRefereeConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[390].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObserveTransactionResultsResponse); i { case 0: return &v.state case 1: @@ -32209,8 +36045,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[353].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTeamRefereesResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[391].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EstimateTransferFeeRequest); i { case 0: return &v.state case 1: @@ -32221,8 +36057,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[354].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamRefereeHistory); i { + file_data_node_api_v2_trading_data_proto_msgTypes[392].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EstimateTransferFeeResponse); i { case 0: return &v.state case 1: @@ -32233,8 +36069,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[355].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamRefereeHistoryEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[393].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTotalTransferFeeDiscountRequest); i { case 0: return &v.state case 1: @@ -32245,8 +36081,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[356].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamRefereeHistoryConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[394].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTotalTransferFeeDiscountResponse); i { case 0: return &v.state case 1: @@ -32257,8 +36093,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[357].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTeamRefereeHistoryRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[395].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGamesRequest); i { case 0: return &v.state case 1: @@ -32269,8 +36105,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[358].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTeamRefereeHistoryResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[396].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGamesResponse); i { case 0: return &v.state case 1: @@ -32281,8 +36117,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[359].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFeesStatsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[397].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GamesConnection); i { case 0: return &v.state case 1: @@ -32293,8 +36129,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[360].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFeesStatsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[398].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GameEdge); i { case 0: return &v.state case 1: @@ -32305,8 +36141,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[361].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFeesStatsForPartyRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[399].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Game); i { case 0: return &v.state case 1: @@ -32317,8 +36153,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[362].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFeesStatsForPartyResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[400].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamGameEntities); i { case 0: return &v.state case 1: @@ -32329,8 +36165,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[363].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCurrentVolumeDiscountProgramRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[401].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IndividualGameEntities); i { case 0: return &v.state case 1: @@ -32341,8 +36177,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[364].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCurrentVolumeDiscountProgramResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[402].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamGameEntity); i { case 0: return &v.state case 1: @@ -32353,8 +36189,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[365].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVolumeDiscountStatsRequest); i { + file_data_node_api_v2_trading_data_proto_msgTypes[403].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamGameParticipation); i { case 0: return &v.state case 1: @@ -32365,8 +36201,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[366].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVolumeDiscountStatsResponse); i { + file_data_node_api_v2_trading_data_proto_msgTypes[404].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IndividualGameEntity); i { case 0: return &v.state case 1: @@ -32377,8 +36213,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[367].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VolumeDiscountStatsConnection); i { + file_data_node_api_v2_trading_data_proto_msgTypes[405].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPartyMarginModesRequest); i { case 0: return &v.state case 1: @@ -32389,8 +36225,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[368].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VolumeDiscountStatsEdge); i { + file_data_node_api_v2_trading_data_proto_msgTypes[406].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPartyMarginModesResponse); i { case 0: return &v.state case 1: @@ -32401,8 +36237,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[369].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VolumeDiscountStats); i { + file_data_node_api_v2_trading_data_proto_msgTypes[407].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartyMarginModesConnection); i { case 0: return &v.state case 1: @@ -32413,8 +36249,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[370].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VolumeDiscountProgram); i { + file_data_node_api_v2_trading_data_proto_msgTypes[408].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartyMarginModeEdge); i { case 0: return &v.state case 1: @@ -32425,8 +36261,8 @@ func file_data_node_api_v2_trading_data_proto_init() { return nil } } - file_data_node_api_v2_trading_data_proto_msgTypes[371].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FeesStatsForParty); i { + file_data_node_api_v2_trading_data_proto_msgTypes[409].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartyMarginMode); i { case 0: return &v.state case 1: @@ -32464,6 +36300,7 @@ func file_data_node_api_v2_trading_data_proto_init() { (*ObservePositionsResponse_Snapshot)(nil), (*ObservePositionsResponse_Updates)(nil), } + file_data_node_api_v2_trading_data_proto_msgTypes[46].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[47].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[48].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[49].OneofWrappers = []interface{}{} @@ -32480,61 +36317,71 @@ func file_data_node_api_v2_trading_data_proto_init() { file_data_node_api_v2_trading_data_proto_msgTypes[130].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[132].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[140].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[158].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[163].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[162].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[167].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[169].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[170].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[171].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[173].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[174].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[178].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[184].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[190].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[182].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[188].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[194].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[195].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[198].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[203].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[205].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[210].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[199].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[202].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[207].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[209].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[214].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[216].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[218].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[220].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[222].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[224].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[226].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[233].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[230].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[237].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[241].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[247].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[254].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[245].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[251].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[258].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[268].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[262].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[272].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[278].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[281].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[276].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[282].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[285].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[303].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[306].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[289].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[307].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[310].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[314].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[321].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[328].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[332].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[318].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[325].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[333].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[337].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[339].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[342].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[344].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[347].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[349].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[357].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[359].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[352].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[354].OneofWrappers = []interface{}{} file_data_node_api_v2_trading_data_proto_msgTypes[361].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[365].OneofWrappers = []interface{}{} - file_data_node_api_v2_trading_data_proto_msgTypes[370].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[366].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[374].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[376].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[378].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[382].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[387].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[389].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[395].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[399].OneofWrappers = []interface{}{ + (*Game_Team)(nil), + (*Game_Individual)(nil), + } + file_data_node_api_v2_trading_data_proto_msgTypes[405].OneofWrappers = []interface{}{} + file_data_node_api_v2_trading_data_proto_msgTypes[409].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_data_node_api_v2_trading_data_proto_rawDesc, - NumEnums: 5, - NumMessages: 372, + NumEnums: 6, + NumMessages: 410, NumExtensions: 0, NumServices: 1, }, diff --git a/protos/data-node/api/v2/trading_data.pb.gw.go b/protos/data-node/api/v2/trading_data.pb.gw.go index 3517cfad20..c55c6bafd7 100644 --- a/protos/data-node/api/v2/trading_data.pb.gw.go +++ b/protos/data-node/api/v2/trading_data.pb.gw.go @@ -1799,6 +1799,42 @@ func local_request_TradingDataService_ListParties_0(ctx context.Context, marshal } +var ( + filter_TradingDataService_ListPartiesProfiles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_TradingDataService_ListPartiesProfiles_0(ctx context.Context, marshaler runtime.Marshaler, client TradingDataServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListPartiesProfilesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_ListPartiesProfiles_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListPartiesProfiles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TradingDataService_ListPartiesProfiles_0(ctx context.Context, marshaler runtime.Marshaler, server TradingDataServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListPartiesProfilesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_ListPartiesProfiles_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListPartiesProfiles(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_TradingDataService_ListMarginLevels_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -3777,6 +3813,112 @@ func local_request_TradingDataService_ListTeams_0(ctx context.Context, marshaler } +var ( + filter_TradingDataService_ListTeamsStatistics_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_TradingDataService_ListTeamsStatistics_0(ctx context.Context, marshaler runtime.Marshaler, client TradingDataServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListTeamsStatisticsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_ListTeamsStatistics_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListTeamsStatistics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TradingDataService_ListTeamsStatistics_0(ctx context.Context, marshaler runtime.Marshaler, server TradingDataServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListTeamsStatisticsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_ListTeamsStatistics_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListTeamsStatistics(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_TradingDataService_ListTeamMembersStatistics_0 = &utilities.DoubleArray{Encoding: map[string]int{"team_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_TradingDataService_ListTeamMembersStatistics_0(ctx context.Context, marshaler runtime.Marshaler, client TradingDataServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListTeamMembersStatisticsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["team_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "team_id") + } + + protoReq.TeamId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "team_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_ListTeamMembersStatistics_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListTeamMembersStatistics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TradingDataService_ListTeamMembersStatistics_0(ctx context.Context, marshaler runtime.Marshaler, server TradingDataServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListTeamMembersStatisticsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["team_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "team_id") + } + + protoReq.TeamId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "team_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_ListTeamMembersStatistics_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListTeamMembersStatistics(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_TradingDataService_ListTeamReferees_0 = &utilities.DoubleArray{Encoding: map[string]int{"team_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -4077,6 +4219,178 @@ func local_request_TradingDataService_GetVolumeDiscountStats_0(ctx context.Conte } +var ( + filter_TradingDataService_ObserveTransactionResults_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_TradingDataService_ObserveTransactionResults_0(ctx context.Context, marshaler runtime.Marshaler, client TradingDataServiceClient, req *http.Request, pathParams map[string]string) (TradingDataService_ObserveTransactionResultsClient, runtime.ServerMetadata, error) { + var protoReq ObserveTransactionResultsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_ObserveTransactionResults_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.ObserveTransactionResults(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +var ( + filter_TradingDataService_EstimateTransferFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_TradingDataService_EstimateTransferFee_0(ctx context.Context, marshaler runtime.Marshaler, client TradingDataServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EstimateTransferFeeRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_EstimateTransferFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EstimateTransferFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TradingDataService_EstimateTransferFee_0(ctx context.Context, marshaler runtime.Marshaler, server TradingDataServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EstimateTransferFeeRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_EstimateTransferFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EstimateTransferFee(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_TradingDataService_GetTotalTransferFeeDiscount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_TradingDataService_GetTotalTransferFeeDiscount_0(ctx context.Context, marshaler runtime.Marshaler, client TradingDataServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTotalTransferFeeDiscountRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_GetTotalTransferFeeDiscount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetTotalTransferFeeDiscount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TradingDataService_GetTotalTransferFeeDiscount_0(ctx context.Context, marshaler runtime.Marshaler, server TradingDataServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTotalTransferFeeDiscountRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_GetTotalTransferFeeDiscount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetTotalTransferFeeDiscount(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_TradingDataService_ListGames_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_TradingDataService_ListGames_0(ctx context.Context, marshaler runtime.Marshaler, client TradingDataServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListGamesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_ListGames_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListGames(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TradingDataService_ListGames_0(ctx context.Context, marshaler runtime.Marshaler, server TradingDataServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListGamesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_ListGames_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListGames(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_TradingDataService_ListPartyMarginModes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_TradingDataService_ListPartyMarginModes_0(ctx context.Context, marshaler runtime.Marshaler, client TradingDataServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListPartyMarginModesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_ListPartyMarginModes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListPartyMarginModes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TradingDataService_ListPartyMarginModes_0(ctx context.Context, marshaler runtime.Marshaler, server TradingDataServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListPartyMarginModesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TradingDataService_ListPartyMarginModes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListPartyMarginModes(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_TradingDataService_ExportNetworkHistory_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -4986,18 +5300,18 @@ func RegisterTradingDataServiceHandlerServer(ctx context.Context, mux *runtime.S }) - mux.Handle("GET", pattern_TradingDataService_ListMarginLevels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_TradingDataService_ListPartiesProfiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/ListMarginLevels", runtime.WithHTTPPathPattern("/api/v2/margin/levels")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/ListPartiesProfiles", runtime.WithHTTPPathPattern("/api/v2/parties/profiles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_TradingDataService_ListMarginLevels_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_TradingDataService_ListPartiesProfiles_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -5005,16 +5319,39 @@ func RegisterTradingDataServiceHandlerServer(ctx context.Context, mux *runtime.S return } - forward_TradingDataService_ListMarginLevels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_TradingDataService_ListPartiesProfiles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_TradingDataService_ObserveMarginLevels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") - _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - }) + mux.Handle("GET", pattern_TradingDataService_ListMarginLevels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/ListMarginLevels", runtime.WithHTTPPathPattern("/api/v2/margin/levels")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TradingDataService_ListMarginLevels_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_ListMarginLevels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TradingDataService_ObserveMarginLevels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) mux.Handle("GET", pattern_TradingDataService_ListRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -6125,6 +6462,52 @@ func RegisterTradingDataServiceHandlerServer(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_TradingDataService_ListTeamsStatistics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/ListTeamsStatistics", runtime.WithHTTPPathPattern("/api/v2/teams/stats")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TradingDataService_ListTeamsStatistics_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_ListTeamsStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TradingDataService_ListTeamMembersStatistics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/ListTeamMembersStatistics", runtime.WithHTTPPathPattern("/api/v2/teams/{team_id}/stats")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TradingDataService_ListTeamMembersStatistics_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_ListTeamMembersStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_TradingDataService_ListTeamReferees_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -6263,6 +6646,105 @@ func RegisterTradingDataServiceHandlerServer(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_TradingDataService_ObserveTransactionResults_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + mux.Handle("GET", pattern_TradingDataService_EstimateTransferFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/EstimateTransferFee", runtime.WithHTTPPathPattern("/api/v2/transfers/estimate-fee")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TradingDataService_EstimateTransferFee_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_EstimateTransferFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TradingDataService_GetTotalTransferFeeDiscount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/GetTotalTransferFeeDiscount", runtime.WithHTTPPathPattern("/api/v2/transfers/total-fee-discount")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TradingDataService_GetTotalTransferFeeDiscount_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_GetTotalTransferFeeDiscount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TradingDataService_ListGames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/ListGames", runtime.WithHTTPPathPattern("/api/v2/games")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TradingDataService_ListGames_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_ListGames_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TradingDataService_ListPartyMarginModes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/ListPartyMarginModes", runtime.WithHTTPPathPattern("/api/v2/margin-modes")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TradingDataService_ListPartyMarginModes_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_ListPartyMarginModes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_TradingDataService_ExportNetworkHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -7211,6 +7693,26 @@ func RegisterTradingDataServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_TradingDataService_ListPartiesProfiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/ListPartiesProfiles", runtime.WithHTTPPathPattern("/api/v2/parties/profiles")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TradingDataService_ListPartiesProfiles_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_ListPartiesProfiles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_TradingDataService_ListMarginLevels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -8271,6 +8773,46 @@ func RegisterTradingDataServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_TradingDataService_ListTeamsStatistics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/ListTeamsStatistics", runtime.WithHTTPPathPattern("/api/v2/teams/stats")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TradingDataService_ListTeamsStatistics_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_ListTeamsStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TradingDataService_ListTeamMembersStatistics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/ListTeamMembersStatistics", runtime.WithHTTPPathPattern("/api/v2/teams/{team_id}/stats")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TradingDataService_ListTeamMembersStatistics_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_ListTeamMembersStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_TradingDataService_ListTeamReferees_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -8391,6 +8933,106 @@ func RegisterTradingDataServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_TradingDataService_ObserveTransactionResults_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/ObserveTransactionResults", runtime.WithHTTPPathPattern("/api/v2/stream/transaction-results")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TradingDataService_ObserveTransactionResults_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_ObserveTransactionResults_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TradingDataService_EstimateTransferFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/EstimateTransferFee", runtime.WithHTTPPathPattern("/api/v2/transfers/estimate-fee")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TradingDataService_EstimateTransferFee_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_EstimateTransferFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TradingDataService_GetTotalTransferFeeDiscount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/GetTotalTransferFeeDiscount", runtime.WithHTTPPathPattern("/api/v2/transfers/total-fee-discount")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TradingDataService_GetTotalTransferFeeDiscount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_GetTotalTransferFeeDiscount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TradingDataService_ListGames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/ListGames", runtime.WithHTTPPathPattern("/api/v2/games")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TradingDataService_ListGames_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_ListGames_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TradingDataService_ListPartyMarginModes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/datanode.api.v2.TradingDataService/ListPartyMarginModes", runtime.WithHTTPPathPattern("/api/v2/margin-modes")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TradingDataService_ListPartyMarginModes_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TradingDataService_ListPartyMarginModes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_TradingDataService_ExportNetworkHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -8505,6 +9147,8 @@ var ( pattern_TradingDataService_ListParties_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "parties"}, "")) + pattern_TradingDataService_ListPartiesProfiles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "parties", "profiles"}, "")) + pattern_TradingDataService_ListMarginLevels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "margin", "levels"}, "")) pattern_TradingDataService_ObserveMarginLevels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v2", "stream", "margin", "levels"}, "")) @@ -8611,6 +9255,10 @@ var ( pattern_TradingDataService_ListTeams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "teams"}, "")) + pattern_TradingDataService_ListTeamsStatistics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "teams", "stats"}, "")) + + pattern_TradingDataService_ListTeamMembersStatistics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v2", "teams", "team_id", "stats"}, "")) + pattern_TradingDataService_ListTeamReferees_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"api", "v2", "teams", "referees", "team_id"}, "")) pattern_TradingDataService_ListTeamRefereeHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"api", "v2", "teams", "referees", "history", "referee"}, "")) @@ -8623,6 +9271,16 @@ var ( pattern_TradingDataService_GetVolumeDiscountStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "volume-discount-programs", "stats"}, "")) + pattern_TradingDataService_ObserveTransactionResults_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "stream", "transaction-results"}, "")) + + pattern_TradingDataService_EstimateTransferFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "transfers", "estimate-fee"}, "")) + + pattern_TradingDataService_GetTotalTransferFeeDiscount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "transfers", "total-fee-discount"}, "")) + + pattern_TradingDataService_ListGames_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "games"}, "")) + + pattern_TradingDataService_ListPartyMarginModes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "margin-modes"}, "")) + pattern_TradingDataService_ExportNetworkHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "networkhistory", "export"}, "")) ) @@ -8717,6 +9375,8 @@ var ( forward_TradingDataService_ListParties_0 = runtime.ForwardResponseMessage + forward_TradingDataService_ListPartiesProfiles_0 = runtime.ForwardResponseMessage + forward_TradingDataService_ListMarginLevels_0 = runtime.ForwardResponseMessage forward_TradingDataService_ObserveMarginLevels_0 = runtime.ForwardResponseStream @@ -8823,6 +9483,10 @@ var ( forward_TradingDataService_ListTeams_0 = runtime.ForwardResponseMessage + forward_TradingDataService_ListTeamsStatistics_0 = runtime.ForwardResponseMessage + + forward_TradingDataService_ListTeamMembersStatistics_0 = runtime.ForwardResponseMessage + forward_TradingDataService_ListTeamReferees_0 = runtime.ForwardResponseMessage forward_TradingDataService_ListTeamRefereeHistory_0 = runtime.ForwardResponseMessage @@ -8835,5 +9499,15 @@ var ( forward_TradingDataService_GetVolumeDiscountStats_0 = runtime.ForwardResponseMessage + forward_TradingDataService_ObserveTransactionResults_0 = runtime.ForwardResponseStream + + forward_TradingDataService_EstimateTransferFee_0 = runtime.ForwardResponseMessage + + forward_TradingDataService_GetTotalTransferFeeDiscount_0 = runtime.ForwardResponseMessage + + forward_TradingDataService_ListGames_0 = runtime.ForwardResponseMessage + + forward_TradingDataService_ListPartyMarginModes_0 = runtime.ForwardResponseMessage + forward_TradingDataService_ExportNetworkHistory_0 = runtime.ForwardResponseStream ) diff --git a/protos/data-node/api/v2/trading_data_grpc.pb.go b/protos/data-node/api/v2/trading_data_grpc.pb.go index 2b1ed6a43e..5c031a2266 100644 --- a/protos/data-node/api/v2/trading_data_grpc.pb.go +++ b/protos/data-node/api/v2/trading_data_grpc.pb.go @@ -91,6 +91,13 @@ type TradingDataServiceClient interface { // - receiving account (market ID, asset ID, account type) // - sending AND receiving account // - transfer type either in addition to the above filters or as a standalone option + // + // Note: The date range is restricted to any 5 days. + // + // If no start or end date is provided, only ledger entries from the last 5 days will be returned. + // If a start and end date are provided, but the end date is more than 5 days after the start date, only data up to 5 days after the start date will be returned. + // If a start date is provided but no end date, the end date will be set to 5 days after the start date. + // If no start date is provided, but the end date is, the start date will be set to 5 days before the end date. ListLedgerEntries(ctx context.Context, in *ListLedgerEntriesRequest, opts ...grpc.CallOption) (*ListLedgerEntriesResponse, error) // Export ledger entries // @@ -239,6 +246,10 @@ type TradingDataServiceClient interface { // // Get a list of parties ListParties(ctx context.Context, in *ListPartiesRequest, opts ...grpc.CallOption) (*ListPartiesResponse, error) + // List parties' profiles + // + // Get a list of profiles for multiple parties + ListPartiesProfiles(ctx context.Context, in *ListPartiesProfilesRequest, opts ...grpc.CallOption) (*ListPartiesProfilesResponse, error) // List margin levels // // Get a list margin levels that match the provided criteria. If no filter is provided, all margin levels will be returned. @@ -355,14 +366,15 @@ type TradingDataServiceClient interface { // Estimate the fee that would be incurred for submitting an order // with the specified price and size on the market. EstimateFee(ctx context.Context, in *EstimateFeeRequest, opts ...grpc.CallOption) (*EstimateFeeResponse, error) + // Deprecated: Do not use. // Estimate margin // // Estimate the margin that would be required for submitting this order EstimateMargin(ctx context.Context, in *EstimateMarginRequest, opts ...grpc.CallOption) (*EstimateMarginResponse, error) // Estimate position // - // Estimate the margin that would be required for maintaining the specified position. Margin estimates are scaled to asset decimal places. - // If the optional collateral available argument is supplied, the response also contains the estimate of the liquidation price. + // Estimate the margin that would be required for maintaining the specified position, collateral increase needed to open the specified position and the liquidation price estimate. + // Margin estimates are scaled to asset decimal places. // Liquidation price estimates are scaled to asset decimal places by default, unless an argument to scale to market decimal places is specified in the request. EstimatePosition(ctx context.Context, in *EstimatePositionRequest, opts ...grpc.CallOption) (*EstimatePositionResponse, error) // List network parameters @@ -480,6 +492,16 @@ type TradingDataServiceClient interface { // // Get a list of all teams, or for a specific team by using team ID, or party ID of a referrer or referee ListTeams(ctx context.Context, in *ListTeamsRequest, opts ...grpc.CallOption) (*ListTeamsResponse, error) + // List teams statistics + // + // Get the statistics of all teams, or for a specific team by using team ID, over a number of epochs. + // If a team does not have at least the number of epochs' worth of data, it is ignored. + ListTeamsStatistics(ctx context.Context, in *ListTeamsStatisticsRequest, opts ...grpc.CallOption) (*ListTeamsStatisticsResponse, error) + // List team members' statistics + // + // Get the statistics for all members of a given team, or for a specific member by using party ID, over a number of epochs. + // If a team does not have at least the number of epochs' worth of data, it is ignored. + ListTeamMembersStatistics(ctx context.Context, in *ListTeamMembersStatisticsRequest, opts ...grpc.CallOption) (*ListTeamMembersStatisticsResponse, error) // List team referees // // Get a list of all referees for a given team ID @@ -513,6 +535,26 @@ type TradingDataServiceClient interface { // // Get information about a party's vesting rewards GetPartyVestingStats(ctx context.Context, in *GetPartyVestingStatsRequest, opts ...grpc.CallOption) (*GetPartyVestingStatsResponse, error) + // Observe transaction results + // + // Subscribe to a stream of transaction results, optionally filtered by party/hash/status + ObserveTransactionResults(ctx context.Context, in *ObserveTransactionResultsRequest, opts ...grpc.CallOption) (TradingDataService_ObserveTransactionResultsClient, error) + // Estimate transfer fee costs + // + // Estimate transfer fee costs with potential discount applied + EstimateTransferFee(ctx context.Context, in *EstimateTransferFeeRequest, opts ...grpc.CallOption) (*EstimateTransferFeeResponse, error) + // Available transfer fee discount + // + // Returns available per party per asset transfer discount + GetTotalTransferFeeDiscount(ctx context.Context, in *GetTotalTransferFeeDiscountRequest, opts ...grpc.CallOption) (*GetTotalTransferFeeDiscountResponse, error) + // List games + // + // Get a list of games and corresponding game data, given the provided filters + ListGames(ctx context.Context, in *ListGamesRequest, opts ...grpc.CallOption) (*ListGamesResponse, error) + // List margin modes per party per market + // + // Get a list of all margin modes, or for a specific market ID, or party ID. + ListPartyMarginModes(ctx context.Context, in *ListPartyMarginModesRequest, opts ...grpc.CallOption) (*ListPartyMarginModesResponse, error) // Export network history as CSV // // Export CSV table data from network history between two block heights. @@ -1234,6 +1276,15 @@ func (c *tradingDataServiceClient) ListParties(ctx context.Context, in *ListPart return out, nil } +func (c *tradingDataServiceClient) ListPartiesProfiles(ctx context.Context, in *ListPartiesProfilesRequest, opts ...grpc.CallOption) (*ListPartiesProfilesResponse, error) { + out := new(ListPartiesProfilesResponse) + err := c.cc.Invoke(ctx, "/datanode.api.v2.TradingDataService/ListPartiesProfiles", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *tradingDataServiceClient) ListMarginLevels(ctx context.Context, in *ListMarginLevelsRequest, opts ...grpc.CallOption) (*ListMarginLevelsResponse, error) { out := new(ListMarginLevelsResponse) err := c.cc.Invoke(ctx, "/datanode.api.v2.TradingDataService/ListMarginLevels", in, out, opts...) @@ -1538,6 +1589,7 @@ func (c *tradingDataServiceClient) EstimateFee(ctx context.Context, in *Estimate return out, nil } +// Deprecated: Do not use. func (c *tradingDataServiceClient) EstimateMargin(ctx context.Context, in *EstimateMarginRequest, opts ...grpc.CallOption) (*EstimateMarginResponse, error) { out := new(EstimateMarginResponse) err := c.cc.Invoke(ctx, "/datanode.api.v2.TradingDataService/EstimateMargin", in, out, opts...) @@ -1853,6 +1905,24 @@ func (c *tradingDataServiceClient) ListTeams(ctx context.Context, in *ListTeamsR return out, nil } +func (c *tradingDataServiceClient) ListTeamsStatistics(ctx context.Context, in *ListTeamsStatisticsRequest, opts ...grpc.CallOption) (*ListTeamsStatisticsResponse, error) { + out := new(ListTeamsStatisticsResponse) + err := c.cc.Invoke(ctx, "/datanode.api.v2.TradingDataService/ListTeamsStatistics", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tradingDataServiceClient) ListTeamMembersStatistics(ctx context.Context, in *ListTeamMembersStatisticsRequest, opts ...grpc.CallOption) (*ListTeamMembersStatisticsResponse, error) { + out := new(ListTeamMembersStatisticsResponse) + err := c.cc.Invoke(ctx, "/datanode.api.v2.TradingDataService/ListTeamMembersStatistics", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *tradingDataServiceClient) ListTeamReferees(ctx context.Context, in *ListTeamRefereesRequest, opts ...grpc.CallOption) (*ListTeamRefereesResponse, error) { out := new(ListTeamRefereesResponse) err := c.cc.Invoke(ctx, "/datanode.api.v2.TradingDataService/ListTeamReferees", in, out, opts...) @@ -1925,8 +1995,76 @@ func (c *tradingDataServiceClient) GetPartyVestingStats(ctx context.Context, in return out, nil } +func (c *tradingDataServiceClient) ObserveTransactionResults(ctx context.Context, in *ObserveTransactionResultsRequest, opts ...grpc.CallOption) (TradingDataService_ObserveTransactionResultsClient, error) { + stream, err := c.cc.NewStream(ctx, &TradingDataService_ServiceDesc.Streams[15], "/datanode.api.v2.TradingDataService/ObserveTransactionResults", opts...) + if err != nil { + return nil, err + } + x := &tradingDataServiceObserveTransactionResultsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type TradingDataService_ObserveTransactionResultsClient interface { + Recv() (*ObserveTransactionResultsResponse, error) + grpc.ClientStream +} + +type tradingDataServiceObserveTransactionResultsClient struct { + grpc.ClientStream +} + +func (x *tradingDataServiceObserveTransactionResultsClient) Recv() (*ObserveTransactionResultsResponse, error) { + m := new(ObserveTransactionResultsResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *tradingDataServiceClient) EstimateTransferFee(ctx context.Context, in *EstimateTransferFeeRequest, opts ...grpc.CallOption) (*EstimateTransferFeeResponse, error) { + out := new(EstimateTransferFeeResponse) + err := c.cc.Invoke(ctx, "/datanode.api.v2.TradingDataService/EstimateTransferFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tradingDataServiceClient) GetTotalTransferFeeDiscount(ctx context.Context, in *GetTotalTransferFeeDiscountRequest, opts ...grpc.CallOption) (*GetTotalTransferFeeDiscountResponse, error) { + out := new(GetTotalTransferFeeDiscountResponse) + err := c.cc.Invoke(ctx, "/datanode.api.v2.TradingDataService/GetTotalTransferFeeDiscount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tradingDataServiceClient) ListGames(ctx context.Context, in *ListGamesRequest, opts ...grpc.CallOption) (*ListGamesResponse, error) { + out := new(ListGamesResponse) + err := c.cc.Invoke(ctx, "/datanode.api.v2.TradingDataService/ListGames", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tradingDataServiceClient) ListPartyMarginModes(ctx context.Context, in *ListPartyMarginModesRequest, opts ...grpc.CallOption) (*ListPartyMarginModesResponse, error) { + out := new(ListPartyMarginModesResponse) + err := c.cc.Invoke(ctx, "/datanode.api.v2.TradingDataService/ListPartyMarginModes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *tradingDataServiceClient) ExportNetworkHistory(ctx context.Context, in *ExportNetworkHistoryRequest, opts ...grpc.CallOption) (TradingDataService_ExportNetworkHistoryClient, error) { - stream, err := c.cc.NewStream(ctx, &TradingDataService_ServiceDesc.Streams[15], "/datanode.api.v2.TradingDataService/ExportNetworkHistory", opts...) + stream, err := c.cc.NewStream(ctx, &TradingDataService_ServiceDesc.Streams[16], "/datanode.api.v2.TradingDataService/ExportNetworkHistory", opts...) if err != nil { return nil, err } @@ -2038,6 +2176,13 @@ type TradingDataServiceServer interface { // - receiving account (market ID, asset ID, account type) // - sending AND receiving account // - transfer type either in addition to the above filters or as a standalone option + // + // Note: The date range is restricted to any 5 days. + // + // If no start or end date is provided, only ledger entries from the last 5 days will be returned. + // If a start and end date are provided, but the end date is more than 5 days after the start date, only data up to 5 days after the start date will be returned. + // If a start date is provided but no end date, the end date will be set to 5 days after the start date. + // If no start date is provided, but the end date is, the start date will be set to 5 days before the end date. ListLedgerEntries(context.Context, *ListLedgerEntriesRequest) (*ListLedgerEntriesResponse, error) // Export ledger entries // @@ -2186,6 +2331,10 @@ type TradingDataServiceServer interface { // // Get a list of parties ListParties(context.Context, *ListPartiesRequest) (*ListPartiesResponse, error) + // List parties' profiles + // + // Get a list of profiles for multiple parties + ListPartiesProfiles(context.Context, *ListPartiesProfilesRequest) (*ListPartiesProfilesResponse, error) // List margin levels // // Get a list margin levels that match the provided criteria. If no filter is provided, all margin levels will be returned. @@ -2302,14 +2451,15 @@ type TradingDataServiceServer interface { // Estimate the fee that would be incurred for submitting an order // with the specified price and size on the market. EstimateFee(context.Context, *EstimateFeeRequest) (*EstimateFeeResponse, error) + // Deprecated: Do not use. // Estimate margin // // Estimate the margin that would be required for submitting this order EstimateMargin(context.Context, *EstimateMarginRequest) (*EstimateMarginResponse, error) // Estimate position // - // Estimate the margin that would be required for maintaining the specified position. Margin estimates are scaled to asset decimal places. - // If the optional collateral available argument is supplied, the response also contains the estimate of the liquidation price. + // Estimate the margin that would be required for maintaining the specified position, collateral increase needed to open the specified position and the liquidation price estimate. + // Margin estimates are scaled to asset decimal places. // Liquidation price estimates are scaled to asset decimal places by default, unless an argument to scale to market decimal places is specified in the request. EstimatePosition(context.Context, *EstimatePositionRequest) (*EstimatePositionResponse, error) // List network parameters @@ -2427,6 +2577,16 @@ type TradingDataServiceServer interface { // // Get a list of all teams, or for a specific team by using team ID, or party ID of a referrer or referee ListTeams(context.Context, *ListTeamsRequest) (*ListTeamsResponse, error) + // List teams statistics + // + // Get the statistics of all teams, or for a specific team by using team ID, over a number of epochs. + // If a team does not have at least the number of epochs' worth of data, it is ignored. + ListTeamsStatistics(context.Context, *ListTeamsStatisticsRequest) (*ListTeamsStatisticsResponse, error) + // List team members' statistics + // + // Get the statistics for all members of a given team, or for a specific member by using party ID, over a number of epochs. + // If a team does not have at least the number of epochs' worth of data, it is ignored. + ListTeamMembersStatistics(context.Context, *ListTeamMembersStatisticsRequest) (*ListTeamMembersStatisticsResponse, error) // List team referees // // Get a list of all referees for a given team ID @@ -2460,6 +2620,26 @@ type TradingDataServiceServer interface { // // Get information about a party's vesting rewards GetPartyVestingStats(context.Context, *GetPartyVestingStatsRequest) (*GetPartyVestingStatsResponse, error) + // Observe transaction results + // + // Subscribe to a stream of transaction results, optionally filtered by party/hash/status + ObserveTransactionResults(*ObserveTransactionResultsRequest, TradingDataService_ObserveTransactionResultsServer) error + // Estimate transfer fee costs + // + // Estimate transfer fee costs with potential discount applied + EstimateTransferFee(context.Context, *EstimateTransferFeeRequest) (*EstimateTransferFeeResponse, error) + // Available transfer fee discount + // + // Returns available per party per asset transfer discount + GetTotalTransferFeeDiscount(context.Context, *GetTotalTransferFeeDiscountRequest) (*GetTotalTransferFeeDiscountResponse, error) + // List games + // + // Get a list of games and corresponding game data, given the provided filters + ListGames(context.Context, *ListGamesRequest) (*ListGamesResponse, error) + // List margin modes per party per market + // + // Get a list of all margin modes, or for a specific market ID, or party ID. + ListPartyMarginModes(context.Context, *ListPartyMarginModesRequest) (*ListPartyMarginModesResponse, error) // Export network history as CSV // // Export CSV table data from network history between two block heights. @@ -2671,6 +2851,9 @@ func (UnimplementedTradingDataServiceServer) GetParty(context.Context, *GetParty func (UnimplementedTradingDataServiceServer) ListParties(context.Context, *ListPartiesRequest) (*ListPartiesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListParties not implemented") } +func (UnimplementedTradingDataServiceServer) ListPartiesProfiles(context.Context, *ListPartiesProfilesRequest) (*ListPartiesProfilesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPartiesProfiles not implemented") +} func (UnimplementedTradingDataServiceServer) ListMarginLevels(context.Context, *ListMarginLevelsRequest) (*ListMarginLevelsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListMarginLevels not implemented") } @@ -2839,6 +3022,12 @@ func (UnimplementedTradingDataServiceServer) GetReferralSetStats(context.Context func (UnimplementedTradingDataServiceServer) ListTeams(context.Context, *ListTeamsRequest) (*ListTeamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTeams not implemented") } +func (UnimplementedTradingDataServiceServer) ListTeamsStatistics(context.Context, *ListTeamsStatisticsRequest) (*ListTeamsStatisticsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTeamsStatistics not implemented") +} +func (UnimplementedTradingDataServiceServer) ListTeamMembersStatistics(context.Context, *ListTeamMembersStatisticsRequest) (*ListTeamMembersStatisticsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTeamMembersStatistics not implemented") +} func (UnimplementedTradingDataServiceServer) ListTeamReferees(context.Context, *ListTeamRefereesRequest) (*ListTeamRefereesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTeamReferees not implemented") } @@ -2863,6 +3052,21 @@ func (UnimplementedTradingDataServiceServer) GetVestingBalancesSummary(context.C func (UnimplementedTradingDataServiceServer) GetPartyVestingStats(context.Context, *GetPartyVestingStatsRequest) (*GetPartyVestingStatsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPartyVestingStats not implemented") } +func (UnimplementedTradingDataServiceServer) ObserveTransactionResults(*ObserveTransactionResultsRequest, TradingDataService_ObserveTransactionResultsServer) error { + return status.Errorf(codes.Unimplemented, "method ObserveTransactionResults not implemented") +} +func (UnimplementedTradingDataServiceServer) EstimateTransferFee(context.Context, *EstimateTransferFeeRequest) (*EstimateTransferFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EstimateTransferFee not implemented") +} +func (UnimplementedTradingDataServiceServer) GetTotalTransferFeeDiscount(context.Context, *GetTotalTransferFeeDiscountRequest) (*GetTotalTransferFeeDiscountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTotalTransferFeeDiscount not implemented") +} +func (UnimplementedTradingDataServiceServer) ListGames(context.Context, *ListGamesRequest) (*ListGamesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListGames not implemented") +} +func (UnimplementedTradingDataServiceServer) ListPartyMarginModes(context.Context, *ListPartyMarginModesRequest) (*ListPartyMarginModesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPartyMarginModes not implemented") +} func (UnimplementedTradingDataServiceServer) ExportNetworkHistory(*ExportNetworkHistoryRequest, TradingDataService_ExportNetworkHistoryServer) error { return status.Errorf(codes.Unimplemented, "method ExportNetworkHistory not implemented") } @@ -3740,6 +3944,24 @@ func _TradingDataService_ListParties_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _TradingDataService_ListPartiesProfiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPartiesProfilesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradingDataServiceServer).ListPartiesProfiles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/datanode.api.v2.TradingDataService/ListPartiesProfiles", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradingDataServiceServer).ListPartiesProfiles(ctx, req.(*ListPartiesProfilesRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _TradingDataService_ListMarginLevels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListMarginLevelsRequest) if err := dec(in); err != nil { @@ -4768,6 +4990,42 @@ func _TradingDataService_ListTeams_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _TradingDataService_ListTeamsStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTeamsStatisticsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradingDataServiceServer).ListTeamsStatistics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/datanode.api.v2.TradingDataService/ListTeamsStatistics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradingDataServiceServer).ListTeamsStatistics(ctx, req.(*ListTeamsStatisticsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TradingDataService_ListTeamMembersStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTeamMembersStatisticsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradingDataServiceServer).ListTeamMembersStatistics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/datanode.api.v2.TradingDataService/ListTeamMembersStatistics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradingDataServiceServer).ListTeamMembersStatistics(ctx, req.(*ListTeamMembersStatisticsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _TradingDataService_ListTeamReferees_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListTeamRefereesRequest) if err := dec(in); err != nil { @@ -4912,6 +5170,99 @@ func _TradingDataService_GetPartyVestingStats_Handler(srv interface{}, ctx conte return interceptor(ctx, in, info, handler) } +func _TradingDataService_ObserveTransactionResults_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ObserveTransactionResultsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(TradingDataServiceServer).ObserveTransactionResults(m, &tradingDataServiceObserveTransactionResultsServer{stream}) +} + +type TradingDataService_ObserveTransactionResultsServer interface { + Send(*ObserveTransactionResultsResponse) error + grpc.ServerStream +} + +type tradingDataServiceObserveTransactionResultsServer struct { + grpc.ServerStream +} + +func (x *tradingDataServiceObserveTransactionResultsServer) Send(m *ObserveTransactionResultsResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _TradingDataService_EstimateTransferFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EstimateTransferFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradingDataServiceServer).EstimateTransferFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/datanode.api.v2.TradingDataService/EstimateTransferFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradingDataServiceServer).EstimateTransferFee(ctx, req.(*EstimateTransferFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TradingDataService_GetTotalTransferFeeDiscount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTotalTransferFeeDiscountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradingDataServiceServer).GetTotalTransferFeeDiscount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/datanode.api.v2.TradingDataService/GetTotalTransferFeeDiscount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradingDataServiceServer).GetTotalTransferFeeDiscount(ctx, req.(*GetTotalTransferFeeDiscountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TradingDataService_ListGames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGamesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradingDataServiceServer).ListGames(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/datanode.api.v2.TradingDataService/ListGames", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradingDataServiceServer).ListGames(ctx, req.(*ListGamesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TradingDataService_ListPartyMarginModes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPartyMarginModesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TradingDataServiceServer).ListPartyMarginModes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/datanode.api.v2.TradingDataService/ListPartyMarginModes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TradingDataServiceServer).ListPartyMarginModes(ctx, req.(*ListPartyMarginModesRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _TradingDataService_ExportNetworkHistory_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(ExportNetworkHistoryRequest) if err := stream.RecvMsg(m); err != nil { @@ -5102,6 +5453,10 @@ var TradingDataService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListParties", Handler: _TradingDataService_ListParties_Handler, }, + { + MethodName: "ListPartiesProfiles", + Handler: _TradingDataService_ListPartiesProfiles_Handler, + }, { MethodName: "ListMarginLevels", Handler: _TradingDataService_ListMarginLevels_Handler, @@ -5306,6 +5661,14 @@ var TradingDataService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListTeams", Handler: _TradingDataService_ListTeams_Handler, }, + { + MethodName: "ListTeamsStatistics", + Handler: _TradingDataService_ListTeamsStatistics_Handler, + }, + { + MethodName: "ListTeamMembersStatistics", + Handler: _TradingDataService_ListTeamMembersStatistics_Handler, + }, { MethodName: "ListTeamReferees", Handler: _TradingDataService_ListTeamReferees_Handler, @@ -5338,6 +5701,22 @@ var TradingDataService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetPartyVestingStats", Handler: _TradingDataService_GetPartyVestingStats_Handler, }, + { + MethodName: "EstimateTransferFee", + Handler: _TradingDataService_EstimateTransferFee_Handler, + }, + { + MethodName: "GetTotalTransferFeeDiscount", + Handler: _TradingDataService_GetTotalTransferFeeDiscount_Handler, + }, + { + MethodName: "ListGames", + Handler: _TradingDataService_ListGames_Handler, + }, + { + MethodName: "ListPartyMarginModes", + Handler: _TradingDataService_ListPartyMarginModes_Handler, + }, { MethodName: "Ping", Handler: _TradingDataService_Ping_Handler, @@ -5420,6 +5799,11 @@ var TradingDataService_ServiceDesc = grpc.ServiceDesc{ Handler: _TradingDataService_ObserveLedgerMovements_Handler, ServerStreams: true, }, + { + StreamName: "ObserveTransactionResults", + Handler: _TradingDataService_ObserveTransactionResults_Handler, + ServerStreams: true, + }, { StreamName: "ExportNetworkHistory", Handler: _TradingDataService_ExportNetworkHistory_Handler, diff --git a/protos/embed.go b/protos/embed.go index 84abdb0f49..5c76322704 100644 --- a/protos/embed.go +++ b/protos/embed.go @@ -1,14 +1,17 @@ -// Copyright (c) 2022 Gobalsky Labs Limited +// Copyright (C) 2023 Gobalsky Labs Limited // -// Use of this software is governed by the Business Source License included -// in the LICENSE.VEGA file and at https://www.mariadb.com/bsl11. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. // -// Change Date: 18 months from the later of the date of the first publicly -// available Distribution of this version of the repository, and 25 June 2022. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. // -// On the date above, in accordance with the Business Source License, use -// of this software will be governed by version 3 or later of the GNU General -// Public License. +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package protos diff --git a/protos/embed_test.go b/protos/embed_test.go index c2d8db489e..50f0a7b001 100644 --- a/protos/embed_test.go +++ b/protos/embed_test.go @@ -45,7 +45,7 @@ func Test_DataNodeBindings(t *testing.T) { t.Run("CoreBindings should return the core http bindings", func(t *testing.T) { bindings, err := protos.DataNodeBindings() require.NoError(t, err) - wantCount := 105 + wantCount := 113 assert.Len(t, bindings.HTTP.Rules, wantCount) diff --git a/protos/sources/blockexplorer/api/v1/blockexplorer.proto b/protos/sources/blockexplorer/api/v1/blockexplorer.proto index fe86ae9630..2ba778535c 100644 --- a/protos/sources/blockexplorer/api/v1/blockexplorer.proto +++ b/protos/sources/blockexplorer/api/v1/blockexplorer.proto @@ -11,7 +11,7 @@ option go_package = "code.vegaprotocol.io/vega/protos/blockexplorer/api/v1"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Vega block explorer APIs"; - version: "v0.73.0"; + version: "v0.74.0"; } schemes: [ HTTP, @@ -28,7 +28,7 @@ service BlockExplorerService { // List transactions // - // List transactions from the Vega blockchain + // List transactions from the Vega blockchain from the newest to the oldest transactions. rpc ListTransactions(ListTransactionsRequest) returns (ListTransactionsResponse) {} // Info @@ -59,12 +59,10 @@ message GetTransactionResponse { } message ListTransactionsRequest { - // Number of transactions to be returned from the blockchain. - // This is deprecated, use first and last instead. - uint32 limit = 1 [deprecated = true]; - // Optional cursor to paginate the request + reserved 1; + // Cursor to paginate the request. It can be used in conjunction with the `after` cursor. optional string before = 2; - // Optional cursor to paginate the request + // Cursor to paginate the request. It can be used in conjunction with the `before` cursor. optional string after = 3; // Filters to apply to the request map filters = 4; @@ -74,11 +72,17 @@ message ListTransactionsRequest { repeated string exclude_cmd_types = 6; // Party IDs filter, can be sender or receiver repeated string parties = 7; - // Number of transactions to be returned from the blockchain. Use in conjunction with the `after` cursor to paginate forwards. - // On its own, this will return the first `first` transactions. + // Number of transactions to be returned from the blockchain. + // Use in conjunction with the `after` cursor to paginate forwards. Paginating forwards means toward the most recent + // transactions. + // It cannot be used in conjunction with the `before` cursor. + // On its own, this will return the `first` most recent transactions. uint32 first = 8; - // Number of transactions to be returned from the blockchain. Use in conjunction with the `before` cursor to paginate backwards. - // On its own, this will return the last `last` transactions. + // Number of transactions to be returned from the blockchain. + // Use in conjunction with the `before` cursor to paginate backwards. Paginating forwards means toward the least recent + // transactions. + // It cannot be used in conjunction with the `after` cursor. + // On its own, this will return the `last` oldest transactions. uint32 last = 9; } diff --git a/protos/sources/data-node/api/v2/trading_data.proto b/protos/sources/data-node/api/v2/trading_data.proto index 4f87543440..5529296ffa 100644 --- a/protos/sources/data-node/api/v2/trading_data.proto +++ b/protos/sources/data-node/api/v2/trading_data.proto @@ -17,7 +17,7 @@ option go_package = "code.vegaprotocol.io/vega/protos/data-node/api/v2"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Vega data node APIs"; - version: "v0.73.0"; + version: "v0.74.0"; } schemes: [ HTTP, @@ -141,6 +141,11 @@ service TradingDataService { // - receiving account (market ID, asset ID, account type) // - sending AND receiving account // - transfer type either in addition to the above filters or as a standalone option + // Note: The date range is restricted to any 5 days. + // If no start or end date is provided, only ledger entries from the last 5 days will be returned. + // If a start and end date are provided, but the end date is more than 5 days after the start date, only data up to 5 days after the start date will be returned. + // If a start date is provided but no end date, the end date will be set to 5 days after the start date. + // If no start date is provided, but the end date is, the start date will be set to 5 days before the end date. rpc ListLedgerEntries(ListLedgerEntriesRequest) returns (ListLedgerEntriesResponse) { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Ledger entries"}; } @@ -390,18 +395,25 @@ service TradingDataService { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Parties"}; } + // List parties' profiles + // + // Get a list of profiles for multiple parties + rpc ListPartiesProfiles(ListPartiesProfilesRequest) returns (ListPartiesProfilesResponse) { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Parties"}; + } + // List margin levels // // Get a list margin levels that match the provided criteria. If no filter is provided, all margin levels will be returned. rpc ListMarginLevels(ListMarginLevelsRequest) returns (ListMarginLevelsResponse) { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Margin levels"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Margin"}; } // Observe margin levels // // Subscribe to a stream of margin levels updates rpc ObserveMarginLevels(ObserveMarginLevelsRequest) returns (stream ObserveMarginLevelsResponse) { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Margin levels"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Margin"}; } // List rewards @@ -589,12 +601,13 @@ service TradingDataService { // Estimate the margin that would be required for submitting this order rpc EstimateMargin(EstimateMarginRequest) returns (EstimateMarginResponse) { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Orders"}; + option deprecated = true; } // Estimate position // - // Estimate the margin that would be required for maintaining the specified position. Margin estimates are scaled to asset decimal places. - // If the optional collateral available argument is supplied, the response also contains the estimate of the liquidation price. + // Estimate the margin that would be required for maintaining the specified position, collateral increase needed to open the specified position and the liquidation price estimate. + // Margin estimates are scaled to asset decimal places. // Liquidation price estimates are scaled to asset decimal places by default, unless an argument to scale to market decimal places is specified in the request. rpc EstimatePosition(EstimatePositionRequest) returns (EstimatePositionResponse) { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Positions"}; @@ -806,6 +819,22 @@ service TradingDataService { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Teams"}; } + // List teams statistics + // + // Get the statistics of all teams, or for a specific team by using team ID, over a number of epochs. + // If a team does not have at least the number of epochs' worth of data, it is ignored. + rpc ListTeamsStatistics(ListTeamsStatisticsRequest) returns (ListTeamsStatisticsResponse) { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Teams"}; + } + + // List team members' statistics + // + // Get the statistics for all members of a given team, or for a specific member by using party ID, over a number of epochs. + // If a team does not have at least the number of epochs' worth of data, it is ignored. + rpc ListTeamMembersStatistics(ListTeamMembersStatisticsRequest) returns (ListTeamMembersStatisticsResponse) { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Teams"}; + } + // List team referees // // Get a list of all referees for a given team ID @@ -863,6 +892,41 @@ service TradingDataService { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Vesting"}; } + // Observe transaction results + // + // Subscribe to a stream of transaction results, optionally filtered by party/hash/status + rpc ObserveTransactionResults(ObserveTransactionResultsRequest) returns (stream ObserveTransactionResultsResponse) { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Transaction results"}; + } + + // Estimate transfer fee costs + // + // Estimate transfer fee costs with potential discount applied + rpc EstimateTransferFee(EstimateTransferFeeRequest) returns (EstimateTransferFeeResponse) { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Transfers"}; + } + + // Available transfer fee discount + // + // Returns available per party per asset transfer discount + rpc GetTotalTransferFeeDiscount(GetTotalTransferFeeDiscountRequest) returns (GetTotalTransferFeeDiscountResponse) { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Transfers"}; + } + + // List games + // + // Get a list of games and corresponding game data, given the provided filters + rpc ListGames(ListGamesRequest) returns (ListGamesResponse) { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Games"}; + } + + // List margin modes per party per market + // + // Get a list of all margin modes, or for a specific market ID, or party ID. + rpc ListPartyMarginModes(ListPartyMarginModesRequest) returns (ListPartyMarginModesResponse) { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Margin"}; + } + // Export network history as CSV // // Export CSV table data from network history between two block heights. @@ -1393,6 +1457,8 @@ message LedgerEntryFilter { AccountFilter to_account_filter = 3; // List of transfer types that is used for filtering sender and receiver accounts. repeated vega.TransferType transfer_types = 5; + // List ledger entries that are associated with a specific transfer ID. If provided, all other filters are ignored + optional string transfer_id = 6; } // List of fields for a ledger entry @@ -1718,6 +1784,23 @@ message ListTransfersRequest { optional Pagination pagination = 3; // Restrict transfers to those related to reward transfers. optional bool is_reward = 4; + // Epoch to filter from (included). If omitted, the range goes from the oldest epoch to the `to epoch`. + optional uint64 from_epoch = 5; + // Epoch to filter to (included). If omitted, the range goes from `from epoch` to the most recent epoch. + optional uint64 to_epoch = 6; + // Status to filter on. + optional vega.events.v1.Transfer.Status status = 7; + // Dispatch strategy's scope to filter for. + optional Scope scope = 8; + + // Defines the types of a dispatch strategy's scope the API can filter on. + enum Scope { + SCOPE_UNSPECIFIED = 0; + // Matches transfers that have dispatch strategy scope of individual set. + SCOPE_INDIVIDUAL = 1; + // Matches transfers that have dispatch strategy scope of team set. + SCOPE_TEAM = 2; + } } // Response that is received when listing transfers @@ -1757,10 +1840,8 @@ message GetTransferRequest { // Response that is received when querying transfers by ID message GetTransferResponse { - // Transfer requested by ID. - vega.events.v1.Transfer transfer = 1; - // Fees paid for this transfer. - repeated vega.events.v1.TransferFees fees = 2; + // Transfer and its fees requested by ID. + TransferNode transfer_node = 1; } // -- Network Limits -- @@ -2371,6 +2452,37 @@ message PartyConnection { PageInfo page_info = 2; } +// Request to list profiles by party ID. +message ListPartiesProfilesRequest { + // Restrict the returned profiles to only the given party IDs. If not set, + // all parties' profiles will be returned. + repeated string parties = 1; + // Pagination control. + Pagination pagination = 2; +} + +// Response from listing parties' profiles. +message ListPartiesProfilesResponse { + // Page of profile data and corresponding page information. + PartiesProfilesConnection profiles = 1; +} + +// Party's profile data with the corresponding cursor. +message PartyProfileEdge { + // Data associated with a party's profile. + vega.PartyProfile node = 1; + // Cursor that can be used to fetch further pages. + string cursor = 2; +} + +// Page of profile data per party and corresponding page information. +message PartiesProfilesConnection { + // Page of profiles and their corresponding cursors. + repeated PartyProfileEdge edges = 1; + // Page information that is used for fetching further pages. + PageInfo page_info = 2; +} + // Order data with the corresponding cursor. message OrderEdge { // Data associated with an order submitted to a Vega node. @@ -2447,6 +2559,10 @@ message ListRewardsRequest { optional uint64 from_epoch = 4; // Restrict rewards data to those that were paid up to and including the given epoch ID. optional uint64 to_epoch = 5; + // Filter for rewards paid if the party is a member of the given team + optional string team_id = 6; + // Filter for rewards paid if the party participated in the given game + optional string game_id = 7; } // Response for listing reward details for a single party @@ -3765,38 +3881,60 @@ message PingResponse {} // Basic description of an order. message OrderInfo { // Side for the order, e.g. buy or sell. - vega.Side side = 1; + vega.Side side = 1 [(google.api.field_behavior) = REQUIRED]; // Price for the order. The price is an unsigned integer. For example `123456` is a correctly // formatted price of `1.23456` assuming market configured to 5 decimal places. - string price = 2; + string price = 2 [(google.api.field_behavior) = REQUIRED]; // Size remaining. - uint64 remaining = 3; + uint64 remaining = 3 [(google.api.field_behavior) = REQUIRED]; // Boolean that indicates if it is a market order. - bool is_market_order = 4; + bool is_market_order = 4 [(google.api.field_behavior) = REQUIRED]; } -// Request for the estimate of the margin level and, if available collateral is provided, liquidation price for the specified position. +// Request for the estimated margin level, margin account balance change, and liquidation price for the specified position. message EstimatePositionRequest { // Market ID to estimate position for. string market_id = 1 [(google.api.field_behavior) = REQUIRED]; // Open volume. This field is a signed integer scaled to the market's position decimal places. // A negative number denotes a short position. int64 open_volume = 2 [(google.api.field_behavior) = REQUIRED]; + // Average entry price corresponding to the open volume. The price is an unsigned integer. For example `123456` is a correctly + // formatted price of `1.23456` assuming market configured to 5 decimal places. + string average_entry_price = 3 [(google.api.field_behavior) = REQUIRED]; // Open and/or hypothetical orders. - repeated OrderInfo orders = 3; - // Collateral available for the position. If provided then response will contain the liquidation price estimate. - // Collateral available needs to be provided scaled to asset decimal places. Liquidation price returned is scaled to asset decimal places by default. - optional string collateral_available = 4; + repeated OrderInfo orders = 4; + // Margin account balance. Needs to be provided scaled to asset decimal places. + string margin_account_balance = 5 [(google.api.field_behavior) = REQUIRED]; + // General account balance. Needs to be provided scaled to asset decimal places. + string general_account_balance = 6 [(google.api.field_behavior) = REQUIRED]; + // Order margin account balance. Needs to be provided scaled to asset decimal places. + string order_margin_account_balance = 7 [(google.api.field_behavior) = REQUIRED]; + // Margin mode for the party, cross margin or isolated margin. + vega.MarginMode margin_mode = 8 [(google.api.field_behavior) = REQUIRED]; + // Margin factor to be used along with isolated margin mode + optional string margin_factor = 9; + // Whether the estimated position margin increase should be included in available collateral for liquidation price calculation in isolated margin mode. + optional bool include_required_position_margin_in_available_collateral = 10; // Whether the liquidation price estimates should be scaled to market decimal places or by asset decimal places. If not set, asset decimal places are used. - optional bool scale_liquidation_price_to_market_decimals = 5; + optional bool scale_liquidation_price_to_market_decimals = 11; } -// Response for the estimate of the margin level and, if available collateral was provided in the request, liquidation price for the specified position. +// Response for the estimated margin level, margin account balance change, and liquidation price for the specified position. message EstimatePositionResponse { // Margin level range estimate for the specified position. MarginEstimate margin = 1; + // Estimated margin account balance increase. + CollateralIncreaseEstimate collateral_increase_estimate = 2; // Liquidation price range estimate for the specified position. Only populated if available collateral was specified in the request. - LiquidationEstimate liquidation = 2; + LiquidationEstimate liquidation = 3; +} + +// Estimates the additional funds needed to support the specified position +message CollateralIncreaseEstimate { + // Estimate assuming slippage cap is applied + string worst_case = 1; + // Estimate assuming no slippage + string best_case = 2; } // Margin level estimate for both worst and best case possible. @@ -3866,6 +4004,8 @@ message ReferralSet { int64 created_at = 3; // Timestamp, in Unix nanoseconds, when the set was updated. int64 updated_at = 4; + // Current number of members in the referral set. + uint64 total_members = 5; } // Referral set data with the corresponding cursor. @@ -3960,7 +4100,7 @@ message GetReferralSetStatsRequest { optional string referral_set_id = 1; // Epoch to get referral set statistics for. If not set, the last complete epoch is used. optional uint64 at_epoch = 2; - // Restrict referral set statisitcs to those for the given referee. + // Restrict referral set statistics to those for the given referee. optional string referee = 3; // Pagination controls. optional Pagination pagination = 4; @@ -4027,10 +4167,16 @@ message Team { optional string avatar_url = 5; // Timestamp in Unix nanoseconds when the team was created. int64 created_at = 6; - // Whether or not the team is closed to new party members. + // Whether or not the team is closed to new party members. When closed, only parties specified in the allow list can + // join the team. bool closed = 7; // Epoch at which the team was created. uint64 created_at_epoch = 8; + // List of public keys that are allowed to join the team. + // Only applicable to closed teams. + repeated string allow_list = 9; + // Current number of members in the team. + uint64 total_members = 10; } // Team data item with the corresponding cursor. @@ -4065,6 +4211,132 @@ message ListTeamsResponse { TeamConnection teams = 1; } +// Request to list all teams' statistics. +message ListTeamsStatisticsRequest { + // Restrict team statistics to those with the given team ID. + optional string team_id = 1; + // Defines the number of past epochs to aggregate data from. By default, it takes + // the last 10 epochs. + optional uint64 aggregation_epochs = 2; + // Pagination controls. + optional Pagination pagination = 3; +} + +// Response for the list teams' statistics request containing the statistics. +message ListTeamsStatisticsResponse { + // Page of teams' statistics data and corresponding page information. + TeamsStatisticsConnection statistics = 1; +} + +// Page of teams' statistics and corresponding page information. +message TeamsStatisticsConnection { + // Page of team data and their corresponding cursors. + repeated TeamStatisticsEdge edges = 1; + // Page information that is used for fetching further pages. + PageInfo page_info = 2; +} + +// Team data item with the corresponding cursor. +message TeamStatisticsEdge { + // Team's statistics data. + TeamStatistics node = 1; + // Cursor that can be used to fetch further pages. + string cursor = 2; +} + +// Team's statistics record containing the team information. +message TeamStatistics { + // Team ID the statistics are related to. + string team_id = 1; + // Total of volume accumulated over the requested epoch period, expressed in + // quantum value. + string total_quantum_volume = 2; + // Total of rewards accumulated over the requested epoch period, expressed in + // quantum value. + string total_quantum_rewards = 3; + // List of rewards over the requested epoch period, expressed in quantum + // value for each epoch. + repeated QuantumRewardsPerEpoch quantum_rewards = 4; + // Total of games played. + uint64 total_games_played = 5; + // List of games played over the requested epoch period. + repeated string games_played = 6; + // List of volumes over the requested epoch period, expressed in quantum + // value for each epoch. + repeated QuantumVolumesPerEpoch quantum_volumes = 7; +} + +message QuantumRewardsPerEpoch { + // Epoch for which this information is valid. + uint64 epoch = 1; + // Total rewards accumulated over the epoch period, expressed in quantum value. + string total_quantum_rewards = 2; +} + +message QuantumVolumesPerEpoch { + // Epoch for which this information is valid. + uint64 epoch = 1; + // Total volumes accumulated over the epoch period, expressed in quantum value. + string total_quantum_volumes = 2; +} + +// Request to list all team members' statistics. +message ListTeamMembersStatisticsRequest { + // Restrict team statistics to those with the given team ID. + string team_id = 1; + // Restrict team members' statistics to those with the given party ID. + optional string party_id = 2; + // Defines the number of past epochs to aggregate data from. By default, it takes + // the last 10 epochs. + optional uint64 aggregation_epochs = 3; + // Pagination controls. + optional Pagination pagination = 4; +} + +// Response for the list team members' statistics request containing the statistics. +message ListTeamMembersStatisticsResponse { + // Page of team members' statistics data and corresponding page information. + TeamMembersStatisticsConnection statistics = 1; +} + +// Page of team members' statistics and corresponding page information. +message TeamMembersStatisticsConnection { + // Page of team member data and their corresponding cursors. + repeated TeamMemberStatisticsEdge edges = 1; + // Page information that is used for fetching further pages. + PageInfo page_info = 2; +} + +// Team member data item with the corresponding cursor. +message TeamMemberStatisticsEdge { + // Team member's statistics data. + TeamMemberStatistics node = 1; + // Cursor that can be used to fetch further pages. + string cursor = 2; +} + +// Team member's statistics record containing the team member's information. +message TeamMemberStatistics { + // Party ID the statistics are related to. + string party_id = 1; + // Total of volume accumulated over the requested epoch period, expressed in + // quantum value. + string total_quantum_volume = 2; + // Total of rewards accumulated over the requested epoch period, expressed in + // quantum value. + string total_quantum_rewards = 3; + // List of rewards over the requested epoch period, expressed in quantum + // value for each epoch. + repeated QuantumRewardsPerEpoch quantum_rewards = 4; + // Total number of games played. + uint64 total_games_played = 5; + // List of games played over the requested epoch period. + repeated string games_played = 6; + // List of volumes over the requested epoch period, expressed in quantum + // value for each epoch. + repeated QuantumVolumesPerEpoch quantum_volumes = 7; +} + // Request that is sent when listing the referees for a given team. message ListTeamRefereesRequest { // Team ID to list referees for. @@ -4171,7 +4443,7 @@ message GetFeesStatsForPartyRequest { string party_id = 1; // Restrict fees statistics to those related to the given asset. optional string asset_id = 2; - // Epoch to filter from (included). If omitted, `to epoch` must not be set. If both omitted, the most recent epoch's data is returned. + // Epoch to filter from (included). If omitted, the range goes from the oldest epoch to the `to epoch`. optional uint64 from_epoch = 3; // Epoch to filter to (included). If omitted, the range goes from `from epoch` to the most recent epoch. optional uint64 to_epoch = 4; @@ -4267,3 +4539,230 @@ message FeesStatsForParty { // Total maker fees received by the maker side. string total_maker_fees_received = 5; } + +// Request to subscribe to a stream of users' transaction results +message ObserveTransactionResultsRequest { + // Request fields party ID, hash and status are all optional filters: + // If omitted all transaction results, for all parties with all hashes and states will be returned on the stream + // If party ID is given, transaction results from that party will be returned on the stream + // If hash is given, transaction result with that hash will be returned on the stream + // If status is given, transaction result with that status (true/false - success failure) will be returned on the stream + // All filters can be combined. + + // Restrict the transaction results streamed to those made by the given parties. + repeated string party_ids = 1; + // Restrict the transaction results streamed to those with given hashes. + repeated string hashes = 2; + // Restrict the transaction results streamed to those with given status true/false (success/failure). + optional bool status = 3; +} + +// Stream of transaction results +message ObserveTransactionResultsResponse { + // List of 0 or more transaction results. + repeated vega.events.v1.TransactionResult transaction_results = 1; +} + +// Request an estimation of transfer fee and discount +message EstimateTransferFeeRequest { + // Sender's ID. + string from_account = 1; + // Type of account sent from. + vega.AccountType from_account_type = 2; + // Receiver's ID. + string to_account = 3; + // Amount to be transferred. + string amount = 4; + // Asset ID for the asset associated with the transaction. + string asset_id = 5; +} + +// Results of estimation of transfer fee and the fee discount +message EstimateTransferFeeResponse { + // Estimated fee for the transfer. + string fee = 1; + // Discount applied to the fee. + string discount = 2; +} + +// Get total transfer fee discount available +message GetTotalTransferFeeDiscountRequest { + // ID of party eligible for the discount. + string party_id = 1; + // ID of asset to associated with the discount. + string asset_id = 5; +} + +// Returns total transfer fee discount available +message GetTotalTransferFeeDiscountResponse { + // Total per party per asset discount available. + string total_discount = 2; +} + +// Request to retrieve games data. +message ListGamesRequest { + // Game ID to filter for. + optional string game_id = 1; + // First epoch to retrieve game data from. If not provided, defaults to the last epoch minus 30, + // or the first epoch available if not enough epochs have passed. + optional uint64 epoch_from = 2; + // Last epoch to retrieve game data to (inclusive). If not provided, defaults to the last epoch. + optional uint64 epoch_to = 3; + // Entity scope to filter games for, i.e. team games or individual games only + optional vega.EntityScope entity_scope = 4; + // Pagination controls. + optional Pagination pagination = 5; +} + +// Response containing games data. +message ListGamesResponse { + // Page of games data and corresponding page information. + GamesConnection games = 1; +} + +// Page of games data and corresponding page information. +message GamesConnection { + // Page of games data and their corresponding cursors. + repeated GameEdge edges = 1; + // Page information that is used for fetching further pages. + PageInfo page_info = 2; +} + +// Game information and corresponding cursor. +message GameEdge { + // Game data. + Game node = 1; + // Cursor that can be used to fetch further pages. + string cursor = 2; +} + +// Data relating to a game. +message Game { + // Unique ID of the game + string id = 1; + // Epoch at which the last game metrics were captured. + uint64 epoch = 2; + // The number of participants in the game. + uint64 participants = 3; + // Entities participating in a game and their corresponding metrics. + oneof entities { + // Team entities that are participating in the game + TeamGameEntities team = 4; + // Individual entities that are participating in the game + IndividualGameEntities individual = 5; + } + // ID of the asset rewarded for involvement in the game. + string reward_asset_id = 6; +} + +// List of teams that are participating in a game +message TeamGameEntities { + // List of teams, the participant members of a team, and the metrics associated with each participant. + repeated TeamGameEntity team = 1; +} + +// List of individuals that are participating in a game +message IndividualGameEntities { + // List of individual party IDs, and the metrics associated with each participant. + repeated IndividualGameEntity individual = 1; +} + +// Data relating to a team participating in a game. +message TeamGameEntity { + // Team participation breakdown + TeamGameParticipation team = 1; + // Rank of the team in the game + uint64 rank = 2; + // Volume traded by the team + string volume = 3; + // Reward metric applied to the team + vega.DispatchMetric reward_metric = 4; + // Reward earned by the team + string reward_earned = 5; + // Total rewards earned by the individual for the team + string total_rewards_earned = 6; + // Rewards earned by the team in quantum value + string reward_earned_quantum = 7; + // Total rewards earned by the team in quantum value + string total_rewards_earned_quantum = 8; +} + +// Breakdown of a team's participation in a game. +message TeamGameParticipation { + // ID of the team participating + string team_id = 1; + // Individual team member metrics for their participation in the game + repeated IndividualGameEntity members_participating = 2; +} + +// Data relating to an individual participating in a game. +// This can be used for both team members who are participating in a team game, +// or individuals participating in an individual entity game. +message IndividualGameEntity { + // Party ID of the individual participating + string individual = 1; + // Rank of the individual either in the game or within their team. + uint64 rank = 2; + // Volume traded by the individual + string volume = 3; + // Reward metric applied to the individual + vega.DispatchMetric reward_metric = 4; + // Reward earned by the individual during the epoch + string reward_earned = 5; + // Total rewards earned by the individual for the game + string total_rewards_earned = 6; + // Rewards earned by the individual in quantum value + string reward_earned_quantum = 7; + // Total rewards earned by the individual in quantum value + string total_rewards_earned_quantum = 8; +} + +// Request to retrieve party margin modes. +message ListPartyMarginModesRequest { + // Market ID to filter for. + optional string market_id = 1; + // Party ID to filter for. + optional string party_id = 2; + // Pagination controls. + optional Pagination pagination = 5; +} + +// Response containing party margin modes. +message ListPartyMarginModesResponse { + // Page of party margin modes data and corresponding page information. + PartyMarginModesConnection party_margin_modes = 1; +} + +// Page of party margin modes data and corresponding page information. +message PartyMarginModesConnection { + // Page of party margin modes data and their corresponding cursors. + repeated PartyMarginModeEdge edges = 1; + // Page information that is used for fetching further pages. + PageInfo page_info = 2; +} + +// Party margin mode information and corresponding cursor. +message PartyMarginModeEdge { + // Party margin mode data. + PartyMarginMode node = 1; + // Cursor that can be used to fetch further pages. + string cursor = 2; +} + +// Margin mode selected for the given party and market. +message PartyMarginMode { + // Unique ID of the market. + string market_id = 1; + // Unique ID of the party. + string party_id = 2; + // Selected margin mode. + vega.MarginMode margin_mode = 3; + // Margin factor for the market. Isolated mode only. + optional string margin_factor = 4; + // Minimum theoretical margin factor for the market. Isolated mode only. + optional string min_theoretical_margin_factor = 5; + // Maximum theoretical leverage for the market. Isolated mode only. + optional string max_theoretical_leverage = 6; + // Epoch at which the update happened. + uint64 at_epoch = 7; +} diff --git a/protos/sources/data-node/grpc-rest-bindings.yml b/protos/sources/data-node/grpc-rest-bindings.yml index 160cfd95ee..4da48cc070 100644 --- a/protos/sources/data-node/grpc-rest-bindings.yml +++ b/protos/sources/data-node/grpc-rest-bindings.yml @@ -83,6 +83,8 @@ http: get: "/api/v2/party/{party_id}" - selector: datanode.api.v2.TradingDataService.ListParties get: "/api/v2/parties" + - selector: datanode.api.v2.TradingDataService.ListPartiesProfiles + get: "/api/v2/parties/profiles" - selector: datanode.api.v2.TradingDataService.ListMarginLevels get: "/api/v2/margin/levels" - selector: datanode.api.v2.TradingDataService.ListRewards @@ -181,6 +183,10 @@ http: get: "/api/v2/referral-sets/stats" - selector: datanode.api.v2.TradingDataService.ListTeams get: "/api/v2/teams" + - selector: datanode.api.v2.TradingDataService.ListTeamsStatistics + get: "/api/v2/teams/stats" + - selector: datanode.api.v2.TradingDataService.ListTeamMembersStatistics + get: "/api/v2/teams/{team_id}/stats" - selector: datanode.api.v2.TradingDataService.ListTeamReferees get: "/api/v2/teams/referees/{team_id}" - selector: datanode.api.v2.TradingDataService.ListTeamRefereeHistory @@ -193,6 +199,14 @@ http: get: "/api/v2/volume-discount-programs/current" - selector: datanode.api.v2.TradingDataService.GetVolumeDiscountStats get: "/api/v2/volume-discount-programs/stats" + - selector: datanode.api.v2.TradingDataService.GetTotalTransferFeeDiscount + get: "/api/v2/transfers/total-fee-discount" + - selector: datanode.api.v2.TradingDataService.EstimateTransferFee + get: "/api/v2/transfers/estimate-fee" + - selector: datanode.api.v2.TradingDataService.ListGames + get: "/api/v2/games" + - selector: datanode.api.v2.TradingDataService.ListPartyMarginModes + get: "/api/v2/margin-modes" # websockets @@ -224,3 +238,5 @@ http: get: "/api/v2/stream/ledger/movements" - selector: datanode.api.v2.TradingDataService.ObserveLiquidityProvisions get: "/api/v2/stream/liquidity-provisions" + - selector: datanode.api.v2.TradingDataService.ObserveTransactionResults + get: "/api/v2/stream/transaction-results" diff --git a/protos/sources/vega/api/v1/core.proto b/protos/sources/vega/api/v1/core.proto index 64a039a311..9611fc372f 100644 --- a/protos/sources/vega/api/v1/core.proto +++ b/protos/sources/vega/api/v1/core.proto @@ -12,7 +12,7 @@ option go_package = "code.vegaprotocol.io/vega/protos/vega/api/v1"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Vega core APIs"; - version: "v0.73.0"; + version: "v0.74.0"; } schemes: [ HTTP, diff --git a/protos/sources/vega/api/v1/corestate.proto b/protos/sources/vega/api/v1/corestate.proto index 6a28369a14..942a7876ab 100644 --- a/protos/sources/vega/api/v1/corestate.proto +++ b/protos/sources/vega/api/v1/corestate.proto @@ -13,7 +13,7 @@ option go_package = "code.vegaprotocol.io/vega/protos/vega/api/v1"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Vega core state APIs"; - version: "v0.73.0"; + version: "v0.74.0"; } schemes: [ HTTP, @@ -25,62 +25,62 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { service CoreStateService { // Accounts list // - // Get a list of accounts + // Get a list of accounts. This endpoint may not be exposed by mainnet nodes. rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse); // Assets list // - // Get a list of assets + // Get a list of assets. This endpoint may not be exposed by mainnet nodes. rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse); // Network parameters list // - // Get a list of network parameters + // Get a list of network parameters. This endpoint may not be exposed by mainnet nodes. rpc ListNetworkParameters(ListNetworkParametersRequest) returns (ListNetworkParametersResponse); // Network limits list // - // Get a list of network limits + // Get a list of network limits. This endpoint may not be exposed by mainnet nodes. rpc ListNetworkLimits(ListNetworkLimitsRequest) returns (ListNetworkLimitsResponse); // Parties list // - // Get a list of parties + // Get a list of parties. This endpoint may not be exposed by mainnet nodes. rpc ListParties(ListPartiesRequest) returns (ListPartiesResponse); // Validators list // - // Get a list of validators + // Get a list of validators. This endpoint may not be exposed by mainnet nodes. rpc ListValidators(ListValidatorsRequest) returns (ListValidatorsResponse); // Markets list // - // Get a list of markets + // Get a list of markets. This endpoint may not be exposed by mainnet nodes. rpc ListMarkets(ListMarketsRequest) returns (ListMarketsResponse); // Proposals list // - // Get a list of proposals + // Get a list of proposals. This endpoint may not be exposed by mainnet nodes. rpc ListProposals(ListProposalsRequest) returns (ListProposalsResponse); // Markets data list // - // Get a list of markets data + // Get a list of markets' data. This endpoint may not be exposed by mainnet nodes. rpc ListMarketsData(ListMarketsDataRequest) returns (ListMarketsDataResponse); // Votes list // - // Get a list of votes + // Get a list of votes. This endpoint may not be exposed by mainnet nodes. rpc ListVotes(ListVotesRequest) returns (ListVotesResponse); // Parties stake list // - // Get a list of parties stake + // Get a list of parties' stake. This endpoint may not be exposed by mainnet nodes. rpc ListPartiesStake(ListPartiesStakeRequest) returns (ListPartiesStakeResponse); // Delegations list // - // Get a list of delegations + // Get a list of delegations. This endpoint may not be exposed by mainnet nodes. rpc ListDelegations(ListDelegationsRequest) returns (ListDelegationsResponse); } diff --git a/protos/sources/vega/chain_events.proto b/protos/sources/vega/chain_events.proto index 209b768c20..23611b5e9a 100644 --- a/protos/sources/vega/chain_events.proto +++ b/protos/sources/vega/chain_events.proto @@ -16,6 +16,8 @@ message EthContractCallEvent { bytes result = 4; // Error message if the call failed. optional string error = 5; + // Source chain for this chain event. + optional uint64 source_chain_id = 6; } // Deposit for a Vega built-in asset diff --git a/protos/sources/vega/checkpoint/v1/checkpoint.proto b/protos/sources/vega/checkpoint/v1/checkpoint.proto index d8b98a21c8..a7968e31b8 100644 --- a/protos/sources/vega/checkpoint/v1/checkpoint.proto +++ b/protos/sources/vega/checkpoint/v1/checkpoint.proto @@ -208,6 +208,7 @@ message MultisigControl { message MarketTracker { repeated MarketActivityTracker market_activity = 1; repeated TakerNotionalVolume taker_notional_volume = 2; + repeated MarketToPartyTakerNotionalVolume market_to_party_taker_notional_volume = 3; } message MarketActivityTracker { @@ -261,6 +262,11 @@ message TakerNotionalVolume { bytes volume = 2; } +message MarketToPartyTakerNotionalVolume { + string market = 1; + repeated TakerNotionalVolume taker_notional_volume = 2; +} + message EpochReturnsData { repeated ReturnsData returns = 1; } diff --git a/protos/sources/vega/commands/v1/commands.proto b/protos/sources/vega/commands/v1/commands.proto index 014958e071..2bfd5ad886 100644 --- a/protos/sources/vega/commands/v1/commands.proto +++ b/protos/sources/vega/commands/v1/commands.proto @@ -26,6 +26,8 @@ message BatchMarketInstructions { repeated StopOrdersCancellation stop_orders_cancellation = 4; // List of stop order submissions to be processed sequentially. repeated StopOrdersSubmission stop_orders_submission = 5; + // Update margin mode instruction + repeated UpdateMarginMode update_margin_mode = 6; } // A command that allows a party to submit a stop order for a given market. @@ -46,6 +48,10 @@ message StopOrderSetup { optional int64 expires_at = 2; // Strategy to adopt if the expiry time is reached. optional vega.StopOrder.ExpiryStrategy expiry_strategy = 3; + // Indicates if this order is linked to an order or position to derive the order size + optional vega.StopOrder.SizeOverrideSetting size_override_setting = 4; + // If this order is linked to a position, provide an optional scaling factor + optional vega.StopOrder.SizeOverrideValue size_override_value = 5; // Trigger that will need to be breached for the order to be submitted to the book. oneof trigger { @@ -106,6 +112,23 @@ message IcebergOpts { uint64 minimum_visible_size = 2; } +message UpdateMarginMode { + enum Mode { + // Never valid. + MODE_UNSPECIFIED = 0; + // Cross margin mode - margin is dynamically acquired and released as a position is marked to market + MODE_CROSS_MARGIN = 1; + // Isolated margin mode - margin for any newly opened position volume is transferred to the margin account when the trade is executed + MODE_ISOLATED_MARGIN = 2; + } + // Market to change margin mode for. + string market_id = 1; + // Margin mode to use. + Mode mode = 2; + // Margin factor to use for margin in isolated mode. It is a multiplier that defines how much margin needs to be set aside + optional string margin_factor = 3; +} + // A command that instructs the network to cancel orders, active or partially filled, that were previously submitted by the sender of this transaction. // It is not possible to cancel another party's order with this command. message OrderCancellation { @@ -130,6 +153,7 @@ message OrderAmendment { // - To increase the size from the current value, set a positive integer value // - To leave the size unchanged set a value of zero // This field needs to be scaled using the market's position decimal places. + // If specified, size must not be set. int64 size_delta = 4; // Timestamp, in Unix nanoseconds, for the new expiry time for the order. optional int64 expires_at = 5; @@ -140,6 +164,14 @@ message OrderAmendment { string pegged_offset = 7; // New pegged reference for the order. vega.PeggedReference pegged_reference = 8; + // New size for the order. + // Amending the size causes the size and remaining part of the order to be changed by the difference between the original and amended size. + // - Specifying a size smaller than the current size leaves the order at its current order book position. + // - Specifying a size larger than the current size removes and reinserts the order at the back of the price level. + // - Specifying a size that results in the remaining part of the order being reduced to zero cancels the order. + // This field is an unsigned integer scaled to the market's decimal places. + // If specified, size_delta must be set to 0. + optional uint64 size = 9; } // A command that indicates to the network the party's intention to supply liquidity to the given market and become a liquidity provider. @@ -200,6 +232,25 @@ message ProposalSubmission { vega.ProposalRationale rationale = 3; } +// Terms for a batch governance proposal submission +message BatchProposalSubmissionTerms { + // Closing timestamp in Unix time; adheres to `minClose` and `maxClose` limits. + int64 closing_timestamp = 1; + // List of individual changes included in the batch proposal. + repeated vega.BatchProposalTermsChange changes = 2; +} + +// Command that allows a token holder to submit a batch governance proposal that can be voted on by any other token holders, and eventually enacted on the Vega network. +// For example this command can be used to propose a new market and a network parameter change with it. +message BatchProposalSubmission { + // Arbitrary human-readable reference identifying the proposal. + string reference = 1; + // Proposal terms containing the type and details of the proposal, as well as time spans for voting and enactment. + BatchProposalSubmissionTerms terms = 2; + // Rationale behind a proposal. + vega.ProposalRationale rationale = 3; +} + // Command that allows a token holder to vote for or against an active governance proposal. message VoteSubmission { // Submit vote for the specified proposal ID. @@ -317,6 +368,10 @@ message CreateReferralSet { optional string avatar_url = 12; // Whether or not the team is closed to new party members. bool closed = 13; + // List of public keys that are allowed to join the team. + // Only applicable to closed teams. Removing a party from the allow list does not remove + // the party from the team. + repeated string allow_list = 14; } } @@ -337,8 +392,13 @@ message UpdateReferralSet { optional string team_url = 11; // New link to an avatar for the team. optional string avatar_url = 12; - // Whether or not the team is closed to new party members. + // Whether or not the team is closed to new party members. When closed, only parties specified in the allow list can + // join the team. optional bool closed = 13; + // List of public keys that are allowed to join the team. + // Only applicable to closed teams. Removing a party from the allow list does not remove + // the party from the team. + repeated string allow_list = 14; } } @@ -349,3 +409,20 @@ message ApplyReferralCode { // Referral code, normally the referral set ID, for the party to join. string id = 1; } + +// Command that allows the submitter to join a team or change teams if they are already a member of a team. +message JoinTeam { + // ID of the team to join, this is the same as the referral code used to generate the team. + string id = 1; +} + +// Command to associate metadata to a public key, known as a party ID. +// Partial update is not supported, meaning previous values must be included in +// the update, otherwise they are removed. +message UpdatePartyProfile { + // Alias given to the party. It must be unique network-wide. + string alias = 1; + // Freeform data to associate to the party. + // Support a maximum of 10 entries. + repeated vega.Metadata metadata = 2; +} diff --git a/protos/sources/vega/commands/v1/transaction.proto b/protos/sources/vega/commands/v1/transaction.proto index d1a6eadbdf..4337382755 100644 --- a/protos/sources/vega/commands/v1/transaction.proto +++ b/protos/sources/vega/commands/v1/transaction.proto @@ -61,6 +61,14 @@ message InputData { UpdateReferralSet update_referral_set = 1019; // Command to apply a referral code. ApplyReferralCode apply_referral_code = 1020; + // Command to update the margin mode of a party in a market. + UpdateMarginMode update_margin_mode = 1021; + // Command to join a team. + JoinTeam join_team = 1022; + // Command to submit a batch governance proposal. + BatchProposalSubmission batch_proposal_submission = 1023; + // Command to update a party's profile. + UpdatePartyProfile update_party_profile = 1024; // Validator command sent automatically to vote on that validity of an external resource. NodeVote node_vote = 2002; // Validator command sent automatically to provide signatures for the Ethereum bridge. diff --git a/protos/sources/vega/data_source.proto b/protos/sources/vega/data_source.proto index 85158cc25e..d6517f1569 100644 --- a/protos/sources/vega/data_source.proto +++ b/protos/sources/vega/data_source.proto @@ -18,6 +18,13 @@ message DataSourceDefinition { } } +// Describes which property of the data source data is to be +// used for price source. +message SpecBindingForCompositePrice { + // The property name of price. + string price_source_property = 1; +} + // Internal data source used for emitting timestamps. message DataSourceSpecConfigurationTime { // Conditions that the timestamps should meet in order to be considered. @@ -96,6 +103,9 @@ message EthCallSpec { // in the second result returned from the contract for a structure with a key // called 'price' and use that if it exists. repeated Normaliser normalisers = 8; + + // The ID of the EVM based chain which is to be used to source the oracle data. + uint64 source_chain_id = 9; } message Normaliser { diff --git a/protos/sources/vega/events/v1/events.proto b/protos/sources/vega/events/v1/events.proto index 18f18ef576..d666eaadfd 100644 --- a/protos/sources/vega/events/v1/events.proto +++ b/protos/sources/vega/events/v1/events.proto @@ -87,6 +87,8 @@ message PartyVestingStats { // Fees rewards and discounts paid / received per parties during an epoch message FeesStats { + reserved 10; + // Market the fees were paid in string market = 1; // Settlement asset of the market. @@ -105,6 +107,8 @@ message FeesStats { repeated PartyAmount total_maker_fees_received = 8; // Maker fees paid by all trade aggressors, and which makers the fees were paid to. repeated MakerFeesGenerated maker_fees_generated = 9; + // Total trading fees received and paid by the party. + repeated PartyAmount total_fees_paid_and_received = 11; } // Rewards generated for referrers by each of their referees @@ -292,6 +296,9 @@ message Transfer { Status status = 9; int64 timestamp = 10; optional string reason = 11; + // ID of the game this transfer was made in relation to. A transfer is made to members of a team + // or participants who take part in a game and are rewarded for their participation + optional string game_id = 12; oneof kind { OneOffTransfer one_off = 101; @@ -416,8 +423,10 @@ message RewardPayoutEvent { string percent_of_total_reward = 5; int64 timestamp = 6; string reward_type = 7; - string market = 8; + reserved 8; string locked_until_epoch = 9; + string quantum_amount = 10; + optional string game_id = 11; } // ValidatorScoreEvent is the score a validator gets for a given epoch @@ -456,6 +465,19 @@ message TransferFees { string amount = 2; // Epoch when the transfer was dispatched, and fees were paid. uint64 epoch = 3; + // Amount that was subtracted from the transfer fee based on available discounts. + string discount_applied = 4; +} + +message TransferFeesDiscount { + // Party that the transfer fee discount applies to. + string party = 1; + // Asset that the transfer fee discount is relevant to. + string asset = 2; + // Amount that the transfer fee was discounted by. + string amount = 3; + // Epoch in which the discount was first available. + uint64 epoch = 4; } message TransactionResult { @@ -493,6 +515,10 @@ message TransactionResult { commands.v1.CreateReferralSet create_referral_set = 124; commands.v1.UpdateReferralSet update_referral_set = 125; commands.v1.ApplyReferralCode apply_referral_code = 126; + commands.v1.UpdateMarginMode update_margin_mode = 127; + commands.v1.JoinTeam join_team = 128; + commands.v1.BatchProposalSubmission batch_proposal = 129; + commands.v1.UpdatePartyProfile update_party_profile = 130; } // extra details about the transaction processing @@ -865,6 +891,8 @@ message TeamCreated { bool closed = 7; // Epoch at which the team was created. uint64 at_epoch = 8; + // List of public keys that are allowed to join the team. + repeated string allow_list = 9; } message TeamUpdated { @@ -878,6 +906,8 @@ message TeamUpdated { optional string avatar_url = 4; // Tells if a party can join the team or not. bool closed = 5; + // List of public keys that are allowed to join the team. + repeated string allow_list = 6; } message RefereeSwitchedTeam { @@ -1023,12 +1053,56 @@ message PaidLiquidityFeesStats { string asset = 2; // Epoch for which these stats where valid. uint64 epoch_seq = 3; - // Total fees paid accross all parties. + // Total fees paid across all parties. string total_fees_paid = 4; // Fees paid per party. repeated PartyAmount fees_paid_per_party = 5; } +message PartyMarginModeUpdated { + // Unique ID of the market in which the update happened. + string market_id = 1; + // Unique ID of the party that updated their margin mode. + string party_id = 2; + // Updated margin mode. + vega.MarginMode margin_mode = 3; + // Margin factor for the market. Isolated mode only. + optional string margin_factor = 4; + // Minimum theoretical margin factor for the market. Isolated mode only. + optional string min_theoretical_margin_factor = 5; + // Maximum theoretical leverage for the market. Isolated mode only. + optional string max_theoretical_leverage = 6; + // Epoch at which the update happened. + uint64 at_epoch = 7; +} + +message PartyProfileUpdated { + // Party's profile updated. + vega.PartyProfile updated_profile = 1; +} + +// Stats for all teams. +message TeamsStatsUpdated { + // Epoch at which the statistics are updated. + uint64 at_epoch = 1; + // All teams' stats. + repeated TeamStats stats = 2; +} + +message TeamStats { + // The unique identifier of the team. + string team_id = 1; + // Statistics for each team member. + repeated TeamMemberStats members_stats = 2; +} + +message TeamMemberStats { + // The party ID of the team member. + string party_id = 1; + // Team members' notional volume for the epoch. + string notional_volume = 2; +} + // Bus event type is used to specify a type of event // It has 2 styles of event: // Single values (e.g. BUS_EVENT_TYPE_ORDER) where they represent one data item @@ -1230,6 +1304,18 @@ enum BusEventType { // Event used to link ledger entries to the transfer that triggered the fees being collected. BUS_EVENT_TYPE_TRANSFER_FEES_PAID = 83; + // Event indicating that a party's available transfer fee discount has changed, per asset. + BUS_EVENT_TYPE_TRANSFER_FEES_DISCOUNT_UPDATED = 84; + + // Event indicating that a party updated their margin mode on a market. + BUS_EVENT_TYPE_PARTY_MARGIN_MODE_UPDATED = 85; + + // Event indicating that a party updated their profile. + BUS_EVENT_TYPE_PARTY_PROFILE_UPDATED = 86; + + // Event indicating that teams' statistics have been updated. + BUS_EVENT_TYPE_TEAMS_STATS_UPDATED = 87; + // Event indicating a market related event, for example when a market opens BUS_EVENT_TYPE_MARKET = 101; // Event used to report failed transactions back to a user, this is excluded from the ALL type @@ -1405,6 +1491,14 @@ message BusEvent { VestingBalancesSummary vesting_balances_summary = 180; // Event notifying of fees related to a transfer being paid. TransferFees transfer_fees = 181; + // Event notifying of a party's available discounts for transfer fees, per asset. + TransferFeesDiscount transfer_fees_discount = 182; + // Event notifying of a party's margin mode update on a market. + PartyMarginModeUpdated party_margin_mode_updated = 183; + // Event notifying of a party's profile update. + PartyProfileUpdated party_profile_updated = 184; + // Event notifying of an update of teams' statistics. + TeamsStatsUpdated teams_stats_updated = 185; // Market tick events MarketEvent market = 1001; diff --git a/protos/sources/vega/governance.proto b/protos/sources/vega/governance.proto index f3d4cc2f72..71a2060de8 100644 --- a/protos/sources/vega/governance.proto +++ b/protos/sources/vega/governance.proto @@ -53,6 +53,14 @@ message PerpetualProduct { vega.DataSourceDefinition data_source_spec_for_settlement_data = 8; // Binding between the data source spec and the settlement data. DataSourceSpecToPerpetualBinding data_source_spec_binding = 9; + // Factor applied to funding-rates. This scales the impact that spot price deviations have on funding payments. + optional string funding_rate_scaling_factor = 10; + // Lower bound for the funding-rate such that the funding-rate will never be lower than this value. + optional string funding_rate_lower_bound = 11; + // Upper bound for the funding-rate such that the funding-rate will never be higher than this value. + optional string funding_rate_upper_bound = 12; + // Composite price configuration to drive the calculation of the internal composite price used for funding payments. If undefined the default mark price of the market is used. + optional CompositePriceConfiguration internal_composite_price_configuration = 13; } // Instrument configuration @@ -95,6 +103,8 @@ message NewSpotMarketConfiguration { int64 position_decimal_places = 6; // Specifies the liquidity provision SLA parameters. LiquiditySLAParameters sla_params = 7; + // Specifies how the liquidity fee for the market will be calculated. + LiquidityFeeSettings liquidity_fee_settings = 8; } // Configuration for a new futures market on Vega @@ -125,11 +135,17 @@ message NewMarketConfiguration { // Linear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume. string linear_slippage_factor = 9; // Quadratic slippage factor is used to cap the slippage component of maintenance margin - it is applied to the square of the slippage volume. - string quadratic_slippage_factor = 10; + string quadratic_slippage_factor = 10 [deprecated = true]; // Successor configuration. If this proposal is meant to succeed a given market, then this should be set. optional SuccessorConfiguration successor = 11; // Liquidity SLA parameters LiquiditySLAParameters liquidity_sla_parameters = 12; + // Specifies how the liquidity fee for the market will be calculated. + LiquidityFeeSettings liquidity_fee_settings = 13; + // Liquidation strategy for this market. + LiquidationStrategy liquidation_strategy = 14; + // Mark price configuration. + CompositePriceConfiguration mark_price_configuration = 15; } // New spot market on Vega @@ -192,9 +208,15 @@ message UpdateMarketConfiguration { // Linear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume. string linear_slippage_factor = 6; // Quadratic slippage factor is used to cap the slippage component of maintenance margin - it is applied to the square of the slippage volume. - string quadratic_slippage_factor = 7; + string quadratic_slippage_factor = 7 [deprecated = true]; // Liquidity SLA parameters LiquiditySLAParameters liquidity_sla_parameters = 8; + // Specifies how the liquidity fee for the market will be calculated. + LiquidityFeeSettings liquidity_fee_settings = 9; + // Liquidation strategy parameters + LiquidationStrategy liquidation_strategy = 10; + // Mark price configuration. + CompositePriceConfiguration mark_price_configuration = 11; } // Configuration to update a spot market on Vega @@ -214,12 +236,16 @@ message UpdateSpotMarketConfiguration { } // Specifies the liquidity provision SLA parameters. LiquiditySLAParameters sla_params = 4; + // Specifies how the liquidity fee for the market will be calculated. + LiquidityFeeSettings liquidity_fee_settings = 5; } // Instrument configuration message UpdateInstrumentConfiguration { // Instrument code, human-readable shortcode used to describe the instrument. string code = 1; + // Instrument name + string name = 2; // Product specification. oneof product { // Future. @@ -259,6 +285,14 @@ message UpdatePerpetualProduct { vega.DataSourceDefinition data_source_spec_for_settlement_data = 7; // Binding between the data source spec and the settlement data. DataSourceSpecToPerpetualBinding data_source_spec_binding = 8; + // Factor applied to funding-rates. This scales the impact that spot price deviations have on funding payments. + optional string funding_rate_scaling_factor = 9; + // Lower bound for the funding-rate such that the funding-rate will never be lower than this value. + optional string funding_rate_lower_bound = 10; + // Upper bound for the funding-rate such that the funding-rate will never be higher than this value. + optional string funding_rate_upper_bound = 11; + // Configuration for the internal composite price used in funding payment calculation. + optional CompositePriceConfiguration internal_composite_price_configuration = 13; } // Update network configuration on Vega @@ -328,6 +362,76 @@ message ProposalTerms { } } +// Terms change for a batch governance proposal +message BatchProposalTermsChange { + // Timestamp as Unix time in seconds when proposal terms gets enacted if proposal passed the vote, + // constrained by `minEnact` and `maxEnact` network parameters. + int64 enactment_timestamp = 1; + // Changes being proposed. + oneof change { + // Proposal change for modifying an existing futures market. + UpdateMarket update_market = 101; + // Proposal change for creating new futures market. + NewMarket new_market = 102; + // Proposal change for updating Vega network parameters. + UpdateNetworkParameter update_network_parameter = 103; + // Proposal change for a freeform request, which can be voted on but does not change the behaviour of the system, + // and can be used to gauge community sentiment. + NewFreeform new_freeform = 104; + // Proposal change for updating an asset. + UpdateAsset update_asset = 105; + // Proposal change for creating new spot market. + NewSpotMarket new_spot_market = 106; + // Proposal change for modifying an existing spot market. + UpdateSpotMarket update_spot_market = 107; + // Proposal change for a governance initiated transfer. + NewTransfer new_transfer = 108; + // Proposal change to cancel a governance initiated transfe. + CancelTransfer cancel_transfer = 109; + // Proposal change for updating the state of a market. + UpdateMarketState update_market_state = 110; + // Proposal change for updating the referral program. + UpdateReferralProgram update_referral_program = 111; + // Proposal change for updating the volume discount program. + UpdateVolumeDiscountProgram update_volume_discount_program = 112; + } +} + +message ProposalParameters { + // Represents the minimum time before a proposal can be closed for voting. + int64 min_close = 1; + // Represents the maximum time that a proposal can be open for voting. + int64 max_close = 2; + // Represents the minimum time before an enacted proposal takes effect. + int64 min_enact = 3; + // Represents the maximum time before an enacted proposal must take effect. + int64 max_enact = 4; + // Specifies the required percentage of eligible participants that must partake in the proposal for it to be valid. + string required_participation = 5; + // Specifies the required percentage of votes a proposal needs to be approved. + string required_majority = 6; + // Specifies the minimum governance token balance a proposer must hold to initiate a proposal. + string min_proposer_balance = 7; + // Specifies the minimum governance token balance a voter must hold to participate in voting. + string min_voter_balance = 8; + // Specifies the required percentage of participation from liquidity providers for the proposal to be valid. + string required_participation_lp = 9; + // Specifies the required majority percentage from liquidity providers for a proposal to be approved. + string required_majority_lp = 10; + // Specifies the minimum share that is akin to equity, which a participant must hold for their vote to be eligible. + string min_equity_like_share = 11; +} + +// Terms for a batch governance proposal on Vega +message BatchProposalTerms { + // Closing timestamp in Unix time; adheres to `minClose` and `maxClose` limits. + int64 closing_timestamp = 1; + // Specific parameters defining the proposal's characteristics used for validation. + ProposalParameters proposal_params = 2; + // List of individual changes included in the batch proposal. + repeated BatchProposalTermsChange changes = 3; +} + // Rationale behind a proposal. message ProposalRationale { reserved 2, 3; @@ -343,6 +447,14 @@ message ProposalRationale { // Governance data message GovernanceData { + // Proposal type + enum Type { + // Single proposal only. In case it has not been specified, for example in older proposals, then this is the default. + TYPE_SINGLE_OR_UNSPECIFIED = 0; + // Proposal contains a batch of proposals or a proposal that should be treated as part of a batch. + TYPE_BATCH = 1; + } + // Governance proposal that is being voted on. Proposal proposal = 1; // All YES votes in favour of the proposal above. @@ -357,6 +469,10 @@ message GovernanceData { // where key (string) is the party ID i.e. public key and // value (Vote) is the vote cast by the given party. map no_party = 5; + // Type of proposal this data is for. + Type proposal_type = 6; + // If proposal type is batch, proposals will contain all the proposals that are make up the batch. + repeated Proposal proposals = 7; } // Governance proposal @@ -381,7 +497,7 @@ message Proposal { STATE_REJECTED = 4; // Proposal didn't get enough votes, e.g. either failed to gain required participation or majority level. STATE_DECLINED = 5; - // Proposal enacted + // Proposal enacted. STATE_ENACTED = 6; // Waiting for node validation of the proposal STATE_WAITING_FOR_NODE_VOTE = 7; @@ -402,7 +518,8 @@ message Proposal { // Proposal timestamp for date and time as Unix time in nanoseconds when proposal was submitted to the network. int64 timestamp = 5; // Proposal configuration and the actual change that is meant to be executed when proposal is enacted. - ProposalTerms terms = 6; + // Single proposal term. + optional ProposalTerms terms = 6; // Reason for the current state of the proposal, this may be set in case of REJECTED and FAILED statuses. optional ProposalError reason = 7; // Detailed error associated to the reason. @@ -417,6 +534,10 @@ message Proposal { optional string required_liquidity_provider_participation = 12; // Required majority from liquidity providers, optional but is required for market update proposal. optional string required_liquidity_provider_majority = 13; + // Batch proposal terms. + optional BatchProposalTerms batch_terms = 14; + // ID of a batch proposal that this proposal is part of. + optional string batch_id = 15; } // List of possible errors that can cause a proposal to be in state rejected or failed @@ -526,6 +647,10 @@ enum ProposalError { PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM = 56; // Volume discount program proposal is invalid PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM = 57; + // One or more proposals in a batch has been rejected + PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED = 58; + // One or more proposals in a batch has been declined + PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED = 59; } // Governance vote @@ -556,8 +681,10 @@ message Vote { string total_governance_token_balance = 5; // The weight of this vote based on the total number of governance tokens. string total_governance_token_weight = 6; - // The weight of the vote compared to the total amount of equity-like share on the market. + // The weight of the vote compared to the total amount of equity-like share on the market. It is only populated if the vote is for a single type proposal. string total_equity_like_share_weight = 7; + // The per market weight of the vote compared to the total amount of equity-like share on the market.. It is only populated if the vote is for a batch type proposal. + map per_market_equity_like_share_weight = 8; } message UpdateVolumeDiscountProgram { diff --git a/protos/sources/vega/markets.proto b/protos/sources/vega/markets.proto index 9347e21498..0becc80881 100644 --- a/protos/sources/vega/markets.proto +++ b/protos/sources/vega/markets.proto @@ -66,6 +66,14 @@ message Perpetual { vega.DataSourceSpec data_source_spec_for_settlement_data = 8; // Binding between the data source spec and the settlement data. DataSourceSpecToPerpetualBinding data_source_spec_binding = 9; + // Factor applied to funding-rates. This scales the impact that spot price deviations have on funding payments. + optional string funding_rate_scaling_factor = 10; + // Lower bound for the funding-rate such that the funding-rate will never be lower than this value. + optional string funding_rate_lower_bound = 11; + // Upper bound for the funding-rate such that the funding-rate will never be higher than this value. + optional string funding_rate_upper_bound = 12; + // Optional configuration for the internal composite price used in funding payment calculation. + optional CompositePriceConfiguration internal_composite_price_config = 13; } // DataSourceSpecToFutureBinding describes which property of the data source data is to be @@ -79,16 +87,14 @@ message DataSourceSpecToFutureBinding { string trading_termination_property = 2; } -// Describes which property of the data source data is to be -// used as settlement data and which to use as the trading terminated trigger +// Describes which properties of the data source data is to be +// used for settlement. message DataSourceSpecToPerpetualBinding { - // Name of the property in the source data that should be used as settlement data. - // If it is set to "prices.BTC.value", then the perpetual market will use the value of - // this property as settlement data. + // Name of the property in the source data that should be used for settlement data. + // If it is set to "prices.BTC.value" for example, then the perpetual market will use the value of + // this property to get settlement data. string settlement_data_property = 1; - // Name of the property in the source data that should be used as settlement data. - // If it is set to "prices.BTC.value", then the perpetual market will use the value of - // this property as settlement data. + // Name of the property in the source data that should be used to determine the perpetual's settlement schedule. string settlement_schedule_property = 2; } @@ -209,6 +215,8 @@ message FeeFactors { message Fees { // Fee factors. FeeFactors factors = 1; + // Liquidity fee settings for the market describing how the fee was calculated. + LiquidityFeeSettings liquidity_fee_settings = 2; } // PriceMonitoringTrigger holds together price projection horizon τ, probability level p, and auction extension duration @@ -257,6 +265,23 @@ message LiquiditySLAParameters { string sla_competition_factor = 5; } +// Market settings that describe how the liquidity fee is calculated. +message LiquidityFeeSettings { + enum Method { + METHOD_UNSPECIFIED = 0; + // Fee is the smallest value of all bids, such that liquidity providers with nominated fees less than or equal to this value still have sufficient commitment to fulfil the market's target stake. + METHOD_MARGINAL_COST = 1; + // Fee is the weighted average of all liquidity providers' nominated fees, weighted by their committment. + METHOD_WEIGHTED_AVERAGE = 2; + // Fee is set by the market to a constant value irrespective of any liquidity provider's nominated fee. + METHOD_CONSTANT = 3; + } + // Method used to calculate the market's liquidity fee. + Method method = 1; + // Constant liquidity fee used when using the constant fee method. + optional string fee_constant = 2; +} + // TargetStakeParameters contains parameters used in target stake calculation message TargetStakeParameters { // Specifies length of time window expressed in seconds for target stake calculation. @@ -357,6 +382,10 @@ message Market { optional string successor_market_id = 17; // Liquidity SLA parameters for the market. optional LiquiditySLAParameters liquidity_sla_params = 18; + // Liquidation strategy used by this market. + LiquidationStrategy liquidation_strategy = 19; + // Mark price calculation configuration. + CompositePriceConfiguration mark_price_configuration = 20; } // Time stamps for important times about creating, enacting etc the market @@ -370,3 +399,47 @@ message MarketTimestamps { // Time when the market closed. int64 close = 4; } + +// Liquidation strategy used when the network holds a position resulting from position resolution. +message LiquidationStrategy { + // Interval, in seconds, at which the network will attempt to close its position. + int64 disposal_time_step = 1; + // Fraction of the open position the market will try to close in a single attempt; range 0 through 1. + string disposal_fraction = 2; + // Size of the position that the network will try to close in a single attempt. + uint64 full_disposal_size = 3; + // Max fraction of the total volume of the orderbook, within liquidity bounds, that the network can use to close its position; range 0 through 1. + string max_fraction_consumed = 4; +} + +enum CompositePriceType { + COMPOSITE_PRICE_TYPE_UNSPECIFIED = 0; + // Composite price is calculated as a weighted average of the underlying mark prices. + COMPOSITE_PRICE_TYPE_WEIGHTED = 1; + // Composite price is calculated as a median of the underlying mark prices. + COMPOSITE_PRICE_TYPE_MEDIAN = 2; + // Composite price is calculated as the last trade price. + COMPOSITE_PRICE_TYPE_LAST_TRADE = 3; +} + +// Mark price configuration parameters. +message CompositePriceConfiguration { + // Decay weight used for calculation of mark price. + string decay_weight = 1; + // Decay power used for the calculation of mark price. + uint64 decay_power = 2; + // Cash amount, in asset decimals, used for the calculation of the mark price from the order book. + string cash_amount = 3; + // Weights for each composite price data source. + repeated string source_weights = 4; + // For how long a price source is considered valid. One entry for each data source + // such that the first is for the trade based mark price, the second is for the book based price + // the third is for the first oracle, followed by more oracle data source staleness tolerance. + repeated string source_staleness_tolerance = 5; + // Which method is used for the calculation of the composite price for the market. + CompositePriceType composite_price_type = 6; + // Additional price sources to be used for internal composite price calculation. + repeated vega.DataSourceDefinition data_sources_spec = 7; + // List of each price source and its corresponding binding + repeated vega.SpecBindingForCompositePrice data_sources_spec_binding = 8; +} diff --git a/protos/sources/vega/snapshot/v1/snapshot.proto b/protos/sources/vega/snapshot/v1/snapshot.proto index e4ad72ed5d..0e5bf0b9ab 100644 --- a/protos/sources/vega/snapshot/v1/snapshot.proto +++ b/protos/sources/vega/snapshot/v1/snapshot.proto @@ -140,6 +140,11 @@ message Payload { VolumeDiscountProgram volume_discount_program = 77; LiquidityV2Parameters liquidity_v2_parameters = 78; LiquidityV2PaidFeesStats liquidity_v2_paid_fees_stats = 79; + Liquidation liquidation = 80; + BankingTransferFeeDiscounts banking_transfer_fee_discounts = 81; + GovernanceBatchActive governance_batch_active = 82; + Parties parties = 83; + L2EthOracles l2_eth_oracles = 84; } } @@ -220,8 +225,15 @@ message Resource { uint32 state = 4; } +message EventForwarderBucket { + int64 ts = 1; + repeated string hashes = 2; +} + message EventForwarder { + // this is deprecated, use the other one now repeated string acked_events = 1; + repeated EventForwarderBucket buckets = 2; } message CollateralAccounts { @@ -335,8 +347,18 @@ message GovernanceActive { repeated ProposalData proposals = 1; } +message BatchProposalData { + ProposalData batch_proposal = 1; + repeated vega.Proposal proposals = 2; +} + +message GovernanceBatchActive { + repeated BatchProposalData batch_proposals = 1; +} + message GovernanceNode { repeated vega.Proposal proposals = 1; + repeated ProposalData proposal_data = 2; // includes votes } message StakingAccount { @@ -510,6 +532,15 @@ message Market { repeated vega.Order expiring_stop_orders = 25; Product product = 26; vega.events.v1.FeesStats fees_stats = 27; + repeated PartyMarginFactor party_margin_factor = 28; + CompositePriceCalculator mark_price_calculator = 29; + optional CompositePriceCalculator internal_composite_price_calculator = 30; + int64 next_internal_composite_price_calc = 31; +} + +message PartyMarginFactor { + string party = 1; + string margin_factor = 2; } // eventually support multiple products @@ -524,12 +555,27 @@ message DataPoint { int64 timestamp = 2; } +message AuctionIntervals { + repeated int64 t = 1; + int64 auction_start = 2; + int64 total = 3; +} + +message TWAPData { + int64 start = 1; + int64 end = 2; + string sum_product = 3; +} + message Perps { string id = 1; repeated DataPoint external_data_point = 2; repeated DataPoint internal_data_point = 3; uint64 seq = 4; int64 started_at = 5; + TWAPData external_twap_data = 6; + TWAPData internal_twap_data = 7; + AuctionIntervals auction_intervals = 8; } message OrdersAtPrice { @@ -601,6 +647,7 @@ message Position { string buy_sum_product = 6; string sell_sum_product = 7; bool distressed = 8; + bytes average_entry_price = 9; } message MarketPositions { @@ -772,6 +819,16 @@ message StakeVerifierPending { string id = 8; } +message L2EthOracles { + repeated ChainIdEthOracles chain_id_eth_oracles = 1; +} + +message ChainIdEthOracles { + string source_chain_id = 1; + EthOracleVerifierLastBlock last_block = 2; + EthContractCallResults call_results = 3; +} + message EthOracleVerifierLastBlock { uint64 block_height = 1; uint64 block_time = 2; @@ -1020,6 +1077,7 @@ message NextTimeTrigger { message MarketTracker { repeated checkpoint.v1.MarketActivityTracker market_activity = 1; repeated checkpoint.v1.TakerNotionalVolume taker_notional_volume = 2; + repeated checkpoint.v1.MarketToPartyTakerNotionalVolume market_to_party_taker_notional_volume = 3; } message SignerEventsPerAddress { @@ -1123,6 +1181,7 @@ message Team { string avatar_url = 6; int64 created_at = 7; bool closed = 8; + repeated string allow_list = 9; } message Membership { @@ -1235,3 +1294,39 @@ message PartyVolume { string party = 1; bytes volume = 2; } + +message Liquidation { + string market_id = 1; + int64 network_pos = 2; + int64 next_step = 3; + vega.LiquidationStrategy config = 4; +} + +message PartyAssetAmount { + string party = 1; + string asset = 2; + string amount = 3; +} + +message BankingTransferFeeDiscounts { + repeated PartyAssetAmount party_asset_discount = 1; +} + +message CompositePriceCalculator { + string composite_price = 1; + vega.CompositePriceConfiguration price_configuration = 2; + repeated vega.Trade trades = 3; + repeated string price_sources = 4; + repeated int64 price_source_last_update = 5; + repeated TimePrice book_price_at_time = 6; +} + +message Parties { + repeated PartyProfile profiles = 1; +} + +message PartyProfile { + string party_id = 1; + string alias = 2; + repeated vega.Metadata metadata = 3; +} diff --git a/protos/sources/vega/vega.proto b/protos/sources/vega/vega.proto index db2e9ff42a..de8019ef2d 100644 --- a/protos/sources/vega/vega.proto +++ b/protos/sources/vega/vega.proto @@ -6,7 +6,40 @@ import "vega/markets.proto"; option go_package = "code.vegaprotocol.io/vega/protos/vega"; +// Holds metadata associated to a party. +message PartyProfile { + // Party ID associated to the profile. + string party_id = 1; + // Alias given to the party. + string alias = 2; + // Metadata to associate to a party, in a key/value format where the key + // describes the type of metadata in the value field. + repeated vega.Metadata metadata = 3; +} + +// Generic structure holding a key/value pair. +message Metadata { + // Key of the metadata. + string key = 1; + // Value of the metadata. + string value = 2; +} + message StopOrder { + message SizeOverrideValue { + // Scaling percentage of the current position’s size + string percentage = 1; + } + + enum SizeOverrideSetting { + // Never valid + SIZE_OVERRIDE_SETTING_UNSPECIFIED = 0; + // No override, the size within the contained normal order submission will be used + SIZE_OVERRIDE_SETTING_NONE = 1; + // Use the total position of the trader + SIZE_OVERRIDE_SETTING_POSITION = 2; + } + enum ExpiryStrategy { // Never valid EXPIRY_STRATEGY_UNSPECIFIED = 0; @@ -57,6 +90,12 @@ message StopOrder { REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_WITHOUT_A_POSITION = 5; // This stop order does not close the position REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION = 6; + // The percentage value for the linked stop order is invalid + REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID = 7; + // Stop orders are not allowed during the opening auction + REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION = 8; + // Stop OCO orders cannot have the same expiry timestamp + REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES = 9; } // ID of this stop order @@ -84,6 +123,10 @@ message StopOrder { string market_id = 11; // An optional reason for why a stop order was rejected optional RejectionReason rejection_reason = 12; + // Size override setting + SizeOverrideSetting size_override_setting = 13; + // Size override value + optional SizeOverrideValue size_override_value = 14; // Trigger that will need to be breached for the order // to be submitted to the book. @@ -122,12 +165,22 @@ enum Interval { INTERVAL_I5M = 300; // 15 minutes. INTERVAL_I15M = 900; + // 30 minutes. + INTERVAL_I30M = 1800; // 1 hour. INTERVAL_I1H = 3600; + // 4 hours. + INTERVAL_I4H = 14400; // 6 hours. INTERVAL_I6H = 21600; + // 8 hours. + INTERVAL_I8H = 28800; + // 12 hours. + INTERVAL_I12H = 43200; // 1 day. INTERVAL_I1D = 86400; + // 7 days. + INTERVAL_I7D = 604800; // Note: If adding an enum value, add a matching entry in: // - gateway/graphql/helpers_enum.go @@ -146,6 +199,11 @@ enum PositionStatus { message Party { // Unique ID for the party, typically represented by a public key. string id = 1; + // Alias given to the party. + string alias = 2; + // Metadata to associate to a party, in a key/value format where the key + // describes the type of metadata in the value field. + repeated vega.Metadata metadata = 3; } // Risk factors are used to calculate the current risk associated with orders trading on a given market @@ -468,6 +526,10 @@ enum OrderError { ORDER_ERROR_POST_ONLY_ORDER_WOULD_TRADE = 49; // Post order would trade ORDER_ERROR_REDUCE_ONLY_ORDER_WOULD_NOT_REDUCE_POSITION = 50; + // Isolated margin check failed + ORDER_ERROR_ISOLATED_MARGIN_CHECK_FAILED = 51; + // In isolated margin pegged orders are rejected + ORDER_ERROR_PEGGED_ORDERS_NOT_ALLOWED_IN_ISOLATED_MARGIN_MODE = 52; // Note: If adding an enum value, add a matching entry in: // - proto/errors.go (func Error) @@ -526,6 +588,9 @@ message Trade { uint64 buyer_auction_batch = 14; // Auction batch number that the sell side order was placed in. uint64 seller_auction_batch = 15; + // Price for the trade using asset decimals, as opposed to market decimals used + // in the price field. This is only used in trade events for position updates. + string asset_price = 16; } // Represents any fees paid by a party, resulting from a trade @@ -848,6 +913,9 @@ enum AccountType { // Per asset account for pending fee referral reward payouts ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD = 28; + // Per asset market account for party in isolated margin mode + ACCOUNT_TYPE_ORDER_MARGIN = 29; + // Note: If adding an enum value, add a matching entry in: // - gateway/graphql/helpers_enum.go // - gateway/graphql/schema.graphql (enum AccountType) @@ -961,6 +1029,14 @@ enum TransferType { TRANSFER_TYPE_FEE_REFERRER_REWARD_PAY = 39; // Fee referrer reward received into general account of the referrer. TRANSFER_TYPE_FEE_REFERRER_REWARD_DISTRIBUTE = 44; + // Funds transferred from general account to meet order margin requirement in isolated margin mode. + TRANSFER_TYPE_ORDER_MARGIN_LOW = 45; + // Excess order margin amount returned to general account. + TRANSFER_TYPE_ORDER_MARGIN_HIGH = 46; + // Transfer from order margin account to margin account due to increase of position. + TRANSFER_TYPE_ISOLATED_MARGIN_LOW = 47; + // Transfer from excess order margin account to general account. + TRANSFER_TYPE_ISOLATED_MARGIN_HIGH = 48; } // Represents a financial transfer within Vega @@ -1101,6 +1177,8 @@ message LedgerEntry { string from_account_balance = 6; // Receiver account balance after the transfer. This field is an unsigned integer scaled to the asset's decimal places. string to_account_balance = 7; + // Transfer ID the ledger entry relates to. + optional string transfer_id = 8; } // Represents the balance for an account during a transfer @@ -1136,6 +1214,12 @@ message MarginLevels { string asset = 7; // Timestamp in Unix nanoseconds for when the ledger entry was created. int64 timestamp = 8; + // Margin required to cover orders in isolated margin mode. + string order_margin = 9; + // Margin mode for the party, cross margin or isolated margin. + MarginMode margin_mode = 10; + // Margin factor, relevant only for isolated margin, 0 otherwise. + string margin_factor = 11; } // Represents market data specific to a perpetual market. @@ -1148,6 +1232,20 @@ message PerpetualData { string internal_twap = 3; // Time-weighted-average the external data points for the in-progress funding period. string external_twap = 4; + // Funding period sequence number + uint64 seq_num = 5; + // Funding period start time + int64 start_time = 6; + // The internal composite price used for perpetual markets. + string internal_composite_price = 7; + // The next time the internal composite price is calculated for the perpetual market, in Unix nanoseconds. + int64 next_internal_composite_price_calc = 8; + // The method used for calculating the internal composite price, for perpetual markets only. + CompositePriceType internal_composite_price_type = 9; + // Last seen value of the settlement oracle. + string underlying_index_price = 10; + // State of the internal composite price. + CompositePriceState internal_composite_price_state = 11; } // Represents market data specific to a particular product type. @@ -1231,6 +1329,26 @@ message MarketData { optional ProductData product_data = 31; // SLA performance for each liquidity provider. repeated LiquidityProviderSLA liquidity_provider_sla = 32; + // Time in Unix nanoseconds when the market will next submit a trade to reduce its position. + int64 next_network_closeout = 33; + // The method used for calculating the mark price. + CompositePriceType mark_price_type = 34; + // State of the internal composite price. + CompositePriceState mark_price_state = 35; +} + +message CompositePriceSource { + // Source of the price. + string price_source = 1; + // Current value of the composite source price. + string price = 2; + // Timestamp in Unix nanoseconds when the price source was last updated. + int64 last_updated = 3; +} + +// Underlying state of the composite price.. +message CompositePriceState { + repeated CompositePriceSource price_sources = 1; } // Equity like share of liquidity fee for each liquidity provider @@ -1393,6 +1511,25 @@ message LiquidityProvision { string reference = 12; } +message EthereumL2Config { + // Network ID of this Ethereum layer 2 network. + string network_id = 1; + // Chain ID of this Ethereum layer 2 network. + string chain_id = 2; + // Number of block confirmations to wait to consider an Ethereum transaction trusted. + // An Ethereum block is trusted when there are at least "n" blocks confirmed by the + // network, "n" being the number of `confirmations` required. If `confirmations` was set to `3`, + // and the current block to be forged, or mined, on the L2 is block 14, block + // 10 would be considered as trusted, but not block 11. + uint32 confirmations = 3; + // Display name of this network + string name = 4; +} + +message EthereumL2Configs { + repeated EthereumL2Config configs = 1; +} + // Ethereum configuration details. message EthereumConfig { // Network ID of this Ethereum network. @@ -1623,6 +1760,14 @@ message Reward { string reward_type = 8; // The epoch when the reward is being released. uint64 locked_until_epoch = 9; + // Amount paid as a reward, expressed in asset's quantum unit. + string quantum_amount = 10; + // ID of the game the reward payment was made for if the payment was made for participation in a game. + optional string game_id = 11; + // ID of the team the party is a member of, if the party is a member of a participating team, + // and the reward payment was made for participation in a game. + // This field is currently only populated by the rewards API. + optional string team_id = 12; } // Details for rewards for a single asset @@ -1771,3 +1916,12 @@ message ActivityStreakBenefitTier { // Vesting bonus applicable to this tier. string vesting_multiplier = 3; } + +enum MarginMode { + // Never valid. + MARGIN_MODE_UNSPECIFIED = 0; + // Cross margin mode - margin is dynamically acquired and released as a position is marked to market + MARGIN_MODE_CROSS_MARGIN = 1; + // Isolated margin mode - margin for any newly opened position volume is transferred to the margin account when the trade is executed + MARGIN_MODE_ISOLATED_MARGIN = 2; +} diff --git a/protos/sources/vega/wallet/v1/wallet.proto b/protos/sources/vega/wallet/v1/wallet.proto index e23169a8d3..4f9aac4e2e 100644 --- a/protos/sources/vega/wallet/v1/wallet.proto +++ b/protos/sources/vega/wallet/v1/wallet.proto @@ -36,6 +36,10 @@ message SubmitTransactionRequest { commands.v1.CreateReferralSet create_referral_set = 1018; commands.v1.UpdateReferralSet update_referral_set = 1019; commands.v1.ApplyReferralCode apply_referral_code = 1020; + commands.v1.UpdateMarginMode update_margin_mode = 1021; + commands.v1.JoinTeam join_team = 1022; + commands.v1.BatchProposalSubmission batch_proposal_submission = 1023; + commands.v1.UpdatePartyProfile update_party_profile = 1024; // Validator commands commands.v1.NodeVote node_vote = 2002; diff --git a/protos/vega/api/v1/core.pb.go b/protos/vega/api/v1/core.pb.go index 90b57ab38e..35a14aee69 100644 --- a/protos/vega/api/v1/core.pb.go +++ b/protos/vega/api/v1/core.pb.go @@ -2796,7 +2796,7 @@ var file_vega_api_v1_core_proto_rawDesc = []byte{ 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x92, 0x41, 0x34, 0x12, 0x19, 0x0a, 0x0e, 0x56, 0x65, 0x67, 0x61, 0x20, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x41, 0x50, - 0x49, 0x73, 0x32, 0x07, 0x76, 0x30, 0x2e, 0x37, 0x33, 0x2e, 0x30, 0x1a, 0x13, 0x6c, 0x62, 0x2e, + 0x49, 0x73, 0x32, 0x07, 0x76, 0x30, 0x2e, 0x37, 0x34, 0x2e, 0x30, 0x1a, 0x13, 0x6c, 0x62, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x78, 0x79, 0x7a, 0x2a, 0x02, 0x01, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/protos/vega/api/v1/corestate.pb.go b/protos/vega/api/v1/corestate.pb.go index 872070dbaf..9873b198eb 100644 --- a/protos/vega/api/v1/corestate.pb.go +++ b/protos/vega/api/v1/corestate.pb.go @@ -1511,7 +1511,7 @@ var file_vega_api_v1_corestate_proto_rawDesc = []byte{ 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x92, 0x41, 0x3a, 0x12, 0x1f, 0x0a, 0x14, 0x56, 0x65, 0x67, 0x61, 0x20, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x20, 0x41, 0x50, 0x49, 0x73, 0x32, 0x07, 0x76, 0x30, 0x2e, 0x37, 0x33, + 0x74, 0x61, 0x74, 0x65, 0x20, 0x41, 0x50, 0x49, 0x73, 0x32, 0x07, 0x76, 0x30, 0x2e, 0x37, 0x34, 0x2e, 0x30, 0x1a, 0x13, 0x6c, 0x62, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x78, 0x79, 0x7a, 0x2a, 0x02, 0x01, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/protos/vega/api/v1/corestate_grpc.pb.go b/protos/vega/api/v1/corestate_grpc.pb.go index 5cbc451f7c..e3c26c62a2 100644 --- a/protos/vega/api/v1/corestate_grpc.pb.go +++ b/protos/vega/api/v1/corestate_grpc.pb.go @@ -24,51 +24,51 @@ const _ = grpc.SupportPackageIsVersion7 type CoreStateServiceClient interface { // Accounts list // - // Get a list of accounts + // Get a list of accounts. This endpoint may not be exposed by mainnet nodes. ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) // Assets list // - // Get a list of assets + // Get a list of assets. This endpoint may not be exposed by mainnet nodes. ListAssets(ctx context.Context, in *ListAssetsRequest, opts ...grpc.CallOption) (*ListAssetsResponse, error) // Network parameters list // - // Get a list of network parameters + // Get a list of network parameters. This endpoint may not be exposed by mainnet nodes. ListNetworkParameters(ctx context.Context, in *ListNetworkParametersRequest, opts ...grpc.CallOption) (*ListNetworkParametersResponse, error) // Network limits list // - // Get a list of network limits + // Get a list of network limits. This endpoint may not be exposed by mainnet nodes. ListNetworkLimits(ctx context.Context, in *ListNetworkLimitsRequest, opts ...grpc.CallOption) (*ListNetworkLimitsResponse, error) // Parties list // - // Get a list of parties + // Get a list of parties. This endpoint may not be exposed by mainnet nodes. ListParties(ctx context.Context, in *ListPartiesRequest, opts ...grpc.CallOption) (*ListPartiesResponse, error) // Validators list // - // Get a list of validators + // Get a list of validators. This endpoint may not be exposed by mainnet nodes. ListValidators(ctx context.Context, in *ListValidatorsRequest, opts ...grpc.CallOption) (*ListValidatorsResponse, error) // Markets list // - // Get a list of markets + // Get a list of markets. This endpoint may not be exposed by mainnet nodes. ListMarkets(ctx context.Context, in *ListMarketsRequest, opts ...grpc.CallOption) (*ListMarketsResponse, error) // Proposals list // - // Get a list of proposals + // Get a list of proposals. This endpoint may not be exposed by mainnet nodes. ListProposals(ctx context.Context, in *ListProposalsRequest, opts ...grpc.CallOption) (*ListProposalsResponse, error) // Markets data list // - // Get a list of markets data + // Get a list of markets' data. This endpoint may not be exposed by mainnet nodes. ListMarketsData(ctx context.Context, in *ListMarketsDataRequest, opts ...grpc.CallOption) (*ListMarketsDataResponse, error) // Votes list // - // Get a list of votes + // Get a list of votes. This endpoint may not be exposed by mainnet nodes. ListVotes(ctx context.Context, in *ListVotesRequest, opts ...grpc.CallOption) (*ListVotesResponse, error) // Parties stake list // - // Get a list of parties stake + // Get a list of parties' stake. This endpoint may not be exposed by mainnet nodes. ListPartiesStake(ctx context.Context, in *ListPartiesStakeRequest, opts ...grpc.CallOption) (*ListPartiesStakeResponse, error) // Delegations list // - // Get a list of delegations + // Get a list of delegations. This endpoint may not be exposed by mainnet nodes. ListDelegations(ctx context.Context, in *ListDelegationsRequest, opts ...grpc.CallOption) (*ListDelegationsResponse, error) } @@ -194,51 +194,51 @@ func (c *coreStateServiceClient) ListDelegations(ctx context.Context, in *ListDe type CoreStateServiceServer interface { // Accounts list // - // Get a list of accounts + // Get a list of accounts. This endpoint may not be exposed by mainnet nodes. ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) // Assets list // - // Get a list of assets + // Get a list of assets. This endpoint may not be exposed by mainnet nodes. ListAssets(context.Context, *ListAssetsRequest) (*ListAssetsResponse, error) // Network parameters list // - // Get a list of network parameters + // Get a list of network parameters. This endpoint may not be exposed by mainnet nodes. ListNetworkParameters(context.Context, *ListNetworkParametersRequest) (*ListNetworkParametersResponse, error) // Network limits list // - // Get a list of network limits + // Get a list of network limits. This endpoint may not be exposed by mainnet nodes. ListNetworkLimits(context.Context, *ListNetworkLimitsRequest) (*ListNetworkLimitsResponse, error) // Parties list // - // Get a list of parties + // Get a list of parties. This endpoint may not be exposed by mainnet nodes. ListParties(context.Context, *ListPartiesRequest) (*ListPartiesResponse, error) // Validators list // - // Get a list of validators + // Get a list of validators. This endpoint may not be exposed by mainnet nodes. ListValidators(context.Context, *ListValidatorsRequest) (*ListValidatorsResponse, error) // Markets list // - // Get a list of markets + // Get a list of markets. This endpoint may not be exposed by mainnet nodes. ListMarkets(context.Context, *ListMarketsRequest) (*ListMarketsResponse, error) // Proposals list // - // Get a list of proposals + // Get a list of proposals. This endpoint may not be exposed by mainnet nodes. ListProposals(context.Context, *ListProposalsRequest) (*ListProposalsResponse, error) // Markets data list // - // Get a list of markets data + // Get a list of markets' data. This endpoint may not be exposed by mainnet nodes. ListMarketsData(context.Context, *ListMarketsDataRequest) (*ListMarketsDataResponse, error) // Votes list // - // Get a list of votes + // Get a list of votes. This endpoint may not be exposed by mainnet nodes. ListVotes(context.Context, *ListVotesRequest) (*ListVotesResponse, error) // Parties stake list // - // Get a list of parties stake + // Get a list of parties' stake. This endpoint may not be exposed by mainnet nodes. ListPartiesStake(context.Context, *ListPartiesStakeRequest) (*ListPartiesStakeResponse, error) // Delegations list // - // Get a list of delegations + // Get a list of delegations. This endpoint may not be exposed by mainnet nodes. ListDelegations(context.Context, *ListDelegationsRequest) (*ListDelegationsResponse, error) mustEmbedUnimplementedCoreStateServiceServer() } diff --git a/protos/vega/chain_events.pb.go b/protos/vega/chain_events.pb.go index b76f77e45c..b1cdac1c9c 100644 --- a/protos/vega/chain_events.pb.go +++ b/protos/vega/chain_events.pb.go @@ -36,6 +36,8 @@ type EthContractCallEvent struct { Result []byte `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"` // Error message if the call failed. Error *string `protobuf:"bytes,5,opt,name=error,proto3,oneof" json:"error,omitempty"` + // Source chain for this chain event. + SourceChainId *uint64 `protobuf:"varint,6,opt,name=source_chain_id,json=sourceChainId,proto3,oneof" json:"source_chain_id,omitempty"` } func (x *EthContractCallEvent) Reset() { @@ -105,6 +107,13 @@ func (x *EthContractCallEvent) GetError() string { return "" } +func (x *EthContractCallEvent) GetSourceChainId() uint64 { + if x != nil && x.SourceChainId != nil { + return *x.SourceChainId + } + return 0 +} + // Deposit for a Vega built-in asset type BuiltinAssetDeposit struct { state protoimpl.MessageState @@ -1485,7 +1494,7 @@ var File_vega_chain_events_proto protoreflect.FileDescriptor var file_vega_chain_events_proto_rawDesc = []byte{ 0x0a, 0x17, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x76, 0x65, 0x67, 0x61, 0x22, - 0xae, 0x01, 0x0a, 0x14, 0x45, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, + 0xef, 0x01, 0x0a, 0x14, 0x45, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x70, 0x65, 0x63, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, @@ -1495,184 +1504,188 @@ var file_vega_chain_events_proto_rawDesc = []byte{ 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x22, 0x6c, 0x0a, 0x13, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x5f, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x76, 0x65, 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, - 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x6f, - 0x0a, 0x16, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, 0x67, 0x61, + 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x01, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x12, 0x0a, + 0x10, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, + 0x64, 0x22, 0x6c, 0x0a, 0x13, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x96, 0x01, 0x0a, 0x11, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x42, - 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x3f, 0x0a, - 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x18, 0xea, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, - 0x6e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, - 0x48, 0x00, 0x52, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x42, 0x08, - 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x57, 0x0a, 0x0e, 0x45, 0x52, 0x43, 0x32, - 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, - 0x67, 0x61, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x76, 0x65, 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x21, - 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x22, 0x36, 0x0a, 0x10, 0x45, 0x52, 0x43, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, - 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, - 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0xcd, 0x01, 0x0a, 0x17, 0x45, 0x52, - 0x43, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, - 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x69, 0x66, 0x65, - 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x77, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0xaa, 0x01, 0x0a, 0x0c, 0x45, 0x52, - 0x43, 0x32, 0x30, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, - 0x67, 0x61, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x76, 0x65, 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, - 0x0a, 0x17, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x15, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x0f, 0x45, 0x52, 0x43, 0x32, 0x30, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, - 0x67, 0x61, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x76, 0x65, 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, - 0x0a, 0x17, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x15, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x22, - 0xcb, 0x03, 0x0a, 0x0a, 0x45, 0x52, 0x43, 0x32, 0x30, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x36, 0x0a, 0x0a, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x69, - 0x73, 0x74, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x69, 0x73, - 0x74, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x69, 0x73, 0x74, - 0x12, 0x2f, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0xeb, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x18, - 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x52, - 0x43, 0x32, 0x30, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x48, 0x00, 0x52, - 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x52, 0x0a, 0x14, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x18, 0xed, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x12, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, - 0x28, 0x0a, 0x0e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, - 0x64, 0x18, 0xee, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0d, 0x62, 0x72, 0x69, 0x64, - 0x67, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x62, 0x72, 0x69, - 0x64, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0xef, 0x07, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x00, 0x52, 0x0d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, - 0x6d, 0x65, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x66, 0x0a, - 0x10, 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x68, 0x0a, 0x12, 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, - 0x6c, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, + 0x6f, 0x0a, 0x16, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, 0x67, + 0x61, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x76, 0x65, 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x96, 0x01, 0x0a, 0x11, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x3f, + 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x18, 0xea, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x74, + 0x69, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, + 0x6c, 0x48, 0x00, 0x52, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x42, + 0x08, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x57, 0x0a, 0x0e, 0x45, 0x52, 0x43, + 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x76, + 0x65, 0x67, 0x61, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, + 0x21, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x22, 0x36, 0x0a, 0x10, 0x45, 0x52, 0x43, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x44, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, + 0x65, 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0xcd, 0x01, 0x0a, 0x17, 0x45, + 0x52, 0x43, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, + 0x65, 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x69, 0x66, + 0x65, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x77, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0xaa, 0x01, 0x0a, 0x0c, 0x45, + 0x52, 0x43, 0x32, 0x30, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x76, + 0x65, 0x67, 0x61, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, + 0x36, 0x0a, 0x17, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x15, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x0f, 0x45, 0x52, 0x43, 0x32, + 0x30, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0d, 0x76, + 0x65, 0x67, 0x61, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x67, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, + 0x36, 0x0a, 0x17, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x15, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, + 0x22, 0xcb, 0x03, 0x0a, 0x0a, 0x45, 0x52, 0x43, 0x32, 0x30, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x36, 0x0a, 0x0a, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x6c, + 0x69, 0x73, 0x74, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x69, + 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x69, 0x73, + 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0xeb, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, + 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, + 0x52, 0x43, 0x32, 0x30, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x48, 0x00, + 0x52, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x52, 0x0a, 0x14, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x5f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x18, 0xed, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x12, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x28, 0x0a, 0x0e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x70, + 0x65, 0x64, 0x18, 0xee, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0d, 0x62, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x0e, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0xef, 0x07, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x75, 0x6d, 0x65, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x66, + 0x0a, 0x10, 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, + 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x68, 0x0a, 0x12, 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x6f, 0x6c, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x6d, 0x0a, 0x11, 0x45, 0x52, 0x43, 0x32, 0x30, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x53, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6e, 0x65, + 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, - 0x6d, 0x0a, 0x11, 0x45, 0x52, 0x43, 0x32, 0x30, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x53, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6e, 0x65, 0x77, - 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, - 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x8d, - 0x02, 0x0a, 0x12, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x65, - 0x64, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, - 0x48, 0x00, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, - 0x42, 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x64, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x64, 0x12, 0x3f, 0x0a, 0x0d, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x5f, 0x73, 0x65, 0x74, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x53, 0x65, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x80, - 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x40, 0x0a, 0x0f, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x18, 0xe9, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x12, 0x3a, 0x0a, - 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0xea, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x54, 0x6f, 0x74, - 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x9a, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x26, 0x0a, 0x0f, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x98, - 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, - 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x76, 0x65, - 0x67, 0x61, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x10, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x23, 0x0a, - 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x70, 0x70, - 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, - 0x75, 0x70, 0x70, 0x6c, 0x79, 0x42, 0x27, 0x5a, 0x25, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, - 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x8d, 0x02, 0x0a, 0x12, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, + 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x65, 0x64, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, + 0x64, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, + 0x12, 0x42, 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x64, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x64, 0x12, 0x3f, 0x0a, 0x0d, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x5f, 0x73, 0x65, 0x74, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x53, 0x65, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x80, 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x40, 0x0a, 0x0f, + 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x18, + 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, + 0x61, 0x6b, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0e, + 0x73, 0x74, 0x61, 0x6b, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x12, 0x3a, + 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, + 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, + 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, + 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x0c, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x54, 0x6f, + 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x9a, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, + 0x98, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, + 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x76, + 0x65, 0x67, 0x61, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x10, 0x53, 0x74, + 0x61, 0x6b, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x23, + 0x0a, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x70, + 0x70, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x42, 0x27, 0x5a, 0x25, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, + 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/protos/vega/checkpoint/v1/checkpoint.pb.go b/protos/vega/checkpoint/v1/checkpoint.pb.go index 98311b772d..be79b0833c 100644 --- a/protos/vega/checkpoint/v1/checkpoint.pb.go +++ b/protos/vega/checkpoint/v1/checkpoint.pb.go @@ -1880,8 +1880,9 @@ type MarketTracker struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MarketActivity []*MarketActivityTracker `protobuf:"bytes,1,rep,name=market_activity,json=marketActivity,proto3" json:"market_activity,omitempty"` - TakerNotionalVolume []*TakerNotionalVolume `protobuf:"bytes,2,rep,name=taker_notional_volume,json=takerNotionalVolume,proto3" json:"taker_notional_volume,omitempty"` + MarketActivity []*MarketActivityTracker `protobuf:"bytes,1,rep,name=market_activity,json=marketActivity,proto3" json:"market_activity,omitempty"` + TakerNotionalVolume []*TakerNotionalVolume `protobuf:"bytes,2,rep,name=taker_notional_volume,json=takerNotionalVolume,proto3" json:"taker_notional_volume,omitempty"` + MarketToPartyTakerNotionalVolume []*MarketToPartyTakerNotionalVolume `protobuf:"bytes,3,rep,name=market_to_party_taker_notional_volume,json=marketToPartyTakerNotionalVolume,proto3" json:"market_to_party_taker_notional_volume,omitempty"` } func (x *MarketTracker) Reset() { @@ -1930,6 +1931,13 @@ func (x *MarketTracker) GetTakerNotionalVolume() []*TakerNotionalVolume { return nil } +func (x *MarketTracker) GetMarketToPartyTakerNotionalVolume() []*MarketToPartyTakerNotionalVolume { + if x != nil { + return x.MarketToPartyTakerNotionalVolume + } + return nil +} + type MarketActivityTracker struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2419,6 +2427,61 @@ func (x *TakerNotionalVolume) GetVolume() []byte { return nil } +type MarketToPartyTakerNotionalVolume struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Market string `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + TakerNotionalVolume []*TakerNotionalVolume `protobuf:"bytes,2,rep,name=taker_notional_volume,json=takerNotionalVolume,proto3" json:"taker_notional_volume,omitempty"` +} + +func (x *MarketToPartyTakerNotionalVolume) Reset() { + *x = MarketToPartyTakerNotionalVolume{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarketToPartyTakerNotionalVolume) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarketToPartyTakerNotionalVolume) ProtoMessage() {} + +func (x *MarketToPartyTakerNotionalVolume) ProtoReflect() protoreflect.Message { + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[36] + 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 MarketToPartyTakerNotionalVolume.ProtoReflect.Descriptor instead. +func (*MarketToPartyTakerNotionalVolume) Descriptor() ([]byte, []int) { + return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{36} +} + +func (x *MarketToPartyTakerNotionalVolume) GetMarket() string { + if x != nil { + return x.Market + } + return "" +} + +func (x *MarketToPartyTakerNotionalVolume) GetTakerNotionalVolume() []*TakerNotionalVolume { + if x != nil { + return x.TakerNotionalVolume + } + return nil +} + type EpochReturnsData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2430,7 +2493,7 @@ type EpochReturnsData struct { func (x *EpochReturnsData) Reset() { *x = EpochReturnsData{} if protoimpl.UnsafeEnabled { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[36] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2443,7 +2506,7 @@ func (x *EpochReturnsData) String() string { func (*EpochReturnsData) ProtoMessage() {} func (x *EpochReturnsData) ProtoReflect() protoreflect.Message { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[36] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2456,7 +2519,7 @@ func (x *EpochReturnsData) ProtoReflect() protoreflect.Message { // Deprecated: Use EpochReturnsData.ProtoReflect.Descriptor instead. func (*EpochReturnsData) Descriptor() ([]byte, []int) { - return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{36} + return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{37} } func (x *EpochReturnsData) GetReturns() []*ReturnsData { @@ -2478,7 +2541,7 @@ type ReturnsData struct { func (x *ReturnsData) Reset() { *x = ReturnsData{} if protoimpl.UnsafeEnabled { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[37] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2491,7 +2554,7 @@ func (x *ReturnsData) String() string { func (*ReturnsData) ProtoMessage() {} func (x *ReturnsData) ProtoReflect() protoreflect.Message { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[37] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2504,7 +2567,7 @@ func (x *ReturnsData) ProtoReflect() protoreflect.Message { // Deprecated: Use ReturnsData.ProtoReflect.Descriptor instead. func (*ReturnsData) Descriptor() ([]byte, []int) { - return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{37} + return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{38} } func (x *ReturnsData) GetParty() string { @@ -2535,7 +2598,7 @@ type TWPositionData struct { func (x *TWPositionData) Reset() { *x = TWPositionData{} if protoimpl.UnsafeEnabled { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[38] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2548,7 +2611,7 @@ func (x *TWPositionData) String() string { func (*TWPositionData) ProtoMessage() {} func (x *TWPositionData) ProtoReflect() protoreflect.Message { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[38] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2561,7 +2624,7 @@ func (x *TWPositionData) ProtoReflect() protoreflect.Message { // Deprecated: Use TWPositionData.ProtoReflect.Descriptor instead. func (*TWPositionData) Descriptor() ([]byte, []int) { - return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{38} + return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{39} } func (x *TWPositionData) GetParty() string { @@ -2606,7 +2669,7 @@ type TWNotionalData struct { func (x *TWNotionalData) Reset() { *x = TWNotionalData{} if protoimpl.UnsafeEnabled { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[39] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2619,7 +2682,7 @@ func (x *TWNotionalData) String() string { func (*TWNotionalData) ProtoMessage() {} func (x *TWNotionalData) ProtoReflect() protoreflect.Message { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[39] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2632,7 +2695,7 @@ func (x *TWNotionalData) ProtoReflect() protoreflect.Message { // Deprecated: Use TWNotionalData.ProtoReflect.Descriptor instead. func (*TWNotionalData) Descriptor() ([]byte, []int) { - return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{39} + return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{40} } func (x *TWNotionalData) GetParty() string { @@ -2675,7 +2738,7 @@ type PartyFees struct { func (x *PartyFees) Reset() { *x = PartyFees{} if protoimpl.UnsafeEnabled { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[40] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2688,7 +2751,7 @@ func (x *PartyFees) String() string { func (*PartyFees) ProtoMessage() {} func (x *PartyFees) ProtoReflect() protoreflect.Message { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[40] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2701,7 +2764,7 @@ func (x *PartyFees) ProtoReflect() protoreflect.Message { // Deprecated: Use PartyFees.ProtoReflect.Descriptor instead. func (*PartyFees) Descriptor() ([]byte, []int) { - return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{40} + return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{41} } func (x *PartyFees) GetParty() string { @@ -2730,7 +2793,7 @@ type PartyFeesHistory struct { func (x *PartyFeesHistory) Reset() { *x = PartyFeesHistory{} if protoimpl.UnsafeEnabled { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[41] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2743,7 +2806,7 @@ func (x *PartyFeesHistory) String() string { func (*PartyFeesHistory) ProtoMessage() {} func (x *PartyFeesHistory) ProtoReflect() protoreflect.Message { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[41] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2756,7 +2819,7 @@ func (x *PartyFeesHistory) ProtoReflect() protoreflect.Message { // Deprecated: Use PartyFeesHistory.ProtoReflect.Descriptor instead. func (*PartyFeesHistory) Descriptor() ([]byte, []int) { - return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{41} + return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{42} } func (x *PartyFeesHistory) GetParty() string { @@ -2795,7 +2858,7 @@ type AssetAction struct { func (x *AssetAction) Reset() { *x = AssetAction{} if protoimpl.UnsafeEnabled { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[42] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2808,7 +2871,7 @@ func (x *AssetAction) String() string { func (*AssetAction) ProtoMessage() {} func (x *AssetAction) ProtoReflect() protoreflect.Message { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[42] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2821,7 +2884,7 @@ func (x *AssetAction) ProtoReflect() protoreflect.Message { // Deprecated: Use AssetAction.ProtoReflect.Descriptor instead. func (*AssetAction) Descriptor() ([]byte, []int) { - return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{42} + return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{43} } func (x *AssetAction) GetId() string { @@ -2928,7 +2991,7 @@ type ELSShare struct { func (x *ELSShare) Reset() { *x = ELSShare{} if protoimpl.UnsafeEnabled { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[43] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2941,7 +3004,7 @@ func (x *ELSShare) String() string { func (*ELSShare) ProtoMessage() {} func (x *ELSShare) ProtoReflect() protoreflect.Message { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[43] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2954,7 +3017,7 @@ func (x *ELSShare) ProtoReflect() protoreflect.Message { // Deprecated: Use ELSShare.ProtoReflect.Descriptor instead. func (*ELSShare) Descriptor() ([]byte, []int) { - return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{43} + return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{44} } func (x *ELSShare) GetPartyId() string { @@ -3017,7 +3080,7 @@ type MarketState struct { func (x *MarketState) Reset() { *x = MarketState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[44] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3030,7 +3093,7 @@ func (x *MarketState) String() string { func (*MarketState) ProtoMessage() {} func (x *MarketState) ProtoReflect() protoreflect.Message { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[44] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3043,7 +3106,7 @@ func (x *MarketState) ProtoReflect() protoreflect.Message { // Deprecated: Use MarketState.ProtoReflect.Descriptor instead. func (*MarketState) Descriptor() ([]byte, []int) { - return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{44} + return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{45} } func (x *MarketState) GetId() string { @@ -3107,7 +3170,7 @@ type ExecutionState struct { func (x *ExecutionState) Reset() { *x = ExecutionState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[45] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3120,7 +3183,7 @@ func (x *ExecutionState) String() string { func (*ExecutionState) ProtoMessage() {} func (x *ExecutionState) ProtoReflect() protoreflect.Message { - mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[45] + mi := &file_vega_checkpoint_v1_checkpoint_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3133,7 +3196,7 @@ func (x *ExecutionState) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecutionState.ProtoReflect.Descriptor instead. func (*ExecutionState) Descriptor() ([]byte, []int) { - return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{45} + return file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP(), []int{46} } func (x *ExecutionState) GetData() []*MarketState { @@ -3454,7 +3517,7 @@ var file_vega_checkpoint_v1_checkpoint_proto_rawDesc = []byte{ 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, - 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x65, 0x6e, 0x22, 0xc0, 0x01, 0x0a, + 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x65, 0x6e, 0x22, 0xc8, 0x02, 0x0a, 0x0d, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x0f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, @@ -3466,226 +3529,244 @@ var file_vega_checkpoint_v1_checkpoint_proto_rawDesc = []byte{ 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x13, 0x74, 0x61, 0x6b, 0x65, - 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, - 0xf3, 0x09, 0x0a, 0x15, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, - 0x74, 0x79, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x4d, 0x0a, 0x13, 0x6d, 0x61, 0x6b, 0x65, 0x72, - 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, - 0x65, 0x65, 0x73, 0x52, 0x11, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x52, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x0f, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, - 0x66, 0x65, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x69, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x0d, - 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x50, 0x61, 0x69, 0x64, 0x12, 0x36, 0x0a, - 0x07, 0x6c, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x06, 0x6c, - 0x70, 0x46, 0x65, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6e, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x69, 0x64, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x6e, 0x75, 0x73, 0x50, 0x61, 0x69, 0x64, - 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x64, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x72, 0x61, - 0x64, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x74, 0x6f, 0x5f, - 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, - 0x61, 0x64, 0x79, 0x54, 0x6f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x58, 0x0a, 0x16, 0x74, - 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x54, 0x57, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x14, 0x74, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x16, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, - 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x57, 0x4e, 0x6f, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x57, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, - 0x42, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x61, 0x0a, 0x1b, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, - 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x18, 0x6d, 0x61, - 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x59, 0x0a, 0x17, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, - 0x66, 0x65, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x69, 0x64, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x14, 0x6d, 0x61, 0x6b, - 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x50, 0x61, 0x69, 0x64, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x12, 0x4a, 0x0a, 0x0f, 0x6c, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x68, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x0d, - 0x6c, 0x70, 0x46, 0x65, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x7d, 0x0a, - 0x23, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x68, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x1f, 0x74, 0x69, 0x6d, - 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x7f, 0x0a, 0x23, - 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x6f, - 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x68, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, - 0x70, 0x6f, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, - 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x1f, 0x74, 0x69, - 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x56, 0x0a, - 0x14, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x68, 0x69, - 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x12, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, - 0x73, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x8f, 0x01, 0x0a, 0x1b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, - 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x70, 0x0a, 0x1d, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, + 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, + 0x85, 0x01, 0x0a, 0x25, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x34, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x6f, 0x50, 0x61, 0x72, + 0x74, 0x79, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x6f, 0x50, + 0x61, 0x72, 0x74, 0x79, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0xf3, 0x09, 0x0a, 0x15, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, + 0x4d, 0x0a, 0x13, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1a, 0x70, 0x61, 0x72, - 0x74, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x45, 0x70, 0x6f, 0x63, - 0x68, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4e, 0x6f, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x70, 0x0a, 0x1d, 0x70, 0x61, 0x72, - 0x74, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, - 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x57, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, - 0x1a, 0x70, 0x61, 0x72, 0x74, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x73, 0x22, 0x52, 0x0a, 0x19, 0x50, - 0x61, 0x72, 0x74, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, - 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x1f, - 0x0a, 0x0b, 0x74, 0x77, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x74, 0x77, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, - 0x52, 0x0a, 0x19, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, - 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x77, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x74, 0x77, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x0e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, - 0x79, 0x46, 0x65, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x66, - 0x65, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, - 0x09, 0x70, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x22, 0x43, 0x0a, 0x13, 0x54, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x11, 0x6d, 0x61, 0x6b, + 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x45, + 0x0a, 0x0f, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, + 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x0d, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, + 0x73, 0x50, 0x61, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x07, 0x6c, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, + 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x06, 0x6c, 0x70, 0x46, 0x65, 0x65, 0x73, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6e, + 0x75, 0x73, 0x5f, 0x70, 0x61, 0x69, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x62, + 0x6f, 0x6e, 0x75, 0x73, 0x50, 0x61, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x72, + 0x65, 0x61, 0x64, 0x79, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x6f, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x12, 0x58, 0x0a, 0x16, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x57, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, + 0x16, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x6e, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x57, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4e, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x42, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x73, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, + 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x61, 0x0a, 0x1b, 0x6d, + 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x79, + 0x46, 0x65, 0x65, 0x73, 0x52, 0x18, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x59, + 0x0a, 0x17, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x69, + 0x64, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, + 0x65, 0x65, 0x73, 0x52, 0x14, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x50, 0x61, + 0x69, 0x64, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x4a, 0x0a, 0x0f, 0x6c, 0x70, 0x5f, + 0x66, 0x65, 0x65, 0x73, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x0f, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, + 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x52, 0x0d, 0x6c, 0x70, 0x46, 0x65, 0x65, 0x73, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x7d, 0x0a, 0x23, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x10, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x69, 0x6d, + 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x1f, 0x74, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, + 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x12, 0x7f, 0x0a, 0x23, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x11, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, + 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x1f, 0x74, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x14, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x12, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x12, 0x72, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x73, 0x44, 0x61, 0x74, 0x61, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x8f, 0x01, + 0x0a, 0x1b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x70, 0x0a, + 0x1d, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, + 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x1a, 0x70, 0x61, 0x72, 0x74, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0x91, 0x01, 0x0a, 0x1d, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x70, 0x0a, 0x1d, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, + 0x72, 0x74, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4e, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x1a, 0x70, 0x61, 0x72, 0x74, 0x79, 0x54, 0x69, + 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x73, 0x22, 0x52, 0x0a, 0x19, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, 0x69, 0x6d, 0x65, + 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x77, 0x5f, 0x6e, 0x6f, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x74, 0x77, 0x4e, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0x52, 0x0a, 0x19, 0x50, 0x61, 0x72, 0x74, 0x79, + 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x77, + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0a, 0x74, 0x77, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x0e, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x12, 0x43, 0x0a, + 0x0a, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, + 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, + 0x65, 0x73, 0x22, 0x43, 0x0a, 0x13, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, + 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x20, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x54, 0x6f, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x4e, 0x6f, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x12, 0x5b, 0x0a, 0x15, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x6e, 0x6f, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x4e, 0x6f, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x13, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, - 0x4d, 0x0a, 0x10, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x22, 0x3b, - 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, - 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, - 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x22, 0x77, 0x0a, 0x0e, 0x54, - 0x57, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, - 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, - 0x72, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, - 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x77, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x74, 0x77, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x77, 0x0a, 0x0e, 0x54, 0x57, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, - 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, - 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x74, 0x77, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0a, 0x74, 0x77, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0x33, 0x0a, - 0x09, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, - 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, - 0x65, 0x65, 0x22, 0x3a, 0x0a, 0x10, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x8d, - 0x04, 0x0a, 0x0b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x0a, - 0x08, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x07, 0x74, 0x78, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x42, 0x0a, 0x0f, - 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x42, 0x75, 0x69, - 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x52, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x12, 0x37, 0x0a, 0x0d, 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, - 0x52, 0x43, 0x32, 0x30, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x0c, 0x65, 0x72, 0x63, - 0x32, 0x30, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5a, - 0x0a, 0x1a, 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x52, 0x17, 0x65, 0x72, 0x63, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x72, - 0x63, 0x32, 0x30, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x70, - 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x72, 0x63, 0x32, 0x30, 0x42, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x14, - 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x73, - 0x75, 0x6d, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x72, 0x63, 0x32, - 0x30, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x22, 0x99, - 0x01, 0x0a, 0x08, 0x45, 0x4c, 0x53, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, - 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x25, 0x0a, 0x0e, - 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, - 0x75, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x76, 0x67, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x76, 0x67, 0x22, 0xa9, 0x02, 0x0a, 0x0b, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x68, - 0x61, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x45, 0x4c, 0x53, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, - 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x62, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x69, 0x6e, 0x73, - 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x28, 0x0a, - 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, - 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, - 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x56, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x12, 0x24, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x06, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x22, 0x45, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x65, 0x22, 0x4d, 0x0a, 0x10, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x35, 0x5a, - 0x33, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, + 0x22, 0x3b, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x22, 0x77, 0x0a, + 0x0e, 0x54, 0x57, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x77, 0x5f, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x74, 0x77, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x77, 0x0a, 0x0e, 0x54, 0x57, 0x4e, 0x6f, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x1a, + 0x0a, 0x08, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x74, 0x77, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x74, 0x77, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, + 0x33, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x66, 0x65, 0x65, 0x22, 0x3a, 0x0a, 0x10, 0x50, 0x61, 0x72, 0x74, 0x79, 0x46, 0x65, 0x65, + 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x66, 0x65, 0x65, + 0x22, 0x8d, 0x04, 0x0a, 0x0b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x07, 0x74, 0x78, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x42, + 0x0a, 0x0f, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x42, + 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x52, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x12, 0x37, 0x0a, 0x0d, 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x0c, 0x65, + 0x72, 0x63, 0x32, 0x30, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x5a, 0x0a, 0x1a, 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x52, 0x43, 0x32, + 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x52, 0x17, 0x65, 0x72, 0x63, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x14, + 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x6f, + 0x70, 0x70, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x72, 0x63, 0x32, + 0x30, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x12, 0x30, + 0x0a, 0x14, 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x72, + 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x72, + 0x63, 0x32, 0x30, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, + 0x22, 0x99, 0x01, 0x0a, 0x08, 0x45, 0x4c, 0x53, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x25, + 0x0a, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, + 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, + 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x76, 0x69, + 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x76, + 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x76, 0x67, 0x22, 0xa9, 0x02, 0x0a, + 0x0b, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x06, + 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x4c, 0x53, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x5f, + 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x69, + 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, + 0x28, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x54, + 0x72, 0x61, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x10, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x12, 0x24, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x22, 0x45, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, + 0x35, 0x5a, 0x33, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3700,7 +3781,7 @@ func file_vega_checkpoint_v1_checkpoint_proto_rawDescGZIP() []byte { return file_vega_checkpoint_v1_checkpoint_proto_rawDescData } -var file_vega_checkpoint_v1_checkpoint_proto_msgTypes = make([]protoimpl.MessageInfo, 46) +var file_vega_checkpoint_v1_checkpoint_proto_msgTypes = make([]protoimpl.MessageInfo, 47) var file_vega_checkpoint_v1_checkpoint_proto_goTypes = []interface{}{ (*CheckpointState)(nil), // 0: vega.checkpoint.v1.CheckpointState (*Checkpoint)(nil), // 1: vega.checkpoint.v1.Checkpoint @@ -3738,99 +3819,102 @@ var file_vega_checkpoint_v1_checkpoint_proto_goTypes = []interface{}{ (*PartyTimeWeightedPosition)(nil), // 33: vega.checkpoint.v1.PartyTimeWeightedPosition (*EpochPartyFees)(nil), // 34: vega.checkpoint.v1.EpochPartyFees (*TakerNotionalVolume)(nil), // 35: vega.checkpoint.v1.TakerNotionalVolume - (*EpochReturnsData)(nil), // 36: vega.checkpoint.v1.EpochReturnsData - (*ReturnsData)(nil), // 37: vega.checkpoint.v1.ReturnsData - (*TWPositionData)(nil), // 38: vega.checkpoint.v1.TWPositionData - (*TWNotionalData)(nil), // 39: vega.checkpoint.v1.TWNotionalData - (*PartyFees)(nil), // 40: vega.checkpoint.v1.PartyFees - (*PartyFeesHistory)(nil), // 41: vega.checkpoint.v1.PartyFeesHistory - (*AssetAction)(nil), // 42: vega.checkpoint.v1.AssetAction - (*ELSShare)(nil), // 43: vega.checkpoint.v1.ELSShare - (*MarketState)(nil), // 44: vega.checkpoint.v1.MarketState - (*ExecutionState)(nil), // 45: vega.checkpoint.v1.ExecutionState - (*vega.AssetDetails)(nil), // 46: vega.AssetDetails - (*vega.NetworkParameter)(nil), // 47: vega.NetworkParameter - (*vega.Proposal)(nil), // 48: vega.Proposal - (*vega.Transfer)(nil), // 49: vega.Transfer - (vega.AccountType)(0), // 50: vega.AccountType - (*v1.Transfer)(nil), // 51: vega.events.v1.Transfer - (v1.Transfer_Status)(0), // 52: vega.events.v1.Transfer.Status - (*vega.NewTransferConfiguration)(nil), // 53: vega.NewTransferConfiguration - (*v1.ValidatorUpdate)(nil), // 54: vega.events.v1.ValidatorUpdate - (*vega.RankingScore)(nil), // 55: vega.RankingScore - (*v1.StakeLinking)(nil), // 56: vega.events.v1.StakeLinking - (*v1.ERC20MultiSigSignerEvent)(nil), // 57: vega.events.v1.ERC20MultiSigSignerEvent - (*v1.ERC20MultiSigThresholdSetEvent)(nil), // 58: vega.events.v1.ERC20MultiSigThresholdSetEvent - (*vega.BuiltinAssetDeposit)(nil), // 59: vega.BuiltinAssetDeposit - (*vega.ERC20Deposit)(nil), // 60: vega.ERC20Deposit - (*vega.ERC20AssetList)(nil), // 61: vega.ERC20AssetList - (*vega.ERC20AssetLimitsUpdated)(nil), // 62: vega.ERC20AssetLimitsUpdated - (*vega.Market)(nil), // 63: vega.Market + (*MarketToPartyTakerNotionalVolume)(nil), // 36: vega.checkpoint.v1.MarketToPartyTakerNotionalVolume + (*EpochReturnsData)(nil), // 37: vega.checkpoint.v1.EpochReturnsData + (*ReturnsData)(nil), // 38: vega.checkpoint.v1.ReturnsData + (*TWPositionData)(nil), // 39: vega.checkpoint.v1.TWPositionData + (*TWNotionalData)(nil), // 40: vega.checkpoint.v1.TWNotionalData + (*PartyFees)(nil), // 41: vega.checkpoint.v1.PartyFees + (*PartyFeesHistory)(nil), // 42: vega.checkpoint.v1.PartyFeesHistory + (*AssetAction)(nil), // 43: vega.checkpoint.v1.AssetAction + (*ELSShare)(nil), // 44: vega.checkpoint.v1.ELSShare + (*MarketState)(nil), // 45: vega.checkpoint.v1.MarketState + (*ExecutionState)(nil), // 46: vega.checkpoint.v1.ExecutionState + (*vega.AssetDetails)(nil), // 47: vega.AssetDetails + (*vega.NetworkParameter)(nil), // 48: vega.NetworkParameter + (*vega.Proposal)(nil), // 49: vega.Proposal + (*vega.Transfer)(nil), // 50: vega.Transfer + (vega.AccountType)(0), // 51: vega.AccountType + (*v1.Transfer)(nil), // 52: vega.events.v1.Transfer + (v1.Transfer_Status)(0), // 53: vega.events.v1.Transfer.Status + (*vega.NewTransferConfiguration)(nil), // 54: vega.NewTransferConfiguration + (*v1.ValidatorUpdate)(nil), // 55: vega.events.v1.ValidatorUpdate + (*vega.RankingScore)(nil), // 56: vega.RankingScore + (*v1.StakeLinking)(nil), // 57: vega.events.v1.StakeLinking + (*v1.ERC20MultiSigSignerEvent)(nil), // 58: vega.events.v1.ERC20MultiSigSignerEvent + (*v1.ERC20MultiSigThresholdSetEvent)(nil), // 59: vega.events.v1.ERC20MultiSigThresholdSetEvent + (*vega.BuiltinAssetDeposit)(nil), // 60: vega.BuiltinAssetDeposit + (*vega.ERC20Deposit)(nil), // 61: vega.ERC20Deposit + (*vega.ERC20AssetList)(nil), // 62: vega.ERC20AssetList + (*vega.ERC20AssetLimitsUpdated)(nil), // 63: vega.ERC20AssetLimitsUpdated + (*vega.Market)(nil), // 64: vega.Market } var file_vega_checkpoint_v1_checkpoint_proto_depIdxs = []int32{ - 46, // 0: vega.checkpoint.v1.AssetEntry.asset_details:type_name -> vega.AssetDetails + 47, // 0: vega.checkpoint.v1.AssetEntry.asset_details:type_name -> vega.AssetDetails 2, // 1: vega.checkpoint.v1.Assets.assets:type_name -> vega.checkpoint.v1.AssetEntry 2, // 2: vega.checkpoint.v1.Assets.pending_listing_assets:type_name -> vega.checkpoint.v1.AssetEntry 4, // 3: vega.checkpoint.v1.Collateral.balances:type_name -> vega.checkpoint.v1.AssetBalance - 47, // 4: vega.checkpoint.v1.NetParams.params:type_name -> vega.NetworkParameter - 48, // 5: vega.checkpoint.v1.Proposals.proposals:type_name -> vega.Proposal + 48, // 4: vega.checkpoint.v1.NetParams.params:type_name -> vega.NetworkParameter + 49, // 5: vega.checkpoint.v1.Proposals.proposals:type_name -> vega.Proposal 8, // 6: vega.checkpoint.v1.Delegate.active:type_name -> vega.checkpoint.v1.DelegateEntry 8, // 7: vega.checkpoint.v1.Delegate.pending:type_name -> vega.checkpoint.v1.DelegateEntry 12, // 8: vega.checkpoint.v1.Rewards.rewards:type_name -> vega.checkpoint.v1.RewardPayout 13, // 9: vega.checkpoint.v1.RewardPayout.rewards_payout:type_name -> vega.checkpoint.v1.PendingRewardPayout 14, // 10: vega.checkpoint.v1.PendingRewardPayout.party_amount:type_name -> vega.checkpoint.v1.PartyAmount - 49, // 11: vega.checkpoint.v1.ScheduledTransfer.transfer:type_name -> vega.Transfer - 50, // 12: vega.checkpoint.v1.ScheduledTransfer.account_type:type_name -> vega.AccountType - 51, // 13: vega.checkpoint.v1.ScheduledTransfer.oneoff_transfer:type_name -> vega.events.v1.Transfer + 50, // 11: vega.checkpoint.v1.ScheduledTransfer.transfer:type_name -> vega.Transfer + 51, // 12: vega.checkpoint.v1.ScheduledTransfer.account_type:type_name -> vega.AccountType + 52, // 13: vega.checkpoint.v1.ScheduledTransfer.oneoff_transfer:type_name -> vega.events.v1.Transfer 17, // 14: vega.checkpoint.v1.ScheduledTransferAtTime.transfers:type_name -> vega.checkpoint.v1.ScheduledTransfer - 51, // 15: vega.checkpoint.v1.RecurringTransfers.recurring_transfers:type_name -> vega.events.v1.Transfer - 52, // 16: vega.checkpoint.v1.GovernanceTransfer.status:type_name -> vega.events.v1.Transfer.Status - 53, // 17: vega.checkpoint.v1.GovernanceTransfer.config:type_name -> vega.NewTransferConfiguration + 52, // 15: vega.checkpoint.v1.RecurringTransfers.recurring_transfers:type_name -> vega.events.v1.Transfer + 53, // 16: vega.checkpoint.v1.GovernanceTransfer.status:type_name -> vega.events.v1.Transfer.Status + 54, // 17: vega.checkpoint.v1.GovernanceTransfer.config:type_name -> vega.NewTransferConfiguration 20, // 18: vega.checkpoint.v1.ScheduledGovernanceTransferAtTime.transfers:type_name -> vega.checkpoint.v1.GovernanceTransfer 18, // 19: vega.checkpoint.v1.Banking.transfers_at_time:type_name -> vega.checkpoint.v1.ScheduledTransferAtTime 19, // 20: vega.checkpoint.v1.Banking.recurring_transfers:type_name -> vega.checkpoint.v1.RecurringTransfers 23, // 21: vega.checkpoint.v1.Banking.bridge_state:type_name -> vega.checkpoint.v1.BridgeState - 42, // 22: vega.checkpoint.v1.Banking.asset_actions:type_name -> vega.checkpoint.v1.AssetAction + 43, // 22: vega.checkpoint.v1.Banking.asset_actions:type_name -> vega.checkpoint.v1.AssetAction 21, // 23: vega.checkpoint.v1.Banking.governance_transfers_at_time:type_name -> vega.checkpoint.v1.ScheduledGovernanceTransferAtTime 20, // 24: vega.checkpoint.v1.Banking.recurring_governance_transfers:type_name -> vega.checkpoint.v1.GovernanceTransfer 25, // 25: vega.checkpoint.v1.Validators.validator_state:type_name -> vega.checkpoint.v1.ValidatorState 15, // 26: vega.checkpoint.v1.Validators.pending_key_rotations:type_name -> vega.checkpoint.v1.PendingKeyRotation 16, // 27: vega.checkpoint.v1.Validators.pending_ethereum_key_rotations:type_name -> vega.checkpoint.v1.PendingEthereumKeyRotation - 54, // 28: vega.checkpoint.v1.ValidatorState.validator_update:type_name -> vega.events.v1.ValidatorUpdate - 55, // 29: vega.checkpoint.v1.ValidatorState.ranking_score:type_name -> vega.RankingScore - 56, // 30: vega.checkpoint.v1.Staking.accepted:type_name -> vega.events.v1.StakeLinking - 57, // 31: vega.checkpoint.v1.MultisigControl.signers:type_name -> vega.events.v1.ERC20MultiSigSignerEvent - 58, // 32: vega.checkpoint.v1.MultisigControl.threshold_set:type_name -> vega.events.v1.ERC20MultiSigThresholdSetEvent + 55, // 28: vega.checkpoint.v1.ValidatorState.validator_update:type_name -> vega.events.v1.ValidatorUpdate + 56, // 29: vega.checkpoint.v1.ValidatorState.ranking_score:type_name -> vega.RankingScore + 57, // 30: vega.checkpoint.v1.Staking.accepted:type_name -> vega.events.v1.StakeLinking + 58, // 31: vega.checkpoint.v1.MultisigControl.signers:type_name -> vega.events.v1.ERC20MultiSigSignerEvent + 59, // 32: vega.checkpoint.v1.MultisigControl.threshold_set:type_name -> vega.events.v1.ERC20MultiSigThresholdSetEvent 29, // 33: vega.checkpoint.v1.MarketTracker.market_activity:type_name -> vega.checkpoint.v1.MarketActivityTracker 35, // 34: vega.checkpoint.v1.MarketTracker.taker_notional_volume:type_name -> vega.checkpoint.v1.TakerNotionalVolume - 40, // 35: vega.checkpoint.v1.MarketActivityTracker.maker_fees_received:type_name -> vega.checkpoint.v1.PartyFees - 40, // 36: vega.checkpoint.v1.MarketActivityTracker.maker_fees_paid:type_name -> vega.checkpoint.v1.PartyFees - 40, // 37: vega.checkpoint.v1.MarketActivityTracker.lp_fees:type_name -> vega.checkpoint.v1.PartyFees - 38, // 38: vega.checkpoint.v1.MarketActivityTracker.time_weighted_position:type_name -> vega.checkpoint.v1.TWPositionData - 39, // 39: vega.checkpoint.v1.MarketActivityTracker.time_weighted_notional:type_name -> vega.checkpoint.v1.TWNotionalData - 37, // 40: vega.checkpoint.v1.MarketActivityTracker.returns_data:type_name -> vega.checkpoint.v1.ReturnsData - 34, // 41: vega.checkpoint.v1.MarketActivityTracker.maker_fees_received_history:type_name -> vega.checkpoint.v1.EpochPartyFees - 34, // 42: vega.checkpoint.v1.MarketActivityTracker.maker_fees_paid_history:type_name -> vega.checkpoint.v1.EpochPartyFees - 34, // 43: vega.checkpoint.v1.MarketActivityTracker.lp_fees_history:type_name -> vega.checkpoint.v1.EpochPartyFees - 30, // 44: vega.checkpoint.v1.MarketActivityTracker.time_weighted_position_data_history:type_name -> vega.checkpoint.v1.EpochTimeWeightPositionData - 31, // 45: vega.checkpoint.v1.MarketActivityTracker.time_weighted_notional_data_history:type_name -> vega.checkpoint.v1.EpochTimeWeightedNotionalData - 36, // 46: vega.checkpoint.v1.MarketActivityTracker.returns_data_history:type_name -> vega.checkpoint.v1.EpochReturnsData - 33, // 47: vega.checkpoint.v1.EpochTimeWeightPositionData.party_time_weighted_positions:type_name -> vega.checkpoint.v1.PartyTimeWeightedPosition - 32, // 48: vega.checkpoint.v1.EpochTimeWeightedNotionalData.party_time_weighted_notionals:type_name -> vega.checkpoint.v1.PartyTimeWeightedNotional - 41, // 49: vega.checkpoint.v1.EpochPartyFees.party_fees:type_name -> vega.checkpoint.v1.PartyFeesHistory - 37, // 50: vega.checkpoint.v1.EpochReturnsData.returns:type_name -> vega.checkpoint.v1.ReturnsData - 59, // 51: vega.checkpoint.v1.AssetAction.builtin_deposit:type_name -> vega.BuiltinAssetDeposit - 60, // 52: vega.checkpoint.v1.AssetAction.erc20_deposit:type_name -> vega.ERC20Deposit - 61, // 53: vega.checkpoint.v1.AssetAction.asset_list:type_name -> vega.ERC20AssetList - 62, // 54: vega.checkpoint.v1.AssetAction.erc20_asset_limits_updated:type_name -> vega.ERC20AssetLimitsUpdated - 43, // 55: vega.checkpoint.v1.MarketState.shares:type_name -> vega.checkpoint.v1.ELSShare - 63, // 56: vega.checkpoint.v1.MarketState.market:type_name -> vega.Market - 44, // 57: vega.checkpoint.v1.ExecutionState.data:type_name -> vega.checkpoint.v1.MarketState - 58, // [58:58] is the sub-list for method output_type - 58, // [58:58] is the sub-list for method input_type - 58, // [58:58] is the sub-list for extension type_name - 58, // [58:58] is the sub-list for extension extendee - 0, // [0:58] is the sub-list for field type_name + 36, // 35: vega.checkpoint.v1.MarketTracker.market_to_party_taker_notional_volume:type_name -> vega.checkpoint.v1.MarketToPartyTakerNotionalVolume + 41, // 36: vega.checkpoint.v1.MarketActivityTracker.maker_fees_received:type_name -> vega.checkpoint.v1.PartyFees + 41, // 37: vega.checkpoint.v1.MarketActivityTracker.maker_fees_paid:type_name -> vega.checkpoint.v1.PartyFees + 41, // 38: vega.checkpoint.v1.MarketActivityTracker.lp_fees:type_name -> vega.checkpoint.v1.PartyFees + 39, // 39: vega.checkpoint.v1.MarketActivityTracker.time_weighted_position:type_name -> vega.checkpoint.v1.TWPositionData + 40, // 40: vega.checkpoint.v1.MarketActivityTracker.time_weighted_notional:type_name -> vega.checkpoint.v1.TWNotionalData + 38, // 41: vega.checkpoint.v1.MarketActivityTracker.returns_data:type_name -> vega.checkpoint.v1.ReturnsData + 34, // 42: vega.checkpoint.v1.MarketActivityTracker.maker_fees_received_history:type_name -> vega.checkpoint.v1.EpochPartyFees + 34, // 43: vega.checkpoint.v1.MarketActivityTracker.maker_fees_paid_history:type_name -> vega.checkpoint.v1.EpochPartyFees + 34, // 44: vega.checkpoint.v1.MarketActivityTracker.lp_fees_history:type_name -> vega.checkpoint.v1.EpochPartyFees + 30, // 45: vega.checkpoint.v1.MarketActivityTracker.time_weighted_position_data_history:type_name -> vega.checkpoint.v1.EpochTimeWeightPositionData + 31, // 46: vega.checkpoint.v1.MarketActivityTracker.time_weighted_notional_data_history:type_name -> vega.checkpoint.v1.EpochTimeWeightedNotionalData + 37, // 47: vega.checkpoint.v1.MarketActivityTracker.returns_data_history:type_name -> vega.checkpoint.v1.EpochReturnsData + 33, // 48: vega.checkpoint.v1.EpochTimeWeightPositionData.party_time_weighted_positions:type_name -> vega.checkpoint.v1.PartyTimeWeightedPosition + 32, // 49: vega.checkpoint.v1.EpochTimeWeightedNotionalData.party_time_weighted_notionals:type_name -> vega.checkpoint.v1.PartyTimeWeightedNotional + 42, // 50: vega.checkpoint.v1.EpochPartyFees.party_fees:type_name -> vega.checkpoint.v1.PartyFeesHistory + 35, // 51: vega.checkpoint.v1.MarketToPartyTakerNotionalVolume.taker_notional_volume:type_name -> vega.checkpoint.v1.TakerNotionalVolume + 38, // 52: vega.checkpoint.v1.EpochReturnsData.returns:type_name -> vega.checkpoint.v1.ReturnsData + 60, // 53: vega.checkpoint.v1.AssetAction.builtin_deposit:type_name -> vega.BuiltinAssetDeposit + 61, // 54: vega.checkpoint.v1.AssetAction.erc20_deposit:type_name -> vega.ERC20Deposit + 62, // 55: vega.checkpoint.v1.AssetAction.asset_list:type_name -> vega.ERC20AssetList + 63, // 56: vega.checkpoint.v1.AssetAction.erc20_asset_limits_updated:type_name -> vega.ERC20AssetLimitsUpdated + 44, // 57: vega.checkpoint.v1.MarketState.shares:type_name -> vega.checkpoint.v1.ELSShare + 64, // 58: vega.checkpoint.v1.MarketState.market:type_name -> vega.Market + 45, // 59: vega.checkpoint.v1.ExecutionState.data:type_name -> vega.checkpoint.v1.MarketState + 60, // [60:60] is the sub-list for method output_type + 60, // [60:60] is the sub-list for method input_type + 60, // [60:60] is the sub-list for extension type_name + 60, // [60:60] is the sub-list for extension extendee + 0, // [0:60] is the sub-list for field type_name } func init() { file_vega_checkpoint_v1_checkpoint_proto_init() } @@ -4272,7 +4356,7 @@ func file_vega_checkpoint_v1_checkpoint_proto_init() { } } file_vega_checkpoint_v1_checkpoint_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EpochReturnsData); i { + switch v := v.(*MarketToPartyTakerNotionalVolume); i { case 0: return &v.state case 1: @@ -4284,7 +4368,7 @@ func file_vega_checkpoint_v1_checkpoint_proto_init() { } } file_vega_checkpoint_v1_checkpoint_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReturnsData); i { + switch v := v.(*EpochReturnsData); i { case 0: return &v.state case 1: @@ -4296,7 +4380,7 @@ func file_vega_checkpoint_v1_checkpoint_proto_init() { } } file_vega_checkpoint_v1_checkpoint_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TWPositionData); i { + switch v := v.(*ReturnsData); i { case 0: return &v.state case 1: @@ -4308,7 +4392,7 @@ func file_vega_checkpoint_v1_checkpoint_proto_init() { } } file_vega_checkpoint_v1_checkpoint_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TWNotionalData); i { + switch v := v.(*TWPositionData); i { case 0: return &v.state case 1: @@ -4320,7 +4404,7 @@ func file_vega_checkpoint_v1_checkpoint_proto_init() { } } file_vega_checkpoint_v1_checkpoint_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyFees); i { + switch v := v.(*TWNotionalData); i { case 0: return &v.state case 1: @@ -4332,7 +4416,7 @@ func file_vega_checkpoint_v1_checkpoint_proto_init() { } } file_vega_checkpoint_v1_checkpoint_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyFeesHistory); i { + switch v := v.(*PartyFees); i { case 0: return &v.state case 1: @@ -4344,7 +4428,7 @@ func file_vega_checkpoint_v1_checkpoint_proto_init() { } } file_vega_checkpoint_v1_checkpoint_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssetAction); i { + switch v := v.(*PartyFeesHistory); i { case 0: return &v.state case 1: @@ -4356,7 +4440,7 @@ func file_vega_checkpoint_v1_checkpoint_proto_init() { } } file_vega_checkpoint_v1_checkpoint_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ELSShare); i { + switch v := v.(*AssetAction); i { case 0: return &v.state case 1: @@ -4368,7 +4452,7 @@ func file_vega_checkpoint_v1_checkpoint_proto_init() { } } file_vega_checkpoint_v1_checkpoint_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarketState); i { + switch v := v.(*ELSShare); i { case 0: return &v.state case 1: @@ -4380,6 +4464,18 @@ func file_vega_checkpoint_v1_checkpoint_proto_init() { } } file_vega_checkpoint_v1_checkpoint_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_checkpoint_v1_checkpoint_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExecutionState); i { case 0: return &v.state @@ -4398,7 +4494,7 @@ func file_vega_checkpoint_v1_checkpoint_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vega_checkpoint_v1_checkpoint_proto_rawDesc, NumEnums: 0, - NumMessages: 46, + NumMessages: 47, NumExtensions: 0, NumServices: 0, }, diff --git a/protos/vega/commands/v1/commands.pb.go b/protos/vega/commands/v1/commands.pb.go index 4d906131b8..8da7c7fd3e 100644 --- a/protos/vega/commands/v1/commands.pb.go +++ b/protos/vega/commands/v1/commands.pb.go @@ -21,6 +21,58 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type UpdateMarginMode_Mode int32 + +const ( + // Never valid. + UpdateMarginMode_MODE_UNSPECIFIED UpdateMarginMode_Mode = 0 + // Cross margin mode - margin is dynamically acquired and released as a position is marked to market + UpdateMarginMode_MODE_CROSS_MARGIN UpdateMarginMode_Mode = 1 + // Isolated margin mode - margin for any newly opened position volume is transferred to the margin account when the trade is executed + UpdateMarginMode_MODE_ISOLATED_MARGIN UpdateMarginMode_Mode = 2 +) + +// Enum value maps for UpdateMarginMode_Mode. +var ( + UpdateMarginMode_Mode_name = map[int32]string{ + 0: "MODE_UNSPECIFIED", + 1: "MODE_CROSS_MARGIN", + 2: "MODE_ISOLATED_MARGIN", + } + UpdateMarginMode_Mode_value = map[string]int32{ + "MODE_UNSPECIFIED": 0, + "MODE_CROSS_MARGIN": 1, + "MODE_ISOLATED_MARGIN": 2, + } +) + +func (x UpdateMarginMode_Mode) Enum() *UpdateMarginMode_Mode { + p := new(UpdateMarginMode_Mode) + *p = x + return p +} + +func (x UpdateMarginMode_Mode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UpdateMarginMode_Mode) Descriptor() protoreflect.EnumDescriptor { + return file_vega_commands_v1_commands_proto_enumTypes[0].Descriptor() +} + +func (UpdateMarginMode_Mode) Type() protoreflect.EnumType { + return &file_vega_commands_v1_commands_proto_enumTypes[0] +} + +func (x UpdateMarginMode_Mode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use UpdateMarginMode_Mode.Descriptor instead. +func (UpdateMarginMode_Mode) EnumDescriptor() ([]byte, []int) { + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{6, 0} +} + type UndelegateSubmission_Method int32 const ( @@ -56,11 +108,11 @@ func (x UndelegateSubmission_Method) String() string { } func (UndelegateSubmission_Method) Descriptor() protoreflect.EnumDescriptor { - return file_vega_commands_v1_commands_proto_enumTypes[0].Descriptor() + return file_vega_commands_v1_commands_proto_enumTypes[1].Descriptor() } func (UndelegateSubmission_Method) Type() protoreflect.EnumType { - return &file_vega_commands_v1_commands_proto_enumTypes[0] + return &file_vega_commands_v1_commands_proto_enumTypes[1] } func (x UndelegateSubmission_Method) Number() protoreflect.EnumNumber { @@ -69,7 +121,7 @@ func (x UndelegateSubmission_Method) Number() protoreflect.EnumNumber { // Deprecated: Use UndelegateSubmission_Method.Descriptor instead. func (UndelegateSubmission_Method) EnumDescriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{15, 0} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{18, 0} } // A command that allows the submission of a batch market instruction which wraps up multiple market instructions into a single transaction. @@ -94,6 +146,8 @@ type BatchMarketInstructions struct { StopOrdersCancellation []*StopOrdersCancellation `protobuf:"bytes,4,rep,name=stop_orders_cancellation,json=stopOrdersCancellation,proto3" json:"stop_orders_cancellation,omitempty"` // List of stop order submissions to be processed sequentially. StopOrdersSubmission []*StopOrdersSubmission `protobuf:"bytes,5,rep,name=stop_orders_submission,json=stopOrdersSubmission,proto3" json:"stop_orders_submission,omitempty"` + // Update margin mode instruction + UpdateMarginMode []*UpdateMarginMode `protobuf:"bytes,6,rep,name=update_margin_mode,json=updateMarginMode,proto3" json:"update_margin_mode,omitempty"` } func (x *BatchMarketInstructions) Reset() { @@ -163,6 +217,13 @@ func (x *BatchMarketInstructions) GetStopOrdersSubmission() []*StopOrdersSubmiss return nil } +func (x *BatchMarketInstructions) GetUpdateMarginMode() []*UpdateMarginMode { + if x != nil { + return x.UpdateMarginMode + } + return nil +} + // A command that allows a party to submit a stop order for a given market. // A stop order is a normal order that remains off the order book and is only submitted if a given trigger is breached from a particular direction. // If both rises-above and falls-below are configured, then if one is triggered the other will be cancelled (OCO). @@ -235,6 +296,10 @@ type StopOrderSetup struct { ExpiresAt *int64 `protobuf:"varint,2,opt,name=expires_at,json=expiresAt,proto3,oneof" json:"expires_at,omitempty"` // Strategy to adopt if the expiry time is reached. ExpiryStrategy *vega.StopOrder_ExpiryStrategy `protobuf:"varint,3,opt,name=expiry_strategy,json=expiryStrategy,proto3,enum=vega.StopOrder_ExpiryStrategy,oneof" json:"expiry_strategy,omitempty"` + // Indicates if this order is linked to an order or position to derive the order size + SizeOverrideSetting *vega.StopOrder_SizeOverrideSetting `protobuf:"varint,4,opt,name=size_override_setting,json=sizeOverrideSetting,proto3,enum=vega.StopOrder_SizeOverrideSetting,oneof" json:"size_override_setting,omitempty"` + // If this order is linked to a position, provide an optional scaling factor + SizeOverrideValue *vega.StopOrder_SizeOverrideValue `protobuf:"bytes,5,opt,name=size_override_value,json=sizeOverrideValue,proto3,oneof" json:"size_override_value,omitempty"` // Trigger that will need to be breached for the order to be submitted to the book. // // Types that are assignable to Trigger: @@ -297,6 +362,20 @@ func (x *StopOrderSetup) GetExpiryStrategy() vega.StopOrder_ExpiryStrategy { return vega.StopOrder_ExpiryStrategy(0) } +func (x *StopOrderSetup) GetSizeOverrideSetting() vega.StopOrder_SizeOverrideSetting { + if x != nil && x.SizeOverrideSetting != nil { + return *x.SizeOverrideSetting + } + return vega.StopOrder_SizeOverrideSetting(0) +} + +func (x *StopOrderSetup) GetSizeOverrideValue() *vega.StopOrder_SizeOverrideValue { + if x != nil { + return x.SizeOverrideValue + } + return nil +} + func (m *StopOrderSetup) GetTrigger() isStopOrderSetup_Trigger { if m != nil { return m.Trigger @@ -606,6 +685,72 @@ func (x *IcebergOpts) GetMinimumVisibleSize() uint64 { return 0 } +type UpdateMarginMode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Market to change margin mode for. + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Margin mode to use. + Mode UpdateMarginMode_Mode `protobuf:"varint,2,opt,name=mode,proto3,enum=vega.commands.v1.UpdateMarginMode_Mode" json:"mode,omitempty"` + // Margin factor to use for margin in isolated mode. It is a multiplier that defines how much margin needs to be set aside + MarginFactor *string `protobuf:"bytes,3,opt,name=margin_factor,json=marginFactor,proto3,oneof" json:"margin_factor,omitempty"` +} + +func (x *UpdateMarginMode) Reset() { + *x = UpdateMarginMode{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_commands_v1_commands_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateMarginMode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateMarginMode) ProtoMessage() {} + +func (x *UpdateMarginMode) ProtoReflect() protoreflect.Message { + mi := &file_vega_commands_v1_commands_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 UpdateMarginMode.ProtoReflect.Descriptor instead. +func (*UpdateMarginMode) Descriptor() ([]byte, []int) { + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateMarginMode) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *UpdateMarginMode) GetMode() UpdateMarginMode_Mode { + if x != nil { + return x.Mode + } + return UpdateMarginMode_MODE_UNSPECIFIED +} + +func (x *UpdateMarginMode) GetMarginFactor() string { + if x != nil && x.MarginFactor != nil { + return *x.MarginFactor + } + return "" +} + // A command that instructs the network to cancel orders, active or partially filled, that were previously submitted by the sender of this transaction. // It is not possible to cancel another party's order with this command. type OrderCancellation struct { @@ -622,7 +767,7 @@ type OrderCancellation struct { func (x *OrderCancellation) Reset() { *x = OrderCancellation{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[6] + mi := &file_vega_commands_v1_commands_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -635,7 +780,7 @@ func (x *OrderCancellation) String() string { func (*OrderCancellation) ProtoMessage() {} func (x *OrderCancellation) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[6] + mi := &file_vega_commands_v1_commands_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -648,7 +793,7 @@ func (x *OrderCancellation) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderCancellation.ProtoReflect.Descriptor instead. func (*OrderCancellation) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{6} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{7} } func (x *OrderCancellation) GetOrderId() string { @@ -684,6 +829,7 @@ type OrderAmendment struct { // - To increase the size from the current value, set a positive integer value // - To leave the size unchanged set a value of zero // This field needs to be scaled using the market's position decimal places. + // If specified, size must not be set. SizeDelta int64 `protobuf:"varint,4,opt,name=size_delta,json=sizeDelta,proto3" json:"size_delta,omitempty"` // Timestamp, in Unix nanoseconds, for the new expiry time for the order. ExpiresAt *int64 `protobuf:"varint,5,opt,name=expires_at,json=expiresAt,proto3,oneof" json:"expires_at,omitempty"` @@ -694,12 +840,20 @@ type OrderAmendment struct { PeggedOffset string `protobuf:"bytes,7,opt,name=pegged_offset,json=peggedOffset,proto3" json:"pegged_offset,omitempty"` // New pegged reference for the order. PeggedReference vega.PeggedReference `protobuf:"varint,8,opt,name=pegged_reference,json=peggedReference,proto3,enum=vega.PeggedReference" json:"pegged_reference,omitempty"` + // New size for the order. + // Amending the size causes the size and remaining part of the order to be changed by the difference between the original and amended size. + // - Specifying a size smaller than the current size leaves the order at its current order book position. + // - Specifying a size larger than the current size removes and reinserts the order at the back of the price level. + // - Specifying a size that results in the remaining part of the order being reduced to zero cancels the order. + // This field is an unsigned integer scaled to the market's decimal places. + // If specified, size_delta must be set to 0. + Size *uint64 `protobuf:"varint,9,opt,name=size,proto3,oneof" json:"size,omitempty"` } func (x *OrderAmendment) Reset() { *x = OrderAmendment{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[7] + mi := &file_vega_commands_v1_commands_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -712,7 +866,7 @@ func (x *OrderAmendment) String() string { func (*OrderAmendment) ProtoMessage() {} func (x *OrderAmendment) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[7] + mi := &file_vega_commands_v1_commands_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -725,7 +879,7 @@ func (x *OrderAmendment) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderAmendment.ProtoReflect.Descriptor instead. func (*OrderAmendment) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{7} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{8} } func (x *OrderAmendment) GetOrderId() string { @@ -784,6 +938,13 @@ func (x *OrderAmendment) GetPeggedReference() vega.PeggedReference { return vega.PeggedReference(0) } +func (x *OrderAmendment) GetSize() uint64 { + if x != nil && x.Size != nil { + return *x.Size + } + return 0 +} + // A command that indicates to the network the party's intention to supply liquidity to the given market and become a liquidity provider. // An active liquidity provider for a market will earn fees based on the trades that occur in the market. type LiquidityProvisionSubmission struct { @@ -805,7 +966,7 @@ type LiquidityProvisionSubmission struct { func (x *LiquidityProvisionSubmission) Reset() { *x = LiquidityProvisionSubmission{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[8] + mi := &file_vega_commands_v1_commands_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -818,7 +979,7 @@ func (x *LiquidityProvisionSubmission) String() string { func (*LiquidityProvisionSubmission) ProtoMessage() {} func (x *LiquidityProvisionSubmission) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[8] + mi := &file_vega_commands_v1_commands_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -831,7 +992,7 @@ func (x *LiquidityProvisionSubmission) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityProvisionSubmission.ProtoReflect.Descriptor instead. func (*LiquidityProvisionSubmission) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{8} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{9} } func (x *LiquidityProvisionSubmission) GetMarketId() string { @@ -875,7 +1036,7 @@ type LiquidityProvisionCancellation struct { func (x *LiquidityProvisionCancellation) Reset() { *x = LiquidityProvisionCancellation{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[9] + mi := &file_vega_commands_v1_commands_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -888,7 +1049,7 @@ func (x *LiquidityProvisionCancellation) String() string { func (*LiquidityProvisionCancellation) ProtoMessage() {} func (x *LiquidityProvisionCancellation) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[9] + mi := &file_vega_commands_v1_commands_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -901,7 +1062,7 @@ func (x *LiquidityProvisionCancellation) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityProvisionCancellation.ProtoReflect.Descriptor instead. func (*LiquidityProvisionCancellation) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{9} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{10} } func (x *LiquidityProvisionCancellation) GetMarketId() string { @@ -931,7 +1092,7 @@ type LiquidityProvisionAmendment struct { func (x *LiquidityProvisionAmendment) Reset() { *x = LiquidityProvisionAmendment{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[10] + mi := &file_vega_commands_v1_commands_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -944,7 +1105,7 @@ func (x *LiquidityProvisionAmendment) String() string { func (*LiquidityProvisionAmendment) ProtoMessage() {} func (x *LiquidityProvisionAmendment) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[10] + mi := &file_vega_commands_v1_commands_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -957,7 +1118,7 @@ func (x *LiquidityProvisionAmendment) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityProvisionAmendment.ProtoReflect.Descriptor instead. func (*LiquidityProvisionAmendment) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{10} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{11} } func (x *LiquidityProvisionAmendment) GetMarketId() string { @@ -1007,7 +1168,7 @@ type WithdrawSubmission struct { func (x *WithdrawSubmission) Reset() { *x = WithdrawSubmission{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[11] + mi := &file_vega_commands_v1_commands_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1020,7 +1181,7 @@ func (x *WithdrawSubmission) String() string { func (*WithdrawSubmission) ProtoMessage() {} func (x *WithdrawSubmission) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[11] + mi := &file_vega_commands_v1_commands_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1033,7 +1194,7 @@ func (x *WithdrawSubmission) ProtoReflect() protoreflect.Message { // Deprecated: Use WithdrawSubmission.ProtoReflect.Descriptor instead. func (*WithdrawSubmission) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{11} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{12} } func (x *WithdrawSubmission) GetAmount() string { @@ -1075,7 +1236,7 @@ type ProposalSubmission struct { func (x *ProposalSubmission) Reset() { *x = ProposalSubmission{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[12] + mi := &file_vega_commands_v1_commands_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1088,7 +1249,7 @@ func (x *ProposalSubmission) String() string { func (*ProposalSubmission) ProtoMessage() {} func (x *ProposalSubmission) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[12] + mi := &file_vega_commands_v1_commands_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1101,7 +1262,7 @@ func (x *ProposalSubmission) ProtoReflect() protoreflect.Message { // Deprecated: Use ProposalSubmission.ProtoReflect.Descriptor instead. func (*ProposalSubmission) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{12} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{13} } func (x *ProposalSubmission) GetReference() string { @@ -1125,6 +1286,132 @@ func (x *ProposalSubmission) GetRationale() *vega.ProposalRationale { return nil } +// Terms for a batch governance proposal submission +type BatchProposalSubmissionTerms struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Closing timestamp in Unix time; adheres to `minClose` and `maxClose` limits. + ClosingTimestamp int64 `protobuf:"varint,1,opt,name=closing_timestamp,json=closingTimestamp,proto3" json:"closing_timestamp,omitempty"` + // List of individual changes included in the batch proposal. + Changes []*vega.BatchProposalTermsChange `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` +} + +func (x *BatchProposalSubmissionTerms) Reset() { + *x = BatchProposalSubmissionTerms{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_commands_v1_commands_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchProposalSubmissionTerms) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchProposalSubmissionTerms) ProtoMessage() {} + +func (x *BatchProposalSubmissionTerms) ProtoReflect() protoreflect.Message { + mi := &file_vega_commands_v1_commands_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 BatchProposalSubmissionTerms.ProtoReflect.Descriptor instead. +func (*BatchProposalSubmissionTerms) Descriptor() ([]byte, []int) { + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{14} +} + +func (x *BatchProposalSubmissionTerms) GetClosingTimestamp() int64 { + if x != nil { + return x.ClosingTimestamp + } + return 0 +} + +func (x *BatchProposalSubmissionTerms) GetChanges() []*vega.BatchProposalTermsChange { + if x != nil { + return x.Changes + } + return nil +} + +// Command that allows a token holder to submit a batch governance proposal that can be voted on by any other token holders, and eventually enacted on the Vega network. +// For example this command can be used to propose a new market and a network parameter change with it. +type BatchProposalSubmission struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Arbitrary human-readable reference identifying the proposal. + Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"` + // Proposal terms containing the type and details of the proposal, as well as time spans for voting and enactment. + Terms *BatchProposalSubmissionTerms `protobuf:"bytes,2,opt,name=terms,proto3" json:"terms,omitempty"` + // Rationale behind a proposal. + Rationale *vega.ProposalRationale `protobuf:"bytes,3,opt,name=rationale,proto3" json:"rationale,omitempty"` +} + +func (x *BatchProposalSubmission) Reset() { + *x = BatchProposalSubmission{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_commands_v1_commands_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchProposalSubmission) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchProposalSubmission) ProtoMessage() {} + +func (x *BatchProposalSubmission) ProtoReflect() protoreflect.Message { + mi := &file_vega_commands_v1_commands_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 BatchProposalSubmission.ProtoReflect.Descriptor instead. +func (*BatchProposalSubmission) Descriptor() ([]byte, []int) { + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{15} +} + +func (x *BatchProposalSubmission) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +func (x *BatchProposalSubmission) GetTerms() *BatchProposalSubmissionTerms { + if x != nil { + return x.Terms + } + return nil +} + +func (x *BatchProposalSubmission) GetRationale() *vega.ProposalRationale { + if x != nil { + return x.Rationale + } + return nil +} + // Command that allows a token holder to vote for or against an active governance proposal. type VoteSubmission struct { state protoimpl.MessageState @@ -1140,7 +1427,7 @@ type VoteSubmission struct { func (x *VoteSubmission) Reset() { *x = VoteSubmission{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[13] + mi := &file_vega_commands_v1_commands_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1153,7 +1440,7 @@ func (x *VoteSubmission) String() string { func (*VoteSubmission) ProtoMessage() {} func (x *VoteSubmission) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[13] + mi := &file_vega_commands_v1_commands_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1166,7 +1453,7 @@ func (x *VoteSubmission) ProtoReflect() protoreflect.Message { // Deprecated: Use VoteSubmission.ProtoReflect.Descriptor instead. func (*VoteSubmission) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{13} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{16} } func (x *VoteSubmission) GetProposalId() string { @@ -1199,7 +1486,7 @@ type DelegateSubmission struct { func (x *DelegateSubmission) Reset() { *x = DelegateSubmission{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[14] + mi := &file_vega_commands_v1_commands_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1212,7 +1499,7 @@ func (x *DelegateSubmission) String() string { func (*DelegateSubmission) ProtoMessage() {} func (x *DelegateSubmission) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[14] + mi := &file_vega_commands_v1_commands_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1225,7 +1512,7 @@ func (x *DelegateSubmission) ProtoReflect() protoreflect.Message { // Deprecated: Use DelegateSubmission.ProtoReflect.Descriptor instead. func (*DelegateSubmission) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{14} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{17} } func (x *DelegateSubmission) GetNodeId() string { @@ -1260,7 +1547,7 @@ type UndelegateSubmission struct { func (x *UndelegateSubmission) Reset() { *x = UndelegateSubmission{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[15] + mi := &file_vega_commands_v1_commands_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1273,7 +1560,7 @@ func (x *UndelegateSubmission) String() string { func (*UndelegateSubmission) ProtoMessage() {} func (x *UndelegateSubmission) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[15] + mi := &file_vega_commands_v1_commands_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1286,7 +1573,7 @@ func (x *UndelegateSubmission) ProtoReflect() protoreflect.Message { // Deprecated: Use UndelegateSubmission.ProtoReflect.Descriptor instead. func (*UndelegateSubmission) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{15} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{18} } func (x *UndelegateSubmission) GetNodeId() string { @@ -1342,7 +1629,7 @@ type Transfer struct { func (x *Transfer) Reset() { *x = Transfer{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[16] + mi := &file_vega_commands_v1_commands_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1355,7 +1642,7 @@ func (x *Transfer) String() string { func (*Transfer) ProtoMessage() {} func (x *Transfer) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[16] + mi := &file_vega_commands_v1_commands_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1368,7 +1655,7 @@ func (x *Transfer) ProtoReflect() protoreflect.Message { // Deprecated: Use Transfer.ProtoReflect.Descriptor instead. func (*Transfer) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{16} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{19} } func (x *Transfer) GetFromAccountType() vega.AccountType { @@ -1465,7 +1752,7 @@ type OneOffTransfer struct { func (x *OneOffTransfer) Reset() { *x = OneOffTransfer{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[17] + mi := &file_vega_commands_v1_commands_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1478,7 +1765,7 @@ func (x *OneOffTransfer) String() string { func (*OneOffTransfer) ProtoMessage() {} func (x *OneOffTransfer) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[17] + mi := &file_vega_commands_v1_commands_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1491,7 +1778,7 @@ func (x *OneOffTransfer) ProtoReflect() protoreflect.Message { // Deprecated: Use OneOffTransfer.ProtoReflect.Descriptor instead. func (*OneOffTransfer) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{17} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{20} } func (x *OneOffTransfer) GetDeliverOn() int64 { @@ -1521,7 +1808,7 @@ type RecurringTransfer struct { func (x *RecurringTransfer) Reset() { *x = RecurringTransfer{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[18] + mi := &file_vega_commands_v1_commands_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1534,7 +1821,7 @@ func (x *RecurringTransfer) String() string { func (*RecurringTransfer) ProtoMessage() {} func (x *RecurringTransfer) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[18] + mi := &file_vega_commands_v1_commands_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1547,7 +1834,7 @@ func (x *RecurringTransfer) ProtoReflect() protoreflect.Message { // Deprecated: Use RecurringTransfer.ProtoReflect.Descriptor instead. func (*RecurringTransfer) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{18} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{21} } func (x *RecurringTransfer) GetStartEpoch() uint64 { @@ -1591,7 +1878,7 @@ type CancelTransfer struct { func (x *CancelTransfer) Reset() { *x = CancelTransfer{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[19] + mi := &file_vega_commands_v1_commands_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1604,7 +1891,7 @@ func (x *CancelTransfer) String() string { func (*CancelTransfer) ProtoMessage() {} func (x *CancelTransfer) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[19] + mi := &file_vega_commands_v1_commands_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1617,7 +1904,7 @@ func (x *CancelTransfer) ProtoReflect() protoreflect.Message { // Deprecated: Use CancelTransfer.ProtoReflect.Descriptor instead. func (*CancelTransfer) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{19} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{22} } func (x *CancelTransfer) GetTransferId() string { @@ -1646,7 +1933,7 @@ type IssueSignatures struct { func (x *IssueSignatures) Reset() { *x = IssueSignatures{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[20] + mi := &file_vega_commands_v1_commands_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1659,7 +1946,7 @@ func (x *IssueSignatures) String() string { func (*IssueSignatures) ProtoMessage() {} func (x *IssueSignatures) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[20] + mi := &file_vega_commands_v1_commands_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1672,7 +1959,7 @@ func (x *IssueSignatures) ProtoReflect() protoreflect.Message { // Deprecated: Use IssueSignatures.ProtoReflect.Descriptor instead. func (*IssueSignatures) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{20} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{23} } func (x *IssueSignatures) GetSubmitter() string { @@ -1713,7 +2000,7 @@ type CreateReferralSet struct { func (x *CreateReferralSet) Reset() { *x = CreateReferralSet{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[21] + mi := &file_vega_commands_v1_commands_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1726,7 +2013,7 @@ func (x *CreateReferralSet) String() string { func (*CreateReferralSet) ProtoMessage() {} func (x *CreateReferralSet) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[21] + mi := &file_vega_commands_v1_commands_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1739,7 +2026,7 @@ func (x *CreateReferralSet) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateReferralSet.ProtoReflect.Descriptor instead. func (*CreateReferralSet) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{21} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{24} } func (x *CreateReferralSet) GetIsTeam() bool { @@ -1774,7 +2061,7 @@ type UpdateReferralSet struct { func (x *UpdateReferralSet) Reset() { *x = UpdateReferralSet{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[22] + mi := &file_vega_commands_v1_commands_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1787,7 +2074,7 @@ func (x *UpdateReferralSet) String() string { func (*UpdateReferralSet) ProtoMessage() {} func (x *UpdateReferralSet) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[22] + mi := &file_vega_commands_v1_commands_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1800,7 +2087,7 @@ func (x *UpdateReferralSet) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateReferralSet.ProtoReflect.Descriptor instead. func (*UpdateReferralSet) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{22} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{25} } func (x *UpdateReferralSet) GetId() string { @@ -1839,7 +2126,7 @@ type ApplyReferralCode struct { func (x *ApplyReferralCode) Reset() { *x = ApplyReferralCode{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[23] + mi := &file_vega_commands_v1_commands_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1852,7 +2139,7 @@ func (x *ApplyReferralCode) String() string { func (*ApplyReferralCode) ProtoMessage() {} func (x *ApplyReferralCode) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[23] + mi := &file_vega_commands_v1_commands_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1865,7 +2152,7 @@ func (x *ApplyReferralCode) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyReferralCode.ProtoReflect.Descriptor instead. func (*ApplyReferralCode) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{23} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{26} } func (x *ApplyReferralCode) GetId() string { @@ -1875,6 +2162,116 @@ func (x *ApplyReferralCode) GetId() string { return "" } +// Command that allows the submitter to join a team or change teams if they are already a member of a team. +type JoinTeam struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the team to join, this is the same as the referral code used to generate the team. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *JoinTeam) Reset() { + *x = JoinTeam{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_commands_v1_commands_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JoinTeam) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JoinTeam) ProtoMessage() {} + +func (x *JoinTeam) ProtoReflect() protoreflect.Message { + mi := &file_vega_commands_v1_commands_proto_msgTypes[27] + 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 JoinTeam.ProtoReflect.Descriptor instead. +func (*JoinTeam) Descriptor() ([]byte, []int) { + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{27} +} + +func (x *JoinTeam) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Command to associate metadata to a public key, known as a party ID. +// Partial update is not supported, meaning previous values must be included in +// the update, otherwise they are removed. +type UpdatePartyProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Alias given to the party. It must be unique network-wide. + Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` + // Freeform data to associate to the party. + // Support a maximum of 10 entries. + Metadata []*vega.Metadata `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *UpdatePartyProfile) Reset() { + *x = UpdatePartyProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_commands_v1_commands_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdatePartyProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePartyProfile) ProtoMessage() {} + +func (x *UpdatePartyProfile) ProtoReflect() protoreflect.Message { + mi := &file_vega_commands_v1_commands_proto_msgTypes[28] + 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 UpdatePartyProfile.ProtoReflect.Descriptor instead. +func (*UpdatePartyProfile) Descriptor() ([]byte, []int) { + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{28} +} + +func (x *UpdatePartyProfile) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +func (x *UpdatePartyProfile) GetMetadata() []*vega.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + type CreateReferralSet_Team struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1888,12 +2285,16 @@ type CreateReferralSet_Team struct { AvatarUrl *string `protobuf:"bytes,12,opt,name=avatar_url,json=avatarUrl,proto3,oneof" json:"avatar_url,omitempty"` // Whether or not the team is closed to new party members. Closed bool `protobuf:"varint,13,opt,name=closed,proto3" json:"closed,omitempty"` + // List of public keys that are allowed to join the team. + // Only applicable to closed teams. Removing a party from the allow list does not remove + // the party from the team. + AllowList []string `protobuf:"bytes,14,rep,name=allow_list,json=allowList,proto3" json:"allow_list,omitempty"` } func (x *CreateReferralSet_Team) Reset() { *x = CreateReferralSet_Team{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[24] + mi := &file_vega_commands_v1_commands_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1906,7 +2307,7 @@ func (x *CreateReferralSet_Team) String() string { func (*CreateReferralSet_Team) ProtoMessage() {} func (x *CreateReferralSet_Team) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[24] + mi := &file_vega_commands_v1_commands_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1919,7 +2320,7 @@ func (x *CreateReferralSet_Team) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateReferralSet_Team.ProtoReflect.Descriptor instead. func (*CreateReferralSet_Team) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{21, 0} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{24, 0} } func (x *CreateReferralSet_Team) GetName() string { @@ -1950,6 +2351,13 @@ func (x *CreateReferralSet_Team) GetClosed() bool { return false } +func (x *CreateReferralSet_Team) GetAllowList() []string { + if x != nil { + return x.AllowList + } + return nil +} + type UpdateReferralSet_Team struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1961,14 +2369,19 @@ type UpdateReferralSet_Team struct { TeamUrl *string `protobuf:"bytes,11,opt,name=team_url,json=teamUrl,proto3,oneof" json:"team_url,omitempty"` // New link to an avatar for the team. AvatarUrl *string `protobuf:"bytes,12,opt,name=avatar_url,json=avatarUrl,proto3,oneof" json:"avatar_url,omitempty"` - // Whether or not the team is closed to new party members. + // Whether or not the team is closed to new party members. When closed, only parties specified in the allow list can + // join the team. Closed *bool `protobuf:"varint,13,opt,name=closed,proto3,oneof" json:"closed,omitempty"` + // List of public keys that are allowed to join the team. + // Only applicable to closed teams. Removing a party from the allow list does not remove + // the party from the team. + AllowList []string `protobuf:"bytes,14,rep,name=allow_list,json=allowList,proto3" json:"allow_list,omitempty"` } func (x *UpdateReferralSet_Team) Reset() { *x = UpdateReferralSet_Team{} if protoimpl.UnsafeEnabled { - mi := &file_vega_commands_v1_commands_proto_msgTypes[25] + mi := &file_vega_commands_v1_commands_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1981,7 +2394,7 @@ func (x *UpdateReferralSet_Team) String() string { func (*UpdateReferralSet_Team) ProtoMessage() {} func (x *UpdateReferralSet_Team) ProtoReflect() protoreflect.Message { - mi := &file_vega_commands_v1_commands_proto_msgTypes[25] + mi := &file_vega_commands_v1_commands_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1994,7 +2407,7 @@ func (x *UpdateReferralSet_Team) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateReferralSet_Team.ProtoReflect.Descriptor instead. func (*UpdateReferralSet_Team) Descriptor() ([]byte, []int) { - return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{22, 0} + return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{25, 0} } func (x *UpdateReferralSet_Team) GetName() string { @@ -2025,6 +2438,13 @@ func (x *UpdateReferralSet_Team) GetClosed() bool { return false } +func (x *UpdateReferralSet_Team) GetAllowList() []string { + if x != nil { + return x.AllowList + } + return nil +} + var File_vega_commands_v1_commands_proto protoreflect.FileDescriptor var file_vega_commands_v1_commands_proto_rawDesc = []byte{ @@ -2036,7 +2456,7 @@ var file_vega_commands_v1_commands_proto_rawDesc = []byte{ 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x03, 0x0a, 0x17, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x03, 0x0a, 0x17, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x0d, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, @@ -2063,271 +2483,340 @@ var file_vega_commands_v1_commands_proto_rawDesc = []byte{ 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x73, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xc6, 0x01, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x70, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x46, 0x0a, 0x0b, 0x72, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x53, 0x65, 0x74, 0x75, 0x70, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x69, 0x73, 0x65, 0x73, 0x41, - 0x62, 0x6f, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0b, 0x66, 0x61, 0x6c, 0x6c, 0x73, - 0x5f, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x65, 0x74, 0x75, 0x70, 0x48, 0x01, - 0x52, 0x0a, 0x66, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x65, 0x6c, 0x6f, 0x77, 0x88, 0x01, 0x01, 0x42, - 0x0e, 0x0a, 0x0c, 0x5f, 0x72, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x42, - 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x61, 0x6c, 0x6c, 0x73, 0x5f, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x22, - 0xd0, 0x02, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x65, 0x74, - 0x75, 0x70, 0x12, 0x4c, 0x0a, 0x10, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x0f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x45, - 0x78, 0x70, 0x69, 0x72, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, 0x02, 0x52, - 0x0e, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x88, - 0x01, 0x01, 0x12, 0x16, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x17, 0x74, 0x72, - 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x15, 0x74, - 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x42, - 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x42, 0x12, - 0x0a, 0x10, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, - 0x67, 0x79, 0x22, 0x83, 0x01, 0x0a, 0x16, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, - 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x27, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x5f, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0xe4, 0x03, 0x0a, 0x0f, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x14, 0x53, 0x74, 0x6f, + 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x46, 0x0a, 0x0b, 0x72, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x61, 0x62, 0x6f, 0x76, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x53, 0x65, 0x74, 0x75, 0x70, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x69, 0x73, 0x65, + 0x73, 0x41, 0x62, 0x6f, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0b, 0x66, 0x61, 0x6c, + 0x6c, 0x73, 0x5f, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x65, 0x74, 0x75, 0x70, + 0x48, 0x01, 0x52, 0x0a, 0x66, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x65, 0x6c, 0x6f, 0x77, 0x88, 0x01, + 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x72, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x61, 0x62, 0x6f, 0x76, + 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x61, 0x6c, 0x6c, 0x73, 0x5f, 0x62, 0x65, 0x6c, 0x6f, + 0x77, 0x22, 0xb8, 0x04, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, + 0x65, 0x74, 0x75, 0x70, 0x12, 0x4c, 0x0a, 0x10, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x75, + 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x0f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, + 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x2e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, + 0x02, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x88, 0x01, 0x01, 0x12, 0x5c, 0x0a, 0x15, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x69, 0x7a, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, + 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x03, 0x52, 0x13, 0x73, 0x69, 0x7a, 0x65, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x88, + 0x01, 0x01, 0x12, 0x56, 0x0a, 0x13, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x2e, 0x53, 0x69, 0x7a, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x48, 0x04, 0x52, 0x11, 0x73, 0x69, 0x7a, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x05, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x12, 0x38, 0x0a, 0x17, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x70, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x65, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x15, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x50, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x79, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x83, 0x01, 0x0a, + 0x16, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x73, 0x74, 0x6f, + 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x88, + 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x22, 0xe4, 0x03, 0x0a, 0x0f, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1e, 0x0a, + 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, 0x12, 0x3b, 0x0a, + 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x74, + 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x34, 0x0a, + 0x0c, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x65, 0x67, 0x67, 0x65, + 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0b, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x74, 0x4f, 0x6e, 0x6c, 0x79, + 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x4f, 0x6e, 0x6c, + 0x79, 0x12, 0x45, 0x0a, 0x0c, 0x69, 0x63, 0x65, 0x62, 0x65, 0x72, 0x67, 0x5f, 0x6f, 0x70, 0x74, + 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x63, 0x65, 0x62, 0x65, + 0x72, 0x67, 0x4f, 0x70, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x63, 0x65, 0x62, 0x65, 0x72, + 0x67, 0x4f, 0x70, 0x74, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x63, 0x65, + 0x62, 0x65, 0x72, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x22, 0x5c, 0x0a, 0x0b, 0x49, 0x63, 0x65, + 0x62, 0x65, 0x72, 0x67, 0x4f, 0x70, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x65, 0x61, 0x6b, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x65, 0x61, + 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x56, 0x69, 0x73, 0x69, + 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xf7, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, - 0x69, 0x7a, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x52, 0x04, 0x73, - 0x69, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x46, 0x6f, - 0x72, 0x63, 0x65, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x46, 0x6f, 0x72, 0x63, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, - 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0b, 0x70, 0x65, - 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x73, - 0x74, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x70, 0x6f, - 0x73, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, - 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x64, - 0x75, 0x63, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x45, 0x0a, 0x0c, 0x69, 0x63, 0x65, 0x62, 0x65, - 0x72, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x04, 0x6d, 0x6f, 0x64, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, + 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0c, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, + 0x22, 0x4d, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, + 0x0a, 0x11, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x4d, 0x41, 0x52, + 0x47, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x53, + 0x4f, 0x4c, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x10, 0x02, 0x42, + 0x10, 0x0a, 0x0e, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x22, 0x4b, 0x0a, 0x11, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x85, + 0x03, 0x0a, 0x0e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x64, 0x65, 0x6c, + 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x44, 0x65, + 0x6c, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x73, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x5f, + 0x69, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x49, 0x6e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x46, + 0x6f, 0x72, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x65, 0x67, + 0x67, 0x65, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x10, 0x70, 0x65, 0x67, + 0x67, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x65, 0x67, 0x67, 0x65, + 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0f, 0x70, 0x65, 0x67, 0x67, + 0x65, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x42, 0x0d, + 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x66, 0x65, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x3d, 0x0a, + 0x1e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0xa3, 0x01, 0x0a, + 0x1b, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, + 0x10, 0x06, 0x22, 0x67, 0x0a, 0x12, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x45, 0x78, 0x74, 0x52, 0x03, 0x65, 0x78, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x12, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x12, 0x29, 0x0a, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, + 0x65, 0x72, 0x6d, 0x73, 0x52, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x52, 0x09, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x1c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x65, + 0x72, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, + 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x38, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x17, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x65, + 0x72, 0x6d, 0x73, 0x52, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x52, 0x09, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x65, 0x22, 0x59, 0x0a, 0x0e, 0x56, 0x6f, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x2e, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x45, 0x0a, 0x12, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0xe2, 0x01, 0x0a, 0x14, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, + 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x45, 0x0a, + 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x49, 0x63, 0x65, 0x62, 0x65, 0x72, 0x67, 0x4f, 0x70, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0b, - 0x69, 0x63, 0x65, 0x62, 0x65, 0x72, 0x67, 0x4f, 0x70, 0x74, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0f, - 0x0a, 0x0d, 0x5f, 0x69, 0x63, 0x65, 0x62, 0x65, 0x72, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x22, - 0x5c, 0x0a, 0x0b, 0x49, 0x63, 0x65, 0x62, 0x65, 0x72, 0x67, 0x4f, 0x70, 0x74, 0x73, 0x12, 0x1b, - 0x0a, 0x09, 0x70, 0x65, 0x61, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x08, 0x70, 0x65, 0x61, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6d, - 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x69, 0x6d, - 0x75, 0x6d, 0x56, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x4b, 0x0a, - 0x11, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, - 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0xe3, 0x02, 0x0a, 0x0e, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, - 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, - 0x22, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x46, 0x6f, - 0x72, 0x63, 0x65, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x46, 0x6f, 0x72, 0x63, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x10, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x5f, - 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0f, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, - 0x22, 0xa4, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2b, - 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, - 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x1c, 0x0a, + 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x06, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x22, 0x52, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, + 0x0a, 0x12, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, + 0x5f, 0x4e, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, + 0x5f, 0x41, 0x54, 0x5f, 0x45, 0x4e, 0x44, 0x5f, 0x4f, 0x46, 0x5f, 0x45, 0x50, 0x4f, 0x43, 0x48, + 0x10, 0x02, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, 0x22, 0xea, 0x02, 0x0a, 0x08, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x11, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0f, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x74, 0x6f, 0x12, 0x39, 0x0a, 0x0f, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0d, 0x74, 0x6f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x04, 0x10, - 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x3d, 0x0a, 0x1e, 0x4c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0xa3, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x65, - 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, - 0x74, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, - 0x65, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x67, 0x0a, 0x12, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x12, 0x23, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x45, 0x78, 0x74, - 0x52, 0x03, 0x65, 0x78, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, - 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x74, 0x65, - 0x72, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x05, - 0x74, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x65, 0x52, 0x09, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x22, 0x59, 0x0a, 0x0e, - 0x56, 0x6f, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, - 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x45, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, - 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xe2, - 0x01, 0x0a, 0x14, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, - 0x52, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x45, 0x54, - 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x4e, 0x4f, 0x57, 0x10, - 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x41, 0x54, 0x5f, 0x45, - 0x4e, 0x44, 0x5f, 0x4f, 0x46, 0x5f, 0x45, 0x50, 0x4f, 0x43, 0x48, 0x10, 0x02, 0x22, 0x04, 0x08, - 0x03, 0x10, 0x03, 0x22, 0xea, 0x02, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x12, 0x3d, 0x0a, 0x11, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, - 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, - 0x39, 0x0a, 0x0f, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x74, 0x6f, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, - 0x66, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, - 0x66, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x6e, 0x65, - 0x4f, 0x66, 0x66, 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, - 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, - 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x72, - 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x22, 0x2f, 0x0a, 0x0e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4f, - 0x6e, 0x22, 0xc1, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x5f, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x65, - 0x6e, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, - 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x10, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, - 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x6e, 0x64, 0x5f, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x31, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x49, 0x64, 0x22, 0x94, 0x01, 0x0a, 0x0f, 0x49, 0x73, 0x73, - 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x04, 0x6b, 0x69, - 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, - 0x69, 0x6e, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, - 0x8d, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, - 0x61, 0x6c, 0x53, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x74, 0x65, 0x61, 0x6d, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x41, - 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, - 0x74, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x88, 0x01, - 0x01, 0x1a, 0x92, 0x01, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, - 0x0a, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x22, - 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x88, - 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, - 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x76, 0x61, 0x74, - 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x22, - 0xbb, 0x02, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, - 0x61, 0x6c, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x74, 0x65, 0x61, 0x6d, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x41, - 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, + 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x6f, + 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, - 0x74, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x88, 0x01, - 0x01, 0x1a, 0xb0, 0x01, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x55, 0x72, 0x6c, + 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, + 0x52, 0x06, 0x6f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, + 0x72, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x0a, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x2f, 0x0a, 0x0e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, + 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, + 0x69, 0x76, 0x65, 0x72, 0x4f, 0x6e, 0x22, 0xc1, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x63, 0x75, 0x72, + 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x20, 0x0a, + 0x09, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x00, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, + 0x16, 0x0a, 0x06, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x10, 0x64, 0x69, 0x73, 0x70, + 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x0c, 0x0a, 0x0a, + 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x31, 0x0a, 0x0e, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x49, 0x64, 0x22, 0x94, 0x01, + 0x0a, 0x0f, 0x49, 0x73, 0x73, 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, + 0x37, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4b, 0x69, + 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x64, 0x22, 0xac, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, + 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x54, + 0x65, 0x61, 0x6d, 0x12, 0x41, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x74, + 0x65, 0x61, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0xb1, 0x01, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, - 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, - 0x72, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, - 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, - 0x64, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0b, 0x0a, - 0x09, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, - 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x6c, - 0x6f, 0x73, 0x65, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x23, 0x0a, - 0x11, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x43, 0x6f, - 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x42, 0x33, 0x5a, 0x31, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, + 0x72, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, + 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0e, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x0b, + 0x0a, 0x09, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, + 0x65, 0x61, 0x6d, 0x22, 0xda, 0x02, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, + 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x54, 0x65, + 0x61, 0x6d, 0x12, 0x41, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, + 0x61, 0x6c, 0x53, 0x65, 0x74, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, + 0x61, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0xcf, 0x01, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x74, 0x65, 0x61, + 0x6d, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, + 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x09, 0x61, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, + 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x06, 0x63, + 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x65, 0x61, 0x6d, + 0x22, 0x23, 0x0a, 0x11, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, + 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1a, 0x0a, 0x08, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x65, 0x61, + 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x56, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x79, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2a, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x33, 0x5a, 0x31, 0x63, 0x6f, 0x64, + 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, + 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, + 0x67, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2342,85 +2831,103 @@ func file_vega_commands_v1_commands_proto_rawDescGZIP() []byte { return file_vega_commands_v1_commands_proto_rawDescData } -var file_vega_commands_v1_commands_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_vega_commands_v1_commands_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_vega_commands_v1_commands_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_vega_commands_v1_commands_proto_msgTypes = make([]protoimpl.MessageInfo, 31) var file_vega_commands_v1_commands_proto_goTypes = []interface{}{ - (UndelegateSubmission_Method)(0), // 0: vega.commands.v1.UndelegateSubmission.Method - (*BatchMarketInstructions)(nil), // 1: vega.commands.v1.BatchMarketInstructions - (*StopOrdersSubmission)(nil), // 2: vega.commands.v1.StopOrdersSubmission - (*StopOrderSetup)(nil), // 3: vega.commands.v1.StopOrderSetup - (*StopOrdersCancellation)(nil), // 4: vega.commands.v1.StopOrdersCancellation - (*OrderSubmission)(nil), // 5: vega.commands.v1.OrderSubmission - (*IcebergOpts)(nil), // 6: vega.commands.v1.IcebergOpts - (*OrderCancellation)(nil), // 7: vega.commands.v1.OrderCancellation - (*OrderAmendment)(nil), // 8: vega.commands.v1.OrderAmendment - (*LiquidityProvisionSubmission)(nil), // 9: vega.commands.v1.LiquidityProvisionSubmission - (*LiquidityProvisionCancellation)(nil), // 10: vega.commands.v1.LiquidityProvisionCancellation - (*LiquidityProvisionAmendment)(nil), // 11: vega.commands.v1.LiquidityProvisionAmendment - (*WithdrawSubmission)(nil), // 12: vega.commands.v1.WithdrawSubmission - (*ProposalSubmission)(nil), // 13: vega.commands.v1.ProposalSubmission - (*VoteSubmission)(nil), // 14: vega.commands.v1.VoteSubmission - (*DelegateSubmission)(nil), // 15: vega.commands.v1.DelegateSubmission - (*UndelegateSubmission)(nil), // 16: vega.commands.v1.UndelegateSubmission - (*Transfer)(nil), // 17: vega.commands.v1.Transfer - (*OneOffTransfer)(nil), // 18: vega.commands.v1.OneOffTransfer - (*RecurringTransfer)(nil), // 19: vega.commands.v1.RecurringTransfer - (*CancelTransfer)(nil), // 20: vega.commands.v1.CancelTransfer - (*IssueSignatures)(nil), // 21: vega.commands.v1.IssueSignatures - (*CreateReferralSet)(nil), // 22: vega.commands.v1.CreateReferralSet - (*UpdateReferralSet)(nil), // 23: vega.commands.v1.UpdateReferralSet - (*ApplyReferralCode)(nil), // 24: vega.commands.v1.ApplyReferralCode - (*CreateReferralSet_Team)(nil), // 25: vega.commands.v1.CreateReferralSet.Team - (*UpdateReferralSet_Team)(nil), // 26: vega.commands.v1.UpdateReferralSet.Team - (vega.StopOrder_ExpiryStrategy)(0), // 27: vega.StopOrder.ExpiryStrategy - (vega.Side)(0), // 28: vega.Side - (vega.Order_TimeInForce)(0), // 29: vega.Order.TimeInForce - (vega.Order_Type)(0), // 30: vega.Order.Type - (*vega.PeggedOrder)(nil), // 31: vega.PeggedOrder - (vega.PeggedReference)(0), // 32: vega.PeggedReference - (*vega.WithdrawExt)(nil), // 33: vega.WithdrawExt - (*vega.ProposalTerms)(nil), // 34: vega.ProposalTerms - (*vega.ProposalRationale)(nil), // 35: vega.ProposalRationale - (vega.Vote_Value)(0), // 36: vega.Vote.Value - (vega.AccountType)(0), // 37: vega.AccountType - (*vega.DispatchStrategy)(nil), // 38: vega.DispatchStrategy - (NodeSignatureKind)(0), // 39: vega.commands.v1.NodeSignatureKind + (UpdateMarginMode_Mode)(0), // 0: vega.commands.v1.UpdateMarginMode.Mode + (UndelegateSubmission_Method)(0), // 1: vega.commands.v1.UndelegateSubmission.Method + (*BatchMarketInstructions)(nil), // 2: vega.commands.v1.BatchMarketInstructions + (*StopOrdersSubmission)(nil), // 3: vega.commands.v1.StopOrdersSubmission + (*StopOrderSetup)(nil), // 4: vega.commands.v1.StopOrderSetup + (*StopOrdersCancellation)(nil), // 5: vega.commands.v1.StopOrdersCancellation + (*OrderSubmission)(nil), // 6: vega.commands.v1.OrderSubmission + (*IcebergOpts)(nil), // 7: vega.commands.v1.IcebergOpts + (*UpdateMarginMode)(nil), // 8: vega.commands.v1.UpdateMarginMode + (*OrderCancellation)(nil), // 9: vega.commands.v1.OrderCancellation + (*OrderAmendment)(nil), // 10: vega.commands.v1.OrderAmendment + (*LiquidityProvisionSubmission)(nil), // 11: vega.commands.v1.LiquidityProvisionSubmission + (*LiquidityProvisionCancellation)(nil), // 12: vega.commands.v1.LiquidityProvisionCancellation + (*LiquidityProvisionAmendment)(nil), // 13: vega.commands.v1.LiquidityProvisionAmendment + (*WithdrawSubmission)(nil), // 14: vega.commands.v1.WithdrawSubmission + (*ProposalSubmission)(nil), // 15: vega.commands.v1.ProposalSubmission + (*BatchProposalSubmissionTerms)(nil), // 16: vega.commands.v1.BatchProposalSubmissionTerms + (*BatchProposalSubmission)(nil), // 17: vega.commands.v1.BatchProposalSubmission + (*VoteSubmission)(nil), // 18: vega.commands.v1.VoteSubmission + (*DelegateSubmission)(nil), // 19: vega.commands.v1.DelegateSubmission + (*UndelegateSubmission)(nil), // 20: vega.commands.v1.UndelegateSubmission + (*Transfer)(nil), // 21: vega.commands.v1.Transfer + (*OneOffTransfer)(nil), // 22: vega.commands.v1.OneOffTransfer + (*RecurringTransfer)(nil), // 23: vega.commands.v1.RecurringTransfer + (*CancelTransfer)(nil), // 24: vega.commands.v1.CancelTransfer + (*IssueSignatures)(nil), // 25: vega.commands.v1.IssueSignatures + (*CreateReferralSet)(nil), // 26: vega.commands.v1.CreateReferralSet + (*UpdateReferralSet)(nil), // 27: vega.commands.v1.UpdateReferralSet + (*ApplyReferralCode)(nil), // 28: vega.commands.v1.ApplyReferralCode + (*JoinTeam)(nil), // 29: vega.commands.v1.JoinTeam + (*UpdatePartyProfile)(nil), // 30: vega.commands.v1.UpdatePartyProfile + (*CreateReferralSet_Team)(nil), // 31: vega.commands.v1.CreateReferralSet.Team + (*UpdateReferralSet_Team)(nil), // 32: vega.commands.v1.UpdateReferralSet.Team + (vega.StopOrder_ExpiryStrategy)(0), // 33: vega.StopOrder.ExpiryStrategy + (vega.StopOrder_SizeOverrideSetting)(0), // 34: vega.StopOrder.SizeOverrideSetting + (*vega.StopOrder_SizeOverrideValue)(nil), // 35: vega.StopOrder.SizeOverrideValue + (vega.Side)(0), // 36: vega.Side + (vega.Order_TimeInForce)(0), // 37: vega.Order.TimeInForce + (vega.Order_Type)(0), // 38: vega.Order.Type + (*vega.PeggedOrder)(nil), // 39: vega.PeggedOrder + (vega.PeggedReference)(0), // 40: vega.PeggedReference + (*vega.WithdrawExt)(nil), // 41: vega.WithdrawExt + (*vega.ProposalTerms)(nil), // 42: vega.ProposalTerms + (*vega.ProposalRationale)(nil), // 43: vega.ProposalRationale + (*vega.BatchProposalTermsChange)(nil), // 44: vega.BatchProposalTermsChange + (vega.Vote_Value)(0), // 45: vega.Vote.Value + (vega.AccountType)(0), // 46: vega.AccountType + (*vega.DispatchStrategy)(nil), // 47: vega.DispatchStrategy + (NodeSignatureKind)(0), // 48: vega.commands.v1.NodeSignatureKind + (*vega.Metadata)(nil), // 49: vega.Metadata } var file_vega_commands_v1_commands_proto_depIdxs = []int32{ - 7, // 0: vega.commands.v1.BatchMarketInstructions.cancellations:type_name -> vega.commands.v1.OrderCancellation - 8, // 1: vega.commands.v1.BatchMarketInstructions.amendments:type_name -> vega.commands.v1.OrderAmendment - 5, // 2: vega.commands.v1.BatchMarketInstructions.submissions:type_name -> vega.commands.v1.OrderSubmission - 4, // 3: vega.commands.v1.BatchMarketInstructions.stop_orders_cancellation:type_name -> vega.commands.v1.StopOrdersCancellation - 2, // 4: vega.commands.v1.BatchMarketInstructions.stop_orders_submission:type_name -> vega.commands.v1.StopOrdersSubmission - 3, // 5: vega.commands.v1.StopOrdersSubmission.rises_above:type_name -> vega.commands.v1.StopOrderSetup - 3, // 6: vega.commands.v1.StopOrdersSubmission.falls_below:type_name -> vega.commands.v1.StopOrderSetup - 5, // 7: vega.commands.v1.StopOrderSetup.order_submission:type_name -> vega.commands.v1.OrderSubmission - 27, // 8: vega.commands.v1.StopOrderSetup.expiry_strategy:type_name -> vega.StopOrder.ExpiryStrategy - 28, // 9: vega.commands.v1.OrderSubmission.side:type_name -> vega.Side - 29, // 10: vega.commands.v1.OrderSubmission.time_in_force:type_name -> vega.Order.TimeInForce - 30, // 11: vega.commands.v1.OrderSubmission.type:type_name -> vega.Order.Type - 31, // 12: vega.commands.v1.OrderSubmission.pegged_order:type_name -> vega.PeggedOrder - 6, // 13: vega.commands.v1.OrderSubmission.iceberg_opts:type_name -> vega.commands.v1.IcebergOpts - 29, // 14: vega.commands.v1.OrderAmendment.time_in_force:type_name -> vega.Order.TimeInForce - 32, // 15: vega.commands.v1.OrderAmendment.pegged_reference:type_name -> vega.PeggedReference - 33, // 16: vega.commands.v1.WithdrawSubmission.ext:type_name -> vega.WithdrawExt - 34, // 17: vega.commands.v1.ProposalSubmission.terms:type_name -> vega.ProposalTerms - 35, // 18: vega.commands.v1.ProposalSubmission.rationale:type_name -> vega.ProposalRationale - 36, // 19: vega.commands.v1.VoteSubmission.value:type_name -> vega.Vote.Value - 0, // 20: vega.commands.v1.UndelegateSubmission.method:type_name -> vega.commands.v1.UndelegateSubmission.Method - 37, // 21: vega.commands.v1.Transfer.from_account_type:type_name -> vega.AccountType - 37, // 22: vega.commands.v1.Transfer.to_account_type:type_name -> vega.AccountType - 18, // 23: vega.commands.v1.Transfer.one_off:type_name -> vega.commands.v1.OneOffTransfer - 19, // 24: vega.commands.v1.Transfer.recurring:type_name -> vega.commands.v1.RecurringTransfer - 38, // 25: vega.commands.v1.RecurringTransfer.dispatch_strategy:type_name -> vega.DispatchStrategy - 39, // 26: vega.commands.v1.IssueSignatures.kind:type_name -> vega.commands.v1.NodeSignatureKind - 25, // 27: vega.commands.v1.CreateReferralSet.team:type_name -> vega.commands.v1.CreateReferralSet.Team - 26, // 28: vega.commands.v1.UpdateReferralSet.team:type_name -> vega.commands.v1.UpdateReferralSet.Team - 29, // [29:29] is the sub-list for method output_type - 29, // [29:29] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name + 9, // 0: vega.commands.v1.BatchMarketInstructions.cancellations:type_name -> vega.commands.v1.OrderCancellation + 10, // 1: vega.commands.v1.BatchMarketInstructions.amendments:type_name -> vega.commands.v1.OrderAmendment + 6, // 2: vega.commands.v1.BatchMarketInstructions.submissions:type_name -> vega.commands.v1.OrderSubmission + 5, // 3: vega.commands.v1.BatchMarketInstructions.stop_orders_cancellation:type_name -> vega.commands.v1.StopOrdersCancellation + 3, // 4: vega.commands.v1.BatchMarketInstructions.stop_orders_submission:type_name -> vega.commands.v1.StopOrdersSubmission + 8, // 5: vega.commands.v1.BatchMarketInstructions.update_margin_mode:type_name -> vega.commands.v1.UpdateMarginMode + 4, // 6: vega.commands.v1.StopOrdersSubmission.rises_above:type_name -> vega.commands.v1.StopOrderSetup + 4, // 7: vega.commands.v1.StopOrdersSubmission.falls_below:type_name -> vega.commands.v1.StopOrderSetup + 6, // 8: vega.commands.v1.StopOrderSetup.order_submission:type_name -> vega.commands.v1.OrderSubmission + 33, // 9: vega.commands.v1.StopOrderSetup.expiry_strategy:type_name -> vega.StopOrder.ExpiryStrategy + 34, // 10: vega.commands.v1.StopOrderSetup.size_override_setting:type_name -> vega.StopOrder.SizeOverrideSetting + 35, // 11: vega.commands.v1.StopOrderSetup.size_override_value:type_name -> vega.StopOrder.SizeOverrideValue + 36, // 12: vega.commands.v1.OrderSubmission.side:type_name -> vega.Side + 37, // 13: vega.commands.v1.OrderSubmission.time_in_force:type_name -> vega.Order.TimeInForce + 38, // 14: vega.commands.v1.OrderSubmission.type:type_name -> vega.Order.Type + 39, // 15: vega.commands.v1.OrderSubmission.pegged_order:type_name -> vega.PeggedOrder + 7, // 16: vega.commands.v1.OrderSubmission.iceberg_opts:type_name -> vega.commands.v1.IcebergOpts + 0, // 17: vega.commands.v1.UpdateMarginMode.mode:type_name -> vega.commands.v1.UpdateMarginMode.Mode + 37, // 18: vega.commands.v1.OrderAmendment.time_in_force:type_name -> vega.Order.TimeInForce + 40, // 19: vega.commands.v1.OrderAmendment.pegged_reference:type_name -> vega.PeggedReference + 41, // 20: vega.commands.v1.WithdrawSubmission.ext:type_name -> vega.WithdrawExt + 42, // 21: vega.commands.v1.ProposalSubmission.terms:type_name -> vega.ProposalTerms + 43, // 22: vega.commands.v1.ProposalSubmission.rationale:type_name -> vega.ProposalRationale + 44, // 23: vega.commands.v1.BatchProposalSubmissionTerms.changes:type_name -> vega.BatchProposalTermsChange + 16, // 24: vega.commands.v1.BatchProposalSubmission.terms:type_name -> vega.commands.v1.BatchProposalSubmissionTerms + 43, // 25: vega.commands.v1.BatchProposalSubmission.rationale:type_name -> vega.ProposalRationale + 45, // 26: vega.commands.v1.VoteSubmission.value:type_name -> vega.Vote.Value + 1, // 27: vega.commands.v1.UndelegateSubmission.method:type_name -> vega.commands.v1.UndelegateSubmission.Method + 46, // 28: vega.commands.v1.Transfer.from_account_type:type_name -> vega.AccountType + 46, // 29: vega.commands.v1.Transfer.to_account_type:type_name -> vega.AccountType + 22, // 30: vega.commands.v1.Transfer.one_off:type_name -> vega.commands.v1.OneOffTransfer + 23, // 31: vega.commands.v1.Transfer.recurring:type_name -> vega.commands.v1.RecurringTransfer + 47, // 32: vega.commands.v1.RecurringTransfer.dispatch_strategy:type_name -> vega.DispatchStrategy + 48, // 33: vega.commands.v1.IssueSignatures.kind:type_name -> vega.commands.v1.NodeSignatureKind + 31, // 34: vega.commands.v1.CreateReferralSet.team:type_name -> vega.commands.v1.CreateReferralSet.Team + 32, // 35: vega.commands.v1.UpdateReferralSet.team:type_name -> vega.commands.v1.UpdateReferralSet.Team + 49, // 36: vega.commands.v1.UpdatePartyProfile.metadata:type_name -> vega.Metadata + 37, // [37:37] is the sub-list for method output_type + 37, // [37:37] is the sub-list for method input_type + 37, // [37:37] is the sub-list for extension type_name + 37, // [37:37] is the sub-list for extension extendee + 0, // [0:37] is the sub-list for field type_name } func init() { file_vega_commands_v1_commands_proto_init() } @@ -2503,7 +3010,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderCancellation); i { + switch v := v.(*UpdateMarginMode); i { case 0: return &v.state case 1: @@ -2515,7 +3022,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderAmendment); i { + switch v := v.(*OrderCancellation); i { case 0: return &v.state case 1: @@ -2527,7 +3034,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProvisionSubmission); i { + switch v := v.(*OrderAmendment); i { case 0: return &v.state case 1: @@ -2539,7 +3046,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProvisionCancellation); i { + switch v := v.(*LiquidityProvisionSubmission); i { case 0: return &v.state case 1: @@ -2551,7 +3058,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProvisionAmendment); i { + switch v := v.(*LiquidityProvisionCancellation); i { case 0: return &v.state case 1: @@ -2563,7 +3070,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawSubmission); i { + switch v := v.(*LiquidityProvisionAmendment); i { case 0: return &v.state case 1: @@ -2575,7 +3082,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProposalSubmission); i { + switch v := v.(*WithdrawSubmission); i { case 0: return &v.state case 1: @@ -2587,7 +3094,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VoteSubmission); i { + switch v := v.(*ProposalSubmission); i { case 0: return &v.state case 1: @@ -2599,7 +3106,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegateSubmission); i { + switch v := v.(*BatchProposalSubmissionTerms); i { case 0: return &v.state case 1: @@ -2611,7 +3118,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UndelegateSubmission); i { + switch v := v.(*BatchProposalSubmission); i { case 0: return &v.state case 1: @@ -2623,7 +3130,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Transfer); i { + switch v := v.(*VoteSubmission); i { case 0: return &v.state case 1: @@ -2635,7 +3142,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OneOffTransfer); i { + switch v := v.(*DelegateSubmission); i { case 0: return &v.state case 1: @@ -2647,7 +3154,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RecurringTransfer); i { + switch v := v.(*UndelegateSubmission); i { case 0: return &v.state case 1: @@ -2659,7 +3166,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelTransfer); i { + switch v := v.(*Transfer); i { case 0: return &v.state case 1: @@ -2671,7 +3178,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IssueSignatures); i { + switch v := v.(*OneOffTransfer); i { case 0: return &v.state case 1: @@ -2683,7 +3190,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateReferralSet); i { + switch v := v.(*RecurringTransfer); i { case 0: return &v.state case 1: @@ -2695,7 +3202,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateReferralSet); i { + switch v := v.(*CancelTransfer); i { case 0: return &v.state case 1: @@ -2707,7 +3214,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplyReferralCode); i { + switch v := v.(*IssueSignatures); i { case 0: return &v.state case 1: @@ -2719,7 +3226,7 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateReferralSet_Team); i { + switch v := v.(*CreateReferralSet); i { case 0: return &v.state case 1: @@ -2731,6 +3238,66 @@ func file_vega_commands_v1_commands_proto_init() { } } file_vega_commands_v1_commands_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReferralSet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_commands_v1_commands_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApplyReferralCode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_commands_v1_commands_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JoinTeam); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_commands_v1_commands_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdatePartyProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_commands_v1_commands_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateReferralSet_Team); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_commands_v1_commands_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateReferralSet_Team); i { case 0: return &v.state @@ -2750,23 +3317,24 @@ func file_vega_commands_v1_commands_proto_init() { } file_vega_commands_v1_commands_proto_msgTypes[3].OneofWrappers = []interface{}{} file_vega_commands_v1_commands_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_vega_commands_v1_commands_proto_msgTypes[7].OneofWrappers = []interface{}{} - file_vega_commands_v1_commands_proto_msgTypes[16].OneofWrappers = []interface{}{ + file_vega_commands_v1_commands_proto_msgTypes[6].OneofWrappers = []interface{}{} + file_vega_commands_v1_commands_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_vega_commands_v1_commands_proto_msgTypes[19].OneofWrappers = []interface{}{ (*Transfer_OneOff)(nil), (*Transfer_Recurring)(nil), } - file_vega_commands_v1_commands_proto_msgTypes[18].OneofWrappers = []interface{}{} file_vega_commands_v1_commands_proto_msgTypes[21].OneofWrappers = []interface{}{} - file_vega_commands_v1_commands_proto_msgTypes[22].OneofWrappers = []interface{}{} file_vega_commands_v1_commands_proto_msgTypes[24].OneofWrappers = []interface{}{} file_vega_commands_v1_commands_proto_msgTypes[25].OneofWrappers = []interface{}{} + file_vega_commands_v1_commands_proto_msgTypes[29].OneofWrappers = []interface{}{} + file_vega_commands_v1_commands_proto_msgTypes[30].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vega_commands_v1_commands_proto_rawDesc, - NumEnums: 1, - NumMessages: 26, + NumEnums: 2, + NumMessages: 31, NumExtensions: 0, NumServices: 0, }, diff --git a/protos/vega/commands/v1/governance.go b/protos/vega/commands/v1/governance.go index f921249dbf..cba8d675a9 100644 --- a/protos/vega/commands/v1/governance.go +++ b/protos/vega/commands/v1/governance.go @@ -1,10 +1,19 @@ package v1 -import types "code.vegaprotocol.io/vega/protos/vega" +import ( + "errors" + + types "code.vegaprotocol.io/vega/protos/vega" +) + +func ProposalSubmissionFromProposal(p *types.Proposal) (*ProposalSubmission, error) { + terms := p.GetTerms() + if terms == nil { + return nil, errors.New("can not proposal submission from batch proposal") + } -func ProposalSubmissionFromProposal(p *types.Proposal) *ProposalSubmission { return &ProposalSubmission{ Reference: p.Reference, - Terms: p.Terms, - } + Terms: terms, + }, nil } diff --git a/protos/vega/commands/v1/transaction.pb.go b/protos/vega/commands/v1/transaction.pb.go index 42ece04262..ad0e30c0c8 100644 --- a/protos/vega/commands/v1/transaction.pb.go +++ b/protos/vega/commands/v1/transaction.pb.go @@ -107,6 +107,10 @@ type InputData struct { // *InputData_CreateReferralSet // *InputData_UpdateReferralSet // *InputData_ApplyReferralCode + // *InputData_UpdateMarginMode + // *InputData_JoinTeam + // *InputData_BatchProposalSubmission + // *InputData_UpdatePartyProfile // *InputData_NodeVote // *InputData_NodeSignature // *InputData_ChainEvent @@ -313,6 +317,34 @@ func (x *InputData) GetApplyReferralCode() *ApplyReferralCode { return nil } +func (x *InputData) GetUpdateMarginMode() *UpdateMarginMode { + if x, ok := x.GetCommand().(*InputData_UpdateMarginMode); ok { + return x.UpdateMarginMode + } + return nil +} + +func (x *InputData) GetJoinTeam() *JoinTeam { + if x, ok := x.GetCommand().(*InputData_JoinTeam); ok { + return x.JoinTeam + } + return nil +} + +func (x *InputData) GetBatchProposalSubmission() *BatchProposalSubmission { + if x, ok := x.GetCommand().(*InputData_BatchProposalSubmission); ok { + return x.BatchProposalSubmission + } + return nil +} + +func (x *InputData) GetUpdatePartyProfile() *UpdatePartyProfile { + if x, ok := x.GetCommand().(*InputData_UpdatePartyProfile); ok { + return x.UpdatePartyProfile + } + return nil +} + func (x *InputData) GetNodeVote() *NodeVote { if x, ok := x.GetCommand().(*InputData_NodeVote); ok { return x.NodeVote @@ -487,6 +519,26 @@ type InputData_ApplyReferralCode struct { ApplyReferralCode *ApplyReferralCode `protobuf:"bytes,1020,opt,name=apply_referral_code,json=applyReferralCode,proto3,oneof"` } +type InputData_UpdateMarginMode struct { + // Command to update the margin mode of a party in a market. + UpdateMarginMode *UpdateMarginMode `protobuf:"bytes,1021,opt,name=update_margin_mode,json=updateMarginMode,proto3,oneof"` +} + +type InputData_JoinTeam struct { + // Command to join a team. + JoinTeam *JoinTeam `protobuf:"bytes,1022,opt,name=join_team,json=joinTeam,proto3,oneof"` +} + +type InputData_BatchProposalSubmission struct { + // Command to submit a batch governance proposal. + BatchProposalSubmission *BatchProposalSubmission `protobuf:"bytes,1023,opt,name=batch_proposal_submission,json=batchProposalSubmission,proto3,oneof"` +} + +type InputData_UpdatePartyProfile struct { + // Command to update a party's profile. + UpdatePartyProfile *UpdatePartyProfile `protobuf:"bytes,1024,opt,name=update_party_profile,json=updatePartyProfile,proto3,oneof"` +} + type InputData_NodeVote struct { // Validator command sent automatically to vote on that validity of an external resource. NodeVote *NodeVote `protobuf:"bytes,2002,opt,name=node_vote,json=nodeVote,proto3,oneof"` @@ -577,6 +629,14 @@ func (*InputData_UpdateReferralSet) isInputData_Command() {} func (*InputData_ApplyReferralCode) isInputData_Command() {} +func (*InputData_UpdateMarginMode) isInputData_Command() {} + +func (*InputData_JoinTeam) isInputData_Command() {} + +func (*InputData_BatchProposalSubmission) isInputData_Command() {} + +func (*InputData_UpdatePartyProfile) isInputData_Command() {} + func (*InputData_NodeVote) isInputData_Command() {} func (*InputData_NodeSignature) isInputData_Command() {} @@ -794,7 +854,7 @@ var file_vega_commands_v1_transaction_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xfa, 0x15, 0x0a, 0x09, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x6f, 0x22, 0xd0, 0x18, 0x0a, 0x09, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, @@ -913,93 +973,115 @@ var file_vega_commands_v1_transaction_proto_rawDesc = []byte{ 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x11, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x76, 0x6f, 0x74, 0x65, - 0x18, 0xd2, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x56, - 0x6f, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x12, - 0x49, 0x0a, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0xd3, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x6f, 0x64, - 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0xd4, 0x0f, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, - 0x52, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x15, - 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xd5, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x13, 0x6b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x17, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0xd6, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x15, 0x73, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x58, - 0x0a, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x72, - 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0xd7, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, + 0x6f, 0x64, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0xfd, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x4d, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, + 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0xfe, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, - 0x61, 0x74, 0x48, 0x00, 0x52, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, - 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x75, 0x0a, 0x1e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, - 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xd8, 0x0f, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, + 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x65, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x08, 0x6a, 0x6f, 0x69, 0x6e, + 0x54, 0x65, 0x61, 0x6d, 0x12, 0x68, 0x0a, 0x19, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0xff, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x17, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x59, + 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x80, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x74, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x18, 0xd2, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, 0x64, + 0x65, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0xd3, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x48, + 0x00, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, + 0xd4, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x15, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, + 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xd5, 0x0f, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x13, 0x6b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x48, 0x00, 0x52, 0x1b, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, - 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x68, 0x0a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0xd9, 0x0f, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x48, 0x00, - 0x52, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x4f, 0x0a, 0x10, 0x69, 0x73, 0x73, - 0x75, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0xda, 0x0f, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x69, 0x73, 0x73, 0x75, 0x65, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x16, 0x6f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xb9, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4a, 0x06, 0x08, 0xa1, 0x1f, 0x10, 0xa2, 0x1f, 0x22, 0x92, - 0x02, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, - 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, - 0x79, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xd0, 0x0f, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x03, 0x70, 0x6f, 0x77, - 0x18, 0xb8, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x03, 0x70, 0x6f, 0x77, 0x42, 0x06, 0x0a, 0x04, 0x66, - 0x72, 0x6f, 0x6d, 0x22, 0x35, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, - 0x72, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x74, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x2a, 0x53, 0x0a, 0x09, 0x54, 0x78, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x58, 0x5f, 0x56, 0x45, - 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x58, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, - 0x4e, 0x5f, 0x56, 0x32, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x58, 0x5f, 0x56, 0x45, 0x52, - 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x33, 0x10, 0x03, 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, 0x42, - 0x33, 0x5a, 0x31, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x62, 0x0a, 0x17, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0xd6, 0x0f, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x15, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x58, 0x0a, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0xd7, 0x0f, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, + 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x48, 0x00, 0x52, 0x12, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x75, + 0x0a, 0x1e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x72, + 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0xd8, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1b, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x18, 0xd9, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, + 0x4f, 0x0a, 0x10, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x18, 0xda, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, + 0x73, 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x48, 0x00, 0x52, + 0x0f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, + 0x12, 0x5f, 0x0a, 0x16, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xb9, 0x17, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4a, 0x06, 0x08, 0xa1, + 0x1f, 0x10, 0xa2, 0x1f, 0x22, 0x92, 0x02, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1b, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x07, 0x70, + 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0xd0, 0x0f, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x30, 0x0a, 0x03, 0x70, 0x6f, 0x77, 0x18, 0xb8, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x03, 0x70, 0x6f, + 0x77, 0x42, 0x06, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x22, 0x35, 0x0a, 0x0b, 0x50, 0x72, 0x6f, + 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x2a, 0x53, 0x0a, 0x09, 0x54, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, + 0x16, 0x54, 0x58, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x58, 0x5f, + 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x32, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, + 0x54, 0x58, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x33, 0x10, 0x03, 0x22, + 0x04, 0x08, 0x01, 0x10, 0x01, 0x42, 0x33, 0x5a, 0x31, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, + 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1041,17 +1123,21 @@ var file_vega_commands_v1_transaction_proto_goTypes = []interface{}{ (*CreateReferralSet)(nil), // 21: vega.commands.v1.CreateReferralSet (*UpdateReferralSet)(nil), // 22: vega.commands.v1.UpdateReferralSet (*ApplyReferralCode)(nil), // 23: vega.commands.v1.ApplyReferralCode - (*NodeVote)(nil), // 24: vega.commands.v1.NodeVote - (*NodeSignature)(nil), // 25: vega.commands.v1.NodeSignature - (*ChainEvent)(nil), // 26: vega.commands.v1.ChainEvent - (*KeyRotateSubmission)(nil), // 27: vega.commands.v1.KeyRotateSubmission - (*StateVariableProposal)(nil), // 28: vega.commands.v1.StateVariableProposal - (*ValidatorHeartbeat)(nil), // 29: vega.commands.v1.ValidatorHeartbeat - (*EthereumKeyRotateSubmission)(nil), // 30: vega.commands.v1.EthereumKeyRotateSubmission - (*ProtocolUpgradeProposal)(nil), // 31: vega.commands.v1.ProtocolUpgradeProposal - (*IssueSignatures)(nil), // 32: vega.commands.v1.IssueSignatures - (*OracleDataSubmission)(nil), // 33: vega.commands.v1.OracleDataSubmission - (*Signature)(nil), // 34: vega.commands.v1.Signature + (*UpdateMarginMode)(nil), // 24: vega.commands.v1.UpdateMarginMode + (*JoinTeam)(nil), // 25: vega.commands.v1.JoinTeam + (*BatchProposalSubmission)(nil), // 26: vega.commands.v1.BatchProposalSubmission + (*UpdatePartyProfile)(nil), // 27: vega.commands.v1.UpdatePartyProfile + (*NodeVote)(nil), // 28: vega.commands.v1.NodeVote + (*NodeSignature)(nil), // 29: vega.commands.v1.NodeSignature + (*ChainEvent)(nil), // 30: vega.commands.v1.ChainEvent + (*KeyRotateSubmission)(nil), // 31: vega.commands.v1.KeyRotateSubmission + (*StateVariableProposal)(nil), // 32: vega.commands.v1.StateVariableProposal + (*ValidatorHeartbeat)(nil), // 33: vega.commands.v1.ValidatorHeartbeat + (*EthereumKeyRotateSubmission)(nil), // 34: vega.commands.v1.EthereumKeyRotateSubmission + (*ProtocolUpgradeProposal)(nil), // 35: vega.commands.v1.ProtocolUpgradeProposal + (*IssueSignatures)(nil), // 36: vega.commands.v1.IssueSignatures + (*OracleDataSubmission)(nil), // 37: vega.commands.v1.OracleDataSubmission + (*Signature)(nil), // 38: vega.commands.v1.Signature } var file_vega_commands_v1_transaction_proto_depIdxs = []int32{ 4, // 0: vega.commands.v1.InputData.order_submission:type_name -> vega.commands.v1.OrderSubmission @@ -1074,24 +1160,28 @@ var file_vega_commands_v1_transaction_proto_depIdxs = []int32{ 21, // 17: vega.commands.v1.InputData.create_referral_set:type_name -> vega.commands.v1.CreateReferralSet 22, // 18: vega.commands.v1.InputData.update_referral_set:type_name -> vega.commands.v1.UpdateReferralSet 23, // 19: vega.commands.v1.InputData.apply_referral_code:type_name -> vega.commands.v1.ApplyReferralCode - 24, // 20: vega.commands.v1.InputData.node_vote:type_name -> vega.commands.v1.NodeVote - 25, // 21: vega.commands.v1.InputData.node_signature:type_name -> vega.commands.v1.NodeSignature - 26, // 22: vega.commands.v1.InputData.chain_event:type_name -> vega.commands.v1.ChainEvent - 27, // 23: vega.commands.v1.InputData.key_rotate_submission:type_name -> vega.commands.v1.KeyRotateSubmission - 28, // 24: vega.commands.v1.InputData.state_variable_proposal:type_name -> vega.commands.v1.StateVariableProposal - 29, // 25: vega.commands.v1.InputData.validator_heartbeat:type_name -> vega.commands.v1.ValidatorHeartbeat - 30, // 26: vega.commands.v1.InputData.ethereum_key_rotate_submission:type_name -> vega.commands.v1.EthereumKeyRotateSubmission - 31, // 27: vega.commands.v1.InputData.protocol_upgrade_proposal:type_name -> vega.commands.v1.ProtocolUpgradeProposal - 32, // 28: vega.commands.v1.InputData.issue_signatures:type_name -> vega.commands.v1.IssueSignatures - 33, // 29: vega.commands.v1.InputData.oracle_data_submission:type_name -> vega.commands.v1.OracleDataSubmission - 34, // 30: vega.commands.v1.Transaction.signature:type_name -> vega.commands.v1.Signature - 0, // 31: vega.commands.v1.Transaction.version:type_name -> vega.commands.v1.TxVersion - 3, // 32: vega.commands.v1.Transaction.pow:type_name -> vega.commands.v1.ProofOfWork - 33, // [33:33] is the sub-list for method output_type - 33, // [33:33] is the sub-list for method input_type - 33, // [33:33] is the sub-list for extension type_name - 33, // [33:33] is the sub-list for extension extendee - 0, // [0:33] is the sub-list for field type_name + 24, // 20: vega.commands.v1.InputData.update_margin_mode:type_name -> vega.commands.v1.UpdateMarginMode + 25, // 21: vega.commands.v1.InputData.join_team:type_name -> vega.commands.v1.JoinTeam + 26, // 22: vega.commands.v1.InputData.batch_proposal_submission:type_name -> vega.commands.v1.BatchProposalSubmission + 27, // 23: vega.commands.v1.InputData.update_party_profile:type_name -> vega.commands.v1.UpdatePartyProfile + 28, // 24: vega.commands.v1.InputData.node_vote:type_name -> vega.commands.v1.NodeVote + 29, // 25: vega.commands.v1.InputData.node_signature:type_name -> vega.commands.v1.NodeSignature + 30, // 26: vega.commands.v1.InputData.chain_event:type_name -> vega.commands.v1.ChainEvent + 31, // 27: vega.commands.v1.InputData.key_rotate_submission:type_name -> vega.commands.v1.KeyRotateSubmission + 32, // 28: vega.commands.v1.InputData.state_variable_proposal:type_name -> vega.commands.v1.StateVariableProposal + 33, // 29: vega.commands.v1.InputData.validator_heartbeat:type_name -> vega.commands.v1.ValidatorHeartbeat + 34, // 30: vega.commands.v1.InputData.ethereum_key_rotate_submission:type_name -> vega.commands.v1.EthereumKeyRotateSubmission + 35, // 31: vega.commands.v1.InputData.protocol_upgrade_proposal:type_name -> vega.commands.v1.ProtocolUpgradeProposal + 36, // 32: vega.commands.v1.InputData.issue_signatures:type_name -> vega.commands.v1.IssueSignatures + 37, // 33: vega.commands.v1.InputData.oracle_data_submission:type_name -> vega.commands.v1.OracleDataSubmission + 38, // 34: vega.commands.v1.Transaction.signature:type_name -> vega.commands.v1.Signature + 0, // 35: vega.commands.v1.Transaction.version:type_name -> vega.commands.v1.TxVersion + 3, // 36: vega.commands.v1.Transaction.pow:type_name -> vega.commands.v1.ProofOfWork + 37, // [37:37] is the sub-list for method output_type + 37, // [37:37] is the sub-list for method input_type + 37, // [37:37] is the sub-list for extension type_name + 37, // [37:37] is the sub-list for extension extendee + 0, // [0:37] is the sub-list for field type_name } func init() { file_vega_commands_v1_transaction_proto_init() } @@ -1162,6 +1252,10 @@ func file_vega_commands_v1_transaction_proto_init() { (*InputData_CreateReferralSet)(nil), (*InputData_UpdateReferralSet)(nil), (*InputData_ApplyReferralCode)(nil), + (*InputData_UpdateMarginMode)(nil), + (*InputData_JoinTeam)(nil), + (*InputData_BatchProposalSubmission)(nil), + (*InputData_UpdatePartyProfile)(nil), (*InputData_NodeVote)(nil), (*InputData_NodeSignature)(nil), (*InputData_ChainEvent)(nil), diff --git a/protos/vega/data_source.pb.go b/protos/vega/data_source.pb.go index 8b79bfa1fe..08c57f59b9 100644 --- a/protos/vega/data_source.pb.go +++ b/protos/vega/data_source.pb.go @@ -73,7 +73,7 @@ func (x DataSourceSpec_Status) Number() protoreflect.EnumNumber { // Deprecated: Use DataSourceSpec_Status.Descriptor instead. func (DataSourceSpec_Status) EnumDescriptor() ([]byte, []int) { - return file_vega_data_source_proto_rawDescGZIP(), []int{10, 0} + return file_vega_data_source_proto_rawDescGZIP(), []int{11, 0} } // Represents the top level object that handles data sources. @@ -160,6 +160,56 @@ func (*DataSourceDefinition_Internal) isDataSourceDefinition_SourceType() {} func (*DataSourceDefinition_External) isDataSourceDefinition_SourceType() {} +// Describes which property of the data source data is to be +// used for price source. +type SpecBindingForCompositePrice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The property name of price. + PriceSourceProperty string `protobuf:"bytes,1,opt,name=price_source_property,json=priceSourceProperty,proto3" json:"price_source_property,omitempty"` +} + +func (x *SpecBindingForCompositePrice) Reset() { + *x = SpecBindingForCompositePrice{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_data_source_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpecBindingForCompositePrice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpecBindingForCompositePrice) ProtoMessage() {} + +func (x *SpecBindingForCompositePrice) ProtoReflect() protoreflect.Message { + mi := &file_vega_data_source_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 SpecBindingForCompositePrice.ProtoReflect.Descriptor instead. +func (*SpecBindingForCompositePrice) Descriptor() ([]byte, []int) { + return file_vega_data_source_proto_rawDescGZIP(), []int{1} +} + +func (x *SpecBindingForCompositePrice) GetPriceSourceProperty() string { + if x != nil { + return x.PriceSourceProperty + } + return "" +} + // Internal data source used for emitting timestamps. type DataSourceSpecConfigurationTime struct { state protoimpl.MessageState @@ -173,7 +223,7 @@ type DataSourceSpecConfigurationTime struct { func (x *DataSourceSpecConfigurationTime) Reset() { *x = DataSourceSpecConfigurationTime{} if protoimpl.UnsafeEnabled { - mi := &file_vega_data_source_proto_msgTypes[1] + mi := &file_vega_data_source_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -186,7 +236,7 @@ func (x *DataSourceSpecConfigurationTime) String() string { func (*DataSourceSpecConfigurationTime) ProtoMessage() {} func (x *DataSourceSpecConfigurationTime) ProtoReflect() protoreflect.Message { - mi := &file_vega_data_source_proto_msgTypes[1] + mi := &file_vega_data_source_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -199,7 +249,7 @@ func (x *DataSourceSpecConfigurationTime) ProtoReflect() protoreflect.Message { // Deprecated: Use DataSourceSpecConfigurationTime.ProtoReflect.Descriptor instead. func (*DataSourceSpecConfigurationTime) Descriptor() ([]byte, []int) { - return file_vega_data_source_proto_rawDescGZIP(), []int{1} + return file_vega_data_source_proto_rawDescGZIP(), []int{2} } func (x *DataSourceSpecConfigurationTime) GetConditions() []*v1.Condition { @@ -224,7 +274,7 @@ type DataSourceSpecConfigurationTimeTrigger struct { func (x *DataSourceSpecConfigurationTimeTrigger) Reset() { *x = DataSourceSpecConfigurationTimeTrigger{} if protoimpl.UnsafeEnabled { - mi := &file_vega_data_source_proto_msgTypes[2] + mi := &file_vega_data_source_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -237,7 +287,7 @@ func (x *DataSourceSpecConfigurationTimeTrigger) String() string { func (*DataSourceSpecConfigurationTimeTrigger) ProtoMessage() {} func (x *DataSourceSpecConfigurationTimeTrigger) ProtoReflect() protoreflect.Message { - mi := &file_vega_data_source_proto_msgTypes[2] + mi := &file_vega_data_source_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -250,7 +300,7 @@ func (x *DataSourceSpecConfigurationTimeTrigger) ProtoReflect() protoreflect.Mes // Deprecated: Use DataSourceSpecConfigurationTimeTrigger.ProtoReflect.Descriptor instead. func (*DataSourceSpecConfigurationTimeTrigger) Descriptor() ([]byte, []int) { - return file_vega_data_source_proto_rawDescGZIP(), []int{2} + return file_vega_data_source_proto_rawDescGZIP(), []int{3} } func (x *DataSourceSpecConfigurationTimeTrigger) GetConditions() []*v1.Condition { @@ -286,7 +336,7 @@ type DataSourceDefinitionInternal struct { func (x *DataSourceDefinitionInternal) Reset() { *x = DataSourceDefinitionInternal{} if protoimpl.UnsafeEnabled { - mi := &file_vega_data_source_proto_msgTypes[3] + mi := &file_vega_data_source_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -299,7 +349,7 @@ func (x *DataSourceDefinitionInternal) String() string { func (*DataSourceDefinitionInternal) ProtoMessage() {} func (x *DataSourceDefinitionInternal) ProtoReflect() protoreflect.Message { - mi := &file_vega_data_source_proto_msgTypes[3] + mi := &file_vega_data_source_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -312,7 +362,7 @@ func (x *DataSourceDefinitionInternal) ProtoReflect() protoreflect.Message { // Deprecated: Use DataSourceDefinitionInternal.ProtoReflect.Descriptor instead. func (*DataSourceDefinitionInternal) Descriptor() ([]byte, []int) { - return file_vega_data_source_proto_rawDescGZIP(), []int{3} + return file_vega_data_source_proto_rawDescGZIP(), []int{4} } func (m *DataSourceDefinitionInternal) GetSourceType() isDataSourceDefinitionInternal_SourceType { @@ -371,7 +421,7 @@ type DataSourceDefinitionExternal struct { func (x *DataSourceDefinitionExternal) Reset() { *x = DataSourceDefinitionExternal{} if protoimpl.UnsafeEnabled { - mi := &file_vega_data_source_proto_msgTypes[4] + mi := &file_vega_data_source_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -384,7 +434,7 @@ func (x *DataSourceDefinitionExternal) String() string { func (*DataSourceDefinitionExternal) ProtoMessage() {} func (x *DataSourceDefinitionExternal) ProtoReflect() protoreflect.Message { - mi := &file_vega_data_source_proto_msgTypes[4] + mi := &file_vega_data_source_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -397,7 +447,7 @@ func (x *DataSourceDefinitionExternal) ProtoReflect() protoreflect.Message { // Deprecated: Use DataSourceDefinitionExternal.ProtoReflect.Descriptor instead. func (*DataSourceDefinitionExternal) Descriptor() ([]byte, []int) { - return file_vega_data_source_proto_rawDescGZIP(), []int{4} + return file_vega_data_source_proto_rawDescGZIP(), []int{5} } func (m *DataSourceDefinitionExternal) GetSourceType() isDataSourceDefinitionExternal_SourceType { @@ -459,7 +509,7 @@ type DataSourceSpecConfiguration struct { func (x *DataSourceSpecConfiguration) Reset() { *x = DataSourceSpecConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_vega_data_source_proto_msgTypes[5] + mi := &file_vega_data_source_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -472,7 +522,7 @@ func (x *DataSourceSpecConfiguration) String() string { func (*DataSourceSpecConfiguration) ProtoMessage() {} func (x *DataSourceSpecConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_vega_data_source_proto_msgTypes[5] + mi := &file_vega_data_source_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -485,7 +535,7 @@ func (x *DataSourceSpecConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use DataSourceSpecConfiguration.ProtoReflect.Descriptor instead. func (*DataSourceSpecConfiguration) Descriptor() ([]byte, []int) { - return file_vega_data_source_proto_rawDescGZIP(), []int{5} + return file_vega_data_source_proto_rawDescGZIP(), []int{6} } func (x *DataSourceSpecConfiguration) GetSigners() []*v1.Signer { @@ -534,12 +584,14 @@ type EthCallSpec struct { // in the second result returned from the contract for a structure with a key // called 'price' and use that if it exists. Normalisers []*Normaliser `protobuf:"bytes,8,rep,name=normalisers,proto3" json:"normalisers,omitempty"` + // The ID of the EVM based chain which is to be used to source the oracle data. + SourceChainId uint64 `protobuf:"varint,9,opt,name=source_chain_id,json=sourceChainId,proto3" json:"source_chain_id,omitempty"` } func (x *EthCallSpec) Reset() { *x = EthCallSpec{} if protoimpl.UnsafeEnabled { - mi := &file_vega_data_source_proto_msgTypes[6] + mi := &file_vega_data_source_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -552,7 +604,7 @@ func (x *EthCallSpec) String() string { func (*EthCallSpec) ProtoMessage() {} func (x *EthCallSpec) ProtoReflect() protoreflect.Message { - mi := &file_vega_data_source_proto_msgTypes[6] + mi := &file_vega_data_source_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -565,7 +617,7 @@ func (x *EthCallSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use EthCallSpec.ProtoReflect.Descriptor instead. func (*EthCallSpec) Descriptor() ([]byte, []int) { - return file_vega_data_source_proto_rawDescGZIP(), []int{6} + return file_vega_data_source_proto_rawDescGZIP(), []int{7} } func (x *EthCallSpec) GetAddress() string { @@ -624,6 +676,13 @@ func (x *EthCallSpec) GetNormalisers() []*Normaliser { return nil } +func (x *EthCallSpec) GetSourceChainId() uint64 { + if x != nil { + return x.SourceChainId + } + return 0 +} + type Normaliser struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -636,7 +695,7 @@ type Normaliser struct { func (x *Normaliser) Reset() { *x = Normaliser{} if protoimpl.UnsafeEnabled { - mi := &file_vega_data_source_proto_msgTypes[7] + mi := &file_vega_data_source_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -649,7 +708,7 @@ func (x *Normaliser) String() string { func (*Normaliser) ProtoMessage() {} func (x *Normaliser) ProtoReflect() protoreflect.Message { - mi := &file_vega_data_source_proto_msgTypes[7] + mi := &file_vega_data_source_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -662,7 +721,7 @@ func (x *Normaliser) ProtoReflect() protoreflect.Message { // Deprecated: Use Normaliser.ProtoReflect.Descriptor instead. func (*Normaliser) Descriptor() ([]byte, []int) { - return file_vega_data_source_proto_rawDescGZIP(), []int{7} + return file_vega_data_source_proto_rawDescGZIP(), []int{8} } func (x *Normaliser) GetName() string { @@ -694,7 +753,7 @@ type EthCallTrigger struct { func (x *EthCallTrigger) Reset() { *x = EthCallTrigger{} if protoimpl.UnsafeEnabled { - mi := &file_vega_data_source_proto_msgTypes[8] + mi := &file_vega_data_source_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -707,7 +766,7 @@ func (x *EthCallTrigger) String() string { func (*EthCallTrigger) ProtoMessage() {} func (x *EthCallTrigger) ProtoReflect() protoreflect.Message { - mi := &file_vega_data_source_proto_msgTypes[8] + mi := &file_vega_data_source_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -720,7 +779,7 @@ func (x *EthCallTrigger) ProtoReflect() protoreflect.Message { // Deprecated: Use EthCallTrigger.ProtoReflect.Descriptor instead. func (*EthCallTrigger) Descriptor() ([]byte, []int) { - return file_vega_data_source_proto_rawDescGZIP(), []int{8} + return file_vega_data_source_proto_rawDescGZIP(), []int{9} } func (m *EthCallTrigger) GetTrigger() isEthCallTrigger_Trigger { @@ -768,7 +827,7 @@ type EthTimeTrigger struct { func (x *EthTimeTrigger) Reset() { *x = EthTimeTrigger{} if protoimpl.UnsafeEnabled { - mi := &file_vega_data_source_proto_msgTypes[9] + mi := &file_vega_data_source_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -781,7 +840,7 @@ func (x *EthTimeTrigger) String() string { func (*EthTimeTrigger) ProtoMessage() {} func (x *EthTimeTrigger) ProtoReflect() protoreflect.Message { - mi := &file_vega_data_source_proto_msgTypes[9] + mi := &file_vega_data_source_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -794,7 +853,7 @@ func (x *EthTimeTrigger) ProtoReflect() protoreflect.Message { // Deprecated: Use EthTimeTrigger.ProtoReflect.Descriptor instead. func (*EthTimeTrigger) Descriptor() ([]byte, []int) { - return file_vega_data_source_proto_rawDescGZIP(), []int{9} + return file_vega_data_source_proto_rawDescGZIP(), []int{10} } func (x *EthTimeTrigger) GetInitial() uint64 { @@ -840,7 +899,7 @@ type DataSourceSpec struct { func (x *DataSourceSpec) Reset() { *x = DataSourceSpec{} if protoimpl.UnsafeEnabled { - mi := &file_vega_data_source_proto_msgTypes[10] + mi := &file_vega_data_source_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -853,7 +912,7 @@ func (x *DataSourceSpec) String() string { func (*DataSourceSpec) ProtoMessage() {} func (x *DataSourceSpec) ProtoReflect() protoreflect.Message { - mi := &file_vega_data_source_proto_msgTypes[10] + mi := &file_vega_data_source_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -866,7 +925,7 @@ func (x *DataSourceSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use DataSourceSpec.ProtoReflect.Descriptor instead. func (*DataSourceSpec) Descriptor() ([]byte, []int) { - return file_vega_data_source_proto_rawDescGZIP(), []int{10} + return file_vega_data_source_proto_rawDescGZIP(), []int{11} } func (x *DataSourceSpec) GetId() string { @@ -915,7 +974,7 @@ type ExternalDataSourceSpec struct { func (x *ExternalDataSourceSpec) Reset() { *x = ExternalDataSourceSpec{} if protoimpl.UnsafeEnabled { - mi := &file_vega_data_source_proto_msgTypes[11] + mi := &file_vega_data_source_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -928,7 +987,7 @@ func (x *ExternalDataSourceSpec) String() string { func (*ExternalDataSourceSpec) ProtoMessage() {} func (x *ExternalDataSourceSpec) ProtoReflect() protoreflect.Message { - mi := &file_vega_data_source_proto_msgTypes[11] + mi := &file_vega_data_source_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -941,7 +1000,7 @@ func (x *ExternalDataSourceSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use ExternalDataSourceSpec.ProtoReflect.Descriptor instead. func (*ExternalDataSourceSpec) Descriptor() ([]byte, []int) { - return file_vega_data_source_proto_rawDescGZIP(), []int{11} + return file_vega_data_source_proto_rawDescGZIP(), []int{12} } func (x *ExternalDataSourceSpec) GetSpec() *DataSourceSpec { @@ -971,116 +1030,124 @@ var file_vega_data_source_proto_rawDesc = []byte{ 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x42, 0x0d, 0x0a, 0x0b, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x5a, 0x0a, 0x1f, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, - 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x26, 0x44, 0x61, 0x74, 0x61, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x12, 0x37, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x52, 0x0a, 0x1c, 0x53, 0x70, + 0x65, 0x63, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0x5a, + 0x0a, 0x1f, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3d, 0x0a, 0x08, 0x74, 0x72, - 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, - 0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x1c, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x48, - 0x00, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x26, 0x44, + 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3d, + 0x0a, 0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x52, 0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x22, 0xbd, 0x01, + 0x0a, 0x1c, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x3b, + 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x69, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x74, + 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x42, 0x0d, + 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x9e, 0x01, + 0x0a, 0x1c, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x3b, + 0x0a, 0x06, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x65, + 0x74, 0x68, 0x5f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x74, 0x68, 0x43, 0x61, 0x6c, 0x6c, 0x53, 0x70, + 0x65, 0x63, 0x48, 0x00, 0x52, 0x09, 0x65, 0x74, 0x68, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x42, + 0x0d, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x7d, + 0x0a, 0x1b, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, + 0x07, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, + 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0xf0, 0x02, + 0x0a, 0x0b, 0x45, 0x74, 0x68, 0x43, 0x61, 0x6c, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x62, 0x69, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x62, 0x69, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x12, 0x2a, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x2e, 0x0a, + 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x74, 0x68, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x35, 0x0a, + 0x16, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x73, + 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, + 0x22, 0x40, 0x0a, 0x0a, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x72, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0x56, 0x0a, 0x0e, 0x45, 0x74, 0x68, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x45, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x48, 0x00, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x42, + 0x09, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x45, + 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x1d, 0x0a, + 0x07, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, + 0x52, 0x07, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x65, 0x76, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x05, 0x65, + 0x76, 0x65, 0x72, 0x79, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x75, 0x6e, 0x74, 0x69, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x05, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x88, + 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x75, 0x6e, 0x74, + 0x69, 0x6c, 0x22, 0x90, 0x02, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x4b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x16, 0x0a, + 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x41, 0x43, 0x54, 0x49, 0x56, 0x41, + 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x42, 0x0a, 0x16, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x28, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, - 0x70, 0x65, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x74, - 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x1c, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x06, 0x6f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, - 0x06, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x65, 0x74, 0x68, 0x5f, 0x6f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x45, 0x74, 0x68, 0x43, 0x61, 0x6c, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, - 0x52, 0x09, 0x65, 0x74, 0x68, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x7d, 0x0a, 0x1b, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x07, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x07, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0xc8, 0x02, 0x0a, 0x0b, 0x45, 0x74, - 0x68, 0x43, 0x61, 0x6c, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x62, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x61, 0x62, 0x69, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2a, 0x0a, - 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x2e, 0x0a, 0x07, 0x74, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x45, 0x74, 0x68, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x16, 0x72, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x2e, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x32, 0x0a, 0x0b, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x72, 0x73, 0x18, - 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, 0x72, - 0x6d, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, - 0x73, 0x65, 0x72, 0x73, 0x22, 0x40, 0x0a, 0x0a, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x73, - 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x56, 0x0a, 0x0e, 0x45, 0x74, 0x68, 0x43, 0x61, 0x6c, - 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, - 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x42, 0x09, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x22, 0x85, - 0x01, 0x0a, 0x0e, 0x45, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x48, 0x00, 0x52, 0x07, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x01, 0x52, 0x05, 0x65, 0x76, 0x65, 0x72, 0x79, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x75, - 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x05, 0x75, 0x6e, - 0x74, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x22, 0x90, 0x02, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x4b, 0x0a, 0x06, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, - 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, - 0x01, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x41, 0x43, - 0x54, 0x49, 0x56, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x42, 0x0a, 0x16, 0x45, 0x78, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, - 0x70, 0x65, 0x63, 0x12, 0x28, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x42, 0x27, 0x5a, - 0x25, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x42, 0x27, 0x5a, 0x25, 0x63, 0x6f, 0x64, + 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, + 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, + 0x67, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1096,47 +1163,48 @@ func file_vega_data_source_proto_rawDescGZIP() []byte { } var file_vega_data_source_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_vega_data_source_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_vega_data_source_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_vega_data_source_proto_goTypes = []interface{}{ (DataSourceSpec_Status)(0), // 0: vega.DataSourceSpec.Status (*DataSourceDefinition)(nil), // 1: vega.DataSourceDefinition - (*DataSourceSpecConfigurationTime)(nil), // 2: vega.DataSourceSpecConfigurationTime - (*DataSourceSpecConfigurationTimeTrigger)(nil), // 3: vega.DataSourceSpecConfigurationTimeTrigger - (*DataSourceDefinitionInternal)(nil), // 4: vega.DataSourceDefinitionInternal - (*DataSourceDefinitionExternal)(nil), // 5: vega.DataSourceDefinitionExternal - (*DataSourceSpecConfiguration)(nil), // 6: vega.DataSourceSpecConfiguration - (*EthCallSpec)(nil), // 7: vega.EthCallSpec - (*Normaliser)(nil), // 8: vega.Normaliser - (*EthCallTrigger)(nil), // 9: vega.EthCallTrigger - (*EthTimeTrigger)(nil), // 10: vega.EthTimeTrigger - (*DataSourceSpec)(nil), // 11: vega.DataSourceSpec - (*ExternalDataSourceSpec)(nil), // 12: vega.ExternalDataSourceSpec - (*v1.Condition)(nil), // 13: vega.data.v1.Condition - (*v1.InternalTimeTrigger)(nil), // 14: vega.data.v1.InternalTimeTrigger - (*v1.Signer)(nil), // 15: vega.data.v1.Signer - (*v1.Filter)(nil), // 16: vega.data.v1.Filter - (*structpb.Value)(nil), // 17: google.protobuf.Value + (*SpecBindingForCompositePrice)(nil), // 2: vega.SpecBindingForCompositePrice + (*DataSourceSpecConfigurationTime)(nil), // 3: vega.DataSourceSpecConfigurationTime + (*DataSourceSpecConfigurationTimeTrigger)(nil), // 4: vega.DataSourceSpecConfigurationTimeTrigger + (*DataSourceDefinitionInternal)(nil), // 5: vega.DataSourceDefinitionInternal + (*DataSourceDefinitionExternal)(nil), // 6: vega.DataSourceDefinitionExternal + (*DataSourceSpecConfiguration)(nil), // 7: vega.DataSourceSpecConfiguration + (*EthCallSpec)(nil), // 8: vega.EthCallSpec + (*Normaliser)(nil), // 9: vega.Normaliser + (*EthCallTrigger)(nil), // 10: vega.EthCallTrigger + (*EthTimeTrigger)(nil), // 11: vega.EthTimeTrigger + (*DataSourceSpec)(nil), // 12: vega.DataSourceSpec + (*ExternalDataSourceSpec)(nil), // 13: vega.ExternalDataSourceSpec + (*v1.Condition)(nil), // 14: vega.data.v1.Condition + (*v1.InternalTimeTrigger)(nil), // 15: vega.data.v1.InternalTimeTrigger + (*v1.Signer)(nil), // 16: vega.data.v1.Signer + (*v1.Filter)(nil), // 17: vega.data.v1.Filter + (*structpb.Value)(nil), // 18: google.protobuf.Value } var file_vega_data_source_proto_depIdxs = []int32{ - 4, // 0: vega.DataSourceDefinition.internal:type_name -> vega.DataSourceDefinitionInternal - 5, // 1: vega.DataSourceDefinition.external:type_name -> vega.DataSourceDefinitionExternal - 13, // 2: vega.DataSourceSpecConfigurationTime.conditions:type_name -> vega.data.v1.Condition - 13, // 3: vega.DataSourceSpecConfigurationTimeTrigger.conditions:type_name -> vega.data.v1.Condition - 14, // 4: vega.DataSourceSpecConfigurationTimeTrigger.triggers:type_name -> vega.data.v1.InternalTimeTrigger - 2, // 5: vega.DataSourceDefinitionInternal.time:type_name -> vega.DataSourceSpecConfigurationTime - 3, // 6: vega.DataSourceDefinitionInternal.time_trigger:type_name -> vega.DataSourceSpecConfigurationTimeTrigger - 6, // 7: vega.DataSourceDefinitionExternal.oracle:type_name -> vega.DataSourceSpecConfiguration - 7, // 8: vega.DataSourceDefinitionExternal.eth_oracle:type_name -> vega.EthCallSpec - 15, // 9: vega.DataSourceSpecConfiguration.signers:type_name -> vega.data.v1.Signer - 16, // 10: vega.DataSourceSpecConfiguration.filters:type_name -> vega.data.v1.Filter - 17, // 11: vega.EthCallSpec.args:type_name -> google.protobuf.Value - 9, // 12: vega.EthCallSpec.trigger:type_name -> vega.EthCallTrigger - 16, // 13: vega.EthCallSpec.filters:type_name -> vega.data.v1.Filter - 8, // 14: vega.EthCallSpec.normalisers:type_name -> vega.Normaliser - 10, // 15: vega.EthCallTrigger.time_trigger:type_name -> vega.EthTimeTrigger + 5, // 0: vega.DataSourceDefinition.internal:type_name -> vega.DataSourceDefinitionInternal + 6, // 1: vega.DataSourceDefinition.external:type_name -> vega.DataSourceDefinitionExternal + 14, // 2: vega.DataSourceSpecConfigurationTime.conditions:type_name -> vega.data.v1.Condition + 14, // 3: vega.DataSourceSpecConfigurationTimeTrigger.conditions:type_name -> vega.data.v1.Condition + 15, // 4: vega.DataSourceSpecConfigurationTimeTrigger.triggers:type_name -> vega.data.v1.InternalTimeTrigger + 3, // 5: vega.DataSourceDefinitionInternal.time:type_name -> vega.DataSourceSpecConfigurationTime + 4, // 6: vega.DataSourceDefinitionInternal.time_trigger:type_name -> vega.DataSourceSpecConfigurationTimeTrigger + 7, // 7: vega.DataSourceDefinitionExternal.oracle:type_name -> vega.DataSourceSpecConfiguration + 8, // 8: vega.DataSourceDefinitionExternal.eth_oracle:type_name -> vega.EthCallSpec + 16, // 9: vega.DataSourceSpecConfiguration.signers:type_name -> vega.data.v1.Signer + 17, // 10: vega.DataSourceSpecConfiguration.filters:type_name -> vega.data.v1.Filter + 18, // 11: vega.EthCallSpec.args:type_name -> google.protobuf.Value + 10, // 12: vega.EthCallSpec.trigger:type_name -> vega.EthCallTrigger + 17, // 13: vega.EthCallSpec.filters:type_name -> vega.data.v1.Filter + 9, // 14: vega.EthCallSpec.normalisers:type_name -> vega.Normaliser + 11, // 15: vega.EthCallTrigger.time_trigger:type_name -> vega.EthTimeTrigger 1, // 16: vega.DataSourceSpec.data:type_name -> vega.DataSourceDefinition 0, // 17: vega.DataSourceSpec.status:type_name -> vega.DataSourceSpec.Status - 11, // 18: vega.ExternalDataSourceSpec.spec:type_name -> vega.DataSourceSpec + 12, // 18: vega.ExternalDataSourceSpec.spec:type_name -> vega.DataSourceSpec 19, // [19:19] is the sub-list for method output_type 19, // [19:19] is the sub-list for method input_type 19, // [19:19] is the sub-list for extension type_name @@ -1163,7 +1231,7 @@ func file_vega_data_source_proto_init() { } } file_vega_data_source_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataSourceSpecConfigurationTime); i { + switch v := v.(*SpecBindingForCompositePrice); i { case 0: return &v.state case 1: @@ -1175,7 +1243,7 @@ func file_vega_data_source_proto_init() { } } file_vega_data_source_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataSourceSpecConfigurationTimeTrigger); i { + switch v := v.(*DataSourceSpecConfigurationTime); i { case 0: return &v.state case 1: @@ -1187,7 +1255,7 @@ func file_vega_data_source_proto_init() { } } file_vega_data_source_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataSourceDefinitionInternal); i { + switch v := v.(*DataSourceSpecConfigurationTimeTrigger); i { case 0: return &v.state case 1: @@ -1199,7 +1267,7 @@ func file_vega_data_source_proto_init() { } } file_vega_data_source_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataSourceDefinitionExternal); i { + switch v := v.(*DataSourceDefinitionInternal); i { case 0: return &v.state case 1: @@ -1211,7 +1279,7 @@ func file_vega_data_source_proto_init() { } } file_vega_data_source_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataSourceSpecConfiguration); i { + switch v := v.(*DataSourceDefinitionExternal); i { case 0: return &v.state case 1: @@ -1223,7 +1291,7 @@ func file_vega_data_source_proto_init() { } } file_vega_data_source_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthCallSpec); i { + switch v := v.(*DataSourceSpecConfiguration); i { case 0: return &v.state case 1: @@ -1235,7 +1303,7 @@ func file_vega_data_source_proto_init() { } } file_vega_data_source_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Normaliser); i { + switch v := v.(*EthCallSpec); i { case 0: return &v.state case 1: @@ -1247,7 +1315,7 @@ func file_vega_data_source_proto_init() { } } file_vega_data_source_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthCallTrigger); i { + switch v := v.(*Normaliser); i { case 0: return &v.state case 1: @@ -1259,7 +1327,7 @@ func file_vega_data_source_proto_init() { } } file_vega_data_source_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthTimeTrigger); i { + switch v := v.(*EthCallTrigger); i { case 0: return &v.state case 1: @@ -1271,7 +1339,7 @@ func file_vega_data_source_proto_init() { } } file_vega_data_source_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataSourceSpec); i { + switch v := v.(*EthTimeTrigger); i { case 0: return &v.state case 1: @@ -1283,6 +1351,18 @@ func file_vega_data_source_proto_init() { } } file_vega_data_source_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataSourceSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_data_source_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExternalDataSourceSpec); i { case 0: return &v.state @@ -1299,25 +1379,25 @@ func file_vega_data_source_proto_init() { (*DataSourceDefinition_Internal)(nil), (*DataSourceDefinition_External)(nil), } - file_vega_data_source_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_vega_data_source_proto_msgTypes[4].OneofWrappers = []interface{}{ (*DataSourceDefinitionInternal_Time)(nil), (*DataSourceDefinitionInternal_TimeTrigger)(nil), } - file_vega_data_source_proto_msgTypes[4].OneofWrappers = []interface{}{ + file_vega_data_source_proto_msgTypes[5].OneofWrappers = []interface{}{ (*DataSourceDefinitionExternal_Oracle)(nil), (*DataSourceDefinitionExternal_EthOracle)(nil), } - file_vega_data_source_proto_msgTypes[8].OneofWrappers = []interface{}{ + file_vega_data_source_proto_msgTypes[9].OneofWrappers = []interface{}{ (*EthCallTrigger_TimeTrigger)(nil), } - file_vega_data_source_proto_msgTypes[9].OneofWrappers = []interface{}{} + file_vega_data_source_proto_msgTypes[10].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vega_data_source_proto_rawDesc, NumEnums: 1, - NumMessages: 12, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/protos/vega/events/v1/events.pb.go b/protos/vega/events/v1/events.pb.go index 3aa5283ce5..8d43cc686e 100644 --- a/protos/vega/events/v1/events.pb.go +++ b/protos/vega/events/v1/events.pb.go @@ -252,6 +252,14 @@ const ( BusEventType_BUS_EVENT_TYPE_VESTING_SUMMARY BusEventType = 82 // Event used to link ledger entries to the transfer that triggered the fees being collected. BusEventType_BUS_EVENT_TYPE_TRANSFER_FEES_PAID BusEventType = 83 + // Event indicating that a party's available transfer fee discount has changed, per asset. + BusEventType_BUS_EVENT_TYPE_TRANSFER_FEES_DISCOUNT_UPDATED BusEventType = 84 + // Event indicating that a party updated their margin mode on a market. + BusEventType_BUS_EVENT_TYPE_PARTY_MARGIN_MODE_UPDATED BusEventType = 85 + // Event indicating that a party updated their profile. + BusEventType_BUS_EVENT_TYPE_PARTY_PROFILE_UPDATED BusEventType = 86 + // Event indicating that teams' statistics have been updated. + BusEventType_BUS_EVENT_TYPE_TEAMS_STATS_UPDATED BusEventType = 87 // Event indicating a market related event, for example when a market opens BusEventType_BUS_EVENT_TYPE_MARKET BusEventType = 101 // Event used to report failed transactions back to a user, this is excluded from the ALL type @@ -345,6 +353,10 @@ var ( 81: "BUS_EVENT_TYPE_PAID_LIQUIDITY_FEES_STATS_UPDATED", 82: "BUS_EVENT_TYPE_VESTING_SUMMARY", 83: "BUS_EVENT_TYPE_TRANSFER_FEES_PAID", + 84: "BUS_EVENT_TYPE_TRANSFER_FEES_DISCOUNT_UPDATED", + 85: "BUS_EVENT_TYPE_PARTY_MARGIN_MODE_UPDATED", + 86: "BUS_EVENT_TYPE_PARTY_PROFILE_UPDATED", + 87: "BUS_EVENT_TYPE_TEAMS_STATS_UPDATED", 101: "BUS_EVENT_TYPE_MARKET", 201: "BUS_EVENT_TYPE_TX_ERROR", } @@ -433,6 +445,10 @@ var ( "BUS_EVENT_TYPE_PAID_LIQUIDITY_FEES_STATS_UPDATED": 81, "BUS_EVENT_TYPE_VESTING_SUMMARY": 82, "BUS_EVENT_TYPE_TRANSFER_FEES_PAID": 83, + "BUS_EVENT_TYPE_TRANSFER_FEES_DISCOUNT_UPDATED": 84, + "BUS_EVENT_TYPE_PARTY_MARGIN_MODE_UPDATED": 85, + "BUS_EVENT_TYPE_PARTY_PROFILE_UPDATED": 86, + "BUS_EVENT_TYPE_TEAMS_STATS_UPDATED": 87, "BUS_EVENT_TYPE_MARKET": 101, "BUS_EVENT_TYPE_TX_ERROR": 201, } @@ -1263,6 +1279,8 @@ type FeesStats struct { TotalMakerFeesReceived []*PartyAmount `protobuf:"bytes,8,rep,name=total_maker_fees_received,json=totalMakerFeesReceived,proto3" json:"total_maker_fees_received,omitempty"` // Maker fees paid by all trade aggressors, and which makers the fees were paid to. MakerFeesGenerated []*MakerFeesGenerated `protobuf:"bytes,9,rep,name=maker_fees_generated,json=makerFeesGenerated,proto3" json:"maker_fees_generated,omitempty"` + // Total trading fees received and paid by the party. + TotalFeesPaidAndReceived []*PartyAmount `protobuf:"bytes,11,rep,name=total_fees_paid_and_received,json=totalFeesPaidAndReceived,proto3" json:"total_fees_paid_and_received,omitempty"` } func (x *FeesStats) Reset() { @@ -1360,6 +1378,13 @@ func (x *FeesStats) GetMakerFeesGenerated() []*MakerFeesGenerated { return nil } +func (x *FeesStats) GetTotalFeesPaidAndReceived() []*PartyAmount { + if x != nil { + return x.TotalFeesPaidAndReceived + } + return nil +} + // Rewards generated for referrers by each of their referees type ReferrerRewardsGenerated struct { state protoimpl.MessageState @@ -2320,6 +2345,9 @@ type Transfer struct { Status Transfer_Status `protobuf:"varint,9,opt,name=status,proto3,enum=vega.events.v1.Transfer_Status" json:"status,omitempty"` Timestamp int64 `protobuf:"varint,10,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Reason *string `protobuf:"bytes,11,opt,name=reason,proto3,oneof" json:"reason,omitempty"` + // ID of the game this transfer was made in relation to. A transfer is made to members of a team + // or participants who take part in a game and are rewarded for their participation + GameId *string `protobuf:"bytes,12,opt,name=game_id,json=gameId,proto3,oneof" json:"game_id,omitempty"` // Types that are assignable to Kind: // // *Transfer_OneOff @@ -2438,6 +2466,13 @@ func (x *Transfer) GetReason() string { return "" } +func (x *Transfer) GetGameId() string { + if x != nil && x.GameId != nil { + return *x.GameId + } + return "" +} + func (m *Transfer) GetKind() isTransfer_Kind { if m != nil { return m.Kind @@ -3191,15 +3226,16 @@ type RewardPayoutEvent struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Party string `protobuf:"bytes,1,opt,name=party,proto3" json:"party,omitempty"` - EpochSeq string `protobuf:"bytes,2,opt,name=epoch_seq,json=epochSeq,proto3" json:"epoch_seq,omitempty"` - Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` - Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` - PercentOfTotalReward string `protobuf:"bytes,5,opt,name=percent_of_total_reward,json=percentOfTotalReward,proto3" json:"percent_of_total_reward,omitempty"` - Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - RewardType string `protobuf:"bytes,7,opt,name=reward_type,json=rewardType,proto3" json:"reward_type,omitempty"` - Market string `protobuf:"bytes,8,opt,name=market,proto3" json:"market,omitempty"` - LockedUntilEpoch string `protobuf:"bytes,9,opt,name=locked_until_epoch,json=lockedUntilEpoch,proto3" json:"locked_until_epoch,omitempty"` + Party string `protobuf:"bytes,1,opt,name=party,proto3" json:"party,omitempty"` + EpochSeq string `protobuf:"bytes,2,opt,name=epoch_seq,json=epochSeq,proto3" json:"epoch_seq,omitempty"` + Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + PercentOfTotalReward string `protobuf:"bytes,5,opt,name=percent_of_total_reward,json=percentOfTotalReward,proto3" json:"percent_of_total_reward,omitempty"` + Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + RewardType string `protobuf:"bytes,7,opt,name=reward_type,json=rewardType,proto3" json:"reward_type,omitempty"` + LockedUntilEpoch string `protobuf:"bytes,9,opt,name=locked_until_epoch,json=lockedUntilEpoch,proto3" json:"locked_until_epoch,omitempty"` + QuantumAmount string `protobuf:"bytes,10,opt,name=quantum_amount,json=quantumAmount,proto3" json:"quantum_amount,omitempty"` + GameId *string `protobuf:"bytes,11,opt,name=game_id,json=gameId,proto3,oneof" json:"game_id,omitempty"` } func (x *RewardPayoutEvent) Reset() { @@ -3283,16 +3319,23 @@ func (x *RewardPayoutEvent) GetRewardType() string { return "" } -func (x *RewardPayoutEvent) GetMarket() string { +func (x *RewardPayoutEvent) GetLockedUntilEpoch() string { if x != nil { - return x.Market + return x.LockedUntilEpoch } return "" } -func (x *RewardPayoutEvent) GetLockedUntilEpoch() string { +func (x *RewardPayoutEvent) GetQuantumAmount() string { if x != nil { - return x.LockedUntilEpoch + return x.QuantumAmount + } + return "" +} + +func (x *RewardPayoutEvent) GetGameId() string { + if x != nil && x.GameId != nil { + return *x.GameId } return "" } @@ -3543,6 +3586,8 @@ type TransferFees struct { Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` // Epoch when the transfer was dispatched, and fees were paid. Epoch uint64 `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty"` + // Amount that was subtracted from the transfer fee based on available discounts. + DiscountApplied string `protobuf:"bytes,4,opt,name=discount_applied,json=discountApplied,proto3" json:"discount_applied,omitempty"` } func (x *TransferFees) Reset() { @@ -3598,6 +3643,88 @@ func (x *TransferFees) GetEpoch() uint64 { return 0 } +func (x *TransferFees) GetDiscountApplied() string { + if x != nil { + return x.DiscountApplied + } + return "" +} + +type TransferFeesDiscount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Party that the transfer fee discount applies to. + Party string `protobuf:"bytes,1,opt,name=party,proto3" json:"party,omitempty"` + // Asset that the transfer fee discount is relevant to. + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + // Amount that the transfer fee was discounted by. + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + // Epoch in which the discount was first available. + Epoch uint64 `protobuf:"varint,4,opt,name=epoch,proto3" json:"epoch,omitempty"` +} + +func (x *TransferFeesDiscount) Reset() { + *x = TransferFeesDiscount{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_events_v1_events_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransferFeesDiscount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferFeesDiscount) ProtoMessage() {} + +func (x *TransferFeesDiscount) ProtoReflect() protoreflect.Message { + mi := &file_vega_events_v1_events_proto_msgTypes[36] + 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 TransferFeesDiscount.ProtoReflect.Descriptor instead. +func (*TransferFeesDiscount) Descriptor() ([]byte, []int) { + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{36} +} + +func (x *TransferFeesDiscount) GetParty() string { + if x != nil { + return x.Party + } + return "" +} + +func (x *TransferFeesDiscount) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +func (x *TransferFeesDiscount) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *TransferFeesDiscount) GetEpoch() uint64 { + if x != nil { + return x.Epoch + } + return 0 +} + type TransactionResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3636,6 +3763,10 @@ type TransactionResult struct { // *TransactionResult_CreateReferralSet // *TransactionResult_UpdateReferralSet // *TransactionResult_ApplyReferralCode + // *TransactionResult_UpdateMarginMode + // *TransactionResult_JoinTeam + // *TransactionResult_BatchProposal + // *TransactionResult_UpdatePartyProfile Transaction isTransactionResult_Transaction `protobuf_oneof:"transaction"` // extra details about the transaction processing // @@ -3649,7 +3780,7 @@ type TransactionResult struct { func (x *TransactionResult) Reset() { *x = TransactionResult{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[36] + mi := &file_vega_events_v1_events_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3662,7 +3793,7 @@ func (x *TransactionResult) String() string { func (*TransactionResult) ProtoMessage() {} func (x *TransactionResult) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[36] + mi := &file_vega_events_v1_events_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3675,7 +3806,7 @@ func (x *TransactionResult) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionResult.ProtoReflect.Descriptor instead. func (*TransactionResult) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{36} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{37} } func (x *TransactionResult) GetPartyId() string { @@ -3881,6 +4012,34 @@ func (x *TransactionResult) GetApplyReferralCode() *v1.ApplyReferralCode { return nil } +func (x *TransactionResult) GetUpdateMarginMode() *v1.UpdateMarginMode { + if x, ok := x.GetTransaction().(*TransactionResult_UpdateMarginMode); ok { + return x.UpdateMarginMode + } + return nil +} + +func (x *TransactionResult) GetJoinTeam() *v1.JoinTeam { + if x, ok := x.GetTransaction().(*TransactionResult_JoinTeam); ok { + return x.JoinTeam + } + return nil +} + +func (x *TransactionResult) GetBatchProposal() *v1.BatchProposalSubmission { + if x, ok := x.GetTransaction().(*TransactionResult_BatchProposal); ok { + return x.BatchProposal + } + return nil +} + +func (x *TransactionResult) GetUpdatePartyProfile() *v1.UpdatePartyProfile { + if x, ok := x.GetTransaction().(*TransactionResult_UpdatePartyProfile); ok { + return x.UpdatePartyProfile + } + return nil +} + func (m *TransactionResult) GetExtra() isTransactionResult_Extra { if m != nil { return m.Extra @@ -4006,6 +4165,22 @@ type TransactionResult_ApplyReferralCode struct { ApplyReferralCode *v1.ApplyReferralCode `protobuf:"bytes,126,opt,name=apply_referral_code,json=applyReferralCode,proto3,oneof"` } +type TransactionResult_UpdateMarginMode struct { + UpdateMarginMode *v1.UpdateMarginMode `protobuf:"bytes,127,opt,name=update_margin_mode,json=updateMarginMode,proto3,oneof"` +} + +type TransactionResult_JoinTeam struct { + JoinTeam *v1.JoinTeam `protobuf:"bytes,128,opt,name=join_team,json=joinTeam,proto3,oneof"` +} + +type TransactionResult_BatchProposal struct { + BatchProposal *v1.BatchProposalSubmission `protobuf:"bytes,129,opt,name=batch_proposal,json=batchProposal,proto3,oneof"` +} + +type TransactionResult_UpdatePartyProfile struct { + UpdatePartyProfile *v1.UpdatePartyProfile `protobuf:"bytes,130,opt,name=update_party_profile,json=updatePartyProfile,proto3,oneof"` +} + func (*TransactionResult_OrderSubmission) isTransactionResult_Transaction() {} func (*TransactionResult_OrderAmendment) isTransactionResult_Transaction() {} @@ -4056,6 +4231,14 @@ func (*TransactionResult_UpdateReferralSet) isTransactionResult_Transaction() {} func (*TransactionResult_ApplyReferralCode) isTransactionResult_Transaction() {} +func (*TransactionResult_UpdateMarginMode) isTransactionResult_Transaction() {} + +func (*TransactionResult_JoinTeam) isTransactionResult_Transaction() {} + +func (*TransactionResult_BatchProposal) isTransactionResult_Transaction() {} + +func (*TransactionResult_UpdatePartyProfile) isTransactionResult_Transaction() {} + type isTransactionResult_Extra interface { isTransactionResult_Extra() } @@ -4109,7 +4292,7 @@ type TxErrorEvent struct { func (x *TxErrorEvent) Reset() { *x = TxErrorEvent{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[37] + mi := &file_vega_events_v1_events_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4122,7 +4305,7 @@ func (x *TxErrorEvent) String() string { func (*TxErrorEvent) ProtoMessage() {} func (x *TxErrorEvent) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[37] + mi := &file_vega_events_v1_events_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4135,7 +4318,7 @@ func (x *TxErrorEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use TxErrorEvent.ProtoReflect.Descriptor instead. func (*TxErrorEvent) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{37} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{38} } func (x *TxErrorEvent) GetPartyId() string { @@ -4410,7 +4593,7 @@ type TimeUpdate struct { func (x *TimeUpdate) Reset() { *x = TimeUpdate{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[38] + mi := &file_vega_events_v1_events_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4423,7 +4606,7 @@ func (x *TimeUpdate) String() string { func (*TimeUpdate) ProtoMessage() {} func (x *TimeUpdate) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[38] + mi := &file_vega_events_v1_events_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4436,7 +4619,7 @@ func (x *TimeUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use TimeUpdate.ProtoReflect.Descriptor instead. func (*TimeUpdate) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{38} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{39} } func (x *TimeUpdate) GetTimestamp() int64 { @@ -4467,7 +4650,7 @@ type EpochEvent struct { func (x *EpochEvent) Reset() { *x = EpochEvent{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[39] + mi := &file_vega_events_v1_events_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4480,7 +4663,7 @@ func (x *EpochEvent) String() string { func (*EpochEvent) ProtoMessage() {} func (x *EpochEvent) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[39] + mi := &file_vega_events_v1_events_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4493,7 +4676,7 @@ func (x *EpochEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use EpochEvent.ProtoReflect.Descriptor instead. func (*EpochEvent) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{39} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{40} } func (x *EpochEvent) GetSeq() uint64 { @@ -4544,7 +4727,7 @@ type LedgerMovements struct { func (x *LedgerMovements) Reset() { *x = LedgerMovements{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[40] + mi := &file_vega_events_v1_events_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4557,7 +4740,7 @@ func (x *LedgerMovements) String() string { func (*LedgerMovements) ProtoMessage() {} func (x *LedgerMovements) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[40] + mi := &file_vega_events_v1_events_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4570,7 +4753,7 @@ func (x *LedgerMovements) ProtoReflect() protoreflect.Message { // Deprecated: Use LedgerMovements.ProtoReflect.Descriptor instead. func (*LedgerMovements) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{40} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{41} } func (x *LedgerMovements) GetLedgerMovements() []*vega.LedgerMovement { @@ -4599,7 +4782,7 @@ type PositionResolution struct { func (x *PositionResolution) Reset() { *x = PositionResolution{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[41] + mi := &file_vega_events_v1_events_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4612,7 +4795,7 @@ func (x *PositionResolution) String() string { func (*PositionResolution) ProtoMessage() {} func (x *PositionResolution) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[41] + mi := &file_vega_events_v1_events_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4625,7 +4808,7 @@ func (x *PositionResolution) ProtoReflect() protoreflect.Message { // Deprecated: Use PositionResolution.ProtoReflect.Descriptor instead. func (*PositionResolution) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{41} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{42} } func (x *PositionResolution) GetMarketId() string { @@ -4673,7 +4856,7 @@ type LossSocialization struct { func (x *LossSocialization) Reset() { *x = LossSocialization{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[42] + mi := &file_vega_events_v1_events_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4686,7 +4869,7 @@ func (x *LossSocialization) String() string { func (*LossSocialization) ProtoMessage() {} func (x *LossSocialization) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[42] + mi := &file_vega_events_v1_events_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4699,7 +4882,7 @@ func (x *LossSocialization) ProtoReflect() protoreflect.Message { // Deprecated: Use LossSocialization.ProtoReflect.Descriptor instead. func (*LossSocialization) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{42} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{43} } func (x *LossSocialization) GetMarketId() string { @@ -4740,7 +4923,7 @@ type TradeSettlement struct { func (x *TradeSettlement) Reset() { *x = TradeSettlement{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[43] + mi := &file_vega_events_v1_events_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4753,7 +4936,7 @@ func (x *TradeSettlement) String() string { func (*TradeSettlement) ProtoMessage() {} func (x *TradeSettlement) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[43] + mi := &file_vega_events_v1_events_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4766,7 +4949,7 @@ func (x *TradeSettlement) ProtoReflect() protoreflect.Message { // Deprecated: Use TradeSettlement.ProtoReflect.Descriptor instead. func (*TradeSettlement) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{43} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{44} } func (x *TradeSettlement) GetSize() int64 { @@ -4811,7 +4994,7 @@ type SettlePosition struct { func (x *SettlePosition) Reset() { *x = SettlePosition{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[44] + mi := &file_vega_events_v1_events_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4824,7 +5007,7 @@ func (x *SettlePosition) String() string { func (*SettlePosition) ProtoMessage() {} func (x *SettlePosition) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[44] + mi := &file_vega_events_v1_events_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4837,7 +5020,7 @@ func (x *SettlePosition) ProtoReflect() protoreflect.Message { // Deprecated: Use SettlePosition.ProtoReflect.Descriptor instead. func (*SettlePosition) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{44} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{45} } func (x *SettlePosition) GetMarketId() string { @@ -4893,7 +5076,7 @@ type SettleMarket struct { func (x *SettleMarket) Reset() { *x = SettleMarket{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[45] + mi := &file_vega_events_v1_events_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4906,7 +5089,7 @@ func (x *SettleMarket) String() string { func (*SettleMarket) ProtoMessage() {} func (x *SettleMarket) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[45] + mi := &file_vega_events_v1_events_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4919,7 +5102,7 @@ func (x *SettleMarket) ProtoReflect() protoreflect.Message { // Deprecated: Use SettleMarket.ProtoReflect.Descriptor instead. func (*SettleMarket) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{45} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{46} } func (x *SettleMarket) GetMarketId() string { @@ -4966,7 +5149,7 @@ type PositionStateEvent struct { func (x *PositionStateEvent) Reset() { *x = PositionStateEvent{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[46] + mi := &file_vega_events_v1_events_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4979,7 +5162,7 @@ func (x *PositionStateEvent) String() string { func (*PositionStateEvent) ProtoMessage() {} func (x *PositionStateEvent) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[46] + mi := &file_vega_events_v1_events_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4992,7 +5175,7 @@ func (x *PositionStateEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use PositionStateEvent.ProtoReflect.Descriptor instead. func (*PositionStateEvent) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{46} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{47} } func (x *PositionStateEvent) GetPartyId() string { @@ -5065,7 +5248,7 @@ type SettleDistressed struct { func (x *SettleDistressed) Reset() { *x = SettleDistressed{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[47] + mi := &file_vega_events_v1_events_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5078,7 +5261,7 @@ func (x *SettleDistressed) String() string { func (*SettleDistressed) ProtoMessage() {} func (x *SettleDistressed) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[47] + mi := &file_vega_events_v1_events_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5091,7 +5274,7 @@ func (x *SettleDistressed) ProtoReflect() protoreflect.Message { // Deprecated: Use SettleDistressed.ProtoReflect.Descriptor instead. func (*SettleDistressed) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{47} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{48} } func (x *SettleDistressed) GetMarketId() string { @@ -5138,7 +5321,7 @@ type DistressedOrders struct { func (x *DistressedOrders) Reset() { *x = DistressedOrders{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[48] + mi := &file_vega_events_v1_events_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5151,7 +5334,7 @@ func (x *DistressedOrders) String() string { func (*DistressedOrders) ProtoMessage() {} func (x *DistressedOrders) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[48] + mi := &file_vega_events_v1_events_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5164,7 +5347,7 @@ func (x *DistressedOrders) ProtoReflect() protoreflect.Message { // Deprecated: Use DistressedOrders.ProtoReflect.Descriptor instead. func (*DistressedOrders) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{48} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{49} } func (x *DistressedOrders) GetMarketId() string { @@ -5201,7 +5384,7 @@ type DistressedPositions struct { func (x *DistressedPositions) Reset() { *x = DistressedPositions{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[49] + mi := &file_vega_events_v1_events_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5214,7 +5397,7 @@ func (x *DistressedPositions) String() string { func (*DistressedPositions) ProtoMessage() {} func (x *DistressedPositions) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[49] + mi := &file_vega_events_v1_events_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5227,7 +5410,7 @@ func (x *DistressedPositions) ProtoReflect() protoreflect.Message { // Deprecated: Use DistressedPositions.ProtoReflect.Descriptor instead. func (*DistressedPositions) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{49} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{50} } func (x *DistressedPositions) GetMarketId() string { @@ -5266,7 +5449,7 @@ type MarketTick struct { func (x *MarketTick) Reset() { *x = MarketTick{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[50] + mi := &file_vega_events_v1_events_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5279,7 +5462,7 @@ func (x *MarketTick) String() string { func (*MarketTick) ProtoMessage() {} func (x *MarketTick) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[50] + mi := &file_vega_events_v1_events_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5292,7 +5475,7 @@ func (x *MarketTick) ProtoReflect() protoreflect.Message { // Deprecated: Use MarketTick.ProtoReflect.Descriptor instead. func (*MarketTick) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{50} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{51} } func (x *MarketTick) GetId() string { @@ -5335,7 +5518,7 @@ type AuctionEvent struct { func (x *AuctionEvent) Reset() { *x = AuctionEvent{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[51] + mi := &file_vega_events_v1_events_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5348,7 +5531,7 @@ func (x *AuctionEvent) String() string { func (*AuctionEvent) ProtoMessage() {} func (x *AuctionEvent) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[51] + mi := &file_vega_events_v1_events_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5361,7 +5544,7 @@ func (x *AuctionEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use AuctionEvent.ProtoReflect.Descriptor instead. func (*AuctionEvent) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{51} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{52} } func (x *AuctionEvent) GetMarketId() string { @@ -5450,7 +5633,7 @@ type ValidatorUpdate struct { func (x *ValidatorUpdate) Reset() { *x = ValidatorUpdate{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[52] + mi := &file_vega_events_v1_events_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5463,7 +5646,7 @@ func (x *ValidatorUpdate) String() string { func (*ValidatorUpdate) ProtoMessage() {} func (x *ValidatorUpdate) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[52] + mi := &file_vega_events_v1_events_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5476,7 +5659,7 @@ func (x *ValidatorUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorUpdate.ProtoReflect.Descriptor instead. func (*ValidatorUpdate) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{52} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{53} } func (x *ValidatorUpdate) GetNodeId() string { @@ -5596,7 +5779,7 @@ type ValidatorRankingEvent struct { func (x *ValidatorRankingEvent) Reset() { *x = ValidatorRankingEvent{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[53] + mi := &file_vega_events_v1_events_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5609,7 +5792,7 @@ func (x *ValidatorRankingEvent) String() string { func (*ValidatorRankingEvent) ProtoMessage() {} func (x *ValidatorRankingEvent) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[53] + mi := &file_vega_events_v1_events_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5622,7 +5805,7 @@ func (x *ValidatorRankingEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorRankingEvent.ProtoReflect.Descriptor instead. func (*ValidatorRankingEvent) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{53} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{54} } func (x *ValidatorRankingEvent) GetNodeId() string { @@ -5700,7 +5883,7 @@ type KeyRotation struct { func (x *KeyRotation) Reset() { *x = KeyRotation{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[54] + mi := &file_vega_events_v1_events_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5713,7 +5896,7 @@ func (x *KeyRotation) String() string { func (*KeyRotation) ProtoMessage() {} func (x *KeyRotation) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[54] + mi := &file_vega_events_v1_events_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5726,7 +5909,7 @@ func (x *KeyRotation) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyRotation.ProtoReflect.Descriptor instead. func (*KeyRotation) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{54} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{55} } func (x *KeyRotation) GetNodeId() string { @@ -5776,7 +5959,7 @@ type EthereumKeyRotation struct { func (x *EthereumKeyRotation) Reset() { *x = EthereumKeyRotation{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[55] + mi := &file_vega_events_v1_events_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5789,7 +5972,7 @@ func (x *EthereumKeyRotation) String() string { func (*EthereumKeyRotation) ProtoMessage() {} func (x *EthereumKeyRotation) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[55] + mi := &file_vega_events_v1_events_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5802,7 +5985,7 @@ func (x *EthereumKeyRotation) ProtoReflect() protoreflect.Message { // Deprecated: Use EthereumKeyRotation.ProtoReflect.Descriptor instead. func (*EthereumKeyRotation) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{55} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{56} } func (x *EthereumKeyRotation) GetNodeId() string { @@ -5851,7 +6034,7 @@ type ProtocolUpgradeEvent struct { func (x *ProtocolUpgradeEvent) Reset() { *x = ProtocolUpgradeEvent{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[56] + mi := &file_vega_events_v1_events_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5864,7 +6047,7 @@ func (x *ProtocolUpgradeEvent) String() string { func (*ProtocolUpgradeEvent) ProtoMessage() {} func (x *ProtocolUpgradeEvent) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[56] + mi := &file_vega_events_v1_events_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5877,7 +6060,7 @@ func (x *ProtocolUpgradeEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtocolUpgradeEvent.ProtoReflect.Descriptor instead. func (*ProtocolUpgradeEvent) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{56} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{57} } func (x *ProtocolUpgradeEvent) GetUpgradeBlockHeight() uint64 { @@ -5922,7 +6105,7 @@ type StateVar struct { func (x *StateVar) Reset() { *x = StateVar{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[57] + mi := &file_vega_events_v1_events_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5935,7 +6118,7 @@ func (x *StateVar) String() string { func (*StateVar) ProtoMessage() {} func (x *StateVar) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[57] + mi := &file_vega_events_v1_events_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5948,7 +6131,7 @@ func (x *StateVar) ProtoReflect() protoreflect.Message { // Deprecated: Use StateVar.ProtoReflect.Descriptor instead. func (*StateVar) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{57} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{58} } func (x *StateVar) GetId() string { @@ -5986,7 +6169,7 @@ type BeginBlock struct { func (x *BeginBlock) Reset() { *x = BeginBlock{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[58] + mi := &file_vega_events_v1_events_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5999,7 +6182,7 @@ func (x *BeginBlock) String() string { func (*BeginBlock) ProtoMessage() {} func (x *BeginBlock) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[58] + mi := &file_vega_events_v1_events_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6012,7 +6195,7 @@ func (x *BeginBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use BeginBlock.ProtoReflect.Descriptor instead. func (*BeginBlock) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{58} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{59} } func (x *BeginBlock) GetHeight() uint64 { @@ -6048,7 +6231,7 @@ type EndBlock struct { func (x *EndBlock) Reset() { *x = EndBlock{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[59] + mi := &file_vega_events_v1_events_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6061,7 +6244,7 @@ func (x *EndBlock) String() string { func (*EndBlock) ProtoMessage() {} func (x *EndBlock) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[59] + mi := &file_vega_events_v1_events_proto_msgTypes[60] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6074,7 +6257,7 @@ func (x *EndBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use EndBlock.ProtoReflect.Descriptor instead. func (*EndBlock) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{59} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{60} } func (x *EndBlock) GetHeight() uint64 { @@ -6096,7 +6279,7 @@ type ProtocolUpgradeStarted struct { func (x *ProtocolUpgradeStarted) Reset() { *x = ProtocolUpgradeStarted{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[60] + mi := &file_vega_events_v1_events_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6109,7 +6292,7 @@ func (x *ProtocolUpgradeStarted) String() string { func (*ProtocolUpgradeStarted) ProtoMessage() {} func (x *ProtocolUpgradeStarted) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[60] + mi := &file_vega_events_v1_events_proto_msgTypes[61] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6122,7 +6305,7 @@ func (x *ProtocolUpgradeStarted) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtocolUpgradeStarted.ProtoReflect.Descriptor instead. func (*ProtocolUpgradeStarted) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{60} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{61} } func (x *ProtocolUpgradeStarted) GetLastBlockHeight() uint64 { @@ -6144,7 +6327,7 @@ type ProtocolUpgradeDataNodeReady struct { func (x *ProtocolUpgradeDataNodeReady) Reset() { *x = ProtocolUpgradeDataNodeReady{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[61] + mi := &file_vega_events_v1_events_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6157,7 +6340,7 @@ func (x *ProtocolUpgradeDataNodeReady) String() string { func (*ProtocolUpgradeDataNodeReady) ProtoMessage() {} func (x *ProtocolUpgradeDataNodeReady) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[61] + mi := &file_vega_events_v1_events_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6170,7 +6353,7 @@ func (x *ProtocolUpgradeDataNodeReady) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtocolUpgradeDataNodeReady.ProtoReflect.Descriptor instead. func (*ProtocolUpgradeDataNodeReady) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{61} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{62} } func (x *ProtocolUpgradeDataNodeReady) GetLastBlockHeight() uint64 { @@ -6199,7 +6382,7 @@ type CoreSnapshotData struct { func (x *CoreSnapshotData) Reset() { *x = CoreSnapshotData{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[62] + mi := &file_vega_events_v1_events_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6212,7 +6395,7 @@ func (x *CoreSnapshotData) String() string { func (*CoreSnapshotData) ProtoMessage() {} func (x *CoreSnapshotData) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[62] + mi := &file_vega_events_v1_events_proto_msgTypes[63] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6225,7 +6408,7 @@ func (x *CoreSnapshotData) ProtoReflect() protoreflect.Message { // Deprecated: Use CoreSnapshotData.ProtoReflect.Descriptor instead. func (*CoreSnapshotData) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{62} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{63} } func (x *CoreSnapshotData) GetBlockHeight() uint64 { @@ -6270,7 +6453,7 @@ type ExpiredOrders struct { func (x *ExpiredOrders) Reset() { *x = ExpiredOrders{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[63] + mi := &file_vega_events_v1_events_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6283,7 +6466,7 @@ func (x *ExpiredOrders) String() string { func (*ExpiredOrders) ProtoMessage() {} func (x *ExpiredOrders) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[63] + mi := &file_vega_events_v1_events_proto_msgTypes[64] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6296,7 +6479,7 @@ func (x *ExpiredOrders) ProtoReflect() protoreflect.Message { // Deprecated: Use ExpiredOrders.ProtoReflect.Descriptor instead. func (*ExpiredOrders) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{63} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{64} } func (x *ExpiredOrders) GetMarketId() string { @@ -6334,12 +6517,14 @@ type TeamCreated struct { Closed bool `protobuf:"varint,7,opt,name=closed,proto3" json:"closed,omitempty"` // Epoch at which the team was created. AtEpoch uint64 `protobuf:"varint,8,opt,name=at_epoch,json=atEpoch,proto3" json:"at_epoch,omitempty"` + // List of public keys that are allowed to join the team. + AllowList []string `protobuf:"bytes,9,rep,name=allow_list,json=allowList,proto3" json:"allow_list,omitempty"` } func (x *TeamCreated) Reset() { *x = TeamCreated{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[64] + mi := &file_vega_events_v1_events_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6352,7 +6537,7 @@ func (x *TeamCreated) String() string { func (*TeamCreated) ProtoMessage() {} func (x *TeamCreated) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[64] + mi := &file_vega_events_v1_events_proto_msgTypes[65] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6365,7 +6550,7 @@ func (x *TeamCreated) ProtoReflect() protoreflect.Message { // Deprecated: Use TeamCreated.ProtoReflect.Descriptor instead. func (*TeamCreated) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{64} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{65} } func (x *TeamCreated) GetTeamId() string { @@ -6424,6 +6609,13 @@ func (x *TeamCreated) GetAtEpoch() uint64 { return 0 } +func (x *TeamCreated) GetAllowList() []string { + if x != nil { + return x.AllowList + } + return nil +} + type TeamUpdated struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -6439,12 +6631,14 @@ type TeamUpdated struct { AvatarUrl *string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3,oneof" json:"avatar_url,omitempty"` // Tells if a party can join the team or not. Closed bool `protobuf:"varint,5,opt,name=closed,proto3" json:"closed,omitempty"` + // List of public keys that are allowed to join the team. + AllowList []string `protobuf:"bytes,6,rep,name=allow_list,json=allowList,proto3" json:"allow_list,omitempty"` } func (x *TeamUpdated) Reset() { *x = TeamUpdated{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[65] + mi := &file_vega_events_v1_events_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6457,7 +6651,7 @@ func (x *TeamUpdated) String() string { func (*TeamUpdated) ProtoMessage() {} func (x *TeamUpdated) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[65] + mi := &file_vega_events_v1_events_proto_msgTypes[66] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6470,7 +6664,7 @@ func (x *TeamUpdated) ProtoReflect() protoreflect.Message { // Deprecated: Use TeamUpdated.ProtoReflect.Descriptor instead. func (*TeamUpdated) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{65} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{66} } func (x *TeamUpdated) GetTeamId() string { @@ -6508,6 +6702,13 @@ func (x *TeamUpdated) GetClosed() bool { return false } +func (x *TeamUpdated) GetAllowList() []string { + if x != nil { + return x.AllowList + } + return nil +} + type RefereeSwitchedTeam struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -6529,7 +6730,7 @@ type RefereeSwitchedTeam struct { func (x *RefereeSwitchedTeam) Reset() { *x = RefereeSwitchedTeam{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[66] + mi := &file_vega_events_v1_events_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6542,7 +6743,7 @@ func (x *RefereeSwitchedTeam) String() string { func (*RefereeSwitchedTeam) ProtoMessage() {} func (x *RefereeSwitchedTeam) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[66] + mi := &file_vega_events_v1_events_proto_msgTypes[67] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6555,7 +6756,7 @@ func (x *RefereeSwitchedTeam) ProtoReflect() protoreflect.Message { // Deprecated: Use RefereeSwitchedTeam.ProtoReflect.Descriptor instead. func (*RefereeSwitchedTeam) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{66} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{67} } func (x *RefereeSwitchedTeam) GetFromTeamId() string { @@ -6611,7 +6812,7 @@ type RefereeJoinedTeam struct { func (x *RefereeJoinedTeam) Reset() { *x = RefereeJoinedTeam{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[67] + mi := &file_vega_events_v1_events_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6624,7 +6825,7 @@ func (x *RefereeJoinedTeam) String() string { func (*RefereeJoinedTeam) ProtoMessage() {} func (x *RefereeJoinedTeam) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[67] + mi := &file_vega_events_v1_events_proto_msgTypes[68] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6637,7 +6838,7 @@ func (x *RefereeJoinedTeam) ProtoReflect() protoreflect.Message { // Deprecated: Use RefereeJoinedTeam.ProtoReflect.Descriptor instead. func (*RefereeJoinedTeam) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{67} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{68} } func (x *RefereeJoinedTeam) GetTeamId() string { @@ -6686,7 +6887,7 @@ type ReferralSetCreated struct { func (x *ReferralSetCreated) Reset() { *x = ReferralSetCreated{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[68] + mi := &file_vega_events_v1_events_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6699,7 +6900,7 @@ func (x *ReferralSetCreated) String() string { func (*ReferralSetCreated) ProtoMessage() {} func (x *ReferralSetCreated) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[68] + mi := &file_vega_events_v1_events_proto_msgTypes[69] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6712,7 +6913,7 @@ func (x *ReferralSetCreated) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralSetCreated.ProtoReflect.Descriptor instead. func (*ReferralSetCreated) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{68} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{69} } func (x *ReferralSetCreated) GetSetId() string { @@ -6772,7 +6973,7 @@ type ReferralSetStatsUpdated struct { func (x *ReferralSetStatsUpdated) Reset() { *x = ReferralSetStatsUpdated{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[69] + mi := &file_vega_events_v1_events_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6785,7 +6986,7 @@ func (x *ReferralSetStatsUpdated) String() string { func (*ReferralSetStatsUpdated) ProtoMessage() {} func (x *ReferralSetStatsUpdated) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[69] + mi := &file_vega_events_v1_events_proto_msgTypes[70] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6798,7 +6999,7 @@ func (x *ReferralSetStatsUpdated) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralSetStatsUpdated.ProtoReflect.Descriptor instead. func (*ReferralSetStatsUpdated) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{69} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{70} } func (x *ReferralSetStatsUpdated) GetSetId() string { @@ -6880,7 +7081,7 @@ type RefereeStats struct { func (x *RefereeStats) Reset() { *x = RefereeStats{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[70] + mi := &file_vega_events_v1_events_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6893,7 +7094,7 @@ func (x *RefereeStats) String() string { func (*RefereeStats) ProtoMessage() {} func (x *RefereeStats) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[70] + mi := &file_vega_events_v1_events_proto_msgTypes[71] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6906,7 +7107,7 @@ func (x *RefereeStats) ProtoReflect() protoreflect.Message { // Deprecated: Use RefereeStats.ProtoReflect.Descriptor instead. func (*RefereeStats) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{70} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{71} } func (x *RefereeStats) GetPartyId() string { @@ -6948,7 +7149,7 @@ type RefereeJoinedReferralSet struct { func (x *RefereeJoinedReferralSet) Reset() { *x = RefereeJoinedReferralSet{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[71] + mi := &file_vega_events_v1_events_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6961,7 +7162,7 @@ func (x *RefereeJoinedReferralSet) String() string { func (*RefereeJoinedReferralSet) ProtoMessage() {} func (x *RefereeJoinedReferralSet) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[71] + mi := &file_vega_events_v1_events_proto_msgTypes[72] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6974,7 +7175,7 @@ func (x *RefereeJoinedReferralSet) ProtoReflect() protoreflect.Message { // Deprecated: Use RefereeJoinedReferralSet.ProtoReflect.Descriptor instead. func (*RefereeJoinedReferralSet) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{71} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{72} } func (x *RefereeJoinedReferralSet) GetSetId() string { @@ -7021,7 +7222,7 @@ type ReferralProgramStarted struct { func (x *ReferralProgramStarted) Reset() { *x = ReferralProgramStarted{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[72] + mi := &file_vega_events_v1_events_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7034,7 +7235,7 @@ func (x *ReferralProgramStarted) String() string { func (*ReferralProgramStarted) ProtoMessage() {} func (x *ReferralProgramStarted) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[72] + mi := &file_vega_events_v1_events_proto_msgTypes[73] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7047,7 +7248,7 @@ func (x *ReferralProgramStarted) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralProgramStarted.ProtoReflect.Descriptor instead. func (*ReferralProgramStarted) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{72} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{73} } func (x *ReferralProgramStarted) GetProgram() *vega.ReferralProgram { @@ -7087,7 +7288,7 @@ type ReferralProgramUpdated struct { func (x *ReferralProgramUpdated) Reset() { *x = ReferralProgramUpdated{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[73] + mi := &file_vega_events_v1_events_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7100,7 +7301,7 @@ func (x *ReferralProgramUpdated) String() string { func (*ReferralProgramUpdated) ProtoMessage() {} func (x *ReferralProgramUpdated) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[73] + mi := &file_vega_events_v1_events_proto_msgTypes[74] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7113,7 +7314,7 @@ func (x *ReferralProgramUpdated) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralProgramUpdated.ProtoReflect.Descriptor instead. func (*ReferralProgramUpdated) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{73} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{74} } func (x *ReferralProgramUpdated) GetProgram() *vega.ReferralProgram { @@ -7155,7 +7356,7 @@ type ReferralProgramEnded struct { func (x *ReferralProgramEnded) Reset() { *x = ReferralProgramEnded{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[74] + mi := &file_vega_events_v1_events_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7168,7 +7369,7 @@ func (x *ReferralProgramEnded) String() string { func (*ReferralProgramEnded) ProtoMessage() {} func (x *ReferralProgramEnded) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[74] + mi := &file_vega_events_v1_events_proto_msgTypes[75] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7181,7 +7382,7 @@ func (x *ReferralProgramEnded) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralProgramEnded.ProtoReflect.Descriptor instead. func (*ReferralProgramEnded) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{74} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{75} } func (x *ReferralProgramEnded) GetVersion() uint64 { @@ -7228,7 +7429,7 @@ type VolumeDiscountProgramStarted struct { func (x *VolumeDiscountProgramStarted) Reset() { *x = VolumeDiscountProgramStarted{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[75] + mi := &file_vega_events_v1_events_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7241,7 +7442,7 @@ func (x *VolumeDiscountProgramStarted) String() string { func (*VolumeDiscountProgramStarted) ProtoMessage() {} func (x *VolumeDiscountProgramStarted) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[75] + mi := &file_vega_events_v1_events_proto_msgTypes[76] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7254,7 +7455,7 @@ func (x *VolumeDiscountProgramStarted) ProtoReflect() protoreflect.Message { // Deprecated: Use VolumeDiscountProgramStarted.ProtoReflect.Descriptor instead. func (*VolumeDiscountProgramStarted) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{75} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{76} } func (x *VolumeDiscountProgramStarted) GetProgram() *vega.VolumeDiscountProgram { @@ -7294,7 +7495,7 @@ type VolumeDiscountProgramUpdated struct { func (x *VolumeDiscountProgramUpdated) Reset() { *x = VolumeDiscountProgramUpdated{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[76] + mi := &file_vega_events_v1_events_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7307,7 +7508,7 @@ func (x *VolumeDiscountProgramUpdated) String() string { func (*VolumeDiscountProgramUpdated) ProtoMessage() {} func (x *VolumeDiscountProgramUpdated) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[76] + mi := &file_vega_events_v1_events_proto_msgTypes[77] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7320,7 +7521,7 @@ func (x *VolumeDiscountProgramUpdated) ProtoReflect() protoreflect.Message { // Deprecated: Use VolumeDiscountProgramUpdated.ProtoReflect.Descriptor instead. func (*VolumeDiscountProgramUpdated) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{76} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{77} } func (x *VolumeDiscountProgramUpdated) GetProgram() *vega.VolumeDiscountProgram { @@ -7362,7 +7563,7 @@ type VolumeDiscountProgramEnded struct { func (x *VolumeDiscountProgramEnded) Reset() { *x = VolumeDiscountProgramEnded{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[77] + mi := &file_vega_events_v1_events_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7375,7 +7576,7 @@ func (x *VolumeDiscountProgramEnded) String() string { func (*VolumeDiscountProgramEnded) ProtoMessage() {} func (x *VolumeDiscountProgramEnded) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[77] + mi := &file_vega_events_v1_events_proto_msgTypes[78] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7388,7 +7589,7 @@ func (x *VolumeDiscountProgramEnded) ProtoReflect() protoreflect.Message { // Deprecated: Use VolumeDiscountProgramEnded.ProtoReflect.Descriptor instead. func (*VolumeDiscountProgramEnded) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{77} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{78} } func (x *VolumeDiscountProgramEnded) GetVersion() uint64 { @@ -7430,7 +7631,7 @@ type PaidLiquidityFeesStats struct { Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` // Epoch for which these stats where valid. EpochSeq uint64 `protobuf:"varint,3,opt,name=epoch_seq,json=epochSeq,proto3" json:"epoch_seq,omitempty"` - // Total fees paid accross all parties. + // Total fees paid across all parties. TotalFeesPaid string `protobuf:"bytes,4,opt,name=total_fees_paid,json=totalFeesPaid,proto3" json:"total_fees_paid,omitempty"` // Fees paid per party. FeesPaidPerParty []*PartyAmount `protobuf:"bytes,5,rep,name=fees_paid_per_party,json=feesPaidPerParty,proto3" json:"fees_paid_per_party,omitempty"` @@ -7439,7 +7640,7 @@ type PaidLiquidityFeesStats struct { func (x *PaidLiquidityFeesStats) Reset() { *x = PaidLiquidityFeesStats{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[78] + mi := &file_vega_events_v1_events_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7452,7 +7653,7 @@ func (x *PaidLiquidityFeesStats) String() string { func (*PaidLiquidityFeesStats) ProtoMessage() {} func (x *PaidLiquidityFeesStats) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[78] + mi := &file_vega_events_v1_events_proto_msgTypes[79] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7465,7 +7666,7 @@ func (x *PaidLiquidityFeesStats) ProtoReflect() protoreflect.Message { // Deprecated: Use PaidLiquidityFeesStats.ProtoReflect.Descriptor instead. func (*PaidLiquidityFeesStats) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{78} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{79} } func (x *PaidLiquidityFeesStats) GetMarket() string { @@ -7503,126 +7704,44 @@ func (x *PaidLiquidityFeesStats) GetFeesPaidPerParty() []*PartyAmount { return nil } -// Bus event is a container for event bus events emitted by Vega -type BusEvent struct { +type PartyMarginModeUpdated struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Unique event ID for the message - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The batch or block of transactions that the events relate to - Block string `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` - // The type of bus event. Must be one of the list below: - Type BusEventType `protobuf:"varint,3,opt,name=type,proto3,enum=vega.events.v1.BusEventType" json:"type,omitempty"` - // Types that are assignable to Event: - // - // *BusEvent_TimeUpdate - // *BusEvent_LedgerMovements - // *BusEvent_PositionResolution - // *BusEvent_Order - // *BusEvent_Account - // *BusEvent_Party - // *BusEvent_Trade - // *BusEvent_MarginLevels - // *BusEvent_Proposal - // *BusEvent_Vote - // *BusEvent_MarketData - // *BusEvent_NodeSignature - // *BusEvent_LossSocialization - // *BusEvent_SettlePosition - // *BusEvent_SettleDistressed - // *BusEvent_MarketCreated - // *BusEvent_Asset - // *BusEvent_MarketTick - // *BusEvent_Withdrawal - // *BusEvent_Deposit - // *BusEvent_Auction - // *BusEvent_RiskFactor - // *BusEvent_NetworkParameter - // *BusEvent_LiquidityProvision - // *BusEvent_MarketUpdated - // *BusEvent_OracleSpec - // *BusEvent_OracleData - // *BusEvent_DelegationBalance - // *BusEvent_ValidatorScore - // *BusEvent_EpochEvent - // *BusEvent_ValidatorUpdate - // *BusEvent_StakeLinking - // *BusEvent_RewardPayout - // *BusEvent_Checkpoint - // *BusEvent_KeyRotation - // *BusEvent_StateVar - // *BusEvent_NetworkLimits - // *BusEvent_Transfer - // *BusEvent_RankingEvent - // *BusEvent_Erc20MultisigSignerEvent - // *BusEvent_Erc20MultisigSetThresholdEvent - // *BusEvent_Erc20MultisigSignerAdded - // *BusEvent_Erc20MultisigSignerRemoved - // *BusEvent_PositionStateEvent - // *BusEvent_EthereumKeyRotation - // *BusEvent_ProtocolUpgradeEvent - // *BusEvent_BeginBlock - // *BusEvent_EndBlock - // *BusEvent_ProtocolUpgradeStarted - // *BusEvent_SettleMarket - // *BusEvent_TransactionResult - // *BusEvent_CoreSnapshotEvent - // *BusEvent_ProtocolUpgradeDataNodeReady - // *BusEvent_DistressedOrders - // *BusEvent_ExpiredOrders - // *BusEvent_DistressedPositions - // *BusEvent_StopOrder - // *BusEvent_FundingPeriod - // *BusEvent_FundingPeriodDataPoint - // *BusEvent_TeamCreated - // *BusEvent_TeamUpdated - // *BusEvent_RefereeSwitchedTeam - // *BusEvent_RefereeJoinedTeam - // *BusEvent_ReferralProgramStarted - // *BusEvent_ReferralProgramUpdated - // *BusEvent_ReferralProgramEnded - // *BusEvent_ReferralSetCreated - // *BusEvent_RefereeJoinedReferralSet - // *BusEvent_PartyActivityStreak - // *BusEvent_VolumeDiscountProgramStarted - // *BusEvent_VolumeDiscountProgramUpdated - // *BusEvent_VolumeDiscountProgramEnded - // *BusEvent_ReferralSetStatsUpdated - // *BusEvent_VestingStatsUpdated - // *BusEvent_VolumeDiscountStatsUpdated - // *BusEvent_FeesStats - // *BusEvent_FundingPayments - // *BusEvent_PaidLiquidityFeesStats - // *BusEvent_VestingBalancesSummary - // *BusEvent_TransferFees - // *BusEvent_Market - // *BusEvent_TxErrEvent - Event isBusEvent_Event `protobuf_oneof:"event"` - // Version of bus event - Version uint32 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` - ChainId string `protobuf:"bytes,5,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - TxHash string `protobuf:"bytes,6,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` -} - -func (x *BusEvent) Reset() { - *x = BusEvent{} + // Unique ID of the market in which the update happened. + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Unique ID of the party that updated their margin mode. + PartyId string `protobuf:"bytes,2,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + // Updated margin mode. + MarginMode vega.MarginMode `protobuf:"varint,3,opt,name=margin_mode,json=marginMode,proto3,enum=vega.MarginMode" json:"margin_mode,omitempty"` + // Margin factor for the market. Isolated mode only. + MarginFactor *string `protobuf:"bytes,4,opt,name=margin_factor,json=marginFactor,proto3,oneof" json:"margin_factor,omitempty"` + // Minimum theoretical margin factor for the market. Isolated mode only. + MinTheoreticalMarginFactor *string `protobuf:"bytes,5,opt,name=min_theoretical_margin_factor,json=minTheoreticalMarginFactor,proto3,oneof" json:"min_theoretical_margin_factor,omitempty"` + // Maximum theoretical leverage for the market. Isolated mode only. + MaxTheoreticalLeverage *string `protobuf:"bytes,6,opt,name=max_theoretical_leverage,json=maxTheoreticalLeverage,proto3,oneof" json:"max_theoretical_leverage,omitempty"` + // Epoch at which the update happened. + AtEpoch uint64 `protobuf:"varint,7,opt,name=at_epoch,json=atEpoch,proto3" json:"at_epoch,omitempty"` +} + +func (x *PartyMarginModeUpdated) Reset() { + *x = PartyMarginModeUpdated{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[79] + mi := &file_vega_events_v1_events_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BusEvent) String() string { +func (x *PartyMarginModeUpdated) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BusEvent) ProtoMessage() {} +func (*PartyMarginModeUpdated) ProtoMessage() {} -func (x *BusEvent) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[79] +func (x *PartyMarginModeUpdated) ProtoReflect() protoreflect.Message { + mi := &file_vega_events_v1_events_proto_msgTypes[80] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7633,47 +7752,455 @@ func (x *BusEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BusEvent.ProtoReflect.Descriptor instead. -func (*BusEvent) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{79} +// Deprecated: Use PartyMarginModeUpdated.ProtoReflect.Descriptor instead. +func (*PartyMarginModeUpdated) Descriptor() ([]byte, []int) { + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{80} } -func (x *BusEvent) GetId() string { +func (x *PartyMarginModeUpdated) GetMarketId() string { if x != nil { - return x.Id + return x.MarketId } return "" } -func (x *BusEvent) GetBlock() string { +func (x *PartyMarginModeUpdated) GetPartyId() string { if x != nil { - return x.Block + return x.PartyId } return "" } -func (x *BusEvent) GetType() BusEventType { +func (x *PartyMarginModeUpdated) GetMarginMode() vega.MarginMode { if x != nil { - return x.Type + return x.MarginMode } - return BusEventType_BUS_EVENT_TYPE_UNSPECIFIED + return vega.MarginMode(0) } -func (m *BusEvent) GetEvent() isBusEvent_Event { - if m != nil { - return m.Event +func (x *PartyMarginModeUpdated) GetMarginFactor() string { + if x != nil && x.MarginFactor != nil { + return *x.MarginFactor } - return nil + return "" } -func (x *BusEvent) GetTimeUpdate() *TimeUpdate { - if x, ok := x.GetEvent().(*BusEvent_TimeUpdate); ok { - return x.TimeUpdate +func (x *PartyMarginModeUpdated) GetMinTheoreticalMarginFactor() string { + if x != nil && x.MinTheoreticalMarginFactor != nil { + return *x.MinTheoreticalMarginFactor } - return nil + return "" } -func (x *BusEvent) GetLedgerMovements() *LedgerMovements { +func (x *PartyMarginModeUpdated) GetMaxTheoreticalLeverage() string { + if x != nil && x.MaxTheoreticalLeverage != nil { + return *x.MaxTheoreticalLeverage + } + return "" +} + +func (x *PartyMarginModeUpdated) GetAtEpoch() uint64 { + if x != nil { + return x.AtEpoch + } + return 0 +} + +type PartyProfileUpdated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Party's profile updated. + UpdatedProfile *vega.PartyProfile `protobuf:"bytes,1,opt,name=updated_profile,json=updatedProfile,proto3" json:"updated_profile,omitempty"` +} + +func (x *PartyProfileUpdated) Reset() { + *x = PartyProfileUpdated{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_events_v1_events_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PartyProfileUpdated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PartyProfileUpdated) ProtoMessage() {} + +func (x *PartyProfileUpdated) ProtoReflect() protoreflect.Message { + mi := &file_vega_events_v1_events_proto_msgTypes[81] + 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 PartyProfileUpdated.ProtoReflect.Descriptor instead. +func (*PartyProfileUpdated) Descriptor() ([]byte, []int) { + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{81} +} + +func (x *PartyProfileUpdated) GetUpdatedProfile() *vega.PartyProfile { + if x != nil { + return x.UpdatedProfile + } + return nil +} + +// Stats for all teams. +type TeamsStatsUpdated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Epoch at which the statistics are updated. + AtEpoch uint64 `protobuf:"varint,1,opt,name=at_epoch,json=atEpoch,proto3" json:"at_epoch,omitempty"` + // All teams' stats. + Stats []*TeamStats `protobuf:"bytes,2,rep,name=stats,proto3" json:"stats,omitempty"` +} + +func (x *TeamsStatsUpdated) Reset() { + *x = TeamsStatsUpdated{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_events_v1_events_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TeamsStatsUpdated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TeamsStatsUpdated) ProtoMessage() {} + +func (x *TeamsStatsUpdated) ProtoReflect() protoreflect.Message { + mi := &file_vega_events_v1_events_proto_msgTypes[82] + 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 TeamsStatsUpdated.ProtoReflect.Descriptor instead. +func (*TeamsStatsUpdated) Descriptor() ([]byte, []int) { + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{82} +} + +func (x *TeamsStatsUpdated) GetAtEpoch() uint64 { + if x != nil { + return x.AtEpoch + } + return 0 +} + +func (x *TeamsStatsUpdated) GetStats() []*TeamStats { + if x != nil { + return x.Stats + } + return nil +} + +type TeamStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the team. + TeamId string `protobuf:"bytes,1,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` + // Statistics for each team member. + MembersStats []*TeamMemberStats `protobuf:"bytes,2,rep,name=members_stats,json=membersStats,proto3" json:"members_stats,omitempty"` +} + +func (x *TeamStats) Reset() { + *x = TeamStats{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_events_v1_events_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TeamStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TeamStats) ProtoMessage() {} + +func (x *TeamStats) ProtoReflect() protoreflect.Message { + mi := &file_vega_events_v1_events_proto_msgTypes[83] + 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 TeamStats.ProtoReflect.Descriptor instead. +func (*TeamStats) Descriptor() ([]byte, []int) { + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{83} +} + +func (x *TeamStats) GetTeamId() string { + if x != nil { + return x.TeamId + } + return "" +} + +func (x *TeamStats) GetMembersStats() []*TeamMemberStats { + if x != nil { + return x.MembersStats + } + return nil +} + +type TeamMemberStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The party ID of the team member. + PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + // Team members' notional volume for the epoch. + NotionalVolume string `protobuf:"bytes,2,opt,name=notional_volume,json=notionalVolume,proto3" json:"notional_volume,omitempty"` +} + +func (x *TeamMemberStats) Reset() { + *x = TeamMemberStats{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_events_v1_events_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TeamMemberStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TeamMemberStats) ProtoMessage() {} + +func (x *TeamMemberStats) ProtoReflect() protoreflect.Message { + mi := &file_vega_events_v1_events_proto_msgTypes[84] + 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 TeamMemberStats.ProtoReflect.Descriptor instead. +func (*TeamMemberStats) Descriptor() ([]byte, []int) { + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{84} +} + +func (x *TeamMemberStats) GetPartyId() string { + if x != nil { + return x.PartyId + } + return "" +} + +func (x *TeamMemberStats) GetNotionalVolume() string { + if x != nil { + return x.NotionalVolume + } + return "" +} + +// Bus event is a container for event bus events emitted by Vega +type BusEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique event ID for the message + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The batch or block of transactions that the events relate to + Block string `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` + // The type of bus event. Must be one of the list below: + Type BusEventType `protobuf:"varint,3,opt,name=type,proto3,enum=vega.events.v1.BusEventType" json:"type,omitempty"` + // Types that are assignable to Event: + // + // *BusEvent_TimeUpdate + // *BusEvent_LedgerMovements + // *BusEvent_PositionResolution + // *BusEvent_Order + // *BusEvent_Account + // *BusEvent_Party + // *BusEvent_Trade + // *BusEvent_MarginLevels + // *BusEvent_Proposal + // *BusEvent_Vote + // *BusEvent_MarketData + // *BusEvent_NodeSignature + // *BusEvent_LossSocialization + // *BusEvent_SettlePosition + // *BusEvent_SettleDistressed + // *BusEvent_MarketCreated + // *BusEvent_Asset + // *BusEvent_MarketTick + // *BusEvent_Withdrawal + // *BusEvent_Deposit + // *BusEvent_Auction + // *BusEvent_RiskFactor + // *BusEvent_NetworkParameter + // *BusEvent_LiquidityProvision + // *BusEvent_MarketUpdated + // *BusEvent_OracleSpec + // *BusEvent_OracleData + // *BusEvent_DelegationBalance + // *BusEvent_ValidatorScore + // *BusEvent_EpochEvent + // *BusEvent_ValidatorUpdate + // *BusEvent_StakeLinking + // *BusEvent_RewardPayout + // *BusEvent_Checkpoint + // *BusEvent_KeyRotation + // *BusEvent_StateVar + // *BusEvent_NetworkLimits + // *BusEvent_Transfer + // *BusEvent_RankingEvent + // *BusEvent_Erc20MultisigSignerEvent + // *BusEvent_Erc20MultisigSetThresholdEvent + // *BusEvent_Erc20MultisigSignerAdded + // *BusEvent_Erc20MultisigSignerRemoved + // *BusEvent_PositionStateEvent + // *BusEvent_EthereumKeyRotation + // *BusEvent_ProtocolUpgradeEvent + // *BusEvent_BeginBlock + // *BusEvent_EndBlock + // *BusEvent_ProtocolUpgradeStarted + // *BusEvent_SettleMarket + // *BusEvent_TransactionResult + // *BusEvent_CoreSnapshotEvent + // *BusEvent_ProtocolUpgradeDataNodeReady + // *BusEvent_DistressedOrders + // *BusEvent_ExpiredOrders + // *BusEvent_DistressedPositions + // *BusEvent_StopOrder + // *BusEvent_FundingPeriod + // *BusEvent_FundingPeriodDataPoint + // *BusEvent_TeamCreated + // *BusEvent_TeamUpdated + // *BusEvent_RefereeSwitchedTeam + // *BusEvent_RefereeJoinedTeam + // *BusEvent_ReferralProgramStarted + // *BusEvent_ReferralProgramUpdated + // *BusEvent_ReferralProgramEnded + // *BusEvent_ReferralSetCreated + // *BusEvent_RefereeJoinedReferralSet + // *BusEvent_PartyActivityStreak + // *BusEvent_VolumeDiscountProgramStarted + // *BusEvent_VolumeDiscountProgramUpdated + // *BusEvent_VolumeDiscountProgramEnded + // *BusEvent_ReferralSetStatsUpdated + // *BusEvent_VestingStatsUpdated + // *BusEvent_VolumeDiscountStatsUpdated + // *BusEvent_FeesStats + // *BusEvent_FundingPayments + // *BusEvent_PaidLiquidityFeesStats + // *BusEvent_VestingBalancesSummary + // *BusEvent_TransferFees + // *BusEvent_TransferFeesDiscount + // *BusEvent_PartyMarginModeUpdated + // *BusEvent_PartyProfileUpdated + // *BusEvent_TeamsStatsUpdated + // *BusEvent_Market + // *BusEvent_TxErrEvent + Event isBusEvent_Event `protobuf_oneof:"event"` + // Version of bus event + Version uint32 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` + ChainId string `protobuf:"bytes,5,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + TxHash string `protobuf:"bytes,6,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` +} + +func (x *BusEvent) Reset() { + *x = BusEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_events_v1_events_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BusEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BusEvent) ProtoMessage() {} + +func (x *BusEvent) ProtoReflect() protoreflect.Message { + mi := &file_vega_events_v1_events_proto_msgTypes[85] + 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 BusEvent.ProtoReflect.Descriptor instead. +func (*BusEvent) Descriptor() ([]byte, []int) { + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{85} +} + +func (x *BusEvent) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *BusEvent) GetBlock() string { + if x != nil { + return x.Block + } + return "" +} + +func (x *BusEvent) GetType() BusEventType { + if x != nil { + return x.Type + } + return BusEventType_BUS_EVENT_TYPE_UNSPECIFIED +} + +func (m *BusEvent) GetEvent() isBusEvent_Event { + if m != nil { + return m.Event + } + return nil +} + +func (x *BusEvent) GetTimeUpdate() *TimeUpdate { + if x, ok := x.GetEvent().(*BusEvent_TimeUpdate); ok { + return x.TimeUpdate + } + return nil +} + +func (x *BusEvent) GetLedgerMovements() *LedgerMovements { if x, ok := x.GetEvent().(*BusEvent_LedgerMovements); ok { return x.LedgerMovements } @@ -8226,6 +8753,34 @@ func (x *BusEvent) GetTransferFees() *TransferFees { return nil } +func (x *BusEvent) GetTransferFeesDiscount() *TransferFeesDiscount { + if x, ok := x.GetEvent().(*BusEvent_TransferFeesDiscount); ok { + return x.TransferFeesDiscount + } + return nil +} + +func (x *BusEvent) GetPartyMarginModeUpdated() *PartyMarginModeUpdated { + if x, ok := x.GetEvent().(*BusEvent_PartyMarginModeUpdated); ok { + return x.PartyMarginModeUpdated + } + return nil +} + +func (x *BusEvent) GetPartyProfileUpdated() *PartyProfileUpdated { + if x, ok := x.GetEvent().(*BusEvent_PartyProfileUpdated); ok { + return x.PartyProfileUpdated + } + return nil +} + +func (x *BusEvent) GetTeamsStatsUpdated() *TeamsStatsUpdated { + if x, ok := x.GetEvent().(*BusEvent_TeamsStatsUpdated); ok { + return x.TeamsStatsUpdated + } + return nil +} + func (x *BusEvent) GetMarket() *MarketEvent { if x, ok := x.GetEvent().(*BusEvent_Market); ok { return x.Market @@ -8665,6 +9220,26 @@ type BusEvent_TransferFees struct { TransferFees *TransferFees `protobuf:"bytes,181,opt,name=transfer_fees,json=transferFees,proto3,oneof"` } +type BusEvent_TransferFeesDiscount struct { + // Event notifying of a party's available discounts for transfer fees, per asset. + TransferFeesDiscount *TransferFeesDiscount `protobuf:"bytes,182,opt,name=transfer_fees_discount,json=transferFeesDiscount,proto3,oneof"` +} + +type BusEvent_PartyMarginModeUpdated struct { + // Event notifying of a party's margin mode update on a market. + PartyMarginModeUpdated *PartyMarginModeUpdated `protobuf:"bytes,183,opt,name=party_margin_mode_updated,json=partyMarginModeUpdated,proto3,oneof"` +} + +type BusEvent_PartyProfileUpdated struct { + // Event notifying of a party's profile update. + PartyProfileUpdated *PartyProfileUpdated `protobuf:"bytes,184,opt,name=party_profile_updated,json=partyProfileUpdated,proto3,oneof"` +} + +type BusEvent_TeamsStatsUpdated struct { + // Event notifying of an update of teams' statistics. + TeamsStatsUpdated *TeamsStatsUpdated `protobuf:"bytes,185,opt,name=teams_stats_updated,json=teamsStatsUpdated,proto3,oneof"` +} + type BusEvent_Market struct { // Market tick events Market *MarketEvent `protobuf:"bytes,1001,opt,name=market,proto3,oneof"` @@ -8835,6 +9410,14 @@ func (*BusEvent_VestingBalancesSummary) isBusEvent_Event() {} func (*BusEvent_TransferFees) isBusEvent_Event() {} +func (*BusEvent_TransferFeesDiscount) isBusEvent_Event() {} + +func (*BusEvent_PartyMarginModeUpdated) isBusEvent_Event() {} + +func (*BusEvent_PartyProfileUpdated) isBusEvent_Event() {} + +func (*BusEvent_TeamsStatsUpdated) isBusEvent_Event() {} + func (*BusEvent_Market) isBusEvent_Event() {} func (*BusEvent_TxErrEvent) isBusEvent_Event() {} @@ -8848,7 +9431,7 @@ type TransactionResult_SuccessDetails struct { func (x *TransactionResult_SuccessDetails) Reset() { *x = TransactionResult_SuccessDetails{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[80] + mi := &file_vega_events_v1_events_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8861,7 +9444,7 @@ func (x *TransactionResult_SuccessDetails) String() string { func (*TransactionResult_SuccessDetails) ProtoMessage() {} func (x *TransactionResult_SuccessDetails) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[80] + mi := &file_vega_events_v1_events_proto_msgTypes[86] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8874,7 +9457,7 @@ func (x *TransactionResult_SuccessDetails) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionResult_SuccessDetails.ProtoReflect.Descriptor instead. func (*TransactionResult_SuccessDetails) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{36, 0} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{37, 0} } type TransactionResult_FailureDetails struct { @@ -8889,7 +9472,7 @@ type TransactionResult_FailureDetails struct { func (x *TransactionResult_FailureDetails) Reset() { *x = TransactionResult_FailureDetails{} if protoimpl.UnsafeEnabled { - mi := &file_vega_events_v1_events_proto_msgTypes[81] + mi := &file_vega_events_v1_events_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8902,7 +9485,7 @@ func (x *TransactionResult_FailureDetails) String() string { func (*TransactionResult_FailureDetails) ProtoMessage() {} func (x *TransactionResult_FailureDetails) ProtoReflect() protoreflect.Message { - mi := &file_vega_events_v1_events_proto_msgTypes[81] + mi := &file_vega_events_v1_events_proto_msgTypes[87] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8915,7 +9498,7 @@ func (x *TransactionResult_FailureDetails) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionResult_FailureDetails.ProtoReflect.Descriptor instead. func (*TransactionResult_FailureDetails) Descriptor() ([]byte, []int) { - return file_vega_events_v1_events_proto_rawDescGZIP(), []int{36, 1} + return file_vega_events_v1_events_proto_rawDescGZIP(), []int{37, 1} } func (x *TransactionResult_FailureDetails) GetError() string { @@ -9009,7 +9592,7 @@ var file_vega_events_v1_events_proto_rawDesc = []byte{ 0x72, 0x64, 0x42, 0x6f, 0x6e, 0x75, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x71, 0x75, 0x61, 0x6e, - 0x74, 0x75, 0x6d, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xed, 0x04, 0x0a, 0x09, 0x46, + 0x74, 0x75, 0x6d, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xd0, 0x05, 0x0a, 0x09, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, @@ -9048,1672 +9631,1803 @@ var file_vega_events_v1_events_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x52, 0x12, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, - 0x73, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x7e, 0x0a, 0x18, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, - 0x65, 0x72, 0x12, 0x46, 0x0a, 0x10, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, - 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x6f, 0x0a, 0x12, 0x4d, 0x61, - 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0f, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, - 0x66, 0x65, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x73, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x12, 0x5b, 0x0a, 0x1c, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x69, 0x64, 0x5f, 0x61, 0x6e, + 0x64, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x18, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x50, 0x61, 0x69, 0x64, 0x41, 0x6e, 0x64, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x22, 0x7e, 0x0a, + 0x18, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x72, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x72, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x10, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0d, 0x6d, 0x61, - 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x50, 0x61, 0x69, 0x64, 0x22, 0x62, 0x0a, 0x0b, 0x50, - 0x61, 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, + 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x6f, 0x0a, + 0x12, 0x4d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0f, 0x6d, 0x61, 0x6b, + 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x0d, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x50, 0x61, 0x69, 0x64, 0x22, 0x62, + 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x71, + 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x41, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x8a, 0x03, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x71, 0x75, 0x61, 0x6e, - 0x74, 0x75, 0x6d, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x8a, 0x03, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, - 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x1d, 0x0a, - 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x09, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x0c, - 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x12, - 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x55, 0x0a, 0x27, - 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x75, 0x6c, - 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x24, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, - 0x69, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x22, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x76, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x1f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x64, 0x65, 0x64, - 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, - 0x72, 0x61, 0x64, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, - 0x70, 0x65, 0x6e, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0xe6, 0x02, 0x0a, - 0x0d, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x1b, - 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, - 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x12, 0x15, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x00, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x66, 0x75, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0e, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x66, 0x75, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, - 0x52, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x28, 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x77, 0x61, - 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x54, 0x77, 0x61, 0x70, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x77, 0x61, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x04, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x77, 0x61, - 0x70, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e, 0x64, 0x42, 0x12, 0x0a, 0x10, - 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, - 0x77, 0x61, 0x70, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x5f, 0x74, 0x77, 0x61, 0x70, 0x22, 0x43, 0x0a, 0x0e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x7c, 0x0a, 0x0f, 0x46, 0x75, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1b, 0x0a, - 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, - 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x3a, 0x0a, 0x08, - 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, + 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x12, + 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, + 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, + 0x55, 0x0a, 0x27, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x24, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x22, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x5f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x1f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, + 0x69, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, + 0x64, 0x65, 0x64, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x74, 0x72, 0x61, 0x64, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, + 0xe6, 0x02, 0x0a, 0x0d, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x10, + 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x15, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, + 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0e, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x66, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x02, 0x52, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, + 0x74, 0x77, 0x61, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0c, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x77, 0x61, 0x70, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, + 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x77, 0x61, 0x70, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x54, 0x77, 0x61, 0x70, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e, 0x64, 0x42, + 0x12, 0x0a, 0x10, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x5f, 0x74, 0x77, 0x61, 0x70, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x77, 0x61, 0x70, 0x22, 0x43, 0x0a, 0x0e, 0x46, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x7c, 0x0a, + 0x0f, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, + 0x03, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, + 0x3a, 0x0a, 0x08, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x08, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xb2, 0x02, 0x0a, 0x16, + 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, + 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x55, 0x0a, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, - 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xb2, 0x02, 0x0a, 0x16, 0x46, 0x75, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, - 0x65, 0x71, 0x12, 0x55, 0x0a, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, - 0x69, 0x6e, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x77, 0x61, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x77, 0x61, - 0x70, 0x22, 0x4a, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x53, - 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x45, 0x58, - 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x55, 0x52, - 0x43, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x02, 0x22, 0x83, 0x01, - 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x12, 0x41, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, - 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x70, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x22, 0xee, 0x01, 0x0a, 0x18, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, - 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, - 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x5f, 0x73, 0x65, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, - 0x68, 0x53, 0x65, 0x71, 0x22, 0x66, 0x0a, 0x23, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x64, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x49, 0x64, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x22, 0x97, 0x02, 0x0a, - 0x1a, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x66, 0x0a, 0x14, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, + 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, + 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0d, 0x64, + 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x77, 0x61, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x77, 0x61, 0x70, 0x22, 0x4a, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, + 0x0a, 0x12, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, + 0x5f, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, + 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x02, + 0x22, 0x83, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x09, 0x73, 0x74, 0x6f, + 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0xee, 0x01, 0x0a, 0x18, 0x45, 0x52, 0x43, 0x32, 0x30, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, + 0x64, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x5f, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x22, 0x66, 0x0a, 0x23, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x52, 0x13, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x6c, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6c, 0x64, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, - 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x22, 0xcc, 0x06, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x3d, 0x0a, 0x11, 0x66, 0x72, 0x6f, 0x6d, 0x5f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x21, + 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x49, + 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x22, + 0x97, 0x02, 0x0a, 0x1a, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, + 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x66, + 0x0a, 0x14, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, + 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x72, 0x52, 0x13, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x6c, 0x64, 0x5f, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6c, 0x64, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x22, 0xf6, 0x06, 0x0a, 0x08, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x3d, 0x0a, 0x11, 0x66, 0x72, + 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x39, 0x0a, 0x0f, 0x74, 0x6f, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x39, 0x0a, 0x0f, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x0d, 0x74, 0x6f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x37, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1b, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, - 0x01, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x65, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x12, 0x41, 0x0a, 0x09, - 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x12, - 0x58, 0x0a, 0x12, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x5f, 0x67, 0x6f, 0x76, 0x65, 0x72, - 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x65, - 0x4f, 0x66, 0x66, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x6f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x47, - 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x60, 0x0a, 0x14, 0x72, 0x65, 0x63, - 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, - 0x65, 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, - 0x6e, 0x67, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x13, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, - 0x67, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x06, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, - 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, - 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x4f, 0x4e, - 0x45, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, - 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, - 0x10, 0x05, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, - 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x39, 0x0a, 0x18, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x47, - 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4f, 0x6e, - 0x22, 0x2f, 0x0a, 0x0e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4f, - 0x6e, 0x22, 0xc1, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x5f, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x65, - 0x6e, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, - 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x10, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, - 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x6e, 0x64, 0x5f, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0xce, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, - 0x69, 0x6e, 0x67, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x65, 0x6e, 0x64, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, 0x01, 0x52, 0x10, 0x64, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x88, - 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x22, 0xb4, 0x04, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x6b, 0x65, - 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x74, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, - 0x61, 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x69, 0x6e, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0b, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x41, 0x74, 0x12, 0x17, 0x0a, 0x07, - 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, - 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, - 0x3c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, - 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x02, 0x22, 0x5e, 0x0a, - 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, - 0x47, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, - 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x22, 0xd3, 0x02, - 0x0a, 0x18, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x22, 0x3e, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, - 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, - 0x44, 0x10, 0x02, 0x22, 0xe3, 0x01, 0x0a, 0x1e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x53, 0x69, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x65, - 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6e, - 0x65, 0x77, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, - 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, - 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, - 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x67, 0x0a, 0x0f, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x22, 0x2d, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, - 0x64, 0x22, 0xb0, 0x02, 0x0a, 0x11, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x61, 0x79, 0x6f, - 0x75, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x1b, 0x0a, - 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x17, 0x70, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x70, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x4f, 0x66, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1f, 0x0a, - 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, - 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x45, - 0x70, 0x6f, 0x63, 0x68, 0x22, 0xd6, 0x02, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, - 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, - 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, - 0x65, 0x71, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x6e, - 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x73, 0x65, - 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x33, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x72, - 0x61, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x63, 0x6f, - 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, - 0x69, 0x67, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x7c, 0x0a, - 0x16, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x17, 0x0a, - 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, - 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x22, 0x44, 0x0a, 0x0b, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x22, 0x5d, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, - 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x22, 0xb4, 0x14, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x4e, 0x0a, - 0x10, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, - 0x0f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, - 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x12, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x42, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x68, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x4b, 0x0a, 0x0f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x69, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, - 0x00, 0x52, 0x0e, 0x76, 0x6f, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x76, 0x0a, 0x1e, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1c, 0x6c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x13, 0x77, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x12, - 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x73, - 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x15, 0x75, - 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x6d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x7c, 0x0a, 0x20, 0x6c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x6f, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1e, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x73, 0x0a, 0x1d, 0x6c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x61, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, - 0x52, 0x1b, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, - 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x71, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x74, 0x6f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x12, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1b, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x67, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x65, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x12, 0x41, 0x0a, + 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, + 0x12, 0x58, 0x0a, 0x12, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x5f, 0x67, 0x6f, 0x76, 0x65, + 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, + 0x65, 0x4f, 0x66, 0x66, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x6f, 0x6e, 0x65, 0x4f, 0x66, 0x66, + 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x60, 0x0a, 0x14, 0x72, 0x65, + 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, + 0x63, 0x65, 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, + 0x69, 0x6e, 0x67, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x13, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, + 0x6e, 0x67, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x84, 0x01, 0x0a, + 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, + 0x47, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x4f, + 0x4e, 0x45, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, + 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, + 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, + 0x44, 0x10, 0x05, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x67, 0x61, 0x6d, 0x65, 0x5f, + 0x69, 0x64, 0x22, 0x39, 0x0a, 0x18, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x47, 0x6f, 0x76, 0x65, + 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1d, + 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4f, 0x6e, 0x22, 0x2f, 0x0a, + 0x0e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, + 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4f, 0x6e, 0x22, 0xc1, + 0x01, 0x0a, 0x11, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, + 0x43, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x67, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x52, 0x10, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x67, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x22, 0xce, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, + 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, 0x70, + 0x6f, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, 0x01, 0x52, 0x10, 0x64, 0x69, 0x73, 0x70, + 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x88, 0x01, 0x01, 0x42, + 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x14, 0x0a, + 0x12, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x22, 0xb4, 0x04, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, + 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, + 0x61, 0x72, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, + 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x66, 0x69, + 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x41, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3c, 0x0a, 0x04, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x02, 0x22, 0x5e, 0x0a, 0x06, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, + 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x22, 0xd3, 0x02, 0x0a, 0x18, 0x45, + 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x21, 0x0a, + 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x22, 0x3e, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, + 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, 0x10, + 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x02, + 0x22, 0xe3, 0x01, 0x0a, 0x1e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, + 0x69, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x17, 0x0a, + 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x67, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, + 0x2d, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, 0xef, + 0x02, 0x0a, 0x11, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x17, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x4f, + 0x66, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6c, + 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x65, 0x70, 0x6f, 0x63, + 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x55, + 0x6e, 0x74, 0x69, 0x6c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0e, 0x71, 0x75, 0x61, + 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x1c, 0x0a, 0x07, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x06, 0x67, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, + 0x0a, 0x08, 0x5f, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, + 0x22, 0xd6, 0x02, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x63, + 0x6f, 0x72, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x12, 0x27, + 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x63, 0x6f, 0x72, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x6e, 0x6f, 0x72, 0x6d, 0x61, + 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x53, 0x63, 0x6f, + 0x72, 0x65, 0x12, 0x33, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x65, 0x72, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x61, 0x77, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x73, + 0x63, 0x6f, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x73, 0x69, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x7c, 0x0a, 0x16, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, + 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x22, 0x44, 0x0a, 0x0b, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x88, 0x01, + 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x12, 0x1f, + 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x29, 0x0a, + 0x10, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x22, 0x70, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0xf4, 0x16, 0x0a, 0x11, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x4e, 0x0a, 0x10, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x65, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x0f, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x5f, 0x61, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0d, 0x61, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, - 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x73, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x61, - 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x5e, 0x0a, 0x16, 0x6f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x74, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x67, 0x0a, 0x19, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x75, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x17, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x4e, 0x0a, 0x10, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x76, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x48, 0x00, 0x52, 0x0f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x12, 0x67, 0x0a, 0x19, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x77, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x48, 0x00, 0x52, 0x17, 0x62, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, - 0x15, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x78, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x13, 0x6b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x74, 0x0a, 0x1e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, - 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x79, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, - 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x48, 0x00, 0x52, 0x1b, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, - 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x5c, 0x0a, 0x15, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x73, - 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x7a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x13, 0x73, 0x74, 0x6f, 0x70, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x62, - 0x0a, 0x17, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x7b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x43, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, 0x73, 0x74, 0x6f, - 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x7c, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, - 0x6c, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x12, 0x55, 0x0a, 0x13, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x74, - 0x18, 0x7d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x11, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, - 0x12, 0x55, 0x0a, 0x13, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, - 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x7e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x43, 0x6f, - 0x64, 0x65, 0x48, 0x00, 0x52, 0x11, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x4d, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x48, 0x01, 0x52, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, - 0x65, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x46, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x48, 0x01, 0x52, 0x07, 0x66, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x1a, 0x10, 0x0a, 0x0e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x26, 0x0a, 0x0e, 0x46, 0x61, 0x69, 0x6c, 0x75, - 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, - 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, - 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0xa7, 0x0d, 0x0a, 0x0c, 0x54, 0x78, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x4e, 0x0a, 0x10, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x0f, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6d, - 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x12, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x42, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x68, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x12, 0x4b, 0x0a, 0x0f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x69, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, + 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6d, 0x65, 0x6e, 0x64, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x12, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x08, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x6f, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, - 0x52, 0x0e, 0x76, 0x6f, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x76, 0x0a, 0x1e, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1c, 0x6c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x13, 0x77, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x6b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x12, 0x77, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x57, 0x0a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, - 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x15, 0x75, 0x6e, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x6d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x48, 0x00, 0x52, 0x14, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x7c, 0x0a, 0x20, 0x6c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x6f, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x4b, + 0x0a, 0x0f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x69, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x76, 0x6f, 0x74, + 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x76, 0x0a, 0x1e, 0x6c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x6a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1e, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x73, 0x0a, 0x1d, 0x6c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x61, - 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1c, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x13, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, + 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x12, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x13, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x15, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x6d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, + 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x7c, 0x0a, 0x20, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, - 0x1b, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x08, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x71, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0d, 0x61, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x5f, - 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x73, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, - 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x6e, - 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x5e, 0x0a, 0x16, 0x6f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x74, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x67, 0x0a, 0x19, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x75, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x74, + 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x1e, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x73, 0x0a, 0x1d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6d, 0x65, 0x6e, 0x64, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x41, + 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x1b, 0x6c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6d, + 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x18, 0x71, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x12, 0x4b, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, + 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x45, + 0x0a, 0x0d, 0x61, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, + 0x73, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, + 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, + 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x5e, 0x0a, 0x16, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x74, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, + 0x14, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x67, 0x0a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x18, 0x75, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x12, 0x4e, 0x0a, 0x10, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x76, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x4e, + 0x0a, 0x10, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x18, 0x76, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x73, 0x75, + 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x69, + 0x73, 0x73, 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x67, + 0x0a, 0x19, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x77, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x17, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, 0x15, 0x6b, 0x65, 0x79, 0x5f, 0x72, + 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x78, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, + 0x13, 0x6b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x74, 0x0a, 0x1e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x79, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1b, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x15, 0x73, 0x74, + 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x7a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, + 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x13, 0x73, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x17, 0x73, 0x74, 0x6f, 0x70, + 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x7b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, + 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, 0x73, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x13, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, + 0x73, 0x65, 0x74, 0x18, 0x7c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x48, 0x00, + 0x52, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, + 0x53, 0x65, 0x74, 0x12, 0x55, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x7d, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, + 0x61, 0x6c, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x12, 0x55, 0x0a, 0x13, 0x61, 0x70, + 0x70, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x7e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x11, + 0x61, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x52, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x7f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x48, 0x00, 0x52, 0x0f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x12, 0x67, 0x0a, 0x19, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x77, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x48, 0x00, 0x52, 0x17, 0x62, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0d, 0x0a, 0x0b, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x04, 0x08, 0x6e, 0x10, - 0x6f, 0x22, 0x2a, 0x0a, 0x0a, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xa4, 0x01, - 0x0a, 0x0a, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x29, - 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, - 0x54, 0x69, 0x6d, 0x65, 0x22, 0x52, 0x0a, 0x0f, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, - 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x6c, 0x65, 0x64, 0x67, 0x65, - 0x72, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, - 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, - 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x12, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, - 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6c, - 0x6f, 0x73, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x22, 0x63, 0x0a, 0x11, 0x4c, 0x6f, 0x73, 0x73, 0x53, 0x6f, 0x63, 0x69, 0x61, - 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x5e, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x64, - 0x65, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x74, - 0x74, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x11, 0x74, 0x72, 0x61, - 0x64, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x10, 0x74, 0x72, 0x61, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x22, 0x6a, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, - 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xf6, 0x01, 0x0a, - 0x12, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1b, - 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, - 0x25, 0x0a, 0x0e, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x79, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x42, 0x75, 0x79, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0e, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x73, 0x12, - 0x20, 0x0a, 0x0c, 0x76, 0x77, 0x5f, 0x62, 0x75, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x77, 0x42, 0x75, 0x79, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x77, 0x5f, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x77, 0x53, 0x65, 0x6c, 0x6c, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x78, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x44, - 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, + 0x65, 0x48, 0x00, 0x52, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x5f, 0x74, 0x65, + 0x61, 0x6d, 0x18, 0x80, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x69, + 0x6e, 0x54, 0x65, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x08, 0x6a, 0x6f, 0x69, 0x6e, 0x54, 0x65, 0x61, + 0x6d, 0x12, 0x53, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x18, 0x81, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x59, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x82, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x12, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x12, 0x4d, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0xe9, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x48, 0x01, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x4d, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0xea, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x48, 0x01, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x1a, + 0x10, 0x0a, 0x0e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x1a, 0x26, 0x0a, 0x0e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x22, 0xa7, 0x0d, 0x0a, 0x0c, 0x54, 0x78, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a, + 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x4e, 0x0a, 0x10, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, + 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x0f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, + 0x61, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, + 0x74, 0x48, 0x00, 0x52, 0x0e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6d, 0x65, 0x6e, 0x64, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x12, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x4b, 0x0a, + 0x0f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x69, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x76, 0x6f, 0x74, 0x65, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x76, 0x0a, 0x1e, 0x6c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x6a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1c, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x13, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x73, + 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x12, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x13, 0x64, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x15, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x6d, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x75, + 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x7c, 0x0a, 0x20, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x1e, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x73, 0x0a, 0x1d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6d, 0x65, 0x6e, 0x64, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6d, + 0x65, 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x1b, 0x6c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x65, + 0x6e, 0x64, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x18, 0x71, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x12, 0x4b, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x63, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x45, 0x0a, + 0x0d, 0x61, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x73, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, + 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x5e, 0x0a, 0x16, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x74, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x67, 0x0a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x18, 0x75, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x48, 0x00, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x4e, 0x0a, + 0x10, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x18, 0x76, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x69, 0x73, + 0x73, 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x67, 0x0a, + 0x19, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x6e, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x77, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, + 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x17, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x04, 0x08, 0x6e, 0x10, 0x6f, 0x22, 0x2a, 0x0a, 0x0a, 0x54, + 0x69, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xa4, 0x01, 0x0a, 0x0a, 0x45, 0x70, 0x6f, 0x63, + 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x29, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x45, 0x70, 0x6f, 0x63, 0x68, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x52, + 0x0a, 0x0f, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x76, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x0f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x12, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, - 0x49, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x13, 0x44, - 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, + 0x73, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x74, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x63, 0x0a, + 0x11, 0x4c, 0x6f, 0x73, 0x73, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, - 0x2d, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x61, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x64, 0x69, 0x73, - 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x61, 0x66, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x22, 0x30, 0x0a, 0x0a, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, - 0x69, 0x6d, 0x65, 0x22, 0x85, 0x02, 0x0a, 0x0c, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, - 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x75, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, - 0x69, 0x6e, 0x67, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, - 0x61, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6c, 0x65, 0x61, 0x76, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x2e, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, - 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x07, 0x20, + 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x5e, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x10, 0x74, 0x72, 0x61, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x6a, 0x0a, 0x0c, 0x53, 0x65, + 0x74, 0x74, 0x6c, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x27, 0x0a, + 0x0f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xf6, 0x01, 0x0a, 0x12, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, + 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x6f, 0x74, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x79, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x75, 0x79, 0x73, + 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x65, + 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x70, 0x6f, 0x74, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x76, 0x77, 0x5f, + 0x62, 0x75, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x76, 0x77, 0x42, 0x75, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x76, + 0x77, 0x5f, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x76, 0x77, 0x53, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, + 0x78, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, + 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, + 0x67, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0x49, 0x0a, 0x10, 0x44, 0x69, 0x73, + 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x65, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x61, 0x66, 0x65, + 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, + 0x73, 0x61, 0x66, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x0a, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x85, 0x02, + 0x0a, 0x0c, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, + 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, + 0x6e, 0x64, 0x12, 0x2e, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x22, 0xa9, 0x03, 0x0a, 0x0f, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, - 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x76, 0x65, 0x67, 0x61, - 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x76, 0x65, 0x67, 0x61, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x0a, 0x74, 0x6d, 0x5f, 0x70, 0x75, 0x62, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6d, 0x50, 0x75, 0x62, - 0x4b, 0x65, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x75, 0x72, 0x6c, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x72, 0x6c, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x2b, 0x0a, 0x12, 0x76, - 0x65, 0x67, 0x61, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x76, 0x65, 0x67, 0x61, 0x50, 0x75, 0x62, - 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x65, - 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x2b, 0x0a, - 0x11, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x22, 0xb2, 0x02, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x70, - 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x6e, 0x63, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, - 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x27, 0x0a, - 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x78, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x5f, 0x73, 0x65, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, - 0x68, 0x53, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6d, 0x5f, 0x76, 0x6f, 0x74, 0x69, 0x6e, - 0x67, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x74, - 0x6d, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x89, 0x01, 0x0a, - 0x0b, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, - 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x5f, 0x70, 0x75, 0x62, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6c, 0x64, 0x50, - 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x75, 0x62, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x50, - 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, + 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x12, 0x41, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x22, 0xa9, 0x03, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, + 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x65, 0x67, 0x61, 0x50, 0x75, + 0x62, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x1c, 0x0a, 0x0a, 0x74, 0x6d, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6d, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x19, 0x0a, + 0x08, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, + 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, + 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x2b, 0x0a, 0x12, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x70, 0x75, + 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0f, 0x76, 0x65, 0x67, 0x61, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, + 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x66, 0x72, + 0x6f, 0x6d, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, + 0x71, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, + 0x71, 0x22, 0xb2, 0x02, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, + 0x64, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x73, 0x63, + 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x63, 0x6f, + 0x72, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x63, + 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x6b, 0x69, + 0x6e, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x12, 0x26, + 0x0a, 0x0f, 0x74, 0x6d, 0x5f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x77, 0x65, + 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x74, 0x6d, 0x56, 0x6f, 0x74, 0x69, 0x6e, + 0x67, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x89, 0x01, 0x0a, 0x0b, 0x4b, 0x65, 0x79, 0x52, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, + 0x1e, 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6c, 0x64, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, + 0x1e, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, + 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x13, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, + 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, + 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x6c, 0x64, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x13, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x6c, 0x64, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x6f, 0x6c, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, - 0x77, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x6e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xd7, - 0x01, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x75, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x76, 0x65, 0x67, - 0x61, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x65, 0x67, 0x61, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, - 0x54, 0x61, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, - 0x73, 0x12, 0x45, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x4b, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x56, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x56, 0x0a, 0x0a, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x42, 0x6c, + 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xd7, 0x01, 0x0a, 0x14, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x30, 0x0a, 0x14, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x12, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x72, 0x65, 0x6c, 0x65, + 0x61, 0x73, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, + 0x65, 0x67, 0x61, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x61, 0x67, 0x12, 0x1c, 0x0a, + 0x09, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x09, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0x4b, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, + 0x56, 0x0a, 0x0a, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x16, 0x0a, + 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x22, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x22, 0x0a, - 0x08, 0x45, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x22, 0x44, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x4a, 0x0a, 0x1c, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, - 0x72, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, - 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x22, 0x49, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x88, - 0x02, 0x0a, 0x0b, 0x54, 0x65, 0x61, 0x6d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x17, - 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, - 0x72, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, - 0x72, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x5f, - 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x65, 0x61, - 0x6d, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, - 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x61, - 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, - 0x6f, 0x73, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, - 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x0b, 0x0a, - 0x09, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, - 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0xb2, 0x01, 0x0a, 0x0b, 0x54, 0x65, - 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x44, 0x0a, 0x16, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x22, 0x4a, 0x0a, 0x1c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x61, 0x64, + 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6c, 0x61, + 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xad, 0x01, + 0x0a, 0x10, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x72, 0x65, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x49, 0x0a, + 0x0d, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1b, + 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0b, 0x54, 0x65, 0x61, + 0x6d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x55, 0x72, 0x6c, 0x88, 0x01, + 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, + 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, + 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, + 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, + 0x75, 0x72, 0x6c, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, + 0x72, 0x6c, 0x22, 0xd1, 0x01, 0x0a, 0x0b, 0x54, 0x65, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1e, 0x0a, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, + 0x22, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, + 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, + 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x76, 0x61, 0x74, + 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0xab, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x65, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x20, + 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x65, 0x61, 0x6d, 0x49, 0x64, + 0x12, 0x1c, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x77, 0x69, 0x74, + 0x63, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, + 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x22, 0x7e, 0x0a, 0x11, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x4a, + 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, - 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, - 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, - 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, - 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x61, 0x76, - 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, - 0x6f, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, - 0x65, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x42, - 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0xab, - 0x01, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, - 0x65, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x20, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x74, - 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, - 0x6f, 0x6d, 0x54, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x74, - 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, - 0x54, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x7e, 0x0a, 0x11, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x65, 0x61, - 0x6d, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x85, 0x01, 0x0a, - 0x12, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0xd2, 0x03, 0x0a, 0x17, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, - 0x6c, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x12, 0x15, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x12, 0x59, 0x0a, 0x2a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x73, - 0x65, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x25, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, - 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x43, 0x0a, - 0x0e, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x0d, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x66, 0x61, 0x63, - 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x19, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x73, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, - 0x69, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x73, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, - 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x61, 0x73, 0x5f, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, - 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x77, 0x61, 0x73, 0x45, 0x6c, 0x69, - 0x67, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, - 0x72, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x54, 0x61, - 0x6b, 0x65, 0x72, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x0c, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, - 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, - 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3d, - 0x0a, 0x1b, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x83, 0x01, - 0x0a, 0x18, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x65, 0x74, 0x49, - 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6a, - 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, - 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x22, 0x83, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, - 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x2f, - 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, - 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x83, 0x01, 0x0a, 0x16, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x07, 0x70, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x22, 0x85, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, + 0x6c, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x73, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x65, 0x74, + 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x12, 0x1d, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xd2, 0x03, 0x0a, + 0x17, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, + 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x59, 0x0a, 0x2a, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6b, 0x65, + 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x25, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0e, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, + 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0d, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, + 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x3a, + 0x0a, 0x19, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x17, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x61, + 0x73, 0x5f, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0b, 0x77, 0x61, 0x73, 0x45, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x32, 0x0a, + 0x15, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x22, 0x91, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, + 0x0f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3d, 0x0a, 0x1b, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, + 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x76, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, + 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x83, 0x01, 0x0a, 0x16, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, + 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x07, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, + 0x68, 0x22, 0x83, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x07, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x1d, 0x0a, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, 0x0a, 0x08, + 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, + 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x76, 0x0a, 0x14, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, - 0x76, 0x0a, 0x14, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, 0x0a, 0x08, - 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, - 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x8f, 0x01, 0x0a, 0x1c, 0x56, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, - 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x8f, 0x01, 0x0a, 0x1c, 0x56, 0x6f, - 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x07, 0x70, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x7c, 0x0a, 0x1a, 0x56, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, - 0x67, 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, - 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0xd7, 0x01, 0x0a, 0x16, 0x50, 0x61, - 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x12, - 0x26, 0x0a, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x70, 0x61, - 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, - 0x65, 0x65, 0x73, 0x50, 0x61, 0x69, 0x64, 0x12, 0x4a, 0x0a, 0x13, 0x66, 0x65, 0x65, 0x73, 0x5f, - 0x70, 0x61, 0x69, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x52, 0x10, 0x66, 0x65, 0x65, 0x73, 0x50, 0x61, 0x69, 0x64, 0x50, 0x65, 0x72, 0x50, 0x61, - 0x72, 0x74, 0x79, 0x22, 0xe1, 0x32, 0x0a, 0x08, 0x42, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x69, 0x6d, 0x65, - 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x69, 0x6d, - 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x10, 0x6c, 0x65, 0x64, 0x67, 0x65, - 0x72, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x66, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x55, 0x0a, 0x13, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x67, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, - 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x05, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x12, 0x29, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x69, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x05, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x48, 0x00, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x48, 0x00, 0x52, - 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, - 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x73, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x6d, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, - 0x20, 0x0a, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x48, 0x00, 0x52, 0x04, 0x76, 0x6f, 0x74, - 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x6f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x48, 0x0a, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x48, - 0x00, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x12, 0x52, 0x0a, 0x12, 0x6c, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x71, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, - 0x73, 0x73, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x00, 0x52, 0x11, 0x6c, 0x6f, 0x73, 0x73, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, + 0x8f, 0x01, 0x0a, 0x1c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, + 0x12, 0x35, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x07, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, + 0x68, 0x22, 0x8f, 0x01, 0x0a, 0x1c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x35, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x52, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, + 0x6f, 0x63, 0x68, 0x22, 0x7c, 0x0a, 0x1a, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x65, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x65, + 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, + 0x6e, 0x64, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, + 0x68, 0x22, 0xd7, 0x01, 0x0a, 0x16, 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x50, 0x61, 0x69, 0x64, 0x12, + 0x4a, 0x0a, 0x13, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x69, 0x64, 0x5f, 0x70, 0x65, 0x72, + 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, + 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x10, 0x66, 0x65, 0x65, 0x73, 0x50, + 0x61, 0x69, 0x64, 0x50, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x79, 0x22, 0xa0, 0x03, 0x0a, 0x16, + 0x50, 0x61, 0x72, 0x74, 0x79, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x31, + 0x0a, 0x0b, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x1d, 0x6d, + 0x69, 0x6e, 0x5f, 0x74, 0x68, 0x65, 0x6f, 0x72, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x6d, + 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x1a, 0x6d, 0x69, 0x6e, 0x54, 0x68, 0x65, 0x6f, 0x72, 0x65, 0x74, + 0x69, 0x63, 0x61, 0x6c, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x68, 0x65, 0x6f, 0x72, + 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x54, 0x68, 0x65, 0x6f, + 0x72, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x10, 0x0a, + 0x0e, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, + 0x20, 0x0a, 0x1e, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x74, 0x68, 0x65, 0x6f, 0x72, 0x65, 0x74, 0x69, + 0x63, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x68, 0x65, 0x6f, 0x72, 0x65, + 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x22, 0x52, + 0x0a, 0x13, 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x52, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x22, 0x5f, 0x0a, 0x11, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x74, 0x5f, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x61, 0x74, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x12, 0x2f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x22, 0x6a, 0x0a, 0x09, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x12, 0x17, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x44, 0x0a, 0x0d, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, + 0x55, 0x0a, 0x0f, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, + 0x0f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0xd8, 0x35, 0x0a, 0x08, 0x42, 0x75, 0x73, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x74, + 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0a, + 0x74, 0x69, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x10, 0x6c, 0x65, + 0x64, 0x67, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x66, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, + 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x55, 0x0a, 0x13, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x12, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x23, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x69, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x23, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x48, 0x00, 0x52, 0x05, 0x70, + 0x61, 0x72, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x18, 0x6b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, + 0x48, 0x00, 0x52, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x6d, 0x61, 0x72, + 0x67, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x18, 0x6d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x48, 0x00, 0x52, 0x04, + 0x76, 0x6f, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0a, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x48, 0x0a, 0x0e, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x70, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x52, 0x0a, 0x12, 0x6c, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x71, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x6f, 0x73, 0x73, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x6c, 0x6f, 0x73, 0x73, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0f, 0x73, 0x65, 0x74, 0x74, 0x6c, + 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x0e, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x11, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x73, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, - 0x0e, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x4f, 0x0a, 0x11, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x64, 0x18, 0x73, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, - 0x6c, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x48, 0x00, 0x52, 0x10, - 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, - 0x12, 0x35, 0x0a, 0x0e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x74, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x65, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x48, + 0x00, 0x52, 0x10, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x74, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x18, 0x75, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, + 0x3d, 0x0a, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x18, 0x76, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, + 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x12, 0x32, + 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x18, 0x77, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x61, 0x6c, 0x12, 0x29, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x78, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x38, 0x0a, + 0x07, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x79, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, + 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x0b, 0x72, 0x69, 0x73, 0x6b, 0x5f, + 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x7a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, + 0x52, 0x0a, 0x72, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x45, 0x0a, 0x11, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x18, 0x7b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x10, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x7c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x12, 0x6c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x35, 0x0a, 0x0e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x18, 0x7d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x18, 0x75, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x0b, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x18, 0x76, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x48, 0x00, 0x52, - 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x12, 0x32, 0x0a, 0x0a, 0x77, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x18, 0x77, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, - 0x6c, 0x48, 0x00, 0x52, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, - 0x29, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x78, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x48, - 0x00, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x07, 0x61, 0x75, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x79, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x61, 0x75, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x0b, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x66, 0x61, 0x63, - 0x74, 0x6f, 0x72, 0x18, 0x7a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x52, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x72, - 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x45, 0x0a, 0x11, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x7b, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x12, 0x4b, 0x0a, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x7c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x12, 0x6c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, - 0x0e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, - 0x7d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x18, 0x7e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x0a, 0x6f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x33, 0x0a, 0x0b, 0x6f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x7f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x58, - 0x0a, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x18, 0x81, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x82, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x63, 0x6f, - 0x72, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x70, 0x6f, - 0x63, 0x68, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x83, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x10, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x84, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x85, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x48, 0x00, - 0x52, 0x0c, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x49, - 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x18, - 0x86, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x61, - 0x79, 0x6f, 0x75, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x42, 0x0a, 0x0a, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x87, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x7e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, + 0x52, 0x0a, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x33, 0x0a, 0x0b, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x7f, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x58, 0x0a, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x81, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, - 0x00, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x41, 0x0a, - 0x0c, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x88, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x48, 0x00, 0x52, 0x0b, 0x6b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x38, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x18, 0x89, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x48, 0x00, - 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x12, 0x3d, 0x0a, 0x0e, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x8a, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x8b, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x18, 0x8c, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x6a, 0x0a, 0x1b, 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, - 0x73, 0x69, 0x67, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x18, 0x8d, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x18, 0x65, 0x72, 0x63, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, - 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x7d, 0x0a, - 0x22, 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, - 0x73, 0x65, 0x74, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x18, 0x8e, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x65, 0x67, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x0f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x82, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x3e, 0x0a, 0x0b, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x83, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, + 0x52, 0x0a, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x10, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x18, 0x84, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x85, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, + 0x67, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, + 0x67, 0x12, 0x49, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x79, 0x6f, + 0x75, 0x74, 0x18, 0x86, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x42, 0x0a, 0x0a, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x87, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x12, 0x41, 0x0a, 0x0c, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x88, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0b, 0x6b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, + 0x18, 0x89, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, + 0x72, 0x48, 0x00, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x12, 0x3d, 0x0a, + 0x0e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, + 0x8a, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x8b, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, + 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x8c, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x1b, 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x18, 0x8d, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, - 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x53, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x1e, 0x65, 0x72, - 0x63, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x65, 0x74, 0x54, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x1b, - 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x8f, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, - 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x48, 0x00, 0x52, 0x18, - 0x65, 0x72, 0x63, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x70, 0x0a, 0x1d, 0x65, 0x72, 0x63, 0x32, - 0x30, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x72, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x90, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x1a, - 0x65, 0x72, 0x63, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x57, 0x0a, 0x14, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x18, 0x91, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, - 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x12, 0x5a, 0x0a, 0x15, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, - 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x92, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, - 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x13, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x5d, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x93, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, - 0x0a, 0x0b, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x94, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x48, 0x00, 0x52, 0x0a, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x38, - 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x95, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x08, - 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x63, 0x0a, 0x18, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x65, 0x64, 0x18, 0x96, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, + 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x18, 0x65, 0x72, 0x63, 0x32, 0x30, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x12, 0x7d, 0x0a, 0x22, 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, + 0x69, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x8e, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x54, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, + 0x1e, 0x65, 0x72, 0x63, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x65, + 0x74, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x6a, 0x0a, 0x1b, 0x65, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, + 0x67, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x8f, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x48, + 0x00, 0x52, 0x18, 0x65, 0x72, 0x63, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x70, 0x0a, 0x1d, 0x65, + 0x72, 0x63, 0x32, 0x30, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x90, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, + 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x48, + 0x00, 0x52, 0x1a, 0x65, 0x72, 0x63, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x57, 0x0a, + 0x14, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x91, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x48, 0x00, 0x52, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5a, 0x0a, 0x15, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x92, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x13, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x93, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x14, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x18, 0x94, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x38, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x95, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x00, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x63, 0x0a, 0x18, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x96, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, + 0x12, 0x44, 0x0a, 0x0d, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x18, 0x97, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x53, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x98, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x53, 0x0a, 0x13, 0x63, + 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x18, 0x99, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x11, 0x63, + 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x12, 0x77, 0x0a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x72, + 0x65, 0x61, 0x64, 0x79, 0x18, 0x9a, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x44, 0x0a, - 0x0d, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x97, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x12, 0x53, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x98, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x53, 0x0a, 0x13, 0x63, 0x6f, 0x72, 0x65, - 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, - 0x99, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x72, 0x65, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x77, 0x0a, - 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x64, - 0x79, 0x18, 0x9a, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, 0x48, 0x00, 0x52, 0x1c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x50, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x9b, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x10, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, - 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x9c, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, - 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x73, 0x12, 0x59, 0x0a, 0x14, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9d, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x13, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, - 0x73, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40, 0x0a, 0x0a, - 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x9e, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x47, - 0x0a, 0x0e, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x18, 0x9f, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x64, 0x0a, 0x19, 0x66, 0x75, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xa0, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, - 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x16, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, - 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x41, 0x0a, - 0x0c, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0xa1, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x65, 0x61, 0x6d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x18, 0xa2, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x65, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x5a, 0x0a, 0x15, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x5f, 0x73, - 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0xa3, 0x01, 0x20, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, 0x48, 0x00, 0x52, 0x1c, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x50, 0x0a, 0x11, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x9b, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x10, 0x64, 0x69, 0x73, 0x74, 0x72, + 0x65, 0x73, 0x73, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0e, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x9c, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, + 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9d, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x53, 0x77, 0x69, 0x74, - 0x63, 0x68, 0x65, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x13, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x65, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x12, - 0x54, 0x0a, 0x13, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x65, - 0x64, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0xa4, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x65, 0x61, 0x6d, - 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x65, - 0x64, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x63, 0x0a, 0x18, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, - 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, - 0x64, 0x18, 0xa5, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, - 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, - 0x48, 0x00, 0x52, 0x16, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x63, 0x0a, 0x18, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0xa6, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x16, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, - 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, - 0x5d, 0x0a, 0x16, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0xa7, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x13, 0x64, 0x69, 0x73, 0x74, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x40, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x9e, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x12, 0x47, 0x0a, 0x0e, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x18, 0x9f, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x66, 0x75, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x64, 0x0a, 0x19, 0x66, 0x75, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xa0, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, + 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x16, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x18, 0xa1, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x65, 0x61, 0x6d, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x18, 0xa2, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x65, 0x61, 0x6d, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x5a, 0x0a, 0x15, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x65, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, + 0xa3, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x53, + 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x13, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x64, 0x54, 0x65, + 0x61, 0x6d, 0x12, 0x54, 0x0a, 0x13, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x5f, 0x6a, 0x6f, + 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0xa4, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x54, + 0x65, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x4a, 0x6f, + 0x69, 0x6e, 0x65, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x63, 0x0a, 0x18, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x64, 0x18, 0xa5, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x16, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x63, 0x0a, + 0x18, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, + 0x6d, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0xa6, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x48, 0x00, 0x52, 0x14, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, - 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x57, - 0x0a, 0x14, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0xa8, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x48, 0x00, 0x52, 0x12, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x6a, 0x0a, 0x1b, 0x72, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x65, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, - 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x74, 0x18, 0xa9, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x18, 0x72, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, - 0x53, 0x65, 0x74, 0x12, 0x5a, 0x0a, 0x15, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x18, 0xaa, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, - 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x48, 0x00, 0x52, 0x13, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x12, - 0x76, 0x0a, 0x1f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x65, 0x64, 0x18, 0xab, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x1c, 0x76, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x76, 0x0a, 0x1f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0xac, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x16, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x5d, 0x0a, 0x16, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x70, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0xa7, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x48, 0x00, 0x52, 0x14, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x65, + 0x64, 0x12, 0x57, 0x0a, 0x14, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x73, 0x65, + 0x74, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0xa8, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x12, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, + 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x6a, 0x0a, 0x1b, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x65, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x74, 0x18, 0xa9, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x18, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x12, 0x5a, 0x0a, 0x15, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x18, + 0xaa, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, + 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x48, 0x00, 0x52, 0x13, 0x70, + 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6b, 0x12, 0x76, 0x0a, 0x1f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0xab, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x1c, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x76, 0x0a, 0x1f, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0xac, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x48, 0x00, 0x52, 0x1c, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x70, 0x0a, 0x1d, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x18, 0xad, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, + 0x6d, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x48, 0x00, 0x52, 0x1a, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x45, + 0x6e, 0x64, 0x65, 0x64, 0x12, 0x67, 0x0a, 0x1a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, + 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x18, 0xae, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x48, 0x00, 0x52, 0x17, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x5a, 0x0a, + 0x15, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0xaf, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x48, 0x00, 0x52, 0x13, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x70, 0x0a, 0x1d, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0xb0, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x48, - 0x00, 0x52, 0x1c, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, - 0x70, 0x0a, 0x1d, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, - 0x18, 0xad, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x45, 0x6e, - 0x64, 0x65, 0x64, 0x48, 0x00, 0x52, 0x1a, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x65, - 0x64, 0x12, 0x67, 0x0a, 0x1a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x73, 0x65, - 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, - 0xae, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, - 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x48, - 0x00, 0x52, 0x17, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x5a, 0x0a, 0x15, 0x76, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x18, 0xaf, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x48, - 0x00, 0x52, 0x13, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x70, 0x0a, 0x1d, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0xb0, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, + 0x1a, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x0a, 0x66, + 0x65, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0xb1, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x48, 0x00, 0x52, 0x09, 0x66, + 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x66, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0xb2, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x64, 0x0a, 0x19, 0x70, 0x61, 0x69, 0x64, 0x5f, + 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x73, 0x18, 0xb3, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x69, + 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x48, 0x00, 0x52, 0x16, 0x70, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x63, 0x0a, + 0x18, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x73, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0xb4, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x48, 0x00, 0x52, 0x16, 0x76, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x12, 0x44, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x66, + 0x65, 0x65, 0x73, 0x18, 0xb5, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x12, 0x5d, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0xb6, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, + 0x00, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x19, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x18, 0xb7, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, + 0x74, 0x79, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x16, 0x70, 0x61, 0x72, 0x74, 0x79, 0x4d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x5a, 0x0a, + 0x15, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0xb8, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x48, 0x00, 0x52, 0x13, 0x70, 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x54, 0x0a, 0x13, 0x74, 0x65, 0x61, + 0x6d, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x18, 0xb9, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x11, 0x74, 0x65, + 0x61, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x36, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, + 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x78, 0x5f, 0x65, 0x72, + 0x72, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0xd1, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x1a, 0x76, 0x6f, - 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x0a, 0x66, 0x65, 0x65, 0x73, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0xb1, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x48, 0x00, 0x52, 0x09, 0x66, 0x65, 0x65, 0x73, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0xb2, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x48, 0x00, 0x52, 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x64, 0x0a, 0x19, 0x70, 0x61, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x18, 0xb3, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x48, 0x00, 0x52, 0x16, 0x70, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x63, 0x0a, 0x18, 0x76, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x5f, 0x73, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0xb4, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x53, 0x75, - 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x48, 0x00, 0x52, 0x16, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, - 0x44, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x73, - 0x18, 0xb5, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 0x46, 0x65, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 0x46, 0x65, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, - 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x41, 0x0a, - 0x0c, 0x74, 0x78, 0x5f, 0x65, 0x72, 0x72, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0xd1, 0x0f, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x78, 0x45, 0x72, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x42, 0x07, - 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2a, 0xdd, 0x01, 0x0a, 0x1d, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x30, 0x0a, 0x2c, 0x50, 0x52, 0x4f, - 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x50, 0x52, - 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x50, - 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, - 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x2d, 0x0a, 0x29, 0x50, 0x52, 0x4f, - 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x50, 0x52, - 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x50, - 0x50, 0x52, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x02, 0x12, 0x2d, 0x0a, 0x29, 0x50, 0x52, 0x4f, 0x54, - 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x50, 0x52, 0x4f, - 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, - 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x2a, 0x99, 0x19, 0x0a, 0x0c, 0x42, 0x75, 0x73, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, 0x53, 0x5f, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x01, - 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x02, - 0x12, 0x23, 0x0a, 0x1f, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4c, 0x45, 0x44, 0x47, 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x56, 0x45, 0x4d, 0x45, - 0x4e, 0x54, 0x53, 0x10, 0x03, 0x12, 0x26, 0x0a, 0x22, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, - 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x18, 0x0a, + 0x54, 0x78, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, + 0x74, 0x78, 0x45, 0x72, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, + 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x2a, 0xdd, 0x01, 0x0a, 0x1d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x30, 0x0a, 0x2c, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, + 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, + 0x4c, 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, + 0x47, 0x10, 0x01, 0x12, 0x2d, 0x0a, 0x29, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, + 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x44, + 0x10, 0x02, 0x12, 0x2d, 0x0a, 0x29, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, + 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, + 0x03, 0x2a, 0xcc, 0x1a, 0x0a, 0x0c, 0x42, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, + 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x49, 0x4d, + 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x23, 0x0a, 0x1f, 0x42, 0x55, + 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x45, 0x44, + 0x47, 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x56, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x53, 0x10, 0x03, 0x12, + 0x26, 0x0a, 0x22, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x4c, + 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, + 0x05, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x06, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, 0x05, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, 0x5f, 0x45, - 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, - 0x54, 0x10, 0x06, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x59, 0x10, 0x07, 0x12, 0x18, 0x0a, - 0x14, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x54, 0x52, 0x41, 0x44, 0x45, 0x10, 0x08, 0x12, 0x20, 0x0a, 0x1c, 0x42, 0x55, 0x53, 0x5f, 0x45, - 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, - 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x53, 0x10, 0x09, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x55, 0x53, - 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x50, - 0x4f, 0x53, 0x41, 0x4c, 0x10, 0x0a, 0x12, 0x17, 0x0a, 0x13, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x10, 0x0b, 0x12, - 0x1e, 0x0a, 0x1a, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x0c, 0x12, - 0x21, 0x0a, 0x1d, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, - 0x10, 0x0d, 0x12, 0x25, 0x0a, 0x21, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x5f, 0x53, 0x4f, 0x43, 0x49, 0x41, 0x4c, - 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0e, 0x12, 0x22, 0x0a, 0x1e, 0x42, 0x55, 0x53, - 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, - 0x4c, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0f, 0x12, 0x24, 0x0a, - 0x20, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x45, 0x53, 0x53, 0x45, - 0x44, 0x10, 0x10, 0x12, 0x21, 0x0a, 0x1d, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x52, 0x45, - 0x41, 0x54, 0x45, 0x44, 0x10, 0x11, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x10, 0x12, - 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x10, 0x13, - 0x12, 0x1d, 0x0a, 0x19, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x41, 0x4c, 0x10, 0x14, 0x12, - 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x10, 0x15, 0x12, 0x1a, 0x0a, 0x16, 0x42, - 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x55, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x16, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, 0x53, 0x5f, 0x45, - 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x49, 0x53, 0x4b, 0x5f, 0x46, - 0x41, 0x43, 0x54, 0x4f, 0x52, 0x10, 0x17, 0x12, 0x24, 0x0a, 0x20, 0x42, 0x55, 0x53, 0x5f, 0x45, - 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, - 0x4b, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x10, 0x18, 0x12, 0x26, 0x0a, - 0x22, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, - 0x49, 0x4f, 0x4e, 0x10, 0x19, 0x12, 0x21, 0x0a, 0x1d, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, - 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x55, - 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x1a, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, 0x53, 0x5f, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x41, 0x43, 0x4c, - 0x45, 0x5f, 0x53, 0x50, 0x45, 0x43, 0x10, 0x1b, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, 0x53, 0x5f, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x41, 0x43, 0x4c, - 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x1c, 0x12, 0x25, 0x0a, 0x21, 0x42, 0x55, 0x53, 0x5f, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x47, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x1d, 0x12, - 0x22, 0x0a, 0x1e, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x53, 0x43, 0x4f, 0x52, - 0x45, 0x10, 0x1e, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x50, 0x4f, 0x43, 0x48, 0x5f, 0x55, 0x50, 0x44, 0x41, - 0x54, 0x45, 0x10, 0x1f, 0x12, 0x23, 0x0a, 0x1f, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, - 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x20, 0x12, 0x20, 0x0a, 0x1c, 0x42, 0x55, 0x53, - 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x4b, - 0x45, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x21, 0x12, 0x26, 0x0a, 0x22, 0x42, - 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, - 0x57, 0x41, 0x52, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4f, 0x55, 0x54, 0x5f, 0x45, 0x56, 0x45, 0x4e, - 0x54, 0x10, 0x22, 0x12, 0x1d, 0x0a, 0x19, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x50, 0x4f, 0x49, 0x4e, 0x54, - 0x10, 0x23, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x53, 0x54, 0x41, 0x52, - 0x54, 0x10, 0x24, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x54, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x10, 0x25, 0x12, 0x1c, 0x0a, 0x18, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x56, 0x41, 0x52, - 0x10, 0x26, 0x12, 0x21, 0x0a, 0x1d, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x4c, 0x49, 0x4d, - 0x49, 0x54, 0x53, 0x10, 0x27, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, - 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, - 0x10, 0x28, 0x12, 0x24, 0x0a, 0x20, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x52, - 0x41, 0x4e, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x29, 0x12, 0x2f, 0x0a, 0x2b, 0x42, 0x55, 0x53, 0x5f, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x52, 0x43, 0x32, 0x30, - 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x45, - 0x52, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x10, 0x2a, 0x12, 0x30, 0x0a, 0x2c, 0x42, 0x55, 0x53, - 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x52, 0x43, 0x32, - 0x30, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x45, 0x54, 0x5f, - 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x10, 0x2b, 0x12, 0x2f, 0x0a, 0x2b, 0x42, - 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x52, - 0x43, 0x32, 0x30, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x49, - 0x47, 0x4e, 0x45, 0x52, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x2c, 0x12, 0x31, 0x0a, 0x2d, - 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, - 0x52, 0x43, 0x32, 0x30, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, - 0x49, 0x47, 0x4e, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x2d, 0x12, + 0x50, 0x41, 0x52, 0x54, 0x59, 0x10, 0x07, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x45, 0x10, + 0x08, 0x12, 0x20, 0x0a, 0x1c, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, + 0x53, 0x10, 0x09, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x10, 0x0a, + 0x12, 0x17, 0x0a, 0x13, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x10, 0x0b, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, 0x53, + 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, + 0x45, 0x54, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x0c, 0x12, 0x21, 0x0a, 0x1d, 0x42, 0x55, 0x53, + 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x4f, 0x44, 0x45, + 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x10, 0x0d, 0x12, 0x25, 0x0a, 0x21, + 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, + 0x4f, 0x53, 0x53, 0x5f, 0x53, 0x4f, 0x43, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x10, 0x0e, 0x12, 0x22, 0x0a, 0x1e, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, 0x5f, 0x50, 0x4f, 0x53, + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0f, 0x12, 0x24, 0x0a, 0x20, 0x42, 0x55, 0x53, 0x5f, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, + 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x45, 0x53, 0x53, 0x45, 0x44, 0x10, 0x10, 0x12, 0x21, 0x0a, + 0x1d, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x11, + 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x10, 0x12, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, + 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, + 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x10, 0x13, 0x12, 0x1d, 0x0a, 0x19, 0x42, 0x55, + 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x49, 0x54, + 0x48, 0x44, 0x52, 0x41, 0x57, 0x41, 0x4c, 0x10, 0x14, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, + 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x50, 0x4f, + 0x53, 0x49, 0x54, 0x10, 0x15, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x16, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x52, 0x49, 0x53, 0x4b, 0x5f, 0x46, 0x41, 0x43, 0x54, 0x4f, 0x52, 0x10, + 0x17, 0x12, 0x24, 0x0a, 0x20, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x50, 0x41, 0x52, 0x41, + 0x4d, 0x45, 0x54, 0x45, 0x52, 0x10, 0x18, 0x12, 0x26, 0x0a, 0x22, 0x42, 0x55, 0x53, 0x5f, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, + 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x19, 0x12, 0x21, 0x0a, 0x1d, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, - 0x10, 0x2e, 0x12, 0x28, 0x0a, 0x24, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x54, 0x48, 0x45, 0x52, 0x45, 0x55, 0x4d, 0x5f, 0x4b, 0x45, - 0x59, 0x5f, 0x52, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x2f, 0x12, 0x2c, 0x0a, 0x28, - 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, - 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, - 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x10, 0x30, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, - 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x45, 0x47, - 0x49, 0x4e, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x31, 0x12, 0x1c, 0x0a, 0x18, 0x42, 0x55, - 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x44, - 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x32, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x53, 0x5f, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, - 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x52, - 0x54, 0x45, 0x44, 0x10, 0x33, 0x12, 0x20, 0x0a, 0x1c, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, - 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, 0x5f, 0x4d, - 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x34, 0x12, 0x25, 0x0a, 0x21, 0x42, 0x55, 0x53, 0x5f, 0x45, - 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x10, 0x35, 0x12, 0x21, - 0x0a, 0x1d, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x5f, 0x54, 0x41, 0x4b, 0x45, 0x4e, 0x10, - 0x36, 0x12, 0x33, 0x0a, 0x2f, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x50, 0x47, - 0x52, 0x41, 0x44, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x52, - 0x45, 0x41, 0x44, 0x59, 0x10, 0x37, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x45, 0x53, - 0x53, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x53, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, - 0x44, 0x10, 0x38, 0x12, 0x21, 0x0a, 0x1d, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x5f, 0x4f, 0x52, - 0x44, 0x45, 0x52, 0x53, 0x10, 0x39, 0x12, 0x27, 0x0a, 0x23, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x45, 0x53, - 0x53, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x3a, 0x12, - 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x53, 0x50, 0x4f, 0x54, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, - 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x3b, 0x12, 0x1d, 0x0a, 0x19, + 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, + 0x10, 0x1a, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x41, 0x43, 0x4c, 0x45, 0x5f, 0x53, 0x50, 0x45, 0x43, + 0x10, 0x1b, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x41, 0x43, 0x4c, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, + 0x10, 0x1c, 0x12, 0x25, 0x0a, 0x21, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x1d, 0x12, 0x22, 0x0a, 0x1e, 0x42, 0x55, 0x53, + 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x49, + 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x53, 0x43, 0x4f, 0x52, 0x45, 0x10, 0x1e, 0x12, 0x1f, 0x0a, + 0x1b, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x50, 0x4f, 0x43, 0x48, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x1f, 0x12, 0x23, + 0x0a, 0x1f, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, + 0x45, 0x10, 0x20, 0x12, 0x20, 0x0a, 0x1c, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x4b, 0x45, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, + 0x49, 0x4e, 0x47, 0x10, 0x21, 0x12, 0x26, 0x0a, 0x22, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x50, + 0x41, 0x59, 0x4f, 0x55, 0x54, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x10, 0x22, 0x12, 0x1d, 0x0a, + 0x19, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x43, 0x48, 0x45, 0x43, 0x4b, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x23, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, - 0x54, 0x4f, 0x50, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, 0x3c, 0x12, 0x21, 0x0a, 0x1d, 0x42, - 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x55, - 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x3d, 0x12, 0x2c, - 0x0a, 0x28, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x46, 0x55, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x5f, - 0x44, 0x41, 0x54, 0x41, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x3e, 0x12, 0x1f, 0x0a, 0x1b, - 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, - 0x45, 0x41, 0x4d, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x3f, 0x12, 0x1f, 0x0a, + 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0x24, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x54, 0x45, 0x41, 0x4d, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x40, 0x12, 0x28, - 0x0a, 0x24, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x45, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x45, - 0x44, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x10, 0x41, 0x12, 0x26, 0x0a, 0x22, 0x42, 0x55, 0x53, 0x5f, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, - 0x45, 0x45, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x45, 0x44, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x10, 0x42, + 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x25, 0x12, 0x1c, + 0x0a, 0x18, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x56, 0x41, 0x52, 0x10, 0x26, 0x12, 0x21, 0x0a, 0x1d, + 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, + 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x53, 0x10, 0x27, 0x12, + 0x1b, 0x0a, 0x17, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x10, 0x28, 0x12, 0x24, 0x0a, 0x20, + 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, + 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x49, 0x4e, 0x47, + 0x10, 0x29, 0x12, 0x2f, 0x0a, 0x2b, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x52, 0x43, 0x32, 0x30, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, + 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x52, 0x5f, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x10, 0x2a, 0x12, 0x30, 0x0a, 0x2c, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x52, 0x43, 0x32, 0x30, 0x5f, 0x4d, 0x55, 0x4c, 0x54, + 0x49, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, + 0x4f, 0x4c, 0x44, 0x10, 0x2b, 0x12, 0x2f, 0x0a, 0x2b, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x52, 0x43, 0x32, 0x30, 0x5f, 0x4d, 0x55, + 0x4c, 0x54, 0x49, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x52, 0x5f, 0x41, + 0x44, 0x44, 0x45, 0x44, 0x10, 0x2c, 0x12, 0x31, 0x0a, 0x2d, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x52, 0x43, 0x32, 0x30, 0x5f, 0x4d, + 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x52, 0x5f, + 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x2d, 0x12, 0x21, 0x0a, 0x1d, 0x42, 0x55, 0x53, + 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x49, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x2e, 0x12, 0x28, 0x0a, 0x24, + 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, + 0x54, 0x48, 0x45, 0x52, 0x45, 0x55, 0x4d, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x54, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x2f, 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, + 0x4c, 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x10, 0x30, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x5f, 0x42, 0x4c, 0x4f, + 0x43, 0x4b, 0x10, 0x31, 0x12, 0x1c, 0x0a, 0x18, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x44, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, + 0x10, 0x32, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x50, + 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x33, 0x12, + 0x20, 0x0a, 0x1c, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, + 0x34, 0x12, 0x25, 0x0a, 0x21, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x10, 0x35, 0x12, 0x21, 0x0a, 0x1d, 0x42, 0x55, 0x53, 0x5f, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4e, 0x41, 0x50, 0x53, + 0x48, 0x4f, 0x54, 0x5f, 0x54, 0x41, 0x4b, 0x45, 0x4e, 0x10, 0x36, 0x12, 0x33, 0x0a, 0x2f, 0x42, + 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, + 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x44, + 0x41, 0x54, 0x41, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x37, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, 0x50, 0x52, 0x4f, 0x47, - 0x52, 0x41, 0x4d, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x43, 0x12, 0x2b, 0x0a, - 0x27, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, - 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x44, 0x12, 0x29, 0x0a, 0x25, 0x42, 0x55, + 0x50, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x45, 0x53, 0x53, 0x45, 0x44, 0x5f, 0x4f, 0x52, + 0x44, 0x45, 0x52, 0x53, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x38, 0x12, 0x21, 0x0a, + 0x1d, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x53, 0x10, 0x39, + 0x12, 0x27, 0x0a, 0x23, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x45, 0x53, 0x53, 0x45, 0x44, 0x5f, 0x50, 0x4f, + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x3a, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x53, + 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x50, 0x4f, 0x54, + 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, + 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x3b, 0x12, 0x1d, 0x0a, 0x19, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x4f, 0x52, + 0x44, 0x45, 0x52, 0x10, 0x3c, 0x12, 0x21, 0x0a, 0x1d, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x55, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, + 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x3d, 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, 0x53, 0x5f, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x55, 0x4e, 0x44, 0x49, + 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x50, + 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x3e, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x5f, 0x43, 0x52, + 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x3f, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x55, 0x53, 0x5f, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x5f, 0x55, + 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x40, 0x12, 0x28, 0x0a, 0x24, 0x42, 0x55, 0x53, 0x5f, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, + 0x45, 0x45, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x45, 0x44, 0x5f, 0x54, 0x45, 0x41, 0x4d, + 0x10, 0x41, 0x12, 0x26, 0x0a, 0x22, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x45, 0x5f, 0x4a, 0x4f, 0x49, + 0x4e, 0x45, 0x44, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x10, 0x42, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x46, - 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x5f, 0x45, 0x4e, - 0x44, 0x45, 0x44, 0x10, 0x45, 0x12, 0x27, 0x0a, 0x23, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, - 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, 0x41, 0x4c, - 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x46, 0x12, 0x2e, - 0x0a, 0x2a, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x45, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x45, 0x44, 0x5f, - 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x47, 0x12, 0x28, - 0x0a, 0x24, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x50, 0x41, 0x52, 0x54, 0x59, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, - 0x53, 0x54, 0x52, 0x45, 0x41, 0x4b, 0x10, 0x48, 0x12, 0x32, 0x0a, 0x2e, 0x42, 0x55, 0x53, 0x5f, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, - 0x45, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, - 0x41, 0x4d, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x49, 0x12, 0x32, 0x0a, 0x2e, - 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, - 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x50, - 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x4a, - 0x12, 0x30, 0x0a, 0x2c, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x55, - 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x5f, 0x45, 0x4e, 0x44, 0x45, 0x44, - 0x10, 0x4b, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, 0x53, 0x45, - 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, - 0x4c, 0x12, 0x28, 0x0a, 0x24, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x56, 0x45, 0x53, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x4d, 0x12, 0x30, 0x0a, 0x2c, 0x42, - 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x4f, - 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x4e, 0x12, 0x25, 0x0a, + 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x5f, 0x53, 0x54, + 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x43, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x53, 0x5f, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, + 0x41, 0x4c, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, + 0x45, 0x44, 0x10, 0x44, 0x12, 0x29, 0x0a, 0x25, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, + 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x5f, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x45, 0x12, + 0x27, 0x0a, 0x23, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x46, 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x53, 0x5f, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, + 0x45, 0x45, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, + 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x47, 0x12, 0x28, 0x0a, 0x24, 0x42, 0x55, 0x53, 0x5f, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x59, + 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4b, + 0x10, 0x48, 0x12, 0x32, 0x0a, 0x2e, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x43, + 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x5f, 0x53, 0x54, 0x41, + 0x52, 0x54, 0x45, 0x44, 0x10, 0x49, 0x12, 0x32, 0x0a, 0x2e, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, + 0x44, 0x49, 0x53, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, + 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x4a, 0x12, 0x30, 0x0a, 0x2c, 0x42, 0x55, + 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x4f, 0x4c, + 0x55, 0x4d, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, + 0x47, 0x52, 0x41, 0x4d, 0x5f, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x4b, 0x12, 0x2d, 0x0a, 0x29, + 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, + 0x45, 0x46, 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x4c, 0x12, 0x28, 0x0a, 0x24, 0x42, + 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x45, + 0x53, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, + 0x54, 0x45, 0x44, 0x10, 0x4d, 0x12, 0x30, 0x0a, 0x2c, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x44, + 0x49, 0x53, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x53, 0x5f, 0x55, 0x50, + 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x4e, 0x12, 0x25, 0x0a, 0x21, 0x42, 0x55, 0x53, 0x5f, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x4f, 0x12, 0x23, + 0x0a, 0x1f, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x46, 0x55, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, + 0x53, 0x10, 0x50, 0x12, 0x34, 0x0a, 0x30, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x41, 0x49, 0x44, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, + 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x53, 0x5f, + 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x51, 0x12, 0x22, 0x0a, 0x1e, 0x42, 0x55, 0x53, + 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x45, 0x53, 0x54, + 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x55, 0x4d, 0x4d, 0x41, 0x52, 0x59, 0x10, 0x52, 0x12, 0x25, 0x0a, 0x21, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x46, 0x45, 0x45, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, - 0x45, 0x44, 0x10, 0x4f, 0x12, 0x23, 0x0a, 0x1f, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x55, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x50, - 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x53, 0x10, 0x50, 0x12, 0x34, 0x0a, 0x30, 0x42, 0x55, 0x53, - 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x41, 0x49, 0x44, - 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x51, 0x12, - 0x22, 0x0a, 0x1e, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x56, 0x45, 0x53, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x55, 0x4d, 0x4d, 0x41, 0x52, - 0x59, 0x10, 0x52, 0x12, 0x25, 0x0a, 0x21, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x46, - 0x45, 0x45, 0x53, 0x5f, 0x50, 0x41, 0x49, 0x44, 0x10, 0x53, 0x12, 0x19, 0x0a, 0x15, 0x42, 0x55, - 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, - 0x4b, 0x45, 0x54, 0x10, 0x65, 0x12, 0x1c, 0x0a, 0x17, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, - 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x58, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x10, 0xc9, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, 0x50, 0x41, + 0x49, 0x44, 0x10, 0x53, 0x12, 0x31, 0x0a, 0x2d, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, + 0x46, 0x45, 0x45, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x55, 0x50, + 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x54, 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, 0x53, 0x5f, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x59, 0x5f, + 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, + 0x54, 0x45, 0x44, 0x10, 0x55, 0x12, 0x28, 0x0a, 0x24, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x59, 0x5f, 0x50, 0x52, + 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x56, 0x12, + 0x26, 0x0a, 0x22, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x53, 0x5f, 0x55, 0x50, + 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x57, 0x12, 0x19, 0x0a, 0x15, 0x42, 0x55, 0x53, 0x5f, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, + 0x10, 0x65, 0x12, 0x1c, 0x0a, 0x17, 0x42, 0x55, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x58, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0xc9, 0x01, + 0x42, 0x31, 0x5a, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -10729,7 +11443,7 @@ func file_vega_events_v1_events_proto_rawDescGZIP() []byte { } var file_vega_events_v1_events_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_vega_events_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 82) +var file_vega_events_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 88) var file_vega_events_v1_events_proto_goTypes = []interface{}{ (ProtocolUpgradeProposalStatus)(0), // 0: vega.events.v1.ProtocolUpgradeProposalStatus (BusEventType)(0), // 1: vega.events.v1.BusEventType @@ -10774,104 +11488,116 @@ var file_vega_events_v1_events_proto_goTypes = []interface{}{ (*DelegationBalanceEvent)(nil), // 40: vega.events.v1.DelegationBalanceEvent (*MarketEvent)(nil), // 41: vega.events.v1.MarketEvent (*TransferFees)(nil), // 42: vega.events.v1.TransferFees - (*TransactionResult)(nil), // 43: vega.events.v1.TransactionResult - (*TxErrorEvent)(nil), // 44: vega.events.v1.TxErrorEvent - (*TimeUpdate)(nil), // 45: vega.events.v1.TimeUpdate - (*EpochEvent)(nil), // 46: vega.events.v1.EpochEvent - (*LedgerMovements)(nil), // 47: vega.events.v1.LedgerMovements - (*PositionResolution)(nil), // 48: vega.events.v1.PositionResolution - (*LossSocialization)(nil), // 49: vega.events.v1.LossSocialization - (*TradeSettlement)(nil), // 50: vega.events.v1.TradeSettlement - (*SettlePosition)(nil), // 51: vega.events.v1.SettlePosition - (*SettleMarket)(nil), // 52: vega.events.v1.SettleMarket - (*PositionStateEvent)(nil), // 53: vega.events.v1.PositionStateEvent - (*SettleDistressed)(nil), // 54: vega.events.v1.SettleDistressed - (*DistressedOrders)(nil), // 55: vega.events.v1.DistressedOrders - (*DistressedPositions)(nil), // 56: vega.events.v1.DistressedPositions - (*MarketTick)(nil), // 57: vega.events.v1.MarketTick - (*AuctionEvent)(nil), // 58: vega.events.v1.AuctionEvent - (*ValidatorUpdate)(nil), // 59: vega.events.v1.ValidatorUpdate - (*ValidatorRankingEvent)(nil), // 60: vega.events.v1.ValidatorRankingEvent - (*KeyRotation)(nil), // 61: vega.events.v1.KeyRotation - (*EthereumKeyRotation)(nil), // 62: vega.events.v1.EthereumKeyRotation - (*ProtocolUpgradeEvent)(nil), // 63: vega.events.v1.ProtocolUpgradeEvent - (*StateVar)(nil), // 64: vega.events.v1.StateVar - (*BeginBlock)(nil), // 65: vega.events.v1.BeginBlock - (*EndBlock)(nil), // 66: vega.events.v1.EndBlock - (*ProtocolUpgradeStarted)(nil), // 67: vega.events.v1.ProtocolUpgradeStarted - (*ProtocolUpgradeDataNodeReady)(nil), // 68: vega.events.v1.ProtocolUpgradeDataNodeReady - (*CoreSnapshotData)(nil), // 69: vega.events.v1.CoreSnapshotData - (*ExpiredOrders)(nil), // 70: vega.events.v1.ExpiredOrders - (*TeamCreated)(nil), // 71: vega.events.v1.TeamCreated - (*TeamUpdated)(nil), // 72: vega.events.v1.TeamUpdated - (*RefereeSwitchedTeam)(nil), // 73: vega.events.v1.RefereeSwitchedTeam - (*RefereeJoinedTeam)(nil), // 74: vega.events.v1.RefereeJoinedTeam - (*ReferralSetCreated)(nil), // 75: vega.events.v1.ReferralSetCreated - (*ReferralSetStatsUpdated)(nil), // 76: vega.events.v1.ReferralSetStatsUpdated - (*RefereeStats)(nil), // 77: vega.events.v1.RefereeStats - (*RefereeJoinedReferralSet)(nil), // 78: vega.events.v1.RefereeJoinedReferralSet - (*ReferralProgramStarted)(nil), // 79: vega.events.v1.ReferralProgramStarted - (*ReferralProgramUpdated)(nil), // 80: vega.events.v1.ReferralProgramUpdated - (*ReferralProgramEnded)(nil), // 81: vega.events.v1.ReferralProgramEnded - (*VolumeDiscountProgramStarted)(nil), // 82: vega.events.v1.VolumeDiscountProgramStarted - (*VolumeDiscountProgramUpdated)(nil), // 83: vega.events.v1.VolumeDiscountProgramUpdated - (*VolumeDiscountProgramEnded)(nil), // 84: vega.events.v1.VolumeDiscountProgramEnded - (*PaidLiquidityFeesStats)(nil), // 85: vega.events.v1.PaidLiquidityFeesStats - (*BusEvent)(nil), // 86: vega.events.v1.BusEvent - (*TransactionResult_SuccessDetails)(nil), // 87: vega.events.v1.TransactionResult.SuccessDetails - (*TransactionResult_FailureDetails)(nil), // 88: vega.events.v1.TransactionResult.FailureDetails - (*v1.OrderSubmission)(nil), // 89: vega.commands.v1.OrderSubmission - (*vega.StopOrder)(nil), // 90: vega.StopOrder - (vega.AccountType)(0), // 91: vega.AccountType - (*vega.DispatchStrategy)(nil), // 92: vega.DispatchStrategy - (*v1.OrderAmendment)(nil), // 93: vega.commands.v1.OrderAmendment - (*v1.OrderCancellation)(nil), // 94: vega.commands.v1.OrderCancellation - (*v1.ProposalSubmission)(nil), // 95: vega.commands.v1.ProposalSubmission - (*v1.VoteSubmission)(nil), // 96: vega.commands.v1.VoteSubmission - (*v1.LiquidityProvisionSubmission)(nil), // 97: vega.commands.v1.LiquidityProvisionSubmission - (*v1.WithdrawSubmission)(nil), // 98: vega.commands.v1.WithdrawSubmission - (*v1.DelegateSubmission)(nil), // 99: vega.commands.v1.DelegateSubmission - (*v1.UndelegateSubmission)(nil), // 100: vega.commands.v1.UndelegateSubmission - (*v1.LiquidityProvisionCancellation)(nil), // 101: vega.commands.v1.LiquidityProvisionCancellation - (*v1.LiquidityProvisionAmendment)(nil), // 102: vega.commands.v1.LiquidityProvisionAmendment - (*v1.Transfer)(nil), // 103: vega.commands.v1.Transfer - (*v1.CancelTransfer)(nil), // 104: vega.commands.v1.CancelTransfer - (*v1.AnnounceNode)(nil), // 105: vega.commands.v1.AnnounceNode - (*v1.OracleDataSubmission)(nil), // 106: vega.commands.v1.OracleDataSubmission - (*v1.ProtocolUpgradeProposal)(nil), // 107: vega.commands.v1.ProtocolUpgradeProposal - (*v1.IssueSignatures)(nil), // 108: vega.commands.v1.IssueSignatures - (*v1.BatchMarketInstructions)(nil), // 109: vega.commands.v1.BatchMarketInstructions - (*v1.KeyRotateSubmission)(nil), // 110: vega.commands.v1.KeyRotateSubmission - (*v1.EthereumKeyRotateSubmission)(nil), // 111: vega.commands.v1.EthereumKeyRotateSubmission - (*v1.StopOrdersSubmission)(nil), // 112: vega.commands.v1.StopOrdersSubmission - (*v1.StopOrdersCancellation)(nil), // 113: vega.commands.v1.StopOrdersCancellation - (*v1.CreateReferralSet)(nil), // 114: vega.commands.v1.CreateReferralSet - (*v1.UpdateReferralSet)(nil), // 115: vega.commands.v1.UpdateReferralSet - (*v1.ApplyReferralCode)(nil), // 116: vega.commands.v1.ApplyReferralCode - (vega.EpochAction)(0), // 117: vega.EpochAction - (*vega.LedgerMovement)(nil), // 118: vega.LedgerMovement - (vega.AuctionTrigger)(0), // 119: vega.AuctionTrigger - (*vega.ReferralProgram)(nil), // 120: vega.ReferralProgram - (*vega.VolumeDiscountProgram)(nil), // 121: vega.VolumeDiscountProgram - (*vega.Order)(nil), // 122: vega.Order - (*vega.Account)(nil), // 123: vega.Account - (*vega.Party)(nil), // 124: vega.Party - (*vega.Trade)(nil), // 125: vega.Trade - (*vega.MarginLevels)(nil), // 126: vega.MarginLevels - (*vega.Proposal)(nil), // 127: vega.Proposal - (*vega.Vote)(nil), // 128: vega.Vote - (*vega.MarketData)(nil), // 129: vega.MarketData - (*v1.NodeSignature)(nil), // 130: vega.commands.v1.NodeSignature - (*vega.Market)(nil), // 131: vega.Market - (*vega.Asset)(nil), // 132: vega.Asset - (*vega.Withdrawal)(nil), // 133: vega.Withdrawal - (*vega.Deposit)(nil), // 134: vega.Deposit - (*vega.RiskFactor)(nil), // 135: vega.RiskFactor - (*vega.NetworkParameter)(nil), // 136: vega.NetworkParameter - (*vega.LiquidityProvision)(nil), // 137: vega.LiquidityProvision - (*vega.OracleSpec)(nil), // 138: vega.OracleSpec - (*vega.OracleData)(nil), // 139: vega.OracleData - (*vega.NetworkLimits)(nil), // 140: vega.NetworkLimits + (*TransferFeesDiscount)(nil), // 43: vega.events.v1.TransferFeesDiscount + (*TransactionResult)(nil), // 44: vega.events.v1.TransactionResult + (*TxErrorEvent)(nil), // 45: vega.events.v1.TxErrorEvent + (*TimeUpdate)(nil), // 46: vega.events.v1.TimeUpdate + (*EpochEvent)(nil), // 47: vega.events.v1.EpochEvent + (*LedgerMovements)(nil), // 48: vega.events.v1.LedgerMovements + (*PositionResolution)(nil), // 49: vega.events.v1.PositionResolution + (*LossSocialization)(nil), // 50: vega.events.v1.LossSocialization + (*TradeSettlement)(nil), // 51: vega.events.v1.TradeSettlement + (*SettlePosition)(nil), // 52: vega.events.v1.SettlePosition + (*SettleMarket)(nil), // 53: vega.events.v1.SettleMarket + (*PositionStateEvent)(nil), // 54: vega.events.v1.PositionStateEvent + (*SettleDistressed)(nil), // 55: vega.events.v1.SettleDistressed + (*DistressedOrders)(nil), // 56: vega.events.v1.DistressedOrders + (*DistressedPositions)(nil), // 57: vega.events.v1.DistressedPositions + (*MarketTick)(nil), // 58: vega.events.v1.MarketTick + (*AuctionEvent)(nil), // 59: vega.events.v1.AuctionEvent + (*ValidatorUpdate)(nil), // 60: vega.events.v1.ValidatorUpdate + (*ValidatorRankingEvent)(nil), // 61: vega.events.v1.ValidatorRankingEvent + (*KeyRotation)(nil), // 62: vega.events.v1.KeyRotation + (*EthereumKeyRotation)(nil), // 63: vega.events.v1.EthereumKeyRotation + (*ProtocolUpgradeEvent)(nil), // 64: vega.events.v1.ProtocolUpgradeEvent + (*StateVar)(nil), // 65: vega.events.v1.StateVar + (*BeginBlock)(nil), // 66: vega.events.v1.BeginBlock + (*EndBlock)(nil), // 67: vega.events.v1.EndBlock + (*ProtocolUpgradeStarted)(nil), // 68: vega.events.v1.ProtocolUpgradeStarted + (*ProtocolUpgradeDataNodeReady)(nil), // 69: vega.events.v1.ProtocolUpgradeDataNodeReady + (*CoreSnapshotData)(nil), // 70: vega.events.v1.CoreSnapshotData + (*ExpiredOrders)(nil), // 71: vega.events.v1.ExpiredOrders + (*TeamCreated)(nil), // 72: vega.events.v1.TeamCreated + (*TeamUpdated)(nil), // 73: vega.events.v1.TeamUpdated + (*RefereeSwitchedTeam)(nil), // 74: vega.events.v1.RefereeSwitchedTeam + (*RefereeJoinedTeam)(nil), // 75: vega.events.v1.RefereeJoinedTeam + (*ReferralSetCreated)(nil), // 76: vega.events.v1.ReferralSetCreated + (*ReferralSetStatsUpdated)(nil), // 77: vega.events.v1.ReferralSetStatsUpdated + (*RefereeStats)(nil), // 78: vega.events.v1.RefereeStats + (*RefereeJoinedReferralSet)(nil), // 79: vega.events.v1.RefereeJoinedReferralSet + (*ReferralProgramStarted)(nil), // 80: vega.events.v1.ReferralProgramStarted + (*ReferralProgramUpdated)(nil), // 81: vega.events.v1.ReferralProgramUpdated + (*ReferralProgramEnded)(nil), // 82: vega.events.v1.ReferralProgramEnded + (*VolumeDiscountProgramStarted)(nil), // 83: vega.events.v1.VolumeDiscountProgramStarted + (*VolumeDiscountProgramUpdated)(nil), // 84: vega.events.v1.VolumeDiscountProgramUpdated + (*VolumeDiscountProgramEnded)(nil), // 85: vega.events.v1.VolumeDiscountProgramEnded + (*PaidLiquidityFeesStats)(nil), // 86: vega.events.v1.PaidLiquidityFeesStats + (*PartyMarginModeUpdated)(nil), // 87: vega.events.v1.PartyMarginModeUpdated + (*PartyProfileUpdated)(nil), // 88: vega.events.v1.PartyProfileUpdated + (*TeamsStatsUpdated)(nil), // 89: vega.events.v1.TeamsStatsUpdated + (*TeamStats)(nil), // 90: vega.events.v1.TeamStats + (*TeamMemberStats)(nil), // 91: vega.events.v1.TeamMemberStats + (*BusEvent)(nil), // 92: vega.events.v1.BusEvent + (*TransactionResult_SuccessDetails)(nil), // 93: vega.events.v1.TransactionResult.SuccessDetails + (*TransactionResult_FailureDetails)(nil), // 94: vega.events.v1.TransactionResult.FailureDetails + (*v1.OrderSubmission)(nil), // 95: vega.commands.v1.OrderSubmission + (*vega.StopOrder)(nil), // 96: vega.StopOrder + (vega.AccountType)(0), // 97: vega.AccountType + (*vega.DispatchStrategy)(nil), // 98: vega.DispatchStrategy + (*v1.OrderAmendment)(nil), // 99: vega.commands.v1.OrderAmendment + (*v1.OrderCancellation)(nil), // 100: vega.commands.v1.OrderCancellation + (*v1.ProposalSubmission)(nil), // 101: vega.commands.v1.ProposalSubmission + (*v1.VoteSubmission)(nil), // 102: vega.commands.v1.VoteSubmission + (*v1.LiquidityProvisionSubmission)(nil), // 103: vega.commands.v1.LiquidityProvisionSubmission + (*v1.WithdrawSubmission)(nil), // 104: vega.commands.v1.WithdrawSubmission + (*v1.DelegateSubmission)(nil), // 105: vega.commands.v1.DelegateSubmission + (*v1.UndelegateSubmission)(nil), // 106: vega.commands.v1.UndelegateSubmission + (*v1.LiquidityProvisionCancellation)(nil), // 107: vega.commands.v1.LiquidityProvisionCancellation + (*v1.LiquidityProvisionAmendment)(nil), // 108: vega.commands.v1.LiquidityProvisionAmendment + (*v1.Transfer)(nil), // 109: vega.commands.v1.Transfer + (*v1.CancelTransfer)(nil), // 110: vega.commands.v1.CancelTransfer + (*v1.AnnounceNode)(nil), // 111: vega.commands.v1.AnnounceNode + (*v1.OracleDataSubmission)(nil), // 112: vega.commands.v1.OracleDataSubmission + (*v1.ProtocolUpgradeProposal)(nil), // 113: vega.commands.v1.ProtocolUpgradeProposal + (*v1.IssueSignatures)(nil), // 114: vega.commands.v1.IssueSignatures + (*v1.BatchMarketInstructions)(nil), // 115: vega.commands.v1.BatchMarketInstructions + (*v1.KeyRotateSubmission)(nil), // 116: vega.commands.v1.KeyRotateSubmission + (*v1.EthereumKeyRotateSubmission)(nil), // 117: vega.commands.v1.EthereumKeyRotateSubmission + (*v1.StopOrdersSubmission)(nil), // 118: vega.commands.v1.StopOrdersSubmission + (*v1.StopOrdersCancellation)(nil), // 119: vega.commands.v1.StopOrdersCancellation + (*v1.CreateReferralSet)(nil), // 120: vega.commands.v1.CreateReferralSet + (*v1.UpdateReferralSet)(nil), // 121: vega.commands.v1.UpdateReferralSet + (*v1.ApplyReferralCode)(nil), // 122: vega.commands.v1.ApplyReferralCode + (*v1.UpdateMarginMode)(nil), // 123: vega.commands.v1.UpdateMarginMode + (*v1.JoinTeam)(nil), // 124: vega.commands.v1.JoinTeam + (*v1.BatchProposalSubmission)(nil), // 125: vega.commands.v1.BatchProposalSubmission + (*v1.UpdatePartyProfile)(nil), // 126: vega.commands.v1.UpdatePartyProfile + (vega.EpochAction)(0), // 127: vega.EpochAction + (*vega.LedgerMovement)(nil), // 128: vega.LedgerMovement + (vega.AuctionTrigger)(0), // 129: vega.AuctionTrigger + (*vega.ReferralProgram)(nil), // 130: vega.ReferralProgram + (*vega.VolumeDiscountProgram)(nil), // 131: vega.VolumeDiscountProgram + (vega.MarginMode)(0), // 132: vega.MarginMode + (*vega.PartyProfile)(nil), // 133: vega.PartyProfile + (*vega.Order)(nil), // 134: vega.Order + (*vega.Account)(nil), // 135: vega.Account + (*vega.Party)(nil), // 136: vega.Party + (*vega.Trade)(nil), // 137: vega.Trade + (*vega.MarginLevels)(nil), // 138: vega.MarginLevels + (*vega.Proposal)(nil), // 139: vega.Proposal + (*vega.Vote)(nil), // 140: vega.Vote + (*vega.MarketData)(nil), // 141: vega.MarketData + (*v1.NodeSignature)(nil), // 142: vega.commands.v1.NodeSignature + (*vega.Market)(nil), // 143: vega.Market + (*vega.Asset)(nil), // 144: vega.Asset + (*vega.Withdrawal)(nil), // 145: vega.Withdrawal + (*vega.Deposit)(nil), // 146: vega.Deposit + (*vega.RiskFactor)(nil), // 147: vega.RiskFactor + (*vega.NetworkParameter)(nil), // 148: vega.NetworkParameter + (*vega.LiquidityProvision)(nil), // 149: vega.LiquidityProvision + (*vega.OracleSpec)(nil), // 150: vega.OracleSpec + (*vega.OracleData)(nil), // 151: vega.OracleData + (*vega.NetworkLimits)(nil), // 152: vega.NetworkLimits } var file_vega_events_v1_events_proto_depIdxs = []int32{ 8, // 0: vega.events.v1.VestingBalancesSummary.parties_vesting_summary:type_name -> vega.events.v1.PartyVestingSummary @@ -10885,170 +11611,183 @@ var file_vega_events_v1_events_proto_depIdxs = []int32{ 18, // 8: vega.events.v1.FeesStats.volume_discount_applied:type_name -> vega.events.v1.PartyAmount 18, // 9: vega.events.v1.FeesStats.total_maker_fees_received:type_name -> vega.events.v1.PartyAmount 17, // 10: vega.events.v1.FeesStats.maker_fees_generated:type_name -> vega.events.v1.MakerFeesGenerated - 18, // 11: vega.events.v1.ReferrerRewardsGenerated.generated_reward:type_name -> vega.events.v1.PartyAmount - 18, // 12: vega.events.v1.MakerFeesGenerated.maker_fees_paid:type_name -> vega.events.v1.PartyAmount - 21, // 13: vega.events.v1.FundingPayments.payments:type_name -> vega.events.v1.FundingPayment - 2, // 14: vega.events.v1.FundingPeriodDataPoint.data_point_type:type_name -> vega.events.v1.FundingPeriodDataPoint.Source - 89, // 15: vega.events.v1.StopOrderEvent.submission:type_name -> vega.commands.v1.OrderSubmission - 90, // 16: vega.events.v1.StopOrderEvent.stop_order:type_name -> vega.StopOrder - 26, // 17: vega.events.v1.ERC20MultiSigSignerRemoved.signature_submitters:type_name -> vega.events.v1.ERC20MultiSigSignerRemovedSubmitter - 91, // 18: vega.events.v1.Transfer.from_account_type:type_name -> vega.AccountType - 91, // 19: vega.events.v1.Transfer.to_account_type:type_name -> vega.AccountType - 3, // 20: vega.events.v1.Transfer.status:type_name -> vega.events.v1.Transfer.Status - 30, // 21: vega.events.v1.Transfer.one_off:type_name -> vega.events.v1.OneOffTransfer - 31, // 22: vega.events.v1.Transfer.recurring:type_name -> vega.events.v1.RecurringTransfer - 29, // 23: vega.events.v1.Transfer.one_off_governance:type_name -> vega.events.v1.OneOffGovernanceTransfer - 32, // 24: vega.events.v1.Transfer.recurring_governance:type_name -> vega.events.v1.RecurringGovernanceTransfer - 92, // 25: vega.events.v1.RecurringTransfer.dispatch_strategy:type_name -> vega.DispatchStrategy - 92, // 26: vega.events.v1.RecurringGovernanceTransfer.dispatch_strategy:type_name -> vega.DispatchStrategy - 4, // 27: vega.events.v1.StakeLinking.type:type_name -> vega.events.v1.StakeLinking.Type - 5, // 28: vega.events.v1.StakeLinking.status:type_name -> vega.events.v1.StakeLinking.Status - 6, // 29: vega.events.v1.ERC20MultiSigSignerEvent.type:type_name -> vega.events.v1.ERC20MultiSigSignerEvent.Type - 89, // 30: vega.events.v1.TransactionResult.order_submission:type_name -> vega.commands.v1.OrderSubmission - 93, // 31: vega.events.v1.TransactionResult.order_amendment:type_name -> vega.commands.v1.OrderAmendment - 94, // 32: vega.events.v1.TransactionResult.order_cancellation:type_name -> vega.commands.v1.OrderCancellation - 95, // 33: vega.events.v1.TransactionResult.proposal:type_name -> vega.commands.v1.ProposalSubmission - 96, // 34: vega.events.v1.TransactionResult.vote_submission:type_name -> vega.commands.v1.VoteSubmission - 97, // 35: vega.events.v1.TransactionResult.liquidity_provision_submission:type_name -> vega.commands.v1.LiquidityProvisionSubmission - 98, // 36: vega.events.v1.TransactionResult.withdraw_submission:type_name -> vega.commands.v1.WithdrawSubmission - 99, // 37: vega.events.v1.TransactionResult.delegate_submission:type_name -> vega.commands.v1.DelegateSubmission - 100, // 38: vega.events.v1.TransactionResult.undelegate_submission:type_name -> vega.commands.v1.UndelegateSubmission - 101, // 39: vega.events.v1.TransactionResult.liquidity_provision_cancellation:type_name -> vega.commands.v1.LiquidityProvisionCancellation - 102, // 40: vega.events.v1.TransactionResult.liquidity_provision_amendment:type_name -> vega.commands.v1.LiquidityProvisionAmendment - 103, // 41: vega.events.v1.TransactionResult.transfer:type_name -> vega.commands.v1.Transfer - 104, // 42: vega.events.v1.TransactionResult.cancel_transfer:type_name -> vega.commands.v1.CancelTransfer - 105, // 43: vega.events.v1.TransactionResult.announce_node:type_name -> vega.commands.v1.AnnounceNode - 106, // 44: vega.events.v1.TransactionResult.oracle_data_submission:type_name -> vega.commands.v1.OracleDataSubmission - 107, // 45: vega.events.v1.TransactionResult.protocol_upgrade_proposal:type_name -> vega.commands.v1.ProtocolUpgradeProposal - 108, // 46: vega.events.v1.TransactionResult.issue_signatures:type_name -> vega.commands.v1.IssueSignatures - 109, // 47: vega.events.v1.TransactionResult.batch_market_instructions:type_name -> vega.commands.v1.BatchMarketInstructions - 110, // 48: vega.events.v1.TransactionResult.key_rotate_submission:type_name -> vega.commands.v1.KeyRotateSubmission - 111, // 49: vega.events.v1.TransactionResult.ethereum_key_rotate_submission:type_name -> vega.commands.v1.EthereumKeyRotateSubmission - 112, // 50: vega.events.v1.TransactionResult.stop_order_submission:type_name -> vega.commands.v1.StopOrdersSubmission - 113, // 51: vega.events.v1.TransactionResult.stop_order_cancellation:type_name -> vega.commands.v1.StopOrdersCancellation - 114, // 52: vega.events.v1.TransactionResult.create_referral_set:type_name -> vega.commands.v1.CreateReferralSet - 115, // 53: vega.events.v1.TransactionResult.update_referral_set:type_name -> vega.commands.v1.UpdateReferralSet - 116, // 54: vega.events.v1.TransactionResult.apply_referral_code:type_name -> vega.commands.v1.ApplyReferralCode - 87, // 55: vega.events.v1.TransactionResult.success:type_name -> vega.events.v1.TransactionResult.SuccessDetails - 88, // 56: vega.events.v1.TransactionResult.failure:type_name -> vega.events.v1.TransactionResult.FailureDetails - 89, // 57: vega.events.v1.TxErrorEvent.order_submission:type_name -> vega.commands.v1.OrderSubmission - 93, // 58: vega.events.v1.TxErrorEvent.order_amendment:type_name -> vega.commands.v1.OrderAmendment - 94, // 59: vega.events.v1.TxErrorEvent.order_cancellation:type_name -> vega.commands.v1.OrderCancellation - 95, // 60: vega.events.v1.TxErrorEvent.proposal:type_name -> vega.commands.v1.ProposalSubmission - 96, // 61: vega.events.v1.TxErrorEvent.vote_submission:type_name -> vega.commands.v1.VoteSubmission - 97, // 62: vega.events.v1.TxErrorEvent.liquidity_provision_submission:type_name -> vega.commands.v1.LiquidityProvisionSubmission - 98, // 63: vega.events.v1.TxErrorEvent.withdraw_submission:type_name -> vega.commands.v1.WithdrawSubmission - 99, // 64: vega.events.v1.TxErrorEvent.delegate_submission:type_name -> vega.commands.v1.DelegateSubmission - 100, // 65: vega.events.v1.TxErrorEvent.undelegate_submission:type_name -> vega.commands.v1.UndelegateSubmission - 101, // 66: vega.events.v1.TxErrorEvent.liquidity_provision_cancellation:type_name -> vega.commands.v1.LiquidityProvisionCancellation - 102, // 67: vega.events.v1.TxErrorEvent.liquidity_provision_amendment:type_name -> vega.commands.v1.LiquidityProvisionAmendment - 103, // 68: vega.events.v1.TxErrorEvent.transfer:type_name -> vega.commands.v1.Transfer - 104, // 69: vega.events.v1.TxErrorEvent.cancel_transfer:type_name -> vega.commands.v1.CancelTransfer - 105, // 70: vega.events.v1.TxErrorEvent.announce_node:type_name -> vega.commands.v1.AnnounceNode - 106, // 71: vega.events.v1.TxErrorEvent.oracle_data_submission:type_name -> vega.commands.v1.OracleDataSubmission - 107, // 72: vega.events.v1.TxErrorEvent.protocol_upgrade_proposal:type_name -> vega.commands.v1.ProtocolUpgradeProposal - 108, // 73: vega.events.v1.TxErrorEvent.issue_signatures:type_name -> vega.commands.v1.IssueSignatures - 109, // 74: vega.events.v1.TxErrorEvent.batch_market_instructions:type_name -> vega.commands.v1.BatchMarketInstructions - 117, // 75: vega.events.v1.EpochEvent.action:type_name -> vega.EpochAction - 118, // 76: vega.events.v1.LedgerMovements.ledger_movements:type_name -> vega.LedgerMovement - 50, // 77: vega.events.v1.SettlePosition.trade_settlements:type_name -> vega.events.v1.TradeSettlement - 119, // 78: vega.events.v1.AuctionEvent.trigger:type_name -> vega.AuctionTrigger - 119, // 79: vega.events.v1.AuctionEvent.extension_trigger:type_name -> vega.AuctionTrigger - 0, // 80: vega.events.v1.ProtocolUpgradeEvent.status:type_name -> vega.events.v1.ProtocolUpgradeProposalStatus - 77, // 81: vega.events.v1.ReferralSetStatsUpdated.referees_stats:type_name -> vega.events.v1.RefereeStats - 120, // 82: vega.events.v1.ReferralProgramStarted.program:type_name -> vega.ReferralProgram - 120, // 83: vega.events.v1.ReferralProgramUpdated.program:type_name -> vega.ReferralProgram - 121, // 84: vega.events.v1.VolumeDiscountProgramStarted.program:type_name -> vega.VolumeDiscountProgram - 121, // 85: vega.events.v1.VolumeDiscountProgramUpdated.program:type_name -> vega.VolumeDiscountProgram - 18, // 86: vega.events.v1.PaidLiquidityFeesStats.fees_paid_per_party:type_name -> vega.events.v1.PartyAmount - 1, // 87: vega.events.v1.BusEvent.type:type_name -> vega.events.v1.BusEventType - 45, // 88: vega.events.v1.BusEvent.time_update:type_name -> vega.events.v1.TimeUpdate - 47, // 89: vega.events.v1.BusEvent.ledger_movements:type_name -> vega.events.v1.LedgerMovements - 48, // 90: vega.events.v1.BusEvent.position_resolution:type_name -> vega.events.v1.PositionResolution - 122, // 91: vega.events.v1.BusEvent.order:type_name -> vega.Order - 123, // 92: vega.events.v1.BusEvent.account:type_name -> vega.Account - 124, // 93: vega.events.v1.BusEvent.party:type_name -> vega.Party - 125, // 94: vega.events.v1.BusEvent.trade:type_name -> vega.Trade - 126, // 95: vega.events.v1.BusEvent.margin_levels:type_name -> vega.MarginLevels - 127, // 96: vega.events.v1.BusEvent.proposal:type_name -> vega.Proposal - 128, // 97: vega.events.v1.BusEvent.vote:type_name -> vega.Vote - 129, // 98: vega.events.v1.BusEvent.market_data:type_name -> vega.MarketData - 130, // 99: vega.events.v1.BusEvent.node_signature:type_name -> vega.commands.v1.NodeSignature - 49, // 100: vega.events.v1.BusEvent.loss_socialization:type_name -> vega.events.v1.LossSocialization - 51, // 101: vega.events.v1.BusEvent.settle_position:type_name -> vega.events.v1.SettlePosition - 54, // 102: vega.events.v1.BusEvent.settle_distressed:type_name -> vega.events.v1.SettleDistressed - 131, // 103: vega.events.v1.BusEvent.market_created:type_name -> vega.Market - 132, // 104: vega.events.v1.BusEvent.asset:type_name -> vega.Asset - 57, // 105: vega.events.v1.BusEvent.market_tick:type_name -> vega.events.v1.MarketTick - 133, // 106: vega.events.v1.BusEvent.withdrawal:type_name -> vega.Withdrawal - 134, // 107: vega.events.v1.BusEvent.deposit:type_name -> vega.Deposit - 58, // 108: vega.events.v1.BusEvent.auction:type_name -> vega.events.v1.AuctionEvent - 135, // 109: vega.events.v1.BusEvent.risk_factor:type_name -> vega.RiskFactor - 136, // 110: vega.events.v1.BusEvent.network_parameter:type_name -> vega.NetworkParameter - 137, // 111: vega.events.v1.BusEvent.liquidity_provision:type_name -> vega.LiquidityProvision - 131, // 112: vega.events.v1.BusEvent.market_updated:type_name -> vega.Market - 138, // 113: vega.events.v1.BusEvent.oracle_spec:type_name -> vega.OracleSpec - 139, // 114: vega.events.v1.BusEvent.oracle_data:type_name -> vega.OracleData - 40, // 115: vega.events.v1.BusEvent.delegation_balance:type_name -> vega.events.v1.DelegationBalanceEvent - 39, // 116: vega.events.v1.BusEvent.validator_score:type_name -> vega.events.v1.ValidatorScoreEvent - 46, // 117: vega.events.v1.BusEvent.epoch_event:type_name -> vega.events.v1.EpochEvent - 59, // 118: vega.events.v1.BusEvent.validator_update:type_name -> vega.events.v1.ValidatorUpdate - 33, // 119: vega.events.v1.BusEvent.stake_linking:type_name -> vega.events.v1.StakeLinking - 38, // 120: vega.events.v1.BusEvent.reward_payout:type_name -> vega.events.v1.RewardPayoutEvent - 36, // 121: vega.events.v1.BusEvent.checkpoint:type_name -> vega.events.v1.CheckpointEvent - 61, // 122: vega.events.v1.BusEvent.key_rotation:type_name -> vega.events.v1.KeyRotation - 64, // 123: vega.events.v1.BusEvent.state_var:type_name -> vega.events.v1.StateVar - 140, // 124: vega.events.v1.BusEvent.network_limits:type_name -> vega.NetworkLimits - 28, // 125: vega.events.v1.BusEvent.transfer:type_name -> vega.events.v1.Transfer - 60, // 126: vega.events.v1.BusEvent.ranking_event:type_name -> vega.events.v1.ValidatorRankingEvent - 34, // 127: vega.events.v1.BusEvent.erc20_multisig_signer_event:type_name -> vega.events.v1.ERC20MultiSigSignerEvent - 35, // 128: vega.events.v1.BusEvent.erc20_multisig_set_threshold_event:type_name -> vega.events.v1.ERC20MultiSigThresholdSetEvent - 25, // 129: vega.events.v1.BusEvent.erc20_multisig_signer_added:type_name -> vega.events.v1.ERC20MultiSigSignerAdded - 27, // 130: vega.events.v1.BusEvent.erc20_multisig_signer_removed:type_name -> vega.events.v1.ERC20MultiSigSignerRemoved - 53, // 131: vega.events.v1.BusEvent.position_state_event:type_name -> vega.events.v1.PositionStateEvent - 62, // 132: vega.events.v1.BusEvent.ethereum_key_rotation:type_name -> vega.events.v1.EthereumKeyRotation - 63, // 133: vega.events.v1.BusEvent.protocol_upgrade_event:type_name -> vega.events.v1.ProtocolUpgradeEvent - 65, // 134: vega.events.v1.BusEvent.begin_block:type_name -> vega.events.v1.BeginBlock - 66, // 135: vega.events.v1.BusEvent.end_block:type_name -> vega.events.v1.EndBlock - 67, // 136: vega.events.v1.BusEvent.protocol_upgrade_started:type_name -> vega.events.v1.ProtocolUpgradeStarted - 52, // 137: vega.events.v1.BusEvent.settle_market:type_name -> vega.events.v1.SettleMarket - 43, // 138: vega.events.v1.BusEvent.transaction_result:type_name -> vega.events.v1.TransactionResult - 69, // 139: vega.events.v1.BusEvent.core_snapshot_event:type_name -> vega.events.v1.CoreSnapshotData - 68, // 140: vega.events.v1.BusEvent.protocol_upgrade_data_node_ready:type_name -> vega.events.v1.ProtocolUpgradeDataNodeReady - 55, // 141: vega.events.v1.BusEvent.distressed_orders:type_name -> vega.events.v1.DistressedOrders - 70, // 142: vega.events.v1.BusEvent.expired_orders:type_name -> vega.events.v1.ExpiredOrders - 56, // 143: vega.events.v1.BusEvent.distressed_positions:type_name -> vega.events.v1.DistressedPositions - 24, // 144: vega.events.v1.BusEvent.stop_order:type_name -> vega.events.v1.StopOrderEvent - 20, // 145: vega.events.v1.BusEvent.funding_period:type_name -> vega.events.v1.FundingPeriod - 23, // 146: vega.events.v1.BusEvent.funding_period_data_point:type_name -> vega.events.v1.FundingPeriodDataPoint - 71, // 147: vega.events.v1.BusEvent.team_created:type_name -> vega.events.v1.TeamCreated - 72, // 148: vega.events.v1.BusEvent.team_updated:type_name -> vega.events.v1.TeamUpdated - 73, // 149: vega.events.v1.BusEvent.referee_switched_team:type_name -> vega.events.v1.RefereeSwitchedTeam - 74, // 150: vega.events.v1.BusEvent.referee_joined_team:type_name -> vega.events.v1.RefereeJoinedTeam - 79, // 151: vega.events.v1.BusEvent.referral_program_started:type_name -> vega.events.v1.ReferralProgramStarted - 80, // 152: vega.events.v1.BusEvent.referral_program_updated:type_name -> vega.events.v1.ReferralProgramUpdated - 81, // 153: vega.events.v1.BusEvent.referral_program_ended:type_name -> vega.events.v1.ReferralProgramEnded - 75, // 154: vega.events.v1.BusEvent.referral_set_created:type_name -> vega.events.v1.ReferralSetCreated - 78, // 155: vega.events.v1.BusEvent.referee_joined_referral_set:type_name -> vega.events.v1.RefereeJoinedReferralSet - 19, // 156: vega.events.v1.BusEvent.party_activity_streak:type_name -> vega.events.v1.PartyActivityStreak - 82, // 157: vega.events.v1.BusEvent.volume_discount_program_started:type_name -> vega.events.v1.VolumeDiscountProgramStarted - 83, // 158: vega.events.v1.BusEvent.volume_discount_program_updated:type_name -> vega.events.v1.VolumeDiscountProgramUpdated - 84, // 159: vega.events.v1.BusEvent.volume_discount_program_ended:type_name -> vega.events.v1.VolumeDiscountProgramEnded - 76, // 160: vega.events.v1.BusEvent.referral_set_stats_updated:type_name -> vega.events.v1.ReferralSetStatsUpdated - 13, // 161: vega.events.v1.BusEvent.vesting_stats_updated:type_name -> vega.events.v1.VestingStatsUpdated - 11, // 162: vega.events.v1.BusEvent.volume_discount_stats_updated:type_name -> vega.events.v1.VolumeDiscountStatsUpdated - 15, // 163: vega.events.v1.BusEvent.fees_stats:type_name -> vega.events.v1.FeesStats - 22, // 164: vega.events.v1.BusEvent.funding_payments:type_name -> vega.events.v1.FundingPayments - 85, // 165: vega.events.v1.BusEvent.paid_liquidity_fees_stats:type_name -> vega.events.v1.PaidLiquidityFeesStats - 7, // 166: vega.events.v1.BusEvent.vesting_balances_summary:type_name -> vega.events.v1.VestingBalancesSummary - 42, // 167: vega.events.v1.BusEvent.transfer_fees:type_name -> vega.events.v1.TransferFees - 41, // 168: vega.events.v1.BusEvent.market:type_name -> vega.events.v1.MarketEvent - 44, // 169: vega.events.v1.BusEvent.tx_err_event:type_name -> vega.events.v1.TxErrorEvent - 170, // [170:170] is the sub-list for method output_type - 170, // [170:170] is the sub-list for method input_type - 170, // [170:170] is the sub-list for extension type_name - 170, // [170:170] is the sub-list for extension extendee - 0, // [0:170] is the sub-list for field type_name + 18, // 11: vega.events.v1.FeesStats.total_fees_paid_and_received:type_name -> vega.events.v1.PartyAmount + 18, // 12: vega.events.v1.ReferrerRewardsGenerated.generated_reward:type_name -> vega.events.v1.PartyAmount + 18, // 13: vega.events.v1.MakerFeesGenerated.maker_fees_paid:type_name -> vega.events.v1.PartyAmount + 21, // 14: vega.events.v1.FundingPayments.payments:type_name -> vega.events.v1.FundingPayment + 2, // 15: vega.events.v1.FundingPeriodDataPoint.data_point_type:type_name -> vega.events.v1.FundingPeriodDataPoint.Source + 95, // 16: vega.events.v1.StopOrderEvent.submission:type_name -> vega.commands.v1.OrderSubmission + 96, // 17: vega.events.v1.StopOrderEvent.stop_order:type_name -> vega.StopOrder + 26, // 18: vega.events.v1.ERC20MultiSigSignerRemoved.signature_submitters:type_name -> vega.events.v1.ERC20MultiSigSignerRemovedSubmitter + 97, // 19: vega.events.v1.Transfer.from_account_type:type_name -> vega.AccountType + 97, // 20: vega.events.v1.Transfer.to_account_type:type_name -> vega.AccountType + 3, // 21: vega.events.v1.Transfer.status:type_name -> vega.events.v1.Transfer.Status + 30, // 22: vega.events.v1.Transfer.one_off:type_name -> vega.events.v1.OneOffTransfer + 31, // 23: vega.events.v1.Transfer.recurring:type_name -> vega.events.v1.RecurringTransfer + 29, // 24: vega.events.v1.Transfer.one_off_governance:type_name -> vega.events.v1.OneOffGovernanceTransfer + 32, // 25: vega.events.v1.Transfer.recurring_governance:type_name -> vega.events.v1.RecurringGovernanceTransfer + 98, // 26: vega.events.v1.RecurringTransfer.dispatch_strategy:type_name -> vega.DispatchStrategy + 98, // 27: vega.events.v1.RecurringGovernanceTransfer.dispatch_strategy:type_name -> vega.DispatchStrategy + 4, // 28: vega.events.v1.StakeLinking.type:type_name -> vega.events.v1.StakeLinking.Type + 5, // 29: vega.events.v1.StakeLinking.status:type_name -> vega.events.v1.StakeLinking.Status + 6, // 30: vega.events.v1.ERC20MultiSigSignerEvent.type:type_name -> vega.events.v1.ERC20MultiSigSignerEvent.Type + 95, // 31: vega.events.v1.TransactionResult.order_submission:type_name -> vega.commands.v1.OrderSubmission + 99, // 32: vega.events.v1.TransactionResult.order_amendment:type_name -> vega.commands.v1.OrderAmendment + 100, // 33: vega.events.v1.TransactionResult.order_cancellation:type_name -> vega.commands.v1.OrderCancellation + 101, // 34: vega.events.v1.TransactionResult.proposal:type_name -> vega.commands.v1.ProposalSubmission + 102, // 35: vega.events.v1.TransactionResult.vote_submission:type_name -> vega.commands.v1.VoteSubmission + 103, // 36: vega.events.v1.TransactionResult.liquidity_provision_submission:type_name -> vega.commands.v1.LiquidityProvisionSubmission + 104, // 37: vega.events.v1.TransactionResult.withdraw_submission:type_name -> vega.commands.v1.WithdrawSubmission + 105, // 38: vega.events.v1.TransactionResult.delegate_submission:type_name -> vega.commands.v1.DelegateSubmission + 106, // 39: vega.events.v1.TransactionResult.undelegate_submission:type_name -> vega.commands.v1.UndelegateSubmission + 107, // 40: vega.events.v1.TransactionResult.liquidity_provision_cancellation:type_name -> vega.commands.v1.LiquidityProvisionCancellation + 108, // 41: vega.events.v1.TransactionResult.liquidity_provision_amendment:type_name -> vega.commands.v1.LiquidityProvisionAmendment + 109, // 42: vega.events.v1.TransactionResult.transfer:type_name -> vega.commands.v1.Transfer + 110, // 43: vega.events.v1.TransactionResult.cancel_transfer:type_name -> vega.commands.v1.CancelTransfer + 111, // 44: vega.events.v1.TransactionResult.announce_node:type_name -> vega.commands.v1.AnnounceNode + 112, // 45: vega.events.v1.TransactionResult.oracle_data_submission:type_name -> vega.commands.v1.OracleDataSubmission + 113, // 46: vega.events.v1.TransactionResult.protocol_upgrade_proposal:type_name -> vega.commands.v1.ProtocolUpgradeProposal + 114, // 47: vega.events.v1.TransactionResult.issue_signatures:type_name -> vega.commands.v1.IssueSignatures + 115, // 48: vega.events.v1.TransactionResult.batch_market_instructions:type_name -> vega.commands.v1.BatchMarketInstructions + 116, // 49: vega.events.v1.TransactionResult.key_rotate_submission:type_name -> vega.commands.v1.KeyRotateSubmission + 117, // 50: vega.events.v1.TransactionResult.ethereum_key_rotate_submission:type_name -> vega.commands.v1.EthereumKeyRotateSubmission + 118, // 51: vega.events.v1.TransactionResult.stop_order_submission:type_name -> vega.commands.v1.StopOrdersSubmission + 119, // 52: vega.events.v1.TransactionResult.stop_order_cancellation:type_name -> vega.commands.v1.StopOrdersCancellation + 120, // 53: vega.events.v1.TransactionResult.create_referral_set:type_name -> vega.commands.v1.CreateReferralSet + 121, // 54: vega.events.v1.TransactionResult.update_referral_set:type_name -> vega.commands.v1.UpdateReferralSet + 122, // 55: vega.events.v1.TransactionResult.apply_referral_code:type_name -> vega.commands.v1.ApplyReferralCode + 123, // 56: vega.events.v1.TransactionResult.update_margin_mode:type_name -> vega.commands.v1.UpdateMarginMode + 124, // 57: vega.events.v1.TransactionResult.join_team:type_name -> vega.commands.v1.JoinTeam + 125, // 58: vega.events.v1.TransactionResult.batch_proposal:type_name -> vega.commands.v1.BatchProposalSubmission + 126, // 59: vega.events.v1.TransactionResult.update_party_profile:type_name -> vega.commands.v1.UpdatePartyProfile + 93, // 60: vega.events.v1.TransactionResult.success:type_name -> vega.events.v1.TransactionResult.SuccessDetails + 94, // 61: vega.events.v1.TransactionResult.failure:type_name -> vega.events.v1.TransactionResult.FailureDetails + 95, // 62: vega.events.v1.TxErrorEvent.order_submission:type_name -> vega.commands.v1.OrderSubmission + 99, // 63: vega.events.v1.TxErrorEvent.order_amendment:type_name -> vega.commands.v1.OrderAmendment + 100, // 64: vega.events.v1.TxErrorEvent.order_cancellation:type_name -> vega.commands.v1.OrderCancellation + 101, // 65: vega.events.v1.TxErrorEvent.proposal:type_name -> vega.commands.v1.ProposalSubmission + 102, // 66: vega.events.v1.TxErrorEvent.vote_submission:type_name -> vega.commands.v1.VoteSubmission + 103, // 67: vega.events.v1.TxErrorEvent.liquidity_provision_submission:type_name -> vega.commands.v1.LiquidityProvisionSubmission + 104, // 68: vega.events.v1.TxErrorEvent.withdraw_submission:type_name -> vega.commands.v1.WithdrawSubmission + 105, // 69: vega.events.v1.TxErrorEvent.delegate_submission:type_name -> vega.commands.v1.DelegateSubmission + 106, // 70: vega.events.v1.TxErrorEvent.undelegate_submission:type_name -> vega.commands.v1.UndelegateSubmission + 107, // 71: vega.events.v1.TxErrorEvent.liquidity_provision_cancellation:type_name -> vega.commands.v1.LiquidityProvisionCancellation + 108, // 72: vega.events.v1.TxErrorEvent.liquidity_provision_amendment:type_name -> vega.commands.v1.LiquidityProvisionAmendment + 109, // 73: vega.events.v1.TxErrorEvent.transfer:type_name -> vega.commands.v1.Transfer + 110, // 74: vega.events.v1.TxErrorEvent.cancel_transfer:type_name -> vega.commands.v1.CancelTransfer + 111, // 75: vega.events.v1.TxErrorEvent.announce_node:type_name -> vega.commands.v1.AnnounceNode + 112, // 76: vega.events.v1.TxErrorEvent.oracle_data_submission:type_name -> vega.commands.v1.OracleDataSubmission + 113, // 77: vega.events.v1.TxErrorEvent.protocol_upgrade_proposal:type_name -> vega.commands.v1.ProtocolUpgradeProposal + 114, // 78: vega.events.v1.TxErrorEvent.issue_signatures:type_name -> vega.commands.v1.IssueSignatures + 115, // 79: vega.events.v1.TxErrorEvent.batch_market_instructions:type_name -> vega.commands.v1.BatchMarketInstructions + 127, // 80: vega.events.v1.EpochEvent.action:type_name -> vega.EpochAction + 128, // 81: vega.events.v1.LedgerMovements.ledger_movements:type_name -> vega.LedgerMovement + 51, // 82: vega.events.v1.SettlePosition.trade_settlements:type_name -> vega.events.v1.TradeSettlement + 129, // 83: vega.events.v1.AuctionEvent.trigger:type_name -> vega.AuctionTrigger + 129, // 84: vega.events.v1.AuctionEvent.extension_trigger:type_name -> vega.AuctionTrigger + 0, // 85: vega.events.v1.ProtocolUpgradeEvent.status:type_name -> vega.events.v1.ProtocolUpgradeProposalStatus + 78, // 86: vega.events.v1.ReferralSetStatsUpdated.referees_stats:type_name -> vega.events.v1.RefereeStats + 130, // 87: vega.events.v1.ReferralProgramStarted.program:type_name -> vega.ReferralProgram + 130, // 88: vega.events.v1.ReferralProgramUpdated.program:type_name -> vega.ReferralProgram + 131, // 89: vega.events.v1.VolumeDiscountProgramStarted.program:type_name -> vega.VolumeDiscountProgram + 131, // 90: vega.events.v1.VolumeDiscountProgramUpdated.program:type_name -> vega.VolumeDiscountProgram + 18, // 91: vega.events.v1.PaidLiquidityFeesStats.fees_paid_per_party:type_name -> vega.events.v1.PartyAmount + 132, // 92: vega.events.v1.PartyMarginModeUpdated.margin_mode:type_name -> vega.MarginMode + 133, // 93: vega.events.v1.PartyProfileUpdated.updated_profile:type_name -> vega.PartyProfile + 90, // 94: vega.events.v1.TeamsStatsUpdated.stats:type_name -> vega.events.v1.TeamStats + 91, // 95: vega.events.v1.TeamStats.members_stats:type_name -> vega.events.v1.TeamMemberStats + 1, // 96: vega.events.v1.BusEvent.type:type_name -> vega.events.v1.BusEventType + 46, // 97: vega.events.v1.BusEvent.time_update:type_name -> vega.events.v1.TimeUpdate + 48, // 98: vega.events.v1.BusEvent.ledger_movements:type_name -> vega.events.v1.LedgerMovements + 49, // 99: vega.events.v1.BusEvent.position_resolution:type_name -> vega.events.v1.PositionResolution + 134, // 100: vega.events.v1.BusEvent.order:type_name -> vega.Order + 135, // 101: vega.events.v1.BusEvent.account:type_name -> vega.Account + 136, // 102: vega.events.v1.BusEvent.party:type_name -> vega.Party + 137, // 103: vega.events.v1.BusEvent.trade:type_name -> vega.Trade + 138, // 104: vega.events.v1.BusEvent.margin_levels:type_name -> vega.MarginLevels + 139, // 105: vega.events.v1.BusEvent.proposal:type_name -> vega.Proposal + 140, // 106: vega.events.v1.BusEvent.vote:type_name -> vega.Vote + 141, // 107: vega.events.v1.BusEvent.market_data:type_name -> vega.MarketData + 142, // 108: vega.events.v1.BusEvent.node_signature:type_name -> vega.commands.v1.NodeSignature + 50, // 109: vega.events.v1.BusEvent.loss_socialization:type_name -> vega.events.v1.LossSocialization + 52, // 110: vega.events.v1.BusEvent.settle_position:type_name -> vega.events.v1.SettlePosition + 55, // 111: vega.events.v1.BusEvent.settle_distressed:type_name -> vega.events.v1.SettleDistressed + 143, // 112: vega.events.v1.BusEvent.market_created:type_name -> vega.Market + 144, // 113: vega.events.v1.BusEvent.asset:type_name -> vega.Asset + 58, // 114: vega.events.v1.BusEvent.market_tick:type_name -> vega.events.v1.MarketTick + 145, // 115: vega.events.v1.BusEvent.withdrawal:type_name -> vega.Withdrawal + 146, // 116: vega.events.v1.BusEvent.deposit:type_name -> vega.Deposit + 59, // 117: vega.events.v1.BusEvent.auction:type_name -> vega.events.v1.AuctionEvent + 147, // 118: vega.events.v1.BusEvent.risk_factor:type_name -> vega.RiskFactor + 148, // 119: vega.events.v1.BusEvent.network_parameter:type_name -> vega.NetworkParameter + 149, // 120: vega.events.v1.BusEvent.liquidity_provision:type_name -> vega.LiquidityProvision + 143, // 121: vega.events.v1.BusEvent.market_updated:type_name -> vega.Market + 150, // 122: vega.events.v1.BusEvent.oracle_spec:type_name -> vega.OracleSpec + 151, // 123: vega.events.v1.BusEvent.oracle_data:type_name -> vega.OracleData + 40, // 124: vega.events.v1.BusEvent.delegation_balance:type_name -> vega.events.v1.DelegationBalanceEvent + 39, // 125: vega.events.v1.BusEvent.validator_score:type_name -> vega.events.v1.ValidatorScoreEvent + 47, // 126: vega.events.v1.BusEvent.epoch_event:type_name -> vega.events.v1.EpochEvent + 60, // 127: vega.events.v1.BusEvent.validator_update:type_name -> vega.events.v1.ValidatorUpdate + 33, // 128: vega.events.v1.BusEvent.stake_linking:type_name -> vega.events.v1.StakeLinking + 38, // 129: vega.events.v1.BusEvent.reward_payout:type_name -> vega.events.v1.RewardPayoutEvent + 36, // 130: vega.events.v1.BusEvent.checkpoint:type_name -> vega.events.v1.CheckpointEvent + 62, // 131: vega.events.v1.BusEvent.key_rotation:type_name -> vega.events.v1.KeyRotation + 65, // 132: vega.events.v1.BusEvent.state_var:type_name -> vega.events.v1.StateVar + 152, // 133: vega.events.v1.BusEvent.network_limits:type_name -> vega.NetworkLimits + 28, // 134: vega.events.v1.BusEvent.transfer:type_name -> vega.events.v1.Transfer + 61, // 135: vega.events.v1.BusEvent.ranking_event:type_name -> vega.events.v1.ValidatorRankingEvent + 34, // 136: vega.events.v1.BusEvent.erc20_multisig_signer_event:type_name -> vega.events.v1.ERC20MultiSigSignerEvent + 35, // 137: vega.events.v1.BusEvent.erc20_multisig_set_threshold_event:type_name -> vega.events.v1.ERC20MultiSigThresholdSetEvent + 25, // 138: vega.events.v1.BusEvent.erc20_multisig_signer_added:type_name -> vega.events.v1.ERC20MultiSigSignerAdded + 27, // 139: vega.events.v1.BusEvent.erc20_multisig_signer_removed:type_name -> vega.events.v1.ERC20MultiSigSignerRemoved + 54, // 140: vega.events.v1.BusEvent.position_state_event:type_name -> vega.events.v1.PositionStateEvent + 63, // 141: vega.events.v1.BusEvent.ethereum_key_rotation:type_name -> vega.events.v1.EthereumKeyRotation + 64, // 142: vega.events.v1.BusEvent.protocol_upgrade_event:type_name -> vega.events.v1.ProtocolUpgradeEvent + 66, // 143: vega.events.v1.BusEvent.begin_block:type_name -> vega.events.v1.BeginBlock + 67, // 144: vega.events.v1.BusEvent.end_block:type_name -> vega.events.v1.EndBlock + 68, // 145: vega.events.v1.BusEvent.protocol_upgrade_started:type_name -> vega.events.v1.ProtocolUpgradeStarted + 53, // 146: vega.events.v1.BusEvent.settle_market:type_name -> vega.events.v1.SettleMarket + 44, // 147: vega.events.v1.BusEvent.transaction_result:type_name -> vega.events.v1.TransactionResult + 70, // 148: vega.events.v1.BusEvent.core_snapshot_event:type_name -> vega.events.v1.CoreSnapshotData + 69, // 149: vega.events.v1.BusEvent.protocol_upgrade_data_node_ready:type_name -> vega.events.v1.ProtocolUpgradeDataNodeReady + 56, // 150: vega.events.v1.BusEvent.distressed_orders:type_name -> vega.events.v1.DistressedOrders + 71, // 151: vega.events.v1.BusEvent.expired_orders:type_name -> vega.events.v1.ExpiredOrders + 57, // 152: vega.events.v1.BusEvent.distressed_positions:type_name -> vega.events.v1.DistressedPositions + 24, // 153: vega.events.v1.BusEvent.stop_order:type_name -> vega.events.v1.StopOrderEvent + 20, // 154: vega.events.v1.BusEvent.funding_period:type_name -> vega.events.v1.FundingPeriod + 23, // 155: vega.events.v1.BusEvent.funding_period_data_point:type_name -> vega.events.v1.FundingPeriodDataPoint + 72, // 156: vega.events.v1.BusEvent.team_created:type_name -> vega.events.v1.TeamCreated + 73, // 157: vega.events.v1.BusEvent.team_updated:type_name -> vega.events.v1.TeamUpdated + 74, // 158: vega.events.v1.BusEvent.referee_switched_team:type_name -> vega.events.v1.RefereeSwitchedTeam + 75, // 159: vega.events.v1.BusEvent.referee_joined_team:type_name -> vega.events.v1.RefereeJoinedTeam + 80, // 160: vega.events.v1.BusEvent.referral_program_started:type_name -> vega.events.v1.ReferralProgramStarted + 81, // 161: vega.events.v1.BusEvent.referral_program_updated:type_name -> vega.events.v1.ReferralProgramUpdated + 82, // 162: vega.events.v1.BusEvent.referral_program_ended:type_name -> vega.events.v1.ReferralProgramEnded + 76, // 163: vega.events.v1.BusEvent.referral_set_created:type_name -> vega.events.v1.ReferralSetCreated + 79, // 164: vega.events.v1.BusEvent.referee_joined_referral_set:type_name -> vega.events.v1.RefereeJoinedReferralSet + 19, // 165: vega.events.v1.BusEvent.party_activity_streak:type_name -> vega.events.v1.PartyActivityStreak + 83, // 166: vega.events.v1.BusEvent.volume_discount_program_started:type_name -> vega.events.v1.VolumeDiscountProgramStarted + 84, // 167: vega.events.v1.BusEvent.volume_discount_program_updated:type_name -> vega.events.v1.VolumeDiscountProgramUpdated + 85, // 168: vega.events.v1.BusEvent.volume_discount_program_ended:type_name -> vega.events.v1.VolumeDiscountProgramEnded + 77, // 169: vega.events.v1.BusEvent.referral_set_stats_updated:type_name -> vega.events.v1.ReferralSetStatsUpdated + 13, // 170: vega.events.v1.BusEvent.vesting_stats_updated:type_name -> vega.events.v1.VestingStatsUpdated + 11, // 171: vega.events.v1.BusEvent.volume_discount_stats_updated:type_name -> vega.events.v1.VolumeDiscountStatsUpdated + 15, // 172: vega.events.v1.BusEvent.fees_stats:type_name -> vega.events.v1.FeesStats + 22, // 173: vega.events.v1.BusEvent.funding_payments:type_name -> vega.events.v1.FundingPayments + 86, // 174: vega.events.v1.BusEvent.paid_liquidity_fees_stats:type_name -> vega.events.v1.PaidLiquidityFeesStats + 7, // 175: vega.events.v1.BusEvent.vesting_balances_summary:type_name -> vega.events.v1.VestingBalancesSummary + 42, // 176: vega.events.v1.BusEvent.transfer_fees:type_name -> vega.events.v1.TransferFees + 43, // 177: vega.events.v1.BusEvent.transfer_fees_discount:type_name -> vega.events.v1.TransferFeesDiscount + 87, // 178: vega.events.v1.BusEvent.party_margin_mode_updated:type_name -> vega.events.v1.PartyMarginModeUpdated + 88, // 179: vega.events.v1.BusEvent.party_profile_updated:type_name -> vega.events.v1.PartyProfileUpdated + 89, // 180: vega.events.v1.BusEvent.teams_stats_updated:type_name -> vega.events.v1.TeamsStatsUpdated + 41, // 181: vega.events.v1.BusEvent.market:type_name -> vega.events.v1.MarketEvent + 45, // 182: vega.events.v1.BusEvent.tx_err_event:type_name -> vega.events.v1.TxErrorEvent + 183, // [183:183] is the sub-list for method output_type + 183, // [183:183] is the sub-list for method input_type + 183, // [183:183] is the sub-list for extension type_name + 183, // [183:183] is the sub-list for extension extendee + 0, // [0:183] is the sub-list for field type_name } func init() { file_vega_events_v1_events_proto_init() } @@ -11490,7 +12229,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransactionResult); i { + switch v := v.(*TransferFeesDiscount); i { case 0: return &v.state case 1: @@ -11502,7 +12241,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TxErrorEvent); i { + switch v := v.(*TransactionResult); i { case 0: return &v.state case 1: @@ -11514,7 +12253,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TimeUpdate); i { + switch v := v.(*TxErrorEvent); i { case 0: return &v.state case 1: @@ -11526,7 +12265,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EpochEvent); i { + switch v := v.(*TimeUpdate); i { case 0: return &v.state case 1: @@ -11538,7 +12277,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LedgerMovements); i { + switch v := v.(*EpochEvent); i { case 0: return &v.state case 1: @@ -11550,7 +12289,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PositionResolution); i { + switch v := v.(*LedgerMovements); i { case 0: return &v.state case 1: @@ -11562,7 +12301,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LossSocialization); i { + switch v := v.(*PositionResolution); i { case 0: return &v.state case 1: @@ -11574,7 +12313,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TradeSettlement); i { + switch v := v.(*LossSocialization); i { case 0: return &v.state case 1: @@ -11586,7 +12325,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SettlePosition); i { + switch v := v.(*TradeSettlement); i { case 0: return &v.state case 1: @@ -11598,7 +12337,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SettleMarket); i { + switch v := v.(*SettlePosition); i { case 0: return &v.state case 1: @@ -11610,7 +12349,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PositionStateEvent); i { + switch v := v.(*SettleMarket); i { case 0: return &v.state case 1: @@ -11622,7 +12361,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SettleDistressed); i { + switch v := v.(*PositionStateEvent); i { case 0: return &v.state case 1: @@ -11634,7 +12373,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DistressedOrders); i { + switch v := v.(*SettleDistressed); i { case 0: return &v.state case 1: @@ -11646,7 +12385,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DistressedPositions); i { + switch v := v.(*DistressedOrders); i { case 0: return &v.state case 1: @@ -11658,7 +12397,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarketTick); i { + switch v := v.(*DistressedPositions); i { case 0: return &v.state case 1: @@ -11670,7 +12409,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuctionEvent); i { + switch v := v.(*MarketTick); i { case 0: return &v.state case 1: @@ -11682,7 +12421,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorUpdate); i { + switch v := v.(*AuctionEvent); i { case 0: return &v.state case 1: @@ -11694,7 +12433,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorRankingEvent); i { + switch v := v.(*ValidatorUpdate); i { case 0: return &v.state case 1: @@ -11706,7 +12445,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyRotation); i { + switch v := v.(*ValidatorRankingEvent); i { case 0: return &v.state case 1: @@ -11718,7 +12457,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthereumKeyRotation); i { + switch v := v.(*KeyRotation); i { case 0: return &v.state case 1: @@ -11730,7 +12469,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtocolUpgradeEvent); i { + switch v := v.(*EthereumKeyRotation); i { case 0: return &v.state case 1: @@ -11742,7 +12481,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateVar); i { + switch v := v.(*ProtocolUpgradeEvent); i { case 0: return &v.state case 1: @@ -11754,7 +12493,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BeginBlock); i { + switch v := v.(*StateVar); i { case 0: return &v.state case 1: @@ -11766,7 +12505,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EndBlock); i { + switch v := v.(*BeginBlock); i { case 0: return &v.state case 1: @@ -11778,7 +12517,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtocolUpgradeStarted); i { + switch v := v.(*EndBlock); i { case 0: return &v.state case 1: @@ -11790,7 +12529,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtocolUpgradeDataNodeReady); i { + switch v := v.(*ProtocolUpgradeStarted); i { case 0: return &v.state case 1: @@ -11802,7 +12541,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CoreSnapshotData); i { + switch v := v.(*ProtocolUpgradeDataNodeReady); i { case 0: return &v.state case 1: @@ -11814,7 +12553,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExpiredOrders); i { + switch v := v.(*CoreSnapshotData); i { case 0: return &v.state case 1: @@ -11826,7 +12565,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamCreated); i { + switch v := v.(*ExpiredOrders); i { case 0: return &v.state case 1: @@ -11838,7 +12577,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamUpdated); i { + switch v := v.(*TeamCreated); i { case 0: return &v.state case 1: @@ -11850,7 +12589,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefereeSwitchedTeam); i { + switch v := v.(*TeamUpdated); i { case 0: return &v.state case 1: @@ -11862,7 +12601,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefereeJoinedTeam); i { + switch v := v.(*RefereeSwitchedTeam); i { case 0: return &v.state case 1: @@ -11874,7 +12613,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralSetCreated); i { + switch v := v.(*RefereeJoinedTeam); i { case 0: return &v.state case 1: @@ -11886,7 +12625,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralSetStatsUpdated); i { + switch v := v.(*ReferralSetCreated); i { case 0: return &v.state case 1: @@ -11898,7 +12637,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefereeStats); i { + switch v := v.(*ReferralSetStatsUpdated); i { case 0: return &v.state case 1: @@ -11910,7 +12649,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefereeJoinedReferralSet); i { + switch v := v.(*RefereeStats); i { case 0: return &v.state case 1: @@ -11922,7 +12661,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralProgramStarted); i { + switch v := v.(*RefereeJoinedReferralSet); i { case 0: return &v.state case 1: @@ -11934,7 +12673,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralProgramUpdated); i { + switch v := v.(*ReferralProgramStarted); i { case 0: return &v.state case 1: @@ -11946,7 +12685,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralProgramEnded); i { + switch v := v.(*ReferralProgramUpdated); i { case 0: return &v.state case 1: @@ -11958,7 +12697,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VolumeDiscountProgramStarted); i { + switch v := v.(*ReferralProgramEnded); i { case 0: return &v.state case 1: @@ -11970,7 +12709,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VolumeDiscountProgramUpdated); i { + switch v := v.(*VolumeDiscountProgramStarted); i { case 0: return &v.state case 1: @@ -11982,7 +12721,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VolumeDiscountProgramEnded); i { + switch v := v.(*VolumeDiscountProgramUpdated); i { case 0: return &v.state case 1: @@ -11994,7 +12733,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PaidLiquidityFeesStats); i { + switch v := v.(*VolumeDiscountProgramEnded); i { case 0: return &v.state case 1: @@ -12006,7 +12745,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BusEvent); i { + switch v := v.(*PaidLiquidityFeesStats); i { case 0: return &v.state case 1: @@ -12018,7 +12757,7 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransactionResult_SuccessDetails); i { + switch v := v.(*PartyMarginModeUpdated); i { case 0: return &v.state case 1: @@ -12030,6 +12769,78 @@ func file_vega_events_v1_events_proto_init() { } } file_vega_events_v1_events_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartyProfileUpdated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_events_v1_events_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamsStatsUpdated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_events_v1_events_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_events_v1_events_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TeamMemberStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_events_v1_events_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BusEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_events_v1_events_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransactionResult_SuccessDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_events_v1_events_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TransactionResult_FailureDetails); i { case 0: return &v.state @@ -12051,7 +12862,8 @@ func file_vega_events_v1_events_proto_init() { } file_vega_events_v1_events_proto_msgTypes[24].OneofWrappers = []interface{}{} file_vega_events_v1_events_proto_msgTypes[25].OneofWrappers = []interface{}{} - file_vega_events_v1_events_proto_msgTypes[36].OneofWrappers = []interface{}{ + file_vega_events_v1_events_proto_msgTypes[31].OneofWrappers = []interface{}{} + file_vega_events_v1_events_proto_msgTypes[37].OneofWrappers = []interface{}{ (*TransactionResult_OrderSubmission)(nil), (*TransactionResult_OrderAmendment)(nil), (*TransactionResult_OrderCancellation)(nil), @@ -12077,10 +12889,14 @@ func file_vega_events_v1_events_proto_init() { (*TransactionResult_CreateReferralSet)(nil), (*TransactionResult_UpdateReferralSet)(nil), (*TransactionResult_ApplyReferralCode)(nil), + (*TransactionResult_UpdateMarginMode)(nil), + (*TransactionResult_JoinTeam)(nil), + (*TransactionResult_BatchProposal)(nil), + (*TransactionResult_UpdatePartyProfile)(nil), (*TransactionResult_Success)(nil), (*TransactionResult_Failure)(nil), } - file_vega_events_v1_events_proto_msgTypes[37].OneofWrappers = []interface{}{ + file_vega_events_v1_events_proto_msgTypes[38].OneofWrappers = []interface{}{ (*TxErrorEvent_OrderSubmission)(nil), (*TxErrorEvent_OrderAmendment)(nil), (*TxErrorEvent_OrderCancellation)(nil), @@ -12100,9 +12916,10 @@ func file_vega_events_v1_events_proto_init() { (*TxErrorEvent_IssueSignatures)(nil), (*TxErrorEvent_BatchMarketInstructions)(nil), } - file_vega_events_v1_events_proto_msgTypes[64].OneofWrappers = []interface{}{} file_vega_events_v1_events_proto_msgTypes[65].OneofWrappers = []interface{}{} - file_vega_events_v1_events_proto_msgTypes[79].OneofWrappers = []interface{}{ + file_vega_events_v1_events_proto_msgTypes[66].OneofWrappers = []interface{}{} + file_vega_events_v1_events_proto_msgTypes[80].OneofWrappers = []interface{}{} + file_vega_events_v1_events_proto_msgTypes[85].OneofWrappers = []interface{}{ (*BusEvent_TimeUpdate)(nil), (*BusEvent_LedgerMovements)(nil), (*BusEvent_PositionResolution)(nil), @@ -12183,6 +13000,10 @@ func file_vega_events_v1_events_proto_init() { (*BusEvent_PaidLiquidityFeesStats)(nil), (*BusEvent_VestingBalancesSummary)(nil), (*BusEvent_TransferFees)(nil), + (*BusEvent_TransferFeesDiscount)(nil), + (*BusEvent_PartyMarginModeUpdated)(nil), + (*BusEvent_PartyProfileUpdated)(nil), + (*BusEvent_TeamsStatsUpdated)(nil), (*BusEvent_Market)(nil), (*BusEvent_TxErrEvent)(nil), } @@ -12192,7 +13013,7 @@ func file_vega_events_v1_events_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vega_events_v1_events_proto_rawDesc, NumEnums: 7, - NumMessages: 82, + NumMessages: 88, NumExtensions: 0, NumServices: 0, }, diff --git a/protos/vega/governance.go b/protos/vega/governance.go new file mode 100644 index 0000000000..d3bed7b669 --- /dev/null +++ b/protos/vega/governance.go @@ -0,0 +1,8 @@ +package vega + +type ( + ProposalOneOffTermChangeType = isProposalTerms_Change + ProposalOneOffTermBatchChangeType = isBatchProposalTermsChange_Change +) + +func (gd *GovernanceData) IsProposalNode() {} diff --git a/protos/vega/governance.pb.go b/protos/vega/governance.pb.go index e68f6af630..b33713a88a 100644 --- a/protos/vega/governance.pb.go +++ b/protos/vega/governance.pb.go @@ -129,6 +129,10 @@ const ( ProposalError_PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM ProposalError = 56 // Volume discount program proposal is invalid ProposalError_PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM ProposalError = 57 + // One or more proposals in a batch has been rejected + ProposalError_PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED ProposalError = 58 + // One or more proposals in a batch has been declined + ProposalError_PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED ProposalError = 59 ) // Enum value maps for ProposalError. @@ -186,6 +190,8 @@ var ( 55: "PROPOSAL_ERROR_INVALID_PERPETUAL_PRODUCT", 56: "PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM", 57: "PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM", + 58: "PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED", + 59: "PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED", } ProposalError_value = map[string]int32{ "PROPOSAL_ERROR_UNSPECIFIED": 0, @@ -240,6 +246,8 @@ var ( "PROPOSAL_ERROR_INVALID_PERPETUAL_PRODUCT": 55, "PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM": 56, "PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM": 57, + "PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED": 58, + "PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED": 59, } ) @@ -375,6 +383,55 @@ func (GovernanceTransferType) EnumDescriptor() ([]byte, []int) { return file_vega_governance_proto_rawDescGZIP(), []int{2} } +// Proposal type +type GovernanceData_Type int32 + +const ( + // Single proposal only. In case it has not been specified, for example in older proposals, then this is the default. + GovernanceData_TYPE_SINGLE_OR_UNSPECIFIED GovernanceData_Type = 0 + // Proposal contains a batch of proposals or a proposal that should be treated as part of a batch. + GovernanceData_TYPE_BATCH GovernanceData_Type = 1 +) + +// Enum value maps for GovernanceData_Type. +var ( + GovernanceData_Type_name = map[int32]string{ + 0: "TYPE_SINGLE_OR_UNSPECIFIED", + 1: "TYPE_BATCH", + } + GovernanceData_Type_value = map[string]int32{ + "TYPE_SINGLE_OR_UNSPECIFIED": 0, + "TYPE_BATCH": 1, + } +) + +func (x GovernanceData_Type) Enum() *GovernanceData_Type { + p := new(GovernanceData_Type) + *p = x + return p +} + +func (x GovernanceData_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GovernanceData_Type) Descriptor() protoreflect.EnumDescriptor { + return file_vega_governance_proto_enumTypes[3].Descriptor() +} + +func (GovernanceData_Type) Type() protoreflect.EnumType { + return &file_vega_governance_proto_enumTypes[3] +} + +func (x GovernanceData_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GovernanceData_Type.Descriptor instead. +func (GovernanceData_Type) EnumDescriptor() ([]byte, []int) { + return file_vega_governance_proto_rawDescGZIP(), []int{25, 0} +} + // Proposal state transition: // Open -> // - Passed -> Enacted. @@ -398,7 +455,7 @@ const ( Proposal_STATE_REJECTED Proposal_State = 4 // Proposal didn't get enough votes, e.g. either failed to gain required participation or majority level. Proposal_STATE_DECLINED Proposal_State = 5 - // Proposal enacted + // Proposal enacted. Proposal_STATE_ENACTED Proposal_State = 6 // Waiting for node validation of the proposal Proposal_STATE_WAITING_FOR_NODE_VOTE Proposal_State = 7 @@ -439,11 +496,11 @@ func (x Proposal_State) String() string { } func (Proposal_State) Descriptor() protoreflect.EnumDescriptor { - return file_vega_governance_proto_enumTypes[3].Descriptor() + return file_vega_governance_proto_enumTypes[4].Descriptor() } func (Proposal_State) Type() protoreflect.EnumType { - return &file_vega_governance_proto_enumTypes[3] + return &file_vega_governance_proto_enumTypes[4] } func (x Proposal_State) Number() protoreflect.EnumNumber { @@ -452,7 +509,7 @@ func (x Proposal_State) Number() protoreflect.EnumNumber { // Deprecated: Use Proposal_State.Descriptor instead. func (Proposal_State) EnumDescriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{23, 0} + return file_vega_governance_proto_rawDescGZIP(), []int{26, 0} } // Vote value @@ -492,11 +549,11 @@ func (x Vote_Value) String() string { } func (Vote_Value) Descriptor() protoreflect.EnumDescriptor { - return file_vega_governance_proto_enumTypes[4].Descriptor() + return file_vega_governance_proto_enumTypes[5].Descriptor() } func (Vote_Value) Type() protoreflect.EnumType { - return &file_vega_governance_proto_enumTypes[4] + return &file_vega_governance_proto_enumTypes[5] } func (x Vote_Value) Number() protoreflect.EnumNumber { @@ -505,7 +562,7 @@ func (x Vote_Value) Number() protoreflect.EnumNumber { // Deprecated: Use Vote_Value.Descriptor instead. func (Vote_Value) EnumDescriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{24, 0} + return file_vega_governance_proto_rawDescGZIP(), []int{27, 0} } // Spot product configuration @@ -684,6 +741,14 @@ type PerpetualProduct struct { DataSourceSpecForSettlementData *DataSourceDefinition `protobuf:"bytes,8,opt,name=data_source_spec_for_settlement_data,json=dataSourceSpecForSettlementData,proto3" json:"data_source_spec_for_settlement_data,omitempty"` // Binding between the data source spec and the settlement data. DataSourceSpecBinding *DataSourceSpecToPerpetualBinding `protobuf:"bytes,9,opt,name=data_source_spec_binding,json=dataSourceSpecBinding,proto3" json:"data_source_spec_binding,omitempty"` + // Factor applied to funding-rates. This scales the impact that spot price deviations have on funding payments. + FundingRateScalingFactor *string `protobuf:"bytes,10,opt,name=funding_rate_scaling_factor,json=fundingRateScalingFactor,proto3,oneof" json:"funding_rate_scaling_factor,omitempty"` + // Lower bound for the funding-rate such that the funding-rate will never be lower than this value. + FundingRateLowerBound *string `protobuf:"bytes,11,opt,name=funding_rate_lower_bound,json=fundingRateLowerBound,proto3,oneof" json:"funding_rate_lower_bound,omitempty"` + // Upper bound for the funding-rate such that the funding-rate will never be higher than this value. + FundingRateUpperBound *string `protobuf:"bytes,12,opt,name=funding_rate_upper_bound,json=fundingRateUpperBound,proto3,oneof" json:"funding_rate_upper_bound,omitempty"` + // Composite price configuration to drive the calculation of the internal composite price used for funding payments. If undefined the default mark price of the market is used. + InternalCompositePriceConfiguration *CompositePriceConfiguration `protobuf:"bytes,13,opt,name=internal_composite_price_configuration,json=internalCompositePriceConfiguration,proto3,oneof" json:"internal_composite_price_configuration,omitempty"` } func (x *PerpetualProduct) Reset() { @@ -781,6 +846,34 @@ func (x *PerpetualProduct) GetDataSourceSpecBinding() *DataSourceSpecToPerpetual return nil } +func (x *PerpetualProduct) GetFundingRateScalingFactor() string { + if x != nil && x.FundingRateScalingFactor != nil { + return *x.FundingRateScalingFactor + } + return "" +} + +func (x *PerpetualProduct) GetFundingRateLowerBound() string { + if x != nil && x.FundingRateLowerBound != nil { + return *x.FundingRateLowerBound + } + return "" +} + +func (x *PerpetualProduct) GetFundingRateUpperBound() string { + if x != nil && x.FundingRateUpperBound != nil { + return *x.FundingRateUpperBound + } + return "" +} + +func (x *PerpetualProduct) GetInternalCompositePriceConfiguration() *CompositePriceConfiguration { + if x != nil { + return x.InternalCompositePriceConfiguration + } + return nil +} + // Instrument configuration type InstrumentConfiguration struct { state protoimpl.MessageState @@ -927,6 +1020,8 @@ type NewSpotMarketConfiguration struct { PositionDecimalPlaces int64 `protobuf:"varint,6,opt,name=position_decimal_places,json=positionDecimalPlaces,proto3" json:"position_decimal_places,omitempty"` // Specifies the liquidity provision SLA parameters. SlaParams *LiquiditySLAParameters `protobuf:"bytes,7,opt,name=sla_params,json=slaParams,proto3" json:"sla_params,omitempty"` + // Specifies how the liquidity fee for the market will be calculated. + LiquidityFeeSettings *LiquidityFeeSettings `protobuf:"bytes,8,opt,name=liquidity_fee_settings,json=liquidityFeeSettings,proto3" json:"liquidity_fee_settings,omitempty"` } func (x *NewSpotMarketConfiguration) Reset() { @@ -1031,6 +1126,13 @@ func (x *NewSpotMarketConfiguration) GetSlaParams() *LiquiditySLAParameters { return nil } +func (x *NewSpotMarketConfiguration) GetLiquidityFeeSettings() *LiquidityFeeSettings { + if x != nil { + return x.LiquidityFeeSettings + } + return nil +} + type isNewSpotMarketConfiguration_RiskParameters interface { isNewSpotMarketConfiguration_RiskParameters() } @@ -1081,11 +1183,19 @@ type NewMarketConfiguration struct { // Linear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume. LinearSlippageFactor string `protobuf:"bytes,9,opt,name=linear_slippage_factor,json=linearSlippageFactor,proto3" json:"linear_slippage_factor,omitempty"` // Quadratic slippage factor is used to cap the slippage component of maintenance margin - it is applied to the square of the slippage volume. + // + // Deprecated: Do not use. QuadraticSlippageFactor string `protobuf:"bytes,10,opt,name=quadratic_slippage_factor,json=quadraticSlippageFactor,proto3" json:"quadratic_slippage_factor,omitempty"` // Successor configuration. If this proposal is meant to succeed a given market, then this should be set. Successor *SuccessorConfiguration `protobuf:"bytes,11,opt,name=successor,proto3,oneof" json:"successor,omitempty"` // Liquidity SLA parameters LiquiditySlaParameters *LiquiditySLAParameters `protobuf:"bytes,12,opt,name=liquidity_sla_parameters,json=liquiditySlaParameters,proto3" json:"liquidity_sla_parameters,omitempty"` + // Specifies how the liquidity fee for the market will be calculated. + LiquidityFeeSettings *LiquidityFeeSettings `protobuf:"bytes,13,opt,name=liquidity_fee_settings,json=liquidityFeeSettings,proto3" json:"liquidity_fee_settings,omitempty"` + // Liquidation strategy for this market. + LiquidationStrategy *LiquidationStrategy `protobuf:"bytes,14,opt,name=liquidation_strategy,json=liquidationStrategy,proto3" json:"liquidation_strategy,omitempty"` + // Mark price configuration. + MarkPriceConfiguration *CompositePriceConfiguration `protobuf:"bytes,15,opt,name=mark_price_configuration,json=markPriceConfiguration,proto3" json:"mark_price_configuration,omitempty"` } func (x *NewMarketConfiguration) Reset() { @@ -1197,6 +1307,7 @@ func (x *NewMarketConfiguration) GetLinearSlippageFactor() string { return "" } +// Deprecated: Do not use. func (x *NewMarketConfiguration) GetQuadraticSlippageFactor() string { if x != nil { return x.QuadraticSlippageFactor @@ -1218,6 +1329,27 @@ func (x *NewMarketConfiguration) GetLiquiditySlaParameters() *LiquiditySLAParame return nil } +func (x *NewMarketConfiguration) GetLiquidityFeeSettings() *LiquidityFeeSettings { + if x != nil { + return x.LiquidityFeeSettings + } + return nil +} + +func (x *NewMarketConfiguration) GetLiquidationStrategy() *LiquidationStrategy { + if x != nil { + return x.LiquidationStrategy + } + return nil +} + +func (x *NewMarketConfiguration) GetMarkPriceConfiguration() *CompositePriceConfiguration { + if x != nil { + return x.MarkPriceConfiguration + } + return nil +} + type isNewMarketConfiguration_RiskParameters interface { isNewMarketConfiguration_RiskParameters() } @@ -1536,9 +1668,17 @@ type UpdateMarketConfiguration struct { // Linear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume. LinearSlippageFactor string `protobuf:"bytes,6,opt,name=linear_slippage_factor,json=linearSlippageFactor,proto3" json:"linear_slippage_factor,omitempty"` // Quadratic slippage factor is used to cap the slippage component of maintenance margin - it is applied to the square of the slippage volume. + // + // Deprecated: Do not use. QuadraticSlippageFactor string `protobuf:"bytes,7,opt,name=quadratic_slippage_factor,json=quadraticSlippageFactor,proto3" json:"quadratic_slippage_factor,omitempty"` // Liquidity SLA parameters LiquiditySlaParameters *LiquiditySLAParameters `protobuf:"bytes,8,opt,name=liquidity_sla_parameters,json=liquiditySlaParameters,proto3" json:"liquidity_sla_parameters,omitempty"` + // Specifies how the liquidity fee for the market will be calculated. + LiquidityFeeSettings *LiquidityFeeSettings `protobuf:"bytes,9,opt,name=liquidity_fee_settings,json=liquidityFeeSettings,proto3" json:"liquidity_fee_settings,omitempty"` + // Liquidation strategy parameters + LiquidationStrategy *LiquidationStrategy `protobuf:"bytes,10,opt,name=liquidation_strategy,json=liquidationStrategy,proto3" json:"liquidation_strategy,omitempty"` + // Mark price configuration. + MarkPriceConfiguration *CompositePriceConfiguration `protobuf:"bytes,11,opt,name=mark_price_configuration,json=markPriceConfiguration,proto3" json:"mark_price_configuration,omitempty"` } func (x *UpdateMarketConfiguration) Reset() { @@ -1636,6 +1776,7 @@ func (x *UpdateMarketConfiguration) GetLinearSlippageFactor() string { return "" } +// Deprecated: Do not use. func (x *UpdateMarketConfiguration) GetQuadraticSlippageFactor() string { if x != nil { return x.QuadraticSlippageFactor @@ -1650,6 +1791,27 @@ func (x *UpdateMarketConfiguration) GetLiquiditySlaParameters() *LiquiditySLAPar return nil } +func (x *UpdateMarketConfiguration) GetLiquidityFeeSettings() *LiquidityFeeSettings { + if x != nil { + return x.LiquidityFeeSettings + } + return nil +} + +func (x *UpdateMarketConfiguration) GetLiquidationStrategy() *LiquidationStrategy { + if x != nil { + return x.LiquidationStrategy + } + return nil +} + +func (x *UpdateMarketConfiguration) GetMarkPriceConfiguration() *CompositePriceConfiguration { + if x != nil { + return x.MarkPriceConfiguration + } + return nil +} + type isUpdateMarketConfiguration_RiskParameters interface { isUpdateMarketConfiguration_RiskParameters() } @@ -1689,6 +1851,8 @@ type UpdateSpotMarketConfiguration struct { RiskParameters isUpdateSpotMarketConfiguration_RiskParameters `protobuf_oneof:"risk_parameters"` // Specifies the liquidity provision SLA parameters. SlaParams *LiquiditySLAParameters `protobuf:"bytes,4,opt,name=sla_params,json=slaParams,proto3" json:"sla_params,omitempty"` + // Specifies how the liquidity fee for the market will be calculated. + LiquidityFeeSettings *LiquidityFeeSettings `protobuf:"bytes,5,opt,name=liquidity_fee_settings,json=liquidityFeeSettings,proto3" json:"liquidity_fee_settings,omitempty"` } func (x *UpdateSpotMarketConfiguration) Reset() { @@ -1772,6 +1936,13 @@ func (x *UpdateSpotMarketConfiguration) GetSlaParams() *LiquiditySLAParameters { return nil } +func (x *UpdateSpotMarketConfiguration) GetLiquidityFeeSettings() *LiquidityFeeSettings { + if x != nil { + return x.LiquidityFeeSettings + } + return nil +} + type isUpdateSpotMarketConfiguration_RiskParameters interface { isUpdateSpotMarketConfiguration_RiskParameters() } @@ -1798,6 +1969,8 @@ type UpdateInstrumentConfiguration struct { // Instrument code, human-readable shortcode used to describe the instrument. Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` + // Instrument name + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Product specification. // // Types that are assignable to Product: @@ -1846,6 +2019,13 @@ func (x *UpdateInstrumentConfiguration) GetCode() string { return "" } +func (x *UpdateInstrumentConfiguration) GetName() string { + if x != nil { + return x.Name + } + return "" +} + func (m *UpdateInstrumentConfiguration) GetProduct() isUpdateInstrumentConfiguration_Product { if m != nil { return m.Product @@ -1983,6 +2163,14 @@ type UpdatePerpetualProduct struct { DataSourceSpecForSettlementData *DataSourceDefinition `protobuf:"bytes,7,opt,name=data_source_spec_for_settlement_data,json=dataSourceSpecForSettlementData,proto3" json:"data_source_spec_for_settlement_data,omitempty"` // Binding between the data source spec and the settlement data. DataSourceSpecBinding *DataSourceSpecToPerpetualBinding `protobuf:"bytes,8,opt,name=data_source_spec_binding,json=dataSourceSpecBinding,proto3" json:"data_source_spec_binding,omitempty"` + // Factor applied to funding-rates. This scales the impact that spot price deviations have on funding payments. + FundingRateScalingFactor *string `protobuf:"bytes,9,opt,name=funding_rate_scaling_factor,json=fundingRateScalingFactor,proto3,oneof" json:"funding_rate_scaling_factor,omitempty"` + // Lower bound for the funding-rate such that the funding-rate will never be lower than this value. + FundingRateLowerBound *string `protobuf:"bytes,10,opt,name=funding_rate_lower_bound,json=fundingRateLowerBound,proto3,oneof" json:"funding_rate_lower_bound,omitempty"` + // Upper bound for the funding-rate such that the funding-rate will never be higher than this value. + FundingRateUpperBound *string `protobuf:"bytes,11,opt,name=funding_rate_upper_bound,json=fundingRateUpperBound,proto3,oneof" json:"funding_rate_upper_bound,omitempty"` + // Configuration for the internal composite price used in funding payment calculation. + InternalCompositePriceConfiguration *CompositePriceConfiguration `protobuf:"bytes,13,opt,name=internal_composite_price_configuration,json=internalCompositePriceConfiguration,proto3,oneof" json:"internal_composite_price_configuration,omitempty"` } func (x *UpdatePerpetualProduct) Reset() { @@ -2073,6 +2261,34 @@ func (x *UpdatePerpetualProduct) GetDataSourceSpecBinding() *DataSourceSpecToPer return nil } +func (x *UpdatePerpetualProduct) GetFundingRateScalingFactor() string { + if x != nil && x.FundingRateScalingFactor != nil { + return *x.FundingRateScalingFactor + } + return "" +} + +func (x *UpdatePerpetualProduct) GetFundingRateLowerBound() string { + if x != nil && x.FundingRateLowerBound != nil { + return *x.FundingRateLowerBound + } + return "" +} + +func (x *UpdatePerpetualProduct) GetFundingRateUpperBound() string { + if x != nil && x.FundingRateUpperBound != nil { + return *x.FundingRateUpperBound + } + return "" +} + +func (x *UpdatePerpetualProduct) GetInternalCompositePriceConfiguration() *CompositePriceConfiguration { + if x != nil { + return x.InternalCompositePriceConfiguration + } + return nil +} + // Update network configuration on Vega type UpdateNetworkParameter struct { state protoimpl.MessageState @@ -2551,24 +2767,36 @@ func (*ProposalTerms_UpdateReferralProgram) isProposalTerms_Change() {} func (*ProposalTerms_UpdateVolumeDiscountProgram) isProposalTerms_Change() {} -// Rationale behind a proposal. -type ProposalRationale struct { +// Terms change for a batch governance proposal +type BatchProposalTermsChange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description to show a short title / something in case the link goes offline. - // This is to be between 0 and 20k unicode characters. - // This is mandatory for all proposals. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // Title to be used to give a short description of the proposal in lists. - // This is to be between 0 and 100 unicode characters. - // This is mandatory for all proposals. - Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` -} - -func (x *ProposalRationale) Reset() { - *x = ProposalRationale{} + // Timestamp as Unix time in seconds when proposal terms gets enacted if proposal passed the vote, + // constrained by `minEnact` and `maxEnact` network parameters. + EnactmentTimestamp int64 `protobuf:"varint,1,opt,name=enactment_timestamp,json=enactmentTimestamp,proto3" json:"enactment_timestamp,omitempty"` + // Changes being proposed. + // + // Types that are assignable to Change: + // + // *BatchProposalTermsChange_UpdateMarket + // *BatchProposalTermsChange_NewMarket + // *BatchProposalTermsChange_UpdateNetworkParameter + // *BatchProposalTermsChange_NewFreeform + // *BatchProposalTermsChange_UpdateAsset + // *BatchProposalTermsChange_NewSpotMarket + // *BatchProposalTermsChange_UpdateSpotMarket + // *BatchProposalTermsChange_NewTransfer + // *BatchProposalTermsChange_CancelTransfer + // *BatchProposalTermsChange_UpdateMarketState + // *BatchProposalTermsChange_UpdateReferralProgram + // *BatchProposalTermsChange_UpdateVolumeDiscountProgram + Change isBatchProposalTermsChange_Change `protobuf_oneof:"change"` +} + +func (x *BatchProposalTermsChange) Reset() { + *x = BatchProposalTermsChange{} if protoimpl.UnsafeEnabled { mi := &file_vega_governance_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2576,13 +2804,13 @@ func (x *ProposalRationale) Reset() { } } -func (x *ProposalRationale) String() string { +func (x *BatchProposalTermsChange) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ProposalRationale) ProtoMessage() {} +func (*BatchProposalTermsChange) ProtoMessage() {} -func (x *ProposalRationale) ProtoReflect() protoreflect.Message { +func (x *BatchProposalTermsChange) ProtoReflect() protoreflect.Message { mi := &file_vega_governance_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2594,139 +2822,598 @@ func (x *ProposalRationale) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ProposalRationale.ProtoReflect.Descriptor instead. -func (*ProposalRationale) Descriptor() ([]byte, []int) { +// Deprecated: Use BatchProposalTermsChange.ProtoReflect.Descriptor instead. +func (*BatchProposalTermsChange) Descriptor() ([]byte, []int) { return file_vega_governance_proto_rawDescGZIP(), []int{21} } -func (x *ProposalRationale) GetDescription() string { +func (x *BatchProposalTermsChange) GetEnactmentTimestamp() int64 { if x != nil { - return x.Description + return x.EnactmentTimestamp } - return "" + return 0 } -func (x *ProposalRationale) GetTitle() string { - if x != nil { - return x.Title +func (m *BatchProposalTermsChange) GetChange() isBatchProposalTermsChange_Change { + if m != nil { + return m.Change } - return "" + return nil } -// Governance data -type GovernanceData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *BatchProposalTermsChange) GetUpdateMarket() *UpdateMarket { + if x, ok := x.GetChange().(*BatchProposalTermsChange_UpdateMarket); ok { + return x.UpdateMarket + } + return nil +} - // Governance proposal that is being voted on. - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` - // All YES votes in favour of the proposal above. - Yes []*Vote `protobuf:"bytes,2,rep,name=yes,proto3" json:"yes,omitempty"` - // All NO votes against the proposal above. - No []*Vote `protobuf:"bytes,3,rep,name=no,proto3" json:"no,omitempty"` - // All latest YES votes by party which is guaranteed to be unique, - // where key (string) is the party ID i.e. public key and - // value (Vote) is the vote cast by the given party. - YesParty map[string]*Vote `protobuf:"bytes,4,rep,name=yes_party,json=yesParty,proto3" json:"yes_party,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // All latest NO votes by party which is guaranteed to be unique, - // where key (string) is the party ID i.e. public key and - // value (Vote) is the vote cast by the given party. - NoParty map[string]*Vote `protobuf:"bytes,5,rep,name=no_party,json=noParty,proto3" json:"no_party,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +func (x *BatchProposalTermsChange) GetNewMarket() *NewMarket { + if x, ok := x.GetChange().(*BatchProposalTermsChange_NewMarket); ok { + return x.NewMarket + } + return nil } -func (x *GovernanceData) Reset() { - *x = GovernanceData{} - if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *BatchProposalTermsChange) GetUpdateNetworkParameter() *UpdateNetworkParameter { + if x, ok := x.GetChange().(*BatchProposalTermsChange_UpdateNetworkParameter); ok { + return x.UpdateNetworkParameter } + return nil } -func (x *GovernanceData) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *BatchProposalTermsChange) GetNewFreeform() *NewFreeform { + if x, ok := x.GetChange().(*BatchProposalTermsChange_NewFreeform); ok { + return x.NewFreeform + } + return nil } -func (*GovernanceData) ProtoMessage() {} +func (x *BatchProposalTermsChange) GetUpdateAsset() *UpdateAsset { + if x, ok := x.GetChange().(*BatchProposalTermsChange_UpdateAsset); ok { + return x.UpdateAsset + } + return nil +} -func (x *GovernanceData) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *BatchProposalTermsChange) GetNewSpotMarket() *NewSpotMarket { + if x, ok := x.GetChange().(*BatchProposalTermsChange_NewSpotMarket); ok { + return x.NewSpotMarket } - return mi.MessageOf(x) + return nil } -// Deprecated: Use GovernanceData.ProtoReflect.Descriptor instead. -func (*GovernanceData) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{22} +func (x *BatchProposalTermsChange) GetUpdateSpotMarket() *UpdateSpotMarket { + if x, ok := x.GetChange().(*BatchProposalTermsChange_UpdateSpotMarket); ok { + return x.UpdateSpotMarket + } + return nil } -func (x *GovernanceData) GetProposal() *Proposal { - if x != nil { - return x.Proposal +func (x *BatchProposalTermsChange) GetNewTransfer() *NewTransfer { + if x, ok := x.GetChange().(*BatchProposalTermsChange_NewTransfer); ok { + return x.NewTransfer } return nil } -func (x *GovernanceData) GetYes() []*Vote { - if x != nil { - return x.Yes +func (x *BatchProposalTermsChange) GetCancelTransfer() *CancelTransfer { + if x, ok := x.GetChange().(*BatchProposalTermsChange_CancelTransfer); ok { + return x.CancelTransfer } return nil } -func (x *GovernanceData) GetNo() []*Vote { - if x != nil { - return x.No +func (x *BatchProposalTermsChange) GetUpdateMarketState() *UpdateMarketState { + if x, ok := x.GetChange().(*BatchProposalTermsChange_UpdateMarketState); ok { + return x.UpdateMarketState } return nil } -func (x *GovernanceData) GetYesParty() map[string]*Vote { - if x != nil { - return x.YesParty +func (x *BatchProposalTermsChange) GetUpdateReferralProgram() *UpdateReferralProgram { + if x, ok := x.GetChange().(*BatchProposalTermsChange_UpdateReferralProgram); ok { + return x.UpdateReferralProgram } return nil } -func (x *GovernanceData) GetNoParty() map[string]*Vote { - if x != nil { - return x.NoParty +func (x *BatchProposalTermsChange) GetUpdateVolumeDiscountProgram() *UpdateVolumeDiscountProgram { + if x, ok := x.GetChange().(*BatchProposalTermsChange_UpdateVolumeDiscountProgram); ok { + return x.UpdateVolumeDiscountProgram } return nil } -// Governance proposal -type Proposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +type isBatchProposalTermsChange_Change interface { + isBatchProposalTermsChange_Change() +} - // Unique proposal ID. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Proposal reference. - Reference string `protobuf:"bytes,2,opt,name=reference,proto3" json:"reference,omitempty"` - // Party ID i.e. public key of the party submitting the proposal. - PartyId string `protobuf:"bytes,3,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` - // Current state of the proposal, i.e. open, passed, failed etc. - State Proposal_State `protobuf:"varint,4,opt,name=state,proto3,enum=vega.Proposal_State" json:"state,omitempty"` - // Proposal timestamp for date and time as Unix time in nanoseconds when proposal was submitted to the network. - Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // Proposal configuration and the actual change that is meant to be executed when proposal is enacted. - Terms *ProposalTerms `protobuf:"bytes,6,opt,name=terms,proto3" json:"terms,omitempty"` - // Reason for the current state of the proposal, this may be set in case of REJECTED and FAILED statuses. - Reason *ProposalError `protobuf:"varint,7,opt,name=reason,proto3,enum=vega.ProposalError,oneof" json:"reason,omitempty"` - // Detailed error associated to the reason. - ErrorDetails *string `protobuf:"bytes,8,opt,name=error_details,json=errorDetails,proto3,oneof" json:"error_details,omitempty"` - // Rationale behind a proposal. - Rationale *ProposalRationale `protobuf:"bytes,9,opt,name=rationale,proto3" json:"rationale,omitempty"` - // Required vote participation for this proposal. +type BatchProposalTermsChange_UpdateMarket struct { + // Proposal change for modifying an existing futures market. + UpdateMarket *UpdateMarket `protobuf:"bytes,101,opt,name=update_market,json=updateMarket,proto3,oneof"` +} + +type BatchProposalTermsChange_NewMarket struct { + // Proposal change for creating new futures market. + NewMarket *NewMarket `protobuf:"bytes,102,opt,name=new_market,json=newMarket,proto3,oneof"` +} + +type BatchProposalTermsChange_UpdateNetworkParameter struct { + // Proposal change for updating Vega network parameters. + UpdateNetworkParameter *UpdateNetworkParameter `protobuf:"bytes,103,opt,name=update_network_parameter,json=updateNetworkParameter,proto3,oneof"` +} + +type BatchProposalTermsChange_NewFreeform struct { + // Proposal change for a freeform request, which can be voted on but does not change the behaviour of the system, + // and can be used to gauge community sentiment. + NewFreeform *NewFreeform `protobuf:"bytes,104,opt,name=new_freeform,json=newFreeform,proto3,oneof"` +} + +type BatchProposalTermsChange_UpdateAsset struct { + // Proposal change for updating an asset. + UpdateAsset *UpdateAsset `protobuf:"bytes,105,opt,name=update_asset,json=updateAsset,proto3,oneof"` +} + +type BatchProposalTermsChange_NewSpotMarket struct { + // Proposal change for creating new spot market. + NewSpotMarket *NewSpotMarket `protobuf:"bytes,106,opt,name=new_spot_market,json=newSpotMarket,proto3,oneof"` +} + +type BatchProposalTermsChange_UpdateSpotMarket struct { + // Proposal change for modifying an existing spot market. + UpdateSpotMarket *UpdateSpotMarket `protobuf:"bytes,107,opt,name=update_spot_market,json=updateSpotMarket,proto3,oneof"` +} + +type BatchProposalTermsChange_NewTransfer struct { + // Proposal change for a governance initiated transfer. + NewTransfer *NewTransfer `protobuf:"bytes,108,opt,name=new_transfer,json=newTransfer,proto3,oneof"` +} + +type BatchProposalTermsChange_CancelTransfer struct { + // Proposal change to cancel a governance initiated transfe. + CancelTransfer *CancelTransfer `protobuf:"bytes,109,opt,name=cancel_transfer,json=cancelTransfer,proto3,oneof"` +} + +type BatchProposalTermsChange_UpdateMarketState struct { + // Proposal change for updating the state of a market. + UpdateMarketState *UpdateMarketState `protobuf:"bytes,110,opt,name=update_market_state,json=updateMarketState,proto3,oneof"` +} + +type BatchProposalTermsChange_UpdateReferralProgram struct { + // Proposal change for updating the referral program. + UpdateReferralProgram *UpdateReferralProgram `protobuf:"bytes,111,opt,name=update_referral_program,json=updateReferralProgram,proto3,oneof"` +} + +type BatchProposalTermsChange_UpdateVolumeDiscountProgram struct { + // Proposal change for updating the volume discount program. + UpdateVolumeDiscountProgram *UpdateVolumeDiscountProgram `protobuf:"bytes,112,opt,name=update_volume_discount_program,json=updateVolumeDiscountProgram,proto3,oneof"` +} + +func (*BatchProposalTermsChange_UpdateMarket) isBatchProposalTermsChange_Change() {} + +func (*BatchProposalTermsChange_NewMarket) isBatchProposalTermsChange_Change() {} + +func (*BatchProposalTermsChange_UpdateNetworkParameter) isBatchProposalTermsChange_Change() {} + +func (*BatchProposalTermsChange_NewFreeform) isBatchProposalTermsChange_Change() {} + +func (*BatchProposalTermsChange_UpdateAsset) isBatchProposalTermsChange_Change() {} + +func (*BatchProposalTermsChange_NewSpotMarket) isBatchProposalTermsChange_Change() {} + +func (*BatchProposalTermsChange_UpdateSpotMarket) isBatchProposalTermsChange_Change() {} + +func (*BatchProposalTermsChange_NewTransfer) isBatchProposalTermsChange_Change() {} + +func (*BatchProposalTermsChange_CancelTransfer) isBatchProposalTermsChange_Change() {} + +func (*BatchProposalTermsChange_UpdateMarketState) isBatchProposalTermsChange_Change() {} + +func (*BatchProposalTermsChange_UpdateReferralProgram) isBatchProposalTermsChange_Change() {} + +func (*BatchProposalTermsChange_UpdateVolumeDiscountProgram) isBatchProposalTermsChange_Change() {} + +type ProposalParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents the minimum time before a proposal can be closed for voting. + MinClose int64 `protobuf:"varint,1,opt,name=min_close,json=minClose,proto3" json:"min_close,omitempty"` + // Represents the maximum time that a proposal can be open for voting. + MaxClose int64 `protobuf:"varint,2,opt,name=max_close,json=maxClose,proto3" json:"max_close,omitempty"` + // Represents the minimum time before an enacted proposal takes effect. + MinEnact int64 `protobuf:"varint,3,opt,name=min_enact,json=minEnact,proto3" json:"min_enact,omitempty"` + // Represents the maximum time before an enacted proposal must take effect. + MaxEnact int64 `protobuf:"varint,4,opt,name=max_enact,json=maxEnact,proto3" json:"max_enact,omitempty"` + // Specifies the required percentage of eligible participants that must partake in the proposal for it to be valid. + RequiredParticipation string `protobuf:"bytes,5,opt,name=required_participation,json=requiredParticipation,proto3" json:"required_participation,omitempty"` + // Specifies the required percentage of votes a proposal needs to be approved. + RequiredMajority string `protobuf:"bytes,6,opt,name=required_majority,json=requiredMajority,proto3" json:"required_majority,omitempty"` + // Specifies the minimum governance token balance a proposer must hold to initiate a proposal. + MinProposerBalance string `protobuf:"bytes,7,opt,name=min_proposer_balance,json=minProposerBalance,proto3" json:"min_proposer_balance,omitempty"` + // Specifies the minimum governance token balance a voter must hold to participate in voting. + MinVoterBalance string `protobuf:"bytes,8,opt,name=min_voter_balance,json=minVoterBalance,proto3" json:"min_voter_balance,omitempty"` + // Specifies the required percentage of participation from liquidity providers for the proposal to be valid. + RequiredParticipationLp string `protobuf:"bytes,9,opt,name=required_participation_lp,json=requiredParticipationLp,proto3" json:"required_participation_lp,omitempty"` + // Specifies the required majority percentage from liquidity providers for a proposal to be approved. + RequiredMajorityLp string `protobuf:"bytes,10,opt,name=required_majority_lp,json=requiredMajorityLp,proto3" json:"required_majority_lp,omitempty"` + // Specifies the minimum share that is akin to equity, which a participant must hold for their vote to be eligible. + MinEquityLikeShare string `protobuf:"bytes,11,opt,name=min_equity_like_share,json=minEquityLikeShare,proto3" json:"min_equity_like_share,omitempty"` +} + +func (x *ProposalParameters) Reset() { + *x = ProposalParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_governance_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProposalParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProposalParameters) ProtoMessage() {} + +func (x *ProposalParameters) ProtoReflect() protoreflect.Message { + mi := &file_vega_governance_proto_msgTypes[22] + 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 ProposalParameters.ProtoReflect.Descriptor instead. +func (*ProposalParameters) Descriptor() ([]byte, []int) { + return file_vega_governance_proto_rawDescGZIP(), []int{22} +} + +func (x *ProposalParameters) GetMinClose() int64 { + if x != nil { + return x.MinClose + } + return 0 +} + +func (x *ProposalParameters) GetMaxClose() int64 { + if x != nil { + return x.MaxClose + } + return 0 +} + +func (x *ProposalParameters) GetMinEnact() int64 { + if x != nil { + return x.MinEnact + } + return 0 +} + +func (x *ProposalParameters) GetMaxEnact() int64 { + if x != nil { + return x.MaxEnact + } + return 0 +} + +func (x *ProposalParameters) GetRequiredParticipation() string { + if x != nil { + return x.RequiredParticipation + } + return "" +} + +func (x *ProposalParameters) GetRequiredMajority() string { + if x != nil { + return x.RequiredMajority + } + return "" +} + +func (x *ProposalParameters) GetMinProposerBalance() string { + if x != nil { + return x.MinProposerBalance + } + return "" +} + +func (x *ProposalParameters) GetMinVoterBalance() string { + if x != nil { + return x.MinVoterBalance + } + return "" +} + +func (x *ProposalParameters) GetRequiredParticipationLp() string { + if x != nil { + return x.RequiredParticipationLp + } + return "" +} + +func (x *ProposalParameters) GetRequiredMajorityLp() string { + if x != nil { + return x.RequiredMajorityLp + } + return "" +} + +func (x *ProposalParameters) GetMinEquityLikeShare() string { + if x != nil { + return x.MinEquityLikeShare + } + return "" +} + +// Terms for a batch governance proposal on Vega +type BatchProposalTerms struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Closing timestamp in Unix time; adheres to `minClose` and `maxClose` limits. + ClosingTimestamp int64 `protobuf:"varint,1,opt,name=closing_timestamp,json=closingTimestamp,proto3" json:"closing_timestamp,omitempty"` + // Specific parameters defining the proposal's characteristics used for validation. + ProposalParams *ProposalParameters `protobuf:"bytes,2,opt,name=proposal_params,json=proposalParams,proto3" json:"proposal_params,omitempty"` + // List of individual changes included in the batch proposal. + Changes []*BatchProposalTermsChange `protobuf:"bytes,3,rep,name=changes,proto3" json:"changes,omitempty"` +} + +func (x *BatchProposalTerms) Reset() { + *x = BatchProposalTerms{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_governance_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchProposalTerms) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchProposalTerms) ProtoMessage() {} + +func (x *BatchProposalTerms) ProtoReflect() protoreflect.Message { + mi := &file_vega_governance_proto_msgTypes[23] + 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 BatchProposalTerms.ProtoReflect.Descriptor instead. +func (*BatchProposalTerms) Descriptor() ([]byte, []int) { + return file_vega_governance_proto_rawDescGZIP(), []int{23} +} + +func (x *BatchProposalTerms) GetClosingTimestamp() int64 { + if x != nil { + return x.ClosingTimestamp + } + return 0 +} + +func (x *BatchProposalTerms) GetProposalParams() *ProposalParameters { + if x != nil { + return x.ProposalParams + } + return nil +} + +func (x *BatchProposalTerms) GetChanges() []*BatchProposalTermsChange { + if x != nil { + return x.Changes + } + return nil +} + +// Rationale behind a proposal. +type ProposalRationale struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description to show a short title / something in case the link goes offline. + // This is to be between 0 and 20k unicode characters. + // This is mandatory for all proposals. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // Title to be used to give a short description of the proposal in lists. + // This is to be between 0 and 100 unicode characters. + // This is mandatory for all proposals. + Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` +} + +func (x *ProposalRationale) Reset() { + *x = ProposalRationale{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_governance_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProposalRationale) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProposalRationale) ProtoMessage() {} + +func (x *ProposalRationale) ProtoReflect() protoreflect.Message { + mi := &file_vega_governance_proto_msgTypes[24] + 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 ProposalRationale.ProtoReflect.Descriptor instead. +func (*ProposalRationale) Descriptor() ([]byte, []int) { + return file_vega_governance_proto_rawDescGZIP(), []int{24} +} + +func (x *ProposalRationale) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ProposalRationale) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +// Governance data +type GovernanceData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Governance proposal that is being voted on. + Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` + // All YES votes in favour of the proposal above. + Yes []*Vote `protobuf:"bytes,2,rep,name=yes,proto3" json:"yes,omitempty"` + // All NO votes against the proposal above. + No []*Vote `protobuf:"bytes,3,rep,name=no,proto3" json:"no,omitempty"` + // All latest YES votes by party which is guaranteed to be unique, + // where key (string) is the party ID i.e. public key and + // value (Vote) is the vote cast by the given party. + YesParty map[string]*Vote `protobuf:"bytes,4,rep,name=yes_party,json=yesParty,proto3" json:"yes_party,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // All latest NO votes by party which is guaranteed to be unique, + // where key (string) is the party ID i.e. public key and + // value (Vote) is the vote cast by the given party. + NoParty map[string]*Vote `protobuf:"bytes,5,rep,name=no_party,json=noParty,proto3" json:"no_party,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Type of proposal this data is for. + ProposalType GovernanceData_Type `protobuf:"varint,6,opt,name=proposal_type,json=proposalType,proto3,enum=vega.GovernanceData_Type" json:"proposal_type,omitempty"` + // If proposal type is batch, proposals will contain all the proposals that are make up the batch. + Proposals []*Proposal `protobuf:"bytes,7,rep,name=proposals,proto3" json:"proposals,omitempty"` +} + +func (x *GovernanceData) Reset() { + *x = GovernanceData{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_governance_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GovernanceData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GovernanceData) ProtoMessage() {} + +func (x *GovernanceData) ProtoReflect() protoreflect.Message { + mi := &file_vega_governance_proto_msgTypes[25] + 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 GovernanceData.ProtoReflect.Descriptor instead. +func (*GovernanceData) Descriptor() ([]byte, []int) { + return file_vega_governance_proto_rawDescGZIP(), []int{25} +} + +func (x *GovernanceData) GetProposal() *Proposal { + if x != nil { + return x.Proposal + } + return nil +} + +func (x *GovernanceData) GetYes() []*Vote { + if x != nil { + return x.Yes + } + return nil +} + +func (x *GovernanceData) GetNo() []*Vote { + if x != nil { + return x.No + } + return nil +} + +func (x *GovernanceData) GetYesParty() map[string]*Vote { + if x != nil { + return x.YesParty + } + return nil +} + +func (x *GovernanceData) GetNoParty() map[string]*Vote { + if x != nil { + return x.NoParty + } + return nil +} + +func (x *GovernanceData) GetProposalType() GovernanceData_Type { + if x != nil { + return x.ProposalType + } + return GovernanceData_TYPE_SINGLE_OR_UNSPECIFIED +} + +func (x *GovernanceData) GetProposals() []*Proposal { + if x != nil { + return x.Proposals + } + return nil +} + +// Governance proposal +type Proposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique proposal ID. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Proposal reference. + Reference string `protobuf:"bytes,2,opt,name=reference,proto3" json:"reference,omitempty"` + // Party ID i.e. public key of the party submitting the proposal. + PartyId string `protobuf:"bytes,3,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + // Current state of the proposal, i.e. open, passed, failed etc. + State Proposal_State `protobuf:"varint,4,opt,name=state,proto3,enum=vega.Proposal_State" json:"state,omitempty"` + // Proposal timestamp for date and time as Unix time in nanoseconds when proposal was submitted to the network. + Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Proposal configuration and the actual change that is meant to be executed when proposal is enacted. + // Single proposal term. + Terms *ProposalTerms `protobuf:"bytes,6,opt,name=terms,proto3,oneof" json:"terms,omitempty"` + // Reason for the current state of the proposal, this may be set in case of REJECTED and FAILED statuses. + Reason *ProposalError `protobuf:"varint,7,opt,name=reason,proto3,enum=vega.ProposalError,oneof" json:"reason,omitempty"` + // Detailed error associated to the reason. + ErrorDetails *string `protobuf:"bytes,8,opt,name=error_details,json=errorDetails,proto3,oneof" json:"error_details,omitempty"` + // Rationale behind a proposal. + Rationale *ProposalRationale `protobuf:"bytes,9,opt,name=rationale,proto3" json:"rationale,omitempty"` + // Required vote participation for this proposal. RequiredParticipation string `protobuf:"bytes,10,opt,name=required_participation,json=requiredParticipation,proto3" json:"required_participation,omitempty"` // Required majority for this proposal. RequiredMajority string `protobuf:"bytes,11,opt,name=required_majority,json=requiredMajority,proto3" json:"required_majority,omitempty"` @@ -2734,12 +3421,16 @@ type Proposal struct { RequiredLiquidityProviderParticipation *string `protobuf:"bytes,12,opt,name=required_liquidity_provider_participation,json=requiredLiquidityProviderParticipation,proto3,oneof" json:"required_liquidity_provider_participation,omitempty"` // Required majority from liquidity providers, optional but is required for market update proposal. RequiredLiquidityProviderMajority *string `protobuf:"bytes,13,opt,name=required_liquidity_provider_majority,json=requiredLiquidityProviderMajority,proto3,oneof" json:"required_liquidity_provider_majority,omitempty"` + // Batch proposal terms. + BatchTerms *BatchProposalTerms `protobuf:"bytes,14,opt,name=batch_terms,json=batchTerms,proto3,oneof" json:"batch_terms,omitempty"` + // ID of a batch proposal that this proposal is part of. + BatchId *string `protobuf:"bytes,15,opt,name=batch_id,json=batchId,proto3,oneof" json:"batch_id,omitempty"` } func (x *Proposal) Reset() { *x = Proposal{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[23] + mi := &file_vega_governance_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2752,7 +3443,7 @@ func (x *Proposal) String() string { func (*Proposal) ProtoMessage() {} func (x *Proposal) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[23] + mi := &file_vega_governance_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2765,7 +3456,7 @@ func (x *Proposal) ProtoReflect() protoreflect.Message { // Deprecated: Use Proposal.ProtoReflect.Descriptor instead. func (*Proposal) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{23} + return file_vega_governance_proto_rawDescGZIP(), []int{26} } func (x *Proposal) GetId() string { @@ -2859,6 +3550,20 @@ func (x *Proposal) GetRequiredLiquidityProviderMajority() string { return "" } +func (x *Proposal) GetBatchTerms() *BatchProposalTerms { + if x != nil { + return x.BatchTerms + } + return nil +} + +func (x *Proposal) GetBatchId() string { + if x != nil && x.BatchId != nil { + return *x.BatchId + } + return "" +} + // Governance vote type Vote struct { state protoimpl.MessageState @@ -2877,14 +3582,16 @@ type Vote struct { TotalGovernanceTokenBalance string `protobuf:"bytes,5,opt,name=total_governance_token_balance,json=totalGovernanceTokenBalance,proto3" json:"total_governance_token_balance,omitempty"` // The weight of this vote based on the total number of governance tokens. TotalGovernanceTokenWeight string `protobuf:"bytes,6,opt,name=total_governance_token_weight,json=totalGovernanceTokenWeight,proto3" json:"total_governance_token_weight,omitempty"` - // The weight of the vote compared to the total amount of equity-like share on the market. + // The weight of the vote compared to the total amount of equity-like share on the market. It is only populated if the vote is for a single type proposal. TotalEquityLikeShareWeight string `protobuf:"bytes,7,opt,name=total_equity_like_share_weight,json=totalEquityLikeShareWeight,proto3" json:"total_equity_like_share_weight,omitempty"` + // The per market weight of the vote compared to the total amount of equity-like share on the market.. It is only populated if the vote is for a batch type proposal. + PerMarketEquityLikeShareWeight map[string]string `protobuf:"bytes,8,rep,name=per_market_equity_like_share_weight,json=perMarketEquityLikeShareWeight,proto3" json:"per_market_equity_like_share_weight,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *Vote) Reset() { *x = Vote{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[24] + mi := &file_vega_governance_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2897,7 +3604,7 @@ func (x *Vote) String() string { func (*Vote) ProtoMessage() {} func (x *Vote) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[24] + mi := &file_vega_governance_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2910,7 +3617,7 @@ func (x *Vote) ProtoReflect() protoreflect.Message { // Deprecated: Use Vote.ProtoReflect.Descriptor instead. func (*Vote) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{24} + return file_vega_governance_proto_rawDescGZIP(), []int{27} } func (x *Vote) GetPartyId() string { @@ -2962,6 +3669,13 @@ func (x *Vote) GetTotalEquityLikeShareWeight() string { return "" } +func (x *Vote) GetPerMarketEquityLikeShareWeight() map[string]string { + if x != nil { + return x.PerMarketEquityLikeShareWeight + } + return nil +} + type UpdateVolumeDiscountProgram struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2974,7 +3688,7 @@ type UpdateVolumeDiscountProgram struct { func (x *UpdateVolumeDiscountProgram) Reset() { *x = UpdateVolumeDiscountProgram{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[25] + mi := &file_vega_governance_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2987,7 +3701,7 @@ func (x *UpdateVolumeDiscountProgram) String() string { func (*UpdateVolumeDiscountProgram) ProtoMessage() {} func (x *UpdateVolumeDiscountProgram) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[25] + mi := &file_vega_governance_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3000,7 +3714,7 @@ func (x *UpdateVolumeDiscountProgram) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateVolumeDiscountProgram.ProtoReflect.Descriptor instead. func (*UpdateVolumeDiscountProgram) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{25} + return file_vega_governance_proto_rawDescGZIP(), []int{28} } func (x *UpdateVolumeDiscountProgram) GetChanges() *VolumeDiscountProgramChanges { @@ -3029,7 +3743,7 @@ type VolumeDiscountProgramChanges struct { func (x *VolumeDiscountProgramChanges) Reset() { *x = VolumeDiscountProgramChanges{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[26] + mi := &file_vega_governance_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3042,7 +3756,7 @@ func (x *VolumeDiscountProgramChanges) String() string { func (*VolumeDiscountProgramChanges) ProtoMessage() {} func (x *VolumeDiscountProgramChanges) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[26] + mi := &file_vega_governance_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3055,7 +3769,7 @@ func (x *VolumeDiscountProgramChanges) ProtoReflect() protoreflect.Message { // Deprecated: Use VolumeDiscountProgramChanges.ProtoReflect.Descriptor instead. func (*VolumeDiscountProgramChanges) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{26} + return file_vega_governance_proto_rawDescGZIP(), []int{29} } func (x *VolumeDiscountProgramChanges) GetBenefitTiers() []*VolumeBenefitTier { @@ -3091,7 +3805,7 @@ type UpdateReferralProgram struct { func (x *UpdateReferralProgram) Reset() { *x = UpdateReferralProgram{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[27] + mi := &file_vega_governance_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3104,7 +3818,7 @@ func (x *UpdateReferralProgram) String() string { func (*UpdateReferralProgram) ProtoMessage() {} func (x *UpdateReferralProgram) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[27] + mi := &file_vega_governance_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3117,7 +3831,7 @@ func (x *UpdateReferralProgram) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateReferralProgram.ProtoReflect.Descriptor instead. func (*UpdateReferralProgram) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{27} + return file_vega_governance_proto_rawDescGZIP(), []int{30} } func (x *UpdateReferralProgram) GetChanges() *ReferralProgramChanges { @@ -3150,7 +3864,7 @@ type ReferralProgramChanges struct { func (x *ReferralProgramChanges) Reset() { *x = ReferralProgramChanges{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[28] + mi := &file_vega_governance_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3163,7 +3877,7 @@ func (x *ReferralProgramChanges) String() string { func (*ReferralProgramChanges) ProtoMessage() {} func (x *ReferralProgramChanges) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[28] + mi := &file_vega_governance_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3176,7 +3890,7 @@ func (x *ReferralProgramChanges) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralProgramChanges.ProtoReflect.Descriptor instead. func (*ReferralProgramChanges) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{28} + return file_vega_governance_proto_rawDescGZIP(), []int{31} } func (x *ReferralProgramChanges) GetBenefitTiers() []*BenefitTier { @@ -3219,7 +3933,7 @@ type UpdateMarketState struct { func (x *UpdateMarketState) Reset() { *x = UpdateMarketState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[29] + mi := &file_vega_governance_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3232,7 +3946,7 @@ func (x *UpdateMarketState) String() string { func (*UpdateMarketState) ProtoMessage() {} func (x *UpdateMarketState) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[29] + mi := &file_vega_governance_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3245,7 +3959,7 @@ func (x *UpdateMarketState) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateMarketState.ProtoReflect.Descriptor instead. func (*UpdateMarketState) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{29} + return file_vega_governance_proto_rawDescGZIP(), []int{32} } func (x *UpdateMarketState) GetChanges() *UpdateMarketStateConfiguration { @@ -3271,7 +3985,7 @@ type UpdateMarketStateConfiguration struct { func (x *UpdateMarketStateConfiguration) Reset() { *x = UpdateMarketStateConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[30] + mi := &file_vega_governance_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3284,7 +3998,7 @@ func (x *UpdateMarketStateConfiguration) String() string { func (*UpdateMarketStateConfiguration) ProtoMessage() {} func (x *UpdateMarketStateConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[30] + mi := &file_vega_governance_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3297,7 +4011,7 @@ func (x *UpdateMarketStateConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateMarketStateConfiguration.ProtoReflect.Descriptor instead. func (*UpdateMarketStateConfiguration) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{30} + return file_vega_governance_proto_rawDescGZIP(), []int{33} } func (x *UpdateMarketStateConfiguration) GetMarketId() string { @@ -3333,7 +4047,7 @@ type CancelTransfer struct { func (x *CancelTransfer) Reset() { *x = CancelTransfer{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[31] + mi := &file_vega_governance_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3346,7 +4060,7 @@ func (x *CancelTransfer) String() string { func (*CancelTransfer) ProtoMessage() {} func (x *CancelTransfer) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[31] + mi := &file_vega_governance_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3359,7 +4073,7 @@ func (x *CancelTransfer) ProtoReflect() protoreflect.Message { // Deprecated: Use CancelTransfer.ProtoReflect.Descriptor instead. func (*CancelTransfer) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{31} + return file_vega_governance_proto_rawDescGZIP(), []int{34} } func (x *CancelTransfer) GetChanges() *CancelTransferConfiguration { @@ -3381,7 +4095,7 @@ type CancelTransferConfiguration struct { func (x *CancelTransferConfiguration) Reset() { *x = CancelTransferConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[32] + mi := &file_vega_governance_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3394,7 +4108,7 @@ func (x *CancelTransferConfiguration) String() string { func (*CancelTransferConfiguration) ProtoMessage() {} func (x *CancelTransferConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[32] + mi := &file_vega_governance_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3407,7 +4121,7 @@ func (x *CancelTransferConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use CancelTransferConfiguration.ProtoReflect.Descriptor instead. func (*CancelTransferConfiguration) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{32} + return file_vega_governance_proto_rawDescGZIP(), []int{35} } func (x *CancelTransferConfiguration) GetTransferId() string { @@ -3430,7 +4144,7 @@ type NewTransfer struct { func (x *NewTransfer) Reset() { *x = NewTransfer{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[33] + mi := &file_vega_governance_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3443,7 +4157,7 @@ func (x *NewTransfer) String() string { func (*NewTransfer) ProtoMessage() {} func (x *NewTransfer) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[33] + mi := &file_vega_governance_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3456,7 +4170,7 @@ func (x *NewTransfer) ProtoReflect() protoreflect.Message { // Deprecated: Use NewTransfer.ProtoReflect.Descriptor instead. func (*NewTransfer) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{33} + return file_vega_governance_proto_rawDescGZIP(), []int{36} } func (x *NewTransfer) GetChanges() *NewTransferConfiguration { @@ -3504,7 +4218,7 @@ type NewTransferConfiguration struct { func (x *NewTransferConfiguration) Reset() { *x = NewTransferConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[34] + mi := &file_vega_governance_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3517,7 +4231,7 @@ func (x *NewTransferConfiguration) String() string { func (*NewTransferConfiguration) ProtoMessage() {} func (x *NewTransferConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[34] + mi := &file_vega_governance_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3530,7 +4244,7 @@ func (x *NewTransferConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use NewTransferConfiguration.ProtoReflect.Descriptor instead. func (*NewTransferConfiguration) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{34} + return file_vega_governance_proto_rawDescGZIP(), []int{37} } func (x *NewTransferConfiguration) GetSourceType() AccountType { @@ -3639,7 +4353,7 @@ type OneOffTransfer struct { func (x *OneOffTransfer) Reset() { *x = OneOffTransfer{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[35] + mi := &file_vega_governance_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3652,7 +4366,7 @@ func (x *OneOffTransfer) String() string { func (*OneOffTransfer) ProtoMessage() {} func (x *OneOffTransfer) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[35] + mi := &file_vega_governance_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3665,7 +4379,7 @@ func (x *OneOffTransfer) ProtoReflect() protoreflect.Message { // Deprecated: Use OneOffTransfer.ProtoReflect.Descriptor instead. func (*OneOffTransfer) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{35} + return file_vega_governance_proto_rawDescGZIP(), []int{38} } func (x *OneOffTransfer) GetDeliverOn() int64 { @@ -3691,7 +4405,7 @@ type RecurringTransfer struct { func (x *RecurringTransfer) Reset() { *x = RecurringTransfer{} if protoimpl.UnsafeEnabled { - mi := &file_vega_governance_proto_msgTypes[36] + mi := &file_vega_governance_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3704,7 +4418,7 @@ func (x *RecurringTransfer) String() string { func (*RecurringTransfer) ProtoMessage() {} func (x *RecurringTransfer) ProtoReflect() protoreflect.Message { - mi := &file_vega_governance_proto_msgTypes[36] + mi := &file_vega_governance_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3717,7 +4431,7 @@ func (x *RecurringTransfer) ProtoReflect() protoreflect.Message { // Deprecated: Use RecurringTransfer.ProtoReflect.Descriptor instead. func (*RecurringTransfer) Descriptor() ([]byte, []int) { - return file_vega_governance_proto_rawDescGZIP(), []int{36} + return file_vega_governance_proto_rawDescGZIP(), []int{39} } func (x *RecurringTransfer) GetStartEpoch() uint64 { @@ -3782,7 +4496,7 @@ var file_vega_governance_proto_rawDesc = []byte{ 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x54, 0x6f, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x15, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, - 0x63, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0xcc, 0x04, 0x0a, 0x10, 0x50, 0x65, 0x72, + 0x63, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x8e, 0x08, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, @@ -3819,765 +4533,1003 @@ var file_vega_governance_proto_rawDesc = []byte{ 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x54, 0x6f, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x15, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, - 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0xdc, 0x01, 0x0a, 0x17, 0x49, 0x6e, 0x73, 0x74, - 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x66, - 0x75, 0x74, 0x75, 0x72, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, - 0x48, 0x00, 0x52, 0x06, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x73, 0x70, - 0x6f, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x53, 0x70, 0x6f, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x04, 0x73, - 0x70, 0x6f, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, - 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x48, 0x00, - 0x52, 0x09, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x70, - 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, 0xca, 0x04, 0x0a, 0x1a, 0x4e, 0x65, 0x77, 0x53, 0x70, - 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x5f, - 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x64, 0x65, - 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x1b, 0x70, 0x72, 0x69, 0x63, 0x65, - 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x19, 0x70, - 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x17, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x15, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x31, 0x0a, - 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, - 0x12, 0x39, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x18, 0x65, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x6f, 0x67, 0x4e, - 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x48, 0x00, - 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x17, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x5f, - 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x50, 0x6c, 0x61, - 0x63, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0a, 0x73, 0x6c, 0x61, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x4c, 0x41, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x42, 0x11, 0x0a, 0x0f, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x22, 0xf8, 0x06, 0x0a, 0x16, 0x4e, 0x65, 0x77, 0x4d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, - 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, - 0x0e, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x50, 0x6c, - 0x61, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x5f, 0x0a, 0x1b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x19, 0x70, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x6b, 0x0a, 0x1f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x6d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x6e, 0x69, 0x74, + 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x42, 0x0a, 0x1b, 0x66, 0x75, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x5f, + 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x18, + 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x53, 0x63, 0x61, 0x6c, 0x69, + 0x6e, 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x18, 0x66, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x77, 0x65, + 0x72, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x15, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x77, 0x65, + 0x72, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x18, 0x66, 0x75, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x15, 0x66, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x55, 0x70, 0x70, 0x65, 0x72, 0x42, + 0x6f, 0x75, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x7b, 0x0a, 0x26, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x43, + 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x03, 0x52, 0x23, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x5f, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x29, + 0x0a, 0x27, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xdc, 0x01, 0x0a, 0x17, 0x49, 0x6e, + 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, + 0x06, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x04, + 0x73, 0x70, 0x6f, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, + 0x04, 0x73, 0x70, 0x6f, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, + 0x61, 0x6c, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x48, 0x00, 0x52, 0x09, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x09, 0x0a, + 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, 0x9c, 0x05, 0x0a, 0x1a, 0x4e, 0x65, 0x77, + 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, + 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, + 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, + 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x1b, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, - 0x1d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x31, - 0x0a, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x6f, 0x64, 0x65, - 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, - 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x18, - 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x6f, 0x67, - 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x48, - 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x17, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, - 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x50, 0x6c, - 0x61, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x0e, 0x6c, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, - 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0c, + 0x19, 0x70, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x17, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x15, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x31, 0x0a, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, + 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x6f, + 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x12, 0x36, 0x0a, + 0x17, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, + 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x50, + 0x6c, 0x61, 0x63, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0a, 0x73, 0x6c, 0x61, 0x5f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x4c, 0x41, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x50, 0x0a, 0x16, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, + 0x66, 0x65, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x14, + 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xf9, 0x08, 0x0a, 0x16, 0x4e, 0x65, 0x77, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x49, 0x6e, + 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x5f, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x64, 0x65, 0x63, 0x69, 0x6d, + 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x1b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x6f, + 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x19, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x6b, 0x0a, 0x1f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4d, + 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x52, 0x1d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4d, 0x6f, + 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x64, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, + 0x12, 0x36, 0x0a, 0x17, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x63, + 0x69, 0x6d, 0x61, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x15, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x6d, + 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x0e, 0x6c, 0x70, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x0c, 0x6c, 0x70, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x16, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x5f, 0x73, 0x6c, + 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x14, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x53, 0x6c, 0x69, 0x70, 0x70, + 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3e, 0x0a, 0x19, 0x71, 0x75, 0x61, + 0x64, 0x72, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, + 0x52, 0x17, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, 0x74, 0x69, 0x63, 0x53, 0x6c, 0x69, 0x70, 0x70, + 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3f, 0x0a, 0x09, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x09, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x56, 0x0a, 0x18, 0x6c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x6c, 0x61, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x4c, 0x41, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x16, 0x6c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x12, 0x50, 0x0a, 0x16, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, + 0x66, 0x65, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x14, + 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4c, 0x0a, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x13, 0x6c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x12, 0x5b, 0x0a, 0x18, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x11, 0x0a, 0x0f, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6c, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x22, 0x4b, 0x0a, 0x0d, 0x4e, 0x65, 0x77, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x12, 0x3a, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, + 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x22, 0x7a, 0x0a, 0x16, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, + 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, + 0x50, 0x6f, 0x6f, 0x6c, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x09, + 0x4e, 0x65, 0x77, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x22, 0x66, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x39, + 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x6e, 0x0a, 0x10, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x07, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xd4, 0x07, 0x0a, 0x19, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x1b, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, + 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x19, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x6b, 0x0a, 0x1f, 0x6c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x1d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, + 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, + 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, + 0x00, 0x52, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, + 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x69, + 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x4e, 0x6f, + 0x72, 0x6d, 0x61, 0x6c, 0x12, 0x29, 0x0a, 0x0e, 0x6c, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0c, 0x6c, 0x70, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x16, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x5f, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, - 0x67, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x67, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x53, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x46, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3a, 0x0a, 0x19, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, 0x74, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3e, 0x0a, 0x19, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, - 0x74, 0x69, 0x63, 0x53, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x12, 0x3f, 0x0a, 0x09, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x09, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x88, - 0x01, 0x01, 0x12, 0x56, 0x0a, 0x18, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, - 0x73, 0x6c, 0x61, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x4c, 0x41, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x52, 0x16, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x61, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x72, 0x69, + 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x17, 0x71, 0x75, + 0x61, 0x64, 0x72, 0x61, 0x74, 0x69, 0x63, 0x53, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x46, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x56, 0x0a, 0x18, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x5f, 0x73, 0x6c, 0x61, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x4c, 0x41, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x16, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x53, 0x6c, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x50, 0x0a, + 0x16, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, + 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x4c, 0x0a, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x5b, 0x0a, + 0x18, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x16, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x11, 0x0a, 0x0f, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6c, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x22, 0x4b, - 0x0a, 0x0d, 0x4e, 0x65, 0x77, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, - 0x3a, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x70, 0x6f, 0x74, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x7a, 0x0a, 0x16, 0x53, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, - 0x36, 0x0a, 0x17, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x6f, - 0x6c, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x15, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x46, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x09, 0x4e, 0x65, 0x77, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x66, 0x0a, 0x0c, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x73, 0x22, 0x6e, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x70, - 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x73, 0x22, 0xd3, 0x05, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, + 0x22, 0x81, 0x04, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x69, 0x6e, 0x73, - 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x1b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x19, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, + 0x0a, 0x1b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, + 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x6b, 0x0a, 0x1f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x52, 0x1d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, - 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x69, - 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, - 0x61, 0x6c, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x4c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, 0x64, - 0x65, 0x6c, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x12, - 0x29, 0x0a, 0x0e, 0x6c, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0c, 0x6c, 0x70, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x16, 0x6c, 0x69, - 0x6e, 0x65, 0x61, 0x72, 0x5f, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, - 0x63, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6c, 0x69, 0x6e, 0x65, - 0x61, 0x72, 0x53, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x12, 0x3a, 0x0a, 0x19, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x6c, - 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x17, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, 0x74, 0x69, 0x63, 0x53, 0x6c, - 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x56, 0x0a, 0x18, - 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x6c, 0x61, 0x5f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, - 0x4c, 0x41, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x16, 0x6c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6c, 0x70, 0x5f, 0x70, - 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0xaf, 0x03, 0x0a, 0x1d, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x1b, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x19, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x17, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x15, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x31, - 0x0a, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x6f, 0x64, 0x65, - 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, - 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x18, - 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x6f, 0x67, - 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x48, - 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x0a, - 0x73, 0x6c, 0x61, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x53, 0x4c, 0x41, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x09, - 0x73, 0x6c, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x72, 0x69, 0x73, - 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xb1, 0x01, 0x0a, - 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x18, 0x64, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, - 0x06, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x70, 0x65, - 0x74, 0x75, 0x61, 0x6c, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, - 0x6c, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x09, 0x70, 0x65, 0x72, 0x70, - 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, - 0x22, 0xf0, 0x02, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x75, 0x74, 0x75, 0x72, - 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x6f, 0x74, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, - 0x6f, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x69, 0x0a, 0x24, 0x64, 0x61, 0x74, 0x61, 0x5f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x5f, - 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x1f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, - 0x63, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x71, 0x0a, 0x28, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x23, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, - 0x46, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x18, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x54, 0x6f, 0x46, - 0x75, 0x74, 0x75, 0x72, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x15, 0x64, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x69, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x22, 0xa7, 0x04, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, - 0x15, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, - 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6d, 0x61, - 0x72, 0x67, 0x69, 0x6e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, - 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, - 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x5f, - 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x4c, 0x6f, 0x77, 0x65, 0x72, 0x42, 0x6f, 0x75, - 0x6e, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x5f, 0x75, 0x70, 0x70, 0x65, - 0x72, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, - 0x6c, 0x61, 0x6d, 0x70, 0x55, 0x70, 0x70, 0x65, 0x72, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x71, + 0x74, 0x65, 0x72, 0x73, 0x52, 0x19, 0x70, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x53, 0x0a, 0x17, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x15, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x64, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, + 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, + 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x69, 0x73, 0x6b, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, + 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x0a, 0x73, 0x6c, 0x61, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x4c, 0x41, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x50, 0x0a, 0x16, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, + 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x46, 0x65, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x14, 0x6c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, + 0x0a, 0x06, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x75, 0x74, 0x75, + 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x66, 0x75, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x09, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, + 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, 0xf0, 0x02, 0x0a, + 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x69, 0x0a, 0x24, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1f, 0x64, + 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x46, 0x6f, 0x72, + 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x71, 0x0a, 0x28, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x65, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x23, 0x64, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x46, 0x6f, 0x72, 0x53, - 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x12, 0x69, 0x0a, 0x24, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1f, 0x64, 0x61, 0x74, - 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x46, 0x6f, 0x72, 0x53, 0x65, - 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x18, - 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x53, 0x70, 0x65, 0x63, 0x54, 0x6f, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x15, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x4a, 0x0a, - 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x38, 0x0a, 0x08, 0x4e, 0x65, 0x77, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2c, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x73, 0x22, 0x5c, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x32, 0x0a, - 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x73, 0x22, 0x0d, 0x0a, 0x0b, 0x4e, 0x65, 0x77, 0x46, 0x72, 0x65, 0x65, 0x66, 0x6f, 0x72, 0x6d, - 0x22, 0x9c, 0x08, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x65, 0x72, - 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x63, - 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x2f, 0x0a, 0x13, 0x65, 0x6e, 0x61, 0x63, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x65, 0x6e, - 0x61, 0x63, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x31, 0x0a, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x39, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, 0x00, - 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x30, - 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x66, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x12, 0x58, 0x0a, 0x18, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x67, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x09, 0x6e, 0x65, - 0x77, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x41, 0x73, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, - 0x08, 0x6e, 0x65, 0x77, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x6e, 0x65, 0x77, - 0x5f, 0x66, 0x72, 0x65, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x69, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x46, 0x72, 0x65, 0x65, 0x66, 0x6f, - 0x72, 0x6d, 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x46, 0x72, 0x65, 0x65, 0x66, 0x6f, 0x72, - 0x6d, 0x12, 0x36, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x0f, 0x6e, 0x65, 0x77, - 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x6b, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x70, 0x6f, - 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x53, 0x70, - 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x46, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x6c, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x10, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x12, 0x36, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x18, 0x6d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, - 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x65, 0x77, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x6e, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x13, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x6f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, - 0x00, 0x52, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x55, 0x0a, 0x17, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, - 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x48, 0x00, 0x52, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x68, 0x0a, 0x1e, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x71, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x1b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, - 0x57, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x4a, 0x04, 0x08, 0x02, - 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x86, 0x03, 0x0a, 0x0e, 0x47, 0x6f, 0x76, - 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x03, 0x79, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, - 0x52, 0x03, 0x79, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x02, 0x6e, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x02, 0x6e, - 0x6f, 0x12, 0x3f, 0x0a, 0x09, 0x79, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x47, 0x6f, 0x76, 0x65, - 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x59, 0x65, 0x73, 0x50, 0x61, - 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x79, 0x65, 0x73, 0x50, 0x61, 0x72, - 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x47, 0x6f, 0x76, 0x65, - 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, - 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6e, 0x6f, 0x50, 0x61, 0x72, 0x74, 0x79, - 0x1a, 0x47, 0x0a, 0x0d, 0x59, 0x65, 0x73, 0x50, 0x61, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x46, 0x0a, 0x0c, 0x4e, 0x6f, 0x50, - 0x61, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x9a, 0x07, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, - 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x08, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x29, 0x0a, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x30, 0x0a, 0x06, - 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x28, - 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x65, 0x52, 0x09, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x12, - 0x35, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, - 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, - 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4d, 0x61, 0x6a, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x12, 0x5e, 0x0a, 0x29, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, - 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x26, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x24, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, - 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x03, 0x52, 0x21, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4d, 0x61, - 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x22, 0xae, 0x01, 0x0a, 0x05, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, - 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, - 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, - 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, - 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x44, 0x45, 0x43, 0x4c, - 0x49, 0x4e, 0x45, 0x44, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, - 0x45, 0x4e, 0x41, 0x43, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x4e, - 0x4f, 0x44, 0x45, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x10, 0x07, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, - 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, - 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x2c, 0x0a, 0x2a, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x27, 0x0a, 0x25, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x46, 0x6f, 0x72, 0x54, + 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x5c, 0x0a, 0x18, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x54, 0x6f, 0x46, 0x75, 0x74, 0x75, 0x72, + 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x15, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, + 0xe9, 0x07, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, + 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, + 0x6f, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x71, 0x75, 0x6f, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x6d, 0x61, 0x72, + 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x23, 0x0a, + 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, + 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x5f, 0x6c, 0x6f, 0x77, 0x65, + 0x72, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, + 0x6c, 0x61, 0x6d, 0x70, 0x4c, 0x6f, 0x77, 0x65, 0x72, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x2a, + 0x0a, 0x11, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x5f, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6c, 0x61, 0x6d, 0x70, + 0x55, 0x70, 0x70, 0x65, 0x72, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x71, 0x0a, 0x28, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x66, + 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x23, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x74, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x69, 0x0a, + 0x24, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x18, 0x64, 0x61, 0x74, 0x61, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x62, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, + 0x54, 0x6f, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x52, 0x15, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x42, 0x0a, 0x1b, 0x66, 0x75, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, + 0x67, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x18, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x53, 0x63, 0x61, + 0x6c, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, + 0x18, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, + 0x77, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x15, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x6f, + 0x77, 0x65, 0x72, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x18, 0x66, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x70, 0x70, 0x65, + 0x72, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, + 0x15, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x55, 0x70, 0x70, 0x65, + 0x72, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x7b, 0x0a, 0x26, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x03, 0x52, 0x23, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x5f, + 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x42, 0x29, 0x0a, 0x27, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x16, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x07, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x38, 0x0a, 0x08, 0x4e, 0x65, 0x77, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x12, 0x2c, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x22, 0x5c, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, + 0x0d, 0x0a, 0x0b, 0x4e, 0x65, 0x77, 0x46, 0x72, 0x65, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0x9c, + 0x08, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x65, 0x72, 0x6d, 0x73, + 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x63, 0x6c, 0x6f, + 0x73, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2f, 0x0a, + 0x13, 0x65, 0x6e, 0x61, 0x63, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x63, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x31, + 0x0a, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x39, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0c, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x30, 0x0a, 0x0a, + 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x58, + 0x0a, 0x18, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, + 0x52, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x41, 0x73, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x6e, + 0x65, 0x77, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x66, + 0x72, 0x65, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x69, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x46, 0x72, 0x65, 0x65, 0x66, 0x6f, 0x72, 0x6d, + 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x46, 0x72, 0x65, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x12, + 0x36, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, + 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x0f, 0x6e, 0x65, 0x77, 0x5f, 0x73, + 0x70, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x70, 0x6f, 0x74, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x53, 0x70, 0x6f, 0x74, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x46, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x6c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x10, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x36, + 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x6d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x6f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, + 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x55, 0x0a, 0x17, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x70, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x48, 0x00, 0x52, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, + 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x68, 0x0a, 0x1e, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x71, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x1b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x61, 0x6d, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x98, 0x07, + 0x0a, 0x18, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, + 0x65, 0x72, 0x6d, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x65, 0x6e, + 0x61, 0x63, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x63, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x39, 0x0a, 0x0d, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x65, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x30, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6e, + 0x65, 0x77, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x58, 0x0a, 0x18, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x16, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x12, 0x36, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x66, 0x6f, + 0x72, 0x6d, 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x4e, 0x65, 0x77, 0x46, 0x72, 0x65, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x48, 0x00, 0x52, 0x0b, 0x6e, + 0x65, 0x77, 0x46, 0x72, 0x65, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x36, 0x0a, 0x0c, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x69, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x0f, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x12, 0x46, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, + 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x6e, 0x65, 0x77, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x12, 0x3f, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x18, 0x6d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x48, 0x00, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x12, 0x49, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x11, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x55, 0x0a, + 0x17, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, + 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x15, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x12, 0x68, 0x0a, 0x1e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x76, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x48, + 0x00, 0x52, 0x1b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x08, + 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0xeb, 0x03, 0x0a, 0x12, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, + 0x5f, 0x65, 0x6e, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, + 0x6e, 0x45, 0x6e, 0x61, 0x63, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6e, + 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x45, 0x6e, + 0x61, 0x63, 0x74, 0x12, 0x35, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, + 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, + 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4d, + 0x61, 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x69, 0x6e, 0x5f, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x69, 0x6e, + 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x19, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6c, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x70, 0x12, 0x30, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6d, 0x61, + 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6c, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x12, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4d, 0x61, 0x6a, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x4c, 0x70, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x71, 0x75, 0x69, 0x74, + 0x79, 0x5f, 0x6c, 0x69, 0x6b, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x6b, + 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x2b, 0x0a, + 0x11, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, + 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x41, 0x0a, 0x0f, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x0e, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x38, 0x0a, + 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x07, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x57, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, + 0x22, 0xac, 0x04, 0x0a, 0x0e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, + 0x1c, 0x0a, 0x03, 0x79, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x03, 0x79, 0x65, 0x73, 0x12, 0x1a, 0x0a, + 0x02, 0x6e, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x02, 0x6e, 0x6f, 0x12, 0x3f, 0x0a, 0x09, 0x79, 0x65, 0x73, + 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x2e, 0x59, 0x65, 0x73, 0x50, 0x61, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x08, 0x79, 0x65, 0x73, 0x50, 0x61, 0x72, 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x08, 0x6e, 0x6f, + 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x07, 0x6e, 0x6f, 0x50, 0x61, 0x72, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x1a, 0x47, 0x0a, 0x0d, 0x59, 0x65, 0x73, 0x50, 0x61, 0x72, + 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x56, 0x6f, 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, + 0x46, 0x0a, 0x0c, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x36, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1e, 0x0a, 0x1a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x4f, + 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x41, 0x54, 0x43, 0x48, 0x10, 0x01, 0x22, + 0xa6, 0x08, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x2e, 0x0a, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x65, + 0x72, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x88, 0x01, 0x01, 0x12, + 0x30, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x48, 0x01, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x09, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x52, 0x09, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x65, 0x12, 0x35, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, 0x74, + 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4d, 0x61, + 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x5e, 0x0a, 0x29, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x26, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x24, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x91, - 0x03, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x49, 0x64, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x2e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x43, 0x0a, 0x1e, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x1b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, - 0x63, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x41, - 0x0a, 0x1d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, - 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x6f, 0x76, 0x65, - 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x42, 0x0a, 0x1e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x71, 0x75, 0x69, 0x74, - 0x79, 0x5f, 0x6c, 0x69, 0x6b, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x77, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x6b, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x57, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3b, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x15, - 0x0a, 0x11, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4e, - 0x4f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x59, 0x45, 0x53, - 0x10, 0x02, 0x22, 0x5b, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x12, 0x3c, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, - 0xba, 0x01, 0x0a, 0x1c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x21, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x4d, 0x61, 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0b, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x48, 0x05, 0x52, 0x0a, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, + 0x52, 0x07, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x88, 0x01, 0x01, 0x22, 0xae, 0x01, 0x0a, + 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, + 0x0e, 0x0a, 0x0a, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x02, 0x12, + 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, + 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, + 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x44, + 0x45, 0x43, 0x4c, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x5f, 0x45, 0x4e, 0x41, 0x43, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x1f, 0x0a, 0x1b, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x4f, + 0x52, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x10, 0x07, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x42, 0x2c, 0x0a, 0x2a, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x27, 0x0a, 0x25, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, + 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x22, 0xe1, 0x04, 0x0a, 0x04, 0x56, 0x6f, 0x74, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x43, 0x0a, 0x1e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x67, 0x6f, 0x76, + 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x1d, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x1a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x42, 0x0a, 0x1e, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x71, 0x75, 0x69, 0x74, 0x79, 0x5f, 0x6c, 0x69, 0x6b, 0x65, + 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x1a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, + 0x4c, 0x69, 0x6b, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x7b, 0x0a, 0x23, 0x70, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x65, 0x71, + 0x75, 0x69, 0x74, 0x79, 0x5f, 0x6c, 0x69, 0x6b, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x6b, 0x65, 0x53, 0x68, 0x61, 0x72, + 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x1e, 0x70, 0x65, + 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x6b, + 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x1a, 0x51, 0x0a, 0x23, + 0x50, 0x65, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x4c, + 0x69, 0x6b, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x3b, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x41, 0x4c, 0x55, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x0c, 0x0a, 0x08, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4e, 0x4f, 0x10, 0x01, 0x12, 0x0d, 0x0a, + 0x09, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x02, 0x22, 0x5b, 0x0a, 0x1b, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x3c, 0x0a, 0x07, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x12, 0x3c, 0x0a, 0x0d, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, - 0x52, 0x0c, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, 0x12, 0x37, - 0x0a, 0x18, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x15, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x69, 0x6e, 0x64, 0x6f, - 0x77, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, - 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x4f, 0x0a, 0x15, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x36, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x73, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xe6, 0x01, - 0x0a, 0x16, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x0d, 0x62, 0x65, 0x6e, 0x65, - 0x66, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, - 0x65, 0x72, 0x52, 0x0c, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, - 0x12, 0x37, 0x0a, 0x18, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x15, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x69, 0x6e, - 0x64, 0x6f, 0x77, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x36, - 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x65, 0x72, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x54, 0x69, 0x65, 0x72, 0x73, 0x22, 0x53, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x1e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, - 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0x4d, - 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x12, 0x3b, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x3e, 0x0a, - 0x1b, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x49, 0x64, 0x22, 0x47, 0x0a, - 0x0b, 0x4e, 0x65, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x07, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xd9, 0x03, 0x0a, 0x18, 0x4e, 0x65, 0x77, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x41, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x47, 0x6f, - 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x12, 0x2e, 0x0a, 0x13, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x66, 0x5f, - 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x66, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x66, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x3c, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x65, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x6e, 0x65, 0x4f, 0x66, - 0x66, 0x12, 0x37, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x66, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x63, 0x75, - 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, - 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, - 0x6e, 0x64, 0x22, 0x2f, 0x0a, 0x0e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x5f, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, - 0x72, 0x4f, 0x6e, 0x22, 0xc4, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, - 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, - 0x64, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, - 0x08, 0x65, 0x6e, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x11, - 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, - 0x01, 0x52, 0x10, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, - 0x65, 0x67, 0x79, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, - 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x2a, 0xd6, 0x12, 0x0a, 0x0d, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x1a, - 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x26, 0x0a, 0x22, - 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, - 0x4c, 0x4f, 0x53, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x53, 0x4f, - 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x5f, 0x54, 0x49, 0x4d, - 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, - 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x45, - 0x4e, 0x41, 0x43, 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x53, 0x4f, - 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x45, 0x4e, 0x41, 0x43, 0x54, 0x5f, 0x54, 0x49, 0x4d, - 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x54, 0x45, 0x10, 0x04, 0x12, 0x26, 0x0a, 0x22, - 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, - 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x4f, 0x4b, 0x45, - 0x4e, 0x53, 0x10, 0x05, 0x12, 0x2e, 0x0a, 0x2a, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x49, - 0x4e, 0x53, 0x54, 0x52, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x45, 0x43, 0x55, 0x52, 0x49, - 0x54, 0x59, 0x10, 0x06, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x5f, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, - 0x54, 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, - 0x44, 0x5f, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x54, 0x10, 0x08, 0x12, 0x22, 0x0a, 0x1e, 0x50, - 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, - 0x5f, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x10, 0x0b, 0x12, - 0x2b, 0x0a, 0x27, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x54, 0x52, - 0x41, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x10, 0x0c, 0x12, 0x29, 0x0a, 0x25, - 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, - 0x4f, 0x44, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x0d, 0x12, 0x2e, 0x0a, 0x2a, 0x50, 0x52, 0x4f, 0x50, 0x4f, - 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, - 0x47, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x54, 0x49, 0x4e, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, - 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x0e, 0x12, 0x31, 0x0a, 0x2d, 0x50, 0x52, 0x4f, 0x50, 0x4f, - 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, - 0x47, 0x5f, 0x45, 0x52, 0x43, 0x32, 0x30, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, - 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x10, 0x0f, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, - 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, - 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x10, 0x10, 0x12, 0x2a, 0x0a, 0x26, - 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, - 0x4e, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x54, 0x49, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, - 0x53, 0x54, 0x41, 0x4d, 0x50, 0x53, 0x10, 0x11, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x4f, 0x50, - 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x5f, 0x52, 0x49, - 0x53, 0x4b, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x53, 0x10, 0x12, 0x12, - 0x30, 0x0a, 0x2c, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x1c, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x61, 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0d, 0x62, 0x65, + 0x6e, 0x65, 0x66, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, + 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x52, 0x0c, 0x62, 0x65, 0x6e, 0x65, + 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x65, 0x6e, 0x64, 0x5f, + 0x6f, 0x66, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x65, 0x6e, 0x64, 0x4f, + 0x66, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x4f, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, + 0x36, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, + 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x07, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x12, 0x36, 0x0a, 0x0d, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x5f, 0x74, 0x69, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x52, 0x0c, 0x62, 0x65, + 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x65, 0x6e, + 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x65, 0x6e, + 0x64, 0x4f, 0x66, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x77, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x36, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, + 0x65, 0x72, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x65, 0x72, 0x73, + 0x22, 0x53, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0x4d, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x3e, 0x0a, 0x1b, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x0b, 0x4e, 0x65, 0x77, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, + 0x65, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x22, 0xd9, 0x03, 0x0a, 0x18, 0x4e, 0x65, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, + 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, + 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x66, 0x72, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x66, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4f, 0x66, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x10, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x6e, + 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x12, 0x37, 0x0a, 0x09, 0x72, + 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, + 0x72, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x2f, 0x0a, 0x0e, + 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1d, + 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4f, 0x6e, 0x22, 0xc4, 0x01, + 0x0a, 0x11, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x70, 0x6f, 0x63, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x45, 0x70, + 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, 0x01, 0x52, 0x10, 0x64, 0x69, 0x73, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x88, 0x01, 0x01, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x14, + 0x0a, 0x12, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x67, 0x79, 0x2a, 0xb4, 0x13, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x1a, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x53, 0x4f, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x26, + 0x0a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, + 0x4c, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x45, 0x4e, 0x41, 0x43, 0x54, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x53, 0x4f, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x26, + 0x0a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x45, 0x4e, 0x41, 0x43, 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, + 0x4c, 0x41, 0x54, 0x45, 0x10, 0x04, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, + 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x05, 0x12, 0x2e, + 0x0a, 0x2a, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x52, 0x55, 0x4d, + 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x45, 0x43, 0x55, 0x52, 0x49, 0x54, 0x59, 0x10, 0x06, 0x12, 0x1d, + 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x4e, 0x4f, 0x5f, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x54, 0x10, 0x07, 0x12, 0x26, 0x0a, + 0x22, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x4f, 0x44, + 0x55, 0x43, 0x54, 0x10, 0x08, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, + 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x49, + 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x10, 0x0b, 0x12, 0x2b, 0x0a, 0x27, 0x50, 0x52, 0x4f, + 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x55, + 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x5f, + 0x4d, 0x4f, 0x44, 0x45, 0x10, 0x0c, 0x12, 0x29, 0x0a, 0x25, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x56, 0x41, + 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, + 0x0d, 0x12, 0x2e, 0x0a, 0x2a, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x42, 0x55, 0x49, 0x4c, + 0x54, 0x49, 0x4e, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, + 0x0e, 0x12, 0x31, 0x0a, 0x2d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x52, 0x43, 0x32, + 0x30, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, + 0x53, 0x53, 0x10, 0x0f, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, + 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, + 0x53, 0x53, 0x45, 0x54, 0x10, 0x10, 0x12, 0x2a, 0x0a, 0x26, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x50, 0x41, + 0x54, 0x49, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x53, + 0x10, 0x11, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x5f, 0x52, 0x49, 0x53, 0x4b, 0x5f, 0x50, 0x41, 0x52, + 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x53, 0x10, 0x12, 0x12, 0x30, 0x0a, 0x2c, 0x50, 0x52, 0x4f, + 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x45, 0x54, 0x57, + 0x4f, 0x52, 0x4b, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x4e, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x13, 0x12, 0x32, 0x0a, 0x2e, 0x50, + 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x45, + 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x5f, + 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x14, 0x12, + 0x36, 0x0a, 0x32, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, - 0x54, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4b, 0x45, 0x59, 0x10, - 0x13, 0x12, 0x32, 0x0a, 0x2e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x50, 0x41, 0x52, 0x41, - 0x4d, 0x45, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x56, 0x41, - 0x4c, 0x55, 0x45, 0x10, 0x14, 0x12, 0x36, 0x0a, 0x32, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, - 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, - 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x15, 0x12, 0x35, 0x0a, - 0x31, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x4f, 0x50, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x53, 0x4d, 0x41, - 0x4c, 0x4c, 0x10, 0x16, 0x12, 0x35, 0x0a, 0x31, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x41, - 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0x17, 0x12, 0x2f, 0x0a, 0x2b, 0x50, - 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, - 0x55, 0x4c, 0x44, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x49, - 0x41, 0x54, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x19, 0x12, 0x29, 0x0a, 0x25, - 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, - 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x46, 0x55, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x50, 0x52, - 0x4f, 0x44, 0x55, 0x43, 0x54, 0x10, 0x1a, 0x12, 0x29, 0x0a, 0x25, 0x50, 0x52, 0x4f, 0x50, 0x4f, + 0x54, 0x45, 0x52, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, + 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x15, 0x12, 0x35, 0x0a, 0x31, 0x50, 0x52, 0x4f, 0x50, 0x4f, + 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x49, 0x4e, + 0x47, 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x53, 0x4d, 0x41, 0x4c, 0x4c, 0x10, 0x16, 0x12, 0x35, + 0x0a, 0x31, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, + 0x52, 0x47, 0x45, 0x10, 0x17, 0x12, 0x2f, 0x0a, 0x2b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, + 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x55, 0x4c, 0x44, 0x5f, 0x4e, 0x4f, + 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x49, 0x41, 0x54, 0x45, 0x5f, 0x4d, 0x41, + 0x52, 0x4b, 0x45, 0x54, 0x10, 0x19, 0x12, 0x29, 0x0a, 0x25, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, + 0x5f, 0x46, 0x55, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x54, 0x10, + 0x1a, 0x12, 0x29, 0x0a, 0x25, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x52, 0x49, 0x53, 0x4b, + 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x10, 0x1e, 0x12, 0x31, 0x0a, 0x2d, + 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, + 0x41, 0x4a, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, + 0x44, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x41, 0x43, 0x48, 0x45, 0x44, 0x10, 0x1f, 0x12, + 0x36, 0x0a, 0x32, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, + 0x41, 0x43, 0x48, 0x45, 0x44, 0x10, 0x20, 0x12, 0x28, 0x0a, 0x24, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, - 0x44, 0x5f, 0x52, 0x49, 0x53, 0x4b, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, - 0x10, 0x1e, 0x12, 0x31, 0x0a, 0x2d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x41, 0x4a, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x48, - 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x41, 0x43, - 0x48, 0x45, 0x44, 0x10, 0x1f, 0x12, 0x36, 0x0a, 0x32, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, - 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x5f, - 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x41, 0x43, 0x48, 0x45, 0x44, 0x10, 0x20, 0x12, 0x28, 0x0a, - 0x24, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x44, 0x45, - 0x54, 0x41, 0x49, 0x4c, 0x53, 0x10, 0x21, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, - 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x22, 0x12, 0x2e, 0x0a, 0x2a, 0x50, 0x52, 0x4f, 0x50, - 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x5f, 0x52, 0x49, 0x53, 0x4b, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, - 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x23, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x4f, 0x50, - 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, - 0x49, 0x44, 0x5f, 0x46, 0x52, 0x45, 0x45, 0x46, 0x4f, 0x52, 0x4d, 0x10, 0x24, 0x12, 0x31, 0x0a, + 0x44, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x10, + 0x21, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x10, 0x22, 0x12, 0x2e, 0x0a, 0x2a, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x52, 0x49, 0x53, + 0x4b, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x10, 0x23, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x46, 0x52, 0x45, + 0x45, 0x46, 0x4f, 0x52, 0x4d, 0x10, 0x24, 0x12, 0x31, 0x0a, 0x2d, 0x50, 0x52, 0x4f, 0x50, 0x4f, + 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, + 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x49, 0x54, 0x59, 0x5f, 0x4c, 0x49, + 0x4b, 0x45, 0x5f, 0x53, 0x48, 0x41, 0x52, 0x45, 0x10, 0x25, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, + 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, + 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x26, 0x12, 0x31, 0x0a, 0x2d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x45, 0x51, 0x55, - 0x49, 0x54, 0x59, 0x5f, 0x4c, 0x49, 0x4b, 0x45, 0x5f, 0x53, 0x48, 0x41, 0x52, 0x45, 0x10, 0x25, - 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, + 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, + 0x44, 0x45, 0x43, 0x49, 0x4d, 0x41, 0x4c, 0x5f, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x53, 0x10, 0x27, + 0x12, 0x35, 0x0a, 0x31, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x43, + 0x45, 0x5f, 0x4d, 0x4f, 0x4e, 0x49, 0x54, 0x4f, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x52, 0x49, + 0x47, 0x47, 0x45, 0x52, 0x53, 0x10, 0x28, 0x12, 0x2f, 0x0a, 0x2b, 0x50, 0x52, 0x4f, 0x50, 0x4f, + 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x45, 0x52, 0x43, 0x32, 0x30, 0x5f, + 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, + 0x49, 0x4e, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x29, 0x12, 0x2d, 0x0a, 0x29, 0x50, 0x52, 0x4f, 0x50, + 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4c, 0x50, 0x5f, 0x50, 0x52, + 0x49, 0x43, 0x45, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x4e, 0x4f, 0x4e, 0x50, 0x4f, 0x53, + 0x49, 0x54, 0x49, 0x56, 0x45, 0x10, 0x2a, 0x12, 0x2b, 0x0a, 0x27, 0x50, 0x52, 0x4f, 0x50, 0x4f, + 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4c, 0x50, 0x5f, 0x50, 0x52, 0x49, + 0x43, 0x45, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x52, + 0x47, 0x45, 0x10, 0x2b, 0x12, 0x36, 0x0a, 0x32, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, + 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x4e, 0x45, 0x41, 0x52, 0x5f, 0x53, 0x4c, + 0x49, 0x50, 0x50, 0x41, 0x47, 0x45, 0x5f, 0x46, 0x41, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4f, 0x55, + 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x2c, 0x12, 0x39, 0x0a, 0x35, + 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x51, + 0x55, 0x41, 0x44, 0x52, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x53, 0x4c, 0x49, 0x50, 0x50, 0x41, 0x47, + 0x45, 0x5f, 0x46, 0x41, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, + 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x2d, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, + 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, + 0x44, 0x5f, 0x53, 0x50, 0x4f, 0x54, 0x10, 0x2e, 0x12, 0x28, 0x0a, 0x24, 0x50, 0x52, 0x4f, 0x50, + 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x50, 0x4f, 0x54, 0x5f, + 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x54, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, + 0x10, 0x2f, 0x12, 0x2b, 0x0a, 0x27, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x55, 0x43, + 0x43, 0x45, 0x53, 0x53, 0x4f, 0x52, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x30, 0x12, + 0x36, 0x0a, 0x32, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x46, + 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x31, 0x12, 0x37, 0x0a, 0x33, 0x50, 0x52, 0x4f, 0x50, 0x4f, + 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, + 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x50, 0x52, + 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x32, + 0x12, 0x3e, 0x0a, 0x3a, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x41, + 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x50, 0x52, + 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x33, + 0x12, 0x2e, 0x0a, 0x2a, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, - 0x54, 0x10, 0x26, 0x12, 0x31, 0x0a, 0x2d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x4d, - 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x44, 0x45, 0x43, 0x49, 0x4d, 0x41, 0x4c, 0x5f, 0x50, 0x4c, - 0x41, 0x43, 0x45, 0x53, 0x10, 0x27, 0x12, 0x35, 0x0a, 0x31, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, - 0x59, 0x5f, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, 0x4d, 0x4f, 0x4e, 0x49, 0x54, 0x4f, 0x52, 0x49, - 0x4e, 0x47, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x53, 0x10, 0x28, 0x12, 0x2f, 0x0a, - 0x2b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x45, 0x52, 0x43, 0x32, 0x30, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x41, 0x4c, - 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x49, 0x4e, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x29, 0x12, 0x2d, - 0x0a, 0x29, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x4c, 0x50, 0x5f, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x5f, - 0x4e, 0x4f, 0x4e, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x56, 0x45, 0x10, 0x2a, 0x12, 0x2b, 0x0a, - 0x27, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x4c, 0x50, 0x5f, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x54, - 0x4f, 0x4f, 0x5f, 0x4c, 0x41, 0x52, 0x47, 0x45, 0x10, 0x2b, 0x12, 0x36, 0x0a, 0x32, 0x50, 0x52, - 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x4e, - 0x45, 0x41, 0x52, 0x5f, 0x53, 0x4c, 0x49, 0x50, 0x50, 0x41, 0x47, 0x45, 0x5f, 0x46, 0x41, 0x43, - 0x54, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, - 0x10, 0x2c, 0x12, 0x39, 0x0a, 0x35, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x51, 0x55, 0x41, 0x44, 0x52, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x53, - 0x4c, 0x49, 0x50, 0x50, 0x41, 0x47, 0x45, 0x5f, 0x46, 0x41, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4f, - 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x2d, 0x12, 0x1f, 0x0a, - 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x50, 0x4f, 0x54, 0x10, 0x2e, 0x12, 0x28, - 0x0a, 0x24, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x53, 0x50, 0x4f, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x54, 0x5f, 0x44, 0x49, - 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x2f, 0x12, 0x2b, 0x0a, 0x27, 0x50, 0x52, 0x4f, 0x50, - 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, - 0x49, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x4f, 0x52, 0x5f, 0x4d, 0x41, 0x52, - 0x4b, 0x45, 0x54, 0x10, 0x30, 0x12, 0x36, 0x0a, 0x32, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, - 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, - 0x43, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x4f, 0x50, - 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x31, 0x12, 0x37, 0x0a, - 0x33, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x46, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x56, - 0x41, 0x4c, 0x49, 0x44, 0x10, 0x32, 0x12, 0x3e, 0x0a, 0x3a, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, - 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x46, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x56, - 0x41, 0x4c, 0x49, 0x44, 0x10, 0x33, 0x12, 0x2e, 0x0a, 0x2a, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, - 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, - 0x44, 0x41, 0x54, 0x45, 0x10, 0x34, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, - 0x5f, 0x53, 0x4c, 0x41, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x53, 0x10, 0x35, 0x12, 0x25, 0x0a, - 0x21, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x4c, 0x41, 0x5f, 0x50, 0x41, 0x52, 0x41, - 0x4d, 0x53, 0x10, 0x36, 0x12, 0x2c, 0x0a, 0x28, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x50, - 0x45, 0x52, 0x50, 0x45, 0x54, 0x55, 0x41, 0x4c, 0x5f, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x54, - 0x10, 0x37, 0x12, 0x2b, 0x0a, 0x27, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x46, - 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x10, 0x38, 0x12, - 0x32, 0x0a, 0x2e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, - 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, - 0x4d, 0x10, 0x39, 0x2a, 0xb4, 0x01, 0x0a, 0x15, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, - 0x24, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, - 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x26, 0x0a, 0x22, 0x4d, 0x41, 0x52, 0x4b, 0x45, - 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, - 0x24, 0x0a, 0x20, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, - 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x55, 0x53, 0x50, - 0x45, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x23, 0x0a, 0x1f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, + 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x34, + 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x4c, 0x41, 0x5f, 0x50, + 0x41, 0x52, 0x41, 0x4d, 0x53, 0x10, 0x35, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x52, 0x4f, 0x50, 0x4f, + 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, + 0x47, 0x5f, 0x53, 0x4c, 0x41, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x53, 0x10, 0x36, 0x12, 0x2c, + 0x0a, 0x28, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x50, 0x45, 0x52, 0x50, 0x45, 0x54, 0x55, + 0x41, 0x4c, 0x5f, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x54, 0x10, 0x37, 0x12, 0x2b, 0x0a, 0x27, + 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, + 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, + 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x10, 0x38, 0x12, 0x32, 0x0a, 0x2e, 0x50, 0x52, 0x4f, + 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, + 0x4c, 0x49, 0x44, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, + 0x55, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x10, 0x39, 0x12, 0x2d, 0x0a, + 0x29, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x5f, 0x42, 0x41, 0x54, 0x43, + 0x48, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x3a, 0x12, 0x2d, 0x0a, 0x29, + 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x50, + 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x5f, 0x42, 0x41, 0x54, 0x43, 0x48, + 0x5f, 0x44, 0x45, 0x43, 0x4c, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x3b, 0x2a, 0xb4, 0x01, 0x0a, 0x15, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x24, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x99, 0x01, 0x0a, 0x16, 0x47, - 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x24, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, - 0x4e, 0x43, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x2b, 0x0a, 0x27, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x54, 0x52, - 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, - 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x48, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x28, 0x0a, 0x24, - 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, - 0x46, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x42, 0x27, 0x5a, 0x25, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, - 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x26, 0x0a, 0x22, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x52, 0x4d, + 0x49, 0x4e, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x24, 0x0a, 0x20, 0x4d, 0x41, 0x52, 0x4b, 0x45, + 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x23, 0x0a, + 0x1f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, + 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4d, 0x45, + 0x10, 0x03, 0x2a, 0x99, 0x01, 0x0a, 0x16, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, + 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, + 0x24, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, + 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2b, 0x0a, 0x27, 0x47, 0x4f, 0x56, 0x45, 0x52, + 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x48, 0x49, + 0x4e, 0x47, 0x10, 0x01, 0x12, 0x28, 0x0a, 0x24, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, + 0x43, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x42, 0x27, + 0x5a, 0x25, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4592,165 +5544,201 @@ func file_vega_governance_proto_rawDescGZIP() []byte { return file_vega_governance_proto_rawDescData } -var file_vega_governance_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_vega_governance_proto_msgTypes = make([]protoimpl.MessageInfo, 39) +var file_vega_governance_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_vega_governance_proto_msgTypes = make([]protoimpl.MessageInfo, 43) var file_vega_governance_proto_goTypes = []interface{}{ (ProposalError)(0), // 0: vega.ProposalError (MarketStateUpdateType)(0), // 1: vega.MarketStateUpdateType (GovernanceTransferType)(0), // 2: vega.GovernanceTransferType - (Proposal_State)(0), // 3: vega.Proposal.State - (Vote_Value)(0), // 4: vega.Vote.Value - (*SpotProduct)(nil), // 5: vega.SpotProduct - (*FutureProduct)(nil), // 6: vega.FutureProduct - (*PerpetualProduct)(nil), // 7: vega.PerpetualProduct - (*InstrumentConfiguration)(nil), // 8: vega.InstrumentConfiguration - (*NewSpotMarketConfiguration)(nil), // 9: vega.NewSpotMarketConfiguration - (*NewMarketConfiguration)(nil), // 10: vega.NewMarketConfiguration - (*NewSpotMarket)(nil), // 11: vega.NewSpotMarket - (*SuccessorConfiguration)(nil), // 12: vega.SuccessorConfiguration - (*NewMarket)(nil), // 13: vega.NewMarket - (*UpdateMarket)(nil), // 14: vega.UpdateMarket - (*UpdateSpotMarket)(nil), // 15: vega.UpdateSpotMarket - (*UpdateMarketConfiguration)(nil), // 16: vega.UpdateMarketConfiguration - (*UpdateSpotMarketConfiguration)(nil), // 17: vega.UpdateSpotMarketConfiguration - (*UpdateInstrumentConfiguration)(nil), // 18: vega.UpdateInstrumentConfiguration - (*UpdateFutureProduct)(nil), // 19: vega.UpdateFutureProduct - (*UpdatePerpetualProduct)(nil), // 20: vega.UpdatePerpetualProduct - (*UpdateNetworkParameter)(nil), // 21: vega.UpdateNetworkParameter - (*NewAsset)(nil), // 22: vega.NewAsset - (*UpdateAsset)(nil), // 23: vega.UpdateAsset - (*NewFreeform)(nil), // 24: vega.NewFreeform - (*ProposalTerms)(nil), // 25: vega.ProposalTerms - (*ProposalRationale)(nil), // 26: vega.ProposalRationale - (*GovernanceData)(nil), // 27: vega.GovernanceData - (*Proposal)(nil), // 28: vega.Proposal - (*Vote)(nil), // 29: vega.Vote - (*UpdateVolumeDiscountProgram)(nil), // 30: vega.UpdateVolumeDiscountProgram - (*VolumeDiscountProgramChanges)(nil), // 31: vega.VolumeDiscountProgramChanges - (*UpdateReferralProgram)(nil), // 32: vega.UpdateReferralProgram - (*ReferralProgramChanges)(nil), // 33: vega.ReferralProgramChanges - (*UpdateMarketState)(nil), // 34: vega.UpdateMarketState - (*UpdateMarketStateConfiguration)(nil), // 35: vega.UpdateMarketStateConfiguration - (*CancelTransfer)(nil), // 36: vega.CancelTransfer - (*CancelTransferConfiguration)(nil), // 37: vega.CancelTransferConfiguration - (*NewTransfer)(nil), // 38: vega.NewTransfer - (*NewTransferConfiguration)(nil), // 39: vega.NewTransferConfiguration - (*OneOffTransfer)(nil), // 40: vega.OneOffTransfer - (*RecurringTransfer)(nil), // 41: vega.RecurringTransfer - nil, // 42: vega.GovernanceData.YesPartyEntry - nil, // 43: vega.GovernanceData.NoPartyEntry - (*DataSourceDefinition)(nil), // 44: vega.DataSourceDefinition - (*DataSourceSpecToFutureBinding)(nil), // 45: vega.DataSourceSpecToFutureBinding - (*DataSourceSpecToPerpetualBinding)(nil), // 46: vega.DataSourceSpecToPerpetualBinding - (*PriceMonitoringParameters)(nil), // 47: vega.PriceMonitoringParameters - (*TargetStakeParameters)(nil), // 48: vega.TargetStakeParameters - (*SimpleModelParams)(nil), // 49: vega.SimpleModelParams - (*LogNormalRiskModel)(nil), // 50: vega.LogNormalRiskModel - (*LiquiditySLAParameters)(nil), // 51: vega.LiquiditySLAParameters - (*LiquidityMonitoringParameters)(nil), // 52: vega.LiquidityMonitoringParameters - (*NetworkParameter)(nil), // 53: vega.NetworkParameter - (*AssetDetails)(nil), // 54: vega.AssetDetails - (*AssetDetailsUpdate)(nil), // 55: vega.AssetDetailsUpdate - (*VolumeBenefitTier)(nil), // 56: vega.VolumeBenefitTier - (*BenefitTier)(nil), // 57: vega.BenefitTier - (*StakingTier)(nil), // 58: vega.StakingTier - (AccountType)(0), // 59: vega.AccountType - (*DispatchStrategy)(nil), // 60: vega.DispatchStrategy + (GovernanceData_Type)(0), // 3: vega.GovernanceData.Type + (Proposal_State)(0), // 4: vega.Proposal.State + (Vote_Value)(0), // 5: vega.Vote.Value + (*SpotProduct)(nil), // 6: vega.SpotProduct + (*FutureProduct)(nil), // 7: vega.FutureProduct + (*PerpetualProduct)(nil), // 8: vega.PerpetualProduct + (*InstrumentConfiguration)(nil), // 9: vega.InstrumentConfiguration + (*NewSpotMarketConfiguration)(nil), // 10: vega.NewSpotMarketConfiguration + (*NewMarketConfiguration)(nil), // 11: vega.NewMarketConfiguration + (*NewSpotMarket)(nil), // 12: vega.NewSpotMarket + (*SuccessorConfiguration)(nil), // 13: vega.SuccessorConfiguration + (*NewMarket)(nil), // 14: vega.NewMarket + (*UpdateMarket)(nil), // 15: vega.UpdateMarket + (*UpdateSpotMarket)(nil), // 16: vega.UpdateSpotMarket + (*UpdateMarketConfiguration)(nil), // 17: vega.UpdateMarketConfiguration + (*UpdateSpotMarketConfiguration)(nil), // 18: vega.UpdateSpotMarketConfiguration + (*UpdateInstrumentConfiguration)(nil), // 19: vega.UpdateInstrumentConfiguration + (*UpdateFutureProduct)(nil), // 20: vega.UpdateFutureProduct + (*UpdatePerpetualProduct)(nil), // 21: vega.UpdatePerpetualProduct + (*UpdateNetworkParameter)(nil), // 22: vega.UpdateNetworkParameter + (*NewAsset)(nil), // 23: vega.NewAsset + (*UpdateAsset)(nil), // 24: vega.UpdateAsset + (*NewFreeform)(nil), // 25: vega.NewFreeform + (*ProposalTerms)(nil), // 26: vega.ProposalTerms + (*BatchProposalTermsChange)(nil), // 27: vega.BatchProposalTermsChange + (*ProposalParameters)(nil), // 28: vega.ProposalParameters + (*BatchProposalTerms)(nil), // 29: vega.BatchProposalTerms + (*ProposalRationale)(nil), // 30: vega.ProposalRationale + (*GovernanceData)(nil), // 31: vega.GovernanceData + (*Proposal)(nil), // 32: vega.Proposal + (*Vote)(nil), // 33: vega.Vote + (*UpdateVolumeDiscountProgram)(nil), // 34: vega.UpdateVolumeDiscountProgram + (*VolumeDiscountProgramChanges)(nil), // 35: vega.VolumeDiscountProgramChanges + (*UpdateReferralProgram)(nil), // 36: vega.UpdateReferralProgram + (*ReferralProgramChanges)(nil), // 37: vega.ReferralProgramChanges + (*UpdateMarketState)(nil), // 38: vega.UpdateMarketState + (*UpdateMarketStateConfiguration)(nil), // 39: vega.UpdateMarketStateConfiguration + (*CancelTransfer)(nil), // 40: vega.CancelTransfer + (*CancelTransferConfiguration)(nil), // 41: vega.CancelTransferConfiguration + (*NewTransfer)(nil), // 42: vega.NewTransfer + (*NewTransferConfiguration)(nil), // 43: vega.NewTransferConfiguration + (*OneOffTransfer)(nil), // 44: vega.OneOffTransfer + (*RecurringTransfer)(nil), // 45: vega.RecurringTransfer + nil, // 46: vega.GovernanceData.YesPartyEntry + nil, // 47: vega.GovernanceData.NoPartyEntry + nil, // 48: vega.Vote.PerMarketEquityLikeShareWeightEntry + (*DataSourceDefinition)(nil), // 49: vega.DataSourceDefinition + (*DataSourceSpecToFutureBinding)(nil), // 50: vega.DataSourceSpecToFutureBinding + (*DataSourceSpecToPerpetualBinding)(nil), // 51: vega.DataSourceSpecToPerpetualBinding + (*CompositePriceConfiguration)(nil), // 52: vega.CompositePriceConfiguration + (*PriceMonitoringParameters)(nil), // 53: vega.PriceMonitoringParameters + (*TargetStakeParameters)(nil), // 54: vega.TargetStakeParameters + (*SimpleModelParams)(nil), // 55: vega.SimpleModelParams + (*LogNormalRiskModel)(nil), // 56: vega.LogNormalRiskModel + (*LiquiditySLAParameters)(nil), // 57: vega.LiquiditySLAParameters + (*LiquidityFeeSettings)(nil), // 58: vega.LiquidityFeeSettings + (*LiquidityMonitoringParameters)(nil), // 59: vega.LiquidityMonitoringParameters + (*LiquidationStrategy)(nil), // 60: vega.LiquidationStrategy + (*NetworkParameter)(nil), // 61: vega.NetworkParameter + (*AssetDetails)(nil), // 62: vega.AssetDetails + (*AssetDetailsUpdate)(nil), // 63: vega.AssetDetailsUpdate + (*VolumeBenefitTier)(nil), // 64: vega.VolumeBenefitTier + (*BenefitTier)(nil), // 65: vega.BenefitTier + (*StakingTier)(nil), // 66: vega.StakingTier + (AccountType)(0), // 67: vega.AccountType + (*DispatchStrategy)(nil), // 68: vega.DispatchStrategy } var file_vega_governance_proto_depIdxs = []int32{ - 44, // 0: vega.FutureProduct.data_source_spec_for_settlement_data:type_name -> vega.DataSourceDefinition - 44, // 1: vega.FutureProduct.data_source_spec_for_trading_termination:type_name -> vega.DataSourceDefinition - 45, // 2: vega.FutureProduct.data_source_spec_binding:type_name -> vega.DataSourceSpecToFutureBinding - 44, // 3: vega.PerpetualProduct.data_source_spec_for_settlement_schedule:type_name -> vega.DataSourceDefinition - 44, // 4: vega.PerpetualProduct.data_source_spec_for_settlement_data:type_name -> vega.DataSourceDefinition - 46, // 5: vega.PerpetualProduct.data_source_spec_binding:type_name -> vega.DataSourceSpecToPerpetualBinding - 6, // 6: vega.InstrumentConfiguration.future:type_name -> vega.FutureProduct - 5, // 7: vega.InstrumentConfiguration.spot:type_name -> vega.SpotProduct - 7, // 8: vega.InstrumentConfiguration.perpetual:type_name -> vega.PerpetualProduct - 8, // 9: vega.NewSpotMarketConfiguration.instrument:type_name -> vega.InstrumentConfiguration - 47, // 10: vega.NewSpotMarketConfiguration.price_monitoring_parameters:type_name -> vega.PriceMonitoringParameters - 48, // 11: vega.NewSpotMarketConfiguration.target_stake_parameters:type_name -> vega.TargetStakeParameters - 49, // 12: vega.NewSpotMarketConfiguration.simple:type_name -> vega.SimpleModelParams - 50, // 13: vega.NewSpotMarketConfiguration.log_normal:type_name -> vega.LogNormalRiskModel - 51, // 14: vega.NewSpotMarketConfiguration.sla_params:type_name -> vega.LiquiditySLAParameters - 8, // 15: vega.NewMarketConfiguration.instrument:type_name -> vega.InstrumentConfiguration - 47, // 16: vega.NewMarketConfiguration.price_monitoring_parameters:type_name -> vega.PriceMonitoringParameters - 52, // 17: vega.NewMarketConfiguration.liquidity_monitoring_parameters:type_name -> vega.LiquidityMonitoringParameters - 49, // 18: vega.NewMarketConfiguration.simple:type_name -> vega.SimpleModelParams - 50, // 19: vega.NewMarketConfiguration.log_normal:type_name -> vega.LogNormalRiskModel - 12, // 20: vega.NewMarketConfiguration.successor:type_name -> vega.SuccessorConfiguration - 51, // 21: vega.NewMarketConfiguration.liquidity_sla_parameters:type_name -> vega.LiquiditySLAParameters - 9, // 22: vega.NewSpotMarket.changes:type_name -> vega.NewSpotMarketConfiguration - 10, // 23: vega.NewMarket.changes:type_name -> vega.NewMarketConfiguration - 16, // 24: vega.UpdateMarket.changes:type_name -> vega.UpdateMarketConfiguration - 17, // 25: vega.UpdateSpotMarket.changes:type_name -> vega.UpdateSpotMarketConfiguration - 18, // 26: vega.UpdateMarketConfiguration.instrument:type_name -> vega.UpdateInstrumentConfiguration - 47, // 27: vega.UpdateMarketConfiguration.price_monitoring_parameters:type_name -> vega.PriceMonitoringParameters - 52, // 28: vega.UpdateMarketConfiguration.liquidity_monitoring_parameters:type_name -> vega.LiquidityMonitoringParameters - 49, // 29: vega.UpdateMarketConfiguration.simple:type_name -> vega.SimpleModelParams - 50, // 30: vega.UpdateMarketConfiguration.log_normal:type_name -> vega.LogNormalRiskModel - 51, // 31: vega.UpdateMarketConfiguration.liquidity_sla_parameters:type_name -> vega.LiquiditySLAParameters - 47, // 32: vega.UpdateSpotMarketConfiguration.price_monitoring_parameters:type_name -> vega.PriceMonitoringParameters - 48, // 33: vega.UpdateSpotMarketConfiguration.target_stake_parameters:type_name -> vega.TargetStakeParameters - 49, // 34: vega.UpdateSpotMarketConfiguration.simple:type_name -> vega.SimpleModelParams - 50, // 35: vega.UpdateSpotMarketConfiguration.log_normal:type_name -> vega.LogNormalRiskModel - 51, // 36: vega.UpdateSpotMarketConfiguration.sla_params:type_name -> vega.LiquiditySLAParameters - 19, // 37: vega.UpdateInstrumentConfiguration.future:type_name -> vega.UpdateFutureProduct - 20, // 38: vega.UpdateInstrumentConfiguration.perpetual:type_name -> vega.UpdatePerpetualProduct - 44, // 39: vega.UpdateFutureProduct.data_source_spec_for_settlement_data:type_name -> vega.DataSourceDefinition - 44, // 40: vega.UpdateFutureProduct.data_source_spec_for_trading_termination:type_name -> vega.DataSourceDefinition - 45, // 41: vega.UpdateFutureProduct.data_source_spec_binding:type_name -> vega.DataSourceSpecToFutureBinding - 44, // 42: vega.UpdatePerpetualProduct.data_source_spec_for_settlement_schedule:type_name -> vega.DataSourceDefinition - 44, // 43: vega.UpdatePerpetualProduct.data_source_spec_for_settlement_data:type_name -> vega.DataSourceDefinition - 46, // 44: vega.UpdatePerpetualProduct.data_source_spec_binding:type_name -> vega.DataSourceSpecToPerpetualBinding - 53, // 45: vega.UpdateNetworkParameter.changes:type_name -> vega.NetworkParameter - 54, // 46: vega.NewAsset.changes:type_name -> vega.AssetDetails - 55, // 47: vega.UpdateAsset.changes:type_name -> vega.AssetDetailsUpdate - 14, // 48: vega.ProposalTerms.update_market:type_name -> vega.UpdateMarket - 13, // 49: vega.ProposalTerms.new_market:type_name -> vega.NewMarket - 21, // 50: vega.ProposalTerms.update_network_parameter:type_name -> vega.UpdateNetworkParameter - 22, // 51: vega.ProposalTerms.new_asset:type_name -> vega.NewAsset - 24, // 52: vega.ProposalTerms.new_freeform:type_name -> vega.NewFreeform - 23, // 53: vega.ProposalTerms.update_asset:type_name -> vega.UpdateAsset - 11, // 54: vega.ProposalTerms.new_spot_market:type_name -> vega.NewSpotMarket - 15, // 55: vega.ProposalTerms.update_spot_market:type_name -> vega.UpdateSpotMarket - 38, // 56: vega.ProposalTerms.new_transfer:type_name -> vega.NewTransfer - 36, // 57: vega.ProposalTerms.cancel_transfer:type_name -> vega.CancelTransfer - 34, // 58: vega.ProposalTerms.update_market_state:type_name -> vega.UpdateMarketState - 32, // 59: vega.ProposalTerms.update_referral_program:type_name -> vega.UpdateReferralProgram - 30, // 60: vega.ProposalTerms.update_volume_discount_program:type_name -> vega.UpdateVolumeDiscountProgram - 28, // 61: vega.GovernanceData.proposal:type_name -> vega.Proposal - 29, // 62: vega.GovernanceData.yes:type_name -> vega.Vote - 29, // 63: vega.GovernanceData.no:type_name -> vega.Vote - 42, // 64: vega.GovernanceData.yes_party:type_name -> vega.GovernanceData.YesPartyEntry - 43, // 65: vega.GovernanceData.no_party:type_name -> vega.GovernanceData.NoPartyEntry - 3, // 66: vega.Proposal.state:type_name -> vega.Proposal.State - 25, // 67: vega.Proposal.terms:type_name -> vega.ProposalTerms - 0, // 68: vega.Proposal.reason:type_name -> vega.ProposalError - 26, // 69: vega.Proposal.rationale:type_name -> vega.ProposalRationale - 4, // 70: vega.Vote.value:type_name -> vega.Vote.Value - 31, // 71: vega.UpdateVolumeDiscountProgram.changes:type_name -> vega.VolumeDiscountProgramChanges - 56, // 72: vega.VolumeDiscountProgramChanges.benefit_tiers:type_name -> vega.VolumeBenefitTier - 33, // 73: vega.UpdateReferralProgram.changes:type_name -> vega.ReferralProgramChanges - 57, // 74: vega.ReferralProgramChanges.benefit_tiers:type_name -> vega.BenefitTier - 58, // 75: vega.ReferralProgramChanges.staking_tiers:type_name -> vega.StakingTier - 35, // 76: vega.UpdateMarketState.changes:type_name -> vega.UpdateMarketStateConfiguration - 1, // 77: vega.UpdateMarketStateConfiguration.update_type:type_name -> vega.MarketStateUpdateType - 37, // 78: vega.CancelTransfer.changes:type_name -> vega.CancelTransferConfiguration - 39, // 79: vega.NewTransfer.changes:type_name -> vega.NewTransferConfiguration - 59, // 80: vega.NewTransferConfiguration.source_type:type_name -> vega.AccountType - 2, // 81: vega.NewTransferConfiguration.transfer_type:type_name -> vega.GovernanceTransferType - 59, // 82: vega.NewTransferConfiguration.destination_type:type_name -> vega.AccountType - 40, // 83: vega.NewTransferConfiguration.one_off:type_name -> vega.OneOffTransfer - 41, // 84: vega.NewTransferConfiguration.recurring:type_name -> vega.RecurringTransfer - 60, // 85: vega.RecurringTransfer.dispatch_strategy:type_name -> vega.DispatchStrategy - 29, // 86: vega.GovernanceData.YesPartyEntry.value:type_name -> vega.Vote - 29, // 87: vega.GovernanceData.NoPartyEntry.value:type_name -> vega.Vote - 88, // [88:88] is the sub-list for method output_type - 88, // [88:88] is the sub-list for method input_type - 88, // [88:88] is the sub-list for extension type_name - 88, // [88:88] is the sub-list for extension extendee - 0, // [0:88] is the sub-list for field type_name + 49, // 0: vega.FutureProduct.data_source_spec_for_settlement_data:type_name -> vega.DataSourceDefinition + 49, // 1: vega.FutureProduct.data_source_spec_for_trading_termination:type_name -> vega.DataSourceDefinition + 50, // 2: vega.FutureProduct.data_source_spec_binding:type_name -> vega.DataSourceSpecToFutureBinding + 49, // 3: vega.PerpetualProduct.data_source_spec_for_settlement_schedule:type_name -> vega.DataSourceDefinition + 49, // 4: vega.PerpetualProduct.data_source_spec_for_settlement_data:type_name -> vega.DataSourceDefinition + 51, // 5: vega.PerpetualProduct.data_source_spec_binding:type_name -> vega.DataSourceSpecToPerpetualBinding + 52, // 6: vega.PerpetualProduct.internal_composite_price_configuration:type_name -> vega.CompositePriceConfiguration + 7, // 7: vega.InstrumentConfiguration.future:type_name -> vega.FutureProduct + 6, // 8: vega.InstrumentConfiguration.spot:type_name -> vega.SpotProduct + 8, // 9: vega.InstrumentConfiguration.perpetual:type_name -> vega.PerpetualProduct + 9, // 10: vega.NewSpotMarketConfiguration.instrument:type_name -> vega.InstrumentConfiguration + 53, // 11: vega.NewSpotMarketConfiguration.price_monitoring_parameters:type_name -> vega.PriceMonitoringParameters + 54, // 12: vega.NewSpotMarketConfiguration.target_stake_parameters:type_name -> vega.TargetStakeParameters + 55, // 13: vega.NewSpotMarketConfiguration.simple:type_name -> vega.SimpleModelParams + 56, // 14: vega.NewSpotMarketConfiguration.log_normal:type_name -> vega.LogNormalRiskModel + 57, // 15: vega.NewSpotMarketConfiguration.sla_params:type_name -> vega.LiquiditySLAParameters + 58, // 16: vega.NewSpotMarketConfiguration.liquidity_fee_settings:type_name -> vega.LiquidityFeeSettings + 9, // 17: vega.NewMarketConfiguration.instrument:type_name -> vega.InstrumentConfiguration + 53, // 18: vega.NewMarketConfiguration.price_monitoring_parameters:type_name -> vega.PriceMonitoringParameters + 59, // 19: vega.NewMarketConfiguration.liquidity_monitoring_parameters:type_name -> vega.LiquidityMonitoringParameters + 55, // 20: vega.NewMarketConfiguration.simple:type_name -> vega.SimpleModelParams + 56, // 21: vega.NewMarketConfiguration.log_normal:type_name -> vega.LogNormalRiskModel + 13, // 22: vega.NewMarketConfiguration.successor:type_name -> vega.SuccessorConfiguration + 57, // 23: vega.NewMarketConfiguration.liquidity_sla_parameters:type_name -> vega.LiquiditySLAParameters + 58, // 24: vega.NewMarketConfiguration.liquidity_fee_settings:type_name -> vega.LiquidityFeeSettings + 60, // 25: vega.NewMarketConfiguration.liquidation_strategy:type_name -> vega.LiquidationStrategy + 52, // 26: vega.NewMarketConfiguration.mark_price_configuration:type_name -> vega.CompositePriceConfiguration + 10, // 27: vega.NewSpotMarket.changes:type_name -> vega.NewSpotMarketConfiguration + 11, // 28: vega.NewMarket.changes:type_name -> vega.NewMarketConfiguration + 17, // 29: vega.UpdateMarket.changes:type_name -> vega.UpdateMarketConfiguration + 18, // 30: vega.UpdateSpotMarket.changes:type_name -> vega.UpdateSpotMarketConfiguration + 19, // 31: vega.UpdateMarketConfiguration.instrument:type_name -> vega.UpdateInstrumentConfiguration + 53, // 32: vega.UpdateMarketConfiguration.price_monitoring_parameters:type_name -> vega.PriceMonitoringParameters + 59, // 33: vega.UpdateMarketConfiguration.liquidity_monitoring_parameters:type_name -> vega.LiquidityMonitoringParameters + 55, // 34: vega.UpdateMarketConfiguration.simple:type_name -> vega.SimpleModelParams + 56, // 35: vega.UpdateMarketConfiguration.log_normal:type_name -> vega.LogNormalRiskModel + 57, // 36: vega.UpdateMarketConfiguration.liquidity_sla_parameters:type_name -> vega.LiquiditySLAParameters + 58, // 37: vega.UpdateMarketConfiguration.liquidity_fee_settings:type_name -> vega.LiquidityFeeSettings + 60, // 38: vega.UpdateMarketConfiguration.liquidation_strategy:type_name -> vega.LiquidationStrategy + 52, // 39: vega.UpdateMarketConfiguration.mark_price_configuration:type_name -> vega.CompositePriceConfiguration + 53, // 40: vega.UpdateSpotMarketConfiguration.price_monitoring_parameters:type_name -> vega.PriceMonitoringParameters + 54, // 41: vega.UpdateSpotMarketConfiguration.target_stake_parameters:type_name -> vega.TargetStakeParameters + 55, // 42: vega.UpdateSpotMarketConfiguration.simple:type_name -> vega.SimpleModelParams + 56, // 43: vega.UpdateSpotMarketConfiguration.log_normal:type_name -> vega.LogNormalRiskModel + 57, // 44: vega.UpdateSpotMarketConfiguration.sla_params:type_name -> vega.LiquiditySLAParameters + 58, // 45: vega.UpdateSpotMarketConfiguration.liquidity_fee_settings:type_name -> vega.LiquidityFeeSettings + 20, // 46: vega.UpdateInstrumentConfiguration.future:type_name -> vega.UpdateFutureProduct + 21, // 47: vega.UpdateInstrumentConfiguration.perpetual:type_name -> vega.UpdatePerpetualProduct + 49, // 48: vega.UpdateFutureProduct.data_source_spec_for_settlement_data:type_name -> vega.DataSourceDefinition + 49, // 49: vega.UpdateFutureProduct.data_source_spec_for_trading_termination:type_name -> vega.DataSourceDefinition + 50, // 50: vega.UpdateFutureProduct.data_source_spec_binding:type_name -> vega.DataSourceSpecToFutureBinding + 49, // 51: vega.UpdatePerpetualProduct.data_source_spec_for_settlement_schedule:type_name -> vega.DataSourceDefinition + 49, // 52: vega.UpdatePerpetualProduct.data_source_spec_for_settlement_data:type_name -> vega.DataSourceDefinition + 51, // 53: vega.UpdatePerpetualProduct.data_source_spec_binding:type_name -> vega.DataSourceSpecToPerpetualBinding + 52, // 54: vega.UpdatePerpetualProduct.internal_composite_price_configuration:type_name -> vega.CompositePriceConfiguration + 61, // 55: vega.UpdateNetworkParameter.changes:type_name -> vega.NetworkParameter + 62, // 56: vega.NewAsset.changes:type_name -> vega.AssetDetails + 63, // 57: vega.UpdateAsset.changes:type_name -> vega.AssetDetailsUpdate + 15, // 58: vega.ProposalTerms.update_market:type_name -> vega.UpdateMarket + 14, // 59: vega.ProposalTerms.new_market:type_name -> vega.NewMarket + 22, // 60: vega.ProposalTerms.update_network_parameter:type_name -> vega.UpdateNetworkParameter + 23, // 61: vega.ProposalTerms.new_asset:type_name -> vega.NewAsset + 25, // 62: vega.ProposalTerms.new_freeform:type_name -> vega.NewFreeform + 24, // 63: vega.ProposalTerms.update_asset:type_name -> vega.UpdateAsset + 12, // 64: vega.ProposalTerms.new_spot_market:type_name -> vega.NewSpotMarket + 16, // 65: vega.ProposalTerms.update_spot_market:type_name -> vega.UpdateSpotMarket + 42, // 66: vega.ProposalTerms.new_transfer:type_name -> vega.NewTransfer + 40, // 67: vega.ProposalTerms.cancel_transfer:type_name -> vega.CancelTransfer + 38, // 68: vega.ProposalTerms.update_market_state:type_name -> vega.UpdateMarketState + 36, // 69: vega.ProposalTerms.update_referral_program:type_name -> vega.UpdateReferralProgram + 34, // 70: vega.ProposalTerms.update_volume_discount_program:type_name -> vega.UpdateVolumeDiscountProgram + 15, // 71: vega.BatchProposalTermsChange.update_market:type_name -> vega.UpdateMarket + 14, // 72: vega.BatchProposalTermsChange.new_market:type_name -> vega.NewMarket + 22, // 73: vega.BatchProposalTermsChange.update_network_parameter:type_name -> vega.UpdateNetworkParameter + 25, // 74: vega.BatchProposalTermsChange.new_freeform:type_name -> vega.NewFreeform + 24, // 75: vega.BatchProposalTermsChange.update_asset:type_name -> vega.UpdateAsset + 12, // 76: vega.BatchProposalTermsChange.new_spot_market:type_name -> vega.NewSpotMarket + 16, // 77: vega.BatchProposalTermsChange.update_spot_market:type_name -> vega.UpdateSpotMarket + 42, // 78: vega.BatchProposalTermsChange.new_transfer:type_name -> vega.NewTransfer + 40, // 79: vega.BatchProposalTermsChange.cancel_transfer:type_name -> vega.CancelTransfer + 38, // 80: vega.BatchProposalTermsChange.update_market_state:type_name -> vega.UpdateMarketState + 36, // 81: vega.BatchProposalTermsChange.update_referral_program:type_name -> vega.UpdateReferralProgram + 34, // 82: vega.BatchProposalTermsChange.update_volume_discount_program:type_name -> vega.UpdateVolumeDiscountProgram + 28, // 83: vega.BatchProposalTerms.proposal_params:type_name -> vega.ProposalParameters + 27, // 84: vega.BatchProposalTerms.changes:type_name -> vega.BatchProposalTermsChange + 32, // 85: vega.GovernanceData.proposal:type_name -> vega.Proposal + 33, // 86: vega.GovernanceData.yes:type_name -> vega.Vote + 33, // 87: vega.GovernanceData.no:type_name -> vega.Vote + 46, // 88: vega.GovernanceData.yes_party:type_name -> vega.GovernanceData.YesPartyEntry + 47, // 89: vega.GovernanceData.no_party:type_name -> vega.GovernanceData.NoPartyEntry + 3, // 90: vega.GovernanceData.proposal_type:type_name -> vega.GovernanceData.Type + 32, // 91: vega.GovernanceData.proposals:type_name -> vega.Proposal + 4, // 92: vega.Proposal.state:type_name -> vega.Proposal.State + 26, // 93: vega.Proposal.terms:type_name -> vega.ProposalTerms + 0, // 94: vega.Proposal.reason:type_name -> vega.ProposalError + 30, // 95: vega.Proposal.rationale:type_name -> vega.ProposalRationale + 29, // 96: vega.Proposal.batch_terms:type_name -> vega.BatchProposalTerms + 5, // 97: vega.Vote.value:type_name -> vega.Vote.Value + 48, // 98: vega.Vote.per_market_equity_like_share_weight:type_name -> vega.Vote.PerMarketEquityLikeShareWeightEntry + 35, // 99: vega.UpdateVolumeDiscountProgram.changes:type_name -> vega.VolumeDiscountProgramChanges + 64, // 100: vega.VolumeDiscountProgramChanges.benefit_tiers:type_name -> vega.VolumeBenefitTier + 37, // 101: vega.UpdateReferralProgram.changes:type_name -> vega.ReferralProgramChanges + 65, // 102: vega.ReferralProgramChanges.benefit_tiers:type_name -> vega.BenefitTier + 66, // 103: vega.ReferralProgramChanges.staking_tiers:type_name -> vega.StakingTier + 39, // 104: vega.UpdateMarketState.changes:type_name -> vega.UpdateMarketStateConfiguration + 1, // 105: vega.UpdateMarketStateConfiguration.update_type:type_name -> vega.MarketStateUpdateType + 41, // 106: vega.CancelTransfer.changes:type_name -> vega.CancelTransferConfiguration + 43, // 107: vega.NewTransfer.changes:type_name -> vega.NewTransferConfiguration + 67, // 108: vega.NewTransferConfiguration.source_type:type_name -> vega.AccountType + 2, // 109: vega.NewTransferConfiguration.transfer_type:type_name -> vega.GovernanceTransferType + 67, // 110: vega.NewTransferConfiguration.destination_type:type_name -> vega.AccountType + 44, // 111: vega.NewTransferConfiguration.one_off:type_name -> vega.OneOffTransfer + 45, // 112: vega.NewTransferConfiguration.recurring:type_name -> vega.RecurringTransfer + 68, // 113: vega.RecurringTransfer.dispatch_strategy:type_name -> vega.DispatchStrategy + 33, // 114: vega.GovernanceData.YesPartyEntry.value:type_name -> vega.Vote + 33, // 115: vega.GovernanceData.NoPartyEntry.value:type_name -> vega.Vote + 116, // [116:116] is the sub-list for method output_type + 116, // [116:116] is the sub-list for method input_type + 116, // [116:116] is the sub-list for extension type_name + 116, // [116:116] is the sub-list for extension extendee + 0, // [0:116] is the sub-list for field type_name } func init() { file_vega_governance_proto_init() } @@ -5016,7 +6004,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProposalRationale); i { + switch v := v.(*BatchProposalTermsChange); i { case 0: return &v.state case 1: @@ -5028,7 +6016,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GovernanceData); i { + switch v := v.(*ProposalParameters); i { case 0: return &v.state case 1: @@ -5040,7 +6028,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Proposal); i { + switch v := v.(*BatchProposalTerms); i { case 0: return &v.state case 1: @@ -5052,7 +6040,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Vote); i { + switch v := v.(*ProposalRationale); i { case 0: return &v.state case 1: @@ -5064,7 +6052,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateVolumeDiscountProgram); i { + switch v := v.(*GovernanceData); i { case 0: return &v.state case 1: @@ -5076,7 +6064,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VolumeDiscountProgramChanges); i { + switch v := v.(*Proposal); i { case 0: return &v.state case 1: @@ -5088,7 +6076,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateReferralProgram); i { + switch v := v.(*Vote); i { case 0: return &v.state case 1: @@ -5100,7 +6088,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralProgramChanges); i { + switch v := v.(*UpdateVolumeDiscountProgram); i { case 0: return &v.state case 1: @@ -5112,7 +6100,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateMarketState); i { + switch v := v.(*VolumeDiscountProgramChanges); i { case 0: return &v.state case 1: @@ -5124,7 +6112,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateMarketStateConfiguration); i { + switch v := v.(*UpdateReferralProgram); i { case 0: return &v.state case 1: @@ -5136,7 +6124,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelTransfer); i { + switch v := v.(*ReferralProgramChanges); i { case 0: return &v.state case 1: @@ -5148,7 +6136,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelTransferConfiguration); i { + switch v := v.(*UpdateMarketState); i { case 0: return &v.state case 1: @@ -5160,7 +6148,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NewTransfer); i { + switch v := v.(*UpdateMarketStateConfiguration); i { case 0: return &v.state case 1: @@ -5172,7 +6160,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NewTransferConfiguration); i { + switch v := v.(*CancelTransfer); i { case 0: return &v.state case 1: @@ -5184,7 +6172,7 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OneOffTransfer); i { + switch v := v.(*CancelTransferConfiguration); i { case 0: return &v.state case 1: @@ -5196,6 +6184,42 @@ func file_vega_governance_proto_init() { } } file_vega_governance_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NewTransfer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_governance_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NewTransferConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_governance_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OneOffTransfer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_governance_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RecurringTransfer); i { case 0: return &v.state @@ -5208,6 +6232,7 @@ func file_vega_governance_proto_init() { } } } + file_vega_governance_proto_msgTypes[2].OneofWrappers = []interface{}{} file_vega_governance_proto_msgTypes[3].OneofWrappers = []interface{}{ (*InstrumentConfiguration_Future)(nil), (*InstrumentConfiguration_Spot)(nil), @@ -5233,6 +6258,7 @@ func file_vega_governance_proto_init() { (*UpdateInstrumentConfiguration_Future)(nil), (*UpdateInstrumentConfiguration_Perpetual)(nil), } + file_vega_governance_proto_msgTypes[15].OneofWrappers = []interface{}{} file_vega_governance_proto_msgTypes[20].OneofWrappers = []interface{}{ (*ProposalTerms_UpdateMarket)(nil), (*ProposalTerms_NewMarket)(nil), @@ -5248,20 +6274,34 @@ func file_vega_governance_proto_init() { (*ProposalTerms_UpdateReferralProgram)(nil), (*ProposalTerms_UpdateVolumeDiscountProgram)(nil), } - file_vega_governance_proto_msgTypes[23].OneofWrappers = []interface{}{} - file_vega_governance_proto_msgTypes[30].OneofWrappers = []interface{}{} - file_vega_governance_proto_msgTypes[34].OneofWrappers = []interface{}{ + file_vega_governance_proto_msgTypes[21].OneofWrappers = []interface{}{ + (*BatchProposalTermsChange_UpdateMarket)(nil), + (*BatchProposalTermsChange_NewMarket)(nil), + (*BatchProposalTermsChange_UpdateNetworkParameter)(nil), + (*BatchProposalTermsChange_NewFreeform)(nil), + (*BatchProposalTermsChange_UpdateAsset)(nil), + (*BatchProposalTermsChange_NewSpotMarket)(nil), + (*BatchProposalTermsChange_UpdateSpotMarket)(nil), + (*BatchProposalTermsChange_NewTransfer)(nil), + (*BatchProposalTermsChange_CancelTransfer)(nil), + (*BatchProposalTermsChange_UpdateMarketState)(nil), + (*BatchProposalTermsChange_UpdateReferralProgram)(nil), + (*BatchProposalTermsChange_UpdateVolumeDiscountProgram)(nil), + } + file_vega_governance_proto_msgTypes[26].OneofWrappers = []interface{}{} + file_vega_governance_proto_msgTypes[33].OneofWrappers = []interface{}{} + file_vega_governance_proto_msgTypes[37].OneofWrappers = []interface{}{ (*NewTransferConfiguration_OneOff)(nil), (*NewTransferConfiguration_Recurring)(nil), } - file_vega_governance_proto_msgTypes[36].OneofWrappers = []interface{}{} + file_vega_governance_proto_msgTypes[39].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vega_governance_proto_rawDesc, - NumEnums: 5, - NumMessages: 39, + NumEnums: 6, + NumMessages: 43, NumExtensions: 0, NumServices: 0, }, diff --git a/protos/vega/markets.pb.go b/protos/vega/markets.pb.go index e83acba305..2d39281e2a 100644 --- a/protos/vega/markets.pb.go +++ b/protos/vega/markets.pb.go @@ -20,6 +20,116 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type CompositePriceType int32 + +const ( + CompositePriceType_COMPOSITE_PRICE_TYPE_UNSPECIFIED CompositePriceType = 0 + // Composite price is calculated as a weighted average of the underlying mark prices. + CompositePriceType_COMPOSITE_PRICE_TYPE_WEIGHTED CompositePriceType = 1 + // Composite price is calculated as a median of the underlying mark prices. + CompositePriceType_COMPOSITE_PRICE_TYPE_MEDIAN CompositePriceType = 2 + // Composite price is calculated as the last trade price. + CompositePriceType_COMPOSITE_PRICE_TYPE_LAST_TRADE CompositePriceType = 3 +) + +// Enum value maps for CompositePriceType. +var ( + CompositePriceType_name = map[int32]string{ + 0: "COMPOSITE_PRICE_TYPE_UNSPECIFIED", + 1: "COMPOSITE_PRICE_TYPE_WEIGHTED", + 2: "COMPOSITE_PRICE_TYPE_MEDIAN", + 3: "COMPOSITE_PRICE_TYPE_LAST_TRADE", + } + CompositePriceType_value = map[string]int32{ + "COMPOSITE_PRICE_TYPE_UNSPECIFIED": 0, + "COMPOSITE_PRICE_TYPE_WEIGHTED": 1, + "COMPOSITE_PRICE_TYPE_MEDIAN": 2, + "COMPOSITE_PRICE_TYPE_LAST_TRADE": 3, + } +) + +func (x CompositePriceType) Enum() *CompositePriceType { + p := new(CompositePriceType) + *p = x + return p +} + +func (x CompositePriceType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CompositePriceType) Descriptor() protoreflect.EnumDescriptor { + return file_vega_markets_proto_enumTypes[0].Descriptor() +} + +func (CompositePriceType) Type() protoreflect.EnumType { + return &file_vega_markets_proto_enumTypes[0] +} + +func (x CompositePriceType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CompositePriceType.Descriptor instead. +func (CompositePriceType) EnumDescriptor() ([]byte, []int) { + return file_vega_markets_proto_rawDescGZIP(), []int{0} +} + +type LiquidityFeeSettings_Method int32 + +const ( + LiquidityFeeSettings_METHOD_UNSPECIFIED LiquidityFeeSettings_Method = 0 + // Fee is the smallest value of all bids, such that liquidity providers with nominated fees less than or equal to this value still have sufficient commitment to fulfil the market's target stake. + LiquidityFeeSettings_METHOD_MARGINAL_COST LiquidityFeeSettings_Method = 1 + // Fee is the weighted average of all liquidity providers' nominated fees, weighted by their committment. + LiquidityFeeSettings_METHOD_WEIGHTED_AVERAGE LiquidityFeeSettings_Method = 2 + // Fee is set by the market to a constant value irrespective of any liquidity provider's nominated fee. + LiquidityFeeSettings_METHOD_CONSTANT LiquidityFeeSettings_Method = 3 +) + +// Enum value maps for LiquidityFeeSettings_Method. +var ( + LiquidityFeeSettings_Method_name = map[int32]string{ + 0: "METHOD_UNSPECIFIED", + 1: "METHOD_MARGINAL_COST", + 2: "METHOD_WEIGHTED_AVERAGE", + 3: "METHOD_CONSTANT", + } + LiquidityFeeSettings_Method_value = map[string]int32{ + "METHOD_UNSPECIFIED": 0, + "METHOD_MARGINAL_COST": 1, + "METHOD_WEIGHTED_AVERAGE": 2, + "METHOD_CONSTANT": 3, + } +) + +func (x LiquidityFeeSettings_Method) Enum() *LiquidityFeeSettings_Method { + p := new(LiquidityFeeSettings_Method) + *p = x + return p +} + +func (x LiquidityFeeSettings_Method) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LiquidityFeeSettings_Method) Descriptor() protoreflect.EnumDescriptor { + return file_vega_markets_proto_enumTypes[1].Descriptor() +} + +func (LiquidityFeeSettings_Method) Type() protoreflect.EnumType { + return &file_vega_markets_proto_enumTypes[1] +} + +func (x LiquidityFeeSettings_Method) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LiquidityFeeSettings_Method.Descriptor instead. +func (LiquidityFeeSettings_Method) EnumDescriptor() ([]byte, []int) { + return file_vega_markets_proto_rawDescGZIP(), []int{22, 0} +} + // Current state of the market type Market_State int32 @@ -91,11 +201,11 @@ func (x Market_State) String() string { } func (Market_State) Descriptor() protoreflect.EnumDescriptor { - return file_vega_markets_proto_enumTypes[0].Descriptor() + return file_vega_markets_proto_enumTypes[2].Descriptor() } func (Market_State) Type() protoreflect.EnumType { - return &file_vega_markets_proto_enumTypes[0] + return &file_vega_markets_proto_enumTypes[2] } func (x Market_State) Number() protoreflect.EnumNumber { @@ -104,7 +214,7 @@ func (x Market_State) Number() protoreflect.EnumNumber { // Deprecated: Use Market_State.Descriptor instead. func (Market_State) EnumDescriptor() ([]byte, []int) { - return file_vega_markets_proto_rawDescGZIP(), []int{23, 0} + return file_vega_markets_proto_rawDescGZIP(), []int{24, 0} } // Trading mode the market is currently running, also referred to as 'market state' @@ -160,11 +270,11 @@ func (x Market_TradingMode) String() string { } func (Market_TradingMode) Descriptor() protoreflect.EnumDescriptor { - return file_vega_markets_proto_enumTypes[1].Descriptor() + return file_vega_markets_proto_enumTypes[3].Descriptor() } func (Market_TradingMode) Type() protoreflect.EnumType { - return &file_vega_markets_proto_enumTypes[1] + return &file_vega_markets_proto_enumTypes[3] } func (x Market_TradingMode) Number() protoreflect.EnumNumber { @@ -173,7 +283,7 @@ func (x Market_TradingMode) Number() protoreflect.EnumNumber { // Deprecated: Use Market_TradingMode.Descriptor instead. func (Market_TradingMode) EnumDescriptor() ([]byte, []int) { - return file_vega_markets_proto_rawDescGZIP(), []int{23, 1} + return file_vega_markets_proto_rawDescGZIP(), []int{24, 1} } // Auction duration is used to configure 3 auction periods: @@ -416,6 +526,14 @@ type Perpetual struct { DataSourceSpecForSettlementData *DataSourceSpec `protobuf:"bytes,8,opt,name=data_source_spec_for_settlement_data,json=dataSourceSpecForSettlementData,proto3" json:"data_source_spec_for_settlement_data,omitempty"` // Binding between the data source spec and the settlement data. DataSourceSpecBinding *DataSourceSpecToPerpetualBinding `protobuf:"bytes,9,opt,name=data_source_spec_binding,json=dataSourceSpecBinding,proto3" json:"data_source_spec_binding,omitempty"` + // Factor applied to funding-rates. This scales the impact that spot price deviations have on funding payments. + FundingRateScalingFactor *string `protobuf:"bytes,10,opt,name=funding_rate_scaling_factor,json=fundingRateScalingFactor,proto3,oneof" json:"funding_rate_scaling_factor,omitempty"` + // Lower bound for the funding-rate such that the funding-rate will never be lower than this value. + FundingRateLowerBound *string `protobuf:"bytes,11,opt,name=funding_rate_lower_bound,json=fundingRateLowerBound,proto3,oneof" json:"funding_rate_lower_bound,omitempty"` + // Upper bound for the funding-rate such that the funding-rate will never be higher than this value. + FundingRateUpperBound *string `protobuf:"bytes,12,opt,name=funding_rate_upper_bound,json=fundingRateUpperBound,proto3,oneof" json:"funding_rate_upper_bound,omitempty"` + // Optional configuration for the internal composite price used in funding payment calculation. + InternalCompositePriceConfig *CompositePriceConfiguration `protobuf:"bytes,13,opt,name=internal_composite_price_config,json=internalCompositePriceConfig,proto3,oneof" json:"internal_composite_price_config,omitempty"` } func (x *Perpetual) Reset() { @@ -513,6 +631,34 @@ func (x *Perpetual) GetDataSourceSpecBinding() *DataSourceSpecToPerpetualBinding return nil } +func (x *Perpetual) GetFundingRateScalingFactor() string { + if x != nil && x.FundingRateScalingFactor != nil { + return *x.FundingRateScalingFactor + } + return "" +} + +func (x *Perpetual) GetFundingRateLowerBound() string { + if x != nil && x.FundingRateLowerBound != nil { + return *x.FundingRateLowerBound + } + return "" +} + +func (x *Perpetual) GetFundingRateUpperBound() string { + if x != nil && x.FundingRateUpperBound != nil { + return *x.FundingRateUpperBound + } + return "" +} + +func (x *Perpetual) GetInternalCompositePriceConfig() *CompositePriceConfiguration { + if x != nil { + return x.InternalCompositePriceConfig + } + return nil +} + // DataSourceSpecToFutureBinding describes which property of the data source data is to be // used as settlement data and which to use as the trading terminated trigger type DataSourceSpecToFutureBinding struct { @@ -574,20 +720,18 @@ func (x *DataSourceSpecToFutureBinding) GetTradingTerminationProperty() string { return "" } -// Describes which property of the data source data is to be -// used as settlement data and which to use as the trading terminated trigger +// Describes which properties of the data source data is to be +// used for settlement. type DataSourceSpecToPerpetualBinding struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name of the property in the source data that should be used as settlement data. - // If it is set to "prices.BTC.value", then the perpetual market will use the value of - // this property as settlement data. + // Name of the property in the source data that should be used for settlement data. + // If it is set to "prices.BTC.value" for example, then the perpetual market will use the value of + // this property to get settlement data. SettlementDataProperty string `protobuf:"bytes,1,opt,name=settlement_data_property,json=settlementDataProperty,proto3" json:"settlement_data_property,omitempty"` - // Name of the property in the source data that should be used as settlement data. - // If it is set to "prices.BTC.value", then the perpetual market will use the value of - // this property as settlement data. + // Name of the property in the source data that should be used to determine the perpetual's settlement schedule. SettlementScheduleProperty string `protobuf:"bytes,2,opt,name=settlement_schedule_property,json=settlementScheduleProperty,proto3" json:"settlement_schedule_property,omitempty"` } @@ -1391,6 +1535,8 @@ type Fees struct { // Fee factors. Factors *FeeFactors `protobuf:"bytes,1,opt,name=factors,proto3" json:"factors,omitempty"` + // Liquidity fee settings for the market describing how the fee was calculated. + LiquidityFeeSettings *LiquidityFeeSettings `protobuf:"bytes,2,opt,name=liquidity_fee_settings,json=liquidityFeeSettings,proto3" json:"liquidity_fee_settings,omitempty"` } func (x *Fees) Reset() { @@ -1432,6 +1578,13 @@ func (x *Fees) GetFactors() *FeeFactors { return nil } +func (x *Fees) GetLiquidityFeeSettings() *LiquidityFeeSettings { + if x != nil { + return x.LiquidityFeeSettings + } + return nil +} + // PriceMonitoringTrigger holds together price projection horizon τ, probability level p, and auction extension duration type PriceMonitoringTrigger struct { state protoimpl.MessageState @@ -1740,6 +1893,64 @@ func (x *LiquiditySLAParameters) GetSlaCompetitionFactor() string { return "" } +// Market settings that describe how the liquidity fee is calculated. +type LiquidityFeeSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Method used to calculate the market's liquidity fee. + Method LiquidityFeeSettings_Method `protobuf:"varint,1,opt,name=method,proto3,enum=vega.LiquidityFeeSettings_Method" json:"method,omitempty"` + // Constant liquidity fee used when using the constant fee method. + FeeConstant *string `protobuf:"bytes,2,opt,name=fee_constant,json=feeConstant,proto3,oneof" json:"fee_constant,omitempty"` +} + +func (x *LiquidityFeeSettings) Reset() { + *x = LiquidityFeeSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_markets_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LiquidityFeeSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LiquidityFeeSettings) ProtoMessage() {} + +func (x *LiquidityFeeSettings) ProtoReflect() protoreflect.Message { + mi := &file_vega_markets_proto_msgTypes[22] + 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 LiquidityFeeSettings.ProtoReflect.Descriptor instead. +func (*LiquidityFeeSettings) Descriptor() ([]byte, []int) { + return file_vega_markets_proto_rawDescGZIP(), []int{22} +} + +func (x *LiquidityFeeSettings) GetMethod() LiquidityFeeSettings_Method { + if x != nil { + return x.Method + } + return LiquidityFeeSettings_METHOD_UNSPECIFIED +} + +func (x *LiquidityFeeSettings) GetFeeConstant() string { + if x != nil && x.FeeConstant != nil { + return *x.FeeConstant + } + return "" +} + // TargetStakeParameters contains parameters used in target stake calculation type TargetStakeParameters struct { state protoimpl.MessageState @@ -1755,7 +1966,7 @@ type TargetStakeParameters struct { func (x *TargetStakeParameters) Reset() { *x = TargetStakeParameters{} if protoimpl.UnsafeEnabled { - mi := &file_vega_markets_proto_msgTypes[22] + mi := &file_vega_markets_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1768,7 +1979,7 @@ func (x *TargetStakeParameters) String() string { func (*TargetStakeParameters) ProtoMessage() {} func (x *TargetStakeParameters) ProtoReflect() protoreflect.Message { - mi := &file_vega_markets_proto_msgTypes[22] + mi := &file_vega_markets_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1781,7 +1992,7 @@ func (x *TargetStakeParameters) ProtoReflect() protoreflect.Message { // Deprecated: Use TargetStakeParameters.ProtoReflect.Descriptor instead. func (*TargetStakeParameters) Descriptor() ([]byte, []int) { - return file_vega_markets_proto_rawDescGZIP(), []int{22} + return file_vega_markets_proto_rawDescGZIP(), []int{23} } func (x *TargetStakeParameters) GetTimeWindow() int64 { @@ -1844,12 +2055,16 @@ type Market struct { SuccessorMarketId *string `protobuf:"bytes,17,opt,name=successor_market_id,json=successorMarketId,proto3,oneof" json:"successor_market_id,omitempty"` // Liquidity SLA parameters for the market. LiquiditySlaParams *LiquiditySLAParameters `protobuf:"bytes,18,opt,name=liquidity_sla_params,json=liquiditySlaParams,proto3,oneof" json:"liquidity_sla_params,omitempty"` + // Liquidation strategy used by this market. + LiquidationStrategy *LiquidationStrategy `protobuf:"bytes,19,opt,name=liquidation_strategy,json=liquidationStrategy,proto3" json:"liquidation_strategy,omitempty"` + // Mark price calculation configuration. + MarkPriceConfiguration *CompositePriceConfiguration `protobuf:"bytes,20,opt,name=mark_price_configuration,json=markPriceConfiguration,proto3" json:"mark_price_configuration,omitempty"` } func (x *Market) Reset() { *x = Market{} if protoimpl.UnsafeEnabled { - mi := &file_vega_markets_proto_msgTypes[23] + mi := &file_vega_markets_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1862,7 +2077,7 @@ func (x *Market) String() string { func (*Market) ProtoMessage() {} func (x *Market) ProtoReflect() protoreflect.Message { - mi := &file_vega_markets_proto_msgTypes[23] + mi := &file_vega_markets_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1875,7 +2090,7 @@ func (x *Market) ProtoReflect() protoreflect.Message { // Deprecated: Use Market.ProtoReflect.Descriptor instead. func (*Market) Descriptor() ([]byte, []int) { - return file_vega_markets_proto_rawDescGZIP(), []int{23} + return file_vega_markets_proto_rawDescGZIP(), []int{24} } func (x *Market) GetId() string { @@ -2004,6 +2219,20 @@ func (x *Market) GetLiquiditySlaParams() *LiquiditySLAParameters { return nil } +func (x *Market) GetLiquidationStrategy() *LiquidationStrategy { + if x != nil { + return x.LiquidationStrategy + } + return nil +} + +func (x *Market) GetMarkPriceConfiguration() *CompositePriceConfiguration { + if x != nil { + return x.MarkPriceConfiguration + } + return nil +} + // Time stamps for important times about creating, enacting etc the market type MarketTimestamps struct { state protoimpl.MessageState @@ -2023,7 +2252,7 @@ type MarketTimestamps struct { func (x *MarketTimestamps) Reset() { *x = MarketTimestamps{} if protoimpl.UnsafeEnabled { - mi := &file_vega_markets_proto_msgTypes[24] + mi := &file_vega_markets_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2036,7 +2265,7 @@ func (x *MarketTimestamps) String() string { func (*MarketTimestamps) ProtoMessage() {} func (x *MarketTimestamps) ProtoReflect() protoreflect.Message { - mi := &file_vega_markets_proto_msgTypes[24] + mi := &file_vega_markets_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2049,7 +2278,7 @@ func (x *MarketTimestamps) ProtoReflect() protoreflect.Message { // Deprecated: Use MarketTimestamps.ProtoReflect.Descriptor instead. func (*MarketTimestamps) Descriptor() ([]byte, []int) { - return file_vega_markets_proto_rawDescGZIP(), []int{24} + return file_vega_markets_proto_rawDescGZIP(), []int{25} } func (x *MarketTimestamps) GetProposed() int64 { @@ -2080,6 +2309,196 @@ func (x *MarketTimestamps) GetClose() int64 { return 0 } +// Liquidation strategy used when the network holds a position resulting from position resolution. +type LiquidationStrategy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Interval, in seconds, at which the network will attempt to close its position. + DisposalTimeStep int64 `protobuf:"varint,1,opt,name=disposal_time_step,json=disposalTimeStep,proto3" json:"disposal_time_step,omitempty"` + // Fraction of the open position the market will try to close in a single attempt; range 0 through 1. + DisposalFraction string `protobuf:"bytes,2,opt,name=disposal_fraction,json=disposalFraction,proto3" json:"disposal_fraction,omitempty"` + // Size of the position that the network will try to close in a single attempt. + FullDisposalSize uint64 `protobuf:"varint,3,opt,name=full_disposal_size,json=fullDisposalSize,proto3" json:"full_disposal_size,omitempty"` + // Max fraction of the total volume of the orderbook, within liquidity bounds, that the network can use to close its position; range 0 through 1. + MaxFractionConsumed string `protobuf:"bytes,4,opt,name=max_fraction_consumed,json=maxFractionConsumed,proto3" json:"max_fraction_consumed,omitempty"` +} + +func (x *LiquidationStrategy) Reset() { + *x = LiquidationStrategy{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_markets_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LiquidationStrategy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LiquidationStrategy) ProtoMessage() {} + +func (x *LiquidationStrategy) ProtoReflect() protoreflect.Message { + mi := &file_vega_markets_proto_msgTypes[26] + 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 LiquidationStrategy.ProtoReflect.Descriptor instead. +func (*LiquidationStrategy) Descriptor() ([]byte, []int) { + return file_vega_markets_proto_rawDescGZIP(), []int{26} +} + +func (x *LiquidationStrategy) GetDisposalTimeStep() int64 { + if x != nil { + return x.DisposalTimeStep + } + return 0 +} + +func (x *LiquidationStrategy) GetDisposalFraction() string { + if x != nil { + return x.DisposalFraction + } + return "" +} + +func (x *LiquidationStrategy) GetFullDisposalSize() uint64 { + if x != nil { + return x.FullDisposalSize + } + return 0 +} + +func (x *LiquidationStrategy) GetMaxFractionConsumed() string { + if x != nil { + return x.MaxFractionConsumed + } + return "" +} + +// Mark price configuration parameters. +type CompositePriceConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Decay weight used for calculation of mark price. + DecayWeight string `protobuf:"bytes,1,opt,name=decay_weight,json=decayWeight,proto3" json:"decay_weight,omitempty"` + // Decay power used for the calculation of mark price. + DecayPower uint64 `protobuf:"varint,2,opt,name=decay_power,json=decayPower,proto3" json:"decay_power,omitempty"` + // Cash amount, in asset decimals, used for the calculation of the mark price from the order book. + CashAmount string `protobuf:"bytes,3,opt,name=cash_amount,json=cashAmount,proto3" json:"cash_amount,omitempty"` + // Weights for each composite price data source. + SourceWeights []string `protobuf:"bytes,4,rep,name=source_weights,json=sourceWeights,proto3" json:"source_weights,omitempty"` + // For how long a price source is considered valid. One entry for each data source + // such that the first is for the trade based mark price, the second is for the book based price + // the third is for the first oracle, followed by more oracle data source staleness tolerance. + SourceStalenessTolerance []string `protobuf:"bytes,5,rep,name=source_staleness_tolerance,json=sourceStalenessTolerance,proto3" json:"source_staleness_tolerance,omitempty"` + // Which method is used for the calculation of the composite price for the market. + CompositePriceType CompositePriceType `protobuf:"varint,6,opt,name=composite_price_type,json=compositePriceType,proto3,enum=vega.CompositePriceType" json:"composite_price_type,omitempty"` + // Additional price sources to be used for internal composite price calculation. + DataSourcesSpec []*DataSourceDefinition `protobuf:"bytes,7,rep,name=data_sources_spec,json=dataSourcesSpec,proto3" json:"data_sources_spec,omitempty"` + // List of each price source and its corresponding binding + DataSourcesSpecBinding []*SpecBindingForCompositePrice `protobuf:"bytes,8,rep,name=data_sources_spec_binding,json=dataSourcesSpecBinding,proto3" json:"data_sources_spec_binding,omitempty"` +} + +func (x *CompositePriceConfiguration) Reset() { + *x = CompositePriceConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_markets_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompositePriceConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompositePriceConfiguration) ProtoMessage() {} + +func (x *CompositePriceConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_vega_markets_proto_msgTypes[27] + 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 CompositePriceConfiguration.ProtoReflect.Descriptor instead. +func (*CompositePriceConfiguration) Descriptor() ([]byte, []int) { + return file_vega_markets_proto_rawDescGZIP(), []int{27} +} + +func (x *CompositePriceConfiguration) GetDecayWeight() string { + if x != nil { + return x.DecayWeight + } + return "" +} + +func (x *CompositePriceConfiguration) GetDecayPower() uint64 { + if x != nil { + return x.DecayPower + } + return 0 +} + +func (x *CompositePriceConfiguration) GetCashAmount() string { + if x != nil { + return x.CashAmount + } + return "" +} + +func (x *CompositePriceConfiguration) GetSourceWeights() []string { + if x != nil { + return x.SourceWeights + } + return nil +} + +func (x *CompositePriceConfiguration) GetSourceStalenessTolerance() []string { + if x != nil { + return x.SourceStalenessTolerance + } + return nil +} + +func (x *CompositePriceConfiguration) GetCompositePriceType() CompositePriceType { + if x != nil { + return x.CompositePriceType + } + return CompositePriceType_COMPOSITE_PRICE_TYPE_UNSPECIFIED +} + +func (x *CompositePriceConfiguration) GetDataSourcesSpec() []*DataSourceDefinition { + if x != nil { + return x.DataSourcesSpec + } + return nil +} + +func (x *CompositePriceConfiguration) GetDataSourcesSpecBinding() []*SpecBindingForCompositePrice { + if x != nil { + return x.DataSourcesSpecBinding + } + return nil +} + var File_vega_markets_proto protoreflect.FileDescriptor var file_vega_markets_proto_rawDesc = []byte{ @@ -2120,7 +2539,7 @@ var file_vega_markets_proto_rawDesc = []byte{ 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x54, 0x6f, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x15, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, - 0x70, 0x65, 0x63, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0xb9, 0x04, 0x0a, 0x09, 0x50, + 0x70, 0x65, 0x63, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0xe6, 0x07, 0x0a, 0x09, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x73, @@ -2156,121 +2575,153 @@ var file_vega_markets_proto_rawDesc = []byte{ 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x54, 0x6f, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x15, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x9b, 0x01, 0x0a, 0x1d, 0x44, 0x61, 0x74, 0x61, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x54, 0x6f, 0x46, 0x75, 0x74, 0x75, 0x72, - 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x18, 0x73, 0x65, 0x74, 0x74, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x73, 0x65, 0x74, 0x74, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x12, 0x40, 0x0a, 0x1c, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, - 0x67, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x22, 0x9e, 0x01, 0x0a, 0x20, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x54, 0x6f, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x18, 0x73, 0x65, 0x74, - 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x73, 0x65, 0x74, - 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x1c, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x73, 0x65, 0x74, 0x74, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0x28, 0x0a, 0x12, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, - 0x80, 0x02, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x06, - 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x06, 0x66, 0x75, - 0x74, 0x75, 0x72, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x73, 0x70, 0x6f, 0x74, 0x18, 0x65, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x48, 0x00, - 0x52, 0x04, 0x73, 0x70, 0x6f, 0x74, 0x12, 0x2f, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, - 0x75, 0x61, 0x6c, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x09, 0x70, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, - 0x63, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, - 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x36, 0x0a, 0x17, 0x72, 0x69, 0x73, - 0x6b, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x15, 0x72, 0x69, 0x73, 0x6b, - 0x41, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x75, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, - 0x74, 0x61, 0x75, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x6f, 0x67, 0x4e, 0x6f, - 0x72, 0x6d, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x4a, 0x0a, 0x14, 0x4c, 0x6f, 0x67, 0x4e, 0x6f, - 0x72, 0x6d, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x0e, 0x0a, 0x02, 0x6d, 0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x6d, 0x75, 0x12, - 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x69, 0x67, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x73, 0x69, - 0x67, 0x6d, 0x61, 0x22, 0x42, 0x0a, 0x0f, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x69, 0x73, - 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x2f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, - 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x11, 0x53, 0x69, 0x6d, 0x70, - 0x6c, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x0a, - 0x0b, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x0a, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x4c, 0x6f, 0x6e, 0x67, 0x12, 0x21, - 0x0a, 0x0c, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x68, 0x6f, 0x72, - 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x75, 0x70, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4d, 0x6f, 0x76, 0x65, 0x55, - 0x70, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64, 0x6f, - 0x77, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x4d, 0x6f, 0x76, - 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x4f, 0x66, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x89, 0x01, 0x0a, 0x0e, - 0x53, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x72, - 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6c, 0x6c, - 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, - 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x10, 0x4d, 0x61, 0x72, 0x67, 0x69, - 0x6e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x3d, 0x0a, 0x0f, 0x73, - 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x63, 0x61, 0x6c, - 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x0e, 0x73, 0x63, 0x61, 0x6c, - 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x22, 0xad, 0x02, 0x0a, 0x12, 0x54, - 0x72, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x30, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x49, 0x6e, 0x73, - 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x11, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x61, - 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x6c, 0x63, - 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x10, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x43, 0x61, - 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4d, 0x0a, 0x15, 0x6c, 0x6f, 0x67, 0x5f, - 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x5f, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, - 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, - 0x6c, 0x48, 0x00, 0x52, 0x12, 0x6c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x69, - 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x43, 0x0a, 0x11, 0x73, 0x69, 0x6d, 0x70, 0x6c, - 0x65, 0x5f, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x65, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, - 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x69, 0x6d, - 0x70, 0x6c, 0x65, 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x42, 0x0c, 0x0a, 0x0a, - 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x7d, 0x0a, 0x0a, 0x46, 0x65, - 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x6b, 0x65, - 0x72, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6b, - 0x65, 0x72, 0x46, 0x65, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x11, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, - 0x65, 0x46, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x46, 0x65, 0x65, - 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x46, 0x65, 0x65, 0x46, 0x61, 0x63, - 0x74, 0x6f, 0x72, 0x73, 0x52, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x22, 0x81, 0x01, + 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x42, 0x0a, 0x1b, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x66, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x18, 0x66, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x53, 0x63, 0x61, 0x6c, 0x69, 0x6e, + 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x18, 0x66, 0x75, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, + 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x15, + 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x77, 0x65, 0x72, + 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x18, 0x66, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x15, 0x66, 0x75, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x55, 0x70, 0x70, 0x65, 0x72, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x6d, 0x0a, 0x1f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x03, 0x52, 0x1c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x88, 0x01, 0x01, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x66, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x42, + 0x22, 0x0a, 0x20, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x22, 0x9b, 0x01, 0x0a, 0x1d, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x54, 0x6f, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x42, 0x69, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x18, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, + 0x40, 0x0a, 0x1c, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x22, 0x9e, 0x01, 0x0a, 0x20, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x54, 0x6f, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, + 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x18, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x12, 0x40, 0x0a, 0x1c, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x22, 0x28, 0x0a, 0x12, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0x80, 0x02, 0x0a, + 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x49, 0x6e, 0x73, + 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x06, 0x66, 0x75, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x06, 0x66, 0x75, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x20, 0x0a, 0x04, 0x73, 0x70, 0x6f, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x48, 0x00, 0x52, 0x04, 0x73, + 0x70, 0x6f, 0x74, 0x12, 0x2f, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x65, + 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x09, 0x70, 0x65, 0x72, 0x70, 0x65, + 0x74, 0x75, 0x61, 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, + 0x92, 0x01, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x69, 0x73, + 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x36, 0x0a, 0x17, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x61, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x15, 0x72, 0x69, 0x73, 0x6b, 0x41, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x10, + 0x0a, 0x03, 0x74, 0x61, 0x75, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x74, 0x61, 0x75, + 0x12, 0x32, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, + 0x6c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x22, 0x4a, 0x0a, 0x14, 0x4c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, + 0x6c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x0e, 0x0a, 0x02, + 0x6d, 0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x6d, 0x75, 0x12, 0x0c, 0x0a, 0x01, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x69, + 0x67, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x73, 0x69, 0x67, 0x6d, 0x61, + 0x22, 0x42, 0x0a, 0x0f, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x12, 0x2f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, + 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x11, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x0a, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x4c, 0x6f, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x66, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x0b, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x12, 0x1e, + 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x75, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4d, 0x6f, 0x76, 0x65, 0x55, 0x70, 0x12, 0x22, + 0x0a, 0x0d, 0x6d, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x6f, + 0x77, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4f, + 0x66, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x89, 0x01, 0x0a, 0x0e, 0x53, 0x63, 0x61, + 0x6c, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x0b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x25, + 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x4d, + 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x10, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x43, 0x61, + 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x3d, 0x0a, 0x0f, 0x73, 0x63, 0x61, 0x6c, + 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, + 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x0e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, + 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x22, 0xad, 0x02, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x64, + 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x30, + 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x43, 0x0a, 0x11, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x61, 0x6c, 0x63, 0x75, + 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, + 0x74, 0x6f, 0x72, 0x52, 0x10, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x43, 0x61, 0x6c, 0x63, 0x75, + 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4d, 0x0a, 0x15, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x5f, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x64, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x6f, 0x67, 0x4e, + 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x48, 0x00, + 0x52, 0x12, 0x6c, 0x6f, 0x67, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x69, 0x73, 0x6b, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x43, 0x0a, 0x11, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x72, + 0x69, 0x73, 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x69, 0x73, + 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, + 0x52, 0x69, 0x73, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x42, 0x0c, 0x0a, 0x0a, 0x72, 0x69, 0x73, + 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x7d, 0x0a, 0x0a, 0x46, 0x65, 0x65, 0x46, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, + 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, + 0x65, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, + 0x69, 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x46, 0x65, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, + 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x04, 0x46, 0x65, 0x65, 0x73, 0x12, + 0x2a, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x46, 0x65, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x52, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x16, 0x6c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x46, 0x65, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x16, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x68, 0x6f, 0x72, 0x69, 0x7a, @@ -2319,127 +2770,207 @@ var file_vega_markets_proto_rawDesc = []byte{ 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x6c, 0x61, 0x43, 0x6f, 0x6d, 0x70, 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, - 0x22, 0x5f, 0x0a, 0x15, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x69, 0x6d, - 0x65, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, - 0x74, 0x69, 0x6d, 0x65, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x63, - 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x0d, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x22, 0xff, 0x0c, 0x0a, 0x06, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x13, - 0x74, 0x72, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x54, 0x72, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x12, 0x74, 0x72, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x73, - 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x6d, - 0x61, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0d, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1e, - 0x0a, 0x04, 0x66, 0x65, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x46, 0x65, 0x65, 0x73, 0x52, 0x04, 0x66, 0x65, 0x65, 0x73, 0x12, 0x3e, - 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, - 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, - 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, - 0x0a, 0x19, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x52, 0x17, 0x70, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x6b, 0x0a, 0x1f, 0x6c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x1d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3b, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, - 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x69, - 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4d, - 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, - 0x11, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, - 0x52, 0x10, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, - 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x15, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x63, - 0x69, 0x6d, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x70, - 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x70, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x12, 0x34, 0x0a, 0x16, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x5f, 0x73, 0x6c, 0x69, 0x70, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x14, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x53, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, - 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3a, 0x0a, 0x19, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, - 0x74, 0x69, 0x63, 0x5f, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, 0x63, - 0x74, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x71, 0x75, 0x61, 0x64, 0x72, - 0x61, 0x74, 0x69, 0x63, 0x53, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x12, 0x2d, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, - 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, - 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x01, 0x52, 0x15, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x50, - 0x6f, 0x6f, 0x6c, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x33, - 0x0a, 0x13, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x11, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x88, 0x01, 0x01, 0x12, 0x53, 0x0a, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x5f, 0x73, 0x6c, 0x61, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x53, 0x4c, 0x41, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, - 0x03, 0x52, 0x12, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x61, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x88, 0x01, 0x01, 0x22, 0xfc, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, - 0x0e, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, - 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, - 0x4e, 0x47, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, - 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x53, - 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x06, - 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, - 0x10, 0x07, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x44, - 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x45, 0x44, 0x10, 0x08, - 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, - 0x44, 0x10, 0x09, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x53, + 0x22, 0xf8, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, + 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x39, 0x0a, 0x06, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x06, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x0c, 0x66, 0x65, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x66, 0x65, + 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x22, 0x6c, 0x0a, 0x06, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, + 0x0a, 0x14, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x41, + 0x4c, 0x5f, 0x43, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x45, 0x54, 0x48, + 0x4f, 0x44, 0x5f, 0x57, 0x45, 0x49, 0x47, 0x48, 0x54, 0x45, 0x44, 0x5f, 0x41, 0x56, 0x45, 0x52, + 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, + 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x10, 0x03, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x22, 0x5f, 0x0a, 0x15, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x69, 0x6e, + 0x64, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x57, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, + 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x73, + 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xaa, 0x0e, 0x0a, + 0x06, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x64, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, + 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x12, + 0x74, 0x72, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x5f, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x64, 0x65, 0x63, 0x69, + 0x6d, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x04, 0x66, 0x65, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x46, + 0x65, 0x65, 0x73, 0x52, 0x04, 0x66, 0x65, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0f, 0x6f, 0x70, 0x65, + 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x69, + 0x6e, 0x67, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x19, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, + 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x17, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x6b, 0x0a, 0x1f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x79, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4d, 0x6f, + 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x52, 0x1d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x6e, + 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x3b, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, + 0x65, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x28, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x11, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x52, 0x10, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x36, 0x0a, + 0x17, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, + 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x50, + 0x6c, 0x61, 0x63, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, + 0x70, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x6c, + 0x69, 0x6e, 0x65, 0x61, 0x72, 0x5f, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x66, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6c, 0x69, 0x6e, + 0x65, 0x61, 0x72, 0x53, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x12, 0x3a, 0x0a, 0x19, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x73, + 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, 0x74, 0x69, 0x63, 0x53, + 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2d, 0x0a, + 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, + 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, + 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x15, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x46, 0x72, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x11, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x53, + 0x0a, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x6c, 0x61, 0x5f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x4c, 0x41, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, 0x03, 0x52, 0x12, 0x6c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x13, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x13, 0x6c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x12, 0x5b, 0x0a, 0x18, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xfc, + 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x4a, + 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, + 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, + 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, + 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x53, 0x50, 0x45, + 0x4e, 0x44, 0x45, 0x44, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x07, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, + 0x41, 0x54, 0x45, 0x44, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x5f, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x5f, 0x56, 0x49, 0x41, + 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x0a, 0x22, 0xf7, 0x01, + 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, + 0x18, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x54, + 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, + 0x49, 0x4e, 0x55, 0x4f, 0x55, 0x53, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x52, 0x41, 0x44, + 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x42, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x41, + 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x54, 0x52, 0x41, 0x44, + 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x49, 0x4e, 0x47, + 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x23, 0x0a, 0x1f, 0x54, 0x52, + 0x41, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x4f, 0x4e, 0x49, 0x54, + 0x4f, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, + 0x1b, 0x0a, 0x17, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, + 0x4e, 0x4f, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x29, 0x0a, 0x25, + 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x5f, 0x56, 0x49, 0x41, 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, - 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x0a, 0x22, 0xf7, 0x01, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x64, - 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x52, 0x41, 0x44, 0x49, - 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, - 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x55, 0x4f, 0x55, 0x53, - 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, - 0x44, 0x45, 0x5f, 0x42, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, - 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, - 0x44, 0x45, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x23, 0x0a, 0x1f, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x5f, - 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x4f, 0x4e, 0x49, 0x54, 0x4f, 0x52, 0x49, 0x4e, 0x47, 0x5f, - 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x52, 0x41, - 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x5f, 0x54, 0x52, 0x41, - 0x44, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x29, 0x0a, 0x25, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, - 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x44, - 0x5f, 0x56, 0x49, 0x41, 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, - 0x06, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x6e, 0x73, 0x75, 0x72, - 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, - 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x6c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x6c, 0x61, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x22, 0x72, 0x0a, 0x10, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, - 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6f, 0x70, 0x65, - 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x63, 0x6f, 0x64, 0x65, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, - 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x06, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x1a, 0x0a, 0x18, + 0x5f, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, + 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x73, + 0x6c, 0x61, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x72, 0x0a, 0x10, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x22, 0xd2, 0x01, + 0x0a, 0x13, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x10, 0x64, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x53, + 0x74, 0x65, 0x70, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, + 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x64, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x66, 0x75, + 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x32, + 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6d, + 0x61, 0x78, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, + 0x65, 0x64, 0x22, 0xda, 0x03, 0x0a, 0x1b, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x77, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x63, 0x61, 0x79, 0x57, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x63, 0x61, 0x79, 0x5f, 0x70, + 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x65, 0x63, 0x61, + 0x79, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x61, 0x73, 0x68, 0x5f, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, 0x73, + 0x68, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x12, 0x3c, + 0x0a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x65, + 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x18, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x6c, 0x65, 0x6e, + 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x14, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x64, 0x61, 0x74, 0x61, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x5d, 0x0a, 0x19, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x42, + 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x16, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x53, 0x70, 0x65, 0x63, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2a, + 0xa3, 0x01, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x53, + 0x49, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, + 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x45, 0x49, 0x47, 0x48, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, + 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x49, + 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x4e, 0x10, 0x02, + 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x5f, 0x50, 0x52, + 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x41, 0x53, 0x54, 0x5f, 0x54, 0x52, + 0x41, 0x44, 0x45, 0x10, 0x03, 0x42, 0x27, 0x5a, 0x25, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, + 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2454,74 +2985,89 @@ func file_vega_markets_proto_rawDescGZIP() []byte { return file_vega_markets_proto_rawDescData } -var file_vega_markets_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_vega_markets_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_vega_markets_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_vega_markets_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_vega_markets_proto_goTypes = []interface{}{ - (Market_State)(0), // 0: vega.Market.State - (Market_TradingMode)(0), // 1: vega.Market.TradingMode - (*AuctionDuration)(nil), // 2: vega.AuctionDuration - (*Spot)(nil), // 3: vega.Spot - (*Future)(nil), // 4: vega.Future - (*Perpetual)(nil), // 5: vega.Perpetual - (*DataSourceSpecToFutureBinding)(nil), // 6: vega.DataSourceSpecToFutureBinding - (*DataSourceSpecToPerpetualBinding)(nil), // 7: vega.DataSourceSpecToPerpetualBinding - (*InstrumentMetadata)(nil), // 8: vega.InstrumentMetadata - (*Instrument)(nil), // 9: vega.Instrument - (*LogNormalRiskModel)(nil), // 10: vega.LogNormalRiskModel - (*LogNormalModelParams)(nil), // 11: vega.LogNormalModelParams - (*SimpleRiskModel)(nil), // 12: vega.SimpleRiskModel - (*SimpleModelParams)(nil), // 13: vega.SimpleModelParams - (*ScalingFactors)(nil), // 14: vega.ScalingFactors - (*MarginCalculator)(nil), // 15: vega.MarginCalculator - (*TradableInstrument)(nil), // 16: vega.TradableInstrument - (*FeeFactors)(nil), // 17: vega.FeeFactors - (*Fees)(nil), // 18: vega.Fees - (*PriceMonitoringTrigger)(nil), // 19: vega.PriceMonitoringTrigger - (*PriceMonitoringParameters)(nil), // 20: vega.PriceMonitoringParameters - (*PriceMonitoringSettings)(nil), // 21: vega.PriceMonitoringSettings - (*LiquidityMonitoringParameters)(nil), // 22: vega.LiquidityMonitoringParameters - (*LiquiditySLAParameters)(nil), // 23: vega.LiquiditySLAParameters - (*TargetStakeParameters)(nil), // 24: vega.TargetStakeParameters - (*Market)(nil), // 25: vega.Market - (*MarketTimestamps)(nil), // 26: vega.MarketTimestamps - (*DataSourceSpec)(nil), // 27: vega.DataSourceSpec + (CompositePriceType)(0), // 0: vega.CompositePriceType + (LiquidityFeeSettings_Method)(0), // 1: vega.LiquidityFeeSettings.Method + (Market_State)(0), // 2: vega.Market.State + (Market_TradingMode)(0), // 3: vega.Market.TradingMode + (*AuctionDuration)(nil), // 4: vega.AuctionDuration + (*Spot)(nil), // 5: vega.Spot + (*Future)(nil), // 6: vega.Future + (*Perpetual)(nil), // 7: vega.Perpetual + (*DataSourceSpecToFutureBinding)(nil), // 8: vega.DataSourceSpecToFutureBinding + (*DataSourceSpecToPerpetualBinding)(nil), // 9: vega.DataSourceSpecToPerpetualBinding + (*InstrumentMetadata)(nil), // 10: vega.InstrumentMetadata + (*Instrument)(nil), // 11: vega.Instrument + (*LogNormalRiskModel)(nil), // 12: vega.LogNormalRiskModel + (*LogNormalModelParams)(nil), // 13: vega.LogNormalModelParams + (*SimpleRiskModel)(nil), // 14: vega.SimpleRiskModel + (*SimpleModelParams)(nil), // 15: vega.SimpleModelParams + (*ScalingFactors)(nil), // 16: vega.ScalingFactors + (*MarginCalculator)(nil), // 17: vega.MarginCalculator + (*TradableInstrument)(nil), // 18: vega.TradableInstrument + (*FeeFactors)(nil), // 19: vega.FeeFactors + (*Fees)(nil), // 20: vega.Fees + (*PriceMonitoringTrigger)(nil), // 21: vega.PriceMonitoringTrigger + (*PriceMonitoringParameters)(nil), // 22: vega.PriceMonitoringParameters + (*PriceMonitoringSettings)(nil), // 23: vega.PriceMonitoringSettings + (*LiquidityMonitoringParameters)(nil), // 24: vega.LiquidityMonitoringParameters + (*LiquiditySLAParameters)(nil), // 25: vega.LiquiditySLAParameters + (*LiquidityFeeSettings)(nil), // 26: vega.LiquidityFeeSettings + (*TargetStakeParameters)(nil), // 27: vega.TargetStakeParameters + (*Market)(nil), // 28: vega.Market + (*MarketTimestamps)(nil), // 29: vega.MarketTimestamps + (*LiquidationStrategy)(nil), // 30: vega.LiquidationStrategy + (*CompositePriceConfiguration)(nil), // 31: vega.CompositePriceConfiguration + (*DataSourceSpec)(nil), // 32: vega.DataSourceSpec + (*DataSourceDefinition)(nil), // 33: vega.DataSourceDefinition + (*SpecBindingForCompositePrice)(nil), // 34: vega.SpecBindingForCompositePrice } var file_vega_markets_proto_depIdxs = []int32{ - 27, // 0: vega.Future.data_source_spec_for_settlement_data:type_name -> vega.DataSourceSpec - 27, // 1: vega.Future.data_source_spec_for_trading_termination:type_name -> vega.DataSourceSpec - 6, // 2: vega.Future.data_source_spec_binding:type_name -> vega.DataSourceSpecToFutureBinding - 27, // 3: vega.Perpetual.data_source_spec_for_settlement_schedule:type_name -> vega.DataSourceSpec - 27, // 4: vega.Perpetual.data_source_spec_for_settlement_data:type_name -> vega.DataSourceSpec - 7, // 5: vega.Perpetual.data_source_spec_binding:type_name -> vega.DataSourceSpecToPerpetualBinding - 8, // 6: vega.Instrument.metadata:type_name -> vega.InstrumentMetadata - 4, // 7: vega.Instrument.future:type_name -> vega.Future - 3, // 8: vega.Instrument.spot:type_name -> vega.Spot - 5, // 9: vega.Instrument.perpetual:type_name -> vega.Perpetual - 11, // 10: vega.LogNormalRiskModel.params:type_name -> vega.LogNormalModelParams - 13, // 11: vega.SimpleRiskModel.params:type_name -> vega.SimpleModelParams - 14, // 12: vega.MarginCalculator.scaling_factors:type_name -> vega.ScalingFactors - 9, // 13: vega.TradableInstrument.instrument:type_name -> vega.Instrument - 15, // 14: vega.TradableInstrument.margin_calculator:type_name -> vega.MarginCalculator - 10, // 15: vega.TradableInstrument.log_normal_risk_model:type_name -> vega.LogNormalRiskModel - 12, // 16: vega.TradableInstrument.simple_risk_model:type_name -> vega.SimpleRiskModel - 17, // 17: vega.Fees.factors:type_name -> vega.FeeFactors - 19, // 18: vega.PriceMonitoringParameters.triggers:type_name -> vega.PriceMonitoringTrigger - 20, // 19: vega.PriceMonitoringSettings.parameters:type_name -> vega.PriceMonitoringParameters - 24, // 20: vega.LiquidityMonitoringParameters.target_stake_parameters:type_name -> vega.TargetStakeParameters - 16, // 21: vega.Market.tradable_instrument:type_name -> vega.TradableInstrument - 18, // 22: vega.Market.fees:type_name -> vega.Fees - 2, // 23: vega.Market.opening_auction:type_name -> vega.AuctionDuration - 21, // 24: vega.Market.price_monitoring_settings:type_name -> vega.PriceMonitoringSettings - 22, // 25: vega.Market.liquidity_monitoring_parameters:type_name -> vega.LiquidityMonitoringParameters - 1, // 26: vega.Market.trading_mode:type_name -> vega.Market.TradingMode - 0, // 27: vega.Market.state:type_name -> vega.Market.State - 26, // 28: vega.Market.market_timestamps:type_name -> vega.MarketTimestamps - 23, // 29: vega.Market.liquidity_sla_params:type_name -> vega.LiquiditySLAParameters - 30, // [30:30] is the sub-list for method output_type - 30, // [30:30] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 30, // [30:30] is the sub-list for extension extendee - 0, // [0:30] is the sub-list for field type_name + 32, // 0: vega.Future.data_source_spec_for_settlement_data:type_name -> vega.DataSourceSpec + 32, // 1: vega.Future.data_source_spec_for_trading_termination:type_name -> vega.DataSourceSpec + 8, // 2: vega.Future.data_source_spec_binding:type_name -> vega.DataSourceSpecToFutureBinding + 32, // 3: vega.Perpetual.data_source_spec_for_settlement_schedule:type_name -> vega.DataSourceSpec + 32, // 4: vega.Perpetual.data_source_spec_for_settlement_data:type_name -> vega.DataSourceSpec + 9, // 5: vega.Perpetual.data_source_spec_binding:type_name -> vega.DataSourceSpecToPerpetualBinding + 31, // 6: vega.Perpetual.internal_composite_price_config:type_name -> vega.CompositePriceConfiguration + 10, // 7: vega.Instrument.metadata:type_name -> vega.InstrumentMetadata + 6, // 8: vega.Instrument.future:type_name -> vega.Future + 5, // 9: vega.Instrument.spot:type_name -> vega.Spot + 7, // 10: vega.Instrument.perpetual:type_name -> vega.Perpetual + 13, // 11: vega.LogNormalRiskModel.params:type_name -> vega.LogNormalModelParams + 15, // 12: vega.SimpleRiskModel.params:type_name -> vega.SimpleModelParams + 16, // 13: vega.MarginCalculator.scaling_factors:type_name -> vega.ScalingFactors + 11, // 14: vega.TradableInstrument.instrument:type_name -> vega.Instrument + 17, // 15: vega.TradableInstrument.margin_calculator:type_name -> vega.MarginCalculator + 12, // 16: vega.TradableInstrument.log_normal_risk_model:type_name -> vega.LogNormalRiskModel + 14, // 17: vega.TradableInstrument.simple_risk_model:type_name -> vega.SimpleRiskModel + 19, // 18: vega.Fees.factors:type_name -> vega.FeeFactors + 26, // 19: vega.Fees.liquidity_fee_settings:type_name -> vega.LiquidityFeeSettings + 21, // 20: vega.PriceMonitoringParameters.triggers:type_name -> vega.PriceMonitoringTrigger + 22, // 21: vega.PriceMonitoringSettings.parameters:type_name -> vega.PriceMonitoringParameters + 27, // 22: vega.LiquidityMonitoringParameters.target_stake_parameters:type_name -> vega.TargetStakeParameters + 1, // 23: vega.LiquidityFeeSettings.method:type_name -> vega.LiquidityFeeSettings.Method + 18, // 24: vega.Market.tradable_instrument:type_name -> vega.TradableInstrument + 20, // 25: vega.Market.fees:type_name -> vega.Fees + 4, // 26: vega.Market.opening_auction:type_name -> vega.AuctionDuration + 23, // 27: vega.Market.price_monitoring_settings:type_name -> vega.PriceMonitoringSettings + 24, // 28: vega.Market.liquidity_monitoring_parameters:type_name -> vega.LiquidityMonitoringParameters + 3, // 29: vega.Market.trading_mode:type_name -> vega.Market.TradingMode + 2, // 30: vega.Market.state:type_name -> vega.Market.State + 29, // 31: vega.Market.market_timestamps:type_name -> vega.MarketTimestamps + 25, // 32: vega.Market.liquidity_sla_params:type_name -> vega.LiquiditySLAParameters + 30, // 33: vega.Market.liquidation_strategy:type_name -> vega.LiquidationStrategy + 31, // 34: vega.Market.mark_price_configuration:type_name -> vega.CompositePriceConfiguration + 0, // 35: vega.CompositePriceConfiguration.composite_price_type:type_name -> vega.CompositePriceType + 33, // 36: vega.CompositePriceConfiguration.data_sources_spec:type_name -> vega.DataSourceDefinition + 34, // 37: vega.CompositePriceConfiguration.data_sources_spec_binding:type_name -> vega.SpecBindingForCompositePrice + 38, // [38:38] is the sub-list for method output_type + 38, // [38:38] is the sub-list for method input_type + 38, // [38:38] is the sub-list for extension type_name + 38, // [38:38] is the sub-list for extension extendee + 0, // [0:38] is the sub-list for field type_name } func init() { file_vega_markets_proto_init() } @@ -2796,7 +3342,7 @@ func file_vega_markets_proto_init() { } } file_vega_markets_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TargetStakeParameters); i { + switch v := v.(*LiquidityFeeSettings); i { case 0: return &v.state case 1: @@ -2808,7 +3354,7 @@ func file_vega_markets_proto_init() { } } file_vega_markets_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Market); i { + switch v := v.(*TargetStakeParameters); i { case 0: return &v.state case 1: @@ -2820,6 +3366,18 @@ func file_vega_markets_proto_init() { } } file_vega_markets_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Market); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_markets_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MarketTimestamps); i { case 0: return &v.state @@ -2831,7 +3389,32 @@ func file_vega_markets_proto_init() { return nil } } + file_vega_markets_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LiquidationStrategy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_markets_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompositePriceConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } + file_vega_markets_proto_msgTypes[3].OneofWrappers = []interface{}{} file_vega_markets_proto_msgTypes[7].OneofWrappers = []interface{}{ (*Instrument_Future)(nil), (*Instrument_Spot)(nil), @@ -2841,14 +3424,15 @@ func file_vega_markets_proto_init() { (*TradableInstrument_LogNormalRiskModel)(nil), (*TradableInstrument_SimpleRiskModel)(nil), } - file_vega_markets_proto_msgTypes[23].OneofWrappers = []interface{}{} + file_vega_markets_proto_msgTypes[22].OneofWrappers = []interface{}{} + file_vega_markets_proto_msgTypes[24].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vega_markets_proto_rawDesc, - NumEnums: 2, - NumMessages: 25, + NumEnums: 4, + NumMessages: 28, NumExtensions: 0, NumServices: 0, }, diff --git a/protos/vega/snapshot/v1/snapshot.pb.go b/protos/vega/snapshot/v1/snapshot.pb.go index 8b4826d91e..0986cdf7ae 100644 --- a/protos/vega/snapshot/v1/snapshot.pb.go +++ b/protos/vega/snapshot/v1/snapshot.pb.go @@ -471,6 +471,11 @@ type Payload struct { // *Payload_VolumeDiscountProgram // *Payload_LiquidityV2Parameters // *Payload_LiquidityV2PaidFeesStats + // *Payload_Liquidation + // *Payload_BankingTransferFeeDiscounts + // *Payload_GovernanceBatchActive + // *Payload_Parties + // *Payload_L2EthOracles Data isPayload_Data `protobuf_oneof:"data"` } @@ -1017,6 +1022,41 @@ func (x *Payload) GetLiquidityV2PaidFeesStats() *LiquidityV2PaidFeesStats { return nil } +func (x *Payload) GetLiquidation() *Liquidation { + if x, ok := x.GetData().(*Payload_Liquidation); ok { + return x.Liquidation + } + return nil +} + +func (x *Payload) GetBankingTransferFeeDiscounts() *BankingTransferFeeDiscounts { + if x, ok := x.GetData().(*Payload_BankingTransferFeeDiscounts); ok { + return x.BankingTransferFeeDiscounts + } + return nil +} + +func (x *Payload) GetGovernanceBatchActive() *GovernanceBatchActive { + if x, ok := x.GetData().(*Payload_GovernanceBatchActive); ok { + return x.GovernanceBatchActive + } + return nil +} + +func (x *Payload) GetParties() *Parties { + if x, ok := x.GetData().(*Payload_Parties); ok { + return x.Parties + } + return nil +} + +func (x *Payload) GetL2EthOracles() *L2EthOracles { + if x, ok := x.GetData().(*Payload_L2EthOracles); ok { + return x.L2EthOracles + } + return nil +} + type isPayload_Data interface { isPayload_Data() } @@ -1309,6 +1349,26 @@ type Payload_LiquidityV2PaidFeesStats struct { LiquidityV2PaidFeesStats *LiquidityV2PaidFeesStats `protobuf:"bytes,79,opt,name=liquidity_v2_paid_fees_stats,json=liquidityV2PaidFeesStats,proto3,oneof"` } +type Payload_Liquidation struct { + Liquidation *Liquidation `protobuf:"bytes,80,opt,name=liquidation,proto3,oneof"` +} + +type Payload_BankingTransferFeeDiscounts struct { + BankingTransferFeeDiscounts *BankingTransferFeeDiscounts `protobuf:"bytes,81,opt,name=banking_transfer_fee_discounts,json=bankingTransferFeeDiscounts,proto3,oneof"` +} + +type Payload_GovernanceBatchActive struct { + GovernanceBatchActive *GovernanceBatchActive `protobuf:"bytes,82,opt,name=governance_batch_active,json=governanceBatchActive,proto3,oneof"` +} + +type Payload_Parties struct { + Parties *Parties `protobuf:"bytes,83,opt,name=parties,proto3,oneof"` +} + +type Payload_L2EthOracles struct { + L2EthOracles *L2EthOracles `protobuf:"bytes,84,opt,name=l2_eth_oracles,json=l2EthOracles,proto3,oneof"` +} + func (*Payload_ActiveAssets) isPayload_Data() {} func (*Payload_PendingAssets) isPayload_Data() {} @@ -1453,6 +1513,16 @@ func (*Payload_LiquidityV2Parameters) isPayload_Data() {} func (*Payload_LiquidityV2PaidFeesStats) isPayload_Data() {} +func (*Payload_Liquidation) isPayload_Data() {} + +func (*Payload_BankingTransferFeeDiscounts) isPayload_Data() {} + +func (*Payload_GovernanceBatchActive) isPayload_Data() {} + +func (*Payload_Parties) isPayload_Data() {} + +func (*Payload_L2EthOracles) isPayload_Data() {} + type OrderHoldingQuantities struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2264,18 +2334,75 @@ func (x *Resource) GetState() uint32 { return 0 } +type EventForwarderBucket struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ts int64 `protobuf:"varint,1,opt,name=ts,proto3" json:"ts,omitempty"` + Hashes []string `protobuf:"bytes,2,rep,name=hashes,proto3" json:"hashes,omitempty"` +} + +func (x *EventForwarderBucket) Reset() { + *x = EventForwarderBucket{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventForwarderBucket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventForwarderBucket) ProtoMessage() {} + +func (x *EventForwarderBucket) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_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 EventForwarderBucket.ProtoReflect.Descriptor instead. +func (*EventForwarderBucket) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{18} +} + +func (x *EventForwarderBucket) GetTs() int64 { + if x != nil { + return x.Ts + } + return 0 +} + +func (x *EventForwarderBucket) GetHashes() []string { + if x != nil { + return x.Hashes + } + return nil +} + type EventForwarder struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AckedEvents []string `protobuf:"bytes,1,rep,name=acked_events,json=ackedEvents,proto3" json:"acked_events,omitempty"` + // this is deprecated, use the other one now + AckedEvents []string `protobuf:"bytes,1,rep,name=acked_events,json=ackedEvents,proto3" json:"acked_events,omitempty"` + Buckets []*EventForwarderBucket `protobuf:"bytes,2,rep,name=buckets,proto3" json:"buckets,omitempty"` } func (x *EventForwarder) Reset() { *x = EventForwarder{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[18] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2288,7 +2415,7 @@ func (x *EventForwarder) String() string { func (*EventForwarder) ProtoMessage() {} func (x *EventForwarder) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[18] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2301,7 +2428,7 @@ func (x *EventForwarder) ProtoReflect() protoreflect.Message { // Deprecated: Use EventForwarder.ProtoReflect.Descriptor instead. func (*EventForwarder) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{18} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{19} } func (x *EventForwarder) GetAckedEvents() []string { @@ -2311,6 +2438,13 @@ func (x *EventForwarder) GetAckedEvents() []string { return nil } +func (x *EventForwarder) GetBuckets() []*EventForwarderBucket { + if x != nil { + return x.Buckets + } + return nil +} + type CollateralAccounts struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2323,7 +2457,7 @@ type CollateralAccounts struct { func (x *CollateralAccounts) Reset() { *x = CollateralAccounts{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[19] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2336,7 +2470,7 @@ func (x *CollateralAccounts) String() string { func (*CollateralAccounts) ProtoMessage() {} func (x *CollateralAccounts) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[19] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2349,7 +2483,7 @@ func (x *CollateralAccounts) ProtoReflect() protoreflect.Message { // Deprecated: Use CollateralAccounts.ProtoReflect.Descriptor instead. func (*CollateralAccounts) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{19} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{20} } func (x *CollateralAccounts) GetAccounts() []*vega.Account { @@ -2377,7 +2511,7 @@ type CollateralAssets struct { func (x *CollateralAssets) Reset() { *x = CollateralAssets{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[20] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2390,7 +2524,7 @@ func (x *CollateralAssets) String() string { func (*CollateralAssets) ProtoMessage() {} func (x *CollateralAssets) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[20] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2403,7 +2537,7 @@ func (x *CollateralAssets) ProtoReflect() protoreflect.Message { // Deprecated: Use CollateralAssets.ProtoReflect.Descriptor instead. func (*CollateralAssets) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{20} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{21} } func (x *CollateralAssets) GetAssets() []*vega.Asset { @@ -2424,7 +2558,7 @@ type ActiveAssets struct { func (x *ActiveAssets) Reset() { *x = ActiveAssets{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[21] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2437,7 +2571,7 @@ func (x *ActiveAssets) String() string { func (*ActiveAssets) ProtoMessage() {} func (x *ActiveAssets) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[21] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2450,7 +2584,7 @@ func (x *ActiveAssets) ProtoReflect() protoreflect.Message { // Deprecated: Use ActiveAssets.ProtoReflect.Descriptor instead. func (*ActiveAssets) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{21} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{22} } func (x *ActiveAssets) GetAssets() []*vega.Asset { @@ -2471,7 +2605,7 @@ type PendingAssets struct { func (x *PendingAssets) Reset() { *x = PendingAssets{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[22] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2484,7 +2618,7 @@ func (x *PendingAssets) String() string { func (*PendingAssets) ProtoMessage() {} func (x *PendingAssets) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[22] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2497,7 +2631,7 @@ func (x *PendingAssets) ProtoReflect() protoreflect.Message { // Deprecated: Use PendingAssets.ProtoReflect.Descriptor instead. func (*PendingAssets) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{22} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{23} } func (x *PendingAssets) GetAssets() []*vega.Asset { @@ -2518,7 +2652,7 @@ type PendingAssetUpdates struct { func (x *PendingAssetUpdates) Reset() { *x = PendingAssetUpdates{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[23] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2531,7 +2665,7 @@ func (x *PendingAssetUpdates) String() string { func (*PendingAssetUpdates) ProtoMessage() {} func (x *PendingAssetUpdates) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[23] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2544,7 +2678,7 @@ func (x *PendingAssetUpdates) ProtoReflect() protoreflect.Message { // Deprecated: Use PendingAssetUpdates.ProtoReflect.Descriptor instead. func (*PendingAssetUpdates) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{23} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{24} } func (x *PendingAssetUpdates) GetAssets() []*vega.Asset { @@ -2566,7 +2700,7 @@ type Withdrawal struct { func (x *Withdrawal) Reset() { *x = Withdrawal{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[24] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2579,7 +2713,7 @@ func (x *Withdrawal) String() string { func (*Withdrawal) ProtoMessage() {} func (x *Withdrawal) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[24] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2592,7 +2726,7 @@ func (x *Withdrawal) ProtoReflect() protoreflect.Message { // Deprecated: Use Withdrawal.ProtoReflect.Descriptor instead. func (*Withdrawal) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{24} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{25} } func (x *Withdrawal) GetRef() string { @@ -2621,7 +2755,7 @@ type Deposit struct { func (x *Deposit) Reset() { *x = Deposit{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[25] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2634,7 +2768,7 @@ func (x *Deposit) String() string { func (*Deposit) ProtoMessage() {} func (x *Deposit) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[25] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2647,7 +2781,7 @@ func (x *Deposit) ProtoReflect() protoreflect.Message { // Deprecated: Use Deposit.ProtoReflect.Descriptor instead. func (*Deposit) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{25} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{26} } func (x *Deposit) GetId() string { @@ -2678,7 +2812,7 @@ type TxRef struct { func (x *TxRef) Reset() { *x = TxRef{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[26] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2691,7 +2825,7 @@ func (x *TxRef) String() string { func (*TxRef) ProtoMessage() {} func (x *TxRef) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[26] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2704,7 +2838,7 @@ func (x *TxRef) ProtoReflect() protoreflect.Message { // Deprecated: Use TxRef.ProtoReflect.Descriptor instead. func (*TxRef) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{26} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{27} } func (x *TxRef) GetAsset() string { @@ -2746,7 +2880,7 @@ type BankingWithdrawals struct { func (x *BankingWithdrawals) Reset() { *x = BankingWithdrawals{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[27] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2759,7 +2893,7 @@ func (x *BankingWithdrawals) String() string { func (*BankingWithdrawals) ProtoMessage() {} func (x *BankingWithdrawals) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[27] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2772,7 +2906,7 @@ func (x *BankingWithdrawals) ProtoReflect() protoreflect.Message { // Deprecated: Use BankingWithdrawals.ProtoReflect.Descriptor instead. func (*BankingWithdrawals) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{27} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{28} } func (x *BankingWithdrawals) GetWithdrawals() []*Withdrawal { @@ -2793,7 +2927,7 @@ type BankingDeposits struct { func (x *BankingDeposits) Reset() { *x = BankingDeposits{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[28] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2806,7 +2940,7 @@ func (x *BankingDeposits) String() string { func (*BankingDeposits) ProtoMessage() {} func (x *BankingDeposits) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[28] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2819,7 +2953,7 @@ func (x *BankingDeposits) ProtoReflect() protoreflect.Message { // Deprecated: Use BankingDeposits.ProtoReflect.Descriptor instead. func (*BankingDeposits) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{28} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{29} } func (x *BankingDeposits) GetDeposit() []*Deposit { @@ -2841,7 +2975,7 @@ type BankingSeen struct { func (x *BankingSeen) Reset() { *x = BankingSeen{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[29] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2854,7 +2988,7 @@ func (x *BankingSeen) String() string { func (*BankingSeen) ProtoMessage() {} func (x *BankingSeen) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[29] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2867,7 +3001,7 @@ func (x *BankingSeen) ProtoReflect() protoreflect.Message { // Deprecated: Use BankingSeen.ProtoReflect.Descriptor instead. func (*BankingSeen) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{29} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{30} } func (x *BankingSeen) GetRefs() []string { @@ -2895,7 +3029,7 @@ type BankingAssetActions struct { func (x *BankingAssetActions) Reset() { *x = BankingAssetActions{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[30] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2908,7 +3042,7 @@ func (x *BankingAssetActions) String() string { func (*BankingAssetActions) ProtoMessage() {} func (x *BankingAssetActions) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[30] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2921,7 +3055,7 @@ func (x *BankingAssetActions) ProtoReflect() protoreflect.Message { // Deprecated: Use BankingAssetActions.ProtoReflect.Descriptor instead. func (*BankingAssetActions) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{30} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{31} } func (x *BankingAssetActions) GetAssetAction() []*v11.AssetAction { @@ -2942,7 +3076,7 @@ type BankingRecurringTransfers struct { func (x *BankingRecurringTransfers) Reset() { *x = BankingRecurringTransfers{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[31] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2955,7 +3089,7 @@ func (x *BankingRecurringTransfers) String() string { func (*BankingRecurringTransfers) ProtoMessage() {} func (x *BankingRecurringTransfers) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[31] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2968,7 +3102,7 @@ func (x *BankingRecurringTransfers) ProtoReflect() protoreflect.Message { // Deprecated: Use BankingRecurringTransfers.ProtoReflect.Descriptor instead. func (*BankingRecurringTransfers) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{31} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{32} } func (x *BankingRecurringTransfers) GetRecurringTransfers() *v11.RecurringTransfers { @@ -2989,7 +3123,7 @@ type BankingScheduledTransfers struct { func (x *BankingScheduledTransfers) Reset() { *x = BankingScheduledTransfers{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[32] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3002,7 +3136,7 @@ func (x *BankingScheduledTransfers) String() string { func (*BankingScheduledTransfers) ProtoMessage() {} func (x *BankingScheduledTransfers) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[32] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3015,7 +3149,7 @@ func (x *BankingScheduledTransfers) ProtoReflect() protoreflect.Message { // Deprecated: Use BankingScheduledTransfers.ProtoReflect.Descriptor instead. func (*BankingScheduledTransfers) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{32} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{33} } func (x *BankingScheduledTransfers) GetTransfersAtTime() []*v11.ScheduledTransferAtTime { @@ -3036,7 +3170,7 @@ type BankingRecurringGovernanceTransfers struct { func (x *BankingRecurringGovernanceTransfers) Reset() { *x = BankingRecurringGovernanceTransfers{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[33] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3049,7 +3183,7 @@ func (x *BankingRecurringGovernanceTransfers) String() string { func (*BankingRecurringGovernanceTransfers) ProtoMessage() {} func (x *BankingRecurringGovernanceTransfers) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[33] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3062,7 +3196,7 @@ func (x *BankingRecurringGovernanceTransfers) ProtoReflect() protoreflect.Messag // Deprecated: Use BankingRecurringGovernanceTransfers.ProtoReflect.Descriptor instead. func (*BankingRecurringGovernanceTransfers) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{33} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{34} } func (x *BankingRecurringGovernanceTransfers) GetRecurringTransfers() []*v11.GovernanceTransfer { @@ -3083,7 +3217,7 @@ type BankingScheduledGovernanceTransfers struct { func (x *BankingScheduledGovernanceTransfers) Reset() { *x = BankingScheduledGovernanceTransfers{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[34] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3096,7 +3230,7 @@ func (x *BankingScheduledGovernanceTransfers) String() string { func (*BankingScheduledGovernanceTransfers) ProtoMessage() {} func (x *BankingScheduledGovernanceTransfers) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[34] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3109,7 +3243,7 @@ func (x *BankingScheduledGovernanceTransfers) ProtoReflect() protoreflect.Messag // Deprecated: Use BankingScheduledGovernanceTransfers.ProtoReflect.Descriptor instead. func (*BankingScheduledGovernanceTransfers) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{34} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{35} } func (x *BankingScheduledGovernanceTransfers) GetTransfersAtTime() []*v11.ScheduledGovernanceTransferAtTime { @@ -3130,7 +3264,7 @@ type BankingBridgeState struct { func (x *BankingBridgeState) Reset() { *x = BankingBridgeState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[35] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3143,7 +3277,7 @@ func (x *BankingBridgeState) String() string { func (*BankingBridgeState) ProtoMessage() {} func (x *BankingBridgeState) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[35] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3156,7 +3290,7 @@ func (x *BankingBridgeState) ProtoReflect() protoreflect.Message { // Deprecated: Use BankingBridgeState.ProtoReflect.Descriptor instead. func (*BankingBridgeState) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{35} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{36} } func (x *BankingBridgeState) GetBridgeState() *v11.BridgeState { @@ -3177,7 +3311,7 @@ type Checkpoint struct { func (x *Checkpoint) Reset() { *x = Checkpoint{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[36] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3190,7 +3324,7 @@ func (x *Checkpoint) String() string { func (*Checkpoint) ProtoMessage() {} func (x *Checkpoint) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[36] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3203,7 +3337,7 @@ func (x *Checkpoint) ProtoReflect() protoreflect.Message { // Deprecated: Use Checkpoint.ProtoReflect.Descriptor instead. func (*Checkpoint) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{36} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{37} } func (x *Checkpoint) GetNextCp() int64 { @@ -3224,7 +3358,7 @@ type DelegationLastReconciliationTime struct { func (x *DelegationLastReconciliationTime) Reset() { *x = DelegationLastReconciliationTime{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[37] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3237,7 +3371,7 @@ func (x *DelegationLastReconciliationTime) String() string { func (*DelegationLastReconciliationTime) ProtoMessage() {} func (x *DelegationLastReconciliationTime) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[37] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3250,7 +3384,7 @@ func (x *DelegationLastReconciliationTime) ProtoReflect() protoreflect.Message { // Deprecated: Use DelegationLastReconciliationTime.ProtoReflect.Descriptor instead. func (*DelegationLastReconciliationTime) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{37} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{38} } func (x *DelegationLastReconciliationTime) GetLastReconciliationTime() int64 { @@ -3271,7 +3405,7 @@ type DelegationActive struct { func (x *DelegationActive) Reset() { *x = DelegationActive{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[38] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3284,7 +3418,7 @@ func (x *DelegationActive) String() string { func (*DelegationActive) ProtoMessage() {} func (x *DelegationActive) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[38] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3297,7 +3431,7 @@ func (x *DelegationActive) ProtoReflect() protoreflect.Message { // Deprecated: Use DelegationActive.ProtoReflect.Descriptor instead. func (*DelegationActive) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{38} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{39} } func (x *DelegationActive) GetDelegations() []*vega.Delegation { @@ -3319,7 +3453,7 @@ type DelegationPending struct { func (x *DelegationPending) Reset() { *x = DelegationPending{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[39] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3332,7 +3466,7 @@ func (x *DelegationPending) String() string { func (*DelegationPending) ProtoMessage() {} func (x *DelegationPending) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[39] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3345,7 +3479,7 @@ func (x *DelegationPending) ProtoReflect() protoreflect.Message { // Deprecated: Use DelegationPending.ProtoReflect.Descriptor instead. func (*DelegationPending) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{39} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{40} } func (x *DelegationPending) GetDelegations() []*vega.Delegation { @@ -3373,7 +3507,7 @@ type DelegationAuto struct { func (x *DelegationAuto) Reset() { *x = DelegationAuto{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[40] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3386,7 +3520,7 @@ func (x *DelegationAuto) String() string { func (*DelegationAuto) ProtoMessage() {} func (x *DelegationAuto) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[40] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3399,7 +3533,7 @@ func (x *DelegationAuto) ProtoReflect() protoreflect.Message { // Deprecated: Use DelegationAuto.ProtoReflect.Descriptor instead. func (*DelegationAuto) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{40} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{41} } func (x *DelegationAuto) GetParties() []string { @@ -3423,7 +3557,7 @@ type ProposalData struct { func (x *ProposalData) Reset() { *x = ProposalData{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[41] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3436,7 +3570,7 @@ func (x *ProposalData) String() string { func (*ProposalData) ProtoMessage() {} func (x *ProposalData) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[41] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3449,7 +3583,7 @@ func (x *ProposalData) ProtoReflect() protoreflect.Message { // Deprecated: Use ProposalData.ProtoReflect.Descriptor instead. func (*ProposalData) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{41} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{42} } func (x *ProposalData) GetProposal() *vega.Proposal { @@ -3491,7 +3625,7 @@ type GovernanceEnacted struct { func (x *GovernanceEnacted) Reset() { *x = GovernanceEnacted{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[42] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3504,7 +3638,7 @@ func (x *GovernanceEnacted) String() string { func (*GovernanceEnacted) ProtoMessage() {} func (x *GovernanceEnacted) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[42] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3517,7 +3651,7 @@ func (x *GovernanceEnacted) ProtoReflect() protoreflect.Message { // Deprecated: Use GovernanceEnacted.ProtoReflect.Descriptor instead. func (*GovernanceEnacted) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{42} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{43} } func (x *GovernanceEnacted) GetProposals() []*ProposalData { @@ -3538,7 +3672,7 @@ type GovernanceActive struct { func (x *GovernanceActive) Reset() { *x = GovernanceActive{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[43] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3551,7 +3685,7 @@ func (x *GovernanceActive) String() string { func (*GovernanceActive) ProtoMessage() {} func (x *GovernanceActive) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[43] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3564,7 +3698,7 @@ func (x *GovernanceActive) ProtoReflect() protoreflect.Message { // Deprecated: Use GovernanceActive.ProtoReflect.Descriptor instead. func (*GovernanceActive) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{43} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{44} } func (x *GovernanceActive) GetProposals() []*ProposalData { @@ -3574,31 +3708,32 @@ func (x *GovernanceActive) GetProposals() []*ProposalData { return nil } -type GovernanceNode struct { +type BatchProposalData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Proposals []*vega.Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals,omitempty"` + BatchProposal *ProposalData `protobuf:"bytes,1,opt,name=batch_proposal,json=batchProposal,proto3" json:"batch_proposal,omitempty"` + Proposals []*vega.Proposal `protobuf:"bytes,2,rep,name=proposals,proto3" json:"proposals,omitempty"` } -func (x *GovernanceNode) Reset() { - *x = GovernanceNode{} +func (x *BatchProposalData) Reset() { + *x = BatchProposalData{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[44] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GovernanceNode) String() string { +func (x *BatchProposalData) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GovernanceNode) ProtoMessage() {} +func (*BatchProposalData) ProtoMessage() {} -func (x *GovernanceNode) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[44] +func (x *BatchProposalData) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3609,20 +3744,129 @@ func (x *GovernanceNode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GovernanceNode.ProtoReflect.Descriptor instead. -func (*GovernanceNode) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{44} +// Deprecated: Use BatchProposalData.ProtoReflect.Descriptor instead. +func (*BatchProposalData) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{45} } -func (x *GovernanceNode) GetProposals() []*vega.Proposal { +func (x *BatchProposalData) GetBatchProposal() *ProposalData { if x != nil { - return x.Proposals + return x.BatchProposal } return nil } -type StakingAccount struct { - state protoimpl.MessageState +func (x *BatchProposalData) GetProposals() []*vega.Proposal { + if x != nil { + return x.Proposals + } + return nil +} + +type GovernanceBatchActive struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BatchProposals []*BatchProposalData `protobuf:"bytes,1,rep,name=batch_proposals,json=batchProposals,proto3" json:"batch_proposals,omitempty"` +} + +func (x *GovernanceBatchActive) Reset() { + *x = GovernanceBatchActive{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GovernanceBatchActive) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GovernanceBatchActive) ProtoMessage() {} + +func (x *GovernanceBatchActive) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[46] + 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 GovernanceBatchActive.ProtoReflect.Descriptor instead. +func (*GovernanceBatchActive) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{46} +} + +func (x *GovernanceBatchActive) GetBatchProposals() []*BatchProposalData { + if x != nil { + return x.BatchProposals + } + return nil +} + +type GovernanceNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Proposals []*vega.Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals,omitempty"` + ProposalData []*ProposalData `protobuf:"bytes,2,rep,name=proposal_data,json=proposalData,proto3" json:"proposal_data,omitempty"` // includes votes +} + +func (x *GovernanceNode) Reset() { + *x = GovernanceNode{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GovernanceNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GovernanceNode) ProtoMessage() {} + +func (x *GovernanceNode) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[47] + 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 GovernanceNode.ProtoReflect.Descriptor instead. +func (*GovernanceNode) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{47} +} + +func (x *GovernanceNode) GetProposals() []*vega.Proposal { + if x != nil { + return x.Proposals + } + return nil +} + +func (x *GovernanceNode) GetProposalData() []*ProposalData { + if x != nil { + return x.ProposalData + } + return nil +} + +type StakingAccount struct { + state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -3634,7 +3878,7 @@ type StakingAccount struct { func (x *StakingAccount) Reset() { *x = StakingAccount{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[45] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3647,7 +3891,7 @@ func (x *StakingAccount) String() string { func (*StakingAccount) ProtoMessage() {} func (x *StakingAccount) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[45] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3660,7 +3904,7 @@ func (x *StakingAccount) ProtoReflect() protoreflect.Message { // Deprecated: Use StakingAccount.ProtoReflect.Descriptor instead. func (*StakingAccount) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{45} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{48} } func (x *StakingAccount) GetParty() string { @@ -3697,7 +3941,7 @@ type StakingAccounts struct { func (x *StakingAccounts) Reset() { *x = StakingAccounts{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[46] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3710,7 +3954,7 @@ func (x *StakingAccounts) String() string { func (*StakingAccounts) ProtoMessage() {} func (x *StakingAccounts) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[46] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3723,7 +3967,7 @@ func (x *StakingAccounts) ProtoReflect() protoreflect.Message { // Deprecated: Use StakingAccounts.ProtoReflect.Descriptor instead. func (*StakingAccounts) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{46} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{49} } func (x *StakingAccounts) GetAccounts() []*StakingAccount { @@ -3764,7 +4008,7 @@ type MatchingBook struct { func (x *MatchingBook) Reset() { *x = MatchingBook{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[47] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3777,7 +4021,7 @@ func (x *MatchingBook) String() string { func (*MatchingBook) ProtoMessage() {} func (x *MatchingBook) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[47] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3790,7 +4034,7 @@ func (x *MatchingBook) ProtoReflect() protoreflect.Message { // Deprecated: Use MatchingBook.ProtoReflect.Descriptor instead. func (*MatchingBook) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{47} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{50} } func (x *MatchingBook) GetMarketId() string { @@ -3853,7 +4097,7 @@ type NetParams struct { func (x *NetParams) Reset() { *x = NetParams{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[48] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3866,7 +4110,7 @@ func (x *NetParams) String() string { func (*NetParams) ProtoMessage() {} func (x *NetParams) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[48] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3879,7 +4123,7 @@ func (x *NetParams) ProtoReflect() protoreflect.Message { // Deprecated: Use NetParams.ProtoReflect.Descriptor instead. func (*NetParams) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{48} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{51} } func (x *NetParams) GetParams() []*vega.NetworkParameter { @@ -3901,7 +4145,7 @@ type DecimalMap struct { func (x *DecimalMap) Reset() { *x = DecimalMap{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[49] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3914,7 +4158,7 @@ func (x *DecimalMap) String() string { func (*DecimalMap) ProtoMessage() {} func (x *DecimalMap) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[49] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3927,7 +4171,7 @@ func (x *DecimalMap) ProtoReflect() protoreflect.Message { // Deprecated: Use DecimalMap.ProtoReflect.Descriptor instead. func (*DecimalMap) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{49} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{52} } func (x *DecimalMap) GetKey() int64 { @@ -3956,7 +4200,7 @@ type TimePrice struct { func (x *TimePrice) Reset() { *x = TimePrice{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[50] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3969,7 +4213,7 @@ func (x *TimePrice) String() string { func (*TimePrice) ProtoMessage() {} func (x *TimePrice) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[50] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3982,7 +4226,7 @@ func (x *TimePrice) ProtoReflect() protoreflect.Message { // Deprecated: Use TimePrice.ProtoReflect.Descriptor instead. func (*TimePrice) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{50} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{53} } func (x *TimePrice) GetTime() int64 { @@ -4011,7 +4255,7 @@ type PriceVolume struct { func (x *PriceVolume) Reset() { *x = PriceVolume{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[51] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4024,7 +4268,7 @@ func (x *PriceVolume) String() string { func (*PriceVolume) ProtoMessage() {} func (x *PriceVolume) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[51] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4037,7 +4281,7 @@ func (x *PriceVolume) ProtoReflect() protoreflect.Message { // Deprecated: Use PriceVolume.ProtoReflect.Descriptor instead. func (*PriceVolume) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{51} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{54} } func (x *PriceVolume) GetPrice() string { @@ -4067,7 +4311,7 @@ type PriceRange struct { func (x *PriceRange) Reset() { *x = PriceRange{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[52] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4080,7 +4324,7 @@ func (x *PriceRange) String() string { func (*PriceRange) ProtoMessage() {} func (x *PriceRange) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[52] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4093,7 +4337,7 @@ func (x *PriceRange) ProtoReflect() protoreflect.Message { // Deprecated: Use PriceRange.ProtoReflect.Descriptor instead. func (*PriceRange) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{52} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{55} } func (x *PriceRange) GetMin() string { @@ -4131,7 +4375,7 @@ type PriceBound struct { func (x *PriceBound) Reset() { *x = PriceBound{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[53] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4144,7 +4388,7 @@ func (x *PriceBound) String() string { func (*PriceBound) ProtoMessage() {} func (x *PriceBound) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[53] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4157,7 +4401,7 @@ func (x *PriceBound) ProtoReflect() protoreflect.Message { // Deprecated: Use PriceBound.ProtoReflect.Descriptor instead. func (*PriceBound) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{53} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{56} } func (x *PriceBound) GetActive() bool { @@ -4200,7 +4444,7 @@ type PriceRangeCache struct { func (x *PriceRangeCache) Reset() { *x = PriceRangeCache{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[54] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4213,7 +4457,7 @@ func (x *PriceRangeCache) String() string { func (*PriceRangeCache) ProtoMessage() {} func (x *PriceRangeCache) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[54] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4226,7 +4470,7 @@ func (x *PriceRangeCache) ProtoReflect() protoreflect.Message { // Deprecated: Use PriceRangeCache.ProtoReflect.Descriptor instead. func (*PriceRangeCache) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{54} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{57} } func (x *PriceRangeCache) GetBound() *PriceBound { @@ -4255,7 +4499,7 @@ type CurrentPrice struct { func (x *CurrentPrice) Reset() { *x = CurrentPrice{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[55] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4268,7 +4512,7 @@ func (x *CurrentPrice) String() string { func (*CurrentPrice) ProtoMessage() {} func (x *CurrentPrice) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[55] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4281,7 +4525,7 @@ func (x *CurrentPrice) ProtoReflect() protoreflect.Message { // Deprecated: Use CurrentPrice.ProtoReflect.Descriptor instead. func (*CurrentPrice) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{55} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{58} } func (x *CurrentPrice) GetPrice() string { @@ -4310,7 +4554,7 @@ type PastPrice struct { func (x *PastPrice) Reset() { *x = PastPrice{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[56] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4323,7 +4567,7 @@ func (x *PastPrice) String() string { func (*PastPrice) ProtoMessage() {} func (x *PastPrice) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[56] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4336,7 +4580,7 @@ func (x *PastPrice) ProtoReflect() protoreflect.Message { // Deprecated: Use PastPrice.ProtoReflect.Descriptor instead. func (*PastPrice) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{56} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{59} } func (x *PastPrice) GetTime() int64 { @@ -4375,7 +4619,7 @@ type PriceMonitor struct { func (x *PriceMonitor) Reset() { *x = PriceMonitor{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[57] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4388,7 +4632,7 @@ func (x *PriceMonitor) String() string { func (*PriceMonitor) ProtoMessage() {} func (x *PriceMonitor) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[57] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[60] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4401,7 +4645,7 @@ func (x *PriceMonitor) ProtoReflect() protoreflect.Message { // Deprecated: Use PriceMonitor.ProtoReflect.Descriptor instead. func (*PriceMonitor) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{57} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{60} } func (x *PriceMonitor) GetInitialised() bool { @@ -4507,7 +4751,7 @@ type AuctionState struct { func (x *AuctionState) Reset() { *x = AuctionState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[58] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4520,7 +4764,7 @@ func (x *AuctionState) String() string { func (*AuctionState) ProtoMessage() {} func (x *AuctionState) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[58] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[61] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4533,7 +4777,7 @@ func (x *AuctionState) ProtoReflect() protoreflect.Message { // Deprecated: Use AuctionState.ProtoReflect.Descriptor instead. func (*AuctionState) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{58} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{61} } func (x *AuctionState) GetMode() vega.Market_TradingMode { @@ -4614,7 +4858,7 @@ type EquityShareLP struct { func (x *EquityShareLP) Reset() { *x = EquityShareLP{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[59] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4627,7 +4871,7 @@ func (x *EquityShareLP) String() string { func (*EquityShareLP) ProtoMessage() {} func (x *EquityShareLP) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[59] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4640,7 +4884,7 @@ func (x *EquityShareLP) ProtoReflect() protoreflect.Message { // Deprecated: Use EquityShareLP.ProtoReflect.Descriptor instead. func (*EquityShareLP) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{59} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{62} } func (x *EquityShareLP) GetId() string { @@ -4693,7 +4937,7 @@ type EquityShare struct { func (x *EquityShare) Reset() { *x = EquityShare{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[60] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4706,7 +4950,7 @@ func (x *EquityShare) String() string { func (*EquityShare) ProtoMessage() {} func (x *EquityShare) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[60] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[63] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4719,7 +4963,7 @@ func (x *EquityShare) ProtoReflect() protoreflect.Message { // Deprecated: Use EquityShare.ProtoReflect.Descriptor instead. func (*EquityShare) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{60} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{63} } func (x *EquityShare) GetMvp() string { @@ -4771,7 +5015,7 @@ type FeeSplitter struct { func (x *FeeSplitter) Reset() { *x = FeeSplitter{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[61] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4784,7 +5028,7 @@ func (x *FeeSplitter) String() string { func (*FeeSplitter) ProtoMessage() {} func (x *FeeSplitter) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[61] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[64] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4797,7 +5041,7 @@ func (x *FeeSplitter) ProtoReflect() protoreflect.Message { // Deprecated: Use FeeSplitter.ProtoReflect.Descriptor instead. func (*FeeSplitter) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{61} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{64} } func (x *FeeSplitter) GetTimeWindowStart() int64 { @@ -4859,7 +5103,7 @@ type SpotMarket struct { func (x *SpotMarket) Reset() { *x = SpotMarket{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[62] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4872,7 +5116,7 @@ func (x *SpotMarket) String() string { func (*SpotMarket) ProtoMessage() {} func (x *SpotMarket) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[62] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[65] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4885,7 +5129,7 @@ func (x *SpotMarket) ProtoReflect() protoreflect.Message { // Deprecated: Use SpotMarket.ProtoReflect.Descriptor instead. func (*SpotMarket) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{62} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{65} } func (x *SpotMarket) GetMarket() *vega.Market { @@ -5040,39 +5284,43 @@ type Market struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Market *vega.Market `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` - PriceMonitor *PriceMonitor `protobuf:"bytes,2,opt,name=price_monitor,json=priceMonitor,proto3" json:"price_monitor,omitempty"` - AuctionState *AuctionState `protobuf:"bytes,3,opt,name=auction_state,json=auctionState,proto3" json:"auction_state,omitempty"` - PeggedOrders *PeggedOrders `protobuf:"bytes,4,opt,name=pegged_orders,json=peggedOrders,proto3" json:"pegged_orders,omitempty"` - ExpiringOrders []*vega.Order `protobuf:"bytes,5,rep,name=expiring_orders,json=expiringOrders,proto3" json:"expiring_orders,omitempty"` - LastBestBid string `protobuf:"bytes,6,opt,name=last_best_bid,json=lastBestBid,proto3" json:"last_best_bid,omitempty"` - LastBestAsk string `protobuf:"bytes,7,opt,name=last_best_ask,json=lastBestAsk,proto3" json:"last_best_ask,omitempty"` - LastMidBid string `protobuf:"bytes,8,opt,name=last_mid_bid,json=lastMidBid,proto3" json:"last_mid_bid,omitempty"` - LastMidAsk string `protobuf:"bytes,9,opt,name=last_mid_ask,json=lastMidAsk,proto3" json:"last_mid_ask,omitempty"` - LastMarketValueProxy string `protobuf:"bytes,10,opt,name=last_market_value_proxy,json=lastMarketValueProxy,proto3" json:"last_market_value_proxy,omitempty"` - LastEquityShareDistributed int64 `protobuf:"varint,11,opt,name=last_equity_share_distributed,json=lastEquityShareDistributed,proto3" json:"last_equity_share_distributed,omitempty"` - EquityShare *EquityShare `protobuf:"bytes,12,opt,name=equity_share,json=equityShare,proto3" json:"equity_share,omitempty"` - CurrentMarkPrice string `protobuf:"bytes,13,opt,name=current_mark_price,json=currentMarkPrice,proto3" json:"current_mark_price,omitempty"` - RiskFactorShort string `protobuf:"bytes,14,opt,name=risk_factor_short,json=riskFactorShort,proto3" json:"risk_factor_short,omitempty"` - RiskFactorLong string `protobuf:"bytes,15,opt,name=risk_factor_long,json=riskFactorLong,proto3" json:"risk_factor_long,omitempty"` - RiskFactorConsensusReached bool `protobuf:"varint,16,opt,name=risk_factor_consensus_reached,json=riskFactorConsensusReached,proto3" json:"risk_factor_consensus_reached,omitempty"` - FeeSplitter *FeeSplitter `protobuf:"bytes,17,opt,name=fee_splitter,json=feeSplitter,proto3" json:"fee_splitter,omitempty"` - SettlementData string `protobuf:"bytes,18,opt,name=settlement_data,json=settlementData,proto3" json:"settlement_data,omitempty"` - NextMarkToMarket int64 `protobuf:"varint,19,opt,name=next_mark_to_market,json=nextMarkToMarket,proto3" json:"next_mark_to_market,omitempty"` - LastTradedPrice string `protobuf:"bytes,20,opt,name=last_traded_price,json=lastTradedPrice,proto3" json:"last_traded_price,omitempty"` - Parties []string `protobuf:"bytes,21,rep,name=parties,proto3" json:"parties,omitempty"` - Closed bool `protobuf:"varint,22,opt,name=closed,proto3" json:"closed,omitempty"` - Succeeded bool `protobuf:"varint,23,opt,name=succeeded,proto3" json:"succeeded,omitempty"` - StopOrders *StopOrders `protobuf:"bytes,24,opt,name=stop_orders,json=stopOrders,proto3" json:"stop_orders,omitempty"` - ExpiringStopOrders []*vega.Order `protobuf:"bytes,25,rep,name=expiring_stop_orders,json=expiringStopOrders,proto3" json:"expiring_stop_orders,omitempty"` - Product *Product `protobuf:"bytes,26,opt,name=product,proto3" json:"product,omitempty"` - FeesStats *v12.FeesStats `protobuf:"bytes,27,opt,name=fees_stats,json=feesStats,proto3" json:"fees_stats,omitempty"` + Market *vega.Market `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + PriceMonitor *PriceMonitor `protobuf:"bytes,2,opt,name=price_monitor,json=priceMonitor,proto3" json:"price_monitor,omitempty"` + AuctionState *AuctionState `protobuf:"bytes,3,opt,name=auction_state,json=auctionState,proto3" json:"auction_state,omitempty"` + PeggedOrders *PeggedOrders `protobuf:"bytes,4,opt,name=pegged_orders,json=peggedOrders,proto3" json:"pegged_orders,omitempty"` + ExpiringOrders []*vega.Order `protobuf:"bytes,5,rep,name=expiring_orders,json=expiringOrders,proto3" json:"expiring_orders,omitempty"` + LastBestBid string `protobuf:"bytes,6,opt,name=last_best_bid,json=lastBestBid,proto3" json:"last_best_bid,omitempty"` + LastBestAsk string `protobuf:"bytes,7,opt,name=last_best_ask,json=lastBestAsk,proto3" json:"last_best_ask,omitempty"` + LastMidBid string `protobuf:"bytes,8,opt,name=last_mid_bid,json=lastMidBid,proto3" json:"last_mid_bid,omitempty"` + LastMidAsk string `protobuf:"bytes,9,opt,name=last_mid_ask,json=lastMidAsk,proto3" json:"last_mid_ask,omitempty"` + LastMarketValueProxy string `protobuf:"bytes,10,opt,name=last_market_value_proxy,json=lastMarketValueProxy,proto3" json:"last_market_value_proxy,omitempty"` + LastEquityShareDistributed int64 `protobuf:"varint,11,opt,name=last_equity_share_distributed,json=lastEquityShareDistributed,proto3" json:"last_equity_share_distributed,omitempty"` + EquityShare *EquityShare `protobuf:"bytes,12,opt,name=equity_share,json=equityShare,proto3" json:"equity_share,omitempty"` + CurrentMarkPrice string `protobuf:"bytes,13,opt,name=current_mark_price,json=currentMarkPrice,proto3" json:"current_mark_price,omitempty"` + RiskFactorShort string `protobuf:"bytes,14,opt,name=risk_factor_short,json=riskFactorShort,proto3" json:"risk_factor_short,omitempty"` + RiskFactorLong string `protobuf:"bytes,15,opt,name=risk_factor_long,json=riskFactorLong,proto3" json:"risk_factor_long,omitempty"` + RiskFactorConsensusReached bool `protobuf:"varint,16,opt,name=risk_factor_consensus_reached,json=riskFactorConsensusReached,proto3" json:"risk_factor_consensus_reached,omitempty"` + FeeSplitter *FeeSplitter `protobuf:"bytes,17,opt,name=fee_splitter,json=feeSplitter,proto3" json:"fee_splitter,omitempty"` + SettlementData string `protobuf:"bytes,18,opt,name=settlement_data,json=settlementData,proto3" json:"settlement_data,omitempty"` + NextMarkToMarket int64 `protobuf:"varint,19,opt,name=next_mark_to_market,json=nextMarkToMarket,proto3" json:"next_mark_to_market,omitempty"` + LastTradedPrice string `protobuf:"bytes,20,opt,name=last_traded_price,json=lastTradedPrice,proto3" json:"last_traded_price,omitempty"` + Parties []string `protobuf:"bytes,21,rep,name=parties,proto3" json:"parties,omitempty"` + Closed bool `protobuf:"varint,22,opt,name=closed,proto3" json:"closed,omitempty"` + Succeeded bool `protobuf:"varint,23,opt,name=succeeded,proto3" json:"succeeded,omitempty"` + StopOrders *StopOrders `protobuf:"bytes,24,opt,name=stop_orders,json=stopOrders,proto3" json:"stop_orders,omitempty"` + ExpiringStopOrders []*vega.Order `protobuf:"bytes,25,rep,name=expiring_stop_orders,json=expiringStopOrders,proto3" json:"expiring_stop_orders,omitempty"` + Product *Product `protobuf:"bytes,26,opt,name=product,proto3" json:"product,omitempty"` + FeesStats *v12.FeesStats `protobuf:"bytes,27,opt,name=fees_stats,json=feesStats,proto3" json:"fees_stats,omitempty"` + PartyMarginFactor []*PartyMarginFactor `protobuf:"bytes,28,rep,name=party_margin_factor,json=partyMarginFactor,proto3" json:"party_margin_factor,omitempty"` + MarkPriceCalculator *CompositePriceCalculator `protobuf:"bytes,29,opt,name=mark_price_calculator,json=markPriceCalculator,proto3" json:"mark_price_calculator,omitempty"` + InternalCompositePriceCalculator *CompositePriceCalculator `protobuf:"bytes,30,opt,name=internal_composite_price_calculator,json=internalCompositePriceCalculator,proto3,oneof" json:"internal_composite_price_calculator,omitempty"` + NextInternalCompositePriceCalc int64 `protobuf:"varint,31,opt,name=next_internal_composite_price_calc,json=nextInternalCompositePriceCalc,proto3" json:"next_internal_composite_price_calc,omitempty"` } func (x *Market) Reset() { *x = Market{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[63] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5085,7 +5333,7 @@ func (x *Market) String() string { func (*Market) ProtoMessage() {} func (x *Market) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[63] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[66] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5098,7 +5346,7 @@ func (x *Market) ProtoReflect() protoreflect.Message { // Deprecated: Use Market.ProtoReflect.Descriptor instead. func (*Market) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{63} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{66} } func (x *Market) GetMarket() *vega.Market { @@ -5290,35 +5538,118 @@ func (x *Market) GetFeesStats() *v12.FeesStats { return nil } -// eventually support multiple products -type Product struct { +func (x *Market) GetPartyMarginFactor() []*PartyMarginFactor { + if x != nil { + return x.PartyMarginFactor + } + return nil +} + +func (x *Market) GetMarkPriceCalculator() *CompositePriceCalculator { + if x != nil { + return x.MarkPriceCalculator + } + return nil +} + +func (x *Market) GetInternalCompositePriceCalculator() *CompositePriceCalculator { + if x != nil { + return x.InternalCompositePriceCalculator + } + return nil +} + +func (x *Market) GetNextInternalCompositePriceCalc() int64 { + if x != nil { + return x.NextInternalCompositePriceCalc + } + return 0 +} + +type PartyMarginFactor struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Types that are assignable to Type: - // - // *Product_Perps - Type isProduct_Type `protobuf_oneof:"type"` + Party string `protobuf:"bytes,1,opt,name=party,proto3" json:"party,omitempty"` + MarginFactor string `protobuf:"bytes,2,opt,name=margin_factor,json=marginFactor,proto3" json:"margin_factor,omitempty"` } -func (x *Product) Reset() { - *x = Product{} +func (x *PartyMarginFactor) Reset() { + *x = PartyMarginFactor{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[64] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Product) String() string { +func (x *PartyMarginFactor) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Product) ProtoMessage() {} +func (*PartyMarginFactor) ProtoMessage() {} -func (x *Product) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[64] +func (x *PartyMarginFactor) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[67] + 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 PartyMarginFactor.ProtoReflect.Descriptor instead. +func (*PartyMarginFactor) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{67} +} + +func (x *PartyMarginFactor) GetParty() string { + if x != nil { + return x.Party + } + return "" +} + +func (x *PartyMarginFactor) GetMarginFactor() string { + if x != nil { + return x.MarginFactor + } + return "" +} + +// eventually support multiple products +type Product struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *Product_Perps + Type isProduct_Type `protobuf_oneof:"type"` +} + +func (x *Product) Reset() { + *x = Product{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Product) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Product) ProtoMessage() {} + +func (x *Product) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[68] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5331,7 +5662,7 @@ func (x *Product) ProtoReflect() protoreflect.Message { // Deprecated: Use Product.ProtoReflect.Descriptor instead. func (*Product) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{64} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{68} } func (m *Product) GetType() isProduct_Type { @@ -5370,7 +5701,7 @@ type DataPoint struct { func (x *DataPoint) Reset() { *x = DataPoint{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[65] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5383,7 +5714,7 @@ func (x *DataPoint) String() string { func (*DataPoint) ProtoMessage() {} func (x *DataPoint) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[65] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[69] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5396,7 +5727,7 @@ func (x *DataPoint) ProtoReflect() protoreflect.Message { // Deprecated: Use DataPoint.ProtoReflect.Descriptor instead. func (*DataPoint) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{65} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{69} } func (x *DataPoint) GetPrice() string { @@ -5413,22 +5744,151 @@ func (x *DataPoint) GetTimestamp() int64 { return 0 } +type AuctionIntervals struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + T []int64 `protobuf:"varint,1,rep,packed,name=t,proto3" json:"t,omitempty"` + AuctionStart int64 `protobuf:"varint,2,opt,name=auction_start,json=auctionStart,proto3" json:"auction_start,omitempty"` + Total int64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` +} + +func (x *AuctionIntervals) Reset() { + *x = AuctionIntervals{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuctionIntervals) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuctionIntervals) ProtoMessage() {} + +func (x *AuctionIntervals) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[70] + 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 AuctionIntervals.ProtoReflect.Descriptor instead. +func (*AuctionIntervals) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{70} +} + +func (x *AuctionIntervals) GetT() []int64 { + if x != nil { + return x.T + } + return nil +} + +func (x *AuctionIntervals) GetAuctionStart() int64 { + if x != nil { + return x.AuctionStart + } + return 0 +} + +func (x *AuctionIntervals) GetTotal() int64 { + if x != nil { + return x.Total + } + return 0 +} + +type TWAPData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` + SumProduct string `protobuf:"bytes,3,opt,name=sum_product,json=sumProduct,proto3" json:"sum_product,omitempty"` +} + +func (x *TWAPData) Reset() { + *x = TWAPData{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TWAPData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TWAPData) ProtoMessage() {} + +func (x *TWAPData) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[71] + 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 TWAPData.ProtoReflect.Descriptor instead. +func (*TWAPData) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{71} +} + +func (x *TWAPData) GetStart() int64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *TWAPData) GetEnd() int64 { + if x != nil { + return x.End + } + return 0 +} + +func (x *TWAPData) GetSumProduct() string { + if x != nil { + return x.SumProduct + } + return "" +} + type Perps struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ExternalDataPoint []*DataPoint `protobuf:"bytes,2,rep,name=external_data_point,json=externalDataPoint,proto3" json:"external_data_point,omitempty"` - InternalDataPoint []*DataPoint `protobuf:"bytes,3,rep,name=internal_data_point,json=internalDataPoint,proto3" json:"internal_data_point,omitempty"` - Seq uint64 `protobuf:"varint,4,opt,name=seq,proto3" json:"seq,omitempty"` - StartedAt int64 `protobuf:"varint,5,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ExternalDataPoint []*DataPoint `protobuf:"bytes,2,rep,name=external_data_point,json=externalDataPoint,proto3" json:"external_data_point,omitempty"` + InternalDataPoint []*DataPoint `protobuf:"bytes,3,rep,name=internal_data_point,json=internalDataPoint,proto3" json:"internal_data_point,omitempty"` + Seq uint64 `protobuf:"varint,4,opt,name=seq,proto3" json:"seq,omitempty"` + StartedAt int64 `protobuf:"varint,5,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + ExternalTwapData *TWAPData `protobuf:"bytes,6,opt,name=external_twap_data,json=externalTwapData,proto3" json:"external_twap_data,omitempty"` + InternalTwapData *TWAPData `protobuf:"bytes,7,opt,name=internal_twap_data,json=internalTwapData,proto3" json:"internal_twap_data,omitempty"` + AuctionIntervals *AuctionIntervals `protobuf:"bytes,8,opt,name=auction_intervals,json=auctionIntervals,proto3" json:"auction_intervals,omitempty"` } func (x *Perps) Reset() { *x = Perps{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[66] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5441,7 +5901,7 @@ func (x *Perps) String() string { func (*Perps) ProtoMessage() {} func (x *Perps) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[66] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[72] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5454,7 +5914,7 @@ func (x *Perps) ProtoReflect() protoreflect.Message { // Deprecated: Use Perps.ProtoReflect.Descriptor instead. func (*Perps) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{66} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{72} } func (x *Perps) GetId() string { @@ -5492,6 +5952,27 @@ func (x *Perps) GetStartedAt() int64 { return 0 } +func (x *Perps) GetExternalTwapData() *TWAPData { + if x != nil { + return x.ExternalTwapData + } + return nil +} + +func (x *Perps) GetInternalTwapData() *TWAPData { + if x != nil { + return x.InternalTwapData + } + return nil +} + +func (x *Perps) GetAuctionIntervals() *AuctionIntervals { + if x != nil { + return x.AuctionIntervals + } + return nil +} + type OrdersAtPrice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -5504,7 +5985,7 @@ type OrdersAtPrice struct { func (x *OrdersAtPrice) Reset() { *x = OrdersAtPrice{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[67] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5517,7 +5998,7 @@ func (x *OrdersAtPrice) String() string { func (*OrdersAtPrice) ProtoMessage() {} func (x *OrdersAtPrice) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[67] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[73] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5530,7 +6011,7 @@ func (x *OrdersAtPrice) ProtoReflect() protoreflect.Message { // Deprecated: Use OrdersAtPrice.ProtoReflect.Descriptor instead. func (*OrdersAtPrice) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{67} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{73} } func (x *OrdersAtPrice) GetPrice() string { @@ -5559,7 +6040,7 @@ type PricedStopOrders struct { func (x *PricedStopOrders) Reset() { *x = PricedStopOrders{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[68] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5572,7 +6053,7 @@ func (x *PricedStopOrders) String() string { func (*PricedStopOrders) ProtoMessage() {} func (x *PricedStopOrders) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[68] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[74] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5585,7 +6066,7 @@ func (x *PricedStopOrders) ProtoReflect() protoreflect.Message { // Deprecated: Use PricedStopOrders.ProtoReflect.Descriptor instead. func (*PricedStopOrders) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{68} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{74} } func (x *PricedStopOrders) GetFallsBellow() []*OrdersAtPrice { @@ -5615,7 +6096,7 @@ type TrailingStopOrders struct { func (x *TrailingStopOrders) Reset() { *x = TrailingStopOrders{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[69] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5628,7 +6109,7 @@ func (x *TrailingStopOrders) String() string { func (*TrailingStopOrders) ProtoMessage() {} func (x *TrailingStopOrders) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[69] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[75] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5641,7 +6122,7 @@ func (x *TrailingStopOrders) ProtoReflect() protoreflect.Message { // Deprecated: Use TrailingStopOrders.ProtoReflect.Descriptor instead. func (*TrailingStopOrders) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{69} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{75} } func (x *TrailingStopOrders) GetLastSeenPrice() string { @@ -5677,7 +6158,7 @@ type OrdersAtOffset struct { func (x *OrdersAtOffset) Reset() { *x = OrdersAtOffset{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[70] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5690,7 +6171,7 @@ func (x *OrdersAtOffset) String() string { func (*OrdersAtOffset) ProtoMessage() {} func (x *OrdersAtOffset) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[70] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[76] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5703,7 +6184,7 @@ func (x *OrdersAtOffset) ProtoReflect() protoreflect.Message { // Deprecated: Use OrdersAtOffset.ProtoReflect.Descriptor instead. func (*OrdersAtOffset) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{70} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{76} } func (x *OrdersAtOffset) GetOffset() string { @@ -5732,7 +6213,7 @@ type OffsetsAtPrice struct { func (x *OffsetsAtPrice) Reset() { *x = OffsetsAtPrice{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[71] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5745,7 +6226,7 @@ func (x *OffsetsAtPrice) String() string { func (*OffsetsAtPrice) ProtoMessage() {} func (x *OffsetsAtPrice) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[71] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[77] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5758,7 +6239,7 @@ func (x *OffsetsAtPrice) ProtoReflect() protoreflect.Message { // Deprecated: Use OffsetsAtPrice.ProtoReflect.Descriptor instead. func (*OffsetsAtPrice) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{71} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{77} } func (x *OffsetsAtPrice) GetPrice() string { @@ -5788,7 +6269,7 @@ type StopOrders struct { func (x *StopOrders) Reset() { *x = StopOrders{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[72] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5801,7 +6282,7 @@ func (x *StopOrders) String() string { func (*StopOrders) ProtoMessage() {} func (x *StopOrders) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[72] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[78] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5814,7 +6295,7 @@ func (x *StopOrders) ProtoReflect() protoreflect.Message { // Deprecated: Use StopOrders.ProtoReflect.Descriptor instead. func (*StopOrders) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{72} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{78} } func (x *StopOrders) GetStopOrders() []*v12.StopOrderEvent { @@ -5849,7 +6330,7 @@ type PeggedOrders struct { func (x *PeggedOrders) Reset() { *x = PeggedOrders{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[73] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5862,7 +6343,7 @@ func (x *PeggedOrders) String() string { func (*PeggedOrders) ProtoMessage() {} func (x *PeggedOrders) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[73] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[79] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5875,7 +6356,7 @@ func (x *PeggedOrders) ProtoReflect() protoreflect.Message { // Deprecated: Use PeggedOrders.ProtoReflect.Descriptor instead. func (*PeggedOrders) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{73} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{79} } func (x *PeggedOrders) GetParkedOrders() []*vega.Order { @@ -5902,7 +6383,7 @@ type SLANetworkParams struct { func (x *SLANetworkParams) Reset() { *x = SLANetworkParams{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[74] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5915,7 +6396,7 @@ func (x *SLANetworkParams) String() string { func (*SLANetworkParams) ProtoMessage() {} func (x *SLANetworkParams) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[74] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[80] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5928,7 +6409,7 @@ func (x *SLANetworkParams) ProtoReflect() protoreflect.Message { // Deprecated: Use SLANetworkParams.ProtoReflect.Descriptor instead. func (*SLANetworkParams) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{74} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{80} } func (x *SLANetworkParams) GetBondPenaltyFactor() string { @@ -5996,7 +6477,7 @@ type ExecutionMarkets struct { func (x *ExecutionMarkets) Reset() { *x = ExecutionMarkets{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[75] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6009,7 +6490,7 @@ func (x *ExecutionMarkets) String() string { func (*ExecutionMarkets) ProtoMessage() {} func (x *ExecutionMarkets) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[75] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[81] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6022,7 +6503,7 @@ func (x *ExecutionMarkets) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecutionMarkets.ProtoReflect.Descriptor instead. func (*ExecutionMarkets) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{75} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{81} } func (x *ExecutionMarkets) GetMarkets() []*Market { @@ -6079,7 +6560,7 @@ type Successors struct { func (x *Successors) Reset() { *x = Successors{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[76] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6092,7 +6573,7 @@ func (x *Successors) String() string { func (*Successors) ProtoMessage() {} func (x *Successors) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[76] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[82] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6105,7 +6586,7 @@ func (x *Successors) ProtoReflect() protoreflect.Message { // Deprecated: Use Successors.ProtoReflect.Descriptor instead. func (*Successors) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{76} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{82} } func (x *Successors) GetParentMarket() string { @@ -6127,20 +6608,21 @@ type Position struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` - Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` - Buy int64 `protobuf:"varint,3,opt,name=buy,proto3" json:"buy,omitempty"` - Sell int64 `protobuf:"varint,4,opt,name=sell,proto3" json:"sell,omitempty"` - Price string `protobuf:"bytes,5,opt,name=price,proto3" json:"price,omitempty"` - BuySumProduct string `protobuf:"bytes,6,opt,name=buy_sum_product,json=buySumProduct,proto3" json:"buy_sum_product,omitempty"` - SellSumProduct string `protobuf:"bytes,7,opt,name=sell_sum_product,json=sellSumProduct,proto3" json:"sell_sum_product,omitempty"` - Distressed bool `protobuf:"varint,8,opt,name=distressed,proto3" json:"distressed,omitempty"` + PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + Buy int64 `protobuf:"varint,3,opt,name=buy,proto3" json:"buy,omitempty"` + Sell int64 `protobuf:"varint,4,opt,name=sell,proto3" json:"sell,omitempty"` + Price string `protobuf:"bytes,5,opt,name=price,proto3" json:"price,omitempty"` + BuySumProduct string `protobuf:"bytes,6,opt,name=buy_sum_product,json=buySumProduct,proto3" json:"buy_sum_product,omitempty"` + SellSumProduct string `protobuf:"bytes,7,opt,name=sell_sum_product,json=sellSumProduct,proto3" json:"sell_sum_product,omitempty"` + Distressed bool `protobuf:"varint,8,opt,name=distressed,proto3" json:"distressed,omitempty"` + AverageEntryPrice []byte `protobuf:"bytes,9,opt,name=average_entry_price,json=averageEntryPrice,proto3" json:"average_entry_price,omitempty"` } func (x *Position) Reset() { *x = Position{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[77] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6153,7 +6635,7 @@ func (x *Position) String() string { func (*Position) ProtoMessage() {} func (x *Position) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[77] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[83] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6166,7 +6648,7 @@ func (x *Position) ProtoReflect() protoreflect.Message { // Deprecated: Use Position.ProtoReflect.Descriptor instead. func (*Position) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{77} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{83} } func (x *Position) GetPartyId() string { @@ -6225,6 +6707,13 @@ func (x *Position) GetDistressed() bool { return false } +func (x *Position) GetAverageEntryPrice() []byte { + if x != nil { + return x.AverageEntryPrice + } + return nil +} + type MarketPositions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -6238,7 +6727,7 @@ type MarketPositions struct { func (x *MarketPositions) Reset() { *x = MarketPositions{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[78] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6251,7 +6740,7 @@ func (x *MarketPositions) String() string { func (*MarketPositions) ProtoMessage() {} func (x *MarketPositions) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[78] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[84] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6264,7 +6753,7 @@ func (x *MarketPositions) ProtoReflect() protoreflect.Message { // Deprecated: Use MarketPositions.ProtoReflect.Descriptor instead. func (*MarketPositions) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{78} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{84} } func (x *MarketPositions) GetMarketId() string { @@ -6302,7 +6791,7 @@ type PartyPositionStats struct { func (x *PartyPositionStats) Reset() { *x = PartyPositionStats{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[79] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6315,7 +6804,7 @@ func (x *PartyPositionStats) String() string { func (*PartyPositionStats) ProtoMessage() {} func (x *PartyPositionStats) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[79] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[85] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6328,7 +6817,7 @@ func (x *PartyPositionStats) ProtoReflect() protoreflect.Message { // Deprecated: Use PartyPositionStats.ProtoReflect.Descriptor instead. func (*PartyPositionStats) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{79} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{85} } func (x *PartyPositionStats) GetParty() string { @@ -6373,7 +6862,7 @@ type SettlementState struct { func (x *SettlementState) Reset() { *x = SettlementState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[80] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6386,7 +6875,7 @@ func (x *SettlementState) String() string { func (*SettlementState) ProtoMessage() {} func (x *SettlementState) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[80] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[86] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6399,7 +6888,7 @@ func (x *SettlementState) ProtoReflect() protoreflect.Message { // Deprecated: Use SettlementState.ProtoReflect.Descriptor instead. func (*SettlementState) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{80} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{86} } func (x *SettlementState) GetMarketId() string { @@ -6442,7 +6931,7 @@ type LastSettledPosition struct { func (x *LastSettledPosition) Reset() { *x = LastSettledPosition{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[81] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6455,7 +6944,7 @@ func (x *LastSettledPosition) String() string { func (*LastSettledPosition) ProtoMessage() {} func (x *LastSettledPosition) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[81] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[87] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6468,7 +6957,7 @@ func (x *LastSettledPosition) ProtoReflect() protoreflect.Message { // Deprecated: Use LastSettledPosition.ProtoReflect.Descriptor instead. func (*LastSettledPosition) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{81} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{87} } func (x *LastSettledPosition) GetParty() string { @@ -6500,7 +6989,7 @@ type SettlementTrade struct { func (x *SettlementTrade) Reset() { *x = SettlementTrade{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[82] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6513,7 +7002,7 @@ func (x *SettlementTrade) String() string { func (*SettlementTrade) ProtoMessage() {} func (x *SettlementTrade) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[82] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[88] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6526,7 +7015,7 @@ func (x *SettlementTrade) ProtoReflect() protoreflect.Message { // Deprecated: Use SettlementTrade.ProtoReflect.Descriptor instead. func (*SettlementTrade) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{82} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{88} } func (x *SettlementTrade) GetPartyId() string { @@ -6580,7 +7069,7 @@ type AppState struct { func (x *AppState) Reset() { *x = AppState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[83] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6593,7 +7082,7 @@ func (x *AppState) String() string { func (*AppState) ProtoMessage() {} func (x *AppState) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[83] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[89] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6606,7 +7095,7 @@ func (x *AppState) ProtoReflect() protoreflect.Message { // Deprecated: Use AppState.ProtoReflect.Descriptor instead. func (*AppState) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{83} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{89} } func (x *AppState) GetHeight() uint64 { @@ -6672,7 +7161,7 @@ type EpochState struct { func (x *EpochState) Reset() { *x = EpochState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[84] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[90] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6685,7 +7174,7 @@ func (x *EpochState) String() string { func (*EpochState) ProtoMessage() {} func (x *EpochState) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[84] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[90] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6698,7 +7187,7 @@ func (x *EpochState) ProtoReflect() protoreflect.Message { // Deprecated: Use EpochState.ProtoReflect.Descriptor instead. func (*EpochState) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{84} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{90} } func (x *EpochState) GetSeq() uint64 { @@ -6747,7 +7236,7 @@ type RewardsPendingPayouts struct { func (x *RewardsPendingPayouts) Reset() { *x = RewardsPendingPayouts{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[85] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[91] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6760,7 +7249,7 @@ func (x *RewardsPendingPayouts) String() string { func (*RewardsPendingPayouts) ProtoMessage() {} func (x *RewardsPendingPayouts) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[85] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[91] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6773,7 +7262,7 @@ func (x *RewardsPendingPayouts) ProtoReflect() protoreflect.Message { // Deprecated: Use RewardsPendingPayouts.ProtoReflect.Descriptor instead. func (*RewardsPendingPayouts) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{85} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{91} } func (x *RewardsPendingPayouts) GetScheduledRewardsPayout() []*ScheduledRewardsPayout { @@ -6795,7 +7284,7 @@ type ScheduledRewardsPayout struct { func (x *ScheduledRewardsPayout) Reset() { *x = ScheduledRewardsPayout{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[86] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[92] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6808,7 +7297,7 @@ func (x *ScheduledRewardsPayout) String() string { func (*ScheduledRewardsPayout) ProtoMessage() {} func (x *ScheduledRewardsPayout) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[86] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[92] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6821,7 +7310,7 @@ func (x *ScheduledRewardsPayout) ProtoReflect() protoreflect.Message { // Deprecated: Use ScheduledRewardsPayout.ProtoReflect.Descriptor instead. func (*ScheduledRewardsPayout) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{86} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{92} } func (x *ScheduledRewardsPayout) GetPayoutTime() int64 { @@ -6854,7 +7343,7 @@ type RewardsPayout struct { func (x *RewardsPayout) Reset() { *x = RewardsPayout{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[87] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[93] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6867,7 +7356,7 @@ func (x *RewardsPayout) String() string { func (*RewardsPayout) ProtoMessage() {} func (x *RewardsPayout) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[87] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[93] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6880,7 +7369,7 @@ func (x *RewardsPayout) ProtoReflect() protoreflect.Message { // Deprecated: Use RewardsPayout.ProtoReflect.Descriptor instead. func (*RewardsPayout) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{87} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{93} } func (x *RewardsPayout) GetFromAccount() string { @@ -6937,7 +7426,7 @@ type RewardsPartyAmount struct { func (x *RewardsPartyAmount) Reset() { *x = RewardsPartyAmount{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[88] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[94] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6950,7 +7439,7 @@ func (x *RewardsPartyAmount) String() string { func (*RewardsPartyAmount) ProtoMessage() {} func (x *RewardsPartyAmount) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[88] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[94] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6963,7 +7452,7 @@ func (x *RewardsPartyAmount) ProtoReflect() protoreflect.Message { // Deprecated: Use RewardsPartyAmount.ProtoReflect.Descriptor instead. func (*RewardsPartyAmount) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{88} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{94} } func (x *RewardsPartyAmount) GetParty() string { @@ -7006,7 +7495,7 @@ type LimitState struct { func (x *LimitState) Reset() { *x = LimitState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[89] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[95] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7019,7 +7508,7 @@ func (x *LimitState) String() string { func (*LimitState) ProtoMessage() {} func (x *LimitState) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[89] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[95] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7032,7 +7521,7 @@ func (x *LimitState) ProtoReflect() protoreflect.Message { // Deprecated: Use LimitState.ProtoReflect.Descriptor instead. func (*LimitState) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{89} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{95} } func (x *LimitState) GetBlockCount() uint32 { @@ -7123,7 +7612,7 @@ type VoteSpamPolicy struct { func (x *VoteSpamPolicy) Reset() { *x = VoteSpamPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[90] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[96] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7136,7 +7625,7 @@ func (x *VoteSpamPolicy) String() string { func (*VoteSpamPolicy) ProtoMessage() {} func (x *VoteSpamPolicy) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[90] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[96] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7149,7 +7638,7 @@ func (x *VoteSpamPolicy) ProtoReflect() protoreflect.Message { // Deprecated: Use VoteSpamPolicy.ProtoReflect.Descriptor instead. func (*VoteSpamPolicy) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{90} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{96} } func (x *VoteSpamPolicy) GetPartyToVote() []*PartyProposalVoteCount { @@ -7221,7 +7710,7 @@ type PartyProposalVoteCount struct { func (x *PartyProposalVoteCount) Reset() { *x = PartyProposalVoteCount{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[91] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[97] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7234,7 +7723,7 @@ func (x *PartyProposalVoteCount) String() string { func (*PartyProposalVoteCount) ProtoMessage() {} func (x *PartyProposalVoteCount) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[91] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[97] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7247,7 +7736,7 @@ func (x *PartyProposalVoteCount) ProtoReflect() protoreflect.Message { // Deprecated: Use PartyProposalVoteCount.ProtoReflect.Descriptor instead. func (*PartyProposalVoteCount) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{91} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{97} } func (x *PartyProposalVoteCount) GetParty() string { @@ -7283,7 +7772,7 @@ type PartyTokenBalance struct { func (x *PartyTokenBalance) Reset() { *x = PartyTokenBalance{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[92] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[98] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7296,7 +7785,7 @@ func (x *PartyTokenBalance) String() string { func (*PartyTokenBalance) ProtoMessage() {} func (x *PartyTokenBalance) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[92] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[98] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7309,7 +7798,7 @@ func (x *PartyTokenBalance) ProtoReflect() protoreflect.Message { // Deprecated: Use PartyTokenBalance.ProtoReflect.Descriptor instead. func (*PartyTokenBalance) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{92} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{98} } func (x *PartyTokenBalance) GetParty() string { @@ -7338,7 +7827,7 @@ type BlockRejectStats struct { func (x *BlockRejectStats) Reset() { *x = BlockRejectStats{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[93] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7351,7 +7840,7 @@ func (x *BlockRejectStats) String() string { func (*BlockRejectStats) ProtoMessage() {} func (x *BlockRejectStats) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[93] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[99] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7364,7 +7853,7 @@ func (x *BlockRejectStats) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockRejectStats.ProtoReflect.Descriptor instead. func (*BlockRejectStats) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{93} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{99} } func (x *BlockRejectStats) GetRejected() uint64 { @@ -7393,7 +7882,7 @@ type SpamPartyTransactionCount struct { func (x *SpamPartyTransactionCount) Reset() { *x = SpamPartyTransactionCount{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[94] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7406,7 +7895,7 @@ func (x *SpamPartyTransactionCount) String() string { func (*SpamPartyTransactionCount) ProtoMessage() {} func (x *SpamPartyTransactionCount) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[94] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[100] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7419,7 +7908,7 @@ func (x *SpamPartyTransactionCount) ProtoReflect() protoreflect.Message { // Deprecated: Use SpamPartyTransactionCount.ProtoReflect.Descriptor instead. func (*SpamPartyTransactionCount) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{94} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{100} } func (x *SpamPartyTransactionCount) GetParty() string { @@ -7451,7 +7940,7 @@ type SimpleSpamPolicy struct { func (x *SimpleSpamPolicy) Reset() { *x = SimpleSpamPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[95] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7464,7 +7953,7 @@ func (x *SimpleSpamPolicy) String() string { func (*SimpleSpamPolicy) ProtoMessage() {} func (x *SimpleSpamPolicy) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[95] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[101] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7477,7 +7966,7 @@ func (x *SimpleSpamPolicy) ProtoReflect() protoreflect.Message { // Deprecated: Use SimpleSpamPolicy.ProtoReflect.Descriptor instead. func (*SimpleSpamPolicy) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{95} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{101} } func (x *SimpleSpamPolicy) GetPolicyName() string { @@ -7530,7 +8019,7 @@ type NotarySigs struct { func (x *NotarySigs) Reset() { *x = NotarySigs{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[96] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7543,7 +8032,7 @@ func (x *NotarySigs) String() string { func (*NotarySigs) ProtoMessage() {} func (x *NotarySigs) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[96] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[102] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7556,7 +8045,7 @@ func (x *NotarySigs) ProtoReflect() protoreflect.Message { // Deprecated: Use NotarySigs.ProtoReflect.Descriptor instead. func (*NotarySigs) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{96} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{102} } func (x *NotarySigs) GetId() string { @@ -7605,7 +8094,7 @@ type Notary struct { func (x *Notary) Reset() { *x = Notary{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[97] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7618,7 +8107,7 @@ func (x *Notary) String() string { func (*Notary) ProtoMessage() {} func (x *Notary) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[97] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[103] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7631,7 +8120,7 @@ func (x *Notary) ProtoReflect() protoreflect.Message { // Deprecated: Use Notary.ProtoReflect.Descriptor instead. func (*Notary) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{97} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{103} } func (x *Notary) GetNotarySigs() []*NotarySigs { @@ -7652,7 +8141,7 @@ type StakeVerifierDeposited struct { func (x *StakeVerifierDeposited) Reset() { *x = StakeVerifierDeposited{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[98] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7665,7 +8154,7 @@ func (x *StakeVerifierDeposited) String() string { func (*StakeVerifierDeposited) ProtoMessage() {} func (x *StakeVerifierDeposited) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[98] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[104] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7678,7 +8167,7 @@ func (x *StakeVerifierDeposited) ProtoReflect() protoreflect.Message { // Deprecated: Use StakeVerifierDeposited.ProtoReflect.Descriptor instead. func (*StakeVerifierDeposited) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{98} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{104} } func (x *StakeVerifierDeposited) GetPendingDeposited() []*StakeVerifierPending { @@ -7699,7 +8188,7 @@ type StakeVerifierRemoved struct { func (x *StakeVerifierRemoved) Reset() { *x = StakeVerifierRemoved{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[99] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[105] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7712,7 +8201,7 @@ func (x *StakeVerifierRemoved) String() string { func (*StakeVerifierRemoved) ProtoMessage() {} func (x *StakeVerifierRemoved) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[99] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[105] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7725,7 +8214,7 @@ func (x *StakeVerifierRemoved) ProtoReflect() protoreflect.Message { // Deprecated: Use StakeVerifierRemoved.ProtoReflect.Descriptor instead. func (*StakeVerifierRemoved) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{99} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{105} } func (x *StakeVerifierRemoved) GetPendingRemoved() []*StakeVerifierPending { @@ -7753,7 +8242,7 @@ type StakeVerifierPending struct { func (x *StakeVerifierPending) Reset() { *x = StakeVerifierPending{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[100] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[106] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7766,7 +8255,7 @@ func (x *StakeVerifierPending) String() string { func (*StakeVerifierPending) ProtoMessage() {} func (x *StakeVerifierPending) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[100] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[106] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7779,7 +8268,7 @@ func (x *StakeVerifierPending) ProtoReflect() protoreflect.Message { // Deprecated: Use StakeVerifierPending.ProtoReflect.Descriptor instead. func (*StakeVerifierPending) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{100} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{106} } func (x *StakeVerifierPending) GetEthereumAddress() string { @@ -7838,6 +8327,116 @@ func (x *StakeVerifierPending) GetId() string { return "" } +type L2EthOracles struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainIdEthOracles []*ChainIdEthOracles `protobuf:"bytes,1,rep,name=chain_id_eth_oracles,json=chainIdEthOracles,proto3" json:"chain_id_eth_oracles,omitempty"` +} + +func (x *L2EthOracles) Reset() { + *x = L2EthOracles{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *L2EthOracles) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*L2EthOracles) ProtoMessage() {} + +func (x *L2EthOracles) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[107] + 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 L2EthOracles.ProtoReflect.Descriptor instead. +func (*L2EthOracles) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{107} +} + +func (x *L2EthOracles) GetChainIdEthOracles() []*ChainIdEthOracles { + if x != nil { + return x.ChainIdEthOracles + } + return nil +} + +type ChainIdEthOracles struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SourceChainId string `protobuf:"bytes,1,opt,name=source_chain_id,json=sourceChainId,proto3" json:"source_chain_id,omitempty"` + LastBlock *EthOracleVerifierLastBlock `protobuf:"bytes,2,opt,name=last_block,json=lastBlock,proto3" json:"last_block,omitempty"` + CallResults *EthContractCallResults `protobuf:"bytes,3,opt,name=call_results,json=callResults,proto3" json:"call_results,omitempty"` +} + +func (x *ChainIdEthOracles) Reset() { + *x = ChainIdEthOracles{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChainIdEthOracles) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChainIdEthOracles) ProtoMessage() {} + +func (x *ChainIdEthOracles) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[108] + 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 ChainIdEthOracles.ProtoReflect.Descriptor instead. +func (*ChainIdEthOracles) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{108} +} + +func (x *ChainIdEthOracles) GetSourceChainId() string { + if x != nil { + return x.SourceChainId + } + return "" +} + +func (x *ChainIdEthOracles) GetLastBlock() *EthOracleVerifierLastBlock { + if x != nil { + return x.LastBlock + } + return nil +} + +func (x *ChainIdEthOracles) GetCallResults() *EthContractCallResults { + if x != nil { + return x.CallResults + } + return nil +} + type EthOracleVerifierLastBlock struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -7850,7 +8449,7 @@ type EthOracleVerifierLastBlock struct { func (x *EthOracleVerifierLastBlock) Reset() { *x = EthOracleVerifierLastBlock{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[101] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[109] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7863,7 +8462,7 @@ func (x *EthOracleVerifierLastBlock) String() string { func (*EthOracleVerifierLastBlock) ProtoMessage() {} func (x *EthOracleVerifierLastBlock) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[101] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[109] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7876,7 +8475,7 @@ func (x *EthOracleVerifierLastBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use EthOracleVerifierLastBlock.ProtoReflect.Descriptor instead. func (*EthOracleVerifierLastBlock) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{101} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{109} } func (x *EthOracleVerifierLastBlock) GetBlockHeight() uint64 { @@ -7904,7 +8503,7 @@ type EthContractCallResults struct { func (x *EthContractCallResults) Reset() { *x = EthContractCallResults{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[102] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[110] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7917,7 +8516,7 @@ func (x *EthContractCallResults) String() string { func (*EthContractCallResults) ProtoMessage() {} func (x *EthContractCallResults) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[102] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[110] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7930,7 +8529,7 @@ func (x *EthContractCallResults) ProtoReflect() protoreflect.Message { // Deprecated: Use EthContractCallResults.ProtoReflect.Descriptor instead. func (*EthContractCallResults) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{102} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{110} } func (x *EthContractCallResults) GetPendingContractCallResult() []*EthContractCallResult { @@ -7955,7 +8554,7 @@ type EthContractCallResult struct { func (x *EthContractCallResult) Reset() { *x = EthContractCallResult{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[103] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7968,7 +8567,7 @@ func (x *EthContractCallResult) String() string { func (*EthContractCallResult) ProtoMessage() {} func (x *EthContractCallResult) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[103] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[111] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7981,7 +8580,7 @@ func (x *EthContractCallResult) ProtoReflect() protoreflect.Message { // Deprecated: Use EthContractCallResult.ProtoReflect.Descriptor instead. func (*EthContractCallResult) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{103} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{111} } func (x *EthContractCallResult) GetBlockHeight() uint64 { @@ -8033,7 +8632,7 @@ type PendingKeyRotation struct { func (x *PendingKeyRotation) Reset() { *x = PendingKeyRotation{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[104] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[112] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8046,7 +8645,7 @@ func (x *PendingKeyRotation) String() string { func (*PendingKeyRotation) ProtoMessage() {} func (x *PendingKeyRotation) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[104] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[112] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8059,7 +8658,7 @@ func (x *PendingKeyRotation) ProtoReflect() protoreflect.Message { // Deprecated: Use PendingKeyRotation.ProtoReflect.Descriptor instead. func (*PendingKeyRotation) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{104} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{112} } func (x *PendingKeyRotation) GetBlockHeight() uint64 { @@ -8105,7 +8704,7 @@ type PendingEthereumKeyRotation struct { func (x *PendingEthereumKeyRotation) Reset() { *x = PendingEthereumKeyRotation{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[105] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[113] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8118,7 +8717,7 @@ func (x *PendingEthereumKeyRotation) String() string { func (*PendingEthereumKeyRotation) ProtoMessage() {} func (x *PendingEthereumKeyRotation) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[105] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[113] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8131,7 +8730,7 @@ func (x *PendingEthereumKeyRotation) ProtoReflect() protoreflect.Message { // Deprecated: Use PendingEthereumKeyRotation.ProtoReflect.Descriptor instead. func (*PendingEthereumKeyRotation) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{105} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{113} } func (x *PendingEthereumKeyRotation) GetBlockHeight() uint64 { @@ -8186,7 +8785,7 @@ type Topology struct { func (x *Topology) Reset() { *x = Topology{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[106] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[114] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8199,7 +8798,7 @@ func (x *Topology) String() string { func (*Topology) ProtoMessage() {} func (x *Topology) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[106] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[114] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8212,7 +8811,7 @@ func (x *Topology) ProtoReflect() protoreflect.Message { // Deprecated: Use Topology.ProtoReflect.Descriptor instead. func (*Topology) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{106} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{114} } func (x *Topology) GetValidatorData() []*ValidatorState { @@ -8276,7 +8875,7 @@ type ToplogySignatures struct { func (x *ToplogySignatures) Reset() { *x = ToplogySignatures{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[107] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[115] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8289,7 +8888,7 @@ func (x *ToplogySignatures) String() string { func (*ToplogySignatures) ProtoMessage() {} func (x *ToplogySignatures) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[107] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[115] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8302,7 +8901,7 @@ func (x *ToplogySignatures) ProtoReflect() protoreflect.Message { // Deprecated: Use ToplogySignatures.ProtoReflect.Descriptor instead. func (*ToplogySignatures) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{107} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{115} } func (x *ToplogySignatures) GetPendingSignatures() []*PendingERC20MultisigControlSignature { @@ -8334,7 +8933,7 @@ type PendingERC20MultisigControlSignature struct { func (x *PendingERC20MultisigControlSignature) Reset() { *x = PendingERC20MultisigControlSignature{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[108] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[116] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8347,7 +8946,7 @@ func (x *PendingERC20MultisigControlSignature) String() string { func (*PendingERC20MultisigControlSignature) ProtoMessage() {} func (x *PendingERC20MultisigControlSignature) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[108] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[116] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8360,7 +8959,7 @@ func (x *PendingERC20MultisigControlSignature) ProtoReflect() protoreflect.Messa // Deprecated: Use PendingERC20MultisigControlSignature.ProtoReflect.Descriptor instead. func (*PendingERC20MultisigControlSignature) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{108} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{116} } func (x *PendingERC20MultisigControlSignature) GetNodeId() string { @@ -8411,7 +9010,7 @@ type IssuedERC20MultisigControlSignature struct { func (x *IssuedERC20MultisigControlSignature) Reset() { *x = IssuedERC20MultisigControlSignature{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[109] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[117] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8424,7 +9023,7 @@ func (x *IssuedERC20MultisigControlSignature) String() string { func (*IssuedERC20MultisigControlSignature) ProtoMessage() {} func (x *IssuedERC20MultisigControlSignature) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[109] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[117] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8437,7 +9036,7 @@ func (x *IssuedERC20MultisigControlSignature) ProtoReflect() protoreflect.Messag // Deprecated: Use IssuedERC20MultisigControlSignature.ProtoReflect.Descriptor instead. func (*IssuedERC20MultisigControlSignature) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{109} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{117} } func (x *IssuedERC20MultisigControlSignature) GetResourceId() string { @@ -8480,7 +9079,7 @@ type ValidatorState struct { func (x *ValidatorState) Reset() { *x = ValidatorState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[110] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[118] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8493,7 +9092,7 @@ func (x *ValidatorState) String() string { func (*ValidatorState) ProtoMessage() {} func (x *ValidatorState) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[110] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[118] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8506,7 +9105,7 @@ func (x *ValidatorState) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorState.ProtoReflect.Descriptor instead. func (*ValidatorState) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{110} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{118} } func (x *ValidatorState) GetValidatorUpdate() *v12.ValidatorUpdate { @@ -8586,7 +9185,7 @@ type HeartbeatTracker struct { func (x *HeartbeatTracker) Reset() { *x = HeartbeatTracker{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[111] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[119] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8599,7 +9198,7 @@ func (x *HeartbeatTracker) String() string { func (*HeartbeatTracker) ProtoMessage() {} func (x *HeartbeatTracker) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[111] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[119] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8612,7 +9211,7 @@ func (x *HeartbeatTracker) ProtoReflect() protoreflect.Message { // Deprecated: Use HeartbeatTracker.ProtoReflect.Descriptor instead. func (*HeartbeatTracker) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{111} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{119} } func (x *HeartbeatTracker) GetExpectedNextHash() string { @@ -8660,7 +9259,7 @@ type PerformanceStats struct { func (x *PerformanceStats) Reset() { *x = PerformanceStats{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[112] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[120] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8673,7 +9272,7 @@ func (x *PerformanceStats) String() string { func (*PerformanceStats) ProtoMessage() {} func (x *PerformanceStats) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[112] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[120] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8686,7 +9285,7 @@ func (x *PerformanceStats) ProtoReflect() protoreflect.Message { // Deprecated: Use PerformanceStats.ProtoReflect.Descriptor instead. func (*PerformanceStats) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{112} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{120} } func (x *PerformanceStats) GetValidatorAddress() string { @@ -8749,7 +9348,7 @@ type ValidatorPerformance struct { func (x *ValidatorPerformance) Reset() { *x = ValidatorPerformance{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[113] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[121] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8762,7 +9361,7 @@ func (x *ValidatorPerformance) String() string { func (*ValidatorPerformance) ProtoMessage() {} func (x *ValidatorPerformance) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[113] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[121] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8775,7 +9374,7 @@ func (x *ValidatorPerformance) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorPerformance.ProtoReflect.Descriptor instead. func (*ValidatorPerformance) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{113} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{121} } func (x *ValidatorPerformance) GetValidatorPerfStats() []*PerformanceStats { @@ -8800,7 +9399,7 @@ type LiquidityParameters struct { func (x *LiquidityParameters) Reset() { *x = LiquidityParameters{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[114] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[122] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8813,7 +9412,7 @@ func (x *LiquidityParameters) String() string { func (*LiquidityParameters) ProtoMessage() {} func (x *LiquidityParameters) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[114] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[122] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8826,7 +9425,7 @@ func (x *LiquidityParameters) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityParameters.ProtoReflect.Descriptor instead. func (*LiquidityParameters) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{114} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{122} } func (x *LiquidityParameters) GetMaxFee() string { @@ -8870,7 +9469,7 @@ type LiquidityPendingProvisions struct { func (x *LiquidityPendingProvisions) Reset() { *x = LiquidityPendingProvisions{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[115] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[123] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8883,7 +9482,7 @@ func (x *LiquidityPendingProvisions) String() string { func (*LiquidityPendingProvisions) ProtoMessage() {} func (x *LiquidityPendingProvisions) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[115] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[123] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8896,7 +9495,7 @@ func (x *LiquidityPendingProvisions) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityPendingProvisions.ProtoReflect.Descriptor instead. func (*LiquidityPendingProvisions) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{115} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{123} } func (x *LiquidityPendingProvisions) GetPendingProvisions() []string { @@ -8926,7 +9525,7 @@ type LiquidityPartiesLiquidityOrders struct { func (x *LiquidityPartiesLiquidityOrders) Reset() { *x = LiquidityPartiesLiquidityOrders{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[116] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[124] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8939,7 +9538,7 @@ func (x *LiquidityPartiesLiquidityOrders) String() string { func (*LiquidityPartiesLiquidityOrders) ProtoMessage() {} func (x *LiquidityPartiesLiquidityOrders) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[116] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[124] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8952,7 +9551,7 @@ func (x *LiquidityPartiesLiquidityOrders) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityPartiesLiquidityOrders.ProtoReflect.Descriptor instead. func (*LiquidityPartiesLiquidityOrders) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{116} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{124} } func (x *LiquidityPartiesLiquidityOrders) GetPartyOrders() []*PartyOrders { @@ -8981,7 +9580,7 @@ type PartyOrders struct { func (x *PartyOrders) Reset() { *x = PartyOrders{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[117] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[125] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8994,7 +9593,7 @@ func (x *PartyOrders) String() string { func (*PartyOrders) ProtoMessage() {} func (x *PartyOrders) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[117] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[125] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9007,7 +9606,7 @@ func (x *PartyOrders) ProtoReflect() protoreflect.Message { // Deprecated: Use PartyOrders.ProtoReflect.Descriptor instead. func (*PartyOrders) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{117} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{125} } func (x *PartyOrders) GetParty() string { @@ -9037,7 +9636,7 @@ type LiquidityPartiesOrders struct { func (x *LiquidityPartiesOrders) Reset() { *x = LiquidityPartiesOrders{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[118] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[126] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9050,7 +9649,7 @@ func (x *LiquidityPartiesOrders) String() string { func (*LiquidityPartiesOrders) ProtoMessage() {} func (x *LiquidityPartiesOrders) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[118] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[126] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9063,7 +9662,7 @@ func (x *LiquidityPartiesOrders) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityPartiesOrders.ProtoReflect.Descriptor instead. func (*LiquidityPartiesOrders) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{118} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{126} } func (x *LiquidityPartiesOrders) GetPartyOrders() []*PartyOrders { @@ -9093,7 +9692,7 @@ type LiquidityProvisions struct { func (x *LiquidityProvisions) Reset() { *x = LiquidityProvisions{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[119] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[127] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9106,7 +9705,7 @@ func (x *LiquidityProvisions) String() string { func (*LiquidityProvisions) ProtoMessage() {} func (x *LiquidityProvisions) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[119] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[127] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9119,7 +9718,7 @@ func (x *LiquidityProvisions) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityProvisions.ProtoReflect.Descriptor instead. func (*LiquidityProvisions) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{119} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{127} } func (x *LiquidityProvisions) GetLiquidityProvisions() []*vega.LiquidityProvision { @@ -9149,7 +9748,7 @@ type LiquidityScores struct { func (x *LiquidityScores) Reset() { *x = LiquidityScores{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[120] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[128] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9162,7 +9761,7 @@ func (x *LiquidityScores) String() string { func (*LiquidityScores) ProtoMessage() {} func (x *LiquidityScores) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[120] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[128] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9175,7 +9774,7 @@ func (x *LiquidityScores) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityScores.ProtoReflect.Descriptor instead. func (*LiquidityScores) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{120} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{128} } func (x *LiquidityScores) GetRunningAverageCounter() int32 { @@ -9211,7 +9810,7 @@ type LiquidityScore struct { func (x *LiquidityScore) Reset() { *x = LiquidityScore{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[121] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[129] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9224,7 +9823,7 @@ func (x *LiquidityScore) String() string { func (*LiquidityScore) ProtoMessage() {} func (x *LiquidityScore) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[121] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[129] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9237,7 +9836,7 @@ func (x *LiquidityScore) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityScore.ProtoReflect.Descriptor instead. func (*LiquidityScore) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{121} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{129} } func (x *LiquidityScore) GetScore() string { @@ -9274,7 +9873,7 @@ type LiquidityV2Parameters struct { func (x *LiquidityV2Parameters) Reset() { *x = LiquidityV2Parameters{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[122] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[130] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9287,7 +9886,7 @@ func (x *LiquidityV2Parameters) String() string { func (*LiquidityV2Parameters) ProtoMessage() {} func (x *LiquidityV2Parameters) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[122] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[130] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9300,7 +9899,7 @@ func (x *LiquidityV2Parameters) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityV2Parameters.ProtoReflect.Descriptor instead. func (*LiquidityV2Parameters) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{122} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{130} } func (x *LiquidityV2Parameters) GetMarketId() string { @@ -9351,7 +9950,7 @@ type LiquidityV2PaidFeesStats struct { func (x *LiquidityV2PaidFeesStats) Reset() { *x = LiquidityV2PaidFeesStats{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[123] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[131] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9364,7 +9963,7 @@ func (x *LiquidityV2PaidFeesStats) String() string { func (*LiquidityV2PaidFeesStats) ProtoMessage() {} func (x *LiquidityV2PaidFeesStats) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[123] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[131] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9377,7 +9976,7 @@ func (x *LiquidityV2PaidFeesStats) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityV2PaidFeesStats.ProtoReflect.Descriptor instead. func (*LiquidityV2PaidFeesStats) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{123} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{131} } func (x *LiquidityV2PaidFeesStats) GetMarketId() string { @@ -9407,7 +10006,7 @@ type LiquidityV2Provisions struct { func (x *LiquidityV2Provisions) Reset() { *x = LiquidityV2Provisions{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[124] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[132] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9420,7 +10019,7 @@ func (x *LiquidityV2Provisions) String() string { func (*LiquidityV2Provisions) ProtoMessage() {} func (x *LiquidityV2Provisions) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[124] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[132] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9433,7 +10032,7 @@ func (x *LiquidityV2Provisions) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityV2Provisions.ProtoReflect.Descriptor instead. func (*LiquidityV2Provisions) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{124} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{132} } func (x *LiquidityV2Provisions) GetMarketId() string { @@ -9463,7 +10062,7 @@ type LiquidityV2PendingProvisions struct { func (x *LiquidityV2PendingProvisions) Reset() { *x = LiquidityV2PendingProvisions{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[125] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[133] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9476,7 +10075,7 @@ func (x *LiquidityV2PendingProvisions) String() string { func (*LiquidityV2PendingProvisions) ProtoMessage() {} func (x *LiquidityV2PendingProvisions) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[125] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[133] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9489,7 +10088,7 @@ func (x *LiquidityV2PendingProvisions) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityV2PendingProvisions.ProtoReflect.Descriptor instead. func (*LiquidityV2PendingProvisions) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{125} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{133} } func (x *LiquidityV2PendingProvisions) GetMarketId() string { @@ -9520,7 +10119,7 @@ type LiquidityV2Performances struct { func (x *LiquidityV2Performances) Reset() { *x = LiquidityV2Performances{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[126] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[134] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9533,7 +10132,7 @@ func (x *LiquidityV2Performances) String() string { func (*LiquidityV2Performances) ProtoMessage() {} func (x *LiquidityV2Performances) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[126] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[134] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9546,7 +10145,7 @@ func (x *LiquidityV2Performances) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityV2Performances.ProtoReflect.Descriptor instead. func (*LiquidityV2Performances) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{126} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{134} } func (x *LiquidityV2Performances) GetMarketId() string { @@ -9591,7 +10190,7 @@ type LiquidityV2PerformancePerParty struct { func (x *LiquidityV2PerformancePerParty) Reset() { *x = LiquidityV2PerformancePerParty{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[127] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[135] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9604,7 +10203,7 @@ func (x *LiquidityV2PerformancePerParty) String() string { func (*LiquidityV2PerformancePerParty) ProtoMessage() {} func (x *LiquidityV2PerformancePerParty) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[127] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[135] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9617,7 +10216,7 @@ func (x *LiquidityV2PerformancePerParty) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityV2PerformancePerParty.ProtoReflect.Descriptor instead. func (*LiquidityV2PerformancePerParty) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{127} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{135} } func (x *LiquidityV2PerformancePerParty) GetParty() string { @@ -9713,7 +10312,7 @@ type LiquidityV2Scores struct { func (x *LiquidityV2Scores) Reset() { *x = LiquidityV2Scores{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[128] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[136] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9726,7 +10325,7 @@ func (x *LiquidityV2Scores) String() string { func (*LiquidityV2Scores) ProtoMessage() {} func (x *LiquidityV2Scores) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[128] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[136] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9739,7 +10338,7 @@ func (x *LiquidityV2Scores) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityV2Scores.ProtoReflect.Descriptor instead. func (*LiquidityV2Scores) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{128} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{136} } func (x *LiquidityV2Scores) GetMarketId() string { @@ -9792,7 +10391,7 @@ type LiquidityV2Supplied struct { func (x *LiquidityV2Supplied) Reset() { *x = LiquidityV2Supplied{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[129] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[137] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9805,7 +10404,7 @@ func (x *LiquidityV2Supplied) String() string { func (*LiquidityV2Supplied) ProtoMessage() {} func (x *LiquidityV2Supplied) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[129] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[137] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9818,7 +10417,7 @@ func (x *LiquidityV2Supplied) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityV2Supplied.ProtoReflect.Descriptor instead. func (*LiquidityV2Supplied) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{129} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{137} } func (x *LiquidityV2Supplied) GetMarketId() string { @@ -9862,7 +10461,7 @@ type FloatingPointConsensus struct { func (x *FloatingPointConsensus) Reset() { *x = FloatingPointConsensus{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[130] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[138] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9875,7 +10474,7 @@ func (x *FloatingPointConsensus) String() string { func (*FloatingPointConsensus) ProtoMessage() {} func (x *FloatingPointConsensus) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[130] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[138] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9888,7 +10487,7 @@ func (x *FloatingPointConsensus) ProtoReflect() protoreflect.Message { // Deprecated: Use FloatingPointConsensus.ProtoReflect.Descriptor instead. func (*FloatingPointConsensus) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{130} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{138} } func (x *FloatingPointConsensus) GetNextTimeTrigger() []*NextTimeTrigger { @@ -9920,7 +10519,7 @@ type StateVarInternalState struct { func (x *StateVarInternalState) Reset() { *x = StateVarInternalState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[131] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[139] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9933,7 +10532,7 @@ func (x *StateVarInternalState) String() string { func (*StateVarInternalState) ProtoMessage() {} func (x *StateVarInternalState) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[131] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[139] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9946,7 +10545,7 @@ func (x *StateVarInternalState) ProtoReflect() protoreflect.Message { // Deprecated: Use StateVarInternalState.ProtoReflect.Descriptor instead. func (*StateVarInternalState) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{131} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{139} } func (x *StateVarInternalState) GetId() string { @@ -9996,7 +10595,7 @@ type FloatingPointValidatorResult struct { func (x *FloatingPointValidatorResult) Reset() { *x = FloatingPointValidatorResult{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[132] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[140] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10009,7 +10608,7 @@ func (x *FloatingPointValidatorResult) String() string { func (*FloatingPointValidatorResult) ProtoMessage() {} func (x *FloatingPointValidatorResult) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[132] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[140] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10022,7 +10621,7 @@ func (x *FloatingPointValidatorResult) ProtoReflect() protoreflect.Message { // Deprecated: Use FloatingPointValidatorResult.ProtoReflect.Descriptor instead. func (*FloatingPointValidatorResult) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{132} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{140} } func (x *FloatingPointValidatorResult) GetId() string { @@ -10053,7 +10652,7 @@ type NextTimeTrigger struct { func (x *NextTimeTrigger) Reset() { *x = NextTimeTrigger{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[133] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[141] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10066,7 +10665,7 @@ func (x *NextTimeTrigger) String() string { func (*NextTimeTrigger) ProtoMessage() {} func (x *NextTimeTrigger) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[133] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[141] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10079,7 +10678,7 @@ func (x *NextTimeTrigger) ProtoReflect() protoreflect.Message { // Deprecated: Use NextTimeTrigger.ProtoReflect.Descriptor instead. func (*NextTimeTrigger) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{133} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{141} } func (x *NextTimeTrigger) GetAsset() string { @@ -10115,14 +10714,15 @@ type MarketTracker struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MarketActivity []*v11.MarketActivityTracker `protobuf:"bytes,1,rep,name=market_activity,json=marketActivity,proto3" json:"market_activity,omitempty"` - TakerNotionalVolume []*v11.TakerNotionalVolume `protobuf:"bytes,2,rep,name=taker_notional_volume,json=takerNotionalVolume,proto3" json:"taker_notional_volume,omitempty"` + MarketActivity []*v11.MarketActivityTracker `protobuf:"bytes,1,rep,name=market_activity,json=marketActivity,proto3" json:"market_activity,omitempty"` + TakerNotionalVolume []*v11.TakerNotionalVolume `protobuf:"bytes,2,rep,name=taker_notional_volume,json=takerNotionalVolume,proto3" json:"taker_notional_volume,omitempty"` + MarketToPartyTakerNotionalVolume []*v11.MarketToPartyTakerNotionalVolume `protobuf:"bytes,3,rep,name=market_to_party_taker_notional_volume,json=marketToPartyTakerNotionalVolume,proto3" json:"market_to_party_taker_notional_volume,omitempty"` } func (x *MarketTracker) Reset() { *x = MarketTracker{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[134] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[142] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10135,7 +10735,7 @@ func (x *MarketTracker) String() string { func (*MarketTracker) ProtoMessage() {} func (x *MarketTracker) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[134] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[142] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10148,7 +10748,7 @@ func (x *MarketTracker) ProtoReflect() protoreflect.Message { // Deprecated: Use MarketTracker.ProtoReflect.Descriptor instead. func (*MarketTracker) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{134} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{142} } func (x *MarketTracker) GetMarketActivity() []*v11.MarketActivityTracker { @@ -10165,6 +10765,13 @@ func (x *MarketTracker) GetTakerNotionalVolume() []*v11.TakerNotionalVolume { return nil } +func (x *MarketTracker) GetMarketToPartyTakerNotionalVolume() []*v11.MarketToPartyTakerNotionalVolume { + if x != nil { + return x.MarketToPartyTakerNotionalVolume + } + return nil +} + type SignerEventsPerAddress struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -10177,7 +10784,7 @@ type SignerEventsPerAddress struct { func (x *SignerEventsPerAddress) Reset() { *x = SignerEventsPerAddress{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[135] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[143] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10190,7 +10797,7 @@ func (x *SignerEventsPerAddress) String() string { func (*SignerEventsPerAddress) ProtoMessage() {} func (x *SignerEventsPerAddress) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[135] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[143] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10203,7 +10810,7 @@ func (x *SignerEventsPerAddress) ProtoReflect() protoreflect.Message { // Deprecated: Use SignerEventsPerAddress.ProtoReflect.Descriptor instead. func (*SignerEventsPerAddress) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{135} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{143} } func (x *SignerEventsPerAddress) GetAddress() string { @@ -10234,7 +10841,7 @@ type ERC20MultiSigTopologyVerified struct { func (x *ERC20MultiSigTopologyVerified) Reset() { *x = ERC20MultiSigTopologyVerified{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[136] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[144] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10247,7 +10854,7 @@ func (x *ERC20MultiSigTopologyVerified) String() string { func (*ERC20MultiSigTopologyVerified) ProtoMessage() {} func (x *ERC20MultiSigTopologyVerified) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[136] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[144] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10260,7 +10867,7 @@ func (x *ERC20MultiSigTopologyVerified) ProtoReflect() protoreflect.Message { // Deprecated: Use ERC20MultiSigTopologyVerified.ProtoReflect.Descriptor instead. func (*ERC20MultiSigTopologyVerified) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{136} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{144} } func (x *ERC20MultiSigTopologyVerified) GetSigners() []string { @@ -10305,7 +10912,7 @@ type ERC20MultiSigTopologyPending struct { func (x *ERC20MultiSigTopologyPending) Reset() { *x = ERC20MultiSigTopologyPending{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[137] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[145] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10318,7 +10925,7 @@ func (x *ERC20MultiSigTopologyPending) String() string { func (*ERC20MultiSigTopologyPending) ProtoMessage() {} func (x *ERC20MultiSigTopologyPending) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[137] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[145] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10331,7 +10938,7 @@ func (x *ERC20MultiSigTopologyPending) ProtoReflect() protoreflect.Message { // Deprecated: Use ERC20MultiSigTopologyPending.ProtoReflect.Descriptor instead. func (*ERC20MultiSigTopologyPending) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{137} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{145} } func (x *ERC20MultiSigTopologyPending) GetPendingSigners() []*v12.ERC20MultiSigSignerEvent { @@ -10381,7 +10988,7 @@ type ProofOfWork struct { func (x *ProofOfWork) Reset() { *x = ProofOfWork{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[138] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[146] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10394,7 +11001,7 @@ func (x *ProofOfWork) String() string { func (*ProofOfWork) ProtoMessage() {} func (x *ProofOfWork) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[138] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[146] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10407,7 +11014,7 @@ func (x *ProofOfWork) ProtoReflect() protoreflect.Message { // Deprecated: Use ProofOfWork.ProtoReflect.Descriptor instead. func (*ProofOfWork) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{138} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{146} } func (x *ProofOfWork) GetBlockHeight() []uint64 { @@ -10485,7 +11092,7 @@ type BannedParty struct { func (x *BannedParty) Reset() { *x = BannedParty{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[139] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[147] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10498,7 +11105,7 @@ func (x *BannedParty) String() string { func (*BannedParty) ProtoMessage() {} func (x *BannedParty) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[139] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[147] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10511,7 +11118,7 @@ func (x *BannedParty) ProtoReflect() protoreflect.Message { // Deprecated: Use BannedParty.ProtoReflect.Descriptor instead. func (*BannedParty) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{139} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{147} } func (x *BannedParty) GetParty() string { @@ -10545,7 +11152,7 @@ type ProofOfWorkParams struct { func (x *ProofOfWorkParams) Reset() { *x = ProofOfWorkParams{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[140] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[148] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10558,7 +11165,7 @@ func (x *ProofOfWorkParams) String() string { func (*ProofOfWorkParams) ProtoMessage() {} func (x *ProofOfWorkParams) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[140] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[148] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10571,7 +11178,7 @@ func (x *ProofOfWorkParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ProofOfWorkParams.ProtoReflect.Descriptor instead. func (*ProofOfWorkParams) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{140} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{148} } func (x *ProofOfWorkParams) GetSpamPowNumberOfPastBlocks() uint64 { @@ -10634,7 +11241,7 @@ type ProofOfWorkState struct { func (x *ProofOfWorkState) Reset() { *x = ProofOfWorkState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[141] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[149] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10647,7 +11254,7 @@ func (x *ProofOfWorkState) String() string { func (*ProofOfWorkState) ProtoMessage() {} func (x *ProofOfWorkState) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[141] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[149] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10660,7 +11267,7 @@ func (x *ProofOfWorkState) ProtoReflect() protoreflect.Message { // Deprecated: Use ProofOfWorkState.ProtoReflect.Descriptor instead. func (*ProofOfWorkState) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{141} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{149} } func (x *ProofOfWorkState) GetPowState() []*ProofOfWorkBlockState { @@ -10682,7 +11289,7 @@ type ProofOfWorkBlockState struct { func (x *ProofOfWorkBlockState) Reset() { *x = ProofOfWorkBlockState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[142] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[150] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10695,7 +11302,7 @@ func (x *ProofOfWorkBlockState) String() string { func (*ProofOfWorkBlockState) ProtoMessage() {} func (x *ProofOfWorkBlockState) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[142] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[150] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10708,7 +11315,7 @@ func (x *ProofOfWorkBlockState) ProtoReflect() protoreflect.Message { // Deprecated: Use ProofOfWorkBlockState.ProtoReflect.Descriptor instead. func (*ProofOfWorkBlockState) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{142} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{150} } func (x *ProofOfWorkBlockState) GetBlockHeight() uint64 { @@ -10738,7 +11345,7 @@ type ProofOfWorkPartyStateForBlock struct { func (x *ProofOfWorkPartyStateForBlock) Reset() { *x = ProofOfWorkPartyStateForBlock{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[143] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[151] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10751,7 +11358,7 @@ func (x *ProofOfWorkPartyStateForBlock) String() string { func (*ProofOfWorkPartyStateForBlock) ProtoMessage() {} func (x *ProofOfWorkPartyStateForBlock) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[143] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[151] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10764,7 +11371,7 @@ func (x *ProofOfWorkPartyStateForBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use ProofOfWorkPartyStateForBlock.ProtoReflect.Descriptor instead. func (*ProofOfWorkPartyStateForBlock) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{143} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{151} } func (x *ProofOfWorkPartyStateForBlock) GetParty() string { @@ -10800,7 +11407,7 @@ type TransactionsAtHeight struct { func (x *TransactionsAtHeight) Reset() { *x = TransactionsAtHeight{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[144] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[152] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10813,7 +11420,7 @@ func (x *TransactionsAtHeight) String() string { func (*TransactionsAtHeight) ProtoMessage() {} func (x *TransactionsAtHeight) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[144] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[152] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10826,7 +11433,7 @@ func (x *TransactionsAtHeight) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionsAtHeight.ProtoReflect.Descriptor instead. func (*TransactionsAtHeight) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{144} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{152} } func (x *TransactionsAtHeight) GetHeight() uint64 { @@ -10855,7 +11462,7 @@ type NonceRef struct { func (x *NonceRef) Reset() { *x = NonceRef{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[145] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[153] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10868,7 +11475,7 @@ func (x *NonceRef) String() string { func (*NonceRef) ProtoMessage() {} func (x *NonceRef) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[145] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[153] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10881,7 +11488,7 @@ func (x *NonceRef) ProtoReflect() protoreflect.Message { // Deprecated: Use NonceRef.ProtoReflect.Descriptor instead. func (*NonceRef) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{145} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{153} } func (x *NonceRef) GetParty() string { @@ -10910,7 +11517,7 @@ type NonceRefsAtHeight struct { func (x *NonceRefsAtHeight) Reset() { *x = NonceRefsAtHeight{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[146] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[154] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10923,7 +11530,7 @@ func (x *NonceRefsAtHeight) String() string { func (*NonceRefsAtHeight) ProtoMessage() {} func (x *NonceRefsAtHeight) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[146] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[154] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10936,7 +11543,7 @@ func (x *NonceRefsAtHeight) ProtoReflect() protoreflect.Message { // Deprecated: Use NonceRefsAtHeight.ProtoReflect.Descriptor instead. func (*NonceRefsAtHeight) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{146} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{154} } func (x *NonceRefsAtHeight) GetHeight() uint64 { @@ -10965,7 +11572,7 @@ type ProtocolUpgradeProposals struct { func (x *ProtocolUpgradeProposals) Reset() { *x = ProtocolUpgradeProposals{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[147] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[155] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10978,7 +11585,7 @@ func (x *ProtocolUpgradeProposals) String() string { func (*ProtocolUpgradeProposals) ProtoMessage() {} func (x *ProtocolUpgradeProposals) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[147] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[155] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10991,7 +11598,7 @@ func (x *ProtocolUpgradeProposals) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtocolUpgradeProposals.ProtoReflect.Descriptor instead. func (*ProtocolUpgradeProposals) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{147} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{155} } func (x *ProtocolUpgradeProposals) GetActiveProposals() []*v12.ProtocolUpgradeEvent { @@ -11022,7 +11629,7 @@ type AcceptedProtocolUpgradeProposal struct { func (x *AcceptedProtocolUpgradeProposal) Reset() { *x = AcceptedProtocolUpgradeProposal{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[148] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[156] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11035,7 +11642,7 @@ func (x *AcceptedProtocolUpgradeProposal) String() string { func (*AcceptedProtocolUpgradeProposal) ProtoMessage() {} func (x *AcceptedProtocolUpgradeProposal) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[148] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[156] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11048,7 +11655,7 @@ func (x *AcceptedProtocolUpgradeProposal) ProtoReflect() protoreflect.Message { // Deprecated: Use AcceptedProtocolUpgradeProposal.ProtoReflect.Descriptor instead. func (*AcceptedProtocolUpgradeProposal) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{148} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{156} } func (x *AcceptedProtocolUpgradeProposal) GetUpgradeBlockHeight() uint64 { @@ -11076,7 +11683,7 @@ type Teams struct { func (x *Teams) Reset() { *x = Teams{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[149] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[157] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11089,7 +11696,7 @@ func (x *Teams) String() string { func (*Teams) ProtoMessage() {} func (x *Teams) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[149] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[157] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11102,7 +11709,7 @@ func (x *Teams) ProtoReflect() protoreflect.Message { // Deprecated: Use Teams.ProtoReflect.Descriptor instead. func (*Teams) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{149} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{157} } func (x *Teams) GetTeams() []*Team { @@ -11125,12 +11732,13 @@ type Team struct { AvatarUrl string `protobuf:"bytes,6,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` CreatedAt int64 `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` Closed bool `protobuf:"varint,8,opt,name=closed,proto3" json:"closed,omitempty"` + AllowList []string `protobuf:"bytes,9,rep,name=allow_list,json=allowList,proto3" json:"allow_list,omitempty"` } func (x *Team) Reset() { *x = Team{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[150] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[158] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11143,7 +11751,7 @@ func (x *Team) String() string { func (*Team) ProtoMessage() {} func (x *Team) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[150] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[158] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11156,7 +11764,7 @@ func (x *Team) ProtoReflect() protoreflect.Message { // Deprecated: Use Team.ProtoReflect.Descriptor instead. func (*Team) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{150} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{158} } func (x *Team) GetId() string { @@ -11215,6 +11823,13 @@ func (x *Team) GetClosed() bool { return false } +func (x *Team) GetAllowList() []string { + if x != nil { + return x.AllowList + } + return nil +} + type Membership struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -11228,7 +11843,7 @@ type Membership struct { func (x *Membership) Reset() { *x = Membership{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[151] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[159] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11241,7 +11856,7 @@ func (x *Membership) String() string { func (*Membership) ProtoMessage() {} func (x *Membership) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[151] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[159] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11254,7 +11869,7 @@ func (x *Membership) ProtoReflect() protoreflect.Message { // Deprecated: Use Membership.ProtoReflect.Descriptor instead. func (*Membership) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{151} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{159} } func (x *Membership) GetPartyId() string { @@ -11289,7 +11904,7 @@ type TeamSwitches struct { func (x *TeamSwitches) Reset() { *x = TeamSwitches{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[152] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[160] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11302,7 +11917,7 @@ func (x *TeamSwitches) String() string { func (*TeamSwitches) ProtoMessage() {} func (x *TeamSwitches) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[152] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[160] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11315,7 +11930,7 @@ func (x *TeamSwitches) ProtoReflect() protoreflect.Message { // Deprecated: Use TeamSwitches.ProtoReflect.Descriptor instead. func (*TeamSwitches) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{152} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{160} } func (x *TeamSwitches) GetTeamSwitches() []*TeamSwitch { @@ -11338,7 +11953,7 @@ type TeamSwitch struct { func (x *TeamSwitch) Reset() { *x = TeamSwitch{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[153] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[161] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11351,7 +11966,7 @@ func (x *TeamSwitch) String() string { func (*TeamSwitch) ProtoMessage() {} func (x *TeamSwitch) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[153] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[161] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11364,7 +11979,7 @@ func (x *TeamSwitch) ProtoReflect() protoreflect.Message { // Deprecated: Use TeamSwitch.ProtoReflect.Descriptor instead. func (*TeamSwitch) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{153} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{161} } func (x *TeamSwitch) GetFromTeamId() string { @@ -11399,7 +12014,7 @@ type Vesting struct { func (x *Vesting) Reset() { *x = Vesting{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[154] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[162] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11412,7 +12027,7 @@ func (x *Vesting) String() string { func (*Vesting) ProtoMessage() {} func (x *Vesting) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[154] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[162] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11425,7 +12040,7 @@ func (x *Vesting) ProtoReflect() protoreflect.Message { // Deprecated: Use Vesting.ProtoReflect.Descriptor instead. func (*Vesting) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{154} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{162} } func (x *Vesting) GetPartiesReward() []*PartyReward { @@ -11448,7 +12063,7 @@ type PartyReward struct { func (x *PartyReward) Reset() { *x = PartyReward{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[155] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[163] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11461,7 +12076,7 @@ func (x *PartyReward) String() string { func (*PartyReward) ProtoMessage() {} func (x *PartyReward) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[155] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[163] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11474,7 +12089,7 @@ func (x *PartyReward) ProtoReflect() protoreflect.Message { // Deprecated: Use PartyReward.ProtoReflect.Descriptor instead. func (*PartyReward) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{155} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{163} } func (x *PartyReward) GetParty() string { @@ -11514,7 +12129,7 @@ type ReferralProgramData struct { func (x *ReferralProgramData) Reset() { *x = ReferralProgramData{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[156] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[164] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11527,7 +12142,7 @@ func (x *ReferralProgramData) String() string { func (*ReferralProgramData) ProtoMessage() {} func (x *ReferralProgramData) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[156] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[164] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11540,7 +12155,7 @@ func (x *ReferralProgramData) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralProgramData.ProtoReflect.Descriptor instead. func (*ReferralProgramData) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{156} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{164} } func (x *ReferralProgramData) GetFactorByReferee() []*FactorByReferee { @@ -11604,7 +12219,7 @@ type ReferralSet struct { func (x *ReferralSet) Reset() { *x = ReferralSet{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[157] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[165] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11617,7 +12232,7 @@ func (x *ReferralSet) String() string { func (*ReferralSet) ProtoMessage() {} func (x *ReferralSet) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[157] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[165] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11630,7 +12245,7 @@ func (x *ReferralSet) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralSet.ProtoReflect.Descriptor instead. func (*ReferralSet) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{157} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{165} } func (x *ReferralSet) GetId() string { @@ -11708,7 +12323,7 @@ type RunningVolume struct { func (x *RunningVolume) Reset() { *x = RunningVolume{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[158] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[166] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11721,7 +12336,7 @@ func (x *RunningVolume) String() string { func (*RunningVolume) ProtoMessage() {} func (x *RunningVolume) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[158] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[166] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11734,7 +12349,7 @@ func (x *RunningVolume) ProtoReflect() protoreflect.Message { // Deprecated: Use RunningVolume.ProtoReflect.Descriptor instead. func (*RunningVolume) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{158} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{166} } func (x *RunningVolume) GetEpoch() uint64 { @@ -11764,7 +12379,7 @@ type FactorByReferee struct { func (x *FactorByReferee) Reset() { *x = FactorByReferee{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[159] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[167] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11777,7 +12392,7 @@ func (x *FactorByReferee) String() string { func (*FactorByReferee) ProtoMessage() {} func (x *FactorByReferee) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[159] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[167] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11790,7 +12405,7 @@ func (x *FactorByReferee) ProtoReflect() protoreflect.Message { // Deprecated: Use FactorByReferee.ProtoReflect.Descriptor instead. func (*FactorByReferee) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{159} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{167} } func (x *FactorByReferee) GetParty() string { @@ -11826,7 +12441,7 @@ type AssetLocked struct { func (x *AssetLocked) Reset() { *x = AssetLocked{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[160] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[168] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11839,7 +12454,7 @@ func (x *AssetLocked) String() string { func (*AssetLocked) ProtoMessage() {} func (x *AssetLocked) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[160] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[168] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11852,7 +12467,7 @@ func (x *AssetLocked) ProtoReflect() protoreflect.Message { // Deprecated: Use AssetLocked.ProtoReflect.Descriptor instead. func (*AssetLocked) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{160} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{168} } func (x *AssetLocked) GetAsset() string { @@ -11881,7 +12496,7 @@ type EpochBalance struct { func (x *EpochBalance) Reset() { *x = EpochBalance{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[161] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[169] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11894,7 +12509,7 @@ func (x *EpochBalance) String() string { func (*EpochBalance) ProtoMessage() {} func (x *EpochBalance) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[161] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[169] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11907,7 +12522,7 @@ func (x *EpochBalance) ProtoReflect() protoreflect.Message { // Deprecated: Use EpochBalance.ProtoReflect.Descriptor instead. func (*EpochBalance) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{161} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{169} } func (x *EpochBalance) GetEpoch() uint64 { @@ -11936,7 +12551,7 @@ type InVesting struct { func (x *InVesting) Reset() { *x = InVesting{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[162] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[170] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11949,7 +12564,7 @@ func (x *InVesting) String() string { func (*InVesting) ProtoMessage() {} func (x *InVesting) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[162] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[170] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11962,7 +12577,7 @@ func (x *InVesting) ProtoReflect() protoreflect.Message { // Deprecated: Use InVesting.ProtoReflect.Descriptor instead. func (*InVesting) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{162} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{170} } func (x *InVesting) GetAsset() string { @@ -11990,7 +12605,7 @@ type ActivityStreak struct { func (x *ActivityStreak) Reset() { *x = ActivityStreak{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[163] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[171] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12003,7 +12618,7 @@ func (x *ActivityStreak) String() string { func (*ActivityStreak) ProtoMessage() {} func (x *ActivityStreak) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[163] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[171] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12016,7 +12631,7 @@ func (x *ActivityStreak) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivityStreak.ProtoReflect.Descriptor instead. func (*ActivityStreak) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{163} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{171} } func (x *ActivityStreak) GetPartiesActivityStreak() []*PartyActivityStreak { @@ -12041,7 +12656,7 @@ type PartyActivityStreak struct { func (x *PartyActivityStreak) Reset() { *x = PartyActivityStreak{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[164] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[172] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12054,7 +12669,7 @@ func (x *PartyActivityStreak) String() string { func (*PartyActivityStreak) ProtoMessage() {} func (x *PartyActivityStreak) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[164] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[172] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12067,7 +12682,7 @@ func (x *PartyActivityStreak) ProtoReflect() protoreflect.Message { // Deprecated: Use PartyActivityStreak.ProtoReflect.Descriptor instead. func (*PartyActivityStreak) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{164} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{172} } func (x *PartyActivityStreak) GetParty() string { @@ -12124,7 +12739,7 @@ type VolumeDiscountProgram struct { func (x *VolumeDiscountProgram) Reset() { *x = VolumeDiscountProgram{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[165] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[173] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12137,7 +12752,7 @@ func (x *VolumeDiscountProgram) String() string { func (*VolumeDiscountProgram) ProtoMessage() {} func (x *VolumeDiscountProgram) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[165] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[173] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12150,7 +12765,7 @@ func (x *VolumeDiscountProgram) ProtoReflect() protoreflect.Message { // Deprecated: Use VolumeDiscountProgram.ProtoReflect.Descriptor instead. func (*VolumeDiscountProgram) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{165} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{173} } func (x *VolumeDiscountProgram) GetParties() []string { @@ -12228,7 +12843,7 @@ type VolumeDiscountStats struct { func (x *VolumeDiscountStats) Reset() { *x = VolumeDiscountStats{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[166] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[174] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12241,7 +12856,7 @@ func (x *VolumeDiscountStats) String() string { func (*VolumeDiscountStats) ProtoMessage() {} func (x *VolumeDiscountStats) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[166] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[174] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12254,7 +12869,7 @@ func (x *VolumeDiscountStats) ProtoReflect() protoreflect.Message { // Deprecated: Use VolumeDiscountStats.ProtoReflect.Descriptor instead. func (*VolumeDiscountStats) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{166} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{174} } func (x *VolumeDiscountStats) GetParty() string { @@ -12282,7 +12897,7 @@ type EpochPartyVolumes struct { func (x *EpochPartyVolumes) Reset() { *x = EpochPartyVolumes{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[167] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[175] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12295,7 +12910,7 @@ func (x *EpochPartyVolumes) String() string { func (*EpochPartyVolumes) ProtoMessage() {} func (x *EpochPartyVolumes) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[167] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[175] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12308,7 +12923,7 @@ func (x *EpochPartyVolumes) ProtoReflect() protoreflect.Message { // Deprecated: Use EpochPartyVolumes.ProtoReflect.Descriptor instead. func (*EpochPartyVolumes) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{167} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{175} } func (x *EpochPartyVolumes) GetPartyVolume() []*PartyVolume { @@ -12330,7 +12945,7 @@ type PartyVolume struct { func (x *PartyVolume) Reset() { *x = PartyVolume{} if protoimpl.UnsafeEnabled { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[168] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[176] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12343,7 +12958,7 @@ func (x *PartyVolume) String() string { func (*PartyVolume) ProtoMessage() {} func (x *PartyVolume) ProtoReflect() protoreflect.Message { - mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[168] + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[176] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12356,7 +12971,7 @@ func (x *PartyVolume) ProtoReflect() protoreflect.Message { // Deprecated: Use PartyVolume.ProtoReflect.Descriptor instead. func (*PartyVolume) Descriptor() ([]byte, []int) { - return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{168} + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{176} } func (x *PartyVolume) GetParty() string { @@ -12373,6 +12988,384 @@ func (x *PartyVolume) GetVolume() []byte { return nil } +type Liquidation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + NetworkPos int64 `protobuf:"varint,2,opt,name=network_pos,json=networkPos,proto3" json:"network_pos,omitempty"` + NextStep int64 `protobuf:"varint,3,opt,name=next_step,json=nextStep,proto3" json:"next_step,omitempty"` + Config *vega.LiquidationStrategy `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *Liquidation) Reset() { + *x = Liquidation{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[177] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Liquidation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Liquidation) ProtoMessage() {} + +func (x *Liquidation) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[177] + 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 Liquidation.ProtoReflect.Descriptor instead. +func (*Liquidation) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{177} +} + +func (x *Liquidation) GetMarketId() string { + if x != nil { + return x.MarketId + } + return "" +} + +func (x *Liquidation) GetNetworkPos() int64 { + if x != nil { + return x.NetworkPos + } + return 0 +} + +func (x *Liquidation) GetNextStep() int64 { + if x != nil { + return x.NextStep + } + return 0 +} + +func (x *Liquidation) GetConfig() *vega.LiquidationStrategy { + if x != nil { + return x.Config + } + return nil +} + +type PartyAssetAmount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Party string `protobuf:"bytes,1,opt,name=party,proto3" json:"party,omitempty"` + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *PartyAssetAmount) Reset() { + *x = PartyAssetAmount{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[178] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PartyAssetAmount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PartyAssetAmount) ProtoMessage() {} + +func (x *PartyAssetAmount) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[178] + 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 PartyAssetAmount.ProtoReflect.Descriptor instead. +func (*PartyAssetAmount) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{178} +} + +func (x *PartyAssetAmount) GetParty() string { + if x != nil { + return x.Party + } + return "" +} + +func (x *PartyAssetAmount) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +func (x *PartyAssetAmount) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +type BankingTransferFeeDiscounts struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PartyAssetDiscount []*PartyAssetAmount `protobuf:"bytes,1,rep,name=party_asset_discount,json=partyAssetDiscount,proto3" json:"party_asset_discount,omitempty"` +} + +func (x *BankingTransferFeeDiscounts) Reset() { + *x = BankingTransferFeeDiscounts{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[179] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BankingTransferFeeDiscounts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BankingTransferFeeDiscounts) ProtoMessage() {} + +func (x *BankingTransferFeeDiscounts) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[179] + 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 BankingTransferFeeDiscounts.ProtoReflect.Descriptor instead. +func (*BankingTransferFeeDiscounts) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{179} +} + +func (x *BankingTransferFeeDiscounts) GetPartyAssetDiscount() []*PartyAssetAmount { + if x != nil { + return x.PartyAssetDiscount + } + return nil +} + +type CompositePriceCalculator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CompositePrice string `protobuf:"bytes,1,opt,name=composite_price,json=compositePrice,proto3" json:"composite_price,omitempty"` + PriceConfiguration *vega.CompositePriceConfiguration `protobuf:"bytes,2,opt,name=price_configuration,json=priceConfiguration,proto3" json:"price_configuration,omitempty"` + Trades []*vega.Trade `protobuf:"bytes,3,rep,name=trades,proto3" json:"trades,omitempty"` + PriceSources []string `protobuf:"bytes,4,rep,name=price_sources,json=priceSources,proto3" json:"price_sources,omitempty"` + PriceSourceLastUpdate []int64 `protobuf:"varint,5,rep,packed,name=price_source_last_update,json=priceSourceLastUpdate,proto3" json:"price_source_last_update,omitempty"` + BookPriceAtTime []*TimePrice `protobuf:"bytes,6,rep,name=book_price_at_time,json=bookPriceAtTime,proto3" json:"book_price_at_time,omitempty"` +} + +func (x *CompositePriceCalculator) Reset() { + *x = CompositePriceCalculator{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[180] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompositePriceCalculator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompositePriceCalculator) ProtoMessage() {} + +func (x *CompositePriceCalculator) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[180] + 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 CompositePriceCalculator.ProtoReflect.Descriptor instead. +func (*CompositePriceCalculator) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{180} +} + +func (x *CompositePriceCalculator) GetCompositePrice() string { + if x != nil { + return x.CompositePrice + } + return "" +} + +func (x *CompositePriceCalculator) GetPriceConfiguration() *vega.CompositePriceConfiguration { + if x != nil { + return x.PriceConfiguration + } + return nil +} + +func (x *CompositePriceCalculator) GetTrades() []*vega.Trade { + if x != nil { + return x.Trades + } + return nil +} + +func (x *CompositePriceCalculator) GetPriceSources() []string { + if x != nil { + return x.PriceSources + } + return nil +} + +func (x *CompositePriceCalculator) GetPriceSourceLastUpdate() []int64 { + if x != nil { + return x.PriceSourceLastUpdate + } + return nil +} + +func (x *CompositePriceCalculator) GetBookPriceAtTime() []*TimePrice { + if x != nil { + return x.BookPriceAtTime + } + return nil +} + +type Parties struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Profiles []*PartyProfile `protobuf:"bytes,1,rep,name=profiles,proto3" json:"profiles,omitempty"` +} + +func (x *Parties) Reset() { + *x = Parties{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[181] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Parties) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Parties) ProtoMessage() {} + +func (x *Parties) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[181] + 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 Parties.ProtoReflect.Descriptor instead. +func (*Parties) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{181} +} + +func (x *Parties) GetProfiles() []*PartyProfile { + if x != nil { + return x.Profiles + } + return nil +} + +type PartyProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` + Metadata []*vega.Metadata `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *PartyProfile) Reset() { + *x = PartyProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[182] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PartyProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PartyProfile) ProtoMessage() {} + +func (x *PartyProfile) ProtoReflect() protoreflect.Message { + mi := &file_vega_snapshot_v1_snapshot_proto_msgTypes[182] + 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 PartyProfile.ProtoReflect.Descriptor instead. +func (*PartyProfile) Descriptor() ([]byte, []int) { + return file_vega_snapshot_v1_snapshot_proto_rawDescGZIP(), []int{182} +} + +func (x *PartyProfile) GetPartyId() string { + if x != nil { + return x.PartyId + } + return "" +} + +func (x *PartyProfile) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +func (x *PartyProfile) GetMetadata() []*vega.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + var File_vega_snapshot_v1_snapshot_proto protoreflect.FileDescriptor var file_vega_snapshot_v1_snapshot_proto_rawDesc = []byte{ @@ -12428,7 +13421,7 @@ var file_vega_snapshot_v1_snapshot_proto_rawDesc = []byte{ 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x6e, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x6e, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x66, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x02, 0x6f, 0x66, 0x22, 0x81, 0x32, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, + 0x01, 0x28, 0x03, 0x52, 0x02, 0x6f, 0x66, 0x22, 0x9c, 0x35, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x45, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, @@ -12828,607 +13821,703 @@ var file_vega_snapshot_v1_snapshot_proto_rawDesc = []byte{ 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x50, 0x61, 0x69, 0x64, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x48, 0x00, 0x52, 0x18, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x50, 0x61, 0x69, 0x64, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x16, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x48, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x51, 0x75, 0x61, 0x6e, 0x74, - 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x66, 0x65, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x15, 0x48, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x1b, 0x0a, - 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x4d, 0x0a, 0x0d, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x6f, 0x6c, 0x64, 0x69, 0x6e, - 0x67, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0c, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x48, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x4c, 0x0a, 0x15, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x52, 0x0a, 0x17, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, - 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xf2, 0x02, 0x0a, 0x0f, - 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, - 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x2d, 0x0a, 0x12, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x75, - 0x6e, 0x63, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x12, 0x34, - 0x0a, 0x16, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x04, 0x52, 0x14, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x65, 0x73, 0x74, 0x73, 0x12, 0x61, 0x0a, 0x17, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, - 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x65, 0x64, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, - 0x52, 0x15, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x65, 0x64, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x10, - 0x6d, 0x61, 0x78, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x73, - 0x22, 0xe0, 0x02, 0x0a, 0x13, 0x53, 0x70, 0x6f, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x61, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x50, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0b, 0x6c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x74, 0x0a, 0x1e, 0x62, 0x61, 0x6e, 0x6b, 0x69, 0x6e, + 0x67, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x46, 0x65, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x48, 0x00, 0x52, + 0x1b, 0x62, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x46, 0x65, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x61, 0x0a, 0x17, + 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x52, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, 0x00, 0x52, 0x15, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, + 0x61, 0x6e, 0x63, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, + 0x35, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x53, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x48, 0x00, 0x52, 0x07, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x0e, 0x6c, 0x32, 0x5f, 0x65, 0x74, 0x68, + 0x5f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x54, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x32, 0x45, 0x74, 0x68, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x73, 0x48, 0x00, + 0x52, 0x0c, 0x6c, 0x32, 0x45, 0x74, 0x68, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x73, 0x42, 0x06, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x16, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x48, + 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x83, + 0x01, 0x0a, 0x15, 0x48, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x54, - 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x04, 0x52, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x74, - 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x76, 0x69, - 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x65, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x12, - 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x12, 0x4f, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x22, 0x5a, 0x0a, 0x1e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x50, 0x61, 0x69, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x20, 0x0a, - 0x0b, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, - 0xfb, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x75, 0x70, - 0x70, 0x6c, 0x69, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, - 0x72, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x12, - 0x4d, 0x0a, 0x09, 0x62, 0x69, 0x64, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x50, 0x61, 0x69, 0x72, 0x52, 0x08, 0x62, 0x69, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x4d, - 0x0a, 0x09, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, - 0x61, 0x69, 0x72, 0x52, 0x08, 0x61, 0x73, 0x6b, 0x43, 0x61, 0x63, 0x68, 0x65, 0x22, 0x50, 0x0a, - 0x0f, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x3d, 0x0a, 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x0a, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, - 0xa7, 0x01, 0x0a, 0x0a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, - 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x34, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, + 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x4d, 0x0a, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x68, + 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x50, 0x61, 0x69, 0x72, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x09, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x22, 0x38, 0x0a, 0x0e, 0x4f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x50, 0x61, 0x69, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x43, 0x0a, 0x07, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x38, - 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x67, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x6e, - 0x74, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x22, 0x33, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, - 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x6b, 0x65, 0x64, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x73, 0x0a, 0x12, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, - 0x65, 0x72, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x08, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, - 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x42, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x37, 0x0a, 0x10, 0x43, - 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, - 0x23, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x06, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x22, 0x33, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, 0x34, 0x0a, 0x0d, 0x50, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, - 0x3a, 0x0a, 0x13, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, 0x50, 0x0a, 0x0a, 0x57, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x30, 0x0a, 0x0a, 0x77, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, - 0x6c, 0x52, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x22, 0x42, 0x0a, - 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x22, 0x69, 0x0a, 0x05, 0x54, 0x78, 0x52, 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, - 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x54, 0x0a, 0x12, - 0x42, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, - 0x6c, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, - 0x6c, 0x73, 0x22, 0x46, 0x0a, 0x0f, 0x42, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x50, 0x0a, 0x0b, 0x42, 0x61, - 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x65, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, 0x66, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x72, 0x65, 0x66, 0x73, 0x12, 0x2d, 0x0a, - 0x13, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x65, 0x6e, 0x5f, 0x65, 0x74, 0x68, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x6c, 0x61, 0x73, 0x74, - 0x53, 0x65, 0x65, 0x6e, 0x45, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x59, 0x0a, 0x13, - 0x42, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x74, 0x0a, 0x19, 0x42, 0x61, 0x6e, 0x6b, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x73, 0x12, 0x57, 0x0a, 0x13, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, - 0x67, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x12, 0x72, 0x65, 0x63, 0x75, 0x72, - 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x22, 0x74, 0x0a, - 0x19, 0x42, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x57, 0x0a, 0x11, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x41, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x22, 0x7e, 0x0a, 0x23, 0x42, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, - 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x57, 0x0a, 0x13, 0x72, 0x65, - 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x76, - 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, - 0x12, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x23, 0x42, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, - 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, - 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x61, 0x0a, 0x11, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x51, 0x75, 0x61, 0x6e, + 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x6f, 0x6c, + 0x64, 0x69, 0x6e, 0x67, 0x22, 0x4c, 0x0a, 0x15, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x65, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, + 0x6d, 0x65, 0x22, 0x52, 0x0a, 0x17, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, + 0x64, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, + 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xf2, 0x02, 0x0a, 0x0f, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x64, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, + 0x73, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x04, 0x52, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x73, 0x12, + 0x61, 0x0a, 0x17, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x15, 0x70, 0x72, 0x65, + 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, + 0x74, 0x73, 0x12, 0x57, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x73, 0x22, 0xe0, 0x02, 0x0a, 0x13, + 0x53, 0x70, 0x6f, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, + 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, + 0x5f, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x11, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, + 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x04, 0x52, + 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, + 0x6b, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x54, + 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x12, 0x70, 0x72, 0x65, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x4f, 0x0a, + 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x65, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, + 0x0d, 0x6d, 0x61, 0x78, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x5a, + 0x0a, 0x1e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x61, 0x69, 0x72, + 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x62, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, + 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xfb, 0x01, 0x0a, 0x11, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2b, 0x0a, + 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x68, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x12, 0x4d, 0x0a, 0x09, 0x62, 0x69, + 0x64, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, + 0x08, 0x62, 0x69, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x4d, 0x0a, 0x09, 0x61, 0x73, 0x6b, + 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x50, + 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x08, + 0x61, 0x73, 0x6b, 0x43, 0x61, 0x63, 0x68, 0x65, 0x22, 0x50, 0x0a, 0x0f, 0x4f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3d, 0x0a, 0x0b, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa7, 0x01, 0x0a, 0x0a, 0x4f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x07, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x50, 0x61, 0x69, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x33, 0x0a, 0x09, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x44, 0x61, 0x74, 0x61, 0x22, 0x38, 0x0a, 0x0e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x50, 0x61, 0x69, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x43, + 0x0a, 0x07, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x22, 0x67, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x6e, 0x74, 0x69, 0x6c, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3e, 0x0a, 0x14, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x72, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x02, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x22, 0x75, 0x0a, 0x0e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x72, 0x12, 0x21, + 0x0a, 0x0c, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x40, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, + 0x72, 0x64, 0x65, 0x72, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x22, 0x73, 0x0a, 0x12, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, + 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x08, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x62, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x37, 0x0a, 0x10, 0x43, 0x6f, 0x6c, 0x6c, + 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x06, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x22, 0x33, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x12, 0x23, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x06, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, 0x34, 0x0a, 0x0d, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, 0x3a, 0x0a, 0x13, + 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, 0x50, 0x0a, 0x0a, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x30, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x0a, + 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x22, 0x42, 0x0a, 0x07, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x69, + 0x0a, 0x05, 0x54, 0x78, 0x52, 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x19, 0x0a, + 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, + 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x54, 0x0a, 0x12, 0x42, 0x61, 0x6e, + 0x6b, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x12, + 0x3e, 0x0a, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x61, 0x6c, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x22, + 0x46, 0x0a, 0x0f, 0x42, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x50, 0x0a, 0x0b, 0x42, 0x61, 0x6e, 0x6b, 0x69, + 0x6e, 0x67, 0x53, 0x65, 0x65, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, 0x66, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x72, 0x65, 0x66, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x6c, 0x61, + 0x73, 0x74, 0x5f, 0x73, 0x65, 0x65, 0x6e, 0x5f, 0x65, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x65, + 0x6e, 0x45, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x59, 0x0a, 0x13, 0x42, 0x61, 0x6e, + 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x42, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x74, 0x0a, 0x19, 0x42, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x73, 0x12, 0x57, 0x0a, 0x13, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x12, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, + 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x22, 0x74, 0x0a, 0x19, 0x42, 0x61, + 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x57, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x52, + 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x7e, 0x0a, 0x23, 0x42, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x75, 0x72, + 0x72, 0x69, 0x6e, 0x67, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x57, 0x0a, 0x13, 0x72, 0x65, 0x63, 0x75, 0x72, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, + 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x12, 0x72, 0x65, + 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, + 0x22, 0x88, 0x01, 0x0a, 0x23, 0x42, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x58, - 0x0a, 0x12, 0x42, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x62, 0x72, 0x69, - 0x64, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x25, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x63, - 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x65, 0x78, 0x74, 0x43, 0x70, 0x22, - 0x5c, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x73, - 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, - 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, - 0x63, 0x69, 0x6c, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x46, 0x0a, - 0x10, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7d, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x34, - 0x0a, 0x0c, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2a, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, - 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x2a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x1c, 0x0a, - 0x03, 0x79, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x03, 0x79, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x02, 0x6e, - 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, - 0x6f, 0x74, 0x65, 0x52, 0x02, 0x6e, 0x6f, 0x12, 0x24, 0x0a, 0x07, 0x69, 0x6e, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x56, 0x6f, 0x74, 0x65, 0x52, 0x07, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x51, 0x0a, - 0x11, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x45, 0x6e, 0x61, 0x63, 0x74, - 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, - 0x22, 0x50, 0x0a, 0x10, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x73, 0x22, 0x3e, 0x0a, 0x0e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x61, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x64, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x73, 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x58, 0x0a, 0x12, 0x42, + 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x25, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x65, 0x78, 0x74, 0x43, 0x70, 0x22, 0x5c, 0x0a, 0x20, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x73, 0x74, 0x52, 0x65, + 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x38, 0x0a, 0x18, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, + 0x6c, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x16, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x46, 0x0a, 0x10, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x32, + 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x7d, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x34, 0x0a, 0x0c, 0x75, + 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x2a, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, + 0x75, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x9a, 0x01, + 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x03, 0x79, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, + 0x6f, 0x74, 0x65, 0x52, 0x03, 0x79, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x02, 0x6e, 0x6f, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, 0x65, + 0x52, 0x02, 0x6e, 0x6f, 0x12, 0x24, 0x0a, 0x07, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x74, + 0x65, 0x52, 0x07, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x51, 0x0a, 0x11, 0x47, 0x6f, + 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x45, 0x6e, 0x61, 0x63, 0x74, 0x65, 0x64, 0x12, + 0x3c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x50, 0x0a, + 0x10, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, + 0x88, 0x01, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x45, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x09, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x22, 0x65, 0x0a, 0x15, 0x47, 0x6f, + 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x41, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x0e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x73, 0x22, 0x83, 0x01, 0x0a, 0x0e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x73, 0x22, 0x76, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x69, - 0x6e, 0x67, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xe1, 0x01, 0x0a, 0x0f, 0x53, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x3c, - 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x1a, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x17, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x54, 0x6f, - 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x53, 0x0a, 0x1a, 0x70, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, - 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x17, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x22, 0xf6, - 0x01, 0x0a, 0x0c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x6f, 0x6b, 0x12, - 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x03, - 0x62, 0x75, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x03, 0x62, 0x75, 0x79, 0x12, 0x1f, 0x0a, 0x04, 0x73, - 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x12, 0x2a, 0x0a, 0x11, - 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, - 0x64, 0x65, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, 0x75, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x28, 0x0a, - 0x10, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x3b, 0x0a, 0x09, 0x4e, 0x65, 0x74, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x22, 0x30, 0x0a, 0x0a, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x4d, - 0x61, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x35, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0x3b, 0x0a, - 0x0b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x42, 0x0a, 0x0a, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, - 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x12, 0x10, 0x0a, 0x03, - 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x22, 0x9a, - 0x01, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x70, 0x5f, 0x66, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, 0x46, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x77, 0x6e, 0x46, 0x61, 0x63, - 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x22, 0x79, 0x0a, 0x0f, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x32, - 0x0a, 0x05, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x05, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x12, 0x32, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, - 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x3c, 0x0a, 0x0c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x76, 0x6f, - 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x53, 0x0a, 0x09, 0x50, 0x61, 0x73, 0x74, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, - 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0xf4, 0x04, 0x0a, 0x0c, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x0b, - 0x66, 0x70, 0x5f, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x52, - 0x0a, 0x66, 0x70, 0x48, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6e, - 0x6f, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x6f, 0x77, 0x12, 0x16, 0x0a, - 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x6f, - 0x75, 0x6e, 0x64, 0x52, 0x06, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x33, 0x0a, 0x16, 0x70, - 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x4d, 0x0a, 0x11, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x0f, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, - 0x2f, 0x0a, 0x14, 0x72, 0x65, 0x66, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x61, 0x63, - 0x68, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, - 0x65, 0x66, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x44, 0x0a, 0x0f, 0x72, 0x65, 0x66, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x61, - 0x63, 0x68, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, - 0x69, 0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x52, 0x0d, 0x72, 0x65, 0x66, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, - 0x5f, 0x6e, 0x6f, 0x77, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x73, 0x4e, 0x6f, 0x77, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x5f, - 0x70, 0x61, 0x73, 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, - 0x73, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x50, - 0x61, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x5f, 0x72, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, - 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, - 0x22, 0xf8, 0x02, 0x0a, 0x0c, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2e, 0x54, 0x72, - 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, - 0x3b, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, - 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x07, - 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, - 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x65, 0x67, - 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x04, 0x73, 0x74, 0x6f, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x09, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6e, - 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x22, 0x75, 0x0a, 0x0d, 0x45, - 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4c, 0x50, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x76, 0x67, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x76, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x73, - 0x68, 0x61, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x73, 0x68, 0x61, - 0x72, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x0b, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, - 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x76, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6d, 0x76, 0x70, 0x12, 0x32, 0x0a, 0x15, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, - 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x13, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x75, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x03, 0x6c, 0x70, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, - 0x68, 0x61, 0x72, 0x65, 0x4c, 0x50, 0x52, 0x03, 0x6c, 0x70, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x13, 0x0a, 0x05, 0x70, 0x5f, 0x6d, - 0x76, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x4d, 0x76, 0x70, 0x22, 0x84, - 0x01, 0x0a, 0x0b, 0x46, 0x65, 0x65, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x2a, - 0x0a, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x57, - 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, - 0x61, 0x64, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x74, 0x72, 0x61, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, - 0x76, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x76, 0x67, 0x12, 0x16, 0x0a, - 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x77, - 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, 0xb4, 0x08, 0x0a, 0x0a, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x0d, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x52, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, - 0x43, 0x0a, 0x0d, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x0d, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x0c, 0x70, 0x65, 0x67, - 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x0f, 0x65, 0x78, 0x70, - 0x69, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, - 0x0e, 0x65, 0x78, 0x70, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x22, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x69, 0x64, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x65, 0x73, 0x74, - 0x42, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x65, 0x73, 0x74, - 0x5f, 0x61, 0x73, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, - 0x42, 0x65, 0x73, 0x74, 0x41, 0x73, 0x6b, 0x12, 0x20, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, - 0x6d, 0x69, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, - 0x61, 0x73, 0x74, 0x4d, 0x69, 0x64, 0x42, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x6c, 0x61, 0x73, - 0x74, 0x5f, 0x6d, 0x69, 0x64, 0x5f, 0x61, 0x73, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x64, 0x41, 0x73, 0x6b, 0x12, 0x35, 0x0a, 0x17, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6c, 0x61, - 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x12, 0x41, 0x0a, 0x1d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x65, 0x71, 0x75, 0x69, 0x74, - 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1a, 0x6c, 0x61, 0x73, 0x74, 0x45, - 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0c, 0x65, 0x71, 0x75, 0x69, 0x74, 0x79, 0x5f, - 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, - 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x0b, 0x65, 0x71, 0x75, 0x69, - 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x72, 0x6b, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x70, 0x6c, - 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x65, 0x65, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x66, 0x65, 0x65, 0x53, - 0x70, 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x5f, - 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x54, 0x6f, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, - 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x64, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x11, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, - 0x6f, 0x73, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, - 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x14, 0x65, 0x78, 0x70, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x12, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x52, 0x09, 0x66, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0xc5, 0x0a, 0x0a, - 0x06, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x43, 0x0a, - 0x0d, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x52, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x0d, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x61, 0x75, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x0d, 0x70, 0x65, 0x67, 0x67, 0x65, - 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x0c, - 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x0f, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x65, 0x73, 0x74, 0x5f, - 0x62, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x42, - 0x65, 0x73, 0x74, 0x42, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, - 0x65, 0x73, 0x74, 0x5f, 0x61, 0x73, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6c, - 0x61, 0x73, 0x74, 0x42, 0x65, 0x73, 0x74, 0x41, 0x73, 0x6b, 0x12, 0x20, 0x0a, 0x0c, 0x6c, 0x61, - 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x64, 0x42, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0c, - 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x64, 0x5f, 0x61, 0x73, 0x6b, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x64, 0x41, 0x73, 0x6b, 0x12, 0x35, - 0x0a, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x14, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x41, 0x0a, 0x1d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x65, 0x71, - 0x75, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1a, 0x6c, 0x61, - 0x73, 0x74, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x44, 0x69, 0x73, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0c, 0x65, 0x71, 0x75, 0x69, - 0x74, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x6c, 0x73, 0x12, 0x43, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x22, 0x76, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, + 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, + 0x4c, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, + 0xe1, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x53, + 0x0a, 0x1a, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x54, + 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x17, 0x70, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, + 0x70, 0x6c, 0x79, 0x22, 0xf6, 0x01, 0x0a, 0x0c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, + 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, + 0x64, 0x12, 0x1d, 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x03, 0x62, 0x75, 0x79, + 0x12, 0x1f, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x04, 0x73, 0x65, 0x6c, + 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x64, + 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x61, + 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x65, + 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0x3b, 0x0a, 0x09, + 0x4e, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x30, 0x0a, 0x0a, 0x44, 0x65, 0x63, + 0x69, 0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x35, 0x0a, 0x09, 0x54, + 0x69, 0x6d, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x22, 0x3b, 0x0a, 0x0b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, + 0x42, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12, + 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, + 0x78, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x72, 0x65, 0x66, 0x22, 0x9a, 0x01, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x75, + 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x70, + 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, + 0x70, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x5f, + 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, + 0x77, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x22, 0x79, 0x0a, 0x0f, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, + 0x52, 0x05, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x32, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x3c, 0x0a, 0x0c, 0x43, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x53, 0x0a, 0x09, 0x50, 0x61, 0x73, + 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0xf4, + 0x04, 0x0a, 0x0c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, + 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x73, 0x65, + 0x64, 0x12, 0x3d, 0x0a, 0x0b, 0x66, 0x70, 0x5f, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, + 0x6c, 0x4d, 0x61, 0x70, 0x52, 0x0a, 0x66, 0x70, 0x48, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x73, + 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x6f, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, + 0x6f, 0x77, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x06, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, + 0x12, 0x33, 0x0a, 0x16, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x13, 0x70, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4d, 0x0a, 0x11, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x52, 0x0f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x12, 0x2f, 0x0a, 0x14, 0x72, 0x65, 0x66, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x11, 0x72, 0x65, 0x66, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0f, 0x72, 0x65, 0x66, 0x5f, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x0b, 0x65, - 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4d, - 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x69, 0x73, 0x6b, - 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x53, - 0x68, 0x6f, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x66, 0x61, 0x63, - 0x74, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x72, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x4c, 0x6f, 0x6e, 0x67, 0x12, 0x41, - 0x0a, 0x1d, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, - 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, - 0x64, 0x12, 0x40, 0x0a, 0x0c, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x74, 0x65, - 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x53, 0x70, - 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x66, 0x65, 0x65, 0x53, 0x70, 0x6c, 0x69, 0x74, - 0x74, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, - 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x13, + 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x52, 0x0d, 0x72, 0x65, + 0x66, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x6e, 0x6f, 0x77, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, + 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x4e, 0x6f, 0x77, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x73, 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x61, 0x73, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x73, 0x50, 0x61, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x22, 0xf8, 0x02, 0x0a, 0x0c, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, + 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, + 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x75, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, + 0x0a, 0x14, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6e, 0x74, + 0x22, 0x75, 0x0a, 0x0d, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4c, + 0x50, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x72, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x61, 0x76, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x76, 0x67, 0x12, + 0x16, 0x0a, 0x06, 0x76, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x76, 0x73, 0x68, 0x61, 0x72, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x0b, 0x45, 0x71, 0x75, 0x69, + 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x76, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x76, 0x70, 0x12, 0x32, 0x0a, 0x15, 0x6f, 0x70, 0x65, + 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x64, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, + 0x67, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x31, 0x0a, + 0x03, 0x6c, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x71, + 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4c, 0x50, 0x52, 0x03, 0x6c, 0x70, 0x73, + 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x72, 0x12, 0x13, + 0x0a, 0x05, 0x70, 0x5f, 0x6d, 0x76, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x4d, 0x76, 0x70, 0x22, 0x84, 0x01, 0x0a, 0x0b, 0x46, 0x65, 0x65, 0x53, 0x70, 0x6c, 0x69, 0x74, + 0x74, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, + 0x74, 0x69, 0x6d, 0x65, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, + 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x61, 0x76, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, + 0x76, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, 0xb4, 0x08, 0x0a, 0x0a, 0x53, + 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, + 0x43, 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, + 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, + 0x69, 0x74, 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x0d, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x61, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x0d, 0x70, 0x65, 0x67, + 0x67, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x52, 0x0c, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x34, + 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x65, 0x73, + 0x74, 0x5f, 0x62, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x61, 0x73, + 0x74, 0x42, 0x65, 0x73, 0x74, 0x42, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x73, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x65, 0x73, 0x74, 0x41, 0x73, 0x6b, 0x12, 0x20, 0x0a, 0x0c, + 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x64, 0x42, 0x69, 0x64, 0x12, 0x20, + 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x64, 0x5f, 0x61, 0x73, 0x6b, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x64, 0x41, 0x73, 0x6b, + 0x12, 0x35, 0x0a, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x41, 0x0a, 0x1d, 0x6c, 0x61, 0x73, 0x74, 0x5f, + 0x65, 0x71, 0x75, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1a, + 0x6c, 0x61, 0x73, 0x74, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x44, + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0c, 0x65, 0x71, + 0x75, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, + 0x0b, 0x65, 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x12, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x66, 0x65, + 0x65, 0x5f, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x52, + 0x0b, 0x66, 0x65, 0x65, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, 0x78, 0x74, 0x4d, + 0x6b, 0x65, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x54, 0x6f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, - 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x5f, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x70, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x14, 0x65, 0x78, 0x70, 0x69, 0x72, 0x69, - 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x19, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x52, 0x12, 0x65, 0x78, 0x70, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x6f, 0x70, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, - 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, - 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x66, 0x65, - 0x65, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x09, 0x66, 0x65, 0x65, 0x73, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x22, 0x42, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, - 0x2f, 0x0a, 0x05, 0x70, 0x65, 0x72, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x65, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x0b, 0x73, 0x74, 0x6f, + 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x73, 0x48, 0x00, 0x52, 0x05, 0x70, 0x65, 0x72, 0x70, 0x73, - 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3f, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xe2, 0x01, 0x0a, 0x05, 0x50, 0x65, + 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x0a, 0x73, 0x74, + 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x14, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x52, 0x12, 0x65, 0x78, 0x70, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x6f, + 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x66, 0x65, 0x65, 0x73, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x65, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x09, 0x66, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x22, 0xee, 0x0d, 0x0a, 0x06, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x06, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x12, 0x43, 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, + 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x0d, 0x61, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, + 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x0d, + 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x73, 0x52, 0x0c, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x34, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x69, 0x72, 0x69, 0x6e, + 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, + 0x62, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x6c, 0x61, 0x73, 0x74, 0x42, 0x65, 0x73, 0x74, 0x42, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x73, 0x6b, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x65, 0x73, 0x74, 0x41, 0x73, 0x6b, 0x12, + 0x20, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x64, 0x42, 0x69, + 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x64, 0x5f, 0x61, 0x73, + 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x64, + 0x41, 0x73, 0x6b, 0x12, 0x35, 0x0a, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x41, 0x0a, 0x1d, 0x6c, 0x61, + 0x73, 0x74, 0x5f, 0x65, 0x71, 0x75, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, + 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x1a, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, + 0x72, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x12, 0x40, 0x0a, + 0x0c, 0x65, 0x71, 0x75, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, + 0x72, 0x65, 0x52, 0x0b, 0x65, 0x71, 0x75, 0x69, 0x74, 0x79, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, + 0x2c, 0x0a, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x5f, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2a, 0x0a, + 0x11, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x68, 0x6f, + 0x72, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x69, 0x73, 0x6b, 0x46, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x69, 0x73, + 0x6b, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x4c, + 0x6f, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x1d, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, + 0x63, 0x68, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x69, 0x73, 0x6b, + 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, + 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0c, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x70, + 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x65, 0x65, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x66, 0x65, 0x65, + 0x53, 0x70, 0x6c, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x74, 0x74, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x2d, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x74, + 0x6f, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, + 0x6e, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x54, 0x6f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x61, 0x73, + 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, + 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x0b, + 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, + 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x14, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x12, 0x65, 0x78, 0x70, 0x69, 0x72, 0x69, 0x6e, 0x67, + 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x70, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, + 0x38, 0x0a, 0x0a, 0x66, 0x65, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x1b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x09, + 0x66, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x53, 0x0a, 0x13, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4d, + 0x61, 0x72, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x11, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x5e, + 0x0a, 0x15, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x61, 0x6c, + 0x63, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, + 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x13, 0x6d, 0x61, 0x72, 0x6b, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x7e, + 0x0a, 0x23, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x63, 0x75, + 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x61, 0x6c, + 0x63, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x4a, + 0x0a, 0x22, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, + 0x63, 0x61, 0x6c, 0x63, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1e, 0x6e, 0x65, 0x78, 0x74, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x61, 0x6c, 0x63, 0x42, 0x26, 0x0a, 0x24, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, + 0x6f, 0x72, 0x22, 0x4e, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x23, 0x0a, + 0x0d, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x22, 0x42, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x2f, 0x0a, + 0x05, 0x70, 0x65, 0x72, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x65, 0x72, 0x70, 0x73, 0x48, 0x00, 0x52, 0x05, 0x70, 0x65, 0x72, 0x70, 0x73, 0x42, 0x06, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3f, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x5b, 0x0a, 0x10, 0x41, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x74, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x01, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0c, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x53, 0x0a, 0x08, 0x54, 0x57, 0x41, 0x50, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x75, 0x6d, 0x5f, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, 0xc7, 0x03, 0x0a, 0x05, 0x50, 0x65, 0x72, 0x70, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4b, 0x0a, 0x13, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, @@ -13442,1203 +14531,1307 @@ var file_vega_snapshot_v1_snapshot_proto_rawDesc = []byte{ 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x3d, - 0x0a, 0x0d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x41, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0x98, 0x01, - 0x0a, 0x10, 0x50, 0x72, 0x69, 0x63, 0x65, 0x64, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x42, 0x0a, 0x0c, 0x66, 0x61, 0x6c, 0x6c, 0x73, 0x5f, 0x62, 0x65, 0x6c, 0x6c, - 0x6f, 0x77, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x73, 0x41, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x0b, 0x66, 0x61, 0x6c, 0x6c, 0x73, - 0x42, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x40, 0x0a, 0x0b, 0x72, 0x69, 0x73, 0x65, 0x73, 0x5f, - 0x61, 0x62, 0x6f, 0x76, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x73, 0x41, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x72, 0x69, - 0x73, 0x65, 0x73, 0x41, 0x62, 0x6f, 0x76, 0x65, 0x22, 0xc4, 0x01, 0x0a, 0x12, 0x54, 0x72, 0x61, - 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, - 0x65, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x66, 0x61, 0x6c, 0x6c, 0x73, - 0x5f, 0x62, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x48, + 0x0a, 0x12, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x77, 0x61, 0x70, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x57, + 0x41, 0x50, 0x44, 0x61, 0x74, 0x61, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x54, 0x77, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x48, 0x0a, 0x12, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x77, 0x61, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x57, 0x41, 0x50, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x77, 0x61, 0x70, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x4f, 0x0a, 0x11, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x73, 0x41, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, - 0x0b, 0x66, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x41, 0x0a, 0x0b, - 0x72, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x73, 0x41, 0x74, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x52, 0x0a, 0x72, 0x69, 0x73, 0x65, 0x73, 0x41, 0x62, 0x6f, 0x76, 0x65, 0x22, - 0x40, 0x0a, 0x0e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x41, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x73, 0x22, 0x62, 0x0a, 0x0e, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x73, 0x41, 0x74, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x41, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x52, 0x07, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x73, 0x22, 0xf7, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x70, 0x72, 0x69, 0x63, 0x65, 0x64, 0x5f, - 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x64, 0x53, 0x74, 0x6f, 0x70, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x10, 0x70, 0x72, 0x69, 0x63, 0x65, 0x64, 0x53, 0x74, 0x6f, - 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x56, 0x0a, 0x14, 0x74, 0x72, 0x61, 0x69, 0x6c, - 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, - 0x67, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x12, 0x74, 0x72, 0x61, - 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, - 0x40, 0x0a, 0x0c, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x30, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x6b, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x6b, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x73, 0x22, 0xad, 0x03, 0x0a, 0x10, 0x53, 0x4c, 0x41, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x62, 0x6f, 0x6e, 0x64, 0x5f, 0x70, - 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x62, 0x6f, 0x6e, 0x64, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, - 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, - 0x65, 0x78, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x45, 0x78, 0x69, 0x74, 0x50, 0x65, 0x6e, - 0x61, 0x6c, 0x74, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x6d, 0x61, 0x78, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, - 0x12, 0x46, 0x0a, 0x20, 0x6e, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x6e, 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, - 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x6e, 0x6f, 0x6e, 0x50, - 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x6f, 0x6e, 0x64, 0x50, 0x65, - 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x4d, 0x61, 0x78, 0x12, 0x4a, 0x0a, 0x22, 0x6e, 0x6f, 0x6e, 0x5f, - 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x6e, 0x64, - 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x5f, 0x73, 0x6c, 0x6f, 0x70, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x1e, 0x6e, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x6e, 0x63, 0x65, 0x42, 0x6f, 0x6e, 0x64, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x53, - 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x74, 0x6f, - 0x5f, 0x63, 0x63, 0x79, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x54, 0x6f, 0x43, 0x63, 0x79, 0x56, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x23, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x1f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x46, 0x65, 0x65, 0x43, 0x61, - 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x65, - 0x70, 0x22, 0x80, 0x03, 0x0a, 0x10, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x73, 0x70, - 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x0b, - 0x73, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x48, 0x0a, 0x0f, 0x73, - 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x0a, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6f, 0x72, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, - 0x64, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x73, 0x6c, 0x61, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x73, 0x52, 0x10, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x73, 0x22, 0x3d, 0x0a, 0x0d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x41, 0x74, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x10, 0x50, 0x72, 0x69, 0x63, 0x65, 0x64, 0x53, 0x74, 0x6f, + 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x42, 0x0a, 0x0c, 0x66, 0x61, 0x6c, 0x6c, 0x73, + 0x5f, 0x62, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x41, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x0b, + 0x66, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x40, 0x0a, 0x0b, 0x72, + 0x69, 0x73, 0x65, 0x73, 0x5f, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x41, 0x74, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x52, 0x0a, 0x72, 0x69, 0x73, 0x65, 0x73, 0x41, 0x62, 0x6f, 0x76, 0x65, 0x22, 0xc4, 0x01, + 0x0a, 0x12, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x65, + 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, + 0x61, 0x73, 0x74, 0x53, 0x65, 0x65, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0c, + 0x66, 0x61, 0x6c, 0x6c, 0x73, 0x5f, 0x62, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x73, 0x41, 0x74, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x52, 0x0b, 0x66, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x65, 0x6c, 0x6c, 0x6f, + 0x77, 0x12, 0x41, 0x0a, 0x0b, 0x72, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x61, 0x62, 0x6f, 0x76, 0x65, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x73, 0x41, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x72, 0x69, 0x73, 0x65, 0x73, 0x41, + 0x62, 0x6f, 0x76, 0x65, 0x22, 0x40, 0x0a, 0x0e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x41, 0x74, + 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0x62, 0x0a, 0x0e, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x73, 0x41, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x3a, + 0x0a, 0x07, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x41, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x52, 0x07, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x73, 0x22, 0xf7, 0x01, 0x0a, 0x0a, 0x53, + 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x73, 0x74, 0x6f, + 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0a, + 0x73, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x64, + 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x10, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x64, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x56, 0x0a, 0x14, + 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, + 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x52, 0x12, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x22, 0x40, 0x0a, 0x0c, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x6b, 0x65, 0x64, 0x5f, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x6b, 0x65, 0x64, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0xad, 0x03, 0x0a, 0x10, 0x53, 0x4c, 0x41, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x62, + 0x6f, 0x6e, 0x64, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x5f, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x62, 0x6f, 0x6e, 0x64, 0x50, 0x65, + 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x65, + 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x45, 0x78, + 0x69, 0x74, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x61, 0x78, + 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x46, 0x65, 0x65, 0x12, 0x46, 0x0a, 0x20, 0x6e, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x5f, 0x70, 0x65, + 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x1c, 0x6e, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x42, + 0x6f, 0x6e, 0x64, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x4d, 0x61, 0x78, 0x12, 0x4a, 0x0a, + 0x22, 0x6e, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, + 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x5f, 0x73, 0x6c, + 0x6f, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1e, 0x6e, 0x6f, 0x6e, 0x50, 0x65, + 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x6f, 0x6e, 0x64, 0x50, 0x65, 0x6e, + 0x61, 0x6c, 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x13, 0x73, 0x74, 0x61, + 0x6b, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x63, 0x79, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x54, 0x6f, 0x43, + 0x63, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x23, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, + 0x46, 0x65, 0x65, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, + 0x6d, 0x65, 0x53, 0x74, 0x65, 0x70, 0x22, 0x80, 0x03, 0x0a, 0x10, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, + 0x3f, 0x0a, 0x0c, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x52, 0x0b, 0x73, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, + 0x12, 0x48, 0x0a, 0x0f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x73, 0x65, 0x74, 0x74, + 0x6c, 0x65, 0x64, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x4c, 0x41, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x10, 0x73, 0x6c, 0x61, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x22, 0x5e, 0x0a, 0x0a, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, - 0x72, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x10, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x73, 0x22, 0xe7, 0x01, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x62, - 0x75, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x0f, - 0x62, 0x75, 0x79, 0x5f, 0x73, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x75, 0x79, 0x53, 0x75, 0x6d, 0x50, 0x72, 0x6f, - 0x64, 0x75, 0x63, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x73, 0x75, 0x6d, - 0x5f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x73, 0x65, 0x6c, 0x6c, 0x53, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x1e, - 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x22, 0xb7, - 0x01, 0x0a, 0x0f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, - 0x38, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x86, 0x02, 0x0a, 0x12, 0x50, 0x61, 0x72, - 0x74, 0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, - 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x14, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, - 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x12, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x14, + 0x31, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x0a, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x73, 0x6c, 0x61, 0x5f, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x4c, 0x41, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x10, 0x73, 0x6c, 0x61, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x5e, 0x0a, 0x0a, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x11, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x22, 0x97, 0x02, 0x0a, 0x08, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x03, 0x62, 0x75, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x62, 0x75, 0x79, 0x5f, 0x73, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x75, 0x79, 0x53, + 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x65, 0x6c, + 0x6c, 0x5f, 0x73, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x6c, 0x6c, 0x53, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x74, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x11, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x22, 0xb7, 0x01, 0x0a, 0x0f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4d, + 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0e, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x86, 0x02, + 0x0a, 0x12, 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x14, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, + 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x12, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x35, 0x0a, 0x14, 0x6c, 0x6f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x01, 0x52, 0x12, 0x6c, 0x6f, 0x77, 0x65, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x65, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x64, + 0x65, 0x64, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x02, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x64, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x88, + 0x01, 0x01, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x12, 0x6c, 0x6f, - 0x77, 0x65, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x76, 0x6f, - 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x0c, 0x74, 0x72, - 0x61, 0x64, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x17, 0x0a, - 0x15, 0x5f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x73, - 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x42, - 0x10, 0x0a, 0x0e, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x22, 0xee, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x5f, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x61, 0x73, - 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x16, 0x6c, 0x61, - 0x73, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, - 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x39, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, - 0x65, 0x73, 0x22, 0x56, 0x0a, 0x13, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, - 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, - 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, - 0x29, 0x0a, 0x10, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x73, 0x65, 0x74, 0x74, 0x6c, - 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x0f, 0x53, - 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x12, 0x19, - 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x53, 0x69, 0x7a, - 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x08, 0x41, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, - 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0a, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, - 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x18, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x74, 0x6f, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x6f, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x4e, 0x65, 0x77, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x2b, 0x0a, 0x12, 0x72, 0x65, - 0x61, 0x64, 0x79, 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x6f, 0x45, - 0x6e, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x7b, 0x0a, 0x15, 0x52, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x73, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x73, - 0x12, 0x62, 0x0a, 0x18, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x70, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x52, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x52, 0x16, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, - 0x79, 0x6f, 0x75, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x46, 0x0a, 0x0e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x70, 0x61, 0x79, 0x6f, - 0x75, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x52, 0x0d, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x73, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x22, 0xfc, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, - 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, - 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x12, 0x54, 0x0a, 0x13, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, - 0x72, 0x74, 0x79, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, 0x72, 0x74, 0x79, - 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x11, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x61, - 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x42, 0x0a, 0x12, 0x52, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x73, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, - 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, - 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x04, 0x0a, 0x0a, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x63, - 0x61, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x61, 0x6e, - 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x67, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x16, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x1b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x66, - 0x72, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x46, 0x72, - 0x6f, 0x6d, 0x12, 0x3d, 0x0a, 0x1b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x73, 0x70, - 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x70, 0x65, 0x72, - 0x70, 0x73, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x50, 0x65, 0x72, 0x70, 0x73, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x22, 0x94, 0x04, 0x0a, 0x0e, 0x56, 0x6f, 0x74, 0x65, 0x53, 0x70, 0x61, 0x6d, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4c, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x74, - 0x6f, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, + 0x72, 0x65, 0x73, 0x74, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0xee, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x74, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, + 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, + 0x5b, 0x0a, 0x16, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, + 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x39, 0x0a, 0x06, + 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x56, 0x6f, 0x74, - 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x79, 0x54, 0x6f, 0x56, - 0x6f, 0x74, 0x65, 0x12, 0x44, 0x0a, 0x0e, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x61, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x0d, 0x62, 0x61, 0x6e, 0x6e, - 0x65, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x0d, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x1a, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x17, 0x72, 0x65, 0x63, - 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2e, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, - 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x15, 0x6d, 0x69, 0x6e, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x73, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x60, 0x0a, 0x16, 0x50, 0x61, 0x72, - 0x74, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x43, 0x0a, 0x11, 0x50, - 0x61, 0x72, 0x74, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x22, 0x44, 0x0a, 0x10, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x47, 0x0a, 0x19, 0x53, 0x70, 0x61, 0x6d, 0x50, 0x61, - 0x72, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0xc2, 0x02, 0x0a, 0x10, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x70, 0x61, 0x6d, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x74, - 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, + 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x22, 0x56, 0x0a, 0x13, 0x4c, 0x61, 0x73, 0x74, 0x53, + 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, + 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, + 0x61, 0x72, 0x74, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x5f, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, + 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x94, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x72, + 0x61, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, + 0x65, 0x77, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6e, + 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x08, 0x41, 0x70, 0x70, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, + 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0a, 0x45, 0x70, 0x6f, 0x63, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x18, 0x72, 0x65, 0x61, 0x64, 0x79, + 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x72, 0x65, 0x61, 0x64, 0x79, + 0x54, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x4e, 0x65, 0x77, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, + 0x2b, 0x0a, 0x12, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x6e, 0x64, 0x5f, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x72, 0x65, 0x61, + 0x64, 0x79, 0x54, 0x6f, 0x45, 0x6e, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x7b, 0x0a, 0x15, + 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, + 0x79, 0x6f, 0x75, 0x74, 0x73, 0x12, 0x62, 0x0a, 0x18, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x64, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x70, 0x61, 0x79, 0x6f, 0x75, + 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, 0x79, 0x6f, 0x75, + 0x74, 0x52, 0x16, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x16, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, + 0x79, 0x6f, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x61, 0x79, 0x6f, 0x75, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x5f, 0x70, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x70, 0x61, 0x6d, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x54, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0e, 0x62, 0x61, 0x6e, 0x6e, - 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x52, 0x0d, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x22, 0xfc, 0x01, + 0x0a, 0x0d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, + 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x54, 0x0a, 0x13, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x11, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x42, 0x0a, 0x12, + 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x94, 0x04, 0x0a, 0x0a, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x61, + 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x2a, + 0x0a, 0x11, 0x63, 0x61, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x61, 0x6e, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x67, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, + 0x64, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x1b, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x18, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x3d, 0x0a, 0x1b, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x5f, 0x70, 0x65, 0x72, 0x70, 0x73, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x50, 0x65, 0x72, 0x70, 0x73, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x94, 0x04, 0x0a, 0x0e, 0x56, 0x6f, 0x74, 0x65, + 0x53, 0x70, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4c, 0x0a, 0x0d, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x5f, 0x74, 0x6f, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0b, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x54, 0x6f, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x44, 0x0a, 0x0e, 0x62, 0x61, 0x6e, 0x6e, + 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x0d, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, - 0x68, 0x53, 0x65, 0x71, 0x22, 0x70, 0x0a, 0x0a, 0x4e, 0x6f, 0x74, 0x61, 0x72, 0x79, 0x53, 0x69, - 0x67, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, - 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x47, 0x0a, 0x06, 0x4e, 0x6f, 0x74, 0x61, 0x72, 0x79, - 0x12, 0x3d, 0x0a, 0x0b, 0x6e, 0x6f, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x73, 0x69, 0x67, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x74, 0x61, 0x72, 0x79, 0x53, - 0x69, 0x67, 0x73, 0x52, 0x0a, 0x6e, 0x6f, 0x74, 0x61, 0x72, 0x79, 0x53, 0x69, 0x67, 0x73, 0x22, - 0x6d, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x12, 0x53, 0x0a, 0x11, 0x70, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x18, 0x01, + 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x1a, 0x72, 0x65, 0x63, 0x65, + 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x52, 0x17, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, + 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2e, 0x0a, 0x13, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x63, 0x72, + 0x65, 0x61, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x53, 0x65, 0x71, 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x6f, 0x74, + 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6d, 0x69, 0x6e, 0x56, 0x6f, 0x74, 0x69, + 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x60, + 0x0a, 0x16, 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x56, + 0x6f, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x43, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x62, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, + 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6a, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x6a, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x47, 0x0a, 0x19, 0x53, + 0x70, 0x61, 0x6d, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xc2, 0x02, 0x0a, 0x10, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x53, + 0x70, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6d, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x0c, 0x70, 0x61, 0x72, 0x74, 0x79, 0x54, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x44, 0x0a, + 0x0e, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x50, + 0x61, 0x72, 0x74, 0x79, 0x52, 0x0d, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, + 0x72, 0x74, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2a, 0x0a, + 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, + 0x65, 0x71, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x22, 0x70, 0x0a, 0x0a, 0x4e, 0x6f, 0x74, + 0x61, 0x72, 0x79, 0x53, 0x69, 0x67, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x73, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, + 0x67, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x47, 0x0a, 0x06, 0x4e, + 0x6f, 0x74, 0x61, 0x72, 0x79, 0x12, 0x3d, 0x0a, 0x0b, 0x6e, 0x6f, 0x74, 0x61, 0x72, 0x79, 0x5f, + 0x73, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, + 0x74, 0x61, 0x72, 0x79, 0x53, 0x69, 0x67, 0x73, 0x52, 0x0a, 0x6e, 0x6f, 0x74, 0x61, 0x72, 0x79, + 0x53, 0x69, 0x67, 0x73, 0x22, 0x6d, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x12, 0x53, + 0x0a, 0x11, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, + 0x6b, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x72, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x52, 0x10, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x65, 0x64, 0x22, 0x67, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x4f, 0x0a, 0x0f, 0x70, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x56, 0x65, 0x72, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x70, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x22, 0x67, - 0x0a, 0x14, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x4f, 0x0a, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x85, 0x02, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x72, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x76, - 0x65, 0x67, 0x61, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, - 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x78, - 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x49, 0x64, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x5e, 0x0a, 0x1a, 0x45, 0x74, 0x68, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, - 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, - 0x82, 0x01, 0x0a, 0x16, 0x45, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, - 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x68, 0x0a, 0x1c, 0x70, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x63, - 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, - 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x19, 0x70, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x22, 0xaf, 0x01, 0x0a, 0x15, 0x45, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x21, - 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x17, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x70, 0x65, 0x63, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x9b, 0x01, 0x0a, 0x12, 0x50, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, - 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x6e, 0x65, 0x77, - 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x65, 0x77, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x11, 0x6e, 0x65, 0x77, - 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6e, 0x65, 0x77, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x22, 0xb8, 0x01, 0x0a, 0x1a, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, - 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x1f, - 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x6c, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, - 0xdd, 0x04, 0x0a, 0x08, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x47, 0x0a, 0x0e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6b, - 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x4b, 0x65, 0x79, 0x73, 0x12, 0x5f, 0x0a, 0x19, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, - 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x70, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x14, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, - 0x63, 0x65, 0x12, 0x71, 0x0a, 0x1e, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x65, 0x67, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x70, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x85, 0x02, 0x0a, + 0x14, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x72, 0x50, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x65, 0x67, 0x61, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x13, 0x0a, 0x05, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x78, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x64, 0x0a, 0x0c, 0x4c, 0x32, 0x45, 0x74, 0x68, 0x4f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x73, 0x12, 0x54, 0x0a, 0x14, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, + 0x5f, 0x65, 0x74, 0x68, 0x5f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x45, 0x74, 0x68, + 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x73, 0x52, 0x11, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, + 0x45, 0x74, 0x68, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x73, 0x22, 0xd5, 0x01, 0x0a, 0x11, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x45, 0x74, 0x68, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x4b, 0x0a, 0x0a, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x74, 0x68, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x0b, 0x63, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x22, 0x5e, 0x0a, 0x1a, 0x45, 0x74, 0x68, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, + 0x6d, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x16, 0x45, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x68, 0x0a, + 0x1c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x19, 0x70, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x61, 0x6c, + 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xaf, 0x01, 0x0a, 0x15, 0x45, 0x74, 0x68, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x70, 0x65, 0x63, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x9b, 0x01, 0x0a, 0x12, 0x50, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, + 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x11, + 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6e, 0x65, 0x77, 0x50, 0x75, 0x62, 0x4b, + 0x65, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xb8, 0x01, 0x0a, 0x1a, 0x50, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x6c, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0xdd, 0x04, 0x0a, 0x08, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, + 0x47, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x5f, 0x0a, 0x19, 0x70, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, - 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1b, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x16, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x71, 0x0a, 0x1e, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1b, 0x70, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x6f, 0x70, 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x73, 0x0a, + 0x1f, 0x75, 0x6e, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, - 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x0a, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x73, 0x0a, 0x1f, 0x75, 0x6e, - 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, - 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x74, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1c, 0x75, 0x6e, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x1c, 0x75, 0x6e, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x45, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0xde, 0x01, 0x0a, 0x11, 0x54, 0x6f, 0x70, 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x65, 0x0a, 0x12, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x36, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x52, 0x43, 0x32, - 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x11, 0x70, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x62, 0x0a, 0x11, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, - 0x64, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x10, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x22, 0xb3, 0x01, 0x0a, 0x24, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x52, 0x43, 0x32, - 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, + 0x6e, 0x73, 0x22, 0xde, 0x01, 0x0a, 0x11, 0x54, 0x6f, 0x70, 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x65, 0x0a, 0x12, 0x70, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, + 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x11, 0x70, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, + 0x62, 0x0a, 0x11, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, + 0x73, 0x75, 0x65, 0x64, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, + 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x52, 0x10, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x24, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, + 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x17, 0x0a, 0x07, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, + 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, + 0x73, 0x65, 0x71, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x53, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x22, 0x9e, 0x01, 0x0a, 0x23, 0x49, 0x73, + 0x73, 0x75, 0x65, 0x64, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, + 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, - 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x22, 0x9e, 0x01, 0x0a, 0x23, 0x49, 0x73, 0x73, 0x75, 0x65, - 0x64, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, - 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xf2, 0x03, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4a, 0x0a, 0x10, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, - 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x2e, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, - 0x46, 0x0a, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x77, 0x69, - 0x74, 0x68, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x6b, - 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1c, 0x6c, 0x61, 0x73, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, - 0x52, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x74, 0x68, 0x5f, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x65, 0x74, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x12, 0x4f, 0x0a, 0x11, 0x68, 0x65, 0x61, - 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, - 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x10, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, - 0x65, 0x61, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x6f, - 0x77, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x73, - 0x63, 0x6f, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x0c, - 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0xb9, 0x01, 0x0a, - 0x10, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, - 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x65, - 0x78, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x65, - 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x37, 0x0a, 0x18, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x78, 0x74, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x15, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4e, 0x65, 0x78, 0x74, 0x48, - 0x61, 0x73, 0x68, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x73, 0x69, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x08, 0x52, 0x09, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x67, 0x73, 0x22, 0x99, 0x02, 0x0a, 0x10, 0x50, 0x65, 0x72, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2b, 0x0a, - 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x05, 0x76, 0x6f, 0x74, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x56, 0x6f, 0x74, - 0x65, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x45, 0x6c, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x22, 0x6c, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x54, 0x0a, 0x14, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, - 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x12, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x65, 0x72, 0x66, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x22, 0xae, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, - 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x78, - 0x46, 0x65, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x68, 0x61, 0x70, 0x65, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x78, - 0x53, 0x68, 0x61, 0x70, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x54, 0x6f, 0x4f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x49, 0x64, 0x22, 0x68, 0x0a, 0x1a, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x70, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x80, 0x01, - 0x0a, 0x1f, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x79, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, + 0x11, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xf2, 0x03, 0x0a, 0x0e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4a, 0x0a, + 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x11, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x12, 0x46, 0x0a, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x72, + 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1c, 0x6c, 0x61, + 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x74, + 0x68, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, + 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x65, 0x74, 0x68, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x12, 0x4f, 0x0a, 0x11, + 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, + 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, + 0x62, 0x65, 0x61, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x10, 0x68, 0x65, 0x61, + 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x27, 0x0a, + 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, + 0x67, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x6f, 0x72, + 0x65, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, + 0xb9, 0x01, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x54, 0x72, 0x61, + 0x63, 0x6b, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x37, 0x0a, 0x18, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4e, 0x65, + 0x78, 0x74, 0x48, 0x61, 0x73, 0x68, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x0a, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x69, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x08, + 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x67, 0x73, 0x22, 0x99, 0x02, 0x0a, 0x10, + 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x56, 0x6f, 0x74, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x5f, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x45, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x6c, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x12, + 0x54, 0x0a, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x65, 0x72, + 0x66, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x52, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x65, 0x72, 0x66, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0xae, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x17, 0x0a, + 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x68, + 0x61, 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x6d, 0x61, 0x78, 0x53, 0x68, 0x61, 0x70, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x3b, 0x0a, 0x1a, + 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x17, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x54, 0x6f, 0x4f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x68, 0x0a, 0x1a, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x11, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x22, 0x48, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0x77, 0x0a, 0x16, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x4f, 0x72, + 0x22, 0x80, 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x49, 0x64, 0x22, 0x7f, 0x0a, 0x13, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4b, 0x0a, 0x14, 0x6c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0x77, 0x0a, + 0x16, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x0b, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x7f, 0x0a, 0x13, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4b, 0x0a, + 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0xa0, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x72, 0x75, + 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x41, 0x0a, 0x0e, 0x4c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x22, 0x86, 0x02, + 0x0a, 0x15, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x15, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x73, + 0x6c, 0x61, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x53, 0x4c, 0x41, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x52, 0x13, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x6c, 0x61, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, + 0x74, 0x6f, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x54, 0x6f, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x2c, + 0x0a, 0x12, 0x62, 0x6f, 0x6e, 0x64, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x5f, 0x73, + 0x6c, 0x6f, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x62, 0x6f, 0x6e, 0x64, + 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, + 0x62, 0x6f, 0x6e, 0x64, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x78, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x6f, 0x6e, 0x64, 0x50, 0x65, 0x6e, 0x61, + 0x6c, 0x74, 0x79, 0x4d, 0x61, 0x78, 0x22, 0x75, 0x0a, 0x18, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x56, 0x32, 0x50, 0x61, 0x69, 0x64, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, + 0x3c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x61, 0x69, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0x81, 0x01, + 0x0a, 0x15, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x49, 0x64, 0x22, 0xa0, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x72, 0x75, 0x6e, 0x6e, - 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x72, 0x75, 0x6e, 0x6e, 0x69, - 0x6e, 0x67, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x38, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, - 0x72, 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x41, 0x0a, 0x0e, 0x4c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, - 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, - 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x22, 0x86, 0x02, 0x0a, 0x15, 0x4c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, - 0x64, 0x12, 0x50, 0x0a, 0x15, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x6c, 0x61, 0x5f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x53, 0x4c, 0x41, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x13, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x6c, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x74, 0x6f, 0x5f, - 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x54, 0x6f, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x62, - 0x6f, 0x6e, 0x64, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x5f, 0x73, 0x6c, 0x6f, 0x70, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x62, 0x6f, 0x6e, 0x64, 0x50, 0x65, 0x6e, - 0x61, 0x6c, 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x6f, 0x6e, - 0x64, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x6f, 0x6e, 0x64, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, - 0x4d, 0x61, 0x78, 0x22, 0x75, 0x0a, 0x18, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x56, 0x32, 0x50, 0x61, 0x69, 0x64, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, - 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x69, - 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x73, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x15, 0x4c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, - 0x64, 0x12, 0x4b, 0x0a, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x97, - 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x50, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x1c, - 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x12, 0x4b, 0x0a, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x1a, 0x70, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x6e, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, - 0x64, 0x12, 0x28, 0x0a, 0x10, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x65, 0x70, 0x6f, - 0x63, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x70, - 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x70, - 0x61, 0x72, 0x74, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x6e, 0x63, 0x65, 0x50, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x13, 0x70, 0x65, - 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, - 0x79, 0x22, 0x93, 0x05, 0x0a, 0x1e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, - 0x32, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x65, 0x72, 0x50, - 0x61, 0x72, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x4f, 0x0a, 0x25, 0x65, 0x6c, - 0x61, 0x70, 0x73, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x65, 0x65, 0x74, 0x69, - 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x61, 0x5f, 0x64, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x20, 0x65, 0x6c, 0x61, 0x70, 0x73, - 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x61, - 0x44, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x15, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x43, 0x0a, 0x1e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x65, - 0x6e, 0x61, 0x6c, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x65, 0x70, 0x6f, 0x63, - 0x68, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x65, 0x64, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x69, 0x65, 0x73, 0x50, 0x65, 0x72, 0x45, - 0x70, 0x6f, 0x63, 0x68, 0x12, 0x44, 0x0a, 0x1f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x6e, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x70, 0x65, - 0x72, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1b, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x69, - 0x65, 0x73, 0x50, 0x65, 0x72, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x4a, 0x0a, 0x23, 0x6c, 0x61, - 0x73, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x62, 0x6f, 0x6f, - 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x66, 0x54, 0x69, 0x6d, 0x65, - 0x4f, 0x6e, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x33, 0x0a, 0x16, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x70, 0x6f, 0x63, - 0x68, 0x46, 0x65, 0x65, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x17, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x5f, 0x70, - 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6c, 0x61, - 0x73, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x6f, 0x6e, 0x64, 0x50, 0x65, 0x6e, 0x61, 0x6c, - 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, - 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x12, 0x30, 0x0a, 0x14, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x6f, - 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x62, 0x75, 0x79, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, - 0x75, 0x79, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, - 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x13, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x53, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x9a, 0x02, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x1b, 0x0a, - 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x72, 0x75, - 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x72, 0x75, 0x6e, - 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, - 0x63, 0x6f, 0x72, 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x1a, - 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x65, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x19, 0x66, 0x65, 0x65, - 0x5f, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x66, 0x65, - 0x65, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, - 0x53, 0x74, 0x65, 0x70, 0x22, 0xfd, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x56, 0x32, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, - 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x12, 0x4d, 0x0a, 0x09, 0x62, 0x69, 0x64, 0x5f, 0x63, 0x61, - 0x63, 0x68, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x08, 0x62, 0x69, 0x64, - 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x4d, 0x0a, 0x09, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x61, 0x63, - 0x68, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x62, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x08, 0x61, 0x73, 0x6b, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x16, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x69, 0x6e, - 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x12, - 0x4d, 0x0a, 0x11, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, - 0x78, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x0f, 0x6e, - 0x65, 0x78, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x50, - 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x56, 0x61, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x22, 0xfc, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x5d, 0x0a, 0x12, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, - 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x43, 0x0a, 0x1e, 0x72, 0x6f, - 0x75, 0x6e, 0x64, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x61, 0x6e, 0x69, - 0x6e, 0x67, 0x66, 0x75, 0x6c, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x1b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x4d, - 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x66, 0x75, 0x6c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, - 0x5c, 0x0a, 0x1c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x2c, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x72, 0x0a, - 0x0f, 0x4e, 0x65, 0x78, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, - 0x0a, 0x0c, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x22, 0xc0, 0x01, 0x0a, 0x0d, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x72, 0x61, 0x63, - 0x6b, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x0f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, - 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x0e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x5b, 0x0a, 0x15, 0x74, 0x61, 0x6b, 0x65, 0x72, - 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6b, 0x65, - 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, - 0x13, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, - 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x74, 0x0a, 0x16, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x50, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x80, 0x02, 0x0a, 0x1d, 0x45, - 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x54, 0x6f, 0x70, 0x6f, - 0x6c, 0x6f, 0x67, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x56, 0x0a, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x50, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x10, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x50, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4c, - 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, - 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, - 0x73, 0x65, 0x65, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x65, 0x65, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xbc, 0x02, - 0x0a, 0x1c, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x54, - 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x51, - 0x0a, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x0e, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x73, 0x12, 0x62, 0x0a, 0x15, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x54, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x52, 0x13, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x53, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, - 0x65, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x10, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x72, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, - 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x16, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x65, 0x64, 0x54, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa5, 0x04, 0x0a, - 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x12, 0x21, 0x0a, 0x0c, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x48, - 0x0a, 0x0c, 0x74, 0x78, 0x5f, 0x61, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x0a, 0x74, 0x78, - 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4a, 0x0a, 0x0d, 0x74, 0x69, 0x64, 0x5f, - 0x61, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x97, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, + 0x32, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, + 0x5a, 0x0a, 0x1c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x1a, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x17, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x50, 0x65, 0x72, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x64, + 0x0a, 0x15, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x65, + 0x72, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x50, 0x65, 0x72, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, + 0x13, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x65, 0x72, 0x50, + 0x61, 0x72, 0x74, 0x79, 0x22, 0x93, 0x05, 0x0a, 0x1e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x56, 0x32, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x50, + 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x4f, 0x0a, + 0x25, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x65, + 0x65, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x61, 0x5f, 0x64, 0x75, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x20, 0x65, 0x6c, + 0x61, 0x70, 0x73, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, + 0x53, 0x6c, 0x61, 0x44, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x32, + 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x1e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, + 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1b, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x69, 0x65, 0x73, 0x50, + 0x65, 0x72, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x44, 0x0a, 0x1f, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x69, 0x65, 0x73, + 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x1b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x50, 0x65, 0x6e, 0x61, + 0x6c, 0x74, 0x69, 0x65, 0x73, 0x50, 0x65, 0x72, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x4a, 0x0a, + 0x23, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x66, 0x72, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, + 0x62, 0x6f, 0x6f, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x6c, 0x61, 0x73, 0x74, + 0x45, 0x70, 0x6f, 0x63, 0x68, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x66, 0x54, + 0x69, 0x6d, 0x65, 0x4f, 0x6e, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x33, 0x0a, 0x16, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x6e, 0x61, + 0x6c, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x46, 0x65, 0x65, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x12, 0x35, + 0x0a, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x6e, + 0x64, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x14, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x6f, 0x6e, 0x64, 0x50, 0x65, + 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x62, 0x75, 0x79, 0x73, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x12, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x42, 0x75, 0x79, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x6c, 0x6c, 0x73, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x9a, 0x02, 0x0a, 0x11, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, + 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, + 0x17, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, + 0x3b, 0x0a, 0x1a, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x65, 0x65, 0x44, 0x69, 0x73, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x19, + 0x66, 0x65, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x16, 0x66, 0x65, 0x65, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x69, 0x6d, 0x65, 0x53, 0x74, 0x65, 0x70, 0x22, 0xfd, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x56, 0x32, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x12, + 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, + 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x68, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x12, 0x4d, 0x0a, 0x09, 0x62, 0x69, 0x64, + 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x50, + 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x08, + 0x62, 0x69, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x4d, 0x0a, 0x09, 0x61, 0x73, 0x6b, 0x5f, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x08, 0x61, + 0x73, 0x6b, 0x43, 0x61, 0x63, 0x68, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x16, 0x46, 0x6c, 0x6f, 0x61, + 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x12, 0x4d, 0x0a, 0x11, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, + 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x52, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x12, 0x50, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x5d, + 0x0a, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, + 0x6f, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x11, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x43, 0x0a, + 0x1e, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x65, + 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x66, 0x75, 0x6c, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x53, 0x69, 0x6e, + 0x63, 0x65, 0x4d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x66, 0x75, 0x6c, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x22, 0x5c, 0x0a, 0x1c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x22, 0x72, 0x0a, 0x0f, 0x4e, 0x65, 0x78, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x22, 0xc8, 0x02, 0x0a, 0x0d, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x0f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x0e, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x5b, 0x0a, 0x15, 0x74, 0x61, + 0x6b, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x61, 0x6b, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x52, 0x13, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x25, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x74, 0x61, 0x6b, 0x65, + 0x72, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x54, 0x6f, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x4e, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x20, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x6f, 0x50, 0x61, 0x72, 0x74, 0x79, 0x54, 0x61, 0x6b, 0x65, + 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, + 0x74, 0x0a, 0x16, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, + 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, + 0x69, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x80, 0x02, 0x0a, 0x1d, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x73, 0x12, 0x56, 0x0a, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, + 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x09, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, + 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x74, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x65, 0x6e, 0x5f, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, + 0x65, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xbc, 0x02, 0x0a, 0x1c, 0x45, 0x52, 0x43, + 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, + 0x67, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x51, 0x0a, 0x0f, 0x70, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, + 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x70, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x62, 0x0a, 0x15, + 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x52, 0x43, + 0x32, 0x30, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x13, 0x70, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x53, 0x65, 0x74, + 0x12, 0x2b, 0x0a, 0x11, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x77, 0x69, 0x74, + 0x6e, 0x65, 0x73, 0x73, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x38, 0x0a, + 0x18, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x16, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x65, 0x64, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa5, 0x04, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6f, + 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0b, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x48, 0x0a, 0x0c, 0x74, 0x78, 0x5f, + 0x61, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x41, - 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x0b, 0x74, 0x69, 0x64, 0x41, 0x74, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x35, 0x0a, 0x06, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x50, 0x61, - 0x72, 0x74, 0x79, 0x52, 0x06, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x42, 0x0a, 0x0a, 0x70, - 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x09, 0x70, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x3f, 0x0a, 0x09, 0x70, 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, - 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x70, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x6c, 0x61, - 0x73, 0x74, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x54, - 0x0a, 0x14, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x5f, 0x61, 0x74, 0x5f, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x66, 0x73, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x52, 0x11, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x66, 0x73, 0x41, 0x74, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x22, 0x39, 0x0a, 0x0b, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x50, 0x61, - 0x72, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x74, - 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x22, - 0x84, 0x03, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x41, 0x0a, 0x1e, 0x73, 0x70, 0x61, 0x6d, 0x5f, 0x70, 0x6f, - 0x77, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x61, 0x73, 0x74, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x73, - 0x70, 0x61, 0x6d, 0x50, 0x6f, 0x77, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x50, 0x61, - 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x70, 0x61, 0x6d, - 0x5f, 0x70, 0x6f, 0x77, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x73, 0x70, 0x61, 0x6d, 0x50, 0x6f, 0x77, 0x44, 0x69, - 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x33, 0x0a, 0x16, 0x73, 0x70, 0x61, 0x6d, - 0x5f, 0x70, 0x6f, 0x77, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x70, 0x61, 0x6d, 0x50, 0x6f, - 0x77, 0x48, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, - 0x1f, 0x73, 0x70, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x77, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x78, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x73, 0x70, 0x61, 0x6d, 0x50, 0x6f, 0x77, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x54, 0x78, 0x50, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x43, 0x0a, 0x1e, 0x73, 0x70, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x77, 0x5f, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, - 0x6c, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x73, 0x70, 0x61, 0x6d, 0x50, - 0x6f, 0x77, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x66, 0x66, - 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x66, 0x72, 0x6f, 0x6d, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x6e, 0x74, 0x69, - 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x58, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, - 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x44, 0x0a, 0x09, 0x70, 0x6f, - 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x0a, 0x74, 0x78, 0x41, 0x74, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x4a, 0x0a, 0x0d, 0x74, 0x69, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x52, 0x0b, 0x74, 0x69, 0x64, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x35, 0x0a, 0x06, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x06, + 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x42, 0x0a, 0x0a, 0x70, 0x6f, 0x77, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x09, 0x70, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x70, 0x6f, + 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x70, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x22, 0x8c, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x50, 0x0a, - 0x0b, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, - 0x6b, 0x50, 0x61, 0x72, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6f, 0x72, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, - 0x85, 0x01, 0x0a, 0x1d, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x50, - 0x61, 0x72, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6f, 0x72, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x65, 0x6e, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x65, 0x65, - 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x13, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x12, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x44, 0x69, 0x66, - 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x22, 0x52, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x36, 0x0a, 0x08, 0x4e, - 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x22, 0x5b, 0x0a, 0x11, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x66, 0x73, - 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x2e, 0x0a, 0x04, 0x72, 0x65, 0x66, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x66, 0x52, 0x04, 0x72, 0x65, 0x66, 0x73, - 0x22, 0xcb, 0x01, 0x0a, 0x18, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x4f, 0x0a, - 0x10, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x5e, - 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, - 0x65, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x10, 0x61, 0x63, - 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x7d, - 0x0a, 0x1f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x12, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x72, 0x65, 0x6c, 0x65, - 0x61, 0x73, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, - 0x65, 0x67, 0x61, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x61, 0x67, 0x22, 0x35, 0x0a, - 0x05, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x2c, 0x0a, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x05, 0x74, - 0x65, 0x61, 0x6d, 0x73, 0x22, 0x8f, 0x02, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, - 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x08, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, - 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x55, 0x72, 0x6c, - 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, - 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, - 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x22, 0x6e, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x68, 0x69, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, - 0x1b, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x74, 0x12, 0x28, 0x0a, 0x10, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x51, 0x0a, 0x0c, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x77, - 0x69, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0d, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x73, - 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x08, 0x70, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x72, 0x75, + 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x54, 0x0a, 0x14, 0x6e, 0x6f, 0x6e, + 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x5f, 0x61, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x66, 0x73, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x11, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x66, 0x73, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, + 0x39, 0x0a, 0x0b, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, + 0x61, 0x72, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x22, 0x84, 0x03, 0x0a, 0x11, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x41, 0x0a, 0x1e, 0x73, 0x70, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x77, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x73, 0x70, 0x61, 0x6d, 0x50, 0x6f, + 0x77, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x50, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x70, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x77, 0x5f, + 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x11, 0x73, 0x70, 0x61, 0x6d, 0x50, 0x6f, 0x77, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, + 0x6c, 0x74, 0x79, 0x12, 0x33, 0x0a, 0x16, 0x73, 0x70, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x77, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x70, 0x61, 0x6d, 0x50, 0x6f, 0x77, 0x48, 0x61, 0x73, 0x68, + 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x1f, 0x73, 0x70, 0x61, 0x6d, + 0x5f, 0x70, 0x6f, 0x77, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x74, + 0x78, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x19, 0x73, 0x70, 0x61, 0x6d, 0x50, 0x6f, 0x77, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x4f, 0x66, 0x54, 0x78, 0x50, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x43, 0x0a, 0x1e, + 0x73, 0x70, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, + 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x73, 0x70, 0x61, 0x6d, 0x50, 0x6f, 0x77, 0x49, 0x6e, 0x63, + 0x72, 0x65, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, + 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x22, 0x58, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x44, 0x0a, 0x09, 0x70, 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6f, + 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x08, 0x70, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x15, + 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x50, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x52, 0x0c, 0x74, 0x65, 0x61, - 0x6d, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x73, 0x22, 0x67, 0x0a, 0x0a, 0x54, 0x65, 0x61, - 0x6d, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, - 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, - 0x72, 0x6f, 0x6d, 0x54, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, - 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, - 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x49, 0x64, 0x22, 0x4f, 0x0a, 0x07, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x44, 0x0a, - 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x22, 0xa1, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x0c, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x74, + 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6f, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x0a, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x1d, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x57, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x74, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x46, 0x6f, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x65, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x65, 0x65, 0x6e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x2f, 0x0a, 0x13, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x64, 0x69, + 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, + 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, + 0x74, 0x79, 0x22, 0x52, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x36, 0x0a, 0x08, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x5b, + 0x0a, 0x11, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x66, 0x73, 0x41, 0x74, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x72, + 0x65, 0x66, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x66, 0x52, 0x04, 0x72, 0x65, 0x66, 0x73, 0x22, 0xcb, 0x01, 0x0a, 0x18, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x5e, 0x0a, 0x11, 0x61, 0x63, 0x63, + 0x65, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x10, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, + 0x64, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x7d, 0x0a, 0x1f, 0x41, 0x63, 0x63, + 0x65, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x14, + 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x75, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x28, + 0x0a, 0x10, 0x76, 0x65, 0x67, 0x61, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x74, + 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x65, 0x67, 0x61, 0x52, 0x65, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x61, 0x67, 0x22, 0x35, 0x0a, 0x05, 0x54, 0x65, 0x61, 0x6d, + 0x73, 0x12, 0x2c, 0x0a, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x22, + 0xae, 0x02, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x72, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, + 0x65, 0x72, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x52, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x19, 0x0a, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x55, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x61, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, + 0x73, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, + 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, + 0x22, 0x6e, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x19, + 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x6f, 0x69, + 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6a, 0x6f, + 0x69, 0x6e, 0x65, 0x64, 0x41, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, + 0x22, 0x51, 0x0a, 0x0c, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x73, + 0x12, 0x41, 0x0a, 0x0d, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x53, + 0x77, 0x69, 0x74, 0x63, 0x68, 0x52, 0x0c, 0x74, 0x65, 0x61, 0x6d, 0x53, 0x77, 0x69, 0x74, 0x63, + 0x68, 0x65, 0x73, 0x22, 0x67, 0x0a, 0x0a, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x77, 0x69, 0x74, 0x63, + 0x68, 0x12, 0x20, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x65, 0x61, + 0x6d, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x49, + 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x22, 0x4f, 0x0a, 0x07, + 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x44, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x52, 0x0b, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x0a, 0x69, - 0x6e, 0x5f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x69, 0x6e, - 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x22, 0xed, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x4d, 0x0a, 0x11, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x62, 0x79, 0x5f, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, - 0x63, 0x74, 0x6f, 0x72, 0x42, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x52, 0x0f, 0x66, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x12, 0x3e, - 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x0e, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x36, - 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x48, 0x61, 0x73, 0x45, - 0x6e, 0x64, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x04, 0x73, 0x65, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, - 0x74, 0x52, 0x04, 0x73, 0x65, 0x74, 0x73, 0x22, 0xd6, 0x03, 0x0a, 0x0b, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x12, - 0x38, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x0d, + 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0xa1, 0x01, + 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x79, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6c, 0x6f, 0x63, + 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x4c, + 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x0a, 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x56, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x69, 0x6e, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x22, 0xed, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x11, 0x66, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x5f, 0x62, 0x79, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x79, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x52, 0x0f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, + 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x12, 0x3e, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, + 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x36, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, + 0x6c, 0x61, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x68, 0x61, + 0x73, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x70, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x48, 0x61, 0x73, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x31, + 0x0a, 0x04, 0x73, 0x65, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x52, 0x04, 0x73, 0x65, 0x74, + 0x73, 0x22, 0xd6, 0x03, 0x0a, 0x0b, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x53, 0x65, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x38, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, - 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x0f, 0x72, 0x75, 0x6e, - 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x56, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x52, 0x0e, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x56, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x13, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, - 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x21, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x1e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, - 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, - 0x22, 0x3d, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x56, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, - 0x73, 0x0a, 0x0f, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x56, 0x6f, - 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x6a, 0x0a, 0x0b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x6f, 0x63, - 0x6b, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x45, 0x0a, 0x0e, 0x65, 0x70, 0x6f, - 0x63, 0x68, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x52, 0x0d, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, - 0x22, 0x3e, 0x0a, 0x0c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x22, 0x3b, 0x0a, 0x09, 0x49, 0x6e, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, + 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x08, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x0f, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x76, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x0e, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x32, 0x0a, + 0x15, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, + 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x46, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x12, 0x3c, 0x0a, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, + 0x49, 0x0a, 0x21, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, + 0x6c, 0x69, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1e, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x22, 0x3d, 0x0a, 0x0d, 0x52, 0x75, + 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, + 0x68, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x73, 0x0a, 0x0f, 0x46, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x42, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x66, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x74, + 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0b, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x6a, + 0x0a, 0x0b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x6f, 0x0a, - 0x0e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x12, - 0x5d, 0x0a, 0x17, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x69, 0x74, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, - 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x52, 0x15, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x22, 0xe1, - 0x01, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x12, 0x44, 0x0a, 0x1e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x1c, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x19, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x5f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, - 0x69, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x17, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, - 0x65, 0x72, 0x22, 0xb4, 0x04, 0x0a, 0x15, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x53, 0x0a, 0x13, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, - 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x52, 0x11, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x50, - 0x61, 0x72, 0x74, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x4f, 0x0a, 0x14, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, - 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x52, 0x12, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x50, 0x61, 0x72, 0x74, 0x79, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x0e, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x3c, 0x0a, 0x0b, - 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x0a, - 0x6e, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x4f, 0x0a, 0x10, 0x66, 0x61, - 0x63, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0e, 0x66, 0x61, 0x63, - 0x74, 0x6f, 0x72, 0x73, 0x42, 0x79, 0x50, 0x61, 0x72, 0x74, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, - 0x11, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x65, 0x6e, 0x64, - 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x48, 0x61, 0x73, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x22, 0x54, 0x0a, 0x13, 0x56, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, - 0x55, 0x0a, 0x11, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x76, 0x6f, - 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, + 0x73, 0x65, 0x74, 0x12, 0x45, 0x0a, 0x0e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x62, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x0d, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x3e, 0x0a, 0x0c, 0x45, 0x70, + 0x6f, 0x63, 0x68, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x3b, 0x0a, 0x09, 0x49, 0x6e, + 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x6f, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x12, 0x5d, 0x0a, 0x17, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x65, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, - 0x72, 0x74, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x3b, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x76, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x76, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x2a, 0x60, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, + 0x72, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6b, 0x52, 0x15, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, + 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x22, 0xe1, 0x01, 0x0a, 0x13, 0x50, 0x61, 0x72, + 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, + 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x44, 0x0a, 0x1e, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x1c, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, + 0x12, 0x3a, 0x0a, 0x19, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x76, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x17, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x56, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x22, 0xb4, 0x04, 0x0a, + 0x15, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x12, 0x53, 0x0a, 0x13, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x73, 0x52, 0x11, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x4f, 0x0a, 0x14, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x12, 0x61, 0x76, + 0x65, 0x72, 0x61, 0x67, 0x65, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x12, 0x44, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, + 0x72, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x3c, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x12, 0x4f, 0x0a, 0x10, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x5f, + 0x62, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x42, 0x79, + 0x50, 0x61, 0x72, 0x74, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x67, 0x72, + 0x61, 0x6d, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x48, 0x61, 0x73, 0x45, 0x6e, + 0x64, 0x65, 0x64, 0x22, 0x54, 0x0a, 0x13, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, + 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x66, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x55, 0x0a, 0x11, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x40, + 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x22, 0x3b, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x9b, 0x01, + 0x0a, 0x0b, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x6e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x65, 0x70, 0x12, 0x31, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x56, 0x0a, 0x10, 0x50, + 0x61, 0x72, 0x74, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x73, 0x0a, 0x1b, 0x42, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x12, 0x54, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x12, 0x70, 0x61, 0x72, 0x74, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xe4, 0x02, 0x0a, 0x18, 0x43, 0x6f, 0x6d, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x61, 0x6c, 0x63, 0x75, + 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x52, + 0x0a, 0x13, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, + 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x18, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x03, 0x52, 0x15, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x62, 0x6f, 0x6f, 0x6b, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x5f, 0x61, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x0f, + 0x62, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, + 0x45, 0x0a, 0x07, 0x50, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x08, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x6b, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2a, 0x60, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x4f, 0x52, 0x4d, 0x41, @@ -14664,7 +15857,7 @@ func file_vega_snapshot_v1_snapshot_proto_rawDescGZIP() []byte { } var file_vega_snapshot_v1_snapshot_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_vega_snapshot_v1_snapshot_proto_msgTypes = make([]protoimpl.MessageInfo, 169) +var file_vega_snapshot_v1_snapshot_proto_msgTypes = make([]protoimpl.MessageInfo, 183) var file_vega_snapshot_v1_snapshot_proto_goTypes = []interface{}{ (Format)(0), // 0: vega.snapshot.v1.Format (*Snapshot)(nil), // 1: vega.snapshot.v1.Snapshot @@ -14685,462 +15878,508 @@ var file_vega_snapshot_v1_snapshot_proto_goTypes = []interface{}{ (*OracleDataPair)(nil), // 16: vega.snapshot.v1.OracleDataPair (*Witness)(nil), // 17: vega.snapshot.v1.Witness (*Resource)(nil), // 18: vega.snapshot.v1.Resource - (*EventForwarder)(nil), // 19: vega.snapshot.v1.EventForwarder - (*CollateralAccounts)(nil), // 20: vega.snapshot.v1.CollateralAccounts - (*CollateralAssets)(nil), // 21: vega.snapshot.v1.CollateralAssets - (*ActiveAssets)(nil), // 22: vega.snapshot.v1.ActiveAssets - (*PendingAssets)(nil), // 23: vega.snapshot.v1.PendingAssets - (*PendingAssetUpdates)(nil), // 24: vega.snapshot.v1.PendingAssetUpdates - (*Withdrawal)(nil), // 25: vega.snapshot.v1.Withdrawal - (*Deposit)(nil), // 26: vega.snapshot.v1.Deposit - (*TxRef)(nil), // 27: vega.snapshot.v1.TxRef - (*BankingWithdrawals)(nil), // 28: vega.snapshot.v1.BankingWithdrawals - (*BankingDeposits)(nil), // 29: vega.snapshot.v1.BankingDeposits - (*BankingSeen)(nil), // 30: vega.snapshot.v1.BankingSeen - (*BankingAssetActions)(nil), // 31: vega.snapshot.v1.BankingAssetActions - (*BankingRecurringTransfers)(nil), // 32: vega.snapshot.v1.BankingRecurringTransfers - (*BankingScheduledTransfers)(nil), // 33: vega.snapshot.v1.BankingScheduledTransfers - (*BankingRecurringGovernanceTransfers)(nil), // 34: vega.snapshot.v1.BankingRecurringGovernanceTransfers - (*BankingScheduledGovernanceTransfers)(nil), // 35: vega.snapshot.v1.BankingScheduledGovernanceTransfers - (*BankingBridgeState)(nil), // 36: vega.snapshot.v1.BankingBridgeState - (*Checkpoint)(nil), // 37: vega.snapshot.v1.Checkpoint - (*DelegationLastReconciliationTime)(nil), // 38: vega.snapshot.v1.DelegationLastReconciliationTime - (*DelegationActive)(nil), // 39: vega.snapshot.v1.DelegationActive - (*DelegationPending)(nil), // 40: vega.snapshot.v1.DelegationPending - (*DelegationAuto)(nil), // 41: vega.snapshot.v1.DelegationAuto - (*ProposalData)(nil), // 42: vega.snapshot.v1.ProposalData - (*GovernanceEnacted)(nil), // 43: vega.snapshot.v1.GovernanceEnacted - (*GovernanceActive)(nil), // 44: vega.snapshot.v1.GovernanceActive - (*GovernanceNode)(nil), // 45: vega.snapshot.v1.GovernanceNode - (*StakingAccount)(nil), // 46: vega.snapshot.v1.StakingAccount - (*StakingAccounts)(nil), // 47: vega.snapshot.v1.StakingAccounts - (*MatchingBook)(nil), // 48: vega.snapshot.v1.MatchingBook - (*NetParams)(nil), // 49: vega.snapshot.v1.NetParams - (*DecimalMap)(nil), // 50: vega.snapshot.v1.DecimalMap - (*TimePrice)(nil), // 51: vega.snapshot.v1.TimePrice - (*PriceVolume)(nil), // 52: vega.snapshot.v1.PriceVolume - (*PriceRange)(nil), // 53: vega.snapshot.v1.PriceRange - (*PriceBound)(nil), // 54: vega.snapshot.v1.PriceBound - (*PriceRangeCache)(nil), // 55: vega.snapshot.v1.PriceRangeCache - (*CurrentPrice)(nil), // 56: vega.snapshot.v1.CurrentPrice - (*PastPrice)(nil), // 57: vega.snapshot.v1.PastPrice - (*PriceMonitor)(nil), // 58: vega.snapshot.v1.PriceMonitor - (*AuctionState)(nil), // 59: vega.snapshot.v1.AuctionState - (*EquityShareLP)(nil), // 60: vega.snapshot.v1.EquityShareLP - (*EquityShare)(nil), // 61: vega.snapshot.v1.EquityShare - (*FeeSplitter)(nil), // 62: vega.snapshot.v1.FeeSplitter - (*SpotMarket)(nil), // 63: vega.snapshot.v1.SpotMarket - (*Market)(nil), // 64: vega.snapshot.v1.Market - (*Product)(nil), // 65: vega.snapshot.v1.Product - (*DataPoint)(nil), // 66: vega.snapshot.v1.DataPoint - (*Perps)(nil), // 67: vega.snapshot.v1.Perps - (*OrdersAtPrice)(nil), // 68: vega.snapshot.v1.OrdersAtPrice - (*PricedStopOrders)(nil), // 69: vega.snapshot.v1.PricedStopOrders - (*TrailingStopOrders)(nil), // 70: vega.snapshot.v1.TrailingStopOrders - (*OrdersAtOffset)(nil), // 71: vega.snapshot.v1.OrdersAtOffset - (*OffsetsAtPrice)(nil), // 72: vega.snapshot.v1.OffsetsAtPrice - (*StopOrders)(nil), // 73: vega.snapshot.v1.StopOrders - (*PeggedOrders)(nil), // 74: vega.snapshot.v1.PeggedOrders - (*SLANetworkParams)(nil), // 75: vega.snapshot.v1.SLANetworkParams - (*ExecutionMarkets)(nil), // 76: vega.snapshot.v1.ExecutionMarkets - (*Successors)(nil), // 77: vega.snapshot.v1.Successors - (*Position)(nil), // 78: vega.snapshot.v1.Position - (*MarketPositions)(nil), // 79: vega.snapshot.v1.MarketPositions - (*PartyPositionStats)(nil), // 80: vega.snapshot.v1.PartyPositionStats - (*SettlementState)(nil), // 81: vega.snapshot.v1.SettlementState - (*LastSettledPosition)(nil), // 82: vega.snapshot.v1.LastSettledPosition - (*SettlementTrade)(nil), // 83: vega.snapshot.v1.SettlementTrade - (*AppState)(nil), // 84: vega.snapshot.v1.AppState - (*EpochState)(nil), // 85: vega.snapshot.v1.EpochState - (*RewardsPendingPayouts)(nil), // 86: vega.snapshot.v1.RewardsPendingPayouts - (*ScheduledRewardsPayout)(nil), // 87: vega.snapshot.v1.ScheduledRewardsPayout - (*RewardsPayout)(nil), // 88: vega.snapshot.v1.RewardsPayout - (*RewardsPartyAmount)(nil), // 89: vega.snapshot.v1.RewardsPartyAmount - (*LimitState)(nil), // 90: vega.snapshot.v1.LimitState - (*VoteSpamPolicy)(nil), // 91: vega.snapshot.v1.VoteSpamPolicy - (*PartyProposalVoteCount)(nil), // 92: vega.snapshot.v1.PartyProposalVoteCount - (*PartyTokenBalance)(nil), // 93: vega.snapshot.v1.PartyTokenBalance - (*BlockRejectStats)(nil), // 94: vega.snapshot.v1.BlockRejectStats - (*SpamPartyTransactionCount)(nil), // 95: vega.snapshot.v1.SpamPartyTransactionCount - (*SimpleSpamPolicy)(nil), // 96: vega.snapshot.v1.SimpleSpamPolicy - (*NotarySigs)(nil), // 97: vega.snapshot.v1.NotarySigs - (*Notary)(nil), // 98: vega.snapshot.v1.Notary - (*StakeVerifierDeposited)(nil), // 99: vega.snapshot.v1.StakeVerifierDeposited - (*StakeVerifierRemoved)(nil), // 100: vega.snapshot.v1.StakeVerifierRemoved - (*StakeVerifierPending)(nil), // 101: vega.snapshot.v1.StakeVerifierPending - (*EthOracleVerifierLastBlock)(nil), // 102: vega.snapshot.v1.EthOracleVerifierLastBlock - (*EthContractCallResults)(nil), // 103: vega.snapshot.v1.EthContractCallResults - (*EthContractCallResult)(nil), // 104: vega.snapshot.v1.EthContractCallResult - (*PendingKeyRotation)(nil), // 105: vega.snapshot.v1.PendingKeyRotation - (*PendingEthereumKeyRotation)(nil), // 106: vega.snapshot.v1.PendingEthereumKeyRotation - (*Topology)(nil), // 107: vega.snapshot.v1.Topology - (*ToplogySignatures)(nil), // 108: vega.snapshot.v1.ToplogySignatures - (*PendingERC20MultisigControlSignature)(nil), // 109: vega.snapshot.v1.PendingERC20MultisigControlSignature - (*IssuedERC20MultisigControlSignature)(nil), // 110: vega.snapshot.v1.IssuedERC20MultisigControlSignature - (*ValidatorState)(nil), // 111: vega.snapshot.v1.ValidatorState - (*HeartbeatTracker)(nil), // 112: vega.snapshot.v1.HeartbeatTracker - (*PerformanceStats)(nil), // 113: vega.snapshot.v1.PerformanceStats - (*ValidatorPerformance)(nil), // 114: vega.snapshot.v1.ValidatorPerformance - (*LiquidityParameters)(nil), // 115: vega.snapshot.v1.LiquidityParameters - (*LiquidityPendingProvisions)(nil), // 116: vega.snapshot.v1.LiquidityPendingProvisions - (*LiquidityPartiesLiquidityOrders)(nil), // 117: vega.snapshot.v1.LiquidityPartiesLiquidityOrders - (*PartyOrders)(nil), // 118: vega.snapshot.v1.PartyOrders - (*LiquidityPartiesOrders)(nil), // 119: vega.snapshot.v1.LiquidityPartiesOrders - (*LiquidityProvisions)(nil), // 120: vega.snapshot.v1.LiquidityProvisions - (*LiquidityScores)(nil), // 121: vega.snapshot.v1.LiquidityScores - (*LiquidityScore)(nil), // 122: vega.snapshot.v1.LiquidityScore - (*LiquidityV2Parameters)(nil), // 123: vega.snapshot.v1.LiquidityV2Parameters - (*LiquidityV2PaidFeesStats)(nil), // 124: vega.snapshot.v1.LiquidityV2PaidFeesStats - (*LiquidityV2Provisions)(nil), // 125: vega.snapshot.v1.LiquidityV2Provisions - (*LiquidityV2PendingProvisions)(nil), // 126: vega.snapshot.v1.LiquidityV2PendingProvisions - (*LiquidityV2Performances)(nil), // 127: vega.snapshot.v1.LiquidityV2Performances - (*LiquidityV2PerformancePerParty)(nil), // 128: vega.snapshot.v1.LiquidityV2PerformancePerParty - (*LiquidityV2Scores)(nil), // 129: vega.snapshot.v1.LiquidityV2Scores - (*LiquidityV2Supplied)(nil), // 130: vega.snapshot.v1.LiquidityV2Supplied - (*FloatingPointConsensus)(nil), // 131: vega.snapshot.v1.FloatingPointConsensus - (*StateVarInternalState)(nil), // 132: vega.snapshot.v1.StateVarInternalState - (*FloatingPointValidatorResult)(nil), // 133: vega.snapshot.v1.FloatingPointValidatorResult - (*NextTimeTrigger)(nil), // 134: vega.snapshot.v1.NextTimeTrigger - (*MarketTracker)(nil), // 135: vega.snapshot.v1.MarketTracker - (*SignerEventsPerAddress)(nil), // 136: vega.snapshot.v1.SignerEventsPerAddress - (*ERC20MultiSigTopologyVerified)(nil), // 137: vega.snapshot.v1.ERC20MultiSigTopologyVerified - (*ERC20MultiSigTopologyPending)(nil), // 138: vega.snapshot.v1.ERC20MultiSigTopologyPending - (*ProofOfWork)(nil), // 139: vega.snapshot.v1.ProofOfWork - (*BannedParty)(nil), // 140: vega.snapshot.v1.BannedParty - (*ProofOfWorkParams)(nil), // 141: vega.snapshot.v1.ProofOfWorkParams - (*ProofOfWorkState)(nil), // 142: vega.snapshot.v1.ProofOfWorkState - (*ProofOfWorkBlockState)(nil), // 143: vega.snapshot.v1.ProofOfWorkBlockState - (*ProofOfWorkPartyStateForBlock)(nil), // 144: vega.snapshot.v1.ProofOfWorkPartyStateForBlock - (*TransactionsAtHeight)(nil), // 145: vega.snapshot.v1.TransactionsAtHeight - (*NonceRef)(nil), // 146: vega.snapshot.v1.NonceRef - (*NonceRefsAtHeight)(nil), // 147: vega.snapshot.v1.NonceRefsAtHeight - (*ProtocolUpgradeProposals)(nil), // 148: vega.snapshot.v1.ProtocolUpgradeProposals - (*AcceptedProtocolUpgradeProposal)(nil), // 149: vega.snapshot.v1.AcceptedProtocolUpgradeProposal - (*Teams)(nil), // 150: vega.snapshot.v1.Teams - (*Team)(nil), // 151: vega.snapshot.v1.Team - (*Membership)(nil), // 152: vega.snapshot.v1.Membership - (*TeamSwitches)(nil), // 153: vega.snapshot.v1.TeamSwitches - (*TeamSwitch)(nil), // 154: vega.snapshot.v1.TeamSwitch - (*Vesting)(nil), // 155: vega.snapshot.v1.Vesting - (*PartyReward)(nil), // 156: vega.snapshot.v1.PartyReward - (*ReferralProgramData)(nil), // 157: vega.snapshot.v1.ReferralProgramData - (*ReferralSet)(nil), // 158: vega.snapshot.v1.ReferralSet - (*RunningVolume)(nil), // 159: vega.snapshot.v1.RunningVolume - (*FactorByReferee)(nil), // 160: vega.snapshot.v1.FactorByReferee - (*AssetLocked)(nil), // 161: vega.snapshot.v1.AssetLocked - (*EpochBalance)(nil), // 162: vega.snapshot.v1.EpochBalance - (*InVesting)(nil), // 163: vega.snapshot.v1.InVesting - (*ActivityStreak)(nil), // 164: vega.snapshot.v1.ActivityStreak - (*PartyActivityStreak)(nil), // 165: vega.snapshot.v1.PartyActivityStreak - (*VolumeDiscountProgram)(nil), // 166: vega.snapshot.v1.VolumeDiscountProgram - (*VolumeDiscountStats)(nil), // 167: vega.snapshot.v1.VolumeDiscountStats - (*EpochPartyVolumes)(nil), // 168: vega.snapshot.v1.EpochPartyVolumes - (*PartyVolume)(nil), // 169: vega.snapshot.v1.PartyVolume - (*v1.Signer)(nil), // 170: vega.data.v1.Signer - (*v1.Property)(nil), // 171: vega.data.v1.Property - (*vega.Account)(nil), // 172: vega.Account - (*vega.Asset)(nil), // 173: vega.Asset - (*vega.Withdrawal)(nil), // 174: vega.Withdrawal - (*vega.Deposit)(nil), // 175: vega.Deposit - (*v11.AssetAction)(nil), // 176: vega.checkpoint.v1.AssetAction - (*v11.RecurringTransfers)(nil), // 177: vega.checkpoint.v1.RecurringTransfers - (*v11.ScheduledTransferAtTime)(nil), // 178: vega.checkpoint.v1.ScheduledTransferAtTime - (*v11.GovernanceTransfer)(nil), // 179: vega.checkpoint.v1.GovernanceTransfer - (*v11.ScheduledGovernanceTransferAtTime)(nil), // 180: vega.checkpoint.v1.ScheduledGovernanceTransferAtTime - (*v11.BridgeState)(nil), // 181: vega.checkpoint.v1.BridgeState - (*vega.Delegation)(nil), // 182: vega.Delegation - (*vega.Proposal)(nil), // 183: vega.Proposal - (*vega.Vote)(nil), // 184: vega.Vote - (*v12.StakeLinking)(nil), // 185: vega.events.v1.StakeLinking - (*vega.StakeTotalSupply)(nil), // 186: vega.StakeTotalSupply - (*vega.Order)(nil), // 187: vega.Order - (*vega.NetworkParameter)(nil), // 188: vega.NetworkParameter - (*vega.PriceMonitoringTrigger)(nil), // 189: vega.PriceMonitoringTrigger - (vega.Market_TradingMode)(0), // 190: vega.Market.TradingMode - (vega.AuctionTrigger)(0), // 191: vega.AuctionTrigger - (*vega.AuctionDuration)(nil), // 192: vega.AuctionDuration - (*vega.Market)(nil), // 193: vega.Market - (*v12.FeesStats)(nil), // 194: vega.events.v1.FeesStats - (*v12.StopOrderEvent)(nil), // 195: vega.events.v1.StopOrderEvent - (*v11.MarketState)(nil), // 196: vega.checkpoint.v1.MarketState - (*v12.ValidatorUpdate)(nil), // 197: vega.events.v1.ValidatorUpdate - (*vega.RankingScore)(nil), // 198: vega.RankingScore - (*vega.LiquidityProvision)(nil), // 199: vega.LiquidityProvision - (*vega.LiquiditySLAParameters)(nil), // 200: vega.LiquiditySLAParameters - (*v12.PaidLiquidityFeesStats)(nil), // 201: vega.events.v1.PaidLiquidityFeesStats - (*vega.KeyValueBundle)(nil), // 202: vega.KeyValueBundle - (*v11.MarketActivityTracker)(nil), // 203: vega.checkpoint.v1.MarketActivityTracker - (*v11.TakerNotionalVolume)(nil), // 204: vega.checkpoint.v1.TakerNotionalVolume - (*v12.ERC20MultiSigSignerEvent)(nil), // 205: vega.events.v1.ERC20MultiSigSignerEvent - (*v12.ERC20MultiSigThresholdSetEvent)(nil), // 206: vega.events.v1.ERC20MultiSigThresholdSetEvent - (*v12.ProtocolUpgradeEvent)(nil), // 207: vega.events.v1.ProtocolUpgradeEvent - (*vega.ReferralProgram)(nil), // 208: vega.ReferralProgram - (*vega.VolumeDiscountProgram)(nil), // 209: vega.VolumeDiscountProgram + (*EventForwarderBucket)(nil), // 19: vega.snapshot.v1.EventForwarderBucket + (*EventForwarder)(nil), // 20: vega.snapshot.v1.EventForwarder + (*CollateralAccounts)(nil), // 21: vega.snapshot.v1.CollateralAccounts + (*CollateralAssets)(nil), // 22: vega.snapshot.v1.CollateralAssets + (*ActiveAssets)(nil), // 23: vega.snapshot.v1.ActiveAssets + (*PendingAssets)(nil), // 24: vega.snapshot.v1.PendingAssets + (*PendingAssetUpdates)(nil), // 25: vega.snapshot.v1.PendingAssetUpdates + (*Withdrawal)(nil), // 26: vega.snapshot.v1.Withdrawal + (*Deposit)(nil), // 27: vega.snapshot.v1.Deposit + (*TxRef)(nil), // 28: vega.snapshot.v1.TxRef + (*BankingWithdrawals)(nil), // 29: vega.snapshot.v1.BankingWithdrawals + (*BankingDeposits)(nil), // 30: vega.snapshot.v1.BankingDeposits + (*BankingSeen)(nil), // 31: vega.snapshot.v1.BankingSeen + (*BankingAssetActions)(nil), // 32: vega.snapshot.v1.BankingAssetActions + (*BankingRecurringTransfers)(nil), // 33: vega.snapshot.v1.BankingRecurringTransfers + (*BankingScheduledTransfers)(nil), // 34: vega.snapshot.v1.BankingScheduledTransfers + (*BankingRecurringGovernanceTransfers)(nil), // 35: vega.snapshot.v1.BankingRecurringGovernanceTransfers + (*BankingScheduledGovernanceTransfers)(nil), // 36: vega.snapshot.v1.BankingScheduledGovernanceTransfers + (*BankingBridgeState)(nil), // 37: vega.snapshot.v1.BankingBridgeState + (*Checkpoint)(nil), // 38: vega.snapshot.v1.Checkpoint + (*DelegationLastReconciliationTime)(nil), // 39: vega.snapshot.v1.DelegationLastReconciliationTime + (*DelegationActive)(nil), // 40: vega.snapshot.v1.DelegationActive + (*DelegationPending)(nil), // 41: vega.snapshot.v1.DelegationPending + (*DelegationAuto)(nil), // 42: vega.snapshot.v1.DelegationAuto + (*ProposalData)(nil), // 43: vega.snapshot.v1.ProposalData + (*GovernanceEnacted)(nil), // 44: vega.snapshot.v1.GovernanceEnacted + (*GovernanceActive)(nil), // 45: vega.snapshot.v1.GovernanceActive + (*BatchProposalData)(nil), // 46: vega.snapshot.v1.BatchProposalData + (*GovernanceBatchActive)(nil), // 47: vega.snapshot.v1.GovernanceBatchActive + (*GovernanceNode)(nil), // 48: vega.snapshot.v1.GovernanceNode + (*StakingAccount)(nil), // 49: vega.snapshot.v1.StakingAccount + (*StakingAccounts)(nil), // 50: vega.snapshot.v1.StakingAccounts + (*MatchingBook)(nil), // 51: vega.snapshot.v1.MatchingBook + (*NetParams)(nil), // 52: vega.snapshot.v1.NetParams + (*DecimalMap)(nil), // 53: vega.snapshot.v1.DecimalMap + (*TimePrice)(nil), // 54: vega.snapshot.v1.TimePrice + (*PriceVolume)(nil), // 55: vega.snapshot.v1.PriceVolume + (*PriceRange)(nil), // 56: vega.snapshot.v1.PriceRange + (*PriceBound)(nil), // 57: vega.snapshot.v1.PriceBound + (*PriceRangeCache)(nil), // 58: vega.snapshot.v1.PriceRangeCache + (*CurrentPrice)(nil), // 59: vega.snapshot.v1.CurrentPrice + (*PastPrice)(nil), // 60: vega.snapshot.v1.PastPrice + (*PriceMonitor)(nil), // 61: vega.snapshot.v1.PriceMonitor + (*AuctionState)(nil), // 62: vega.snapshot.v1.AuctionState + (*EquityShareLP)(nil), // 63: vega.snapshot.v1.EquityShareLP + (*EquityShare)(nil), // 64: vega.snapshot.v1.EquityShare + (*FeeSplitter)(nil), // 65: vega.snapshot.v1.FeeSplitter + (*SpotMarket)(nil), // 66: vega.snapshot.v1.SpotMarket + (*Market)(nil), // 67: vega.snapshot.v1.Market + (*PartyMarginFactor)(nil), // 68: vega.snapshot.v1.PartyMarginFactor + (*Product)(nil), // 69: vega.snapshot.v1.Product + (*DataPoint)(nil), // 70: vega.snapshot.v1.DataPoint + (*AuctionIntervals)(nil), // 71: vega.snapshot.v1.AuctionIntervals + (*TWAPData)(nil), // 72: vega.snapshot.v1.TWAPData + (*Perps)(nil), // 73: vega.snapshot.v1.Perps + (*OrdersAtPrice)(nil), // 74: vega.snapshot.v1.OrdersAtPrice + (*PricedStopOrders)(nil), // 75: vega.snapshot.v1.PricedStopOrders + (*TrailingStopOrders)(nil), // 76: vega.snapshot.v1.TrailingStopOrders + (*OrdersAtOffset)(nil), // 77: vega.snapshot.v1.OrdersAtOffset + (*OffsetsAtPrice)(nil), // 78: vega.snapshot.v1.OffsetsAtPrice + (*StopOrders)(nil), // 79: vega.snapshot.v1.StopOrders + (*PeggedOrders)(nil), // 80: vega.snapshot.v1.PeggedOrders + (*SLANetworkParams)(nil), // 81: vega.snapshot.v1.SLANetworkParams + (*ExecutionMarkets)(nil), // 82: vega.snapshot.v1.ExecutionMarkets + (*Successors)(nil), // 83: vega.snapshot.v1.Successors + (*Position)(nil), // 84: vega.snapshot.v1.Position + (*MarketPositions)(nil), // 85: vega.snapshot.v1.MarketPositions + (*PartyPositionStats)(nil), // 86: vega.snapshot.v1.PartyPositionStats + (*SettlementState)(nil), // 87: vega.snapshot.v1.SettlementState + (*LastSettledPosition)(nil), // 88: vega.snapshot.v1.LastSettledPosition + (*SettlementTrade)(nil), // 89: vega.snapshot.v1.SettlementTrade + (*AppState)(nil), // 90: vega.snapshot.v1.AppState + (*EpochState)(nil), // 91: vega.snapshot.v1.EpochState + (*RewardsPendingPayouts)(nil), // 92: vega.snapshot.v1.RewardsPendingPayouts + (*ScheduledRewardsPayout)(nil), // 93: vega.snapshot.v1.ScheduledRewardsPayout + (*RewardsPayout)(nil), // 94: vega.snapshot.v1.RewardsPayout + (*RewardsPartyAmount)(nil), // 95: vega.snapshot.v1.RewardsPartyAmount + (*LimitState)(nil), // 96: vega.snapshot.v1.LimitState + (*VoteSpamPolicy)(nil), // 97: vega.snapshot.v1.VoteSpamPolicy + (*PartyProposalVoteCount)(nil), // 98: vega.snapshot.v1.PartyProposalVoteCount + (*PartyTokenBalance)(nil), // 99: vega.snapshot.v1.PartyTokenBalance + (*BlockRejectStats)(nil), // 100: vega.snapshot.v1.BlockRejectStats + (*SpamPartyTransactionCount)(nil), // 101: vega.snapshot.v1.SpamPartyTransactionCount + (*SimpleSpamPolicy)(nil), // 102: vega.snapshot.v1.SimpleSpamPolicy + (*NotarySigs)(nil), // 103: vega.snapshot.v1.NotarySigs + (*Notary)(nil), // 104: vega.snapshot.v1.Notary + (*StakeVerifierDeposited)(nil), // 105: vega.snapshot.v1.StakeVerifierDeposited + (*StakeVerifierRemoved)(nil), // 106: vega.snapshot.v1.StakeVerifierRemoved + (*StakeVerifierPending)(nil), // 107: vega.snapshot.v1.StakeVerifierPending + (*L2EthOracles)(nil), // 108: vega.snapshot.v1.L2EthOracles + (*ChainIdEthOracles)(nil), // 109: vega.snapshot.v1.ChainIdEthOracles + (*EthOracleVerifierLastBlock)(nil), // 110: vega.snapshot.v1.EthOracleVerifierLastBlock + (*EthContractCallResults)(nil), // 111: vega.snapshot.v1.EthContractCallResults + (*EthContractCallResult)(nil), // 112: vega.snapshot.v1.EthContractCallResult + (*PendingKeyRotation)(nil), // 113: vega.snapshot.v1.PendingKeyRotation + (*PendingEthereumKeyRotation)(nil), // 114: vega.snapshot.v1.PendingEthereumKeyRotation + (*Topology)(nil), // 115: vega.snapshot.v1.Topology + (*ToplogySignatures)(nil), // 116: vega.snapshot.v1.ToplogySignatures + (*PendingERC20MultisigControlSignature)(nil), // 117: vega.snapshot.v1.PendingERC20MultisigControlSignature + (*IssuedERC20MultisigControlSignature)(nil), // 118: vega.snapshot.v1.IssuedERC20MultisigControlSignature + (*ValidatorState)(nil), // 119: vega.snapshot.v1.ValidatorState + (*HeartbeatTracker)(nil), // 120: vega.snapshot.v1.HeartbeatTracker + (*PerformanceStats)(nil), // 121: vega.snapshot.v1.PerformanceStats + (*ValidatorPerformance)(nil), // 122: vega.snapshot.v1.ValidatorPerformance + (*LiquidityParameters)(nil), // 123: vega.snapshot.v1.LiquidityParameters + (*LiquidityPendingProvisions)(nil), // 124: vega.snapshot.v1.LiquidityPendingProvisions + (*LiquidityPartiesLiquidityOrders)(nil), // 125: vega.snapshot.v1.LiquidityPartiesLiquidityOrders + (*PartyOrders)(nil), // 126: vega.snapshot.v1.PartyOrders + (*LiquidityPartiesOrders)(nil), // 127: vega.snapshot.v1.LiquidityPartiesOrders + (*LiquidityProvisions)(nil), // 128: vega.snapshot.v1.LiquidityProvisions + (*LiquidityScores)(nil), // 129: vega.snapshot.v1.LiquidityScores + (*LiquidityScore)(nil), // 130: vega.snapshot.v1.LiquidityScore + (*LiquidityV2Parameters)(nil), // 131: vega.snapshot.v1.LiquidityV2Parameters + (*LiquidityV2PaidFeesStats)(nil), // 132: vega.snapshot.v1.LiquidityV2PaidFeesStats + (*LiquidityV2Provisions)(nil), // 133: vega.snapshot.v1.LiquidityV2Provisions + (*LiquidityV2PendingProvisions)(nil), // 134: vega.snapshot.v1.LiquidityV2PendingProvisions + (*LiquidityV2Performances)(nil), // 135: vega.snapshot.v1.LiquidityV2Performances + (*LiquidityV2PerformancePerParty)(nil), // 136: vega.snapshot.v1.LiquidityV2PerformancePerParty + (*LiquidityV2Scores)(nil), // 137: vega.snapshot.v1.LiquidityV2Scores + (*LiquidityV2Supplied)(nil), // 138: vega.snapshot.v1.LiquidityV2Supplied + (*FloatingPointConsensus)(nil), // 139: vega.snapshot.v1.FloatingPointConsensus + (*StateVarInternalState)(nil), // 140: vega.snapshot.v1.StateVarInternalState + (*FloatingPointValidatorResult)(nil), // 141: vega.snapshot.v1.FloatingPointValidatorResult + (*NextTimeTrigger)(nil), // 142: vega.snapshot.v1.NextTimeTrigger + (*MarketTracker)(nil), // 143: vega.snapshot.v1.MarketTracker + (*SignerEventsPerAddress)(nil), // 144: vega.snapshot.v1.SignerEventsPerAddress + (*ERC20MultiSigTopologyVerified)(nil), // 145: vega.snapshot.v1.ERC20MultiSigTopologyVerified + (*ERC20MultiSigTopologyPending)(nil), // 146: vega.snapshot.v1.ERC20MultiSigTopologyPending + (*ProofOfWork)(nil), // 147: vega.snapshot.v1.ProofOfWork + (*BannedParty)(nil), // 148: vega.snapshot.v1.BannedParty + (*ProofOfWorkParams)(nil), // 149: vega.snapshot.v1.ProofOfWorkParams + (*ProofOfWorkState)(nil), // 150: vega.snapshot.v1.ProofOfWorkState + (*ProofOfWorkBlockState)(nil), // 151: vega.snapshot.v1.ProofOfWorkBlockState + (*ProofOfWorkPartyStateForBlock)(nil), // 152: vega.snapshot.v1.ProofOfWorkPartyStateForBlock + (*TransactionsAtHeight)(nil), // 153: vega.snapshot.v1.TransactionsAtHeight + (*NonceRef)(nil), // 154: vega.snapshot.v1.NonceRef + (*NonceRefsAtHeight)(nil), // 155: vega.snapshot.v1.NonceRefsAtHeight + (*ProtocolUpgradeProposals)(nil), // 156: vega.snapshot.v1.ProtocolUpgradeProposals + (*AcceptedProtocolUpgradeProposal)(nil), // 157: vega.snapshot.v1.AcceptedProtocolUpgradeProposal + (*Teams)(nil), // 158: vega.snapshot.v1.Teams + (*Team)(nil), // 159: vega.snapshot.v1.Team + (*Membership)(nil), // 160: vega.snapshot.v1.Membership + (*TeamSwitches)(nil), // 161: vega.snapshot.v1.TeamSwitches + (*TeamSwitch)(nil), // 162: vega.snapshot.v1.TeamSwitch + (*Vesting)(nil), // 163: vega.snapshot.v1.Vesting + (*PartyReward)(nil), // 164: vega.snapshot.v1.PartyReward + (*ReferralProgramData)(nil), // 165: vega.snapshot.v1.ReferralProgramData + (*ReferralSet)(nil), // 166: vega.snapshot.v1.ReferralSet + (*RunningVolume)(nil), // 167: vega.snapshot.v1.RunningVolume + (*FactorByReferee)(nil), // 168: vega.snapshot.v1.FactorByReferee + (*AssetLocked)(nil), // 169: vega.snapshot.v1.AssetLocked + (*EpochBalance)(nil), // 170: vega.snapshot.v1.EpochBalance + (*InVesting)(nil), // 171: vega.snapshot.v1.InVesting + (*ActivityStreak)(nil), // 172: vega.snapshot.v1.ActivityStreak + (*PartyActivityStreak)(nil), // 173: vega.snapshot.v1.PartyActivityStreak + (*VolumeDiscountProgram)(nil), // 174: vega.snapshot.v1.VolumeDiscountProgram + (*VolumeDiscountStats)(nil), // 175: vega.snapshot.v1.VolumeDiscountStats + (*EpochPartyVolumes)(nil), // 176: vega.snapshot.v1.EpochPartyVolumes + (*PartyVolume)(nil), // 177: vega.snapshot.v1.PartyVolume + (*Liquidation)(nil), // 178: vega.snapshot.v1.Liquidation + (*PartyAssetAmount)(nil), // 179: vega.snapshot.v1.PartyAssetAmount + (*BankingTransferFeeDiscounts)(nil), // 180: vega.snapshot.v1.BankingTransferFeeDiscounts + (*CompositePriceCalculator)(nil), // 181: vega.snapshot.v1.CompositePriceCalculator + (*Parties)(nil), // 182: vega.snapshot.v1.Parties + (*PartyProfile)(nil), // 183: vega.snapshot.v1.PartyProfile + (*v1.Signer)(nil), // 184: vega.data.v1.Signer + (*v1.Property)(nil), // 185: vega.data.v1.Property + (*vega.Account)(nil), // 186: vega.Account + (*vega.Asset)(nil), // 187: vega.Asset + (*vega.Withdrawal)(nil), // 188: vega.Withdrawal + (*vega.Deposit)(nil), // 189: vega.Deposit + (*v11.AssetAction)(nil), // 190: vega.checkpoint.v1.AssetAction + (*v11.RecurringTransfers)(nil), // 191: vega.checkpoint.v1.RecurringTransfers + (*v11.ScheduledTransferAtTime)(nil), // 192: vega.checkpoint.v1.ScheduledTransferAtTime + (*v11.GovernanceTransfer)(nil), // 193: vega.checkpoint.v1.GovernanceTransfer + (*v11.ScheduledGovernanceTransferAtTime)(nil), // 194: vega.checkpoint.v1.ScheduledGovernanceTransferAtTime + (*v11.BridgeState)(nil), // 195: vega.checkpoint.v1.BridgeState + (*vega.Delegation)(nil), // 196: vega.Delegation + (*vega.Proposal)(nil), // 197: vega.Proposal + (*vega.Vote)(nil), // 198: vega.Vote + (*v12.StakeLinking)(nil), // 199: vega.events.v1.StakeLinking + (*vega.StakeTotalSupply)(nil), // 200: vega.StakeTotalSupply + (*vega.Order)(nil), // 201: vega.Order + (*vega.NetworkParameter)(nil), // 202: vega.NetworkParameter + (*vega.PriceMonitoringTrigger)(nil), // 203: vega.PriceMonitoringTrigger + (vega.Market_TradingMode)(0), // 204: vega.Market.TradingMode + (vega.AuctionTrigger)(0), // 205: vega.AuctionTrigger + (*vega.AuctionDuration)(nil), // 206: vega.AuctionDuration + (*vega.Market)(nil), // 207: vega.Market + (*v12.FeesStats)(nil), // 208: vega.events.v1.FeesStats + (*v12.StopOrderEvent)(nil), // 209: vega.events.v1.StopOrderEvent + (*v11.MarketState)(nil), // 210: vega.checkpoint.v1.MarketState + (*v12.ValidatorUpdate)(nil), // 211: vega.events.v1.ValidatorUpdate + (*vega.RankingScore)(nil), // 212: vega.RankingScore + (*vega.LiquidityProvision)(nil), // 213: vega.LiquidityProvision + (*vega.LiquiditySLAParameters)(nil), // 214: vega.LiquiditySLAParameters + (*v12.PaidLiquidityFeesStats)(nil), // 215: vega.events.v1.PaidLiquidityFeesStats + (*vega.KeyValueBundle)(nil), // 216: vega.KeyValueBundle + (*v11.MarketActivityTracker)(nil), // 217: vega.checkpoint.v1.MarketActivityTracker + (*v11.TakerNotionalVolume)(nil), // 218: vega.checkpoint.v1.TakerNotionalVolume + (*v11.MarketToPartyTakerNotionalVolume)(nil), // 219: vega.checkpoint.v1.MarketToPartyTakerNotionalVolume + (*v12.ERC20MultiSigSignerEvent)(nil), // 220: vega.events.v1.ERC20MultiSigSignerEvent + (*v12.ERC20MultiSigThresholdSetEvent)(nil), // 221: vega.events.v1.ERC20MultiSigThresholdSetEvent + (*v12.ProtocolUpgradeEvent)(nil), // 222: vega.events.v1.ProtocolUpgradeEvent + (*vega.ReferralProgram)(nil), // 223: vega.ReferralProgram + (*vega.VolumeDiscountProgram)(nil), // 224: vega.VolumeDiscountProgram + (*vega.LiquidationStrategy)(nil), // 225: vega.LiquidationStrategy + (*vega.CompositePriceConfiguration)(nil), // 226: vega.CompositePriceConfiguration + (*vega.Trade)(nil), // 227: vega.Trade + (*vega.Metadata)(nil), // 228: vega.Metadata } var file_vega_snapshot_v1_snapshot_proto_depIdxs = []int32{ 0, // 0: vega.snapshot.v1.Snapshot.format:type_name -> vega.snapshot.v1.Format 2, // 1: vega.snapshot.v1.Metadata.node_hashes:type_name -> vega.snapshot.v1.NodeHash 5, // 2: vega.snapshot.v1.Chunk.data:type_name -> vega.snapshot.v1.Payload - 22, // 3: vega.snapshot.v1.Payload.active_assets:type_name -> vega.snapshot.v1.ActiveAssets - 23, // 4: vega.snapshot.v1.Payload.pending_assets:type_name -> vega.snapshot.v1.PendingAssets - 28, // 5: vega.snapshot.v1.Payload.banking_withdrawals:type_name -> vega.snapshot.v1.BankingWithdrawals - 29, // 6: vega.snapshot.v1.Payload.banking_deposits:type_name -> vega.snapshot.v1.BankingDeposits - 30, // 7: vega.snapshot.v1.Payload.banking_seen:type_name -> vega.snapshot.v1.BankingSeen - 31, // 8: vega.snapshot.v1.Payload.banking_asset_actions:type_name -> vega.snapshot.v1.BankingAssetActions - 37, // 9: vega.snapshot.v1.Payload.checkpoint:type_name -> vega.snapshot.v1.Checkpoint - 20, // 10: vega.snapshot.v1.Payload.collateral_accounts:type_name -> vega.snapshot.v1.CollateralAccounts - 21, // 11: vega.snapshot.v1.Payload.collateral_assets:type_name -> vega.snapshot.v1.CollateralAssets - 39, // 12: vega.snapshot.v1.Payload.delegation_active:type_name -> vega.snapshot.v1.DelegationActive - 40, // 13: vega.snapshot.v1.Payload.delegation_pending:type_name -> vega.snapshot.v1.DelegationPending - 41, // 14: vega.snapshot.v1.Payload.delegation_auto:type_name -> vega.snapshot.v1.DelegationAuto - 44, // 15: vega.snapshot.v1.Payload.governance_active:type_name -> vega.snapshot.v1.GovernanceActive - 43, // 16: vega.snapshot.v1.Payload.governance_enacted:type_name -> vega.snapshot.v1.GovernanceEnacted - 47, // 17: vega.snapshot.v1.Payload.staking_accounts:type_name -> vega.snapshot.v1.StakingAccounts - 48, // 18: vega.snapshot.v1.Payload.matching_book:type_name -> vega.snapshot.v1.MatchingBook - 49, // 19: vega.snapshot.v1.Payload.network_parameters:type_name -> vega.snapshot.v1.NetParams - 76, // 20: vega.snapshot.v1.Payload.execution_markets:type_name -> vega.snapshot.v1.ExecutionMarkets - 79, // 21: vega.snapshot.v1.Payload.market_positions:type_name -> vega.snapshot.v1.MarketPositions - 84, // 22: vega.snapshot.v1.Payload.app_state:type_name -> vega.snapshot.v1.AppState - 85, // 23: vega.snapshot.v1.Payload.epoch:type_name -> vega.snapshot.v1.EpochState - 86, // 24: vega.snapshot.v1.Payload.rewards_pending_payouts:type_name -> vega.snapshot.v1.RewardsPendingPayouts - 45, // 25: vega.snapshot.v1.Payload.governance_node:type_name -> vega.snapshot.v1.GovernanceNode - 90, // 26: vega.snapshot.v1.Payload.limit_state:type_name -> vega.snapshot.v1.LimitState - 91, // 27: vega.snapshot.v1.Payload.vote_spam_policy:type_name -> vega.snapshot.v1.VoteSpamPolicy - 96, // 28: vega.snapshot.v1.Payload.simple_spam_policy:type_name -> vega.snapshot.v1.SimpleSpamPolicy - 98, // 29: vega.snapshot.v1.Payload.notary:type_name -> vega.snapshot.v1.Notary - 19, // 30: vega.snapshot.v1.Payload.event_forwarder:type_name -> vega.snapshot.v1.EventForwarder - 99, // 31: vega.snapshot.v1.Payload.stake_verifier_deposited:type_name -> vega.snapshot.v1.StakeVerifierDeposited - 100, // 32: vega.snapshot.v1.Payload.stake_verifier_removed:type_name -> vega.snapshot.v1.StakeVerifierRemoved + 23, // 3: vega.snapshot.v1.Payload.active_assets:type_name -> vega.snapshot.v1.ActiveAssets + 24, // 4: vega.snapshot.v1.Payload.pending_assets:type_name -> vega.snapshot.v1.PendingAssets + 29, // 5: vega.snapshot.v1.Payload.banking_withdrawals:type_name -> vega.snapshot.v1.BankingWithdrawals + 30, // 6: vega.snapshot.v1.Payload.banking_deposits:type_name -> vega.snapshot.v1.BankingDeposits + 31, // 7: vega.snapshot.v1.Payload.banking_seen:type_name -> vega.snapshot.v1.BankingSeen + 32, // 8: vega.snapshot.v1.Payload.banking_asset_actions:type_name -> vega.snapshot.v1.BankingAssetActions + 38, // 9: vega.snapshot.v1.Payload.checkpoint:type_name -> vega.snapshot.v1.Checkpoint + 21, // 10: vega.snapshot.v1.Payload.collateral_accounts:type_name -> vega.snapshot.v1.CollateralAccounts + 22, // 11: vega.snapshot.v1.Payload.collateral_assets:type_name -> vega.snapshot.v1.CollateralAssets + 40, // 12: vega.snapshot.v1.Payload.delegation_active:type_name -> vega.snapshot.v1.DelegationActive + 41, // 13: vega.snapshot.v1.Payload.delegation_pending:type_name -> vega.snapshot.v1.DelegationPending + 42, // 14: vega.snapshot.v1.Payload.delegation_auto:type_name -> vega.snapshot.v1.DelegationAuto + 45, // 15: vega.snapshot.v1.Payload.governance_active:type_name -> vega.snapshot.v1.GovernanceActive + 44, // 16: vega.snapshot.v1.Payload.governance_enacted:type_name -> vega.snapshot.v1.GovernanceEnacted + 50, // 17: vega.snapshot.v1.Payload.staking_accounts:type_name -> vega.snapshot.v1.StakingAccounts + 51, // 18: vega.snapshot.v1.Payload.matching_book:type_name -> vega.snapshot.v1.MatchingBook + 52, // 19: vega.snapshot.v1.Payload.network_parameters:type_name -> vega.snapshot.v1.NetParams + 82, // 20: vega.snapshot.v1.Payload.execution_markets:type_name -> vega.snapshot.v1.ExecutionMarkets + 85, // 21: vega.snapshot.v1.Payload.market_positions:type_name -> vega.snapshot.v1.MarketPositions + 90, // 22: vega.snapshot.v1.Payload.app_state:type_name -> vega.snapshot.v1.AppState + 91, // 23: vega.snapshot.v1.Payload.epoch:type_name -> vega.snapshot.v1.EpochState + 92, // 24: vega.snapshot.v1.Payload.rewards_pending_payouts:type_name -> vega.snapshot.v1.RewardsPendingPayouts + 48, // 25: vega.snapshot.v1.Payload.governance_node:type_name -> vega.snapshot.v1.GovernanceNode + 96, // 26: vega.snapshot.v1.Payload.limit_state:type_name -> vega.snapshot.v1.LimitState + 97, // 27: vega.snapshot.v1.Payload.vote_spam_policy:type_name -> vega.snapshot.v1.VoteSpamPolicy + 102, // 28: vega.snapshot.v1.Payload.simple_spam_policy:type_name -> vega.snapshot.v1.SimpleSpamPolicy + 104, // 29: vega.snapshot.v1.Payload.notary:type_name -> vega.snapshot.v1.Notary + 20, // 30: vega.snapshot.v1.Payload.event_forwarder:type_name -> vega.snapshot.v1.EventForwarder + 105, // 31: vega.snapshot.v1.Payload.stake_verifier_deposited:type_name -> vega.snapshot.v1.StakeVerifierDeposited + 106, // 32: vega.snapshot.v1.Payload.stake_verifier_removed:type_name -> vega.snapshot.v1.StakeVerifierRemoved 17, // 33: vega.snapshot.v1.Payload.witness:type_name -> vega.snapshot.v1.Witness - 38, // 34: vega.snapshot.v1.Payload.delegation_last_reconciliation_time:type_name -> vega.snapshot.v1.DelegationLastReconciliationTime - 107, // 35: vega.snapshot.v1.Payload.topology:type_name -> vega.snapshot.v1.Topology + 39, // 34: vega.snapshot.v1.Payload.delegation_last_reconciliation_time:type_name -> vega.snapshot.v1.DelegationLastReconciliationTime + 115, // 35: vega.snapshot.v1.Payload.topology:type_name -> vega.snapshot.v1.Topology 14, // 36: vega.snapshot.v1.Payload.oracle_data:type_name -> vega.snapshot.v1.OracleDataBatch - 115, // 37: vega.snapshot.v1.Payload.liquidity_parameters:type_name -> vega.snapshot.v1.LiquidityParameters - 116, // 38: vega.snapshot.v1.Payload.liquidity_pending_provisions:type_name -> vega.snapshot.v1.LiquidityPendingProvisions - 117, // 39: vega.snapshot.v1.Payload.liquidity_parties_liquidity_orders:type_name -> vega.snapshot.v1.LiquidityPartiesLiquidityOrders - 119, // 40: vega.snapshot.v1.Payload.liquidity_parties_orders:type_name -> vega.snapshot.v1.LiquidityPartiesOrders - 120, // 41: vega.snapshot.v1.Payload.liquidity_provisions:type_name -> vega.snapshot.v1.LiquidityProvisions + 123, // 37: vega.snapshot.v1.Payload.liquidity_parameters:type_name -> vega.snapshot.v1.LiquidityParameters + 124, // 38: vega.snapshot.v1.Payload.liquidity_pending_provisions:type_name -> vega.snapshot.v1.LiquidityPendingProvisions + 125, // 39: vega.snapshot.v1.Payload.liquidity_parties_liquidity_orders:type_name -> vega.snapshot.v1.LiquidityPartiesLiquidityOrders + 127, // 40: vega.snapshot.v1.Payload.liquidity_parties_orders:type_name -> vega.snapshot.v1.LiquidityPartiesOrders + 128, // 41: vega.snapshot.v1.Payload.liquidity_provisions:type_name -> vega.snapshot.v1.LiquidityProvisions 13, // 42: vega.snapshot.v1.Payload.liquidity_supplied:type_name -> vega.snapshot.v1.LiquiditySupplied 10, // 43: vega.snapshot.v1.Payload.liquidity_target:type_name -> vega.snapshot.v1.LiquidityTarget - 131, // 44: vega.snapshot.v1.Payload.floating_point_consensus:type_name -> vega.snapshot.v1.FloatingPointConsensus - 135, // 45: vega.snapshot.v1.Payload.market_tracker:type_name -> vega.snapshot.v1.MarketTracker - 32, // 46: vega.snapshot.v1.Payload.banking_recurring_transfers:type_name -> vega.snapshot.v1.BankingRecurringTransfers - 33, // 47: vega.snapshot.v1.Payload.banking_scheduled_transfers:type_name -> vega.snapshot.v1.BankingScheduledTransfers - 137, // 48: vega.snapshot.v1.Payload.erc20_multisig_topology_verified:type_name -> vega.snapshot.v1.ERC20MultiSigTopologyVerified - 138, // 49: vega.snapshot.v1.Payload.erc20_multisig_topology_pending:type_name -> vega.snapshot.v1.ERC20MultiSigTopologyPending - 139, // 50: vega.snapshot.v1.Payload.proof_of_work:type_name -> vega.snapshot.v1.ProofOfWork - 24, // 51: vega.snapshot.v1.Payload.pending_asset_updates:type_name -> vega.snapshot.v1.PendingAssetUpdates - 148, // 52: vega.snapshot.v1.Payload.protocol_upgrade_proposals:type_name -> vega.snapshot.v1.ProtocolUpgradeProposals - 36, // 53: vega.snapshot.v1.Payload.banking_bridge_state:type_name -> vega.snapshot.v1.BankingBridgeState - 81, // 54: vega.snapshot.v1.Payload.settlement_state:type_name -> vega.snapshot.v1.SettlementState - 121, // 55: vega.snapshot.v1.Payload.liquidity_scores:type_name -> vega.snapshot.v1.LiquidityScores + 139, // 44: vega.snapshot.v1.Payload.floating_point_consensus:type_name -> vega.snapshot.v1.FloatingPointConsensus + 143, // 45: vega.snapshot.v1.Payload.market_tracker:type_name -> vega.snapshot.v1.MarketTracker + 33, // 46: vega.snapshot.v1.Payload.banking_recurring_transfers:type_name -> vega.snapshot.v1.BankingRecurringTransfers + 34, // 47: vega.snapshot.v1.Payload.banking_scheduled_transfers:type_name -> vega.snapshot.v1.BankingScheduledTransfers + 145, // 48: vega.snapshot.v1.Payload.erc20_multisig_topology_verified:type_name -> vega.snapshot.v1.ERC20MultiSigTopologyVerified + 146, // 49: vega.snapshot.v1.Payload.erc20_multisig_topology_pending:type_name -> vega.snapshot.v1.ERC20MultiSigTopologyPending + 147, // 50: vega.snapshot.v1.Payload.proof_of_work:type_name -> vega.snapshot.v1.ProofOfWork + 25, // 51: vega.snapshot.v1.Payload.pending_asset_updates:type_name -> vega.snapshot.v1.PendingAssetUpdates + 156, // 52: vega.snapshot.v1.Payload.protocol_upgrade_proposals:type_name -> vega.snapshot.v1.ProtocolUpgradeProposals + 37, // 53: vega.snapshot.v1.Payload.banking_bridge_state:type_name -> vega.snapshot.v1.BankingBridgeState + 87, // 54: vega.snapshot.v1.Payload.settlement_state:type_name -> vega.snapshot.v1.SettlementState + 129, // 55: vega.snapshot.v1.Payload.liquidity_scores:type_name -> vega.snapshot.v1.LiquidityScores 11, // 56: vega.snapshot.v1.Payload.spot_liquidity_target:type_name -> vega.snapshot.v1.SpotLiquidityTarget - 34, // 57: vega.snapshot.v1.Payload.banking_recurring_governance_transfers:type_name -> vega.snapshot.v1.BankingRecurringGovernanceTransfers - 35, // 58: vega.snapshot.v1.Payload.banking_scheduled_governance_transfers:type_name -> vega.snapshot.v1.BankingScheduledGovernanceTransfers - 103, // 59: vega.snapshot.v1.Payload.eth_contract_call_results:type_name -> vega.snapshot.v1.EthContractCallResults - 102, // 60: vega.snapshot.v1.Payload.eth_oracle_verifier_last_block:type_name -> vega.snapshot.v1.EthOracleVerifierLastBlock - 125, // 61: vega.snapshot.v1.Payload.liquidity_v2_provisions:type_name -> vega.snapshot.v1.LiquidityV2Provisions - 126, // 62: vega.snapshot.v1.Payload.liquidity_v2_pending_provisions:type_name -> vega.snapshot.v1.LiquidityV2PendingProvisions - 127, // 63: vega.snapshot.v1.Payload.liquidity_v2_performances:type_name -> vega.snapshot.v1.LiquidityV2Performances - 130, // 64: vega.snapshot.v1.Payload.liquidity_v2_supplied:type_name -> vega.snapshot.v1.LiquidityV2Supplied - 129, // 65: vega.snapshot.v1.Payload.liquidity_v2_scores:type_name -> vega.snapshot.v1.LiquidityV2Scores + 35, // 57: vega.snapshot.v1.Payload.banking_recurring_governance_transfers:type_name -> vega.snapshot.v1.BankingRecurringGovernanceTransfers + 36, // 58: vega.snapshot.v1.Payload.banking_scheduled_governance_transfers:type_name -> vega.snapshot.v1.BankingScheduledGovernanceTransfers + 111, // 59: vega.snapshot.v1.Payload.eth_contract_call_results:type_name -> vega.snapshot.v1.EthContractCallResults + 110, // 60: vega.snapshot.v1.Payload.eth_oracle_verifier_last_block:type_name -> vega.snapshot.v1.EthOracleVerifierLastBlock + 133, // 61: vega.snapshot.v1.Payload.liquidity_v2_provisions:type_name -> vega.snapshot.v1.LiquidityV2Provisions + 134, // 62: vega.snapshot.v1.Payload.liquidity_v2_pending_provisions:type_name -> vega.snapshot.v1.LiquidityV2PendingProvisions + 135, // 63: vega.snapshot.v1.Payload.liquidity_v2_performances:type_name -> vega.snapshot.v1.LiquidityV2Performances + 138, // 64: vega.snapshot.v1.Payload.liquidity_v2_supplied:type_name -> vega.snapshot.v1.LiquidityV2Supplied + 137, // 65: vega.snapshot.v1.Payload.liquidity_v2_scores:type_name -> vega.snapshot.v1.LiquidityV2Scores 7, // 66: vega.snapshot.v1.Payload.holding_account_tracker:type_name -> vega.snapshot.v1.HoldingAccountTracker - 150, // 67: vega.snapshot.v1.Payload.teams:type_name -> vega.snapshot.v1.Teams - 153, // 68: vega.snapshot.v1.Payload.team_switches:type_name -> vega.snapshot.v1.TeamSwitches - 155, // 69: vega.snapshot.v1.Payload.vesting:type_name -> vega.snapshot.v1.Vesting - 157, // 70: vega.snapshot.v1.Payload.referral_program:type_name -> vega.snapshot.v1.ReferralProgramData - 164, // 71: vega.snapshot.v1.Payload.activity_streak:type_name -> vega.snapshot.v1.ActivityStreak - 166, // 72: vega.snapshot.v1.Payload.volume_discount_program:type_name -> vega.snapshot.v1.VolumeDiscountProgram - 123, // 73: vega.snapshot.v1.Payload.liquidity_v2_parameters:type_name -> vega.snapshot.v1.LiquidityV2Parameters - 124, // 74: vega.snapshot.v1.Payload.liquidity_v2_paid_fees_stats:type_name -> vega.snapshot.v1.LiquidityV2PaidFeesStats - 6, // 75: vega.snapshot.v1.HoldingAccountTracker.order_holding:type_name -> vega.snapshot.v1.OrderHoldingQuantities - 9, // 76: vega.snapshot.v1.LiquidityTarget.previous_open_interests:type_name -> vega.snapshot.v1.TimestampedOpenInterest - 9, // 77: vega.snapshot.v1.LiquidityTarget.max_open_interests:type_name -> vega.snapshot.v1.TimestampedOpenInterest - 8, // 78: vega.snapshot.v1.SpotLiquidityTarget.previous_total_stake:type_name -> vega.snapshot.v1.TimestampedTotalStake - 8, // 79: vega.snapshot.v1.SpotLiquidityTarget.max_total_stake:type_name -> vega.snapshot.v1.TimestampedTotalStake - 12, // 80: vega.snapshot.v1.LiquiditySupplied.bid_cache:type_name -> vega.snapshot.v1.LiquidityOffsetProbabilityPair - 12, // 81: vega.snapshot.v1.LiquiditySupplied.ask_cache:type_name -> vega.snapshot.v1.LiquidityOffsetProbabilityPair - 15, // 82: vega.snapshot.v1.OracleDataBatch.oracle_data:type_name -> vega.snapshot.v1.OracleData - 170, // 83: vega.snapshot.v1.OracleData.signers:type_name -> vega.data.v1.Signer - 16, // 84: vega.snapshot.v1.OracleData.data:type_name -> vega.snapshot.v1.OracleDataPair - 171, // 85: vega.snapshot.v1.OracleData.meta_data:type_name -> vega.data.v1.Property - 18, // 86: vega.snapshot.v1.Witness.resources:type_name -> vega.snapshot.v1.Resource - 172, // 87: vega.snapshot.v1.CollateralAccounts.accounts:type_name -> vega.Account - 173, // 88: vega.snapshot.v1.CollateralAssets.assets:type_name -> vega.Asset - 173, // 89: vega.snapshot.v1.ActiveAssets.assets:type_name -> vega.Asset - 173, // 90: vega.snapshot.v1.PendingAssets.assets:type_name -> vega.Asset - 173, // 91: vega.snapshot.v1.PendingAssetUpdates.assets:type_name -> vega.Asset - 174, // 92: vega.snapshot.v1.Withdrawal.withdrawal:type_name -> vega.Withdrawal - 175, // 93: vega.snapshot.v1.Deposit.deposit:type_name -> vega.Deposit - 25, // 94: vega.snapshot.v1.BankingWithdrawals.withdrawals:type_name -> vega.snapshot.v1.Withdrawal - 26, // 95: vega.snapshot.v1.BankingDeposits.deposit:type_name -> vega.snapshot.v1.Deposit - 176, // 96: vega.snapshot.v1.BankingAssetActions.asset_action:type_name -> vega.checkpoint.v1.AssetAction - 177, // 97: vega.snapshot.v1.BankingRecurringTransfers.recurring_transfers:type_name -> vega.checkpoint.v1.RecurringTransfers - 178, // 98: vega.snapshot.v1.BankingScheduledTransfers.transfers_at_time:type_name -> vega.checkpoint.v1.ScheduledTransferAtTime - 179, // 99: vega.snapshot.v1.BankingRecurringGovernanceTransfers.recurring_transfers:type_name -> vega.checkpoint.v1.GovernanceTransfer - 180, // 100: vega.snapshot.v1.BankingScheduledGovernanceTransfers.transfers_at_time:type_name -> vega.checkpoint.v1.ScheduledGovernanceTransferAtTime - 181, // 101: vega.snapshot.v1.BankingBridgeState.bridge_state:type_name -> vega.checkpoint.v1.BridgeState - 182, // 102: vega.snapshot.v1.DelegationActive.delegations:type_name -> vega.Delegation - 182, // 103: vega.snapshot.v1.DelegationPending.delegations:type_name -> vega.Delegation - 182, // 104: vega.snapshot.v1.DelegationPending.undelegation:type_name -> vega.Delegation - 183, // 105: vega.snapshot.v1.ProposalData.proposal:type_name -> vega.Proposal - 184, // 106: vega.snapshot.v1.ProposalData.yes:type_name -> vega.Vote - 184, // 107: vega.snapshot.v1.ProposalData.no:type_name -> vega.Vote - 184, // 108: vega.snapshot.v1.ProposalData.invalid:type_name -> vega.Vote - 42, // 109: vega.snapshot.v1.GovernanceEnacted.proposals:type_name -> vega.snapshot.v1.ProposalData - 42, // 110: vega.snapshot.v1.GovernanceActive.proposals:type_name -> vega.snapshot.v1.ProposalData - 183, // 111: vega.snapshot.v1.GovernanceNode.proposals:type_name -> vega.Proposal - 185, // 112: vega.snapshot.v1.StakingAccount.events:type_name -> vega.events.v1.StakeLinking - 46, // 113: vega.snapshot.v1.StakingAccounts.accounts:type_name -> vega.snapshot.v1.StakingAccount - 186, // 114: vega.snapshot.v1.StakingAccounts.pending_stake_total_supply:type_name -> vega.StakeTotalSupply - 187, // 115: vega.snapshot.v1.MatchingBook.buy:type_name -> vega.Order - 187, // 116: vega.snapshot.v1.MatchingBook.sell:type_name -> vega.Order - 188, // 117: vega.snapshot.v1.NetParams.params:type_name -> vega.NetworkParameter - 189, // 118: vega.snapshot.v1.PriceBound.trigger:type_name -> vega.PriceMonitoringTrigger - 54, // 119: vega.snapshot.v1.PriceRangeCache.bound:type_name -> vega.snapshot.v1.PriceBound - 53, // 120: vega.snapshot.v1.PriceRangeCache.range:type_name -> vega.snapshot.v1.PriceRange - 50, // 121: vega.snapshot.v1.PriceMonitor.fp_horizons:type_name -> vega.snapshot.v1.DecimalMap - 54, // 122: vega.snapshot.v1.PriceMonitor.bounds:type_name -> vega.snapshot.v1.PriceBound - 55, // 123: vega.snapshot.v1.PriceMonitor.price_range_cache:type_name -> vega.snapshot.v1.PriceRangeCache - 50, // 124: vega.snapshot.v1.PriceMonitor.ref_price_cache:type_name -> vega.snapshot.v1.DecimalMap - 56, // 125: vega.snapshot.v1.PriceMonitor.prices_now:type_name -> vega.snapshot.v1.CurrentPrice - 57, // 126: vega.snapshot.v1.PriceMonitor.prices_past:type_name -> vega.snapshot.v1.PastPrice - 190, // 127: vega.snapshot.v1.AuctionState.mode:type_name -> vega.Market.TradingMode - 190, // 128: vega.snapshot.v1.AuctionState.default_mode:type_name -> vega.Market.TradingMode - 191, // 129: vega.snapshot.v1.AuctionState.trigger:type_name -> vega.AuctionTrigger - 192, // 130: vega.snapshot.v1.AuctionState.end:type_name -> vega.AuctionDuration - 191, // 131: vega.snapshot.v1.AuctionState.extension:type_name -> vega.AuctionTrigger - 60, // 132: vega.snapshot.v1.EquityShare.lps:type_name -> vega.snapshot.v1.EquityShareLP - 193, // 133: vega.snapshot.v1.SpotMarket.market:type_name -> vega.Market - 58, // 134: vega.snapshot.v1.SpotMarket.price_monitor:type_name -> vega.snapshot.v1.PriceMonitor - 59, // 135: vega.snapshot.v1.SpotMarket.auction_state:type_name -> vega.snapshot.v1.AuctionState - 74, // 136: vega.snapshot.v1.SpotMarket.pegged_orders:type_name -> vega.snapshot.v1.PeggedOrders - 187, // 137: vega.snapshot.v1.SpotMarket.expiring_orders:type_name -> vega.Order - 61, // 138: vega.snapshot.v1.SpotMarket.equity_share:type_name -> vega.snapshot.v1.EquityShare - 62, // 139: vega.snapshot.v1.SpotMarket.fee_splitter:type_name -> vega.snapshot.v1.FeeSplitter - 73, // 140: vega.snapshot.v1.SpotMarket.stop_orders:type_name -> vega.snapshot.v1.StopOrders - 187, // 141: vega.snapshot.v1.SpotMarket.expiring_stop_orders:type_name -> vega.Order - 194, // 142: vega.snapshot.v1.SpotMarket.fees_stats:type_name -> vega.events.v1.FeesStats - 193, // 143: vega.snapshot.v1.Market.market:type_name -> vega.Market - 58, // 144: vega.snapshot.v1.Market.price_monitor:type_name -> vega.snapshot.v1.PriceMonitor - 59, // 145: vega.snapshot.v1.Market.auction_state:type_name -> vega.snapshot.v1.AuctionState - 74, // 146: vega.snapshot.v1.Market.pegged_orders:type_name -> vega.snapshot.v1.PeggedOrders - 187, // 147: vega.snapshot.v1.Market.expiring_orders:type_name -> vega.Order - 61, // 148: vega.snapshot.v1.Market.equity_share:type_name -> vega.snapshot.v1.EquityShare - 62, // 149: vega.snapshot.v1.Market.fee_splitter:type_name -> vega.snapshot.v1.FeeSplitter - 73, // 150: vega.snapshot.v1.Market.stop_orders:type_name -> vega.snapshot.v1.StopOrders - 187, // 151: vega.snapshot.v1.Market.expiring_stop_orders:type_name -> vega.Order - 65, // 152: vega.snapshot.v1.Market.product:type_name -> vega.snapshot.v1.Product - 194, // 153: vega.snapshot.v1.Market.fees_stats:type_name -> vega.events.v1.FeesStats - 67, // 154: vega.snapshot.v1.Product.perps:type_name -> vega.snapshot.v1.Perps - 66, // 155: vega.snapshot.v1.Perps.external_data_point:type_name -> vega.snapshot.v1.DataPoint - 66, // 156: vega.snapshot.v1.Perps.internal_data_point:type_name -> vega.snapshot.v1.DataPoint - 68, // 157: vega.snapshot.v1.PricedStopOrders.falls_bellow:type_name -> vega.snapshot.v1.OrdersAtPrice - 68, // 158: vega.snapshot.v1.PricedStopOrders.rises_above:type_name -> vega.snapshot.v1.OrdersAtPrice - 72, // 159: vega.snapshot.v1.TrailingStopOrders.falls_bellow:type_name -> vega.snapshot.v1.OffsetsAtPrice - 72, // 160: vega.snapshot.v1.TrailingStopOrders.rises_above:type_name -> vega.snapshot.v1.OffsetsAtPrice - 71, // 161: vega.snapshot.v1.OffsetsAtPrice.offsets:type_name -> vega.snapshot.v1.OrdersAtOffset - 195, // 162: vega.snapshot.v1.StopOrders.stop_orders:type_name -> vega.events.v1.StopOrderEvent - 69, // 163: vega.snapshot.v1.StopOrders.priced_stop_orders:type_name -> vega.snapshot.v1.PricedStopOrders - 70, // 164: vega.snapshot.v1.StopOrders.trailing_stop_orders:type_name -> vega.snapshot.v1.TrailingStopOrders - 187, // 165: vega.snapshot.v1.PeggedOrders.parked_orders:type_name -> vega.Order - 64, // 166: vega.snapshot.v1.ExecutionMarkets.markets:type_name -> vega.snapshot.v1.Market - 63, // 167: vega.snapshot.v1.ExecutionMarkets.spot_markets:type_name -> vega.snapshot.v1.SpotMarket - 196, // 168: vega.snapshot.v1.ExecutionMarkets.settled_markets:type_name -> vega.checkpoint.v1.MarketState - 77, // 169: vega.snapshot.v1.ExecutionMarkets.successors:type_name -> vega.snapshot.v1.Successors - 75, // 170: vega.snapshot.v1.ExecutionMarkets.sla_network_params:type_name -> vega.snapshot.v1.SLANetworkParams - 78, // 171: vega.snapshot.v1.MarketPositions.positions:type_name -> vega.snapshot.v1.Position - 80, // 172: vega.snapshot.v1.MarketPositions.parties_records:type_name -> vega.snapshot.v1.PartyPositionStats - 82, // 173: vega.snapshot.v1.SettlementState.last_settled_positions:type_name -> vega.snapshot.v1.LastSettledPosition - 83, // 174: vega.snapshot.v1.SettlementState.trades:type_name -> vega.snapshot.v1.SettlementTrade - 87, // 175: vega.snapshot.v1.RewardsPendingPayouts.scheduled_rewards_payout:type_name -> vega.snapshot.v1.ScheduledRewardsPayout - 88, // 176: vega.snapshot.v1.ScheduledRewardsPayout.rewards_payout:type_name -> vega.snapshot.v1.RewardsPayout - 89, // 177: vega.snapshot.v1.RewardsPayout.reward_party_amount:type_name -> vega.snapshot.v1.RewardsPartyAmount - 92, // 178: vega.snapshot.v1.VoteSpamPolicy.party_to_vote:type_name -> vega.snapshot.v1.PartyProposalVoteCount - 140, // 179: vega.snapshot.v1.VoteSpamPolicy.banned_parties:type_name -> vega.snapshot.v1.BannedParty - 93, // 180: vega.snapshot.v1.VoteSpamPolicy.token_balance:type_name -> vega.snapshot.v1.PartyTokenBalance - 94, // 181: vega.snapshot.v1.VoteSpamPolicy.recent_blocks_reject_stats:type_name -> vega.snapshot.v1.BlockRejectStats - 95, // 182: vega.snapshot.v1.SimpleSpamPolicy.party_to_count:type_name -> vega.snapshot.v1.SpamPartyTransactionCount - 140, // 183: vega.snapshot.v1.SimpleSpamPolicy.banned_parties:type_name -> vega.snapshot.v1.BannedParty - 93, // 184: vega.snapshot.v1.SimpleSpamPolicy.token_balance:type_name -> vega.snapshot.v1.PartyTokenBalance - 97, // 185: vega.snapshot.v1.Notary.notary_sigs:type_name -> vega.snapshot.v1.NotarySigs - 101, // 186: vega.snapshot.v1.StakeVerifierDeposited.pending_deposited:type_name -> vega.snapshot.v1.StakeVerifierPending - 101, // 187: vega.snapshot.v1.StakeVerifierRemoved.pending_removed:type_name -> vega.snapshot.v1.StakeVerifierPending - 104, // 188: vega.snapshot.v1.EthContractCallResults.pending_contract_call_result:type_name -> vega.snapshot.v1.EthContractCallResult - 111, // 189: vega.snapshot.v1.Topology.validator_data:type_name -> vega.snapshot.v1.ValidatorState - 105, // 190: vega.snapshot.v1.Topology.pending_pub_key_rotations:type_name -> vega.snapshot.v1.PendingKeyRotation - 114, // 191: vega.snapshot.v1.Topology.validator_performance:type_name -> vega.snapshot.v1.ValidatorPerformance - 106, // 192: vega.snapshot.v1.Topology.pending_ethereum_key_rotations:type_name -> vega.snapshot.v1.PendingEthereumKeyRotation - 108, // 193: vega.snapshot.v1.Topology.signatures:type_name -> vega.snapshot.v1.ToplogySignatures - 106, // 194: vega.snapshot.v1.Topology.unsolved_ethereum_key_rotations:type_name -> vega.snapshot.v1.PendingEthereumKeyRotation - 109, // 195: vega.snapshot.v1.ToplogySignatures.pending_signatures:type_name -> vega.snapshot.v1.PendingERC20MultisigControlSignature - 110, // 196: vega.snapshot.v1.ToplogySignatures.issued_signatures:type_name -> vega.snapshot.v1.IssuedERC20MultisigControlSignature - 197, // 197: vega.snapshot.v1.ValidatorState.validator_update:type_name -> vega.events.v1.ValidatorUpdate - 112, // 198: vega.snapshot.v1.ValidatorState.heartbeat_tracker:type_name -> vega.snapshot.v1.HeartbeatTracker - 198, // 199: vega.snapshot.v1.ValidatorState.ranking_score:type_name -> vega.RankingScore - 113, // 200: vega.snapshot.v1.ValidatorPerformance.validator_perf_stats:type_name -> vega.snapshot.v1.PerformanceStats - 118, // 201: vega.snapshot.v1.LiquidityPartiesLiquidityOrders.party_orders:type_name -> vega.snapshot.v1.PartyOrders - 187, // 202: vega.snapshot.v1.PartyOrders.orders:type_name -> vega.Order - 118, // 203: vega.snapshot.v1.LiquidityPartiesOrders.party_orders:type_name -> vega.snapshot.v1.PartyOrders - 199, // 204: vega.snapshot.v1.LiquidityProvisions.liquidity_provisions:type_name -> vega.LiquidityProvision - 122, // 205: vega.snapshot.v1.LiquidityScores.scores:type_name -> vega.snapshot.v1.LiquidityScore - 200, // 206: vega.snapshot.v1.LiquidityV2Parameters.market_sla_parameters:type_name -> vega.LiquiditySLAParameters - 201, // 207: vega.snapshot.v1.LiquidityV2PaidFeesStats.stats:type_name -> vega.events.v1.PaidLiquidityFeesStats - 199, // 208: vega.snapshot.v1.LiquidityV2Provisions.liquidity_provisions:type_name -> vega.LiquidityProvision - 199, // 209: vega.snapshot.v1.LiquidityV2PendingProvisions.pending_liquidity_provisions:type_name -> vega.LiquidityProvision - 128, // 210: vega.snapshot.v1.LiquidityV2Performances.performance_per_party:type_name -> vega.snapshot.v1.LiquidityV2PerformancePerParty - 122, // 211: vega.snapshot.v1.LiquidityV2Scores.scores:type_name -> vega.snapshot.v1.LiquidityScore - 12, // 212: vega.snapshot.v1.LiquidityV2Supplied.bid_cache:type_name -> vega.snapshot.v1.LiquidityOffsetProbabilityPair - 12, // 213: vega.snapshot.v1.LiquidityV2Supplied.ask_cache:type_name -> vega.snapshot.v1.LiquidityOffsetProbabilityPair - 134, // 214: vega.snapshot.v1.FloatingPointConsensus.next_time_trigger:type_name -> vega.snapshot.v1.NextTimeTrigger - 132, // 215: vega.snapshot.v1.FloatingPointConsensus.state_variables:type_name -> vega.snapshot.v1.StateVarInternalState - 133, // 216: vega.snapshot.v1.StateVarInternalState.validators_results:type_name -> vega.snapshot.v1.FloatingPointValidatorResult - 202, // 217: vega.snapshot.v1.FloatingPointValidatorResult.bundle:type_name -> vega.KeyValueBundle - 203, // 218: vega.snapshot.v1.MarketTracker.market_activity:type_name -> vega.checkpoint.v1.MarketActivityTracker - 204, // 219: vega.snapshot.v1.MarketTracker.taker_notional_volume:type_name -> vega.checkpoint.v1.TakerNotionalVolume - 205, // 220: vega.snapshot.v1.SignerEventsPerAddress.events:type_name -> vega.events.v1.ERC20MultiSigSignerEvent - 136, // 221: vega.snapshot.v1.ERC20MultiSigTopologyVerified.events_per_address:type_name -> vega.snapshot.v1.SignerEventsPerAddress - 206, // 222: vega.snapshot.v1.ERC20MultiSigTopologyVerified.threshold:type_name -> vega.events.v1.ERC20MultiSigThresholdSetEvent - 205, // 223: vega.snapshot.v1.ERC20MultiSigTopologyPending.pending_signers:type_name -> vega.events.v1.ERC20MultiSigSignerEvent - 206, // 224: vega.snapshot.v1.ERC20MultiSigTopologyPending.pending_threshold_set:type_name -> vega.events.v1.ERC20MultiSigThresholdSetEvent - 145, // 225: vega.snapshot.v1.ProofOfWork.tx_at_height:type_name -> vega.snapshot.v1.TransactionsAtHeight - 145, // 226: vega.snapshot.v1.ProofOfWork.tid_at_height:type_name -> vega.snapshot.v1.TransactionsAtHeight - 140, // 227: vega.snapshot.v1.ProofOfWork.banned:type_name -> vega.snapshot.v1.BannedParty - 141, // 228: vega.snapshot.v1.ProofOfWork.pow_params:type_name -> vega.snapshot.v1.ProofOfWorkParams - 142, // 229: vega.snapshot.v1.ProofOfWork.pow_state:type_name -> vega.snapshot.v1.ProofOfWorkState - 147, // 230: vega.snapshot.v1.ProofOfWork.nonce_refs_at_height:type_name -> vega.snapshot.v1.NonceRefsAtHeight - 143, // 231: vega.snapshot.v1.ProofOfWorkState.pow_state:type_name -> vega.snapshot.v1.ProofOfWorkBlockState - 144, // 232: vega.snapshot.v1.ProofOfWorkBlockState.party_state:type_name -> vega.snapshot.v1.ProofOfWorkPartyStateForBlock - 146, // 233: vega.snapshot.v1.NonceRefsAtHeight.refs:type_name -> vega.snapshot.v1.NonceRef - 207, // 234: vega.snapshot.v1.ProtocolUpgradeProposals.active_proposals:type_name -> vega.events.v1.ProtocolUpgradeEvent - 149, // 235: vega.snapshot.v1.ProtocolUpgradeProposals.accepted_proposal:type_name -> vega.snapshot.v1.AcceptedProtocolUpgradeProposal - 151, // 236: vega.snapshot.v1.Teams.teams:type_name -> vega.snapshot.v1.Team - 152, // 237: vega.snapshot.v1.Team.referrer:type_name -> vega.snapshot.v1.Membership - 152, // 238: vega.snapshot.v1.Team.referees:type_name -> vega.snapshot.v1.Membership - 154, // 239: vega.snapshot.v1.TeamSwitches.team_switches:type_name -> vega.snapshot.v1.TeamSwitch - 156, // 240: vega.snapshot.v1.Vesting.parties_reward:type_name -> vega.snapshot.v1.PartyReward - 161, // 241: vega.snapshot.v1.PartyReward.asset_locked:type_name -> vega.snapshot.v1.AssetLocked - 163, // 242: vega.snapshot.v1.PartyReward.in_vesting:type_name -> vega.snapshot.v1.InVesting - 160, // 243: vega.snapshot.v1.ReferralProgramData.factor_by_referee:type_name -> vega.snapshot.v1.FactorByReferee - 208, // 244: vega.snapshot.v1.ReferralProgramData.current_program:type_name -> vega.ReferralProgram - 208, // 245: vega.snapshot.v1.ReferralProgramData.new_program:type_name -> vega.ReferralProgram - 158, // 246: vega.snapshot.v1.ReferralProgramData.sets:type_name -> vega.snapshot.v1.ReferralSet - 152, // 247: vega.snapshot.v1.ReferralSet.referrer:type_name -> vega.snapshot.v1.Membership - 152, // 248: vega.snapshot.v1.ReferralSet.referees:type_name -> vega.snapshot.v1.Membership - 159, // 249: vega.snapshot.v1.ReferralSet.running_volumes:type_name -> vega.snapshot.v1.RunningVolume - 162, // 250: vega.snapshot.v1.AssetLocked.epoch_balances:type_name -> vega.snapshot.v1.EpochBalance - 165, // 251: vega.snapshot.v1.ActivityStreak.parties_activity_streak:type_name -> vega.snapshot.v1.PartyActivityStreak - 168, // 252: vega.snapshot.v1.VolumeDiscountProgram.epoch_party_volumes:type_name -> vega.snapshot.v1.EpochPartyVolumes - 169, // 253: vega.snapshot.v1.VolumeDiscountProgram.average_party_volume:type_name -> vega.snapshot.v1.PartyVolume - 209, // 254: vega.snapshot.v1.VolumeDiscountProgram.current_program:type_name -> vega.VolumeDiscountProgram - 209, // 255: vega.snapshot.v1.VolumeDiscountProgram.new_program:type_name -> vega.VolumeDiscountProgram - 167, // 256: vega.snapshot.v1.VolumeDiscountProgram.factors_by_party:type_name -> vega.snapshot.v1.VolumeDiscountStats - 169, // 257: vega.snapshot.v1.EpochPartyVolumes.party_volume:type_name -> vega.snapshot.v1.PartyVolume - 258, // [258:258] is the sub-list for method output_type - 258, // [258:258] is the sub-list for method input_type - 258, // [258:258] is the sub-list for extension type_name - 258, // [258:258] is the sub-list for extension extendee - 0, // [0:258] is the sub-list for field type_name + 158, // 67: vega.snapshot.v1.Payload.teams:type_name -> vega.snapshot.v1.Teams + 161, // 68: vega.snapshot.v1.Payload.team_switches:type_name -> vega.snapshot.v1.TeamSwitches + 163, // 69: vega.snapshot.v1.Payload.vesting:type_name -> vega.snapshot.v1.Vesting + 165, // 70: vega.snapshot.v1.Payload.referral_program:type_name -> vega.snapshot.v1.ReferralProgramData + 172, // 71: vega.snapshot.v1.Payload.activity_streak:type_name -> vega.snapshot.v1.ActivityStreak + 174, // 72: vega.snapshot.v1.Payload.volume_discount_program:type_name -> vega.snapshot.v1.VolumeDiscountProgram + 131, // 73: vega.snapshot.v1.Payload.liquidity_v2_parameters:type_name -> vega.snapshot.v1.LiquidityV2Parameters + 132, // 74: vega.snapshot.v1.Payload.liquidity_v2_paid_fees_stats:type_name -> vega.snapshot.v1.LiquidityV2PaidFeesStats + 178, // 75: vega.snapshot.v1.Payload.liquidation:type_name -> vega.snapshot.v1.Liquidation + 180, // 76: vega.snapshot.v1.Payload.banking_transfer_fee_discounts:type_name -> vega.snapshot.v1.BankingTransferFeeDiscounts + 47, // 77: vega.snapshot.v1.Payload.governance_batch_active:type_name -> vega.snapshot.v1.GovernanceBatchActive + 182, // 78: vega.snapshot.v1.Payload.parties:type_name -> vega.snapshot.v1.Parties + 108, // 79: vega.snapshot.v1.Payload.l2_eth_oracles:type_name -> vega.snapshot.v1.L2EthOracles + 6, // 80: vega.snapshot.v1.HoldingAccountTracker.order_holding:type_name -> vega.snapshot.v1.OrderHoldingQuantities + 9, // 81: vega.snapshot.v1.LiquidityTarget.previous_open_interests:type_name -> vega.snapshot.v1.TimestampedOpenInterest + 9, // 82: vega.snapshot.v1.LiquidityTarget.max_open_interests:type_name -> vega.snapshot.v1.TimestampedOpenInterest + 8, // 83: vega.snapshot.v1.SpotLiquidityTarget.previous_total_stake:type_name -> vega.snapshot.v1.TimestampedTotalStake + 8, // 84: vega.snapshot.v1.SpotLiquidityTarget.max_total_stake:type_name -> vega.snapshot.v1.TimestampedTotalStake + 12, // 85: vega.snapshot.v1.LiquiditySupplied.bid_cache:type_name -> vega.snapshot.v1.LiquidityOffsetProbabilityPair + 12, // 86: vega.snapshot.v1.LiquiditySupplied.ask_cache:type_name -> vega.snapshot.v1.LiquidityOffsetProbabilityPair + 15, // 87: vega.snapshot.v1.OracleDataBatch.oracle_data:type_name -> vega.snapshot.v1.OracleData + 184, // 88: vega.snapshot.v1.OracleData.signers:type_name -> vega.data.v1.Signer + 16, // 89: vega.snapshot.v1.OracleData.data:type_name -> vega.snapshot.v1.OracleDataPair + 185, // 90: vega.snapshot.v1.OracleData.meta_data:type_name -> vega.data.v1.Property + 18, // 91: vega.snapshot.v1.Witness.resources:type_name -> vega.snapshot.v1.Resource + 19, // 92: vega.snapshot.v1.EventForwarder.buckets:type_name -> vega.snapshot.v1.EventForwarderBucket + 186, // 93: vega.snapshot.v1.CollateralAccounts.accounts:type_name -> vega.Account + 187, // 94: vega.snapshot.v1.CollateralAssets.assets:type_name -> vega.Asset + 187, // 95: vega.snapshot.v1.ActiveAssets.assets:type_name -> vega.Asset + 187, // 96: vega.snapshot.v1.PendingAssets.assets:type_name -> vega.Asset + 187, // 97: vega.snapshot.v1.PendingAssetUpdates.assets:type_name -> vega.Asset + 188, // 98: vega.snapshot.v1.Withdrawal.withdrawal:type_name -> vega.Withdrawal + 189, // 99: vega.snapshot.v1.Deposit.deposit:type_name -> vega.Deposit + 26, // 100: vega.snapshot.v1.BankingWithdrawals.withdrawals:type_name -> vega.snapshot.v1.Withdrawal + 27, // 101: vega.snapshot.v1.BankingDeposits.deposit:type_name -> vega.snapshot.v1.Deposit + 190, // 102: vega.snapshot.v1.BankingAssetActions.asset_action:type_name -> vega.checkpoint.v1.AssetAction + 191, // 103: vega.snapshot.v1.BankingRecurringTransfers.recurring_transfers:type_name -> vega.checkpoint.v1.RecurringTransfers + 192, // 104: vega.snapshot.v1.BankingScheduledTransfers.transfers_at_time:type_name -> vega.checkpoint.v1.ScheduledTransferAtTime + 193, // 105: vega.snapshot.v1.BankingRecurringGovernanceTransfers.recurring_transfers:type_name -> vega.checkpoint.v1.GovernanceTransfer + 194, // 106: vega.snapshot.v1.BankingScheduledGovernanceTransfers.transfers_at_time:type_name -> vega.checkpoint.v1.ScheduledGovernanceTransferAtTime + 195, // 107: vega.snapshot.v1.BankingBridgeState.bridge_state:type_name -> vega.checkpoint.v1.BridgeState + 196, // 108: vega.snapshot.v1.DelegationActive.delegations:type_name -> vega.Delegation + 196, // 109: vega.snapshot.v1.DelegationPending.delegations:type_name -> vega.Delegation + 196, // 110: vega.snapshot.v1.DelegationPending.undelegation:type_name -> vega.Delegation + 197, // 111: vega.snapshot.v1.ProposalData.proposal:type_name -> vega.Proposal + 198, // 112: vega.snapshot.v1.ProposalData.yes:type_name -> vega.Vote + 198, // 113: vega.snapshot.v1.ProposalData.no:type_name -> vega.Vote + 198, // 114: vega.snapshot.v1.ProposalData.invalid:type_name -> vega.Vote + 43, // 115: vega.snapshot.v1.GovernanceEnacted.proposals:type_name -> vega.snapshot.v1.ProposalData + 43, // 116: vega.snapshot.v1.GovernanceActive.proposals:type_name -> vega.snapshot.v1.ProposalData + 43, // 117: vega.snapshot.v1.BatchProposalData.batch_proposal:type_name -> vega.snapshot.v1.ProposalData + 197, // 118: vega.snapshot.v1.BatchProposalData.proposals:type_name -> vega.Proposal + 46, // 119: vega.snapshot.v1.GovernanceBatchActive.batch_proposals:type_name -> vega.snapshot.v1.BatchProposalData + 197, // 120: vega.snapshot.v1.GovernanceNode.proposals:type_name -> vega.Proposal + 43, // 121: vega.snapshot.v1.GovernanceNode.proposal_data:type_name -> vega.snapshot.v1.ProposalData + 199, // 122: vega.snapshot.v1.StakingAccount.events:type_name -> vega.events.v1.StakeLinking + 49, // 123: vega.snapshot.v1.StakingAccounts.accounts:type_name -> vega.snapshot.v1.StakingAccount + 200, // 124: vega.snapshot.v1.StakingAccounts.pending_stake_total_supply:type_name -> vega.StakeTotalSupply + 201, // 125: vega.snapshot.v1.MatchingBook.buy:type_name -> vega.Order + 201, // 126: vega.snapshot.v1.MatchingBook.sell:type_name -> vega.Order + 202, // 127: vega.snapshot.v1.NetParams.params:type_name -> vega.NetworkParameter + 203, // 128: vega.snapshot.v1.PriceBound.trigger:type_name -> vega.PriceMonitoringTrigger + 57, // 129: vega.snapshot.v1.PriceRangeCache.bound:type_name -> vega.snapshot.v1.PriceBound + 56, // 130: vega.snapshot.v1.PriceRangeCache.range:type_name -> vega.snapshot.v1.PriceRange + 53, // 131: vega.snapshot.v1.PriceMonitor.fp_horizons:type_name -> vega.snapshot.v1.DecimalMap + 57, // 132: vega.snapshot.v1.PriceMonitor.bounds:type_name -> vega.snapshot.v1.PriceBound + 58, // 133: vega.snapshot.v1.PriceMonitor.price_range_cache:type_name -> vega.snapshot.v1.PriceRangeCache + 53, // 134: vega.snapshot.v1.PriceMonitor.ref_price_cache:type_name -> vega.snapshot.v1.DecimalMap + 59, // 135: vega.snapshot.v1.PriceMonitor.prices_now:type_name -> vega.snapshot.v1.CurrentPrice + 60, // 136: vega.snapshot.v1.PriceMonitor.prices_past:type_name -> vega.snapshot.v1.PastPrice + 204, // 137: vega.snapshot.v1.AuctionState.mode:type_name -> vega.Market.TradingMode + 204, // 138: vega.snapshot.v1.AuctionState.default_mode:type_name -> vega.Market.TradingMode + 205, // 139: vega.snapshot.v1.AuctionState.trigger:type_name -> vega.AuctionTrigger + 206, // 140: vega.snapshot.v1.AuctionState.end:type_name -> vega.AuctionDuration + 205, // 141: vega.snapshot.v1.AuctionState.extension:type_name -> vega.AuctionTrigger + 63, // 142: vega.snapshot.v1.EquityShare.lps:type_name -> vega.snapshot.v1.EquityShareLP + 207, // 143: vega.snapshot.v1.SpotMarket.market:type_name -> vega.Market + 61, // 144: vega.snapshot.v1.SpotMarket.price_monitor:type_name -> vega.snapshot.v1.PriceMonitor + 62, // 145: vega.snapshot.v1.SpotMarket.auction_state:type_name -> vega.snapshot.v1.AuctionState + 80, // 146: vega.snapshot.v1.SpotMarket.pegged_orders:type_name -> vega.snapshot.v1.PeggedOrders + 201, // 147: vega.snapshot.v1.SpotMarket.expiring_orders:type_name -> vega.Order + 64, // 148: vega.snapshot.v1.SpotMarket.equity_share:type_name -> vega.snapshot.v1.EquityShare + 65, // 149: vega.snapshot.v1.SpotMarket.fee_splitter:type_name -> vega.snapshot.v1.FeeSplitter + 79, // 150: vega.snapshot.v1.SpotMarket.stop_orders:type_name -> vega.snapshot.v1.StopOrders + 201, // 151: vega.snapshot.v1.SpotMarket.expiring_stop_orders:type_name -> vega.Order + 208, // 152: vega.snapshot.v1.SpotMarket.fees_stats:type_name -> vega.events.v1.FeesStats + 207, // 153: vega.snapshot.v1.Market.market:type_name -> vega.Market + 61, // 154: vega.snapshot.v1.Market.price_monitor:type_name -> vega.snapshot.v1.PriceMonitor + 62, // 155: vega.snapshot.v1.Market.auction_state:type_name -> vega.snapshot.v1.AuctionState + 80, // 156: vega.snapshot.v1.Market.pegged_orders:type_name -> vega.snapshot.v1.PeggedOrders + 201, // 157: vega.snapshot.v1.Market.expiring_orders:type_name -> vega.Order + 64, // 158: vega.snapshot.v1.Market.equity_share:type_name -> vega.snapshot.v1.EquityShare + 65, // 159: vega.snapshot.v1.Market.fee_splitter:type_name -> vega.snapshot.v1.FeeSplitter + 79, // 160: vega.snapshot.v1.Market.stop_orders:type_name -> vega.snapshot.v1.StopOrders + 201, // 161: vega.snapshot.v1.Market.expiring_stop_orders:type_name -> vega.Order + 69, // 162: vega.snapshot.v1.Market.product:type_name -> vega.snapshot.v1.Product + 208, // 163: vega.snapshot.v1.Market.fees_stats:type_name -> vega.events.v1.FeesStats + 68, // 164: vega.snapshot.v1.Market.party_margin_factor:type_name -> vega.snapshot.v1.PartyMarginFactor + 181, // 165: vega.snapshot.v1.Market.mark_price_calculator:type_name -> vega.snapshot.v1.CompositePriceCalculator + 181, // 166: vega.snapshot.v1.Market.internal_composite_price_calculator:type_name -> vega.snapshot.v1.CompositePriceCalculator + 73, // 167: vega.snapshot.v1.Product.perps:type_name -> vega.snapshot.v1.Perps + 70, // 168: vega.snapshot.v1.Perps.external_data_point:type_name -> vega.snapshot.v1.DataPoint + 70, // 169: vega.snapshot.v1.Perps.internal_data_point:type_name -> vega.snapshot.v1.DataPoint + 72, // 170: vega.snapshot.v1.Perps.external_twap_data:type_name -> vega.snapshot.v1.TWAPData + 72, // 171: vega.snapshot.v1.Perps.internal_twap_data:type_name -> vega.snapshot.v1.TWAPData + 71, // 172: vega.snapshot.v1.Perps.auction_intervals:type_name -> vega.snapshot.v1.AuctionIntervals + 74, // 173: vega.snapshot.v1.PricedStopOrders.falls_bellow:type_name -> vega.snapshot.v1.OrdersAtPrice + 74, // 174: vega.snapshot.v1.PricedStopOrders.rises_above:type_name -> vega.snapshot.v1.OrdersAtPrice + 78, // 175: vega.snapshot.v1.TrailingStopOrders.falls_bellow:type_name -> vega.snapshot.v1.OffsetsAtPrice + 78, // 176: vega.snapshot.v1.TrailingStopOrders.rises_above:type_name -> vega.snapshot.v1.OffsetsAtPrice + 77, // 177: vega.snapshot.v1.OffsetsAtPrice.offsets:type_name -> vega.snapshot.v1.OrdersAtOffset + 209, // 178: vega.snapshot.v1.StopOrders.stop_orders:type_name -> vega.events.v1.StopOrderEvent + 75, // 179: vega.snapshot.v1.StopOrders.priced_stop_orders:type_name -> vega.snapshot.v1.PricedStopOrders + 76, // 180: vega.snapshot.v1.StopOrders.trailing_stop_orders:type_name -> vega.snapshot.v1.TrailingStopOrders + 201, // 181: vega.snapshot.v1.PeggedOrders.parked_orders:type_name -> vega.Order + 67, // 182: vega.snapshot.v1.ExecutionMarkets.markets:type_name -> vega.snapshot.v1.Market + 66, // 183: vega.snapshot.v1.ExecutionMarkets.spot_markets:type_name -> vega.snapshot.v1.SpotMarket + 210, // 184: vega.snapshot.v1.ExecutionMarkets.settled_markets:type_name -> vega.checkpoint.v1.MarketState + 83, // 185: vega.snapshot.v1.ExecutionMarkets.successors:type_name -> vega.snapshot.v1.Successors + 81, // 186: vega.snapshot.v1.ExecutionMarkets.sla_network_params:type_name -> vega.snapshot.v1.SLANetworkParams + 84, // 187: vega.snapshot.v1.MarketPositions.positions:type_name -> vega.snapshot.v1.Position + 86, // 188: vega.snapshot.v1.MarketPositions.parties_records:type_name -> vega.snapshot.v1.PartyPositionStats + 88, // 189: vega.snapshot.v1.SettlementState.last_settled_positions:type_name -> vega.snapshot.v1.LastSettledPosition + 89, // 190: vega.snapshot.v1.SettlementState.trades:type_name -> vega.snapshot.v1.SettlementTrade + 93, // 191: vega.snapshot.v1.RewardsPendingPayouts.scheduled_rewards_payout:type_name -> vega.snapshot.v1.ScheduledRewardsPayout + 94, // 192: vega.snapshot.v1.ScheduledRewardsPayout.rewards_payout:type_name -> vega.snapshot.v1.RewardsPayout + 95, // 193: vega.snapshot.v1.RewardsPayout.reward_party_amount:type_name -> vega.snapshot.v1.RewardsPartyAmount + 98, // 194: vega.snapshot.v1.VoteSpamPolicy.party_to_vote:type_name -> vega.snapshot.v1.PartyProposalVoteCount + 148, // 195: vega.snapshot.v1.VoteSpamPolicy.banned_parties:type_name -> vega.snapshot.v1.BannedParty + 99, // 196: vega.snapshot.v1.VoteSpamPolicy.token_balance:type_name -> vega.snapshot.v1.PartyTokenBalance + 100, // 197: vega.snapshot.v1.VoteSpamPolicy.recent_blocks_reject_stats:type_name -> vega.snapshot.v1.BlockRejectStats + 101, // 198: vega.snapshot.v1.SimpleSpamPolicy.party_to_count:type_name -> vega.snapshot.v1.SpamPartyTransactionCount + 148, // 199: vega.snapshot.v1.SimpleSpamPolicy.banned_parties:type_name -> vega.snapshot.v1.BannedParty + 99, // 200: vega.snapshot.v1.SimpleSpamPolicy.token_balance:type_name -> vega.snapshot.v1.PartyTokenBalance + 103, // 201: vega.snapshot.v1.Notary.notary_sigs:type_name -> vega.snapshot.v1.NotarySigs + 107, // 202: vega.snapshot.v1.StakeVerifierDeposited.pending_deposited:type_name -> vega.snapshot.v1.StakeVerifierPending + 107, // 203: vega.snapshot.v1.StakeVerifierRemoved.pending_removed:type_name -> vega.snapshot.v1.StakeVerifierPending + 109, // 204: vega.snapshot.v1.L2EthOracles.chain_id_eth_oracles:type_name -> vega.snapshot.v1.ChainIdEthOracles + 110, // 205: vega.snapshot.v1.ChainIdEthOracles.last_block:type_name -> vega.snapshot.v1.EthOracleVerifierLastBlock + 111, // 206: vega.snapshot.v1.ChainIdEthOracles.call_results:type_name -> vega.snapshot.v1.EthContractCallResults + 112, // 207: vega.snapshot.v1.EthContractCallResults.pending_contract_call_result:type_name -> vega.snapshot.v1.EthContractCallResult + 119, // 208: vega.snapshot.v1.Topology.validator_data:type_name -> vega.snapshot.v1.ValidatorState + 113, // 209: vega.snapshot.v1.Topology.pending_pub_key_rotations:type_name -> vega.snapshot.v1.PendingKeyRotation + 122, // 210: vega.snapshot.v1.Topology.validator_performance:type_name -> vega.snapshot.v1.ValidatorPerformance + 114, // 211: vega.snapshot.v1.Topology.pending_ethereum_key_rotations:type_name -> vega.snapshot.v1.PendingEthereumKeyRotation + 116, // 212: vega.snapshot.v1.Topology.signatures:type_name -> vega.snapshot.v1.ToplogySignatures + 114, // 213: vega.snapshot.v1.Topology.unsolved_ethereum_key_rotations:type_name -> vega.snapshot.v1.PendingEthereumKeyRotation + 117, // 214: vega.snapshot.v1.ToplogySignatures.pending_signatures:type_name -> vega.snapshot.v1.PendingERC20MultisigControlSignature + 118, // 215: vega.snapshot.v1.ToplogySignatures.issued_signatures:type_name -> vega.snapshot.v1.IssuedERC20MultisigControlSignature + 211, // 216: vega.snapshot.v1.ValidatorState.validator_update:type_name -> vega.events.v1.ValidatorUpdate + 120, // 217: vega.snapshot.v1.ValidatorState.heartbeat_tracker:type_name -> vega.snapshot.v1.HeartbeatTracker + 212, // 218: vega.snapshot.v1.ValidatorState.ranking_score:type_name -> vega.RankingScore + 121, // 219: vega.snapshot.v1.ValidatorPerformance.validator_perf_stats:type_name -> vega.snapshot.v1.PerformanceStats + 126, // 220: vega.snapshot.v1.LiquidityPartiesLiquidityOrders.party_orders:type_name -> vega.snapshot.v1.PartyOrders + 201, // 221: vega.snapshot.v1.PartyOrders.orders:type_name -> vega.Order + 126, // 222: vega.snapshot.v1.LiquidityPartiesOrders.party_orders:type_name -> vega.snapshot.v1.PartyOrders + 213, // 223: vega.snapshot.v1.LiquidityProvisions.liquidity_provisions:type_name -> vega.LiquidityProvision + 130, // 224: vega.snapshot.v1.LiquidityScores.scores:type_name -> vega.snapshot.v1.LiquidityScore + 214, // 225: vega.snapshot.v1.LiquidityV2Parameters.market_sla_parameters:type_name -> vega.LiquiditySLAParameters + 215, // 226: vega.snapshot.v1.LiquidityV2PaidFeesStats.stats:type_name -> vega.events.v1.PaidLiquidityFeesStats + 213, // 227: vega.snapshot.v1.LiquidityV2Provisions.liquidity_provisions:type_name -> vega.LiquidityProvision + 213, // 228: vega.snapshot.v1.LiquidityV2PendingProvisions.pending_liquidity_provisions:type_name -> vega.LiquidityProvision + 136, // 229: vega.snapshot.v1.LiquidityV2Performances.performance_per_party:type_name -> vega.snapshot.v1.LiquidityV2PerformancePerParty + 130, // 230: vega.snapshot.v1.LiquidityV2Scores.scores:type_name -> vega.snapshot.v1.LiquidityScore + 12, // 231: vega.snapshot.v1.LiquidityV2Supplied.bid_cache:type_name -> vega.snapshot.v1.LiquidityOffsetProbabilityPair + 12, // 232: vega.snapshot.v1.LiquidityV2Supplied.ask_cache:type_name -> vega.snapshot.v1.LiquidityOffsetProbabilityPair + 142, // 233: vega.snapshot.v1.FloatingPointConsensus.next_time_trigger:type_name -> vega.snapshot.v1.NextTimeTrigger + 140, // 234: vega.snapshot.v1.FloatingPointConsensus.state_variables:type_name -> vega.snapshot.v1.StateVarInternalState + 141, // 235: vega.snapshot.v1.StateVarInternalState.validators_results:type_name -> vega.snapshot.v1.FloatingPointValidatorResult + 216, // 236: vega.snapshot.v1.FloatingPointValidatorResult.bundle:type_name -> vega.KeyValueBundle + 217, // 237: vega.snapshot.v1.MarketTracker.market_activity:type_name -> vega.checkpoint.v1.MarketActivityTracker + 218, // 238: vega.snapshot.v1.MarketTracker.taker_notional_volume:type_name -> vega.checkpoint.v1.TakerNotionalVolume + 219, // 239: vega.snapshot.v1.MarketTracker.market_to_party_taker_notional_volume:type_name -> vega.checkpoint.v1.MarketToPartyTakerNotionalVolume + 220, // 240: vega.snapshot.v1.SignerEventsPerAddress.events:type_name -> vega.events.v1.ERC20MultiSigSignerEvent + 144, // 241: vega.snapshot.v1.ERC20MultiSigTopologyVerified.events_per_address:type_name -> vega.snapshot.v1.SignerEventsPerAddress + 221, // 242: vega.snapshot.v1.ERC20MultiSigTopologyVerified.threshold:type_name -> vega.events.v1.ERC20MultiSigThresholdSetEvent + 220, // 243: vega.snapshot.v1.ERC20MultiSigTopologyPending.pending_signers:type_name -> vega.events.v1.ERC20MultiSigSignerEvent + 221, // 244: vega.snapshot.v1.ERC20MultiSigTopologyPending.pending_threshold_set:type_name -> vega.events.v1.ERC20MultiSigThresholdSetEvent + 153, // 245: vega.snapshot.v1.ProofOfWork.tx_at_height:type_name -> vega.snapshot.v1.TransactionsAtHeight + 153, // 246: vega.snapshot.v1.ProofOfWork.tid_at_height:type_name -> vega.snapshot.v1.TransactionsAtHeight + 148, // 247: vega.snapshot.v1.ProofOfWork.banned:type_name -> vega.snapshot.v1.BannedParty + 149, // 248: vega.snapshot.v1.ProofOfWork.pow_params:type_name -> vega.snapshot.v1.ProofOfWorkParams + 150, // 249: vega.snapshot.v1.ProofOfWork.pow_state:type_name -> vega.snapshot.v1.ProofOfWorkState + 155, // 250: vega.snapshot.v1.ProofOfWork.nonce_refs_at_height:type_name -> vega.snapshot.v1.NonceRefsAtHeight + 151, // 251: vega.snapshot.v1.ProofOfWorkState.pow_state:type_name -> vega.snapshot.v1.ProofOfWorkBlockState + 152, // 252: vega.snapshot.v1.ProofOfWorkBlockState.party_state:type_name -> vega.snapshot.v1.ProofOfWorkPartyStateForBlock + 154, // 253: vega.snapshot.v1.NonceRefsAtHeight.refs:type_name -> vega.snapshot.v1.NonceRef + 222, // 254: vega.snapshot.v1.ProtocolUpgradeProposals.active_proposals:type_name -> vega.events.v1.ProtocolUpgradeEvent + 157, // 255: vega.snapshot.v1.ProtocolUpgradeProposals.accepted_proposal:type_name -> vega.snapshot.v1.AcceptedProtocolUpgradeProposal + 159, // 256: vega.snapshot.v1.Teams.teams:type_name -> vega.snapshot.v1.Team + 160, // 257: vega.snapshot.v1.Team.referrer:type_name -> vega.snapshot.v1.Membership + 160, // 258: vega.snapshot.v1.Team.referees:type_name -> vega.snapshot.v1.Membership + 162, // 259: vega.snapshot.v1.TeamSwitches.team_switches:type_name -> vega.snapshot.v1.TeamSwitch + 164, // 260: vega.snapshot.v1.Vesting.parties_reward:type_name -> vega.snapshot.v1.PartyReward + 169, // 261: vega.snapshot.v1.PartyReward.asset_locked:type_name -> vega.snapshot.v1.AssetLocked + 171, // 262: vega.snapshot.v1.PartyReward.in_vesting:type_name -> vega.snapshot.v1.InVesting + 168, // 263: vega.snapshot.v1.ReferralProgramData.factor_by_referee:type_name -> vega.snapshot.v1.FactorByReferee + 223, // 264: vega.snapshot.v1.ReferralProgramData.current_program:type_name -> vega.ReferralProgram + 223, // 265: vega.snapshot.v1.ReferralProgramData.new_program:type_name -> vega.ReferralProgram + 166, // 266: vega.snapshot.v1.ReferralProgramData.sets:type_name -> vega.snapshot.v1.ReferralSet + 160, // 267: vega.snapshot.v1.ReferralSet.referrer:type_name -> vega.snapshot.v1.Membership + 160, // 268: vega.snapshot.v1.ReferralSet.referees:type_name -> vega.snapshot.v1.Membership + 167, // 269: vega.snapshot.v1.ReferralSet.running_volumes:type_name -> vega.snapshot.v1.RunningVolume + 170, // 270: vega.snapshot.v1.AssetLocked.epoch_balances:type_name -> vega.snapshot.v1.EpochBalance + 173, // 271: vega.snapshot.v1.ActivityStreak.parties_activity_streak:type_name -> vega.snapshot.v1.PartyActivityStreak + 176, // 272: vega.snapshot.v1.VolumeDiscountProgram.epoch_party_volumes:type_name -> vega.snapshot.v1.EpochPartyVolumes + 177, // 273: vega.snapshot.v1.VolumeDiscountProgram.average_party_volume:type_name -> vega.snapshot.v1.PartyVolume + 224, // 274: vega.snapshot.v1.VolumeDiscountProgram.current_program:type_name -> vega.VolumeDiscountProgram + 224, // 275: vega.snapshot.v1.VolumeDiscountProgram.new_program:type_name -> vega.VolumeDiscountProgram + 175, // 276: vega.snapshot.v1.VolumeDiscountProgram.factors_by_party:type_name -> vega.snapshot.v1.VolumeDiscountStats + 177, // 277: vega.snapshot.v1.EpochPartyVolumes.party_volume:type_name -> vega.snapshot.v1.PartyVolume + 225, // 278: vega.snapshot.v1.Liquidation.config:type_name -> vega.LiquidationStrategy + 179, // 279: vega.snapshot.v1.BankingTransferFeeDiscounts.party_asset_discount:type_name -> vega.snapshot.v1.PartyAssetAmount + 226, // 280: vega.snapshot.v1.CompositePriceCalculator.price_configuration:type_name -> vega.CompositePriceConfiguration + 227, // 281: vega.snapshot.v1.CompositePriceCalculator.trades:type_name -> vega.Trade + 54, // 282: vega.snapshot.v1.CompositePriceCalculator.book_price_at_time:type_name -> vega.snapshot.v1.TimePrice + 183, // 283: vega.snapshot.v1.Parties.profiles:type_name -> vega.snapshot.v1.PartyProfile + 228, // 284: vega.snapshot.v1.PartyProfile.metadata:type_name -> vega.Metadata + 285, // [285:285] is the sub-list for method output_type + 285, // [285:285] is the sub-list for method input_type + 285, // [285:285] is the sub-list for extension type_name + 285, // [285:285] is the sub-list for extension extendee + 0, // [0:285] is the sub-list for field type_name } func init() { file_vega_snapshot_v1_snapshot_proto_init() } @@ -15366,7 +16605,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventForwarder); i { + switch v := v.(*EventForwarderBucket); i { case 0: return &v.state case 1: @@ -15378,7 +16617,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CollateralAccounts); i { + switch v := v.(*EventForwarder); i { case 0: return &v.state case 1: @@ -15390,7 +16629,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CollateralAssets); i { + switch v := v.(*CollateralAccounts); i { case 0: return &v.state case 1: @@ -15402,7 +16641,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActiveAssets); i { + switch v := v.(*CollateralAssets); i { case 0: return &v.state case 1: @@ -15414,7 +16653,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PendingAssets); i { + switch v := v.(*ActiveAssets); i { case 0: return &v.state case 1: @@ -15426,7 +16665,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PendingAssetUpdates); i { + switch v := v.(*PendingAssets); i { case 0: return &v.state case 1: @@ -15438,7 +16677,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Withdrawal); i { + switch v := v.(*PendingAssetUpdates); i { case 0: return &v.state case 1: @@ -15450,7 +16689,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Deposit); i { + switch v := v.(*Withdrawal); i { case 0: return &v.state case 1: @@ -15462,7 +16701,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TxRef); i { + switch v := v.(*Deposit); i { case 0: return &v.state case 1: @@ -15474,7 +16713,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BankingWithdrawals); i { + switch v := v.(*TxRef); i { case 0: return &v.state case 1: @@ -15486,7 +16725,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BankingDeposits); i { + switch v := v.(*BankingWithdrawals); i { case 0: return &v.state case 1: @@ -15498,7 +16737,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BankingSeen); i { + switch v := v.(*BankingDeposits); i { case 0: return &v.state case 1: @@ -15510,7 +16749,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BankingAssetActions); i { + switch v := v.(*BankingSeen); i { case 0: return &v.state case 1: @@ -15522,7 +16761,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BankingRecurringTransfers); i { + switch v := v.(*BankingAssetActions); i { case 0: return &v.state case 1: @@ -15534,7 +16773,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BankingScheduledTransfers); i { + switch v := v.(*BankingRecurringTransfers); i { case 0: return &v.state case 1: @@ -15546,7 +16785,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BankingRecurringGovernanceTransfers); i { + switch v := v.(*BankingScheduledTransfers); i { case 0: return &v.state case 1: @@ -15558,7 +16797,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BankingScheduledGovernanceTransfers); i { + switch v := v.(*BankingRecurringGovernanceTransfers); i { case 0: return &v.state case 1: @@ -15570,7 +16809,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BankingBridgeState); i { + switch v := v.(*BankingScheduledGovernanceTransfers); i { case 0: return &v.state case 1: @@ -15582,7 +16821,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Checkpoint); i { + switch v := v.(*BankingBridgeState); i { case 0: return &v.state case 1: @@ -15594,7 +16833,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegationLastReconciliationTime); i { + switch v := v.(*Checkpoint); i { case 0: return &v.state case 1: @@ -15606,7 +16845,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegationActive); i { + switch v := v.(*DelegationLastReconciliationTime); i { case 0: return &v.state case 1: @@ -15618,7 +16857,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegationPending); i { + switch v := v.(*DelegationActive); i { case 0: return &v.state case 1: @@ -15630,7 +16869,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegationAuto); i { + switch v := v.(*DelegationPending); i { case 0: return &v.state case 1: @@ -15642,7 +16881,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProposalData); i { + switch v := v.(*DelegationAuto); i { case 0: return &v.state case 1: @@ -15654,7 +16893,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GovernanceEnacted); i { + switch v := v.(*ProposalData); i { case 0: return &v.state case 1: @@ -15666,7 +16905,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GovernanceActive); i { + switch v := v.(*GovernanceEnacted); i { case 0: return &v.state case 1: @@ -15678,7 +16917,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GovernanceNode); i { + switch v := v.(*GovernanceActive); i { case 0: return &v.state case 1: @@ -15690,7 +16929,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StakingAccount); i { + switch v := v.(*BatchProposalData); i { case 0: return &v.state case 1: @@ -15702,7 +16941,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StakingAccounts); i { + switch v := v.(*GovernanceBatchActive); i { case 0: return &v.state case 1: @@ -15714,7 +16953,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MatchingBook); i { + switch v := v.(*GovernanceNode); i { case 0: return &v.state case 1: @@ -15726,7 +16965,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NetParams); i { + switch v := v.(*StakingAccount); i { case 0: return &v.state case 1: @@ -15738,7 +16977,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DecimalMap); i { + switch v := v.(*StakingAccounts); i { case 0: return &v.state case 1: @@ -15750,7 +16989,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TimePrice); i { + switch v := v.(*MatchingBook); i { case 0: return &v.state case 1: @@ -15762,7 +17001,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PriceVolume); i { + switch v := v.(*NetParams); i { case 0: return &v.state case 1: @@ -15774,7 +17013,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PriceRange); i { + switch v := v.(*DecimalMap); i { case 0: return &v.state case 1: @@ -15786,7 +17025,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PriceBound); i { + switch v := v.(*TimePrice); i { case 0: return &v.state case 1: @@ -15798,7 +17037,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PriceRangeCache); i { + switch v := v.(*PriceVolume); i { case 0: return &v.state case 1: @@ -15810,7 +17049,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CurrentPrice); i { + switch v := v.(*PriceRange); i { case 0: return &v.state case 1: @@ -15822,7 +17061,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PastPrice); i { + switch v := v.(*PriceBound); i { case 0: return &v.state case 1: @@ -15834,7 +17073,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PriceMonitor); i { + switch v := v.(*PriceRangeCache); i { case 0: return &v.state case 1: @@ -15846,7 +17085,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuctionState); i { + switch v := v.(*CurrentPrice); i { case 0: return &v.state case 1: @@ -15858,7 +17097,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EquityShareLP); i { + switch v := v.(*PastPrice); i { case 0: return &v.state case 1: @@ -15870,7 +17109,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EquityShare); i { + switch v := v.(*PriceMonitor); i { case 0: return &v.state case 1: @@ -15882,7 +17121,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FeeSplitter); i { + switch v := v.(*AuctionState); i { case 0: return &v.state case 1: @@ -15894,7 +17133,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SpotMarket); i { + switch v := v.(*EquityShareLP); i { case 0: return &v.state case 1: @@ -15906,7 +17145,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Market); i { + switch v := v.(*EquityShare); i { case 0: return &v.state case 1: @@ -15918,7 +17157,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Product); i { + switch v := v.(*FeeSplitter); i { case 0: return &v.state case 1: @@ -15930,7 +17169,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataPoint); i { + switch v := v.(*SpotMarket); i { case 0: return &v.state case 1: @@ -15942,7 +17181,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Perps); i { + switch v := v.(*Market); i { case 0: return &v.state case 1: @@ -15954,7 +17193,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrdersAtPrice); i { + switch v := v.(*PartyMarginFactor); i { case 0: return &v.state case 1: @@ -15966,7 +17205,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PricedStopOrders); i { + switch v := v.(*Product); i { case 0: return &v.state case 1: @@ -15978,7 +17217,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TrailingStopOrders); i { + switch v := v.(*DataPoint); i { case 0: return &v.state case 1: @@ -15990,7 +17229,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrdersAtOffset); i { + switch v := v.(*AuctionIntervals); i { case 0: return &v.state case 1: @@ -16002,7 +17241,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OffsetsAtPrice); i { + switch v := v.(*TWAPData); i { case 0: return &v.state case 1: @@ -16014,7 +17253,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopOrders); i { + switch v := v.(*Perps); i { case 0: return &v.state case 1: @@ -16026,7 +17265,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeggedOrders); i { + switch v := v.(*OrdersAtPrice); i { case 0: return &v.state case 1: @@ -16038,7 +17277,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SLANetworkParams); i { + switch v := v.(*PricedStopOrders); i { case 0: return &v.state case 1: @@ -16050,7 +17289,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecutionMarkets); i { + switch v := v.(*TrailingStopOrders); i { case 0: return &v.state case 1: @@ -16062,7 +17301,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Successors); i { + switch v := v.(*OrdersAtOffset); i { case 0: return &v.state case 1: @@ -16074,7 +17313,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Position); i { + switch v := v.(*OffsetsAtPrice); i { case 0: return &v.state case 1: @@ -16086,6 +17325,78 @@ func file_vega_snapshot_v1_snapshot_proto_init() { } } file_vega_snapshot_v1_snapshot_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopOrders); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeggedOrders); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SLANetworkParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionMarkets); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Successors); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Position); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MarketPositions); i { case 0: return &v.state @@ -16097,7 +17408,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PartyPositionStats); i { case 0: return &v.state @@ -16109,7 +17420,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SettlementState); i { case 0: return &v.state @@ -16121,7 +17432,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LastSettledPosition); i { case 0: return &v.state @@ -16133,7 +17444,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SettlementTrade); i { case 0: return &v.state @@ -16145,7 +17456,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AppState); i { case 0: return &v.state @@ -16157,7 +17468,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EpochState); i { case 0: return &v.state @@ -16169,7 +17480,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RewardsPendingPayouts); i { case 0: return &v.state @@ -16181,7 +17492,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ScheduledRewardsPayout); i { case 0: return &v.state @@ -16193,7 +17504,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RewardsPayout); i { case 0: return &v.state @@ -16205,7 +17516,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RewardsPartyAmount); i { case 0: return &v.state @@ -16217,7 +17528,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LimitState); i { case 0: return &v.state @@ -16229,7 +17540,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VoteSpamPolicy); i { case 0: return &v.state @@ -16241,7 +17552,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PartyProposalVoteCount); i { case 0: return &v.state @@ -16253,7 +17564,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PartyTokenBalance); i { case 0: return &v.state @@ -16265,7 +17576,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlockRejectStats); i { case 0: return &v.state @@ -16277,7 +17588,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SpamPartyTransactionCount); i { case 0: return &v.state @@ -16289,7 +17600,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SimpleSpamPolicy); i { case 0: return &v.state @@ -16301,7 +17612,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NotarySigs); i { case 0: return &v.state @@ -16313,7 +17624,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Notary); i { case 0: return &v.state @@ -16325,7 +17636,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StakeVerifierDeposited); i { case 0: return &v.state @@ -16337,7 +17648,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StakeVerifierRemoved); i { case 0: return &v.state @@ -16349,7 +17660,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StakeVerifierPending); i { case 0: return &v.state @@ -16361,7 +17672,31 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*L2EthOracles); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChainIdEthOracles); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EthOracleVerifierLastBlock); i { case 0: return &v.state @@ -16373,7 +17708,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EthContractCallResults); i { case 0: return &v.state @@ -16385,7 +17720,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EthContractCallResult); i { case 0: return &v.state @@ -16397,7 +17732,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PendingKeyRotation); i { case 0: return &v.state @@ -16409,7 +17744,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PendingEthereumKeyRotation); i { case 0: return &v.state @@ -16421,7 +17756,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Topology); i { case 0: return &v.state @@ -16433,7 +17768,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ToplogySignatures); i { case 0: return &v.state @@ -16445,7 +17780,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PendingERC20MultisigControlSignature); i { case 0: return &v.state @@ -16457,7 +17792,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IssuedERC20MultisigControlSignature); i { case 0: return &v.state @@ -16469,7 +17804,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorState); i { case 0: return &v.state @@ -16481,7 +17816,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HeartbeatTracker); i { case 0: return &v.state @@ -16493,7 +17828,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PerformanceStats); i { case 0: return &v.state @@ -16505,7 +17840,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorPerformance); i { case 0: return &v.state @@ -16517,7 +17852,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityParameters); i { case 0: return &v.state @@ -16529,7 +17864,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityPendingProvisions); i { case 0: return &v.state @@ -16541,7 +17876,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityPartiesLiquidityOrders); i { case 0: return &v.state @@ -16553,7 +17888,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PartyOrders); i { case 0: return &v.state @@ -16565,7 +17900,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityPartiesOrders); i { case 0: return &v.state @@ -16577,7 +17912,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityProvisions); i { case 0: return &v.state @@ -16589,7 +17924,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityScores); i { case 0: return &v.state @@ -16601,7 +17936,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityScore); i { case 0: return &v.state @@ -16613,7 +17948,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityV2Parameters); i { case 0: return &v.state @@ -16625,7 +17960,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityV2PaidFeesStats); i { case 0: return &v.state @@ -16637,7 +17972,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityV2Provisions); i { case 0: return &v.state @@ -16649,7 +17984,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityV2PendingProvisions); i { case 0: return &v.state @@ -16661,7 +17996,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityV2Performances); i { case 0: return &v.state @@ -16673,7 +18008,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityV2PerformancePerParty); i { case 0: return &v.state @@ -16685,7 +18020,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityV2Scores); i { case 0: return &v.state @@ -16697,7 +18032,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LiquidityV2Supplied); i { case 0: return &v.state @@ -16709,7 +18044,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FloatingPointConsensus); i { case 0: return &v.state @@ -16721,7 +18056,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateVarInternalState); i { case 0: return &v.state @@ -16733,7 +18068,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FloatingPointValidatorResult); i { case 0: return &v.state @@ -16745,7 +18080,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NextTimeTrigger); i { case 0: return &v.state @@ -16757,7 +18092,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MarketTracker); i { case 0: return &v.state @@ -16769,7 +18104,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignerEventsPerAddress); i { case 0: return &v.state @@ -16781,7 +18116,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[144].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ERC20MultiSigTopologyVerified); i { case 0: return &v.state @@ -16793,7 +18128,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[145].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ERC20MultiSigTopologyPending); i { case 0: return &v.state @@ -16805,7 +18140,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[146].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProofOfWork); i { case 0: return &v.state @@ -16817,7 +18152,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BannedParty); i { case 0: return &v.state @@ -16829,7 +18164,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProofOfWorkParams); i { case 0: return &v.state @@ -16841,7 +18176,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProofOfWorkState); i { case 0: return &v.state @@ -16853,7 +18188,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[150].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProofOfWorkBlockState); i { case 0: return &v.state @@ -16865,7 +18200,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[151].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProofOfWorkPartyStateForBlock); i { case 0: return &v.state @@ -16877,7 +18212,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[144].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[152].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TransactionsAtHeight); i { case 0: return &v.state @@ -16889,7 +18224,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[145].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[153].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NonceRef); i { case 0: return &v.state @@ -16901,7 +18236,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[146].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[154].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NonceRefsAtHeight); i { case 0: return &v.state @@ -16913,7 +18248,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[155].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProtocolUpgradeProposals); i { case 0: return &v.state @@ -16925,7 +18260,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[156].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AcceptedProtocolUpgradeProposal); i { case 0: return &v.state @@ -16937,7 +18272,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[157].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Teams); i { case 0: return &v.state @@ -16949,7 +18284,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[150].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[158].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Team); i { case 0: return &v.state @@ -16961,7 +18296,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[151].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[159].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Membership); i { case 0: return &v.state @@ -16973,7 +18308,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[152].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[160].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TeamSwitches); i { case 0: return &v.state @@ -16985,7 +18320,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[153].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[161].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TeamSwitch); i { case 0: return &v.state @@ -16997,7 +18332,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[154].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[162].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Vesting); i { case 0: return &v.state @@ -17009,7 +18344,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[155].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[163].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PartyReward); i { case 0: return &v.state @@ -17021,7 +18356,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[156].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[164].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReferralProgramData); i { case 0: return &v.state @@ -17033,7 +18368,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[157].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[165].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReferralSet); i { case 0: return &v.state @@ -17045,7 +18380,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[158].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[166].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RunningVolume); i { case 0: return &v.state @@ -17057,7 +18392,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[159].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[167].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FactorByReferee); i { case 0: return &v.state @@ -17069,7 +18404,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[160].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[168].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AssetLocked); i { case 0: return &v.state @@ -17081,7 +18416,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[161].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[169].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EpochBalance); i { case 0: return &v.state @@ -17093,7 +18428,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[162].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[170].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InVesting); i { case 0: return &v.state @@ -17105,7 +18440,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[163].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[171].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActivityStreak); i { case 0: return &v.state @@ -17117,7 +18452,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[164].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[172].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PartyActivityStreak); i { case 0: return &v.state @@ -17129,7 +18464,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[165].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[173].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VolumeDiscountProgram); i { case 0: return &v.state @@ -17141,7 +18476,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[166].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[174].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VolumeDiscountStats); i { case 0: return &v.state @@ -17153,7 +18488,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[167].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[175].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EpochPartyVolumes); i { case 0: return &v.state @@ -17165,7 +18500,7 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } - file_vega_snapshot_v1_snapshot_proto_msgTypes[168].Exporter = func(v interface{}, i int) interface{} { + file_vega_snapshot_v1_snapshot_proto_msgTypes[176].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PartyVolume); i { case 0: return &v.state @@ -17177,6 +18512,78 @@ func file_vega_snapshot_v1_snapshot_proto_init() { return nil } } + file_vega_snapshot_v1_snapshot_proto_msgTypes[177].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Liquidation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[178].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartyAssetAmount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[179].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BankingTransferFeeDiscounts); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[180].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompositePriceCalculator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[181].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Parties); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[182].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartyProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_vega_snapshot_v1_snapshot_proto_msgTypes[4].OneofWrappers = []interface{}{ (*Payload_ActiveAssets)(nil), @@ -17251,19 +18658,25 @@ func file_vega_snapshot_v1_snapshot_proto_init() { (*Payload_VolumeDiscountProgram)(nil), (*Payload_LiquidityV2Parameters)(nil), (*Payload_LiquidityV2PaidFeesStats)(nil), - } - file_vega_snapshot_v1_snapshot_proto_msgTypes[64].OneofWrappers = []interface{}{ + (*Payload_Liquidation)(nil), + (*Payload_BankingTransferFeeDiscounts)(nil), + (*Payload_GovernanceBatchActive)(nil), + (*Payload_Parties)(nil), + (*Payload_L2EthOracles)(nil), + } + file_vega_snapshot_v1_snapshot_proto_msgTypes[66].OneofWrappers = []interface{}{} + file_vega_snapshot_v1_snapshot_proto_msgTypes[68].OneofWrappers = []interface{}{ (*Product_Perps)(nil), } - file_vega_snapshot_v1_snapshot_proto_msgTypes[79].OneofWrappers = []interface{}{} - file_vega_snapshot_v1_snapshot_proto_msgTypes[103].OneofWrappers = []interface{}{} + file_vega_snapshot_v1_snapshot_proto_msgTypes[85].OneofWrappers = []interface{}{} + file_vega_snapshot_v1_snapshot_proto_msgTypes[111].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vega_snapshot_v1_snapshot_proto_rawDesc, NumEnums: 1, - NumMessages: 169, + NumMessages: 183, NumExtensions: 0, NumServices: 0, }, diff --git a/protos/vega/vega.pb.go b/protos/vega/vega.pb.go index 7525807d24..5be121f508 100644 --- a/protos/vega/vega.pb.go +++ b/protos/vega/vega.pb.go @@ -87,25 +87,40 @@ const ( Interval_INTERVAL_I5M Interval = 300 // 15 minutes. Interval_INTERVAL_I15M Interval = 900 + // 30 minutes. + Interval_INTERVAL_I30M Interval = 1800 // 1 hour. Interval_INTERVAL_I1H Interval = 3600 + // 4 hours. + Interval_INTERVAL_I4H Interval = 14400 // 6 hours. Interval_INTERVAL_I6H Interval = 21600 + // 8 hours. + Interval_INTERVAL_I8H Interval = 28800 + // 12 hours. + Interval_INTERVAL_I12H Interval = 43200 // 1 day. Interval_INTERVAL_I1D Interval = 86400 + // 7 days. + Interval_INTERVAL_I7D Interval = 604800 ) // Enum value maps for Interval. var ( Interval_name = map[int32]string{ - 0: "INTERVAL_UNSPECIFIED", - -1: "INTERVAL_BLOCK", - 60: "INTERVAL_I1M", - 300: "INTERVAL_I5M", - 900: "INTERVAL_I15M", - 3600: "INTERVAL_I1H", - 21600: "INTERVAL_I6H", - 86400: "INTERVAL_I1D", + 0: "INTERVAL_UNSPECIFIED", + -1: "INTERVAL_BLOCK", + 60: "INTERVAL_I1M", + 300: "INTERVAL_I5M", + 900: "INTERVAL_I15M", + 1800: "INTERVAL_I30M", + 3600: "INTERVAL_I1H", + 14400: "INTERVAL_I4H", + 21600: "INTERVAL_I6H", + 28800: "INTERVAL_I8H", + 43200: "INTERVAL_I12H", + 86400: "INTERVAL_I1D", + 604800: "INTERVAL_I7D", } Interval_value = map[string]int32{ "INTERVAL_UNSPECIFIED": 0, @@ -113,9 +128,14 @@ var ( "INTERVAL_I1M": 60, "INTERVAL_I5M": 300, "INTERVAL_I15M": 900, + "INTERVAL_I30M": 1800, "INTERVAL_I1H": 3600, + "INTERVAL_I4H": 14400, "INTERVAL_I6H": 21600, + "INTERVAL_I8H": 28800, + "INTERVAL_I12H": 43200, "INTERVAL_I1D": 86400, + "INTERVAL_I7D": 604800, } ) @@ -438,6 +458,10 @@ const ( OrderError_ORDER_ERROR_POST_ONLY_ORDER_WOULD_TRADE OrderError = 49 // Post order would trade OrderError_ORDER_ERROR_REDUCE_ONLY_ORDER_WOULD_NOT_REDUCE_POSITION OrderError = 50 + // Isolated margin check failed + OrderError_ORDER_ERROR_ISOLATED_MARGIN_CHECK_FAILED OrderError = 51 + // In isolated margin pegged orders are rejected + OrderError_ORDER_ERROR_PEGGED_ORDERS_NOT_ALLOWED_IN_ISOLATED_MARGIN_MODE OrderError = 52 ) // Enum value maps for OrderError. @@ -492,6 +516,8 @@ var ( 48: "ORDER_ERROR_TOO_MANY_PEGGED_ORDERS", 49: "ORDER_ERROR_POST_ONLY_ORDER_WOULD_TRADE", 50: "ORDER_ERROR_REDUCE_ONLY_ORDER_WOULD_NOT_REDUCE_POSITION", + 51: "ORDER_ERROR_ISOLATED_MARGIN_CHECK_FAILED", + 52: "ORDER_ERROR_PEGGED_ORDERS_NOT_ALLOWED_IN_ISOLATED_MARGIN_MODE", } OrderError_value = map[string]int32{ "ORDER_ERROR_UNSPECIFIED": 0, @@ -543,6 +569,8 @@ var ( "ORDER_ERROR_TOO_MANY_PEGGED_ORDERS": 48, "ORDER_ERROR_POST_ONLY_ORDER_WOULD_TRADE": 49, "ORDER_ERROR_REDUCE_ONLY_ORDER_WOULD_NOT_REDUCE_POSITION": 50, + "ORDER_ERROR_ISOLATED_MARGIN_CHECK_FAILED": 51, + "ORDER_ERROR_PEGGED_ORDERS_NOT_ALLOWED_IN_ISOLATED_MARGIN_MODE": 52, } ) @@ -705,6 +733,8 @@ const ( AccountType_ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING AccountType = 27 // Per asset account for pending fee referral reward payouts AccountType_ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD AccountType = 28 + // Per asset market account for party in isolated margin mode + AccountType_ACCOUNT_TYPE_ORDER_MARGIN AccountType = 29 ) // Enum value maps for AccountType. @@ -738,6 +768,7 @@ var ( 26: "ACCOUNT_TYPE_REWARD_RETURN_VOLATILITY", 27: "ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING", 28: "ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD", + 29: "ACCOUNT_TYPE_ORDER_MARGIN", } AccountType_value = map[string]int32{ "ACCOUNT_TYPE_UNSPECIFIED": 0, @@ -768,6 +799,7 @@ var ( "ACCOUNT_TYPE_REWARD_RETURN_VOLATILITY": 26, "ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING": 27, "ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD": 28, + "ACCOUNT_TYPE_ORDER_MARGIN": 29, } ) @@ -880,6 +912,14 @@ const ( TransferType_TRANSFER_TYPE_FEE_REFERRER_REWARD_PAY TransferType = 39 // Fee referrer reward received into general account of the referrer. TransferType_TRANSFER_TYPE_FEE_REFERRER_REWARD_DISTRIBUTE TransferType = 44 + // Funds transferred from general account to meet order margin requirement in isolated margin mode. + TransferType_TRANSFER_TYPE_ORDER_MARGIN_LOW TransferType = 45 + // Excess order margin amount returned to general account. + TransferType_TRANSFER_TYPE_ORDER_MARGIN_HIGH TransferType = 46 + // Transfer from order margin account to margin account due to increase of position. + TransferType_TRANSFER_TYPE_ISOLATED_MARGIN_LOW TransferType = 47 + // Transfer from excess order margin account to general account. + TransferType_TRANSFER_TYPE_ISOLATED_MARGIN_HIGH TransferType = 48 ) // Enum value maps for TransferType. @@ -924,6 +964,10 @@ var ( 38: "TRANSFER_TYPE_REWARDS_VESTED", 39: "TRANSFER_TYPE_FEE_REFERRER_REWARD_PAY", 44: "TRANSFER_TYPE_FEE_REFERRER_REWARD_DISTRIBUTE", + 45: "TRANSFER_TYPE_ORDER_MARGIN_LOW", + 46: "TRANSFER_TYPE_ORDER_MARGIN_HIGH", + 47: "TRANSFER_TYPE_ISOLATED_MARGIN_LOW", + 48: "TRANSFER_TYPE_ISOLATED_MARGIN_HIGH", } TransferType_value = map[string]int32{ "TRANSFER_TYPE_UNSPECIFIED": 0, @@ -965,6 +1009,10 @@ var ( "TRANSFER_TYPE_REWARDS_VESTED": 38, "TRANSFER_TYPE_FEE_REFERRER_REWARD_PAY": 39, "TRANSFER_TYPE_FEE_REFERRER_REWARD_DISTRIBUTE": 44, + "TRANSFER_TYPE_ORDER_MARGIN_LOW": 45, + "TRANSFER_TYPE_ORDER_MARGIN_HIGH": 46, + "TRANSFER_TYPE_ISOLATED_MARGIN_LOW": 47, + "TRANSFER_TYPE_ISOLATED_MARGIN_HIGH": 48, } ) @@ -1387,6 +1435,110 @@ func (ValidatorNodeStatus) EnumDescriptor() ([]byte, []int) { return file_vega_vega_proto_rawDescGZIP(), []int{15} } +type MarginMode int32 + +const ( + // Never valid. + MarginMode_MARGIN_MODE_UNSPECIFIED MarginMode = 0 + // Cross margin mode - margin is dynamically acquired and released as a position is marked to market + MarginMode_MARGIN_MODE_CROSS_MARGIN MarginMode = 1 + // Isolated margin mode - margin for any newly opened position volume is transferred to the margin account when the trade is executed + MarginMode_MARGIN_MODE_ISOLATED_MARGIN MarginMode = 2 +) + +// Enum value maps for MarginMode. +var ( + MarginMode_name = map[int32]string{ + 0: "MARGIN_MODE_UNSPECIFIED", + 1: "MARGIN_MODE_CROSS_MARGIN", + 2: "MARGIN_MODE_ISOLATED_MARGIN", + } + MarginMode_value = map[string]int32{ + "MARGIN_MODE_UNSPECIFIED": 0, + "MARGIN_MODE_CROSS_MARGIN": 1, + "MARGIN_MODE_ISOLATED_MARGIN": 2, + } +) + +func (x MarginMode) Enum() *MarginMode { + p := new(MarginMode) + *p = x + return p +} + +func (x MarginMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MarginMode) Descriptor() protoreflect.EnumDescriptor { + return file_vega_vega_proto_enumTypes[16].Descriptor() +} + +func (MarginMode) Type() protoreflect.EnumType { + return &file_vega_vega_proto_enumTypes[16] +} + +func (x MarginMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MarginMode.Descriptor instead. +func (MarginMode) EnumDescriptor() ([]byte, []int) { + return file_vega_vega_proto_rawDescGZIP(), []int{16} +} + +type StopOrder_SizeOverrideSetting int32 + +const ( + // Never valid + StopOrder_SIZE_OVERRIDE_SETTING_UNSPECIFIED StopOrder_SizeOverrideSetting = 0 + // No override, the size within the contained normal order submission will be used + StopOrder_SIZE_OVERRIDE_SETTING_NONE StopOrder_SizeOverrideSetting = 1 + // Use the total position of the trader + StopOrder_SIZE_OVERRIDE_SETTING_POSITION StopOrder_SizeOverrideSetting = 2 +) + +// Enum value maps for StopOrder_SizeOverrideSetting. +var ( + StopOrder_SizeOverrideSetting_name = map[int32]string{ + 0: "SIZE_OVERRIDE_SETTING_UNSPECIFIED", + 1: "SIZE_OVERRIDE_SETTING_NONE", + 2: "SIZE_OVERRIDE_SETTING_POSITION", + } + StopOrder_SizeOverrideSetting_value = map[string]int32{ + "SIZE_OVERRIDE_SETTING_UNSPECIFIED": 0, + "SIZE_OVERRIDE_SETTING_NONE": 1, + "SIZE_OVERRIDE_SETTING_POSITION": 2, + } +) + +func (x StopOrder_SizeOverrideSetting) Enum() *StopOrder_SizeOverrideSetting { + p := new(StopOrder_SizeOverrideSetting) + *p = x + return p +} + +func (x StopOrder_SizeOverrideSetting) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StopOrder_SizeOverrideSetting) Descriptor() protoreflect.EnumDescriptor { + return file_vega_vega_proto_enumTypes[17].Descriptor() +} + +func (StopOrder_SizeOverrideSetting) Type() protoreflect.EnumType { + return &file_vega_vega_proto_enumTypes[17] +} + +func (x StopOrder_SizeOverrideSetting) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StopOrder_SizeOverrideSetting.Descriptor instead. +func (StopOrder_SizeOverrideSetting) EnumDescriptor() ([]byte, []int) { + return file_vega_vega_proto_rawDescGZIP(), []int{2, 0} +} + type StopOrder_ExpiryStrategy int32 const ( @@ -1423,11 +1575,11 @@ func (x StopOrder_ExpiryStrategy) String() string { } func (StopOrder_ExpiryStrategy) Descriptor() protoreflect.EnumDescriptor { - return file_vega_vega_proto_enumTypes[16].Descriptor() + return file_vega_vega_proto_enumTypes[18].Descriptor() } func (StopOrder_ExpiryStrategy) Type() protoreflect.EnumType { - return &file_vega_vega_proto_enumTypes[16] + return &file_vega_vega_proto_enumTypes[18] } func (x StopOrder_ExpiryStrategy) Number() protoreflect.EnumNumber { @@ -1436,7 +1588,7 @@ func (x StopOrder_ExpiryStrategy) Number() protoreflect.EnumNumber { // Deprecated: Use StopOrder_ExpiryStrategy.Descriptor instead. func (StopOrder_ExpiryStrategy) EnumDescriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{0, 0} + return file_vega_vega_proto_rawDescGZIP(), []int{2, 1} } type StopOrder_TriggerDirection int32 @@ -1475,11 +1627,11 @@ func (x StopOrder_TriggerDirection) String() string { } func (StopOrder_TriggerDirection) Descriptor() protoreflect.EnumDescriptor { - return file_vega_vega_proto_enumTypes[17].Descriptor() + return file_vega_vega_proto_enumTypes[19].Descriptor() } func (StopOrder_TriggerDirection) Type() protoreflect.EnumType { - return &file_vega_vega_proto_enumTypes[17] + return &file_vega_vega_proto_enumTypes[19] } func (x StopOrder_TriggerDirection) Number() protoreflect.EnumNumber { @@ -1488,7 +1640,7 @@ func (x StopOrder_TriggerDirection) Number() protoreflect.EnumNumber { // Deprecated: Use StopOrder_TriggerDirection.Descriptor instead. func (StopOrder_TriggerDirection) EnumDescriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{0, 1} + return file_vega_vega_proto_rawDescGZIP(), []int{2, 2} } type StopOrder_Status int32 @@ -1543,11 +1695,11 @@ func (x StopOrder_Status) String() string { } func (StopOrder_Status) Descriptor() protoreflect.EnumDescriptor { - return file_vega_vega_proto_enumTypes[18].Descriptor() + return file_vega_vega_proto_enumTypes[20].Descriptor() } func (StopOrder_Status) Type() protoreflect.EnumType { - return &file_vega_vega_proto_enumTypes[18] + return &file_vega_vega_proto_enumTypes[20] } func (x StopOrder_Status) Number() protoreflect.EnumNumber { @@ -1556,7 +1708,7 @@ func (x StopOrder_Status) Number() protoreflect.EnumNumber { // Deprecated: Use StopOrder_Status.Descriptor instead. func (StopOrder_Status) EnumDescriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{0, 2} + return file_vega_vega_proto_rawDescGZIP(), []int{2, 3} } type StopOrder_RejectionReason int32 @@ -1576,6 +1728,12 @@ const ( StopOrder_REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_WITHOUT_A_POSITION StopOrder_RejectionReason = 5 // This stop order does not close the position StopOrder_REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION StopOrder_RejectionReason = 6 + // The percentage value for the linked stop order is invalid + StopOrder_REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID StopOrder_RejectionReason = 7 + // Stop orders are not allowed during the opening auction + StopOrder_REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION StopOrder_RejectionReason = 8 + // Stop OCO orders cannot have the same expiry timestamp + StopOrder_REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES StopOrder_RejectionReason = 9 ) // Enum value maps for StopOrder_RejectionReason. @@ -1588,15 +1746,21 @@ var ( 4: "REJECTION_REASON_MAX_STOP_ORDERS_PER_PARTY_REACHED", 5: "REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_WITHOUT_A_POSITION", 6: "REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION", + 7: "REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID", + 8: "REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION", + 9: "REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES", } StopOrder_RejectionReason_value = map[string]int32{ - "REJECTION_REASON_UNSPECIFIED": 0, - "REJECTION_REASON_TRADING_NOT_ALLOWED": 1, - "REJECTION_REASON_EXPIRY_IN_THE_PAST": 2, - "REJECTION_REASON_MUST_BE_REDUCE_ONLY": 3, - "REJECTION_REASON_MAX_STOP_ORDERS_PER_PARTY_REACHED": 4, - "REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_WITHOUT_A_POSITION": 5, - "REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION": 6, + "REJECTION_REASON_UNSPECIFIED": 0, + "REJECTION_REASON_TRADING_NOT_ALLOWED": 1, + "REJECTION_REASON_EXPIRY_IN_THE_PAST": 2, + "REJECTION_REASON_MUST_BE_REDUCE_ONLY": 3, + "REJECTION_REASON_MAX_STOP_ORDERS_PER_PARTY_REACHED": 4, + "REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_WITHOUT_A_POSITION": 5, + "REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION": 6, + "REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID": 7, + "REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION": 8, + "REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES": 9, } ) @@ -1611,11 +1775,11 @@ func (x StopOrder_RejectionReason) String() string { } func (StopOrder_RejectionReason) Descriptor() protoreflect.EnumDescriptor { - return file_vega_vega_proto_enumTypes[19].Descriptor() + return file_vega_vega_proto_enumTypes[21].Descriptor() } func (StopOrder_RejectionReason) Type() protoreflect.EnumType { - return &file_vega_vega_proto_enumTypes[19] + return &file_vega_vega_proto_enumTypes[21] } func (x StopOrder_RejectionReason) Number() protoreflect.EnumNumber { @@ -1624,7 +1788,7 @@ func (x StopOrder_RejectionReason) Number() protoreflect.EnumNumber { // Deprecated: Use StopOrder_RejectionReason.Descriptor instead. func (StopOrder_RejectionReason) EnumDescriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{0, 3} + return file_vega_vega_proto_rawDescGZIP(), []int{2, 4} } // Time In Force for an order @@ -1685,11 +1849,11 @@ func (x Order_TimeInForce) String() string { } func (Order_TimeInForce) Descriptor() protoreflect.EnumDescriptor { - return file_vega_vega_proto_enumTypes[20].Descriptor() + return file_vega_vega_proto_enumTypes[22].Descriptor() } func (Order_TimeInForce) Type() protoreflect.EnumType { - return &file_vega_vega_proto_enumTypes[20] + return &file_vega_vega_proto_enumTypes[22] } func (x Order_TimeInForce) Number() protoreflect.EnumNumber { @@ -1698,7 +1862,7 @@ func (x Order_TimeInForce) Number() protoreflect.EnumNumber { // Deprecated: Use Order_TimeInForce.Descriptor instead. func (Order_TimeInForce) EnumDescriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{5, 0} + return file_vega_vega_proto_rawDescGZIP(), []int{7, 0} } // Type values for an order @@ -1742,11 +1906,11 @@ func (x Order_Type) String() string { } func (Order_Type) Descriptor() protoreflect.EnumDescriptor { - return file_vega_vega_proto_enumTypes[21].Descriptor() + return file_vega_vega_proto_enumTypes[23].Descriptor() } func (Order_Type) Type() protoreflect.EnumType { - return &file_vega_vega_proto_enumTypes[21] + return &file_vega_vega_proto_enumTypes[23] } func (x Order_Type) Number() protoreflect.EnumNumber { @@ -1755,7 +1919,7 @@ func (x Order_Type) Number() protoreflect.EnumNumber { // Deprecated: Use Order_Type.Descriptor instead. func (Order_Type) EnumDescriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{5, 1} + return file_vega_vega_proto_rawDescGZIP(), []int{7, 1} } // Status values for an order @@ -1820,11 +1984,11 @@ func (x Order_Status) String() string { } func (Order_Status) Descriptor() protoreflect.EnumDescriptor { - return file_vega_vega_proto_enumTypes[22].Descriptor() + return file_vega_vega_proto_enumTypes[24].Descriptor() } func (Order_Status) Type() protoreflect.EnumType { - return &file_vega_vega_proto_enumTypes[22] + return &file_vega_vega_proto_enumTypes[24] } func (x Order_Status) Number() protoreflect.EnumNumber { @@ -1833,7 +1997,7 @@ func (x Order_Status) Number() protoreflect.EnumNumber { // Deprecated: Use Order_Status.Descriptor instead. func (Order_Status) EnumDescriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{5, 2} + return file_vega_vega_proto_rawDescGZIP(), []int{7, 2} } // Type values for a trade @@ -1879,11 +2043,11 @@ func (x Trade_Type) String() string { } func (Trade_Type) Descriptor() protoreflect.EnumDescriptor { - return file_vega_vega_proto_enumTypes[23].Descriptor() + return file_vega_vega_proto_enumTypes[25].Descriptor() } func (Trade_Type) Type() protoreflect.EnumType { - return &file_vega_vega_proto_enumTypes[23] + return &file_vega_vega_proto_enumTypes[25] } func (x Trade_Type) Number() protoreflect.EnumNumber { @@ -1892,7 +2056,7 @@ func (x Trade_Type) Number() protoreflect.EnumNumber { // Deprecated: Use Trade_Type.Descriptor instead. func (Trade_Type) EnumDescriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{9, 0} + return file_vega_vega_proto_rawDescGZIP(), []int{11, 0} } // Status of the deposit @@ -1936,11 +2100,11 @@ func (x Deposit_Status) String() string { } func (Deposit_Status) Descriptor() protoreflect.EnumDescriptor { - return file_vega_vega_proto_enumTypes[24].Descriptor() + return file_vega_vega_proto_enumTypes[26].Descriptor() } func (Deposit_Status) Type() protoreflect.EnumType { - return &file_vega_vega_proto_enumTypes[24] + return &file_vega_vega_proto_enumTypes[26] } func (x Deposit_Status) Number() protoreflect.EnumNumber { @@ -1949,7 +2113,7 @@ func (x Deposit_Status) Number() protoreflect.EnumNumber { // Deprecated: Use Deposit_Status.Descriptor instead. func (Deposit_Status) EnumDescriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{18, 0} + return file_vega_vega_proto_rawDescGZIP(), []int{20, 0} } // Status of the withdrawal @@ -1994,11 +2158,11 @@ func (x Withdrawal_Status) String() string { } func (Withdrawal_Status) Descriptor() protoreflect.EnumDescriptor { - return file_vega_vega_proto_enumTypes[25].Descriptor() + return file_vega_vega_proto_enumTypes[27].Descriptor() } func (Withdrawal_Status) Type() protoreflect.EnumType { - return &file_vega_vega_proto_enumTypes[25] + return &file_vega_vega_proto_enumTypes[27] } func (x Withdrawal_Status) Number() protoreflect.EnumNumber { @@ -2007,7 +2171,7 @@ func (x Withdrawal_Status) Number() protoreflect.EnumNumber { // Deprecated: Use Withdrawal_Status.Descriptor instead. func (Withdrawal_Status) EnumDescriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{19, 0} + return file_vega_vega_proto_rawDescGZIP(), []int{21, 0} } // Status of a liquidity provision. @@ -2065,11 +2229,11 @@ func (x LiquidityProvision_Status) String() string { } func (LiquidityProvision_Status) Descriptor() protoreflect.EnumDescriptor { - return file_vega_vega_proto_enumTypes[26].Descriptor() + return file_vega_vega_proto_enumTypes[28].Descriptor() } func (LiquidityProvision_Status) Type() protoreflect.EnumType { - return &file_vega_vega_proto_enumTypes[26] + return &file_vega_vega_proto_enumTypes[28] } func (x LiquidityProvision_Status) Number() protoreflect.EnumNumber { @@ -2078,7 +2242,133 @@ func (x LiquidityProvision_Status) Number() protoreflect.EnumNumber { // Deprecated: Use LiquidityProvision_Status.Descriptor instead. func (LiquidityProvision_Status) EnumDescriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{44, 0} + return file_vega_vega_proto_rawDescGZIP(), []int{48, 0} +} + +// Holds metadata associated to a party. +type PartyProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Party ID associated to the profile. + PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"` + // Alias given to the party. + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` + // Metadata to associate to a party, in a key/value format where the key + // describes the type of metadata in the value field. + Metadata []*Metadata `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *PartyProfile) Reset() { + *x = PartyProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_vega_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PartyProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PartyProfile) ProtoMessage() {} + +func (x *PartyProfile) ProtoReflect() protoreflect.Message { + mi := &file_vega_vega_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 PartyProfile.ProtoReflect.Descriptor instead. +func (*PartyProfile) Descriptor() ([]byte, []int) { + return file_vega_vega_proto_rawDescGZIP(), []int{0} +} + +func (x *PartyProfile) GetPartyId() string { + if x != nil { + return x.PartyId + } + return "" +} + +func (x *PartyProfile) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +func (x *PartyProfile) GetMetadata() []*Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Generic structure holding a key/value pair. +type Metadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Key of the metadata. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // Value of the metadata. + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Metadata) Reset() { + *x = Metadata{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_vega_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Metadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metadata) ProtoMessage() {} + +func (x *Metadata) ProtoReflect() protoreflect.Message { + mi := &file_vega_vega_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 Metadata.ProtoReflect.Descriptor instead. +func (*Metadata) Descriptor() ([]byte, []int) { + return file_vega_vega_proto_rawDescGZIP(), []int{1} +} + +func (x *Metadata) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *Metadata) GetValue() string { + if x != nil { + return x.Value + } + return "" } type StopOrder struct { @@ -2111,6 +2401,10 @@ type StopOrder struct { MarketId string `protobuf:"bytes,11,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // An optional reason for why a stop order was rejected RejectionReason *StopOrder_RejectionReason `protobuf:"varint,12,opt,name=rejection_reason,json=rejectionReason,proto3,enum=vega.StopOrder_RejectionReason,oneof" json:"rejection_reason,omitempty"` + // Size override setting + SizeOverrideSetting StopOrder_SizeOverrideSetting `protobuf:"varint,13,opt,name=size_override_setting,json=sizeOverrideSetting,proto3,enum=vega.StopOrder_SizeOverrideSetting" json:"size_override_setting,omitempty"` + // Size override value + SizeOverrideValue *StopOrder_SizeOverrideValue `protobuf:"bytes,14,opt,name=size_override_value,json=sizeOverrideValue,proto3,oneof" json:"size_override_value,omitempty"` // Trigger that will need to be breached for the order // to be submitted to the book. // @@ -2124,7 +2418,7 @@ type StopOrder struct { func (x *StopOrder) Reset() { *x = StopOrder{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[0] + mi := &file_vega_vega_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2137,7 +2431,7 @@ func (x *StopOrder) String() string { func (*StopOrder) ProtoMessage() {} func (x *StopOrder) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[0] + mi := &file_vega_vega_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2150,7 +2444,7 @@ func (x *StopOrder) ProtoReflect() protoreflect.Message { // Deprecated: Use StopOrder.ProtoReflect.Descriptor instead. func (*StopOrder) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{0} + return file_vega_vega_proto_rawDescGZIP(), []int{2} } func (x *StopOrder) GetId() string { @@ -2237,6 +2531,20 @@ func (x *StopOrder) GetRejectionReason() StopOrder_RejectionReason { return StopOrder_REJECTION_REASON_UNSPECIFIED } +func (x *StopOrder) GetSizeOverrideSetting() StopOrder_SizeOverrideSetting { + if x != nil { + return x.SizeOverrideSetting + } + return StopOrder_SIZE_OVERRIDE_SETTING_UNSPECIFIED +} + +func (x *StopOrder) GetSizeOverrideValue() *StopOrder_SizeOverrideValue { + if x != nil { + return x.SizeOverrideValue + } + return nil +} + func (m *StopOrder) GetTrigger() isStopOrder_Trigger { if m != nil { return m.Trigger @@ -2285,12 +2593,17 @@ type Party struct { // Unique ID for the party, typically represented by a public key. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Alias given to the party. + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` + // Metadata to associate to a party, in a key/value format where the key + // describes the type of metadata in the value field. + Metadata []*Metadata `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty"` } func (x *Party) Reset() { *x = Party{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[1] + mi := &file_vega_vega_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2303,7 +2616,7 @@ func (x *Party) String() string { func (*Party) ProtoMessage() {} func (x *Party) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[1] + mi := &file_vega_vega_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2316,7 +2629,7 @@ func (x *Party) ProtoReflect() protoreflect.Message { // Deprecated: Use Party.ProtoReflect.Descriptor instead. func (*Party) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{1} + return file_vega_vega_proto_rawDescGZIP(), []int{3} } func (x *Party) GetId() string { @@ -2326,6 +2639,20 @@ func (x *Party) GetId() string { return "" } +func (x *Party) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +func (x *Party) GetMetadata() []*Metadata { + if x != nil { + return x.Metadata + } + return nil +} + // Risk factors are used to calculate the current risk associated with orders trading on a given market type RiskFactor struct { state protoimpl.MessageState @@ -2343,7 +2670,7 @@ type RiskFactor struct { func (x *RiskFactor) Reset() { *x = RiskFactor{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[2] + mi := &file_vega_vega_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2356,7 +2683,7 @@ func (x *RiskFactor) String() string { func (*RiskFactor) ProtoMessage() {} func (x *RiskFactor) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[2] + mi := &file_vega_vega_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2369,7 +2696,7 @@ func (x *RiskFactor) ProtoReflect() protoreflect.Message { // Deprecated: Use RiskFactor.ProtoReflect.Descriptor instead. func (*RiskFactor) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{2} + return file_vega_vega_proto_rawDescGZIP(), []int{4} } func (x *RiskFactor) GetMarket() string { @@ -2409,7 +2736,7 @@ type PeggedOrder struct { func (x *PeggedOrder) Reset() { *x = PeggedOrder{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[3] + mi := &file_vega_vega_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2422,7 +2749,7 @@ func (x *PeggedOrder) String() string { func (*PeggedOrder) ProtoMessage() {} func (x *PeggedOrder) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[3] + mi := &file_vega_vega_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2435,7 +2762,7 @@ func (x *PeggedOrder) ProtoReflect() protoreflect.Message { // Deprecated: Use PeggedOrder.ProtoReflect.Descriptor instead. func (*PeggedOrder) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{3} + return file_vega_vega_proto_rawDescGZIP(), []int{5} } func (x *PeggedOrder) GetReference() PeggedReference { @@ -2469,7 +2796,7 @@ type IcebergOrder struct { func (x *IcebergOrder) Reset() { *x = IcebergOrder{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[4] + mi := &file_vega_vega_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2482,7 +2809,7 @@ func (x *IcebergOrder) String() string { func (*IcebergOrder) ProtoMessage() {} func (x *IcebergOrder) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[4] + mi := &file_vega_vega_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2495,7 +2822,7 @@ func (x *IcebergOrder) ProtoReflect() protoreflect.Message { // Deprecated: Use IcebergOrder.ProtoReflect.Descriptor instead. func (*IcebergOrder) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{4} + return file_vega_vega_proto_rawDescGZIP(), []int{6} } func (x *IcebergOrder) GetPeakSize() uint64 { @@ -2578,7 +2905,7 @@ type Order struct { func (x *Order) Reset() { *x = Order{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[5] + mi := &file_vega_vega_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2591,7 +2918,7 @@ func (x *Order) String() string { func (*Order) ProtoMessage() {} func (x *Order) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[5] + mi := &file_vega_vega_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2604,7 +2931,7 @@ func (x *Order) ProtoReflect() protoreflect.Message { // Deprecated: Use Order.ProtoReflect.Descriptor instead. func (*Order) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{5} + return file_vega_vega_proto_rawDescGZIP(), []int{7} } func (x *Order) GetId() string { @@ -2774,7 +3101,7 @@ type OrderCancellationConfirmation struct { func (x *OrderCancellationConfirmation) Reset() { *x = OrderCancellationConfirmation{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[6] + mi := &file_vega_vega_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2787,7 +3114,7 @@ func (x *OrderCancellationConfirmation) String() string { func (*OrderCancellationConfirmation) ProtoMessage() {} func (x *OrderCancellationConfirmation) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[6] + mi := &file_vega_vega_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2800,7 +3127,7 @@ func (x *OrderCancellationConfirmation) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderCancellationConfirmation.ProtoReflect.Descriptor instead. func (*OrderCancellationConfirmation) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{6} + return file_vega_vega_proto_rawDescGZIP(), []int{8} } func (x *OrderCancellationConfirmation) GetOrder() *Order { @@ -2827,7 +3154,7 @@ type OrderConfirmation struct { func (x *OrderConfirmation) Reset() { *x = OrderConfirmation{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[7] + mi := &file_vega_vega_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2840,7 +3167,7 @@ func (x *OrderConfirmation) String() string { func (*OrderConfirmation) ProtoMessage() {} func (x *OrderConfirmation) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[7] + mi := &file_vega_vega_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2853,7 +3180,7 @@ func (x *OrderConfirmation) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderConfirmation.ProtoReflect.Descriptor instead. func (*OrderConfirmation) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{7} + return file_vega_vega_proto_rawDescGZIP(), []int{9} } func (x *OrderConfirmation) GetOrder() *Order { @@ -2898,7 +3225,7 @@ type AuctionIndicativeState struct { func (x *AuctionIndicativeState) Reset() { *x = AuctionIndicativeState{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[8] + mi := &file_vega_vega_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2911,7 +3238,7 @@ func (x *AuctionIndicativeState) String() string { func (*AuctionIndicativeState) ProtoMessage() {} func (x *AuctionIndicativeState) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[8] + mi := &file_vega_vega_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2924,7 +3251,7 @@ func (x *AuctionIndicativeState) ProtoReflect() protoreflect.Message { // Deprecated: Use AuctionIndicativeState.ProtoReflect.Descriptor instead. func (*AuctionIndicativeState) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{8} + return file_vega_vega_proto_rawDescGZIP(), []int{10} } func (x *AuctionIndicativeState) GetMarketId() string { @@ -2999,12 +3326,15 @@ type Trade struct { BuyerAuctionBatch uint64 `protobuf:"varint,14,opt,name=buyer_auction_batch,json=buyerAuctionBatch,proto3" json:"buyer_auction_batch,omitempty"` // Auction batch number that the sell side order was placed in. SellerAuctionBatch uint64 `protobuf:"varint,15,opt,name=seller_auction_batch,json=sellerAuctionBatch,proto3" json:"seller_auction_batch,omitempty"` + // Price for the trade using asset decimals, as opposed to market decimals used + // in the price field. This is only used in trade events for position updates. + AssetPrice string `protobuf:"bytes,16,opt,name=asset_price,json=assetPrice,proto3" json:"asset_price,omitempty"` } func (x *Trade) Reset() { *x = Trade{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[9] + mi := &file_vega_vega_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3017,7 +3347,7 @@ func (x *Trade) String() string { func (*Trade) ProtoMessage() {} func (x *Trade) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[9] + mi := &file_vega_vega_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3030,7 +3360,7 @@ func (x *Trade) ProtoReflect() protoreflect.Message { // Deprecated: Use Trade.ProtoReflect.Descriptor instead. func (*Trade) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{9} + return file_vega_vega_proto_rawDescGZIP(), []int{11} } func (x *Trade) GetId() string { @@ -3138,6 +3468,13 @@ func (x *Trade) GetSellerAuctionBatch() uint64 { return 0 } +func (x *Trade) GetAssetPrice() string { + if x != nil { + return x.AssetPrice + } + return "" +} + // Represents any fees paid by a party, resulting from a trade type Fee struct { state protoimpl.MessageState @@ -3169,7 +3506,7 @@ type Fee struct { func (x *Fee) Reset() { *x = Fee{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[10] + mi := &file_vega_vega_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3182,7 +3519,7 @@ func (x *Fee) String() string { func (*Fee) ProtoMessage() {} func (x *Fee) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[10] + mi := &file_vega_vega_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3195,7 +3532,7 @@ func (x *Fee) ProtoReflect() protoreflect.Message { // Deprecated: Use Fee.ProtoReflect.Descriptor instead. func (*Fee) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{10} + return file_vega_vega_proto_rawDescGZIP(), []int{12} } func (x *Fee) GetMakerFee() string { @@ -3273,7 +3610,7 @@ type TradeSet struct { func (x *TradeSet) Reset() { *x = TradeSet{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[11] + mi := &file_vega_vega_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3286,7 +3623,7 @@ func (x *TradeSet) String() string { func (*TradeSet) ProtoMessage() {} func (x *TradeSet) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[11] + mi := &file_vega_vega_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3299,7 +3636,7 @@ func (x *TradeSet) ProtoReflect() protoreflect.Message { // Deprecated: Use TradeSet.ProtoReflect.Descriptor instead. func (*TradeSet) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{11} + return file_vega_vega_proto_rawDescGZIP(), []int{13} } func (x *TradeSet) GetTrades() []*Trade { @@ -3339,7 +3676,7 @@ type Candle struct { func (x *Candle) Reset() { *x = Candle{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[12] + mi := &file_vega_vega_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3352,7 +3689,7 @@ func (x *Candle) String() string { func (*Candle) ProtoMessage() {} func (x *Candle) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[12] + mi := &file_vega_vega_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3365,7 +3702,7 @@ func (x *Candle) ProtoReflect() protoreflect.Message { // Deprecated: Use Candle.ProtoReflect.Descriptor instead. func (*Candle) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{12} + return file_vega_vega_proto_rawDescGZIP(), []int{14} } func (x *Candle) GetTimestamp() int64 { @@ -3450,7 +3787,7 @@ type PriceLevel struct { func (x *PriceLevel) Reset() { *x = PriceLevel{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[13] + mi := &file_vega_vega_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3463,7 +3800,7 @@ func (x *PriceLevel) String() string { func (*PriceLevel) ProtoMessage() {} func (x *PriceLevel) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[13] + mi := &file_vega_vega_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3476,7 +3813,7 @@ func (x *PriceLevel) ProtoReflect() protoreflect.Message { // Deprecated: Use PriceLevel.ProtoReflect.Descriptor instead. func (*PriceLevel) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{13} + return file_vega_vega_proto_rawDescGZIP(), []int{15} } func (x *PriceLevel) GetPrice() string { @@ -3519,7 +3856,7 @@ type MarketDepth struct { func (x *MarketDepth) Reset() { *x = MarketDepth{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[14] + mi := &file_vega_vega_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3532,7 +3869,7 @@ func (x *MarketDepth) String() string { func (*MarketDepth) ProtoMessage() {} func (x *MarketDepth) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[14] + mi := &file_vega_vega_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3545,7 +3882,7 @@ func (x *MarketDepth) ProtoReflect() protoreflect.Message { // Deprecated: Use MarketDepth.ProtoReflect.Descriptor instead. func (*MarketDepth) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{14} + return file_vega_vega_proto_rawDescGZIP(), []int{16} } func (x *MarketDepth) GetMarketId() string { @@ -3597,7 +3934,7 @@ type MarketDepthUpdate struct { func (x *MarketDepthUpdate) Reset() { *x = MarketDepthUpdate{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[15] + mi := &file_vega_vega_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3610,7 +3947,7 @@ func (x *MarketDepthUpdate) String() string { func (*MarketDepthUpdate) ProtoMessage() {} func (x *MarketDepthUpdate) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[15] + mi := &file_vega_vega_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3623,7 +3960,7 @@ func (x *MarketDepthUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use MarketDepthUpdate.ProtoReflect.Descriptor instead. func (*MarketDepthUpdate) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{15} + return file_vega_vega_proto_rawDescGZIP(), []int{17} } func (x *MarketDepthUpdate) GetMarketId() string { @@ -3693,7 +4030,7 @@ type Position struct { func (x *Position) Reset() { *x = Position{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[16] + mi := &file_vega_vega_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3706,7 +4043,7 @@ func (x *Position) String() string { func (*Position) ProtoMessage() {} func (x *Position) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[16] + mi := &file_vega_vega_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3719,7 +4056,7 @@ func (x *Position) ProtoReflect() protoreflect.Message { // Deprecated: Use Position.ProtoReflect.Descriptor instead. func (*Position) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{16} + return file_vega_vega_proto_rawDescGZIP(), []int{18} } func (x *Position) GetMarketId() string { @@ -3800,7 +4137,7 @@ type PositionTrade struct { func (x *PositionTrade) Reset() { *x = PositionTrade{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[17] + mi := &file_vega_vega_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3813,7 +4150,7 @@ func (x *PositionTrade) String() string { func (*PositionTrade) ProtoMessage() {} func (x *PositionTrade) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[17] + mi := &file_vega_vega_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3826,7 +4163,7 @@ func (x *PositionTrade) ProtoReflect() protoreflect.Message { // Deprecated: Use PositionTrade.ProtoReflect.Descriptor instead. func (*PositionTrade) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{17} + return file_vega_vega_proto_rawDescGZIP(), []int{19} } func (x *PositionTrade) GetVolume() int64 { @@ -3870,7 +4207,7 @@ type Deposit struct { func (x *Deposit) Reset() { *x = Deposit{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[18] + mi := &file_vega_vega_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3883,7 +4220,7 @@ func (x *Deposit) String() string { func (*Deposit) ProtoMessage() {} func (x *Deposit) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[18] + mi := &file_vega_vega_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3896,7 +4233,7 @@ func (x *Deposit) ProtoReflect() protoreflect.Message { // Deprecated: Use Deposit.ProtoReflect.Descriptor instead. func (*Deposit) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{18} + return file_vega_vega_proto_rawDescGZIP(), []int{20} } func (x *Deposit) GetId() string { @@ -3987,7 +4324,7 @@ type Withdrawal struct { func (x *Withdrawal) Reset() { *x = Withdrawal{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[19] + mi := &file_vega_vega_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4000,7 +4337,7 @@ func (x *Withdrawal) String() string { func (*Withdrawal) ProtoMessage() {} func (x *Withdrawal) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[19] + mi := &file_vega_vega_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4013,7 +4350,7 @@ func (x *Withdrawal) ProtoReflect() protoreflect.Message { // Deprecated: Use Withdrawal.ProtoReflect.Descriptor instead. func (*Withdrawal) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{19} + return file_vega_vega_proto_rawDescGZIP(), []int{21} } func (x *Withdrawal) GetId() string { @@ -4103,7 +4440,7 @@ type WithdrawExt struct { func (x *WithdrawExt) Reset() { *x = WithdrawExt{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[20] + mi := &file_vega_vega_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4116,7 +4453,7 @@ func (x *WithdrawExt) String() string { func (*WithdrawExt) ProtoMessage() {} func (x *WithdrawExt) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[20] + mi := &file_vega_vega_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4129,7 +4466,7 @@ func (x *WithdrawExt) ProtoReflect() protoreflect.Message { // Deprecated: Use WithdrawExt.ProtoReflect.Descriptor instead. func (*WithdrawExt) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{20} + return file_vega_vega_proto_rawDescGZIP(), []int{22} } func (m *WithdrawExt) GetExt() isWithdrawExt_Ext { @@ -4170,7 +4507,7 @@ type Erc20WithdrawExt struct { func (x *Erc20WithdrawExt) Reset() { *x = Erc20WithdrawExt{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[21] + mi := &file_vega_vega_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4183,7 +4520,7 @@ func (x *Erc20WithdrawExt) String() string { func (*Erc20WithdrawExt) ProtoMessage() {} func (x *Erc20WithdrawExt) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[21] + mi := &file_vega_vega_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4196,7 +4533,7 @@ func (x *Erc20WithdrawExt) ProtoReflect() protoreflect.Message { // Deprecated: Use Erc20WithdrawExt.ProtoReflect.Descriptor instead. func (*Erc20WithdrawExt) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{21} + return file_vega_vega_proto_rawDescGZIP(), []int{23} } func (x *Erc20WithdrawExt) GetReceiverAddress() string { @@ -4232,7 +4569,7 @@ type Account struct { func (x *Account) Reset() { *x = Account{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[22] + mi := &file_vega_vega_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4245,7 +4582,7 @@ func (x *Account) String() string { func (*Account) ProtoMessage() {} func (x *Account) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[22] + mi := &file_vega_vega_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4258,7 +4595,7 @@ func (x *Account) ProtoReflect() protoreflect.Message { // Deprecated: Use Account.ProtoReflect.Descriptor instead. func (*Account) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{22} + return file_vega_vega_proto_rawDescGZIP(), []int{24} } func (x *Account) GetId() string { @@ -4318,7 +4655,7 @@ type FinancialAmount struct { func (x *FinancialAmount) Reset() { *x = FinancialAmount{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[23] + mi := &file_vega_vega_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4331,7 +4668,7 @@ func (x *FinancialAmount) String() string { func (*FinancialAmount) ProtoMessage() {} func (x *FinancialAmount) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[23] + mi := &file_vega_vega_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4344,7 +4681,7 @@ func (x *FinancialAmount) ProtoReflect() protoreflect.Message { // Deprecated: Use FinancialAmount.ProtoReflect.Descriptor instead. func (*FinancialAmount) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{23} + return file_vega_vega_proto_rawDescGZIP(), []int{25} } func (x *FinancialAmount) GetAmount() string { @@ -4382,7 +4719,7 @@ type Transfer struct { func (x *Transfer) Reset() { *x = Transfer{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[24] + mi := &file_vega_vega_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4395,7 +4732,7 @@ func (x *Transfer) String() string { func (*Transfer) ProtoMessage() {} func (x *Transfer) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[24] + mi := &file_vega_vega_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4408,7 +4745,7 @@ func (x *Transfer) ProtoReflect() protoreflect.Message { // Deprecated: Use Transfer.ProtoReflect.Descriptor instead. func (*Transfer) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{24} + return file_vega_vega_proto_rawDescGZIP(), []int{26} } func (x *Transfer) GetOwner() string { @@ -4482,7 +4819,7 @@ type DispatchStrategy struct { func (x *DispatchStrategy) Reset() { *x = DispatchStrategy{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[25] + mi := &file_vega_vega_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4495,7 +4832,7 @@ func (x *DispatchStrategy) String() string { func (*DispatchStrategy) ProtoMessage() {} func (x *DispatchStrategy) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[25] + mi := &file_vega_vega_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4508,7 +4845,7 @@ func (x *DispatchStrategy) ProtoReflect() protoreflect.Message { // Deprecated: Use DispatchStrategy.ProtoReflect.Descriptor instead. func (*DispatchStrategy) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{25} + return file_vega_vega_proto_rawDescGZIP(), []int{27} } func (x *DispatchStrategy) GetAssetForMetric() string { @@ -4614,7 +4951,7 @@ type Rank struct { func (x *Rank) Reset() { *x = Rank{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[26] + mi := &file_vega_vega_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4627,7 +4964,7 @@ func (x *Rank) String() string { func (*Rank) ProtoMessage() {} func (x *Rank) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[26] + mi := &file_vega_vega_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4640,7 +4977,7 @@ func (x *Rank) ProtoReflect() protoreflect.Message { // Deprecated: Use Rank.ProtoReflect.Descriptor instead. func (*Rank) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{26} + return file_vega_vega_proto_rawDescGZIP(), []int{28} } func (x *Rank) GetStartRank() uint32 { @@ -4681,7 +5018,7 @@ type TransferRequest struct { func (x *TransferRequest) Reset() { *x = TransferRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[27] + mi := &file_vega_vega_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4694,7 +5031,7 @@ func (x *TransferRequest) String() string { func (*TransferRequest) ProtoMessage() {} func (x *TransferRequest) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[27] + mi := &file_vega_vega_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4707,7 +5044,7 @@ func (x *TransferRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TransferRequest.ProtoReflect.Descriptor instead. func (*TransferRequest) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{27} + return file_vega_vega_proto_rawDescGZIP(), []int{29} } func (x *TransferRequest) GetFromAccount() []*Account { @@ -4770,7 +5107,7 @@ type AccountDetails struct { func (x *AccountDetails) Reset() { *x = AccountDetails{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[28] + mi := &file_vega_vega_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4783,7 +5120,7 @@ func (x *AccountDetails) String() string { func (*AccountDetails) ProtoMessage() {} func (x *AccountDetails) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[28] + mi := &file_vega_vega_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4796,7 +5133,7 @@ func (x *AccountDetails) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountDetails.ProtoReflect.Descriptor instead. func (*AccountDetails) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{28} + return file_vega_vega_proto_rawDescGZIP(), []int{30} } func (x *AccountDetails) GetAssetId() string { @@ -4847,12 +5184,14 @@ type LedgerEntry struct { FromAccountBalance string `protobuf:"bytes,6,opt,name=from_account_balance,json=fromAccountBalance,proto3" json:"from_account_balance,omitempty"` // Receiver account balance after the transfer. This field is an unsigned integer scaled to the asset's decimal places. ToAccountBalance string `protobuf:"bytes,7,opt,name=to_account_balance,json=toAccountBalance,proto3" json:"to_account_balance,omitempty"` + // Transfer ID the ledger entry relates to. + TransferId *string `protobuf:"bytes,8,opt,name=transfer_id,json=transferId,proto3,oneof" json:"transfer_id,omitempty"` } func (x *LedgerEntry) Reset() { *x = LedgerEntry{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[29] + mi := &file_vega_vega_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4865,7 +5204,7 @@ func (x *LedgerEntry) String() string { func (*LedgerEntry) ProtoMessage() {} func (x *LedgerEntry) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[29] + mi := &file_vega_vega_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4878,7 +5217,7 @@ func (x *LedgerEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use LedgerEntry.ProtoReflect.Descriptor instead. func (*LedgerEntry) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{29} + return file_vega_vega_proto_rawDescGZIP(), []int{31} } func (x *LedgerEntry) GetFromAccount() *AccountDetails { @@ -4930,6 +5269,13 @@ func (x *LedgerEntry) GetToAccountBalance() string { return "" } +func (x *LedgerEntry) GetTransferId() string { + if x != nil && x.TransferId != nil { + return *x.TransferId + } + return "" +} + // Represents the balance for an account during a transfer type PostTransferBalance struct { state protoimpl.MessageState @@ -4945,7 +5291,7 @@ type PostTransferBalance struct { func (x *PostTransferBalance) Reset() { *x = PostTransferBalance{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[30] + mi := &file_vega_vega_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4958,7 +5304,7 @@ func (x *PostTransferBalance) String() string { func (*PostTransferBalance) ProtoMessage() {} func (x *PostTransferBalance) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[30] + mi := &file_vega_vega_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4971,7 +5317,7 @@ func (x *PostTransferBalance) ProtoReflect() protoreflect.Message { // Deprecated: Use PostTransferBalance.ProtoReflect.Descriptor instead. func (*PostTransferBalance) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{30} + return file_vega_vega_proto_rawDescGZIP(), []int{32} } func (x *PostTransferBalance) GetAccount() *AccountDetails { @@ -5002,7 +5348,7 @@ type LedgerMovement struct { func (x *LedgerMovement) Reset() { *x = LedgerMovement{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[31] + mi := &file_vega_vega_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5015,7 +5361,7 @@ func (x *LedgerMovement) String() string { func (*LedgerMovement) ProtoMessage() {} func (x *LedgerMovement) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[31] + mi := &file_vega_vega_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5028,7 +5374,7 @@ func (x *LedgerMovement) ProtoReflect() protoreflect.Message { // Deprecated: Use LedgerMovement.ProtoReflect.Descriptor instead. func (*LedgerMovement) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{31} + return file_vega_vega_proto_rawDescGZIP(), []int{33} } func (x *LedgerMovement) GetEntries() []*LedgerEntry { @@ -5067,12 +5413,18 @@ type MarginLevels struct { Asset string `protobuf:"bytes,7,opt,name=asset,proto3" json:"asset,omitempty"` // Timestamp in Unix nanoseconds for when the ledger entry was created. Timestamp int64 `protobuf:"varint,8,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Margin required to cover orders in isolated margin mode. + OrderMargin string `protobuf:"bytes,9,opt,name=order_margin,json=orderMargin,proto3" json:"order_margin,omitempty"` + // Margin mode for the party, cross margin or isolated margin. + MarginMode MarginMode `protobuf:"varint,10,opt,name=margin_mode,json=marginMode,proto3,enum=vega.MarginMode" json:"margin_mode,omitempty"` + // Margin factor, relevant only for isolated margin, 0 otherwise. + MarginFactor string `protobuf:"bytes,11,opt,name=margin_factor,json=marginFactor,proto3" json:"margin_factor,omitempty"` } func (x *MarginLevels) Reset() { *x = MarginLevels{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[32] + mi := &file_vega_vega_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5085,7 +5437,7 @@ func (x *MarginLevels) String() string { func (*MarginLevels) ProtoMessage() {} func (x *MarginLevels) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[32] + mi := &file_vega_vega_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5098,7 +5450,7 @@ func (x *MarginLevels) ProtoReflect() protoreflect.Message { // Deprecated: Use MarginLevels.ProtoReflect.Descriptor instead. func (*MarginLevels) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{32} + return file_vega_vega_proto_rawDescGZIP(), []int{34} } func (x *MarginLevels) GetMaintenanceMargin() string { @@ -5157,6 +5509,27 @@ func (x *MarginLevels) GetTimestamp() int64 { return 0 } +func (x *MarginLevels) GetOrderMargin() string { + if x != nil { + return x.OrderMargin + } + return "" +} + +func (x *MarginLevels) GetMarginMode() MarginMode { + if x != nil { + return x.MarginMode + } + return MarginMode_MARGIN_MODE_UNSPECIFIED +} + +func (x *MarginLevels) GetMarginFactor() string { + if x != nil { + return x.MarginFactor + } + return "" +} + // Represents market data specific to a perpetual market. type PerpetualData struct { state protoimpl.MessageState @@ -5171,12 +5544,26 @@ type PerpetualData struct { InternalTwap string `protobuf:"bytes,3,opt,name=internal_twap,json=internalTwap,proto3" json:"internal_twap,omitempty"` // Time-weighted-average the external data points for the in-progress funding period. ExternalTwap string `protobuf:"bytes,4,opt,name=external_twap,json=externalTwap,proto3" json:"external_twap,omitempty"` + // Funding period sequence number + SeqNum uint64 `protobuf:"varint,5,opt,name=seq_num,json=seqNum,proto3" json:"seq_num,omitempty"` + // Funding period start time + StartTime int64 `protobuf:"varint,6,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // The internal composite price used for perpetual markets. + InternalCompositePrice string `protobuf:"bytes,7,opt,name=internal_composite_price,json=internalCompositePrice,proto3" json:"internal_composite_price,omitempty"` + // The next time the internal composite price is calculated for the perpetual market, in Unix nanoseconds. + NextInternalCompositePriceCalc int64 `protobuf:"varint,8,opt,name=next_internal_composite_price_calc,json=nextInternalCompositePriceCalc,proto3" json:"next_internal_composite_price_calc,omitempty"` + // The method used for calculating the internal composite price, for perpetual markets only. + InternalCompositePriceType CompositePriceType `protobuf:"varint,9,opt,name=internal_composite_price_type,json=internalCompositePriceType,proto3,enum=vega.CompositePriceType" json:"internal_composite_price_type,omitempty"` + // Last seen value of the settlement oracle. + UnderlyingIndexPrice string `protobuf:"bytes,10,opt,name=underlying_index_price,json=underlyingIndexPrice,proto3" json:"underlying_index_price,omitempty"` + // State of the internal composite price. + InternalCompositePriceState *CompositePriceState `protobuf:"bytes,11,opt,name=internal_composite_price_state,json=internalCompositePriceState,proto3" json:"internal_composite_price_state,omitempty"` } func (x *PerpetualData) Reset() { *x = PerpetualData{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[33] + mi := &file_vega_vega_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5189,7 +5576,7 @@ func (x *PerpetualData) String() string { func (*PerpetualData) ProtoMessage() {} func (x *PerpetualData) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[33] + mi := &file_vega_vega_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5202,7 +5589,7 @@ func (x *PerpetualData) ProtoReflect() protoreflect.Message { // Deprecated: Use PerpetualData.ProtoReflect.Descriptor instead. func (*PerpetualData) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{33} + return file_vega_vega_proto_rawDescGZIP(), []int{35} } func (x *PerpetualData) GetFundingPayment() string { @@ -5233,6 +5620,55 @@ func (x *PerpetualData) GetExternalTwap() string { return "" } +func (x *PerpetualData) GetSeqNum() uint64 { + if x != nil { + return x.SeqNum + } + return 0 +} + +func (x *PerpetualData) GetStartTime() int64 { + if x != nil { + return x.StartTime + } + return 0 +} + +func (x *PerpetualData) GetInternalCompositePrice() string { + if x != nil { + return x.InternalCompositePrice + } + return "" +} + +func (x *PerpetualData) GetNextInternalCompositePriceCalc() int64 { + if x != nil { + return x.NextInternalCompositePriceCalc + } + return 0 +} + +func (x *PerpetualData) GetInternalCompositePriceType() CompositePriceType { + if x != nil { + return x.InternalCompositePriceType + } + return CompositePriceType_COMPOSITE_PRICE_TYPE_UNSPECIFIED +} + +func (x *PerpetualData) GetUnderlyingIndexPrice() string { + if x != nil { + return x.UnderlyingIndexPrice + } + return "" +} + +func (x *PerpetualData) GetInternalCompositePriceState() *CompositePriceState { + if x != nil { + return x.InternalCompositePriceState + } + return nil +} + // Represents market data specific to a particular product type. type ProductData struct { state protoimpl.MessageState @@ -5248,7 +5684,7 @@ type ProductData struct { func (x *ProductData) Reset() { *x = ProductData{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[34] + mi := &file_vega_vega_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5261,7 +5697,7 @@ func (x *ProductData) String() string { func (*ProductData) ProtoMessage() {} func (x *ProductData) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[34] + mi := &file_vega_vega_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5274,7 +5710,7 @@ func (x *ProductData) ProtoReflect() protoreflect.Message { // Deprecated: Use ProductData.ProtoReflect.Descriptor instead. func (*ProductData) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{34} + return file_vega_vega_proto_rawDescGZIP(), []int{36} } func (m *ProductData) GetData() isProductData_Data { @@ -5379,12 +5815,18 @@ type MarketData struct { ProductData *ProductData `protobuf:"bytes,31,opt,name=product_data,json=productData,proto3,oneof" json:"product_data,omitempty"` // SLA performance for each liquidity provider. LiquidityProviderSla []*LiquidityProviderSLA `protobuf:"bytes,32,rep,name=liquidity_provider_sla,json=liquidityProviderSla,proto3" json:"liquidity_provider_sla,omitempty"` + // Time in Unix nanoseconds when the market will next submit a trade to reduce its position. + NextNetworkCloseout int64 `protobuf:"varint,33,opt,name=next_network_closeout,json=nextNetworkCloseout,proto3" json:"next_network_closeout,omitempty"` + // The method used for calculating the mark price. + MarkPriceType CompositePriceType `protobuf:"varint,34,opt,name=mark_price_type,json=markPriceType,proto3,enum=vega.CompositePriceType" json:"mark_price_type,omitempty"` + // State of the internal composite price. + MarkPriceState *CompositePriceState `protobuf:"bytes,35,opt,name=mark_price_state,json=markPriceState,proto3" json:"mark_price_state,omitempty"` } func (x *MarketData) Reset() { *x = MarketData{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[35] + mi := &file_vega_vega_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5397,7 +5839,7 @@ func (x *MarketData) String() string { func (*MarketData) ProtoMessage() {} func (x *MarketData) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[35] + mi := &file_vega_vega_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5410,7 +5852,7 @@ func (x *MarketData) ProtoReflect() protoreflect.Message { // Deprecated: Use MarketData.ProtoReflect.Descriptor instead. func (*MarketData) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{35} + return file_vega_vega_proto_rawDescGZIP(), []int{37} } func (x *MarketData) GetMarkPrice() string { @@ -5637,28 +6079,163 @@ func (x *MarketData) GetLiquidityProviderSla() []*LiquidityProviderSLA { return nil } -// Equity like share of liquidity fee for each liquidity provider -type LiquidityProviderFeeShare struct { +func (x *MarketData) GetNextNetworkCloseout() int64 { + if x != nil { + return x.NextNetworkCloseout + } + return 0 +} + +func (x *MarketData) GetMarkPriceType() CompositePriceType { + if x != nil { + return x.MarkPriceType + } + return CompositePriceType_COMPOSITE_PRICE_TYPE_UNSPECIFIED +} + +func (x *MarketData) GetMarkPriceState() *CompositePriceState { + if x != nil { + return x.MarkPriceState + } + return nil +} + +type CompositePriceSource struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Liquidity provider party ID. - Party string `protobuf:"bytes,1,opt,name=party,proto3" json:"party,omitempty"` - // Share own by this liquidity provider. - EquityLikeShare string `protobuf:"bytes,2,opt,name=equity_like_share,json=equityLikeShare,proto3" json:"equity_like_share,omitempty"` - // Average entry valuation of the liquidity provider for the market. - AverageEntryValuation string `protobuf:"bytes,3,opt,name=average_entry_valuation,json=averageEntryValuation,proto3" json:"average_entry_valuation,omitempty"` - // Average liquidity score. - AverageScore string `protobuf:"bytes,4,opt,name=average_score,json=averageScore,proto3" json:"average_score,omitempty"` - // The virtual stake of this liquidity provider. - VirtualStake string `protobuf:"bytes,5,opt,name=virtual_stake,json=virtualStake,proto3" json:"virtual_stake,omitempty"` + // Source of the price. + PriceSource string `protobuf:"bytes,1,opt,name=price_source,json=priceSource,proto3" json:"price_source,omitempty"` + // Current value of the composite source price. + Price string `protobuf:"bytes,2,opt,name=price,proto3" json:"price,omitempty"` + // Timestamp in Unix nanoseconds when the price source was last updated. + LastUpdated int64 `protobuf:"varint,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` } -func (x *LiquidityProviderFeeShare) Reset() { - *x = LiquidityProviderFeeShare{} +func (x *CompositePriceSource) Reset() { + *x = CompositePriceSource{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[36] + mi := &file_vega_vega_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompositePriceSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompositePriceSource) ProtoMessage() {} + +func (x *CompositePriceSource) ProtoReflect() protoreflect.Message { + mi := &file_vega_vega_proto_msgTypes[38] + 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 CompositePriceSource.ProtoReflect.Descriptor instead. +func (*CompositePriceSource) Descriptor() ([]byte, []int) { + return file_vega_vega_proto_rawDescGZIP(), []int{38} +} + +func (x *CompositePriceSource) GetPriceSource() string { + if x != nil { + return x.PriceSource + } + return "" +} + +func (x *CompositePriceSource) GetPrice() string { + if x != nil { + return x.Price + } + return "" +} + +func (x *CompositePriceSource) GetLastUpdated() int64 { + if x != nil { + return x.LastUpdated + } + return 0 +} + +// Underlying state of the composite price.. +type CompositePriceState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PriceSources []*CompositePriceSource `protobuf:"bytes,1,rep,name=price_sources,json=priceSources,proto3" json:"price_sources,omitempty"` +} + +func (x *CompositePriceState) Reset() { + *x = CompositePriceState{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_vega_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompositePriceState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompositePriceState) ProtoMessage() {} + +func (x *CompositePriceState) ProtoReflect() protoreflect.Message { + mi := &file_vega_vega_proto_msgTypes[39] + 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 CompositePriceState.ProtoReflect.Descriptor instead. +func (*CompositePriceState) Descriptor() ([]byte, []int) { + return file_vega_vega_proto_rawDescGZIP(), []int{39} +} + +func (x *CompositePriceState) GetPriceSources() []*CompositePriceSource { + if x != nil { + return x.PriceSources + } + return nil +} + +// Equity like share of liquidity fee for each liquidity provider +type LiquidityProviderFeeShare struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Liquidity provider party ID. + Party string `protobuf:"bytes,1,opt,name=party,proto3" json:"party,omitempty"` + // Share own by this liquidity provider. + EquityLikeShare string `protobuf:"bytes,2,opt,name=equity_like_share,json=equityLikeShare,proto3" json:"equity_like_share,omitempty"` + // Average entry valuation of the liquidity provider for the market. + AverageEntryValuation string `protobuf:"bytes,3,opt,name=average_entry_valuation,json=averageEntryValuation,proto3" json:"average_entry_valuation,omitempty"` + // Average liquidity score. + AverageScore string `protobuf:"bytes,4,opt,name=average_score,json=averageScore,proto3" json:"average_score,omitempty"` + // The virtual stake of this liquidity provider. + VirtualStake string `protobuf:"bytes,5,opt,name=virtual_stake,json=virtualStake,proto3" json:"virtual_stake,omitempty"` +} + +func (x *LiquidityProviderFeeShare) Reset() { + *x = LiquidityProviderFeeShare{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_vega_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5671,7 +6248,7 @@ func (x *LiquidityProviderFeeShare) String() string { func (*LiquidityProviderFeeShare) ProtoMessage() {} func (x *LiquidityProviderFeeShare) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[36] + mi := &file_vega_vega_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5684,7 +6261,7 @@ func (x *LiquidityProviderFeeShare) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityProviderFeeShare.ProtoReflect.Descriptor instead. func (*LiquidityProviderFeeShare) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{36} + return file_vega_vega_proto_rawDescGZIP(), []int{40} } func (x *LiquidityProviderFeeShare) GetParty() string { @@ -5752,7 +6329,7 @@ type LiquidityProviderSLA struct { func (x *LiquidityProviderSLA) Reset() { *x = LiquidityProviderSLA{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[37] + mi := &file_vega_vega_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5765,7 +6342,7 @@ func (x *LiquidityProviderSLA) String() string { func (*LiquidityProviderSLA) ProtoMessage() {} func (x *LiquidityProviderSLA) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[37] + mi := &file_vega_vega_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5778,7 +6355,7 @@ func (x *LiquidityProviderSLA) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityProviderSLA.ProtoReflect.Descriptor instead. func (*LiquidityProviderSLA) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{37} + return file_vega_vega_proto_rawDescGZIP(), []int{41} } func (x *LiquidityProviderSLA) GetParty() string { @@ -5865,7 +6442,7 @@ type PriceMonitoringBounds struct { func (x *PriceMonitoringBounds) Reset() { *x = PriceMonitoringBounds{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[38] + mi := &file_vega_vega_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5878,7 +6455,7 @@ func (x *PriceMonitoringBounds) String() string { func (*PriceMonitoringBounds) ProtoMessage() {} func (x *PriceMonitoringBounds) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[38] + mi := &file_vega_vega_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5891,7 +6468,7 @@ func (x *PriceMonitoringBounds) ProtoReflect() protoreflect.Message { // Deprecated: Use PriceMonitoringBounds.ProtoReflect.Descriptor instead. func (*PriceMonitoringBounds) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{38} + return file_vega_vega_proto_rawDescGZIP(), []int{42} } func (x *PriceMonitoringBounds) GetMinValidPrice() string { @@ -5939,7 +6516,7 @@ type ErrorDetail struct { func (x *ErrorDetail) Reset() { *x = ErrorDetail{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[39] + mi := &file_vega_vega_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5952,7 +6529,7 @@ func (x *ErrorDetail) String() string { func (*ErrorDetail) ProtoMessage() {} func (x *ErrorDetail) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[39] + mi := &file_vega_vega_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5965,7 +6542,7 @@ func (x *ErrorDetail) ProtoReflect() protoreflect.Message { // Deprecated: Use ErrorDetail.ProtoReflect.Descriptor instead. func (*ErrorDetail) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{39} + return file_vega_vega_proto_rawDescGZIP(), []int{43} } func (x *ErrorDetail) GetCode() int32 { @@ -6004,7 +6581,7 @@ type NetworkParameter struct { func (x *NetworkParameter) Reset() { *x = NetworkParameter{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[40] + mi := &file_vega_vega_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6017,7 +6594,7 @@ func (x *NetworkParameter) String() string { func (*NetworkParameter) ProtoMessage() {} func (x *NetworkParameter) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[40] + mi := &file_vega_vega_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6030,7 +6607,7 @@ func (x *NetworkParameter) ProtoReflect() protoreflect.Message { // Deprecated: Use NetworkParameter.ProtoReflect.Descriptor instead. func (*NetworkParameter) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{40} + return file_vega_vega_proto_rawDescGZIP(), []int{44} } func (x *NetworkParameter) GetKey() string { @@ -6076,7 +6653,7 @@ type NetworkLimits struct { func (x *NetworkLimits) Reset() { *x = NetworkLimits{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[41] + mi := &file_vega_vega_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6089,7 +6666,7 @@ func (x *NetworkLimits) String() string { func (*NetworkLimits) ProtoMessage() {} func (x *NetworkLimits) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[41] + mi := &file_vega_vega_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6102,7 +6679,7 @@ func (x *NetworkLimits) ProtoReflect() protoreflect.Message { // Deprecated: Use NetworkLimits.ProtoReflect.Descriptor instead. func (*NetworkLimits) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{41} + return file_vega_vega_proto_rawDescGZIP(), []int{45} } func (x *NetworkLimits) GetCanProposeMarket() bool { @@ -6185,7 +6762,7 @@ type LiquidityOrder struct { func (x *LiquidityOrder) Reset() { *x = LiquidityOrder{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[42] + mi := &file_vega_vega_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6198,7 +6775,7 @@ func (x *LiquidityOrder) String() string { func (*LiquidityOrder) ProtoMessage() {} func (x *LiquidityOrder) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[42] + mi := &file_vega_vega_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6211,7 +6788,7 @@ func (x *LiquidityOrder) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityOrder.ProtoReflect.Descriptor instead. func (*LiquidityOrder) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{42} + return file_vega_vega_proto_rawDescGZIP(), []int{46} } func (x *LiquidityOrder) GetReference() PeggedReference { @@ -6250,7 +6827,7 @@ type LiquidityOrderReference struct { func (x *LiquidityOrderReference) Reset() { *x = LiquidityOrderReference{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[43] + mi := &file_vega_vega_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6263,7 +6840,7 @@ func (x *LiquidityOrderReference) String() string { func (*LiquidityOrderReference) ProtoMessage() {} func (x *LiquidityOrderReference) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[43] + mi := &file_vega_vega_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6276,7 +6853,7 @@ func (x *LiquidityOrderReference) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityOrderReference.ProtoReflect.Descriptor instead. func (*LiquidityOrderReference) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{43} + return file_vega_vega_proto_rawDescGZIP(), []int{47} } func (x *LiquidityOrderReference) GetOrderId() string { @@ -6329,7 +6906,7 @@ type LiquidityProvision struct { func (x *LiquidityProvision) Reset() { *x = LiquidityProvision{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[44] + mi := &file_vega_vega_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6342,7 +6919,7 @@ func (x *LiquidityProvision) String() string { func (*LiquidityProvision) ProtoMessage() {} func (x *LiquidityProvision) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[44] + mi := &file_vega_vega_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6355,7 +6932,7 @@ func (x *LiquidityProvision) ProtoReflect() protoreflect.Message { // Deprecated: Use LiquidityProvision.ProtoReflect.Descriptor instead. func (*LiquidityProvision) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{44} + return file_vega_vega_proto_rawDescGZIP(), []int{48} } func (x *LiquidityProvision) GetId() string { @@ -6442,6 +7019,132 @@ func (x *LiquidityProvision) GetReference() string { return "" } +type EthereumL2Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Network ID of this Ethereum layer 2 network. + NetworkId string `protobuf:"bytes,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` + // Chain ID of this Ethereum layer 2 network. + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // Number of block confirmations to wait to consider an Ethereum transaction trusted. + // An Ethereum block is trusted when there are at least "n" blocks confirmed by the + // network, "n" being the number of `confirmations` required. If `confirmations` was set to `3`, + // and the current block to be forged, or mined, on the L2 is block 14, block + // 10 would be considered as trusted, but not block 11. + Confirmations uint32 `protobuf:"varint,3,opt,name=confirmations,proto3" json:"confirmations,omitempty"` + // Display name of this network + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *EthereumL2Config) Reset() { + *x = EthereumL2Config{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_vega_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EthereumL2Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumL2Config) ProtoMessage() {} + +func (x *EthereumL2Config) ProtoReflect() protoreflect.Message { + mi := &file_vega_vega_proto_msgTypes[49] + 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 EthereumL2Config.ProtoReflect.Descriptor instead. +func (*EthereumL2Config) Descriptor() ([]byte, []int) { + return file_vega_vega_proto_rawDescGZIP(), []int{49} +} + +func (x *EthereumL2Config) GetNetworkId() string { + if x != nil { + return x.NetworkId + } + return "" +} + +func (x *EthereumL2Config) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *EthereumL2Config) GetConfirmations() uint32 { + if x != nil { + return x.Confirmations + } + return 0 +} + +func (x *EthereumL2Config) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type EthereumL2Configs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Configs []*EthereumL2Config `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"` +} + +func (x *EthereumL2Configs) Reset() { + *x = EthereumL2Configs{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_vega_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EthereumL2Configs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumL2Configs) ProtoMessage() {} + +func (x *EthereumL2Configs) ProtoReflect() protoreflect.Message { + mi := &file_vega_vega_proto_msgTypes[50] + 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 EthereumL2Configs.ProtoReflect.Descriptor instead. +func (*EthereumL2Configs) Descriptor() ([]byte, []int) { + return file_vega_vega_proto_rawDescGZIP(), []int{50} +} + +func (x *EthereumL2Configs) GetConfigs() []*EthereumL2Config { + if x != nil { + return x.Configs + } + return nil +} + // Ethereum configuration details. type EthereumConfig struct { state protoimpl.MessageState @@ -6471,7 +7174,7 @@ type EthereumConfig struct { func (x *EthereumConfig) Reset() { *x = EthereumConfig{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[45] + mi := &file_vega_vega_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6484,7 +7187,7 @@ func (x *EthereumConfig) String() string { func (*EthereumConfig) ProtoMessage() {} func (x *EthereumConfig) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[45] + mi := &file_vega_vega_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6497,7 +7200,7 @@ func (x *EthereumConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use EthereumConfig.ProtoReflect.Descriptor instead. func (*EthereumConfig) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{45} + return file_vega_vega_proto_rawDescGZIP(), []int{51} } func (x *EthereumConfig) GetNetworkId() string { @@ -6563,7 +7266,7 @@ type EthereumContractConfig struct { func (x *EthereumContractConfig) Reset() { *x = EthereumContractConfig{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[46] + mi := &file_vega_vega_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6576,7 +7279,7 @@ func (x *EthereumContractConfig) String() string { func (*EthereumContractConfig) ProtoMessage() {} func (x *EthereumContractConfig) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[46] + mi := &file_vega_vega_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6589,7 +7292,7 @@ func (x *EthereumContractConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use EthereumContractConfig.ProtoReflect.Descriptor instead. func (*EthereumContractConfig) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{46} + return file_vega_vega_proto_rawDescGZIP(), []int{52} } func (x *EthereumContractConfig) GetAddress() string { @@ -6627,7 +7330,7 @@ type EpochTimestamps struct { func (x *EpochTimestamps) Reset() { *x = EpochTimestamps{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[47] + mi := &file_vega_vega_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6640,7 +7343,7 @@ func (x *EpochTimestamps) String() string { func (*EpochTimestamps) ProtoMessage() {} func (x *EpochTimestamps) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[47] + mi := &file_vega_vega_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6653,7 +7356,7 @@ func (x *EpochTimestamps) ProtoReflect() protoreflect.Message { // Deprecated: Use EpochTimestamps.ProtoReflect.Descriptor instead. func (*EpochTimestamps) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{47} + return file_vega_vega_proto_rawDescGZIP(), []int{53} } func (x *EpochTimestamps) GetStartTime() int64 { @@ -6709,7 +7412,7 @@ type Epoch struct { func (x *Epoch) Reset() { *x = Epoch{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[48] + mi := &file_vega_vega_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6722,7 +7425,7 @@ func (x *Epoch) String() string { func (*Epoch) ProtoMessage() {} func (x *Epoch) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[48] + mi := &file_vega_vega_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6735,7 +7438,7 @@ func (x *Epoch) ProtoReflect() protoreflect.Message { // Deprecated: Use Epoch.ProtoReflect.Descriptor instead. func (*Epoch) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{48} + return file_vega_vega_proto_rawDescGZIP(), []int{54} } func (x *Epoch) GetSeq() uint64 { @@ -6780,7 +7483,7 @@ type EpochParticipation struct { func (x *EpochParticipation) Reset() { *x = EpochParticipation{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[49] + mi := &file_vega_vega_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6793,7 +7496,7 @@ func (x *EpochParticipation) String() string { func (*EpochParticipation) ProtoMessage() {} func (x *EpochParticipation) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[49] + mi := &file_vega_vega_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6806,7 +7509,7 @@ func (x *EpochParticipation) ProtoReflect() protoreflect.Message { // Deprecated: Use EpochParticipation.ProtoReflect.Descriptor instead. func (*EpochParticipation) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{49} + return file_vega_vega_proto_rawDescGZIP(), []int{55} } func (x *EpochParticipation) GetEpoch() *Epoch { @@ -6853,7 +7556,7 @@ type EpochData struct { func (x *EpochData) Reset() { *x = EpochData{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[50] + mi := &file_vega_vega_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6866,7 +7569,7 @@ func (x *EpochData) String() string { func (*EpochData) ProtoMessage() {} func (x *EpochData) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[50] + mi := &file_vega_vega_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6879,7 +7582,7 @@ func (x *EpochData) ProtoReflect() protoreflect.Message { // Deprecated: Use EpochData.ProtoReflect.Descriptor instead. func (*EpochData) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{50} + return file_vega_vega_proto_rawDescGZIP(), []int{56} } func (x *EpochData) GetTotal() int32 { @@ -6925,7 +7628,7 @@ type RankingScore struct { func (x *RankingScore) Reset() { *x = RankingScore{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[51] + mi := &file_vega_vega_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6938,7 +7641,7 @@ func (x *RankingScore) String() string { func (*RankingScore) ProtoMessage() {} func (x *RankingScore) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[51] + mi := &file_vega_vega_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6951,7 +7654,7 @@ func (x *RankingScore) ProtoReflect() protoreflect.Message { // Deprecated: Use RankingScore.ProtoReflect.Descriptor instead. func (*RankingScore) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{51} + return file_vega_vega_proto_rawDescGZIP(), []int{57} } func (x *RankingScore) GetStakeScore() string { @@ -7018,7 +7721,7 @@ type RewardScore struct { func (x *RewardScore) Reset() { *x = RewardScore{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[52] + mi := &file_vega_vega_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7031,7 +7734,7 @@ func (x *RewardScore) String() string { func (*RewardScore) ProtoMessage() {} func (x *RewardScore) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[52] + mi := &file_vega_vega_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7044,7 +7747,7 @@ func (x *RewardScore) ProtoReflect() protoreflect.Message { // Deprecated: Use RewardScore.ProtoReflect.Descriptor instead. func (*RewardScore) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{52} + return file_vega_vega_proto_rawDescGZIP(), []int{58} } func (x *RewardScore) GetRawValidatorScore() string { @@ -7135,7 +7838,7 @@ type Node struct { func (x *Node) Reset() { *x = Node{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[53] + mi := &file_vega_vega_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7148,7 +7851,7 @@ func (x *Node) String() string { func (*Node) ProtoMessage() {} func (x *Node) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[53] + mi := &file_vega_vega_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7161,7 +7864,7 @@ func (x *Node) ProtoReflect() protoreflect.Message { // Deprecated: Use Node.ProtoReflect.Descriptor instead. func (*Node) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{53} + return file_vega_vega_proto_rawDescGZIP(), []int{59} } func (x *Node) GetId() string { @@ -7311,7 +8014,7 @@ type NodeSet struct { func (x *NodeSet) Reset() { *x = NodeSet{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[54] + mi := &file_vega_vega_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7324,7 +8027,7 @@ func (x *NodeSet) String() string { func (*NodeSet) ProtoMessage() {} func (x *NodeSet) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[54] + mi := &file_vega_vega_proto_msgTypes[60] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7337,7 +8040,7 @@ func (x *NodeSet) ProtoReflect() protoreflect.Message { // Deprecated: Use NodeSet.ProtoReflect.Descriptor instead. func (*NodeSet) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{54} + return file_vega_vega_proto_rawDescGZIP(), []int{60} } func (x *NodeSet) GetTotal() uint32 { @@ -7399,7 +8102,7 @@ type NodeData struct { func (x *NodeData) Reset() { *x = NodeData{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[55] + mi := &file_vega_vega_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7412,7 +8115,7 @@ func (x *NodeData) String() string { func (*NodeData) ProtoMessage() {} func (x *NodeData) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[55] + mi := &file_vega_vega_proto_msgTypes[61] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7425,7 +8128,7 @@ func (x *NodeData) ProtoReflect() protoreflect.Message { // Deprecated: Use NodeData.ProtoReflect.Descriptor instead. func (*NodeData) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{55} + return file_vega_vega_proto_rawDescGZIP(), []int{61} } func (x *NodeData) GetStakedTotal() string { @@ -7495,7 +8198,7 @@ type Delegation struct { func (x *Delegation) Reset() { *x = Delegation{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[56] + mi := &file_vega_vega_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7508,7 +8211,7 @@ func (x *Delegation) String() string { func (*Delegation) ProtoMessage() {} func (x *Delegation) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[56] + mi := &file_vega_vega_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7521,7 +8224,7 @@ func (x *Delegation) ProtoReflect() protoreflect.Message { // Deprecated: Use Delegation.ProtoReflect.Descriptor instead. func (*Delegation) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{56} + return file_vega_vega_proto_rawDescGZIP(), []int{62} } func (x *Delegation) GetParty() string { @@ -7576,12 +8279,20 @@ type Reward struct { RewardType string `protobuf:"bytes,8,opt,name=reward_type,json=rewardType,proto3" json:"reward_type,omitempty"` // The epoch when the reward is being released. LockedUntilEpoch uint64 `protobuf:"varint,9,opt,name=locked_until_epoch,json=lockedUntilEpoch,proto3" json:"locked_until_epoch,omitempty"` + // Amount paid as a reward, expressed in asset's quantum unit. + QuantumAmount string `protobuf:"bytes,10,opt,name=quantum_amount,json=quantumAmount,proto3" json:"quantum_amount,omitempty"` + // ID of the game the reward payment was made for if the payment was made for participation in a game. + GameId *string `protobuf:"bytes,11,opt,name=game_id,json=gameId,proto3,oneof" json:"game_id,omitempty"` + // ID of the team the party is a member of, if the party is a member of a participating team, + // and the reward payment was made for participation in a game. + // This field is currently only populated by the rewards API. + TeamId *string `protobuf:"bytes,12,opt,name=team_id,json=teamId,proto3,oneof" json:"team_id,omitempty"` } func (x *Reward) Reset() { *x = Reward{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[57] + mi := &file_vega_vega_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7594,7 +8305,7 @@ func (x *Reward) String() string { func (*Reward) ProtoMessage() {} func (x *Reward) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[57] + mi := &file_vega_vega_proto_msgTypes[63] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7607,7 +8318,7 @@ func (x *Reward) ProtoReflect() protoreflect.Message { // Deprecated: Use Reward.ProtoReflect.Descriptor instead. func (*Reward) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{57} + return file_vega_vega_proto_rawDescGZIP(), []int{63} } func (x *Reward) GetAssetId() string { @@ -7673,6 +8384,27 @@ func (x *Reward) GetLockedUntilEpoch() uint64 { return 0 } +func (x *Reward) GetQuantumAmount() string { + if x != nil { + return x.QuantumAmount + } + return "" +} + +func (x *Reward) GetGameId() string { + if x != nil && x.GameId != nil { + return *x.GameId + } + return "" +} + +func (x *Reward) GetTeamId() string { + if x != nil && x.TeamId != nil { + return *x.TeamId + } + return "" +} + // Details for rewards for a single asset type RewardSummary struct { state protoimpl.MessageState @@ -7690,7 +8422,7 @@ type RewardSummary struct { func (x *RewardSummary) Reset() { *x = RewardSummary{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[58] + mi := &file_vega_vega_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7703,7 +8435,7 @@ func (x *RewardSummary) String() string { func (*RewardSummary) ProtoMessage() {} func (x *RewardSummary) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[58] + mi := &file_vega_vega_proto_msgTypes[64] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7716,7 +8448,7 @@ func (x *RewardSummary) ProtoReflect() protoreflect.Message { // Deprecated: Use RewardSummary.ProtoReflect.Descriptor instead. func (*RewardSummary) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{58} + return file_vega_vega_proto_rawDescGZIP(), []int{64} } func (x *RewardSummary) GetAssetId() string { @@ -7761,7 +8493,7 @@ type EpochRewardSummary struct { func (x *EpochRewardSummary) Reset() { *x = EpochRewardSummary{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[59] + mi := &file_vega_vega_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7774,7 +8506,7 @@ func (x *EpochRewardSummary) String() string { func (*EpochRewardSummary) ProtoMessage() {} func (x *EpochRewardSummary) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[59] + mi := &file_vega_vega_proto_msgTypes[65] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7787,7 +8519,7 @@ func (x *EpochRewardSummary) ProtoReflect() protoreflect.Message { // Deprecated: Use EpochRewardSummary.ProtoReflect.Descriptor instead. func (*EpochRewardSummary) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{59} + return file_vega_vega_proto_rawDescGZIP(), []int{65} } func (x *EpochRewardSummary) GetEpoch() uint64 { @@ -7841,7 +8573,7 @@ type StateValueProposal struct { func (x *StateValueProposal) Reset() { *x = StateValueProposal{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[60] + mi := &file_vega_vega_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7854,7 +8586,7 @@ func (x *StateValueProposal) String() string { func (*StateValueProposal) ProtoMessage() {} func (x *StateValueProposal) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[60] + mi := &file_vega_vega_proto_msgTypes[66] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7867,7 +8599,7 @@ func (x *StateValueProposal) ProtoReflect() protoreflect.Message { // Deprecated: Use StateValueProposal.ProtoReflect.Descriptor instead. func (*StateValueProposal) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{60} + return file_vega_vega_proto_rawDescGZIP(), []int{66} } func (x *StateValueProposal) GetStateVarId() string { @@ -7904,7 +8636,7 @@ type KeyValueBundle struct { func (x *KeyValueBundle) Reset() { *x = KeyValueBundle{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[61] + mi := &file_vega_vega_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7917,7 +8649,7 @@ func (x *KeyValueBundle) String() string { func (*KeyValueBundle) ProtoMessage() {} func (x *KeyValueBundle) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[61] + mi := &file_vega_vega_proto_msgTypes[67] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7930,7 +8662,7 @@ func (x *KeyValueBundle) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyValueBundle.ProtoReflect.Descriptor instead. func (*KeyValueBundle) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{61} + return file_vega_vega_proto_rawDescGZIP(), []int{67} } func (x *KeyValueBundle) GetKey() string { @@ -7970,7 +8702,7 @@ type StateVarValue struct { func (x *StateVarValue) Reset() { *x = StateVarValue{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[62] + mi := &file_vega_vega_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7983,7 +8715,7 @@ func (x *StateVarValue) String() string { func (*StateVarValue) ProtoMessage() {} func (x *StateVarValue) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[62] + mi := &file_vega_vega_proto_msgTypes[68] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7996,7 +8728,7 @@ func (x *StateVarValue) ProtoReflect() protoreflect.Message { // Deprecated: Use StateVarValue.ProtoReflect.Descriptor instead. func (*StateVarValue) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{62} + return file_vega_vega_proto_rawDescGZIP(), []int{68} } func (m *StateVarValue) GetValue() isStateVarValue_Value { @@ -8060,7 +8792,7 @@ type ScalarValue struct { func (x *ScalarValue) Reset() { *x = ScalarValue{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[63] + mi := &file_vega_vega_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8073,7 +8805,7 @@ func (x *ScalarValue) String() string { func (*ScalarValue) ProtoMessage() {} func (x *ScalarValue) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[63] + mi := &file_vega_vega_proto_msgTypes[69] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8086,7 +8818,7 @@ func (x *ScalarValue) ProtoReflect() protoreflect.Message { // Deprecated: Use ScalarValue.ProtoReflect.Descriptor instead. func (*ScalarValue) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{63} + return file_vega_vega_proto_rawDescGZIP(), []int{69} } func (x *ScalarValue) GetValue() string { @@ -8107,7 +8839,7 @@ type VectorValue struct { func (x *VectorValue) Reset() { *x = VectorValue{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[64] + mi := &file_vega_vega_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8120,7 +8852,7 @@ func (x *VectorValue) String() string { func (*VectorValue) ProtoMessage() {} func (x *VectorValue) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[64] + mi := &file_vega_vega_proto_msgTypes[70] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8133,7 +8865,7 @@ func (x *VectorValue) ProtoReflect() protoreflect.Message { // Deprecated: Use VectorValue.ProtoReflect.Descriptor instead. func (*VectorValue) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{64} + return file_vega_vega_proto_rawDescGZIP(), []int{70} } func (x *VectorValue) GetValue() []string { @@ -8154,7 +8886,7 @@ type MatrixValue struct { func (x *MatrixValue) Reset() { *x = MatrixValue{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[65] + mi := &file_vega_vega_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8167,7 +8899,7 @@ func (x *MatrixValue) String() string { func (*MatrixValue) ProtoMessage() {} func (x *MatrixValue) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[65] + mi := &file_vega_vega_proto_msgTypes[71] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8180,7 +8912,7 @@ func (x *MatrixValue) ProtoReflect() protoreflect.Message { // Deprecated: Use MatrixValue.ProtoReflect.Descriptor instead. func (*MatrixValue) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{65} + return file_vega_vega_proto_rawDescGZIP(), []int{71} } func (x *MatrixValue) GetValue() []*VectorValue { @@ -8215,7 +8947,7 @@ type ReferralProgram struct { func (x *ReferralProgram) Reset() { *x = ReferralProgram{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[66] + mi := &file_vega_vega_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8228,7 +8960,7 @@ func (x *ReferralProgram) String() string { func (*ReferralProgram) ProtoMessage() {} func (x *ReferralProgram) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[66] + mi := &file_vega_vega_proto_msgTypes[72] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8241,7 +8973,7 @@ func (x *ReferralProgram) ProtoReflect() protoreflect.Message { // Deprecated: Use ReferralProgram.ProtoReflect.Descriptor instead. func (*ReferralProgram) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{66} + return file_vega_vega_proto_rawDescGZIP(), []int{72} } func (x *ReferralProgram) GetVersion() uint64 { @@ -8301,7 +9033,7 @@ type VolumeBenefitTier struct { func (x *VolumeBenefitTier) Reset() { *x = VolumeBenefitTier{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[67] + mi := &file_vega_vega_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8314,7 +9046,7 @@ func (x *VolumeBenefitTier) String() string { func (*VolumeBenefitTier) ProtoMessage() {} func (x *VolumeBenefitTier) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[67] + mi := &file_vega_vega_proto_msgTypes[73] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8327,7 +9059,7 @@ func (x *VolumeBenefitTier) ProtoReflect() protoreflect.Message { // Deprecated: Use VolumeBenefitTier.ProtoReflect.Descriptor instead. func (*VolumeBenefitTier) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{67} + return file_vega_vega_proto_rawDescGZIP(), []int{73} } func (x *VolumeBenefitTier) GetMinimumRunningNotionalTakerVolume() string { @@ -8364,7 +9096,7 @@ type BenefitTier struct { func (x *BenefitTier) Reset() { *x = BenefitTier{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[68] + mi := &file_vega_vega_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8377,7 +9109,7 @@ func (x *BenefitTier) String() string { func (*BenefitTier) ProtoMessage() {} func (x *BenefitTier) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[68] + mi := &file_vega_vega_proto_msgTypes[74] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8390,7 +9122,7 @@ func (x *BenefitTier) ProtoReflect() protoreflect.Message { // Deprecated: Use BenefitTier.ProtoReflect.Descriptor instead. func (*BenefitTier) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{68} + return file_vega_vega_proto_rawDescGZIP(), []int{74} } func (x *BenefitTier) GetMinimumRunningNotionalTakerVolume() string { @@ -8432,7 +9164,7 @@ type VestingBenefitTiers struct { func (x *VestingBenefitTiers) Reset() { *x = VestingBenefitTiers{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[69] + mi := &file_vega_vega_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8445,7 +9177,7 @@ func (x *VestingBenefitTiers) String() string { func (*VestingBenefitTiers) ProtoMessage() {} func (x *VestingBenefitTiers) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[69] + mi := &file_vega_vega_proto_msgTypes[75] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8458,7 +9190,7 @@ func (x *VestingBenefitTiers) ProtoReflect() protoreflect.Message { // Deprecated: Use VestingBenefitTiers.ProtoReflect.Descriptor instead. func (*VestingBenefitTiers) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{69} + return file_vega_vega_proto_rawDescGZIP(), []int{75} } func (x *VestingBenefitTiers) GetTiers() []*VestingBenefitTier { @@ -8480,7 +9212,7 @@ type VestingBenefitTier struct { func (x *VestingBenefitTier) Reset() { *x = VestingBenefitTier{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[70] + mi := &file_vega_vega_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8493,7 +9225,7 @@ func (x *VestingBenefitTier) String() string { func (*VestingBenefitTier) ProtoMessage() {} func (x *VestingBenefitTier) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[70] + mi := &file_vega_vega_proto_msgTypes[76] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8506,7 +9238,7 @@ func (x *VestingBenefitTier) ProtoReflect() protoreflect.Message { // Deprecated: Use VestingBenefitTier.ProtoReflect.Descriptor instead. func (*VestingBenefitTier) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{70} + return file_vega_vega_proto_rawDescGZIP(), []int{76} } func (x *VestingBenefitTier) GetMinimumQuantumBalance() string { @@ -8539,7 +9271,7 @@ type StakingTier struct { func (x *StakingTier) Reset() { *x = StakingTier{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[71] + mi := &file_vega_vega_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8552,7 +9284,7 @@ func (x *StakingTier) String() string { func (*StakingTier) ProtoMessage() {} func (x *StakingTier) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[71] + mi := &file_vega_vega_proto_msgTypes[77] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8565,7 +9297,7 @@ func (x *StakingTier) ProtoReflect() protoreflect.Message { // Deprecated: Use StakingTier.ProtoReflect.Descriptor instead. func (*StakingTier) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{71} + return file_vega_vega_proto_rawDescGZIP(), []int{77} } func (x *StakingTier) GetMinimumStakedTokens() string { @@ -8604,7 +9336,7 @@ type VolumeDiscountProgram struct { func (x *VolumeDiscountProgram) Reset() { *x = VolumeDiscountProgram{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[72] + mi := &file_vega_vega_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8617,7 +9349,7 @@ func (x *VolumeDiscountProgram) String() string { func (*VolumeDiscountProgram) ProtoMessage() {} func (x *VolumeDiscountProgram) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[72] + mi := &file_vega_vega_proto_msgTypes[78] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8630,7 +9362,7 @@ func (x *VolumeDiscountProgram) ProtoReflect() protoreflect.Message { // Deprecated: Use VolumeDiscountProgram.ProtoReflect.Descriptor instead. func (*VolumeDiscountProgram) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{72} + return file_vega_vega_proto_rawDescGZIP(), []int{78} } func (x *VolumeDiscountProgram) GetVersion() uint64 { @@ -8681,7 +9413,7 @@ type ActivityStreakBenefitTiers struct { func (x *ActivityStreakBenefitTiers) Reset() { *x = ActivityStreakBenefitTiers{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[73] + mi := &file_vega_vega_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8694,7 +9426,7 @@ func (x *ActivityStreakBenefitTiers) String() string { func (*ActivityStreakBenefitTiers) ProtoMessage() {} func (x *ActivityStreakBenefitTiers) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[73] + mi := &file_vega_vega_proto_msgTypes[79] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8707,7 +9439,7 @@ func (x *ActivityStreakBenefitTiers) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivityStreakBenefitTiers.ProtoReflect.Descriptor instead. func (*ActivityStreakBenefitTiers) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{73} + return file_vega_vega_proto_rawDescGZIP(), []int{79} } func (x *ActivityStreakBenefitTiers) GetTiers() []*ActivityStreakBenefitTier { @@ -8734,7 +9466,7 @@ type ActivityStreakBenefitTier struct { func (x *ActivityStreakBenefitTier) Reset() { *x = ActivityStreakBenefitTier{} if protoimpl.UnsafeEnabled { - mi := &file_vega_vega_proto_msgTypes[74] + mi := &file_vega_vega_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8747,7 +9479,7 @@ func (x *ActivityStreakBenefitTier) String() string { func (*ActivityStreakBenefitTier) ProtoMessage() {} func (x *ActivityStreakBenefitTier) ProtoReflect() protoreflect.Message { - mi := &file_vega_vega_proto_msgTypes[74] + mi := &file_vega_vega_proto_msgTypes[80] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8760,7 +9492,7 @@ func (x *ActivityStreakBenefitTier) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivityStreakBenefitTier.ProtoReflect.Descriptor instead. func (*ActivityStreakBenefitTier) Descriptor() ([]byte, []int) { - return file_vega_vega_proto_rawDescGZIP(), []int{74} + return file_vega_vega_proto_rawDescGZIP(), []int{80} } func (x *ActivityStreakBenefitTier) GetMinimumActivityStreak() uint64 { @@ -8770,16 +9502,64 @@ func (x *ActivityStreakBenefitTier) GetMinimumActivityStreak() uint64 { return 0 } -func (x *ActivityStreakBenefitTier) GetRewardMultiplier() string { - if x != nil { - return x.RewardMultiplier +func (x *ActivityStreakBenefitTier) GetRewardMultiplier() string { + if x != nil { + return x.RewardMultiplier + } + return "" +} + +func (x *ActivityStreakBenefitTier) GetVestingMultiplier() string { + if x != nil { + return x.VestingMultiplier + } + return "" +} + +type StopOrder_SizeOverrideValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Scaling percentage of the current position’s size + Percentage string `protobuf:"bytes,1,opt,name=percentage,proto3" json:"percentage,omitempty"` +} + +func (x *StopOrder_SizeOverrideValue) Reset() { + *x = StopOrder_SizeOverrideValue{} + if protoimpl.UnsafeEnabled { + mi := &file_vega_vega_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopOrder_SizeOverrideValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopOrder_SizeOverrideValue) ProtoMessage() {} + +func (x *StopOrder_SizeOverrideValue) ProtoReflect() protoreflect.Message { + mi := &file_vega_vega_proto_msgTypes[81] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (x *ActivityStreakBenefitTier) GetVestingMultiplier() string { +// Deprecated: Use StopOrder_SizeOverrideValue.ProtoReflect.Descriptor instead. +func (*StopOrder_SizeOverrideValue) Descriptor() ([]byte, []int) { + return file_vega_vega_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *StopOrder_SizeOverrideValue) GetPercentage() string { if x != nil { - return x.VestingMultiplier + return x.Percentage } return "" } @@ -8789,1622 +9569,1789 @@ var File_vega_vega_proto protoreflect.FileDescriptor var file_vega_vega_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x76, 0x65, 0x67, 0x61, 0x1a, 0x12, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x0b, 0x0a, 0x09, - 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0b, 0x6f, 0x63, 0x6f, - 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x09, 0x6f, 0x63, 0x6f, 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x22, - 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x48, 0x02, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x70, - 0x69, 0x72, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, 0x03, 0x52, 0x0e, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x88, 0x01, 0x01, - 0x12, 0x4d, 0x0a, 0x11, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x22, - 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x03, 0x48, 0x04, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, - 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x10, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x2e, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x48, 0x05, 0x52, 0x0f, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x61, - 0x73, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, - 0x64, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x38, - 0x0a, 0x17, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x15, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x6a, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x69, - 0x72, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x58, - 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x45, - 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x43, - 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x53, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x58, 0x50, 0x49, - 0x52, 0x59, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x53, 0x55, 0x42, 0x4d, - 0x49, 0x54, 0x10, 0x02, 0x22, 0x7b, 0x0a, 0x10, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x44, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x52, 0x49, 0x47, - 0x47, 0x45, 0x52, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x54, - 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x52, 0x49, 0x53, 0x45, 0x53, 0x5f, 0x41, 0x42, 0x4f, 0x56, 0x45, 0x10, 0x01, 0x12, 0x21, - 0x0a, 0x1d, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x4c, 0x4c, 0x53, 0x5f, 0x42, 0x45, 0x4c, 0x4f, 0x57, 0x10, - 0x02, 0x22, 0x9d, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, - 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, - 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, - 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x52, 0x49, - 0x47, 0x47, 0x45, 0x52, 0x45, 0x44, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, - 0x06, 0x22, 0xe2, 0x02, 0x0a, 0x0f, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x28, 0x0a, 0x24, 0x52, 0x45, 0x4a, 0x45, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x44, - 0x49, 0x4e, 0x47, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x10, - 0x01, 0x12, 0x27, 0x0a, 0x23, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x49, 0x4e, 0x5f, - 0x54, 0x48, 0x45, 0x5f, 0x50, 0x41, 0x53, 0x54, 0x10, 0x02, 0x12, 0x28, 0x0a, 0x24, 0x52, 0x45, - 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, - 0x55, 0x53, 0x54, 0x5f, 0x42, 0x45, 0x5f, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x4f, 0x4e, - 0x4c, 0x59, 0x10, 0x03, 0x12, 0x36, 0x0a, 0x32, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x53, 0x54, 0x4f, - 0x50, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x50, 0x41, 0x52, - 0x54, 0x59, 0x5f, 0x52, 0x45, 0x41, 0x43, 0x48, 0x45, 0x44, 0x10, 0x04, 0x12, 0x3e, 0x0a, 0x3a, - 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, - 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x4f, 0x55, 0x54, 0x5f, - 0x41, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12, 0x38, 0x0a, 0x34, - 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, - 0x43, 0x4c, 0x4f, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x48, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x49, - 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x42, 0x09, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x63, 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x69, - 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, - 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x65, 0x67, 0x79, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x17, 0x0a, 0x05, 0x50, 0x61, 0x72, 0x74, + 0x72, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6b, 0x0a, 0x0c, 0x50, + 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, + 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, + 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x32, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf9, 0x0f, 0x0a, + 0x09, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0b, 0x6f, 0x63, + 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x09, 0x6f, 0x63, 0x6f, 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x22, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x45, 0x78, + 0x70, 0x69, 0x72, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, 0x03, 0x52, 0x0e, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x88, 0x01, + 0x01, 0x12, 0x4d, 0x0a, 0x11, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, + 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x22, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x04, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x10, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x2e, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x48, 0x05, 0x52, 0x0f, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x57, 0x0a, 0x15, 0x73, 0x69, 0x7a, 0x65, 0x5f, + 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, + 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x69, 0x7a, 0x65, 0x4f, 0x76, 0x65, 0x72, + 0x72, 0x69, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x73, 0x69, 0x7a, + 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x12, 0x56, 0x0a, 0x13, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, + 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x53, + 0x69, 0x7a, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x48, 0x06, 0x52, 0x11, 0x73, 0x69, 0x7a, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x12, 0x38, 0x0a, 0x17, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x15, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x1a, 0x33, 0x0a, 0x11, 0x53, 0x69, + 0x7a, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x22, + 0x80, 0x01, 0x0a, 0x13, 0x53, 0x69, 0x7a, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x21, 0x53, 0x49, 0x5a, 0x45, 0x5f, + 0x4f, 0x56, 0x45, 0x52, 0x52, 0x49, 0x44, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, + 0x0a, 0x1a, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x52, 0x49, 0x44, 0x45, 0x5f, + 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x22, + 0x0a, 0x1e, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x52, 0x49, 0x44, 0x45, 0x5f, + 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x10, 0x02, 0x22, 0x6a, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x53, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x67, 0x79, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, + 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, + 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x53, + 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x54, 0x52, + 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x53, 0x55, 0x42, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x22, 0x7b, + 0x0a, 0x10, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x44, 0x49, + 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, + 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x49, 0x53, 0x45, 0x53, + 0x5f, 0x41, 0x42, 0x4f, 0x56, 0x45, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x52, 0x49, 0x47, + 0x47, 0x45, 0x52, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, + 0x4c, 0x4c, 0x53, 0x5f, 0x42, 0x45, 0x4c, 0x4f, 0x57, 0x10, 0x02, 0x22, 0x9d, 0x01, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, + 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, + 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, + 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x45, 0x44, + 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x50, + 0x49, 0x52, 0x45, 0x44, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x06, 0x22, 0xa0, 0x04, 0x0a, 0x0f, + 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, + 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x28, 0x0a, 0x24, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4e, 0x4f, + 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x10, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x52, + 0x45, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, + 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x49, 0x4e, 0x5f, 0x54, 0x48, 0x45, 0x5f, 0x50, 0x41, + 0x53, 0x54, 0x10, 0x02, 0x12, 0x28, 0x0a, 0x24, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x55, 0x53, 0x54, 0x5f, 0x42, 0x45, + 0x5f, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x12, 0x36, + 0x0a, 0x32, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x4f, 0x52, 0x44, 0x45, + 0x52, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x41, + 0x43, 0x48, 0x45, 0x44, 0x10, 0x04, 0x12, 0x3e, 0x0a, 0x3a, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, + 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x4f, 0x55, 0x54, 0x5f, 0x41, 0x5f, 0x50, 0x4f, 0x53, 0x49, + 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12, 0x38, 0x0a, 0x34, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x49, 0x4e, + 0x47, 0x5f, 0x54, 0x48, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, + 0x12, 0x39, 0x0a, 0x35, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, + 0x4c, 0x49, 0x4e, 0x4b, 0x45, 0x44, 0x5f, 0x50, 0x45, 0x52, 0x43, 0x45, 0x4e, 0x54, 0x41, 0x47, + 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x07, 0x12, 0x42, 0x0a, 0x3e, 0x52, + 0x45, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, + 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, + 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x5f, 0x44, 0x55, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x4f, 0x50, + 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x08, 0x12, + 0x3d, 0x0a, 0x39, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x43, + 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4f, 0x43, 0x4f, 0x5f, + 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x10, 0x09, 0x42, 0x09, + 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x63, + 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, + 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x59, 0x0a, 0x05, 0x50, 0x61, 0x72, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x4e, 0x0a, 0x0a, 0x52, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, - 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x6f, 0x72, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6c, 0x6f, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x6f, 0x6e, - 0x67, 0x22, 0x5a, 0x0a, 0x0b, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x12, 0x33, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x65, 0x67, 0x67, 0x65, - 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x8c, 0x01, - 0x0a, 0x0c, 0x49, 0x63, 0x65, 0x62, 0x65, 0x72, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1b, - 0x0a, 0x09, 0x70, 0x65, 0x61, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x08, 0x70, 0x65, 0x61, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6d, - 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x69, 0x6d, - 0x75, 0x6d, 0x56, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d, 0x0a, - 0x12, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, - 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x72, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x80, 0x0a, 0x0a, - 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1e, - 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, - 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x61, - 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x72, 0x65, 0x6d, - 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x3b, 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, - 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x49, - 0x6e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x46, 0x6f, - 0x72, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, - 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x73, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, 0x01, - 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x61, 0x74, - 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, 0x61, 0x74, - 0x63, 0x68, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x0c, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0b, 0x70, - 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x16, 0x6c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x14, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1f, 0x0a, - 0x0b, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x15, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x3c, - 0x0a, 0x0d, 0x69, 0x63, 0x65, 0x62, 0x65, 0x72, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x49, 0x63, 0x65, - 0x62, 0x65, 0x72, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x01, 0x52, 0x0c, 0x69, 0x63, 0x65, - 0x62, 0x65, 0x72, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x22, 0xb6, 0x01, 0x0a, - 0x0b, 0x54, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x19, - 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x54, - 0x49, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x47, 0x54, 0x43, - 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4f, - 0x52, 0x43, 0x45, 0x5f, 0x47, 0x54, 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x49, 0x4d, - 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x4f, 0x43, 0x10, 0x03, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x22, 0x4e, 0x0a, 0x0a, 0x52, 0x69, 0x73, 0x6b, 0x46, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x6f, + 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, + 0x6f, 0x6e, 0x67, 0x22, 0x5a, 0x0a, 0x0b, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x12, 0x33, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x65, 0x67, + 0x67, 0x65, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, + 0x8c, 0x01, 0x0a, 0x0c, 0x49, 0x63, 0x65, 0x62, 0x65, 0x72, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x65, 0x61, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x65, 0x61, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x30, 0x0a, + 0x14, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x6d, 0x69, 0x6e, + 0x69, 0x6d, 0x75, 0x6d, 0x56, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x6d, 0x61, + 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x80, + 0x0a, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, + 0x12, 0x1e, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, + 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x72, + 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x3b, 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, + 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x49, 0x6e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, + 0x46, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x5f, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, + 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x0c, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, + 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, + 0x0b, 0x70, 0x65, 0x67, 0x67, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x16, + 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, + 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x12, + 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x15, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x4f, 0x6e, 0x6c, 0x79, + 0x12, 0x3c, 0x0a, 0x0d, 0x69, 0x63, 0x65, 0x62, 0x65, 0x72, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x49, + 0x63, 0x65, 0x62, 0x65, 0x72, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x01, 0x52, 0x0c, 0x69, + 0x63, 0x65, 0x62, 0x65, 0x72, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x22, 0xb6, + 0x01, 0x0a, 0x0b, 0x54, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1d, + 0x0a, 0x19, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, + 0x11, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x47, + 0x54, 0x43, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x5f, + 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x47, 0x54, 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x54, + 0x49, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x4f, 0x43, + 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4f, + 0x52, 0x43, 0x45, 0x5f, 0x46, 0x4f, 0x4b, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x49, 0x4d, + 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x47, 0x46, 0x41, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x43, - 0x45, 0x5f, 0x46, 0x4f, 0x4b, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x49, 0x4d, 0x45, 0x5f, - 0x49, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x47, 0x46, 0x41, 0x10, 0x05, 0x12, 0x15, - 0x0a, 0x11, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, - 0x47, 0x46, 0x4e, 0x10, 0x06, 0x22, 0x4f, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, - 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x49, 0x4d, 0x49, - 0x54, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x4b, - 0x45, 0x54, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x54, - 0x57, 0x4f, 0x52, 0x4b, 0x10, 0x03, 0x22, 0xc9, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, - 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, - 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x12, 0x13, 0x0a, - 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, - 0x10, 0x06, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x52, - 0x54, 0x49, 0x41, 0x4c, 0x4c, 0x59, 0x5f, 0x46, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x07, 0x12, - 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x52, 0x4b, 0x45, 0x44, - 0x10, 0x08, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x42, 0x10, 0x0a, - 0x0e, 0x5f, 0x69, 0x63, 0x65, 0x62, 0x65, 0x72, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, - 0x42, 0x0a, 0x1d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x22, 0xa0, 0x01, 0x0a, 0x11, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x06, - 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, - 0x73, 0x12, 0x43, 0x0a, 0x17, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, - 0x15, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x41, 0x66, - 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0xd3, 0x01, 0x0a, 0x16, 0x41, 0x75, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x29, - 0x0a, 0x10, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x76, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x64, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x76, 0x65, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x61, - 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, - 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x22, 0xdb, 0x04, 0x0a, - 0x05, 0x54, 0x72, 0x61, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, - 0x79, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x09, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x52, 0x09, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x75, 0x79, 0x5f, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x79, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x62, 0x75, 0x79, 0x65, 0x72, 0x5f, 0x66, - 0x65, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x46, 0x65, 0x65, 0x52, 0x08, 0x62, 0x75, 0x79, 0x65, 0x72, 0x46, 0x65, 0x65, 0x12, 0x28, 0x0a, - 0x0a, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x09, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x46, 0x65, 0x65, 0x52, 0x09, 0x73, 0x65, - 0x6c, 0x6c, 0x65, 0x72, 0x46, 0x65, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x62, 0x75, 0x79, 0x65, 0x72, - 0x5f, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x62, 0x75, 0x79, 0x65, 0x72, 0x41, 0x75, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x65, 0x6c, 0x6c, 0x65, - 0x72, 0x5f, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x41, 0x75, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x22, 0x6f, 0x0a, 0x04, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x5f, - 0x4f, 0x55, 0x54, 0x5f, 0x47, 0x4f, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, - 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x42, 0x41, 0x44, 0x10, 0x03, 0x22, 0x98, 0x04, 0x0a, 0x03, 0x46, - 0x65, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x12, - 0x2d, 0x0a, 0x12, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, - 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x69, 0x6e, 0x66, - 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x46, 0x65, 0x65, 0x12, 0x23, - 0x0a, 0x0d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x46, 0x65, 0x65, 0x12, 0x39, 0x0a, 0x19, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, - 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4b, - 0x0a, 0x22, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, - 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, 0x69, 0x6e, 0x66, 0x72, - 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x46, 0x65, 0x65, 0x56, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x1d, 0x6c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x76, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x1a, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, - 0x0a, 0x1b, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x72, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x18, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x72, 0x65, 0x72, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4f, 0x0a, - 0x24, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x5f, - 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x21, 0x69, 0x6e, 0x66, - 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x45, - 0x0a, 0x1f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, - 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x46, 0x65, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2f, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x64, 0x65, 0x53, 0x65, - 0x74, 0x12, 0x23, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x06, - 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x22, 0xf2, 0x01, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, - 0x69, 0x67, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x69, 0x67, 0x68, 0x12, - 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, - 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x76, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, - 0x1a, 0x0a, 0x08, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0x64, 0x0a, 0x0a, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, - 0x28, 0x0a, 0x10, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x4f, 0x66, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x0b, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, - 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x22, - 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x03, 0x62, - 0x75, 0x79, 0x12, 0x24, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x52, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x71, 0x75, - 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x22, 0xdd, 0x01, 0x0a, 0x11, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, - 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x52, 0x03, 0x62, 0x75, 0x79, 0x12, 0x24, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x6c, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x12, 0x27, - 0x0a, 0x0f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x18, 0x70, 0x72, 0x65, 0x76, 0x69, - 0x6f, 0x75, 0x73, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x70, 0x72, 0x65, 0x76, 0x69, - 0x6f, 0x75, 0x73, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x22, 0xf7, 0x02, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, - 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, - 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x76, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6f, 0x70, 0x65, - 0x6e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x6c, 0x69, - 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, - 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x50, 0x6e, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x6e, - 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x50, 0x6e, - 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, - 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x69, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x6f, 0x73, 0x73, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x69, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x0f, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3d, 0x0a, 0x0d, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x76, 0x6f, - 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0xe4, 0x02, 0x0a, 0x07, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, - 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, - 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x22, 0x5d, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, - 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, - 0x03, 0x22, 0xa8, 0x03, 0x0a, 0x0a, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, + 0x45, 0x5f, 0x47, 0x46, 0x4e, 0x10, 0x06, 0x22, 0x4f, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x49, + 0x4d, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, + 0x52, 0x4b, 0x45, 0x54, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, + 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x10, 0x03, 0x22, 0xc9, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x12, + 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, + 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, + 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x12, + 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, + 0x45, 0x44, 0x10, 0x06, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, + 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x4c, 0x59, 0x5f, 0x46, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, + 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x52, 0x4b, + 0x45, 0x44, 0x10, 0x08, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x42, + 0x10, 0x0a, 0x0e, 0x5f, 0x69, 0x63, 0x65, 0x62, 0x65, 0x72, 0x67, 0x5f, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x22, 0x42, 0x0a, 0x1d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0xa0, 0x01, 0x0a, 0x11, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x05, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x23, + 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x06, 0x74, 0x72, 0x61, + 0x64, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x17, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x52, 0x15, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0xd3, 0x01, 0x0a, 0x16, 0x41, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x76, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, + 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x6e, 0x64, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x69, + 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x75, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0c, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0a, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x22, 0xfc, + 0x04, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x28, 0x0a, + 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x52, 0x09, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x75, 0x79, 0x5f, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x79, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x6c, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x62, 0x75, 0x79, 0x65, 0x72, + 0x5f, 0x66, 0x65, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x46, 0x65, 0x65, 0x52, 0x08, 0x62, 0x75, 0x79, 0x65, 0x72, 0x46, 0x65, 0x65, 0x12, + 0x28, 0x0a, 0x0a, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x46, 0x65, 0x65, 0x52, 0x09, + 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x46, 0x65, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x62, 0x75, 0x79, + 0x65, 0x72, 0x5f, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x62, 0x75, 0x79, 0x65, 0x72, 0x41, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x65, 0x6c, + 0x6c, 0x65, 0x72, 0x5f, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x41, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x6f, 0x0a, 0x04, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x43, 0x4c, 0x4f, + 0x53, 0x45, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x47, 0x4f, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1e, 0x0a, + 0x1a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x43, 0x4c, + 0x4f, 0x53, 0x45, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x42, 0x41, 0x44, 0x10, 0x03, 0x22, 0x98, 0x04, + 0x0a, 0x03, 0x46, 0x65, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, + 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, + 0x65, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, + 0x69, 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x46, 0x65, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, + 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x12, 0x39, 0x0a, 0x19, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, + 0x66, 0x65, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6d, 0x61, 0x6b, 0x65, 0x72, + 0x46, 0x65, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x4b, 0x0a, 0x22, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x75, 0x72, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, 0x69, + 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x46, 0x65, 0x65, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x41, + 0x0a, 0x1d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x46, 0x65, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x4f, 0x0a, 0x24, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, + 0x72, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x5f, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x21, + 0x69, 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x46, 0x65, + 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x45, 0x0a, 0x1f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x6c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2f, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x64, + 0x65, 0x53, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x64, + 0x65, 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x22, 0xf2, 0x01, 0x0a, 0x06, 0x43, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x68, 0x69, 0x67, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x69, + 0x67, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6c, 0x6f, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x73, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0x64, + 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x0b, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, + 0x65, 0x70, 0x74, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, + 0x64, 0x12, 0x22, 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x52, 0x03, 0x62, 0x75, 0x79, 0x12, 0x24, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x73, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x22, 0xdd, 0x01, 0x0a, 0x11, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, + 0x65, 0x70, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x03, 0x62, 0x75, 0x79, 0x12, 0x24, 0x0a, 0x04, 0x73, + 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x04, 0x73, 0x65, 0x6c, + 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x18, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf7, 0x02, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x70, 0x65, + 0x6e, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, + 0x6f, 0x70, 0x65, 0x6e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, + 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x50, 0x6e, 0x6c, 0x12, 0x25, 0x0a, + 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x73, 0x65, + 0x64, 0x50, 0x6e, 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x11, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x6c, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x6f, 0x73, 0x73, 0x53, 0x6f, 0x63, 0x69, + 0x61, 0x6c, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x3d, 0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3d, + 0x0a, 0x0d, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0xe4, 0x02, + 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x72, 0x65, + 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x5d, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x14, + 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, + 0x45, 0x44, 0x10, 0x03, 0x22, 0xa8, 0x03, 0x0a, 0x0a, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, 0x0a, + 0x03, 0x72, 0x65, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, + 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2f, 0x0a, 0x13, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x12, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x45, 0x78, 0x74, 0x52, 0x03, 0x65, 0x78, 0x74, 0x22, 0x5c, 0x0a, 0x06, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, + 0x0b, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x13, + 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, + 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, + 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, + 0x44, 0x0a, 0x0b, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x45, 0x78, 0x74, 0x12, 0x2e, + 0x0a, 0x05, 0x65, 0x72, 0x63, 0x32, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x72, 0x63, 0x32, 0x30, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x45, 0x78, 0x74, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x63, 0x32, 0x30, 0x42, 0x05, + 0x0a, 0x03, 0x65, 0x78, 0x74, 0x22, 0x3d, 0x0a, 0x10, 0x45, 0x72, 0x63, 0x32, 0x30, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x45, 0x78, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, - 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x17, 0x0a, 0x07, - 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, - 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x2f, 0x0a, 0x13, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x12, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x45, 0x78, 0x74, 0x52, 0x03, 0x65, 0x78, 0x74, 0x22, 0x5c, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, - 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x41, 0x4c, - 0x49, 0x5a, 0x45, 0x44, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0x44, 0x0a, 0x0b, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x45, 0x78, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x65, - 0x72, 0x63, 0x32, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x45, 0x72, 0x63, 0x32, 0x30, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x45, - 0x78, 0x74, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x63, 0x32, 0x30, 0x42, 0x05, 0x0a, 0x03, 0x65, - 0x78, 0x74, 0x22, 0x3d, 0x0a, 0x10, 0x45, 0x72, 0x63, 0x32, 0x30, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x45, 0x78, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, - 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3f, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x61, 0x6e, - 0x63, 0x69, 0x61, 0x6c, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x22, 0xb3, 0x01, 0x0a, 0x08, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x69, 0x61, 0x6c, 0x41, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0xa5, - 0x05, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, - 0x65, 0x67, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x66, 0x6f, 0x72, - 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x2c, 0x0a, - 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, - 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0b, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x10, 0x69, - 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x49, 0x6e, 0x64, - 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0f, 0x69, 0x6e, - 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x09, 0x74, 0x65, 0x61, 0x6d, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, - 0x6e, 0x5f, 0x74, 0x6f, 0x70, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6e, 0x54, 0x6f, 0x70, 0x50, 0x65, 0x72, 0x66, - 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x6b, 0x0a, 0x33, 0x6e, 0x6f, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x69, - 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, - 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x77, 0x69, 0x6e, - 0x64, 0x6f, 0x77, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, - 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x4f, 0x0a, 0x15, 0x64, 0x69, - 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x65, 0x67, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x14, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x29, 0x0a, 0x0a, 0x72, - 0x61, 0x6e, 0x6b, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x09, 0x72, 0x61, 0x6e, - 0x6b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x46, 0x0a, 0x04, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x1d, - 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x1f, 0x0a, - 0x0b, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x22, 0xe6, - 0x01, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x30, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3f, 0x0a, 0x0f, 0x46, 0x69, + 0x6e, 0x61, 0x6e, 0x63, 0x69, 0x61, 0x6c, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x22, 0xb3, 0x01, 0x0a, 0x08, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x2d, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x69, 0x61, 0x6c, 0x41, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x41, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, + 0x64, 0x22, 0xa5, 0x05, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, + 0x66, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x12, 0x2c, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x18, + 0x0a, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x40, + 0x0a, 0x10, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x5f, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, + 0x0f, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x74, 0x65, 0x61, 0x6d, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, + 0x28, 0x0a, 0x10, 0x6e, 0x5f, 0x74, 0x6f, 0x70, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, + 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6e, 0x54, 0x6f, 0x70, 0x50, + 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x6b, 0x0a, 0x33, 0x6e, 0x6f, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x41, 0x76, 0x65, + 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x69, 0x6e, 0x64, 0x6f, + 0x77, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, + 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x4f, 0x0a, + 0x15, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x14, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x29, + 0x0a, 0x0a, 0x72, 0x61, 0x6e, 0x6b, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x09, + 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x46, 0x0a, 0x04, 0x52, 0x61, 0x6e, + 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x6b, + 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x61, 0x74, 0x69, + 0x6f, 0x22, 0xe6, 0x01, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x0e, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x19, 0x0a, + 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x19, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x22, 0xef, 0x02, 0x0a, 0x0b, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x37, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, + 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, - 0x6e, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6d, 0x69, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, - 0x26, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x05, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x22, 0xb9, 0x02, 0x0a, 0x0b, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x37, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0b, 0x66, - 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x74, 0x6f, - 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x30, 0x0a, 0x14, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x74, 0x6f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0x5f, 0x0a, 0x13, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x0a, + 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x30, 0x0a, - 0x14, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x62, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x66, 0x72, 0x6f, - 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, - 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x62, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x6f, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x5f, 0x0a, - 0x13, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x07, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x74, - 0x0a, 0x0e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x2b, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x35, 0x0a, - 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x73, 0x22, 0xad, 0x02, 0x0a, 0x0c, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, - 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x11, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, - 0x72, 0x67, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x6c, - 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x38, - 0x0a, 0x18, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x6c, - 0x65, 0x61, 0x73, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x16, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x6c, 0x65, - 0x61, 0x73, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, - 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x22, 0xa5, 0x01, 0x0a, 0x0d, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x21, 0x0a, 0x0c, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, - 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, - 0x77, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x54, 0x77, 0x61, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x77, 0x61, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x77, 0x61, 0x70, 0x22, 0x53, 0x0a, 0x0b, - 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x0e, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x1f, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, - 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x70, - 0x65, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x22, 0xa8, 0x0c, 0x0a, 0x0a, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, - 0x24, 0x0a, 0x0e, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x73, 0x74, 0x42, 0x69, 0x64, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x69, - 0x64, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, - 0x62, 0x65, 0x73, 0x74, 0x42, 0x69, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x28, 0x0a, - 0x10, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x65, 0x73, 0x74, 0x4f, 0x66, 0x66, - 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x62, 0x65, 0x73, 0x74, 0x5f, - 0x6f, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0f, 0x62, 0x65, 0x73, 0x74, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x56, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x15, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x5f, 0x62, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x12, 0x62, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x42, 0x69, - 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x62, 0x69, 0x64, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x62, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x42, 0x69, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x62, - 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6f, 0x66, 0x66, 0x65, 0x72, - 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x62, 0x65, - 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x5f, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x62, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x4f, 0x66, 0x66, 0x65, 0x72, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, - 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6d, 0x69, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x5f, 0x6d, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4d, 0x69, 0x64, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0a, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x12, 0x23, - 0x0a, 0x0d, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, - 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2b, - 0x0a, 0x11, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x76, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x69, 0x6e, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x13, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x6f, - 0x64, 0x65, 0x52, 0x11, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, 0x72, 0x61, 0x64, 0x69, 0x6e, - 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x18, 0x14, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x75, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, - 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, - 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x17, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x12, 0x53, 0x0a, 0x17, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x18, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, - 0x52, 0x15, 0x70, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x19, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x60, 0x0a, 0x1c, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x5f, - 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x46, 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x52, 0x19, 0x6c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x46, - 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, - 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, 0x78, - 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x54, 0x6f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x2a, 0x0a, - 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, - 0x61, 0x64, 0x65, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x77, 0x74, 0x68, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x68, 0x12, 0x39, - 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x1f, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x64, - 0x75, 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, - 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01, 0x12, 0x50, 0x0a, 0x16, 0x6c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, - 0x73, 0x6c, 0x61, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x53, 0x4c, 0x41, 0x52, 0x14, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, - 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0xdf, 0x01, 0x0a, - 0x19, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x46, 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, - 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x71, 0x75, 0x69, 0x74, 0x79, 0x5f, 0x6c, 0x69, 0x6b, 0x65, 0x5f, - 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x71, 0x75, - 0x69, 0x74, 0x79, 0x4c, 0x69, 0x6b, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x17, - 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x61, - 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, - 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x76, 0x65, - 0x72, 0x61, 0x67, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x69, 0x72, - 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x92, - 0x04, 0x0a, 0x14, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x53, 0x4c, 0x41, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x50, 0x0a, - 0x26, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x66, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x6f, 0x6e, 0x5f, 0x62, 0x6f, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x20, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x46, 0x72, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x4f, 0x66, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x6e, 0x42, 0x6f, 0x6f, 0x6b, 0x12, - 0x4a, 0x0a, 0x23, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x66, 0x72, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, - 0x6e, 0x5f, 0x62, 0x6f, 0x6f, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x6c, 0x61, - 0x73, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, - 0x66, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x6e, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x33, 0x0a, 0x16, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, - 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x61, 0x73, - 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x46, 0x65, 0x65, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, - 0x12, 0x35, 0x0a, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x62, - 0x6f, 0x6e, 0x64, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x6f, 0x6e, 0x64, - 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x12, 0x45, 0x0a, 0x1f, 0x68, 0x79, 0x73, 0x74, 0x65, - 0x72, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x66, 0x65, 0x65, - 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x1c, 0x68, 0x79, 0x73, 0x74, 0x65, 0x72, 0x65, 0x73, 0x69, 0x73, 0x50, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x46, 0x65, 0x65, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2d, - 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x30, 0x0a, - 0x14, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x5f, 0x62, 0x75, 0x79, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6e, 0x6f, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0x75, 0x79, 0x73, 0x12, - 0x32, 0x0a, 0x15, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, - 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x65, - 0x6c, 0x6c, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x26, 0x0a, - 0x0f, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x6d, 0x61, 0x78, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, - 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, - 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x51, - 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 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, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x6e, 0x65, - 0x72, 0x22, 0x3a, 0x0a, 0x10, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xfa, 0x03, - 0x0a, 0x0d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, - 0x2c, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x61, 0x6e, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x2a, 0x0a, - 0x11, 0x63, 0x61, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x61, 0x6e, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, - 0x32, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x6c, - 0x6f, 0x61, 0x64, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x67, 0x65, 0x6e, - 0x65, 0x73, 0x69, 0x73, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x1b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x18, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x61, 0x6e, 0x5f, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x53, 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x3f, 0x0a, - 0x1c, 0x63, 0x61, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x70, 0x65, 0x72, - 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x19, 0x63, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x50, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x4a, 0x04, - 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0x7d, 0x0a, 0x0e, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x09, - 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x73, 0x0a, 0x17, 0x4c, 0x69, 0x71, + 0x61, 0x69, 0x6c, 0x73, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x74, 0x0a, 0x0e, 0x4c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x65, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x50, 0x6f, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xa8, 0x03, + 0x0a, 0x0c, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x12, 0x2d, + 0x0a, 0x12, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x61, 0x69, 0x6e, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x21, 0x0a, + 0x0c, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x18, 0x63, 0x6f, 0x6c, 0x6c, 0x61, + 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x6f, 0x6c, 0x6c, 0x61, + 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x21, 0x0a, + 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x12, 0x31, 0x0a, 0x0b, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, + 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xd6, 0x04, 0x0a, 0x0d, 0x50, 0x65, 0x72, + 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x75, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x74, 0x77, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x77, 0x61, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x77, 0x61, 0x70, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x77, 0x61, 0x70, + 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x71, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x06, 0x73, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x22, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1e, + 0x6e, 0x65, 0x78, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6d, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x43, 0x61, 0x6c, 0x63, 0x12, 0x5b, + 0x0a, 0x1d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x43, 0x6f, 0x6d, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x75, + 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x75, 0x6e, 0x64, + 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x12, 0x5e, 0x0a, 0x1e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x1b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x22, 0x53, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x3c, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, + 0x0d, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x42, 0x06, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe3, 0x0d, 0x0a, 0x0a, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x69, 0x64, + 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, + 0x73, 0x74, 0x42, 0x69, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x62, 0x65, + 0x73, 0x74, 0x5f, 0x62, 0x69, 0x64, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0d, 0x62, 0x65, 0x73, 0x74, 0x42, 0x69, 0x64, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x65, 0x72, + 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x65, + 0x73, 0x74, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, + 0x62, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x62, 0x65, 0x73, 0x74, 0x4f, 0x66, 0x66, + 0x65, 0x72, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x15, 0x62, 0x65, 0x73, 0x74, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x62, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x62, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x42, 0x69, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x62, + 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x62, 0x69, 0x64, 0x5f, 0x76, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x62, 0x65, 0x73, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x42, 0x69, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x12, 0x35, 0x0a, 0x17, 0x62, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, + 0x6f, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x62, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4f, 0x66, 0x66, + 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x62, 0x65, 0x73, 0x74, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x62, 0x65, 0x73, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x69, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, + 0x10, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4d, + 0x69, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, + 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, + 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, + 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x6e, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x61, 0x75, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x64, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x76, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x12, 0x48, 0x0a, 0x13, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x64, + 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x11, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x74, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x11, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x10, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x21, 0x0a, + 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x16, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, + 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, + 0x6b, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, + 0x65, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x53, 0x0a, 0x17, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x73, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x42, + 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x15, 0x70, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x12, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x60, 0x0a, 0x1c, 0x6c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x46, 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, + 0x65, 0x52, 0x19, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x46, 0x65, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x35, 0x0a, 0x0c, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x1b, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, + 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x10, 0x6e, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x54, 0x6f, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, + 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, + 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x77, 0x74, 0x68, 0x18, + 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x47, 0x72, 0x6f, + 0x77, 0x74, 0x68, 0x12, 0x39, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0b, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01, 0x12, 0x50, + 0x0a, 0x16, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x4c, 0x41, 0x52, 0x14, 0x6c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x6c, 0x61, + 0x12, 0x32, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x13, 0x6e, 0x65, 0x78, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6c, 0x6f, 0x73, + 0x65, 0x6f, 0x75, 0x74, 0x12, 0x40, 0x0a, 0x0f, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, 0x10, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x6d, 0x61, 0x72, + 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0x72, 0x0a, 0x14, + 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x22, 0x56, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0xdf, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x46, 0x65, + 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x2a, 0x0a, 0x11, + 0x65, 0x71, 0x75, 0x69, 0x74, 0x79, 0x5f, 0x6c, 0x69, 0x6b, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x71, 0x75, 0x69, 0x74, 0x79, 0x4c, + 0x69, 0x6b, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x61, 0x76, 0x65, 0x72, + 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x61, 0x76, 0x65, 0x72, 0x61, + 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, + 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, + 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x76, 0x69, + 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x92, 0x04, 0x0a, 0x14, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x53, 0x4c, 0x41, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x50, 0x0a, 0x26, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x62, + 0x6f, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, + 0x66, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x6e, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x4a, 0x0a, 0x23, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x62, 0x6f, + 0x6f, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x70, + 0x6f, 0x63, 0x68, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x66, 0x54, 0x69, 0x6d, + 0x65, 0x4f, 0x6e, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x33, 0x0a, 0x16, 0x6c, 0x61, 0x73, 0x74, 0x5f, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x46, 0x65, 0x65, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x17, + 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x5f, + 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6c, + 0x61, 0x73, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x6f, 0x6e, 0x64, 0x50, 0x65, 0x6e, 0x61, + 0x6c, 0x74, 0x79, 0x12, 0x45, 0x0a, 0x1f, 0x68, 0x79, 0x73, 0x74, 0x65, 0x72, 0x65, 0x73, 0x69, + 0x73, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x6e, + 0x61, 0x6c, 0x74, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1c, 0x68, 0x79, + 0x73, 0x74, 0x65, 0x72, 0x65, 0x73, 0x69, 0x73, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x46, 0x65, + 0x65, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x6e, 0x6f, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x62, 0x75, 0x79, + 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0x75, 0x79, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6e, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x73, + 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, 0x6f, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x65, 0x6c, 0x6c, 0x73, 0x22, + 0xc8, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, + 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, + 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x74, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, + 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x51, 0x0a, 0x0b, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 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, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x22, 0x3a, 0x0a, + 0x10, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xfa, 0x03, 0x0a, 0x0d, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x63, + 0x61, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x63, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x61, 0x6e, + 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, + 0x25, 0x0a, 0x0e, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x65, + 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x1b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x66, + 0x72, 0x6f, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x46, 0x72, + 0x6f, 0x6d, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x61, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x53, + 0x70, 0x6f, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x3f, 0x0a, 0x1c, 0x63, 0x61, 0x6e, + 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, + 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x19, 0x63, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x50, 0x65, 0x72, 0x70, 0x65, + 0x74, 0x75, 0x61, 0x6c, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, + 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0x7d, 0x0a, 0x0e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x0a, + 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x73, 0x0a, 0x17, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x0f, 0x6c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0e, 0x6c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0xd2, 0x04, 0x0a, 0x12, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x65, 0x6c, 0x6c, 0x73, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x3d, 0x0a, 0x0f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x5f, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0e, - 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0xd2, - 0x04, 0x0a, 0x12, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1b, - 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, - 0x6e, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x65, - 0x6c, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x73, 0x65, 0x6c, 0x6c, 0x73, 0x12, 0x31, 0x0a, 0x04, 0x62, + 0x75, 0x79, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x73, 0x65, 0x6c, 0x6c, 0x73, 0x12, - 0x31, 0x0a, 0x04, 0x62, 0x75, 0x79, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x62, 0x75, - 0x79, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, - 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, - 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, - 0x44, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, - 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x45, 0x44, 0x10, 0x05, 0x12, - 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, - 0x47, 0x10, 0x06, 0x22, 0xd0, 0x03, 0x0a, 0x0e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, - 0x12, 0x5a, 0x0a, 0x1a, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x62, 0x75, 0x79, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, + 0x9d, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, + 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, + 0x45, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, + 0x4e, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x45, 0x44, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x22, + 0x86, 0x01, 0x0a, 0x10, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4c, 0x32, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x24, + 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x45, 0x0a, 0x11, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x4c, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x30, 0x0a, + 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4c, 0x32, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, + 0xd0, 0x03, 0x0a, 0x0e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, + 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x1a, + 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x18, + 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x54, + 0x0a, 0x17, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x12, 0x52, 0x0a, 0x16, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x76, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x18, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x42, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0d, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x54, 0x0a, 0x17, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x52, 0x0a, 0x16, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x5f, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x14, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x56, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x58, 0x0a, 0x19, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x17, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x22, 0x6a, 0x0a, 0x16, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x64, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x64, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x22, 0xac, 0x01, 0x0a, 0x0f, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x22, 0xb0, 0x01, 0x0a, 0x05, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x73, - 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x35, 0x0a, - 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x73, 0x12, 0x2a, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x12, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, - 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x05, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x18, - 0x0a, 0x07, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x07, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x53, 0x0a, 0x09, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x66, 0x66, 0x6c, - 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6f, 0x66, 0x66, 0x6c, 0x69, - 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x9b, 0x02, 0x0a, 0x0c, 0x52, - 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2b, 0x0a, 0x11, - 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x6e, 0x63, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x42, 0x0a, 0x0f, 0x70, 0x72, 0x65, - 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x70, - 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x6f, - 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, - 0x77, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x73, - 0x63, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x6b, - 0x69, 0x6e, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0xab, 0x02, 0x0a, 0x0b, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x61, 0x77, 0x5f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x66, + 0x69, 0x67, 0x52, 0x14, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x58, 0x0a, 0x19, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x73, 0x69, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x17, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x73, 0x69, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x22, 0x6a, 0x0a, 0x16, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xac, + 0x01, 0x0a, 0x0f, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, + 0x0a, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0xb0, 0x01, + 0x0a, 0x05, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x35, 0x0a, 0x0a, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x73, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, + 0x12, 0x2a, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x0b, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x8e, 0x01, 0x0a, 0x12, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, + 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x70, + 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x66, + 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6f, 0x66, 0x66, + 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x73, 0x22, 0x53, 0x0a, 0x09, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x9b, 0x02, 0x0a, 0x0c, 0x52, 0x61, 0x6e, 0x6b, 0x69, + 0x6e, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, + 0x61, 0x6b, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, - 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, - 0x67, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x0f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, - 0x73, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, - 0x12, 0x44, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xb3, 0x05, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x0a, 0x74, 0x6d, 0x5f, 0x70, - 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6d, - 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, - 0x5f, 0x62, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, - 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x61, 0x78, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x2e, 0x0a, 0x0a, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, - 0x67, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x34, 0x0a, 0x0c, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x63, - 0x6f, 0x72, 0x65, 0x52, 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, - 0x12, 0x37, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x63, 0x6f, 0x72, - 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, - 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x0c, 0x72, 0x61, 0x6e, - 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x12, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x22, 0x9c, 0x01, 0x0a, - 0x07, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1a, - 0x0a, 0x08, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x08, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, - 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, - 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6d, 0x6f, 0x74, 0x65, - 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x64, - 0x12, 0x1d, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x88, 0x01, 0x01, 0x42, - 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x22, 0xad, 0x02, 0x0a, 0x08, - 0x4e, 0x6f, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, - 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, - 0x64, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x10, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x52, 0x0f, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x30, 0x0a, - 0x0c, 0x65, 0x72, 0x73, 0x61, 0x74, 0x7a, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, - 0x65, 0x74, 0x52, 0x0b, 0x65, 0x72, 0x73, 0x61, 0x74, 0x7a, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, - 0x32, 0x0a, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, - 0x64, 0x65, 0x53, 0x65, 0x74, 0x52, 0x0c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x6f, - 0x64, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x02, 0x52, 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x70, 0x0a, 0x0a, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, - 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, - 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x22, 0xa9, 0x02, - 0x0a, 0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x13, - 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x61, 0x67, 0x65, 0x4f, 0x66, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, - 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1b, 0x0a, - 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6c, - 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x65, 0x70, 0x6f, 0x63, - 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x55, - 0x6e, 0x74, 0x69, 0x6c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x5d, 0x0a, 0x0d, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x12, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, - 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x79, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0c, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x49, 0x64, 0x12, 0x19, - 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x03, 0x6b, 0x76, 0x62, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4b, 0x65, - 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x03, 0x6b, 0x76, - 0x62, 0x22, 0x6b, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, - 0x6e, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, - 0x61, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb4, - 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x63, 0x61, 0x6c, - 0x61, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x73, 0x63, 0x61, 0x6c, 0x61, - 0x72, 0x56, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x0a, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x76, - 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x76, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x72, - 0x69, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, - 0x00, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x56, 0x61, 0x6c, 0x42, 0x07, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x56, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x36, 0x0a, 0x0b, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x02, 0x0a, 0x0f, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0d, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, - 0x5f, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, - 0x65, 0x67, 0x61, 0x2e, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x52, - 0x0c, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, - 0x18, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x15, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x77, - 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x36, 0x0a, 0x0d, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x54, 0x69, 0x65, 0x72, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, - 0x65, 0x72, 0x73, 0x22, 0x9b, 0x01, 0x0a, 0x11, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0x65, - 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x12, 0x50, 0x0a, 0x25, 0x6d, 0x69, 0x6e, - 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x21, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, - 0x6d, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x54, 0x61, 0x6b, 0x65, 0x72, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x76, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x66, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x76, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x22, 0xf6, 0x01, 0x0a, 0x0b, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, - 0x72, 0x12, 0x50, 0x0a, 0x25, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x75, 0x6e, - 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, - 0x6b, 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x21, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, - 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x56, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x69, 0x6e, - 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x66, 0x61, - 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x12, 0x38, 0x0a, 0x18, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x45, 0x0a, 0x13, 0x56, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, - 0x73, 0x12, 0x2e, 0x0a, 0x05, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x42, - 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x52, 0x05, 0x74, 0x69, 0x65, 0x72, - 0x73, 0x22, 0x79, 0x0a, 0x12, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x65, 0x6e, 0x65, + 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x42, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, + 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4e, + 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, + 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0b, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, + 0x63, 0x6f, 0x72, 0x65, 0x22, 0xab, 0x02, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, + 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x61, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x11, 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, + 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x63, 0x6f, 0x72, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x63, + 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x73, 0x69, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, + 0x65, 0x12, 0x29, 0x0a, 0x10, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x5f, + 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x69, 0x73, 0x65, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x44, 0x0a, 0x10, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0xb3, 0x05, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, + 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, + 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x0a, 0x74, 0x6d, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6d, 0x50, 0x75, 0x62, 0x4b, + 0x65, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x19, 0x0a, + 0x08, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x5f, 0x62, + 0x79, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, + 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x11, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x42, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, + 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x53, 0x74, + 0x61, 0x6b, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x2e, 0x0a, 0x0a, 0x65, 0x70, 0x6f, 0x63, + 0x68, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x34, 0x0a, 0x0c, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, + 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x37, 0x0a, 0x0d, + 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x69, + 0x6e, 0x67, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, + 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x22, 0x9c, 0x01, 0x0a, 0x07, 0x4e, 0x6f, 0x64, + 0x65, 0x53, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x69, 0x6e, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x07, + 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, + 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x22, 0xad, 0x02, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x5f, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x6b, + 0x65, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0d, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, + 0x38, 0x0a, 0x10, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x6e, 0x6f, + 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x52, 0x0f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x0c, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x7a, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x52, 0x0b, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x7a, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x0d, 0x70, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, + 0x74, 0x52, 0x0c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x70, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, + 0x64, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x71, 0x22, 0xa4, 0x03, 0x0a, 0x06, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, + 0x19, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, + 0x65, 0x4f, 0x66, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x6b, 0x65, + 0x64, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x6e, 0x74, 0x69, 0x6c, + 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0e, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, + 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x71, + 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x07, + 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x06, 0x67, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x65, + 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x74, + 0x65, 0x61, 0x6d, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x67, 0x61, 0x6d, + 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, + 0x22, 0x5d, 0x0a, 0x0d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x9b, 0x01, 0x0a, 0x12, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x19, 0x0a, 0x08, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x79, 0x0a, + 0x12, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x56, 0x61, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x26, 0x0a, 0x03, 0x6b, 0x76, 0x62, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x52, 0x03, 0x6b, 0x76, 0x62, 0x22, 0x6b, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, + 0x61, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x63, 0x61, 0x6c, 0x61, + 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, + 0x52, 0x09, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x56, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x0a, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x12, + 0x32, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, + 0x56, 0x61, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a, 0x0b, + 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x36, 0x0a, 0x0b, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, + 0x02, 0x0a, 0x0f, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x61, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0d, + 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x42, 0x65, 0x6e, 0x65, 0x66, + 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x52, 0x0c, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, + 0x69, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x70, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, + 0x0d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x12, 0x36, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, + 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x65, 0x72, 0x52, 0x0c, 0x73, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x65, 0x72, 0x73, 0x22, 0x9b, 0x01, 0x0a, 0x11, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, + 0x12, 0x50, 0x0a, 0x25, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x75, 0x6e, 0x6e, + 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6b, + 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x21, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x4e, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x14, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xf6, 0x01, 0x0a, 0x0b, 0x42, 0x65, 0x6e, + 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x12, 0x50, 0x0a, 0x25, 0x6d, 0x69, 0x6e, 0x69, + 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x21, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x54, + 0x61, 0x6b, 0x65, 0x72, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, + 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x70, 0x6f, 0x63, 0x68, + 0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x38, 0x0a, 0x18, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x72, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x66, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x72, 0x61, 0x6c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x22, 0x45, 0x0a, 0x13, 0x56, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x65, 0x6e, 0x65, + 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x05, 0x74, 0x69, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, + 0x72, 0x52, 0x05, 0x74, 0x69, 0x65, 0x72, 0x73, 0x22, 0x79, 0x0a, 0x12, 0x56, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x12, 0x36, + 0x0a, 0x17, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, + 0x6d, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x15, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, + 0x69, 0x65, 0x72, 0x22, 0x7f, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, + 0x65, 0x72, 0x12, 0x32, 0x0a, 0x15, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x73, 0x74, + 0x61, 0x6b, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x13, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x64, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x1a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, + 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, + 0x6c, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, + 0x6c, 0x69, 0x65, 0x72, 0x22, 0xdd, 0x01, 0x0a, 0x15, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3c, 0x0a, 0x0d, 0x62, 0x65, 0x6e, 0x65, + 0x66, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0x65, 0x6e, + 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x52, 0x0c, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, + 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, + 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x23, 0x0a, 0x0d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x22, 0x53, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, + 0x72, 0x73, 0x12, 0x35, 0x0a, 0x05, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, + 0x65, 0x72, 0x52, 0x05, 0x74, 0x69, 0x65, 0x72, 0x73, 0x22, 0xaf, 0x01, 0x0a, 0x19, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x6d, 0x69, 0x6e, 0x69, 0x6d, - 0x75, 0x6d, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, - 0x6d, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, + 0x75, 0x6d, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, + 0x6d, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x22, 0x7f, 0x0a, 0x0b, - 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x15, 0x6d, - 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6d, 0x69, 0x6e, 0x69, - 0x6d, 0x75, 0x6d, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, - 0x3c, 0x0a, 0x1a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x18, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x22, 0xdd, 0x01, - 0x0a, 0x15, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x3c, 0x0a, 0x0d, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x65, - 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, - 0x72, 0x52, 0x0c, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, 0x12, - 0x37, 0x0a, 0x18, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x15, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x69, 0x6e, 0x64, - 0x6f, 0x77, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0c, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x53, 0x0a, - 0x1a, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x42, - 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x73, 0x12, 0x35, 0x0a, 0x05, 0x74, - 0x69, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, - 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, 0x52, 0x05, 0x74, 0x69, 0x65, - 0x72, 0x73, 0x22, 0xaf, 0x01, 0x0a, 0x19, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6b, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x54, 0x69, 0x65, 0x72, - 0x12, 0x36, 0x0a, 0x17, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x15, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, - 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x11, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, - 0x6c, 0x69, 0x65, 0x72, 0x2a, 0x39, 0x0a, 0x04, 0x53, 0x69, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, - 0x53, 0x49, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x42, 0x55, 0x59, 0x10, 0x01, - 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x53, 0x45, 0x4c, 0x4c, 0x10, 0x02, 0x2a, - 0xb5, 0x01, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x14, - 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, - 0x41, 0x4c, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, - 0x49, 0x31, 0x4d, 0x10, 0x3c, 0x12, 0x11, 0x0a, 0x0c, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, - 0x4c, 0x5f, 0x49, 0x35, 0x4d, 0x10, 0xac, 0x02, 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x4e, 0x54, 0x45, - 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x31, 0x35, 0x4d, 0x10, 0x84, 0x07, 0x12, 0x11, 0x0a, 0x0c, - 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x31, 0x48, 0x10, 0x90, 0x1c, 0x12, - 0x12, 0x0a, 0x0c, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x36, 0x48, 0x10, - 0xe0, 0xa8, 0x01, 0x12, 0x12, 0x0a, 0x0c, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, - 0x49, 0x31, 0x44, 0x10, 0x80, 0xa3, 0x05, 0x2a, 0x94, 0x01, 0x0a, 0x0e, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x4f, - 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x50, - 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, - 0x52, 0x44, 0x45, 0x52, 0x53, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1e, - 0x0a, 0x1a, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x1e, - 0x0a, 0x1a, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x45, 0x53, 0x53, 0x45, 0x44, 0x10, 0x04, 0x2a, 0xb0, - 0x02, 0x0a, 0x0e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x49, - 0x47, 0x47, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, - 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x42, 0x41, 0x54, 0x43, 0x48, 0x10, 0x01, 0x12, 0x1b, 0x0a, - 0x17, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, - 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x50, 0x52, - 0x49, 0x43, 0x45, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, - 0x54, 0x59, 0x10, 0x04, 0x12, 0x2c, 0x0a, 0x28, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, - 0x59, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x4d, 0x45, 0x54, - 0x10, 0x05, 0x12, 0x32, 0x0a, 0x2a, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, - 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x4f, 0x5f, - 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x4c, 0x50, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x53, - 0x10, 0x06, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x29, 0x0a, 0x25, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, - 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x10, - 0x07, 0x2a, 0x8b, 0x01, 0x0a, 0x0f, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, - 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x45, 0x47, 0x47, 0x45, - 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x4d, 0x49, 0x44, 0x10, - 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45, - 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x42, 0x49, 0x44, 0x10, 0x02, - 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, - 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x53, 0x4b, 0x10, 0x03, 0x2a, - 0xc9, 0x10, 0x0a, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1b, - 0x0a, 0x17, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x4f, - 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, - 0x49, 0x44, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x49, 0x44, 0x10, 0x01, 0x12, 0x20, - 0x0a, 0x1c, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x49, 0x44, 0x10, 0x02, - 0x12, 0x1f, 0x0a, 0x1b, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x43, 0x45, 0x10, - 0x03, 0x12, 0x26, 0x0a, 0x22, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x41, 0x49, 0x4e, 0x49, - 0x4e, 0x47, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x52, 0x44, - 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x46, 0x41, - 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x05, 0x12, 0x1f, 0x0a, 0x1b, 0x4f, 0x52, 0x44, 0x45, 0x52, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x41, 0x4c, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x06, 0x12, 0x2b, 0x0a, 0x27, 0x4f, 0x52, 0x44, 0x45, - 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, - 0x45, 0x58, 0x50, 0x49, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x45, 0x54, - 0x49, 0x4d, 0x45, 0x10, 0x07, 0x12, 0x27, 0x0a, 0x23, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4f, 0x52, 0x44, - 0x45, 0x52, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x08, 0x12, 0x20, - 0x0a, 0x1c, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x45, 0x44, - 0x49, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x10, 0x09, - 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x41, 0x4d, 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x0a, 0x12, - 0x19, 0x0a, 0x15, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, - 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x0b, 0x12, 0x20, 0x0a, 0x1c, 0x4f, 0x52, - 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, - 0x44, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x59, 0x5f, 0x49, 0x44, 0x10, 0x0c, 0x12, 0x1d, 0x0a, 0x19, - 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x41, 0x52, 0x4b, - 0x45, 0x54, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x0d, 0x12, 0x23, 0x0a, 0x1f, 0x4f, - 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, - 0x4e, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x0e, - 0x12, 0x27, 0x0a, 0x23, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x5f, - 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x0f, 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x52, 0x44, - 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, - 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x10, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x52, 0x44, + 0x72, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x12, + 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x2a, 0x39, 0x0a, 0x04, 0x53, + 0x69, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x49, 0x44, + 0x45, 0x5f, 0x42, 0x55, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x49, 0x44, 0x45, 0x5f, + 0x53, 0x45, 0x4c, 0x4c, 0x10, 0x02, 0x2a, 0x99, 0x02, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x14, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, + 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, + 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x31, 0x4d, 0x10, 0x3c, 0x12, 0x11, 0x0a, 0x0c, + 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x35, 0x4d, 0x10, 0xac, 0x02, 0x12, + 0x12, 0x0a, 0x0d, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x31, 0x35, 0x4d, + 0x10, 0x84, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, + 0x49, 0x33, 0x30, 0x4d, 0x10, 0x88, 0x0e, 0x12, 0x11, 0x0a, 0x0c, 0x49, 0x4e, 0x54, 0x45, 0x52, + 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x31, 0x48, 0x10, 0x90, 0x1c, 0x12, 0x11, 0x0a, 0x0c, 0x49, 0x4e, + 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x34, 0x48, 0x10, 0xc0, 0x70, 0x12, 0x12, 0x0a, + 0x0c, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x36, 0x48, 0x10, 0xe0, 0xa8, + 0x01, 0x12, 0x12, 0x0a, 0x0c, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x38, + 0x48, 0x10, 0x80, 0xe1, 0x01, 0x12, 0x13, 0x0a, 0x0d, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, + 0x4c, 0x5f, 0x49, 0x31, 0x32, 0x48, 0x10, 0xc0, 0xd1, 0x02, 0x12, 0x12, 0x0a, 0x0c, 0x49, 0x4e, + 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x31, 0x44, 0x10, 0x80, 0xa3, 0x05, 0x12, 0x12, + 0x0a, 0x0c, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x37, 0x44, 0x10, 0x80, + 0xf5, 0x24, 0x2a, 0x94, 0x01, 0x0a, 0x0e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x53, + 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x50, 0x4f, 0x53, + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4c, 0x4f, + 0x53, 0x45, 0x44, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x50, 0x4f, 0x53, + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x49, 0x53, + 0x54, 0x52, 0x45, 0x53, 0x53, 0x45, 0x44, 0x10, 0x04, 0x2a, 0xb0, 0x02, 0x0a, 0x0e, 0x41, 0x75, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x1b, + 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, + 0x15, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, + 0x5f, 0x42, 0x41, 0x54, 0x43, 0x48, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x55, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x4f, 0x50, 0x45, 0x4e, + 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x49, 0x43, 0x45, 0x10, 0x03, + 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x49, 0x47, + 0x47, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x10, 0x04, 0x12, + 0x2c, 0x0a, 0x28, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, + 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x4d, 0x45, 0x54, 0x10, 0x05, 0x12, 0x32, 0x0a, + 0x2a, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, + 0x5f, 0x55, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, + 0x59, 0x5f, 0x4c, 0x50, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x53, 0x10, 0x06, 0x1a, 0x02, 0x08, + 0x01, 0x12, 0x29, 0x0a, 0x25, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x49, + 0x47, 0x47, 0x45, 0x52, 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x5f, + 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x07, 0x2a, 0x8b, 0x01, 0x0a, + 0x0f, 0x50, 0x65, 0x67, 0x67, 0x65, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, + 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, + 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x4d, 0x49, 0x44, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, + 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, + 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x42, 0x49, 0x44, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x50, + 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, + 0x42, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x53, 0x4b, 0x10, 0x03, 0x2a, 0xba, 0x11, 0x0a, 0x0a, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x52, 0x44, + 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4d, 0x41, + 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x49, 0x44, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, - 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x11, 0x12, 0x23, 0x0a, 0x1f, 0x4f, 0x52, 0x44, 0x45, 0x52, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x50, - 0x45, 0x52, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x12, 0x12, 0x1c, 0x0a, 0x18, + 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x49, 0x44, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x4f, + 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, + 0x46, 0x5f, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x12, 0x26, 0x0a, 0x22, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, - 0x4c, 0x49, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x13, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x52, - 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x45, 0x4c, 0x46, 0x5f, 0x54, - 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x14, 0x12, 0x2e, 0x0a, 0x2a, 0x4f, 0x52, 0x44, 0x45, - 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, - 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x54, 0x4f, 0x5f, 0x50, 0x41, - 0x59, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x15, 0x12, 0x25, 0x0a, 0x21, 0x4f, 0x52, 0x44, 0x45, - 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, - 0x54, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x16, 0x12, - 0x25, 0x0a, 0x21, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, - 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x46, - 0x4f, 0x52, 0x43, 0x45, 0x10, 0x17, 0x12, 0x37, 0x0a, 0x33, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x4e, - 0x44, 0x5f, 0x47, 0x46, 0x4e, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, 0x55, 0x52, 0x49, - 0x4e, 0x47, 0x5f, 0x41, 0x4e, 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x18, 0x12, - 0x3f, 0x0a, 0x3b, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, - 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x47, 0x46, 0x41, 0x5f, 0x4f, - 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, 0x55, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x4f, 0x4e, 0x54, - 0x49, 0x4e, 0x55, 0x4f, 0x55, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x19, - 0x12, 0x34, 0x0a, 0x30, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4d, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x4f, 0x5f, - 0x47, 0x54, 0x54, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x4f, 0x55, 0x54, 0x5f, 0x45, 0x58, 0x50, 0x49, - 0x52, 0x59, 0x41, 0x54, 0x10, 0x1a, 0x12, 0x29, 0x0a, 0x25, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x41, 0x54, 0x5f, 0x42, - 0x45, 0x46, 0x4f, 0x52, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x41, 0x54, 0x10, - 0x1b, 0x12, 0x2c, 0x0a, 0x28, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x48, 0x41, 0x56, 0x45, 0x5f, 0x47, 0x54, 0x43, - 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x41, 0x54, 0x10, 0x1c, 0x12, - 0x2a, 0x0a, 0x26, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, - 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4d, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x4f, 0x5f, 0x46, - 0x4f, 0x4b, 0x5f, 0x4f, 0x52, 0x5f, 0x49, 0x4f, 0x43, 0x10, 0x1d, 0x12, 0x2a, 0x0a, 0x26, 0x4f, - 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, - 0x54, 0x5f, 0x41, 0x4d, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x4f, 0x5f, 0x47, 0x46, 0x41, 0x5f, 0x4f, - 0x52, 0x5f, 0x47, 0x46, 0x4e, 0x10, 0x1e, 0x12, 0x2c, 0x0a, 0x28, 0x4f, 0x52, 0x44, 0x45, 0x52, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4d, - 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x47, 0x46, 0x41, 0x5f, 0x4f, 0x52, 0x5f, - 0x47, 0x46, 0x4e, 0x10, 0x1f, 0x12, 0x34, 0x0a, 0x30, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x44, - 0x5f, 0x49, 0x4f, 0x43, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, 0x55, 0x52, 0x49, 0x4e, - 0x47, 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x20, 0x12, 0x34, 0x0a, 0x30, 0x4f, + 0x4c, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x41, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x49, + 0x5a, 0x45, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x10, 0x05, 0x12, 0x1f, 0x0a, 0x1b, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x41, 0x4c, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, + 0x45, 0x10, 0x06, 0x12, 0x2b, 0x0a, 0x27, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x07, + 0x12, 0x27, 0x0a, 0x23, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x52, 0x45, + 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x08, 0x12, 0x20, 0x0a, 0x1c, 0x4f, 0x52, 0x44, + 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x45, 0x44, 0x49, 0x54, 0x5f, 0x4e, 0x4f, + 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x10, 0x09, 0x12, 0x1d, 0x0a, 0x19, 0x4f, + 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x41, 0x4d, 0x45, 0x4e, 0x44, + 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x0a, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x52, + 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, + 0x55, 0x4e, 0x44, 0x10, 0x0b, 0x12, 0x20, 0x0a, 0x1c, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x50, 0x41, 0x52, + 0x54, 0x59, 0x5f, 0x49, 0x44, 0x10, 0x0c, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x52, 0x44, 0x45, 0x52, + 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x4c, + 0x4f, 0x53, 0x45, 0x44, 0x10, 0x0d, 0x12, 0x23, 0x0a, 0x1f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x5f, 0x43, 0x48, 0x45, + 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x0e, 0x12, 0x27, 0x0a, 0x23, 0x4f, + 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, + 0x4e, 0x47, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, + 0x4e, 0x54, 0x10, 0x0f, 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x10, 0x10, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x49, 0x5a, 0x45, + 0x10, 0x11, 0x12, 0x23, 0x0a, 0x1f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x49, 0x53, + 0x54, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x12, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x52, 0x44, 0x45, 0x52, + 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x10, 0x13, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x45, 0x4c, 0x46, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, + 0x47, 0x10, 0x14, 0x12, 0x2e, 0x0a, 0x2a, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, + 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x54, 0x4f, 0x5f, 0x50, 0x41, 0x59, 0x5f, 0x46, 0x45, 0x45, + 0x53, 0x10, 0x15, 0x12, 0x25, 0x0a, 0x21, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x52, + 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x16, 0x12, 0x25, 0x0a, 0x21, 0x4f, 0x52, + 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, + 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x10, + 0x17, 0x12, 0x37, 0x0a, 0x33, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x47, 0x46, 0x4e, + 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, 0x55, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x4e, + 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x18, 0x12, 0x3f, 0x0a, 0x3b, 0x4f, 0x52, + 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, + 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x47, 0x46, 0x41, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, + 0x44, 0x55, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x55, 0x4f, 0x55, + 0x53, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x19, 0x12, 0x34, 0x0a, 0x30, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, - 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x4f, 0x4b, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, - 0x5f, 0x44, 0x55, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, - 0x21, 0x12, 0x23, 0x0a, 0x1f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x4d, 0x55, 0x53, 0x54, 0x5f, 0x42, 0x45, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x4f, - 0x52, 0x44, 0x45, 0x52, 0x10, 0x22, 0x12, 0x22, 0x0a, 0x1e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x55, 0x53, 0x54, 0x5f, 0x42, 0x45, 0x5f, 0x47, 0x54, - 0x54, 0x5f, 0x4f, 0x52, 0x5f, 0x47, 0x54, 0x43, 0x10, 0x23, 0x12, 0x27, 0x0a, 0x23, 0x4f, 0x52, - 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x4f, 0x55, - 0x54, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x43, - 0x45, 0x10, 0x24, 0x12, 0x33, 0x0a, 0x2f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, - 0x4f, 0x52, 0x5f, 0x42, 0x55, 0x59, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, - 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x53, 0x4b, - 0x5f, 0x50, 0x52, 0x49, 0x43, 0x45, 0x10, 0x25, 0x12, 0x37, 0x0a, 0x33, 0x4f, 0x52, 0x44, 0x45, - 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x46, 0x46, 0x53, 0x45, 0x54, 0x5f, 0x4d, - 0x55, 0x53, 0x54, 0x5f, 0x42, 0x45, 0x5f, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x4f, - 0x52, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x5f, 0x54, 0x4f, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, - 0x28, 0x12, 0x34, 0x0a, 0x30, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x53, 0x45, 0x4c, 0x4c, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x46, - 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x42, 0x49, 0x44, 0x5f, - 0x50, 0x52, 0x49, 0x43, 0x45, 0x10, 0x29, 0x12, 0x30, 0x0a, 0x2c, 0x4f, 0x52, 0x44, 0x45, 0x52, - 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x46, 0x46, 0x53, 0x45, 0x54, 0x5f, 0x4d, 0x55, - 0x53, 0x54, 0x5f, 0x42, 0x45, 0x5f, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, - 0x41, 0x4e, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x2a, 0x12, 0x2a, 0x0a, 0x26, 0x4f, 0x52, 0x44, - 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, - 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x42, 0x41, 0x4c, 0x41, - 0x4e, 0x43, 0x45, 0x10, 0x2b, 0x12, 0x45, 0x0a, 0x41, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4d, 0x45, 0x4e, - 0x44, 0x5f, 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, - 0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x5f, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x50, 0x45, - 0x47, 0x47, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, 0x2c, 0x12, 0x2e, 0x0a, 0x2a, - 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x41, 0x42, - 0x4c, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, 0x50, 0x45, - 0x47, 0x47, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, 0x2d, 0x12, 0x35, 0x0a, 0x31, - 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x41, 0x42, - 0x4c, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x41, 0x4d, 0x45, 0x4e, 0x44, 0x5f, 0x50, 0x52, 0x49, 0x43, - 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x44, 0x45, - 0x52, 0x10, 0x2e, 0x12, 0x38, 0x0a, 0x34, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, - 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, - 0x54, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x50, - 0x52, 0x49, 0x43, 0x45, 0x5f, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x2f, 0x12, 0x26, 0x0a, - 0x22, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x54, 0x4f, 0x4f, - 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x44, - 0x45, 0x52, 0x53, 0x10, 0x30, 0x12, 0x2b, 0x0a, 0x27, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x4f, - 0x52, 0x44, 0x45, 0x52, 0x5f, 0x57, 0x4f, 0x55, 0x4c, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x45, - 0x10, 0x31, 0x12, 0x3b, 0x0a, 0x37, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x5f, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x4f, 0x52, - 0x44, 0x45, 0x52, 0x5f, 0x57, 0x4f, 0x55, 0x4c, 0x44, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, - 0x44, 0x55, 0x43, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x32, 0x22, - 0x04, 0x08, 0x26, 0x10, 0x26, 0x22, 0x04, 0x08, 0x27, 0x10, 0x27, 0x2a, 0x82, 0x01, 0x0a, 0x0b, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x18, 0x43, - 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x43, 0x48, 0x41, - 0x49, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x4e, - 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x48, 0x41, 0x49, - 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x59, 0x49, - 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, - 0x2a, 0xf3, 0x07, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, - 0x0a, 0x16, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, - 0x4e, 0x53, 0x55, 0x52, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x43, - 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, - 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x43, 0x43, 0x4f, 0x55, - 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x10, 0x03, - 0x12, 0x18, 0x0a, 0x14, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x10, 0x04, 0x12, 0x24, 0x0a, 0x20, 0x41, 0x43, - 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, - 0x49, 0x4e, 0x46, 0x52, 0x41, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x55, 0x52, 0x45, 0x10, 0x05, - 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x10, - 0x06, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, 0x4d, 0x41, 0x4b, 0x45, 0x52, 0x10, 0x07, 0x12, 0x15, - 0x0a, 0x11, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, - 0x4f, 0x4e, 0x44, 0x10, 0x09, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x0a, - 0x12, 0x21, 0x0a, 0x1d, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x47, 0x4c, 0x4f, 0x42, 0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x52, 0x41, 0x4e, 0x43, - 0x45, 0x10, 0x0b, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x47, 0x4c, 0x4f, 0x42, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, - 0x44, 0x10, 0x0c, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x52, 0x41, 0x4e, - 0x53, 0x46, 0x45, 0x52, 0x53, 0x10, 0x0d, 0x12, 0x27, 0x0a, 0x23, 0x41, 0x43, 0x43, 0x4f, 0x55, - 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4d, - 0x41, 0x4b, 0x45, 0x52, 0x5f, 0x50, 0x41, 0x49, 0x44, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x0e, - 0x12, 0x2b, 0x0a, 0x27, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4d, 0x41, 0x4b, 0x45, 0x52, 0x5f, 0x52, 0x45, - 0x43, 0x45, 0x49, 0x56, 0x45, 0x44, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x0f, 0x12, 0x28, 0x0a, - 0x24, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, - 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4c, 0x50, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x56, 0x45, 0x44, - 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x10, 0x12, 0x28, 0x0a, 0x24, 0x41, 0x43, 0x43, 0x4f, 0x55, - 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4d, - 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x45, 0x52, 0x53, 0x10, - 0x11, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x48, 0x4f, 0x4c, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x12, 0x12, 0x22, 0x0a, 0x1e, 0x41, - 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x50, 0x5f, 0x4c, - 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x13, 0x12, - 0x32, 0x0a, 0x2e, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, 0x42, - 0x4f, 0x4e, 0x55, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, - 0x4e, 0x10, 0x14, 0x12, 0x21, 0x0a, 0x1d, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, 0x52, 0x45, 0x41, - 0x53, 0x55, 0x52, 0x59, 0x10, 0x15, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x45, 0x53, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x52, - 0x45, 0x57, 0x41, 0x52, 0x44, 0x53, 0x10, 0x16, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x43, 0x43, 0x4f, - 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, - 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x53, 0x10, 0x17, 0x12, 0x28, 0x0a, 0x24, 0x41, 0x43, 0x43, - 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, - 0x5f, 0x41, 0x56, 0x45, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, - 0x4e, 0x10, 0x18, 0x12, 0x27, 0x0a, 0x23, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, - 0x49, 0x56, 0x45, 0x5f, 0x52, 0x45, 0x54, 0x55, 0x52, 0x4e, 0x10, 0x19, 0x12, 0x29, 0x0a, 0x25, + 0x54, 0x5f, 0x41, 0x4d, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x4f, 0x5f, 0x47, 0x54, 0x54, 0x5f, 0x57, + 0x49, 0x54, 0x48, 0x4f, 0x55, 0x54, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x41, 0x54, 0x10, + 0x1a, 0x12, 0x29, 0x0a, 0x25, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x41, 0x54, 0x5f, 0x42, 0x45, 0x46, 0x4f, 0x52, 0x45, + 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x41, 0x54, 0x10, 0x1b, 0x12, 0x2c, 0x0a, 0x28, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x4e, + 0x4f, 0x54, 0x5f, 0x48, 0x41, 0x56, 0x45, 0x5f, 0x47, 0x54, 0x43, 0x5f, 0x41, 0x4e, 0x44, 0x5f, + 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x41, 0x54, 0x10, 0x1c, 0x12, 0x2a, 0x0a, 0x26, 0x4f, 0x52, + 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, + 0x5f, 0x41, 0x4d, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x4f, 0x5f, 0x46, 0x4f, 0x4b, 0x5f, 0x4f, 0x52, + 0x5f, 0x49, 0x4f, 0x43, 0x10, 0x1d, 0x12, 0x2a, 0x0a, 0x26, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4d, 0x45, + 0x4e, 0x44, 0x5f, 0x54, 0x4f, 0x5f, 0x47, 0x46, 0x41, 0x5f, 0x4f, 0x52, 0x5f, 0x47, 0x46, 0x4e, + 0x10, 0x1e, 0x12, 0x2c, 0x0a, 0x28, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4d, 0x45, 0x4e, 0x44, 0x5f, 0x46, + 0x52, 0x4f, 0x4d, 0x5f, 0x47, 0x46, 0x41, 0x5f, 0x4f, 0x52, 0x5f, 0x47, 0x46, 0x4e, 0x10, 0x1f, + 0x12, 0x34, 0x0a, 0x30, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x49, 0x4f, 0x43, 0x5f, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, 0x55, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x20, 0x12, 0x34, 0x0a, 0x30, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x4e, + 0x44, 0x5f, 0x46, 0x4f, 0x4b, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, 0x55, 0x52, 0x49, + 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x21, 0x12, 0x23, 0x0a, 0x1f, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x55, 0x53, 0x54, + 0x5f, 0x42, 0x45, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, + 0x22, 0x12, 0x22, 0x0a, 0x1e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x4d, 0x55, 0x53, 0x54, 0x5f, 0x42, 0x45, 0x5f, 0x47, 0x54, 0x54, 0x5f, 0x4f, 0x52, 0x5f, + 0x47, 0x54, 0x43, 0x10, 0x23, 0x12, 0x27, 0x0a, 0x23, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x4f, 0x55, 0x54, 0x5f, 0x52, 0x45, 0x46, + 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x43, 0x45, 0x10, 0x24, 0x12, 0x33, + 0x0a, 0x2f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x42, 0x55, + 0x59, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, + 0x43, 0x45, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x53, 0x4b, 0x5f, 0x50, 0x52, 0x49, 0x43, + 0x45, 0x10, 0x25, 0x12, 0x37, 0x0a, 0x33, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x4f, 0x46, 0x46, 0x53, 0x45, 0x54, 0x5f, 0x4d, 0x55, 0x53, 0x54, 0x5f, 0x42, + 0x45, 0x5f, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x4f, 0x52, 0x5f, 0x45, 0x51, 0x55, + 0x41, 0x4c, 0x5f, 0x54, 0x4f, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x28, 0x12, 0x34, 0x0a, 0x30, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x45, 0x4c, 0x4c, + 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, + 0x45, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x42, 0x49, 0x44, 0x5f, 0x50, 0x52, 0x49, 0x43, 0x45, + 0x10, 0x29, 0x12, 0x30, 0x0a, 0x2c, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x5f, 0x4f, 0x46, 0x46, 0x53, 0x45, 0x54, 0x5f, 0x4d, 0x55, 0x53, 0x54, 0x5f, 0x42, 0x45, + 0x5f, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x5a, 0x45, + 0x52, 0x4f, 0x10, 0x2a, 0x12, 0x2a, 0x0a, 0x26, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, + 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x2b, + 0x12, 0x45, 0x0a, 0x41, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4d, 0x45, 0x4e, 0x44, 0x5f, 0x50, 0x45, 0x47, + 0x47, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, + 0x53, 0x5f, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, 0x2c, 0x12, 0x2e, 0x0a, 0x2a, 0x4f, 0x52, 0x44, 0x45, 0x52, + 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x4f, + 0x5f, 0x52, 0x45, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, 0x2d, 0x12, 0x35, 0x0a, 0x31, 0x4f, 0x52, 0x44, 0x45, 0x52, + 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x4f, + 0x5f, 0x41, 0x4d, 0x45, 0x4e, 0x44, 0x5f, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, + 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x10, 0x2e, 0x12, 0x38, + 0x0a, 0x34, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, + 0x4e, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x4f, 0x52, 0x44, + 0x45, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, + 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x2f, 0x12, 0x26, 0x0a, 0x22, 0x4f, 0x52, 0x44, 0x45, + 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, + 0x5f, 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x53, 0x10, 0x30, + 0x12, 0x2b, 0x0a, 0x27, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, + 0x57, 0x4f, 0x55, 0x4c, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x45, 0x10, 0x31, 0x12, 0x3b, 0x0a, + 0x37, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x44, + 0x55, 0x43, 0x45, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x57, + 0x4f, 0x55, 0x4c, 0x44, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x44, 0x55, 0x43, 0x45, 0x5f, + 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x32, 0x12, 0x2c, 0x0a, 0x28, 0x4f, 0x52, + 0x44, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x53, 0x4f, 0x4c, 0x41, 0x54, + 0x45, 0x44, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, + 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x33, 0x12, 0x41, 0x0a, 0x3d, 0x4f, 0x52, 0x44, 0x45, + 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x50, 0x45, 0x47, 0x47, 0x45, 0x44, 0x5f, 0x4f, + 0x52, 0x44, 0x45, 0x52, 0x53, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, + 0x44, 0x5f, 0x49, 0x4e, 0x5f, 0x49, 0x53, 0x4f, 0x4c, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x4d, 0x41, + 0x52, 0x47, 0x49, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x10, 0x34, 0x22, 0x04, 0x08, 0x26, 0x10, + 0x26, 0x22, 0x04, 0x08, 0x27, 0x10, 0x27, 0x2a, 0x82, 0x01, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x48, 0x41, 0x49, 0x4e, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, + 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x59, 0x49, 0x4e, 0x47, 0x10, 0x02, + 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x2a, 0x92, 0x08, 0x0a, + 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, + 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, + 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x52, + 0x41, 0x4e, 0x43, 0x45, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, 0x4d, 0x45, 0x4e, + 0x54, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, + 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x4e, + 0x45, 0x52, 0x41, 0x4c, 0x10, 0x04, 0x12, 0x24, 0x0a, 0x20, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, 0x49, 0x4e, 0x46, 0x52, + 0x41, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x55, 0x52, 0x45, 0x10, 0x05, 0x12, 0x1f, 0x0a, 0x1b, + 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x45, 0x45, + 0x53, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x10, 0x06, 0x12, 0x1b, 0x0a, + 0x17, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x45, + 0x45, 0x53, 0x5f, 0x4d, 0x41, 0x4b, 0x45, 0x52, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x43, + 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4e, 0x44, 0x10, + 0x09, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x0a, 0x12, 0x21, 0x0a, 0x1d, + 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x4c, 0x4f, + 0x42, 0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x52, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x0b, 0x12, + 0x1e, 0x0a, 0x1a, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x47, 0x4c, 0x4f, 0x42, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x10, 0x0c, 0x12, + 0x22, 0x0a, 0x1e, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, + 0x53, 0x10, 0x0d, 0x12, 0x27, 0x0a, 0x23, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4d, 0x41, 0x4b, 0x45, 0x52, + 0x5f, 0x50, 0x41, 0x49, 0x44, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x0e, 0x12, 0x2b, 0x0a, 0x27, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, - 0x41, 0x52, 0x44, 0x5f, 0x52, 0x45, 0x54, 0x55, 0x52, 0x4e, 0x5f, 0x56, 0x4f, 0x4c, 0x41, 0x54, - 0x49, 0x4c, 0x49, 0x54, 0x59, 0x10, 0x1a, 0x12, 0x29, 0x0a, 0x25, 0x41, 0x43, 0x43, 0x4f, 0x55, - 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x56, - 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x49, 0x4e, 0x47, - 0x10, 0x1b, 0x12, 0x2c, 0x0a, 0x28, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x52, - 0x45, 0x46, 0x45, 0x52, 0x52, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x10, 0x1c, - 0x22, 0x04, 0x08, 0x08, 0x10, 0x08, 0x2a, 0xbc, 0x0b, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, - 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x10, 0x01, 0x12, 0x15, - 0x0a, 0x11, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x57, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, - 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x54, 0x4d, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x10, - 0x04, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4d, 0x54, 0x4d, 0x5f, 0x57, 0x49, 0x4e, 0x10, 0x05, 0x12, 0x1c, 0x0a, 0x18, - 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, - 0x52, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x4f, 0x57, 0x10, 0x06, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x52, - 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x47, - 0x49, 0x4e, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x07, 0x12, 0x24, 0x0a, 0x20, 0x54, 0x52, 0x41, - 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, - 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x53, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x08, 0x12, - 0x1f, 0x0a, 0x1b, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4d, 0x41, 0x4b, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x50, 0x41, 0x59, 0x10, 0x09, - 0x12, 0x23, 0x0a, 0x1f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4d, 0x41, 0x4b, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x45, - 0x49, 0x56, 0x45, 0x10, 0x0a, 0x12, 0x28, 0x0a, 0x24, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, - 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x46, 0x52, 0x41, 0x53, 0x54, 0x52, 0x55, - 0x43, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x50, 0x41, 0x59, 0x10, 0x0b, 0x12, - 0x2f, 0x0a, 0x2b, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x49, 0x4e, 0x46, 0x52, 0x41, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x55, 0x52, 0x45, 0x5f, - 0x46, 0x45, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x10, 0x0c, - 0x12, 0x23, 0x0a, 0x1f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, 0x5f, - 0x50, 0x41, 0x59, 0x10, 0x0d, 0x12, 0x2a, 0x0a, 0x26, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, - 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, - 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x10, - 0x0e, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x4f, 0x57, 0x10, 0x0f, 0x12, 0x1b, 0x0a, - 0x17, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, - 0x4f, 0x4e, 0x44, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x10, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x52, - 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x49, 0x54, 0x48, - 0x44, 0x52, 0x41, 0x57, 0x10, 0x12, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, - 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x10, - 0x13, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x53, 0x4c, 0x41, 0x53, 0x48, 0x49, 0x4e, 0x47, - 0x10, 0x14, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4f, 0x55, - 0x54, 0x10, 0x15, 0x12, 0x25, 0x0a, 0x21, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x46, 0x55, - 0x4e, 0x44, 0x53, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x10, 0x16, 0x12, 0x2b, 0x0a, 0x27, 0x54, 0x52, - 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, - 0x53, 0x46, 0x45, 0x52, 0x5f, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, - 0x49, 0x42, 0x55, 0x54, 0x45, 0x10, 0x17, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4c, 0x45, 0x41, 0x52, 0x5f, 0x41, - 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x18, 0x12, 0x2c, 0x0a, 0x28, 0x54, 0x52, 0x41, 0x4e, - 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x50, - 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x52, 0x45, 0x53, - 0x54, 0x4f, 0x52, 0x45, 0x10, 0x19, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, - 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x50, 0x4f, 0x54, 0x10, 0x1a, 0x12, 0x1e, - 0x0a, 0x1a, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x48, 0x4f, 0x4c, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x1b, 0x12, 0x21, - 0x0a, 0x1d, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x48, 0x4f, 0x4c, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x10, - 0x1c, 0x12, 0x2e, 0x0a, 0x2a, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x53, - 0x55, 0x52, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, - 0x1d, 0x12, 0x28, 0x0a, 0x24, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, - 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x45, 0x10, 0x1e, 0x12, 0x2e, 0x0a, 0x2a, 0x54, - 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x49, 0x51, - 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x4e, 0x45, 0x54, 0x5f, 0x44, - 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x10, 0x1f, 0x12, 0x28, 0x0a, 0x24, 0x54, - 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4c, 0x41, - 0x5f, 0x50, 0x45, 0x4e, 0x41, 0x4c, 0x54, 0x59, 0x5f, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x41, 0x50, - 0x50, 0x4c, 0x59, 0x10, 0x20, 0x12, 0x2a, 0x0a, 0x26, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, - 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4c, 0x41, 0x5f, 0x50, 0x45, 0x4e, 0x41, 0x4c, - 0x54, 0x59, 0x5f, 0x4c, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x41, 0x50, 0x50, 0x4c, 0x59, 0x10, - 0x21, 0x12, 0x2e, 0x0a, 0x2a, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, - 0x5f, 0x55, 0x4e, 0x50, 0x41, 0x49, 0x44, 0x5f, 0x43, 0x4f, 0x4c, 0x4c, 0x45, 0x43, 0x54, 0x10, - 0x22, 0x12, 0x32, 0x0a, 0x2e, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x53, 0x4c, 0x41, 0x5f, 0x50, 0x45, 0x52, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x4e, - 0x43, 0x45, 0x5f, 0x42, 0x4f, 0x4e, 0x55, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, - 0x55, 0x54, 0x45, 0x10, 0x23, 0x12, 0x29, 0x0a, 0x25, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, - 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x50, 0x45, 0x54, 0x55, 0x41, 0x4c, - 0x53, 0x5f, 0x46, 0x55, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x10, 0x24, + 0x41, 0x52, 0x44, 0x5f, 0x4d, 0x41, 0x4b, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x56, + 0x45, 0x44, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x0f, 0x12, 0x28, 0x0a, 0x24, 0x41, 0x43, 0x43, + 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, + 0x5f, 0x4c, 0x50, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x56, 0x45, 0x44, 0x5f, 0x46, 0x45, 0x45, + 0x53, 0x10, 0x10, 0x12, 0x28, 0x0a, 0x24, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, + 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x45, 0x52, 0x53, 0x10, 0x11, 0x12, 0x18, 0x0a, + 0x14, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x4f, + 0x4c, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x12, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x43, 0x43, 0x4f, 0x55, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x50, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, + 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x13, 0x12, 0x32, 0x0a, 0x2e, 0x41, + 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x49, 0x51, 0x55, + 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, 0x42, 0x4f, 0x4e, 0x55, 0x53, + 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x14, 0x12, + 0x21, 0x0a, 0x1d, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, 0x52, 0x45, 0x41, 0x53, 0x55, 0x52, 0x59, + 0x10, 0x15, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x56, 0x45, 0x53, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, + 0x44, 0x53, 0x10, 0x16, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x57, 0x41, + 0x52, 0x44, 0x53, 0x10, 0x17, 0x12, 0x28, 0x0a, 0x24, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x41, 0x56, 0x45, + 0x52, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x18, 0x12, + 0x27, 0x0a, 0x23, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x56, 0x45, 0x5f, + 0x52, 0x45, 0x54, 0x55, 0x52, 0x4e, 0x10, 0x19, 0x12, 0x29, 0x0a, 0x25, 0x41, 0x43, 0x43, 0x4f, + 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, + 0x52, 0x45, 0x54, 0x55, 0x52, 0x4e, 0x5f, 0x56, 0x4f, 0x4c, 0x41, 0x54, 0x49, 0x4c, 0x49, 0x54, + 0x59, 0x10, 0x1a, 0x12, 0x29, 0x0a, 0x25, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, + 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x1b, 0x12, 0x2c, + 0x0a, 0x28, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, + 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, + 0x52, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x10, 0x1c, 0x12, 0x1d, 0x0a, 0x19, + 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x44, + 0x45, 0x52, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x10, 0x1d, 0x22, 0x04, 0x08, 0x08, 0x10, + 0x08, 0x2a, 0xd4, 0x0c, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x49, 0x4e, 0x10, 0x02, + 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x4d, 0x54, 0x4d, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x54, + 0x4d, 0x5f, 0x57, 0x49, 0x4e, 0x10, 0x05, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x52, 0x41, 0x4e, 0x53, + 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x5f, + 0x4c, 0x4f, 0x57, 0x10, 0x06, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, + 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x5f, 0x48, 0x49, + 0x47, 0x48, 0x10, 0x07, 0x12, 0x24, 0x0a, 0x20, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, + 0x46, 0x49, 0x53, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x08, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x52, + 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x4b, 0x45, + 0x52, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x50, 0x41, 0x59, 0x10, 0x09, 0x12, 0x23, 0x0a, 0x1f, 0x54, + 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x4b, + 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x56, 0x45, 0x10, 0x0a, 0x12, 0x28, 0x0a, 0x24, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x49, 0x4e, 0x46, 0x52, 0x41, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x55, 0x52, 0x45, + 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x50, 0x41, 0x59, 0x10, 0x0b, 0x12, 0x2f, 0x0a, 0x2b, 0x54, 0x52, + 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x46, 0x52, + 0x41, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x44, + 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x10, 0x0c, 0x12, 0x23, 0x0a, 0x1f, 0x54, + 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x49, 0x51, + 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x50, 0x41, 0x59, 0x10, 0x0d, + 0x12, 0x2a, 0x0a, 0x26, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, 0x5f, + 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x10, 0x0e, 0x12, 0x1a, 0x0a, 0x16, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, + 0x4e, 0x44, 0x5f, 0x4c, 0x4f, 0x57, 0x10, 0x0f, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x52, 0x41, 0x4e, + 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x48, + 0x49, 0x47, 0x48, 0x10, 0x10, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, + 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x10, + 0x12, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x10, 0x13, 0x12, 0x1f, 0x0a, 0x1b, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, + 0x4e, 0x44, 0x5f, 0x53, 0x4c, 0x41, 0x53, 0x48, 0x49, 0x4e, 0x47, 0x10, 0x14, 0x12, 0x1f, 0x0a, + 0x1b, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, + 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4f, 0x55, 0x54, 0x10, 0x15, 0x12, 0x25, + 0x0a, 0x21, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x53, + 0x45, 0x4e, 0x44, 0x10, 0x16, 0x12, 0x2b, 0x0a, 0x27, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, + 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, + 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, + 0x10, 0x17, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4c, 0x45, 0x41, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, + 0x54, 0x10, 0x18, 0x12, 0x2c, 0x0a, 0x28, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, + 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x10, + 0x19, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x53, 0x50, 0x4f, 0x54, 0x10, 0x1a, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x4f, 0x4c, 0x44, 0x49, + 0x4e, 0x47, 0x5f, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x1b, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x4f, 0x4c, 0x44, 0x49, + 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x10, 0x1c, 0x12, 0x2e, 0x0a, 0x2a, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x55, + 0x43, 0x43, 0x45, 0x53, 0x53, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x52, 0x41, 0x4e, 0x43, + 0x45, 0x5f, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x1d, 0x12, 0x28, 0x0a, 0x24, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x49, + 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, + 0x43, 0x41, 0x54, 0x45, 0x10, 0x1e, 0x12, 0x2e, 0x0a, 0x2a, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, + 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, + 0x59, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x4e, 0x45, 0x54, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, + 0x42, 0x55, 0x54, 0x45, 0x10, 0x1f, 0x12, 0x28, 0x0a, 0x24, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, + 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4c, 0x41, 0x5f, 0x50, 0x45, 0x4e, 0x41, + 0x4c, 0x54, 0x59, 0x5f, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x4c, 0x59, 0x10, 0x20, + 0x12, 0x2a, 0x0a, 0x26, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x53, 0x4c, 0x41, 0x5f, 0x50, 0x45, 0x4e, 0x41, 0x4c, 0x54, 0x59, 0x5f, 0x4c, 0x50, + 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x41, 0x50, 0x50, 0x4c, 0x59, 0x10, 0x21, 0x12, 0x2e, 0x0a, 0x2a, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x49, + 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x55, 0x4e, 0x50, 0x41, + 0x49, 0x44, 0x5f, 0x43, 0x4f, 0x4c, 0x4c, 0x45, 0x43, 0x54, 0x10, 0x22, 0x12, 0x32, 0x0a, 0x2e, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4c, + 0x41, 0x5f, 0x50, 0x45, 0x52, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x42, 0x4f, + 0x4e, 0x55, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x10, 0x23, + 0x12, 0x29, 0x0a, 0x25, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x50, 0x45, 0x54, 0x55, 0x41, 0x4c, 0x53, 0x5f, 0x46, 0x55, 0x4e, - 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x57, 0x49, 0x4e, 0x10, 0x25, 0x12, 0x20, 0x0a, 0x1c, 0x54, 0x52, - 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, - 0x52, 0x44, 0x53, 0x5f, 0x56, 0x45, 0x53, 0x54, 0x45, 0x44, 0x10, 0x26, 0x12, 0x29, 0x0a, 0x25, - 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x45, - 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, - 0x44, 0x5f, 0x50, 0x41, 0x59, 0x10, 0x27, 0x12, 0x30, 0x0a, 0x2c, 0x54, 0x52, 0x41, 0x4e, 0x53, + 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x10, 0x24, 0x12, 0x28, 0x0a, 0x24, 0x54, + 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, + 0x50, 0x45, 0x54, 0x55, 0x41, 0x4c, 0x53, 0x5f, 0x46, 0x55, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, + 0x57, 0x49, 0x4e, 0x10, 0x25, 0x12, 0x20, 0x0a, 0x1c, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, + 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x53, 0x5f, 0x56, + 0x45, 0x53, 0x54, 0x45, 0x44, 0x10, 0x26, 0x12, 0x29, 0x0a, 0x25, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x52, 0x45, 0x46, - 0x45, 0x52, 0x52, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x44, 0x49, 0x53, - 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x10, 0x2c, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, 0x22, - 0x04, 0x08, 0x11, 0x10, 0x11, 0x2a, 0xe0, 0x02, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x49, 0x53, 0x50, - 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x44, 0x49, 0x53, - 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x4d, 0x41, 0x4b, - 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, 0x50, 0x41, 0x49, 0x44, 0x10, 0x01, 0x12, 0x27, - 0x0a, 0x23, 0x44, 0x49, 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, - 0x43, 0x5f, 0x4d, 0x41, 0x4b, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, 0x52, 0x45, 0x43, - 0x45, 0x49, 0x56, 0x45, 0x44, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x49, 0x53, 0x50, 0x41, - 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x4c, 0x50, 0x5f, 0x46, 0x45, - 0x45, 0x53, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x56, 0x45, 0x44, 0x10, 0x03, 0x12, 0x20, 0x0a, - 0x1c, 0x44, 0x49, 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, - 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x04, 0x12, - 0x24, 0x0a, 0x20, 0x44, 0x49, 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, 0x52, - 0x49, 0x43, 0x5f, 0x41, 0x56, 0x45, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x44, 0x49, 0x53, 0x50, 0x41, 0x54, 0x43, - 0x48, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x56, - 0x45, 0x5f, 0x52, 0x45, 0x54, 0x55, 0x52, 0x4e, 0x10, 0x06, 0x12, 0x25, 0x0a, 0x21, 0x44, 0x49, - 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x52, 0x45, - 0x54, 0x55, 0x52, 0x4e, 0x5f, 0x56, 0x4f, 0x4c, 0x41, 0x54, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x10, - 0x07, 0x12, 0x25, 0x0a, 0x21, 0x44, 0x49, 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, - 0x54, 0x52, 0x49, 0x43, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x52, - 0x41, 0x4e, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x08, 0x2a, 0x61, 0x0a, 0x0b, 0x45, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x4e, 0x54, 0x49, 0x54, - 0x59, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, - 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x44, 0x49, 0x56, 0x49, 0x44, 0x55, 0x41, 0x4c, - 0x53, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x43, - 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x53, 0x10, 0x02, 0x2a, 0x8d, 0x01, 0x0a, 0x0f, - 0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, - 0x20, 0x0a, 0x1c, 0x49, 0x4e, 0x44, 0x49, 0x56, 0x49, 0x44, 0x55, 0x41, 0x4c, 0x5f, 0x53, 0x43, - 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x18, 0x0a, 0x14, 0x49, 0x4e, 0x44, 0x49, 0x56, 0x49, 0x44, 0x55, 0x41, 0x4c, 0x5f, - 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x49, - 0x4e, 0x44, 0x49, 0x56, 0x49, 0x44, 0x55, 0x41, 0x4c, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, - 0x49, 0x4e, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x49, 0x4e, 0x44, - 0x49, 0x56, 0x49, 0x44, 0x55, 0x41, 0x4c, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x4e, 0x4f, - 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x10, 0x03, 0x2a, 0x81, 0x01, 0x0a, 0x14, - 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, - 0x74, 0x65, 0x67, 0x79, 0x12, 0x25, 0x0a, 0x21, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x44, - 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, - 0x54, 0x45, 0x47, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x5f, 0x52, 0x41, 0x54, 0x41, 0x10, 0x01, 0x12, - 0x1e, 0x0a, 0x1a, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x10, 0x02, 0x2a, - 0x63, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, - 0x17, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x4f, - 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, - 0x54, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, - 0x4f, 0x52, 0x10, 0x02, 0x2a, 0x59, 0x0a, 0x0b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x50, 0x4f, 0x43, 0x48, 0x5f, 0x41, 0x43, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x50, 0x4f, 0x43, 0x48, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x50, 0x4f, - 0x43, 0x48, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x4e, 0x44, 0x10, 0x02, 0x2a, - 0xa7, 0x01, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x6f, 0x64, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x21, 0x56, 0x41, 0x4c, 0x49, 0x44, + 0x45, 0x52, 0x52, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x50, 0x41, 0x59, + 0x10, 0x27, 0x12, 0x30, 0x0a, 0x2c, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x52, 0x45, 0x52, + 0x5f, 0x52, 0x45, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, + 0x54, 0x45, 0x10, 0x2c, 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x4d, 0x41, 0x52, 0x47, + 0x49, 0x4e, 0x5f, 0x4c, 0x4f, 0x57, 0x10, 0x2d, 0x12, 0x23, 0x0a, 0x1f, 0x54, 0x52, 0x41, 0x4e, + 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, + 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x2e, 0x12, 0x25, 0x0a, + 0x21, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, + 0x53, 0x4f, 0x4c, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x5f, 0x4c, + 0x4f, 0x57, 0x10, 0x2f, 0x12, 0x26, 0x0a, 0x22, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x53, 0x4f, 0x4c, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x4d, + 0x41, 0x52, 0x47, 0x49, 0x4e, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x30, 0x22, 0x04, 0x08, 0x03, + 0x10, 0x03, 0x22, 0x04, 0x08, 0x11, 0x10, 0x11, 0x2a, 0xe0, 0x02, 0x0a, 0x0e, 0x44, 0x69, 0x73, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x1f, 0x0a, 0x1b, 0x44, + 0x49, 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, + 0x44, 0x49, 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, + 0x4d, 0x41, 0x4b, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, 0x50, 0x41, 0x49, 0x44, 0x10, + 0x01, 0x12, 0x27, 0x0a, 0x23, 0x44, 0x49, 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, + 0x54, 0x52, 0x49, 0x43, 0x5f, 0x4d, 0x41, 0x4b, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, + 0x52, 0x45, 0x43, 0x45, 0x49, 0x56, 0x45, 0x44, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x49, + 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x4c, 0x50, + 0x5f, 0x46, 0x45, 0x45, 0x53, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x56, 0x45, 0x44, 0x10, 0x03, + 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x49, 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, + 0x52, 0x49, 0x43, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, + 0x10, 0x04, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x49, 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, + 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x41, 0x56, 0x45, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x4f, + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x44, 0x49, 0x53, 0x50, + 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x52, 0x45, 0x4c, 0x41, + 0x54, 0x49, 0x56, 0x45, 0x5f, 0x52, 0x45, 0x54, 0x55, 0x52, 0x4e, 0x10, 0x06, 0x12, 0x25, 0x0a, + 0x21, 0x44, 0x49, 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, + 0x5f, 0x52, 0x45, 0x54, 0x55, 0x52, 0x4e, 0x5f, 0x56, 0x4f, 0x4c, 0x41, 0x54, 0x49, 0x4c, 0x49, + 0x54, 0x59, 0x10, 0x07, 0x12, 0x25, 0x0a, 0x21, 0x44, 0x49, 0x53, 0x50, 0x41, 0x54, 0x43, 0x48, + 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, + 0x52, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x08, 0x2a, 0x61, 0x0a, 0x0b, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x4e, + 0x54, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x4e, 0x54, 0x49, + 0x54, 0x59, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x44, 0x49, 0x56, 0x49, 0x44, + 0x55, 0x41, 0x4c, 0x53, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, + 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x53, 0x10, 0x02, 0x2a, 0x8d, + 0x01, 0x0a, 0x0f, 0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x49, 0x4e, 0x44, 0x49, 0x56, 0x49, 0x44, 0x55, 0x41, 0x4c, + 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x49, 0x4e, 0x44, 0x49, 0x56, 0x49, 0x44, 0x55, + 0x41, 0x4c, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x1c, + 0x0a, 0x18, 0x49, 0x4e, 0x44, 0x49, 0x56, 0x49, 0x44, 0x55, 0x41, 0x4c, 0x5f, 0x53, 0x43, 0x4f, + 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, + 0x49, 0x4e, 0x44, 0x49, 0x56, 0x49, 0x44, 0x55, 0x41, 0x4c, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, + 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x10, 0x03, 0x2a, 0x81, + 0x01, 0x0a, 0x14, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x25, 0x0a, 0x21, 0x44, 0x49, 0x53, 0x54, 0x52, + 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, + 0x0a, 0x1e, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x5f, 0x52, 0x41, 0x54, 0x41, + 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x52, 0x41, 0x4e, 0x4b, + 0x10, 0x02, 0x2a, 0x63, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x1b, 0x0a, 0x17, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, + 0x15, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x41, 0x4c, + 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x4e, 0x4f, 0x44, 0x45, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x56, 0x41, 0x4c, 0x49, + 0x44, 0x41, 0x54, 0x4f, 0x52, 0x10, 0x02, 0x2a, 0x59, 0x0a, 0x0b, 0x45, 0x70, 0x6f, 0x63, 0x68, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x50, 0x4f, 0x43, 0x48, 0x5f, + 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x50, 0x4f, 0x43, 0x48, 0x5f, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, + 0x45, 0x50, 0x4f, 0x43, 0x48, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x4e, 0x44, + 0x10, 0x02, 0x2a, 0xa7, 0x01, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x21, 0x56, 0x41, + 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x24, 0x0a, 0x20, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4e, + 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x45, 0x4e, 0x44, 0x45, + 0x52, 0x4d, 0x49, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, - 0x0a, 0x20, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x44, 0x45, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x4d, 0x49, - 0x4e, 0x54, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, - 0x52, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, - 0x53, 0x41, 0x54, 0x5a, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, - 0x54, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, 0x27, 0x5a, 0x25, 0x63, 0x6f, 0x64, - 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, - 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, - 0x67, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5f, 0x45, 0x52, 0x53, 0x41, 0x54, 0x5a, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x56, 0x41, 0x4c, + 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x2a, 0x68, 0x0a, 0x0a, + 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x41, + 0x52, 0x47, 0x49, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x41, 0x52, 0x47, 0x49, + 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x4d, 0x41, 0x52, + 0x47, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x41, 0x52, 0x47, 0x49, 0x4e, 0x5f, + 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x53, 0x4f, 0x4c, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x4d, 0x41, + 0x52, 0x47, 0x49, 0x4e, 0x10, 0x02, 0x42, 0x27, 0x5a, 0x25, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, + 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -10419,8 +11366,8 @@ func file_vega_vega_proto_rawDescGZIP() []byte { return file_vega_vega_proto_rawDescData } -var file_vega_vega_proto_enumTypes = make([]protoimpl.EnumInfo, 27) -var file_vega_vega_proto_msgTypes = make([]protoimpl.MessageInfo, 75) +var file_vega_vega_proto_enumTypes = make([]protoimpl.EnumInfo, 29) +var file_vega_vega_proto_msgTypes = make([]protoimpl.MessageInfo, 82) var file_vega_vega_proto_goTypes = []interface{}{ (Side)(0), // 0: vega.Side (Interval)(0), // 1: vega.Interval @@ -10438,196 +11385,217 @@ var file_vega_vega_proto_goTypes = []interface{}{ (NodeStatus)(0), // 13: vega.NodeStatus (EpochAction)(0), // 14: vega.EpochAction (ValidatorNodeStatus)(0), // 15: vega.ValidatorNodeStatus - (StopOrder_ExpiryStrategy)(0), // 16: vega.StopOrder.ExpiryStrategy - (StopOrder_TriggerDirection)(0), // 17: vega.StopOrder.TriggerDirection - (StopOrder_Status)(0), // 18: vega.StopOrder.Status - (StopOrder_RejectionReason)(0), // 19: vega.StopOrder.RejectionReason - (Order_TimeInForce)(0), // 20: vega.Order.TimeInForce - (Order_Type)(0), // 21: vega.Order.Type - (Order_Status)(0), // 22: vega.Order.Status - (Trade_Type)(0), // 23: vega.Trade.Type - (Deposit_Status)(0), // 24: vega.Deposit.Status - (Withdrawal_Status)(0), // 25: vega.Withdrawal.Status - (LiquidityProvision_Status)(0), // 26: vega.LiquidityProvision.Status - (*StopOrder)(nil), // 27: vega.StopOrder - (*Party)(nil), // 28: vega.Party - (*RiskFactor)(nil), // 29: vega.RiskFactor - (*PeggedOrder)(nil), // 30: vega.PeggedOrder - (*IcebergOrder)(nil), // 31: vega.IcebergOrder - (*Order)(nil), // 32: vega.Order - (*OrderCancellationConfirmation)(nil), // 33: vega.OrderCancellationConfirmation - (*OrderConfirmation)(nil), // 34: vega.OrderConfirmation - (*AuctionIndicativeState)(nil), // 35: vega.AuctionIndicativeState - (*Trade)(nil), // 36: vega.Trade - (*Fee)(nil), // 37: vega.Fee - (*TradeSet)(nil), // 38: vega.TradeSet - (*Candle)(nil), // 39: vega.Candle - (*PriceLevel)(nil), // 40: vega.PriceLevel - (*MarketDepth)(nil), // 41: vega.MarketDepth - (*MarketDepthUpdate)(nil), // 42: vega.MarketDepthUpdate - (*Position)(nil), // 43: vega.Position - (*PositionTrade)(nil), // 44: vega.PositionTrade - (*Deposit)(nil), // 45: vega.Deposit - (*Withdrawal)(nil), // 46: vega.Withdrawal - (*WithdrawExt)(nil), // 47: vega.WithdrawExt - (*Erc20WithdrawExt)(nil), // 48: vega.Erc20WithdrawExt - (*Account)(nil), // 49: vega.Account - (*FinancialAmount)(nil), // 50: vega.FinancialAmount - (*Transfer)(nil), // 51: vega.Transfer - (*DispatchStrategy)(nil), // 52: vega.DispatchStrategy - (*Rank)(nil), // 53: vega.Rank - (*TransferRequest)(nil), // 54: vega.TransferRequest - (*AccountDetails)(nil), // 55: vega.AccountDetails - (*LedgerEntry)(nil), // 56: vega.LedgerEntry - (*PostTransferBalance)(nil), // 57: vega.PostTransferBalance - (*LedgerMovement)(nil), // 58: vega.LedgerMovement - (*MarginLevels)(nil), // 59: vega.MarginLevels - (*PerpetualData)(nil), // 60: vega.PerpetualData - (*ProductData)(nil), // 61: vega.ProductData - (*MarketData)(nil), // 62: vega.MarketData - (*LiquidityProviderFeeShare)(nil), // 63: vega.LiquidityProviderFeeShare - (*LiquidityProviderSLA)(nil), // 64: vega.LiquidityProviderSLA - (*PriceMonitoringBounds)(nil), // 65: vega.PriceMonitoringBounds - (*ErrorDetail)(nil), // 66: vega.ErrorDetail - (*NetworkParameter)(nil), // 67: vega.NetworkParameter - (*NetworkLimits)(nil), // 68: vega.NetworkLimits - (*LiquidityOrder)(nil), // 69: vega.LiquidityOrder - (*LiquidityOrderReference)(nil), // 70: vega.LiquidityOrderReference - (*LiquidityProvision)(nil), // 71: vega.LiquidityProvision - (*EthereumConfig)(nil), // 72: vega.EthereumConfig - (*EthereumContractConfig)(nil), // 73: vega.EthereumContractConfig - (*EpochTimestamps)(nil), // 74: vega.EpochTimestamps - (*Epoch)(nil), // 75: vega.Epoch - (*EpochParticipation)(nil), // 76: vega.EpochParticipation - (*EpochData)(nil), // 77: vega.EpochData - (*RankingScore)(nil), // 78: vega.RankingScore - (*RewardScore)(nil), // 79: vega.RewardScore - (*Node)(nil), // 80: vega.Node - (*NodeSet)(nil), // 81: vega.NodeSet - (*NodeData)(nil), // 82: vega.NodeData - (*Delegation)(nil), // 83: vega.Delegation - (*Reward)(nil), // 84: vega.Reward - (*RewardSummary)(nil), // 85: vega.RewardSummary - (*EpochRewardSummary)(nil), // 86: vega.EpochRewardSummary - (*StateValueProposal)(nil), // 87: vega.StateValueProposal - (*KeyValueBundle)(nil), // 88: vega.KeyValueBundle - (*StateVarValue)(nil), // 89: vega.StateVarValue - (*ScalarValue)(nil), // 90: vega.ScalarValue - (*VectorValue)(nil), // 91: vega.VectorValue - (*MatrixValue)(nil), // 92: vega.MatrixValue - (*ReferralProgram)(nil), // 93: vega.ReferralProgram - (*VolumeBenefitTier)(nil), // 94: vega.VolumeBenefitTier - (*BenefitTier)(nil), // 95: vega.BenefitTier - (*VestingBenefitTiers)(nil), // 96: vega.VestingBenefitTiers - (*VestingBenefitTier)(nil), // 97: vega.VestingBenefitTier - (*StakingTier)(nil), // 98: vega.StakingTier - (*VolumeDiscountProgram)(nil), // 99: vega.VolumeDiscountProgram - (*ActivityStreakBenefitTiers)(nil), // 100: vega.ActivityStreakBenefitTiers - (*ActivityStreakBenefitTier)(nil), // 101: vega.ActivityStreakBenefitTier - (Market_TradingMode)(0), // 102: vega.Market.TradingMode - (Market_State)(0), // 103: vega.Market.State - (*PriceMonitoringTrigger)(nil), // 104: vega.PriceMonitoringTrigger + (MarginMode)(0), // 16: vega.MarginMode + (StopOrder_SizeOverrideSetting)(0), // 17: vega.StopOrder.SizeOverrideSetting + (StopOrder_ExpiryStrategy)(0), // 18: vega.StopOrder.ExpiryStrategy + (StopOrder_TriggerDirection)(0), // 19: vega.StopOrder.TriggerDirection + (StopOrder_Status)(0), // 20: vega.StopOrder.Status + (StopOrder_RejectionReason)(0), // 21: vega.StopOrder.RejectionReason + (Order_TimeInForce)(0), // 22: vega.Order.TimeInForce + (Order_Type)(0), // 23: vega.Order.Type + (Order_Status)(0), // 24: vega.Order.Status + (Trade_Type)(0), // 25: vega.Trade.Type + (Deposit_Status)(0), // 26: vega.Deposit.Status + (Withdrawal_Status)(0), // 27: vega.Withdrawal.Status + (LiquidityProvision_Status)(0), // 28: vega.LiquidityProvision.Status + (*PartyProfile)(nil), // 29: vega.PartyProfile + (*Metadata)(nil), // 30: vega.Metadata + (*StopOrder)(nil), // 31: vega.StopOrder + (*Party)(nil), // 32: vega.Party + (*RiskFactor)(nil), // 33: vega.RiskFactor + (*PeggedOrder)(nil), // 34: vega.PeggedOrder + (*IcebergOrder)(nil), // 35: vega.IcebergOrder + (*Order)(nil), // 36: vega.Order + (*OrderCancellationConfirmation)(nil), // 37: vega.OrderCancellationConfirmation + (*OrderConfirmation)(nil), // 38: vega.OrderConfirmation + (*AuctionIndicativeState)(nil), // 39: vega.AuctionIndicativeState + (*Trade)(nil), // 40: vega.Trade + (*Fee)(nil), // 41: vega.Fee + (*TradeSet)(nil), // 42: vega.TradeSet + (*Candle)(nil), // 43: vega.Candle + (*PriceLevel)(nil), // 44: vega.PriceLevel + (*MarketDepth)(nil), // 45: vega.MarketDepth + (*MarketDepthUpdate)(nil), // 46: vega.MarketDepthUpdate + (*Position)(nil), // 47: vega.Position + (*PositionTrade)(nil), // 48: vega.PositionTrade + (*Deposit)(nil), // 49: vega.Deposit + (*Withdrawal)(nil), // 50: vega.Withdrawal + (*WithdrawExt)(nil), // 51: vega.WithdrawExt + (*Erc20WithdrawExt)(nil), // 52: vega.Erc20WithdrawExt + (*Account)(nil), // 53: vega.Account + (*FinancialAmount)(nil), // 54: vega.FinancialAmount + (*Transfer)(nil), // 55: vega.Transfer + (*DispatchStrategy)(nil), // 56: vega.DispatchStrategy + (*Rank)(nil), // 57: vega.Rank + (*TransferRequest)(nil), // 58: vega.TransferRequest + (*AccountDetails)(nil), // 59: vega.AccountDetails + (*LedgerEntry)(nil), // 60: vega.LedgerEntry + (*PostTransferBalance)(nil), // 61: vega.PostTransferBalance + (*LedgerMovement)(nil), // 62: vega.LedgerMovement + (*MarginLevels)(nil), // 63: vega.MarginLevels + (*PerpetualData)(nil), // 64: vega.PerpetualData + (*ProductData)(nil), // 65: vega.ProductData + (*MarketData)(nil), // 66: vega.MarketData + (*CompositePriceSource)(nil), // 67: vega.CompositePriceSource + (*CompositePriceState)(nil), // 68: vega.CompositePriceState + (*LiquidityProviderFeeShare)(nil), // 69: vega.LiquidityProviderFeeShare + (*LiquidityProviderSLA)(nil), // 70: vega.LiquidityProviderSLA + (*PriceMonitoringBounds)(nil), // 71: vega.PriceMonitoringBounds + (*ErrorDetail)(nil), // 72: vega.ErrorDetail + (*NetworkParameter)(nil), // 73: vega.NetworkParameter + (*NetworkLimits)(nil), // 74: vega.NetworkLimits + (*LiquidityOrder)(nil), // 75: vega.LiquidityOrder + (*LiquidityOrderReference)(nil), // 76: vega.LiquidityOrderReference + (*LiquidityProvision)(nil), // 77: vega.LiquidityProvision + (*EthereumL2Config)(nil), // 78: vega.EthereumL2Config + (*EthereumL2Configs)(nil), // 79: vega.EthereumL2Configs + (*EthereumConfig)(nil), // 80: vega.EthereumConfig + (*EthereumContractConfig)(nil), // 81: vega.EthereumContractConfig + (*EpochTimestamps)(nil), // 82: vega.EpochTimestamps + (*Epoch)(nil), // 83: vega.Epoch + (*EpochParticipation)(nil), // 84: vega.EpochParticipation + (*EpochData)(nil), // 85: vega.EpochData + (*RankingScore)(nil), // 86: vega.RankingScore + (*RewardScore)(nil), // 87: vega.RewardScore + (*Node)(nil), // 88: vega.Node + (*NodeSet)(nil), // 89: vega.NodeSet + (*NodeData)(nil), // 90: vega.NodeData + (*Delegation)(nil), // 91: vega.Delegation + (*Reward)(nil), // 92: vega.Reward + (*RewardSummary)(nil), // 93: vega.RewardSummary + (*EpochRewardSummary)(nil), // 94: vega.EpochRewardSummary + (*StateValueProposal)(nil), // 95: vega.StateValueProposal + (*KeyValueBundle)(nil), // 96: vega.KeyValueBundle + (*StateVarValue)(nil), // 97: vega.StateVarValue + (*ScalarValue)(nil), // 98: vega.ScalarValue + (*VectorValue)(nil), // 99: vega.VectorValue + (*MatrixValue)(nil), // 100: vega.MatrixValue + (*ReferralProgram)(nil), // 101: vega.ReferralProgram + (*VolumeBenefitTier)(nil), // 102: vega.VolumeBenefitTier + (*BenefitTier)(nil), // 103: vega.BenefitTier + (*VestingBenefitTiers)(nil), // 104: vega.VestingBenefitTiers + (*VestingBenefitTier)(nil), // 105: vega.VestingBenefitTier + (*StakingTier)(nil), // 106: vega.StakingTier + (*VolumeDiscountProgram)(nil), // 107: vega.VolumeDiscountProgram + (*ActivityStreakBenefitTiers)(nil), // 108: vega.ActivityStreakBenefitTiers + (*ActivityStreakBenefitTier)(nil), // 109: vega.ActivityStreakBenefitTier + (*StopOrder_SizeOverrideValue)(nil), // 110: vega.StopOrder.SizeOverrideValue + (CompositePriceType)(0), // 111: vega.CompositePriceType + (Market_TradingMode)(0), // 112: vega.Market.TradingMode + (Market_State)(0), // 113: vega.Market.State + (*PriceMonitoringTrigger)(nil), // 114: vega.PriceMonitoringTrigger } var file_vega_vega_proto_depIdxs = []int32{ - 16, // 0: vega.StopOrder.expiry_strategy:type_name -> vega.StopOrder.ExpiryStrategy - 17, // 1: vega.StopOrder.trigger_direction:type_name -> vega.StopOrder.TriggerDirection - 18, // 2: vega.StopOrder.status:type_name -> vega.StopOrder.Status - 19, // 3: vega.StopOrder.rejection_reason:type_name -> vega.StopOrder.RejectionReason - 4, // 4: vega.PeggedOrder.reference:type_name -> vega.PeggedReference - 0, // 5: vega.Order.side:type_name -> vega.Side - 20, // 6: vega.Order.time_in_force:type_name -> vega.Order.TimeInForce - 21, // 7: vega.Order.type:type_name -> vega.Order.Type - 22, // 8: vega.Order.status:type_name -> vega.Order.Status - 5, // 9: vega.Order.reason:type_name -> vega.OrderError - 30, // 10: vega.Order.pegged_order:type_name -> vega.PeggedOrder - 31, // 11: vega.Order.iceberg_order:type_name -> vega.IcebergOrder - 32, // 12: vega.OrderCancellationConfirmation.order:type_name -> vega.Order - 32, // 13: vega.OrderConfirmation.order:type_name -> vega.Order - 36, // 14: vega.OrderConfirmation.trades:type_name -> vega.Trade - 32, // 15: vega.OrderConfirmation.passive_orders_affected:type_name -> vega.Order - 0, // 16: vega.Trade.aggressor:type_name -> vega.Side - 23, // 17: vega.Trade.type:type_name -> vega.Trade.Type - 37, // 18: vega.Trade.buyer_fee:type_name -> vega.Fee - 37, // 19: vega.Trade.seller_fee:type_name -> vega.Fee - 36, // 20: vega.TradeSet.trades:type_name -> vega.Trade - 1, // 21: vega.Candle.interval:type_name -> vega.Interval - 40, // 22: vega.MarketDepth.buy:type_name -> vega.PriceLevel - 40, // 23: vega.MarketDepth.sell:type_name -> vega.PriceLevel - 40, // 24: vega.MarketDepthUpdate.buy:type_name -> vega.PriceLevel - 40, // 25: vega.MarketDepthUpdate.sell:type_name -> vega.PriceLevel - 2, // 26: vega.Position.position_status:type_name -> vega.PositionStatus - 24, // 27: vega.Deposit.status:type_name -> vega.Deposit.Status - 25, // 28: vega.Withdrawal.status:type_name -> vega.Withdrawal.Status - 47, // 29: vega.Withdrawal.ext:type_name -> vega.WithdrawExt - 48, // 30: vega.WithdrawExt.erc20:type_name -> vega.Erc20WithdrawExt - 7, // 31: vega.Account.type:type_name -> vega.AccountType - 50, // 32: vega.Transfer.amount:type_name -> vega.FinancialAmount - 8, // 33: vega.Transfer.type:type_name -> vega.TransferType - 9, // 34: vega.DispatchStrategy.metric:type_name -> vega.DispatchMetric - 10, // 35: vega.DispatchStrategy.entity_scope:type_name -> vega.EntityScope - 11, // 36: vega.DispatchStrategy.individual_scope:type_name -> vega.IndividualScope - 12, // 37: vega.DispatchStrategy.distribution_strategy:type_name -> vega.DistributionStrategy - 53, // 38: vega.DispatchStrategy.rank_table:type_name -> vega.Rank - 49, // 39: vega.TransferRequest.from_account:type_name -> vega.Account - 49, // 40: vega.TransferRequest.to_account:type_name -> vega.Account - 8, // 41: vega.TransferRequest.type:type_name -> vega.TransferType - 7, // 42: vega.AccountDetails.type:type_name -> vega.AccountType - 55, // 43: vega.LedgerEntry.from_account:type_name -> vega.AccountDetails - 55, // 44: vega.LedgerEntry.to_account:type_name -> vega.AccountDetails - 8, // 45: vega.LedgerEntry.type:type_name -> vega.TransferType - 55, // 46: vega.PostTransferBalance.account:type_name -> vega.AccountDetails - 56, // 47: vega.LedgerMovement.entries:type_name -> vega.LedgerEntry - 57, // 48: vega.LedgerMovement.balances:type_name -> vega.PostTransferBalance - 60, // 49: vega.ProductData.perpetual_data:type_name -> vega.PerpetualData - 102, // 50: vega.MarketData.market_trading_mode:type_name -> vega.Market.TradingMode - 3, // 51: vega.MarketData.trigger:type_name -> vega.AuctionTrigger - 3, // 52: vega.MarketData.extension_trigger:type_name -> vega.AuctionTrigger - 65, // 53: vega.MarketData.price_monitoring_bounds:type_name -> vega.PriceMonitoringBounds - 63, // 54: vega.MarketData.liquidity_provider_fee_share:type_name -> vega.LiquidityProviderFeeShare - 103, // 55: vega.MarketData.market_state:type_name -> vega.Market.State - 61, // 56: vega.MarketData.product_data:type_name -> vega.ProductData - 64, // 57: vega.MarketData.liquidity_provider_sla:type_name -> vega.LiquidityProviderSLA - 104, // 58: vega.PriceMonitoringBounds.trigger:type_name -> vega.PriceMonitoringTrigger - 4, // 59: vega.LiquidityOrder.reference:type_name -> vega.PeggedReference - 69, // 60: vega.LiquidityOrderReference.liquidity_order:type_name -> vega.LiquidityOrder - 70, // 61: vega.LiquidityProvision.sells:type_name -> vega.LiquidityOrderReference - 70, // 62: vega.LiquidityProvision.buys:type_name -> vega.LiquidityOrderReference - 26, // 63: vega.LiquidityProvision.status:type_name -> vega.LiquidityProvision.Status - 73, // 64: vega.EthereumConfig.collateral_bridge_contract:type_name -> vega.EthereumContractConfig - 73, // 65: vega.EthereumConfig.staking_bridge_contract:type_name -> vega.EthereumContractConfig - 73, // 66: vega.EthereumConfig.token_vesting_contract:type_name -> vega.EthereumContractConfig - 73, // 67: vega.EthereumConfig.multisig_control_contract:type_name -> vega.EthereumContractConfig - 74, // 68: vega.Epoch.timestamps:type_name -> vega.EpochTimestamps - 80, // 69: vega.Epoch.validators:type_name -> vega.Node - 83, // 70: vega.Epoch.delegations:type_name -> vega.Delegation - 75, // 71: vega.EpochParticipation.epoch:type_name -> vega.Epoch - 15, // 72: vega.RankingScore.previous_status:type_name -> vega.ValidatorNodeStatus - 15, // 73: vega.RankingScore.status:type_name -> vega.ValidatorNodeStatus - 15, // 74: vega.RewardScore.validator_status:type_name -> vega.ValidatorNodeStatus - 77, // 75: vega.Node.epoch_data:type_name -> vega.EpochData - 13, // 76: vega.Node.status:type_name -> vega.NodeStatus - 83, // 77: vega.Node.delegations:type_name -> vega.Delegation - 79, // 78: vega.Node.reward_score:type_name -> vega.RewardScore - 78, // 79: vega.Node.ranking_score:type_name -> vega.RankingScore - 81, // 80: vega.NodeData.tendermint_nodes:type_name -> vega.NodeSet - 81, // 81: vega.NodeData.ersatz_nodes:type_name -> vega.NodeSet - 81, // 82: vega.NodeData.pending_nodes:type_name -> vega.NodeSet - 88, // 83: vega.StateValueProposal.kvb:type_name -> vega.KeyValueBundle - 89, // 84: vega.KeyValueBundle.value:type_name -> vega.StateVarValue - 90, // 85: vega.StateVarValue.scalar_val:type_name -> vega.ScalarValue - 91, // 86: vega.StateVarValue.vector_val:type_name -> vega.VectorValue - 92, // 87: vega.StateVarValue.matrix_val:type_name -> vega.MatrixValue - 91, // 88: vega.MatrixValue.value:type_name -> vega.VectorValue - 95, // 89: vega.ReferralProgram.benefit_tiers:type_name -> vega.BenefitTier - 98, // 90: vega.ReferralProgram.staking_tiers:type_name -> vega.StakingTier - 97, // 91: vega.VestingBenefitTiers.tiers:type_name -> vega.VestingBenefitTier - 94, // 92: vega.VolumeDiscountProgram.benefit_tiers:type_name -> vega.VolumeBenefitTier - 101, // 93: vega.ActivityStreakBenefitTiers.tiers:type_name -> vega.ActivityStreakBenefitTier - 94, // [94:94] is the sub-list for method output_type - 94, // [94:94] is the sub-list for method input_type - 94, // [94:94] is the sub-list for extension type_name - 94, // [94:94] is the sub-list for extension extendee - 0, // [0:94] is the sub-list for field type_name + 30, // 0: vega.PartyProfile.metadata:type_name -> vega.Metadata + 18, // 1: vega.StopOrder.expiry_strategy:type_name -> vega.StopOrder.ExpiryStrategy + 19, // 2: vega.StopOrder.trigger_direction:type_name -> vega.StopOrder.TriggerDirection + 20, // 3: vega.StopOrder.status:type_name -> vega.StopOrder.Status + 21, // 4: vega.StopOrder.rejection_reason:type_name -> vega.StopOrder.RejectionReason + 17, // 5: vega.StopOrder.size_override_setting:type_name -> vega.StopOrder.SizeOverrideSetting + 110, // 6: vega.StopOrder.size_override_value:type_name -> vega.StopOrder.SizeOverrideValue + 30, // 7: vega.Party.metadata:type_name -> vega.Metadata + 4, // 8: vega.PeggedOrder.reference:type_name -> vega.PeggedReference + 0, // 9: vega.Order.side:type_name -> vega.Side + 22, // 10: vega.Order.time_in_force:type_name -> vega.Order.TimeInForce + 23, // 11: vega.Order.type:type_name -> vega.Order.Type + 24, // 12: vega.Order.status:type_name -> vega.Order.Status + 5, // 13: vega.Order.reason:type_name -> vega.OrderError + 34, // 14: vega.Order.pegged_order:type_name -> vega.PeggedOrder + 35, // 15: vega.Order.iceberg_order:type_name -> vega.IcebergOrder + 36, // 16: vega.OrderCancellationConfirmation.order:type_name -> vega.Order + 36, // 17: vega.OrderConfirmation.order:type_name -> vega.Order + 40, // 18: vega.OrderConfirmation.trades:type_name -> vega.Trade + 36, // 19: vega.OrderConfirmation.passive_orders_affected:type_name -> vega.Order + 0, // 20: vega.Trade.aggressor:type_name -> vega.Side + 25, // 21: vega.Trade.type:type_name -> vega.Trade.Type + 41, // 22: vega.Trade.buyer_fee:type_name -> vega.Fee + 41, // 23: vega.Trade.seller_fee:type_name -> vega.Fee + 40, // 24: vega.TradeSet.trades:type_name -> vega.Trade + 1, // 25: vega.Candle.interval:type_name -> vega.Interval + 44, // 26: vega.MarketDepth.buy:type_name -> vega.PriceLevel + 44, // 27: vega.MarketDepth.sell:type_name -> vega.PriceLevel + 44, // 28: vega.MarketDepthUpdate.buy:type_name -> vega.PriceLevel + 44, // 29: vega.MarketDepthUpdate.sell:type_name -> vega.PriceLevel + 2, // 30: vega.Position.position_status:type_name -> vega.PositionStatus + 26, // 31: vega.Deposit.status:type_name -> vega.Deposit.Status + 27, // 32: vega.Withdrawal.status:type_name -> vega.Withdrawal.Status + 51, // 33: vega.Withdrawal.ext:type_name -> vega.WithdrawExt + 52, // 34: vega.WithdrawExt.erc20:type_name -> vega.Erc20WithdrawExt + 7, // 35: vega.Account.type:type_name -> vega.AccountType + 54, // 36: vega.Transfer.amount:type_name -> vega.FinancialAmount + 8, // 37: vega.Transfer.type:type_name -> vega.TransferType + 9, // 38: vega.DispatchStrategy.metric:type_name -> vega.DispatchMetric + 10, // 39: vega.DispatchStrategy.entity_scope:type_name -> vega.EntityScope + 11, // 40: vega.DispatchStrategy.individual_scope:type_name -> vega.IndividualScope + 12, // 41: vega.DispatchStrategy.distribution_strategy:type_name -> vega.DistributionStrategy + 57, // 42: vega.DispatchStrategy.rank_table:type_name -> vega.Rank + 53, // 43: vega.TransferRequest.from_account:type_name -> vega.Account + 53, // 44: vega.TransferRequest.to_account:type_name -> vega.Account + 8, // 45: vega.TransferRequest.type:type_name -> vega.TransferType + 7, // 46: vega.AccountDetails.type:type_name -> vega.AccountType + 59, // 47: vega.LedgerEntry.from_account:type_name -> vega.AccountDetails + 59, // 48: vega.LedgerEntry.to_account:type_name -> vega.AccountDetails + 8, // 49: vega.LedgerEntry.type:type_name -> vega.TransferType + 59, // 50: vega.PostTransferBalance.account:type_name -> vega.AccountDetails + 60, // 51: vega.LedgerMovement.entries:type_name -> vega.LedgerEntry + 61, // 52: vega.LedgerMovement.balances:type_name -> vega.PostTransferBalance + 16, // 53: vega.MarginLevels.margin_mode:type_name -> vega.MarginMode + 111, // 54: vega.PerpetualData.internal_composite_price_type:type_name -> vega.CompositePriceType + 68, // 55: vega.PerpetualData.internal_composite_price_state:type_name -> vega.CompositePriceState + 64, // 56: vega.ProductData.perpetual_data:type_name -> vega.PerpetualData + 112, // 57: vega.MarketData.market_trading_mode:type_name -> vega.Market.TradingMode + 3, // 58: vega.MarketData.trigger:type_name -> vega.AuctionTrigger + 3, // 59: vega.MarketData.extension_trigger:type_name -> vega.AuctionTrigger + 71, // 60: vega.MarketData.price_monitoring_bounds:type_name -> vega.PriceMonitoringBounds + 69, // 61: vega.MarketData.liquidity_provider_fee_share:type_name -> vega.LiquidityProviderFeeShare + 113, // 62: vega.MarketData.market_state:type_name -> vega.Market.State + 65, // 63: vega.MarketData.product_data:type_name -> vega.ProductData + 70, // 64: vega.MarketData.liquidity_provider_sla:type_name -> vega.LiquidityProviderSLA + 111, // 65: vega.MarketData.mark_price_type:type_name -> vega.CompositePriceType + 68, // 66: vega.MarketData.mark_price_state:type_name -> vega.CompositePriceState + 67, // 67: vega.CompositePriceState.price_sources:type_name -> vega.CompositePriceSource + 114, // 68: vega.PriceMonitoringBounds.trigger:type_name -> vega.PriceMonitoringTrigger + 4, // 69: vega.LiquidityOrder.reference:type_name -> vega.PeggedReference + 75, // 70: vega.LiquidityOrderReference.liquidity_order:type_name -> vega.LiquidityOrder + 76, // 71: vega.LiquidityProvision.sells:type_name -> vega.LiquidityOrderReference + 76, // 72: vega.LiquidityProvision.buys:type_name -> vega.LiquidityOrderReference + 28, // 73: vega.LiquidityProvision.status:type_name -> vega.LiquidityProvision.Status + 78, // 74: vega.EthereumL2Configs.configs:type_name -> vega.EthereumL2Config + 81, // 75: vega.EthereumConfig.collateral_bridge_contract:type_name -> vega.EthereumContractConfig + 81, // 76: vega.EthereumConfig.staking_bridge_contract:type_name -> vega.EthereumContractConfig + 81, // 77: vega.EthereumConfig.token_vesting_contract:type_name -> vega.EthereumContractConfig + 81, // 78: vega.EthereumConfig.multisig_control_contract:type_name -> vega.EthereumContractConfig + 82, // 79: vega.Epoch.timestamps:type_name -> vega.EpochTimestamps + 88, // 80: vega.Epoch.validators:type_name -> vega.Node + 91, // 81: vega.Epoch.delegations:type_name -> vega.Delegation + 83, // 82: vega.EpochParticipation.epoch:type_name -> vega.Epoch + 15, // 83: vega.RankingScore.previous_status:type_name -> vega.ValidatorNodeStatus + 15, // 84: vega.RankingScore.status:type_name -> vega.ValidatorNodeStatus + 15, // 85: vega.RewardScore.validator_status:type_name -> vega.ValidatorNodeStatus + 85, // 86: vega.Node.epoch_data:type_name -> vega.EpochData + 13, // 87: vega.Node.status:type_name -> vega.NodeStatus + 91, // 88: vega.Node.delegations:type_name -> vega.Delegation + 87, // 89: vega.Node.reward_score:type_name -> vega.RewardScore + 86, // 90: vega.Node.ranking_score:type_name -> vega.RankingScore + 89, // 91: vega.NodeData.tendermint_nodes:type_name -> vega.NodeSet + 89, // 92: vega.NodeData.ersatz_nodes:type_name -> vega.NodeSet + 89, // 93: vega.NodeData.pending_nodes:type_name -> vega.NodeSet + 96, // 94: vega.StateValueProposal.kvb:type_name -> vega.KeyValueBundle + 97, // 95: vega.KeyValueBundle.value:type_name -> vega.StateVarValue + 98, // 96: vega.StateVarValue.scalar_val:type_name -> vega.ScalarValue + 99, // 97: vega.StateVarValue.vector_val:type_name -> vega.VectorValue + 100, // 98: vega.StateVarValue.matrix_val:type_name -> vega.MatrixValue + 99, // 99: vega.MatrixValue.value:type_name -> vega.VectorValue + 103, // 100: vega.ReferralProgram.benefit_tiers:type_name -> vega.BenefitTier + 106, // 101: vega.ReferralProgram.staking_tiers:type_name -> vega.StakingTier + 105, // 102: vega.VestingBenefitTiers.tiers:type_name -> vega.VestingBenefitTier + 102, // 103: vega.VolumeDiscountProgram.benefit_tiers:type_name -> vega.VolumeBenefitTier + 109, // 104: vega.ActivityStreakBenefitTiers.tiers:type_name -> vega.ActivityStreakBenefitTier + 105, // [105:105] is the sub-list for method output_type + 105, // [105:105] is the sub-list for method input_type + 105, // [105:105] is the sub-list for extension type_name + 105, // [105:105] is the sub-list for extension extendee + 0, // [0:105] is the sub-list for field type_name } func init() { file_vega_vega_proto_init() } @@ -10638,7 +11606,7 @@ func file_vega_vega_proto_init() { file_vega_markets_proto_init() if !protoimpl.UnsafeEnabled { file_vega_vega_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopOrder); i { + switch v := v.(*PartyProfile); i { case 0: return &v.state case 1: @@ -10650,7 +11618,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Party); i { + switch v := v.(*Metadata); i { case 0: return &v.state case 1: @@ -10662,7 +11630,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RiskFactor); i { + switch v := v.(*StopOrder); i { case 0: return &v.state case 1: @@ -10674,7 +11642,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeggedOrder); i { + switch v := v.(*Party); i { case 0: return &v.state case 1: @@ -10686,7 +11654,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IcebergOrder); i { + switch v := v.(*RiskFactor); i { case 0: return &v.state case 1: @@ -10698,7 +11666,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Order); i { + switch v := v.(*PeggedOrder); i { case 0: return &v.state case 1: @@ -10710,7 +11678,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderCancellationConfirmation); i { + switch v := v.(*IcebergOrder); i { case 0: return &v.state case 1: @@ -10722,7 +11690,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderConfirmation); i { + switch v := v.(*Order); i { case 0: return &v.state case 1: @@ -10734,7 +11702,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuctionIndicativeState); i { + switch v := v.(*OrderCancellationConfirmation); i { case 0: return &v.state case 1: @@ -10746,7 +11714,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Trade); i { + switch v := v.(*OrderConfirmation); i { case 0: return &v.state case 1: @@ -10758,7 +11726,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Fee); i { + switch v := v.(*AuctionIndicativeState); i { case 0: return &v.state case 1: @@ -10770,7 +11738,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TradeSet); i { + switch v := v.(*Trade); i { case 0: return &v.state case 1: @@ -10782,7 +11750,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Candle); i { + switch v := v.(*Fee); i { case 0: return &v.state case 1: @@ -10794,7 +11762,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PriceLevel); i { + switch v := v.(*TradeSet); i { case 0: return &v.state case 1: @@ -10806,7 +11774,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarketDepth); i { + switch v := v.(*Candle); i { case 0: return &v.state case 1: @@ -10818,7 +11786,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarketDepthUpdate); i { + switch v := v.(*PriceLevel); i { case 0: return &v.state case 1: @@ -10830,7 +11798,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Position); i { + switch v := v.(*MarketDepth); i { case 0: return &v.state case 1: @@ -10842,7 +11810,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PositionTrade); i { + switch v := v.(*MarketDepthUpdate); i { case 0: return &v.state case 1: @@ -10854,7 +11822,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Deposit); i { + switch v := v.(*Position); i { case 0: return &v.state case 1: @@ -10866,7 +11834,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Withdrawal); i { + switch v := v.(*PositionTrade); i { case 0: return &v.state case 1: @@ -10878,7 +11846,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithdrawExt); i { + switch v := v.(*Deposit); i { case 0: return &v.state case 1: @@ -10890,7 +11858,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Erc20WithdrawExt); i { + switch v := v.(*Withdrawal); i { case 0: return &v.state case 1: @@ -10902,7 +11870,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Account); i { + switch v := v.(*WithdrawExt); i { case 0: return &v.state case 1: @@ -10914,7 +11882,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FinancialAmount); i { + switch v := v.(*Erc20WithdrawExt); i { case 0: return &v.state case 1: @@ -10926,7 +11894,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Transfer); i { + switch v := v.(*Account); i { case 0: return &v.state case 1: @@ -10938,7 +11906,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DispatchStrategy); i { + switch v := v.(*FinancialAmount); i { case 0: return &v.state case 1: @@ -10950,7 +11918,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Rank); i { + switch v := v.(*Transfer); i { case 0: return &v.state case 1: @@ -10962,7 +11930,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransferRequest); i { + switch v := v.(*DispatchStrategy); i { case 0: return &v.state case 1: @@ -10974,7 +11942,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountDetails); i { + switch v := v.(*Rank); i { case 0: return &v.state case 1: @@ -10986,7 +11954,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LedgerEntry); i { + switch v := v.(*TransferRequest); i { case 0: return &v.state case 1: @@ -10998,7 +11966,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostTransferBalance); i { + switch v := v.(*AccountDetails); i { case 0: return &v.state case 1: @@ -11010,7 +11978,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LedgerMovement); i { + switch v := v.(*LedgerEntry); i { case 0: return &v.state case 1: @@ -11022,7 +11990,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarginLevels); i { + switch v := v.(*PostTransferBalance); i { case 0: return &v.state case 1: @@ -11034,7 +12002,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PerpetualData); i { + switch v := v.(*LedgerMovement); i { case 0: return &v.state case 1: @@ -11046,7 +12014,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProductData); i { + switch v := v.(*MarginLevels); i { case 0: return &v.state case 1: @@ -11058,7 +12026,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarketData); i { + switch v := v.(*PerpetualData); i { case 0: return &v.state case 1: @@ -11070,7 +12038,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProviderFeeShare); i { + switch v := v.(*ProductData); i { case 0: return &v.state case 1: @@ -11082,7 +12050,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProviderSLA); i { + switch v := v.(*MarketData); i { case 0: return &v.state case 1: @@ -11094,7 +12062,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PriceMonitoringBounds); i { + switch v := v.(*CompositePriceSource); i { case 0: return &v.state case 1: @@ -11106,7 +12074,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrorDetail); i { + switch v := v.(*CompositePriceState); i { case 0: return &v.state case 1: @@ -11118,7 +12086,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NetworkParameter); i { + switch v := v.(*LiquidityProviderFeeShare); i { case 0: return &v.state case 1: @@ -11130,7 +12098,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NetworkLimits); i { + switch v := v.(*LiquidityProviderSLA); i { case 0: return &v.state case 1: @@ -11142,7 +12110,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityOrder); i { + switch v := v.(*PriceMonitoringBounds); i { case 0: return &v.state case 1: @@ -11154,7 +12122,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityOrderReference); i { + switch v := v.(*ErrorDetail); i { case 0: return &v.state case 1: @@ -11166,7 +12134,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiquidityProvision); i { + switch v := v.(*NetworkParameter); i { case 0: return &v.state case 1: @@ -11178,7 +12146,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthereumConfig); i { + switch v := v.(*NetworkLimits); i { case 0: return &v.state case 1: @@ -11190,7 +12158,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthereumContractConfig); i { + switch v := v.(*LiquidityOrder); i { case 0: return &v.state case 1: @@ -11202,7 +12170,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EpochTimestamps); i { + switch v := v.(*LiquidityOrderReference); i { case 0: return &v.state case 1: @@ -11214,7 +12182,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Epoch); i { + switch v := v.(*LiquidityProvision); i { case 0: return &v.state case 1: @@ -11226,7 +12194,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EpochParticipation); i { + switch v := v.(*EthereumL2Config); i { case 0: return &v.state case 1: @@ -11238,7 +12206,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EpochData); i { + switch v := v.(*EthereumL2Configs); i { case 0: return &v.state case 1: @@ -11250,7 +12218,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankingScore); i { + switch v := v.(*EthereumConfig); i { case 0: return &v.state case 1: @@ -11262,7 +12230,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RewardScore); i { + switch v := v.(*EthereumContractConfig); i { case 0: return &v.state case 1: @@ -11274,7 +12242,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Node); i { + switch v := v.(*EpochTimestamps); i { case 0: return &v.state case 1: @@ -11286,7 +12254,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeSet); i { + switch v := v.(*Epoch); i { case 0: return &v.state case 1: @@ -11298,7 +12266,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeData); i { + switch v := v.(*EpochParticipation); i { case 0: return &v.state case 1: @@ -11310,7 +12278,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Delegation); i { + switch v := v.(*EpochData); i { case 0: return &v.state case 1: @@ -11322,7 +12290,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Reward); i { + switch v := v.(*RankingScore); i { case 0: return &v.state case 1: @@ -11334,7 +12302,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RewardSummary); i { + switch v := v.(*RewardScore); i { case 0: return &v.state case 1: @@ -11346,7 +12314,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EpochRewardSummary); i { + switch v := v.(*Node); i { case 0: return &v.state case 1: @@ -11358,7 +12326,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateValueProposal); i { + switch v := v.(*NodeSet); i { case 0: return &v.state case 1: @@ -11370,7 +12338,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyValueBundle); i { + switch v := v.(*NodeData); i { case 0: return &v.state case 1: @@ -11382,7 +12350,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateVarValue); i { + switch v := v.(*Delegation); i { case 0: return &v.state case 1: @@ -11394,7 +12362,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScalarValue); i { + switch v := v.(*Reward); i { case 0: return &v.state case 1: @@ -11406,7 +12374,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VectorValue); i { + switch v := v.(*RewardSummary); i { case 0: return &v.state case 1: @@ -11418,7 +12386,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MatrixValue); i { + switch v := v.(*EpochRewardSummary); i { case 0: return &v.state case 1: @@ -11430,7 +12398,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReferralProgram); i { + switch v := v.(*StateValueProposal); i { case 0: return &v.state case 1: @@ -11442,7 +12410,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VolumeBenefitTier); i { + switch v := v.(*KeyValueBundle); i { case 0: return &v.state case 1: @@ -11454,7 +12422,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BenefitTier); i { + switch v := v.(*StateVarValue); i { case 0: return &v.state case 1: @@ -11466,7 +12434,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VestingBenefitTiers); i { + switch v := v.(*ScalarValue); i { case 0: return &v.state case 1: @@ -11478,7 +12446,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VestingBenefitTier); i { + switch v := v.(*VectorValue); i { case 0: return &v.state case 1: @@ -11490,7 +12458,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StakingTier); i { + switch v := v.(*MatrixValue); i { case 0: return &v.state case 1: @@ -11502,7 +12470,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VolumeDiscountProgram); i { + switch v := v.(*ReferralProgram); i { case 0: return &v.state case 1: @@ -11514,7 +12482,7 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActivityStreakBenefitTiers); i { + switch v := v.(*VolumeBenefitTier); i { case 0: return &v.state case 1: @@ -11526,6 +12494,78 @@ func file_vega_vega_proto_init() { } } file_vega_vega_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BenefitTier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_vega_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VestingBenefitTiers); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_vega_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VestingBenefitTier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_vega_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StakingTier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_vega_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VolumeDiscountProgram); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_vega_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActivityStreakBenefitTiers); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vega_vega_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActivityStreakBenefitTier); i { case 0: return &v.state @@ -11537,22 +12577,36 @@ func file_vega_vega_proto_init() { return nil } } + file_vega_vega_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopOrder_SizeOverrideValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } - file_vega_vega_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_vega_vega_proto_msgTypes[2].OneofWrappers = []interface{}{ (*StopOrder_Price)(nil), (*StopOrder_TrailingPercentOffset)(nil), } - file_vega_vega_proto_msgTypes[5].OneofWrappers = []interface{}{} - file_vega_vega_proto_msgTypes[20].OneofWrappers = []interface{}{ + file_vega_vega_proto_msgTypes[7].OneofWrappers = []interface{}{} + file_vega_vega_proto_msgTypes[22].OneofWrappers = []interface{}{ (*WithdrawExt_Erc20)(nil), } - file_vega_vega_proto_msgTypes[28].OneofWrappers = []interface{}{} - file_vega_vega_proto_msgTypes[34].OneofWrappers = []interface{}{ + file_vega_vega_proto_msgTypes[30].OneofWrappers = []interface{}{} + file_vega_vega_proto_msgTypes[31].OneofWrappers = []interface{}{} + file_vega_vega_proto_msgTypes[36].OneofWrappers = []interface{}{ (*ProductData_PerpetualData)(nil), } - file_vega_vega_proto_msgTypes[35].OneofWrappers = []interface{}{} - file_vega_vega_proto_msgTypes[54].OneofWrappers = []interface{}{} - file_vega_vega_proto_msgTypes[62].OneofWrappers = []interface{}{ + file_vega_vega_proto_msgTypes[37].OneofWrappers = []interface{}{} + file_vega_vega_proto_msgTypes[60].OneofWrappers = []interface{}{} + file_vega_vega_proto_msgTypes[63].OneofWrappers = []interface{}{} + file_vega_vega_proto_msgTypes[68].OneofWrappers = []interface{}{ (*StateVarValue_ScalarVal)(nil), (*StateVarValue_VectorVal)(nil), (*StateVarValue_MatrixVal)(nil), @@ -11562,8 +12616,8 @@ func file_vega_vega_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vega_vega_proto_rawDesc, - NumEnums: 27, - NumMessages: 75, + NumEnums: 29, + NumMessages: 82, NumExtensions: 0, NumServices: 0, }, diff --git a/protos/vega/wallet/v1/wallet.pb.go b/protos/vega/wallet/v1/wallet.pb.go index d824be2043..155cc7e127 100644 --- a/protos/vega/wallet/v1/wallet.pb.go +++ b/protos/vega/wallet/v1/wallet.pb.go @@ -50,6 +50,10 @@ type SubmitTransactionRequest struct { // *SubmitTransactionRequest_CreateReferralSet // *SubmitTransactionRequest_UpdateReferralSet // *SubmitTransactionRequest_ApplyReferralCode + // *SubmitTransactionRequest_UpdateMarginMode + // *SubmitTransactionRequest_JoinTeam + // *SubmitTransactionRequest_BatchProposalSubmission + // *SubmitTransactionRequest_UpdatePartyProfile // *SubmitTransactionRequest_NodeVote // *SubmitTransactionRequest_NodeSignature // *SubmitTransactionRequest_ChainEvent @@ -256,6 +260,34 @@ func (x *SubmitTransactionRequest) GetApplyReferralCode() *v1.ApplyReferralCode return nil } +func (x *SubmitTransactionRequest) GetUpdateMarginMode() *v1.UpdateMarginMode { + if x, ok := x.GetCommand().(*SubmitTransactionRequest_UpdateMarginMode); ok { + return x.UpdateMarginMode + } + return nil +} + +func (x *SubmitTransactionRequest) GetJoinTeam() *v1.JoinTeam { + if x, ok := x.GetCommand().(*SubmitTransactionRequest_JoinTeam); ok { + return x.JoinTeam + } + return nil +} + +func (x *SubmitTransactionRequest) GetBatchProposalSubmission() *v1.BatchProposalSubmission { + if x, ok := x.GetCommand().(*SubmitTransactionRequest_BatchProposalSubmission); ok { + return x.BatchProposalSubmission + } + return nil +} + +func (x *SubmitTransactionRequest) GetUpdatePartyProfile() *v1.UpdatePartyProfile { + if x, ok := x.GetCommand().(*SubmitTransactionRequest_UpdatePartyProfile); ok { + return x.UpdatePartyProfile + } + return nil +} + func (x *SubmitTransactionRequest) GetNodeVote() *v1.NodeVote { if x, ok := x.GetCommand().(*SubmitTransactionRequest_NodeVote); ok { return x.NodeVote @@ -411,6 +443,22 @@ type SubmitTransactionRequest_ApplyReferralCode struct { ApplyReferralCode *v1.ApplyReferralCode `protobuf:"bytes,1020,opt,name=apply_referral_code,json=applyReferralCode,proto3,oneof"` } +type SubmitTransactionRequest_UpdateMarginMode struct { + UpdateMarginMode *v1.UpdateMarginMode `protobuf:"bytes,1021,opt,name=update_margin_mode,json=updateMarginMode,proto3,oneof"` +} + +type SubmitTransactionRequest_JoinTeam struct { + JoinTeam *v1.JoinTeam `protobuf:"bytes,1022,opt,name=join_team,json=joinTeam,proto3,oneof"` +} + +type SubmitTransactionRequest_BatchProposalSubmission struct { + BatchProposalSubmission *v1.BatchProposalSubmission `protobuf:"bytes,1023,opt,name=batch_proposal_submission,json=batchProposalSubmission,proto3,oneof"` +} + +type SubmitTransactionRequest_UpdatePartyProfile struct { + UpdatePartyProfile *v1.UpdatePartyProfile `protobuf:"bytes,1024,opt,name=update_party_profile,json=updatePartyProfile,proto3,oneof"` +} + type SubmitTransactionRequest_NodeVote struct { // Validator commands NodeVote *v1.NodeVote `protobuf:"bytes,2002,opt,name=node_vote,json=nodeVote,proto3,oneof"` @@ -494,6 +542,14 @@ func (*SubmitTransactionRequest_UpdateReferralSet) isSubmitTransactionRequest_Co func (*SubmitTransactionRequest_ApplyReferralCode) isSubmitTransactionRequest_Command() {} +func (*SubmitTransactionRequest_UpdateMarginMode) isSubmitTransactionRequest_Command() {} + +func (*SubmitTransactionRequest_JoinTeam) isSubmitTransactionRequest_Command() {} + +func (*SubmitTransactionRequest_BatchProposalSubmission) isSubmitTransactionRequest_Command() {} + +func (*SubmitTransactionRequest_UpdatePartyProfile) isSubmitTransactionRequest_Command() {} + func (*SubmitTransactionRequest_NodeVote) isSubmitTransactionRequest_Command() {} func (*SubmitTransactionRequest_NodeSignature) isSubmitTransactionRequest_Command() {} @@ -526,7 +582,7 @@ var file_vega_wallet_v1_wallet_proto_rawDesc = []byte{ 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x16, 0x0a, 0x18, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdd, 0x18, 0x0a, 0x18, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, @@ -646,67 +702,89 @@ var file_vega_wallet_v1_wallet_proto_rawDesc = []byte{ 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x11, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, - 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x76, 0x6f, - 0x74, 0x65, 0x18, 0xd2, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, - 0x65, 0x56, 0x6f, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x74, - 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0xd3, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, - 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, - 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x6e, - 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x0b, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0xd4, 0x0f, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5c, - 0x0a, 0x15, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xd5, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0xfd, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x6a, 0x6f, + 0x69, 0x6e, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0xfe, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x13, 0x6b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x17, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0xd6, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x15, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x12, 0x58, 0x0a, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x68, 0x65, - 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0xd7, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x65, 0x61, 0x72, 0x74, - 0x62, 0x65, 0x61, 0x74, 0x48, 0x00, 0x52, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x75, 0x0a, 0x1e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, - 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xd8, 0x0f, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, + 0x31, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x65, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x08, 0x6a, 0x6f, + 0x69, 0x6e, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x68, 0x0a, 0x19, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0xff, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, + 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x17, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x59, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, + 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x80, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x18, 0xd2, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, + 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0xd3, 0x0f, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x18, 0xd4, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x15, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x6f, 0x74, 0x61, + 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xd5, 0x0f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x13, 0x6b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1b, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, - 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x68, 0x0a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, - 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0xd9, - 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x48, 0x00, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x4f, 0x0a, 0x10, 0x69, - 0x73, 0x73, 0x75, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0xda, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x69, 0x73, 0x73, - 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x16, - 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x75, 0x62, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xb9, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, - 0x61, 0x74, 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, - 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4a, 0x06, 0x08, 0xd1, 0x0f, 0x10, 0xd2, 0x0f, - 0x42, 0x31, 0x5a, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x17, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0xd6, 0x0f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, + 0x15, 0x73, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x58, 0x0a, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0xd7, 0x0f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x48, 0x00, 0x52, 0x12, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, + 0x12, 0x75, 0x0a, 0x1e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0xd8, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x65, 0x67, 0x61, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1b, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x18, 0xd9, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x76, 0x65, + 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x12, 0x4f, 0x0a, 0x10, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0xda, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x73, 0x73, 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x48, + 0x00, 0x52, 0x0f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x16, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xb9, 0x17, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4a, 0x06, + 0x08, 0xd1, 0x0f, 0x10, 0xd2, 0x0f, 0x42, 0x31, 0x5a, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x76, + 0x65, 0x67, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, + 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -744,16 +822,20 @@ var file_vega_wallet_v1_wallet_proto_goTypes = []interface{}{ (*v1.CreateReferralSet)(nil), // 18: vega.commands.v1.CreateReferralSet (*v1.UpdateReferralSet)(nil), // 19: vega.commands.v1.UpdateReferralSet (*v1.ApplyReferralCode)(nil), // 20: vega.commands.v1.ApplyReferralCode - (*v1.NodeVote)(nil), // 21: vega.commands.v1.NodeVote - (*v1.NodeSignature)(nil), // 22: vega.commands.v1.NodeSignature - (*v1.ChainEvent)(nil), // 23: vega.commands.v1.ChainEvent - (*v1.KeyRotateSubmission)(nil), // 24: vega.commands.v1.KeyRotateSubmission - (*v1.StateVariableProposal)(nil), // 25: vega.commands.v1.StateVariableProposal - (*v1.ValidatorHeartbeat)(nil), // 26: vega.commands.v1.ValidatorHeartbeat - (*v1.EthereumKeyRotateSubmission)(nil), // 27: vega.commands.v1.EthereumKeyRotateSubmission - (*v1.ProtocolUpgradeProposal)(nil), // 28: vega.commands.v1.ProtocolUpgradeProposal - (*v1.IssueSignatures)(nil), // 29: vega.commands.v1.IssueSignatures - (*v1.OracleDataSubmission)(nil), // 30: vega.commands.v1.OracleDataSubmission + (*v1.UpdateMarginMode)(nil), // 21: vega.commands.v1.UpdateMarginMode + (*v1.JoinTeam)(nil), // 22: vega.commands.v1.JoinTeam + (*v1.BatchProposalSubmission)(nil), // 23: vega.commands.v1.BatchProposalSubmission + (*v1.UpdatePartyProfile)(nil), // 24: vega.commands.v1.UpdatePartyProfile + (*v1.NodeVote)(nil), // 25: vega.commands.v1.NodeVote + (*v1.NodeSignature)(nil), // 26: vega.commands.v1.NodeSignature + (*v1.ChainEvent)(nil), // 27: vega.commands.v1.ChainEvent + (*v1.KeyRotateSubmission)(nil), // 28: vega.commands.v1.KeyRotateSubmission + (*v1.StateVariableProposal)(nil), // 29: vega.commands.v1.StateVariableProposal + (*v1.ValidatorHeartbeat)(nil), // 30: vega.commands.v1.ValidatorHeartbeat + (*v1.EthereumKeyRotateSubmission)(nil), // 31: vega.commands.v1.EthereumKeyRotateSubmission + (*v1.ProtocolUpgradeProposal)(nil), // 32: vega.commands.v1.ProtocolUpgradeProposal + (*v1.IssueSignatures)(nil), // 33: vega.commands.v1.IssueSignatures + (*v1.OracleDataSubmission)(nil), // 34: vega.commands.v1.OracleDataSubmission } var file_vega_wallet_v1_wallet_proto_depIdxs = []int32{ 1, // 0: vega.wallet.v1.SubmitTransactionRequest.order_submission:type_name -> vega.commands.v1.OrderSubmission @@ -776,21 +858,25 @@ var file_vega_wallet_v1_wallet_proto_depIdxs = []int32{ 18, // 17: vega.wallet.v1.SubmitTransactionRequest.create_referral_set:type_name -> vega.commands.v1.CreateReferralSet 19, // 18: vega.wallet.v1.SubmitTransactionRequest.update_referral_set:type_name -> vega.commands.v1.UpdateReferralSet 20, // 19: vega.wallet.v1.SubmitTransactionRequest.apply_referral_code:type_name -> vega.commands.v1.ApplyReferralCode - 21, // 20: vega.wallet.v1.SubmitTransactionRequest.node_vote:type_name -> vega.commands.v1.NodeVote - 22, // 21: vega.wallet.v1.SubmitTransactionRequest.node_signature:type_name -> vega.commands.v1.NodeSignature - 23, // 22: vega.wallet.v1.SubmitTransactionRequest.chain_event:type_name -> vega.commands.v1.ChainEvent - 24, // 23: vega.wallet.v1.SubmitTransactionRequest.key_rotate_submission:type_name -> vega.commands.v1.KeyRotateSubmission - 25, // 24: vega.wallet.v1.SubmitTransactionRequest.state_variable_proposal:type_name -> vega.commands.v1.StateVariableProposal - 26, // 25: vega.wallet.v1.SubmitTransactionRequest.validator_heartbeat:type_name -> vega.commands.v1.ValidatorHeartbeat - 27, // 26: vega.wallet.v1.SubmitTransactionRequest.ethereum_key_rotate_submission:type_name -> vega.commands.v1.EthereumKeyRotateSubmission - 28, // 27: vega.wallet.v1.SubmitTransactionRequest.protocol_upgrade_proposal:type_name -> vega.commands.v1.ProtocolUpgradeProposal - 29, // 28: vega.wallet.v1.SubmitTransactionRequest.issue_signatures:type_name -> vega.commands.v1.IssueSignatures - 30, // 29: vega.wallet.v1.SubmitTransactionRequest.oracle_data_submission:type_name -> vega.commands.v1.OracleDataSubmission - 30, // [30:30] is the sub-list for method output_type - 30, // [30:30] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 30, // [30:30] is the sub-list for extension extendee - 0, // [0:30] is the sub-list for field type_name + 21, // 20: vega.wallet.v1.SubmitTransactionRequest.update_margin_mode:type_name -> vega.commands.v1.UpdateMarginMode + 22, // 21: vega.wallet.v1.SubmitTransactionRequest.join_team:type_name -> vega.commands.v1.JoinTeam + 23, // 22: vega.wallet.v1.SubmitTransactionRequest.batch_proposal_submission:type_name -> vega.commands.v1.BatchProposalSubmission + 24, // 23: vega.wallet.v1.SubmitTransactionRequest.update_party_profile:type_name -> vega.commands.v1.UpdatePartyProfile + 25, // 24: vega.wallet.v1.SubmitTransactionRequest.node_vote:type_name -> vega.commands.v1.NodeVote + 26, // 25: vega.wallet.v1.SubmitTransactionRequest.node_signature:type_name -> vega.commands.v1.NodeSignature + 27, // 26: vega.wallet.v1.SubmitTransactionRequest.chain_event:type_name -> vega.commands.v1.ChainEvent + 28, // 27: vega.wallet.v1.SubmitTransactionRequest.key_rotate_submission:type_name -> vega.commands.v1.KeyRotateSubmission + 29, // 28: vega.wallet.v1.SubmitTransactionRequest.state_variable_proposal:type_name -> vega.commands.v1.StateVariableProposal + 30, // 29: vega.wallet.v1.SubmitTransactionRequest.validator_heartbeat:type_name -> vega.commands.v1.ValidatorHeartbeat + 31, // 30: vega.wallet.v1.SubmitTransactionRequest.ethereum_key_rotate_submission:type_name -> vega.commands.v1.EthereumKeyRotateSubmission + 32, // 31: vega.wallet.v1.SubmitTransactionRequest.protocol_upgrade_proposal:type_name -> vega.commands.v1.ProtocolUpgradeProposal + 33, // 32: vega.wallet.v1.SubmitTransactionRequest.issue_signatures:type_name -> vega.commands.v1.IssueSignatures + 34, // 33: vega.wallet.v1.SubmitTransactionRequest.oracle_data_submission:type_name -> vega.commands.v1.OracleDataSubmission + 34, // [34:34] is the sub-list for method output_type + 34, // [34:34] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name } func init() { file_vega_wallet_v1_wallet_proto_init() } @@ -833,6 +919,10 @@ func file_vega_wallet_v1_wallet_proto_init() { (*SubmitTransactionRequest_CreateReferralSet)(nil), (*SubmitTransactionRequest_UpdateReferralSet)(nil), (*SubmitTransactionRequest_ApplyReferralCode)(nil), + (*SubmitTransactionRequest_UpdateMarginMode)(nil), + (*SubmitTransactionRequest_JoinTeam)(nil), + (*SubmitTransactionRequest_BatchProposalSubmission)(nil), + (*SubmitTransactionRequest_UpdatePartyProfile)(nil), (*SubmitTransactionRequest_NodeVote)(nil), (*SubmitTransactionRequest_NodeSignature)(nil), (*SubmitTransactionRequest_ChainEvent)(nil), diff --git a/script/gettools.sh b/script/gettools.sh index 4cf1d6289a..e6437aa9f6 100755 --- a/script/gettools.sh +++ b/script/gettools.sh @@ -7,7 +7,7 @@ github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema@1.3.7 github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.7.3 github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.7.3 github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.5.1 -github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.2 +github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2 " # Note: Make sure the above tools and versions match the ones in devops-infra/docker/cipipeline/Dockerfile diff --git a/vegatools/checkpoint/parse.go b/vegatools/checkpoint/parse.go index f06deb6081..a9fc80b061 100644 --- a/vegatools/checkpoint/parse.go +++ b/vegatools/checkpoint/parse.go @@ -21,11 +21,10 @@ import ( "log" "os" - "google.golang.org/protobuf/reflect/protoreflect" - "code.vegaprotocol.io/vega/libs/proto" - checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" + + "google.golang.org/protobuf/reflect/protoreflect" ) var ( diff --git a/vegatools/checkpoint/type.go b/vegatools/checkpoint/type.go index 023f8a21b6..7340e0fcf8 100644 --- a/vegatools/checkpoint/type.go +++ b/vegatools/checkpoint/type.go @@ -23,8 +23,6 @@ import ( "strings" "time" - "google.golang.org/protobuf/reflect/protoreflect" - "code.vegaprotocol.io/vega/core/types" "code.vegaprotocol.io/vega/protos/vega" checkpoint "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1" @@ -33,6 +31,7 @@ import ( "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "golang.org/x/crypto/sha3" + "google.golang.org/protobuf/reflect/protoreflect" ) type all struct { @@ -264,8 +263,6 @@ func dummy() *all { TimeWindow: 10, ScalingFactor: 0.7, }, - TriggeringRatio: "0.5", - AuctionExtension: 10, }, RiskParameters: &vega.NewMarketConfiguration_LogNormal{ LogNormal: &vega.LogNormalRiskModel{ diff --git a/vegatools/checktx/check_test.go b/vegatools/checktx/check_test.go index 1baba29803..d403537024 100644 --- a/vegatools/checktx/check_test.go +++ b/vegatools/checktx/check_test.go @@ -21,10 +21,9 @@ import ( "path" "testing" - "github.com/golang/protobuf/jsonpb" - v1 "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/golang/protobuf/jsonpb" "github.com/stretchr/testify/assert" ) diff --git a/vegatools/events/events.go b/vegatools/events/events.go index 8b124a31de..d6003634f2 100644 --- a/vegatools/events/events.go +++ b/vegatools/events/events.go @@ -1,3 +1,18 @@ +// Copyright (C) 2023 Gobalsky Labs Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + package events import ( @@ -8,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/datanode/broker" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" ) diff --git a/vegatools/snapshotdb/snapshotdb.go b/vegatools/snapshotdb/snapshotdb.go index a0c32bd742..377694d51e 100644 --- a/vegatools/snapshotdb/snapshotdb.go +++ b/vegatools/snapshotdb/snapshotdb.go @@ -23,15 +23,18 @@ import ( "os" "sort" + metadatadb "code.vegaprotocol.io/vega/core/snapshot/databases/metadata" + snapshotdb "code.vegaprotocol.io/vega/core/snapshot/databases/snapshot" + "code.vegaprotocol.io/vega/core/types" + "code.vegaprotocol.io/vega/paths" + snapshotpb "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" + cometbftdb "github.com/cometbft/cometbft-db" "github.com/cosmos/iavl" "github.com/gogo/protobuf/jsonpb" pb "github.com/gogo/protobuf/proto" "github.com/syndtr/goleveldb/leveldb/opt" "google.golang.org/protobuf/proto" - - "code.vegaprotocol.io/vega/core/types" - snapshot "code.vegaprotocol.io/vega/protos/vega/snapshot/v1" ) // Data is a representation of the information we scrape from the avl tree. @@ -153,10 +156,11 @@ func SavePayloadsToFile(dbPath string, outputPath string, heightToOutput uint64) payloads, _, _ := getAllPayloads(tree) return writePayloads(payloads, outputPath) } + return errors.New("failed to find snapshot for block-height") } -func writePayloads(payloads []*snapshot.Payload, outputPath string) error { +func writePayloads(payloads []*snapshotpb.Payload, outputPath string) error { f, err := os.Create(outputPath) if err != nil { return err @@ -167,7 +171,7 @@ func writePayloads(payloads []*snapshot.Payload, outputPath string) error { m := jsonpb.Marshaler{Indent: " "} payloadData := struct { - Data []*snapshot.Payload `json:"data,omitempty" protobuf:"bytes,1,rep,name=data"` + Data []*snapshotpb.Payload `json:"data,omitempty" protobuf:"bytes,1,rep,name=data"` pb.Message }{ Data: payloads, @@ -189,9 +193,9 @@ func writePayloads(payloads []*snapshot.Payload, outputPath string) error { return nil } -func getAllPayloads(tree *iavl.MutableTree) (payloads []*snapshot.Payload, blockHeight uint64, err error) { +func getAllPayloads(tree *iavl.MutableTree) (payloads []*snapshotpb.Payload, blockHeight uint64, err error) { _, err = tree.Iterate(func(key []byte, val []byte) bool { - p := new(snapshot.Payload) + p := new(snapshotpb.Payload) if err = proto.Unmarshal(val, p); err != nil { return true } @@ -209,3 +213,89 @@ func getAllPayloads(tree *iavl.MutableTree) (payloads []*snapshot.Payload, block return payloads, blockHeight, err } + +// SetProtocolUpgrade will take the latest snapshot in the tree and rewrites it with the protocolUpgrade flag set to +// true so that we can pretend that the snapshot was taken for a upgrade to help with testing. +func SetProtocolUpgrade(vegaPaths paths.Paths) error { + snap, _ := snapshotdb.NewLevelDBDatabase(vegaPaths) + meta, _ := metadatadb.NewLevelDBDatabase(vegaPaths) + defer snap.Close() + defer meta.Close() + + tree, err := iavl.NewMutableTree(snap, 0, false) + if err != nil { + return err + } + + if _, err = tree.Load(); err != nil { + return err + } + + tree.LazyLoadVersion(-1) + oldVersion := tree.Version() + + var perr error + var k, v []byte + + _, err = tree.Iterate(func(key []byte, val []byte) bool { + p := &snapshotpb.Payload{} + if perr = proto.Unmarshal(val, p); perr != nil { + return true + } + + appState := p.GetAppState() + if appState == nil { + return false + } + + // change the value + appState.ProtocolUpgrade = true + + // marshal it up again + pp := &snapshotpb.Payload{ + Data: &snapshotpb.Payload_AppState{ + AppState: appState, + }, + } + k = key + v, perr = proto.Marshal(pp) + return true + }) + + if err != nil { + return fmt.Errorf("failed to traverse snapshot payloads: %w", err) + } + + if perr != nil { + return fmt.Errorf("failed to unpack appstate payload: %w", perr) + } + + if _, err = tree.Set(k, v); err != nil { + return fmt.Errorf("failed to save new appstate to snapshot: %w", err) + } + + _, newVersion, err := tree.SaveVersion() + if err != nil { + return err + } + + // delete the old version so that we do not have two with the same block-height + tree.DeleteVersion(oldVersion) + + // update the version <-> block-height map in the meta-data + metaSnap, err := meta.Load(oldVersion) + if err != nil { + return err + } + + // delete the meta-data pegged against the old version + if err := meta.Delete(oldVersion); err != nil { + return err + } + + // new it against the new version + if err := meta.Save(newVersion, metaSnap); err != nil { + return err + } + return nil +} diff --git a/vegatools/stream/stream.go b/vegatools/stream/stream.go index e4ac393a05..0735210ecc 100644 --- a/vegatools/stream/stream.go +++ b/vegatools/stream/stream.go @@ -27,11 +27,11 @@ import ( "syscall" "time" - "github.com/golang/protobuf/jsonpb" - "google.golang.org/grpc" - api "code.vegaprotocol.io/vega/protos/vega/api/v1" eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1" + + "github.com/golang/protobuf/jsonpb" + "google.golang.org/grpc" ) func connect(ctx context.Context, diff --git a/version/version.go b/version/version.go index 23992fccf1..413a48275c 100644 --- a/version/version.go +++ b/version/version.go @@ -22,7 +22,7 @@ import ( var ( cliVersionHash = "" - cliVersion = "v0.73.0" + cliVersion = "v0.74.0" ) func init() { diff --git a/visor/client/client.go b/visor/client/client.go index 0be358ad3b..9af77846de 100644 --- a/visor/client/client.go +++ b/visor/client/client.go @@ -20,7 +20,6 @@ import ( "code.vegaprotocol.io/vega/core/admin" "code.vegaprotocol.io/vega/core/types" - "code.vegaprotocol.io/vega/logging" ) type AdminClient interface { @@ -31,18 +30,14 @@ type Factory interface { GetClient(socketPath, httpPath string) AdminClient } -type clientFactory struct { - log *logging.Logger -} +type clientFactory struct{} -func NewClientFactory(log *logging.Logger) Factory { - return &clientFactory{ - log: log, - } +func NewClientFactory() Factory { + return &clientFactory{} } func (cf *clientFactory) GetClient(socketPath, httpPath string) AdminClient { - return admin.NewClient(cf.log, admin.Config{ + return admin.NewClient(admin.Config{ Server: admin.ServerConfig{ SocketPath: socketPath, HTTPPath: httpPath, diff --git a/visor/config/visor_config.go b/visor/config/visor_config.go index 2d10338c09..9fa176cb6e 100644 --- a/visor/config/visor_config.go +++ b/visor/config/visor_config.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/paths" + "github.com/fsnotify/fsnotify" "golang.org/x/sync/errgroup" ) @@ -198,7 +199,8 @@ type VisorConfigFile struct { func parseAndValidateVisorConfigFile(path string) (*VisorConfigFile, error) { conf := VisorConfigFile{} if err := paths.ReadStructuredFile(path, &conf); err != nil { - return nil, fmt.Errorf("failed to parse VisorConfig: %w", err) + // Do not wrap error as underlying errors are meaningful enough. + return nil, err } return &conf, nil @@ -242,7 +244,7 @@ func NewVisorConfig(log *logging.Logger, homePath string) (*VisorConfig, error) dataFile, err := parseAndValidateVisorConfigFile(configPath) if err != nil { - return nil, fmt.Errorf("failed to parse config file: %w", err) + return nil, fmt.Errorf("could not retrieve configuration at %q: %w", configPath, err) } return &VisorConfig{ @@ -257,7 +259,7 @@ func (pc *VisorConfig) reload() error { pc.log.Info("Reloading config") dataFile, err := parseAndValidateVisorConfigFile(pc.configPath) if err != nil { - return fmt.Errorf("failed to parse config: %w", err) + return fmt.Errorf("could not retrieve configuration: %w", err) } pc.mut.Lock() diff --git a/visor/github/assets_fetcher.go b/visor/github/assets_fetcher.go index 620ca3422b..c241f0585d 100644 --- a/visor/github/assets_fetcher.go +++ b/visor/github/assets_fetcher.go @@ -26,6 +26,7 @@ import ( "time" "code.vegaprotocol.io/vega/visor/utils" + "github.com/google/go-github/v50/github" "golang.org/x/sync/errgroup" ) diff --git a/visor/visor.go b/visor/visor.go index 4edc0c5e69..eb0cfb8918 100644 --- a/visor/visor.go +++ b/visor/visor.go @@ -51,12 +51,13 @@ func NewVisor(ctx context.Context, log *logging.Logger, clientFactory client.Fac } if !homeExists { - return nil, fmt.Errorf("home folder %q does not exists, it can initiated with init command", homePath) + return nil, fmt.Errorf("visor is not initialized, call the `init` command first") } visorConf, err := config.NewVisorConfig(log, homePath) if err != nil { - return nil, fmt.Errorf("failed to get config: %w", err) + // Do not wrap error as underlying errors are meaningful enough. + return nil, err } currentFolderExists, err := utils.PathExists(visorConf.CurrentRunConfigPath()) @@ -171,9 +172,12 @@ func (v *Visor) Run(ctx context.Context) error { } } - v.log.Debug("failed to get upgrade status from API", logging.Error(err)) + v.log.Debug("Failed to get upgrade status from API", logging.Error(err)) + numOfUpgradeStatusErrs++ + v.log.Info("Still waiting for vega to start...", logging.Int("attemptLeft", maxUpgradeStatusErrs-numOfUpgradeStatusErrs)) + break } diff --git a/wallet/api/admin_annotate_key.go b/wallet/api/admin_annotate_key.go index 322c7d082b..28743d9d49 100644 --- a/wallet/api/admin_annotate_key.go +++ b/wallet/api/admin_annotate_key.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/libs/jsonrpc" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_annotate_key_test.go b/wallet/api/admin_annotate_key_test.go index 84ee1a032c..d494022862 100644 --- a/wallet/api/admin_annotate_key_test.go +++ b/wallet/api/admin_annotate_key_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_check_transaction.go b/wallet/api/admin_check_transaction.go index 0a6d86bd43..0aefa58b6a 100644 --- a/wallet/api/admin_check_transaction.go +++ b/wallet/api/admin_check_transaction.go @@ -30,6 +30,7 @@ import ( walletpb "code.vegaprotocol.io/vega/protos/vega/wallet/v1" "code.vegaprotocol.io/vega/wallet/api/node" wcommands "code.vegaprotocol.io/vega/wallet/commands" + "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "github.com/mitchellh/mapstructure" diff --git a/wallet/api/admin_check_transaction_test.go b/wallet/api/admin_check_transaction_test.go index decfdd84a2..61ea93468b 100644 --- a/wallet/api/admin_check_transaction_test.go +++ b/wallet/api/admin_check_transaction_test.go @@ -30,6 +30,7 @@ import ( walletnode "code.vegaprotocol.io/vega/wallet/api/node" nodemocks "code.vegaprotocol.io/vega/wallet/api/node/mocks" "code.vegaprotocol.io/vega/wallet/api/node/types" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" ) diff --git a/wallet/api/admin_close_connection.go b/wallet/api/admin_close_connection.go index fcf7a28827..ff230f759a 100644 --- a/wallet/api/admin_close_connection.go +++ b/wallet/api/admin_close_connection.go @@ -19,6 +19,7 @@ import ( "context" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_close_connection_test.go b/wallet/api/admin_close_connection_test.go index 23cff56d2e..a9ec5e7981 100644 --- a/wallet/api/admin_close_connection_test.go +++ b/wallet/api/admin_close_connection_test.go @@ -23,6 +23,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/wallet/api/admin_close_connections_to_hostname.go b/wallet/api/admin_close_connections_to_hostname.go index eec542236f..fe93d819e1 100644 --- a/wallet/api/admin_close_connections_to_hostname.go +++ b/wallet/api/admin_close_connections_to_hostname.go @@ -19,6 +19,7 @@ import ( "context" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_close_connections_to_hostname_test.go b/wallet/api/admin_close_connections_to_hostname_test.go index 3b7bc2413b..2b95a5c991 100644 --- a/wallet/api/admin_close_connections_to_hostname_test.go +++ b/wallet/api/admin_close_connections_to_hostname_test.go @@ -23,6 +23,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/wallet/api/admin_close_connections_to_wallet.go b/wallet/api/admin_close_connections_to_wallet.go index 19a4dcd7f6..fa549d7606 100644 --- a/wallet/api/admin_close_connections_to_wallet.go +++ b/wallet/api/admin_close_connections_to_wallet.go @@ -19,6 +19,7 @@ import ( "context" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_close_connections_to_wallet_test.go b/wallet/api/admin_close_connections_to_wallet_test.go index b32deb471f..0ef1ceb545 100644 --- a/wallet/api/admin_close_connections_to_wallet_test.go +++ b/wallet/api/admin_close_connections_to_wallet_test.go @@ -23,6 +23,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/wallet/api/admin_create_wallet.go b/wallet/api/admin_create_wallet.go index 660867cc95..718f0516af 100644 --- a/wallet/api/admin_create_wallet.go +++ b/wallet/api/admin_create_wallet.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/libs/jsonrpc" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_create_wallet_test.go b/wallet/api/admin_create_wallet_test.go index e6d550f84d..de75abcd23 100644 --- a/wallet/api/admin_create_wallet_test.go +++ b/wallet/api/admin_create_wallet_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_describe_key.go b/wallet/api/admin_describe_key.go index 5d6316d7f0..bc02e5d0d4 100644 --- a/wallet/api/admin_describe_key.go +++ b/wallet/api/admin_describe_key.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/libs/jsonrpc" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_describe_key_test.go b/wallet/api/admin_describe_key_test.go index a4e293f8c4..9fc944c57c 100644 --- a/wallet/api/admin_describe_key_test.go +++ b/wallet/api/admin_describe_key_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_describe_network.go b/wallet/api/admin_describe_network.go index ad779b7c3e..c9375e8617 100644 --- a/wallet/api/admin_describe_network.go +++ b/wallet/api/admin_describe_network.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_describe_network_test.go b/wallet/api/admin_describe_network_test.go index 7871576c4a..d7372c60c9 100644 --- a/wallet/api/admin_describe_network_test.go +++ b/wallet/api/admin_describe_network_test.go @@ -24,6 +24,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_describe_permissions.go b/wallet/api/admin_describe_permissions.go index 4ae6e761ad..44fb0194f5 100644 --- a/wallet/api/admin_describe_permissions.go +++ b/wallet/api/admin_describe_permissions.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/libs/jsonrpc" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_describe_permissions_test.go b/wallet/api/admin_describe_permissions_test.go index ff6b5e8ede..44df5f7fb8 100644 --- a/wallet/api/admin_describe_permissions_test.go +++ b/wallet/api/admin_describe_permissions_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_describe_wallet.go b/wallet/api/admin_describe_wallet.go index 056badbf8d..2bac433b81 100644 --- a/wallet/api/admin_describe_wallet.go +++ b/wallet/api/admin_describe_wallet.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_describe_wallet_test.go b/wallet/api/admin_describe_wallet_test.go index 88c9a5f987..6e9de98f72 100644 --- a/wallet/api/admin_describe_wallet_test.go +++ b/wallet/api/admin_describe_wallet_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_generate_key.go b/wallet/api/admin_generate_key.go index b32e907593..e513fef551 100644 --- a/wallet/api/admin_generate_key.go +++ b/wallet/api/admin_generate_key.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/libs/jsonrpc" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_generate_key_test.go b/wallet/api/admin_generate_key_test.go index eb0a51bdd1..fbad2db964 100644 --- a/wallet/api/admin_generate_key_test.go +++ b/wallet/api/admin_generate_key_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_import_network_test.go b/wallet/api/admin_import_network_test.go index 0c9d0a28fc..9e827f36bc 100644 --- a/wallet/api/admin_import_network_test.go +++ b/wallet/api/admin_import_network_test.go @@ -26,6 +26,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_import_wallet.go b/wallet/api/admin_import_wallet.go index 0f347604e6..8cbeff884b 100644 --- a/wallet/api/admin_import_wallet.go +++ b/wallet/api/admin_import_wallet.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/libs/jsonrpc" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_import_wallet_test.go b/wallet/api/admin_import_wallet_test.go index 10ec63a31f..c8343c543b 100644 --- a/wallet/api/admin_import_wallet_test.go +++ b/wallet/api/admin_import_wallet_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_isolate_key.go b/wallet/api/admin_isolate_key.go index 4f8c81c2c8..b9acba98ab 100644 --- a/wallet/api/admin_isolate_key.go +++ b/wallet/api/admin_isolate_key.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_isolate_key_test.go b/wallet/api/admin_isolate_key_test.go index 63149ff1f0..e7603a1d29 100644 --- a/wallet/api/admin_isolate_key_test.go +++ b/wallet/api/admin_isolate_key_test.go @@ -25,6 +25,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_list_connections_test.go b/wallet/api/admin_list_connections_test.go index a2b24df0e0..0206de2f24 100644 --- a/wallet/api/admin_list_connections_test.go +++ b/wallet/api/admin_list_connections_test.go @@ -23,6 +23,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_list_keys.go b/wallet/api/admin_list_keys.go index cd5ae016b3..ee531638cc 100644 --- a/wallet/api/admin_list_keys.go +++ b/wallet/api/admin_list_keys.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_list_keys_test.go b/wallet/api/admin_list_keys_test.go index 383097eb56..b8c2ea55e2 100644 --- a/wallet/api/admin_list_keys_test.go +++ b/wallet/api/admin_list_keys_test.go @@ -24,6 +24,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_list_networks_test.go b/wallet/api/admin_list_networks_test.go index 0aecded57d..1bbe14d7fa 100644 --- a/wallet/api/admin_list_networks_test.go +++ b/wallet/api/admin_list_networks_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/network" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_list_permissions.go b/wallet/api/admin_list_permissions.go index 0ff10e0278..cb019cdcb0 100644 --- a/wallet/api/admin_list_permissions.go +++ b/wallet/api/admin_list_permissions.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/libs/jsonrpc" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_list_permissions_test.go b/wallet/api/admin_list_permissions_test.go index af96e13bf9..35586792ba 100644 --- a/wallet/api/admin_list_permissions_test.go +++ b/wallet/api/admin_list_permissions_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_list_wallets_test.go b/wallet/api/admin_list_wallets_test.go index ebd3cb2607..80a63f4ea9 100644 --- a/wallet/api/admin_list_wallets_test.go +++ b/wallet/api/admin_list_wallets_test.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_purge_permissions.go b/wallet/api/admin_purge_permissions.go index fe276e16fa..723547e114 100644 --- a/wallet/api/admin_purge_permissions.go +++ b/wallet/api/admin_purge_permissions.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_purge_permissions_test.go b/wallet/api/admin_purge_permissions_test.go index f40d91ca3a..4ccc4d54c4 100644 --- a/wallet/api/admin_purge_permissions_test.go +++ b/wallet/api/admin_purge_permissions_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_remove_network.go b/wallet/api/admin_remove_network.go index 45983eb37b..3874c47f50 100644 --- a/wallet/api/admin_remove_network.go +++ b/wallet/api/admin_remove_network.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_remove_network_test.go b/wallet/api/admin_remove_network_test.go index 8a2797dcdf..5401b58bd4 100644 --- a/wallet/api/admin_remove_network_test.go +++ b/wallet/api/admin_remove_network_test.go @@ -24,6 +24,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_remove_wallet.go b/wallet/api/admin_remove_wallet.go index ace5096f64..ea382c0cec 100644 --- a/wallet/api/admin_remove_wallet.go +++ b/wallet/api/admin_remove_wallet.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_remove_wallet_test.go b/wallet/api/admin_remove_wallet_test.go index 30d5d563c0..97e462f74b 100644 --- a/wallet/api/admin_remove_wallet_test.go +++ b/wallet/api/admin_remove_wallet_test.go @@ -24,6 +24,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_rename_network.go b/wallet/api/admin_rename_network.go index 24994c6874..13a3b3090b 100644 --- a/wallet/api/admin_rename_network.go +++ b/wallet/api/admin_rename_network.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_rename_network_test.go b/wallet/api/admin_rename_network_test.go index 9fa0a99460..f86d00cc57 100644 --- a/wallet/api/admin_rename_network_test.go +++ b/wallet/api/admin_rename_network_test.go @@ -24,6 +24,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_rename_wallet.go b/wallet/api/admin_rename_wallet.go index 1b05ac0336..7fc1d9a4b1 100644 --- a/wallet/api/admin_rename_wallet.go +++ b/wallet/api/admin_rename_wallet.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_rename_wallet_test.go b/wallet/api/admin_rename_wallet_test.go index 4f95bfcf3f..11036c3ee5 100644 --- a/wallet/api/admin_rename_wallet_test.go +++ b/wallet/api/admin_rename_wallet_test.go @@ -24,6 +24,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_revoke_permissions.go b/wallet/api/admin_revoke_permissions.go index f021780162..b01b19221b 100644 --- a/wallet/api/admin_revoke_permissions.go +++ b/wallet/api/admin_revoke_permissions.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_revoke_permissions_test.go b/wallet/api/admin_revoke_permissions_test.go index daf4a10094..27e769d956 100644 --- a/wallet/api/admin_revoke_permissions_test.go +++ b/wallet/api/admin_revoke_permissions_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_rotate_key.go b/wallet/api/admin_rotate_key.go index 0f495a470b..9104f302ed 100644 --- a/wallet/api/admin_rotate_key.go +++ b/wallet/api/admin_rotate_key.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/commands" "code.vegaprotocol.io/vega/libs/jsonrpc" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/golang/protobuf/proto" "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_rotate_key_test.go b/wallet/api/admin_rotate_key_test.go index f8bc09aa85..7f232857b6 100644 --- a/wallet/api/admin_rotate_key_test.go +++ b/wallet/api/admin_rotate_key_test.go @@ -24,6 +24,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_send_raw_transaction.go b/wallet/api/admin_send_raw_transaction.go index a9ba3a2da9..b39a73a8b1 100644 --- a/wallet/api/admin_send_raw_transaction.go +++ b/wallet/api/admin_send_raw_transaction.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/libs/proto" apipb "code.vegaprotocol.io/vega/protos/vega/api/v1" commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_send_raw_transaction_test.go b/wallet/api/admin_send_raw_transaction_test.go index 1413917942..714b83c764 100644 --- a/wallet/api/admin_send_raw_transaction_test.go +++ b/wallet/api/admin_send_raw_transaction_test.go @@ -29,6 +29,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api/mocks" walletnode "code.vegaprotocol.io/vega/wallet/api/node" nodemocks "code.vegaprotocol.io/vega/wallet/api/node/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" ) diff --git a/wallet/api/admin_send_transaction.go b/wallet/api/admin_send_transaction.go index 6b2741d353..e11a6e3789 100644 --- a/wallet/api/admin_send_transaction.go +++ b/wallet/api/admin_send_transaction.go @@ -30,6 +30,7 @@ import ( walletpb "code.vegaprotocol.io/vega/protos/vega/wallet/v1" "code.vegaprotocol.io/vega/wallet/api/node" wcommands "code.vegaprotocol.io/vega/wallet/commands" + "github.com/golang/protobuf/jsonpb" "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_send_transaction_test.go b/wallet/api/admin_send_transaction_test.go index 99ecaef406..54a8e8cb71 100644 --- a/wallet/api/admin_send_transaction_test.go +++ b/wallet/api/admin_send_transaction_test.go @@ -30,6 +30,7 @@ import ( walletnode "code.vegaprotocol.io/vega/wallet/api/node" nodemocks "code.vegaprotocol.io/vega/wallet/api/node/mocks" "code.vegaprotocol.io/vega/wallet/api/node/types" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" ) diff --git a/wallet/api/admin_sign_message.go b/wallet/api/admin_sign_message.go index b4c9f7b1fd..d92d366150 100644 --- a/wallet/api/admin_sign_message.go +++ b/wallet/api/admin_sign_message.go @@ -21,6 +21,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_sign_message_test.go b/wallet/api/admin_sign_message_test.go index e5e290ff99..4898e7b0fd 100644 --- a/wallet/api/admin_sign_message_test.go +++ b/wallet/api/admin_sign_message_test.go @@ -24,6 +24,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" ) diff --git a/wallet/api/admin_sign_transaction.go b/wallet/api/admin_sign_transaction.go index 4ad160fc53..122a004d35 100644 --- a/wallet/api/admin_sign_transaction.go +++ b/wallet/api/admin_sign_transaction.go @@ -26,12 +26,12 @@ import ( "code.vegaprotocol.io/vega/commands" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" "code.vegaprotocol.io/vega/libs/jsonrpc" - "github.com/golang/protobuf/proto" - commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" walletpb "code.vegaprotocol.io/vega/protos/vega/wallet/v1" wcommands "code.vegaprotocol.io/vega/wallet/commands" + "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_sign_transaction_test.go b/wallet/api/admin_sign_transaction_test.go index c7aa0917ff..71cfcfd55c 100644 --- a/wallet/api/admin_sign_transaction_test.go +++ b/wallet/api/admin_sign_transaction_test.go @@ -30,6 +30,7 @@ import ( walletnode "code.vegaprotocol.io/vega/wallet/api/node" nodemocks "code.vegaprotocol.io/vega/wallet/api/node/mocks" "code.vegaprotocol.io/vega/wallet/api/node/types" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" ) diff --git a/wallet/api/admin_taint_key.go b/wallet/api/admin_taint_key.go index 8e05443bd0..e0a25c5d5e 100644 --- a/wallet/api/admin_taint_key.go +++ b/wallet/api/admin_taint_key.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_taint_key_test.go b/wallet/api/admin_taint_key_test.go index 275b911902..b65891d0bb 100644 --- a/wallet/api/admin_taint_key_test.go +++ b/wallet/api/admin_taint_key_test.go @@ -24,6 +24,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_unlock_wallet.go b/wallet/api/admin_unlock_wallet.go index 2b302e8e1c..cb6b1b28d7 100644 --- a/wallet/api/admin_unlock_wallet.go +++ b/wallet/api/admin_unlock_wallet.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/libs/jsonrpc" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_unlock_wallet_test.go b/wallet/api/admin_unlock_wallet_test.go index 2acff810d9..6b72f4b32a 100644 --- a/wallet/api/admin_unlock_wallet_test.go +++ b/wallet/api/admin_unlock_wallet_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_untaint_key.go b/wallet/api/admin_untaint_key.go index 87106ddfbc..232af13da7 100644 --- a/wallet/api/admin_untaint_key.go +++ b/wallet/api/admin_untaint_key.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_untaint_key_test.go b/wallet/api/admin_untaint_key_test.go index c425c4f17e..535a6af498 100644 --- a/wallet/api/admin_untaint_key_test.go +++ b/wallet/api/admin_untaint_key_test.go @@ -24,6 +24,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_update_network.go b/wallet/api/admin_update_network.go index 10c2c19c27..1685245c5f 100644 --- a/wallet/api/admin_update_network.go +++ b/wallet/api/admin_update_network.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/libs/jsonrpc" "code.vegaprotocol.io/vega/wallet/network" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_update_network_test.go b/wallet/api/admin_update_network_test.go index 3d7be87ab2..e10afbfdd6 100644 --- a/wallet/api/admin_update_network_test.go +++ b/wallet/api/admin_update_network_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/network" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_update_passphrase.go b/wallet/api/admin_update_passphrase.go index 898946d6ae..2f45d91dbc 100644 --- a/wallet/api/admin_update_passphrase.go +++ b/wallet/api/admin_update_passphrase.go @@ -20,6 +20,7 @@ import ( "fmt" "code.vegaprotocol.io/vega/libs/jsonrpc" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_update_passphrase_test.go b/wallet/api/admin_update_passphrase_test.go index 03bf71848e..fb437a3fb3 100644 --- a/wallet/api/admin_update_passphrase_test.go +++ b/wallet/api/admin_update_passphrase_test.go @@ -24,6 +24,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_update_permissions.go b/wallet/api/admin_update_permissions.go index 65ef63efeb..83e086d0f2 100644 --- a/wallet/api/admin_update_permissions.go +++ b/wallet/api/admin_update_permissions.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/libs/jsonrpc" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_update_permissions_test.go b/wallet/api/admin_update_permissions_test.go index 3e4643a15d..e2687c6c06 100644 --- a/wallet/api/admin_update_permissions_test.go +++ b/wallet/api/admin_update_permissions_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/admin_verify_message.go b/wallet/api/admin_verify_message.go index 2e23446789..c158519003 100644 --- a/wallet/api/admin_verify_message.go +++ b/wallet/api/admin_verify_message.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/libs/jsonrpc" "code.vegaprotocol.io/vega/wallet/crypto" + "github.com/mitchellh/mapstructure" ) diff --git a/wallet/api/admin_verify_message_test.go b/wallet/api/admin_verify_message_test.go index e6cbd8c0e9..c479776e74 100644 --- a/wallet/api/admin_verify_message_test.go +++ b/wallet/api/admin_verify_message_test.go @@ -22,6 +22,7 @@ import ( "code.vegaprotocol.io/vega/libs/jsonrpc" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" ) diff --git a/wallet/api/api.go b/wallet/api/api.go index 8e2ce560e1..ac192d4650 100644 --- a/wallet/api/api.go +++ b/wallet/api/api.go @@ -26,6 +26,7 @@ import ( nodetypes "code.vegaprotocol.io/vega/wallet/api/node/types" "code.vegaprotocol.io/vega/wallet/network" "code.vegaprotocol.io/vega/wallet/wallet" + "go.uber.org/zap" ) diff --git a/wallet/api/client_check_transaction.go b/wallet/api/client_check_transaction.go index 1b645c39f2..222244dd50 100644 --- a/wallet/api/client_check_transaction.go +++ b/wallet/api/client_check_transaction.go @@ -29,6 +29,7 @@ import ( walletpb "code.vegaprotocol.io/vega/protos/vega/wallet/v1" "code.vegaprotocol.io/vega/wallet/api/node" wcommands "code.vegaprotocol.io/vega/wallet/commands" + "github.com/golang/protobuf/jsonpb" "github.com/mitchellh/mapstructure" ) @@ -132,14 +133,14 @@ func (h *ClientCheckTransaction) Handle(ctx context.Context, rawParams jsonrpc.P h.interactor.Log(ctx, traceID, InfoLog, "Retrieving latest block information...") stats, err := currentNode.SpamStatistics(ctx, request.PubKey) if err != nil { - h.interactor.NotifyError(ctx, traceID, NetworkErrorType, fmt.Errorf("could not get the latest block information from the node: %w", err)) - return nil, NodeCommunicationError(ErrCouldNotGetLastBlockInformation) + h.interactor.NotifyError(ctx, traceID, NetworkErrorType, fmt.Errorf("could not get the latest spam statistics for the public key from the node: %w", err)) + return nil, NodeCommunicationError(ErrCouldNotGetSpamStatistics) } h.interactor.Log(ctx, traceID, SuccessLog, "Latest block information has been retrieved.") if stats.LastBlockHeight == 0 { - h.interactor.NotifyError(ctx, traceID, NetworkErrorType, ErrCouldNotGetLastBlockInformation) - return nil, NodeCommunicationError(ErrCouldNotGetLastBlockInformation) + h.interactor.NotifyError(ctx, traceID, NetworkErrorType, ErrCouldNotGetSpamStatistics) + return nil, NodeCommunicationError(ErrCouldNotGetSpamStatistics) } if stats.ChainID == "" { diff --git a/wallet/api/client_check_transaction_test.go b/wallet/api/client_check_transaction_test.go index f100230837..2600c9c4b7 100644 --- a/wallet/api/client_check_transaction_test.go +++ b/wallet/api/client_check_transaction_test.go @@ -31,6 +31,7 @@ import ( nodemocks "code.vegaprotocol.io/vega/wallet/api/node/mocks" "code.vegaprotocol.io/vega/wallet/api/node/types" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -644,7 +645,7 @@ func testFailingToGetSpamStatsDoesNotCheckTransaction(t *testing.T) { handler.interactor.EXPECT().RequestTransactionReviewForChecking(ctx, traceID, uint8(1), hostname, wallet1.Name(), kp.PublicKey(), fakeTransaction, gomock.Any()).Times(1).Return(true, nil) handler.nodeSelector.EXPECT().Node(ctx, gomock.Any()).Times(1).Return(handler.node, nil) handler.node.EXPECT().SpamStatistics(ctx, kp.PublicKey()).Times(1).Return(types.SpamStatistics{}, assert.AnError) - handler.interactor.EXPECT().NotifyError(ctx, traceID, api.NetworkErrorType, fmt.Errorf("could not get the latest block information from the node: %w", assert.AnError)).Times(1) + handler.interactor.EXPECT().NotifyError(ctx, traceID, api.NetworkErrorType, fmt.Errorf("could not get the latest spam statistics for the public key from the node: %w", assert.AnError)).Times(1) handler.interactor.EXPECT().Log(ctx, traceID, gomock.Any(), gomock.Any()).AnyTimes() @@ -658,7 +659,7 @@ func testFailingToGetSpamStatsDoesNotCheckTransaction(t *testing.T) { require.NotNil(t, errorDetails) assert.Equal(t, api.ErrorCodeNodeCommunicationFailed, errorDetails.Code) assert.Equal(t, "Network error", errorDetails.Message) - assert.Equal(t, api.ErrCouldNotGetLastBlockInformation.Error(), errorDetails.Data) + assert.Equal(t, api.ErrCouldNotGetSpamStatistics.Error(), errorDetails.Data) assert.Empty(t, result) } diff --git a/wallet/api/client_connect_wallet_test.go b/wallet/api/client_connect_wallet_test.go index 9b17866456..6af4872b36 100644 --- a/wallet/api/client_connect_wallet_test.go +++ b/wallet/api/client_connect_wallet_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/preferences" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/client_get_chain_id_test.go b/wallet/api/client_get_chain_id_test.go index 41d6cdaeb6..473967c7b2 100644 --- a/wallet/api/client_get_chain_id_test.go +++ b/wallet/api/client_get_chain_id_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" nodemocks "code.vegaprotocol.io/vega/wallet/api/node/mocks" "code.vegaprotocol.io/vega/wallet/api/node/types" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/client_list_keys_test.go b/wallet/api/client_list_keys_test.go index 80926dbdd4..71ec4ba630 100644 --- a/wallet/api/client_list_keys_test.go +++ b/wallet/api/client_list_keys_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/api/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/client_send_transaction.go b/wallet/api/client_send_transaction.go index 9eb62d2c1f..657cebf43a 100644 --- a/wallet/api/client_send_transaction.go +++ b/wallet/api/client_send_transaction.go @@ -30,6 +30,7 @@ import ( walletpb "code.vegaprotocol.io/vega/protos/vega/wallet/v1" "code.vegaprotocol.io/vega/wallet/api/node" wcommands "code.vegaprotocol.io/vega/wallet/commands" + "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "github.com/mitchellh/mapstructure" @@ -136,14 +137,14 @@ func (h *ClientSendTransaction) Handle(ctx context.Context, rawParams jsonrpc.Pa h.interactor.Log(ctx, traceID, InfoLog, "Retrieving latest block information...") stats, err := currentNode.SpamStatistics(ctx, request.PubKey) if err != nil { - h.interactor.NotifyError(ctx, traceID, NetworkErrorType, fmt.Errorf("could not get the latest block from node: %w", err)) - return nil, NodeCommunicationError(ErrCouldNotGetLastBlockInformation) + h.interactor.NotifyError(ctx, traceID, NetworkErrorType, fmt.Errorf("could not get the latest spam statistics for the public key from the node: %w", err)) + return nil, NodeCommunicationError(ErrCouldNotGetSpamStatistics) } - h.interactor.Log(ctx, traceID, SuccessLog, "Latest block information has been retrieved.") + h.interactor.Log(ctx, traceID, SuccessLog, "Latest spam statistics for the public key have been retrieved.") if stats.LastBlockHeight == 0 { - h.interactor.NotifyError(ctx, traceID, NetworkErrorType, ErrCouldNotGetLastBlockInformation) - return nil, NodeCommunicationError(ErrCouldNotGetLastBlockInformation) + h.interactor.NotifyError(ctx, traceID, NetworkErrorType, ErrCouldNotGetSpamStatistics) + return nil, NodeCommunicationError(ErrCouldNotGetSpamStatistics) } if stats.ChainID == "" { diff --git a/wallet/api/client_send_transaction_test.go b/wallet/api/client_send_transaction_test.go index bdded257d9..180c7896ae 100644 --- a/wallet/api/client_send_transaction_test.go +++ b/wallet/api/client_send_transaction_test.go @@ -32,6 +32,7 @@ import ( nodemocks "code.vegaprotocol.io/vega/wallet/api/node/mocks" "code.vegaprotocol.io/vega/wallet/api/node/types" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -695,7 +696,7 @@ func testFailingToGetSpamStatsDoesNotSendTransaction(t *testing.T) { handler.interactor.EXPECT().RequestTransactionReviewForSending(ctx, traceID, uint8(1), hostname, wallet1.Name(), kp.PublicKey(), fakeTransaction, gomock.Any()).Times(1).Return(true, nil) handler.nodeSelector.EXPECT().Node(ctx, gomock.Any()).Times(1).Return(handler.node, nil) handler.node.EXPECT().SpamStatistics(ctx, kp.PublicKey()).Times(1).Return(types.SpamStatistics{}, assert.AnError) - handler.interactor.EXPECT().NotifyError(ctx, traceID, api.NetworkErrorType, fmt.Errorf("could not get the latest block from node: %w", assert.AnError)).Times(1) + handler.interactor.EXPECT().NotifyError(ctx, traceID, api.NetworkErrorType, fmt.Errorf("could not get the latest spam statistics for the public key from the node: %w", assert.AnError)).Times(1) handler.interactor.EXPECT().Log(ctx, traceID, gomock.Any(), gomock.Any()).AnyTimes() // when @@ -709,7 +710,7 @@ func testFailingToGetSpamStatsDoesNotSendTransaction(t *testing.T) { require.NotNil(t, errorDetails) assert.Equal(t, api.ErrorCodeNodeCommunicationFailed, errorDetails.Code) assert.Equal(t, "Network error", errorDetails.Message) - assert.Equal(t, api.ErrCouldNotGetLastBlockInformation.Error(), errorDetails.Data) + assert.Equal(t, api.ErrCouldNotGetSpamStatistics.Error(), errorDetails.Data) assert.Empty(t, result) } diff --git a/wallet/api/client_sign_transaction.go b/wallet/api/client_sign_transaction.go index 743bd63bb1..b3ac28e263 100644 --- a/wallet/api/client_sign_transaction.go +++ b/wallet/api/client_sign_transaction.go @@ -29,6 +29,7 @@ import ( walletpb "code.vegaprotocol.io/vega/protos/vega/wallet/v1" "code.vegaprotocol.io/vega/wallet/api/node" wcommands "code.vegaprotocol.io/vega/wallet/commands" + "github.com/golang/protobuf/jsonpb" "github.com/mitchellh/mapstructure" ) @@ -130,14 +131,14 @@ func (h *ClientSignTransaction) Handle(ctx context.Context, rawParams jsonrpc.Pa h.interactor.Log(ctx, traceID, InfoLog, "Retrieving latest block information...") stats, err := currentNode.SpamStatistics(ctx, request.PubKey) if err != nil { - h.interactor.NotifyError(ctx, traceID, NetworkErrorType, fmt.Errorf("could not get the latest block information from the node: %w", err)) - return nil, NodeCommunicationError(ErrCouldNotGetLastBlockInformation) + h.interactor.NotifyError(ctx, traceID, NetworkErrorType, fmt.Errorf("could not get the latest spam statistics for the public key from the node: %w", err)) + return nil, NodeCommunicationError(ErrCouldNotGetSpamStatistics) } - h.interactor.Log(ctx, traceID, SuccessLog, "Latest block information has been retrieved.") + h.interactor.Log(ctx, traceID, SuccessLog, "Latest spam statistics for the public key have been retrieved.") if stats.LastBlockHeight == 0 { - h.interactor.NotifyError(ctx, traceID, NetworkErrorType, ErrCouldNotGetLastBlockInformation) - return nil, NodeCommunicationError(ErrCouldNotGetLastBlockInformation) + h.interactor.NotifyError(ctx, traceID, NetworkErrorType, ErrCouldNotGetSpamStatistics) + return nil, NodeCommunicationError(ErrCouldNotGetSpamStatistics) } if stats.ChainID == "" { diff --git a/wallet/api/client_sign_transaction_test.go b/wallet/api/client_sign_transaction_test.go index f25bb68083..fb4484e5a8 100644 --- a/wallet/api/client_sign_transaction_test.go +++ b/wallet/api/client_sign_transaction_test.go @@ -31,6 +31,7 @@ import ( nodemock "code.vegaprotocol.io/vega/wallet/api/node/mocks" "code.vegaprotocol.io/vega/wallet/api/node/types" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -627,7 +628,7 @@ func testFailingToGetSpamStatsDoesNotSignTransaction(t *testing.T) { handler.interactor.EXPECT().RequestTransactionReviewForSigning(ctx, traceID, uint8(1), hostname, wallet1.Name(), kp.PublicKey(), fakeTransaction, gomock.Any()).Times(1).Return(true, nil) handler.nodeSelector.EXPECT().Node(ctx, gomock.Any()).Times(1).Return(handler.node, nil) handler.node.EXPECT().SpamStatistics(ctx, kp.PublicKey()).Times(1).Return(types.SpamStatistics{}, assert.AnError) - handler.interactor.EXPECT().NotifyError(ctx, traceID, api.NetworkErrorType, fmt.Errorf("could not get the latest block information from the node: %w", assert.AnError)).Times(1) + handler.interactor.EXPECT().NotifyError(ctx, traceID, api.NetworkErrorType, fmt.Errorf("could not get the latest spam statistics for the public key from the node: %w", assert.AnError)).Times(1) handler.interactor.EXPECT().Log(ctx, traceID, gomock.Any(), gomock.Any()).AnyTimes() // when @@ -640,7 +641,7 @@ func testFailingToGetSpamStatsDoesNotSignTransaction(t *testing.T) { require.NotNil(t, errorDetails) assert.Equal(t, api.ErrorCodeNodeCommunicationFailed, errorDetails.Code) assert.Equal(t, "Network error", errorDetails.Message) - assert.Equal(t, api.ErrCouldNotGetLastBlockInformation.Error(), errorDetails.Data) + assert.Equal(t, api.ErrCouldNotGetSpamStatistics.Error(), errorDetails.Data) assert.Empty(t, result) } diff --git a/wallet/api/errors.go b/wallet/api/errors.go index 35354d7e9c..f7df4b398f 100644 --- a/wallet/api/errors.go +++ b/wallet/api/errors.go @@ -120,6 +120,7 @@ var ( ErrCouldNotConnectToWallet = errors.New("could not connect to the wallet") ErrCouldNotGetChainIDFromNode = errors.New("could not get the chain ID from the node") ErrCouldNotGetLastBlockInformation = errors.New("could not get information about the last block on the network") + ErrCouldNotGetSpamStatistics = errors.New("could not get latest spam statistics for the public key on the network") ErrCouldNotListKeys = errors.New("could not list the keys") ErrCouldNotSendTransaction = errors.New("could not send transaction") ErrCouldNotSignTransaction = errors.New("could not sign transaction") diff --git a/wallet/api/helpers_for_test.go b/wallet/api/helpers_for_test.go index 4c18d9fa6a..0433b1749b 100644 --- a/wallet/api/helpers_for_test.go +++ b/wallet/api/helpers_for_test.go @@ -27,6 +27,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api/node" "code.vegaprotocol.io/vega/wallet/network" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/api/interactor/parallel_test.go b/wallet/api/interactor/parallel_test.go index 3ab59c603a..05f65187fa 100644 --- a/wallet/api/interactor/parallel_test.go +++ b/wallet/api/interactor/parallel_test.go @@ -23,6 +23,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api/interactor" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/api/node/adapters/grpc_adapter.go b/wallet/api/node/adapters/grpc_adapter.go index fc561d6a10..0d7910890e 100644 --- a/wallet/api/node/adapters/grpc_adapter.go +++ b/wallet/api/node/adapters/grpc_adapter.go @@ -22,10 +22,10 @@ import ( apipb "code.vegaprotocol.io/vega/protos/vega/api/v1" nodetypes "code.vegaprotocol.io/vega/wallet/api/node/types" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/credentials/insecure" ) type GRPCAdapter struct { diff --git a/wallet/api/node/errors.go b/wallet/api/node/errors.go index ebc1f0dcda..fdf6ab6c01 100644 --- a/wallet/api/node/errors.go +++ b/wallet/api/node/errors.go @@ -20,6 +20,7 @@ import ( "strings" typespb "code.vegaprotocol.io/vega/protos/vega" + "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/wallet/api/node/helpers_for_test.go b/wallet/api/node/helpers_for_test.go index 09d72656f7..52a88ae98c 100644 --- a/wallet/api/node/helpers_for_test.go +++ b/wallet/api/node/helpers_for_test.go @@ -19,6 +19,7 @@ import ( "testing" "code.vegaprotocol.io/vega/wallet/api/node" + "go.uber.org/zap" "go.uber.org/zap/zaptest" ) diff --git a/wallet/api/node/retrying_node.go b/wallet/api/node/retrying_node.go index d52cae660a..383882a42f 100644 --- a/wallet/api/node/retrying_node.go +++ b/wallet/api/node/retrying_node.go @@ -24,6 +24,7 @@ import ( commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" "code.vegaprotocol.io/vega/wallet/api/node/adapters" nodetypes "code.vegaprotocol.io/vega/wallet/api/node/types" + "github.com/cenkalti/backoff/v4" "go.uber.org/zap" "google.golang.org/grpc/codes" diff --git a/wallet/api/node/retrying_node_test.go b/wallet/api/node/retrying_node_test.go index 57013d740b..22250ac9ae 100644 --- a/wallet/api/node/retrying_node_test.go +++ b/wallet/api/node/retrying_node_test.go @@ -27,6 +27,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api/node" "code.vegaprotocol.io/vega/wallet/api/node/mocks" "code.vegaprotocol.io/vega/wallet/api/node/types" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/node/round_robin_selector.go b/wallet/api/node/round_robin_selector.go index 9f4573c176..216543aae8 100644 --- a/wallet/api/node/round_robin_selector.go +++ b/wallet/api/node/round_robin_selector.go @@ -25,6 +25,7 @@ import ( "sync/atomic" vgcrypto "code.vegaprotocol.io/vega/libs/crypto" + "go.uber.org/zap" ) diff --git a/wallet/api/node/round_robin_selector_test.go b/wallet/api/node/round_robin_selector_test.go index cd4f39ee03..2c3fb511b9 100644 --- a/wallet/api/node/round_robin_selector_test.go +++ b/wallet/api/node/round_robin_selector_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api/node" nodemocks "code.vegaprotocol.io/vega/wallet/api/node/mocks" "code.vegaprotocol.io/vega/wallet/api/node/types" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/api/spam/pow_test.go b/wallet/api/spam/pow_test.go index b4e31bf5e0..d5cc63b57c 100644 --- a/wallet/api/spam/pow_test.go +++ b/wallet/api/spam/pow_test.go @@ -22,6 +22,7 @@ import ( walletapi "code.vegaprotocol.io/vega/wallet/api" nodetypes "code.vegaprotocol.io/vega/wallet/api/node/types" "code.vegaprotocol.io/vega/wallet/api/spam" + "github.com/stretchr/testify/require" ) diff --git a/wallet/api/spam/spam_test.go b/wallet/api/spam/spam_test.go index 23aaf241d0..daa1361515 100644 --- a/wallet/api/spam/spam_test.go +++ b/wallet/api/spam/spam_test.go @@ -24,6 +24,7 @@ import ( walletpb "code.vegaprotocol.io/vega/protos/vega/wallet/v1" nodetypes "code.vegaprotocol.io/vega/wallet/api/node/types" "code.vegaprotocol.io/vega/wallet/api/spam" + "github.com/stretchr/testify/require" ) diff --git a/wallet/commands/commands.go b/wallet/commands/commands.go index ab98ababc8..40419b01a0 100644 --- a/wallet/commands/commands.go +++ b/wallet/commands/commands.go @@ -51,6 +51,8 @@ func CheckSubmitTransactionRequest(req *walletpb.SubmitTransactionRequest) comma cmdErr = commands.CheckLiquidityProvisionSubmission(cmd.LiquidityProvisionSubmission) case *walletpb.SubmitTransactionRequest_ProposalSubmission: cmdErr = commands.CheckProposalSubmission(cmd.ProposalSubmission) + case *walletpb.SubmitTransactionRequest_BatchProposalSubmission: + cmdErr = commands.CheckBatchProposalSubmission(cmd.BatchProposalSubmission) case *walletpb.SubmitTransactionRequest_AnnounceNode: cmdErr = commands.CheckAnnounceNode(cmd.AnnounceNode) case *walletpb.SubmitTransactionRequest_NodeVote: @@ -93,6 +95,12 @@ func CheckSubmitTransactionRequest(req *walletpb.SubmitTransactionRequest) comma cmdErr = commands.CheckUpdateReferralSet(cmd.UpdateReferralSet) case *walletpb.SubmitTransactionRequest_ApplyReferralCode: cmdErr = commands.CheckApplyReferralCode(cmd.ApplyReferralCode) + case *walletpb.SubmitTransactionRequest_UpdateMarginMode: + cmdErr = commands.CheckUpdateMarginMode(cmd.UpdateMarginMode) + case *walletpb.SubmitTransactionRequest_JoinTeam: + cmdErr = commands.CheckJoinTeam(cmd.JoinTeam) + case *walletpb.SubmitTransactionRequest_UpdatePartyProfile: + cmdErr = commands.CheckUpdatePartyProfile(cmd.UpdatePartyProfile) default: errs.AddForProperty("input_data.command", commands.ErrIsNotSupported) } @@ -228,6 +236,22 @@ func WrapRequestCommandIntoInputData(data *commandspb.InputData, req *walletpb.S data.Command = &commandspb.InputData_ApplyReferralCode{ ApplyReferralCode: req.GetApplyReferralCode(), } + case *walletpb.SubmitTransactionRequest_UpdateMarginMode: + data.Command = &commandspb.InputData_UpdateMarginMode{ + UpdateMarginMode: req.GetUpdateMarginMode(), + } + case *walletpb.SubmitTransactionRequest_JoinTeam: + data.Command = &commandspb.InputData_JoinTeam{ + JoinTeam: req.GetJoinTeam(), + } + case *walletpb.SubmitTransactionRequest_BatchProposalSubmission: + data.Command = &commandspb.InputData_BatchProposalSubmission{ + BatchProposalSubmission: req.GetBatchProposalSubmission(), + } + case *walletpb.SubmitTransactionRequest_UpdatePartyProfile: + data.Command = &commandspb.InputData_UpdatePartyProfile{ + UpdatePartyProfile: req.GetUpdatePartyProfile(), + } default: panic(fmt.Sprintf("command %T is not supported", cmd)) } diff --git a/wallet/crypto/signature_test.go b/wallet/crypto/signature_test.go index f6f5cf85c6..f1b9c6a930 100644 --- a/wallet/crypto/signature_test.go +++ b/wallet/crypto/signature_test.go @@ -20,6 +20,7 @@ import ( "testing" wcrypto "code.vegaprotocol.io/vega/wallet/crypto" + "github.com/oasisprotocol/curve25519-voi/primitives/ed25519" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/network/network_test.go b/wallet/network/network_test.go index cc17eac02b..13f042bba1 100644 --- a/wallet/network/network_test.go +++ b/wallet/network/network_test.go @@ -19,6 +19,7 @@ import ( "testing" "code.vegaprotocol.io/vega/wallet/network" + "github.com/stretchr/testify/require" ) diff --git a/wallet/network/store/v1/file_store.go b/wallet/network/store/v1/file_store.go index f3b5f55653..a330b448ee 100644 --- a/wallet/network/store/v1/file_store.go +++ b/wallet/network/store/v1/file_store.go @@ -27,7 +27,6 @@ import ( vgfs "code.vegaprotocol.io/vega/libs/fs" "code.vegaprotocol.io/vega/paths" "code.vegaprotocol.io/vega/wallet/api" - "code.vegaprotocol.io/vega/wallet/network" ) diff --git a/wallet/network/store/v1/file_store_test.go b/wallet/network/store/v1/file_store_test.go index 0e3e127f64..8432e8bece 100644 --- a/wallet/network/store/v1/file_store_test.go +++ b/wallet/network/store/v1/file_store_test.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/network" v1 "code.vegaprotocol.io/vega/wallet/network/store/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/node/errors.go b/wallet/node/errors.go index 9c8fe3d277..85126f95fd 100644 --- a/wallet/node/errors.go +++ b/wallet/node/errors.go @@ -21,6 +21,7 @@ import ( "strings" typespb "code.vegaprotocol.io/vega/protos/vega" + "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/wallet/service/config.go b/wallet/service/config.go index 7f4267f2fa..1c3dc215bf 100644 --- a/wallet/service/config.go +++ b/wallet/service/config.go @@ -21,6 +21,7 @@ import ( "time" vgencoding "code.vegaprotocol.io/vega/libs/encoding" + "go.uber.org/zap" ) diff --git a/wallet/service/config_test.go b/wallet/service/config_test.go index 3d9194fb40..e5146e9d08 100644 --- a/wallet/service/config_test.go +++ b/wallet/service/config_test.go @@ -20,6 +20,7 @@ import ( "code.vegaprotocol.io/vega/libs/encoding" "code.vegaprotocol.io/vega/wallet/service" + "github.com/stretchr/testify/assert" ) diff --git a/wallet/service/service.go b/wallet/service/service.go index f9ef4a5323..8b65cdd873 100644 --- a/wallet/service/service.go +++ b/wallet/service/service.go @@ -24,6 +24,7 @@ import ( v1 "code.vegaprotocol.io/vega/wallet/service/v1" v2 "code.vegaprotocol.io/vega/wallet/service/v2" + "github.com/julienschmidt/httprouter" "github.com/rs/cors" "go.uber.org/zap" diff --git a/wallet/service/service_test.go b/wallet/service/service_test.go index 5ba11470e7..216bedb20c 100644 --- a/wallet/service/service_test.go +++ b/wallet/service/service_test.go @@ -35,6 +35,7 @@ import ( v2connectionsmocks "code.vegaprotocol.io/vega/wallet/service/v2/connections/mocks" v2mocks "code.vegaprotocol.io/vega/wallet/service/v2/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "go.uber.org/zap" ) diff --git a/wallet/service/service_v1_test.go b/wallet/service/service_v1_test.go index d9ee4fc542..75fd163172 100644 --- a/wallet/service/service_v1_test.go +++ b/wallet/service/service_v1_test.go @@ -29,6 +29,7 @@ import ( "code.vegaprotocol.io/vega/wallet/crypto" v1 "code.vegaprotocol.io/vega/wallet/service/v1" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" ) diff --git a/wallet/service/service_v2_test.go b/wallet/service/service_v2_test.go index 927663482a..cbbfb0c5f2 100644 --- a/wallet/service/service_v2_test.go +++ b/wallet/service/service_v2_test.go @@ -31,6 +31,7 @@ import ( v2 "code.vegaprotocol.io/vega/wallet/service/v2" "code.vegaprotocol.io/vega/wallet/service/v2/connections" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/mitchellh/mapstructure" "github.com/stretchr/testify/assert" diff --git a/wallet/service/starter.go b/wallet/service/starter.go index dd3cead586..584d4ca33a 100644 --- a/wallet/service/starter.go +++ b/wallet/service/starter.go @@ -37,6 +37,7 @@ import ( "code.vegaprotocol.io/vega/wallet/service/v2/connections" walletversion "code.vegaprotocol.io/vega/wallet/version" "code.vegaprotocol.io/vega/wallet/wallets" + "go.uber.org/zap" ) diff --git a/wallet/service/store/v1/store_test.go b/wallet/service/store/v1/store_test.go index 61bc330682..d1662dc61d 100644 --- a/wallet/service/store/v1/store_test.go +++ b/wallet/service/store/v1/store_test.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/wallet/service" storeV1 "code.vegaprotocol.io/vega/wallet/service/store/v1" v1 "code.vegaprotocol.io/vega/wallet/service/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/zap" diff --git a/wallet/service/v1/api.go b/wallet/service/v1/api.go index 9fc8287459..b1f79a1872 100644 --- a/wallet/service/v1/api.go +++ b/wallet/service/v1/api.go @@ -17,6 +17,7 @@ package v1 import ( "code.vegaprotocol.io/vega/wallet/network" + "go.uber.org/zap" ) diff --git a/wallet/service/v1/auth.go b/wallet/service/v1/auth.go index cdb2f4c0a6..b9490b2b41 100644 --- a/wallet/service/v1/auth.go +++ b/wallet/service/v1/auth.go @@ -28,6 +28,7 @@ import ( vgcrypto "code.vegaprotocol.io/vega/libs/crypto" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/dgrijalva/jwt-go/v4" "go.uber.org/zap" ) diff --git a/wallet/service/v1/auth_test.go b/wallet/service/v1/auth_test.go index 01e04224d4..b394bc3c61 100644 --- a/wallet/service/v1/auth_test.go +++ b/wallet/service/v1/auth_test.go @@ -21,6 +21,7 @@ import ( v1 "code.vegaprotocol.io/vega/wallet/service/v1" "code.vegaprotocol.io/vega/wallet/service/v1/mocks" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "go.uber.org/zap" diff --git a/wallet/service/v1/policies_test.go b/wallet/service/v1/policies_test.go index c839a86145..6d47d60a06 100644 --- a/wallet/service/v1/policies_test.go +++ b/wallet/service/v1/policies_test.go @@ -25,6 +25,7 @@ import ( commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1" walletpb "code.vegaprotocol.io/vega/protos/vega/wallet/v1" "code.vegaprotocol.io/vega/wallet/service/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/service/v2/api.go b/wallet/service/v2/api.go index d070821d57..694d910142 100644 --- a/wallet/service/v2/api.go +++ b/wallet/service/v2/api.go @@ -26,6 +26,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/service/v2/connections" "code.vegaprotocol.io/vega/wallet/wallet" + "go.uber.org/zap" ) diff --git a/wallet/service/v2/connections/helpers_for_test.go b/wallet/service/v2/connections/helpers_for_test.go index eea4159eee..54ed433bbc 100644 --- a/wallet/service/v2/connections/helpers_for_test.go +++ b/wallet/service/v2/connections/helpers_for_test.go @@ -25,6 +25,7 @@ import ( "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/service/v2/connections" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/service/v2/connections/manager_test.go b/wallet/service/v2/connections/manager_test.go index 7c5be7220c..a51999321c 100644 --- a/wallet/service/v2/connections/manager_test.go +++ b/wallet/service/v2/connections/manager_test.go @@ -28,6 +28,7 @@ import ( "code.vegaprotocol.io/vega/wallet/service/v2/connections" "code.vegaprotocol.io/vega/wallet/service/v2/connections/mocks" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/wallet/service/v2/connections/store/longliving/v1/file_store.go b/wallet/service/v2/connections/store/longliving/v1/file_store.go index 64b559d02b..f88eb3a1ce 100644 --- a/wallet/service/v2/connections/store/longliving/v1/file_store.go +++ b/wallet/service/v2/connections/store/longliving/v1/file_store.go @@ -27,6 +27,7 @@ import ( vgjob "code.vegaprotocol.io/vega/libs/job" "code.vegaprotocol.io/vega/paths" "code.vegaprotocol.io/vega/wallet/service/v2/connections" + "github.com/fsnotify/fsnotify" ) diff --git a/wallet/service/v2/connections/store/longliving/v1/file_store_test.go b/wallet/service/v2/connections/store/longliving/v1/file_store_test.go index 37edce0947..0e9ee0795f 100644 --- a/wallet/service/v2/connections/store/longliving/v1/file_store_test.go +++ b/wallet/service/v2/connections/store/longliving/v1/file_store_test.go @@ -24,6 +24,7 @@ import ( "code.vegaprotocol.io/vega/paths" "code.vegaprotocol.io/vega/wallet/service/v2/connections" "code.vegaprotocol.io/vega/wallet/service/v2/connections/store/longliving/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/service/v2/connections/store/session/v1/file_store_test.go b/wallet/service/v2/connections/store/session/v1/file_store_test.go index 457a0c863c..7ad9762414 100644 --- a/wallet/service/v2/connections/store/session/v1/file_store_test.go +++ b/wallet/service/v2/connections/store/session/v1/file_store_test.go @@ -23,6 +23,7 @@ import ( "code.vegaprotocol.io/vega/paths" "code.vegaprotocol.io/vega/wallet/service/v2/connections" v1 "code.vegaprotocol.io/vega/wallet/service/v2/connections/store/session/v1" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/service/v2/endpoint_check_health.go b/wallet/service/v2/endpoint_check_health.go index 1562e53932..a8ce91f918 100644 --- a/wallet/service/v2/endpoint_check_health.go +++ b/wallet/service/v2/endpoint_check_health.go @@ -20,6 +20,7 @@ import ( vfmt "code.vegaprotocol.io/vega/libs/fmt" "code.vegaprotocol.io/vega/logging" + "github.com/julienschmidt/httprouter" ) diff --git a/wallet/service/v2/endpoint_handle_request.go b/wallet/service/v2/endpoint_handle_request.go index 3b1bc3e66e..27f26d785c 100644 --- a/wallet/service/v2/endpoint_handle_request.go +++ b/wallet/service/v2/endpoint_handle_request.go @@ -29,6 +29,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/logging" "code.vegaprotocol.io/vega/wallet/api" + "github.com/julienschmidt/httprouter" "go.uber.org/zap" ) diff --git a/wallet/service/v2/endpoint_list_methods.go b/wallet/service/v2/endpoint_list_methods.go index 8fee270388..3ffea27ad9 100644 --- a/wallet/service/v2/endpoint_list_methods.go +++ b/wallet/service/v2/endpoint_list_methods.go @@ -22,6 +22,7 @@ import ( vfmt "code.vegaprotocol.io/vega/libs/fmt" "code.vegaprotocol.io/vega/logging" + "github.com/julienschmidt/httprouter" ) diff --git a/wallet/tests/commands_for_test.go b/wallet/tests/commands_for_test.go index 5054d358df..5c1e2af358 100644 --- a/wallet/tests/commands_for_test.go +++ b/wallet/tests/commands_for_test.go @@ -26,6 +26,7 @@ import ( "time" cmd "code.vegaprotocol.io/vega/cmd/vegawallet/commands" + "github.com/stretchr/testify/assert" ) diff --git a/wallet/tests/sc_annotate_key_test.go b/wallet/tests/sc_annotate_key_test.go index d6054ff3cc..c418215d2c 100644 --- a/wallet/tests/sc_annotate_key_test.go +++ b/wallet/tests/sc_annotate_key_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_api_tokens_test.go b/wallet/tests/sc_api_tokens_test.go index b81bec20b4..b247eefffc 100644 --- a/wallet/tests/sc_api_tokens_test.go +++ b/wallet/tests/sc_api_tokens_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_create_wallet_test.go b/wallet/tests/sc_create_wallet_test.go index 10b21a886c..f92aefa563 100644 --- a/wallet/tests/sc_create_wallet_test.go +++ b/wallet/tests/sc_create_wallet_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_delete_wallet_test.go b/wallet/tests/sc_delete_wallet_test.go index b1e68b52db..1c5946cc21 100644 --- a/wallet/tests/sc_delete_wallet_test.go +++ b/wallet/tests/sc_delete_wallet_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_describe_key_test.go b/wallet/tests/sc_describe_key_test.go index fd0d81df35..c5742d11b2 100644 --- a/wallet/tests/sc_describe_key_test.go +++ b/wallet/tests/sc_describe_key_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_generate_keys_test.go b/wallet/tests/sc_generate_keys_test.go index 4452773b4f..4a617890ba 100644 --- a/wallet/tests/sc_generate_keys_test.go +++ b/wallet/tests/sc_generate_keys_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_import_network_test.go b/wallet/tests/sc_import_network_test.go index 4055e75f45..b4e081ab62 100644 --- a/wallet/tests/sc_import_network_test.go +++ b/wallet/tests/sc_import_network_test.go @@ -21,6 +21,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_import_wallet_test.go b/wallet/tests/sc_import_wallet_test.go index 0a9ac9e918..5818873d47 100644 --- a/wallet/tests/sc_import_wallet_test.go +++ b/wallet/tests/sc_import_wallet_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_isolate_key_test.go b/wallet/tests/sc_isolate_key_test.go index 0a395b8ff1..9771b4cf40 100644 --- a/wallet/tests/sc_isolate_key_test.go +++ b/wallet/tests/sc_isolate_key_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_list_keys_test.go b/wallet/tests/sc_list_keys_test.go index 0cbdfe9fba..c146459299 100644 --- a/wallet/tests/sc_list_keys_test.go +++ b/wallet/tests/sc_list_keys_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_list_wallets_test.go b/wallet/tests/sc_list_wallets_test.go index e03abc849d..1fb1eb8b36 100644 --- a/wallet/tests/sc_list_wallets_test.go +++ b/wallet/tests/sc_list_wallets_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_rename_wallet_test.go b/wallet/tests/sc_rename_wallet_test.go index 4a6585f395..8c2b3a4c60 100644 --- a/wallet/tests/sc_rename_wallet_test.go +++ b/wallet/tests/sc_rename_wallet_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_rotate_key_test.go b/wallet/tests/sc_rotate_key_test.go index ebdc56bd80..1483cacd32 100644 --- a/wallet/tests/sc_rotate_key_test.go +++ b/wallet/tests/sc_rotate_key_test.go @@ -21,6 +21,7 @@ import ( "code.vegaprotocol.io/vega/cmd/vegawallet/commands/flags" vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/api" + "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_sign_and_verify_command_test.go b/wallet/tests/sc_sign_and_verify_command_test.go index 738620753c..eb5b55bf58 100644 --- a/wallet/tests/sc_sign_and_verify_command_test.go +++ b/wallet/tests/sc_sign_and_verify_command_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_sign_and_verify_message_test.go b/wallet/tests/sc_sign_and_verify_message_test.go index c9e201aef0..ce293f5a81 100644 --- a/wallet/tests/sc_sign_and_verify_message_test.go +++ b/wallet/tests/sc_sign_and_verify_message_test.go @@ -20,6 +20,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_taint_key_test.go b/wallet/tests/sc_taint_key_test.go index d52ef20480..49713639ba 100644 --- a/wallet/tests/sc_taint_key_test.go +++ b/wallet/tests/sc_taint_key_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/require" ) diff --git a/wallet/tests/sc_update_passphrase_test.go b/wallet/tests/sc_update_passphrase_test.go index 0f4999b870..675bc48cb8 100644 --- a/wallet/tests/sc_update_passphrase_test.go +++ b/wallet/tests/sc_update_passphrase_test.go @@ -19,6 +19,7 @@ import ( "testing" vgrand "code.vegaprotocol.io/vega/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/version/helpers.go b/wallet/version/helpers.go index 7acba8a4d4..899de17ecc 100644 --- a/wallet/version/helpers.go +++ b/wallet/version/helpers.go @@ -24,6 +24,7 @@ import ( "time" apipb "code.vegaprotocol.io/vega/protos/vega/api/v1" + "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials/insecure" diff --git a/wallet/wallet/hd_key_pair_test.go b/wallet/wallet/hd_key_pair_test.go index 677d625ac9..f275d6d6e4 100644 --- a/wallet/wallet/hd_key_pair_test.go +++ b/wallet/wallet/hd_key_pair_test.go @@ -22,6 +22,7 @@ import ( "testing" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/wallet/hd_key_ring_test.go b/wallet/wallet/hd_key_ring_test.go index 0ff6f83940..de6e9fbeb8 100644 --- a/wallet/wallet/hd_key_ring_test.go +++ b/wallet/wallet/hd_key_ring_test.go @@ -20,6 +20,7 @@ import ( "testing" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/wallet/hd_master_key_pair_test.go b/wallet/wallet/hd_master_key_pair_test.go index 21737a0f50..e7eaf95825 100644 --- a/wallet/wallet/hd_master_key_pair_test.go +++ b/wallet/wallet/hd_master_key_pair_test.go @@ -20,6 +20,7 @@ import ( "testing" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/wallet/hd_wallet_test.go b/wallet/wallet/hd_wallet_test.go index e2eef7f66f..f17b3013b3 100644 --- a/wallet/wallet/hd_wallet_test.go +++ b/wallet/wallet/hd_wallet_test.go @@ -25,6 +25,7 @@ import ( vgrand "code.vegaprotocol.io/vega/libs/rand" "code.vegaprotocol.io/vega/wallet/wallet" "code.vegaprotocol.io/vega/wallet/wallets" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/wallet/wallet/store/v1/file_store.go b/wallet/wallet/store/v1/file_store.go index 855eb7414a..1155566325 100644 --- a/wallet/wallet/store/v1/file_store.go +++ b/wallet/wallet/store/v1/file_store.go @@ -32,6 +32,7 @@ import ( vgjob "code.vegaprotocol.io/vega/libs/job" "code.vegaprotocol.io/vega/wallet/api" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/fsnotify/fsnotify" ) diff --git a/wallet/wallet/version_test.go b/wallet/wallet/version_test.go index 4086b663f8..3925d65097 100644 --- a/wallet/wallet/version_test.go +++ b/wallet/wallet/version_test.go @@ -19,6 +19,7 @@ import ( "testing" "code.vegaprotocol.io/vega/wallet/wallet" + "github.com/stretchr/testify/assert" ) diff --git a/wallet/wallets/handler_test.go b/wallet/wallets/handler_test.go index c6ab0f0966..e4eb987c35 100644 --- a/wallet/wallets/handler_test.go +++ b/wallet/wallets/handler_test.go @@ -24,10 +24,10 @@ import ( walletpb "code.vegaprotocol.io/vega/protos/vega/wallet/v1" "code.vegaprotocol.io/vega/wallet/wallet" "code.vegaprotocol.io/vega/wallet/wallets" - "github.com/stretchr/testify/require" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) const (